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

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

Issue 1808553002: Precompilation: don't include an object header for instructions in the text section. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | runtime/vm/isolate.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/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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 ObjectStore::Init(vm_isolate_); 157 ObjectStore::Init(vm_isolate_);
158 TargetCPUFeatures::InitOnce(); 158 TargetCPUFeatures::InitOnce();
159 Object::InitOnce(vm_isolate_); 159 Object::InitOnce(vm_isolate_);
160 ArgumentsDescriptor::InitOnce(); 160 ArgumentsDescriptor::InitOnce();
161 ICData::InitOnce(); 161 ICData::InitOnce();
162 // When precompiled the stub code is initialized from the snapshot. 162 // When precompiled the stub code is initialized from the snapshot.
163 if (!precompiled) { 163 if (!precompiled) {
164 StubCode::InitOnce(); 164 StubCode::InitOnce();
165 } 165 }
166 if (vm_isolate_snapshot != NULL) { 166 if (vm_isolate_snapshot != NULL) {
167 if (instructions_snapshot != NULL) { 167 if (data_snapshot != NULL) {
168 vm_isolate_->SetupInstructionsSnapshotPage(instructions_snapshot);
169 ASSERT(data_snapshot != NULL);
170 vm_isolate_->SetupDataSnapshotPage(data_snapshot); 168 vm_isolate_->SetupDataSnapshotPage(data_snapshot);
171 } 169 }
172 const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot); 170 const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot);
173 if (snapshot == NULL) { 171 if (snapshot == NULL) {
174 return "Invalid vm isolate snapshot seen."; 172 return "Invalid vm isolate snapshot seen.";
175 } 173 }
176 ASSERT(snapshot->kind() == Snapshot::kFull); 174 ASSERT(snapshot->kind() == Snapshot::kFull);
177 VmIsolateSnapshotReader reader(snapshot->content(), 175 VmIsolateSnapshotReader reader(snapshot->content(),
178 snapshot->length(), 176 snapshot->length(),
179 instructions_snapshot, 177 instructions_snapshot,
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 return predefined_handles_->handles_.IsValidScopedHandle(address); 568 return predefined_handles_->handles_.IsValidScopedHandle(address);
571 } 569 }
572 570
573 571
574 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { 572 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
575 ASSERT(predefined_handles_ != NULL); 573 ASSERT(predefined_handles_ != NULL);
576 return predefined_handles_->api_handles_.IsValidHandle(handle); 574 return predefined_handles_->api_handles_.IsValidHandle(handle);
577 } 575 }
578 576
579 } // namespace dart 577 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698