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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 break; | 1018 break; |
1019 case ObjectLiteral::Property::PROTOTYPE: | 1019 case ObjectLiteral::Property::PROTOTYPE: |
1020 prop_kind = "PROTOTYPE"; | 1020 prop_kind = "PROTOTYPE"; |
1021 break; | 1021 break; |
1022 case ObjectLiteral::Property::GETTER: | 1022 case ObjectLiteral::Property::GETTER: |
1023 prop_kind = "GETTER"; | 1023 prop_kind = "GETTER"; |
1024 break; | 1024 break; |
1025 case ObjectLiteral::Property::SETTER: | 1025 case ObjectLiteral::Property::SETTER: |
1026 prop_kind = "SETTER"; | 1026 prop_kind = "SETTER"; |
1027 break; | 1027 break; |
| 1028 case ObjectLiteral::Property::SPREAD: |
| 1029 prop_kind = "SPREAD"; |
| 1030 break; |
1028 } | 1031 } |
1029 EmbeddedVector<char, 128> buf; | 1032 EmbeddedVector<char, 128> buf; |
1030 SNPrintF(buf, "PROPERTY - %s", prop_kind); | 1033 SNPrintF(buf, "PROPERTY - %s", prop_kind); |
1031 IndentedScope prop(this, buf.start()); | 1034 IndentedScope prop(this, buf.start()); |
1032 PrintIndentedVisit("KEY", properties->at(i)->key()); | 1035 PrintIndentedVisit("KEY", properties->at(i)->key()); |
1033 PrintIndentedVisit("VALUE", properties->at(i)->value()); | 1036 PrintIndentedVisit("VALUE", properties->at(i)->value()); |
1034 } | 1037 } |
1035 } | 1038 } |
1036 | 1039 |
1037 | 1040 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 | 1219 |
1217 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1220 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { |
1218 Visit(node->expression()); | 1221 Visit(node->expression()); |
1219 } | 1222 } |
1220 | 1223 |
1221 | 1224 |
1222 #endif // DEBUG | 1225 #endif // DEBUG |
1223 | 1226 |
1224 } // namespace internal | 1227 } // namespace internal |
1225 } // namespace v8 | 1228 } // namespace v8 |
OLD | NEW |