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

Side by Side Diff: src/objects-printer.cc

Issue 11827023: Fix objectprint=on build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 696
697 // This method is only meant to be called from gdb for debugging purposes. 697 // This method is only meant to be called from gdb for debugging purposes.
698 // Since the string can also be in two-byte encoding, non-ASCII characters 698 // Since the string can also be in two-byte encoding, non-ASCII characters
699 // will be ignored in the output. 699 // will be ignored in the output.
700 char* String::ToAsciiArray() { 700 char* String::ToAsciiArray() {
701 // Static so that subsequent calls frees previously allocated space. 701 // Static so that subsequent calls frees previously allocated space.
702 // This also means that previous results will be overwritten. 702 // This also means that previous results will be overwritten.
703 static char* buffer = NULL; 703 static char* buffer = NULL;
704 if (buffer != NULL) free(buffer); 704 if (buffer != NULL) free(buffer);
705 buffer = new char[length()+1]; 705 buffer = new char[length()+1];
706 WriteToFlat(this, buffer, 0, length()); 706 WriteToFlat(this, reinterpret_cast<uint8_t*>(buffer), 0, length());
707 buffer[length()] = 0; 707 buffer[length()] = 0;
708 return buffer; 708 return buffer;
709 } 709 }
710 710
711 711
712 static const char* const weekdays[] = { 712 static const char* const weekdays[] = {
713 "???", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" 713 "???", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
714 }; 714 };
715 715
716 void JSDate::JSDatePrint(FILE* out) { 716 void JSDate::JSDatePrint(FILE* out) {
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 } 1115 }
1116 } 1116 }
1117 PrintF(out, "\n"); 1117 PrintF(out, "\n");
1118 } 1118 }
1119 1119
1120 1120
1121 #endif // OBJECT_PRINT 1121 #endif // OBJECT_PRINT
1122 1122
1123 1123
1124 } } // namespace v8::internal 1124 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698