diff -r d8ed9b8f19ca -r 23627f8bc421 jitcraft/BytecodeEmitter.h --- a/jitcraft/BytecodeEmitter.h Sat Jun 30 22:34:48 2012 -0700 +++ b/jitcraft/BytecodeEmitter.h Sat Jun 30 22:45:25 2012 -0700 @@ -320,6 +320,23 @@ } writeUint32(var->slot()); } + void get(Variable *var) { + if (var->location() == Variable::STACK) { + getlocal(var->slot()); + } else { + assert(var->location() == Variable::PARAMETER); + getarg(var->slot()); + } + } + void set(Variable *var) { + assert(!var->type()->isReference()); + if (var->location() == Variable::STACK) { + setlocal(var->slot()); + } else { + assert(var->location() == Variable::PARAMETER); + setarg(var->slot()); + } + } void slotref_lifo() { singleByteOp(OP_SLOTREF_LIFO); }