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

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

Issue 1634153002: [Interpreter] Adds support for const/let variables to interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed rebase errors. 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void VisitPropertyLoadForAccumulator(Register obj, Property* expr); 67 void VisitPropertyLoadForAccumulator(Register obj, Property* expr);
68 68
69 void VisitVariableLoad(Variable* variable, FeedbackVectorSlot slot, 69 void VisitVariableLoad(Variable* variable, FeedbackVectorSlot slot,
70 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); 70 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF);
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, Token::Value op,
78 FeedbackVectorSlot slot);
79 void BuildThrowIfHole(Handle<String> name);
80 void BuildThrowIfNotHole(Handle<String> name);
81 void BuildThrowReassignConstant(Handle<String> name);
82 void BuildHoleCheckForVariableLoad(VariableMode mode, Handle<String> name);
83 void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op);
78 84
79 void VisitArgumentsObject(Variable* variable); 85 void VisitArgumentsObject(Variable* variable);
80 void VisitRestArgumentsArray(Variable* rest, int index); 86 void VisitRestArgumentsArray(Variable* rest, int index);
81 void VisitThisFunctionVariable(Variable* variable); 87 void VisitThisFunctionVariable(Variable* variable);
82 void VisitNewTargetVariable(Variable* variable); 88 void VisitNewTargetVariable(Variable* variable);
83 void VisitNewLocalFunctionContext(); 89 void VisitNewLocalFunctionContext();
84 void VisitBuildLocalActivationContext(); 90 void VisitBuildLocalActivationContext();
85 void VisitBlockDeclarationsAndStatements(Block* stmt); 91 void VisitBlockDeclarationsAndStatements(Block* stmt);
86 void VisitNewLocalBlockContext(Scope* scope); 92 void VisitNewLocalBlockContext(Scope* scope);
87 void VisitNewLocalCatchContext(Variable* variable); 93 void VisitNewLocalCatchContext(Variable* variable);
(...skipping 65 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