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

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

Issue 1543253002: Basic TurboFan support for rest arguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code comments. 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 if (scope->HasIllegalRedeclaration()) { 578 if (scope->HasIllegalRedeclaration()) {
579 Visit(scope->GetIllegalRedeclaration()); 579 Visit(scope->GetIllegalRedeclaration());
580 DisableOptimization(kFunctionWithIllegalRedeclaration); 580 DisableOptimization(kFunctionWithIllegalRedeclaration);
581 return Finish(node); 581 return Finish(node);
582 } 582 }
583 if (scope->calls_eval()) DisableOptimization(kFunctionCallsEval); 583 if (scope->calls_eval()) DisableOptimization(kFunctionCallsEval);
584 if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) { 584 if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) {
585 DisableCrankshaft(kContextAllocatedArguments); 585 DisableCrankshaft(kContextAllocatedArguments);
586 } 586 }
587 587
588 int rest_index;
589 if (scope->rest_parameter(&rest_index)) {
590 DisableCrankshaft(kRestParameter);
591 }
592
588 VisitDeclarations(scope->declarations()); 593 VisitDeclarations(scope->declarations());
589 VisitStatements(node->body()); 594 VisitStatements(node->body());
590 595
591 return Finish(node); 596 return Finish(node);
592 } 597 }
593 598
594 599
595 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 600 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
596 FunctionLiteral* function) { 601 FunctionLiteral* function) {
597 AstNumberingVisitor visitor(isolate, zone); 602 AstNumberingVisitor visitor(isolate, zone);
598 return visitor.Renumber(function); 603 return visitor.Renumber(function);
599 } 604 }
600 } // namespace internal 605 } // namespace internal
601 } // namespace v8 606 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698