| 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/become.h" | 7 #include "vm/become.h" |
| 8 #include "vm/clustered_snapshot.h" | 8 #include "vm/clustered_snapshot.h" |
| 9 #include "vm/code_observers.h" | 9 #include "vm/code_observers.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 if (vm_isolate_snapshot != NULL) { | 201 if (vm_isolate_snapshot != NULL) { |
| 202 NOT_IN_PRODUCT(TimelineDurationScope tds(Timeline::GetVMStream(), | 202 NOT_IN_PRODUCT(TimelineDurationScope tds(Timeline::GetVMStream(), |
| 203 "VMIsolateSnapshot")); | 203 "VMIsolateSnapshot")); |
| 204 const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot); | 204 const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot); |
| 205 if (snapshot == NULL) { | 205 if (snapshot == NULL) { |
| 206 return strdup("Invalid vm isolate snapshot seen"); | 206 return strdup("Invalid vm isolate snapshot seen"); |
| 207 } | 207 } |
| 208 snapshot_kind_ = snapshot->kind(); | 208 snapshot_kind_ = snapshot->kind(); |
| 209 | 209 |
| 210 if (Snapshot::IncludesCode(snapshot_kind_)) { | 210 if (Snapshot::IncludesCode(snapshot_kind_)) { |
| 211 if (snapshot_kind_ == Snapshot::kAppNoJIT) { | 211 if (snapshot_kind_ == Snapshot::kAppAOT) { |
| 212 #if defined(DART_PRECOMPILED_RUNTIME) | 212 #if defined(DART_PRECOMPILED_RUNTIME) |
| 213 vm_isolate_->set_compilation_allowed(false); | 213 vm_isolate_->set_compilation_allowed(false); |
| 214 if (!FLAG_precompiled_runtime) { | 214 if (!FLAG_precompiled_runtime) { |
| 215 return strdup("Flag --precompilation was not specified"); | 215 return strdup("Flag --precompilation was not specified"); |
| 216 } | 216 } |
| 217 #else | 217 #else |
| 218 return strdup("JIT runtime cannot run a precompiled snapshot"); | 218 return strdup("JIT runtime cannot run a precompiled snapshot"); |
| 219 #endif | 219 #endif |
| 220 } | 220 } |
| 221 if (instructions_snapshot == NULL) { | 221 if (instructions_snapshot == NULL) { |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 return predefined_handles_->handles_.IsValidScopedHandle(address); | 737 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 738 } | 738 } |
| 739 | 739 |
| 740 | 740 |
| 741 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 741 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
| 742 ASSERT(predefined_handles_ != NULL); | 742 ASSERT(predefined_handles_ != NULL); |
| 743 return predefined_handles_->api_handles_.IsValidHandle(handle); | 743 return predefined_handles_->api_handles_.IsValidHandle(handle); |
| 744 } | 744 } |
| 745 | 745 |
| 746 } // namespace dart | 746 } // namespace dart |
| OLD | NEW |