| Index: src/interpreter/bytecode-generator.h
|
| diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h
|
| index 573ad673efce2cd1f8968e25957824a088c4fb5e..ef5256722cd1103c483dc987aa01512f57f456e2 100644
|
| --- a/src/interpreter/bytecode-generator.h
|
| +++ b/src/interpreter/bytecode-generator.h
|
| @@ -34,6 +34,11 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
|
| void VisitDeclarations(ZoneList<Declaration*>* declarations);
|
| void VisitStatements(ZoneList<Statement*>* statments);
|
|
|
| + void set_isolate_access_allowed(bool isolate_access_allowed) {
|
| + isolate_access_allowed_ = isolate_access_allowed;
|
| + }
|
| + bool isolate_access_allowed() { return isolate_access_allowed_; }
|
| +
|
| private:
|
| class AccumulatorResultScope;
|
| class ContextScope;
|
| @@ -177,7 +182,10 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
|
| void InitializeWithConsecutiveRegisters(Register (®isters)[N]);
|
|
|
| inline BytecodeArrayBuilder* builder() const { return builder_; }
|
| - inline Isolate* isolate() const { return isolate_; }
|
| + inline Isolate* isolate() const {
|
| + DCHECK(isolate_access_allowed_);
|
| + return isolate_;
|
| + }
|
| inline Zone* zone() const { return zone_; }
|
| inline DeclarationScope* scope() const { return scope_; }
|
| inline CompilationInfo* info() const { return info_; }
|
| @@ -206,23 +214,33 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
|
| inline LanguageMode language_mode() const;
|
| int feedback_index(FeedbackVectorSlot slot) const;
|
|
|
| + Handle<Name> home_object_symbol() const { return home_object_symbol_; }
|
| + Handle<Name> prototype_string() const { return prototype_string_; }
|
| +
|
| Isolate* isolate_;
|
| Zone* zone_;
|
| BytecodeArrayBuilder* builder_;
|
| CompilationInfo* info_;
|
| DeclarationScope* scope_;
|
| + bool isolate_access_allowed_;
|
| +
|
| 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
|
|
|