diff -r 99e534728b76 -r 5df4a112967d src/compiler/BytecodeEmitter.cpp --- a/src/compiler/BytecodeEmitter.cpp Sun Nov 18 22:18:23 2012 -0800 +++ b/src/compiler/BytecodeEmitter.cpp Mon Nov 19 01:13:44 2012 -0800 @@ -216,6 +216,7 @@ void BytecodeEmitter::getlocal(VariableSymbol *var) { + assert(var->storage() == VariableSymbol::Local); ensure(OP_GETLOCAL_LENGTH); writeOp(OP_GETLOCAL); writeUint32(var->slot()); @@ -226,6 +227,7 @@ void BytecodeEmitter::setlocal(VariableSymbol *var) { + assert(var->storage() == VariableSymbol::Local); ensure(OP_SETLOCAL_LENGTH); writeOp(OP_SETLOCAL); writeUint32(var->slot()); @@ -233,6 +235,28 @@ markOop(1); } +void +BytecodeEmitter::getarg(VariableSymbol *var) +{ + assert(var->storage() == VariableSymbol::Arg); + ensure(OP_GETARG_LENGTH); + writeOp(OP_GETARG); + writeUint32(var->slot()); + if (var->type()->isTraceable()) + markOop(1); +} + +void +BytecodeEmitter::setarg(VariableSymbol *var) +{ + assert(var->storage() == VariableSymbol::Arg); + ensure(OP_SETARG_LENGTH); + writeOp(OP_SETARG); + writeUint32(var->slot()); + if (var->type()->isTraceable()) + markOop(1); +} + bool BytecodeEmitter::allocate(VariableSymbol *sym) {