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

Unified Diff: runtime/vm/object.cc

Issue 1830733002: Fix stub frame walking: when materializing the frame content during deoptimization, the stack is no… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 6591ecbbca4a0847001316b906b8bd2ddb1b112b..6d956b906a850e2cbae3f2ff374ed9855adf6a16 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -13512,10 +13512,9 @@ bool Code::IsFunctionCode() const {
void Code::DisableDartCode() const {
DEBUG_ASSERT(IsMutatorOrAtSafepoint());
ASSERT(IsFunctionCode());
- ASSERT(!IsDisabled());
+ ASSERT(instructions() == active_instructions());
const Code& new_code =
Code::Handle(StubCode::FixCallersTarget_entry()->code());
- ASSERT(new_code.instructions()->IsVMHeapObject());
SetActiveInstructions(new_code.instructions());
}
@@ -13523,10 +13522,9 @@ void Code::DisableDartCode() const {
void Code::DisableStubCode() const {
ASSERT(Thread::Current()->IsMutatorThread());
ASSERT(IsAllocationStubCode());
- ASSERT(!IsDisabled());
+ ASSERT(instructions() == active_instructions());
const Code& new_code =
Code::Handle(StubCode::FixAllocationStubTarget_entry()->code());
- ASSERT(new_code.instructions()->IsVMHeapObject());
SetActiveInstructions(new_code.instructions());
}
@@ -13535,6 +13533,7 @@ void Code::SetActiveInstructions(RawInstructions* instructions) const {
DEBUG_ASSERT(IsMutatorOrAtSafepoint() || !is_alive());
// RawInstructions are never allocated in New space and hence a
// store buffer update is not needed here.
+ StorePointer(&raw_ptr()->active_instructions_, instructions);
StoreNonPointer(&raw_ptr()->entry_point_,
reinterpret_cast<uword>(instructions->ptr()) +
Instructions::HeaderSize());
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | runtime/vm/stack_frame.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698