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

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

Issue 2167763003: [Interpreter] Avoid allocating pairs array in VisitDeclarations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_merge_binary
Patch Set: Rebase Created 4 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/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 744971fbf9070bd24eb960629881757d553a0be1..67e3a05ba2c0c66ece27058fc67facc4053a4236 100644
--- a/src/interpreter/bytecode-generator.h
+++ b/src/interpreter/bytecode-generator.h
@@ -35,6 +35,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
void VisitStatements(ZoneList<Statement*>* statments);
private:
+ class AccumulatorResultScope;
class ContextScope;
class ControlScope;
class ControlScopeForBreakable;
@@ -44,11 +45,12 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
class ControlScopeForTryFinally;
class ExpressionResultScope;
class EffectResultScope;
- class AccumulatorResultScope;
+ class GlobalDeclarationsBuilder;
class RegisterResultScope;
class RegisterAllocationScope;
- void MakeBytecodeBody();
+ void GenerateBytecode();
+ void GenerateBytecodeBody();
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
@@ -196,7 +198,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
return register_allocator_;
}
- ZoneVector<Handle<Object>>* globals() { return &globals_; }
+ GlobalDeclarationsBuilder* globals_builder() { return globals_builder_; }
inline LanguageMode language_mode() const;
int feedback_index(FeedbackVectorSlot slot) const;
@@ -205,7 +207,8 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
BytecodeArrayBuilder* builder_;
CompilationInfo* info_;
Scope* scope_;
- ZoneVector<Handle<Object>> globals_;
+ GlobalDeclarationsBuilder* globals_builder_;
+ ZoneVector<GlobalDeclarationsBuilder*> global_declarations_;
ControlScope* execution_control_;
ContextScope* execution_context_;
ExpressionResultScope* execution_result_;
« 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