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

Side by Side Diff: src/prettyprinter.cc

Issue 1306993003: Call JS functions via native context instead of js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 3 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/pattern-rewriter.cc ('k') | src/prologue.js » ('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/prettyprinter.h" 5 #include "src/prettyprinter.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #include "src/ast-value-factory.h" 9 #include "src/ast-value-factory.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 793
794 void PrettyPrinter::VisitCallNew(CallNew* node) { 794 void PrettyPrinter::VisitCallNew(CallNew* node) {
795 Print("new ("); 795 Print("new (");
796 Visit(node->expression()); 796 Visit(node->expression());
797 Print(")"); 797 Print(")");
798 PrintArguments(node->arguments()); 798 PrintArguments(node->arguments());
799 } 799 }
800 800
801 801
802 void PrettyPrinter::VisitCallRuntime(CallRuntime* node) { 802 void PrettyPrinter::VisitCallRuntime(CallRuntime* node) {
803 Print("%%"); 803 Print("%%%s\n", node->debug_name());
804 PrintLiteral(node->name(), false);
805 PrintArguments(node->arguments()); 804 PrintArguments(node->arguments());
806 } 805 }
807 806
808 807
809 void PrettyPrinter::VisitUnaryOperation(UnaryOperation* node) { 808 void PrettyPrinter::VisitUnaryOperation(UnaryOperation* node) {
810 Token::Value op = node->op(); 809 Token::Value op = node->op();
811 bool needsSpace = 810 bool needsSpace =
812 op == Token::DELETE || op == Token::TYPEOF || op == Token::VOID; 811 op == Token::DELETE || op == Token::TYPEOF || op == Token::VOID;
813 Print("(%s%s", Token::String(op), needsSpace ? " " : ""); 812 Print("(%s%s", Token::String(op), needsSpace ? " " : "");
814 Visit(node->expression()); 813 Visit(node->expression());
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 1525
1527 void AstPrinter::VisitCallNew(CallNew* node) { 1526 void AstPrinter::VisitCallNew(CallNew* node) {
1528 IndentedScope indent(this, "CALL NEW"); 1527 IndentedScope indent(this, "CALL NEW");
1529 Visit(node->expression()); 1528 Visit(node->expression());
1530 PrintArguments(node->arguments()); 1529 PrintArguments(node->arguments());
1531 } 1530 }
1532 1531
1533 1532
1534 void AstPrinter::VisitCallRuntime(CallRuntime* node) { 1533 void AstPrinter::VisitCallRuntime(CallRuntime* node) {
1535 EmbeddedVector<char, 128> buf; 1534 EmbeddedVector<char, 128> buf;
1536 FormatICSlotNode(&buf, node, "CALL RUNTIME", node->CallRuntimeFeedbackSlot());
1537 IndentedScope indent(this, buf.start()); 1535 IndentedScope indent(this, buf.start());
1538 PrintLiteralIndented("NAME", node->name(), false); 1536 Print("NAME %s\n", node->debug_name());
1539 PrintArguments(node->arguments()); 1537 PrintArguments(node->arguments());
1540 } 1538 }
1541 1539
1542 1540
1543 void AstPrinter::VisitUnaryOperation(UnaryOperation* node) { 1541 void AstPrinter::VisitUnaryOperation(UnaryOperation* node) {
1544 IndentedScope indent(this, Token::Name(node->op())); 1542 IndentedScope indent(this, Token::Name(node->op()));
1545 Visit(node->expression()); 1543 Visit(node->expression());
1546 } 1544 }
1547 1545
1548 1546
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 1590
1593 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { 1591 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) {
1594 IndentedScope indent(this, "SUPER-CALL-REFERENCE"); 1592 IndentedScope indent(this, "SUPER-CALL-REFERENCE");
1595 } 1593 }
1596 1594
1597 1595
1598 #endif // DEBUG 1596 #endif // DEBUG
1599 1597
1600 } // namespace internal 1598 } // namespace internal
1601 } // namespace v8 1599 } // namespace v8
OLDNEW
« no previous file with comments | « src/pattern-rewriter.cc ('k') | src/prologue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698