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

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

Issue 1702063002: Non-pattern rewriting revisited (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 549
550 550
551 void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) { 551 void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
552 IncrementNodeCount(); 552 IncrementNodeCount();
553 node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids())); 553 node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids()));
554 // We don't recurse into the declarations or body of the function literal: 554 // We don't recurse into the declarations or body of the function literal:
555 // you have to separately Renumber() each FunctionLiteral that you compile. 555 // you have to separately Renumber() each FunctionLiteral that you compile.
556 } 556 }
557 557
558 558
559 void AstNumberingVisitor::VisitRewritableAssignmentExpression( 559 void AstNumberingVisitor::VisitRewritableExpression(
560 RewritableAssignmentExpression* node) { 560 RewritableExpression* node) {
561 IncrementNodeCount(); 561 IncrementNodeCount();
562 node->set_base_id(ReserveIdRange(RewritableAssignmentExpression::num_ids())); 562 node->set_base_id(ReserveIdRange(RewritableExpression::num_ids()));
563 Visit(node->expression()); 563 Visit(node->expression());
564 } 564 }
565 565
566 566
567 bool AstNumberingVisitor::Finish(FunctionLiteral* node) { 567 bool AstNumberingVisitor::Finish(FunctionLiteral* node) {
568 node->set_ast_properties(&properties_); 568 node->set_ast_properties(&properties_);
569 node->set_dont_optimize_reason(dont_optimize_reason()); 569 node->set_dont_optimize_reason(dont_optimize_reason());
570 return !HasStackOverflow(); 570 return !HasStackOverflow();
571 } 571 }
572 572
(...skipping 24 matching lines...) Expand all
597 } 597 }
598 598
599 599
600 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 600 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
601 FunctionLiteral* function) { 601 FunctionLiteral* function) {
602 AstNumberingVisitor visitor(isolate, zone); 602 AstNumberingVisitor visitor(isolate, zone);
603 return visitor.Renumber(function); 603 return visitor.Renumber(function);
604 } 604 }
605 } // namespace internal 605 } // namespace internal
606 } // namespace v8 606 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698