src/BytecodeEmitter.h
changeset 145 e9d804821c48
parent 143 393f1b8ac8c3
child 147 9c544823d090
     1.1 --- a/src/BytecodeEmitter.h	Mon Jul 30 22:30:38 2012 -0700
     1.2 +++ b/src/BytecodeEmitter.h	Wed Aug 01 22:32:59 2012 -0700
     1.3 @@ -365,8 +365,8 @@
     1.4          writeUint32(argc);
     1.5      }
     1.6  
     1.7 -    void getarray(PrimitiveType type) {
     1.8 -        switch (type) {
     1.9 +    void getarray(Type *type) {
    1.10 +        switch (type->pod()) {
    1.11            case PrimitiveType_Float:
    1.12              singleByteOp(OP_GETARRAY_F);
    1.13              break;
    1.14 @@ -374,13 +374,13 @@
    1.15              singleByteOp(OP_GETARRAY_I);
    1.16              break;
    1.17            default:
    1.18 -            assert(type == PrimitiveType_Char);
    1.19 +            assert(type->pod() == PrimitiveType_Char);
    1.20              singleByteOp(OP_GETARRAY_C);
    1.21              break;
    1.22          }
    1.23      }
    1.24 -    void setarray(PrimitiveType type) {
    1.25 -        switch (type) {
    1.26 +    void setarray(Type *type) {
    1.27 +        switch (type->pod()) {
    1.28            case PrimitiveType_Float:
    1.29              singleByteOp(OP_SETARRAY_F);
    1.30              break;
    1.31 @@ -388,7 +388,7 @@
    1.32              singleByteOp(OP_SETARRAY_I);
    1.33              break;
    1.34            default:
    1.35 -            assert(type == PrimitiveType_Char);
    1.36 +            assert(type->pod() == PrimitiveType_Char);
    1.37              singleByteOp(OP_SETARRAY_C);
    1.38              break;
    1.39          }
    1.40 @@ -488,19 +488,19 @@
    1.41          singleByteOp(OP_ARRAYREF_LIFO);
    1.42          markOop(1);
    1.43      }
    1.44 -    void getref(PrimitiveType type) {
    1.45 -        if (type == PrimitiveType_Int32) {
    1.46 +    void getref(Type *type) {
    1.47 +        if (type->pod() == PrimitiveType_Int32) {
    1.48              singleByteOp(OP_GETREF_I);
    1.49          } else {
    1.50 -            assert(type == PrimitiveType_Float);
    1.51 +            assert(type->pod() == PrimitiveType_Float);
    1.52              singleByteOp(OP_GETREF_F);
    1.53          }
    1.54      }
    1.55 -    void setref(PrimitiveType type) {
    1.56 -        if (type == PrimitiveType_Int32) {
    1.57 +    void setref(Type *type) {
    1.58 +        if (type->pod() == PrimitiveType_Int32) {
    1.59              singleByteOp(OP_SETREF_I);
    1.60          } else {
    1.61 -            assert(type == PrimitiveType_Float);
    1.62 +            assert(type->pod() == PrimitiveType_Float);
    1.63              singleByteOp(OP_SETREF_F);
    1.64          }
    1.65      }