| Index: runtime/vm/stack_frame.cc
|
| diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
|
| index 6bb5bd153cdcdcd2ca477c0301aa8b4eabb00c78..f0d0173fb9eec771a4e7d75ea035936f56bef781 100644
|
| --- a/runtime/vm/stack_frame.cc
|
| +++ b/runtime/vm/stack_frame.cc
|
| @@ -19,7 +19,6 @@
|
|
|
| namespace dart {
|
|
|
| -
|
| bool StackFrame::IsStubFrame() const {
|
| ASSERT(!(IsEntryFrame() || IsExitFrame()));
|
| #if !defined(HOST_OS_WINDOWS) && !defined(HOST_OS_FUCHSIA)
|
| @@ -34,7 +33,6 @@ bool StackFrame::IsStubFrame() const {
|
| return cid == kNullCid || cid == kClassCid;
|
| }
|
|
|
| -
|
| const char* StackFrame::ToCString() const {
|
| ASSERT(thread_ == Thread::Current());
|
| Zone* zone = Thread::Current()->zone();
|
| @@ -61,12 +59,10 @@ const char* StackFrame::ToCString() const {
|
| }
|
| }
|
|
|
| -
|
| void ExitFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
|
| // There are no objects to visit in this frame.
|
| }
|
|
|
| -
|
| void EntryFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
|
| // Visit objects between SP and (FP - callee_save_area).
|
| ASSERT(visitor != NULL);
|
| @@ -83,7 +79,6 @@ void EntryFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
|
| #endif
|
| }
|
|
|
| -
|
| void StackFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
|
| ASSERT(visitor != NULL);
|
| // NOTE: This code runs while GC is in progress and runs within
|
| @@ -204,7 +199,6 @@ void StackFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
|
| visitor->VisitPointers(first, last);
|
| }
|
|
|
| -
|
| RawFunction* StackFrame::LookupDartFunction() const {
|
| const Code& code = Code::Handle(LookupDartCode());
|
| if (!code.IsNull()) {
|
| @@ -213,7 +207,6 @@ RawFunction* StackFrame::LookupDartFunction() const {
|
| return Function::null();
|
| }
|
|
|
| -
|
| RawCode* StackFrame::LookupDartCode() const {
|
| // We add a no gc scope to ensure that the code below does not trigger
|
| // a GC as we are handling raw object references here. It is possible
|
| @@ -231,7 +224,6 @@ RawCode* StackFrame::LookupDartCode() const {
|
| return Code::null();
|
| }
|
|
|
| -
|
| RawCode* StackFrame::GetCodeObject() const {
|
| const uword pc_marker =
|
| *(reinterpret_cast<uword*>(fp() + (kPcMarkerSlotFromFp * kWordSize)));
|
| @@ -241,7 +233,6 @@ RawCode* StackFrame::GetCodeObject() const {
|
| return reinterpret_cast<RawCode*>(pc_marker);
|
| }
|
|
|
| -
|
| bool StackFrame::FindExceptionHandler(Thread* thread,
|
| uword* handler_pc,
|
| bool* needs_stacktrace,
|
| @@ -291,7 +282,6 @@ bool StackFrame::FindExceptionHandler(Thread* thread,
|
| return false;
|
| }
|
|
|
| -
|
| TokenPosition StackFrame::GetTokenPos() const {
|
| const Code& code = Code::Handle(LookupDartCode());
|
| if (code.IsNull()) {
|
| @@ -310,7 +300,6 @@ TokenPosition StackFrame::GetTokenPos() const {
|
| return TokenPosition::kNoSource;
|
| }
|
|
|
| -
|
| bool StackFrame::IsValid() const {
|
| if (IsEntryFrame() || IsExitFrame() || IsStubFrame()) {
|
| return true;
|
| @@ -318,14 +307,12 @@ bool StackFrame::IsValid() const {
|
| return (LookupDartCode() != Code::null());
|
| }
|
|
|
| -
|
| void StackFrameIterator::SetupLastExitFrameData() {
|
| ASSERT(thread_ != NULL);
|
| uword exit_marker = thread_->top_exit_frame_info();
|
| frames_.fp_ = exit_marker;
|
| }
|
|
|
| -
|
| void StackFrameIterator::SetupNextExitFrameData() {
|
| uword exit_address = entry_.fp() + (kExitLinkSlotFromEntryFp * kWordSize);
|
| uword exit_marker = *reinterpret_cast<uword*>(exit_address);
|
| @@ -334,7 +321,6 @@ void StackFrameIterator::SetupNextExitFrameData() {
|
| frames_.pc_ = 0;
|
| }
|
|
|
| -
|
| // Tell MemorySanitizer that generated code initializes part of the stack.
|
| // TODO(koda): Limit to frames that are actually written by generated code.
|
| static void UnpoisonStack(uword fp) {
|
| @@ -343,7 +329,6 @@ static void UnpoisonStack(uword fp) {
|
| MSAN_UNPOISON(reinterpret_cast<void*>(fp - size), 2 * size);
|
| }
|
|
|
| -
|
| StackFrameIterator::StackFrameIterator(ValidationPolicy validation_policy,
|
| Thread* thread,
|
| CrossThreadPolicy cross_thread_policy)
|
| @@ -358,7 +343,6 @@ StackFrameIterator::StackFrameIterator(ValidationPolicy validation_policy,
|
| SetupLastExitFrameData(); // Setup data for last exit frame.
|
| }
|
|
|
| -
|
| StackFrameIterator::StackFrameIterator(uword last_fp,
|
| ValidationPolicy validation_policy,
|
| Thread* thread,
|
| @@ -376,7 +360,6 @@ StackFrameIterator::StackFrameIterator(uword last_fp,
|
| frames_.pc_ = 0;
|
| }
|
|
|
| -
|
| #if !defined(TARGET_ARCH_DBC)
|
| StackFrameIterator::StackFrameIterator(uword fp,
|
| uword sp,
|
| @@ -398,7 +381,6 @@ StackFrameIterator::StackFrameIterator(uword fp,
|
| }
|
| #endif
|
|
|
| -
|
| StackFrame* StackFrameIterator::NextFrame() {
|
| // When we are at the start of iteration after having created an
|
| // iterator object, current_frame_ will be NULL as we haven't seen
|
| @@ -459,7 +441,6 @@ StackFrame* StackFrameIterator::NextFrame() {
|
| return current_frame_;
|
| }
|
|
|
| -
|
| StackFrame* StackFrameIterator::FrameSetIterator::NextFrame(bool validate) {
|
| StackFrame* frame;
|
| ASSERT(HasNext());
|
| @@ -474,7 +455,6 @@ StackFrame* StackFrameIterator::FrameSetIterator::NextFrame(bool validate) {
|
| return frame;
|
| }
|
|
|
| -
|
| ExitFrame* StackFrameIterator::NextExitFrame() {
|
| exit_.sp_ = frames_.sp_;
|
| exit_.fp_ = frames_.fp_;
|
| @@ -486,7 +466,6 @@ ExitFrame* StackFrameIterator::NextExitFrame() {
|
| return &exit_;
|
| }
|
|
|
| -
|
| EntryFrame* StackFrameIterator::NextEntryFrame() {
|
| ASSERT(!frames_.HasNext());
|
| entry_.sp_ = frames_.sp_;
|
| @@ -497,7 +476,6 @@ EntryFrame* StackFrameIterator::NextEntryFrame() {
|
| return &entry_;
|
| }
|
|
|
| -
|
| InlinedFunctionsIterator::InlinedFunctionsIterator(const Code& code, uword pc)
|
| : index_(0),
|
| num_materializations_(0),
|
| @@ -536,7 +514,6 @@ InlinedFunctionsIterator::InlinedFunctionsIterator(const Code& code, uword pc)
|
| #endif // defined(DART_PRECOMPILED_RUNTIME)
|
| }
|
|
|
| -
|
| void InlinedFunctionsIterator::Advance() {
|
| // Iterate over the deopt instructions and determine the inlined
|
| // functions if any and iterate over them.
|
| @@ -565,7 +542,6 @@ void InlinedFunctionsIterator::Advance() {
|
| #endif // defined(DART_PRECOMPILED_RUNTIME)
|
| }
|
|
|
| -
|
| // Finds the potential offset for the current function's FP if the
|
| // current frame were to be deoptimized.
|
| intptr_t InlinedFunctionsIterator::GetDeoptFpOffset() const {
|
| @@ -587,7 +563,6 @@ intptr_t InlinedFunctionsIterator::GetDeoptFpOffset() const {
|
| return 0;
|
| }
|
|
|
| -
|
| #if defined(DEBUG)
|
| void ValidateFrames() {
|
| StackFrameIterator frames(StackFrameIterator::kValidateFrames,
|
| @@ -600,5 +575,4 @@ void ValidateFrames() {
|
| }
|
| #endif
|
|
|
| -
|
| } // namespace dart
|
|
|