11export type arg =
22 | uint
33 | int
4- | refs
54 | delta
65 | stack
76 | control
@@ -29,9 +28,6 @@ export const uint = (len: number, range: range): uint => ({$: "uint", len, range
2928export type int = { $ : "int" , len : number , range : range }
3029export const int = ( len : number , range : range ) : int => ( { $ : "int" , len, range} )
3130
32- export type refs = { $ : "refs" , count : number }
33- export const refs = ( count : number ) : refs => ( { $ : "refs" , count} )
34-
3531export type delta = { $ : "delta" , delta : number , arg : arg }
3632export const delta = ( delta : number , arg : arg ) : delta => ( { $ : "delta" , delta, arg} )
3733
@@ -368,6 +364,7 @@ const uint14range = range(0n, BigInt(Math.pow(2, 14) - 1))
368364const int8 = int ( 8 , int8range )
369365const int16 = int ( 16 , int16range )
370366
367+ const uint0 = uint ( 0 , { min : 0n , max : 0n } )
371368const uint2 = uint ( 2 , uint2range )
372369const uint3 = uint ( 3 , uint3range )
373370const uint4 = uint ( 4 , uint4range )
@@ -1161,8 +1158,8 @@ export const instructions: Record<string, Opcode> = {
11611158 // SECTION: sdbegins
11621159 SDBEGINSX : cat ( "cell_deserialize" , mksimple ( 0xd726 , 16 , `(_1) => exec_slice_begins_with(_1, false)` ) ) ,
11631160 SDBEGINSXQ : cat ( "cell_deserialize" , mksimple ( 0xd727 , 16 , `(_1) => exec_slice_begins_with(_1, true)` ) ) ,
1164- SDBEGINS : cat ( "cell_deserialize" , mkext ( 0xd728 >> 2 , 14 , 7 , seq ( slice ( refs ( 0 ) , uint7 , 3 ) ) , `exec_slice_begins_with_const` ) ) ,
1165- SDBEGINSQ : cat ( "cell_deserialize" , mkext ( 0xd72c >> 2 , 14 , 7 , seq ( slice ( refs ( 0 ) , uint7 , 3 ) ) , `exec_slice_begins_with_const` ) ) ,
1161+ SDBEGINS : cat ( "cell_deserialize" , mkext ( 0xd728 >> 2 , 14 , 7 , seq ( slice ( uint0 , uint7 , 3 ) ) , `exec_slice_begins_with_const` ) ) ,
1162+ SDBEGINSQ : cat ( "cell_deserialize" , mkext ( 0xd72c >> 2 , 14 , 7 , seq ( slice ( uint0 , uint7 , 3 ) ) , `exec_slice_begins_with_const` ) ) ,
11661163 // END SECTION
11671164
11681165 STREFCONST : cat ( "cell_serialize" , mkextrange ( 0xcf20 , 0xcf21 , 16 , 0 , seq ( refCodeSlice ) , `exec_store_const_ref` ) ) ,
@@ -1308,7 +1305,7 @@ export const instructions: Record<string, Opcode> = {
13081305 CALLXARGS : cat ( "continuation_jump" , mkfixedn ( 0xdb0 , 12 , 4 , seq ( uint4 , minusOne ) , `exec_callx_args_p` ) ) ,
13091306 CALLXARGS_1 : cat ( "continuation_jump" , mkfixedn ( 0xda , 8 , 8 , seq ( uint4 , uint4 ) , `exec_callx_args` ) ) ,
13101307
1311- PUSHSLICE : cat ( "cell_const" , mkext ( 0x8b , 8 , 4 , seq ( slice ( refs ( 0 ) , uint4 , 4 ) ) , `exec_push_slice` ) ) ,
1308+ PUSHSLICE : cat ( "cell_const" , mkext ( 0x8b , 8 , 4 , seq ( slice ( uint0 , uint4 , 4 ) ) , `exec_push_slice` ) ) ,
13121309 PUSHSLICE_REFS : cat ( "cell_const" , mkext ( 0x8c , 8 , 7 , seq ( slice ( delta ( 1 , uint2 ) , uint5 , 1 ) ) , `exec_push_slice_r` ) ) ,
13131310 PUSHSLICE_LONG : cat ( "cell_const" , mkextrange ( ( 0x8d << 3 ) << 7 , ( ( 0x8d << 3 ) + 5 ) << 7 , 18 , 10 , seq ( slice ( uint3 , uint7 , 6 ) ) , `exec_push_slice_r2` ) ) ,
13141311
@@ -1324,7 +1321,7 @@ export const instructions: Record<string, Opcode> = {
13241321 // SETCP: cat("codepage", mkfixedrangen(0xff00, 0x10000, 16, 8, seq(setcpArg), `exec_set_cp`)),
13251322
13261323 PSEUDO_PUSHREF : cat ( "cell_const" , mkfixedpseudo ( 0 , seq ( refCodeSlice ) ) ) ,
1327- PSEUDO_PUSHSLICE : cat ( "cell_const" , mkfixedpseudo ( 0 , seq ( slice ( refs ( 1 ) , uint ( 0 , range ( 0n , 0n ) ) , 0 ) ) ) ) ,
1324+ PSEUDO_PUSHSLICE : cat ( "cell_const" , mkfixedpseudo ( 0 , seq ( slice ( uint0 , uint ( 0 , range ( 0n , 0n ) ) , 0 ) ) ) ) ,
13281325 PSEUDO_EXOTIC : cat ( "cell_const" , mkfixedpseudo ( 0 , seq ( exoticCell ) ) ) ,
13291326
13301327 // TVM 11 instructions
0 commit comments