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

Unified Diff: src/interpreter/interpreter.cc

Issue 2498073002: [refactoring] Split CodeAssemblerState out of CodeAssembler (Closed)
Patch Set: Created 4 years, 1 month 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
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 81aecafecfdfbba9b465c7f54b6f1b685f6bf5e7..e3bafa63140342c9b54ea441c7efa6826a915ad7 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -76,10 +76,16 @@ void Interpreter::Initialize() {
#define GENERATE_CODE(Name, ...) \
{ \
if (Bytecodes::BytecodeHasHandler(Bytecode::k##Name, operand_scale)) { \
- InterpreterAssembler assembler(isolate_, &zone, Bytecode::k##Name, \
+ InterpreterDispatchDescriptor descriptor(isolate_); \
+ compiler::CodeAssemblerState state( \
Michael Starzinger 2016/11/15 11:53:08 Actually, come to think of it, we could use the sa
Igor Sheludko 2016/11/15 13:06:35 Then we will be passing a pointer to not yet const
Jakob Kummerow 2016/11/15 13:40:32 For now that would work; but our plans for further
+ isolate_, &zone, descriptor, \
+ Code::ComputeFlags(Code::BYTECODE_HANDLER), \
+ Bytecodes::ToString(Bytecode::k##Name), \
+ Bytecodes::ReturnCount(Bytecode::k##Name)); \
+ InterpreterAssembler assembler(&state, Bytecode::k##Name, \
operand_scale); \
Do##Name(&assembler); \
- Handle<Code> code = assembler.GenerateCode(); \
+ Handle<Code> code = state.GenerateCode(); \
size_t index = GetDispatchTableIndex(Bytecode::k##Name, operand_scale); \
dispatch_table_[index] = code->entry(); \
TraceCodegen(code); \

Powered by Google App Engine
This is Rietveld 408576698