| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2018 #endif // !OBJECT_PRINT | 2018 #endif // !OBJECT_PRINT |
| 2019 PrintF(f, "\n"); | 2019 PrintF(f, "\n"); |
| 2020 Flush(f); | 2020 Flush(f); |
| 2021 fclose(f); | 2021 fclose(f); |
| 2022 | 2022 |
| 2023 // Create a string from the temp_file. | 2023 // Create a string from the temp_file. |
| 2024 // Note: the mmapped resource will take care of closing the file. | 2024 // Note: the mmapped resource will take care of closing the file. |
| 2025 MemoryMappedExternalResource* resource = | 2025 MemoryMappedExternalResource* resource = |
| 2026 new MemoryMappedExternalResource(temp_filename.start(), true); | 2026 new MemoryMappedExternalResource(temp_filename.start(), true); |
| 2027 if (resource->exists() && !resource->is_empty()) { | 2027 if (resource->exists() && !resource->is_empty()) { |
| 2028 ASSERT(resource->IsAscii()); | |
| 2029 Handle<String> dump_string = | 2028 Handle<String> dump_string = |
| 2030 factory->NewExternalStringFromAscii(resource); | 2029 factory->NewExternalStringFromAscii(resource); |
| 2031 heap->external_string_table()->AddString(*dump_string); | 2030 heap->external_string_table()->AddString(*dump_string); |
| 2032 return *dump_string; | 2031 return *dump_string; |
| 2033 } else { | 2032 } else { |
| 2034 delete resource; | 2033 delete resource; |
| 2035 } | 2034 } |
| 2036 return HEAP->undefined_value(); | 2035 return HEAP->undefined_value(); |
| 2037 } | 2036 } |
| 2038 | 2037 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2225 fclose(f); | 2224 fclose(f); |
| 2226 | 2225 |
| 2227 // Restore the previous verbosity. | 2226 // Restore the previous verbosity. |
| 2228 FLAG_use_verbose_printer = prev_verbosity; | 2227 FLAG_use_verbose_printer = prev_verbosity; |
| 2229 | 2228 |
| 2230 // Create a string from the temp_file. | 2229 // Create a string from the temp_file. |
| 2231 // Note: the mmapped resource will take care of closing the file. | 2230 // Note: the mmapped resource will take care of closing the file. |
| 2232 MemoryMappedExternalResource* resource = | 2231 MemoryMappedExternalResource* resource = |
| 2233 new MemoryMappedExternalResource(temp_filename.start(), true); | 2232 new MemoryMappedExternalResource(temp_filename.start(), true); |
| 2234 if (resource->exists() && !resource->is_empty()) { | 2233 if (resource->exists() && !resource->is_empty()) { |
| 2235 ASSERT(resource->IsAscii()); | |
| 2236 Handle<String> path_string = | 2234 Handle<String> path_string = |
| 2237 factory->NewExternalStringFromAscii(resource); | 2235 factory->NewExternalStringFromAscii(resource); |
| 2238 heap->external_string_table()->AddString(*path_string); | 2236 heap->external_string_table()->AddString(*path_string); |
| 2239 return *path_string; | 2237 return *path_string; |
| 2240 } else { | 2238 } else { |
| 2241 delete resource; | 2239 delete resource; |
| 2242 } | 2240 } |
| 2243 return heap->undefined_value(); | 2241 return heap->undefined_value(); |
| 2244 } | 2242 } |
| 2245 | 2243 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2622 i++, heap_obj, Heap::new_space()->FromSpaceStart()); | 2620 i++, heap_obj, Heap::new_space()->FromSpaceStart()); |
| 2623 } | 2621 } |
| 2624 } | 2622 } |
| 2625 } | 2623 } |
| 2626 #endif // VERIFY_LOL | 2624 #endif // VERIFY_LOL |
| 2627 | 2625 |
| 2628 | 2626 |
| 2629 } } // namespace v8::internal | 2627 } } // namespace v8::internal |
| 2630 | 2628 |
| 2631 #endif // LIVE_OBJECT_LIST | 2629 #endif // LIVE_OBJECT_LIST |
| OLD | NEW |