Skip to content

Commit 51e6b88

Browse files
committed
fix: correctly handle minusOne in TL-B generation
1 parent 29fc1d8 commit 51e6b88

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

gen/tvm-specification.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66617,7 +66617,7 @@
6661766617
"kind": "fixed",
6661866618
"prefix": 3504,
6661966619
"prefix_str": "DB0",
66620-
"tlb": "#db0 p: (## 4) j: (## 4)"
66620+
"tlb": "#db0 p: (## 4)"
6662166621
},
6662266622
"signature": {
6662366623
"stack_string": "x_1...x_p c:Continuation -> ∅",

src/instructions/tlb.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,6 @@ export function generateTlb(
143143
result += "len: (## 5) data: (int (8 * l + 19))"
144144
break
145145
}
146-
case "minusOne": {
147-
const name = variableNameGenerator()
148-
result += `${name}: (## 4) `
149-
break
150-
}
151146
case "debugstr": {
152147
result += "bits: (## 4) data: ((8 * bits + 8) * Bit) "
153148
break
@@ -157,6 +152,7 @@ export function generateTlb(
157152
result += `${name}: ^Cell `
158153
break
159154
}
155+
case "minusOne":
160156
case "s1":
161157
case "setcpArg":
162158
case "exoticCell": {

src/types/specification-schema.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ export type Arg =
393393
| SetcpArg
394394
| SliceArg
395395
| CodeSliceArg
396+
| Dict
396397
| RefCodeSliceArg
397398
| InlineCodeSliceArg
398399
| ExoticCellArg
@@ -512,6 +513,10 @@ export interface CodeSliceArg {
512513
bits: Arg
513514
}
514515

516+
export interface Dict {
517+
$: "dict"
518+
}
519+
515520
export interface RefCodeSliceArg {
516521
$: "refCodeSlice"
517522
}

0 commit comments

Comments
 (0)