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

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

Issue 2242193002: [Interpreter] Avoid accessing Isolate from during bytecode generation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_sourceposition
Patch Set: Rebase Created 4 years, 4 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-dead-code-optimizer.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 573ad673efce2cd1f8968e25957824a088c4fb5e..ca64504069bc9bd0740fbc75477c732b5a15f046 100644
--- a/src/interpreter/bytecode-generator.h
+++ b/src/interpreter/bytecode-generator.h
@@ -24,7 +24,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
public:
explicit BytecodeGenerator(CompilationInfo* info);
- Handle<BytecodeArray> MakeBytecode();
+ Handle<BytecodeArray> MakeBytecode(Isolate* isolate);
#define DECLARE_VISIT(type) void Visit##type(type* node);
AST_NODE_LIST(DECLARE_VISIT)
@@ -54,7 +54,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
void GenerateBytecode();
void GenerateBytecodeBody();
- void FinalizeBytecode();
+ void FinalizeBytecode(Isolate* isolate);
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
@@ -177,7 +177,6 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
void InitializeWithConsecutiveRegisters(Register (&registers)[N]);
inline BytecodeArrayBuilder* builder() const { return builder_; }
- inline Isolate* isolate() const { return isolate_; }
inline Zone* zone() const { return zone_; }
inline DeclarationScope* scope() const { return scope_; }
inline CompilationInfo* info() const { return info_; }
@@ -206,23 +205,31 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
inline LanguageMode language_mode() const;
int feedback_index(FeedbackVectorSlot slot) const;
- Isolate* isolate_;
+ Handle<Name> home_object_symbol() const { return home_object_symbol_; }
+ Handle<Name> prototype_string() const { return prototype_string_; }
+
Zone* zone_;
BytecodeArrayBuilder* builder_;
CompilationInfo* info_;
DeclarationScope* scope_;
+
GlobalDeclarationsBuilder* globals_builder_;
ZoneVector<GlobalDeclarationsBuilder*> global_declarations_;
ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_;
ZoneVector<std::pair<NativeFunctionLiteral*, size_t>>
native_function_literals_;
+
ControlScope* execution_control_;
ContextScope* execution_context_;
ExpressionResultScope* execution_result_;
RegisterAllocationScope* register_allocator_;
+
ZoneVector<BytecodeLabel> generator_resume_points_;
Register generator_state_;
int loop_depth_;
+
+ Handle<Name> home_object_symbol_;
+ Handle<Name> prototype_string_;
};
} // namespace interpreter
« no previous file with comments | « src/interpreter/bytecode-dead-code-optimizer.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698