| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/snapshot.h" | 5 #include "vm/snapshot.h" |
| 6 | 6 |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "vm/bootstrap.h" | 8 #include "vm/bootstrap.h" |
| 9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
| 10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 ASSERT(Utils::IsAligned(end, sizeof(uint64_t))); | 865 ASSERT(Utils::IsAligned(end, sizeof(uint64_t))); |
| 866 | 866 |
| 867 for (uword* cursor = reinterpret_cast<uword*>(entry); | 867 for (uword* cursor = reinterpret_cast<uword*>(entry); |
| 868 cursor < reinterpret_cast<uword*>(end); cursor++) { | 868 cursor < reinterpret_cast<uword*>(end); cursor++) { |
| 869 WriteWordLiteralText(*cursor); | 869 WriteWordLiteralText(*cursor); |
| 870 } | 870 } |
| 871 } | 871 } |
| 872 } | 872 } |
| 873 | 873 |
| 874 | 874 |
| 875 #if defined(TARGET_OS_LINUX) | 875 #if defined(HOST_OS_LINUX) |
| 876 assembly_stream_.Print(".section .rodata\n"); | 876 assembly_stream_.Print(".section .rodata\n"); |
| 877 #elif defined(TARGET_OS_MACOS) | 877 #elif defined(HOST_OS_MACOS) |
| 878 assembly_stream_.Print(".const\n"); | 878 assembly_stream_.Print(".const\n"); |
| 879 #else | 879 #else |
| 880 // Unsupported platform. | 880 // Unsupported platform. |
| 881 UNREACHABLE(); | 881 UNREACHABLE(); |
| 882 #endif | 882 #endif |
| 883 | 883 |
| 884 const char* data_symbol = | 884 const char* data_symbol = |
| 885 vm ? "_kDartVmSnapshotData" : "_kDartIsolateSnapshotData"; | 885 vm ? "_kDartVmSnapshotData" : "_kDartIsolateSnapshotData"; |
| 886 assembly_stream_.Print(".globl %s\n", data_symbol); | 886 assembly_stream_.Print(".globl %s\n", data_symbol); |
| 887 assembly_stream_.Print(".balign %" Pd ", 0\n", | 887 assembly_stream_.Print(".balign %" Pd ", 0\n", |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1939 *buffer_len_ = BytesWritten(); | 1939 *buffer_len_ = BytesWritten(); |
| 1940 } | 1940 } |
| 1941 } else { | 1941 } else { |
| 1942 FreeBuffer(); | 1942 FreeBuffer(); |
| 1943 ThrowException(exception_type(), exception_msg()); | 1943 ThrowException(exception_type(), exception_msg()); |
| 1944 } | 1944 } |
| 1945 } | 1945 } |
| 1946 | 1946 |
| 1947 | 1947 |
| 1948 } // namespace dart | 1948 } // namespace dart |
| OLD | NEW |