jitcraft/BytecodeEmitter.h
changeset 73 ef5492aa8d8b
parent 72 40746ab0a30b
child 78 93e0a19c805a
     1.1 --- a/jitcraft/BytecodeEmitter.h	Sat Jul 14 21:01:52 2012 -0700
     1.2 +++ b/jitcraft/BytecodeEmitter.h	Sun Jul 15 14:40:11 2012 -0700
     1.3 @@ -347,11 +347,10 @@
     1.4      void stop() {
     1.5          singleByteOp(OP_STOP);
     1.6      }
     1.7 -    void callglobal(Handle<Type> fun, unsigned index) {
     1.8 +    void call(Handle<Type> fun) {
     1.9          recordOops();
    1.10 -        ensure(OP_CALLGLOBAL_LENGTH);
    1.11 -        writeOp(OP_CALLGLOBAL);
    1.12 -        writeUint32(index);
    1.13 +        ensure(OP_CALL_LENGTH);
    1.14 +        writeOp(OP_CALL);
    1.15  
    1.16          if (fun->returnType()->isVoid())
    1.17              drop(1);
    1.18 @@ -537,6 +536,16 @@
    1.19      void returnvoid() {
    1.20          singleByteOp(OP_RETURNVOID);
    1.21      }
    1.22 +    void module() {
    1.23 +        singleByteOp(OP_MODULE);
    1.24 +        markOop(1);
    1.25 +    }
    1.26 +    void getmodule_fn(unsigned index) {
    1.27 +        ensure(OP_GETMODULE_FN_LENGTH);
    1.28 +        writeOp(OP_GETMODULE_FN);
    1.29 +        writeUint32(index);
    1.30 +        markOop(1);
    1.31 +    }
    1.32  
    1.33      // Helpers.
    1.34      void get(Variable *var) {