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

Side by Side Diff: src/prettyprinter.cc

Issue 332443002: Add support for computed property names in object literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Dynamic part of object literal initialized with PutOwnProperty Created 6 years, 6 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 | Annotate | Revision Log
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 <stdarg.h> 5 #include <stdarg.h>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/prettyprinter.h" 9 #include "src/prettyprinter.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 IndentedScope indent(this, "OBJ LITERAL"); 989 IndentedScope indent(this, "OBJ LITERAL");
990 for (int i = 0; i < node->properties()->length(); i++) { 990 for (int i = 0; i < node->properties()->length(); i++) {
991 const char* prop_kind = NULL; 991 const char* prop_kind = NULL;
992 switch (node->properties()->at(i)->kind()) { 992 switch (node->properties()->at(i)->kind()) {
993 case ObjectLiteral::Property::CONSTANT: 993 case ObjectLiteral::Property::CONSTANT:
994 prop_kind = "PROPERTY - CONSTANT"; 994 prop_kind = "PROPERTY - CONSTANT";
995 break; 995 break;
996 case ObjectLiteral::Property::COMPUTED: 996 case ObjectLiteral::Property::COMPUTED:
997 prop_kind = "PROPERTY - COMPUTED"; 997 prop_kind = "PROPERTY - COMPUTED";
998 break; 998 break;
999 case ObjectLiteral::Property::COMPUTED_NAME:
1000 prop_kind = "PROPERTY - COMPUTED_NAME";
1001 break;
999 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 1002 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
1000 prop_kind = "PROPERTY - MATERIALIZED_LITERAL"; 1003 prop_kind = "PROPERTY - MATERIALIZED_LITERAL";
1001 break; 1004 break;
1002 case ObjectLiteral::Property::PROTOTYPE: 1005 case ObjectLiteral::Property::PROTOTYPE:
1003 prop_kind = "PROPERTY - PROTOTYPE"; 1006 prop_kind = "PROPERTY - PROTOTYPE";
1004 break; 1007 break;
1005 case ObjectLiteral::Property::GETTER: 1008 case ObjectLiteral::Property::GETTER:
1006 prop_kind = "PROPERTY - GETTER"; 1009 prop_kind = "PROPERTY - GETTER";
1007 break; 1010 break;
1008 case ObjectLiteral::Property::SETTER: 1011 case ObjectLiteral::Property::SETTER:
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 } 1138 }
1136 1139
1137 1140
1138 void AstPrinter::VisitThisFunction(ThisFunction* node) { 1141 void AstPrinter::VisitThisFunction(ThisFunction* node) {
1139 IndentedScope indent(this, "THIS-FUNCTION"); 1142 IndentedScope indent(this, "THIS-FUNCTION");
1140 } 1143 }
1141 1144
1142 #endif // DEBUG 1145 #endif // DEBUG
1143 1146
1144 } } // namespace v8::internal 1147 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698