OLD | NEW |
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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 { | 345 { |
346 TimelineDurationScope tds(T, I->GetIsolateStream(), "StubCode::Init"); | 346 TimelineDurationScope tds(T, I->GetIsolateStream(), "StubCode::Init"); |
347 StubCode::Init(I); | 347 StubCode::Init(I); |
348 } | 348 } |
349 | 349 |
350 // When running precompiled, the megamorphic miss function/code comes from the | 350 // When running precompiled, the megamorphic miss function/code comes from the |
351 // snapshot. | 351 // snapshot. |
352 if (!Dart::IsRunningPrecompiledCode()) { | 352 if (!Dart::IsRunningPrecompiledCode()) { |
353 MegamorphicCacheTable::InitMissHandler(I); | 353 MegamorphicCacheTable::InitMissHandler(I); |
354 } | 354 } |
| 355 const Function& miss_function = |
| 356 Function::Handle(I->object_store()->megamorphic_miss_function()); |
| 357 I->set_ic_miss_function(miss_function); |
| 358 |
355 if (snapshot_buffer == NULL) { | 359 if (snapshot_buffer == NULL) { |
356 if (!I->object_store()->PreallocateObjects()) { | 360 if (!I->object_store()->PreallocateObjects()) { |
357 return I->object_store()->sticky_error(); | 361 return I->object_store()->sticky_error(); |
358 } | 362 } |
359 } | 363 } |
360 | 364 |
361 I->heap()->EnableGrowthControl(); | 365 I->heap()->EnableGrowthControl(); |
362 I->set_init_callback_data(data); | 366 I->set_init_callback_data(data); |
363 Api::SetupAcquiredError(I); | 367 Api::SetupAcquiredError(I); |
364 if (FLAG_print_class_table) { | 368 if (FLAG_print_class_table) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 return predefined_handles_->handles_.IsValidScopedHandle(address); | 436 return predefined_handles_->handles_.IsValidScopedHandle(address); |
433 } | 437 } |
434 | 438 |
435 | 439 |
436 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 440 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
437 ASSERT(predefined_handles_ != NULL); | 441 ASSERT(predefined_handles_ != NULL); |
438 return predefined_handles_->api_handles_.IsValidHandle(handle); | 442 return predefined_handles_->api_handles_.IsValidHandle(handle); |
439 } | 443 } |
440 | 444 |
441 } // namespace dart | 445 } // namespace dart |
OLD | NEW |