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

Side by Side Diff: src/ast-numbering.cc

Issue 1135243004: [es6] Support super.property in eval and arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Try feedback slot Created 5 years, 7 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
« no previous file with comments | « src/ast.cc ('k') | src/ast-value-factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/scopes.h" 9 #include "src/scopes.h"
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { 161 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) {
162 IncrementNodeCount(); 162 IncrementNodeCount();
163 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); 163 node->set_base_id(ReserveIdRange(ThisFunction::num_ids()));
164 } 164 }
165 165
166 166
167 void AstNumberingVisitor::VisitSuperReference(SuperReference* node) { 167 void AstNumberingVisitor::VisitSuperReference(SuperReference* node) {
168 IncrementNodeCount(); 168 IncrementNodeCount();
169 DisableOptimization(kSuperReference); 169 DisableOptimization(kSuperReference);
170 ReserveFeedbackSlots(node);
171 node->set_base_id(ReserveIdRange(SuperReference::num_ids()));
172 Visit(node->this_var()); 170 Visit(node->this_var());
171 Visit(node->home_object_var());
173 } 172 }
174 173
175 174
176 void AstNumberingVisitor::VisitImportDeclaration(ImportDeclaration* node) { 175 void AstNumberingVisitor::VisitImportDeclaration(ImportDeclaration* node) {
177 IncrementNodeCount(); 176 IncrementNodeCount();
178 DisableOptimization(kImportDeclaration); 177 DisableOptimization(kImportDeclaration);
179 VisitVariableProxy(node->proxy()); 178 VisitVariableProxy(node->proxy());
180 } 179 }
181 180
182 181
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 479
481 void AstNumberingVisitor::VisitArguments(ZoneList<Expression*>* arguments) { 480 void AstNumberingVisitor::VisitArguments(ZoneList<Expression*>* arguments) {
482 for (int i = 0; i < arguments->length(); i++) { 481 for (int i = 0; i < arguments->length(); i++) {
483 Visit(arguments->at(i)); 482 Visit(arguments->at(i));
484 } 483 }
485 } 484 }
486 485
487 486
488 void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) { 487 void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
489 IncrementNodeCount(); 488 IncrementNodeCount();
489 ReserveFeedbackSlots(node);
wingo 2015/05/13 06:21:32 Could it be that this needs to go in AstNumberingV
490 node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids())); 490 node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids()));
491 // We don't recurse into the declarations or body of the function literal: 491 // We don't recurse into the declarations or body of the function literal:
492 // you have to separately Renumber() each FunctionLiteral that you compile. 492 // you have to separately Renumber() each FunctionLiteral that you compile.
493 } 493 }
494 494
495 495
496 bool AstNumberingVisitor::Finish(FunctionLiteral* node) { 496 bool AstNumberingVisitor::Finish(FunctionLiteral* node) {
497 node->set_ast_properties(&properties_); 497 node->set_ast_properties(&properties_);
498 node->set_dont_optimize_reason(dont_optimize_reason()); 498 node->set_dont_optimize_reason(dont_optimize_reason());
499 return !HasStackOverflow(); 499 return !HasStackOverflow();
(...skipping 24 matching lines...) Expand all
524 } 524 }
525 525
526 526
527 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 527 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
528 FunctionLiteral* function) { 528 FunctionLiteral* function) {
529 AstNumberingVisitor visitor(isolate, zone); 529 AstNumberingVisitor visitor(isolate, zone);
530 return visitor.Renumber(function); 530 return visitor.Renumber(function);
531 } 531 }
532 } 532 }
533 } // namespace v8::internal 533 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/ast-value-factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698