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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1226123010: Represent implicit 'this' binding by 'super' in AST. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 5 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/ast.cc ('k') | src/compiler/ast-loop-assignment-analyzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 0c0bb02ea5bd24d1a5b83c207ff00652ca4608ce..c105f2c22c16f94e61f041d570f820d128539760 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2016,7 +2016,7 @@ void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
void AstGraphBuilder::VisitForInAssignment(Expression* expr, Node* value,
const VectorSlotPair& feedback,
BailoutId bailout_id) {
- DCHECK(expr->IsValidReferenceExpression());
+ DCHECK(expr->IsValidReferenceExpressionOrThis());
// Left-hand side can only be a property, a global or a variable slot.
Property* property = expr->AsProperty();
@@ -2090,7 +2090,7 @@ void AstGraphBuilder::VisitForInAssignment(Expression* expr, Node* value,
void AstGraphBuilder::VisitAssignment(Assignment* expr) {
- DCHECK(expr->target()->IsValidReferenceExpression());
+ DCHECK(expr->target()->IsValidReferenceExpressionOrThis());
// Left-hand side can only be a property, a global or a variable slot.
Property* property = expr->target()->AsProperty();
@@ -2520,12 +2520,6 @@ void AstGraphBuilder::VisitCallSuper(Call* expr) {
const Operator* call = javascript()->CallConstruct(args->length() + 2);
Node* value = ProcessArguments(call, args->length() + 2);
PrepareFrameState(value, expr->id(), ast_context()->GetStateCombine());
-
- // TODO(mstarzinger): It sure would be nice if this were desugared.
- FrameStateBeforeAndAfter states(this, BailoutId::None());
- BuildVariableAssignment(super->this_var()->var(), value, Token::INIT_CONST,
- VectorSlotPair(), expr->id(), states);
-
ast_context()->ProduceValue(value);
}
@@ -2627,7 +2621,7 @@ void AstGraphBuilder::VisitUnaryOperation(UnaryOperation* expr) {
void AstGraphBuilder::VisitCountOperation(CountOperation* expr) {
- DCHECK(expr->expression()->IsValidReferenceExpression());
+ DCHECK(expr->expression()->IsValidReferenceExpressionOrThis());
// Left-hand side can only be a property, a global or a variable slot.
Property* property = expr->expression()->AsProperty();
« no previous file with comments | « src/ast.cc ('k') | src/compiler/ast-loop-assignment-analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698