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/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 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 Print("JS-array[%u]", | 1085 Print("JS-array[%u]", |
1086 Smi::cast(JSArray::cast(object)->length())->value()); | 1086 Smi::cast(JSArray::cast(object)->length())->value()); |
1087 } else if (object->IsJSObject()) { | 1087 } else if (object->IsJSObject()) { |
1088 Print("JS-Object"); | 1088 Print("JS-Object"); |
1089 } else { | 1089 } else { |
1090 Print("?UNKNOWN?"); | 1090 Print("?UNKNOWN?"); |
1091 } | 1091 } |
1092 } else if (object->IsFixedArray()) { | 1092 } else if (object->IsFixedArray()) { |
1093 Print("FixedArray"); | 1093 Print("FixedArray"); |
1094 } else { | 1094 } else { |
1095 Print("<unknown literal %p>", object); | 1095 Print("<unknown literal %p>", static_cast<void*>(object)); |
1096 } | 1096 } |
1097 } | 1097 } |
1098 | 1098 |
1099 | 1099 |
1100 void PrettyPrinter::PrintLiteral(const AstRawString* value, bool quote) { | 1100 void PrettyPrinter::PrintLiteral(const AstRawString* value, bool quote) { |
1101 PrintLiteral(value->string(), quote); | 1101 PrintLiteral(value->string(), quote); |
1102 } | 1102 } |
1103 | 1103 |
1104 | 1104 |
1105 void PrettyPrinter::PrintParameters(Scope* scope) { | 1105 void PrettyPrinter::PrintParameters(Scope* scope) { |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 | 1746 |
1747 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1747 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { |
1748 Visit(node->expression()); | 1748 Visit(node->expression()); |
1749 } | 1749 } |
1750 | 1750 |
1751 | 1751 |
1752 #endif // DEBUG | 1752 #endif // DEBUG |
1753 | 1753 |
1754 } // namespace internal | 1754 } // namespace internal |
1755 } // namespace v8 | 1755 } // namespace v8 |
OLD | NEW |