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

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

Issue 1379793004: [Interpreter] Add support for new local function context creation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_decl
Patch Set: Fix interpreter-assembler-unittest Created 5 years, 2 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 3ce65322cc4314c81798e37397b6531d70583451..2fe8b324d8cc539cd7f952631373b2b8845e9a1c 100644
--- a/src/interpreter/bytecode-generator.h
+++ b/src/interpreter/bytecode-generator.h
@@ -28,15 +28,19 @@ class BytecodeGenerator : public AstVisitor {
void VisitDeclarations(ZoneList<Declaration*>* declarations) override;
private:
+ class ContextScope;
class ControlScope;
class ControlScopeForIteration;
+ void MakeBytecodeBody();
+
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
void VisitArithmeticExpression(BinaryOperation* binop);
void VisitPropertyLoad(Register obj, Property* expr);
void VisitVariableLoad(Variable* variable, FeedbackVectorSlot slot);
void VisitVariableAssignment(Variable* variable, FeedbackVectorSlot slot);
+ void VisitNewLocalFunctionContext();
// Dispatched from VisitUnaryOperation.
void VisitVoid(UnaryOperation* expr);
@@ -44,18 +48,23 @@ class BytecodeGenerator : public AstVisitor {
void VisitNot(UnaryOperation* expr);
inline BytecodeArrayBuilder* builder() { return &builder_; }
+
inline Scope* scope() const { return scope_; }
inline void set_scope(Scope* scope) { scope_ = scope; }
- inline ControlScope* control_scope() const { return control_scope_; }
- inline void set_control_scope(ControlScope* scope) { control_scope_ = scope; }
inline CompilationInfo* info() const { return info_; }
inline void set_info(CompilationInfo* info) { info_ = info; }
- ZoneVector<Handle<Object>>* globals() { return &globals_; }
- LanguageMode language_mode() const;
+ inline ControlScope* control_scope() const { return control_scope_; }
+ inline void set_control_scope(ControlScope* scope) { control_scope_ = scope; }
+ inline Register current_context() const { return current_context_; }
+ inline void set_current_context(Register context) {
+ current_context_ = context;
+ }
+
+ ZoneVector<Handle<Object>>* globals() { return &globals_; }
+ inline LanguageMode language_mode() const;
Strength language_mode_strength() const;
int feedback_index(FeedbackVectorSlot slot) const;
- Register current_context() const;
BytecodeArrayBuilder builder_;
CompilationInfo* info_;
@@ -63,7 +72,6 @@ class BytecodeGenerator : public AstVisitor {
ZoneVector<Handle<Object>> globals_;
ControlScope* control_scope_;
- // TODO(rmcilroy): Encapsulate this in an environment object.
Register current_context_;
};
« 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