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

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

Issue 1410573006: Cache initial (empty) ic_data arrays so that they are not repeatedly allocated. Factor out descript… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: address comment Created 5 years, 1 month 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/object.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698