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

Side by Side Diff: src/interpreter/bytecode-generator.h

Issue 1666943003: [interpreter] Support for ES6 class literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_INTERPRETER_BYTECODE_GENERATOR_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_GENERATOR_H_
6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_ 6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/interpreter/bytecode-array-builder.h" 9 #include "src/interpreter/bytecode-array-builder.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void VisitVariableLoadForAccumulatorValue( 71 void VisitVariableLoadForAccumulatorValue(
72 Variable* variable, FeedbackVectorSlot slot, 72 Variable* variable, FeedbackVectorSlot slot,
73 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); 73 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF);
74 MUST_USE_RESULT Register 74 MUST_USE_RESULT Register
75 VisitVariableLoadForRegisterValue(Variable* variable, FeedbackVectorSlot slot, 75 VisitVariableLoadForRegisterValue(Variable* variable, FeedbackVectorSlot slot,
76 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); 76 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF);
77 void VisitVariableAssignment(Variable* variable, FeedbackVectorSlot slot); 77 void VisitVariableAssignment(Variable* variable, FeedbackVectorSlot slot);
78 78
79 void VisitArgumentsObject(Variable* variable); 79 void VisitArgumentsObject(Variable* variable);
80 void VisitRestArgumentsArray(Variable* rest, int index); 80 void VisitRestArgumentsArray(Variable* rest, int index);
81 void VisitClassLiteralContents(ClassLiteral* expr);
82 void VisitClassLiteralForRuntimeDefinition(ClassLiteral* expr);
83 void VisitClassLiteralProperties(ClassLiteral* expr, Register literal,
84 Register prototype);
85 void VisitClassLiteralStaticPrototypeWithComputedName(Register name);
81 void VisitThisFunctionVariable(Variable* variable); 86 void VisitThisFunctionVariable(Variable* variable);
82 void VisitNewTargetVariable(Variable* variable); 87 void VisitNewTargetVariable(Variable* variable);
83 void VisitNewLocalFunctionContext(); 88 void VisitNewLocalFunctionContext();
84 void VisitBuildLocalActivationContext(); 89 void VisitBuildLocalActivationContext();
85 void VisitBlockDeclarationsAndStatements(Block* stmt); 90 void VisitBlockDeclarationsAndStatements(Block* stmt);
86 void VisitNewLocalBlockContext(Scope* scope); 91 void VisitNewLocalBlockContext(Scope* scope);
87 void VisitNewLocalCatchContext(Variable* variable); 92 void VisitNewLocalCatchContext(Variable* variable);
88 void VisitNewLocalWithContext(); 93 void VisitNewLocalWithContext();
89 void VisitFunctionClosureForContext(); 94 void VisitFunctionClosureForContext();
90 void VisitSetHomeObject(Register value, Register home_object, 95 void VisitSetHomeObject(Register value, Register home_object,
91 ObjectLiteralProperty* property, int slot_number = 0); 96 ObjectLiteralProperty* property, int slot_number = 0);
92 void VisitObjectLiteralAccessor(Register home_object, 97 void VisitObjectLiteralAccessor(Register home_object,
93 ObjectLiteralProperty* property, 98 ObjectLiteralProperty* property,
94 Register value_out); 99 Register value_out);
95 void VisitForInAssignment(Expression* expr, FeedbackVectorSlot slot); 100 void VisitForInAssignment(Expression* expr, FeedbackVectorSlot slot);
96 101
97 // Visit a statement and switch scopes, the context is in the accumulator. 102 // Visit a statement and switch scopes, the context is in the accumulator.
98 void VisitInScope(Statement* stmt, Scope* scope); 103 void VisitInScope(Statement* stmt, Scope* scope);
99 104
100 // Visitors for obtaining expression result in the accumulator, in a 105 // Visitors for obtaining expression result in the accumulator, in a
101 // register, or just getting the effect. 106 // register, or just getting the effect.
102 void VisitForAccumulatorValue(Expression* expression); 107 void VisitForAccumulatorValue(Expression* expr);
103 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expression); 108 void VisitForAccumulatorValueOrTheHole(Expression* expr);
104 void VisitForEffect(Expression* node); 109 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expr);
110 void VisitForEffect(Expression* expr);
105 111
106 // Methods for tracking and remapping register. 112 // Methods for tracking and remapping register.
107 void RecordStoreToRegister(Register reg); 113 void RecordStoreToRegister(Register reg);
108 Register LoadFromAliasedRegister(Register reg); 114 Register LoadFromAliasedRegister(Register reg);
109 115
110 inline void set_builder(BytecodeArrayBuilder* builder) { builder_ = builder; } 116 inline void set_builder(BytecodeArrayBuilder* builder) { builder_ = builder; }
111 inline BytecodeArrayBuilder* builder() const { return builder_; } 117 inline BytecodeArrayBuilder* builder() const { return builder_; }
112 118
113 inline Isolate* isolate() const { return isolate_; } 119 inline Isolate* isolate() const { return isolate_; }
114 inline Zone* zone() const { return zone_; } 120 inline Zone* zone() const { return zone_; }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 ContextScope* execution_context_; 159 ContextScope* execution_context_;
154 ExpressionResultScope* execution_result_; 160 ExpressionResultScope* execution_result_;
155 RegisterAllocationScope* register_allocator_; 161 RegisterAllocationScope* register_allocator_;
156 }; 162 };
157 163
158 } // namespace interpreter 164 } // namespace interpreter
159 } // namespace internal 165 } // namespace internal
160 } // namespace v8 166 } // namespace v8
161 167
162 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ 168 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698