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

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

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move has_simple_parameters_ to DeclarationScope 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
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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 552
553 void AstNumberingVisitor::VisitRewritableExpression( 553 void AstNumberingVisitor::VisitRewritableExpression(
554 RewritableExpression* node) { 554 RewritableExpression* node) {
555 IncrementNodeCount(); 555 IncrementNodeCount();
556 node->set_base_id(ReserveIdRange(RewritableExpression::num_ids())); 556 node->set_base_id(ReserveIdRange(RewritableExpression::num_ids()));
557 Visit(node->expression()); 557 Visit(node->expression());
558 } 558 }
559 559
560 560
561 bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { 561 bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
562 Scope* scope = node->scope(); 562 DeclarationScope* scope = node->scope();
563 if (scope->new_target_var()) DisableCrankshaft(kSuperReference); 563 if (scope->new_target_var()) DisableCrankshaft(kSuperReference);
564 if (scope->calls_eval()) DisableOptimization(kFunctionCallsEval); 564 if (scope->calls_eval()) DisableOptimization(kFunctionCallsEval);
565 if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) { 565 if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) {
566 DisableCrankshaft(kContextAllocatedArguments); 566 DisableCrankshaft(kContextAllocatedArguments);
567 } 567 }
568 568
569 int rest_index; 569 int rest_index;
570 if (scope->rest_parameter(&rest_index)) { 570 if (scope->rest_parameter(&rest_index)) {
571 DisableCrankshaft(kRestParameter); 571 DisableCrankshaft(kRestParameter);
572 } 572 }
(...skipping 15 matching lines...) Expand all
588 } 588 }
589 589
590 590
591 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 591 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
592 FunctionLiteral* function) { 592 FunctionLiteral* function) {
593 AstNumberingVisitor visitor(isolate, zone); 593 AstNumberingVisitor visitor(isolate, zone);
594 return visitor.Renumber(function); 594 return visitor.Renumber(function);
595 } 595 }
596 } // namespace internal 596 } // namespace internal
597 } // namespace v8 597 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/ast/ast-traversal-visitor.h » ('j') | src/ast/scopes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698