OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/text_buffer.h" | 10 #include "platform/text_buffer.h" |
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 result->LowLevelShutdown(); | 927 result->LowLevelShutdown(); |
928 Thread::ExitIsolate(); | 928 Thread::ExitIsolate(); |
929 delete result; | 929 delete result; |
930 return NULL; | 930 return NULL; |
931 } | 931 } |
932 | 932 |
933 return result; | 933 return result; |
934 } | 934 } |
935 | 935 |
936 | 936 |
| 937 void Isolate::SetupInstructionsSnapshotPage( |
| 938 const uint8_t* instructions_snapshot_buffer) { |
| 939 InstructionsSnapshot snapshot(instructions_snapshot_buffer); |
| 940 #if defined(DEBUG) |
| 941 if (FLAG_trace_isolates) { |
| 942 OS::Print("Precompiled instructions are at [0x%" Px ", 0x%" Px ")\n", |
| 943 reinterpret_cast<uword>(snapshot.instructions_start()), |
| 944 reinterpret_cast<uword>(snapshot.instructions_start()) + |
| 945 snapshot.instructions_size()); |
| 946 } |
| 947 #endif |
| 948 heap_->SetupExternalPage(snapshot.instructions_start(), |
| 949 snapshot.instructions_size(), |
| 950 /* is_executable = */ true); |
| 951 } |
| 952 |
| 953 |
937 void Isolate::SetupDataSnapshotPage(const uint8_t* data_snapshot_buffer) { | 954 void Isolate::SetupDataSnapshotPage(const uint8_t* data_snapshot_buffer) { |
938 DataSnapshot snapshot(data_snapshot_buffer); | 955 DataSnapshot snapshot(data_snapshot_buffer); |
939 #if defined(DEBUG) | 956 #if defined(DEBUG) |
940 if (FLAG_trace_isolates) { | 957 if (FLAG_trace_isolates) { |
941 OS::Print("Precompiled rodata are at [0x%" Px ", 0x%" Px ")\n", | 958 OS::Print("Precompiled rodata are at [0x%" Px ", 0x%" Px ")\n", |
942 reinterpret_cast<uword>(snapshot.data_start()), | 959 reinterpret_cast<uword>(snapshot.data_start()), |
943 reinterpret_cast<uword>(snapshot.data_start()) + | 960 reinterpret_cast<uword>(snapshot.data_start()) + |
944 snapshot.data_size()); | 961 snapshot.data_size()); |
945 } | 962 } |
946 #endif | 963 #endif |
(...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2699 void IsolateSpawnState::DecrementSpawnCount() { | 2716 void IsolateSpawnState::DecrementSpawnCount() { |
2700 ASSERT(spawn_count_monitor_ != NULL); | 2717 ASSERT(spawn_count_monitor_ != NULL); |
2701 ASSERT(spawn_count_ != NULL); | 2718 ASSERT(spawn_count_ != NULL); |
2702 MonitorLocker ml(spawn_count_monitor_); | 2719 MonitorLocker ml(spawn_count_monitor_); |
2703 ASSERT(*spawn_count_ > 0); | 2720 ASSERT(*spawn_count_ > 0); |
2704 *spawn_count_ = *spawn_count_ - 1; | 2721 *spawn_count_ = *spawn_count_ - 1; |
2705 ml.Notify(); | 2722 ml.Notify(); |
2706 } | 2723 } |
2707 | 2724 |
2708 } // namespace dart | 2725 } // namespace dart |
OLD | NEW |