@@ -152,8 +152,8 @@ var OpSpecs = []OpSpec{
152152 {0x0f , ">=" , opGe , asmDefault , disDefault , twoInts , oneInt , 1 , modeAny , opDefault },
153153 {0x10 , "&&" , opAnd , asmDefault , disDefault , twoInts , oneInt , 1 , modeAny , opDefault },
154154 {0x11 , "||" , opOr , asmDefault , disDefault , twoInts , oneInt , 1 , modeAny , opDefault },
155- {0x12 , "==" , opEq , asmDefault , disDefault , twoAny , oneInt , 1 , modeAny , opDefault },
156- {0x13 , "!=" , opNeq , asmDefault , disDefault , twoAny , oneInt , 1 , modeAny , opDefault },
155+ {0x12 , "==" , opEq , asmDefault , disDefault , twoAny , oneInt , 1 , modeAny , stacky ( typeEquals ) },
156+ {0x13 , "!=" , opNeq , asmDefault , disDefault , twoAny , oneInt , 1 , modeAny , stacky ( typeEquals ) },
157157 {0x14 , "!" , opNot , asmDefault , disDefault , oneInt , oneInt , 1 , modeAny , opDefault },
158158 {0x15 , "len" , opLen , asmDefault , disDefault , oneBytes , oneInt , 1 , modeAny , opDefault },
159159 {0x16 , "itob" , opItob , asmDefault , disDefault , oneInt , oneBytes , 1 , modeAny , opDefault },
@@ -212,21 +212,21 @@ var OpSpecs = []OpSpec{
212212 {0x43 , "return" , opReturn , asmDefault , disDefault , oneInt , nil , 2 , modeAny , opDefault },
213213 {0x44 , "assert" , opAssert , asmDefault , disDefault , oneInt , nil , 3 , modeAny , opDefault },
214214 {0x48 , "pop" , opPop , asmDefault , disDefault , oneAny , nil , 1 , modeAny , opDefault },
215- {0x49 , "dup" , opDup , asmDefault , disDefault , oneAny , twoAny , 1 , modeAny , opDefault },
216- {0x4a , "dup2" , opDup2 , asmDefault , disDefault , twoAny , twoAny .plus (twoAny ), 2 , modeAny , opDefault },
215+ {0x49 , "dup" , opDup , asmDefault , disDefault , oneAny , twoAny , 1 , modeAny , stacky ( typeDup ) },
216+ {0x4a , "dup2" , opDup2 , asmDefault , disDefault , twoAny , twoAny .plus (twoAny ), 2 , modeAny , stacky ( typeDupTwo ) },
217217 // There must be at least one thing on the stack for dig, but
218218 // it would be nice if we did better checking than that.
219219 {0x4b , "dig" , opDig , asmDefault , disDefault , oneAny , twoAny , 3 , modeAny , stacky (typeDig , "n" )},
220220 {0x4c , "swap" , opSwap , asmDefault , disDefault , twoAny , twoAny , 3 , modeAny , stacky (typeSwap )},
221- {0x4d , "select" , opSelect , asmDefault , disDefault , twoAny .plus (oneInt ), oneAny , 3 , modeAny , opDefault },
221+ {0x4d , "select" , opSelect , asmDefault , disDefault , twoAny .plus (oneInt ), oneAny , 3 , modeAny , stacky ( typeSelect ) },
222222 {0x4e , "cover" , opCover , asmDefault , disDefault , oneAny , oneAny , 5 , modeAny , stacky (typeCover , "n" )},
223223 {0x4f , "uncover" , opUncover , asmDefault , disDefault , oneAny , oneAny , 5 , modeAny , stacky (typeUncover , "n" )},
224224
225225 {0x50 , "concat" , opConcat , asmDefault , disDefault , twoBytes , oneBytes , 2 , modeAny , opDefault },
226226 {0x51 , "substring" , opSubstring , assembleSubstring , disDefault , oneBytes , oneBytes , 2 , modeAny , immediates ("s" , "e" )},
227227 {0x52 , "substring3" , opSubstring3 , asmDefault , disDefault , byteIntInt , oneBytes , 2 , modeAny , opDefault },
228228 {0x53 , "getbit" , opGetBit , asmDefault , disDefault , anyInt , oneInt , 3 , modeAny , opDefault },
229- {0x54 , "setbit" , opSetBit , asmDefault , disDefault , anyIntInt , oneAny , 3 , modeAny , opDefault },
229+ {0x54 , "setbit" , opSetBit , asmDefault , disDefault , anyIntInt , oneAny , 3 , modeAny , stacky ( typeSetBit ) },
230230 {0x55 , "getbyte" , opGetByte , asmDefault , disDefault , byteInt , oneInt , 3 , modeAny , opDefault },
231231 {0x56 , "setbyte" , opSetByte , asmDefault , disDefault , byteIntInt , oneBytes , 3 , modeAny , opDefault },
232232 {0x57 , "extract" , opExtract , asmDefault , disDefault , oneBytes , oneBytes , 5 , modeAny , immediates ("s" , "l" )},
0 commit comments