Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index b6c9ebfb6869562da930ea5350b6050eca71095e..a52d0be89c8f9783378b737d240b72c8402bf479 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,66 @@ 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) { |
Node* register_index = __ BytecodeArg(0); |
__ StoreRegister(__ NumberConstant(0), register_index); |
__ Dispatch(); |
} |
+// LoadSmi8 dst, imm8 |
+void Interpreter::DoLoadSmi8(compiler::InterpreterAssembler* assembler) { |
+ UNIMPLEMENTED(); |
rmcilroy
2015/07/24 18:34:48
This will fail when we build the interpreter-table
|
+} |
+ |
+ |
+// LoadSmi dst, imm32 |
+void Interpreter::DoLoadSmi(compiler::InterpreterAssembler* assembler) { |
+ UNIMPLEMENTED(); |
+} |
+ |
+ |
+// Move dst, src |
+void Interpreter::DoMove(compiler::InterpreterAssembler* assembler) { |
+ UNIMPLEMENTED(); |
+} |
+ |
+ |
+// Instruction Add dst, src1, src2 |
+// Effect dst = src1 + src2 |
+void Interpreter::DoAdd(compiler::InterpreterAssembler* assembler) { |
+ UNIMPLEMENTED(); |
+} |
+ |
+ |
+// Instruction Sub dst, src1, src2 |
+// Effect dst = src1 - src2 |
+void Interpreter::DoSub(compiler::InterpreterAssembler* assembler) { |
+ UNIMPLEMENTED(); |
+} |
+ |
+ |
+// Instruction Mul dst, src1, src2 |
+// Effect dst = src1 * src2 |
+void Interpreter::DoMul(compiler::InterpreterAssembler* assembler) { |
+ UNIMPLEMENTED(); |
+} |
+ |
+ |
+// Instruction Div dst, src1, src2 |
+// Effect dst = src1 / src2 |
+void Interpreter::DoDiv(compiler::InterpreterAssembler* assembler) { |
+ UNIMPLEMENTED(); |
+} |
+ |
+ |
+// Instruction Mod dst, src1, src2 |
+// Effect dst = src1 % src2 |
+void Interpreter::DoMod(compiler::InterpreterAssembler* assembler) { |
+ UNIMPLEMENTED(); |
+} |
+ |
+ |
// Return the value in register 0. |
void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { |
// TODO(rmcilroy) Jump to exit trampoline. |