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

Side by Side Diff: src/prettyprinter.cc

Issue 12210083: Renamed "symbols" to "internalized strings" throughout the code base, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Yang's comments Created 7 years, 10 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
« no previous file with comments | « src/preparse-data.cc ('k') | src/profile-generator.cc » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 void PrettyPrinter::VisitThrow(Throw* node) { 356 void PrettyPrinter::VisitThrow(Throw* node) {
357 Print("throw "); 357 Print("throw ");
358 Visit(node->exception()); 358 Visit(node->exception());
359 } 359 }
360 360
361 361
362 void PrettyPrinter::VisitProperty(Property* node) { 362 void PrettyPrinter::VisitProperty(Property* node) {
363 Expression* key = node->key(); 363 Expression* key = node->key();
364 Literal* literal = key->AsLiteral(); 364 Literal* literal = key->AsLiteral();
365 if (literal != NULL && literal->handle()->IsSymbol()) { 365 if (literal != NULL && literal->handle()->IsInternalizedString()) {
366 Print("("); 366 Print("(");
367 Visit(node->obj()); 367 Visit(node->obj());
368 Print(")."); 368 Print(").");
369 PrintLiteral(literal->handle(), false); 369 PrintLiteral(literal->handle(), false);
370 } else { 370 } else {
371 Visit(node->obj()); 371 Visit(node->obj());
372 Print("["); 372 Print("[");
373 Visit(key); 373 Visit(key);
374 Print("]"); 374 Print("]");
375 } 375 }
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 1061
1062 void AstPrinter::VisitThrow(Throw* node) { 1062 void AstPrinter::VisitThrow(Throw* node) {
1063 PrintIndentedVisit("THROW", node->exception()); 1063 PrintIndentedVisit("THROW", node->exception());
1064 } 1064 }
1065 1065
1066 1066
1067 void AstPrinter::VisitProperty(Property* node) { 1067 void AstPrinter::VisitProperty(Property* node) {
1068 IndentedScope indent(this, "PROPERTY", node); 1068 IndentedScope indent(this, "PROPERTY", node);
1069 Visit(node->obj()); 1069 Visit(node->obj());
1070 Literal* literal = node->key()->AsLiteral(); 1070 Literal* literal = node->key()->AsLiteral();
1071 if (literal != NULL && literal->handle()->IsSymbol()) { 1071 if (literal != NULL && literal->handle()->IsInternalizedString()) {
1072 PrintLiteralIndented("NAME", literal->handle(), false); 1072 PrintLiteralIndented("NAME", literal->handle(), false);
1073 } else { 1073 } else {
1074 PrintIndentedVisit("KEY", node->key()); 1074 PrintIndentedVisit("KEY", node->key());
1075 } 1075 }
1076 } 1076 }
1077 1077
1078 1078
1079 void AstPrinter::VisitCall(Call* node) { 1079 void AstPrinter::VisitCall(Call* node) {
1080 IndentedScope indent(this, "CALL"); 1080 IndentedScope indent(this, "CALL");
1081 Visit(node->expression()); 1081 Visit(node->expression());
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 } 1124 }
1125 1125
1126 1126
1127 void AstPrinter::VisitThisFunction(ThisFunction* node) { 1127 void AstPrinter::VisitThisFunction(ThisFunction* node) {
1128 IndentedScope indent(this, "THIS-FUNCTION"); 1128 IndentedScope indent(this, "THIS-FUNCTION");
1129 } 1129 }
1130 1130
1131 #endif // DEBUG 1131 #endif // DEBUG
1132 1132
1133 } } // namespace v8::internal 1133 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/preparse-data.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698