Chromium Code Reviews| 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/become.h" | 7 #include "vm/become.h" |
| 8 #include "vm/clustered_snapshot.h" | 8 #include "vm/clustered_snapshot.h" |
| 9 #include "vm/code_observers.h" | 9 #include "vm/code_observers.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 575 DEBUG_ONLY(I->heap()->Verify(kForbidMarked)); | 575 DEBUG_ONLY(I->heap()->Verify(kForbidMarked)); |
| 576 | 576 |
| 577 { | 577 { |
| 578 NOT_IN_PRODUCT(TimelineDurationScope tds(T, Timeline::GetIsolateStream(), | 578 NOT_IN_PRODUCT(TimelineDurationScope tds(T, Timeline::GetIsolateStream(), |
| 579 "StubCode::Init")); | 579 "StubCode::Init")); |
| 580 StubCode::Init(I); | 580 StubCode::Init(I); |
| 581 } | 581 } |
| 582 | 582 |
| 583 #if !defined(DART_PRECOMPILED_RUNTIME) | 583 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 584 // When running precompiled, the megamorphic miss function/code comes from the | 584 // When running precompiled, the megamorphic miss function/code comes from the |
| 585 // snapshot. | 585 // snapshot. |
|
siva
2017/01/05 23:10:47
The comment here also probably needs an update
(pr
rmacnak
2017/01/05 23:32:44
Done.
| |
| 586 if (!Snapshot::IncludesCode(Dart::snapshot_kind())) { | 586 if (I->object_store()->megamorphic_miss_function() == Function::null()) { |
| 587 MegamorphicCacheTable::InitMissHandler(I); | 587 MegamorphicCacheTable::InitMissHandler(I); |
| 588 } | 588 } |
| 589 #endif | 589 #endif |
|
siva
2017/01/05 23:10:47
Should this be set up as
#if defined(DART_PRECOMP
rmacnak
2017/01/05 23:32:44
Done.
| |
| 590 | 590 |
| 591 const Code& miss_code = | 591 const Code& miss_code = |
| 592 Code::Handle(I->object_store()->megamorphic_miss_code()); | 592 Code::Handle(I->object_store()->megamorphic_miss_code()); |
| 593 I->set_ic_miss_code(miss_code); | 593 I->set_ic_miss_code(miss_code); |
| 594 | 594 |
| 595 if ((snapshot_buffer == NULL) || (kernel_program != NULL)) { | 595 if ((snapshot_buffer == NULL) || (kernel_program != NULL)) { |
| 596 const Error& error = Error::Handle(I->object_store()->PreallocateObjects()); | 596 const Error& error = Error::Handle(I->object_store()->PreallocateObjects()); |
| 597 if (!error.IsNull()) { | 597 if (!error.IsNull()) { |
| 598 return error.raw(); | 598 return error.raw(); |
| 599 } | 599 } |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 738 return predefined_handles_->handles_.IsValidScopedHandle(address); | 738 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 739 } | 739 } |
| 740 | 740 |
| 741 | 741 |
| 742 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 742 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
| 743 ASSERT(predefined_handles_ != NULL); | 743 ASSERT(predefined_handles_ != NULL); |
| 744 return predefined_handles_->api_handles_.IsValidHandle(handle); | 744 return predefined_handles_->api_handles_.IsValidHandle(handle); |
| 745 } | 745 } |
| 746 | 746 |
| 747 } // namespace dart | 747 } // namespace dart |
| OLD | NEW |