| 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/dart.h" | 5 #include "vm/dart.h" |
| 6 | 6 |
| 7 #include "vm/dart_api_state.h" | 7 #include "vm/dart_api_state.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/freelist.h" | 9 #include "vm/freelist.h" |
| 10 #include "vm/handles.h" | 10 #include "vm/handles.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 139 } |
| 140 } else { | 140 } else { |
| 141 // Initialize from snapshot (this should replicate the functionality | 141 // Initialize from snapshot (this should replicate the functionality |
| 142 // of Object::Init(..) in a regular isolate creation path. | 142 // of Object::Init(..) in a regular isolate creation path. |
| 143 Object::InitFromSnapshot(isolate); | 143 Object::InitFromSnapshot(isolate); |
| 144 | 144 |
| 145 // TODO(turnidge): Remove once length is not part of the snapshot. | 145 // TODO(turnidge): Remove once length is not part of the snapshot. |
| 146 const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer); | 146 const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer); |
| 147 ASSERT(snapshot->kind() == Snapshot::kFull); | 147 ASSERT(snapshot->kind() == Snapshot::kFull); |
| 148 if (FLAG_trace_isolates) { | 148 if (FLAG_trace_isolates) { |
| 149 OS::Print("Size of isolate snapshot = %ld\n", snapshot->length()); | 149 OS::Print("Size of isolate snapshot = %d\n", snapshot->length()); |
| 150 } | 150 } |
| 151 SnapshotReader reader(snapshot->content(), snapshot->length(), | 151 SnapshotReader reader(snapshot->content(), snapshot->length(), |
| 152 Snapshot::kFull, isolate); | 152 Snapshot::kFull, isolate); |
| 153 reader.ReadFullSnapshot(); | 153 reader.ReadFullSnapshot(); |
| 154 if (FLAG_trace_isolates) { | 154 if (FLAG_trace_isolates) { |
| 155 isolate->heap()->PrintSizes(); | 155 isolate->heap()->PrintSizes(); |
| 156 } | 156 } |
| 157 if (FLAG_print_bootstrap) { | 157 if (FLAG_print_bootstrap) { |
| 158 PrintLibrarySources(isolate); | 158 PrintLibrarySources(isolate); |
| 159 } | 159 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 175 isolate->Shutdown(); | 175 isolate->Shutdown(); |
| 176 delete isolate; | 176 delete isolate; |
| 177 | 177 |
| 178 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); | 178 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); |
| 179 if (callback != NULL) { | 179 if (callback != NULL) { |
| 180 (callback)(callback_data); | 180 (callback)(callback_data); |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 | 183 |
| 184 } // namespace dart | 184 } // namespace dart |
| OLD | NEW |