diff --git a/lib/Runtime/Language/JavascriptStackWalker.cpp b/lib/Runtime/Language/JavascriptStackWalker.cpp index 0cca32bb44e..d0678cc4082 100644 --- a/lib/Runtime/Language/JavascriptStackWalker.cpp +++ b/lib/Runtime/Language/JavascriptStackWalker.cpp @@ -300,7 +300,11 @@ namespace Js { if (this->IsJavascriptFrame()) { - if (this->interpreterFrame && this->lastInternalFrameInfo.codeAddress == nullptr) + if (this->interpreterFrame +#if ENABLE_NATIVE_CODEGEN + && this->lastInternalFrameInfo.codeAddress == nullptr +#endif + ) { uint32 offset = this->interpreterFrame->GetReader()->GetCurrentOffset(); if (offset == 0) @@ -754,10 +758,12 @@ namespace Js bool JavascriptStackWalker::CheckJavascriptFrame(bool includeInlineFrames) { +#if ENABLE_NATIVE_CODEGEN if (this->lastInternalFrameInfo.frameConsumed) { ClearCachedInternalFrameInfo(); } +#endif this->isNativeLibraryFrame = false; // Clear previous result @@ -795,7 +801,8 @@ namespace Js this->tempInterpreterFrame = this->interpreterFrame->GetPreviousFrame(); -#if DBG && ENABLE_NATIVE_CODEGEN +#if ENABLE_NATIVE_CODEGEN +#if DBG if (((CallInfo const *)&argv[JavascriptFunctionArgIndex_CallInfo])->Flags & CallFlags_InternalFrame) { // The return address of the interpreterFrame is the same as the entryPoint for a jitted loop body. @@ -807,7 +814,7 @@ namespace Js true /*fromBailout*/, this->tempInterpreterFrame->GetCurrentLoopNum(), this, true /*noAlloc*/)); tmpFrameWalker.Close(); } -#endif +#endif //DBG if (!this->interpreterFrame->IsCurrentLoopNativeAddr(this->lastInternalFrameInfo.codeAddress)) { @@ -818,6 +825,7 @@ namespace Js Assert(this->lastInternalFrameInfo.codeAddress); this->lastInternalFrameInfo.frameConsumed = true; } +#endif //ENABLE_NATIVE_CODEGEN return true; } @@ -1010,6 +1018,7 @@ namespace Js return this->GetCurrentArgv()[JavascriptFunctionArgIndex_This]; } +#if ENABLE_NATIVE_CODEGEN void JavascriptStackWalker::ClearCachedInternalFrameInfo() { this->lastInternalFrameInfo.Clear(); @@ -1023,6 +1032,7 @@ namespace Js } this->lastInternalFrameInfo.loopBodyFrameType = loopBodyFrameType; } +#endif bool JavascriptStackWalker::IsCurrentPhysicalFrameForLoopBody() const { diff --git a/lib/Runtime/Language/JavascriptStackWalker.h b/lib/Runtime/Language/JavascriptStackWalker.h index ad8fe9d96a1..1fb9efd2358 100644 --- a/lib/Runtime/Language/JavascriptStackWalker.h +++ b/lib/Runtime/Language/JavascriptStackWalker.h @@ -226,7 +226,9 @@ namespace Js void ClearCachedInternalFrameInfo(); void SetCachedInternalFrameInfo(InternalFrameType frameType, InternalFrameType loopBodyFrameType); +#if ENABLE_NATIVE_CODEGEN InternalFrameInfo GetCachedInternalFrameInfo() const { return this->lastInternalFrameInfo; } +#endif bool IsCurrentPhysicalFrameForLoopBody() const; // noinline, we want to use own stack frame. @@ -326,9 +328,9 @@ namespace Js void SetCurrentArgumentsObject(Var args); Var GetCurrentNativeArgumentsObject() const; void SetCurrentNativeArgumentsObject(Var args); - +#if ENABLE_NATIVE_CODEGEN InternalFrameInfo lastInternalFrameInfo; - +#endif mutable StackFrame currentFrame; Js::JavascriptFunction * UpdateFrame(bool includeInlineFrames);