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

Side by Side Diff: src/prettyprinter.cc

Issue 45010: Remove all uses of StringShape variables, since that has proven... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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/parser.cc ('k') | src/regexp-macro-assembler-ia32.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 Visit(arguments->at(i)); 510 Visit(arguments->at(i));
511 } 511 }
512 Print(")"); 512 Print(")");
513 } 513 }
514 514
515 515
516 void PrettyPrinter::PrintLiteral(Handle<Object> value, bool quote) { 516 void PrettyPrinter::PrintLiteral(Handle<Object> value, bool quote) {
517 Object* object = *value; 517 Object* object = *value;
518 if (object->IsString()) { 518 if (object->IsString()) {
519 String* string = String::cast(object); 519 String* string = String::cast(object);
520 StringShape shape(string);
521 if (quote) Print("\""); 520 if (quote) Print("\"");
522 for (int i = 0; i < string->length(shape); i++) { 521 for (int i = 0; i < string->length(); i++) {
523 Print("%c", string->Get(shape, i)); 522 Print("%c", string->Get(i));
524 } 523 }
525 if (quote) Print("\""); 524 if (quote) Print("\"");
526 } else if (object == Heap::null_value()) { 525 } else if (object == Heap::null_value()) {
527 Print("null"); 526 Print("null");
528 } else if (object == Heap::true_value()) { 527 } else if (object == Heap::true_value()) {
529 Print("true"); 528 Print("true");
530 } else if (object == Heap::false_value()) { 529 } else if (object == Heap::false_value()) {
531 Print("false"); 530 Print("false");
532 } else if (object == Heap::undefined_value()) { 531 } else if (object == Heap::undefined_value()) {
533 Print("undefined"); 532 Print("undefined");
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 1091
1093 void AstPrinter::VisitThisFunction(ThisFunction* node) { 1092 void AstPrinter::VisitThisFunction(ThisFunction* node) {
1094 IndentedScope indent("THIS-FUNCTION"); 1093 IndentedScope indent("THIS-FUNCTION");
1095 } 1094 }
1096 1095
1097 1096
1098 1097
1099 #endif // DEBUG 1098 #endif // DEBUG
1100 1099
1101 } } // namespace v8::internal 1100 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/regexp-macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698