| 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/dart.h" | 5 #include "vm/dart.h" |
| 6 | 6 |
| 7 #include "vm/code_observers.h" | 7 #include "vm/code_observers.h" |
| 8 #include "vm/cpu.h" | 8 #include "vm/cpu.h" |
| 9 #include "vm/dart_api_state.h" | 9 #include "vm/dart_api_state.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 Object::InitOnce(vm_isolate_); | 200 Object::InitOnce(vm_isolate_); |
| 201 ArgumentsDescriptor::InitOnce(); | 201 ArgumentsDescriptor::InitOnce(); |
| 202 ICData::InitOnce(); | 202 ICData::InitOnce(); |
| 203 // When precompiled the stub code is initialized from the snapshot. | 203 // When precompiled the stub code is initialized from the snapshot. |
| 204 if (!precompiled) { | 204 if (!precompiled) { |
| 205 StubCode::InitOnce(); | 205 StubCode::InitOnce(); |
| 206 } | 206 } |
| 207 if (vm_isolate_snapshot != NULL) { | 207 if (vm_isolate_snapshot != NULL) { |
| 208 NOT_IN_PRODUCT(TimelineDurationScope tds(Timeline::GetVMStream(), | 208 NOT_IN_PRODUCT(TimelineDurationScope tds(Timeline::GetVMStream(), |
| 209 "VMIsolateSnapshot")); | 209 "VMIsolateSnapshot")); |
| 210 if (instructions_snapshot != NULL) { |
| 211 vm_isolate_->SetupInstructionsSnapshotPage(instructions_snapshot); |
| 212 } |
| 210 if (data_snapshot != NULL) { | 213 if (data_snapshot != NULL) { |
| 211 vm_isolate_->SetupDataSnapshotPage(data_snapshot); | 214 vm_isolate_->SetupDataSnapshotPage(data_snapshot); |
| 212 } | 215 } |
| 213 const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot); | 216 const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot); |
| 214 if (snapshot == NULL) { | 217 if (snapshot == NULL) { |
| 215 return "Invalid vm isolate snapshot seen."; | 218 return "Invalid vm isolate snapshot seen."; |
| 216 } | 219 } |
| 217 ASSERT(Snapshot::IsFull(snapshot->kind())); | 220 ASSERT(Snapshot::IsFull(snapshot->kind())); |
| 218 VmIsolateSnapshotReader reader(snapshot->kind(), | 221 VmIsolateSnapshotReader reader(snapshot->kind(), |
| 219 snapshot->content(), | 222 snapshot->content(), |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 return predefined_handles_->handles_.IsValidScopedHandle(address); | 633 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 631 } | 634 } |
| 632 | 635 |
| 633 | 636 |
| 634 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 637 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
| 635 ASSERT(predefined_handles_ != NULL); | 638 ASSERT(predefined_handles_ != NULL); |
| 636 return predefined_handles_->api_handles_.IsValidHandle(handle); | 639 return predefined_handles_->api_handles_.IsValidHandle(handle); |
| 637 } | 640 } |
| 638 | 641 |
| 639 } // namespace dart | 642 } // namespace dart |
| OLD | NEW |