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

Unified Diff: src/interpreter/bytecode-generator.h

Issue 1587033002: [Interpreter] Ensure we always have an outer register allocation scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_mythri
Patch Set: Similarity 20 Created 4 years, 11 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/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.h
diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h
index 0e84650352774bd016a316e6e23feefbbf32e245..8bda7be3016ab559cd1e2d712e9e5346f11034b0 100644
--- a/src/interpreter/bytecode-generator.h
+++ b/src/interpreter/bytecode-generator.h
@@ -23,8 +23,9 @@ class BytecodeGenerator final : public AstVisitor {
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
- // Visiting function for declarations list is overridden.
+ // Visiting function for declarations list and statements are overridden.
void VisitDeclarations(ZoneList<Declaration*>* declarations) override;
+ void VisitStatements(ZoneList<Statement*>* statments) override;
private:
class ContextScope;
@@ -35,6 +36,7 @@ class BytecodeGenerator final : public AstVisitor {
class EffectResultScope;
class AccumulatorResultScope;
class RegisterResultScope;
+ class RegisterAllocationScope;
void MakeBytecodeBody();
Register NextContextRegister() const;
@@ -118,6 +120,13 @@ class BytecodeGenerator final : public AstVisitor {
execution_result_ = execution_result;
}
ExpressionResultScope* execution_result() const { return execution_result_; }
+ inline void set_register_allocator(
+ RegisterAllocationScope* register_allocator) {
+ register_allocator_ = register_allocator;
+ }
+ RegisterAllocationScope* register_allocator() const {
+ return register_allocator_;
+ }
ZoneVector<Handle<Object>>* globals() { return &globals_; }
inline LanguageMode language_mode() const;
@@ -133,6 +142,7 @@ class BytecodeGenerator final : public AstVisitor {
ControlScope* execution_control_;
ContextScope* execution_context_;
ExpressionResultScope* execution_result_;
+ RegisterAllocationScope* register_allocator_;
};
} // namespace interpreter
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698