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

Side by Side Diff: src/prettyprinter.cc

Issue 1374923002: AST pretty printer fix. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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.h ('k') | no next file » | 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 //----------------------------------------------------------------------------- 427 //-----------------------------------------------------------------------------
428 428
429 429
430 #ifdef DEBUG 430 #ifdef DEBUG
431 431
432 // A helper for ast nodes that use FeedbackVectorICSlots. 432 // A helper for ast nodes that use FeedbackVectorICSlots.
433 static int FormatICSlotNode(Vector<char>* buf, Expression* node, 433 static int FormatICSlotNode(Vector<char>* buf, Expression* node,
434 const char* node_name, FeedbackVectorICSlot slot) { 434 const char* node_name, FeedbackVectorICSlot slot) {
435 int pos = SNPrintF(*buf, "%s", node_name); 435 int pos = SNPrintF(*buf, "%s", node_name);
436 if (!slot.IsInvalid()) { 436 if (!slot.IsInvalid()) {
437 const char* str = 437 pos = SNPrintF(*buf + pos, " ICSlot(%d)", slot.ToInt());
438 TypeFeedbackVector::Kind2String(node->FeedbackICSlotKind(0));
439 pos = SNPrintF(*buf + pos, " ICSlot(%d, %s)", slot.ToInt(), str);
440 } 438 }
441 return pos; 439 return pos;
442 } 440 }
443 441
444 442
445 PrettyPrinter::PrettyPrinter(Isolate* isolate, Zone* zone) { 443 PrettyPrinter::PrettyPrinter(Isolate* isolate, Zone* zone) {
446 output_ = NULL; 444 output_ = NULL;
447 size_ = 0; 445 size_ = 0;
448 pos_ = 0; 446 pos_ = 0;
449 InitializeAstVisitor(isolate, zone); 447 InitializeAstVisitor(isolate, zone);
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 1607
1610 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { 1608 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) {
1611 IndentedScope indent(this, "SUPER-CALL-REFERENCE"); 1609 IndentedScope indent(this, "SUPER-CALL-REFERENCE");
1612 } 1610 }
1613 1611
1614 1612
1615 #endif // DEBUG 1613 #endif // DEBUG
1616 1614
1617 } // namespace internal 1615 } // namespace internal
1618 } // namespace v8 1616 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698