summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/interpreter/CallFrame.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/interpreter/CallFrame.h')
-rw-r--r--Source/JavaScriptCore/interpreter/CallFrame.h36
1 files changed, 33 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/interpreter/CallFrame.h b/Source/JavaScriptCore/interpreter/CallFrame.h
index 4fadfab28..5bf2b9488 100644
--- a/Source/JavaScriptCore/interpreter/CallFrame.h
+++ b/Source/JavaScriptCore/interpreter/CallFrame.h
@@ -104,13 +104,30 @@ namespace JSC {
CallFrame* callerFrame() const { return this[RegisterFile::CallerFrame].callFrame(); }
#if ENABLE(JIT)
ReturnAddressPtr returnPC() const { return ReturnAddressPtr(this[RegisterFile::ReturnPC].vPC()); }
+ bool hasReturnPC() const { return !!this[RegisterFile::ReturnPC].vPC(); }
+ void clearReturnPC() { registers()[RegisterFile::ReturnPC] = static_cast<Instruction*>(0); }
#endif
AbstractPC abstractReturnPC(JSGlobalData& globalData) { return AbstractPC(globalData, this); }
- unsigned bytecodeOffsetForBaselineJIT() { return this[RegisterFile::ArgumentCount].tag(); }
+#if USE(JSVALUE32_64)
+ unsigned bytecodeOffsetForNonDFGCode() const;
+ void setBytecodeOffsetForNonDFGCode(unsigned offset);
+#else
+ unsigned bytecodeOffsetForNonDFGCode() const
+ {
+ ASSERT(codeBlock());
+ return this[RegisterFile::ArgumentCount].tag();
+ }
+
+ void setBytecodeOffsetForNonDFGCode(unsigned offset)
+ {
+ ASSERT(codeBlock());
+ this[RegisterFile::ArgumentCount].tag() = static_cast<int32_t>(offset);
+ }
+#endif
#if ENABLE(DFG_JIT)
InlineCallFrame* inlineCallFrame() const { return this[RegisterFile::ReturnPC].asInlineCallFrame(); }
- unsigned codeOriginIndexForDFGWithInlining() const { return this[RegisterFile::ArgumentCount].tag(); }
+ unsigned codeOriginIndexForDFG() const { return this[RegisterFile::ArgumentCount].tag(); }
#else
// This will never be called if !ENABLE(DFG_JIT) since all calls should be guarded by
// isInlineCallFrame(). But to make it easier to write code without having a bunch of
@@ -121,9 +138,22 @@ namespace JSC {
return 0;
}
#endif
-#if ENABLE(INTERPRETER)
+#if ENABLE(CLASSIC_INTERPRETER)
Instruction* returnVPC() const { return this[RegisterFile::ReturnPC].vPC(); }
#endif
+#if USE(JSVALUE32_64)
+ Instruction* currentVPC() const
+ {
+ return bitwise_cast<Instruction*>(this[RegisterFile::ArgumentCount].tag());
+ }
+ void setCurrentVPC(Instruction* vpc)
+ {
+ this[RegisterFile::ArgumentCount].tag() = bitwise_cast<int32_t>(vpc);
+ }
+#else
+ Instruction* currentVPC() const;
+ void setCurrentVPC(Instruction* vpc);
+#endif
void setCallerFrame(CallFrame* callerFrame) { static_cast<Register*>(this)[RegisterFile::CallerFrame] = callerFrame; }
void setScopeChain(ScopeChainNode* scopeChain) { static_cast<Register*>(this)[RegisterFile::ScopeChain] = scopeChain; }