OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |