1.1 --- a/jitcraft/BytecodeEmitter.h Sat Jun 30 22:34:48 2012 -0700
1.2 +++ b/jitcraft/BytecodeEmitter.h Sat Jun 30 22:45:25 2012 -0700
1.3 @@ -320,6 +320,23 @@
1.4 }
1.5 writeUint32(var->slot());
1.6 }
1.7 + void get(Variable *var) {
1.8 + if (var->location() == Variable::STACK) {
1.9 + getlocal(var->slot());
1.10 + } else {
1.11 + assert(var->location() == Variable::PARAMETER);
1.12 + getarg(var->slot());
1.13 + }
1.14 + }
1.15 + void set(Variable *var) {
1.16 + assert(!var->type()->isReference());
1.17 + if (var->location() == Variable::STACK) {
1.18 + setlocal(var->slot());
1.19 + } else {
1.20 + assert(var->location() == Variable::PARAMETER);
1.21 + setarg(var->slot());
1.22 + }
1.23 + }
1.24 void slotref_lifo() {
1.25 singleByteOp(OP_SLOTREF_LIFO);
1.26 }