diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc index cc94c15a3c8..e0302ab4391 100644 --- a/runtime/vm/stack_frame.cc +++ b/runtime/vm/stack_frame.cc @@ -91,16 +91,9 @@ bool StackFrame::IsBareInstructionsDartFrame() const { auto rct = isolate->reverse_pc_lookup_cache(); code = rct->Lookup(pc()); - // All stub codes have a `null` owner except for the megamorphic miss - // stub. So if it's neither of those, we are know it must be a - // precompiled dart frame. - RawObject* owner = code.owner(); - if (owner != Object::null()) { - if (code.raw() == - Isolate::Current()->object_store()->megamorphic_miss_code()) { - return true; - } - } + const intptr_t cid = code.owner()->GetClassId(); + ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid); + return cid == kFunctionCid; } return false; } @@ -113,37 +106,13 @@ bool StackFrame::IsBareInstructionsStubFrame() const { auto rct = isolate->reverse_pc_lookup_cache(); code = rct->Lookup(pc()); - // All stub codes have a `null` owner except for the megamorphic miss stub. - // So if it's either of those, we are know it must be a precompiled stub - // frame. - RawObject* owner = code.owner(); - if (owner == Object::null()) { - return true; - } - - if (code.raw() == - Isolate::Current()->object_store()->megamorphic_miss_code()) { - return true; - } + const intptr_t cid = code.owner()->GetClassId(); + ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid); + return cid == kNullCid || cid == kClassCid; } return false; } -bool StackFrame::IsDartFrame(bool validate) const { - ASSERT(!validate || IsValid()); - - if (IsEntryFrame() || IsExitFrame()) return false; - - // Even though the megamorphic miss stub is a stub, we consider it as a - // dart frame for all practical purposes. - const bool is_megamorphic_miss_stub = Code::ContainsInstructionAt( - thread_->isolate()->object_store()->megamorphic_miss_code(), pc_); - - if (is_megamorphic_miss_stub) return true; - - return !IsStubFrame(); -} - bool StackFrame::IsStubFrame() const { if (is_interpreted()) { return false; diff --git a/runtime/vm/stack_frame.h b/runtime/vm/stack_frame.h index 9b6b67aa15d..c8b59b97d82 100644 --- a/runtime/vm/stack_frame.h +++ b/runtime/vm/stack_frame.h @@ -165,7 +165,10 @@ class StackFrame : public ValueObject { bool IsBareInstructionsStubFrame() const; // Frame type. - virtual bool IsDartFrame(bool validate = true) const; + virtual bool IsDartFrame(bool validate = true) const { + ASSERT(!validate || IsValid()); + return !(IsEntryFrame() || IsExitFrame() || IsStubFrame()); + } virtual bool IsStubFrame() const; virtual bool IsEntryFrame() const { return false; } virtual bool IsExitFrame() const { return false; } diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status index 4ce61f3981d..44cc68f4b05 100644 --- a/tests/language_2/language_2_kernel.status +++ b/tests/language_2/language_2_kernel.status @@ -240,9 +240,6 @@ vm/debug_break_enabled_vm_test/01: CompileTimeError # KernelVM bug: Bad test usi vm/debug_break_enabled_vm_test/none: CompileTimeError # KernelVM bug: Bad test using extended break syntax. vm/regress_27201_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273. -[ $arch == ia32 && $compiler == dartk && $system == windows ] -deferred_optimized_test: Pass, Crash # Issue 35405 (Flaky failure). - [ $builder_tag == obfuscated && $compiler == dartkp ] generic_function_dcall_test/01: SkipByDesign # Prints type names invocation_mirror_test: RuntimeError # Issue 34911