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

Side by Side Diff: src/ast/prettyprinter.cc

Issue 2315733003: Class fields, part 1 (parsing and infrastructure) (Closed)
Patch Set: whitespace Created 4 years, 3 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/ast.h ('k') | src/ast/scopes.h » ('j') | 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/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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 switch (property->kind()) { 908 switch (property->kind()) {
909 case ClassLiteral::Property::METHOD: 909 case ClassLiteral::Property::METHOD:
910 prop_kind = "METHOD"; 910 prop_kind = "METHOD";
911 break; 911 break;
912 case ClassLiteral::Property::GETTER: 912 case ClassLiteral::Property::GETTER:
913 prop_kind = "GETTER"; 913 prop_kind = "GETTER";
914 break; 914 break;
915 case ClassLiteral::Property::SETTER: 915 case ClassLiteral::Property::SETTER:
916 prop_kind = "SETTER"; 916 prop_kind = "SETTER";
917 break; 917 break;
918 case ClassLiteral::Property::FIELD:
919 prop_kind = "FIELD";
920 break;
918 } 921 }
919 EmbeddedVector<char, 128> buf; 922 EmbeddedVector<char, 128> buf;
920 SNPrintF(buf, "PROPERTY%s - %s", property->is_static() ? " - STATIC" : "", 923 SNPrintF(buf, "PROPERTY%s - %s", property->is_static() ? " - STATIC" : "",
921 prop_kind); 924 prop_kind);
922 IndentedScope prop(this, buf.start()); 925 IndentedScope prop(this, buf.start());
923 PrintIndentedVisit("KEY", properties->at(i)->key()); 926 PrintIndentedVisit("KEY", properties->at(i)->key());
924 PrintIndentedVisit("VALUE", properties->at(i)->value()); 927 PrintIndentedVisit("VALUE", properties->at(i)->value());
925 } 928 }
926 } 929 }
927 930
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 1186
1184 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { 1187 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) {
1185 Visit(node->expression()); 1188 Visit(node->expression());
1186 } 1189 }
1187 1190
1188 1191
1189 #endif // DEBUG 1192 #endif // DEBUG
1190 1193
1191 } // namespace internal 1194 } // namespace internal
1192 } // namespace v8 1195 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/ast/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698