Skip to content

Commit

Permalink
Improvements to how extensions can create kinds
Browse files Browse the repository at this point in the history
  • Loading branch information
ganelson committed Apr 24, 2024
1 parent 623fbb9 commit ec38eb8
Show file tree
Hide file tree
Showing 94 changed files with 1,884 additions and 402 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Inform 7

[Version](notes/versioning.md): 10.2.0-beta+6X46 'Krypton' (22 April 2024)
[Version](notes/versioning.md): 10.2.0-beta+6X47 'Krypton' (24 April 2024)

## About Inform

Expand Down
4 changes: 2 additions & 2 deletions build.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Prerelease: beta
Build Date: 22 April 2024
Build Number: 6X46
Build Date: 24 April 2024
Build Number: 6X47
20 changes: 14 additions & 6 deletions docs/BasicInformKit/S-blc.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/BasicInformKit/S-cmb.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h1><a href="../index.html">
<span class="plain-syntax">[ </span><span class="identifier-syntax">COMBINATION_TY_Create</span><span class="plain-syntax"> </span><span class="identifier-syntax">kind</span><span class="plain-syntax"> </span><span class="identifier-syntax">sb_address</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax"> </span><span class="identifier-syntax">long_block</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> </span><span class="identifier-syntax">bk</span><span class="plain-syntax"> </span><span class="identifier-syntax">v</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax"> = </span><span class="identifier-syntax">KindConstructorArity</span><span class="plain-syntax">(</span><span class="identifier-syntax">kind</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">long_block</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePVLongBlock</span><span class="plain-syntax">(</span><span class="identifier-syntax">COMBINATION_ITEM_BASE</span><span class="plain-syntax">+</span><span class="identifier-syntax">N</span><span class="plain-syntax">, </span><span class="identifier-syntax">COMBINATION_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">long_block</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePVLongBlockFlexible</span><span class="plain-syntax">(</span><span class="identifier-syntax">COMBINATION_TY</span><span class="plain-syntax">, </span><span class="identifier-syntax">COMBINATION_ITEM_BASE</span><span class="plain-syntax"> + </span><span class="identifier-syntax">N</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">InitialisePVLongBlockField</span><span class="plain-syntax">(</span><span class="identifier-syntax">long_block</span><span class="plain-syntax">, </span><span class="identifier-syntax">COMBINATION_KIND_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">kind</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax">=0: </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">N</span><span class="plain-syntax">: </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">bk</span><span class="plain-syntax"> = </span><span class="identifier-syntax">KindConstructorTerm</span><span class="plain-syntax">(</span><span class="identifier-syntax">kind</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
Expand All @@ -104,7 +104,7 @@ <h1><a href="../index.html">
<span class="plain-syntax"> </span><span class="identifier-syntax">InitialisePVLongBlockField</span><span class="plain-syntax">(</span><span class="identifier-syntax">long_block</span><span class="plain-syntax">, </span><span class="identifier-syntax">COMBINATION_ITEM_BASE</span><span class="plain-syntax">+</span><span class="identifier-syntax">i</span><span class="plain-syntax">, </span><span class="identifier-syntax">v</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> }</span>

<span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePVShortBlock</span><span class="plain-syntax">(</span><span class="identifier-syntax">sb_address</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePVShortBlock</span><span class="plain-syntax">(</span><span class="identifier-syntax">sb_address</span><span class="plain-syntax">, </span><span class="identifier-syntax">kind</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax">--&gt;0 = </span><span class="identifier-syntax">long_block</span><span class="plain-syntax">;</span>

<span class="plain-syntax"> </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax">;</span>
Expand Down
48 changes: 44 additions & 4 deletions docs/BasicInformKit/S-knd.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h1><a href="../index.html">
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">MAKE_MUTABLE_FN_KMF</span><span class="plain-syntax"> = </span><span class="constant-syntax">13</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">HASH_FN_KMF</span><span class="plain-syntax"> = </span><span class="constant-syntax">14</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">SHORT_BLOCK_SIZE_KMF</span><span class="plain-syntax"> = </span><span class="constant-syntax">15</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">LONG_BLOCK_SIZE_FN_KMF</span><span class="plain-syntax"> = </span><span class="constant-syntax">16</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">LONG_BLOCK_SIZE_KMF</span><span class="plain-syntax"> = </span><span class="constant-syntax">16</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">SERIALISE_FN_KMF</span><span class="plain-syntax"> = </span><span class="constant-syntax">17</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">UNSERIALISE_FN_KMF</span><span class="plain-syntax"> = </span><span class="constant-syntax">18</span><span class="plain-syntax">;</span>
</pre>
Expand Down Expand Up @@ -359,12 +359,52 @@ <h1><a href="../index.html">
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">PVField</span><span class="plain-syntax"> = </span><span class="identifier-syntax">BlkValueReadSB</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax"> = </span><span class="identifier-syntax">BlkValueWriteSB</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">CreatePVLongBlock</span><span class="plain-syntax"> = </span><span class="identifier-syntax">BlkValueCreateLB</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">CreatePVLongBlockMultiple</span><span class="plain-syntax"> = </span><span class="identifier-syntax">BlkValueCreateMultipleLB</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">InitialisePVLongBlockField</span><span class="plain-syntax"> = </span><span class="identifier-syntax">BlkValueWriteLB</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">PVLongBlockField</span><span class="plain-syntax"> = </span><span class="identifier-syntax">BlkValueReadLB</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">CreatePVShortBlock</span><span class="plain-syntax"> = </span><span class="identifier-syntax">BlkValueCreateSB</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">SBONLYPV_FIELDS</span><span class="plain-syntax"> = </span><span class="constant-syntax">2</span><span class="plain-syntax">;</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">CreatePVShortBlock</span><span class="plain-syntax"> </span><span class="identifier-syntax">sb_address</span><span class="plain-syntax"> </span><span class="identifier-syntax">kind_id</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax"> </span><span class="identifier-syntax">size</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">size</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ReadKindMetadata</span><span class="plain-syntax">(</span><span class="identifier-syntax">kind_id</span><span class="plain-syntax">, </span><span class="identifier-syntax">SHORT_BLOCK_SIZE_KMF</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax"> = </span><span class="identifier-syntax">BlkValueCreateSB</span><span class="plain-syntax">(</span><span class="identifier-syntax">sb_address</span><span class="plain-syntax">, </span><span class="identifier-syntax">size</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ReadKindMetadata</span><span class="plain-syntax">(</span><span class="identifier-syntax">kind_id</span><span class="plain-syntax">, </span><span class="identifier-syntax">LONG_BLOCK_SIZE_KMF</span><span class="plain-syntax">) == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax">--&gt;0 = </span><span class="identifier-syntax">BLK_BVBITMAP_SBONLY</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax">--&gt;1 = </span><span class="identifier-syntax">kind_id</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> }</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">CreatePVLongBlock</span><span class="plain-syntax"> </span><span class="identifier-syntax">kind_id</span><span class="plain-syntax"> </span><span class="identifier-syntax">size</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">size</span><span class="plain-syntax"> &lt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">size</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ReadKindMetadata</span><span class="plain-syntax">(</span><span class="identifier-syntax">kind_id</span><span class="plain-syntax">, </span><span class="identifier-syntax">LONG_BLOCK_SIZE_KMF</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">size</span><span class="plain-syntax"> </span><span class="reserved-syntax">ofclass</span><span class="plain-syntax"> </span><span class="identifier-syntax">Routine</span><span class="plain-syntax">) {</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">BlkValueError</span><span class="plain-syntax">(</span><span class="string-syntax">"CreatePVLongBlock needs a size"</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">size</span><span class="plain-syntax"> = </span><span class="constant-syntax">8</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> }</span>
<span class="plain-syntax"> }</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">BlkValueCreateLB</span><span class="plain-syntax">(</span><span class="identifier-syntax">size</span><span class="plain-syntax">, </span><span class="identifier-syntax">kind_id</span><span class="plain-syntax">);</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">CreatePVLongBlockFlexible</span><span class="plain-syntax"> </span><span class="identifier-syntax">kind_id</span><span class="plain-syntax"> </span><span class="identifier-syntax">size</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">size</span><span class="plain-syntax"> &lt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">BlkValueError</span><span class="plain-syntax">(</span><span class="string-syntax">"CreatePVLongBlockFlexible needs a size"</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">size</span><span class="plain-syntax"> = </span><span class="constant-syntax">8</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> }</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">BlkValueCreateMultipleLB</span><span class="plain-syntax">(</span><span class="identifier-syntax">size</span><span class="plain-syntax">, </span><span class="identifier-syntax">kind_id</span><span class="plain-syntax">);</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">KindOfShortBlockOnlyPV</span><span class="plain-syntax"> </span><span class="identifier-syntax">bv</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">bv</span><span class="plain-syntax">--&gt;1;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">ShortBlockOnlyPVFlags</span><span class="plain-syntax"> </span><span class="identifier-syntax">bv</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">return</span><span class="plain-syntax"> (</span><span class="identifier-syntax">bv</span><span class="plain-syntax">--&gt;0) &amp; </span><span class="identifier-syntax">BLK_BVUSERBITMAP</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">WriteShortBlockOnlyPVFlags</span><span class="plain-syntax"> </span><span class="identifier-syntax">bv</span><span class="plain-syntax"> </span><span class="identifier-syntax">flags</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">bv</span><span class="plain-syntax">--&gt;0 = ((</span><span class="identifier-syntax">bv</span><span class="plain-syntax">--&gt;0) &amp; </span><span class="identifier-syntax">BLK_BVBITMAP_USERBITMAPMASK</span><span class="plain-syntax">) + (</span><span class="identifier-syntax">flags</span><span class="plain-syntax"> &amp; </span><span class="identifier-syntax">BLK_BVUSERBITMAP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">];</span>

<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">CopyPVShortBlock</span><span class="plain-syntax"> = </span><span class="identifier-syntax">BlkValueCopySB</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">CopyPVRawData</span><span class="plain-syntax"> = </span><span class="identifier-syntax">BlkValueCopyRawLongBlock</span><span class="plain-syntax">;</span>

Expand Down
Loading

0 comments on commit ec38eb8

Please sign in to comment.