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

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

Issue 2528293002: [fullcodegen] Remove deprecated support for new.target and rest parameters. (Closed)
Patch Set: Now with green bots AKA fix copy-and-paste. Created 4 years 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 | « no previous file | src/compiler/ast-graph-builder.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/ast/ast-numbering.h" 5 #include "src/ast/ast-numbering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 void AstNumberingVisitor::VisitRewritableExpression( 582 void AstNumberingVisitor::VisitRewritableExpression(
583 RewritableExpression* node) { 583 RewritableExpression* node) {
584 IncrementNodeCount(); 584 IncrementNodeCount();
585 node->set_base_id(ReserveIdRange(RewritableExpression::num_ids())); 585 node->set_base_id(ReserveIdRange(RewritableExpression::num_ids()));
586 Visit(node->expression()); 586 Visit(node->expression());
587 } 587 }
588 588
589 589
590 bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { 590 bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
591 DeclarationScope* scope = node->scope(); 591 DeclarationScope* scope = node->scope();
592 if (scope->new_target_var()) DisableFullCodegenAndCrankshaft(kSuperReference); 592 if (scope->new_target_var() != nullptr ||
593 if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) { 593 scope->this_function_var() != nullptr) {
594 DisableFullCodegenAndCrankshaft(kSuperReference);
595 }
596
597 if (scope->arguments() != nullptr &&
598 !scope->arguments()->IsStackAllocated()) {
594 DisableFullCodegenAndCrankshaft(kContextAllocatedArguments); 599 DisableFullCodegenAndCrankshaft(kContextAllocatedArguments);
595 } 600 }
596 601
597 if (scope->rest_parameter() != nullptr) { 602 if (scope->rest_parameter() != nullptr) {
598 DisableFullCodegenAndCrankshaft(kRestParameter); 603 DisableFullCodegenAndCrankshaft(kRestParameter);
599 } 604 }
600 605
601 if (IsResumableFunction(node->kind())) { 606 if (IsResumableFunction(node->kind())) {
602 DisableFullCodegenAndCrankshaft(kGenerator); 607 DisableFullCodegenAndCrankshaft(kGenerator);
603 } 608 }
(...skipping 12 matching lines...) Expand all
616 } 621 }
617 622
618 623
619 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 624 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
620 FunctionLiteral* function) { 625 FunctionLiteral* function) {
621 AstNumberingVisitor visitor(isolate, zone); 626 AstNumberingVisitor visitor(isolate, zone);
622 return visitor.Renumber(function); 627 return visitor.Renumber(function);
623 } 628 }
624 } // namespace internal 629 } // namespace internal
625 } // namespace v8 630 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698