diff --git a/README.md b/README.md index 71a8f67..e72c706 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,7 @@ However, nothing can stop you from just copying `cp0.json` (and `schema.json` if | 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. +| bytecode.operands[i].internal | Internal flag. If true, this operand is used as a subslice length variable, should be used only for serialization/deserialization, humans and implementations do not need them. Optional, default is false. | 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. @@ -212,14 +213,16 @@ Special loader which currently is used only in `PUSHINT_LONG` instruction. Loads "loader": "uint", "loader_args": { "size": 2 - } + }, + "internal": true }, { "name": "x", "loader": "uint", "loader_args": { "size": 5 - } + }, + "internal": true }, { "name": "slice", @@ -235,7 +238,7 @@ Special loader which currently is used only in `PUSHINT_LONG` instruction. Loads ] ``` -Loads subslice of bit length `{bits_length_var} * 8 + bits_padding` and ref count `{refs_length_var} + refs_add`. If `completion_tag` argument with value `true` is passed, remove completion tag from bitstring (trailing `'1' + '0' * x`). +Loads subslice of bit length `{bits_length_var} * 8 + bits_padding` and ref count `{refs_length_var} + refs_add`. If `completion_tag` argument with value `true` is passed, remove completion tag from bitstring (trailing `'1' + '0' * x`). Length variables are usually `"internal": true` because they should not be showed to user or provided to an implementation. | Argument | Description | -------- | ----------- diff --git a/cp0.json b/cp0.json index c1e9349..fcf11cd 100644 --- a/cp0.json +++ b/cp0.json @@ -3305,7 +3305,8 @@ "loader": "uint", "loader_args": { "size": 4 - } + }, + "internal": true }, { "name": "s", @@ -3352,14 +3353,16 @@ "loader": "uint", "loader_args": { "size": 2 - } + }, + "internal": true }, { "name": "x", "loader": "uint", "loader_args": { "size": 5 - } + }, + "internal": true }, { "name": "slice", @@ -3423,14 +3426,16 @@ "loader": "uint", "loader_args": { "size": 3 - } + }, + "internal": true }, { "name": "x", "loader": "uint", "loader_args": { "size": 7 - } + }, + "internal": true }, { "name": "slice", @@ -3478,14 +3483,16 @@ "loader": "uint", "loader_args": { "size": 2 - } + }, + "internal": true }, { "name": "x", "loader": "uint", "loader_args": { "size": 7 - } + }, + "internal": true }, { "name": "s", @@ -3538,7 +3545,8 @@ "loader": "uint", "loader_args": { "size": 4 - } + }, + "internal": true }, { "name": "s", @@ -19073,14 +19081,16 @@ "loader": "uint", "loader_args": { "size": 2 - } + }, + "internal": true }, { "name": "y", "loader": "uint", "loader_args": { "size": 3 - } + }, + "internal": true }, { "name": "sss", @@ -21152,7 +21162,8 @@ "loader": "uint", "loader_args": { "size": 7 - } + }, + "internal": true }, { "name": "s", @@ -21205,7 +21216,8 @@ "loader": "uint", "loader_args": { "size": 7 - } + }, + "internal": true }, { "name": "s", @@ -43102,7 +43114,8 @@ "loader": "uint", "loader_args": { "size": 4 - } + }, + "internal": true }, { "name": "s", diff --git a/schema.json b/schema.json index 0fa4091..b3f73a8 100644 --- a/schema.json +++ b/schema.json @@ -623,6 +623,12 @@ "type": "object", "title": "Arguments for loader function. Optional, no arguments in case of absence.", "default": {} + }, + "internal": { + "type": "boolean", + "title": "Internal flag", + "description": "If true, this operand is used as a subslice length variable, should be used only for serialization/deserialization, humans and implementations do not need them.", + "default": false } }, "required": [