Changeset 43372 in webkit


Ignore:
Timestamp:
May 7, 2009, 3:52:19 PM (16 years ago)
Author:
[email protected]
Message:

Improve native call performance

Reviewed by Gavin Barraclough.

Fix the windows build by adding calling convention declarations everywhere,
chose fastcall as that seemed most sensible given we were having to declare
the convention explicitly. In addition switched to fastcall on mac in the
deluded belief that documented fastcall behavior on windows would match
actual its actual behavior.

Location:
trunk
Files:
46 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSCallbackFunction.h

    r43122 r43372  
    4949    virtual const ClassInfo* classInfo() const { return &info; }
    5050
    51     static JSValue call(ExecState*, JSObject*, JSValue, const ArgList&);
     51    static JSValue JSC_HOST_CALL call(ExecState*, JSObject*, JSValue, const ArgList&);
    5252
    5353    JSObjectCallAsFunctionCallback m_callback;
  • trunk/JavaScriptCore/API/JSCallbackObject.h

    r43122 r43372  
    8080    static JSCallbackObject* asCallbackObject(JSValue);
    8181 
    82     static JSValue call(ExecState*, JSObject* functionObject, JSValue thisValue, const ArgList&);
     82    static JSValue JSC_HOST_CALL call(ExecState*, JSObject* functionObject, JSValue thisValue, const ArgList&);
    8383    static JSObject* construct(ExecState*, JSObject* constructor, const ArgList&);
    8484   
  • trunk/JavaScriptCore/ChangeLog

    r43371 r43372  
     12009-05-07  Oliver Hunt  <[email protected]>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        Improve native call performance
     6
     7        Fix the windows build by adding calling convention declarations everywhere,
     8        chose fastcall as that seemed most sensible given we were having to declare
     9        the convention explicitly.  In addition switched to fastcall on mac in the
     10        deluded belief that documented fastcall behavior on windows would match
     11        actual its actual behavior.
     12
     13        * API/JSCallbackFunction.h:
     14        * API/JSCallbackObject.h:
     15        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
     16        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
     17        * interpreter/CallFrame.h:
     18        (JSC::ExecState::argumentCount):
     19        * jit/JIT.cpp:
     20        (JSC::JIT::privateCompileCTIMachineTrampolines):
     21        * jsc.cpp:
     22        (functionPrint):
     23        (functionDebug):
     24        (functionGC):
     25        (functionVersion):
     26        (functionRun):
     27        (functionLoad):
     28        (functionSetSamplingFlags):
     29        (functionClearSamplingFlags):
     30        (functionReadline):
     31        (functionQuit):
     32        * runtime/ArrayConstructor.cpp:
     33        (JSC::callArrayConstructor):
     34        * runtime/ArrayPrototype.cpp:
     35        (JSC::arrayProtoFuncToString):
     36        (JSC::arrayProtoFuncToLocaleString):
     37        (JSC::arrayProtoFuncJoin):
     38        (JSC::arrayProtoFuncConcat):
     39        (JSC::arrayProtoFuncPop):
     40        (JSC::arrayProtoFuncPush):
     41        (JSC::arrayProtoFuncReverse):
     42        (JSC::arrayProtoFuncShift):
     43        (JSC::arrayProtoFuncSlice):
     44        (JSC::arrayProtoFuncSort):
     45        (JSC::arrayProtoFuncSplice):
     46        (JSC::arrayProtoFuncUnShift):
     47        (JSC::arrayProtoFuncFilter):
     48        (JSC::arrayProtoFuncMap):
     49        (JSC::arrayProtoFuncEvery):
     50        (JSC::arrayProtoFuncForEach):
     51        (JSC::arrayProtoFuncSome):
     52        (JSC::arrayProtoFuncReduce):
     53        (JSC::arrayProtoFuncReduceRight):
     54        (JSC::arrayProtoFuncIndexOf):
     55        (JSC::arrayProtoFuncLastIndexOf):
     56        * runtime/BooleanConstructor.cpp:
     57        (JSC::callBooleanConstructor):
     58        * runtime/BooleanPrototype.cpp:
     59        (JSC::booleanProtoFuncToString):
     60        (JSC::booleanProtoFuncValueOf):
     61        * runtime/CallData.h:
     62        * runtime/DateConstructor.cpp:
     63        (JSC::callDate):
     64        (JSC::dateParse):
     65        (JSC::dateNow):
     66        (JSC::dateUTC):
     67        * runtime/DatePrototype.cpp:
     68        (JSC::dateProtoFuncToString):
     69        (JSC::dateProtoFuncToUTCString):
     70        (JSC::dateProtoFuncToDateString):
     71        (JSC::dateProtoFuncToTimeString):
     72        (JSC::dateProtoFuncToLocaleString):
     73        (JSC::dateProtoFuncToLocaleDateString):
     74        (JSC::dateProtoFuncToLocaleTimeString):
     75        (JSC::dateProtoFuncGetTime):
     76        (JSC::dateProtoFuncGetFullYear):
     77        (JSC::dateProtoFuncGetUTCFullYear):
     78        (JSC::dateProtoFuncToGMTString):
     79        (JSC::dateProtoFuncGetMonth):
     80        (JSC::dateProtoFuncGetUTCMonth):
     81        (JSC::dateProtoFuncGetDate):
     82        (JSC::dateProtoFuncGetUTCDate):
     83        (JSC::dateProtoFuncGetDay):
     84        (JSC::dateProtoFuncGetUTCDay):
     85        (JSC::dateProtoFuncGetHours):
     86        (JSC::dateProtoFuncGetUTCHours):
     87        (JSC::dateProtoFuncGetMinutes):
     88        (JSC::dateProtoFuncGetUTCMinutes):
     89        (JSC::dateProtoFuncGetSeconds):
     90        (JSC::dateProtoFuncGetUTCSeconds):
     91        (JSC::dateProtoFuncGetMilliSeconds):
     92        (JSC::dateProtoFuncGetUTCMilliseconds):
     93        (JSC::dateProtoFuncGetTimezoneOffset):
     94        (JSC::dateProtoFuncSetTime):
     95        (JSC::dateProtoFuncSetMilliSeconds):
     96        (JSC::dateProtoFuncSetUTCMilliseconds):
     97        (JSC::dateProtoFuncSetSeconds):
     98        (JSC::dateProtoFuncSetUTCSeconds):
     99        (JSC::dateProtoFuncSetMinutes):
     100        (JSC::dateProtoFuncSetUTCMinutes):
     101        (JSC::dateProtoFuncSetHours):
     102        (JSC::dateProtoFuncSetUTCHours):
     103        (JSC::dateProtoFuncSetDate):
     104        (JSC::dateProtoFuncSetUTCDate):
     105        (JSC::dateProtoFuncSetMonth):
     106        (JSC::dateProtoFuncSetUTCMonth):
     107        (JSC::dateProtoFuncSetFullYear):
     108        (JSC::dateProtoFuncSetUTCFullYear):
     109        (JSC::dateProtoFuncSetYear):
     110        (JSC::dateProtoFuncGetYear):
     111        * runtime/ErrorConstructor.cpp:
     112        (JSC::callErrorConstructor):
     113        * runtime/ErrorPrototype.cpp:
     114        (JSC::errorProtoFuncToString):
     115        * runtime/FunctionConstructor.cpp:
     116        (JSC::callFunctionConstructor):
     117        * runtime/FunctionPrototype.cpp:
     118        (JSC::callFunctionPrototype):
     119        (JSC::functionProtoFuncToString):
     120        (JSC::functionProtoFuncApply):
     121        (JSC::functionProtoFuncCall):
     122        * runtime/JSFunction.h:
     123        (JSC::JSFunction::nativeFunction):
     124        (JSC::JSFunction::setScopeChain):
     125        * runtime/JSGlobalObjectFunctions.cpp:
     126        (JSC::globalFuncEval):
     127        (JSC::globalFuncParseInt):
     128        (JSC::globalFuncParseFloat):
     129        (JSC::globalFuncIsNaN):
     130        (JSC::globalFuncIsFinite):
     131        (JSC::globalFuncDecodeURI):
     132        (JSC::globalFuncDecodeURIComponent):
     133        (JSC::globalFuncEncodeURI):
     134        (JSC::globalFuncEncodeURIComponent):
     135        (JSC::globalFuncEscape):
     136        (JSC::globalFuncUnescape):
     137        (JSC::globalFuncJSCPrint):
     138        * runtime/JSGlobalObjectFunctions.h:
     139        * runtime/MathObject.cpp:
     140        (JSC::mathProtoFuncAbs):
     141        (JSC::mathProtoFuncACos):
     142        (JSC::mathProtoFuncASin):
     143        (JSC::mathProtoFuncATan):
     144        (JSC::mathProtoFuncATan2):
     145        (JSC::mathProtoFuncCeil):
     146        (JSC::mathProtoFuncCos):
     147        (JSC::mathProtoFuncExp):
     148        (JSC::mathProtoFuncFloor):
     149        (JSC::mathProtoFuncLog):
     150        (JSC::mathProtoFuncMax):
     151        (JSC::mathProtoFuncMin):
     152        (JSC::mathProtoFuncPow):
     153        (JSC::mathProtoFuncRandom):
     154        (JSC::mathProtoFuncRound):
     155        (JSC::mathProtoFuncSin):
     156        (JSC::mathProtoFuncSqrt):
     157        (JSC::mathProtoFuncTan):
     158        * runtime/NativeErrorConstructor.cpp:
     159        (JSC::callNativeErrorConstructor):
     160        * runtime/NativeFunctionWrapper.h:
     161        * runtime/NumberConstructor.cpp:
     162        (JSC::callNumberConstructor):
     163        * runtime/NumberPrototype.cpp:
     164        (JSC::numberProtoFuncToString):
     165        (JSC::numberProtoFuncToLocaleString):
     166        (JSC::numberProtoFuncValueOf):
     167        (JSC::numberProtoFuncToFixed):
     168        (JSC::numberProtoFuncToExponential):
     169        (JSC::numberProtoFuncToPrecision):
     170        * runtime/ObjectConstructor.cpp:
     171        (JSC::callObjectConstructor):
     172        * runtime/ObjectPrototype.cpp:
     173        (JSC::objectProtoFuncValueOf):
     174        (JSC::objectProtoFuncHasOwnProperty):
     175        (JSC::objectProtoFuncIsPrototypeOf):
     176        (JSC::objectProtoFuncDefineGetter):
     177        (JSC::objectProtoFuncDefineSetter):
     178        (JSC::objectProtoFuncLookupGetter):
     179        (JSC::objectProtoFuncLookupSetter):
     180        (JSC::objectProtoFuncPropertyIsEnumerable):
     181        (JSC::objectProtoFuncToLocaleString):
     182        (JSC::objectProtoFuncToString):
     183        * runtime/ObjectPrototype.h:
     184        * runtime/RegExpConstructor.cpp:
     185        (JSC::callRegExpConstructor):
     186        * runtime/RegExpObject.cpp:
     187        (JSC::callRegExpObject):
     188        * runtime/RegExpPrototype.cpp:
     189        (JSC::regExpProtoFuncTest):
     190        (JSC::regExpProtoFuncExec):
     191        (JSC::regExpProtoFuncCompile):
     192        (JSC::regExpProtoFuncToString):
     193        * runtime/StringConstructor.cpp:
     194        (JSC::stringFromCharCode):
     195        (JSC::callStringConstructor):
     196        * runtime/StringPrototype.cpp:
     197        (JSC::stringProtoFuncReplace):
     198        (JSC::stringProtoFuncToString):
     199        (JSC::stringProtoFuncCharAt):
     200        (JSC::stringProtoFuncCharCodeAt):
     201        (JSC::stringProtoFuncConcat):
     202        (JSC::stringProtoFuncIndexOf):
     203        (JSC::stringProtoFuncLastIndexOf):
     204        (JSC::stringProtoFuncMatch):
     205        (JSC::stringProtoFuncSearch):
     206        (JSC::stringProtoFuncSlice):
     207        (JSC::stringProtoFuncSplit):
     208        (JSC::stringProtoFuncSubstr):
     209        (JSC::stringProtoFuncSubstring):
     210        (JSC::stringProtoFuncToLowerCase):
     211        (JSC::stringProtoFuncToUpperCase):
     212        (JSC::stringProtoFuncLocaleCompare):
     213        (JSC::stringProtoFuncBig):
     214        (JSC::stringProtoFuncSmall):
     215        (JSC::stringProtoFuncBlink):
     216        (JSC::stringProtoFuncBold):
     217        (JSC::stringProtoFuncFixed):
     218        (JSC::stringProtoFuncItalics):
     219        (JSC::stringProtoFuncStrike):
     220        (JSC::stringProtoFuncSub):
     221        (JSC::stringProtoFuncSup):
     222        (JSC::stringProtoFuncFontcolor):
     223        (JSC::stringProtoFuncFontsize):
     224        (JSC::stringProtoFuncAnchor):
     225        (JSC::stringProtoFuncLink):
     226        * wtf/Platform.h:
     227
    12282009-05-07  Geoffrey Garen  <[email protected]>
    2229
  • trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def

    r43366 r43372  
    77    ??0InternalFunction@JSC@@IAE@PAVJSGlobalData@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@ABVIdentifier@1@@Z
    88    ??0JSByteArray@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@PAVByteArray@4@PBUClassInfo@1@@Z
     9    ?objectProtoFuncToString@JSC@@YI?AVJSValue@1@PAVExecState@1@PAVJSObject@1@V21@ABVArgList@1@@Z
     10    ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@HABVIdentifier@1@P6I?AVJSValue@1@0PAVJSObject@1@V41@ABVArgList@1@@Z@Z
     11    ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@HABVIdentifier@1@P6I?AVJSValue@1@0PAVJSObject@1@V61@ABVArgList@1@@Z@Z
     12    ??0JSFunction@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@HABVIdentifier@1@P6I?AVJSValue@1@0PAVJSObject@1@V61@ABVArgList@1@@Z@Z
    913    ??0Mutex@WTF@@QAE@XZ
    10     ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@HABVIdentifier@1@P6A?AVJSValue@1@0PAVJSObject@1@V41@ABVArgList@1@@Z@Z
    1114    ??0RefCountedLeakCounter@WTF@@QAE@PBD@Z
    1215    ??0StringObject@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@ABVUString@1@@Z
     
    172175    ?nonInlineNaN@JSImmediate@JSC@@CANXZ
    173176    ?objectCount@Heap@JSC@@QAEIXZ
    174     ?objectProtoFuncToString@JSC@@YA?AVJSValue@1@PAVExecState@1@PAVJSObject@1@V21@ABVArgList@1@@Z
    175177    ?parse@Parser@JSC@@AAEXPAVJSGlobalData@2@PAHPAVUString@2@@Z
    176178    ?primaryHeapBegin@Heap@JSC@@QAE?AV?$CollectorHeapIterator@$0A@@2@XZ
     
    260262    WTFReportError
    261263    ?constructEmptyArray@JSC@@YAPAVJSArray@1@PAVExecState@1@@Z
    262     ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@HABVIdentifier@1@P6A?AVJSValue@1@0PAVJSObject@1@V61@ABVArgList@1@@Z@Z
    263264    ?substr@UString@JSC@@QBE?AV12@HH@Z
    264265    ?setDumpsGeneratedCode@BytecodeGenerator@JSC@@SAX_N@Z
  • trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def

    r43366 r43372  
    88    ??0JSByteArray@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@PAVByteArray@4@PBUClassInfo@1@@Z
    99    ??0Mutex@WTF@@QAE@XZ
    10     ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@HABVIdentifier@1@P6A?AVJSValue@1@0PAVJSObject@1@V41@ABVArgList@1@@Z@Z
    1110    ??0RefCountedLeakCounter@WTF@@QAE@PBD@Z
     11    ?objectProtoFuncToString@JSC@@YI?AVJSValue@1@PAVExecState@1@PAVJSObject@1@V21@ABVArgList@1@@Z
     12    ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@HABVIdentifier@1@P6I?AVJSValue@1@0PAVJSObject@1@V41@ABVArgList@1@@Z@Z
     13    ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@HABVIdentifier@1@P6I?AVJSValue@1@0PAVJSObject@1@V61@ABVArgList@1@@Z@Z
     14    ??0JSFunction@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@HABVIdentifier@1@P6I?AVJSValue@1@0PAVJSObject@1@V61@ABVArgList@1@@Z@Z
    1215    ??0StringObject@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@ABVUString@1@@Z
    1316    ??0Structure@JSC@@AAE@VJSValue@1@ABVTypeInfo@1@@Z
     
    172175    ?nonInlineNaN@JSImmediate@JSC@@CANXZ
    173176    ?objectCount@Heap@JSC@@QAEIXZ
    174     ?objectProtoFuncToString@JSC@@YA?AVJSValue@1@PAVExecState@1@PAVJSObject@1@V21@ABVArgList@1@@Z
    175177    ?parse@Parser@JSC@@AAEXPAVJSGlobalData@2@PAHPAVUString@2@@Z
    176178    ?primaryHeapBegin@Heap@JSC@@QAE?AV?$CollectorHeapIterator@$0A@@2@XZ
     
    260262    WTFReportError
    261263    ?constructEmptyArray@JSC@@YAPAVJSArray@1@PAVExecState@1@@Z
    262     ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@HABVIdentifier@1@P6A?AVJSValue@1@0PAVJSObject@1@V61@ABVArgList@1@@Z@Z
    263264    ?substr@UString@JSC@@QBE?AV12@HH@Z
    264265    ?setDumpsGeneratedCode@BytecodeGenerator@JSC@@SAX_N@Z
  • trunk/JavaScriptCore/interpreter/CallFrame.h

    r43153 r43372  
    4141        CodeBlock* codeBlock() const { return this[RegisterFile::CodeBlock].Register::codeBlock(); }
    4242        ScopeChainNode* scopeChain() const { return this[RegisterFile::ScopeChain].Register::scopeChain(); }
     43        int argumentCount() const { return this[RegisterFile::ArgumentCount].i(); }
    4344
    4445        JSValue thisValue();
     
    108109        CallFrame& operator=(const Register& r) { *static_cast<Register*>(this) = r; return *this; }
    109110
    110         int argumentCount() const { return this[RegisterFile::ArgumentCount].i(); }
    111111        CallFrame* callerFrame() const { return this[RegisterFile::CallerFrame].callFrame(); }
    112112        Arguments* optionalCalleeArguments() const { return this[RegisterFile::OptionalCalleeArguments].arguments(); }
  • trunk/JavaScriptCore/jit/JIT.cpp

    r43363 r43372  
    18231823    emitGetFromCallFrameHeader(RegisterFile::ArgumentCount, regT0);
    18241824
    1825     struct NativeFunctionSignature {
    1826         CallFrame* callFrame;
     1825    /* We have two structs that we use to describe the stackframe we set up for our
     1826     * call to native code.  NativeCallFrameStructure describes the how we set up the stack
     1827     * in advance of the call.  NativeFunctionCalleeSignature describes the callframe
     1828     * as the native code expects it.  We do this as we are using the fastcall calling
     1829     * convention which results in the callee popping its arguments off the stack, but
     1830     * not the rest of the callframe so we need a nice way to ensure we increment the
     1831     * stack pointer by the right amount after the call.
     1832     */
     1833#if COMPILER(MSVC)
     1834    struct NativeCallFrameStructure {
     1835      //  CallFrame* callFrame; // passed in EDX
    18271836        JSObject* callee;
    18281837        JSValue thisValue;
    18291838        ArgList* argPointer;
    18301839        ArgList args;
     1840        JSValue result;
    18311841    };
    1832     const int NativeCallFrameSize = (sizeof(NativeFunctionSignature) + 15) & ~15;
     1842    struct NativeFunctionCalleeSignature {
     1843        JSObject* callee;
     1844        JSValue thisValue;
     1845        ArgList* argPointer;
     1846    };
     1847#else
     1848    struct NativeCallFrameStructure {
     1849      //  CallFrame* callFrame; // passed in ECX
     1850      //  JSObject* callee; // passed in EDX
     1851        JSValue thisValue;
     1852        ArgList* argPointer;
     1853        ArgList args;
     1854    };
     1855    struct NativeFunctionCalleeSignature {
     1856        JSValue thisValue;
     1857        ArgList* argPointer;
     1858    };
     1859#endif
     1860    const int NativeCallFrameSize = (sizeof(NativeCallFrameStructure) + 15) & ~15;
    18331861    // Allocate system stack frame
    18341862    subPtr(Imm32(NativeCallFrameSize), stackPointerRegister);
     
    18381866
    18391867    // push argcount
    1840     storePtr(regT0, Address(stackPointerRegister, FIELD_OFFSET(NativeFunctionSignature, args) + FIELD_OFFSET(ArgList, m_argCount)));
     1868    storePtr(regT0, Address(stackPointerRegister, FIELD_OFFSET(NativeCallFrameStructure, args) + FIELD_OFFSET(ArgList, m_argCount)));
    18411869   
    18421870    // Calculate the start of the callframe header, and store in regT1
     
    18461874    mul32(Imm32(sizeof(Register)), regT0, regT0);
    18471875    subPtr(regT0, regT1);
    1848     storePtr(regT1, Address(stackPointerRegister, FIELD_OFFSET(NativeFunctionSignature, args) + FIELD_OFFSET(ArgList, m_args)));
     1876    storePtr(regT1, Address(stackPointerRegister, FIELD_OFFSET(NativeCallFrameStructure, args) + FIELD_OFFSET(ArgList, m_args)));
    18491877
    18501878    // ArgList is passed by reference so is stackPointerRegister + 4 * sizeof(Register)
    1851     addPtr(Imm32(FIELD_OFFSET(NativeFunctionSignature, args)), stackPointerRegister, regT0);
    1852     storePtr(regT0, Address(stackPointerRegister, FIELD_OFFSET(NativeFunctionSignature, argPointer)));
     1879    addPtr(Imm32(FIELD_OFFSET(NativeCallFrameStructure, args)), stackPointerRegister, regT0);
     1880    storePtr(regT0, Address(stackPointerRegister, FIELD_OFFSET(NativeCallFrameStructure, argPointer)));
    18531881
    18541882    // regT1 currently points to the first argument, regT1 - sizeof(Register) points to 'this'
    18551883    loadPtr(Address(regT1, -(int)sizeof(Register)), regT1);
    1856     poke(regT1, 2);
    1857     storePtr(regT1, Address(stackPointerRegister, FIELD_OFFSET(NativeFunctionSignature, thisValue)));
     1884    storePtr(regT1, Address(stackPointerRegister, FIELD_OFFSET(NativeCallFrameStructure, thisValue)));
     1885
     1886#if COMPILER(MSVC)
     1887    // ArgList is passed by reference so is stackPointerRegister + 4 * sizeof(Register)
     1888    addPtr(Imm32(FIELD_OFFSET(NativeCallFrameStructure, result)), stackPointerRegister, X86::ecx);
    18581889
    18591890    // Plant callee
    1860     emitGetFromCallFrameHeader(RegisterFile::Callee, regT2);
    1861     storePtr(regT2, Address(stackPointerRegister, FIELD_OFFSET(NativeFunctionSignature, callee)));
     1891    emitGetFromCallFrameHeader(RegisterFile::Callee, X86::eax);
     1892    storePtr(X86::eax, Address(stackPointerRegister, FIELD_OFFSET(NativeCallFrameStructure, callee)));
    18621893
    18631894    // Plant callframe
    1864     storePtr(callFrameRegister, Address(stackPointerRegister, FIELD_OFFSET(NativeFunctionSignature, callFrame)));
    1865 
    1866     call(Address(regT2, FIELD_OFFSET(JSFunction, m_data)));
    1867     addPtr(Imm32(NativeCallFrameSize), stackPointerRegister);
     1895    move(callFrameRegister, X86::edx);
     1896
     1897    call(Address(X86::eax, FIELD_OFFSET(JSFunction, m_data)));
     1898
     1899    // JSValue is a non-POD type
     1900    loadPtr(Address(X86::eax), X86::eax);
     1901#else
     1902    // Plant callee
     1903    emitGetFromCallFrameHeader(RegisterFile::Callee, X86::edx);
     1904
     1905    // Plant callframe
     1906    move(callFrameRegister, X86::ecx);
     1907    call(Address(X86::edx, FIELD_OFFSET(JSFunction, m_data)));
     1908#endif
     1909
     1910    // We've put a few temporaries on the stack in addition to the actual arguments
     1911    // so pull them off now
     1912    addPtr(Imm32(NativeCallFrameSize - sizeof(NativeFunctionCalleeSignature)), stackPointerRegister);
     1913
    18681914#endif
    18691915
  • trunk/JavaScriptCore/jsc.cpp

    r43220 r43372  
    7070static bool fillBufferWithContentsOfFile(const UString& fileName, Vector<char>& buffer);
    7171
    72 static JSValue functionPrint(ExecState*, JSObject*, JSValue, const ArgList&);
    73 static JSValue functionDebug(ExecState*, JSObject*, JSValue, const ArgList&);
    74 static JSValue functionGC(ExecState*, JSObject*, JSValue, const ArgList&);
    75 static JSValue functionVersion(ExecState*, JSObject*, JSValue, const ArgList&);
    76 static JSValue functionRun(ExecState*, JSObject*, JSValue, const ArgList&);
    77 static JSValue functionLoad(ExecState*, JSObject*, JSValue, const ArgList&);
    78 static JSValue functionReadline(ExecState*, JSObject*, JSValue, const ArgList&);
    79 static NO_RETURN JSValue functionQuit(ExecState*, JSObject*, JSValue, const ArgList&);
     72static JSValue JSC_HOST_CALL functionPrint(ExecState*, JSObject*, JSValue, const ArgList&);
     73static JSValue JSC_HOST_CALL functionDebug(ExecState*, JSObject*, JSValue, const ArgList&);
     74static JSValue JSC_HOST_CALL functionGC(ExecState*, JSObject*, JSValue, const ArgList&);
     75static JSValue JSC_HOST_CALL functionVersion(ExecState*, JSObject*, JSValue, const ArgList&);
     76static JSValue JSC_HOST_CALL functionRun(ExecState*, JSObject*, JSValue, const ArgList&);
     77static JSValue JSC_HOST_CALL functionLoad(ExecState*, JSObject*, JSValue, const ArgList&);
     78static JSValue JSC_HOST_CALL functionReadline(ExecState*, JSObject*, JSValue, const ArgList&);
     79static NO_RETURN JSValue JSC_HOST_CALL functionQuit(ExecState*, JSObject*, JSValue, const ArgList&);
    8080
    8181#if ENABLE(SAMPLING_FLAGS)
    82 static JSValue functionSetSamplingFlags(ExecState*, JSObject*, JSValue, const ArgList&);
    83 static JSValue functionClearSamplingFlags(ExecState*, JSObject*, JSValue, const ArgList&);
     82static JSValue JSC_HOST_CALL functionSetSamplingFlags(ExecState*, JSObject*, JSValue, const ArgList&);
     83static JSValue JSC_HOST_CALL functionClearSamplingFlags(ExecState*, JSObject*, JSValue, const ArgList&);
    8484#endif
    8585
     
    198198}
    199199
    200 JSValue functionPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     200JSValue JSC_HOST_CALL functionPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    201201{
    202202    for (unsigned i = 0; i < args.size(); ++i) {
     
    212212}
    213213
    214 JSValue functionDebug(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     214JSValue JSC_HOST_CALL functionDebug(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    215215{
    216216    fprintf(stderr, "--> %s\n", args.at(0).toString(exec).UTF8String().c_str());
     
    218218}
    219219
    220 JSValue functionGC(ExecState* exec, JSObject*, JSValue, const ArgList&)
     220JSValue JSC_HOST_CALL functionGC(ExecState* exec, JSObject*, JSValue, const ArgList&)
    221221{
    222222    JSLock lock(false);
     
    225225}
    226226
    227 JSValue functionVersion(ExecState*, JSObject*, JSValue, const ArgList&)
     227JSValue JSC_HOST_CALL functionVersion(ExecState*, JSObject*, JSValue, const ArgList&)
    228228{
    229229    // We need this function for compatibility with the Mozilla JS tests but for now
     
    232232}
    233233
    234 JSValue functionRun(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     234JSValue JSC_HOST_CALL functionRun(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    235235{
    236236    StopWatch stopWatch;
     
    249249}
    250250
    251 JSValue functionLoad(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    252 {
     251JSValue JSC_HOST_CALL functionLoad(ExecState* exec, JSObject* o, JSValue v, const ArgList& args)
     252{
     253    UNUSED_PARAM(o);
     254    UNUSED_PARAM(v);
    253255    UString fileName = args.at(0).toString(exec);
    254256    Vector<char> script;
     
    264266
    265267#if ENABLE(SAMPLING_FLAGS)
    266 JSValue functionSetSamplingFlags(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     268JSValue JSC_HOST_CALL functionSetSamplingFlags(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    267269{
    268270    for (unsigned i = 0; i < args.size(); ++i) {
     
    274276}
    275277
    276 JSValue functionClearSamplingFlags(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     278JSValue JSC_HOST_CALL functionClearSamplingFlags(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    277279{
    278280    for (unsigned i = 0; i < args.size(); ++i) {
     
    285287#endif
    286288
    287 JSValue functionReadline(ExecState* exec, JSObject*, JSValue, const ArgList&)
     289JSValue JSC_HOST_CALL functionReadline(ExecState* exec, JSObject*, JSValue, const ArgList&)
    288290{
    289291    Vector<char, 256> line;
     
    299301}
    300302
    301 JSValue functionQuit(ExecState* exec, JSObject*, JSValue, const ArgList&)
     303JSValue JSC_HOST_CALL functionQuit(ExecState* exec, JSObject*, JSValue, const ArgList&)
    302304{
    303305    cleanupGlobalData(&exec->globalData());
  • trunk/JavaScriptCore/runtime/ArrayConstructor.cpp

    r43222 r43372  
    7070}
    7171
    72 static JSValue callArrayConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     72static JSValue JSC_HOST_CALL callArrayConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    7373{
    7474    return constructArrayWithSizeQuirk(exec, args);
  • trunk/JavaScriptCore/runtime/ArrayPrototype.cpp

    r43220 r43372  
    4040ASSERT_CLASS_FITS_IN_CELL(ArrayPrototype);
    4141
    42 static JSValue arrayProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
    43 static JSValue arrayProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&);
    44 static JSValue arrayProtoFuncConcat(ExecState*, JSObject*, JSValue, const ArgList&);
    45 static JSValue arrayProtoFuncJoin(ExecState*, JSObject*, JSValue, const ArgList&);
    46 static JSValue arrayProtoFuncPop(ExecState*, JSObject*, JSValue, const ArgList&);
    47 static JSValue arrayProtoFuncPush(ExecState*, JSObject*, JSValue, const ArgList&);
    48 static JSValue arrayProtoFuncReverse(ExecState*, JSObject*, JSValue, const ArgList&);
    49 static JSValue arrayProtoFuncShift(ExecState*, JSObject*, JSValue, const ArgList&);
    50 static JSValue arrayProtoFuncSlice(ExecState*, JSObject*, JSValue, const ArgList&);
    51 static JSValue arrayProtoFuncSort(ExecState*, JSObject*, JSValue, const ArgList&);
    52 static JSValue arrayProtoFuncSplice(ExecState*, JSObject*, JSValue, const ArgList&);
    53 static JSValue arrayProtoFuncUnShift(ExecState*, JSObject*, JSValue, const ArgList&);
    54 static JSValue arrayProtoFuncEvery(ExecState*, JSObject*, JSValue, const ArgList&);
    55 static JSValue arrayProtoFuncForEach(ExecState*, JSObject*, JSValue, const ArgList&);
    56 static JSValue arrayProtoFuncSome(ExecState*, JSObject*, JSValue, const ArgList&);
    57 static JSValue arrayProtoFuncIndexOf(ExecState*, JSObject*, JSValue, const ArgList&);
    58 static JSValue arrayProtoFuncFilter(ExecState*, JSObject*, JSValue, const ArgList&);
    59 static JSValue arrayProtoFuncMap(ExecState*, JSObject*, JSValue, const ArgList&);
    60 static JSValue arrayProtoFuncReduce(ExecState*, JSObject*, JSValue, const ArgList&);
    61 static JSValue arrayProtoFuncReduceRight(ExecState*, JSObject*, JSValue, const ArgList&);
    62 static JSValue arrayProtoFuncLastIndexOf(ExecState*, JSObject*, JSValue, const ArgList&);
     42static JSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
     43static JSValue JSC_HOST_CALL arrayProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&);
     44static JSValue JSC_HOST_CALL arrayProtoFuncConcat(ExecState*, JSObject*, JSValue, const ArgList&);
     45static JSValue JSC_HOST_CALL arrayProtoFuncJoin(ExecState*, JSObject*, JSValue, const ArgList&);
     46static JSValue JSC_HOST_CALL arrayProtoFuncPop(ExecState*, JSObject*, JSValue, const ArgList&);
     47static JSValue JSC_HOST_CALL arrayProtoFuncPush(ExecState*, JSObject*, JSValue, const ArgList&);
     48static JSValue JSC_HOST_CALL arrayProtoFuncReverse(ExecState*, JSObject*, JSValue, const ArgList&);
     49static JSValue JSC_HOST_CALL arrayProtoFuncShift(ExecState*, JSObject*, JSValue, const ArgList&);
     50static JSValue JSC_HOST_CALL arrayProtoFuncSlice(ExecState*, JSObject*, JSValue, const ArgList&);
     51static JSValue JSC_HOST_CALL arrayProtoFuncSort(ExecState*, JSObject*, JSValue, const ArgList&);
     52static JSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState*, JSObject*, JSValue, const ArgList&);
     53static JSValue JSC_HOST_CALL arrayProtoFuncUnShift(ExecState*, JSObject*, JSValue, const ArgList&);
     54static JSValue JSC_HOST_CALL arrayProtoFuncEvery(ExecState*, JSObject*, JSValue, const ArgList&);
     55static JSValue JSC_HOST_CALL arrayProtoFuncForEach(ExecState*, JSObject*, JSValue, const ArgList&);
     56static JSValue JSC_HOST_CALL arrayProtoFuncSome(ExecState*, JSObject*, JSValue, const ArgList&);
     57static JSValue JSC_HOST_CALL arrayProtoFuncIndexOf(ExecState*, JSObject*, JSValue, const ArgList&);
     58static JSValue JSC_HOST_CALL arrayProtoFuncFilter(ExecState*, JSObject*, JSValue, const ArgList&);
     59static JSValue JSC_HOST_CALL arrayProtoFuncMap(ExecState*, JSObject*, JSValue, const ArgList&);
     60static JSValue JSC_HOST_CALL arrayProtoFuncReduce(ExecState*, JSObject*, JSValue, const ArgList&);
     61static JSValue JSC_HOST_CALL arrayProtoFuncReduceRight(ExecState*, JSObject*, JSValue, const ArgList&);
     62static JSValue JSC_HOST_CALL arrayProtoFuncLastIndexOf(ExecState*, JSObject*, JSValue, const ArgList&);
    6363
    6464}
     
    143143}
    144144
    145 JSValue arrayProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     145JSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    146146{
    147147    if (!thisValue.isObject(&JSArray::info))
     
    187187}
    188188
    189 JSValue arrayProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     189JSValue JSC_HOST_CALL arrayProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    190190{
    191191    if (!thisValue.isObject(&JSArray::info))
     
    239239}
    240240
    241 JSValue arrayProtoFuncJoin(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     241JSValue JSC_HOST_CALL arrayProtoFuncJoin(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    242242{
    243243    JSObject* thisObj = thisValue.toThisObject(exec);
     
    285285}
    286286
    287 JSValue arrayProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     287JSValue JSC_HOST_CALL arrayProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    288288{
    289289    JSArray* arr = constructEmptyArray(exec);
     
    314314}
    315315
    316 JSValue arrayProtoFuncPop(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     316JSValue JSC_HOST_CALL arrayProtoFuncPop(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    317317{
    318318    if (isJSArray(&exec->globalData(), thisValue))
     
    333333}
    334334
    335 JSValue arrayProtoFuncPush(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     335JSValue JSC_HOST_CALL arrayProtoFuncPush(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    336336{
    337337    if (isJSArray(&exec->globalData(), thisValue) && args.size() == 1) {
     
    350350}
    351351
    352 JSValue arrayProtoFuncReverse(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     352JSValue JSC_HOST_CALL arrayProtoFuncReverse(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    353353{
    354354    JSObject* thisObj = thisValue.toThisObject(exec);
     
    374374}
    375375
    376 JSValue arrayProtoFuncShift(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     376JSValue JSC_HOST_CALL arrayProtoFuncShift(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    377377{
    378378    JSObject* thisObj = thisValue.toThisObject(exec);
     
    397397}
    398398
    399 JSValue arrayProtoFuncSlice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     399JSValue JSC_HOST_CALL arrayProtoFuncSlice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    400400{
    401401    // http://developer.netscape.com/docs/manuals/js/client/jsref/array.htm#1193713 or 15.4.4.10
     
    442442}
    443443
    444 JSValue arrayProtoFuncSort(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     444JSValue JSC_HOST_CALL arrayProtoFuncSort(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    445445{
    446446    JSObject* thisObj = thisValue.toThisObject(exec);
     
    500500}
    501501
    502 JSValue arrayProtoFuncSplice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     502JSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    503503{
    504504    JSObject* thisObj = thisValue.toThisObject(exec);
     
    555555}
    556556
    557 JSValue arrayProtoFuncUnShift(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     557JSValue JSC_HOST_CALL arrayProtoFuncUnShift(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    558558{
    559559    JSObject* thisObj = thisValue.toThisObject(exec);
     
    577577}
    578578
    579 JSValue arrayProtoFuncFilter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     579JSValue JSC_HOST_CALL arrayProtoFuncFilter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    580580{
    581581    JSObject* thisObj = thisValue.toThisObject(exec);
     
    635635}
    636636
    637 JSValue arrayProtoFuncMap(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     637JSValue JSC_HOST_CALL arrayProtoFuncMap(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    638638{
    639639    JSObject* thisObj = thisValue.toThisObject(exec);
     
    692692// http://developer-test.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:some
    693693
    694 JSValue arrayProtoFuncEvery(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     694JSValue JSC_HOST_CALL arrayProtoFuncEvery(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    695695{
    696696    JSObject* thisObj = thisValue.toThisObject(exec);
     
    748748}
    749749
    750 JSValue arrayProtoFuncForEach(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     750JSValue JSC_HOST_CALL arrayProtoFuncForEach(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    751751{
    752752    JSObject* thisObj = thisValue.toThisObject(exec);
     
    793793}
    794794
    795 JSValue arrayProtoFuncSome(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     795JSValue JSC_HOST_CALL arrayProtoFuncSome(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    796796{
    797797    JSObject* thisObj = thisValue.toThisObject(exec);
     
    846846}
    847847
    848 JSValue arrayProtoFuncReduce(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     848JSValue JSC_HOST_CALL arrayProtoFuncReduce(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    849849{
    850850    JSObject* thisObj = thisValue.toThisObject(exec);
     
    916916}
    917917
    918 JSValue arrayProtoFuncReduceRight(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     918JSValue JSC_HOST_CALL arrayProtoFuncReduceRight(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    919919{
    920920    JSObject* thisObj = thisValue.toThisObject(exec);
     
    985985}
    986986
    987 JSValue arrayProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     987JSValue JSC_HOST_CALL arrayProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    988988{
    989989    // JavaScript 1.5 Extension by Mozilla
     
    10161016}
    10171017
    1018 JSValue arrayProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     1018JSValue JSC_HOST_CALL arrayProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    10191019{
    10201020    // JavaScript 1.6 Extension by Mozilla
  • trunk/JavaScriptCore/runtime/BooleanConstructor.cpp

    r43122 r43372  
    5858
    5959// ECMA 15.6.1
    60 static JSValue callBooleanConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     60static JSValue JSC_HOST_CALL callBooleanConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    6161{
    6262    return jsBoolean(args.at(0).toBoolean(exec));
  • trunk/JavaScriptCore/runtime/BooleanPrototype.cpp

    r43222 r43372  
    3333
    3434// Functions
    35 static JSValue booleanProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
    36 static JSValue booleanProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&);
     35static JSValue JSC_HOST_CALL booleanProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
     36static JSValue JSC_HOST_CALL booleanProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&);
    3737
    3838// ECMA 15.6.4
     
    5252// ECMA 15.6.4.2 + 15.6.4.3
    5353
    54 JSValue booleanProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     54JSValue JSC_HOST_CALL booleanProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    5555{
    5656    if (thisValue == jsBoolean(false))
     
    7070}
    7171
    72 JSValue booleanProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     72JSValue JSC_HOST_CALL booleanProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    7373{
    7474    if (thisValue.isBoolean())
  • trunk/JavaScriptCore/runtime/CallData.h

    r43223 r43372  
    4747    };
    4848
    49     typedef JSValue (*NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&);
     49    typedef JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&);
    5050
    5151    union CallData {
  • trunk/JavaScriptCore/runtime/DateConstructor.cpp

    r43222 r43372  
    4949ASSERT_CLASS_FITS_IN_CELL(DateConstructor);
    5050
    51 static JSValue dateParse(ExecState*, JSObject*, JSValue, const ArgList&);
    52 static JSValue dateNow(ExecState*, JSObject*, JSValue, const ArgList&);
    53 static JSValue dateUTC(ExecState*, JSObject*, JSValue, const ArgList&);
     51static JSValue JSC_HOST_CALL dateParse(ExecState*, JSObject*, JSValue, const ArgList&);
     52static JSValue JSC_HOST_CALL dateNow(ExecState*, JSObject*, JSValue, const ArgList&);
     53static JSValue JSC_HOST_CALL dateUTC(ExecState*, JSObject*, JSValue, const ArgList&);
    5454
    5555DateConstructor::DateConstructor(ExecState* exec, PassRefPtr<Structure> structure, Structure* prototypeFunctionStructure, DatePrototype* datePrototype)
     
    125125
    126126// ECMA 15.9.2
    127 static JSValue callDate(ExecState* exec, JSObject*, JSValue, const ArgList&)
     127static JSValue JSC_HOST_CALL callDate(ExecState* exec, JSObject*, JSValue, const ArgList&)
    128128{
    129129    time_t localTime = time(0);
     
    140140}
    141141
    142 static JSValue dateParse(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     142static JSValue JSC_HOST_CALL dateParse(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    143143{
    144144    return jsNumber(exec, parseDate(args.at(0).toString(exec)));
    145145}
    146146
    147 static JSValue dateNow(ExecState* exec, JSObject*, JSValue, const ArgList&)
     147static JSValue JSC_HOST_CALL dateNow(ExecState* exec, JSObject*, JSValue, const ArgList&)
    148148{
    149149    return jsNumber(exec, getCurrentUTCTime());
    150150}
    151151
    152 static JSValue dateUTC(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     152static JSValue JSC_HOST_CALL dateUTC(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    153153{
    154154    int n = args.size();
  • trunk/JavaScriptCore/runtime/DatePrototype.cpp

    r43229 r43372  
    6565ASSERT_CLASS_FITS_IN_CELL(DatePrototype);
    6666
    67 static JSValue dateProtoFuncGetDate(ExecState*, JSObject*, JSValue, const ArgList&);
    68 static JSValue dateProtoFuncGetDay(ExecState*, JSObject*, JSValue, const ArgList&);
    69 static JSValue dateProtoFuncGetFullYear(ExecState*, JSObject*, JSValue, const ArgList&);
    70 static JSValue dateProtoFuncGetHours(ExecState*, JSObject*, JSValue, const ArgList&);
    71 static JSValue dateProtoFuncGetMilliSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
    72 static JSValue dateProtoFuncGetMinutes(ExecState*, JSObject*, JSValue, const ArgList&);
    73 static JSValue dateProtoFuncGetMonth(ExecState*, JSObject*, JSValue, const ArgList&);
    74 static JSValue dateProtoFuncGetSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
    75 static JSValue dateProtoFuncGetTime(ExecState*, JSObject*, JSValue, const ArgList&);
    76 static JSValue dateProtoFuncGetTimezoneOffset(ExecState*, JSObject*, JSValue, const ArgList&);
    77 static JSValue dateProtoFuncGetUTCDate(ExecState*, JSObject*, JSValue, const ArgList&);
    78 static JSValue dateProtoFuncGetUTCDay(ExecState*, JSObject*, JSValue, const ArgList&);
    79 static JSValue dateProtoFuncGetUTCFullYear(ExecState*, JSObject*, JSValue, const ArgList&);
    80 static JSValue dateProtoFuncGetUTCHours(ExecState*, JSObject*, JSValue, const ArgList&);
    81 static JSValue dateProtoFuncGetUTCMilliseconds(ExecState*, JSObject*, JSValue, const ArgList&);
    82 static JSValue dateProtoFuncGetUTCMinutes(ExecState*, JSObject*, JSValue, const ArgList&);
    83 static JSValue dateProtoFuncGetUTCMonth(ExecState*, JSObject*, JSValue, const ArgList&);
    84 static JSValue dateProtoFuncGetUTCSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
    85 static JSValue dateProtoFuncGetYear(ExecState*, JSObject*, JSValue, const ArgList&);
    86 static JSValue dateProtoFuncSetDate(ExecState*, JSObject*, JSValue, const ArgList&);
    87 static JSValue dateProtoFuncSetFullYear(ExecState*, JSObject*, JSValue, const ArgList&);
    88 static JSValue dateProtoFuncSetHours(ExecState*, JSObject*, JSValue, const ArgList&);
    89 static JSValue dateProtoFuncSetMilliSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
    90 static JSValue dateProtoFuncSetMinutes(ExecState*, JSObject*, JSValue, const ArgList&);
    91 static JSValue dateProtoFuncSetMonth(ExecState*, JSObject*, JSValue, const ArgList&);
    92 static JSValue dateProtoFuncSetSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
    93 static JSValue dateProtoFuncSetTime(ExecState*, JSObject*, JSValue, const ArgList&);
    94 static JSValue dateProtoFuncSetUTCDate(ExecState*, JSObject*, JSValue, const ArgList&);
    95 static JSValue dateProtoFuncSetUTCFullYear(ExecState*, JSObject*, JSValue, const ArgList&);
    96 static JSValue dateProtoFuncSetUTCHours(ExecState*, JSObject*, JSValue, const ArgList&);
    97 static JSValue dateProtoFuncSetUTCMilliseconds(ExecState*, JSObject*, JSValue, const ArgList&);
    98 static JSValue dateProtoFuncSetUTCMinutes(ExecState*, JSObject*, JSValue, const ArgList&);
    99 static JSValue dateProtoFuncSetUTCMonth(ExecState*, JSObject*, JSValue, const ArgList&);
    100 static JSValue dateProtoFuncSetUTCSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
    101 static JSValue dateProtoFuncSetYear(ExecState*, JSObject*, JSValue, const ArgList&);
    102 static JSValue dateProtoFuncToDateString(ExecState*, JSObject*, JSValue, const ArgList&);
    103 static JSValue dateProtoFuncToGMTString(ExecState*, JSObject*, JSValue, const ArgList&);
    104 static JSValue dateProtoFuncToLocaleDateString(ExecState*, JSObject*, JSValue, const ArgList&);
    105 static JSValue dateProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&);
    106 static JSValue dateProtoFuncToLocaleTimeString(ExecState*, JSObject*, JSValue, const ArgList&);
    107 static JSValue dateProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
    108 static JSValue dateProtoFuncToTimeString(ExecState*, JSObject*, JSValue, const ArgList&);
    109 static JSValue dateProtoFuncToUTCString(ExecState*, JSObject*, JSValue, const ArgList&);
     67static JSValue JSC_HOST_CALL dateProtoFuncGetDate(ExecState*, JSObject*, JSValue, const ArgList&);
     68static JSValue JSC_HOST_CALL dateProtoFuncGetDay(ExecState*, JSObject*, JSValue, const ArgList&);
     69static JSValue JSC_HOST_CALL dateProtoFuncGetFullYear(ExecState*, JSObject*, JSValue, const ArgList&);
     70static JSValue JSC_HOST_CALL dateProtoFuncGetHours(ExecState*, JSObject*, JSValue, const ArgList&);
     71static JSValue JSC_HOST_CALL dateProtoFuncGetMilliSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
     72static JSValue JSC_HOST_CALL dateProtoFuncGetMinutes(ExecState*, JSObject*, JSValue, const ArgList&);
     73static JSValue JSC_HOST_CALL dateProtoFuncGetMonth(ExecState*, JSObject*, JSValue, const ArgList&);
     74static JSValue JSC_HOST_CALL dateProtoFuncGetSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
     75static JSValue JSC_HOST_CALL dateProtoFuncGetTime(ExecState*, JSObject*, JSValue, const ArgList&);
     76static JSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState*, JSObject*, JSValue, const ArgList&);
     77static JSValue JSC_HOST_CALL dateProtoFuncGetUTCDate(ExecState*, JSObject*, JSValue, const ArgList&);
     78static JSValue JSC_HOST_CALL dateProtoFuncGetUTCDay(ExecState*, JSObject*, JSValue, const ArgList&);
     79static JSValue JSC_HOST_CALL dateProtoFuncGetUTCFullYear(ExecState*, JSObject*, JSValue, const ArgList&);
     80static JSValue JSC_HOST_CALL dateProtoFuncGetUTCHours(ExecState*, JSObject*, JSValue, const ArgList&);
     81static JSValue JSC_HOST_CALL dateProtoFuncGetUTCMilliseconds(ExecState*, JSObject*, JSValue, const ArgList&);
     82static JSValue JSC_HOST_CALL dateProtoFuncGetUTCMinutes(ExecState*, JSObject*, JSValue, const ArgList&);
     83static JSValue JSC_HOST_CALL dateProtoFuncGetUTCMonth(ExecState*, JSObject*, JSValue, const ArgList&);
     84static JSValue JSC_HOST_CALL dateProtoFuncGetUTCSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
     85static JSValue JSC_HOST_CALL dateProtoFuncGetYear(ExecState*, JSObject*, JSValue, const ArgList&);
     86static JSValue JSC_HOST_CALL dateProtoFuncSetDate(ExecState*, JSObject*, JSValue, const ArgList&);
     87static JSValue JSC_HOST_CALL dateProtoFuncSetFullYear(ExecState*, JSObject*, JSValue, const ArgList&);
     88static JSValue JSC_HOST_CALL dateProtoFuncSetHours(ExecState*, JSObject*, JSValue, const ArgList&);
     89static JSValue JSC_HOST_CALL dateProtoFuncSetMilliSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
     90static JSValue JSC_HOST_CALL dateProtoFuncSetMinutes(ExecState*, JSObject*, JSValue, const ArgList&);
     91static JSValue JSC_HOST_CALL dateProtoFuncSetMonth(ExecState*, JSObject*, JSValue, const ArgList&);
     92static JSValue JSC_HOST_CALL dateProtoFuncSetSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
     93static JSValue JSC_HOST_CALL dateProtoFuncSetTime(ExecState*, JSObject*, JSValue, const ArgList&);
     94static JSValue JSC_HOST_CALL dateProtoFuncSetUTCDate(ExecState*, JSObject*, JSValue, const ArgList&);
     95static JSValue JSC_HOST_CALL dateProtoFuncSetUTCFullYear(ExecState*, JSObject*, JSValue, const ArgList&);
     96static JSValue JSC_HOST_CALL dateProtoFuncSetUTCHours(ExecState*, JSObject*, JSValue, const ArgList&);
     97static JSValue JSC_HOST_CALL dateProtoFuncSetUTCMilliseconds(ExecState*, JSObject*, JSValue, const ArgList&);
     98static JSValue JSC_HOST_CALL dateProtoFuncSetUTCMinutes(ExecState*, JSObject*, JSValue, const ArgList&);
     99static JSValue JSC_HOST_CALL dateProtoFuncSetUTCMonth(ExecState*, JSObject*, JSValue, const ArgList&);
     100static JSValue JSC_HOST_CALL dateProtoFuncSetUTCSeconds(ExecState*, JSObject*, JSValue, const ArgList&);
     101static JSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState*, JSObject*, JSValue, const ArgList&);
     102static JSValue JSC_HOST_CALL dateProtoFuncToDateString(ExecState*, JSObject*, JSValue, const ArgList&);
     103static JSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState*, JSObject*, JSValue, const ArgList&);
     104static JSValue JSC_HOST_CALL dateProtoFuncToLocaleDateString(ExecState*, JSObject*, JSValue, const ArgList&);
     105static JSValue JSC_HOST_CALL dateProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&);
     106static JSValue JSC_HOST_CALL dateProtoFuncToLocaleTimeString(ExecState*, JSObject*, JSValue, const ArgList&);
     107static JSValue JSC_HOST_CALL dateProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
     108static JSValue JSC_HOST_CALL dateProtoFuncToTimeString(ExecState*, JSObject*, JSValue, const ArgList&);
     109static JSValue JSC_HOST_CALL dateProtoFuncToUTCString(ExecState*, JSObject*, JSValue, const ArgList&);
    110110
    111111}
     
    396396// Functions
    397397
    398 JSValue dateProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     398JSValue JSC_HOST_CALL dateProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    399399{
    400400    if (!thisValue.isObject(&DateInstance::info))
     
    413413}
    414414
    415 JSValue dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     415JSValue JSC_HOST_CALL dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    416416{
    417417    if (!thisValue.isObject(&DateInstance::info))
     
    430430}
    431431
    432 JSValue dateProtoFuncToDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     432JSValue JSC_HOST_CALL dateProtoFuncToDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    433433{
    434434    if (!thisValue.isObject(&DateInstance::info))
     
    447447}
    448448
    449 JSValue dateProtoFuncToTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     449JSValue JSC_HOST_CALL dateProtoFuncToTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    450450{
    451451    if (!thisValue.isObject(&DateInstance::info))
     
    464464}
    465465
    466 JSValue dateProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     466JSValue JSC_HOST_CALL dateProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    467467{
    468468    if (!thisValue.isObject(&DateInstance::info))
     
    477477}
    478478
    479 JSValue dateProtoFuncToLocaleDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     479JSValue JSC_HOST_CALL dateProtoFuncToLocaleDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    480480{
    481481    if (!thisValue.isObject(&DateInstance::info))
     
    490490}
    491491
    492 JSValue dateProtoFuncToLocaleTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     492JSValue JSC_HOST_CALL dateProtoFuncToLocaleTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    493493{
    494494    if (!thisValue.isObject(&DateInstance::info))
     
    503503}
    504504
    505 JSValue dateProtoFuncGetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     505JSValue JSC_HOST_CALL dateProtoFuncGetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    506506{
    507507    if (!thisValue.isObject(&DateInstance::info))
     
    516516}
    517517
    518 JSValue dateProtoFuncGetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     518JSValue JSC_HOST_CALL dateProtoFuncGetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    519519{
    520520    if (!thisValue.isObject(&DateInstance::info))
     
    533533}
    534534
    535 JSValue dateProtoFuncGetUTCFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     535JSValue JSC_HOST_CALL dateProtoFuncGetUTCFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    536536{
    537537    if (!thisValue.isObject(&DateInstance::info))
     
    550550}
    551551
    552 JSValue dateProtoFuncToGMTString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     552JSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    553553{
    554554    if (!thisValue.isObject(&DateInstance::info))
     
    567567}
    568568
    569 JSValue dateProtoFuncGetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     569JSValue JSC_HOST_CALL dateProtoFuncGetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    570570{
    571571    if (!thisValue.isObject(&DateInstance::info))
     
    584584}
    585585
    586 JSValue dateProtoFuncGetUTCMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     586JSValue JSC_HOST_CALL dateProtoFuncGetUTCMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    587587{
    588588    if (!thisValue.isObject(&DateInstance::info))
     
    601601}
    602602
    603 JSValue dateProtoFuncGetDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     603JSValue JSC_HOST_CALL dateProtoFuncGetDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    604604{
    605605    if (!thisValue.isObject(&DateInstance::info))
     
    618618}
    619619
    620 JSValue dateProtoFuncGetUTCDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     620JSValue JSC_HOST_CALL dateProtoFuncGetUTCDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    621621{
    622622    if (!thisValue.isObject(&DateInstance::info))
     
    635635}
    636636
    637 JSValue dateProtoFuncGetDay(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     637JSValue JSC_HOST_CALL dateProtoFuncGetDay(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    638638{
    639639    if (!thisValue.isObject(&DateInstance::info))
     
    652652}
    653653
    654 JSValue dateProtoFuncGetUTCDay(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     654JSValue JSC_HOST_CALL dateProtoFuncGetUTCDay(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    655655{
    656656    if (!thisValue.isObject(&DateInstance::info))
     
    669669}
    670670
    671 JSValue dateProtoFuncGetHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     671JSValue JSC_HOST_CALL dateProtoFuncGetHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    672672{
    673673    if (!thisValue.isObject(&DateInstance::info))
     
    686686}
    687687
    688 JSValue dateProtoFuncGetUTCHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     688JSValue JSC_HOST_CALL dateProtoFuncGetUTCHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    689689{
    690690    if (!thisValue.isObject(&DateInstance::info))
     
    703703}
    704704
    705 JSValue dateProtoFuncGetMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     705JSValue JSC_HOST_CALL dateProtoFuncGetMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    706706{
    707707    if (!thisValue.isObject(&DateInstance::info))
     
    720720}
    721721
    722 JSValue dateProtoFuncGetUTCMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     722JSValue JSC_HOST_CALL dateProtoFuncGetUTCMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    723723{
    724724    if (!thisValue.isObject(&DateInstance::info))
     
    737737}
    738738
    739 JSValue dateProtoFuncGetSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     739JSValue JSC_HOST_CALL dateProtoFuncGetSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    740740{
    741741    if (!thisValue.isObject(&DateInstance::info))
     
    754754}
    755755
    756 JSValue dateProtoFuncGetUTCSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     756JSValue JSC_HOST_CALL dateProtoFuncGetUTCSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    757757{
    758758    if (!thisValue.isObject(&DateInstance::info))
     
    771771}
    772772
    773 JSValue dateProtoFuncGetMilliSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     773JSValue JSC_HOST_CALL dateProtoFuncGetMilliSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    774774{
    775775    if (!thisValue.isObject(&DateInstance::info))
     
    786786}
    787787
    788 JSValue dateProtoFuncGetUTCMilliseconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     788JSValue JSC_HOST_CALL dateProtoFuncGetUTCMilliseconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    789789{
    790790    if (!thisValue.isObject(&DateInstance::info))
     
    801801}
    802802
    803 JSValue dateProtoFuncGetTimezoneOffset(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     803JSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    804804{
    805805    if (!thisValue.isObject(&DateInstance::info))
     
    818818}
    819819
    820 JSValue dateProtoFuncSetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     820JSValue JSC_HOST_CALL dateProtoFuncSetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    821821{
    822822    if (!thisValue.isObject(&DateInstance::info))
     
    899899}
    900900
    901 JSValue dateProtoFuncSetMilliSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     901JSValue JSC_HOST_CALL dateProtoFuncSetMilliSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    902902{
    903903    const bool inputIsUTC = false;
     
    905905}
    906906
    907 JSValue dateProtoFuncSetUTCMilliseconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     907JSValue JSC_HOST_CALL dateProtoFuncSetUTCMilliseconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    908908{
    909909    const bool inputIsUTC = true;
     
    911911}
    912912
    913 JSValue dateProtoFuncSetSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     913JSValue JSC_HOST_CALL dateProtoFuncSetSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    914914{
    915915    const bool inputIsUTC = false;
     
    917917}
    918918
    919 JSValue dateProtoFuncSetUTCSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     919JSValue JSC_HOST_CALL dateProtoFuncSetUTCSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    920920{
    921921    const bool inputIsUTC = true;
     
    923923}
    924924
    925 JSValue dateProtoFuncSetMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     925JSValue JSC_HOST_CALL dateProtoFuncSetMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    926926{
    927927    const bool inputIsUTC = false;
     
    929929}
    930930
    931 JSValue dateProtoFuncSetUTCMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     931JSValue JSC_HOST_CALL dateProtoFuncSetUTCMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    932932{
    933933    const bool inputIsUTC = true;
     
    935935}
    936936
    937 JSValue dateProtoFuncSetHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     937JSValue JSC_HOST_CALL dateProtoFuncSetHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    938938{
    939939    const bool inputIsUTC = false;
     
    941941}
    942942
    943 JSValue dateProtoFuncSetUTCHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     943JSValue JSC_HOST_CALL dateProtoFuncSetUTCHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    944944{
    945945    const bool inputIsUTC = true;
     
    947947}
    948948
    949 JSValue dateProtoFuncSetDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     949JSValue JSC_HOST_CALL dateProtoFuncSetDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    950950{
    951951    const bool inputIsUTC = false;
     
    953953}
    954954
    955 JSValue dateProtoFuncSetUTCDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     955JSValue JSC_HOST_CALL dateProtoFuncSetUTCDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    956956{
    957957    const bool inputIsUTC = true;
     
    959959}
    960960
    961 JSValue dateProtoFuncSetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     961JSValue JSC_HOST_CALL dateProtoFuncSetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    962962{
    963963    const bool inputIsUTC = false;
     
    965965}
    966966
    967 JSValue dateProtoFuncSetUTCMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     967JSValue JSC_HOST_CALL dateProtoFuncSetUTCMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    968968{
    969969    const bool inputIsUTC = true;
     
    971971}
    972972
    973 JSValue dateProtoFuncSetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     973JSValue JSC_HOST_CALL dateProtoFuncSetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    974974{
    975975    const bool inputIsUTC = false;
     
    977977}
    978978
    979 JSValue dateProtoFuncSetUTCFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     979JSValue JSC_HOST_CALL dateProtoFuncSetUTCFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    980980{
    981981    const bool inputIsUTC = true;
     
    983983}
    984984
    985 JSValue dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     985JSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    986986{
    987987    if (!thisValue.isObject(&DateInstance::info))
     
    10251025}
    10261026
    1027 JSValue dateProtoFuncGetYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     1027JSValue JSC_HOST_CALL dateProtoFuncGetYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    10281028{
    10291029    if (!thisValue.isObject(&DateInstance::info))
  • trunk/JavaScriptCore/runtime/ErrorConstructor.cpp

    r43122 r43372  
    5959
    6060// ECMA 15.9.2
    61 static JSValue callErrorConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     61static JSValue JSC_HOST_CALL callErrorConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    6262{
    6363    // "Error()" gives the sames result as "new Error()"
  • trunk/JavaScriptCore/runtime/ErrorPrototype.cpp

    r43226 r43372  
    3232ASSERT_CLASS_FITS_IN_CELL(ErrorPrototype);
    3333
    34 static JSValue errorProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
     34static JSValue JSC_HOST_CALL errorProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
    3535
    3636// ECMA 15.9.4
     
    4646}
    4747
    48 JSValue errorProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     48JSValue JSC_HOST_CALL errorProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    4949{
    5050    JSObject* thisObj = thisValue.toThisObject(exec);
  • trunk/JavaScriptCore/runtime/FunctionConstructor.cpp

    r43311 r43372  
    5555}
    5656
    57 static JSValue callFunctionConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     57static JSValue JSC_HOST_CALL callFunctionConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    5858{
    5959    return constructFunction(exec, args);
  • trunk/JavaScriptCore/runtime/FunctionPrototype.cpp

    r43220 r43372  
    3434ASSERT_CLASS_FITS_IN_CELL(FunctionPrototype);
    3535
    36 static JSValue functionProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
    37 static JSValue functionProtoFuncApply(ExecState*, JSObject*, JSValue, const ArgList&);
    38 static JSValue functionProtoFuncCall(ExecState*, JSObject*, JSValue, const ArgList&);
     36static JSValue JSC_HOST_CALL functionProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
     37static JSValue JSC_HOST_CALL functionProtoFuncApply(ExecState*, JSObject*, JSValue, const ArgList&);
     38static JSValue JSC_HOST_CALL functionProtoFuncCall(ExecState*, JSObject*, JSValue, const ArgList&);
    3939
    4040FunctionPrototype::FunctionPrototype(ExecState* exec, PassRefPtr<Structure> structure)
     
    5353}
    5454
    55 static JSValue callFunctionPrototype(ExecState*, JSObject*, JSValue, const ArgList&)
     55static JSValue JSC_HOST_CALL callFunctionPrototype(ExecState*, JSObject*, JSValue, const ArgList&)
    5656{
    5757    return jsUndefined();
     
    8383}
    8484
    85 JSValue functionProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     85JSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    8686{
    8787    if (thisValue.isObject(&JSFunction::info)) {
     
    102102}
    103103
    104 JSValue functionProtoFuncApply(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     104JSValue JSC_HOST_CALL functionProtoFuncApply(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    105105{
    106106    CallData callData;
     
    130130}
    131131
    132 JSValue functionProtoFuncCall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     132JSValue JSC_HOST_CALL functionProtoFuncCall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    133133{
    134134    CallData callData;
  • trunk/JavaScriptCore/runtime/JSFunction.h

    r43220 r43372  
    8484        bool isHostFunction() const { return false; }
    8585#endif
     86        NativeFunction nativeFunction()
     87        {
     88            return *reinterpret_cast<NativeFunction*>(m_data);
     89        }
    8690    private:
    8791        virtual const ClassInfo* classInfo() const { return &info; }
     
    115119            *reinterpret_cast<ScopeChain*>(m_data) = sc;
    116120        }
    117         NativeFunction nativeFunction()
    118         {
    119             return *reinterpret_cast<NativeFunction*>(m_data);
    120         }
    121121        void setNativeFunction(NativeFunction func)
    122122        {
  • trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp

    r43156 r43372  
    269269}
    270270
    271 JSValue globalFuncEval(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args)
     271JSValue JSC_HOST_CALL globalFuncEval(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args)
    272272{
    273273    JSObject* thisObject = thisValue.toThisObject(exec);
     
    294294}
    295295
    296 JSValue globalFuncParseInt(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     296JSValue JSC_HOST_CALL globalFuncParseInt(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    297297{
    298298    JSValue value = args.at(0);
     
    313313}
    314314
    315 JSValue globalFuncParseFloat(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     315JSValue JSC_HOST_CALL globalFuncParseFloat(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    316316{
    317317    return jsNumber(exec, parseFloat(args.at(0).toString(exec)));
    318318}
    319319
    320 JSValue globalFuncIsNaN(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     320JSValue JSC_HOST_CALL globalFuncIsNaN(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    321321{
    322322    return jsBoolean(isnan(args.at(0).toNumber(exec)));
    323323}
    324324
    325 JSValue globalFuncIsFinite(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     325JSValue JSC_HOST_CALL globalFuncIsFinite(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    326326{
    327327    double n = args.at(0).toNumber(exec);
     
    329329}
    330330
    331 JSValue globalFuncDecodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     331JSValue JSC_HOST_CALL globalFuncDecodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    332332{
    333333    static const char do_not_unescape_when_decoding_URI[] =
     
    337337}
    338338
    339 JSValue globalFuncDecodeURIComponent(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     339JSValue JSC_HOST_CALL globalFuncDecodeURIComponent(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    340340{
    341341    return decode(exec, args, "", true);
    342342}
    343343
    344 JSValue globalFuncEncodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     344JSValue JSC_HOST_CALL globalFuncEncodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    345345{
    346346    static const char do_not_escape_when_encoding_URI[] =
     
    353353}
    354354
    355 JSValue globalFuncEncodeURIComponent(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     355JSValue JSC_HOST_CALL globalFuncEncodeURIComponent(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    356356{
    357357    static const char do_not_escape_when_encoding_URI_component[] =
     
    364364}
    365365
    366 JSValue globalFuncEscape(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     366JSValue JSC_HOST_CALL globalFuncEscape(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    367367{
    368368    static const char do_not_escape[] =
     
    395395}
    396396
    397 JSValue globalFuncUnescape(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     397JSValue JSC_HOST_CALL globalFuncUnescape(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    398398{
    399399    UString result = "";
     
    423423
    424424#ifndef NDEBUG
    425 JSValue globalFuncJSCPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     425JSValue JSC_HOST_CALL globalFuncJSCPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    426426{
    427427    CStringBuffer string;
  • trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.h

    r43122 r43372  
    3737    // is a 0.5% reduction.
    3838
    39     JSValue globalFuncEval(ExecState*, JSObject*, JSValue, const ArgList&);
    40     JSValue globalFuncParseInt(ExecState*, JSObject*, JSValue, const ArgList&);
    41     JSValue globalFuncParseFloat(ExecState*, JSObject*, JSValue, const ArgList&);
    42     JSValue globalFuncIsNaN(ExecState*, JSObject*, JSValue, const ArgList&);
    43     JSValue globalFuncIsFinite(ExecState*, JSObject*, JSValue, const ArgList&);
    44     JSValue globalFuncDecodeURI(ExecState*, JSObject*, JSValue, const ArgList&);
    45     JSValue globalFuncDecodeURIComponent(ExecState*, JSObject*, JSValue, const ArgList&);
    46     JSValue globalFuncEncodeURI(ExecState*, JSObject*, JSValue, const ArgList&);
    47     JSValue globalFuncEncodeURIComponent(ExecState*, JSObject*, JSValue, const ArgList&);
    48     JSValue globalFuncEscape(ExecState*, JSObject*, JSValue, const ArgList&);
    49     JSValue globalFuncUnescape(ExecState*, JSObject*, JSValue, const ArgList&);
     39    JSValue JSC_HOST_CALL globalFuncEval(ExecState*, JSObject*, JSValue, const ArgList&);
     40    JSValue JSC_HOST_CALL globalFuncParseInt(ExecState*, JSObject*, JSValue, const ArgList&);
     41    JSValue JSC_HOST_CALL globalFuncParseFloat(ExecState*, JSObject*, JSValue, const ArgList&);
     42    JSValue JSC_HOST_CALL globalFuncIsNaN(ExecState*, JSObject*, JSValue, const ArgList&);
     43    JSValue JSC_HOST_CALL globalFuncIsFinite(ExecState*, JSObject*, JSValue, const ArgList&);
     44    JSValue JSC_HOST_CALL globalFuncDecodeURI(ExecState*, JSObject*, JSValue, const ArgList&);
     45    JSValue JSC_HOST_CALL globalFuncDecodeURIComponent(ExecState*, JSObject*, JSValue, const ArgList&);
     46    JSValue JSC_HOST_CALL globalFuncEncodeURI(ExecState*, JSObject*, JSValue, const ArgList&);
     47    JSValue JSC_HOST_CALL globalFuncEncodeURIComponent(ExecState*, JSObject*, JSValue, const ArgList&);
     48    JSValue JSC_HOST_CALL globalFuncEscape(ExecState*, JSObject*, JSValue, const ArgList&);
     49    JSValue JSC_HOST_CALL globalFuncUnescape(ExecState*, JSObject*, JSValue, const ArgList&);
    5050#ifndef NDEBUG
    51     JSValue globalFuncJSCPrint(ExecState*, JSObject*, JSValue, const ArgList&);
     51    JSValue JSC_HOST_CALL globalFuncJSCPrint(ExecState*, JSObject*, JSValue, const ArgList&);
    5252#endif
    5353
  • trunk/JavaScriptCore/runtime/MathObject.cpp

    r43122 r43372  
    3434ASSERT_CLASS_FITS_IN_CELL(MathObject);
    3535
    36 static JSValue mathProtoFuncAbs(ExecState*, JSObject*, JSValue, const ArgList&);
    37 static JSValue mathProtoFuncACos(ExecState*, JSObject*, JSValue, const ArgList&);
    38 static JSValue mathProtoFuncASin(ExecState*, JSObject*, JSValue, const ArgList&);
    39 static JSValue mathProtoFuncATan(ExecState*, JSObject*, JSValue, const ArgList&);
    40 static JSValue mathProtoFuncATan2(ExecState*, JSObject*, JSValue, const ArgList&);
    41 static JSValue mathProtoFuncCeil(ExecState*, JSObject*, JSValue, const ArgList&);
    42 static JSValue mathProtoFuncCos(ExecState*, JSObject*, JSValue, const ArgList&);
    43 static JSValue mathProtoFuncExp(ExecState*, JSObject*, JSValue, const ArgList&);
    44 static JSValue mathProtoFuncFloor(ExecState*, JSObject*, JSValue, const ArgList&);
    45 static JSValue mathProtoFuncLog(ExecState*, JSObject*, JSValue, const ArgList&);
    46 static JSValue mathProtoFuncMax(ExecState*, JSObject*, JSValue, const ArgList&);
    47 static JSValue mathProtoFuncMin(ExecState*, JSObject*, JSValue, const ArgList&);
    48 static JSValue mathProtoFuncPow(ExecState*, JSObject*, JSValue, const ArgList&);
    49 static JSValue mathProtoFuncRandom(ExecState*, JSObject*, JSValue, const ArgList&);
    50 static JSValue mathProtoFuncRound(ExecState*, JSObject*, JSValue, const ArgList&);
    51 static JSValue mathProtoFuncSin(ExecState*, JSObject*, JSValue, const ArgList&);
    52 static JSValue mathProtoFuncSqrt(ExecState*, JSObject*, JSValue, const ArgList&);
    53 static JSValue mathProtoFuncTan(ExecState*, JSObject*, JSValue, const ArgList&);
     36static JSValue JSC_HOST_CALL mathProtoFuncAbs(ExecState*, JSObject*, JSValue, const ArgList&);
     37static JSValue JSC_HOST_CALL mathProtoFuncACos(ExecState*, JSObject*, JSValue, const ArgList&);
     38static JSValue JSC_HOST_CALL mathProtoFuncASin(ExecState*, JSObject*, JSValue, const ArgList&);
     39static JSValue JSC_HOST_CALL mathProtoFuncATan(ExecState*, JSObject*, JSValue, const ArgList&);
     40static JSValue JSC_HOST_CALL mathProtoFuncATan2(ExecState*, JSObject*, JSValue, const ArgList&);
     41static JSValue JSC_HOST_CALL mathProtoFuncCeil(ExecState*, JSObject*, JSValue, const ArgList&);
     42static JSValue JSC_HOST_CALL mathProtoFuncCos(ExecState*, JSObject*, JSValue, const ArgList&);
     43static JSValue JSC_HOST_CALL mathProtoFuncExp(ExecState*, JSObject*, JSValue, const ArgList&);
     44static JSValue JSC_HOST_CALL mathProtoFuncFloor(ExecState*, JSObject*, JSValue, const ArgList&);
     45static JSValue JSC_HOST_CALL mathProtoFuncLog(ExecState*, JSObject*, JSValue, const ArgList&);
     46static JSValue JSC_HOST_CALL mathProtoFuncMax(ExecState*, JSObject*, JSValue, const ArgList&);
     47static JSValue JSC_HOST_CALL mathProtoFuncMin(ExecState*, JSObject*, JSValue, const ArgList&);
     48static JSValue JSC_HOST_CALL mathProtoFuncPow(ExecState*, JSObject*, JSValue, const ArgList&);
     49static JSValue JSC_HOST_CALL mathProtoFuncRandom(ExecState*, JSObject*, JSValue, const ArgList&);
     50static JSValue JSC_HOST_CALL mathProtoFuncRound(ExecState*, JSObject*, JSValue, const ArgList&);
     51static JSValue JSC_HOST_CALL mathProtoFuncSin(ExecState*, JSObject*, JSValue, const ArgList&);
     52static JSValue JSC_HOST_CALL mathProtoFuncSqrt(ExecState*, JSObject*, JSValue, const ArgList&);
     53static JSValue JSC_HOST_CALL mathProtoFuncTan(ExecState*, JSObject*, JSValue, const ArgList&);
    5454
    5555}
     
    116116// ------------------------------ Functions --------------------------------
    117117
    118 JSValue mathProtoFuncAbs(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     118JSValue JSC_HOST_CALL mathProtoFuncAbs(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    119119{
    120120    return jsNumber(exec, fabs(args.at(0).toNumber(exec)));
    121121}
    122122
    123 JSValue mathProtoFuncACos(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     123JSValue JSC_HOST_CALL mathProtoFuncACos(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    124124{
    125125    return jsNumber(exec, acos(args.at(0).toNumber(exec)));
    126126}
    127127
    128 JSValue mathProtoFuncASin(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     128JSValue JSC_HOST_CALL mathProtoFuncASin(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    129129{
    130130    return jsNumber(exec, asin(args.at(0).toNumber(exec)));
    131131}
    132132
    133 JSValue mathProtoFuncATan(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     133JSValue JSC_HOST_CALL mathProtoFuncATan(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    134134{
    135135    return jsNumber(exec, atan(args.at(0).toNumber(exec)));
    136136}
    137137
    138 JSValue mathProtoFuncATan2(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     138JSValue JSC_HOST_CALL mathProtoFuncATan2(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    139139{
    140140    return jsNumber(exec, atan2(args.at(0).toNumber(exec), args.at(1).toNumber(exec)));
    141141}
    142142
    143 JSValue mathProtoFuncCeil(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     143JSValue JSC_HOST_CALL mathProtoFuncCeil(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    144144{
    145145    return jsNumber(exec, ceil(args.at(0).toNumber(exec)));
    146146}
    147147
    148 JSValue mathProtoFuncCos(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     148JSValue JSC_HOST_CALL mathProtoFuncCos(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    149149{
    150150    return jsNumber(exec, cos(args.at(0).toNumber(exec)));
    151151}
    152152
    153 JSValue mathProtoFuncExp(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     153JSValue JSC_HOST_CALL mathProtoFuncExp(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    154154{
    155155    return jsNumber(exec, exp(args.at(0).toNumber(exec)));
    156156}
    157157
    158 JSValue mathProtoFuncFloor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     158JSValue JSC_HOST_CALL mathProtoFuncFloor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    159159{
    160160    return jsNumber(exec, floor(args.at(0).toNumber(exec)));
    161161}
    162162
    163 JSValue mathProtoFuncLog(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     163JSValue JSC_HOST_CALL mathProtoFuncLog(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    164164{
    165165    return jsNumber(exec, log(args.at(0).toNumber(exec)));
    166166}
    167167
    168 JSValue mathProtoFuncMax(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     168JSValue JSC_HOST_CALL mathProtoFuncMax(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    169169{
    170170    unsigned argsCount = args.size();
     
    182182}
    183183
    184 JSValue mathProtoFuncMin(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     184JSValue JSC_HOST_CALL mathProtoFuncMin(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    185185{
    186186    unsigned argsCount = args.size();
     
    198198}
    199199
    200 JSValue mathProtoFuncPow(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     200JSValue JSC_HOST_CALL mathProtoFuncPow(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    201201{
    202202    // ECMA 15.8.2.1.13
     
    212212}
    213213
    214 JSValue mathProtoFuncRandom(ExecState* exec, JSObject*, JSValue, const ArgList&)
     214JSValue JSC_HOST_CALL mathProtoFuncRandom(ExecState* exec, JSObject*, JSValue, const ArgList&)
    215215{
    216216    return jsNumber(exec, WTF::weakRandomNumber());
    217217}
    218218
    219 JSValue mathProtoFuncRound(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     219JSValue JSC_HOST_CALL mathProtoFuncRound(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    220220{
    221221    double arg = args.at(0).toNumber(exec);
     
    225225}
    226226
    227 JSValue mathProtoFuncSin(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     227JSValue JSC_HOST_CALL mathProtoFuncSin(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    228228{
    229229    return jsNumber(exec, sin(args.at(0).toNumber(exec)));
    230230}
    231231
    232 JSValue mathProtoFuncSqrt(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     232JSValue JSC_HOST_CALL mathProtoFuncSqrt(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    233233{
    234234    return jsNumber(exec, sqrt(args.at(0).toNumber(exec)));
    235235}
    236236
    237 JSValue mathProtoFuncTan(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     237JSValue JSC_HOST_CALL mathProtoFuncTan(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    238238{
    239239    return jsNumber(exec, tan(args.at(0).toNumber(exec)));
  • trunk/JavaScriptCore/runtime/NativeErrorConstructor.cpp

    r43122 r43372  
    5959    return ConstructTypeHost;
    6060}
    61 
    62 static JSValue callNativeErrorConstructor(ExecState* exec, JSObject* constructor, JSValue, const ArgList& args)
     61   
     62static JSValue JSC_HOST_CALL callNativeErrorConstructor(ExecState* exec, JSObject* constructor, JSValue, const ArgList& args)
    6363{
    6464    return static_cast<NativeErrorConstructor*>(constructor)->construct(exec, args);
  • trunk/JavaScriptCore/runtime/NativeFunctionWrapper.h

    r43253 r43372  
    2828
    2929namespace JSC {
    30 #if ENABLE(JIT) && PLATFORM(MAC)
     30#if ENABLE(JIT)
    3131    class JSFunction;
    3232    typedef JSFunction NativeFunctionWrapper;
  • trunk/JavaScriptCore/runtime/NumberConstructor.cpp

    r43122 r43372  
    110110
    111111// ECMA 15.7.2
    112 static JSValue callNumberConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     112static JSValue JSC_HOST_CALL callNumberConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    113113{
    114114    return jsNumber(exec, args.isEmpty() ? 0 : args.at(0).toNumber(exec));
  • trunk/JavaScriptCore/runtime/NumberPrototype.cpp

    r43226 r43372  
    3737ASSERT_CLASS_FITS_IN_CELL(NumberPrototype);
    3838
    39 static JSValue numberProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
    40 static JSValue numberProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&);
    41 static JSValue numberProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&);
    42 static JSValue numberProtoFuncToFixed(ExecState*, JSObject*, JSValue, const ArgList&);
    43 static JSValue numberProtoFuncToExponential(ExecState*, JSObject*, JSValue, const ArgList&);
    44 static JSValue numberProtoFuncToPrecision(ExecState*, JSObject*, JSValue, const ArgList&);
     39static JSValue JSC_HOST_CALL numberProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
     40static JSValue JSC_HOST_CALL numberProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&);
     41static JSValue JSC_HOST_CALL numberProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&);
     42static JSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState*, JSObject*, JSValue, const ArgList&);
     43static JSValue JSC_HOST_CALL numberProtoFuncToExponential(ExecState*, JSObject*, JSValue, const ArgList&);
     44static JSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState*, JSObject*, JSValue, const ArgList&);
    4545
    4646// ECMA 15.7.4
     
    135135}
    136136
    137 JSValue numberProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     137JSValue JSC_HOST_CALL numberProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    138138{
    139139    JSValue v = thisValue.getJSNumber();
     
    199199}
    200200
    201 JSValue numberProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     201JSValue JSC_HOST_CALL numberProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    202202{
    203203    // FIXME: Not implemented yet.
     
    210210}
    211211
    212 JSValue numberProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     212JSValue JSC_HOST_CALL numberProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    213213{
    214214    JSValue v = thisValue.getJSNumber();
     
    219219}
    220220
    221 JSValue numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     221JSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    222222{
    223223    JSValue v = thisValue.getJSNumber();
     
    304304}
    305305
    306 JSValue numberProtoFuncToExponential(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     306JSValue JSC_HOST_CALL numberProtoFuncToExponential(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    307307{
    308308    JSValue v = thisValue.getJSNumber();
     
    374374}
    375375
    376 JSValue numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     376JSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    377377{
    378378    JSValue v = thisValue.getJSNumber();
  • trunk/JavaScriptCore/runtime/ObjectConstructor.cpp

    r43222 r43372  
    6060}
    6161
    62 static JSValue callObjectConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     62static JSValue JSC_HOST_CALL callObjectConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    6363{
    6464    return constructObject(exec, args);
  • trunk/JavaScriptCore/runtime/ObjectPrototype.cpp

    r43226 r43372  
    3131ASSERT_CLASS_FITS_IN_CELL(ObjectPrototype);
    3232
    33 static JSValue objectProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&);
    34 static JSValue objectProtoFuncHasOwnProperty(ExecState*, JSObject*, JSValue, const ArgList&);
    35 static JSValue objectProtoFuncIsPrototypeOf(ExecState*, JSObject*, JSValue, const ArgList&);
    36 static JSValue objectProtoFuncDefineGetter(ExecState*, JSObject*, JSValue, const ArgList&);
    37 static JSValue objectProtoFuncDefineSetter(ExecState*, JSObject*, JSValue, const ArgList&);
    38 static JSValue objectProtoFuncLookupGetter(ExecState*, JSObject*, JSValue, const ArgList&);
    39 static JSValue objectProtoFuncLookupSetter(ExecState*, JSObject*, JSValue, const ArgList&);
    40 static JSValue objectProtoFuncPropertyIsEnumerable(ExecState*, JSObject*, JSValue, const ArgList&);
    41 static JSValue objectProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&);
     33static JSValue JSC_HOST_CALL objectProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&);
     34static JSValue JSC_HOST_CALL objectProtoFuncHasOwnProperty(ExecState*, JSObject*, JSValue, const ArgList&);
     35static JSValue JSC_HOST_CALL objectProtoFuncIsPrototypeOf(ExecState*, JSObject*, JSValue, const ArgList&);
     36static JSValue JSC_HOST_CALL objectProtoFuncDefineGetter(ExecState*, JSObject*, JSValue, const ArgList&);
     37static JSValue JSC_HOST_CALL objectProtoFuncDefineSetter(ExecState*, JSObject*, JSValue, const ArgList&);
     38static JSValue JSC_HOST_CALL objectProtoFuncLookupGetter(ExecState*, JSObject*, JSValue, const ArgList&);
     39static JSValue JSC_HOST_CALL objectProtoFuncLookupSetter(ExecState*, JSObject*, JSValue, const ArgList&);
     40static JSValue JSC_HOST_CALL objectProtoFuncPropertyIsEnumerable(ExecState*, JSObject*, JSValue, const ArgList&);
     41static JSValue JSC_HOST_CALL objectProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&);
    4242
    4343ObjectPrototype::ObjectPrototype(ExecState* exec, PassRefPtr<Structure> stucture, Structure* prototypeFunctionStructure)
     
    6262// ECMA 15.2.4.2, 15.2.4.4, 15.2.4.5, 15.2.4.7
    6363
    64 JSValue objectProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     64JSValue JSC_HOST_CALL objectProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    6565{
    6666    return thisValue.toThisObject(exec);
    6767}
    6868
    69 JSValue objectProtoFuncHasOwnProperty(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     69JSValue JSC_HOST_CALL objectProtoFuncHasOwnProperty(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    7070{
    7171    return jsBoolean(thisValue.toThisObject(exec)->hasOwnProperty(exec, Identifier(exec, args.at(0).toString(exec))));
    7272}
    7373
    74 JSValue objectProtoFuncIsPrototypeOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     74JSValue JSC_HOST_CALL objectProtoFuncIsPrototypeOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    7575{
    7676    JSObject* thisObj = thisValue.toThisObject(exec);
     
    9191}
    9292
    93 JSValue objectProtoFuncDefineGetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     93JSValue JSC_HOST_CALL objectProtoFuncDefineGetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    9494{
    9595    CallData callData;
     
    100100}
    101101
    102 JSValue objectProtoFuncDefineSetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     102JSValue JSC_HOST_CALL objectProtoFuncDefineSetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    103103{
    104104    CallData callData;
     
    109109}
    110110
    111 JSValue objectProtoFuncLookupGetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     111JSValue JSC_HOST_CALL objectProtoFuncLookupGetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    112112{
    113113    return thisValue.toThisObject(exec)->lookupGetter(exec, Identifier(exec, args.at(0).toString(exec)));
    114114}
    115115
    116 JSValue objectProtoFuncLookupSetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     116JSValue JSC_HOST_CALL objectProtoFuncLookupSetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    117117{
    118118    return thisValue.toThisObject(exec)->lookupSetter(exec, Identifier(exec, args.at(0).toString(exec)));
    119119}
    120120
    121 JSValue objectProtoFuncPropertyIsEnumerable(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     121JSValue JSC_HOST_CALL objectProtoFuncPropertyIsEnumerable(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    122122{
    123123    return jsBoolean(thisValue.toThisObject(exec)->propertyIsEnumerable(exec, Identifier(exec, args.at(0).toString(exec))));
    124124}
    125125
    126 JSValue objectProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     126JSValue JSC_HOST_CALL objectProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    127127{
    128128    return thisValue.toThisJSString(exec);
    129129}
    130130
    131 JSValue objectProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     131JSValue JSC_HOST_CALL objectProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    132132{
    133133    return jsNontrivialString(exec, "[object " + thisValue.toThisObject(exec)->className() + "]");
  • trunk/JavaScriptCore/runtime/ObjectPrototype.h

    r43122 r43372  
    3131    };
    3232
    33     JSValue objectProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
     33    JSValue JSC_HOST_CALL objectProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
    3434
    3535} // namespace JSC
  • trunk/JavaScriptCore/runtime/RegExpConstructor.cpp

    r43122 r43372  
    350350
    351351// ECMA 15.10.3
    352 static JSValue callRegExpConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     352static JSValue JSC_HOST_CALL callRegExpConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    353353{
    354354    return constructRegExp(exec, args);
  • trunk/JavaScriptCore/runtime/RegExpObject.cpp

    r43229 r43372  
    120120}
    121121
    122 static JSValue callRegExpObject(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
     122static JSValue JSC_HOST_CALL callRegExpObject(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
    123123{
    124124    return asRegExpObject(function)->exec(exec, args);
  • trunk/JavaScriptCore/runtime/RegExpPrototype.cpp

    r43222 r43372  
    3737ASSERT_CLASS_FITS_IN_CELL(RegExpPrototype);
    3838
    39 static JSValue regExpProtoFuncTest(ExecState*, JSObject*, JSValue, const ArgList&);
    40 static JSValue regExpProtoFuncExec(ExecState*, JSObject*, JSValue, const ArgList&);
    41 static JSValue regExpProtoFuncCompile(ExecState*, JSObject*, JSValue, const ArgList&);
    42 static JSValue regExpProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
     39static JSValue JSC_HOST_CALL regExpProtoFuncTest(ExecState*, JSObject*, JSValue, const ArgList&);
     40static JSValue JSC_HOST_CALL regExpProtoFuncExec(ExecState*, JSObject*, JSValue, const ArgList&);
     41static JSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState*, JSObject*, JSValue, const ArgList&);
     42static JSValue JSC_HOST_CALL regExpProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
    4343
    4444// ECMA 15.10.5
     
    5757// ------------------------------ Functions ---------------------------
    5858   
    59 JSValue regExpProtoFuncTest(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     59JSValue JSC_HOST_CALL regExpProtoFuncTest(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    6060{
    6161    if (!thisValue.isObject(&RegExpObject::info))
     
    6464}
    6565
    66 JSValue regExpProtoFuncExec(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     66JSValue JSC_HOST_CALL regExpProtoFuncExec(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    6767{
    6868    if (!thisValue.isObject(&RegExpObject::info))
     
    7171}
    7272
    73 JSValue regExpProtoFuncCompile(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     73JSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    7474{
    7575    if (!thisValue.isObject(&RegExpObject::info))
     
    9898}
    9999
    100 JSValue regExpProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     100JSValue JSC_HOST_CALL regExpProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    101101{
    102102    if (!thisValue.isObject(&RegExpObject::info)) {
  • trunk/JavaScriptCore/runtime/StringConstructor.cpp

    r43226 r43372  
    3939}
    4040
    41 static JSValue stringFromCharCode(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     41static JSValue JSC_HOST_CALL stringFromCharCode(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    4242{
    4343    if (LIKELY(args.size() == 1))
     
    7676
    7777// ECMA 15.5.1
    78 static JSValue callStringConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
     78static JSValue JSC_HOST_CALL callStringConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    7979{
    8080    if (args.isEmpty())
  • trunk/JavaScriptCore/runtime/StringPrototype.cpp

    r43358 r43372  
    3939ASSERT_CLASS_FITS_IN_CELL(StringPrototype);
    4040
    41 static JSValue stringProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
    42 static JSValue stringProtoFuncCharAt(ExecState*, JSObject*, JSValue, const ArgList&);
    43 static JSValue stringProtoFuncCharCodeAt(ExecState*, JSObject*, JSValue, const ArgList&);
    44 static JSValue stringProtoFuncConcat(ExecState*, JSObject*, JSValue, const ArgList&);
    45 static JSValue stringProtoFuncIndexOf(ExecState*, JSObject*, JSValue, const ArgList&);
    46 static JSValue stringProtoFuncLastIndexOf(ExecState*, JSObject*, JSValue, const ArgList&);
    47 static JSValue stringProtoFuncMatch(ExecState*, JSObject*, JSValue, const ArgList&);
    48 static JSValue stringProtoFuncReplace(ExecState*, JSObject*, JSValue, const ArgList&);
    49 static JSValue stringProtoFuncSearch(ExecState*, JSObject*, JSValue, const ArgList&);
    50 static JSValue stringProtoFuncSlice(ExecState*, JSObject*, JSValue, const ArgList&);
    51 static JSValue stringProtoFuncSplit(ExecState*, JSObject*, JSValue, const ArgList&);
    52 static JSValue stringProtoFuncSubstr(ExecState*, JSObject*, JSValue, const ArgList&);
    53 static JSValue stringProtoFuncSubstring(ExecState*, JSObject*, JSValue, const ArgList&);
    54 static JSValue stringProtoFuncToLowerCase(ExecState*, JSObject*, JSValue, const ArgList&);
    55 static JSValue stringProtoFuncToUpperCase(ExecState*, JSObject*, JSValue, const ArgList&);
    56 static JSValue stringProtoFuncLocaleCompare(ExecState*, JSObject*, JSValue, const ArgList&);
    57 
    58 static JSValue stringProtoFuncBig(ExecState*, JSObject*, JSValue, const ArgList&);
    59 static JSValue stringProtoFuncSmall(ExecState*, JSObject*, JSValue, const ArgList&);
    60 static JSValue stringProtoFuncBlink(ExecState*, JSObject*, JSValue, const ArgList&);
    61 static JSValue stringProtoFuncBold(ExecState*, JSObject*, JSValue, const ArgList&);
    62 static JSValue stringProtoFuncFixed(ExecState*, JSObject*, JSValue, const ArgList&);
    63 static JSValue stringProtoFuncItalics(ExecState*, JSObject*, JSValue, const ArgList&);
    64 static JSValue stringProtoFuncStrike(ExecState*, JSObject*, JSValue, const ArgList&);
    65 static JSValue stringProtoFuncSub(ExecState*, JSObject*, JSValue, const ArgList&);
    66 static JSValue stringProtoFuncSup(ExecState*, JSObject*, JSValue, const ArgList&);
    67 static JSValue stringProtoFuncFontcolor(ExecState*, JSObject*, JSValue, const ArgList&);
    68 static JSValue stringProtoFuncFontsize(ExecState*, JSObject*, JSValue, const ArgList&);
    69 static JSValue stringProtoFuncAnchor(ExecState*, JSObject*, JSValue, const ArgList&);
    70 static JSValue stringProtoFuncLink(ExecState*, JSObject*, JSValue, const ArgList&);
     41static JSValue JSC_HOST_CALL stringProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);
     42static JSValue JSC_HOST_CALL stringProtoFuncCharAt(ExecState*, JSObject*, JSValue, const ArgList&);
     43static JSValue JSC_HOST_CALL stringProtoFuncCharCodeAt(ExecState*, JSObject*, JSValue, const ArgList&);
     44static JSValue JSC_HOST_CALL stringProtoFuncConcat(ExecState*, JSObject*, JSValue, const ArgList&);
     45static JSValue JSC_HOST_CALL stringProtoFuncIndexOf(ExecState*, JSObject*, JSValue, const ArgList&);
     46static JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState*, JSObject*, JSValue, const ArgList&);
     47static JSValue JSC_HOST_CALL stringProtoFuncMatch(ExecState*, JSObject*, JSValue, const ArgList&);
     48static JSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState*, JSObject*, JSValue, const ArgList&);
     49static JSValue JSC_HOST_CALL stringProtoFuncSearch(ExecState*, JSObject*, JSValue, const ArgList&);
     50static JSValue JSC_HOST_CALL stringProtoFuncSlice(ExecState*, JSObject*, JSValue, const ArgList&);
     51static JSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState*, JSObject*, JSValue, const ArgList&);
     52static JSValue JSC_HOST_CALL stringProtoFuncSubstr(ExecState*, JSObject*, JSValue, const ArgList&);
     53static JSValue JSC_HOST_CALL stringProtoFuncSubstring(ExecState*, JSObject*, JSValue, const ArgList&);
     54static JSValue JSC_HOST_CALL stringProtoFuncToLowerCase(ExecState*, JSObject*, JSValue, const ArgList&);
     55static JSValue JSC_HOST_CALL stringProtoFuncToUpperCase(ExecState*, JSObject*, JSValue, const ArgList&);
     56static JSValue JSC_HOST_CALL stringProtoFuncLocaleCompare(ExecState*, JSObject*, JSValue, const ArgList&);
     57
     58static JSValue JSC_HOST_CALL stringProtoFuncBig(ExecState*, JSObject*, JSValue, const ArgList&);
     59static JSValue JSC_HOST_CALL stringProtoFuncSmall(ExecState*, JSObject*, JSValue, const ArgList&);
     60static JSValue JSC_HOST_CALL stringProtoFuncBlink(ExecState*, JSObject*, JSValue, const ArgList&);
     61static JSValue JSC_HOST_CALL stringProtoFuncBold(ExecState*, JSObject*, JSValue, const ArgList&);
     62static JSValue JSC_HOST_CALL stringProtoFuncFixed(ExecState*, JSObject*, JSValue, const ArgList&);
     63static JSValue JSC_HOST_CALL stringProtoFuncItalics(ExecState*, JSObject*, JSValue, const ArgList&);
     64static JSValue JSC_HOST_CALL stringProtoFuncStrike(ExecState*, JSObject*, JSValue, const ArgList&);
     65static JSValue JSC_HOST_CALL stringProtoFuncSub(ExecState*, JSObject*, JSValue, const ArgList&);
     66static JSValue JSC_HOST_CALL stringProtoFuncSup(ExecState*, JSObject*, JSValue, const ArgList&);
     67static JSValue JSC_HOST_CALL stringProtoFuncFontcolor(ExecState*, JSObject*, JSValue, const ArgList&);
     68static JSValue JSC_HOST_CALL stringProtoFuncFontsize(ExecState*, JSObject*, JSValue, const ArgList&);
     69static JSValue JSC_HOST_CALL stringProtoFuncAnchor(ExecState*, JSObject*, JSValue, const ArgList&);
     70static JSValue JSC_HOST_CALL stringProtoFuncLink(ExecState*, JSObject*, JSValue, const ArgList&);
    7171
    7272}
     
    206206}
    207207
    208 JSValue stringProtoFuncReplace(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     208JSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    209209{
    210210    JSString* sourceVal = thisValue.toThisJSString(exec);
     
    356356}
    357357
    358 JSValue stringProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     358JSValue JSC_HOST_CALL stringProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    359359{
    360360    // Also used for valueOf.
     
    369369}
    370370
    371 JSValue stringProtoFuncCharAt(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     371JSValue JSC_HOST_CALL stringProtoFuncCharAt(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    372372{
    373373    UString s = thisValue.toThisString(exec);
     
    386386}
    387387
    388 JSValue stringProtoFuncCharCodeAt(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     388JSValue JSC_HOST_CALL stringProtoFuncCharCodeAt(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    389389{
    390390    UString s = thisValue.toThisString(exec);
     
    403403}
    404404
    405 JSValue stringProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     405JSValue JSC_HOST_CALL stringProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    406406{
    407407    UString s = thisValue.toThisString(exec);
     
    413413}
    414414
    415 JSValue stringProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     415JSValue JSC_HOST_CALL stringProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    416416{
    417417    UString s = thisValue.toThisString(exec);
     
    438438}
    439439
    440 JSValue stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     440JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    441441{
    442442    UString s = thisValue.toThisString(exec);
     
    455455}
    456456
    457 JSValue stringProtoFuncMatch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     457JSValue JSC_HOST_CALL stringProtoFuncMatch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    458458{
    459459    UString s = thisValue.toThisString(exec);
     
    506506}
    507507
    508 JSValue stringProtoFuncSearch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     508JSValue JSC_HOST_CALL stringProtoFuncSearch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    509509{
    510510    UString s = thisValue.toThisString(exec);
     
    531531}
    532532
    533 JSValue stringProtoFuncSlice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     533JSValue JSC_HOST_CALL stringProtoFuncSlice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    534534{
    535535    UString s = thisValue.toThisString(exec);
     
    555555}
    556556
    557 JSValue stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     557JSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    558558{
    559559    UString s = thisValue.toThisString(exec);
     
    617617}
    618618
    619 JSValue stringProtoFuncSubstr(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     619JSValue JSC_HOST_CALL stringProtoFuncSubstr(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    620620{
    621621    UString s = thisValue.toThisString(exec);
     
    639639}
    640640
    641 JSValue stringProtoFuncSubstring(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     641JSValue JSC_HOST_CALL stringProtoFuncSubstring(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    642642{
    643643    UString s = thisValue.toThisString(exec);
     
    671671}
    672672
    673 JSValue stringProtoFuncToLowerCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     673JSValue JSC_HOST_CALL stringProtoFuncToLowerCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    674674{
    675675    JSString* sVal = thisValue.toThisJSString(exec);
     
    705705}
    706706
    707 JSValue stringProtoFuncToUpperCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     707JSValue JSC_HOST_CALL stringProtoFuncToUpperCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    708708{
    709709    JSString* sVal = thisValue.toThisJSString(exec);
     
    739739}
    740740
    741 JSValue stringProtoFuncLocaleCompare(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     741JSValue JSC_HOST_CALL stringProtoFuncLocaleCompare(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    742742{
    743743    if (args.size() < 1)
     
    749749}
    750750
    751 JSValue stringProtoFuncBig(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     751JSValue JSC_HOST_CALL stringProtoFuncBig(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    752752{
    753753    UString s = thisValue.toThisString(exec);
     
    755755}
    756756
    757 JSValue stringProtoFuncSmall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     757JSValue JSC_HOST_CALL stringProtoFuncSmall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    758758{
    759759    UString s = thisValue.toThisString(exec);
     
    761761}
    762762
    763 JSValue stringProtoFuncBlink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     763JSValue JSC_HOST_CALL stringProtoFuncBlink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    764764{
    765765    UString s = thisValue.toThisString(exec);
     
    767767}
    768768
    769 JSValue stringProtoFuncBold(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     769JSValue JSC_HOST_CALL stringProtoFuncBold(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    770770{
    771771    UString s = thisValue.toThisString(exec);
     
    773773}
    774774
    775 JSValue stringProtoFuncFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     775JSValue JSC_HOST_CALL stringProtoFuncFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    776776{
    777777    UString s = thisValue.toThisString(exec);
     
    779779}
    780780
    781 JSValue stringProtoFuncItalics(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     781JSValue JSC_HOST_CALL stringProtoFuncItalics(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    782782{
    783783    UString s = thisValue.toThisString(exec);
     
    785785}
    786786
    787 JSValue stringProtoFuncStrike(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     787JSValue JSC_HOST_CALL stringProtoFuncStrike(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    788788{
    789789    UString s = thisValue.toThisString(exec);
     
    791791}
    792792
    793 JSValue stringProtoFuncSub(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     793JSValue JSC_HOST_CALL stringProtoFuncSub(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    794794{
    795795    UString s = thisValue.toThisString(exec);
     
    797797}
    798798
    799 JSValue stringProtoFuncSup(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
     799JSValue JSC_HOST_CALL stringProtoFuncSup(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)
    800800{
    801801    UString s = thisValue.toThisString(exec);
     
    803803}
    804804
    805 JSValue stringProtoFuncFontcolor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     805JSValue JSC_HOST_CALL stringProtoFuncFontcolor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    806806{
    807807    UString s = thisValue.toThisString(exec);
     
    810810}
    811811
    812 JSValue stringProtoFuncFontsize(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     812JSValue JSC_HOST_CALL stringProtoFuncFontsize(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    813813{
    814814    UString s = thisValue.toThisString(exec);
     
    851851}
    852852
    853 JSValue stringProtoFuncAnchor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     853JSValue JSC_HOST_CALL stringProtoFuncAnchor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    854854{
    855855    UString s = thisValue.toThisString(exec);
     
    858858}
    859859
    860 JSValue stringProtoFuncLink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
     860JSValue JSC_HOST_CALL stringProtoFuncLink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
    861861{
    862862    UString s = thisValue.toThisString(exec);
  • trunk/JavaScriptCore/wtf/Platform.h

    r43047 r43372  
    500500#endif
    501501
     502#if PLATFORM(X86_64)
     503    #define JSC_HOST_CALL
     504#elif COMPILER(MSVC)
     505    #define JSC_HOST_CALL __fastcall
     506#elif COMPILER(GCC) && PLATFORM(X86)
     507    #define JSC_HOST_CALL __attribute__ ((fastcall))
     508#else
     509    #if ENABLE(JIT)
     510    #error Need to support register calling convention in this compiler
     511    #else
     512    #define JSC_HOST_CALL
     513    #endif
     514#endif
     515
    502516/* Yet Another Regex Runtime. */
    503517/* YARR supports x86 & x86-64, and has been tested on Mac and Windows. */
  • trunk/JavaScriptGlue/ChangeLog

    r43122 r43372  
     12009-05-07  Oliver Hunt  <[email protected]>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        Add calling convention annotation
     6
     7        * JSObject.cpp:
     8
    192009-05-01  Geoffrey Garen  <[email protected]>
    210
  • trunk/JavaScriptGlue/JSObject.cpp

    r43122 r43372  
    7474}
    7575
     76static JSValue JSC_HOST_CALL nativeCallFunction(ExecState* exec, JSObject* functionObject, JSValue  thisValue, const ArgList& args);
    7677static JSValue  nativeCallFunction(ExecState* exec, JSObject* functionObject, JSValue  thisValue, const ArgList& args)
    7778{
  • trunk/WebCore/ChangeLog

    r43367 r43372  
     12009-05-07  Oliver Hunt  <[email protected]>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        Improve native call performance
     6
     7        Add calling convention declarations where necessary, and update bindings
     8        script to generate them as well.
     9
     10        * bindings/js/JSHTMLCollectionCustom.cpp:
     11        (WebCore::callHTMLCollection):
     12        * bindings/js/JSNodeListCustom.cpp:
     13        (WebCore::callNodeList):
     14        * bindings/js/JSPluginElementFunctions.cpp:
     15        (WebCore::callPlugin):
     16        * bindings/js/JSQuarantinedObjectWrapper.h:
     17        * bindings/scripts/CodeGeneratorJS.pm:
     18        * bridge/runtime_method.cpp:
     19        (JSC::callRuntimeMethod):
     20        * bridge/runtime_object.cpp:
     21        (JSC::callRuntimeObject):
     22
    1232009-05-07  Nikolas Zimmermann  <[email protected]>
    224
  • trunk/WebCore/bindings/js/JSHTMLCollectionCustom.cpp

    r43187 r43372  
    5252// HTMLCollections are strange objects, they support both get and call,
    5353// so that document.forms.item(0) and document.forms(0) both work.
    54 static JSValue callHTMLCollection(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
     54static JSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
    5555{
    5656    if (args.size() < 1)
  • trunk/WebCore/bindings/js/JSNodeListCustom.cpp

    r43122 r43372  
    3737
    3838// Need to support call so that list(0) works.
    39 static JSValue callNodeList(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
     39static JSValue JSC_HOST_CALL callNodeList(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
    4040{
    4141    bool ok;
  • trunk/WebCore/bindings/js/JSPluginElementFunctions.cpp

    r43122 r43372  
    9898}
    9999
    100 static JSValue callPlugin(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
     100static JSValue JSC_HOST_CALL callPlugin(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
    101101{
    102102    Instance* instance = pluginInstance(static_cast<JSHTMLElement*>(function)->impl());
  • trunk/WebCore/bindings/js/JSQuarantinedObjectWrapper.h

    r43122 r43372  
    9090        void transferExceptionToExecState(JSC::ExecState*) const;
    9191
    92         static JSC::JSValue call(JSC::ExecState*, JSC::JSObject* function, JSC::JSValue thisValue, const JSC::ArgList&);
     92        static JSC::JSValue JSC_HOST_CALL call(JSC::ExecState*, JSC::JSObject* function, JSC::JSValue thisValue, const JSC::ArgList&);
    9393        static JSC::JSObject* construct(JSC::ExecState*, JSC::JSObject*, const JSC::ArgList&);
    9494
  • trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r43242 r43372  
    691691        foreach my $function (@{$dataNode->functions}) {
    692692            my $functionName = $codeGenerator->WK_lcfirst($className) . "PrototypeFunction" . $codeGenerator->WK_ucfirst($function->signature->name);
    693             push(@headerContent, "JSC::JSValue ${functionName}(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);\n");
     693            push(@headerContent, "JSC::JSValue JSC_HOST_CALL ${functionName}(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);\n");
    694694        }
    695695    }
     
    13261326            my $functionImplementationName = $function->signature->extendedAttributes->{"ImplementationFunction"} || $codeGenerator->WK_lcfirst($function->signature->name);
    13271327
    1328             push(@implContent, "JSValue ${functionName}(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)\n");
     1328            push(@implContent, "JSValue JSC_HOST_CALL ${functionName}(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)\n");
    13291329            push(@implContent, "{\n");
    13301330            push(@implContent, "    UNUSED_PARAM(args);\n");
  • trunk/WebCore/bridge/runtime_method.cpp

    r43122 r43372  
    7171}
    7272
    73 static JSValue callRuntimeMethod(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args)
     73static JSValue JSC_HOST_CALL callRuntimeMethod(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args)
    7474{
    7575    RuntimeMethod* method = static_cast<RuntimeMethod*>(function);
  • trunk/WebCore/bridge/runtime_object.cpp

    r43122 r43372  
    204204}
    205205
    206 static JSValue callRuntimeObject(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
     206static JSValue JSC_HOST_CALL callRuntimeObject(ExecState* exec, JSObject* function, JSValue, const ArgList& args)
    207207{
    208208    RefPtr<Instance> instance(static_cast<RuntimeObjectImp*>(function)->getInternalInstance());
Note: See TracChangeset for help on using the changeset viewer.