| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 ASSERT(vm_isolate_ == Isolate::Current()); | 135 ASSERT(vm_isolate_ == Isolate::Current()); |
| 136 ASSERT(vm_isolate_ == Thread::Current()->isolate()); | 136 ASSERT(vm_isolate_ == Thread::Current()->isolate()); |
| 137 | 137 |
| 138 StackZone zone(T); | 138 StackZone zone(T); |
| 139 HandleScope handle_scope(T); | 139 HandleScope handle_scope(T); |
| 140 Object::InitNull(vm_isolate_); | 140 Object::InitNull(vm_isolate_); |
| 141 ObjectStore::Init(vm_isolate_); | 141 ObjectStore::Init(vm_isolate_); |
| 142 TargetCPUFeatures::InitOnce(); | 142 TargetCPUFeatures::InitOnce(); |
| 143 Object::InitOnce(vm_isolate_); | 143 Object::InitOnce(vm_isolate_); |
| 144 ArgumentsDescriptor::InitOnce(); | 144 ArgumentsDescriptor::InitOnce(); |
| 145 ICData::InitOnce(); |
| 145 // When precompiled the stub code is initialized from the snapshot. | 146 // When precompiled the stub code is initialized from the snapshot. |
| 146 if (!precompiled) { | 147 if (!precompiled) { |
| 147 StubCode::InitOnce(); | 148 StubCode::InitOnce(); |
| 148 } | 149 } |
| 149 if (vm_isolate_snapshot != NULL) { | 150 if (vm_isolate_snapshot != NULL) { |
| 150 if (instructions_snapshot != NULL) { | 151 if (instructions_snapshot != NULL) { |
| 151 vm_isolate_->SetupInstructionsSnapshotPage(instructions_snapshot); | 152 vm_isolate_->SetupInstructionsSnapshotPage(instructions_snapshot); |
| 152 } | 153 } |
| 153 const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot); | 154 const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot); |
| 154 if (snapshot == NULL) { | 155 if (snapshot == NULL) { |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 return predefined_handles_->handles_.IsValidScopedHandle(address); | 424 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 424 } | 425 } |
| 425 | 426 |
| 426 | 427 |
| 427 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 428 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
| 428 ASSERT(predefined_handles_ != NULL); | 429 ASSERT(predefined_handles_ != NULL); |
| 429 return predefined_handles_->api_handles_.IsValidHandle(handle); | 430 return predefined_handles_->api_handles_.IsValidHandle(handle); |
| 430 } | 431 } |
| 431 | 432 |
| 432 } // namespace dart | 433 } // namespace dart |
| OLD | NEW |