Skip to content

Commit

Permalink
fix noJit builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatd committed Jan 15, 2016
1 parent 35663e1 commit 953b131
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
14 changes: 12 additions & 2 deletions lib/Runtime/Language/JavascriptStackWalker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand All @@ -818,6 +825,7 @@ namespace Js
Assert(this->lastInternalFrameInfo.codeAddress);
this->lastInternalFrameInfo.frameConsumed = true;
}
#endif

return true;
}
Expand Down Expand Up @@ -1010,6 +1018,7 @@ namespace Js
return this->GetCurrentArgv()[JavascriptFunctionArgIndex_This];
}

#if ENABLE_NATIVE_CODEGEN
void JavascriptStackWalker::ClearCachedInternalFrameInfo()
{
this->lastInternalFrameInfo.Clear();
Expand All @@ -1023,6 +1032,7 @@ namespace Js
}
this->lastInternalFrameInfo.loopBodyFrameType = loopBodyFrameType;
}
#endif

bool JavascriptStackWalker::IsCurrentPhysicalFrameForLoopBody() const
{
Expand Down
6 changes: 4 additions & 2 deletions lib/Runtime/Language/JavascriptStackWalker.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 953b131

Please sign in to comment.