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

Unified 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: Refactored VisitVariableAssignment. Created 4 years, 11 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
Index: src/interpreter/bytecode-generator.h
diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h
index bb96130460922305e675e3b9863f2dc03957d114..f6a417f36b04e2dfba9294831fb0b78406f098cf 100644
--- a/src/interpreter/bytecode-generator.h
+++ b/src/interpreter/bytecode-generator.h
@@ -74,7 +74,13 @@ class BytecodeGenerator final : public AstVisitor {
MUST_USE_RESULT Register
VisitVariableLoadForRegisterValue(Variable* variable, FeedbackVectorSlot slot,
TypeofMode typeof_mode = NOT_INSIDE_TYPEOF);
- void VisitVariableAssignment(Variable* variable, FeedbackVectorSlot slot);
+ void VisitVariableAssignment(Variable* variable, Token::Value op,
+ FeedbackVectorSlot slot);
+ void BuildThrowIfHole(Handle<String> name);
+ void BuildThrowIfNotHole(Handle<String> name);
+ void BuildThrowReassignConstant(Handle<String> name);
+ void BuildHoleCheckForVariableLoad(VariableMode mode, Handle<String> name);
+ void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op);
void VisitArgumentsObject(Variable* variable);
void VisitThisFunctionVariable(Variable* variable);

Powered by Google App Engine
This is Rietveld 408576698