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

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

Issue 2276923002: Remove the rest_parameter(int*) variant, use rest_parameter() instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 4 years, 4 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 | « no previous file | src/ast/scopes.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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 568
569 569
570 bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { 570 bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
571 DeclarationScope* scope = node->scope(); 571 DeclarationScope* scope = node->scope();
572 if (scope->new_target_var()) DisableCrankshaft(kSuperReference); 572 if (scope->new_target_var()) DisableCrankshaft(kSuperReference);
573 if (scope->calls_eval()) DisableOptimization(kFunctionCallsEval); 573 if (scope->calls_eval()) DisableOptimization(kFunctionCallsEval);
574 if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) { 574 if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) {
575 DisableCrankshaft(kContextAllocatedArguments); 575 DisableCrankshaft(kContextAllocatedArguments);
576 } 576 }
577 577
578 int rest_index; 578 if (scope->rest_parameter() != nullptr) {
579 if (scope->rest_parameter(&rest_index)) {
580 DisableCrankshaft(kRestParameter); 579 DisableCrankshaft(kRestParameter);
581 } 580 }
582 581
583 if (FLAG_ignition && scope->NeedsContext() && scope->is_script_scope()) { 582 if (FLAG_ignition && scope->NeedsContext() && scope->is_script_scope()) {
584 // Create ScopeInfo while on the main thread to avoid allocation during 583 // Create ScopeInfo while on the main thread to avoid allocation during
585 // potentially concurrent bytecode generation. 584 // potentially concurrent bytecode generation.
586 node->scope()->GetScopeInfo(isolate_); 585 node->scope()->GetScopeInfo(isolate_);
587 } 586 }
588 587
589 if (IsGeneratorFunction(node->kind()) || IsAsyncFunction(node->kind())) { 588 if (IsGeneratorFunction(node->kind()) || IsAsyncFunction(node->kind())) {
(...skipping 13 matching lines...) Expand all
603 } 602 }
604 603
605 604
606 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 605 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
607 FunctionLiteral* function) { 606 FunctionLiteral* function) {
608 AstNumberingVisitor visitor(isolate, zone); 607 AstNumberingVisitor visitor(isolate, zone);
609 return visitor.Renumber(function); 608 return visitor.Renumber(function);
610 } 609 }
611 } // namespace internal 610 } // namespace internal
612 } // namespace v8 611 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698