diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-09 07:28:56 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-09 07:28:56 (GMT) |
commit | f2e0f336183e8001f946da5b7aa45b9367ed68ba (patch) | |
tree | 87cf5ab1b6e33fae823c52e9da11831a04375f47 /src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h | |
parent | a4e0ae8af7b550117d1e9d9dbb90564d50985fe3 (diff) | |
download | Qt-f2e0f336183e8001f946da5b7aa45b9367ed68ba.zip Qt-f2e0f336183e8001f946da5b7aa45b9367ed68ba.tar.gz Qt-f2e0f336183e8001f946da5b7aa45b9367ed68ba.tar.bz2 |
store frame's callee as a normal JSObject
It's possible for any JSObject to be a callee; all it needs to
do is implement getCallData().
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h index 41adba5..13d8d1c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h @@ -45,7 +45,7 @@ namespace JSC { OwnArrayPtr<bool> deletedArguments; Register extraArgumentsFixedBuffer[4]; - InternalFunction* callee; + JSObject* callee; bool overrodeLength : 1; bool overrodeCallee : 1; }; @@ -87,7 +87,7 @@ namespace JSC { } private: - void getArgumentsData(CallFrame*, InternalFunction*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc); + void getArgumentsData(CallFrame*, JSObject*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc); virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&); virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); @@ -110,13 +110,13 @@ namespace JSC { return static_cast<Arguments*>(asObject(value)); } - ALWAYS_INLINE void Arguments::getArgumentsData(CallFrame* callFrame, InternalFunction*& function, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc) + ALWAYS_INLINE void Arguments::getArgumentsData(CallFrame* callFrame, JSObject*& callee, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc) { - function = callFrame->callee(); + callee = callFrame->callee(); int numParameters; - if (function->isObject(&JSFunction::info)) { - CodeBlock* codeBlock = &JSC::asFunction(function)->body()->generatedBytecode(); + if (callee->isObject(&JSFunction::info)) { + CodeBlock* codeBlock = &JSC::asFunction(callee)->body()->generatedBytecode(); numParameters = codeBlock->m_numParameters; } else { numParameters = 0; @@ -136,7 +136,7 @@ namespace JSC { : JSObject(callFrame->lexicalGlobalObject()->argumentsStructure()) , d(new ArgumentsData) { - InternalFunction* callee; + JSObject* callee; ptrdiff_t firstParameterIndex; Register* argv; int numArguments; |