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 17066009: Preallocate objects in Dart::InitializeIsolate not in Api::CheckIsolateState (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('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/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 } 187 }
188 188
189 if (FLAG_heap_profile_initialize) { 189 if (FLAG_heap_profile_initialize) {
190 isolate->heap()->ProfileToFile("initialize"); 190 isolate->heap()->ProfileToFile("initialize");
191 } 191 }
192 192
193 Object::VerifyBuiltinVtables(); 193 Object::VerifyBuiltinVtables();
194 194
195 StubCode::Init(isolate); 195 StubCode::Init(isolate);
196 if (snapshot_buffer == NULL) {
197 if (!isolate->object_store()->PreallocateObjects()) {
198 return isolate->object_store()->sticky_error();
199 }
200 }
196 isolate->megamorphic_cache_table()->InitMissHandler(); 201 isolate->megamorphic_cache_table()->InitMissHandler();
197 202
198 isolate->heap()->EnableGrowthControl(); 203 isolate->heap()->EnableGrowthControl();
199 isolate->set_init_callback_data(data); 204 isolate->set_init_callback_data(data);
200 Api::SetupAcquiredError(isolate); 205 Api::SetupAcquiredError(isolate);
201 if (FLAG_print_class_table) { 206 if (FLAG_print_class_table) {
202 isolate->class_table()->Print(); 207 isolate->class_table()->Print();
203 } 208 }
204 return Error::null(); 209 return Error::null();
205 } 210 }
(...skipping 18 matching lines...) Expand all
224 return predefined_handles_->handles_.AllocateScopedHandle(); 229 return predefined_handles_->handles_.AllocateScopedHandle();
225 } 230 }
226 231
227 232
228 bool Dart::IsReadOnlyHandle(uword address) { 233 bool Dart::IsReadOnlyHandle(uword address) {
229 ASSERT(predefined_handles_ != NULL); 234 ASSERT(predefined_handles_ != NULL);
230 return predefined_handles_->handles_.IsValidScopedHandle(address); 235 return predefined_handles_->handles_.IsValidScopedHandle(address);
231 } 236 }
232 237
233 } // namespace dart 238 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698