2009-06-01 Gavin Barraclough <barraclough@apple.com>
Reviewed by Olliej Hunt.
Change JITStub functions from being static members on the JITStub class to be
global extern "C" functions, and switch their the function signature declaration
in the definition of the functions to be C-macro generated. This makes it easier
to work with the stub functions from assembler code (since the names no longer
require mangling), and by delaring the functions with a macro we can look at
also auto-generating asm thunks to wrap the JITStub functions to perform the
work currently in 'restoreArgumentReference' (as a memory saving).
Making this change also forces us to be a bit more realistic about what is private
on the Register and CallFrame objects. Presently most everything on these classes
is private, and the classes have plenty of friends. We could befriend all the
global functions to perpetuate the delusion of encapsulation, but using friends is
a bit of a sledgehammer solution here - since friends can poke around with all of
the class's privates, and since all the major classes taht operate on Regsiters are
currently friends, right there is currently in practice very little protection at
all. Better to start removing friend delclarations, and exposing just the parts
that need to be exposed.
* interpreter/CallFrame.h:
(JSC::ExecState::returnPC):
(JSC::ExecState::setCallerFrame):
(JSC::ExecState::returnValueRegister):
(JSC::ExecState::setArgumentCount):
(JSC::ExecState::setCallee):
(JSC::ExecState::setCodeBlock):
* interpreter/Interpreter.h:
* interpreter/Register.h:
(JSC::Register::Register):
(JSC::Register::i):
* jit/JITStubs.cpp:
(JSC::):
(JSC::JITThunks::JITThunks):
(JSC::JITThunks::tryCachePutByID):
(JSC::JITThunks::tryCacheGetByID):
(JSC::JITStubs::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
(JSC::JITStubs::):
* runtime/JSFunction.h:
(JSC::JSFunction::nativeFunction):
(JSC::JSFunction::classInfo):
* runtime/JSGlobalData.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 3c3fd0b..127c16f 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,49 @@
+2009-06-01 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Olliej Hunt.
+
+ Change JITStub functions from being static members on the JITStub class to be
+ global extern "C" functions, and switch their the function signature declaration
+ in the definition of the functions to be C-macro generated. This makes it easier
+ to work with the stub functions from assembler code (since the names no longer
+ require mangling), and by delaring the functions with a macro we can look at
+ also auto-generating asm thunks to wrap the JITStub functions to perform the
+ work currently in 'restoreArgumentReference' (as a memory saving).
+
+ Making this change also forces us to be a bit more realistic about what is private
+ on the Register and CallFrame objects. Presently most everything on these classes
+ is private, and the classes have plenty of friends. We could befriend all the
+ global functions to perpetuate the delusion of encapsulation, but using friends is
+ a bit of a sledgehammer solution here - since friends can poke around with all of
+ the class's privates, and since all the major classes taht operate on Regsiters are
+ currently friends, right there is currently in practice very little protection at
+ all. Better to start removing friend delclarations, and exposing just the parts
+ that need to be exposed.
+
+ * interpreter/CallFrame.h:
+ (JSC::ExecState::returnPC):
+ (JSC::ExecState::setCallerFrame):
+ (JSC::ExecState::returnValueRegister):
+ (JSC::ExecState::setArgumentCount):
+ (JSC::ExecState::setCallee):
+ (JSC::ExecState::setCodeBlock):
+ * interpreter/Interpreter.h:
+ * interpreter/Register.h:
+ (JSC::Register::Register):
+ (JSC::Register::i):
+ * jit/JITStubs.cpp:
+ (JSC::):
+ (JSC::JITThunks::JITThunks):
+ (JSC::JITThunks::tryCachePutByID):
+ (JSC::JITThunks::tryCacheGetByID):
+ (JSC::JITStubs::DEFINE_STUB_FUNCTION):
+ * jit/JITStubs.h:
+ (JSC::JITStubs::):
+ * runtime/JSFunction.h:
+ (JSC::JSFunction::nativeFunction):
+ (JSC::JSFunction::classInfo):
+ * runtime/JSGlobalData.h:
+
2009-06-01 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
diff --git a/JavaScriptCore/interpreter/CallFrame.h b/JavaScriptCore/interpreter/CallFrame.h
index a2605db..a61e143 100644
--- a/JavaScriptCore/interpreter/CallFrame.h
+++ b/JavaScriptCore/interpreter/CallFrame.h
@@ -95,14 +95,6 @@
static const HashTable* regExpConstructorTable(CallFrame* callFrame) { return callFrame->globalData().regExpConstructorTable; }
static const HashTable* stringTable(CallFrame* callFrame) { return callFrame->globalData().stringTable; }
- private:
- friend class Arguments;
- friend class JSActivation;
- friend class JSGlobalObject;
- friend class Interpreter;
- friend class JITStubs;
- friend struct CallFrameClosure;
-
static CallFrame* create(Register* callFrameBase) { return static_cast<CallFrame*>(callFrameBase); }
Register* registers() { return this; }
@@ -111,13 +103,9 @@
CallFrame* callerFrame() const { return this[RegisterFile::CallerFrame].callFrame(); }
Arguments* optionalCalleeArguments() const { return this[RegisterFile::OptionalCalleeArguments].arguments(); }
Instruction* returnPC() const { return this[RegisterFile::ReturnPC].vPC(); }
- int returnValueRegister() const { return this[RegisterFile::ReturnValueRegister].i(); }
- void setArgumentCount(int count) { this[RegisterFile::ArgumentCount] = count; }
- void setCallee(JSFunction* callee) { this[RegisterFile::Callee] = callee; }
void setCalleeArguments(Arguments* arguments) { this[RegisterFile::OptionalCalleeArguments] = arguments; }
void setCallerFrame(CallFrame* callerFrame) { this[RegisterFile::CallerFrame] = callerFrame; }
- void setCodeBlock(CodeBlock* codeBlock) { this[RegisterFile::CodeBlock] = codeBlock; }
void setScopeChain(ScopeChainNode* scopeChain) { this[RegisterFile::ScopeChain] = scopeChain; }
ALWAYS_INLINE void init(CodeBlock* codeBlock, Instruction* vPC, ScopeChainNode* scopeChain,
@@ -135,6 +123,19 @@
setCalleeArguments(0);
}
+ private:
+ friend class Arguments;
+ friend class JSActivation;
+ friend class JSGlobalObject;
+ friend class Interpreter;
+ friend struct CallFrameClosure;
+
+ int returnValueRegister() const { return this[RegisterFile::ReturnValueRegister].i(); }
+
+ void setArgumentCount(int count) { this[RegisterFile::ArgumentCount] = count; }
+ void setCallee(JSFunction* callee) { this[RegisterFile::Callee] = callee; }
+ void setCodeBlock(CodeBlock* codeBlock) { this[RegisterFile::CodeBlock] = codeBlock; }
+
static const intptr_t HostCallFrameFlag = 1;
static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); }
diff --git a/JavaScriptCore/interpreter/Interpreter.h b/JavaScriptCore/interpreter/Interpreter.h
index 6b621ef..a0b2e65 100644
--- a/JavaScriptCore/interpreter/Interpreter.h
+++ b/JavaScriptCore/interpreter/Interpreter.h
@@ -67,7 +67,6 @@
class Interpreter : public WTF::FastAllocBase {
friend class JIT;
- friend class JITStubs;
friend class CachedCall;
public:
Interpreter();
@@ -108,6 +107,10 @@
void setSampler(SamplingTool* sampler) { m_sampler = sampler; }
SamplingTool* sampler() { return m_sampler; }
+ NEVER_INLINE JSValue callEval(CallFrame*, RegisterFile*, Register* argv, int argc, int registerOffset, JSValue& exceptionValue);
+ NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue&, unsigned bytecodeOffset, bool);
+ NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine);
+
private:
enum ExecutionFlag { Normal, InitializeAndReturn };
@@ -115,10 +118,8 @@
void endRepeatCall(CallFrameClosure&);
JSValue execute(CallFrameClosure&, JSValue* exception);
- NEVER_INLINE JSValue callEval(CallFrame*, RegisterFile*, Register* argv, int argc, int registerOffset, JSValue& exceptionValue);
JSValue execute(EvalNode*, CallFrame*, JSObject* thisObject, int globalRegisterOffset, ScopeChainNode*, JSValue* exception);
- NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine);
#if USE(INTERPRETER)
NEVER_INLINE bool resolve(CallFrame*, Instruction*, JSValue& exceptionValue);
NEVER_INLINE bool resolveSkip(CallFrame*, Instruction*, JSValue& exceptionValue);
@@ -135,7 +136,6 @@
#endif
NEVER_INLINE bool unwindCallFrame(CallFrame*&, JSValue, unsigned& bytecodeOffset, CodeBlock*&);
- NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue&, unsigned bytecodeOffset, bool);
static ALWAYS_INLINE CallFrame* slideRegisterWindowForCall(CodeBlock*, RegisterFile*, CallFrame*, size_t registerOffset, int argc);
diff --git a/JavaScriptCore/interpreter/Register.h b/JavaScriptCore/interpreter/Register.h
index 6bcec28..cceac74 100644
--- a/JavaScriptCore/interpreter/Register.h
+++ b/JavaScriptCore/interpreter/Register.h
@@ -30,6 +30,7 @@
#define Register_h
#include "JSValue.h"
+#include <wtf/Assertions.h>
#include <wtf/VectorTraits.h>
namespace JSC {
@@ -50,23 +51,25 @@
public:
Register();
Register(JSValue);
+ Register(Arguments*);
JSValue jsValue() const;
bool marked() const;
void mark();
+ int32_t i() const;
+ void* v() const;
+
private:
friend class ExecState;
friend class Interpreter;
- friend class JITStubs;
// Only CallFrame, Interpreter, and JITStubs should use these functions.
Register(intptr_t);
Register(JSActivation*);
- Register(Arguments*);
Register(CallFrame*);
Register(CodeBlock*);
Register(JSFunction*);
@@ -74,9 +77,6 @@
Register(ScopeChainNode*);
Register(Instruction*);
- intptr_t i() const;
- void* v() const;
-
JSActivation* activation() const;
Arguments* arguments() const;
CallFrame* callFrame() const;
@@ -173,12 +173,16 @@
ALWAYS_INLINE Register::Register(intptr_t i)
{
+ // See comment on 'i()' below.
+ ASSERT(i == static_cast<int32_t>(i));
u.i = i;
}
- ALWAYS_INLINE intptr_t Register::i() const
+ // Read 'i' as a 32-bit integer; we only use it to hold 32-bit values,
+ // and we only write 32-bits when writing the arg count from JIT code.
+ ALWAYS_INLINE int32_t Register::i() const
{
- return u.i;
+ return static_cast<int32_t>(u.i);
}
ALWAYS_INLINE void* Register::v() const
diff --git a/JavaScriptCore/jit/JITStubs.cpp b/JavaScriptCore/jit/JITStubs.cpp
index 0dcee14..9254d40 100644
--- a/JavaScriptCore/jit/JITStubs.cpp
+++ b/JavaScriptCore/jit/JITStubs.cpp
@@ -101,14 +101,14 @@
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
#if USE(JIT_STUB_ARGUMENT_VA_LIST)
- "call " SYMBOL_STRING(_ZN3JSC8JITStubs12cti_vm_throwEPvz) "\n"
+ "call " SYMBOL_STRING(cti_vm_throw) "\n"
#else
#if USE(JIT_STUB_ARGUMENT_REGISTER)
"movl %esp, %ecx" "\n"
#else // JIT_STUB_ARGUMENT_STACK
"movl %esp, 0(%esp)" "\n"
#endif
- "call " SYMBOL_STRING(_ZN3JSC8JITStubs12cti_vm_throwEPPv) "\n"
+ "call " SYMBOL_STRING(cti_vm_throw) "\n"
#endif
"addl $0x1c, %esp" "\n"
"popl %ebx" "\n"
@@ -163,7 +163,7 @@
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
#if USE(JIT_STUB_ARGUMENT_REGISTER)
"movq %rsp, %rdi" "\n"
- "call " SYMBOL_STRING(_ZN3JSC8JITStubs12cti_vm_throwEPPv) "\n"
+ "call " SYMBOL_STRING(cti_vm_throw) "\n"
#else // JIT_STUB_ARGUMENT_VA_LIST or JIT_STUB_ARGUMENT_STACK
#error "JIT_STUB_ARGUMENT configuration not supported."
#endif
@@ -217,7 +217,7 @@
#else // JIT_STUB_ARGUMENT_VA_LIST or JIT_STUB_ARGUMENT_STACK
#error "JIT_STUB_ARGUMENT configuration not supported."
#endif
- call JSC::JITStubs::cti_vm_throw;
+ call cti_vm_throw;
add esp, 0x1c;
pop ebx;
pop edi;
@@ -237,7 +237,7 @@
#define CTI_SAMPLER 0
#endif
-JITStubs::JITStubs(JSGlobalData* globalData)
+JITThunks::JITThunks(JSGlobalData* globalData)
: m_ctiArrayLengthTrampoline(0)
, m_ctiStringLengthTrampoline(0)
, m_ctiVirtualCallPreLink(0)
@@ -250,7 +250,7 @@
#if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
-NEVER_INLINE void JITStubs::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue baseValue, const PutPropertySlot& slot)
+NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue baseValue, const PutPropertySlot& slot)
{
// The interpreter checks for recursion here; I do not believe this can occur in CTI.
@@ -294,7 +294,7 @@
JIT::patchPutByIdReplace(stubInfo, structure, slot.cachedOffset(), returnAddress);
}
-NEVER_INLINE void JITStubs::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot)
+NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot)
{
// FIXME: Write a test that proves we need to check for recursion here just
// like the interpreter does, then add a check for recursion.
@@ -468,8 +468,11 @@
} \
} while (0)
+namespace JITStubs {
-JSObject* JITStubs::cti_op_convert_this(STUB_ARGS_DECLARATION)
+#define DEFINE_STUB_FUNCTION(rtype, op) rtype cti_##op(STUB_ARGS_DECLARATION)
+
+DEFINE_STUB_FUNCTION(JSObject*, op_convert_this)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -481,7 +484,7 @@
return result;
}
-void JITStubs::cti_op_end(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_end)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -490,7 +493,7 @@
scopeChain->deref();
}
-EncodedJSValue JITStubs::cti_op_add(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_add)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -535,7 +538,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_pre_inc(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_pre_inc)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -547,7 +550,7 @@
return JSValue::encode(result);
}
-int JITStubs::cti_timeout_check(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(int, timeout_check)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -562,11 +565,11 @@
return timeoutChecker.ticksUntilNextCheck();
}
-void JITStubs::cti_register_file_check(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, register_file_check)
{
STUB_INIT_STACK_FRAME(stackFrame);
- if (LIKELY(stackFrame.registerFile->grow(stackFrame.callFrame + stackFrame.callFrame->codeBlock()->m_numCalleeRegisters)))
+ if (LIKELY(stackFrame.registerFile->grow(&stackFrame.callFrame->registers()[stackFrame.callFrame->codeBlock()->m_numCalleeRegisters])))
return;
// Rewind to the previous call frame because op_call already optimistically
@@ -576,7 +579,7 @@
throwStackOverflowError(oldCallFrame, stackFrame.globalData, oldCallFrame->returnPC(), STUB_RETURN_ADDRESS);
}
-int JITStubs::cti_op_loop_if_less(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(int, op_loop_if_less)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -589,7 +592,7 @@
return result;
}
-int JITStubs::cti_op_loop_if_lesseq(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(int, op_loop_if_lesseq)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -602,14 +605,14 @@
return result;
}
-JSObject* JITStubs::cti_op_new_object(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSObject*, op_new_object)
{
STUB_INIT_STACK_FRAME(stackFrame);
return constructEmptyObject(stackFrame.callFrame);
}
-void JITStubs::cti_op_put_by_id_generic(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_put_by_id_generic)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -618,7 +621,7 @@
CHECK_FOR_EXCEPTION_AT_END();
}
-EncodedJSValue JITStubs::cti_op_get_by_id_generic(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_generic)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -635,7 +638,7 @@
#if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
-void JITStubs::cti_op_put_by_id(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_put_by_id)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -650,17 +653,17 @@
CHECK_FOR_EXCEPTION_AT_END();
}
-void JITStubs::cti_op_put_by_id_second(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_put_by_id_second)
{
STUB_INIT_STACK_FRAME(stackFrame);
PutPropertySlot slot;
stackFrame.args[0].jsValue().put(stackFrame.callFrame, stackFrame.args[1].identifier(), stackFrame.args[2].jsValue(), slot);
- tryCachePutByID(stackFrame.callFrame, stackFrame.callFrame->codeBlock(), STUB_RETURN_ADDRESS, stackFrame.args[0].jsValue(), slot);
+ JITThunks::tryCachePutByID(stackFrame.callFrame, stackFrame.callFrame->codeBlock(), STUB_RETURN_ADDRESS, stackFrame.args[0].jsValue(), slot);
CHECK_FOR_EXCEPTION_AT_END();
}
-void JITStubs::cti_op_put_by_id_fail(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_put_by_id_fail)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -673,7 +676,7 @@
CHECK_FOR_EXCEPTION_AT_END();
}
-EncodedJSValue JITStubs::cti_op_get_by_id(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -690,7 +693,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_get_by_id_method_check(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -707,7 +710,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_get_by_id_method_check_second(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check_second)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -772,7 +775,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_get_by_id_second(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_second)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -783,13 +786,13 @@
PropertySlot slot(baseValue);
JSValue result = baseValue.get(callFrame, ident, slot);
- tryCacheGetByID(callFrame, callFrame->codeBlock(), STUB_RETURN_ADDRESS, baseValue, ident, slot);
+ JITThunks::tryCacheGetByID(callFrame, callFrame->codeBlock(), STUB_RETURN_ADDRESS, baseValue, ident, slot);
CHECK_FOR_EXCEPTION_AT_END();
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_get_by_id_self_fail(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_self_fail)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -864,7 +867,7 @@
return prototypeStructureList;
}
-EncodedJSValue JITStubs::cti_op_get_by_id_proto_list(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -916,7 +919,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_get_by_id_proto_list_full(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list_full)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -928,7 +931,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_get_by_id_proto_fail(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_fail)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -940,7 +943,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_get_by_id_array_fail(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_array_fail)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -952,7 +955,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_get_by_id_string_fail(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_string_fail)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -966,7 +969,7 @@
#endif
-EncodedJSValue JITStubs::cti_op_instanceof(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_instanceof)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1009,7 +1012,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_del_by_id(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_del_by_id)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1022,7 +1025,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_mul(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_mul)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1040,14 +1043,14 @@
return JSValue::encode(result);
}
-JSObject* JITStubs::cti_op_new_func(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSObject*, op_new_func)
{
STUB_INIT_STACK_FRAME(stackFrame);
return stackFrame.args[0].funcDeclNode()->makeFunction(stackFrame.callFrame, stackFrame.callFrame->scopeChain());
}
-void* JITStubs::cti_op_call_JSFunction(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void*, op_call_JSFunction)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1064,7 +1067,7 @@
return &(body->generatedBytecode());
}
-VoidPtrPair JITStubs::cti_op_call_arityCheck(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(VoidPtrPair, op_call_arityCheck)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1109,7 +1112,7 @@
RETURN_POINTER_PAIR(newCodeBlock, callFrame);
}
-void* JITStubs::cti_vm_dontLazyLinkCall(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void*, vm_dontLazyLinkCall)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1121,7 +1124,7 @@
return callee->body()->generatedJITCode().addressForCall();
}
-void* JITStubs::cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void*, vm_lazyLinkCall)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1138,7 +1141,7 @@
return jitCode.addressForCall();
}
-JSObject* JITStubs::cti_op_push_activation(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSObject*, op_push_activation)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1147,7 +1150,7 @@
return activation;
}
-EncodedJSValue JITStubs::cti_op_call_NotJSFunction(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_call_NotJSFunction)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1196,7 +1199,7 @@
VM_THROW_EXCEPTION();
}
-void JITStubs::cti_op_create_arguments(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_create_arguments)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1205,7 +1208,7 @@
stackFrame.callFrame[RegisterFile::ArgumentsRegister] = arguments;
}
-void JITStubs::cti_op_create_arguments_no_params(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_create_arguments_no_params)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1214,7 +1217,7 @@
stackFrame.callFrame[RegisterFile::ArgumentsRegister] = arguments;
}
-void JITStubs::cti_op_tear_off_activation(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_tear_off_activation)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1222,7 +1225,7 @@
asActivation(stackFrame.args[0].jsValue())->copyRegisters(stackFrame.callFrame->optionalCalleeArguments());
}
-void JITStubs::cti_op_tear_off_arguments(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_tear_off_arguments)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1231,7 +1234,7 @@
stackFrame.callFrame->optionalCalleeArguments()->copyRegisters();
}
-void JITStubs::cti_op_profile_will_call(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_profile_will_call)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1239,7 +1242,7 @@
(*stackFrame.enabledProfilerReference)->willExecute(stackFrame.callFrame, stackFrame.args[0].jsValue());
}
-void JITStubs::cti_op_profile_did_call(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_profile_did_call)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1247,7 +1250,7 @@
(*stackFrame.enabledProfilerReference)->didExecute(stackFrame.callFrame, stackFrame.args[0].jsValue());
}
-void JITStubs::cti_op_ret_scopeChain(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_ret_scopeChain)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1255,7 +1258,7 @@
stackFrame.callFrame->scopeChain()->deref();
}
-JSObject* JITStubs::cti_op_new_array(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSObject*, op_new_array)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1263,7 +1266,7 @@
return constructArray(stackFrame.callFrame, argList);
}
-EncodedJSValue JITStubs::cti_op_resolve(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1291,7 +1294,7 @@
VM_THROW_EXCEPTION();
}
-JSObject* JITStubs::cti_op_construct_JSConstruct(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSObject*, op_construct_JSConstruct)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1317,7 +1320,7 @@
return new (stackFrame.globalData) JSObject(structure);
}
-EncodedJSValue JITStubs::cti_op_construct_NotJSConstruct(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_construct_NotJSConstruct)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1351,7 +1354,7 @@
VM_THROW_EXCEPTION();
}
-EncodedJSValue JITStubs::cti_op_get_by_val(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_val)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1390,7 +1393,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_get_by_val_string(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_val_string)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1421,7 +1424,7 @@
}
-EncodedJSValue JITStubs::cti_op_get_by_val_byte_array(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_val_byte_array)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1452,7 +1455,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_resolve_func(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_func)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1496,7 +1499,7 @@
return JSValue::encode(JSValue());
}
-EncodedJSValue JITStubs::cti_op_sub(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_sub)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1514,7 +1517,7 @@
return JSValue::encode(result);
}
-void JITStubs::cti_op_put_by_val(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_put_by_val)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1562,7 +1565,7 @@
CHECK_FOR_EXCEPTION_AT_END();
}
-void JITStubs::cti_op_put_by_val_array(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_put_by_val_array)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1589,7 +1592,7 @@
CHECK_FOR_EXCEPTION_AT_END();
}
-void JITStubs::cti_op_put_by_val_byte_array(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_put_by_val_byte_array)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1632,7 +1635,7 @@
CHECK_FOR_EXCEPTION_AT_END();
}
-EncodedJSValue JITStubs::cti_op_lesseq(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_lesseq)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1642,7 +1645,7 @@
return JSValue::encode(result);
}
-int JITStubs::cti_op_loop_if_true(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(int, op_loop_if_true)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1655,16 +1658,16 @@
return result;
}
-int JITStubs::cti_op_load_varargs(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(int, op_load_varargs)
{
STUB_INIT_STACK_FRAME(stackFrame);
CallFrame* callFrame = stackFrame.callFrame;
RegisterFile* registerFile = stackFrame.registerFile;
int argsOffset = stackFrame.args[0].int32();
- JSValue arguments = callFrame[argsOffset].jsValue();
+ JSValue arguments = callFrame->registers()[argsOffset].jsValue();
uint32_t argCount = 0;
if (!arguments) {
- int providedParams = callFrame[RegisterFile::ArgumentCount].u.i - 1;
+ int providedParams = callFrame->registers()[RegisterFile::ArgumentCount].i() - 1;
argCount = providedParams;
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
@@ -1672,7 +1675,7 @@
stackFrame.globalData->exception = createStackOverflowError(callFrame);
VM_THROW_EXCEPTION();
}
- int32_t expectedParams = asFunction(callFrame[RegisterFile::Callee].jsValue())->body()->parameterCount();
+ int32_t expectedParams = asFunction(callFrame->registers()[RegisterFile::Callee].jsValue())->body()->parameterCount();
int32_t inplaceArgs = min(providedParams, expectedParams);
Register* inplaceArgsDst = callFrame->registers() + argsOffset;
@@ -1743,7 +1746,7 @@
return argCount + 1;
}
-EncodedJSValue JITStubs::cti_op_negate(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_negate)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1759,14 +1762,14 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_resolve_base(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_base)
{
STUB_INIT_STACK_FRAME(stackFrame);
return JSValue::encode(JSC::resolveBase(stackFrame.callFrame, stackFrame.args[0].identifier(), stackFrame.callFrame->scopeChain()));
}
-EncodedJSValue JITStubs::cti_op_resolve_skip(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_skip)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1799,7 +1802,7 @@
VM_THROW_EXCEPTION();
}
-EncodedJSValue JITStubs::cti_op_resolve_global(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_global)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1831,7 +1834,7 @@
VM_THROW_EXCEPTION();
}
-EncodedJSValue JITStubs::cti_op_div(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_div)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1849,7 +1852,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_pre_dec(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_pre_dec)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1861,7 +1864,7 @@
return JSValue::encode(result);
}
-int JITStubs::cti_op_jless(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(int, op_jless)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1874,7 +1877,7 @@
return result;
}
-int JITStubs::cti_op_jlesseq(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(int, op_jlesseq)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1887,7 +1890,7 @@
return result;
}
-EncodedJSValue JITStubs::cti_op_not(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_not)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1900,7 +1903,7 @@
return JSValue::encode(result);
}
-int JITStubs::cti_op_jtrue(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(int, op_jtrue)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1913,7 +1916,7 @@
return result;
}
-EncodedJSValue JITStubs::cti_op_post_inc(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_post_inc)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1928,7 +1931,7 @@
return JSValue::encode(number);
}
-EncodedJSValue JITStubs::cti_op_eq(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_eq)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1943,7 +1946,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_lshift(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_lshift)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1963,7 +1966,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_bitand(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_bitand)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -1981,7 +1984,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_rshift(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_rshift)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2001,7 +2004,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_bitnot(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_bitnot)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2017,7 +2020,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_resolve_with_base(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_with_base)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2053,14 +2056,14 @@
return JSValue::encode(JSValue());
}
-JSObject* JITStubs::cti_op_new_func_exp(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSObject*, op_new_func_exp)
{
STUB_INIT_STACK_FRAME(stackFrame);
return stackFrame.args[0].funcExprNode()->makeFunction(stackFrame.callFrame, stackFrame.callFrame->scopeChain());
}
-EncodedJSValue JITStubs::cti_op_mod(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_mod)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2074,7 +2077,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_less(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_less)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2084,7 +2087,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_neq(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_neq)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2099,7 +2102,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_post_dec(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_post_dec)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2114,7 +2117,7 @@
return JSValue::encode(number);
}
-EncodedJSValue JITStubs::cti_op_urshift(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_urshift)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2132,7 +2135,7 @@
}
}
-EncodedJSValue JITStubs::cti_op_bitxor(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_bitxor)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2146,14 +2149,14 @@
return JSValue::encode(result);
}
-JSObject* JITStubs::cti_op_new_regexp(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSObject*, op_new_regexp)
{
STUB_INIT_STACK_FRAME(stackFrame);
return new (stackFrame.globalData) RegExpObject(stackFrame.callFrame->lexicalGlobalObject()->regExpStructure(), stackFrame.args[0].regExp());
}
-EncodedJSValue JITStubs::cti_op_bitor(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_bitor)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2167,7 +2170,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_call_eval(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_call_eval)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2198,7 +2201,7 @@
return JSValue::encode(JSValue());
}
-EncodedJSValue JITStubs::cti_op_throw(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2224,14 +2227,14 @@
return JSValue::encode(exceptionValue);
}
-JSPropertyNameIterator* JITStubs::cti_op_get_pnames(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSPropertyNameIterator*, op_get_pnames)
{
STUB_INIT_STACK_FRAME(stackFrame);
return JSPropertyNameIterator::create(stackFrame.callFrame, stackFrame.args[0].jsValue());
}
-EncodedJSValue JITStubs::cti_op_next_pname(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_next_pname)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2242,7 +2245,7 @@
return JSValue::encode(temp);
}
-JSObject* JITStubs::cti_op_push_scope(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSObject*, op_push_scope)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2252,21 +2255,21 @@
return o;
}
-void JITStubs::cti_op_pop_scope(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_pop_scope)
{
STUB_INIT_STACK_FRAME(stackFrame);
stackFrame.callFrame->setScopeChain(stackFrame.callFrame->scopeChain()->pop());
}
-EncodedJSValue JITStubs::cti_op_typeof(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_typeof)
{
STUB_INIT_STACK_FRAME(stackFrame);
return JSValue::encode(jsTypeStringForValue(stackFrame.callFrame, stackFrame.args[0].jsValue()));
}
-EncodedJSValue JITStubs::cti_op_is_undefined(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_is_undefined)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2274,42 +2277,42 @@
return JSValue::encode(jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined()));
}
-EncodedJSValue JITStubs::cti_op_is_boolean(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_is_boolean)
{
STUB_INIT_STACK_FRAME(stackFrame);
return JSValue::encode(jsBoolean(stackFrame.args[0].jsValue().isBoolean()));
}
-EncodedJSValue JITStubs::cti_op_is_number(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_is_number)
{
STUB_INIT_STACK_FRAME(stackFrame);
return JSValue::encode(jsBoolean(stackFrame.args[0].jsValue().isNumber()));
}
-EncodedJSValue JITStubs::cti_op_is_string(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_is_string)
{
STUB_INIT_STACK_FRAME(stackFrame);
return JSValue::encode(jsBoolean(isJSString(stackFrame.globalData, stackFrame.args[0].jsValue())));
}
-EncodedJSValue JITStubs::cti_op_is_object(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_is_object)
{
STUB_INIT_STACK_FRAME(stackFrame);
return JSValue::encode(jsBoolean(jsIsObjectType(stackFrame.args[0].jsValue())));
}
-EncodedJSValue JITStubs::cti_op_is_function(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_is_function)
{
STUB_INIT_STACK_FRAME(stackFrame);
return JSValue::encode(jsBoolean(jsIsFunctionType(stackFrame.args[0].jsValue())));
}
-EncodedJSValue JITStubs::cti_op_stricteq(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_stricteq)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2319,21 +2322,21 @@
return JSValue::encode(jsBoolean(JSValue::strictEqual(src1, src2)));
}
-EncodedJSValue JITStubs::cti_op_to_primitive(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_to_primitive)
{
STUB_INIT_STACK_FRAME(stackFrame);
return JSValue::encode(stackFrame.args[0].jsValue().toPrimitive(stackFrame.callFrame));
}
-EncodedJSValue JITStubs::cti_op_strcat(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_strcat)
{
STUB_INIT_STACK_FRAME(stackFrame);
return JSValue::encode(concatenateStrings(stackFrame.callFrame, &stackFrame.callFrame->registers()[stackFrame.args[0].int32()], stackFrame.args[1].int32()));
}
-EncodedJSValue JITStubs::cti_op_nstricteq(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_nstricteq)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2343,7 +2346,7 @@
return JSValue::encode(jsBoolean(!JSValue::strictEqual(src1, src2)));
}
-EncodedJSValue JITStubs::cti_op_to_jsnumber(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_to_jsnumber)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2355,7 +2358,7 @@
return JSValue::encode(result);
}
-EncodedJSValue JITStubs::cti_op_in(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_in)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2382,7 +2385,7 @@
return JSValue::encode(jsBoolean(baseObj->hasProperty(callFrame, property)));
}
-JSObject* JITStubs::cti_op_push_new_scope(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSObject*, op_push_new_scope)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2393,7 +2396,7 @@
return scope;
}
-void JITStubs::cti_op_jmp_scopes(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_jmp_scopes)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2406,7 +2409,7 @@
callFrame->setScopeChain(tmp);
}
-void JITStubs::cti_op_put_by_index(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_put_by_index)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2416,7 +2419,7 @@
stackFrame.args[0].jsValue().put(callFrame, property, stackFrame.args[2].jsValue());
}
-void* JITStubs::cti_op_switch_imm(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void*, op_switch_imm)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2437,7 +2440,7 @@
}
}
-void* JITStubs::cti_op_switch_char(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void*, op_switch_char)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2457,7 +2460,7 @@
return result;
}
-void* JITStubs::cti_op_switch_string(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void*, op_switch_string)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2476,7 +2479,7 @@
return result;
}
-EncodedJSValue JITStubs::cti_op_del_by_val(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, op_del_by_val)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2501,7 +2504,7 @@
return JSValue::encode(result);
}
-void JITStubs::cti_op_put_getter(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_put_getter)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2513,7 +2516,7 @@
baseObj->defineGetter(callFrame, stackFrame.args[1].identifier(), asObject(stackFrame.args[2].jsValue()));
}
-void JITStubs::cti_op_put_setter(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_put_setter)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2525,7 +2528,7 @@
baseObj->defineSetter(callFrame, stackFrame.args[1].identifier(), asObject(stackFrame.args[2].jsValue()));
}
-JSObject* JITStubs::cti_op_new_error(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(JSObject*, op_new_error)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2539,7 +2542,7 @@
return Error::create(callFrame, static_cast<ErrorType>(type), message.toString(callFrame), lineNumber, codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL());
}
-void JITStubs::cti_op_debug(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(void, op_debug)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2552,7 +2555,7 @@
stackFrame.globalData->interpreter->debug(callFrame, static_cast<DebugHookID>(debugHookID), firstLine, lastLine);
}
-EncodedJSValue JITStubs::cti_vm_throw(STUB_ARGS_DECLARATION)
+DEFINE_STUB_FUNCTION(EncodedJSValue, vm_throw)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -2580,6 +2583,8 @@
return JSValue::encode(exceptionValue);
}
+} // namespace JITStubs
+
} // namespace JSC
#endif // ENABLE(JIT)
diff --git a/JavaScriptCore/jit/JITStubs.h b/JavaScriptCore/jit/JITStubs.h
index 726892c..d985624 100644
--- a/JavaScriptCore/jit/JITStubs.h
+++ b/JavaScriptCore/jit/JITStubs.h
@@ -167,123 +167,9 @@
#endif
void* code, RegisterFile*, CallFrame*, JSValue* exception, Profiler**, JSGlobalData*);
- class JITStubs {
+ class JITThunks {
public:
- JITStubs(JSGlobalData*);
-
- static void JIT_STUB cti_op_create_arguments(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_create_arguments_no_params(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_debug(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_end(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_jmp_scopes(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_pop_scope(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_profile_did_call(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_profile_will_call(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_put_by_id(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_put_by_id_fail(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_put_by_id_generic(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_put_by_id_second(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_put_by_index(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_put_by_val(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_put_by_val_array(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_put_by_val_byte_array(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_put_getter(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_put_setter(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_ret_scopeChain(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_tear_off_activation(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_op_tear_off_arguments(STUB_ARGS_DECLARATION);
- static void JIT_STUB cti_register_file_check(STUB_ARGS_DECLARATION);
- static int JIT_STUB cti_op_jless(STUB_ARGS_DECLARATION);
- static int JIT_STUB cti_op_jlesseq(STUB_ARGS_DECLARATION);
- static int JIT_STUB cti_op_jtrue(STUB_ARGS_DECLARATION);
- static int JIT_STUB cti_op_load_varargs(STUB_ARGS_DECLARATION);
- static int JIT_STUB cti_op_loop_if_less(STUB_ARGS_DECLARATION);
- static int JIT_STUB cti_op_loop_if_lesseq(STUB_ARGS_DECLARATION);
- static int JIT_STUB cti_op_loop_if_true(STUB_ARGS_DECLARATION);
- static int JIT_STUB cti_timeout_check(STUB_ARGS_DECLARATION);
- static void* JIT_STUB cti_op_call_JSFunction(STUB_ARGS_DECLARATION);
- static void* JIT_STUB cti_op_switch_char(STUB_ARGS_DECLARATION);
- static void* JIT_STUB cti_op_switch_imm(STUB_ARGS_DECLARATION);
- static void* JIT_STUB cti_op_switch_string(STUB_ARGS_DECLARATION);
- static void* JIT_STUB cti_vm_dontLazyLinkCall(STUB_ARGS_DECLARATION);
- static void* JIT_STUB cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_construct_JSConstruct(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_convert_this(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_new_error(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_new_func(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_new_func_exp(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_new_object(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_new_regexp(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_push_activation(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_push_new_scope(STUB_ARGS_DECLARATION);
- static JSObject* JIT_STUB cti_op_push_scope(STUB_ARGS_DECLARATION);
- static JSPropertyNameIterator* JIT_STUB cti_op_get_pnames(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_add(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_bitand(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_bitnot(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_bitor(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_bitxor(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_call_NotJSFunction(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_call_eval(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_construct_NotJSConstruct(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_del_by_id(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_del_by_val(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_div(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_eq(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id_method_check(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id_method_check_second(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id_array_fail(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id_generic(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id_proto_fail(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id_proto_list(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id_proto_list_full(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id_second(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id_self_fail(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_id_string_fail(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_val(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_val_byte_array(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_get_by_val_string(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_in(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_instanceof(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_is_boolean(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_is_function(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_is_number(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_is_object(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_is_string(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_is_undefined(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_less(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_lesseq(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_lshift(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_mod(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_mul(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_negate(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_neq(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_next_pname(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_not(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_nstricteq(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_pre_dec(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_pre_inc(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_resolve(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_resolve_base(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_resolve_global(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_resolve_skip(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_rshift(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_strcat(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_stricteq(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_sub(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_throw(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_to_jsnumber(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_to_primitive(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_typeof(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_urshift(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_post_dec(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_post_inc(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_resolve_func(STUB_ARGS_DECLARATION);
- static EncodedJSValue JIT_STUB cti_op_resolve_with_base(STUB_ARGS_DECLARATION);
- static VoidPtrPair JIT_STUB cti_op_call_arityCheck(STUB_ARGS_DECLARATION);
+ JITThunks(JSGlobalData*);
static void tryCacheGetByID(CallFrame*, CodeBlock*, void* returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot&);
static void tryCachePutByID(CallFrame*, CodeBlock*, void* returnAddress, JSValue baseValue, const PutPropertySlot&);
@@ -306,6 +192,124 @@
void* m_ctiNativeCallThunk;
};
+namespace JITStubs { extern "C" {
+
+ void JIT_STUB cti_op_create_arguments(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_create_arguments_no_params(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_debug(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_end(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_jmp_scopes(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_pop_scope(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_profile_did_call(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_profile_will_call(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_put_by_id(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_put_by_id_fail(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_put_by_id_generic(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_put_by_id_second(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_put_by_index(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_put_by_val(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_put_by_val_array(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_put_by_val_byte_array(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_put_getter(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_put_setter(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_ret_scopeChain(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_tear_off_activation(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_op_tear_off_arguments(STUB_ARGS_DECLARATION);
+ void JIT_STUB cti_register_file_check(STUB_ARGS_DECLARATION);
+ int JIT_STUB cti_op_jless(STUB_ARGS_DECLARATION);
+ int JIT_STUB cti_op_jlesseq(STUB_ARGS_DECLARATION);
+ int JIT_STUB cti_op_jtrue(STUB_ARGS_DECLARATION);
+ int JIT_STUB cti_op_load_varargs(STUB_ARGS_DECLARATION);
+ int JIT_STUB cti_op_loop_if_less(STUB_ARGS_DECLARATION);
+ int JIT_STUB cti_op_loop_if_lesseq(STUB_ARGS_DECLARATION);
+ int JIT_STUB cti_op_loop_if_true(STUB_ARGS_DECLARATION);
+ int JIT_STUB cti_timeout_check(STUB_ARGS_DECLARATION);
+ void* JIT_STUB cti_op_call_JSFunction(STUB_ARGS_DECLARATION);
+ void* JIT_STUB cti_op_switch_char(STUB_ARGS_DECLARATION);
+ void* JIT_STUB cti_op_switch_imm(STUB_ARGS_DECLARATION);
+ void* JIT_STUB cti_op_switch_string(STUB_ARGS_DECLARATION);
+ void* JIT_STUB cti_vm_dontLazyLinkCall(STUB_ARGS_DECLARATION);
+ void* JIT_STUB cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_construct_JSConstruct(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_convert_this(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_new_error(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_new_func(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_new_func_exp(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_new_object(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_new_regexp(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_push_activation(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_push_new_scope(STUB_ARGS_DECLARATION);
+ JSObject* JIT_STUB cti_op_push_scope(STUB_ARGS_DECLARATION);
+ JSPropertyNameIterator* JIT_STUB cti_op_get_pnames(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_add(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_bitand(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_bitnot(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_bitor(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_bitxor(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_call_NotJSFunction(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_call_eval(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_construct_NotJSConstruct(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_del_by_id(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_del_by_val(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_div(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_eq(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id_method_check(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id_method_check_second(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id_array_fail(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id_generic(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id_proto_fail(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id_proto_list(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id_proto_list_full(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id_second(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id_self_fail(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_id_string_fail(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_val(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_val_byte_array(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_get_by_val_string(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_in(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_instanceof(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_is_boolean(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_is_function(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_is_number(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_is_object(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_is_string(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_is_undefined(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_less(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_lesseq(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_lshift(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_mod(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_mul(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_negate(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_neq(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_next_pname(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_not(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_nstricteq(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_pre_dec(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_pre_inc(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_resolve(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_resolve_base(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_resolve_global(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_resolve_skip(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_rshift(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_strcat(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_stricteq(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_sub(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_throw(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_to_jsnumber(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_to_primitive(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_typeof(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_urshift(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_post_dec(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_post_inc(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_resolve_func(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_op_resolve_with_base(STUB_ARGS_DECLARATION);
+ VoidPtrPair JIT_STUB cti_op_call_arityCheck(STUB_ARGS_DECLARATION);
+
+}; } // extern "C" namespace JITStubs
+
} // namespace JSC
#endif // ENABLE(JIT)
diff --git a/JavaScriptCore/runtime/JSFunction.h b/JavaScriptCore/runtime/JSFunction.h
index c08239c..b27e515 100644
--- a/JavaScriptCore/runtime/JSFunction.h
+++ b/JavaScriptCore/runtime/JSFunction.h
@@ -39,7 +39,6 @@
class JSFunction : public InternalFunction {
friend class JIT;
- friend class JITStubs;
friend class VPtrSet;
typedef InternalFunction Base;
@@ -87,12 +86,13 @@
{
return *reinterpret_cast<NativeFunction*>(m_data);
}
- private:
- virtual const ClassInfo* classInfo() const { return &info; }
virtual ConstructType getConstructData(ConstructData&);
virtual CallType getCallData(CallData&);
+ private:
+ virtual const ClassInfo* classInfo() const { return &info; }
+
static JSValue argumentsGetter(ExecState*, const Identifier&, const PropertySlot&);
static JSValue callerGetter(ExecState*, const Identifier&, const PropertySlot&);
static JSValue lengthGetter(ExecState*, const Identifier&, const PropertySlot&);
diff --git a/JavaScriptCore/runtime/JSGlobalData.h b/JavaScriptCore/runtime/JSGlobalData.h
index 07a3c7a..e53746b 100644
--- a/JavaScriptCore/runtime/JSGlobalData.h
+++ b/JavaScriptCore/runtime/JSGlobalData.h
@@ -116,7 +116,7 @@
Parser* parser;
Interpreter* interpreter;
#if ENABLE(JIT)
- JITStubs jitStubs;
+ JITThunks jitStubs;
FunctionBodyNode* nativeFunctionThunk()
{
if (!lazyNativeFunctionThunk)