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

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: Fix a bug I introduced when rebasing 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
« no previous file with comments | « src/ast/ast-literal-reindexer.cc ('k') | src/ast/prettyprinter.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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 547
548 548
549 void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) { 549 void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
550 IncrementNodeCount(); 550 IncrementNodeCount();
551 node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids())); 551 node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids()));
552 // We don't recurse into the declarations or body of the function literal: 552 // We don't recurse into the declarations or body of the function literal:
553 // you have to separately Renumber() each FunctionLiteral that you compile. 553 // you have to separately Renumber() each FunctionLiteral that you compile.
554 } 554 }
555 555
556 556
557 void AstNumberingVisitor::VisitRewritableAssignmentExpression( 557 void AstNumberingVisitor::VisitRewritableExpression(
558 RewritableAssignmentExpression* node) { 558 RewritableExpression* node) {
559 IncrementNodeCount(); 559 IncrementNodeCount();
560 node->set_base_id(ReserveIdRange(RewritableAssignmentExpression::num_ids())); 560 node->set_base_id(ReserveIdRange(RewritableExpression::num_ids()));
561 Visit(node->expression()); 561 Visit(node->expression());
562 } 562 }
563 563
564 564
565 bool AstNumberingVisitor::Finish(FunctionLiteral* node) { 565 bool AstNumberingVisitor::Finish(FunctionLiteral* node) {
566 node->set_ast_properties(&properties_); 566 node->set_ast_properties(&properties_);
567 node->set_dont_optimize_reason(dont_optimize_reason()); 567 node->set_dont_optimize_reason(dont_optimize_reason());
568 return !HasStackOverflow(); 568 return !HasStackOverflow();
569 } 569 }
570 570
(...skipping 24 matching lines...) Expand all
595 } 595 }
596 596
597 597
598 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 598 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
599 FunctionLiteral* function) { 599 FunctionLiteral* function) {
600 AstNumberingVisitor visitor(isolate, zone); 600 AstNumberingVisitor visitor(isolate, zone);
601 return visitor.Renumber(function); 601 return visitor.Renumber(function);
602 } 602 }
603 } // namespace internal 603 } // namespace internal
604 } // namespace v8 604 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast-literal-reindexer.cc ('k') | src/ast/prettyprinter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698