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

Side by Side Diff: src/ast/prettyprinter.cc

Issue 1927943003: Assign yield ids in ast-numbering rather than in bytecode-generator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: nit Created 4 years, 7 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-numbering.cc ('k') | src/interpreter/bytecode-generator.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/prettyprinter.h" 5 #include "src/ast/prettyprinter.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 1602
1603 1603
1604 void AstPrinter::VisitAssignment(Assignment* node) { 1604 void AstPrinter::VisitAssignment(Assignment* node) {
1605 IndentedScope indent(this, Token::Name(node->op()), node->position()); 1605 IndentedScope indent(this, Token::Name(node->op()), node->position());
1606 Visit(node->target()); 1606 Visit(node->target());
1607 Visit(node->value()); 1607 Visit(node->value());
1608 } 1608 }
1609 1609
1610 1610
1611 void AstPrinter::VisitYield(Yield* node) { 1611 void AstPrinter::VisitYield(Yield* node) {
1612 IndentedScope indent(this, "YIELD", node->position()); 1612 EmbeddedVector<char, 128> buf;
1613 SNPrintF(buf, "YIELD id %d", node->yield_id());
1614 IndentedScope indent(this, buf.start(), node->position());
1613 Visit(node->expression()); 1615 Visit(node->expression());
1614 } 1616 }
1615 1617
1616 1618
1617 void AstPrinter::VisitThrow(Throw* node) { 1619 void AstPrinter::VisitThrow(Throw* node) {
1618 IndentedScope indent(this, "THROW", node->position()); 1620 IndentedScope indent(this, "THROW", node->position());
1619 Visit(node->exception()); 1621 Visit(node->exception());
1620 } 1622 }
1621 1623
1622 1624
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 1721
1720 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { 1722 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) {
1721 Visit(node->expression()); 1723 Visit(node->expression());
1722 } 1724 }
1723 1725
1724 1726
1725 #endif // DEBUG 1727 #endif // DEBUG
1726 1728
1727 } // namespace internal 1729 } // namespace internal
1728 } // namespace v8 1730 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast-numbering.cc ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698