summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/interpreter/CallFrame.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-23 10:25:11 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-23 10:25:11 +0200
commit5ea819f80c6840c492386bfafbffb059c7e2091f (patch)
tree42ad0b1d82eff090d14278a088ea0f4840a0f938 /Source/JavaScriptCore/interpreter/CallFrame.h
parent43a42f108af6bcbd91f2672731c3047c26213af1 (diff)
downloadqtwebkit-5ea819f80c6840c492386bfafbffb059c7e2091f.tar.gz
Imported WebKit commit 20434eb8eb95065803473139d8794e98a7672f75 (http://svn.webkit.org/repository/webkit/trunk@132191)
New snapshot that should fix build with latest qtbase and the QPlastiqueStyle removal
Diffstat (limited to 'Source/JavaScriptCore/interpreter/CallFrame.h')
-rw-r--r--Source/JavaScriptCore/interpreter/CallFrame.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/interpreter/CallFrame.h b/Source/JavaScriptCore/interpreter/CallFrame.h
index 7aa49a9b0..2b0ea3aac 100644
--- a/Source/JavaScriptCore/interpreter/CallFrame.h
+++ b/Source/JavaScriptCore/interpreter/CallFrame.h
@@ -256,6 +256,7 @@ namespace JSC {
CodeBlock* someCodeBlockForPossiblyInlinedCode() { return codeBlock(); }
#endif
+ CallFrame* callerFrameNoFlags() { return callerFrame()->removeHostCallFrameFlag(); }
// Call this to get the true call frame (accounted for inlining and any
// other optimizations), when you have entered into VM code through one
@@ -281,6 +282,36 @@ namespace JSC {
ExecState();
~ExecState();
+ // The following are for internal use in debugging and verification
+ // code only and not meant as an API for general usage:
+
+ size_t argIndexForRegister(Register* reg)
+ {
+ // The register at 'offset' number of slots from the frame pointer
+ // i.e.
+ // reg = frame[offset];
+ // ==> reg = frame + offset;
+ // ==> offset = reg - frame;
+ int offset = reg - this->registers();
+
+ // The offset is defined (based on argumentOffset()) to be:
+ // offset = s_firstArgumentOffset - argIndex;
+ // Hence:
+ // argIndex = s_firstArgumentOffset - offset;
+ size_t argIndex = s_firstArgumentOffset - offset;
+ return argIndex;
+ }
+
+ JSValue getArgumentUnsafe(size_t argIndex)
+ {
+ // User beware! This method does not verify that there is a valid
+ // argument at the specified argIndex. This is used for debugging
+ // and verification code only. The caller is expected to know what
+ // he/she is doing when calling this method.
+ return this[argumentOffset(argIndex)].jsValue();
+ }
+
+ friend class JSStack;
friend class VMInspector;
};