| OLD | NEW | 
|---|
| 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/v8.h" | 5 #include "src/v8.h" | 
| 6 | 6 | 
| 7 #include "src/disasm.h" | 7 #include "src/disasm.h" | 
| 8 #include "src/disassembler.h" | 8 #include "src/disassembler.h" | 
| 9 #include "src/heap/objects-visiting.h" | 9 #include "src/heap/objects-visiting.h" | 
| 10 #include "src/jsregexp.h" | 10 #include "src/jsregexp.h" | 
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 588 } | 588 } | 
| 589 | 589 | 
| 590 | 590 | 
| 591 // This method is only meant to be called from gdb for debugging purposes. | 591 // This method is only meant to be called from gdb for debugging purposes. | 
| 592 // Since the string can also be in two-byte encoding, non-Latin1 characters | 592 // Since the string can also be in two-byte encoding, non-Latin1 characters | 
| 593 // will be ignored in the output. | 593 // will be ignored in the output. | 
| 594 char* String::ToAsciiArray() { | 594 char* String::ToAsciiArray() { | 
| 595   // Static so that subsequent calls frees previously allocated space. | 595   // Static so that subsequent calls frees previously allocated space. | 
| 596   // This also means that previous results will be overwritten. | 596   // This also means that previous results will be overwritten. | 
| 597   static char* buffer = NULL; | 597   static char* buffer = NULL; | 
| 598   if (buffer != NULL) free(buffer); | 598   if (buffer != NULL) delete [] buffer; | 
| 599   buffer = new char[length()+1]; | 599   buffer = new char[length()+1]; | 
| 600   WriteToFlat(this, reinterpret_cast<uint8_t*>(buffer), 0, length()); | 600   WriteToFlat(this, reinterpret_cast<uint8_t*>(buffer), 0, length()); | 
| 601   buffer[length()] = 0; | 601   buffer[length()] = 0; | 
| 602   return buffer; | 602   return buffer; | 
| 603 } | 603 } | 
| 604 | 604 | 
| 605 | 605 | 
| 606 static const char* const weekdays[] = { | 606 static const char* const weekdays[] = { | 
| 607   "???", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" | 607   "???", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" | 
| 608 }; | 608 }; | 
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1122     } | 1122     } | 
| 1123     os << " -> " << Brief(GetTarget(i)) << "\n"; | 1123     os << " -> " << Brief(GetTarget(i)) << "\n"; | 
| 1124   } | 1124   } | 
| 1125 } | 1125 } | 
| 1126 | 1126 | 
| 1127 | 1127 | 
| 1128 #endif  // OBJECT_PRINT | 1128 #endif  // OBJECT_PRINT | 
| 1129 | 1129 | 
| 1130 | 1130 | 
| 1131 } }  // namespace v8::internal | 1131 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|