Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: runtime/vm/dart.cc

Issue 2976723003: Eliminate dependencies on assemblers and code stubs in precompiled runtime. (Closed)
Patch Set: Eliminate precompiled runtime flag Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/constant_propagator.cc ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
201 const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot); 201 const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot);
202 if (snapshot == NULL) { 202 if (snapshot == NULL) {
203 return strdup("Invalid vm isolate snapshot seen"); 203 return strdup("Invalid vm isolate snapshot seen");
204 } 204 }
205 vm_snapshot_kind_ = snapshot->kind(); 205 vm_snapshot_kind_ = snapshot->kind();
206 206
207 if (Snapshot::IncludesCode(vm_snapshot_kind_)) { 207 if (Snapshot::IncludesCode(vm_snapshot_kind_)) {
208 if (vm_snapshot_kind_ == Snapshot::kFullAOT) { 208 if (vm_snapshot_kind_ == Snapshot::kFullAOT) {
209 #if defined(DART_PRECOMPILED_RUNTIME) 209 #if defined(DART_PRECOMPILED_RUNTIME)
210 vm_isolate_->set_compilation_allowed(false); 210 vm_isolate_->set_compilation_allowed(false);
211 if (!FLAG_precompiled_runtime) {
212 return strdup("Flag --precompilation was not specified");
213 }
214 #else 211 #else
215 return strdup("JIT runtime cannot run a precompiled snapshot"); 212 return strdup("JIT runtime cannot run a precompiled snapshot");
216 #endif 213 #endif
217 } 214 }
218 if (instructions_snapshot == NULL) { 215 if (instructions_snapshot == NULL) {
219 return strdup("Missing instructions snapshot"); 216 return strdup("Missing instructions snapshot");
220 } 217 }
221 } else if (Snapshot::IsFull(vm_snapshot_kind_)) { 218 } else if (Snapshot::IsFull(vm_snapshot_kind_)) {
222 #if defined(DART_PRECOMPILED_RUNTIME) 219 #if defined(DART_PRECOMPILED_RUNTIME)
223 return strdup("Precompiled runtime requires a precompiled snapshot"); 220 return strdup("Precompiled runtime requires a precompiled snapshot");
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 return predefined_handles_->handles_.IsValidScopedHandle(address); 764 return predefined_handles_->handles_.IsValidScopedHandle(address);
768 } 765 }
769 766
770 767
771 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { 768 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
772 ASSERT(predefined_handles_ != NULL); 769 ASSERT(predefined_handles_ != NULL);
773 return predefined_handles_->api_handles_.IsValidHandle(handle); 770 return predefined_handles_->api_handles_.IsValidHandle(handle);
774 } 771 }
775 772
776 } // namespace dart 773 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/constant_propagator.cc ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698