Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Unified Diff: src/interpreter/interpreter.cc

Issue 1257543003: [Interpreter] Add more bytecode definitions and add operand types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/interpreter.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 0542086d2cf95b977a9e4279c5a5abffe1e66381..ddb87056edcb2eabccbd37e21a0d53ebaee6c05c 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -34,29 +34,40 @@ void Interpreter::Initialize(bool create_heap_objects) {
handler_table->address()));
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
}
}
-// Load literal '0' into the register index specified by the bytecode's
-// argument.
+// LoadLiteral0 <dst>
+//
+// Load literal '0' into the destination register.
void Interpreter::DoLoadLiteral0(compiler::InterpreterAssembler* assembler) {
- Node* register_index = __ BytecodeArg(0);
+ Node* register_index = __ BytecodeOperand(0);
__ StoreRegister(__ NumberConstant(0), register_index);
__ Dispatch();
}
+// LoadSmi8 <dst>, <imm8>
+//
+// Load an 8-bit integer literal into destination register as a Smi.
+void Interpreter::DoLoadSmi8(compiler::InterpreterAssembler* assembler) {
+ // TODO(rmcilroy) Convert an 8-bit integer to a Smi.
+}
+
+
+// Return
+//
// Return the value in register 0.
void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
__ Return();
« no previous file with comments | « src/interpreter/interpreter.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698