incorrect to rely on the returnPC
https://bugs.webkit.org/show_bug.cgi?id=80195
Reviewed by Oliver Hunt.
* interpreter/Interpreter.cpp:
(JSC::getCallerInfo):
* jit/JITCall.cpp:
(JSC::JIT::compileLoadVarargs):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109627
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-03-02 Filip Pizlo <fpizlo@apple.com>
+
+ When getting the line number of a call into a call frame with no code block, it's
+ incorrect to rely on the returnPC
+ https://bugs.webkit.org/show_bug.cgi?id=80195
+
+ Reviewed by Oliver Hunt.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::getCallerInfo):
+ * jit/JITCall.cpp:
+ (JSC::JIT::compileLoadVarargs):
+
2012-03-02 Han Hojong <hojong.han@samsung.com>
Expected results updated for checking type conversion
if (callerFrame == CallFrame::noCaller() || !callerFrame || !callerFrame->codeBlock())
return callerFrame;
-
+
CodeBlock* callerCodeBlock = callerFrame->codeBlock();
+
+#if ENABLE(JIT)
+ if (!callFrame->hasReturnPC())
+ callframeIsHost = true;
+#endif
+#if ENABLE(DFG_JIT)
+ if (callFrame->isInlineCallFrame())
+ callframeIsHost = false;
+#endif
if (callframeIsHost) {
// Don't need to deal with inline callframes here as by definition we haven't
#endif
#if ENABLE(JIT)
#if ENABLE(DFG_JIT)
- if (callerCodeBlock && callerCodeBlock->getJITType() == JITCode::DFGJIT)
- bytecodeOffset = callerCodeBlock->codeOrigin(callerFrame->codeOriginIndexForDFG()).bytecodeIndex;
- else
+ if (callerCodeBlock && callerCodeBlock->getJITType() == JITCode::DFGJIT) {
+ unsigned codeOriginIndex = callerFrame->codeOriginIndexForDFG();
+ bytecodeOffset = callerCodeBlock->codeOrigin(codeOriginIndex).bytecodeIndex;
+ } else
#endif
bytecodeOffset = callerFrame->bytecodeOffsetForNonDFGCode();
#endif
slowCase.append(branchPtr(Below, AbsoluteAddress(m_globalData->interpreter->registerFile().addressOfEnd()), regT1));
// Initialize ArgumentCount.
- emitFastArithReTagImmediate(regT0, regT2);
- storePtr(regT2, Address(regT1, RegisterFile::ArgumentCount * static_cast<int>(sizeof(Register))));
+ store32(regT0, Address(regT1, RegisterFile::ArgumentCount * static_cast<int>(sizeof(Register)) + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload)));
// Initialize 'this'.
emitGetVirtualRegister(thisValue, regT2);