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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 | 447 |
448 Object::VerifyBuiltinVtables(); | 448 Object::VerifyBuiltinVtables(); |
449 DEBUG_ONLY(I->heap()->Verify(kForbidMarked)); | 449 DEBUG_ONLY(I->heap()->Verify(kForbidMarked)); |
450 | 450 |
451 { | 451 { |
452 NOT_IN_PRODUCT(TimelineDurationScope tds(T, | 452 NOT_IN_PRODUCT(TimelineDurationScope tds(T, |
453 I->GetIsolateStream(), "StubCode::Init")); | 453 I->GetIsolateStream(), "StubCode::Init")); |
454 StubCode::Init(I); | 454 StubCode::Init(I); |
455 } | 455 } |
456 | 456 |
| 457 #if !defined(DART_PRECOMPILED_RUNTIME) |
457 // When running precompiled, the megamorphic miss function/code comes from the | 458 // When running precompiled, the megamorphic miss function/code comes from the |
458 // snapshot. | 459 // snapshot. |
459 if (!Dart::IsRunningPrecompiledCode()) { | 460 if (!Dart::IsRunningPrecompiledCode()) { |
460 MegamorphicCacheTable::InitMissHandler(I); | 461 MegamorphicCacheTable::InitMissHandler(I); |
461 } | 462 } |
| 463 #endif |
| 464 |
462 const Code& miss_code = | 465 const Code& miss_code = |
463 Code::Handle(I->object_store()->megamorphic_miss_code()); | 466 Code::Handle(I->object_store()->megamorphic_miss_code()); |
464 I->set_ic_miss_code(miss_code); | 467 I->set_ic_miss_code(miss_code); |
465 | 468 |
466 if (snapshot_buffer == NULL) { | 469 if (snapshot_buffer == NULL) { |
467 const Error& error = Error::Handle(I->object_store()->PreallocateObjects()); | 470 const Error& error = Error::Handle(I->object_store()->PreallocateObjects()); |
468 if (!error.IsNull()) { | 471 if (!error.IsNull()) { |
469 return error.raw(); | 472 return error.raw(); |
470 } | 473 } |
471 } | 474 } |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 return predefined_handles_->handles_.IsValidScopedHandle(address); | 560 return predefined_handles_->handles_.IsValidScopedHandle(address); |
558 } | 561 } |
559 | 562 |
560 | 563 |
561 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 564 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
562 ASSERT(predefined_handles_ != NULL); | 565 ASSERT(predefined_handles_ != NULL); |
563 return predefined_handles_->api_handles_.IsValidHandle(handle); | 566 return predefined_handles_->api_handles_.IsValidHandle(handle); |
564 } | 567 } |
565 | 568 |
566 } // namespace dart | 569 } // namespace dart |
OLD | NEW |