Chromium Code Reviews| Index: src/interpreter/interpreter.cc |
| diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
| index b6c9ebfb6869562da930ea5350b6050eca71095e..552ccc97bf5b827f8c944797434b559ff5438515 100644 |
| --- a/src/interpreter/interpreter.cc |
| +++ b/src/interpreter/interpreter.cc |
| @@ -30,14 +30,14 @@ void Interpreter::Initialize(bool create_heap_objects) { |
| static_cast<int>(Bytecode::kLast) + 1, TENURED); |
| isolate_->heap()->public_set_interpreter_table(*handler_table); |
| -#define GENERATE_CODE(Name, _) \ |
| - { \ |
| - compiler::InterpreterAssembler assembler(isolate_, &zone, \ |
| - Bytecode::k##Name); \ |
| - Do##Name(&assembler); \ |
| - Handle<Code> code = assembler.GenerateCode(); \ |
| - handler_table->set(static_cast<int>(Bytecode::k##Name), *code); \ |
| - } |
| +#define GENERATE_CODE(Name, ...) \ |
| + { \ |
| + compiler::InterpreterAssembler assembler(isolate_, &zone, \ |
| + Bytecode::k##Name); \ |
| + Do##Name(&assembler); \ |
| + Handle<Code> code = assembler.GenerateCode(); \ |
| + handler_table->set(static_cast<int>(Bytecode::k##Name), *code); \ |
| + } |
| BYTECODE_LIST(GENERATE_CODE) |
| #undef GENERATE_CODE |
| } |
| @@ -46,13 +46,19 @@ void Interpreter::Initialize(bool create_heap_objects) { |
| // Load literal '0' into the register index specified by the bytecode's |
| // argument. |
| -void Interpreter::DoLoadLiteral0(compiler::InterpreterAssembler* assembler) { |
| +void Interpreter::DoLoadSmi0(compiler::InterpreterAssembler* assembler) { |
|
rmcilroy
2015/07/27 14:56:58
I think we should keep this as LoadLiteral0 so tha
oth
2015/07/27 16:59:00
Done.
|
| Node* register_index = __ BytecodeArg(0); |
| __ StoreRegister(__ NumberConstant(0), register_index); |
| __ Dispatch(); |
| } |
| +// LoadSmi8 dst, imm8 |
|
rmcilroy
2015/07/27 14:56:58
nit - could you update all the comments to have th
oth
2015/07/27 16:59:00
Done.
|
| +void Interpreter::DoLoadSmi8(compiler::InterpreterAssembler* assembler) { |
|
rmcilroy
2015/07/27 14:56:58
Is LoadLiteralSmi8 too wordy? (honest question).
oth
2015/07/27 16:59:00
There are two issues here - how handlers are named
rmcilroy
2015/07/28 08:58:12
No, I'd rather have the handlers named the same as
|
| + UNIMPLEMENTED(); |
| +} |
| + |
| + |
| // Return the value in register 0. |
| void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { |
| // TODO(rmcilroy) Jump to exit trampoline. |