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

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

Issue 1190973003: Fix crash with --noopt and no_snapshot: initialize megamorphic cache table before first code is run. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/object.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/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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 // Populate the isolate's symbol table with all symbols from the 292 // Populate the isolate's symbol table with all symbols from the
293 // VM isolate. We do this so that when we generate a full snapshot 293 // VM isolate. We do this so that when we generate a full snapshot
294 // for the isolate we have a unified symbol table that we can then 294 // for the isolate we have a unified symbol table that we can then
295 // read into the VM isolate. 295 // read into the VM isolate.
296 Symbols::AddPredefinedSymbolsToIsolate(); 296 Symbols::AddPredefinedSymbolsToIsolate();
297 } 297 }
298 298
299 Object::VerifyBuiltinVtables(); 299 Object::VerifyBuiltinVtables();
300 300
301 StubCode::Init(isolate); 301 StubCode::Init(isolate);
302 isolate->megamorphic_cache_table()->InitMissHandler();
302 if (snapshot_buffer == NULL) { 303 if (snapshot_buffer == NULL) {
303 if (!isolate->object_store()->PreallocateObjects()) { 304 if (!isolate->object_store()->PreallocateObjects()) {
304 return isolate->object_store()->sticky_error(); 305 return isolate->object_store()->sticky_error();
305 } 306 }
306 } 307 }
307 isolate->megamorphic_cache_table()->InitMissHandler();
308 308
309 isolate->heap()->EnableGrowthControl(); 309 isolate->heap()->EnableGrowthControl();
310 isolate->set_init_callback_data(data); 310 isolate->set_init_callback_data(data);
311 Api::SetupAcquiredError(isolate); 311 Api::SetupAcquiredError(isolate);
312 if (FLAG_print_class_table) { 312 if (FLAG_print_class_table) {
313 isolate->class_table()->Print(); 313 isolate->class_table()->Print();
314 } 314 }
315 315
316 ServiceIsolate::MaybeInjectVMServiceLibrary(isolate); 316 ServiceIsolate::MaybeInjectVMServiceLibrary(isolate);
317 317
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 return predefined_handles_->handles_.AllocateScopedHandle(); 359 return predefined_handles_->handles_.AllocateScopedHandle();
360 } 360 }
361 361
362 362
363 bool Dart::IsReadOnlyHandle(uword address) { 363 bool Dart::IsReadOnlyHandle(uword address) {
364 ASSERT(predefined_handles_ != NULL); 364 ASSERT(predefined_handles_ != NULL);
365 return predefined_handles_->handles_.IsValidScopedHandle(address); 365 return predefined_handles_->handles_.IsValidScopedHandle(address);
366 } 366 }
367 367
368 } // namespace dart 368 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698