1.1 --- a/jitcraft/BytecodeEmitter.h Sun Jul 01 14:52:57 2012 -0700
1.2 +++ b/jitcraft/BytecodeEmitter.h Sun Jul 01 16:36:39 2012 -0700
1.3 @@ -359,17 +359,21 @@
1.4 void arrayref_lifo() {
1.5 singleByteOp(OP_ARRAYREF_LIFO);
1.6 }
1.7 - void getref_i() {
1.8 - singleByteOp(OP_GETREF_I);
1.9 - }
1.10 - void setref_i() {
1.11 - singleByteOp(OP_SETREF_I);
1.12 + void getref(PrimitiveType type) {
1.13 + if (type == PrimitiveType_Int32) {
1.14 + singleByteOp(OP_GETREF_I);
1.15 + } else {
1.16 + assert(type == PrimitiveType_Float);
1.17 + singleByteOp(OP_GETREF_F);
1.18 + }
1.19 }
1.20 - void getref_f() {
1.21 - singleByteOp(OP_GETREF_F);
1.22 - }
1.23 - void setref_f() {
1.24 - singleByteOp(OP_SETREF_F);
1.25 + void setref(PrimitiveType type) {
1.26 + if (type == PrimitiveType_Int32) {
1.27 + singleByteOp(OP_SETREF_I);
1.28 + } else {
1.29 + assert(type == PrimitiveType_Float);
1.30 + singleByteOp(OP_SETREF_F);
1.31 + }
1.32 }
1.33 void object(Object *obj) {
1.34 ensure(OP_OBJECT_LENGTH);
1.35 @@ -379,6 +383,12 @@
1.36 void arraycopy() {
1.37 singleByteOp(OP_ARRAYCOPY);
1.38 }
1.39 + void dup() {
1.40 + singleByteOp(OP_DUP);
1.41 + }
1.42 + void dup2() {
1.43 + singleByteOp(OP_DUP2);
1.44 + }
1.45 };
1.46
1.47 }