From 2bccac9f447bb77d2a043ad79216567c6dfd2ca0 Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Tue, 27 Feb 2024 21:24:06 +0700 Subject: [PATCH] Operand upgrade: refactor types, add hints for int ranges and cell properties --- README.md | 105 +-- cp0.json | 2124 +++++++++++++++++++++++++++++++++++++++++++-------- schema.json | 250 ++++-- 3 files changed, 2038 insertions(+), 441 deletions(-) diff --git a/README.md b/README.md index 3f7ed1c..7ac8007 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Based on [instructions.csv](https://github.com/ton-community/ton-docs/blob/main/ | JSON key | Status | Description | ------------ | ----------- | ----------- | doc | ✅ Implemented | Provides human-readable information about instructions. Can be useful to provide integrated docs to user, for example, in disassembler. -| bytecode | ✅ Implemented | Describes instruction encoding. It contains information to determine, which instruction we are currently decoding and how to parse its operands. +| bytecode | ✅ Implemented | Describes instruction encoding. It contains information to build assemblers and disassemblers. | value_flow | ✅ Implemented | Describes how instruction changes current stack. This part of specification allows to analyze how instructions interact with each other, so it becomes possible to implement high-level tools such as decompilers. | control_flow | ✅ Implemented | Describes code flow (operations with cc register). It helps to reconstruct a control flow graph. This part mainly contains semantics of cont_* category instructions. For example, both JMPX and CALLX transfers execution to continuation on stack, but only CALLX returns and JMPX is not. | aliases | ✅ Implemented | Specifies instruction aliases. Can be used to provide to user information about special cases (for example, SWAP is a special case of XCHG_0i with i = 1). @@ -138,97 +138,108 @@ However, nothing can stop you from just copying `cp0.json` (and `schema.json` if | Key | Description | | --- | ----------- | | mnemonic | How instruction is named in [original TVM implementation](https://github.com/ton-blockchain/ton/blob/master/crypto/vm). Not necessarily unique (currently only DEBUG is not unique). Required. -| doc | Free-form human-friendly information which should be used for documentation purposes only. +| doc | Free-form human-friendly information which should be used for documentation purposes only. Required. | doc.category | Category of instruction (examples: cont_loops, stack_basic, dict_get). Required. -| doc.description | Free-form markdown description of instruction. Optional. -| doc.gas | Free-form description of gas amount used by instruction. Optional. -| doc.fift | Free-form fift usage description. Optional. -| doc.fift_examples | Optional array of usage examples in Fift. Each array element is object with `fift` and `description` keys. -| bytecode | Information related to bytecode format of an instruction. Assuming that each instruction has format `prefix || operand_1 || operand_2 || ...` (also some operands may be refs, not bitstring part). -| bytecode.doc_opcode | Free-form bytecode format description. Optional. +| doc.description | Free-form markdown description of instruction. Required. +| doc.gas | Free-form description of gas amount used by instruction. Required. +| doc.fift | Free-form fift usage description. Required. +| doc.fift_examples | Array of usage examples in Fift. Each array element is object with `fift` and `description` keys. Required. +| bytecode | Information related to bytecode format of an instruction. Assuming that each instruction has format `prefix || operand_1 || operand_2 || ...` (also some operands may be refs, not bitstring part). Required. +| bytecode.doc_opcode | Free-form bytecode format description. Required. | bytecode.tlb | TL-b bytecode format description. Required. | bytecode.prefix | Prefix to determine next instruction to parse. It is a hex bitstring as in TL-b (suffixed with `_` if bit length is not divisible by 4, trailing `'1' + '0' * x` must be removed). Required. | bytecode.operands_range_check | In TVM, it is possible for instructions to have overlapping prefixes, so to determine actual instruction it is required to read next `length` bits after prefix as uint `i` and check `from <= i <= to`. Optional, there is no operands check in case of absence. -| bytecode.operands | Describes how to parse operands. Order of objects in this array represents the actual order of operands in instruction. Optional, no operands in case of absence. +| bytecode.operands | Describes how to parse operands. Order of objects in this array represents the actual order of operands in instruction. Required. | bytecode.operands[i].name | Operand variable name. Allowed chars are `a-zA-Z0-9_`, must not begin with digit or underscore and must not end with underscore. Required. -| bytecode.operands[i].loader | Loader function for operand. Must be one of `int`, `uint`, `ref`, `pushint_long`, `subslice`. Loaders are described below. Required. -| bytecode.operands[i].loader_args | Arguments for loader function, specified below. Optional, no arguments in case of absence. -| value_flow | Information related to usage of stack and registers by instruction. Optional. -| value_flow.doc_stack | Free-form description of stack inputs and outputs. Usually the form is `[inputs] - [outputs]` where `[inputs]` are consumed stack values and `outputs` are produced stack values (top of stack is the last value). Optional. -| value_flow.inputs | Incoming values constraints. Input is unconstrained if absent. -| value_flow.inputs.stack | Defines how current stack is used by instruction. Instruction must not operate on stack entries other than defined here. Required. +| bytecode.operands[i].type | Type of operand. Must be one of `int`, `uint`, `ref`, `pushint_long`, `subslice`. Types are described below. Required. +| bytecode.operands[i].* | Additional options for types, specified below. +| value_flow | Information related to usage of stack and registers by instruction. Required. +| value_flow.doc_stack | Free-form description of stack inputs and outputs. Usually the form is `[inputs] - [outputs]` where `[inputs]` are consumed stack values and `outputs` are produced stack values (top of stack is the last value). Required. +| value_flow.inputs | Incoming values constraints. Required. +| value_flow.inputs.stack | Defines how current stack is used by instruction. Instruction must not operate on stack entries other than defined here. Optional, input stack is unconstrained if absent. | value_flow.inputs.stack[i] | Stack entry or group of stack entries. | value_flow.inputs.stack[i].type | Type of stack entry. Can be one of "simple", "const", "conditional", "array". Required. | value_flow.inputs.stack[i].* | Properties for stack entries of each type are described below. -| value_flow.outputs | Outgoing values constraints. Output is unconstrained if absent. Identical to value_flow.inputs. -| control_flow | Information related to current cc modification by instruction. Optional. -| control_flow.branches | Array of possible branches of an instruction. Specifies all possible values of cc after instruction execution. Empty by default (no branches can be taken by instruction). Each branch described by a `Continuation` object described below. -| control_flow.nobranch | Can this instruction not perform any of specified branches in certain cases (do not modify cc)? False by default. +| value_flow.outputs | Outgoing values constraints. Required. Identical to value_flow.inputs. +| control_flow | Information related to current cc modification by instruction. Required. +| control_flow.branches | Array of possible branches of an instruction. Specifies all possible values of cc after instruction execution. Required. Each branch described by a `Continuation` object described below. +| control_flow.nobranch | Can this instruction not perform any of specified branches in certain cases (do not modify cc)? Required. If instruction has no control flow, nobranch is true and branches are empty. -### Loaders Specification and Examples +### Operand Types Specification and Examples #### uint ```json { "name": "i", - "loader": "uint", - "loader_args": { - "size": 4 - } + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 } ``` -Loads unsigned `size`-bit int from bytecode. Argument `size` of type `integer` is required. +Type of unsigned `size`-bit integer. Arguments `size`, `min_value`, `max_value` of type `number` are required. #### int ```json { "name": "i", - "loader": "int", - "loader_args": { - "size": 4 - } + "type": "int", + "size": 4, + "min_value": -8, + "max_value": 7 } ``` -Loads signed `size`-bit int from bytecode. Argument `size` of type `integer` is required. +Type of signed `size`-bit integer. Arguments `size`, `min_value`, `max_value` of type `number` are required. #### ref ```json { "name": "c", - "loader": "ref" + "type": "ref", + "decode_hint": { + "type": "continuation" + } } ``` -Loads a single reference from bytecode. Unlike `subslice` with `refs_add = 1`, should dereference instead of returning empty cell with a single reference. No arguments are required. +Type of a single reference. Unlike `subslice` with `refs_add = 1`, should dereference instead of returning empty cell with a single reference. `decode_hint` is a (non-guarantee) hint for decoders for specific types of slices. `decode_hint.type` is `"plain" | "continuation" | "dictionary"`. For `dictionary` type there is `decode_hint.size_var` field, which specifies variable which stores dictionary key length. #### pushint_long ```json { "name": "x", - "loader": "pushint_long" + "type": "pushint_long" } ``` -Special loader which currently is used only in `PUSHINT_LONG` instruction. Loads 5-bit uint `size` and then loads and returns integer of bit size `8 * size + 19`. No arguments are required. +Special type which currently is used only in `PUSHINT_LONG` instruction. Consists of 5-bit uint `size` and integer of bit size `8 * size + 19`. #### subslice ```json { "name": "slice", - "loader": "subslice", - "loader_args": { - "bits_length_var_size": 5, - "bits_padding": 1, - "refs_length_var_size": 2, - "refs_add": 1, - "completion_tag": true - } + "type": "subslice", + "bits_length_var_size": 5, + "refs_length_var_size": 2, + "bits_padding": 1, + "refs_add": 1, + "completion_tag": true, + "max_bits": 248, + "min_bits": 0, + "max_refs": 4, + "min_refs": 1, + "decode_hint": { "type": "plain" } } ``` _TLB notation: `r:(## 2) xx:(## 5) c:((r + 1) * ^Cell) ssss:((8 * xx + 1) * Bit)`_ -Loads `r` uint of size `refs_length_var_size` (if present), `x` uint of size `bits_length_var_size` (if present). Then loads subslice of bit length `x * 8 + bits_padding` and ref count `r + refs_add`. If `completion_tag` argument with value `true` is passed, remove completion tag from bitstring (trailing `'1' + '0' * x`). +Loads `r` uint of size `refs_length_var_size` (if present), `x` uint of size `bits_length_var_size`. Then loads subslice of bit length `x * 8 + bits_padding` and ref count `r + refs_add`. If `completion_tag` argument with value `true` is passed, remove completion tag from bitstring (trailing `'1' + '0' * x`). | Argument | Description | -------- | ----------- -| bits_length_var_size | Size of bit length operand. Optional, assuming this part of bit length is 0 if absent. -| bits_padding | Constant integer value to add to length of bitstring to load. Optional, assuming 0 if absent. -| refs_length_var_size | Size of ref count operand. Optional, assuming this part of ref count is 0 if absent. +| bits_length_var_size | Size of bit length operand. Required. +| bits_padding | Constant integer value to add to length of bitstring to load. Required. +| refs_length_var_size | Size of ref count operand. Optional, assuming no refs if absent. | refs_add | Constant integer value to add to ref count. Optional, assuming 0 if absent. -| completion_tag | Boolean flag, tells to remove trailing `'1' + '0' * x` from bitstring if true. Optional, assuming false if absent. +| completion_tag | Boolean flag, tells to remove trailing `'1' + '0' * x` from bitstring if true. Required. +| max_bits | Hint for maximum bits available to store for this operand. Required. +| min_bits | Hint for minimum bits available to store for this operand. Required. +| max_refs | Hint for maximum refs available to store for this operand. Required. +| min_refs | Hint for minimum refs available to store for this operand. Required. +| decode_hint | Hint for decoders for specific types of slices. Required. `decode_hint.type` is `"plain" | "continuation" | "dictionary"`. For `dictionary` type there is `decode_hint.size_var` field, which specifies variable which stores dictionary key length. ### Stack Entry Specification and Examples diff --git a/cp0.json b/cp0.json index 9c7d606..1321ffe 100644 --- a/cp0.json +++ b/cp0.json @@ -38,7 +38,13 @@ "prefix": "0", "operands_range_check": { "length": 4, "from": 1, "to": 15 }, "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 1, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -59,8 +65,20 @@ "prefix": "10", "operands_range_check": { "length": 4, "from": 1, "to": 15 }, "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 1, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -80,7 +98,13 @@ "tlb": "#11 ii:uint8", "prefix": "11", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "i", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -101,7 +125,13 @@ "prefix": "1", "operands_range_check": { "length": 4, "from": 2, "to": 15 }, "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 2, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -121,7 +151,13 @@ "tlb": "#2 i:uint4", "prefix": "2", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -141,7 +177,13 @@ "tlb": "#3 i:uint4", "prefix": "3", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -161,9 +203,27 @@ "tlb": "#4 i:uint4 j:uint4 k:uint4", "prefix": "4", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -183,8 +243,20 @@ "tlb": "#50 i:uint4 j:uint4", "prefix": "50", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -204,8 +276,20 @@ "tlb": "#51 i:uint4 j:uint4", "prefix": "51", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -225,8 +309,20 @@ "tlb": "#52 i:uint4 j:uint4", "prefix": "52", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -246,8 +342,20 @@ "tlb": "#53 i:uint4 j:uint4", "prefix": "53", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -267,9 +375,27 @@ "tlb": "#540 i:uint4 j:uint4 k:uint4", "prefix": "540", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -289,9 +415,27 @@ "tlb": "#541 i:uint4 j:uint4 k:uint4", "prefix": "541", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -311,9 +455,27 @@ "tlb": "#542 i:uint4 j:uint4 k:uint4", "prefix": "542", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -333,9 +495,27 @@ "tlb": "#543 i:uint4 j:uint4 k:uint4", "prefix": "543", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -355,9 +535,27 @@ "tlb": "#544 i:uint4 j:uint4 k:uint4", "prefix": "544", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -377,9 +575,27 @@ "tlb": "#545 i:uint4 j:uint4 k:uint4", "prefix": "545", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -399,9 +615,27 @@ "tlb": "#546 i:uint4 j:uint4 k:uint4", "prefix": "546", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -421,9 +655,27 @@ "tlb": "#547 i:uint4 j:uint4 k:uint4", "prefix": "547", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -443,8 +695,20 @@ "tlb": "#55 i:uint4 j:uint4", "prefix": "55", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -464,7 +728,13 @@ "tlb": "#56 ii:uint8", "prefix": "56", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "i", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -484,7 +754,13 @@ "tlb": "#57 ii:uint8", "prefix": "57", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "i", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -632,8 +908,20 @@ "tlb": "#5E i:uint4 j:uint4", "prefix": "5E", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -653,7 +941,13 @@ "tlb": "#5F0 i:uint4", "prefix": "5F0", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -674,8 +968,20 @@ "prefix": "5F", "operands_range_check": { "length": 4, "from": 1, "to": 15 }, "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 1, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -928,8 +1234,20 @@ "prefix": "6C", "operands_range_check": { "length": 4, "from": 1, "to": 15 }, "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 1, + "max_value": 15 + }, + { + "name": "j", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "", "inputs": {}, "outputs": {} }, @@ -1003,7 +1321,13 @@ "tlb": "#6F0 n:uint4", "prefix": "6F0", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "n", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -1038,7 +1362,13 @@ "tlb": "#6F1 k:uint4", "prefix": "6F1", "operands": [ - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -1064,7 +1394,13 @@ "tlb": "#6F2 n:uint4", "prefix": "6F2", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "n", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -1099,7 +1435,13 @@ "tlb": "#6F3 k:uint4", "prefix": "6F3", "operands": [ - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -1134,7 +1476,13 @@ "tlb": "#6F4 n:uint4", "prefix": "6F4", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "n", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -1170,7 +1518,13 @@ "tlb": "#6F5 k:uint4", "prefix": "6F5", "operands": [ - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -1203,7 +1557,13 @@ "tlb": "#6F6 k:uint4", "prefix": "6F6", "operands": [ - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -1231,7 +1591,13 @@ "tlb": "#6F7 k:uint4", "prefix": "6F7", "operands": [ - { "name": "k", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "k", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -2025,8 +2391,20 @@ "tlb": "#6FB i:uint2 j:uint2", "prefix": "6FB", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 2 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 2 } } + { + "name": "i", + "type": "uint", + "size": 2, + "min_value": 0, + "max_value": 3 + }, + { + "name": "j", + "type": "uint", + "size": 2, + "min_value": 0, + "max_value": 3 + } ] }, "value_flow": { @@ -2052,9 +2430,27 @@ "tlb": "#6FE_ i:uint2 j:uint2 k:uint2", "prefix": "6FE_", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 2 } }, - { "name": "j", "loader": "uint", "loader_args": { "size": 2 } }, - { "name": "k", "loader": "uint", "loader_args": { "size": 2 } } + { + "name": "i", + "type": "uint", + "size": 2, + "min_value": 0, + "max_value": 3 + }, + { + "name": "j", + "type": "uint", + "size": 2, + "min_value": 0, + "max_value": 3 + }, + { + "name": "k", + "type": "uint", + "size": 2, + "min_value": 0, + "max_value": 3 + } ] }, "value_flow": { @@ -2080,7 +2476,13 @@ "tlb": "#7 i:uint4", "prefix": "7", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -2108,7 +2510,13 @@ "tlb": "#80 xx:int8", "prefix": "80", "operands": [ - { "name": "x", "loader": "int", "loader_args": { "size": 8 } } + { + "name": "x", + "type": "int", + "size": 8, + "min_value": -128, + "max_value": 127 + } ] }, "value_flow": { @@ -2136,7 +2544,13 @@ "tlb": "#81 xxxx:int16", "prefix": "81", "operands": [ - { "name": "x", "loader": "int", "loader_args": { "size": 16 } } + { + "name": "x", + "type": "int", + "size": 16, + "min_value": -32768, + "max_value": 32767 + } ] }, "value_flow": { @@ -2165,7 +2579,10 @@ "prefix": "82", "operands_range_check": { "length": 5, "from": 0, "to": 30 }, "operands": [ - { "name": "x", "loader": "pushint_long", "loader_args": {} } + { + "name": "x", + "type": "pushint_long" + } ] }, "value_flow": { @@ -2194,7 +2611,13 @@ "prefix": "83", "operands_range_check": { "length": 8, "from": 0, "to": 254 }, "operands": [ - { "name": "x", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "x", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 254 + } ] }, "value_flow": { @@ -2246,7 +2669,13 @@ "tlb": "#84 xx:uint8", "prefix": "84", "operands": [ - { "name": "x", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "x", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -2274,7 +2703,13 @@ "tlb": "#85 xx:uint8", "prefix": "85", "operands": [ - { "name": "x", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "x", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -2301,7 +2736,9 @@ "doc_opcode": "88", "tlb": "#88 c:^Cell", "prefix": "88", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { "name": "c", "type": "ref", "decode_hint": { "type": "plain" } } + ] }, "value_flow": { "doc_stack": "- c", @@ -2327,7 +2764,9 @@ "doc_opcode": "89", "tlb": "#89 c:^Cell", "prefix": "89", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { "name": "c", "type": "ref", "decode_hint": { "type": "plain" } } + ] }, "value_flow": { "doc_stack": "- s", @@ -2353,7 +2792,13 @@ "doc_opcode": "8A", "tlb": "#8A c:^Cell", "prefix": "8A", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } + ] }, "value_flow": { "doc_stack": "- cont", @@ -2386,12 +2831,15 @@ "operands": [ { "name": "s", - "loader": "subslice", - "loader_args": { - "bits_length_var_size": 4, - "bits_padding": 4, - "completion_tag": true - } + "type": "subslice", + "bits_length_var_size": 4, + "bits_padding": 4, + "completion_tag": true, + "max_bits": 123, + "min_bits": 0, + "max_refs": 0, + "min_refs": 0, + "decode_hint": { "type": "plain" } } ] }, @@ -2422,14 +2870,17 @@ "operands": [ { "name": "slice", - "loader": "subslice", - "loader_args": { - "bits_length_var_size": 5, - "bits_padding": 1, - "refs_length_var_size": 2, - "refs_add": 1, - "completion_tag": true - } + "type": "subslice", + "bits_length_var_size": 5, + "refs_length_var_size": 2, + "bits_padding": 1, + "refs_add": 1, + "completion_tag": true, + "max_bits": 248, + "min_bits": 0, + "max_refs": 4, + "min_refs": 1, + "decode_hint": { "type": "plain" } } ] }, @@ -2470,14 +2921,17 @@ "operands": [ { "name": "slice", - "loader": "subslice", - "loader_args": { - "bits_length_var_size": 7, - "bits_padding": 6, - "refs_length_var_size": 3, - "completion_tag": true, - "refs_add": 0 - } + "type": "subslice", + "bits_length_var_size": 7, + "refs_length_var_size": 3, + "bits_padding": 6, + "refs_add": 0, + "completion_tag": true, + "max_bits": 1021, + "min_bits": 0, + "max_refs": 4, + "min_refs": 0, + "decode_hint": { "type": "plain" } } ] }, @@ -2508,14 +2962,17 @@ "operands": [ { "name": "s", - "loader": "subslice", - "loader_args": { - "bits_length_var_size": 7, - "bits_padding": 0, - "refs_length_var_size": 2, - "refs_add": 0, - "completion_tag": false - } + "type": "subslice", + "bits_length_var_size": 7, + "refs_length_var_size": 2, + "bits_padding": 0, + "refs_add": 0, + "completion_tag": false, + "max_bits": 1016, + "min_bits": 0, + "max_refs": 3, + "min_refs": 0, + "decode_hint": { "type": "plain" } } ] }, @@ -2555,12 +3012,15 @@ "operands": [ { "name": "s", - "loader": "subslice", - "loader_args": { - "bits_length_var_size": 4, - "bits_padding": 0, - "completion_tag": false - } + "type": "subslice", + "bits_length_var_size": 4, + "bits_padding": 0, + "completion_tag": false, + "max_bits": 120, + "min_bits": 0, + "max_refs": 0, + "min_refs": 0, + "decode_hint": { "type": "plain" } } ] }, @@ -2772,7 +3232,13 @@ "tlb": "#A6 cc:int8", "prefix": "A6", "operands": [ - { "name": "c", "loader": "int", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "int", + "size": 8, + "min_value": -128, + "max_value": 127 + } ] }, "value_flow": { @@ -2804,7 +3270,13 @@ "tlb": "#A7 cc:int8", "prefix": "A7", "operands": [ - { "name": "c", "loader": "int", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "int", + "size": 8, + "min_value": -128, + "max_value": 127 + } ] }, "value_flow": { @@ -3598,7 +4070,13 @@ "tlb": "#A930 tt:uint8", "prefix": "A930", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -3632,7 +4110,13 @@ "tlb": "#A931 tt:uint8", "prefix": "A931", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -3666,7 +4150,13 @@ "tlb": "#A932 tt:uint8", "prefix": "A932", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -3700,7 +4190,13 @@ "tlb": "#A935 tt:uint8", "prefix": "A935", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -3732,7 +4228,13 @@ "tlb": "#A936 tt:uint8", "prefix": "A936", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -3764,7 +4266,13 @@ "tlb": "#A938 tt:uint8", "prefix": "A938", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -3796,7 +4304,13 @@ "tlb": "#A939 tt:uint8", "prefix": "A939", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -3828,7 +4342,13 @@ "tlb": "#A93A tt:uint8", "prefix": "A93A", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -3860,7 +4380,13 @@ "tlb": "#A93C tt:uint8", "prefix": "A93C", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -3893,7 +4419,13 @@ "tlb": "#A93D tt:uint8", "prefix": "A93D", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -3926,7 +4458,13 @@ "tlb": "#A93E tt:uint8", "prefix": "A93E", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -4742,7 +5280,13 @@ "tlb": "#A9B0 tt:uint8", "prefix": "A9B0", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -4776,7 +5320,13 @@ "tlb": "#A9B1 tt:uint8", "prefix": "A9B1", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -4810,7 +5360,13 @@ "tlb": "#A9B2 tt:uint8", "prefix": "A9B2", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -4844,7 +5400,13 @@ "tlb": "#A9B4 tt:uint8", "prefix": "A9B4", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -4877,7 +5439,13 @@ "tlb": "#A9B5 tt:uint8", "prefix": "A9B5", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -4910,7 +5478,13 @@ "tlb": "#A9B6 tt:uint8", "prefix": "A9B6", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -4943,7 +5517,13 @@ "tlb": "#A9B8 tt:uint8", "prefix": "A9B8", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -4976,7 +5556,13 @@ "tlb": "#A9B9 tt:uint8", "prefix": "A9B9", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5009,7 +5595,13 @@ "tlb": "#A9BA tt:uint8", "prefix": "A9BA", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5522,7 +6114,13 @@ "tlb": "#A9D0 tt:uint8", "prefix": "A9D0", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5556,7 +6154,13 @@ "tlb": "#A9D1 tt:uint8", "prefix": "A9D1", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5590,7 +6194,13 @@ "tlb": "#A9D2 tt:uint8", "prefix": "A9D2", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5624,7 +6234,13 @@ "tlb": "#A9D4 tt:uint8", "prefix": "A9D4", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5657,7 +6273,13 @@ "tlb": "#A9D5 tt:uint8", "prefix": "A9D5", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5690,7 +6312,13 @@ "tlb": "#A9D6 tt:uint8", "prefix": "A9D6", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5723,7 +6351,13 @@ "tlb": "#A9D8 tt:uint8", "prefix": "A9D8", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5756,7 +6390,13 @@ "tlb": "#A9D9 tt:uint8", "prefix": "A9D9", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5789,7 +6429,13 @@ "tlb": "#A9DA tt:uint8", "prefix": "A9DA", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5822,7 +6468,13 @@ "tlb": "#A9DC tt:uint8", "prefix": "A9DC", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5855,7 +6507,13 @@ "tlb": "#A9DD tt:uint8", "prefix": "A9DD", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5888,7 +6546,13 @@ "tlb": "#A9DE tt:uint8", "prefix": "A9DE", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5921,7 +6585,13 @@ "tlb": "#AA cc:uint8", "prefix": "AA", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -5953,7 +6623,13 @@ "tlb": "#AB cc:uint8", "prefix": "AB", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -6200,7 +6876,13 @@ "tlb": "#B4 cc:uint8", "prefix": "B4", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -6232,7 +6914,13 @@ "tlb": "#B5 cc:uint8", "prefix": "B5", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7455,7 +8143,13 @@ "tlb": "#B7A930 tt:uint8", "prefix": "B7A930", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7489,7 +8183,13 @@ "tlb": "#B7A931 tt:uint8", "prefix": "B7A931", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7523,7 +8223,13 @@ "tlb": "#B7A932 tt:uint8", "prefix": "B7A932", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7557,7 +8263,13 @@ "tlb": "#B7A935 tt:uint8", "prefix": "B7A935", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7589,7 +8301,13 @@ "tlb": "#B7A936 tt:uint8", "prefix": "B7A936", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7621,7 +8339,13 @@ "tlb": "#B7A938 tt:uint8", "prefix": "B7A938", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7653,7 +8377,13 @@ "tlb": "#B7A939 tt:uint8", "prefix": "B7A939", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7685,7 +8415,13 @@ "tlb": "#B7A93A tt:uint8", "prefix": "B7A93A", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7717,7 +8453,13 @@ "tlb": "#A93C tt:uint8", "prefix": "A93C", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7750,7 +8492,13 @@ "tlb": "#A93D tt:uint8", "prefix": "A93D", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -7783,7 +8531,13 @@ "tlb": "#B7A93E tt:uint8", "prefix": "B7A93E", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -8598,7 +9352,13 @@ "tlb": "#B7A9B0 tt:uint8", "prefix": "B7A9B0", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -8632,7 +9392,13 @@ "tlb": "#B7A9B1 tt:uint8", "prefix": "B7A9B1", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -8666,7 +9432,13 @@ "tlb": "#B7A9B2 tt:uint8", "prefix": "B7A9B2", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -8700,7 +9472,13 @@ "tlb": "#B7A9B4 tt:uint8", "prefix": "B7A9B4", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -8733,7 +9511,13 @@ "tlb": "#B7A9B5 tt:uint8", "prefix": "B7A9B5", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -8766,7 +9550,13 @@ "tlb": "#B7A9B6 tt:uint8", "prefix": "B7A9B6", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -8799,7 +9589,13 @@ "tlb": "#B7A9B8 tt:uint8", "prefix": "B7A9B8", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -8832,7 +9628,13 @@ "tlb": "#B7A9B9 tt:uint8", "prefix": "B7A9B9", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -8865,7 +9667,13 @@ "tlb": "#B7A9BA tt:uint8", "prefix": "B7A9BA", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9378,7 +10186,13 @@ "tlb": "#B7A9D0 tt:uint8", "prefix": "B7A9D0", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9412,7 +10226,13 @@ "tlb": "#B7A9D1 tt:uint8", "prefix": "B7A9D1", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9446,7 +10266,13 @@ "tlb": "#B7A9D2 tt:uint8", "prefix": "B7A9D2", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9480,7 +10306,13 @@ "tlb": "#B7A9D4 tt:uint8", "prefix": "B7A9D4", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9513,7 +10345,13 @@ "tlb": "#B7A9D5 tt:uint8", "prefix": "B7A9D5", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9546,7 +10384,13 @@ "tlb": "#B7A9D6 tt:uint8", "prefix": "B7A9D6", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9579,7 +10423,13 @@ "tlb": "#B7A9D8 tt:uint8", "prefix": "B7A9D8", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9612,7 +10462,13 @@ "tlb": "#B7A9D9 tt:uint8", "prefix": "B7A9D9", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9645,7 +10501,13 @@ "tlb": "#B7A9DA tt:uint8", "prefix": "B7A9DA", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9678,7 +10540,13 @@ "tlb": "#B7A9DC tt:uint8", "prefix": "B7A9DC", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9711,7 +10579,13 @@ "tlb": "#B7A9DD tt:uint8", "prefix": "B7A9DD", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9744,7 +10618,13 @@ "tlb": "#B7A9DE tt:uint8", "prefix": "B7A9DE", "operands": [ - { "name": "t", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "t", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9777,7 +10657,13 @@ "tlb": "#B7AA cc:uint8", "prefix": "B7AA", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -9809,7 +10695,13 @@ "tlb": "#B7AB cc:uint8", "prefix": "B7AB", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -10056,7 +10948,13 @@ "tlb": "#B7B4 cc:uint8", "prefix": "B7B4", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -10088,7 +10986,13 @@ "tlb": "#B7B5 cc:uint8", "prefix": "B7B5", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -10429,7 +11333,13 @@ "tlb": "#C0 yy:int8", "prefix": "C0", "operands": [ - { "name": "y", "loader": "int", "loader_args": { "size": 8 } } + { + "name": "y", + "type": "int", + "size": 8, + "min_value": -128, + "max_value": 127 + } ] }, "value_flow": { @@ -10461,7 +11371,13 @@ "tlb": "#C1 yy:int8", "prefix": "C1", "operands": [ - { "name": "y", "loader": "int", "loader_args": { "size": 8 } } + { + "name": "y", + "type": "int", + "size": 8, + "min_value": -128, + "max_value": 127 + } ] }, "value_flow": { @@ -10493,7 +11409,13 @@ "tlb": "#C2 yy:int8", "prefix": "C2", "operands": [ - { "name": "y", "loader": "int", "loader_args": { "size": 8 } } + { + "name": "y", + "type": "int", + "size": 8, + "min_value": -128, + "max_value": 127 + } ] }, "value_flow": { @@ -10525,7 +11447,13 @@ "tlb": "#C3 yy:int8", "prefix": "C3", "operands": [ - { "name": "y", "loader": "int", "loader_args": { "size": 8 } } + { + "name": "y", + "type": "int", + "size": 8, + "min_value": -128, + "max_value": 127 + } ] }, "value_flow": { @@ -11201,7 +12129,13 @@ "tlb": "#CA cc:uint8", "prefix": "CA", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -11234,7 +12168,13 @@ "tlb": "#CB cc:uint8", "prefix": "CB", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -11800,7 +12740,13 @@ "tlb": "#CF08 cc:uint8", "prefix": "CF08", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -11833,7 +12779,13 @@ "tlb": "#CF09 cc:uint8", "prefix": "CF09", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -11866,7 +12818,13 @@ "tlb": "#CF0A cc:uint8", "prefix": "CF0A", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -11899,7 +12857,13 @@ "tlb": "#CF0B cc:uint8", "prefix": "CF0B", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -11932,7 +12896,13 @@ "tlb": "#CF0C cc:uint8", "prefix": "CF0C", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -12011,7 +12981,13 @@ "tlb": "#CF0D cc:uint8", "prefix": "CF0D", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -12090,7 +13066,13 @@ "tlb": "#CF0E cc:uint8", "prefix": "CF0E", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -12169,7 +13151,13 @@ "tlb": "#CF0F cc:uint8", "prefix": "CF0F", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -12975,7 +13963,9 @@ "doc_opcode": "CF20", "tlb": "#CF20 c:^Cell", "prefix": "CF20", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { "name": "c", "type": "ref", "decode_hint": { "type": "plain" } } + ] }, "value_flow": { "doc_stack": "b - b’", @@ -13401,7 +14391,13 @@ "tlb": "#CF38 cc:uint8", "prefix": "CF38", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -13511,7 +14507,13 @@ "tlb": "#CF3C cc:uint8", "prefix": "CF3C", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -13733,14 +14735,17 @@ "operands": [ { "name": "s", - "loader": "subslice", - "loader_args": { - "bits_length_var_size": 3, - "bits_padding": 2, - "refs_length_var_size": 2, - "completion_tag": true, - "refs_add": 0 - } + "type": "subslice", + "bits_length_var_size": 3, + "refs_length_var_size": 2, + "bits_padding": 2, + "refs_add": 0, + "completion_tag": true, + "max_bits": 57, + "min_bits": 0, + "max_refs": 3, + "min_refs": 0, + "decode_hint": { "type": "plain" } } ] }, @@ -13823,7 +14828,13 @@ "tlb": "#D2 cc:uint8", "prefix": "D2", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -13854,7 +14865,13 @@ "tlb": "#D3 cc:uint8", "prefix": "D3", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -13943,7 +14960,13 @@ "tlb": "#D6 cc:uint8", "prefix": "D6", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14304,7 +15327,13 @@ "tlb": "#D708 cc:uint8", "prefix": "D708", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14335,7 +15364,13 @@ "tlb": "#D709 cc:uint8", "prefix": "D709", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14366,7 +15401,13 @@ "tlb": "#D70A cc:uint8", "prefix": "D70A", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14396,7 +15437,13 @@ "tlb": "#D70B cc:uint8", "prefix": "D70B", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14426,7 +15473,13 @@ "tlb": "#D70C cc:uint8", "prefix": "D70C", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14479,7 +15532,13 @@ "tlb": "#D70D cc:uint8", "prefix": "D70D", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14532,7 +15591,13 @@ "tlb": "#D70E cc:uint8", "prefix": "D70E", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14579,7 +15644,13 @@ "tlb": "#D70F cc:uint8", "prefix": "D70F", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14626,7 +15697,13 @@ "tlb": "#D714_ c:uint3", "prefix": "D714_", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 3 } } + { + "name": "c", + "type": "uint", + "size": 3, + "min_value": 0, + "max_value": 7 + } ] }, "value_flow": { @@ -14818,7 +15895,13 @@ "tlb": "#D71C cc:uint8", "prefix": "D71C", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14849,7 +15932,13 @@ "tlb": "#D71D cc:uint8", "prefix": "D71D", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14879,7 +15968,13 @@ "tlb": "#D71E cc:uint8", "prefix": "D71E", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -14932,7 +16027,13 @@ "tlb": "#D71F cc:uint8", "prefix": "D71F", "operands": [ - { "name": "c", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "c", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -15213,12 +16314,15 @@ "operands": [ { "name": "s", - "loader": "subslice", - "loader_args": { - "bits_length_var_size": 7, - "bits_padding": 3, - "completion_tag": true - } + "type": "subslice", + "bits_length_var_size": 7, + "bits_padding": 3, + "completion_tag": true, + "max_bits": 1018, + "min_bits": 0, + "max_refs": 0, + "min_refs": 0, + "decode_hint": { "type": "plain" } } ] }, @@ -15251,12 +16355,15 @@ "operands": [ { "name": "s", - "loader": "subslice", - "loader_args": { - "bits_length_var_size": 7, - "bits_padding": 3, - "completion_tag": true - } + "type": "subslice", + "bits_length_var_size": 7, + "bits_padding": 3, + "completion_tag": true, + "max_bits": 1018, + "min_bits": 0, + "max_refs": 0, + "min_refs": 0, + "decode_hint": { "type": "plain" } } ] }, @@ -15946,7 +17053,13 @@ "tlb": "#D74E_ n:uint2", "prefix": "D74E_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 2 } } + { + "name": "n", + "type": "uint", + "size": 2, + "min_value": 0, + "max_value": 3 + } ] }, "value_flow": { @@ -16801,8 +17914,20 @@ "tlb": "#DA p:uint4 r:uint4", "prefix": "DA", "operands": [ - { "name": "p", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "r", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "p", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "r", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -16850,7 +17975,13 @@ "tlb": "#DB0 p:uint4", "prefix": "DB0", "operands": [ - { "name": "p", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "p", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -16898,7 +18029,13 @@ "tlb": "#DB1 p:uint4", "prefix": "DB1", "operands": [ - { "name": "p", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "p", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -16935,7 +18072,13 @@ "tlb": "#DB2 r:uint4", "prefix": "DB2", "operands": [ - { "name": "r", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "r", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -17111,8 +18254,20 @@ "tlb": "#DB36 p:uint4 r:uint4", "prefix": "DB36", "operands": [ - { "name": "p", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "r", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "p", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "r", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -17317,7 +18472,13 @@ "doc_opcode": "DB3C", "tlb": "#DB3C c:^Cell", "prefix": "DB3C", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } + ] }, "value_flow": { "doc_stack": "", @@ -17353,7 +18514,13 @@ "doc_opcode": "DB3D", "tlb": "#DB3D c:^Cell", "prefix": "DB3D", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } + ] }, "value_flow": { "doc_stack": "", @@ -17378,7 +18545,13 @@ "doc_opcode": "DB3E", "tlb": "#DB3E c:^Cell", "prefix": "DB3E", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } + ] }, "value_flow": { "doc_stack": "", @@ -17749,7 +18922,13 @@ "doc_opcode": "E300", "tlb": "#E300 c:^Cell", "prefix": "E300", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } + ] }, "value_flow": { "doc_stack": "f - ", @@ -17789,7 +18968,13 @@ "doc_opcode": "E301", "tlb": "#E301 c:^Cell", "prefix": "E301", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } + ] }, "value_flow": { "doc_stack": "f - ", @@ -17829,7 +19014,13 @@ "doc_opcode": "E302", "tlb": "#E302 c:^Cell", "prefix": "E302", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } + ] }, "value_flow": { "doc_stack": "f - ", @@ -17858,7 +19049,13 @@ "doc_opcode": "E303", "tlb": "#E303 c:^Cell", "prefix": "E303", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } + ] }, "value_flow": { "doc_stack": "f - ", @@ -18001,7 +19198,13 @@ "doc_opcode": "E30D", "tlb": "#E30D c:^Cell", "prefix": "E30D", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } + ] }, "value_flow": { "doc_stack": "f c -", @@ -18052,7 +19255,13 @@ "doc_opcode": "E30E", "tlb": "#E30E c:^Cell", "prefix": "E30E", - "operands": [{ "name": "c", "loader": "ref", "loader_args": {} }] + "operands": [ + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } + ] }, "value_flow": { "doc_stack": "f c -", @@ -18104,8 +19313,16 @@ "tlb": "#E30F c1:^Cell c2:^Cell", "prefix": "E30F", "operands": [ - { "name": "c1", "loader": "ref", "loader_args": {} }, - { "name": "c2", "loader": "ref", "loader_args": {} } + { + "name": "c1", + "type": "ref", + "decode_hint": { "type": "continuation" } + }, + { + "name": "c2", + "type": "ref", + "decode_hint": { "type": "continuation" } + } ] }, "value_flow": { @@ -18157,7 +19374,13 @@ "tlb": "#E39_ n:uint5", "prefix": "E39_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 5 } } + { + "name": "n", + "type": "uint", + "size": 5, + "min_value": 0, + "max_value": 31 + } ] }, "value_flow": { @@ -18193,7 +19416,13 @@ "tlb": "#E3B_ n:uint5", "prefix": "E3B_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 5 } } + { + "name": "n", + "type": "uint", + "size": 5, + "min_value": 0, + "max_value": 31 + } ] }, "value_flow": { @@ -18229,8 +19458,18 @@ "tlb": "#E3D_ n:uint5 c:^Cell", "prefix": "E3D_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 5 } }, - { "name": "c", "loader": "ref", "loader_args": {} } + { + "name": "n", + "type": "uint", + "size": 5, + "min_value": 0, + "max_value": 31 + }, + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } ] }, "value_flow": { @@ -18265,8 +19504,18 @@ "tlb": "#E3F_ n:uint5 c:^Cell", "prefix": "E3F_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 5 } }, - { "name": "c", "loader": "ref", "loader_args": {} } + { + "name": "n", + "type": "uint", + "size": 5, + "min_value": 0, + "max_value": 31 + }, + { + "name": "c", + "type": "ref", + "decode_hint": { "type": "continuation" } + } ] }, "value_flow": { @@ -19007,8 +20256,20 @@ "tlb": "#EC r:uint4 n:uint4", "prefix": "EC", "operands": [ - { "name": "r", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "n", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "r", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "n", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19046,7 +20307,13 @@ "tlb": "#ED0 p:uint4", "prefix": "ED0", "operands": [ - { "name": "p", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "p", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { "doc_stack": "-", "inputs": {}, "outputs": {} }, @@ -19219,8 +20486,20 @@ "tlb": "#EE r:uint4 n:uint4", "prefix": "EE", "operands": [ - { "name": "r", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "n", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "r", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "n", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19258,7 +20537,13 @@ "tlb": "#ED4 i:uint4", "prefix": "ED4", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19282,7 +20567,13 @@ "tlb": "#ED5 i:uint4", "prefix": "ED5", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19306,7 +20597,13 @@ "tlb": "#ED6 i:uint4", "prefix": "ED6", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19339,7 +20636,13 @@ "tlb": "#ED7 i:uint4", "prefix": "ED7", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19363,7 +20666,13 @@ "tlb": "#ED8 i:uint4", "prefix": "ED8", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19387,7 +20696,13 @@ "tlb": "#ED9 i:uint4", "prefix": "ED9", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19411,7 +20726,13 @@ "tlb": "#EDA i:uint4", "prefix": "EDA", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19435,7 +20756,13 @@ "tlb": "#EDB i:uint4", "prefix": "EDB", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19459,7 +20786,13 @@ "tlb": "#EDC i:uint4", "prefix": "EDC", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -19943,7 +21276,13 @@ "tlb": "#F0 n:uint8", "prefix": "F0", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "n", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 255 + } ] }, "value_flow": { @@ -19985,7 +21324,13 @@ "tlb": "#F12_ n:uint14", "prefix": "F12_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 14 } } + { + "name": "n", + "type": "uint", + "size": 14, + "min_value": 0, + "max_value": 16383 + } ] }, "value_flow": { @@ -20027,7 +21372,13 @@ "tlb": "#F16_ n:uint14", "prefix": "F16_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 14 } } + { + "name": "n", + "type": "uint", + "size": 14, + "min_value": 0, + "max_value": 16383 + } ] }, "value_flow": { @@ -20058,7 +21409,13 @@ "tlb": "#F1A_ n:uint14", "prefix": "F1A_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 14 } } + { + "name": "n", + "type": "uint", + "size": 14, + "min_value": 0, + "max_value": 16383 + } ] }, "value_flow": { @@ -20087,7 +21444,13 @@ "tlb": "#F22_ n:uint6", "prefix": "F22_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 6 } } + { + "name": "n", + "type": "uint", + "size": 6, + "min_value": 0, + "max_value": 63 + } ] }, "value_flow": { @@ -20111,7 +21474,13 @@ "tlb": "#F26_ n:uint6", "prefix": "F26_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 6 } } + { + "name": "n", + "type": "uint", + "size": 6, + "min_value": 0, + "max_value": 63 + } ] }, "value_flow": { @@ -20139,7 +21508,13 @@ "tlb": "#F2A_ n:uint6", "prefix": "F2A_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 6 } } + { + "name": "n", + "type": "uint", + "size": 6, + "min_value": 0, + "max_value": 63 + } ] }, "value_flow": { @@ -20167,7 +21542,13 @@ "tlb": "#F2C4_ n:uint11", "prefix": "F2C4_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 11 } } + { + "name": "n", + "type": "uint", + "size": 11, + "min_value": 0, + "max_value": 2047 + } ] }, "value_flow": { @@ -20191,7 +21572,13 @@ "tlb": "#F2CC_ n:uint11", "prefix": "F2CC_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 11 } } + { + "name": "n", + "type": "uint", + "size": 11, + "min_value": 0, + "max_value": 2047 + } ] }, "value_flow": { @@ -20215,7 +21602,13 @@ "tlb": "#F2D4_ n:uint11", "prefix": "F2D4_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 11 } } + { + "name": "n", + "type": "uint", + "size": 11, + "min_value": 0, + "max_value": 2047 + } ] }, "value_flow": { @@ -20243,7 +21636,13 @@ "tlb": "#F2DC_ n:uint11", "prefix": "F2DC_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 11 } } + { + "name": "n", + "type": "uint", + "size": 11, + "min_value": 0, + "max_value": 2047 + } ] }, "value_flow": { @@ -20272,7 +21671,13 @@ "tlb": "#F2E4_ n:uint11", "prefix": "F2E4_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 11 } } + { + "name": "n", + "type": "uint", + "size": 11, + "min_value": 0, + "max_value": 2047 + } ] }, "value_flow": { @@ -20300,7 +21705,13 @@ "tlb": "#F2EC_ n:uint11", "prefix": "F2EC_", "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 11 } } + { + "name": "n", + "type": "uint", + "size": 11, + "min_value": 0, + "max_value": 2047 + } ] }, "value_flow": { @@ -20557,8 +21968,20 @@ "tlb": "#F3 p:uint4 r:uint4", "prefix": "F3", "operands": [ - { "name": "p", "loader": "uint", "loader_args": { "size": 4 } }, - { "name": "r", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "p", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + }, + { + "name": "r", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -26975,8 +28398,18 @@ "tlb": "#F4A6_ d:^Cell n:uint10", "prefix": "F4A6_", "operands": [ - { "name": "d", "loader": "ref", "loader_args": {} }, - { "name": "n", "loader": "uint", "loader_args": { "size": 10 } } + { + "name": "d", + "type": "ref", + "decode_hint": { "type": "dictionary", "size_var": "n" } + }, + { + "name": "n", + "type": "uint", + "size": 10, + "min_value": 0, + "max_value": 1023 + } ] }, "value_flow": { @@ -27167,8 +28600,18 @@ "tlb": "#F4AE_ d:^Cell n:uint10", "prefix": "F4AE_", "operands": [ - { "name": "d", "loader": "ref", "loader_args": {} }, - { "name": "n", "loader": "uint", "loader_args": { "size": 10 } } + { + "name": "d", + "type": "ref", + "decode_hint": { "type": "dictionary", "size_var": "n" } + }, + { + "name": "n", + "type": "uint", + "size": 10, + "min_value": 0, + "max_value": 1023 + } ] }, "value_flow": { @@ -27719,7 +29162,13 @@ "tlb": "#F82 i:uint4", "prefix": "F82", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -27948,7 +29397,13 @@ "prefix": "F85_", "operands_range_check": { "length": 5, "from": 1, "to": 31 }, "operands": [ - { "name": "k", "loader": "uint", "loader_args": { "size": 5 } } + { + "name": "k", + "type": "uint", + "size": 5, + "min_value": 1, + "max_value": 31 + } ] }, "value_flow": { @@ -28000,7 +29455,13 @@ "prefix": "F87_", "operands_range_check": { "length": 5, "from": 1, "to": 31 }, "operands": [ - { "name": "k", "loader": "uint", "loader_args": { "size": 5 } } + { + "name": "k", + "type": "uint", + "size": 5, + "min_value": 1, + "max_value": 31 + } ] }, "value_flow": { @@ -31267,7 +32728,13 @@ "prefix": "FE", "operands_range_check": { "length": 8, "from": 1, "to": 19 }, "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "n", + "type": "uint", + "size": 8, + "min_value": 1, + "max_value": 19 + } ] }, "value_flow": { @@ -31314,7 +32781,13 @@ "prefix": "FE", "operands_range_check": { "length": 8, "from": 21, "to": 31 }, "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "n", + "type": "uint", + "size": 8, + "min_value": 21, + "max_value": 31 + } ] }, "value_flow": { @@ -31338,7 +32811,13 @@ "tlb": "#FE2 i:uint4", "prefix": "FE2", "operands": [ - { "name": "i", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "i", + "type": "uint", + "size": 4, + "min_value": 0, + "max_value": 15 + } ] }, "value_flow": { @@ -31363,7 +32842,13 @@ "prefix": "FE", "operands_range_check": { "length": 8, "from": 48, "to": 239 }, "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "n", + "type": "uint", + "size": 8, + "min_value": 48, + "max_value": 239 + } ] }, "value_flow": { @@ -31389,12 +32874,15 @@ "operands": [ { "name": "s", - "loader": "subslice", - "loader_args": { - "bits_length_var_size": 4, - "bits_padding": 8, - "completion_tag": false - } + "type": "subslice", + "bits_length_var_size": 4, + "bits_padding": 8, + "completion_tag": false, + "max_bits": 128, + "min_bits": 8, + "max_refs": 0, + "min_refs": 0, + "decode_hint": { "type": "plain" } } ] }, @@ -31420,7 +32908,13 @@ "prefix": "FF", "operands_range_check": { "length": 8, "from": 0, "to": 239 }, "operands": [ - { "name": "n", "loader": "uint", "loader_args": { "size": 8 } } + { + "name": "n", + "type": "uint", + "size": 8, + "min_value": 0, + "max_value": 239 + } ] }, "value_flow": { @@ -31445,7 +32939,13 @@ "prefix": "FFF", "operands_range_check": { "length": 4, "from": 1, "to": 15 }, "operands": [ - { "name": "z", "loader": "uint", "loader_args": { "size": 4 } } + { + "name": "z", + "type": "uint", + "size": 4, + "min_value": 1, + "max_value": 15 + } ] }, "value_flow": { diff --git a/schema.json b/schema.json index 40c4c74..3be92ba 100644 --- a/schema.json +++ b/schema.json @@ -144,10 +144,7 @@ "type": { "const": "simple" }, - "name": { - "type": "string", - "title": "Variable to pass" - }, + "name": { "$ref": "#/definitions/var_name" }, "value_types": { "title": "Possible value types", "type": "array", @@ -207,10 +204,7 @@ "type": { "const": "conditional" }, - "name": { - "type": "string", - "title": "Variable to match" - }, + "name": { "$ref": "#/definitions/var_name", "title": "Variable to match" }, "match": { "type": "array", "additionalItems": false, @@ -253,13 +247,10 @@ "type": { "const": "array" }, - "name": { - "title": "Variable name", - "type": "string" - }, + "name": { "$ref": "#/definitions/var_name" }, "length_var": { "title": "Variable which contains array length", - "type": "string" + "$ref": "#/definitions/var_name" }, "array_entry": { "allOf": [{ "$ref": "#/definitions/stack" }], @@ -270,6 +261,163 @@ } ] }, + "var_name": { + "type": "string", + "title": "Variable name", + "description": "Allowed chars are `a-zA-Z0-9_`, must not begin with digit or underscore and must not end with underscore.", + "markdownDescription": "Allowed chars are `a-zA-Z0-9_`, must not begin with digit or underscore and must not end with underscore." + }, + "decode_hint": { + "title": "Hint for disassembler to parse operand data", + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "required": ["type"], + "properties": { + "type": { "const": "plain" } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["type"], + "properties": { + "type": { "const": "continuation" } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["type", "size_var"], + "properties": { + "type": { "const": "dictionary" }, + "size_var": { "$ref": "#/definitions/var_name" } + } + } + ] + }, + "operand": { + "title": "Operand", + "description": "Static instruction parameter serialized to bytecode.", + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "required": ["name", "type", "size", "max_value", "min_value"], + "properties": { + "name": { "$ref": "#/definitions/var_name" }, + "type": { "const": "uint" }, + "size": { + "type": "number", + "title": "Integer size, bits" + }, + "max_value": { + "type": "number", + "title": "Maximum integer value" + }, + "min_value": { + "type": "number", + "title": "Minimum integer value" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["name", "type", "size", "max_value", "min_value"], + "properties": { + "name": { "$ref": "#/definitions/var_name" }, + "type": { "const": "int" }, + "size": { + "type": "number", + "title": "Integer size, bits" + }, + "max_value": { + "type": "number", + "title": "Maximum integer value" + }, + "min_value": { + "type": "number", + "title": "Minimum integer value" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["name", "type"], + "properties": { + "name": { "$ref": "#/definitions/var_name" }, + "type": { "const": "pushint_long" } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["name", "type", "decode_hint"], + "properties": { + "name": { "$ref": "#/definitions/var_name" }, + "type": { "const": "ref" }, + "decode_hint": { "$ref": "#/definitions/decode_hint" } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["name", "type", "bits_length_var_size", "bits_padding", "completion_tag", "decode_hint", "max_bits", "min_bits", "max_refs", "min_refs"], + "properties": { + "name": { "$ref": "#/definitions/var_name" }, + "type": { "const": "subslice" }, + "bits_length_var_size": { + "type": "number", + "title": "Size of bit length operand" + }, + "bits_padding": { + "type": "number", + "title": "Constant integer value to add to length of bitstring to load." + }, + "refs_length_var_size": { + "type": "number", + "title": "Size of ref count operand", + "description": "Optional, no refs in this operand in case of absence." + }, + "refs_add": { + "type": "number", + "title": "Constant integer value to add to ref count", + "default": 0 + }, + "completion_tag": { + "type": "boolean", + "title": "Completion tag flag", + "description": "Determines completion tag presense: trailing `'1' + '0' * x` in bitstring", + "markdownDescription": "Determines completion tag presense: trailing `'1' + '0' * x` in bitstring" + }, + "max_bits": { + "type": "number", + "title": "Max bit size", + "description": "Hint for maximum bits available to store for this operand" + }, + "min_bits": { + "type": "number", + "title": "Min bit size", + "description": "Hint for minimum bits available to store for this operand" + }, + "max_refs": { + "type": "number", + "title": "Max ref size", + "description": "Hint for maximum refs available to store for this operand" + }, + "min_refs": { + "type": "number", + "title": "Min ref size", + "description": "Hint for minimum refs available to store for this operand" + }, + "decode_hint": { "$ref": "#/definitions/decode_hint" } + } + } + ] + }, "continuation": { "title": "Continuation", "description": "Description of a continuation with static savelist", @@ -294,7 +442,7 @@ ], "properties": { "type": { "const": "variable" }, - "var_name": { "type": "string", "title": "Continuation variable name" }, + "var_name": { "$ref": "#/definitions/var_name", "title": "Continuation variable name" }, "save": { "$ref": "#/definitions/savelist" } } }, @@ -393,7 +541,7 @@ "required": ["count", "body", "after"], "additionalProperties": false, "properties": { - "count": { "type": "string", "title": "Variable name" }, + "count": { "$ref": "#/definitions/var_name", "title": "Variable name" }, "body": { "$ref": "#/definitions/continuation" }, "after": { "$ref": "#/definitions/continuation" } } @@ -599,72 +747,10 @@ "operands": { "type": "array", "title": "Instruction operands", - "description": "Describes how to parse operands. Order of objects in this array represents the actual order of operands in instruction. Optional, no operands in case of absence.", + "description": "Describes how to parse operands. Order of objects in this array represents the actual order of operands in instruction.", "default": [], - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "title": "Operand variable name", - "description": "Allowed chars are `a-zA-Z0-9_`, must not begin with digit or underscore and must not end with underscore.", - "markdownDescription": "Allowed chars are `a-zA-Z0-9_`, must not begin with digit or underscore and must not end with underscore." - }, - "loader": { - "enum": [ - "int", - "uint", - "ref", - "pushint_long", - "subslice" - ], - "title": "Loader function for operand" - }, - "loader_args": { - "type": "object", - "title": "Arguments for loader function. Optional, no arguments in case of absence.", - "default": {} - } - }, - "required": [ - "name", - "loader", - "loader_args" - ], - "examples": [ - { - "name": "x", - "loader": "pushint_long", - "loader_args": {} - }, - { - "name": "r", - "loader": "uint", - "loader_args": { - "size": 2 - } - }, - { - "name": "x", - "loader": "uint", - "loader_args": { - "size": 5 - } - }, - { - "name": "slice", - "loader": "subslice", - "loader_args": { - "bits_length_var": "x", - "bits_padding": 1, - "refs_length_var": "r", - "refs_add": 1, - "completion_tag": true - } - } - ] - } + "additionalItems": false, + "items": { "$ref": "#/definitions/operand" } } }, "required": [ @@ -690,12 +776,12 @@ "inputs": { "$ref": "#/definitions/values", "title": "Instruction inputs", - "description": "Incoming values constraints. Input is unconstrained if absent." + "description": "Incoming values constraints." }, "outputs": { "$ref": "#/definitions/values", "title": "Instruction outputs", - "description": "Outgoing values constraints. Output is unconstrained if absent." + "description": "Outgoing values constraints." } } },