refactor(compiler)!: migrate SDK to minimal storage ISA
Test / Tests and coverage
Intrepid/Prometeu/Studio/pipeline/pr-master This commit looks good

Replace retired guards and publication opcodes with SDK checks, neutral TRAP and sequential List/Linked mutations with explicit failure phases. Preserve snapshot cursors and import schema 2 metadata with the delivered provider pin.

Include common/source/installed conformance, debug and release evidence, synchronized specs and the consolidated lesson. Runtime checkout remains unchanged.
This commit is contained in:
2026-10-24 01:35:42 +01:00
parent 77aada6259
commit 632ba6d0d6
51 changed files with 2688 additions and 711 deletions
@@ -44,10 +44,11 @@ references. Producer checks validate proven carrier facts; runtime admission
and execution remain authoritative for reference identity, session ownership,
platform availability and traps. Unsupported carrier tokens MUST fail explicitly.
Static intrinsic String facts MUST follow the provider verifier's String-only
mask: a proven null is rejected at load time. The dispatcher's acceptance of
null for the String ABI does not broaden that static rule. Random's static
reference mask includes null; native handle validity is still checked at runtime.
Intrinsic arguments MUST use each schema-2 entry's ordered nullable mask.
A proven null is admitted for hash.string's String slot; older String entries
remain non-nullable. Random nullable reference admission does not remove runtime
receiver/provenance checks. Do not infer nullable admission from carrier width,
name, determinism or a different entry using the same ABI atom.
Determinism MUST NOT be interpreted as purity. In particular, all Random calls
mutate guest state. Reachable calls cannot be removed, merged or reordered in a
@@ -57,6 +58,30 @@ base cost 4, cost 8 per attempt and a maximum of 64 attempts in the selected
contract. The runtime performs charging; Java metadata does not implement a
second scheduler or random algorithm.
## Schema 2 invocation and cost metadata
Every entry MUST preserve all 25 CSV columns, including schema_version=2,
arg_nullable, invocation_model, scratch_model, context_access, cost_arg_index and
cost_per_byte in addition to the original 18 fields. Nullable bits are lowercase
booleans in flattened argument order, exactly one per slot; zero arguments use
an empty mask. Numeric carriers cannot be nullable.
Supported coherent profiles are host_buffered_v1/existing_contract_v1/host,
vm_owned_v1/existing_contract_v1/vm_state and borrowed_inline_v1/none/none.
The borrowed profile requires its separately declared deterministic/nonallocating/
nonmutating effects; existing Host/VM entries do not acquire borrowed semantics.
Unsupported schemas, models, profiles and incoherent layouts, masks, indices or
cost parameters MUST fail explicitly.
Fixed costs have no argument index, zero per-byte/attempt cost and zero attempts.
random_rejection_v1 retains base 4, attempt cost 8 and at most 64 draws with the
VM-owned profile. argument_utf8_bytes_v1 selects String argument zero with the
borrowed profile, base 8, one cycle per UTF-8 byte and zero attempt fields. Empty
or null String costs base 8 and remains subject to that entry's nullable mask.
No consumer-side scheduler or hash implementation is added by importing metadata.
All 108 provider entries, including hash.i64/hash.float/hash.string, are represented;
metadata parity does not declare PBS hashing facades delivered.
## Constants
Builtin constants have their own lookup identity `(target, name, version)` and
@@ -188,93 +188,66 @@ tracked separately in AGD75; passing common conformance does not claim complete
PBS lowering or complete Studio/runtime integration.
## Generic logical guards and atomic storage publication
## Minimal typed storage and range copy
The core includes the following generic operations, with u16 opcodes and
little-endian u32 immediates. They introduce no new Registry category, syscall,
source-language collection or ambient transaction. Operand order below is bottom
to top; all integer operands are Int64.
The supported collection storage operations are STRUCT_NEW/GET/SET (0xA0–0xA2),
ARRAY_NEW/LEN/GET/SET (0xA3–0xA6) and ARRAY_COPY (0xA9). Logical bounds and
multi-owner collection algorithms belong to producers. Encodings 0xA7, 0xA8,
0xAA and 0xAB MUST be rejected at actual instruction positions, including dead
code; identical bytes in immediates or data are not opcodes. No guard, publication
schema, batch transaction or atomic region replaces the retired instructions.
| Opcode | Immediate | Stack operands consumed |
| --- | --- | --- |
| INDEX_GUARD `0xA7` | none | index, exclusive limit |
| ARRAY_CHECK_LENGTH `0xA8` | Array TypeId | length |
| ARRAY_COPY `0xA9` | Array TypeId | source, sourceStart, target, targetStart, count |
| STORAGE_PUBLISH `0xAA` | Array TypeId, Struct TypeId, first field, second field | source, sourceStart, target, targetStart, count, fillStart, fillCount, element group, owner, first field group, second field group |
ARRAY_COPY encodes u16 LE 0xA9 followed by Array TypeId u32 LE. Its five operands,
bottom to top, are source, sourceStart, target, targetStart and count, with no
result. Receivers MUST match the exact Array descriptor; offsets/count MUST use
Int64. Ranges are physical, nonnegative and strict; an empty range may start at
length. Snapshot source groups before writing for overlap. Preserve complete
presence tags, immutable boxes, native owners and identities without unpacking
and repacking existing values.
All operations return no values. INDEX_GUARD accepts exactly
`0 <= index < limit`, otherwise TRAP_OOB. It does not use physical storage length.
ARRAY_CHECK_LENGTH accepts zero through u32::MAX without allocating. Negative
lengths produce TRAP_OOB; values above u32::MAX produce the same resource
SizeOverflow failure as ARRAY_NEW. This check does not reserve future allocation.
Reserve the complete TemporaryBytes scratch before writing and release it on
success or failure. A refused instruction preserves its own operands, complete
destinations and owners. No callback, GC or scheduler interleaves its preparation
and commit. This guarantee covers that instruction only, not earlier instructions
in a source method.
ARRAY_COPY and STORAGE_PUBLISH require exact Array receiver identities and complete
stored groups. Every range must have nonnegative start/count and fit its physical
array; an empty range may start at length. Invalid ranges produce TRAP_OOB, never
clamping or truncation. Copy reads the pre-attempt source sequence, including for
overlapping source/target ranges. Presence tags, immutable boxes, native owners and
object identities are preserved without payload unpacking or repacking.
For N=count and Registry-derived element width W, attempted work is C=4+2*N*W.
With five temporary operands and exact Int64 N in 0..u32::MAX, precharge the whole
representable C before receiver/range/group/scratch validation and retain it on
refusal. Underflow, wrong count carrier or count outside that interval costs base
4 and follows ordinary fault precedence, without reading frame locals or
converting N. Checked C overflow costs 4 and raises SizeOverflow before ordinary
validation. Above-u32 N is not automatically an allocation SizeOverflow.
STORAGE_PUBLISH first copies the selected source range, then fills the selected
target range with the supplied element group, then writes the two selected fields
on the supplied Struct owner. Fields must be distinct valid indices on that Struct;
their types and widths come from the immutable Registry. Source code/producer owns
selection of every range, value, owner and field. The VM implements these generic
ordered effects and does not select collection algorithms.
Otherwise fault order is height, source, target, offset/count carriers in source
order, source range, target range, scratch reservation, source groups in order.
N=0 still validates receivers/ranges and costs 4; aliases give no discount.
N=10/W=1 costs 24 on success or receiver/range/scratch refusal. Zero budget does
nothing; positive budget admits the full instruction with overshoot. A failed
attempt reports Trap rather than BudgetExhausted and is not a successful step.
Optimizers MUST NOT erase empty-copy validation, faults or required charged work.
Loading validates all immediate identities/categories/fields even in unreachable
code. Verification requires complete typed operands. ARRAY_COPY consumes five
slots; STORAGE_PUBLISH consumes `8 + elementWidth + firstWidth + secondWidth`.
INDEX_GUARD consumes two slots and ARRAY_CHECK_LENGTH consumes one.
## Neutral terminal failure and producer mutation boundaries
Execution validates all receivers, lengths/ranges, supplied groups and source
groups, and reserves the complete charged copy scratch before writing. Validation,
quota or host allocation refusal leaves all input operands and destinations
unchanged, including both fields and native owners. Scratch uses TemporaryBytes,
is refunded on success/refusal and does not relax any resource ceiling. Existing
operands remain roots during preparation. There is no GC, callback, scheduler or
other interleaving inside this single instruction. Commit uses already validated
complete groups, performs no fallible allocation and consumes operands only after
all selected effects have been published. No prepared token escapes the attempt.
Common executable IR and IRVM represent existing TRAP (0x05) as a zero-operand,
zero-result block terminator, preserving its source span. It raises
TRAP_EXPLICIT, distinct from a debugger breakpoint. It neither returns nor falls
through, and optimization MUST retain its observable failure. There is no new
runtime opcode or encoded error argument.
Base cycle costs are 2 for either guard, 4 for ARRAY_COPY and 6 for STORAGE_PUBLISH.
Copy adds `2 * count * elementWidth`; publication additionally adds
`fillCount * elementWidth + firstWidth + secondWidth`. Work arithmetic is checked
before mutation. A refused preparation still charges the attempted work. Neither
operation is a safepoint. Consumers must prepare any potentially failing return
carrier and all call operands before publication; a series of ordinary stores is
not a substitute for whole-operation safety.
Source producers implement logical checks with comparisons and branches. A
trusted private PBS SDK failure binding selects this terminal instruction, not
a backend-implemented bounds algorithm. Physical ARRAY operations retain their
own faults/resource context. Per-instruction cycle costs and real emitted work
apply; the retired guard costs are not simulated.
## Atomic publication of multiple Struct instances
FIELDS_PUBLISH (`0xAB`) has one little-endian u32 schema TypeId immediate. The
schema MUST be a Registry Struct whose ordered field types are all Struct types.
Names are descriptive only. The schema is declarative metadata; no request object,
new Registry category or preparation token is allocated or exposed.
For each schema entry, the operand stack supplies one nullable destination
reference followed by every destination field's complete typed value group, in
field declaration order. The stack effect is the sum, over entries, of one plus
the destination instance's initialization-slot count; no results are produced.
Null skips that destination, but every supplied field group is still validated.
Non-null destinations require exact concrete Struct identity and a live reference
of the current session/generation. Array, Trait, Fn and builtin schema entries are
invalid, including in unreachable instructions. The full schema and exact stack
height/groups are checked under normal Registry admission/work limits.
Validate all destinations and value groups before any shared write or operand
consumption. The original operands remain roots throughout preparation. Then write
all fields in schema order, without allocation, fallible validation, callbacks,
GC or scheduler interleaving, and consume the entire input. Input values are
captured before publication; repeated destinations use ordered last-write
semantics. Complete multi-slot/native/reference groups retain identity and normal
ownership. A failed attempt preserves every destination and the operand stack.
The operation allocates no publication scratch or guest object. Operand/frame and
source value preparation remain normally charged and may fail before publication.
Base cost is 6 cycles. After the stack-height check, precharge one cycle per schema
entry and one per destination field execution slot for the complete declared
attempt, including skipped destinations. Quotas are unchanged.
This is a generic typed storage mechanism; collection algorithms and node topology
remain source-owned, with no collection-specific VM instruction or syscall.
Collection methods prepare bounds, next sizes, values, candidates and optional
results before the first visible mutation. A refusal before that boundary MUST
preserve the previous collection. A fault after it may leave earlier writes and
incomplete collection invariants; no whole-method rollback, retry or safe-reuse
guarantee exists. Successful methods MUST restore all published invariants.
Prepare-before-mutation does not prove every later operand/call/store infallible.
BudgetExhausted and debugger pauses can occur between instructions and resume at
the current PC; they neither roll back nor complete a method. No atomic observation
of source operations by host/debugger is promised. SDK methods introduce no user
callbacks or explicit suspension during the updates that complete their invariants.
@@ -1,7 +1,7 @@
# SDK Linked and bidirectional snapshot capture
Owner: `compiler/pbs`. Linked algorithms belong to executable PBS SDK source.
Multi-object publication, storage, faults, ownership, GC and quotas remain generic
Typed storage, faults, ownership, GC and quotas remain generic
compiler/provider mechanisms. This contract builds on [generic structs](generic-structs-and-free-functions.md),
[arrays and optional](typed-arrays-and-optional-execution.md) and the
[shared Cursor protocol](sdk-list-and-cursor.md#cursor-protocol).
@@ -44,8 +44,8 @@ successor nodes beyond the ends. Nodes and private helpers are not a public API.
| `reverseCursor()` | Cursor<T> | Capture last to first |
Reading, replacing and removing by index require `0 <= i < size`; invalid indices
raise TRAP_OOB even when empty. Insertion accepts size, including zero in an empty
collection. Other insertion indices raise TRAP_OOB. Every valid position contains
raise TRAP_EXPLICIT even when empty. Insertion accepts size, including zero in an empty
collection. Other insertion indices raise TRAP_EXPLICIT. Every valid position contains
an element, so indexed read/removal returns a present optional. Zero and false are
present values. Empty-end results do not suppress type or resource faults.
@@ -56,8 +56,8 @@ Value search/removal is outside this API, consistently with List.
Size is nonnegative long. Indices accept int and long with localized lossless
promotion, without general numeric conversion or truncation. The SDK checks the
current size against the maximum signed long before incrementing, using the generic
logical guard; an unrepresentable next size is rejected before arithmetic or
current size against the maximum signed long before incrementing, using SDK comparisons
and terminal TRAP_EXPLICIT; an unrepresentable next size is rejected before arithmetic or
mutation. Array's u32 structural maximum is not a Linked size limit. Provider
quotas and applicable structural limits can refuse allocation much earlier.
Receiver/arguments evaluate once in source order, including named application.
@@ -83,21 +83,29 @@ work and O(n) additional nodes; next follows one link in O(1). Allocation,
optional-carrier preparation, ownership and eventual GC retain their normal
costs. Repeated indexed reads are not an efficient traversal strategy.
## Complete mutation attempts and lifetime
## Mutation phases and lifetime
Before publication, prepare bounds, next size, candidate nodes, optional results,
all field values and call/operand resources. Private generic FIELDS_PUBLISH
publishes complete field groups of source-selected objects after validating all
receivers and groups. Null destinations represent missing neighbors. Algorithms
select the new head/tail/size and neighbor fields in SDK source; the VM has no
Linked opcode or syscall.
Before the first visible write, prepare bounds, next size, candidate nodes,
optional results and complete field values. Insertion updates previous.next or
head, then next.previous or tail, then length. Removal prepares its result and
neighbors, updates the same two sides, then length. Indexed replacement updates
only value; clear assigns head, tail and length in that order. Source algorithms
own these choices; the VM has no Linked instruction, publication schema or syscall.
No fallible allocation, callback, scheduler or GC boundary may expose partial
publication. A refused mutation preserves all previous head/tail/size values,
elements and neighbor links. This includes optional return preparation for
removals and mutations without new nodes. Individually atomic stores do not prove
whole-operation atomicity. Previously evaluated argument effects are ordinary
source effects and are not rolled back.
A logical rejection or preparation refusal before mutation preserves the previous
head/tail/size, elements and neighbor links. Successful return restores all public
invariants. An internal/resource fault after the first visible write propagates
without rollback: earlier writes may remain and topology/size can be incomplete.
No safe reuse, retry or automatic recovery is promised. This explicitly replaces
the former whole-method refusal guarantee, and is not a basic-consistency claim.
Previously evaluated argument effects remain ordinary source effects.
Individual instruction failures preserve their own entry state. Operand/call/
optional preparation remains charged and can fail; sequential stores are not a
transaction. No user callback or explicit suspension is inserted during updates.
BudgetExhausted and debugger pauses can stop between instructions and resume at
the current PC without completing or undoing the method. Host/debugger observation
is not atomic. No catch, poison flag or recovery API is introduced.
Unpublished candidates follow normal ownership and quotas. Capture failure returns
no partial Cursor and does not change the source. Removal and clear release
@@ -117,11 +125,11 @@ optional-element diagnostics, both Cursor orders/states and mutation independenc
Independently observe all original fields, link carriers, nodes and groups around
quota refusals, including node/result/operand preparation. Exercise ordinary GC
safepoints for removed nodes/values, clear, snapshots and prefix/final release.
Generic publication also requires non-PBS producers and malformed/dead operand
coverage. Regress shared Array/List/generic/contract/Cursor behavior and editor/LSP
Neutral stores/copy/terminal failure also require non-PBS producers and
malformed/dead instruction coverage. Regress shared Array/List/generic/contract/Cursor behavior and editor/LSP
projections. Ship the specification and executable example with installed SDK
knowledge, compile the actual packaged example outside the checkout and execute
its emitted PBX with the production provider.
See [generic Registry/PBX publication](../../general/specs/typed-registry-and-pbx-v0.md)
See [generic Registry/PBX storage](../../general/specs/typed-registry-and-pbx-v0.md)
for the language-neutral instruction contract.
+42 -19
View File
@@ -1,8 +1,8 @@
# SDK List and snapshot Cursor
Owner: `compiler/pbs`. List and Cursor algorithms belong to the executable PBS
SDK. Logical guards, complete stored-group transfers and atomic publication are
language-neutral compiler/runtime mechanisms. This contract builds on
SDK. Typed storage, complete stored-group transfers and terminal failure are
language-neutral compiler/runtime mechanisms. Logical checks are SDK algorithms. This contract builds on
[arrays and optional](typed-arrays-and-optional-execution.md),
[generic structs](generic-structs-and-free-functions.md) and
[generic contracts](generic-contracts.md).
@@ -56,9 +56,12 @@ Receiver and arguments are evaluated once in source order. Indices, lengths and
capacities accept int and long with localized lossless promotion; this does not
add general numeric conversion. No long value may be truncated.
Invalid logical indices raise TRAP_OOB, including indices inside physical capacity.
Negative lengths, structural overflow and quota refusals preserve the applicable
Array/provider fault classification. Failures are never translated into none.
SDK checks reject invalid logical indices, negative lengths/capacities and requests
above Array's u32 structural maximum before mutation with TRAP_EXPLICIT and a
source location. This includes indices inside physical capacity. Physical Array
instructions that actually execute retain their own fault/resource classification.
Failures are never translated into none. Growth arithmetic must not overflow or
truncate; clamping applies only to a valid requested length.
## Capacity policy
@@ -75,20 +78,40 @@ never shrinks and preserves size. Trim uses exactly size. Old and candidate arra
may coexist; neither discarded references nor replaced storage promise immediate
GC or immediate quota recovery.
## Complete mutation attempts
## Mutation preparation, visible writes and faults
Private storage transfer preserves whole existing groups, presence tags and
reference identities. Shifting must not unpack each public Array optional and
repack/rebox every payload. Prepare potentially failing validation, packing,
allocations, return carriers, scratch and publication operands before modifying
observable storage. Then publish the complete selected slot/range and field
changes without a fallible allocation, callback, scheduler or GC boundary.
Transfer whole stored groups, presence tags and reference identities; do not
unpack and rebox all existing elements during shifting. Prepare validation,
next size, inserted values, candidates and optional return carriers before the
first visible write. This preparation does not prove all later instructions
infallible. Values/receiver/argument effects already evaluated are not rolled back.
Any refused attempt leaves size, backing reference, capacity, slots and roots
unchanged. This includes insert/remove without growth and preparation of
removeAt's optional result. Individually atomic Array instructions do not by
themselves establish this guarantee. Previously evaluated argument effects are
not rolled back. Unpublished candidates obey normal ownership and budgets.
With growth, construct a private candidate and copy prefix/suffix directly into
their final positions; store the new value privately, then install storage and
length in sequence. Without growth, prepare the inserted stored group in a private
one-slot array, shift with overlap-safe ARRAY_COPY, copy that complete prepared
slot, then update length. Both copies retain scratch, validation and charging,
including empty copies. This one-slot preparation is charged allocation, not a
promise of allocation-free insertion or whole-array reconstruction.
Removal prepares its optional result, shifts the suffix, clears the old tail and
updates length. Clear and in-capacity resize clear the selected interval in index
order before assigning length. Growing resize prepares/copies a private candidate
before installing storage and length. Reserve/trim prepare/copy candidates and
replace storage only. Indexed replacement/clearAt alter a single checked position.
| Outcome | Guarantee |
| --- | --- |
| Logical rejection or preparation refusal before the first visible write | Preserve previous size, backing, capacity, slots and collection roots. Unpublished candidates obey normal ownership/quotas; immediate quota recovery is not promised. |
| Successful return | All collection invariants, cleanup, groups, identity and snapshot contracts hold. |
| Internal/resource fault after the first visible write | Propagate the fault; earlier writes can remain and collection invariants can be incomplete. No rollback, safe reuse, retry or automatic recovery is promised. |
The last row explicitly replaces the former whole-mutation refusal guarantee.
Individual instruction failure still preserves its own entry operands/storage.
No catch, poison flag or recovery API is introduced. The SDK inserts no user
callbacks or explicit suspension during mutation updates. BudgetExhausted and
pauses are resumable instruction boundaries, not faults or rollback. The host or
debugger may observe intermediate state; a method is not an atomic region.
## Cursor protocol
@@ -168,9 +191,9 @@ through allocations and calls; provider quotas remain unchanged.
Conformance must execute real PBS through common IR and PBX in the production VM.
It covers every operation, constructor/type rule, logical bounds, exact growth,
holes and full groups, aliases, the entire Cursor table, snapshot independence,
shared object mutation, non-List producers, full-operation refusals with and without
shared object mutation, non-List producers, refusals before and after visible mutation with and without
growth, prefix reclamation, last-node retention, editor projections and installed
SDK/spec/example distribution. Generic publication also requires non-PBS tests.
SDK/spec/example distribution. Neutral storage/copy/terminal paths also require non-PBS tests.
Value search/removal, sorting, bulk APIs, new equality, public nodes, deep freezing,
general effect/transaction syntax and Linked/Set/Map implementations are out of scope.
@@ -60,7 +60,7 @@ Presence must be checked using the Dynamic tag before extraction. `DYN_CAN_UNPAC
PBS optional values use private nullable Struct carriers: null denotes none and a private instance contains the full payload for some. Named tuples remain flattened at callable boundaries and use private storage carriers where a single Registry type is required. These private carriers are inaccessible to source programs. They preserve nested optional distinctions, tuple value behavior and reference aliases within payloads.
Lowering must keep complete receiver/index/value groups rooted across allocations, calls and collection operations. GC, native ownership, quota accounting, costs and atomic refusals remain runtime contracts. No failure may publish partially initialized handles or be suppressed as none; no quota may be relaxed to satisfy conformance.
Lowering must keep complete receiver/index/value groups rooted across allocations, calls and collection operations. GC, native ownership, quota accounting, costs and per-instruction refusal preservation remain runtime contracts. No failure may publish partially initialized handles or be suppressed as none; no quota may be relaxed to satisfy conformance.
## Struct and contract integration
@@ -97,3 +97,9 @@ See [Runtime Random integration](runtime-random-integration.md) for opaque gener
these contextual construction positions and storage rules. A generic T field can
hold an optional value, but substituting an optional value type into array<T>
remains invalid. Array's private packing does not become a generic argument ABI.
SDK collections add logical checks before physical Array operations and terminate
logical refusals with TRAP_EXPLICIT. Their multi-instruction methods use the
[List mutation-phase contract](sdk-list-and-cursor.md#mutation-preparation-visible-writes-and-faults)
and [Linked contract](sdk-linked-and-cursor.md#mutation-phases-and-lifetime);
per-instruction storage guarantees do not imply whole-method rollback.
+10 -6
View File
@@ -204,10 +204,14 @@ The [Program Registry contract](../specs/runtime/02c-program-registry-and-pbx-v0
See the [random contract](../specs/runtime/02e-vm-owned-random-core.md) for Random BuiltinId 0x0016, ObjectKind tag 9, intrinsics 0x4000–0x4003, atomic state mutation, bounded 4+8*N costs and rejection-limit trap 0x00000015. Random is managed by the VM heap and existing GC, without host entropy or PBX changes.
## Atomic publication of multiple Struct instances
## Typed array range copy
FIELDS_PUBLISH (0xAB) atomically publishes complete typed fields to multiple
source-selected Struct destinations. Its schema is an ordinary Registry Struct;
no new category, request object, syscall or safepoint is introduced. Exact nullable
destination rules, stack effects, validation, costs and commit semantics are in the
[canonical instruction contract](../specs/runtime/02-vm-instruction-set.md#atomic-publication-of-multiple-struct-instances).
ARRAY_COPY (0xA9) copies complete groups between exact typed arrays with strict
physical ranges and pre-attempt overlap semantics. Preparation reserves scratch
before infallible commit; failures preserve operands/destinations and retain
charged work. No callbacks, GC or scheduling occur inside the instruction.
The [instruction contract](../specs/runtime/02-vm-instruction-set.md#typed-array-range-copy)
defines encoding, fault order and early cost selection. ARRAY_LEN remains the
physical query; producer algorithms own logical limits and multi-owner invariants.
There is no transactional sequence of stores. Encodings 0xA7/0xA8/0xAA/0xAB are
unsupported, including in dead code.
+109 -106
View File
@@ -1,106 +1,109 @@
final_id_hex,final_id_dec,canonical_name,canonical_version,owner,name,arg_slots,ret_slots,arg_layout,ret_layout,deterministic,may_allocate,parameter_names,cost_cycles,mutates_guest_state,cost_model,attempt_cost_cycles,max_attempts
0x1000,4096,vec2.dot,1,vec2,dot,4,1,Float|Float|Float|Float,Float,true,false,ax|ay|bx|by,10,false,fixed,0,0
0x1001,4097,vec2.length,1,vec2,length,2,1,Float|Float,Float,true,false,x|y,40,false,fixed,0,0
0x1100,4352,color.from_raw,1,color,from_raw,1,1,Int64,builtin:color,true,false,raw,1,false,fixed,0,0
0x1101,4353,color.rgb,1,color,rgb,3,1,Int64|Int64|Int64,builtin:color,true,false,r|g|b,1,false,fixed,0,0
0x1102,4354,color.rgba,1,color,rgba,4,1,Int64|Int64|Int64|Int64,builtin:color,true,false,r|g|b|a,1,false,fixed,0,0
0x1103,4355,color.html_rgba,1,color,html_rgba,1,1,String,builtin:color,true,false,value,1,false,fixed,0,0
0x1104,4356,color.gray_scale,1,color,gray_scale,1,1,Int64,builtin:color,true,false,value,1,false,fixed,0,0
0x1105,4357,color.hex,1,color,hex,1,1,builtin:color,Int64,true,false,color,1,false,fixed,0,0
0x1106,4358,color.alpha,1,color,alpha,1,1,builtin:color,Int64,true,false,color,1,false,fixed,0,0
0x1120,4384,color.black,1,color,black,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x1121,4385,color.white,1,color,white,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x1122,4386,color.red,1,color,red,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x1123,4387,color.green,1,color,green,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x1124,4388,color.blue,1,color,blue,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x1125,4389,color.yellow,1,color,yellow,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x1126,4390,color.orange,1,color,orange,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x1127,4391,color.indigo,1,color,indigo,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x1128,4392,color.gray,1,color,gray,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x1129,4393,color.cyan,1,color,cyan,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x112A,4394,color.magenta,1,color,magenta,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x112B,4395,color.transparent,1,color,transparent,0,1,,builtin:color,true,false,,1,false,fixed,0,0
0x2100,8448,input.pad.up.pressed,1,input.pad.up,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2101,8449,input.pad.up.released,1,input.pad.up,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2102,8450,input.pad.up.down,1,input.pad.up,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2103,8451,input.pad.up.hold,1,input.pad.up,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2104,8452,input.pad.down.pressed,1,input.pad.down,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2105,8453,input.pad.down.released,1,input.pad.down,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2106,8454,input.pad.down.down,1,input.pad.down,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2107,8455,input.pad.down.hold,1,input.pad.down,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2108,8456,input.pad.left.pressed,1,input.pad.left,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2109,8457,input.pad.left.released,1,input.pad.left,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x210A,8458,input.pad.left.down,1,input.pad.left,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x210B,8459,input.pad.left.hold,1,input.pad.left,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x210C,8460,input.pad.right.pressed,1,input.pad.right,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x210D,8461,input.pad.right.released,1,input.pad.right,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x210E,8462,input.pad.right.down,1,input.pad.right,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x210F,8463,input.pad.right.hold,1,input.pad.right,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2110,8464,input.pad.a.pressed,1,input.pad.a,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2111,8465,input.pad.a.released,1,input.pad.a,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2112,8466,input.pad.a.down,1,input.pad.a,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2113,8467,input.pad.a.hold,1,input.pad.a,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2114,8468,input.pad.b.pressed,1,input.pad.b,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2115,8469,input.pad.b.released,1,input.pad.b,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2116,8470,input.pad.b.down,1,input.pad.b,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2117,8471,input.pad.b.hold,1,input.pad.b,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2118,8472,input.pad.x.pressed,1,input.pad.x,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2119,8473,input.pad.x.released,1,input.pad.x,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x211A,8474,input.pad.x.down,1,input.pad.x,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x211B,8475,input.pad.x.hold,1,input.pad.x,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x211C,8476,input.pad.y.pressed,1,input.pad.y,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x211D,8477,input.pad.y.released,1,input.pad.y,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x211E,8478,input.pad.y.down,1,input.pad.y,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x211F,8479,input.pad.y.hold,1,input.pad.y,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2120,8480,input.pad.l.pressed,1,input.pad.l,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2121,8481,input.pad.l.released,1,input.pad.l,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2122,8482,input.pad.l.down,1,input.pad.l,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2123,8483,input.pad.l.hold,1,input.pad.l,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2124,8484,input.pad.r.pressed,1,input.pad.r,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2125,8485,input.pad.r.released,1,input.pad.r,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2126,8486,input.pad.r.down,1,input.pad.r,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2127,8487,input.pad.r.hold,1,input.pad.r,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2128,8488,input.pad.start.pressed,1,input.pad.start,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2129,8489,input.pad.start.released,1,input.pad.start,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x212A,8490,input.pad.start.down,1,input.pad.start,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x212B,8491,input.pad.start.hold,1,input.pad.start,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x212C,8492,input.pad.select.pressed,1,input.pad.select,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x212D,8493,input.pad.select.released,1,input.pad.select,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x212E,8494,input.pad.select.down,1,input.pad.select,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x212F,8495,input.pad.select.hold,1,input.pad.select,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2130,8496,input.touch.button.pressed,1,input.touch.button,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2131,8497,input.touch.button.released,1,input.touch.button,released,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2132,8498,input.touch.button.down,1,input.touch.button,down,0,1,,Bool,true,false,,1,false,fixed,0,0
0x2133,8499,input.touch.button.hold,1,input.touch.button,hold,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2134,8500,input.touch.x,1,input.touch,x,0,1,,Int64,true,false,,1,false,fixed,0,0
0x2135,8501,input.touch.y,1,input.touch,y,0,1,,Int64,true,false,,1,false,fixed,0,0
0x3000,12288,math.i32.min,1,math.i32,min,2,1,Int32|Int32,Int32,true,false,a|b,2,false,fixed,0,0
0x3001,12289,math.i32.max,1,math.i32,max,2,1,Int32|Int32,Int32,true,false,a|b,2,false,fixed,0,0
0x3002,12290,math.i32.clamp,1,math.i32,clamp,3,1,Int32|Int32|Int32,Int32,true,false,value|min|max,4,false,fixed,0,0
0x3003,12291,math.i32.abs,1,math.i32,abs,1,1,Int32,Int32,true,false,value,2,false,fixed,0,0
0x3004,12292,math.i64.min,1,math.i64,min,2,1,Int64|Int64,Int64,true,false,a|b,2,false,fixed,0,0
0x3005,12293,math.i64.max,1,math.i64,max,2,1,Int64|Int64,Int64,true,false,a|b,2,false,fixed,0,0
0x3006,12294,math.i64.clamp,1,math.i64,clamp,3,1,Int64|Int64|Int64,Int64,true,false,value|min|max,4,false,fixed,0,0
0x3007,12295,math.i64.abs,1,math.i64,abs,1,1,Int64,Int64,true,false,value,2,false,fixed,0,0
0x3008,12296,mathf.min,1,mathf,min,2,1,Float|Float,Float,true,false,a|b,2,false,fixed,0,0
0x3009,12297,mathf.max,1,mathf,max,2,1,Float|Float,Float,true,false,a|b,2,false,fixed,0,0
0x300A,12298,mathf.clamp,1,mathf,clamp,3,1,Float|Float|Float,Float,true,false,value|min|max,4,false,fixed,0,0
0x300B,12299,mathf.abs,1,mathf,abs,1,1,Float,Float,true,false,value,2,false,fixed,0,0
0x300C,12300,mathf.floor,1,mathf,floor,1,1,Float,Float,true,false,value,4,false,fixed,0,0
0x300D,12301,mathf.ceil,1,mathf,ceil,1,1,Float,Float,true,false,value,4,false,fixed,0,0
0x300E,12302,mathf.trunc,1,mathf,trunc,1,1,Float,Float,true,false,value,4,false,fixed,0,0
0x300F,12303,mathf.round,1,mathf,round,1,1,Float,Float,true,false,value,4,false,fixed,0,0
0x3010,12304,mathf.sqrt,1,mathf,sqrt,1,1,Float,Float,true,false,value,16,false,fixed,0,0
0x3011,12305,mathf.sin,1,mathf,sin,1,1,Float,Float,true,false,angle,32,false,fixed,0,0
0x3012,12306,mathf.cos,1,mathf,cos,1,1,Float,Float,true,false,angle,32,false,fixed,0,0
0x3013,12307,mathf.atan2,1,mathf,atan2,2,1,Float|Float,Float,true,false,y|x,48,false,fixed,0,0
0x3014,12308,math.i32.to_i64,1,math.i32,to_i64,1,1,Int32,Int64,true,false,value,2,false,fixed,0,0
0x3015,12309,math.i64.to_i32,1,math.i64,to_i32,1,1,Int64,Int32,true,false,value,2,false,fixed,0,0
0x3016,12310,math.i32.to_float,1,math.i32,to_float,1,1,Int32,Float,true,false,value,2,false,fixed,0,0
0x3017,12311,math.i64.to_float,1,math.i64,to_float,1,1,Int64,Float,true,false,value,2,false,fixed,0,0
0x3018,12312,mathf.to_i32,1,mathf,to_i32,1,1,Float,Int32,true,false,value,2,false,fixed,0,0
0x3019,12313,mathf.to_i64,1,mathf,to_i64,1,1,Float,Int64,true,false,value,2,false,fixed,0,0
0x4000,16384,random.new,1,random,new,1,1,Int64,builtin:Random,true,true,seed,32,true,fixed,0,0
0x4001,16385,random.next,1,random,next,1,1,builtin:Random,Int64,true,false,rng,8,true,fixed,0,0
0x4002,16386,random.nextf,1,random,nextf,1,1,builtin:Random,Float,true,false,rng,12,true,fixed,0,0
0x4003,16387,random.range,1,random,range,3,1,builtin:Random|Int64|Int64,Int64,true,false,rng|min|max,4,true,random_rejection_v1,8,64
final_id_hex,final_id_dec,canonical_name,canonical_version,owner,name,arg_slots,ret_slots,arg_layout,ret_layout,deterministic,may_allocate,parameter_names,cost_cycles,mutates_guest_state,cost_model,attempt_cost_cycles,max_attempts,schema_version,arg_nullable,invocation_model,scratch_model,context_access,cost_arg_index,cost_per_byte
0x1000,4096,vec2.dot,1,vec2,dot,4,1,Float|Float|Float|Float,Float,true,false,ax|ay|bx|by,10,false,fixed,0,0,2,false|false|false|false,host_buffered_v1,existing_contract_v1,host,,0
0x1001,4097,vec2.length,1,vec2,length,2,1,Float|Float,Float,true,false,x|y,40,false,fixed,0,0,2,false|false,host_buffered_v1,existing_contract_v1,host,,0
0x1100,4352,color.from_raw,1,color,from_raw,1,1,Int64,builtin:color,true,false,raw,1,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x1101,4353,color.rgb,1,color,rgb,3,1,Int64|Int64|Int64,builtin:color,true,false,r|g|b,1,false,fixed,0,0,2,false|false|false,host_buffered_v1,existing_contract_v1,host,,0
0x1102,4354,color.rgba,1,color,rgba,4,1,Int64|Int64|Int64|Int64,builtin:color,true,false,r|g|b|a,1,false,fixed,0,0,2,false|false|false|false,host_buffered_v1,existing_contract_v1,host,,0
0x1103,4355,color.html_rgba,1,color,html_rgba,1,1,String,builtin:color,true,false,value,1,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x1104,4356,color.gray_scale,1,color,gray_scale,1,1,Int64,builtin:color,true,false,value,1,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x1105,4357,color.hex,1,color,hex,1,1,builtin:color,Int64,true,false,color,1,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x1106,4358,color.alpha,1,color,alpha,1,1,builtin:color,Int64,true,false,color,1,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x1120,4384,color.black,1,color,black,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x1121,4385,color.white,1,color,white,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x1122,4386,color.red,1,color,red,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x1123,4387,color.green,1,color,green,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x1124,4388,color.blue,1,color,blue,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x1125,4389,color.yellow,1,color,yellow,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x1126,4390,color.orange,1,color,orange,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x1127,4391,color.indigo,1,color,indigo,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x1128,4392,color.gray,1,color,gray,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x1129,4393,color.cyan,1,color,cyan,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x112A,4394,color.magenta,1,color,magenta,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x112B,4395,color.transparent,1,color,transparent,0,1,,builtin:color,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2100,8448,input.pad.up.pressed,1,input.pad.up,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2101,8449,input.pad.up.released,1,input.pad.up,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2102,8450,input.pad.up.down,1,input.pad.up,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2103,8451,input.pad.up.hold,1,input.pad.up,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2104,8452,input.pad.down.pressed,1,input.pad.down,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2105,8453,input.pad.down.released,1,input.pad.down,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2106,8454,input.pad.down.down,1,input.pad.down,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2107,8455,input.pad.down.hold,1,input.pad.down,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2108,8456,input.pad.left.pressed,1,input.pad.left,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2109,8457,input.pad.left.released,1,input.pad.left,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x210A,8458,input.pad.left.down,1,input.pad.left,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x210B,8459,input.pad.left.hold,1,input.pad.left,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x210C,8460,input.pad.right.pressed,1,input.pad.right,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x210D,8461,input.pad.right.released,1,input.pad.right,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x210E,8462,input.pad.right.down,1,input.pad.right,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x210F,8463,input.pad.right.hold,1,input.pad.right,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2110,8464,input.pad.a.pressed,1,input.pad.a,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2111,8465,input.pad.a.released,1,input.pad.a,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2112,8466,input.pad.a.down,1,input.pad.a,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2113,8467,input.pad.a.hold,1,input.pad.a,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2114,8468,input.pad.b.pressed,1,input.pad.b,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2115,8469,input.pad.b.released,1,input.pad.b,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2116,8470,input.pad.b.down,1,input.pad.b,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2117,8471,input.pad.b.hold,1,input.pad.b,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2118,8472,input.pad.x.pressed,1,input.pad.x,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2119,8473,input.pad.x.released,1,input.pad.x,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x211A,8474,input.pad.x.down,1,input.pad.x,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x211B,8475,input.pad.x.hold,1,input.pad.x,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x211C,8476,input.pad.y.pressed,1,input.pad.y,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x211D,8477,input.pad.y.released,1,input.pad.y,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x211E,8478,input.pad.y.down,1,input.pad.y,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x211F,8479,input.pad.y.hold,1,input.pad.y,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2120,8480,input.pad.l.pressed,1,input.pad.l,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2121,8481,input.pad.l.released,1,input.pad.l,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2122,8482,input.pad.l.down,1,input.pad.l,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2123,8483,input.pad.l.hold,1,input.pad.l,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2124,8484,input.pad.r.pressed,1,input.pad.r,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2125,8485,input.pad.r.released,1,input.pad.r,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2126,8486,input.pad.r.down,1,input.pad.r,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2127,8487,input.pad.r.hold,1,input.pad.r,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2128,8488,input.pad.start.pressed,1,input.pad.start,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2129,8489,input.pad.start.released,1,input.pad.start,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x212A,8490,input.pad.start.down,1,input.pad.start,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x212B,8491,input.pad.start.hold,1,input.pad.start,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x212C,8492,input.pad.select.pressed,1,input.pad.select,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x212D,8493,input.pad.select.released,1,input.pad.select,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x212E,8494,input.pad.select.down,1,input.pad.select,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x212F,8495,input.pad.select.hold,1,input.pad.select,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2130,8496,input.touch.button.pressed,1,input.touch.button,pressed,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2131,8497,input.touch.button.released,1,input.touch.button,released,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2132,8498,input.touch.button.down,1,input.touch.button,down,0,1,,Bool,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2133,8499,input.touch.button.hold,1,input.touch.button,hold,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2134,8500,input.touch.x,1,input.touch,x,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x2135,8501,input.touch.y,1,input.touch,y,0,1,,Int64,true,false,,1,false,fixed,0,0,2,,host_buffered_v1,existing_contract_v1,host,,0
0x3000,12288,math.i32.min,1,math.i32,min,2,1,Int32|Int32,Int32,true,false,a|b,2,false,fixed,0,0,2,false|false,host_buffered_v1,existing_contract_v1,host,,0
0x3001,12289,math.i32.max,1,math.i32,max,2,1,Int32|Int32,Int32,true,false,a|b,2,false,fixed,0,0,2,false|false,host_buffered_v1,existing_contract_v1,host,,0
0x3002,12290,math.i32.clamp,1,math.i32,clamp,3,1,Int32|Int32|Int32,Int32,true,false,value|min|max,4,false,fixed,0,0,2,false|false|false,host_buffered_v1,existing_contract_v1,host,,0
0x3003,12291,math.i32.abs,1,math.i32,abs,1,1,Int32,Int32,true,false,value,2,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3004,12292,math.i64.min,1,math.i64,min,2,1,Int64|Int64,Int64,true,false,a|b,2,false,fixed,0,0,2,false|false,host_buffered_v1,existing_contract_v1,host,,0
0x3005,12293,math.i64.max,1,math.i64,max,2,1,Int64|Int64,Int64,true,false,a|b,2,false,fixed,0,0,2,false|false,host_buffered_v1,existing_contract_v1,host,,0
0x3006,12294,math.i64.clamp,1,math.i64,clamp,3,1,Int64|Int64|Int64,Int64,true,false,value|min|max,4,false,fixed,0,0,2,false|false|false,host_buffered_v1,existing_contract_v1,host,,0
0x3007,12295,math.i64.abs,1,math.i64,abs,1,1,Int64,Int64,true,false,value,2,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3008,12296,mathf.min,1,mathf,min,2,1,Float|Float,Float,true,false,a|b,2,false,fixed,0,0,2,false|false,host_buffered_v1,existing_contract_v1,host,,0
0x3009,12297,mathf.max,1,mathf,max,2,1,Float|Float,Float,true,false,a|b,2,false,fixed,0,0,2,false|false,host_buffered_v1,existing_contract_v1,host,,0
0x300A,12298,mathf.clamp,1,mathf,clamp,3,1,Float|Float|Float,Float,true,false,value|min|max,4,false,fixed,0,0,2,false|false|false,host_buffered_v1,existing_contract_v1,host,,0
0x300B,12299,mathf.abs,1,mathf,abs,1,1,Float,Float,true,false,value,2,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x300C,12300,mathf.floor,1,mathf,floor,1,1,Float,Float,true,false,value,4,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x300D,12301,mathf.ceil,1,mathf,ceil,1,1,Float,Float,true,false,value,4,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x300E,12302,mathf.trunc,1,mathf,trunc,1,1,Float,Float,true,false,value,4,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x300F,12303,mathf.round,1,mathf,round,1,1,Float,Float,true,false,value,4,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3010,12304,mathf.sqrt,1,mathf,sqrt,1,1,Float,Float,true,false,value,16,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3011,12305,mathf.sin,1,mathf,sin,1,1,Float,Float,true,false,angle,32,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3012,12306,mathf.cos,1,mathf,cos,1,1,Float,Float,true,false,angle,32,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3013,12307,mathf.atan2,1,mathf,atan2,2,1,Float|Float,Float,true,false,y|x,48,false,fixed,0,0,2,false|false,host_buffered_v1,existing_contract_v1,host,,0
0x3014,12308,math.i32.to_i64,1,math.i32,to_i64,1,1,Int32,Int64,true,false,value,2,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3015,12309,math.i64.to_i32,1,math.i64,to_i32,1,1,Int64,Int32,true,false,value,2,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3016,12310,math.i32.to_float,1,math.i32,to_float,1,1,Int32,Float,true,false,value,2,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3017,12311,math.i64.to_float,1,math.i64,to_float,1,1,Int64,Float,true,false,value,2,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3018,12312,mathf.to_i32,1,mathf,to_i32,1,1,Float,Int32,true,false,value,2,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x3019,12313,mathf.to_i64,1,mathf,to_i64,1,1,Float,Int64,true,false,value,2,false,fixed,0,0,2,false,host_buffered_v1,existing_contract_v1,host,,0
0x4000,16384,random.new,1,random,new,1,1,Int64,builtin:Random,true,true,seed,32,true,fixed,0,0,2,false,vm_owned_v1,existing_contract_v1,vm_state,,0
0x4001,16385,random.next,1,random,next,1,1,builtin:Random,Int64,true,false,rng,8,true,fixed,0,0,2,true,vm_owned_v1,existing_contract_v1,vm_state,,0
0x4002,16386,random.nextf,1,random,nextf,1,1,builtin:Random,Float,true,false,rng,12,true,fixed,0,0,2,true,vm_owned_v1,existing_contract_v1,vm_state,,0
0x4003,16387,random.range,1,random,range,3,1,builtin:Random|Int64|Int64,Int64,true,false,rng|min|max,4,true,random_rejection_v1,8,64,2,true|false|false,vm_owned_v1,existing_contract_v1,vm_state,,0
0x4100,16640,hash.i64,1,hash,i64,1,1,Int64,Int64,true,false,value,8,false,fixed,0,0,2,false,borrowed_inline_v1,none,none,,0
0x4101,16641,hash.float,1,hash,float,1,1,Float,Int64,true,false,value,8,false,fixed,0,0,2,false,borrowed_inline_v1,none,none,,0
0x4102,16642,hash.string,1,hash,string,1,1,String,Int64,true,false,value,8,false,argument_utf8_bytes_v1,0,0,2,true,borrowed_inline_v1,none,none,0,1
1 final_id_hex final_id_dec canonical_name canonical_version owner name arg_slots ret_slots arg_layout ret_layout deterministic may_allocate parameter_names cost_cycles mutates_guest_state cost_model attempt_cost_cycles max_attempts schema_version arg_nullable invocation_model scratch_model context_access cost_arg_index cost_per_byte
2 0x1000 4096 vec2.dot 1 vec2 dot 4 1 Float|Float|Float|Float Float true false ax|ay|bx|by 10 false fixed 0 0 2 false|false|false|false host_buffered_v1 existing_contract_v1 host 0
3 0x1001 4097 vec2.length 1 vec2 length 2 1 Float|Float Float true false x|y 40 false fixed 0 0 2 false|false host_buffered_v1 existing_contract_v1 host 0
4 0x1100 4352 color.from_raw 1 color from_raw 1 1 Int64 builtin:color true false raw 1 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
5 0x1101 4353 color.rgb 1 color rgb 3 1 Int64|Int64|Int64 builtin:color true false r|g|b 1 false fixed 0 0 2 false|false|false host_buffered_v1 existing_contract_v1 host 0
6 0x1102 4354 color.rgba 1 color rgba 4 1 Int64|Int64|Int64|Int64 builtin:color true false r|g|b|a 1 false fixed 0 0 2 false|false|false|false host_buffered_v1 existing_contract_v1 host 0
7 0x1103 4355 color.html_rgba 1 color html_rgba 1 1 String builtin:color true false value 1 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
8 0x1104 4356 color.gray_scale 1 color gray_scale 1 1 Int64 builtin:color true false value 1 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
9 0x1105 4357 color.hex 1 color hex 1 1 builtin:color Int64 true false color 1 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
10 0x1106 4358 color.alpha 1 color alpha 1 1 builtin:color Int64 true false color 1 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
11 0x1120 4384 color.black 1 color black 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
12 0x1121 4385 color.white 1 color white 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
13 0x1122 4386 color.red 1 color red 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
14 0x1123 4387 color.green 1 color green 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
15 0x1124 4388 color.blue 1 color blue 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
16 0x1125 4389 color.yellow 1 color yellow 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
17 0x1126 4390 color.orange 1 color orange 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
18 0x1127 4391 color.indigo 1 color indigo 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
19 0x1128 4392 color.gray 1 color gray 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
20 0x1129 4393 color.cyan 1 color cyan 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
21 0x112A 4394 color.magenta 1 color magenta 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
22 0x112B 4395 color.transparent 1 color transparent 0 1 builtin:color true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
23 0x2100 8448 input.pad.up.pressed 1 input.pad.up pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
24 0x2101 8449 input.pad.up.released 1 input.pad.up released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
25 0x2102 8450 input.pad.up.down 1 input.pad.up down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
26 0x2103 8451 input.pad.up.hold 1 input.pad.up hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
27 0x2104 8452 input.pad.down.pressed 1 input.pad.down pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
28 0x2105 8453 input.pad.down.released 1 input.pad.down released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
29 0x2106 8454 input.pad.down.down 1 input.pad.down down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
30 0x2107 8455 input.pad.down.hold 1 input.pad.down hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
31 0x2108 8456 input.pad.left.pressed 1 input.pad.left pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
32 0x2109 8457 input.pad.left.released 1 input.pad.left released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
33 0x210A 8458 input.pad.left.down 1 input.pad.left down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
34 0x210B 8459 input.pad.left.hold 1 input.pad.left hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
35 0x210C 8460 input.pad.right.pressed 1 input.pad.right pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
36 0x210D 8461 input.pad.right.released 1 input.pad.right released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
37 0x210E 8462 input.pad.right.down 1 input.pad.right down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
38 0x210F 8463 input.pad.right.hold 1 input.pad.right hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
39 0x2110 8464 input.pad.a.pressed 1 input.pad.a pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
40 0x2111 8465 input.pad.a.released 1 input.pad.a released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
41 0x2112 8466 input.pad.a.down 1 input.pad.a down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
42 0x2113 8467 input.pad.a.hold 1 input.pad.a hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
43 0x2114 8468 input.pad.b.pressed 1 input.pad.b pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
44 0x2115 8469 input.pad.b.released 1 input.pad.b released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
45 0x2116 8470 input.pad.b.down 1 input.pad.b down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
46 0x2117 8471 input.pad.b.hold 1 input.pad.b hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
47 0x2118 8472 input.pad.x.pressed 1 input.pad.x pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
48 0x2119 8473 input.pad.x.released 1 input.pad.x released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
49 0x211A 8474 input.pad.x.down 1 input.pad.x down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
50 0x211B 8475 input.pad.x.hold 1 input.pad.x hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
51 0x211C 8476 input.pad.y.pressed 1 input.pad.y pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
52 0x211D 8477 input.pad.y.released 1 input.pad.y released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
53 0x211E 8478 input.pad.y.down 1 input.pad.y down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
54 0x211F 8479 input.pad.y.hold 1 input.pad.y hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
55 0x2120 8480 input.pad.l.pressed 1 input.pad.l pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
56 0x2121 8481 input.pad.l.released 1 input.pad.l released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
57 0x2122 8482 input.pad.l.down 1 input.pad.l down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
58 0x2123 8483 input.pad.l.hold 1 input.pad.l hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
59 0x2124 8484 input.pad.r.pressed 1 input.pad.r pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
60 0x2125 8485 input.pad.r.released 1 input.pad.r released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
61 0x2126 8486 input.pad.r.down 1 input.pad.r down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
62 0x2127 8487 input.pad.r.hold 1 input.pad.r hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
63 0x2128 8488 input.pad.start.pressed 1 input.pad.start pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
64 0x2129 8489 input.pad.start.released 1 input.pad.start released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
65 0x212A 8490 input.pad.start.down 1 input.pad.start down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
66 0x212B 8491 input.pad.start.hold 1 input.pad.start hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
67 0x212C 8492 input.pad.select.pressed 1 input.pad.select pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
68 0x212D 8493 input.pad.select.released 1 input.pad.select released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
69 0x212E 8494 input.pad.select.down 1 input.pad.select down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
70 0x212F 8495 input.pad.select.hold 1 input.pad.select hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
71 0x2130 8496 input.touch.button.pressed 1 input.touch.button pressed 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
72 0x2131 8497 input.touch.button.released 1 input.touch.button released 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
73 0x2132 8498 input.touch.button.down 1 input.touch.button down 0 1 Bool true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
74 0x2133 8499 input.touch.button.hold 1 input.touch.button hold 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
75 0x2134 8500 input.touch.x 1 input.touch x 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
76 0x2135 8501 input.touch.y 1 input.touch y 0 1 Int64 true false 1 false fixed 0 0 2 host_buffered_v1 existing_contract_v1 host 0
77 0x3000 12288 math.i32.min 1 math.i32 min 2 1 Int32|Int32 Int32 true false a|b 2 false fixed 0 0 2 false|false host_buffered_v1 existing_contract_v1 host 0
78 0x3001 12289 math.i32.max 1 math.i32 max 2 1 Int32|Int32 Int32 true false a|b 2 false fixed 0 0 2 false|false host_buffered_v1 existing_contract_v1 host 0
79 0x3002 12290 math.i32.clamp 1 math.i32 clamp 3 1 Int32|Int32|Int32 Int32 true false value|min|max 4 false fixed 0 0 2 false|false|false host_buffered_v1 existing_contract_v1 host 0
80 0x3003 12291 math.i32.abs 1 math.i32 abs 1 1 Int32 Int32 true false value 2 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
81 0x3004 12292 math.i64.min 1 math.i64 min 2 1 Int64|Int64 Int64 true false a|b 2 false fixed 0 0 2 false|false host_buffered_v1 existing_contract_v1 host 0
82 0x3005 12293 math.i64.max 1 math.i64 max 2 1 Int64|Int64 Int64 true false a|b 2 false fixed 0 0 2 false|false host_buffered_v1 existing_contract_v1 host 0
83 0x3006 12294 math.i64.clamp 1 math.i64 clamp 3 1 Int64|Int64|Int64 Int64 true false value|min|max 4 false fixed 0 0 2 false|false|false host_buffered_v1 existing_contract_v1 host 0
84 0x3007 12295 math.i64.abs 1 math.i64 abs 1 1 Int64 Int64 true false value 2 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
85 0x3008 12296 mathf.min 1 mathf min 2 1 Float|Float Float true false a|b 2 false fixed 0 0 2 false|false host_buffered_v1 existing_contract_v1 host 0
86 0x3009 12297 mathf.max 1 mathf max 2 1 Float|Float Float true false a|b 2 false fixed 0 0 2 false|false host_buffered_v1 existing_contract_v1 host 0
87 0x300A 12298 mathf.clamp 1 mathf clamp 3 1 Float|Float|Float Float true false value|min|max 4 false fixed 0 0 2 false|false|false host_buffered_v1 existing_contract_v1 host 0
88 0x300B 12299 mathf.abs 1 mathf abs 1 1 Float Float true false value 2 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
89 0x300C 12300 mathf.floor 1 mathf floor 1 1 Float Float true false value 4 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
90 0x300D 12301 mathf.ceil 1 mathf ceil 1 1 Float Float true false value 4 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
91 0x300E 12302 mathf.trunc 1 mathf trunc 1 1 Float Float true false value 4 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
92 0x300F 12303 mathf.round 1 mathf round 1 1 Float Float true false value 4 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
93 0x3010 12304 mathf.sqrt 1 mathf sqrt 1 1 Float Float true false value 16 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
94 0x3011 12305 mathf.sin 1 mathf sin 1 1 Float Float true false angle 32 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
95 0x3012 12306 mathf.cos 1 mathf cos 1 1 Float Float true false angle 32 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
96 0x3013 12307 mathf.atan2 1 mathf atan2 2 1 Float|Float Float true false y|x 48 false fixed 0 0 2 false|false host_buffered_v1 existing_contract_v1 host 0
97 0x3014 12308 math.i32.to_i64 1 math.i32 to_i64 1 1 Int32 Int64 true false value 2 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
98 0x3015 12309 math.i64.to_i32 1 math.i64 to_i32 1 1 Int64 Int32 true false value 2 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
99 0x3016 12310 math.i32.to_float 1 math.i32 to_float 1 1 Int32 Float true false value 2 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
100 0x3017 12311 math.i64.to_float 1 math.i64 to_float 1 1 Int64 Float true false value 2 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
101 0x3018 12312 mathf.to_i32 1 mathf to_i32 1 1 Float Int32 true false value 2 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
102 0x3019 12313 mathf.to_i64 1 mathf to_i64 1 1 Float Int64 true false value 2 false fixed 0 0 2 false host_buffered_v1 existing_contract_v1 host 0
103 0x4000 16384 random.new 1 random new 1 1 Int64 builtin:Random true true seed 32 true fixed 0 0 2 false vm_owned_v1 existing_contract_v1 vm_state 0
104 0x4001 16385 random.next 1 random next 1 1 builtin:Random Int64 true false rng 8 true fixed 0 0 2 true vm_owned_v1 existing_contract_v1 vm_state 0
105 0x4002 16386 random.nextf 1 random nextf 1 1 builtin:Random Float true false rng 12 true fixed 0 0 2 true vm_owned_v1 existing_contract_v1 vm_state 0
106 0x4003 16387 random.range 1 random range 3 1 builtin:Random|Int64|Int64 Int64 true false rng|min|max 4 true random_rejection_v1 8 64 2 true|false|false vm_owned_v1 existing_contract_v1 vm_state 0
107 0x4100 16640 hash.i64 1 hash i64 1 1 Int64 Int64 true false value 8 false fixed 0 0 2 false borrowed_inline_v1 none none 0
108 0x4101 16641 hash.float 1 hash float 1 1 Float Int64 true false value 8 false fixed 0 0 2 false borrowed_inline_v1 none none 0
109 0x4102 16642 hash.string 1 hash string 1 1 String Int64 true false value 8 false argument_utf8_bytes_v1 0 0 2 true borrowed_inline_v1 none none 0 1
+24 -14
View File
@@ -107,9 +107,10 @@ Example:
- Rows must remain unique by both `(canonical_name, canonical_version)` and `final_id_hex` / `final_id_dec`.
- Rows must remain deterministically ordered by final ID.
- parameter_names uses ordered | separated names for flattened argument slots.
- cost_model is fixed or random_rejection_v1. cost_cycles is the full fixed
- cost_model is fixed, random_rejection_v1, or argument_utf8_bytes_v1. cost_cycles is the full fixed
cost or the variable base. attempt_cost_cycles/max_attempts are zero for
fixed entries; random.range publishes base 4, attempt 8, maximum 64.
fixed and String byte-cost entries; random.range publishes base 4, attempt 8, maximum 64.
hash.string publishes base 8, argument index 0 and one cycle per UTF-8 byte.
- Mathematical and random attempts charge upfront, including failure, without
an additional generic INTRINSIC cycle. Random draws retain attempt costs.
- mutates_guest_state distinguishes reproducible stateful calls from pure
@@ -191,19 +192,28 @@ STRUCT_NEW (0x00A0), STRUCT_GET (0x00A1), STRUCT_SET (0x00A2), ARRAY_NEW (0x00A3
See the [random contract](../specs/runtime/02e-vm-owned-random-core.md) for Random BuiltinId 0x0016, ObjectKind tag 9, intrinsics 0x4000–0x4003, atomic state mutation, bounded 4+8*N costs and rejection-limit trap 0x00000015. Random is managed by the VM heap and existing GC, without host entropy or PBX changes.
## Logical guards and atomic storage publication
## Typed array range copy
INDEX_GUARD (0xA7), ARRAY_CHECK_LENGTH (0xA8), ARRAY_COPY (0xA9) and
STORAGE_PUBLISH (0xAA) provide generic logical validation, complete stored-group
transfer and prepared atomic publication. Their encoding, typed operands, exact
faults, overlap semantics, costs and preflight/commit guarantees are defined by
the [canonical instruction contract](../specs/runtime/02-vm-instruction-set.md#logical-guards-and-atomic-storage-publication). No new Registry category, syscall, collection algorithm or safepoint is introduced.
ARRAY_COPY (0xA9, Array TypeId u32) consumes source, sourceStart, target,
targetStart, count without a result. Complete groups and owners survive overlap
and failed preparation. Charge 4+2*N*W before ordinary validation for available
Int64 count in 0..u32::MAX; other counts/underflow charge base 4. Checked cost
overflow charges base and traps SizeOverflow. The
[canonical contract](../specs/runtime/02-vm-instruction-set.md#typed-array-range-copy)
defines fault precedence, scratch and commit. ARRAY_LEN (0xA4) and physical array
checks remain. Encodings 0xA7/0xA8/0xAA/0xAB reject at load even in dead code;
no replacement publication/guard or transaction is provided.
## Identity/hash and catalog schema 2
## Atomic publication of multiple Struct instances
The [identity/hash specification](../specs/runtime/02f-vm-identity-and-value-hashing.md)
defines opcodes 0x0097/0x0098, intrinsics 0x4100–0x4102, XXH64 hash-v1 and
borrowed_inline_v1. INTRINSICS.csv schema 2 retains its original eighteen columns
and appends schema_version, arg_nullable, invocation_model, scratch_model,
context_access, cost_arg_index and cost_per_byte. Descriptors remain authoritative;
unknown or inconsistent schemas/profiles/models must fail explicitly. Existing
canonical versions, signatures, effects and costs remain unchanged.
FIELDS_PUBLISH (0xAB) atomically publishes complete typed fields to multiple
source-selected Struct destinations. Its schema is an ordinary Registry Struct;
no new category, request object, syscall or safepoint is introduced. Exact nullable
destination rules, stack effects, validation, costs and commit semantics are in the
[canonical instruction contract](../specs/runtime/02-vm-instruction-set.md#atomic-publication-of-multiple-struct-instances).
See the [identity/hash producer handoff](identity-hashing-producer-handoff.md) and
[qualification record](IDENTITY_HASHING_QUALIFICATION.md) for emitted PBX, catalog
provenance and consumer acceptance evidence.
+8 -1
View File
@@ -28,7 +28,7 @@ that the mirrors are synchronized. If the runtime repository is not available
in the same checkout, synchronization evidence must be produced against the
canonical runtime revision before merging.
Compiler-owned transformation contracts remain under `docs/specs/compiler`.
Compiler-owned transformation contracts remain under `docs/compiler/general/specs`.
Those specifications define `IRBackend -> IRVM -> PBX` emission, but they MUST
conform to the runtime-owned PBX and ISA contracts and MUST NOT redefine runtime
execution semantics.
@@ -53,3 +53,10 @@ explicitly. Ordinary builds and local catalog tests never invoke this command.
The manual port and consumer requirements are defined in
[Runtime catalog support](../compiler/general/specs/runtime-catalog-support.md).
The selected provider publishes intrinsic schema 2 (25 columns). Manual compiler
metadata must retain every nullable bit, invocation/scratch/context profile and
cost parameter, including entries without PBS source facades. Storage producer
qualification uses the minimal ISA: ARRAY_LEN and ARRAY_COPY remain; 0xA7, 0xA8,
0xAA and 0xAB are unsupported. Compiler/SDK conformance must be regenerated for
the selected revision rather than reusing evidence from earlier providers.
+2 -2
View File
@@ -1,3 +1,3 @@
runtime.revision=57992cf214e8a5f9de53a40dba9aaa7fab038c91
INTRINSICS.csv.sha256=0c1bb78a9b81d1e3480ef5713f3d70f0b06772a7dfab2fd00c1f0a6364f98daa
runtime.revision=dcf6561ea73446e0a3e1cf1c73eda20923b38df0
INTRINSICS.csv.sha256=7c1c363f5f0f941b3ab27cfc72af41e13e44cd4371c687db8300721288f47e63
BUILTIN_CONSTANTS.csv.sha256=e407e4718127aa7ef7b1097b5b4b67d86dd979235e73a551a7c36b628cddc039