Changeset 43372 in webkit
- Timestamp:
- May 7, 2009, 3:52:19 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSCallbackFunction.h
r43122 r43372 49 49 virtual const ClassInfo* classInfo() const { return &info; } 50 50 51 static JSValue call(ExecState*, JSObject*, JSValue, const ArgList&);51 static JSValue JSC_HOST_CALL call(ExecState*, JSObject*, JSValue, const ArgList&); 52 52 53 53 JSObjectCallAsFunctionCallback m_callback; -
trunk/JavaScriptCore/API/JSCallbackObject.h
r43122 r43372 80 80 static JSCallbackObject* asCallbackObject(JSValue); 81 81 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&); 83 83 static JSObject* construct(ExecState*, JSObject* constructor, const ArgList&); 84 84 -
trunk/JavaScriptCore/ChangeLog
r43371 r43372 1 2009-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 1 228 2009-05-07 Geoffrey Garen <[email protected]> 2 229 -
trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
r43366 r43372 7 7 ??0InternalFunction@JSC@@IAE@PAVJSGlobalData@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@ABVIdentifier@1@@Z 8 8 ??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 9 13 ??0Mutex@WTF@@QAE@XZ 10 ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@HABVIdentifier@1@P6A?AVJSValue@1@0PAVJSObject@1@V41@ABVArgList@1@@Z@Z11 14 ??0RefCountedLeakCounter@WTF@@QAE@PBD@Z 12 15 ??0StringObject@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@ABVUString@1@@Z … … 172 175 ?nonInlineNaN@JSImmediate@JSC@@CANXZ 173 176 ?objectCount@Heap@JSC@@QAEIXZ 174 ?objectProtoFuncToString@JSC@@YA?AVJSValue@1@PAVExecState@1@PAVJSObject@1@V21@ABVArgList@1@@Z175 177 ?parse@Parser@JSC@@AAEXPAVJSGlobalData@2@PAHPAVUString@2@@Z 176 178 ?primaryHeapBegin@Heap@JSC@@QAE?AV?$CollectorHeapIterator@$0A@@2@XZ … … 260 262 WTFReportError 261 263 ?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@Z263 264 ?substr@UString@JSC@@QBE?AV12@HH@Z 264 265 ?setDumpsGeneratedCode@BytecodeGenerator@JSC@@SAX_N@Z -
trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def
r43366 r43372 8 8 ??0JSByteArray@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@PAVByteArray@4@PBUClassInfo@1@@Z 9 9 ??0Mutex@WTF@@QAE@XZ 10 ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@HABVIdentifier@1@P6A?AVJSValue@1@0PAVJSObject@1@V41@ABVArgList@1@@Z@Z11 10 ??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 12 15 ??0StringObject@JSC@@QAE@PAVExecState@1@V?$PassRefPtr@VStructure@JSC@@@WTF@@ABVUString@1@@Z 13 16 ??0Structure@JSC@@AAE@VJSValue@1@ABVTypeInfo@1@@Z … … 172 175 ?nonInlineNaN@JSImmediate@JSC@@CANXZ 173 176 ?objectCount@Heap@JSC@@QAEIXZ 174 ?objectProtoFuncToString@JSC@@YA?AVJSValue@1@PAVExecState@1@PAVJSObject@1@V21@ABVArgList@1@@Z175 177 ?parse@Parser@JSC@@AAEXPAVJSGlobalData@2@PAHPAVUString@2@@Z 176 178 ?primaryHeapBegin@Heap@JSC@@QAE?AV?$CollectorHeapIterator@$0A@@2@XZ … … 260 262 WTFReportError 261 263 ?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@Z263 264 ?substr@UString@JSC@@QBE?AV12@HH@Z 264 265 ?setDumpsGeneratedCode@BytecodeGenerator@JSC@@SAX_N@Z -
trunk/JavaScriptCore/interpreter/CallFrame.h
r43153 r43372 41 41 CodeBlock* codeBlock() const { return this[RegisterFile::CodeBlock].Register::codeBlock(); } 42 42 ScopeChainNode* scopeChain() const { return this[RegisterFile::ScopeChain].Register::scopeChain(); } 43 int argumentCount() const { return this[RegisterFile::ArgumentCount].i(); } 43 44 44 45 JSValue thisValue(); … … 108 109 CallFrame& operator=(const Register& r) { *static_cast<Register*>(this) = r; return *this; } 109 110 110 int argumentCount() const { return this[RegisterFile::ArgumentCount].i(); }111 111 CallFrame* callerFrame() const { return this[RegisterFile::CallerFrame].callFrame(); } 112 112 Arguments* optionalCalleeArguments() const { return this[RegisterFile::OptionalCalleeArguments].arguments(); } -
trunk/JavaScriptCore/jit/JIT.cpp
r43363 r43372 1823 1823 emitGetFromCallFrameHeader(RegisterFile::ArgumentCount, regT0); 1824 1824 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 1827 1836 JSObject* callee; 1828 1837 JSValue thisValue; 1829 1838 ArgList* argPointer; 1830 1839 ArgList args; 1840 JSValue result; 1831 1841 }; 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; 1833 1861 // Allocate system stack frame 1834 1862 subPtr(Imm32(NativeCallFrameSize), stackPointerRegister); … … 1838 1866 1839 1867 // push argcount 1840 storePtr(regT0, Address(stackPointerRegister, FIELD_OFFSET(Native FunctionSignature, args) + FIELD_OFFSET(ArgList, m_argCount)));1868 storePtr(regT0, Address(stackPointerRegister, FIELD_OFFSET(NativeCallFrameStructure, args) + FIELD_OFFSET(ArgList, m_argCount))); 1841 1869 1842 1870 // Calculate the start of the callframe header, and store in regT1 … … 1846 1874 mul32(Imm32(sizeof(Register)), regT0, regT0); 1847 1875 subPtr(regT0, regT1); 1848 storePtr(regT1, Address(stackPointerRegister, FIELD_OFFSET(Native FunctionSignature, args) + FIELD_OFFSET(ArgList, m_args)));1876 storePtr(regT1, Address(stackPointerRegister, FIELD_OFFSET(NativeCallFrameStructure, args) + FIELD_OFFSET(ArgList, m_args))); 1849 1877 1850 1878 // ArgList is passed by reference so is stackPointerRegister + 4 * sizeof(Register) 1851 addPtr(Imm32(FIELD_OFFSET(Native FunctionSignature, args)), stackPointerRegister, regT0);1852 storePtr(regT0, Address(stackPointerRegister, FIELD_OFFSET(Native FunctionSignature, argPointer)));1879 addPtr(Imm32(FIELD_OFFSET(NativeCallFrameStructure, args)), stackPointerRegister, regT0); 1880 storePtr(regT0, Address(stackPointerRegister, FIELD_OFFSET(NativeCallFrameStructure, argPointer))); 1853 1881 1854 1882 // regT1 currently points to the first argument, regT1 - sizeof(Register) points to 'this' 1855 1883 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); 1858 1889 1859 1890 // 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))); 1862 1893 1863 1894 // 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 1868 1914 #endif 1869 1915 -
trunk/JavaScriptCore/jsc.cpp
r43220 r43372 70 70 static bool fillBufferWithContentsOfFile(const UString& fileName, Vector<char>& buffer); 71 71 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&);72 static JSValue JSC_HOST_CALL functionPrint(ExecState*, JSObject*, JSValue, const ArgList&); 73 static JSValue JSC_HOST_CALL functionDebug(ExecState*, JSObject*, JSValue, const ArgList&); 74 static JSValue JSC_HOST_CALL functionGC(ExecState*, JSObject*, JSValue, const ArgList&); 75 static JSValue JSC_HOST_CALL functionVersion(ExecState*, JSObject*, JSValue, const ArgList&); 76 static JSValue JSC_HOST_CALL functionRun(ExecState*, JSObject*, JSValue, const ArgList&); 77 static JSValue JSC_HOST_CALL functionLoad(ExecState*, JSObject*, JSValue, const ArgList&); 78 static JSValue JSC_HOST_CALL functionReadline(ExecState*, JSObject*, JSValue, const ArgList&); 79 static NO_RETURN JSValue JSC_HOST_CALL functionQuit(ExecState*, JSObject*, JSValue, const ArgList&); 80 80 81 81 #if ENABLE(SAMPLING_FLAGS) 82 static JSValue functionSetSamplingFlags(ExecState*, JSObject*, JSValue, const ArgList&);83 static JSValue functionClearSamplingFlags(ExecState*, JSObject*, JSValue, const ArgList&);82 static JSValue JSC_HOST_CALL functionSetSamplingFlags(ExecState*, JSObject*, JSValue, const ArgList&); 83 static JSValue JSC_HOST_CALL functionClearSamplingFlags(ExecState*, JSObject*, JSValue, const ArgList&); 84 84 #endif 85 85 … … 198 198 } 199 199 200 JSValue functionPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args)200 JSValue JSC_HOST_CALL functionPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args) 201 201 { 202 202 for (unsigned i = 0; i < args.size(); ++i) { … … 212 212 } 213 213 214 JSValue functionDebug(ExecState* exec, JSObject*, JSValue, const ArgList& args)214 JSValue JSC_HOST_CALL functionDebug(ExecState* exec, JSObject*, JSValue, const ArgList& args) 215 215 { 216 216 fprintf(stderr, "--> %s\n", args.at(0).toString(exec).UTF8String().c_str()); … … 218 218 } 219 219 220 JSValue functionGC(ExecState* exec, JSObject*, JSValue, const ArgList&)220 JSValue JSC_HOST_CALL functionGC(ExecState* exec, JSObject*, JSValue, const ArgList&) 221 221 { 222 222 JSLock lock(false); … … 225 225 } 226 226 227 JSValue functionVersion(ExecState*, JSObject*, JSValue, const ArgList&)227 JSValue JSC_HOST_CALL functionVersion(ExecState*, JSObject*, JSValue, const ArgList&) 228 228 { 229 229 // We need this function for compatibility with the Mozilla JS tests but for now … … 232 232 } 233 233 234 JSValue functionRun(ExecState* exec, JSObject*, JSValue, const ArgList& args)234 JSValue JSC_HOST_CALL functionRun(ExecState* exec, JSObject*, JSValue, const ArgList& args) 235 235 { 236 236 StopWatch stopWatch; … … 249 249 } 250 250 251 JSValue functionLoad(ExecState* exec, JSObject*, JSValue, const ArgList& args) 252 { 251 JSValue JSC_HOST_CALL functionLoad(ExecState* exec, JSObject* o, JSValue v, const ArgList& args) 252 { 253 UNUSED_PARAM(o); 254 UNUSED_PARAM(v); 253 255 UString fileName = args.at(0).toString(exec); 254 256 Vector<char> script; … … 264 266 265 267 #if ENABLE(SAMPLING_FLAGS) 266 JSValue functionSetSamplingFlags(ExecState* exec, JSObject*, JSValue, const ArgList& args)268 JSValue JSC_HOST_CALL functionSetSamplingFlags(ExecState* exec, JSObject*, JSValue, const ArgList& args) 267 269 { 268 270 for (unsigned i = 0; i < args.size(); ++i) { … … 274 276 } 275 277 276 JSValue functionClearSamplingFlags(ExecState* exec, JSObject*, JSValue, const ArgList& args)278 JSValue JSC_HOST_CALL functionClearSamplingFlags(ExecState* exec, JSObject*, JSValue, const ArgList& args) 277 279 { 278 280 for (unsigned i = 0; i < args.size(); ++i) { … … 285 287 #endif 286 288 287 JSValue functionReadline(ExecState* exec, JSObject*, JSValue, const ArgList&)289 JSValue JSC_HOST_CALL functionReadline(ExecState* exec, JSObject*, JSValue, const ArgList&) 288 290 { 289 291 Vector<char, 256> line; … … 299 301 } 300 302 301 JSValue functionQuit(ExecState* exec, JSObject*, JSValue, const ArgList&)303 JSValue JSC_HOST_CALL functionQuit(ExecState* exec, JSObject*, JSValue, const ArgList&) 302 304 { 303 305 cleanupGlobalData(&exec->globalData()); -
trunk/JavaScriptCore/runtime/ArrayConstructor.cpp
r43222 r43372 70 70 } 71 71 72 static JSValue callArrayConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)72 static JSValue JSC_HOST_CALL callArrayConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 73 73 { 74 74 return constructArrayWithSizeQuirk(exec, args); -
trunk/JavaScriptCore/runtime/ArrayPrototype.cpp
r43220 r43372 40 40 ASSERT_CLASS_FITS_IN_CELL(ArrayPrototype); 41 41 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&);42 static JSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 43 static JSValue JSC_HOST_CALL arrayProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&); 44 static JSValue JSC_HOST_CALL arrayProtoFuncConcat(ExecState*, JSObject*, JSValue, const ArgList&); 45 static JSValue JSC_HOST_CALL arrayProtoFuncJoin(ExecState*, JSObject*, JSValue, const ArgList&); 46 static JSValue JSC_HOST_CALL arrayProtoFuncPop(ExecState*, JSObject*, JSValue, const ArgList&); 47 static JSValue JSC_HOST_CALL arrayProtoFuncPush(ExecState*, JSObject*, JSValue, const ArgList&); 48 static JSValue JSC_HOST_CALL arrayProtoFuncReverse(ExecState*, JSObject*, JSValue, const ArgList&); 49 static JSValue JSC_HOST_CALL arrayProtoFuncShift(ExecState*, JSObject*, JSValue, const ArgList&); 50 static JSValue JSC_HOST_CALL arrayProtoFuncSlice(ExecState*, JSObject*, JSValue, const ArgList&); 51 static JSValue JSC_HOST_CALL arrayProtoFuncSort(ExecState*, JSObject*, JSValue, const ArgList&); 52 static JSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState*, JSObject*, JSValue, const ArgList&); 53 static JSValue JSC_HOST_CALL arrayProtoFuncUnShift(ExecState*, JSObject*, JSValue, const ArgList&); 54 static JSValue JSC_HOST_CALL arrayProtoFuncEvery(ExecState*, JSObject*, JSValue, const ArgList&); 55 static JSValue JSC_HOST_CALL arrayProtoFuncForEach(ExecState*, JSObject*, JSValue, const ArgList&); 56 static JSValue JSC_HOST_CALL arrayProtoFuncSome(ExecState*, JSObject*, JSValue, const ArgList&); 57 static JSValue JSC_HOST_CALL arrayProtoFuncIndexOf(ExecState*, JSObject*, JSValue, const ArgList&); 58 static JSValue JSC_HOST_CALL arrayProtoFuncFilter(ExecState*, JSObject*, JSValue, const ArgList&); 59 static JSValue JSC_HOST_CALL arrayProtoFuncMap(ExecState*, JSObject*, JSValue, const ArgList&); 60 static JSValue JSC_HOST_CALL arrayProtoFuncReduce(ExecState*, JSObject*, JSValue, const ArgList&); 61 static JSValue JSC_HOST_CALL arrayProtoFuncReduceRight(ExecState*, JSObject*, JSValue, const ArgList&); 62 static JSValue JSC_HOST_CALL arrayProtoFuncLastIndexOf(ExecState*, JSObject*, JSValue, const ArgList&); 63 63 64 64 } … … 143 143 } 144 144 145 JSValue arrayProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)145 JSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 146 146 { 147 147 if (!thisValue.isObject(&JSArray::info)) … … 187 187 } 188 188 189 JSValue arrayProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)189 JSValue JSC_HOST_CALL arrayProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 190 190 { 191 191 if (!thisValue.isObject(&JSArray::info)) … … 239 239 } 240 240 241 JSValue arrayProtoFuncJoin(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)241 JSValue JSC_HOST_CALL arrayProtoFuncJoin(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 242 242 { 243 243 JSObject* thisObj = thisValue.toThisObject(exec); … … 285 285 } 286 286 287 JSValue arrayProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)287 JSValue JSC_HOST_CALL arrayProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 288 288 { 289 289 JSArray* arr = constructEmptyArray(exec); … … 314 314 } 315 315 316 JSValue arrayProtoFuncPop(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)316 JSValue JSC_HOST_CALL arrayProtoFuncPop(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 317 317 { 318 318 if (isJSArray(&exec->globalData(), thisValue)) … … 333 333 } 334 334 335 JSValue arrayProtoFuncPush(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)335 JSValue JSC_HOST_CALL arrayProtoFuncPush(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 336 336 { 337 337 if (isJSArray(&exec->globalData(), thisValue) && args.size() == 1) { … … 350 350 } 351 351 352 JSValue arrayProtoFuncReverse(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)352 JSValue JSC_HOST_CALL arrayProtoFuncReverse(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 353 353 { 354 354 JSObject* thisObj = thisValue.toThisObject(exec); … … 374 374 } 375 375 376 JSValue arrayProtoFuncShift(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)376 JSValue JSC_HOST_CALL arrayProtoFuncShift(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 377 377 { 378 378 JSObject* thisObj = thisValue.toThisObject(exec); … … 397 397 } 398 398 399 JSValue arrayProtoFuncSlice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)399 JSValue JSC_HOST_CALL arrayProtoFuncSlice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 400 400 { 401 401 // http://developer.netscape.com/docs/manuals/js/client/jsref/array.htm#1193713 or 15.4.4.10 … … 442 442 } 443 443 444 JSValue arrayProtoFuncSort(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)444 JSValue JSC_HOST_CALL arrayProtoFuncSort(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 445 445 { 446 446 JSObject* thisObj = thisValue.toThisObject(exec); … … 500 500 } 501 501 502 JSValue arrayProtoFuncSplice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)502 JSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 503 503 { 504 504 JSObject* thisObj = thisValue.toThisObject(exec); … … 555 555 } 556 556 557 JSValue arrayProtoFuncUnShift(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)557 JSValue JSC_HOST_CALL arrayProtoFuncUnShift(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 558 558 { 559 559 JSObject* thisObj = thisValue.toThisObject(exec); … … 577 577 } 578 578 579 JSValue arrayProtoFuncFilter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)579 JSValue JSC_HOST_CALL arrayProtoFuncFilter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 580 580 { 581 581 JSObject* thisObj = thisValue.toThisObject(exec); … … 635 635 } 636 636 637 JSValue arrayProtoFuncMap(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)637 JSValue JSC_HOST_CALL arrayProtoFuncMap(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 638 638 { 639 639 JSObject* thisObj = thisValue.toThisObject(exec); … … 692 692 // http://developer-test.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:some 693 693 694 JSValue arrayProtoFuncEvery(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)694 JSValue JSC_HOST_CALL arrayProtoFuncEvery(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 695 695 { 696 696 JSObject* thisObj = thisValue.toThisObject(exec); … … 748 748 } 749 749 750 JSValue arrayProtoFuncForEach(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)750 JSValue JSC_HOST_CALL arrayProtoFuncForEach(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 751 751 { 752 752 JSObject* thisObj = thisValue.toThisObject(exec); … … 793 793 } 794 794 795 JSValue arrayProtoFuncSome(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)795 JSValue JSC_HOST_CALL arrayProtoFuncSome(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 796 796 { 797 797 JSObject* thisObj = thisValue.toThisObject(exec); … … 846 846 } 847 847 848 JSValue arrayProtoFuncReduce(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)848 JSValue JSC_HOST_CALL arrayProtoFuncReduce(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 849 849 { 850 850 JSObject* thisObj = thisValue.toThisObject(exec); … … 916 916 } 917 917 918 JSValue arrayProtoFuncReduceRight(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)918 JSValue JSC_HOST_CALL arrayProtoFuncReduceRight(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 919 919 { 920 920 JSObject* thisObj = thisValue.toThisObject(exec); … … 985 985 } 986 986 987 JSValue arrayProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)987 JSValue JSC_HOST_CALL arrayProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 988 988 { 989 989 // JavaScript 1.5 Extension by Mozilla … … 1016 1016 } 1017 1017 1018 JSValue arrayProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)1018 JSValue JSC_HOST_CALL arrayProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 1019 1019 { 1020 1020 // JavaScript 1.6 Extension by Mozilla -
trunk/JavaScriptCore/runtime/BooleanConstructor.cpp
r43122 r43372 58 58 59 59 // ECMA 15.6.1 60 static JSValue callBooleanConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)60 static JSValue JSC_HOST_CALL callBooleanConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 61 61 { 62 62 return jsBoolean(args.at(0).toBoolean(exec)); -
trunk/JavaScriptCore/runtime/BooleanPrototype.cpp
r43222 r43372 33 33 34 34 // Functions 35 static JSValue booleanProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);36 static JSValue booleanProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&);35 static JSValue JSC_HOST_CALL booleanProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 36 static JSValue JSC_HOST_CALL booleanProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&); 37 37 38 38 // ECMA 15.6.4 … … 52 52 // ECMA 15.6.4.2 + 15.6.4.3 53 53 54 JSValue booleanProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)54 JSValue JSC_HOST_CALL booleanProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 55 55 { 56 56 if (thisValue == jsBoolean(false)) … … 70 70 } 71 71 72 JSValue booleanProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)72 JSValue JSC_HOST_CALL booleanProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 73 73 { 74 74 if (thisValue.isBoolean()) -
trunk/JavaScriptCore/runtime/CallData.h
r43223 r43372 47 47 }; 48 48 49 typedef JSValue ( *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&);49 typedef JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&); 50 50 51 51 union CallData { -
trunk/JavaScriptCore/runtime/DateConstructor.cpp
r43222 r43372 49 49 ASSERT_CLASS_FITS_IN_CELL(DateConstructor); 50 50 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&);51 static JSValue JSC_HOST_CALL dateParse(ExecState*, JSObject*, JSValue, const ArgList&); 52 static JSValue JSC_HOST_CALL dateNow(ExecState*, JSObject*, JSValue, const ArgList&); 53 static JSValue JSC_HOST_CALL dateUTC(ExecState*, JSObject*, JSValue, const ArgList&); 54 54 55 55 DateConstructor::DateConstructor(ExecState* exec, PassRefPtr<Structure> structure, Structure* prototypeFunctionStructure, DatePrototype* datePrototype) … … 125 125 126 126 // ECMA 15.9.2 127 static JSValue callDate(ExecState* exec, JSObject*, JSValue, const ArgList&)127 static JSValue JSC_HOST_CALL callDate(ExecState* exec, JSObject*, JSValue, const ArgList&) 128 128 { 129 129 time_t localTime = time(0); … … 140 140 } 141 141 142 static JSValue dateParse(ExecState* exec, JSObject*, JSValue, const ArgList& args)142 static JSValue JSC_HOST_CALL dateParse(ExecState* exec, JSObject*, JSValue, const ArgList& args) 143 143 { 144 144 return jsNumber(exec, parseDate(args.at(0).toString(exec))); 145 145 } 146 146 147 static JSValue dateNow(ExecState* exec, JSObject*, JSValue, const ArgList&)147 static JSValue JSC_HOST_CALL dateNow(ExecState* exec, JSObject*, JSValue, const ArgList&) 148 148 { 149 149 return jsNumber(exec, getCurrentUTCTime()); 150 150 } 151 151 152 static JSValue dateUTC(ExecState* exec, JSObject*, JSValue, const ArgList& args)152 static JSValue JSC_HOST_CALL dateUTC(ExecState* exec, JSObject*, JSValue, const ArgList& args) 153 153 { 154 154 int n = args.size(); -
trunk/JavaScriptCore/runtime/DatePrototype.cpp
r43229 r43372 65 65 ASSERT_CLASS_FITS_IN_CELL(DatePrototype); 66 66 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&);67 static JSValue JSC_HOST_CALL dateProtoFuncGetDate(ExecState*, JSObject*, JSValue, const ArgList&); 68 static JSValue JSC_HOST_CALL dateProtoFuncGetDay(ExecState*, JSObject*, JSValue, const ArgList&); 69 static JSValue JSC_HOST_CALL dateProtoFuncGetFullYear(ExecState*, JSObject*, JSValue, const ArgList&); 70 static JSValue JSC_HOST_CALL dateProtoFuncGetHours(ExecState*, JSObject*, JSValue, const ArgList&); 71 static JSValue JSC_HOST_CALL dateProtoFuncGetMilliSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 72 static JSValue JSC_HOST_CALL dateProtoFuncGetMinutes(ExecState*, JSObject*, JSValue, const ArgList&); 73 static JSValue JSC_HOST_CALL dateProtoFuncGetMonth(ExecState*, JSObject*, JSValue, const ArgList&); 74 static JSValue JSC_HOST_CALL dateProtoFuncGetSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 75 static JSValue JSC_HOST_CALL dateProtoFuncGetTime(ExecState*, JSObject*, JSValue, const ArgList&); 76 static JSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState*, JSObject*, JSValue, const ArgList&); 77 static JSValue JSC_HOST_CALL dateProtoFuncGetUTCDate(ExecState*, JSObject*, JSValue, const ArgList&); 78 static JSValue JSC_HOST_CALL dateProtoFuncGetUTCDay(ExecState*, JSObject*, JSValue, const ArgList&); 79 static JSValue JSC_HOST_CALL dateProtoFuncGetUTCFullYear(ExecState*, JSObject*, JSValue, const ArgList&); 80 static JSValue JSC_HOST_CALL dateProtoFuncGetUTCHours(ExecState*, JSObject*, JSValue, const ArgList&); 81 static JSValue JSC_HOST_CALL dateProtoFuncGetUTCMilliseconds(ExecState*, JSObject*, JSValue, const ArgList&); 82 static JSValue JSC_HOST_CALL dateProtoFuncGetUTCMinutes(ExecState*, JSObject*, JSValue, const ArgList&); 83 static JSValue JSC_HOST_CALL dateProtoFuncGetUTCMonth(ExecState*, JSObject*, JSValue, const ArgList&); 84 static JSValue JSC_HOST_CALL dateProtoFuncGetUTCSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 85 static JSValue JSC_HOST_CALL dateProtoFuncGetYear(ExecState*, JSObject*, JSValue, const ArgList&); 86 static JSValue JSC_HOST_CALL dateProtoFuncSetDate(ExecState*, JSObject*, JSValue, const ArgList&); 87 static JSValue JSC_HOST_CALL dateProtoFuncSetFullYear(ExecState*, JSObject*, JSValue, const ArgList&); 88 static JSValue JSC_HOST_CALL dateProtoFuncSetHours(ExecState*, JSObject*, JSValue, const ArgList&); 89 static JSValue JSC_HOST_CALL dateProtoFuncSetMilliSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 90 static JSValue JSC_HOST_CALL dateProtoFuncSetMinutes(ExecState*, JSObject*, JSValue, const ArgList&); 91 static JSValue JSC_HOST_CALL dateProtoFuncSetMonth(ExecState*, JSObject*, JSValue, const ArgList&); 92 static JSValue JSC_HOST_CALL dateProtoFuncSetSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 93 static JSValue JSC_HOST_CALL dateProtoFuncSetTime(ExecState*, JSObject*, JSValue, const ArgList&); 94 static JSValue JSC_HOST_CALL dateProtoFuncSetUTCDate(ExecState*, JSObject*, JSValue, const ArgList&); 95 static JSValue JSC_HOST_CALL dateProtoFuncSetUTCFullYear(ExecState*, JSObject*, JSValue, const ArgList&); 96 static JSValue JSC_HOST_CALL dateProtoFuncSetUTCHours(ExecState*, JSObject*, JSValue, const ArgList&); 97 static JSValue JSC_HOST_CALL dateProtoFuncSetUTCMilliseconds(ExecState*, JSObject*, JSValue, const ArgList&); 98 static JSValue JSC_HOST_CALL dateProtoFuncSetUTCMinutes(ExecState*, JSObject*, JSValue, const ArgList&); 99 static JSValue JSC_HOST_CALL dateProtoFuncSetUTCMonth(ExecState*, JSObject*, JSValue, const ArgList&); 100 static JSValue JSC_HOST_CALL dateProtoFuncSetUTCSeconds(ExecState*, JSObject*, JSValue, const ArgList&); 101 static JSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState*, JSObject*, JSValue, const ArgList&); 102 static JSValue JSC_HOST_CALL dateProtoFuncToDateString(ExecState*, JSObject*, JSValue, const ArgList&); 103 static JSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState*, JSObject*, JSValue, const ArgList&); 104 static JSValue JSC_HOST_CALL dateProtoFuncToLocaleDateString(ExecState*, JSObject*, JSValue, const ArgList&); 105 static JSValue JSC_HOST_CALL dateProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&); 106 static JSValue JSC_HOST_CALL dateProtoFuncToLocaleTimeString(ExecState*, JSObject*, JSValue, const ArgList&); 107 static JSValue JSC_HOST_CALL dateProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 108 static JSValue JSC_HOST_CALL dateProtoFuncToTimeString(ExecState*, JSObject*, JSValue, const ArgList&); 109 static JSValue JSC_HOST_CALL dateProtoFuncToUTCString(ExecState*, JSObject*, JSValue, const ArgList&); 110 110 111 111 } … … 396 396 // Functions 397 397 398 JSValue dateProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)398 JSValue JSC_HOST_CALL dateProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 399 399 { 400 400 if (!thisValue.isObject(&DateInstance::info)) … … 413 413 } 414 414 415 JSValue dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)415 JSValue JSC_HOST_CALL dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 416 416 { 417 417 if (!thisValue.isObject(&DateInstance::info)) … … 430 430 } 431 431 432 JSValue dateProtoFuncToDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)432 JSValue JSC_HOST_CALL dateProtoFuncToDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 433 433 { 434 434 if (!thisValue.isObject(&DateInstance::info)) … … 447 447 } 448 448 449 JSValue dateProtoFuncToTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)449 JSValue JSC_HOST_CALL dateProtoFuncToTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 450 450 { 451 451 if (!thisValue.isObject(&DateInstance::info)) … … 464 464 } 465 465 466 JSValue dateProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)466 JSValue JSC_HOST_CALL dateProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 467 467 { 468 468 if (!thisValue.isObject(&DateInstance::info)) … … 477 477 } 478 478 479 JSValue dateProtoFuncToLocaleDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)479 JSValue JSC_HOST_CALL dateProtoFuncToLocaleDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 480 480 { 481 481 if (!thisValue.isObject(&DateInstance::info)) … … 490 490 } 491 491 492 JSValue dateProtoFuncToLocaleTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)492 JSValue JSC_HOST_CALL dateProtoFuncToLocaleTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 493 493 { 494 494 if (!thisValue.isObject(&DateInstance::info)) … … 503 503 } 504 504 505 JSValue dateProtoFuncGetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)505 JSValue JSC_HOST_CALL dateProtoFuncGetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 506 506 { 507 507 if (!thisValue.isObject(&DateInstance::info)) … … 516 516 } 517 517 518 JSValue dateProtoFuncGetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)518 JSValue JSC_HOST_CALL dateProtoFuncGetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 519 519 { 520 520 if (!thisValue.isObject(&DateInstance::info)) … … 533 533 } 534 534 535 JSValue dateProtoFuncGetUTCFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)535 JSValue JSC_HOST_CALL dateProtoFuncGetUTCFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 536 536 { 537 537 if (!thisValue.isObject(&DateInstance::info)) … … 550 550 } 551 551 552 JSValue dateProtoFuncToGMTString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)552 JSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 553 553 { 554 554 if (!thisValue.isObject(&DateInstance::info)) … … 567 567 } 568 568 569 JSValue dateProtoFuncGetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)569 JSValue JSC_HOST_CALL dateProtoFuncGetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 570 570 { 571 571 if (!thisValue.isObject(&DateInstance::info)) … … 584 584 } 585 585 586 JSValue dateProtoFuncGetUTCMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)586 JSValue JSC_HOST_CALL dateProtoFuncGetUTCMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 587 587 { 588 588 if (!thisValue.isObject(&DateInstance::info)) … … 601 601 } 602 602 603 JSValue dateProtoFuncGetDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)603 JSValue JSC_HOST_CALL dateProtoFuncGetDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 604 604 { 605 605 if (!thisValue.isObject(&DateInstance::info)) … … 618 618 } 619 619 620 JSValue dateProtoFuncGetUTCDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)620 JSValue JSC_HOST_CALL dateProtoFuncGetUTCDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 621 621 { 622 622 if (!thisValue.isObject(&DateInstance::info)) … … 635 635 } 636 636 637 JSValue dateProtoFuncGetDay(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)637 JSValue JSC_HOST_CALL dateProtoFuncGetDay(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 638 638 { 639 639 if (!thisValue.isObject(&DateInstance::info)) … … 652 652 } 653 653 654 JSValue dateProtoFuncGetUTCDay(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)654 JSValue JSC_HOST_CALL dateProtoFuncGetUTCDay(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 655 655 { 656 656 if (!thisValue.isObject(&DateInstance::info)) … … 669 669 } 670 670 671 JSValue dateProtoFuncGetHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)671 JSValue JSC_HOST_CALL dateProtoFuncGetHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 672 672 { 673 673 if (!thisValue.isObject(&DateInstance::info)) … … 686 686 } 687 687 688 JSValue dateProtoFuncGetUTCHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)688 JSValue JSC_HOST_CALL dateProtoFuncGetUTCHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 689 689 { 690 690 if (!thisValue.isObject(&DateInstance::info)) … … 703 703 } 704 704 705 JSValue dateProtoFuncGetMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)705 JSValue JSC_HOST_CALL dateProtoFuncGetMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 706 706 { 707 707 if (!thisValue.isObject(&DateInstance::info)) … … 720 720 } 721 721 722 JSValue dateProtoFuncGetUTCMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)722 JSValue JSC_HOST_CALL dateProtoFuncGetUTCMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 723 723 { 724 724 if (!thisValue.isObject(&DateInstance::info)) … … 737 737 } 738 738 739 JSValue dateProtoFuncGetSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)739 JSValue JSC_HOST_CALL dateProtoFuncGetSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 740 740 { 741 741 if (!thisValue.isObject(&DateInstance::info)) … … 754 754 } 755 755 756 JSValue dateProtoFuncGetUTCSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)756 JSValue JSC_HOST_CALL dateProtoFuncGetUTCSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 757 757 { 758 758 if (!thisValue.isObject(&DateInstance::info)) … … 771 771 } 772 772 773 JSValue dateProtoFuncGetMilliSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)773 JSValue JSC_HOST_CALL dateProtoFuncGetMilliSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 774 774 { 775 775 if (!thisValue.isObject(&DateInstance::info)) … … 786 786 } 787 787 788 JSValue dateProtoFuncGetUTCMilliseconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)788 JSValue JSC_HOST_CALL dateProtoFuncGetUTCMilliseconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 789 789 { 790 790 if (!thisValue.isObject(&DateInstance::info)) … … 801 801 } 802 802 803 JSValue dateProtoFuncGetTimezoneOffset(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)803 JSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 804 804 { 805 805 if (!thisValue.isObject(&DateInstance::info)) … … 818 818 } 819 819 820 JSValue dateProtoFuncSetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)820 JSValue JSC_HOST_CALL dateProtoFuncSetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 821 821 { 822 822 if (!thisValue.isObject(&DateInstance::info)) … … 899 899 } 900 900 901 JSValue dateProtoFuncSetMilliSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)901 JSValue JSC_HOST_CALL dateProtoFuncSetMilliSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 902 902 { 903 903 const bool inputIsUTC = false; … … 905 905 } 906 906 907 JSValue dateProtoFuncSetUTCMilliseconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)907 JSValue JSC_HOST_CALL dateProtoFuncSetUTCMilliseconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 908 908 { 909 909 const bool inputIsUTC = true; … … 911 911 } 912 912 913 JSValue dateProtoFuncSetSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)913 JSValue JSC_HOST_CALL dateProtoFuncSetSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 914 914 { 915 915 const bool inputIsUTC = false; … … 917 917 } 918 918 919 JSValue dateProtoFuncSetUTCSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)919 JSValue JSC_HOST_CALL dateProtoFuncSetUTCSeconds(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 920 920 { 921 921 const bool inputIsUTC = true; … … 923 923 } 924 924 925 JSValue dateProtoFuncSetMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)925 JSValue JSC_HOST_CALL dateProtoFuncSetMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 926 926 { 927 927 const bool inputIsUTC = false; … … 929 929 } 930 930 931 JSValue dateProtoFuncSetUTCMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)931 JSValue JSC_HOST_CALL dateProtoFuncSetUTCMinutes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 932 932 { 933 933 const bool inputIsUTC = true; … … 935 935 } 936 936 937 JSValue dateProtoFuncSetHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)937 JSValue JSC_HOST_CALL dateProtoFuncSetHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 938 938 { 939 939 const bool inputIsUTC = false; … … 941 941 } 942 942 943 JSValue dateProtoFuncSetUTCHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)943 JSValue JSC_HOST_CALL dateProtoFuncSetUTCHours(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 944 944 { 945 945 const bool inputIsUTC = true; … … 947 947 } 948 948 949 JSValue dateProtoFuncSetDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)949 JSValue JSC_HOST_CALL dateProtoFuncSetDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 950 950 { 951 951 const bool inputIsUTC = false; … … 953 953 } 954 954 955 JSValue dateProtoFuncSetUTCDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)955 JSValue JSC_HOST_CALL dateProtoFuncSetUTCDate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 956 956 { 957 957 const bool inputIsUTC = true; … … 959 959 } 960 960 961 JSValue dateProtoFuncSetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)961 JSValue JSC_HOST_CALL dateProtoFuncSetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 962 962 { 963 963 const bool inputIsUTC = false; … … 965 965 } 966 966 967 JSValue dateProtoFuncSetUTCMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)967 JSValue JSC_HOST_CALL dateProtoFuncSetUTCMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 968 968 { 969 969 const bool inputIsUTC = true; … … 971 971 } 972 972 973 JSValue dateProtoFuncSetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)973 JSValue JSC_HOST_CALL dateProtoFuncSetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 974 974 { 975 975 const bool inputIsUTC = false; … … 977 977 } 978 978 979 JSValue dateProtoFuncSetUTCFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)979 JSValue JSC_HOST_CALL dateProtoFuncSetUTCFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 980 980 { 981 981 const bool inputIsUTC = true; … … 983 983 } 984 984 985 JSValue dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)985 JSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 986 986 { 987 987 if (!thisValue.isObject(&DateInstance::info)) … … 1025 1025 } 1026 1026 1027 JSValue dateProtoFuncGetYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)1027 JSValue JSC_HOST_CALL dateProtoFuncGetYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 1028 1028 { 1029 1029 if (!thisValue.isObject(&DateInstance::info)) -
trunk/JavaScriptCore/runtime/ErrorConstructor.cpp
r43122 r43372 59 59 60 60 // ECMA 15.9.2 61 static JSValue callErrorConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)61 static JSValue JSC_HOST_CALL callErrorConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 62 62 { 63 63 // "Error()" gives the sames result as "new Error()" -
trunk/JavaScriptCore/runtime/ErrorPrototype.cpp
r43226 r43372 32 32 ASSERT_CLASS_FITS_IN_CELL(ErrorPrototype); 33 33 34 static JSValue errorProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);34 static JSValue JSC_HOST_CALL errorProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 35 35 36 36 // ECMA 15.9.4 … … 46 46 } 47 47 48 JSValue errorProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)48 JSValue JSC_HOST_CALL errorProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 49 49 { 50 50 JSObject* thisObj = thisValue.toThisObject(exec); -
trunk/JavaScriptCore/runtime/FunctionConstructor.cpp
r43311 r43372 55 55 } 56 56 57 static JSValue callFunctionConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)57 static JSValue JSC_HOST_CALL callFunctionConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 58 58 { 59 59 return constructFunction(exec, args); -
trunk/JavaScriptCore/runtime/FunctionPrototype.cpp
r43220 r43372 34 34 ASSERT_CLASS_FITS_IN_CELL(FunctionPrototype); 35 35 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&);36 static JSValue JSC_HOST_CALL functionProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 37 static JSValue JSC_HOST_CALL functionProtoFuncApply(ExecState*, JSObject*, JSValue, const ArgList&); 38 static JSValue JSC_HOST_CALL functionProtoFuncCall(ExecState*, JSObject*, JSValue, const ArgList&); 39 39 40 40 FunctionPrototype::FunctionPrototype(ExecState* exec, PassRefPtr<Structure> structure) … … 53 53 } 54 54 55 static JSValue callFunctionPrototype(ExecState*, JSObject*, JSValue, const ArgList&)55 static JSValue JSC_HOST_CALL callFunctionPrototype(ExecState*, JSObject*, JSValue, const ArgList&) 56 56 { 57 57 return jsUndefined(); … … 83 83 } 84 84 85 JSValue functionProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)85 JSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 86 86 { 87 87 if (thisValue.isObject(&JSFunction::info)) { … … 102 102 } 103 103 104 JSValue functionProtoFuncApply(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)104 JSValue JSC_HOST_CALL functionProtoFuncApply(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 105 105 { 106 106 CallData callData; … … 130 130 } 131 131 132 JSValue functionProtoFuncCall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)132 JSValue JSC_HOST_CALL functionProtoFuncCall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 133 133 { 134 134 CallData callData; -
trunk/JavaScriptCore/runtime/JSFunction.h
r43220 r43372 84 84 bool isHostFunction() const { return false; } 85 85 #endif 86 NativeFunction nativeFunction() 87 { 88 return *reinterpret_cast<NativeFunction*>(m_data); 89 } 86 90 private: 87 91 virtual const ClassInfo* classInfo() const { return &info; } … … 115 119 *reinterpret_cast<ScopeChain*>(m_data) = sc; 116 120 } 117 NativeFunction nativeFunction()118 {119 return *reinterpret_cast<NativeFunction*>(m_data);120 }121 121 void setNativeFunction(NativeFunction func) 122 122 { -
trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
r43156 r43372 269 269 } 270 270 271 JSValue globalFuncEval(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args)271 JSValue JSC_HOST_CALL globalFuncEval(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args) 272 272 { 273 273 JSObject* thisObject = thisValue.toThisObject(exec); … … 294 294 } 295 295 296 JSValue globalFuncParseInt(ExecState* exec, JSObject*, JSValue, const ArgList& args)296 JSValue JSC_HOST_CALL globalFuncParseInt(ExecState* exec, JSObject*, JSValue, const ArgList& args) 297 297 { 298 298 JSValue value = args.at(0); … … 313 313 } 314 314 315 JSValue globalFuncParseFloat(ExecState* exec, JSObject*, JSValue, const ArgList& args)315 JSValue JSC_HOST_CALL globalFuncParseFloat(ExecState* exec, JSObject*, JSValue, const ArgList& args) 316 316 { 317 317 return jsNumber(exec, parseFloat(args.at(0).toString(exec))); 318 318 } 319 319 320 JSValue globalFuncIsNaN(ExecState* exec, JSObject*, JSValue, const ArgList& args)320 JSValue JSC_HOST_CALL globalFuncIsNaN(ExecState* exec, JSObject*, JSValue, const ArgList& args) 321 321 { 322 322 return jsBoolean(isnan(args.at(0).toNumber(exec))); 323 323 } 324 324 325 JSValue globalFuncIsFinite(ExecState* exec, JSObject*, JSValue, const ArgList& args)325 JSValue JSC_HOST_CALL globalFuncIsFinite(ExecState* exec, JSObject*, JSValue, const ArgList& args) 326 326 { 327 327 double n = args.at(0).toNumber(exec); … … 329 329 } 330 330 331 JSValue globalFuncDecodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args)331 JSValue JSC_HOST_CALL globalFuncDecodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args) 332 332 { 333 333 static const char do_not_unescape_when_decoding_URI[] = … … 337 337 } 338 338 339 JSValue globalFuncDecodeURIComponent(ExecState* exec, JSObject*, JSValue, const ArgList& args)339 JSValue JSC_HOST_CALL globalFuncDecodeURIComponent(ExecState* exec, JSObject*, JSValue, const ArgList& args) 340 340 { 341 341 return decode(exec, args, "", true); 342 342 } 343 343 344 JSValue globalFuncEncodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args)344 JSValue JSC_HOST_CALL globalFuncEncodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args) 345 345 { 346 346 static const char do_not_escape_when_encoding_URI[] = … … 353 353 } 354 354 355 JSValue globalFuncEncodeURIComponent(ExecState* exec, JSObject*, JSValue, const ArgList& args)355 JSValue JSC_HOST_CALL globalFuncEncodeURIComponent(ExecState* exec, JSObject*, JSValue, const ArgList& args) 356 356 { 357 357 static const char do_not_escape_when_encoding_URI_component[] = … … 364 364 } 365 365 366 JSValue globalFuncEscape(ExecState* exec, JSObject*, JSValue, const ArgList& args)366 JSValue JSC_HOST_CALL globalFuncEscape(ExecState* exec, JSObject*, JSValue, const ArgList& args) 367 367 { 368 368 static const char do_not_escape[] = … … 395 395 } 396 396 397 JSValue globalFuncUnescape(ExecState* exec, JSObject*, JSValue, const ArgList& args)397 JSValue JSC_HOST_CALL globalFuncUnescape(ExecState* exec, JSObject*, JSValue, const ArgList& args) 398 398 { 399 399 UString result = ""; … … 423 423 424 424 #ifndef NDEBUG 425 JSValue globalFuncJSCPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args)425 JSValue JSC_HOST_CALL globalFuncJSCPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args) 426 426 { 427 427 CStringBuffer string; -
trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.h
r43122 r43372 37 37 // is a 0.5% reduction. 38 38 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&); 50 50 #ifndef NDEBUG 51 JSValue globalFuncJSCPrint(ExecState*, JSObject*, JSValue, const ArgList&);51 JSValue JSC_HOST_CALL globalFuncJSCPrint(ExecState*, JSObject*, JSValue, const ArgList&); 52 52 #endif 53 53 -
trunk/JavaScriptCore/runtime/MathObject.cpp
r43122 r43372 34 34 ASSERT_CLASS_FITS_IN_CELL(MathObject); 35 35 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&);36 static JSValue JSC_HOST_CALL mathProtoFuncAbs(ExecState*, JSObject*, JSValue, const ArgList&); 37 static JSValue JSC_HOST_CALL mathProtoFuncACos(ExecState*, JSObject*, JSValue, const ArgList&); 38 static JSValue JSC_HOST_CALL mathProtoFuncASin(ExecState*, JSObject*, JSValue, const ArgList&); 39 static JSValue JSC_HOST_CALL mathProtoFuncATan(ExecState*, JSObject*, JSValue, const ArgList&); 40 static JSValue JSC_HOST_CALL mathProtoFuncATan2(ExecState*, JSObject*, JSValue, const ArgList&); 41 static JSValue JSC_HOST_CALL mathProtoFuncCeil(ExecState*, JSObject*, JSValue, const ArgList&); 42 static JSValue JSC_HOST_CALL mathProtoFuncCos(ExecState*, JSObject*, JSValue, const ArgList&); 43 static JSValue JSC_HOST_CALL mathProtoFuncExp(ExecState*, JSObject*, JSValue, const ArgList&); 44 static JSValue JSC_HOST_CALL mathProtoFuncFloor(ExecState*, JSObject*, JSValue, const ArgList&); 45 static JSValue JSC_HOST_CALL mathProtoFuncLog(ExecState*, JSObject*, JSValue, const ArgList&); 46 static JSValue JSC_HOST_CALL mathProtoFuncMax(ExecState*, JSObject*, JSValue, const ArgList&); 47 static JSValue JSC_HOST_CALL mathProtoFuncMin(ExecState*, JSObject*, JSValue, const ArgList&); 48 static JSValue JSC_HOST_CALL mathProtoFuncPow(ExecState*, JSObject*, JSValue, const ArgList&); 49 static JSValue JSC_HOST_CALL mathProtoFuncRandom(ExecState*, JSObject*, JSValue, const ArgList&); 50 static JSValue JSC_HOST_CALL mathProtoFuncRound(ExecState*, JSObject*, JSValue, const ArgList&); 51 static JSValue JSC_HOST_CALL mathProtoFuncSin(ExecState*, JSObject*, JSValue, const ArgList&); 52 static JSValue JSC_HOST_CALL mathProtoFuncSqrt(ExecState*, JSObject*, JSValue, const ArgList&); 53 static JSValue JSC_HOST_CALL mathProtoFuncTan(ExecState*, JSObject*, JSValue, const ArgList&); 54 54 55 55 } … … 116 116 // ------------------------------ Functions -------------------------------- 117 117 118 JSValue mathProtoFuncAbs(ExecState* exec, JSObject*, JSValue, const ArgList& args)118 JSValue JSC_HOST_CALL mathProtoFuncAbs(ExecState* exec, JSObject*, JSValue, const ArgList& args) 119 119 { 120 120 return jsNumber(exec, fabs(args.at(0).toNumber(exec))); 121 121 } 122 122 123 JSValue mathProtoFuncACos(ExecState* exec, JSObject*, JSValue, const ArgList& args)123 JSValue JSC_HOST_CALL mathProtoFuncACos(ExecState* exec, JSObject*, JSValue, const ArgList& args) 124 124 { 125 125 return jsNumber(exec, acos(args.at(0).toNumber(exec))); 126 126 } 127 127 128 JSValue mathProtoFuncASin(ExecState* exec, JSObject*, JSValue, const ArgList& args)128 JSValue JSC_HOST_CALL mathProtoFuncASin(ExecState* exec, JSObject*, JSValue, const ArgList& args) 129 129 { 130 130 return jsNumber(exec, asin(args.at(0).toNumber(exec))); 131 131 } 132 132 133 JSValue mathProtoFuncATan(ExecState* exec, JSObject*, JSValue, const ArgList& args)133 JSValue JSC_HOST_CALL mathProtoFuncATan(ExecState* exec, JSObject*, JSValue, const ArgList& args) 134 134 { 135 135 return jsNumber(exec, atan(args.at(0).toNumber(exec))); 136 136 } 137 137 138 JSValue mathProtoFuncATan2(ExecState* exec, JSObject*, JSValue, const ArgList& args)138 JSValue JSC_HOST_CALL mathProtoFuncATan2(ExecState* exec, JSObject*, JSValue, const ArgList& args) 139 139 { 140 140 return jsNumber(exec, atan2(args.at(0).toNumber(exec), args.at(1).toNumber(exec))); 141 141 } 142 142 143 JSValue mathProtoFuncCeil(ExecState* exec, JSObject*, JSValue, const ArgList& args)143 JSValue JSC_HOST_CALL mathProtoFuncCeil(ExecState* exec, JSObject*, JSValue, const ArgList& args) 144 144 { 145 145 return jsNumber(exec, ceil(args.at(0).toNumber(exec))); 146 146 } 147 147 148 JSValue mathProtoFuncCos(ExecState* exec, JSObject*, JSValue, const ArgList& args)148 JSValue JSC_HOST_CALL mathProtoFuncCos(ExecState* exec, JSObject*, JSValue, const ArgList& args) 149 149 { 150 150 return jsNumber(exec, cos(args.at(0).toNumber(exec))); 151 151 } 152 152 153 JSValue mathProtoFuncExp(ExecState* exec, JSObject*, JSValue, const ArgList& args)153 JSValue JSC_HOST_CALL mathProtoFuncExp(ExecState* exec, JSObject*, JSValue, const ArgList& args) 154 154 { 155 155 return jsNumber(exec, exp(args.at(0).toNumber(exec))); 156 156 } 157 157 158 JSValue mathProtoFuncFloor(ExecState* exec, JSObject*, JSValue, const ArgList& args)158 JSValue JSC_HOST_CALL mathProtoFuncFloor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 159 159 { 160 160 return jsNumber(exec, floor(args.at(0).toNumber(exec))); 161 161 } 162 162 163 JSValue mathProtoFuncLog(ExecState* exec, JSObject*, JSValue, const ArgList& args)163 JSValue JSC_HOST_CALL mathProtoFuncLog(ExecState* exec, JSObject*, JSValue, const ArgList& args) 164 164 { 165 165 return jsNumber(exec, log(args.at(0).toNumber(exec))); 166 166 } 167 167 168 JSValue mathProtoFuncMax(ExecState* exec, JSObject*, JSValue, const ArgList& args)168 JSValue JSC_HOST_CALL mathProtoFuncMax(ExecState* exec, JSObject*, JSValue, const ArgList& args) 169 169 { 170 170 unsigned argsCount = args.size(); … … 182 182 } 183 183 184 JSValue mathProtoFuncMin(ExecState* exec, JSObject*, JSValue, const ArgList& args)184 JSValue JSC_HOST_CALL mathProtoFuncMin(ExecState* exec, JSObject*, JSValue, const ArgList& args) 185 185 { 186 186 unsigned argsCount = args.size(); … … 198 198 } 199 199 200 JSValue mathProtoFuncPow(ExecState* exec, JSObject*, JSValue, const ArgList& args)200 JSValue JSC_HOST_CALL mathProtoFuncPow(ExecState* exec, JSObject*, JSValue, const ArgList& args) 201 201 { 202 202 // ECMA 15.8.2.1.13 … … 212 212 } 213 213 214 JSValue mathProtoFuncRandom(ExecState* exec, JSObject*, JSValue, const ArgList&)214 JSValue JSC_HOST_CALL mathProtoFuncRandom(ExecState* exec, JSObject*, JSValue, const ArgList&) 215 215 { 216 216 return jsNumber(exec, WTF::weakRandomNumber()); 217 217 } 218 218 219 JSValue mathProtoFuncRound(ExecState* exec, JSObject*, JSValue, const ArgList& args)219 JSValue JSC_HOST_CALL mathProtoFuncRound(ExecState* exec, JSObject*, JSValue, const ArgList& args) 220 220 { 221 221 double arg = args.at(0).toNumber(exec); … … 225 225 } 226 226 227 JSValue mathProtoFuncSin(ExecState* exec, JSObject*, JSValue, const ArgList& args)227 JSValue JSC_HOST_CALL mathProtoFuncSin(ExecState* exec, JSObject*, JSValue, const ArgList& args) 228 228 { 229 229 return jsNumber(exec, sin(args.at(0).toNumber(exec))); 230 230 } 231 231 232 JSValue mathProtoFuncSqrt(ExecState* exec, JSObject*, JSValue, const ArgList& args)232 JSValue JSC_HOST_CALL mathProtoFuncSqrt(ExecState* exec, JSObject*, JSValue, const ArgList& args) 233 233 { 234 234 return jsNumber(exec, sqrt(args.at(0).toNumber(exec))); 235 235 } 236 236 237 JSValue mathProtoFuncTan(ExecState* exec, JSObject*, JSValue, const ArgList& args)237 JSValue JSC_HOST_CALL mathProtoFuncTan(ExecState* exec, JSObject*, JSValue, const ArgList& args) 238 238 { 239 239 return jsNumber(exec, tan(args.at(0).toNumber(exec))); -
trunk/JavaScriptCore/runtime/NativeErrorConstructor.cpp
r43122 r43372 59 59 return ConstructTypeHost; 60 60 } 61 62 static JSValue callNativeErrorConstructor(ExecState* exec, JSObject* constructor, JSValue, const ArgList& args)61 62 static JSValue JSC_HOST_CALL callNativeErrorConstructor(ExecState* exec, JSObject* constructor, JSValue, const ArgList& args) 63 63 { 64 64 return static_cast<NativeErrorConstructor*>(constructor)->construct(exec, args); -
trunk/JavaScriptCore/runtime/NativeFunctionWrapper.h
r43253 r43372 28 28 29 29 namespace JSC { 30 #if ENABLE(JIT) && PLATFORM(MAC)30 #if ENABLE(JIT) 31 31 class JSFunction; 32 32 typedef JSFunction NativeFunctionWrapper; -
trunk/JavaScriptCore/runtime/NumberConstructor.cpp
r43122 r43372 110 110 111 111 // ECMA 15.7.2 112 static JSValue callNumberConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)112 static JSValue JSC_HOST_CALL callNumberConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 113 113 { 114 114 return jsNumber(exec, args.isEmpty() ? 0 : args.at(0).toNumber(exec)); -
trunk/JavaScriptCore/runtime/NumberPrototype.cpp
r43226 r43372 37 37 ASSERT_CLASS_FITS_IN_CELL(NumberPrototype); 38 38 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&);39 static JSValue JSC_HOST_CALL numberProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 40 static JSValue JSC_HOST_CALL numberProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&); 41 static JSValue JSC_HOST_CALL numberProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&); 42 static JSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState*, JSObject*, JSValue, const ArgList&); 43 static JSValue JSC_HOST_CALL numberProtoFuncToExponential(ExecState*, JSObject*, JSValue, const ArgList&); 44 static JSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState*, JSObject*, JSValue, const ArgList&); 45 45 46 46 // ECMA 15.7.4 … … 135 135 } 136 136 137 JSValue numberProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)137 JSValue JSC_HOST_CALL numberProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 138 138 { 139 139 JSValue v = thisValue.getJSNumber(); … … 199 199 } 200 200 201 JSValue numberProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)201 JSValue JSC_HOST_CALL numberProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 202 202 { 203 203 // FIXME: Not implemented yet. … … 210 210 } 211 211 212 JSValue numberProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)212 JSValue JSC_HOST_CALL numberProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 213 213 { 214 214 JSValue v = thisValue.getJSNumber(); … … 219 219 } 220 220 221 JSValue numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)221 JSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 222 222 { 223 223 JSValue v = thisValue.getJSNumber(); … … 304 304 } 305 305 306 JSValue numberProtoFuncToExponential(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)306 JSValue JSC_HOST_CALL numberProtoFuncToExponential(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 307 307 { 308 308 JSValue v = thisValue.getJSNumber(); … … 374 374 } 375 375 376 JSValue numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)376 JSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 377 377 { 378 378 JSValue v = thisValue.getJSNumber(); -
trunk/JavaScriptCore/runtime/ObjectConstructor.cpp
r43222 r43372 60 60 } 61 61 62 static JSValue callObjectConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)62 static JSValue JSC_HOST_CALL callObjectConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 63 63 { 64 64 return constructObject(exec, args); -
trunk/JavaScriptCore/runtime/ObjectPrototype.cpp
r43226 r43372 31 31 ASSERT_CLASS_FITS_IN_CELL(ObjectPrototype); 32 32 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&);33 static JSValue JSC_HOST_CALL objectProtoFuncValueOf(ExecState*, JSObject*, JSValue, const ArgList&); 34 static JSValue JSC_HOST_CALL objectProtoFuncHasOwnProperty(ExecState*, JSObject*, JSValue, const ArgList&); 35 static JSValue JSC_HOST_CALL objectProtoFuncIsPrototypeOf(ExecState*, JSObject*, JSValue, const ArgList&); 36 static JSValue JSC_HOST_CALL objectProtoFuncDefineGetter(ExecState*, JSObject*, JSValue, const ArgList&); 37 static JSValue JSC_HOST_CALL objectProtoFuncDefineSetter(ExecState*, JSObject*, JSValue, const ArgList&); 38 static JSValue JSC_HOST_CALL objectProtoFuncLookupGetter(ExecState*, JSObject*, JSValue, const ArgList&); 39 static JSValue JSC_HOST_CALL objectProtoFuncLookupSetter(ExecState*, JSObject*, JSValue, const ArgList&); 40 static JSValue JSC_HOST_CALL objectProtoFuncPropertyIsEnumerable(ExecState*, JSObject*, JSValue, const ArgList&); 41 static JSValue JSC_HOST_CALL objectProtoFuncToLocaleString(ExecState*, JSObject*, JSValue, const ArgList&); 42 42 43 43 ObjectPrototype::ObjectPrototype(ExecState* exec, PassRefPtr<Structure> stucture, Structure* prototypeFunctionStructure) … … 62 62 // ECMA 15.2.4.2, 15.2.4.4, 15.2.4.5, 15.2.4.7 63 63 64 JSValue objectProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)64 JSValue JSC_HOST_CALL objectProtoFuncValueOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 65 65 { 66 66 return thisValue.toThisObject(exec); 67 67 } 68 68 69 JSValue objectProtoFuncHasOwnProperty(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)69 JSValue JSC_HOST_CALL objectProtoFuncHasOwnProperty(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 70 70 { 71 71 return jsBoolean(thisValue.toThisObject(exec)->hasOwnProperty(exec, Identifier(exec, args.at(0).toString(exec)))); 72 72 } 73 73 74 JSValue objectProtoFuncIsPrototypeOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)74 JSValue JSC_HOST_CALL objectProtoFuncIsPrototypeOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 75 75 { 76 76 JSObject* thisObj = thisValue.toThisObject(exec); … … 91 91 } 92 92 93 JSValue objectProtoFuncDefineGetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)93 JSValue JSC_HOST_CALL objectProtoFuncDefineGetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 94 94 { 95 95 CallData callData; … … 100 100 } 101 101 102 JSValue objectProtoFuncDefineSetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)102 JSValue JSC_HOST_CALL objectProtoFuncDefineSetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 103 103 { 104 104 CallData callData; … … 109 109 } 110 110 111 JSValue objectProtoFuncLookupGetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)111 JSValue JSC_HOST_CALL objectProtoFuncLookupGetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 112 112 { 113 113 return thisValue.toThisObject(exec)->lookupGetter(exec, Identifier(exec, args.at(0).toString(exec))); 114 114 } 115 115 116 JSValue objectProtoFuncLookupSetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)116 JSValue JSC_HOST_CALL objectProtoFuncLookupSetter(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 117 117 { 118 118 return thisValue.toThisObject(exec)->lookupSetter(exec, Identifier(exec, args.at(0).toString(exec))); 119 119 } 120 120 121 JSValue objectProtoFuncPropertyIsEnumerable(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)121 JSValue JSC_HOST_CALL objectProtoFuncPropertyIsEnumerable(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 122 122 { 123 123 return jsBoolean(thisValue.toThisObject(exec)->propertyIsEnumerable(exec, Identifier(exec, args.at(0).toString(exec)))); 124 124 } 125 125 126 JSValue objectProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)126 JSValue JSC_HOST_CALL objectProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 127 127 { 128 128 return thisValue.toThisJSString(exec); 129 129 } 130 130 131 JSValue objectProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)131 JSValue JSC_HOST_CALL objectProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 132 132 { 133 133 return jsNontrivialString(exec, "[object " + thisValue.toThisObject(exec)->className() + "]"); -
trunk/JavaScriptCore/runtime/ObjectPrototype.h
r43122 r43372 31 31 }; 32 32 33 JSValue objectProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&);33 JSValue JSC_HOST_CALL objectProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 34 34 35 35 } // namespace JSC -
trunk/JavaScriptCore/runtime/RegExpConstructor.cpp
r43122 r43372 350 350 351 351 // ECMA 15.10.3 352 static JSValue callRegExpConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)352 static JSValue JSC_HOST_CALL callRegExpConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 353 353 { 354 354 return constructRegExp(exec, args); -
trunk/JavaScriptCore/runtime/RegExpObject.cpp
r43229 r43372 120 120 } 121 121 122 static JSValue callRegExpObject(ExecState* exec, JSObject* function, JSValue, const ArgList& args)122 static JSValue JSC_HOST_CALL callRegExpObject(ExecState* exec, JSObject* function, JSValue, const ArgList& args) 123 123 { 124 124 return asRegExpObject(function)->exec(exec, args); -
trunk/JavaScriptCore/runtime/RegExpPrototype.cpp
r43222 r43372 37 37 ASSERT_CLASS_FITS_IN_CELL(RegExpPrototype); 38 38 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&);39 static JSValue JSC_HOST_CALL regExpProtoFuncTest(ExecState*, JSObject*, JSValue, const ArgList&); 40 static JSValue JSC_HOST_CALL regExpProtoFuncExec(ExecState*, JSObject*, JSValue, const ArgList&); 41 static JSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState*, JSObject*, JSValue, const ArgList&); 42 static JSValue JSC_HOST_CALL regExpProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 43 43 44 44 // ECMA 15.10.5 … … 57 57 // ------------------------------ Functions --------------------------- 58 58 59 JSValue regExpProtoFuncTest(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)59 JSValue JSC_HOST_CALL regExpProtoFuncTest(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 60 60 { 61 61 if (!thisValue.isObject(&RegExpObject::info)) … … 64 64 } 65 65 66 JSValue regExpProtoFuncExec(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)66 JSValue JSC_HOST_CALL regExpProtoFuncExec(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 67 67 { 68 68 if (!thisValue.isObject(&RegExpObject::info)) … … 71 71 } 72 72 73 JSValue regExpProtoFuncCompile(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)73 JSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 74 74 { 75 75 if (!thisValue.isObject(&RegExpObject::info)) … … 98 98 } 99 99 100 JSValue regExpProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)100 JSValue JSC_HOST_CALL regExpProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 101 101 { 102 102 if (!thisValue.isObject(&RegExpObject::info)) { -
trunk/JavaScriptCore/runtime/StringConstructor.cpp
r43226 r43372 39 39 } 40 40 41 static JSValue stringFromCharCode(ExecState* exec, JSObject*, JSValue, const ArgList& args)41 static JSValue JSC_HOST_CALL stringFromCharCode(ExecState* exec, JSObject*, JSValue, const ArgList& args) 42 42 { 43 43 if (LIKELY(args.size() == 1)) … … 76 76 77 77 // ECMA 15.5.1 78 static JSValue callStringConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args)78 static JSValue JSC_HOST_CALL callStringConstructor(ExecState* exec, JSObject*, JSValue, const ArgList& args) 79 79 { 80 80 if (args.isEmpty()) -
trunk/JavaScriptCore/runtime/StringPrototype.cpp
r43358 r43372 39 39 ASSERT_CLASS_FITS_IN_CELL(StringPrototype); 40 40 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&);41 static JSValue JSC_HOST_CALL stringProtoFuncToString(ExecState*, JSObject*, JSValue, const ArgList&); 42 static JSValue JSC_HOST_CALL stringProtoFuncCharAt(ExecState*, JSObject*, JSValue, const ArgList&); 43 static JSValue JSC_HOST_CALL stringProtoFuncCharCodeAt(ExecState*, JSObject*, JSValue, const ArgList&); 44 static JSValue JSC_HOST_CALL stringProtoFuncConcat(ExecState*, JSObject*, JSValue, const ArgList&); 45 static JSValue JSC_HOST_CALL stringProtoFuncIndexOf(ExecState*, JSObject*, JSValue, const ArgList&); 46 static JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState*, JSObject*, JSValue, const ArgList&); 47 static JSValue JSC_HOST_CALL stringProtoFuncMatch(ExecState*, JSObject*, JSValue, const ArgList&); 48 static JSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState*, JSObject*, JSValue, const ArgList&); 49 static JSValue JSC_HOST_CALL stringProtoFuncSearch(ExecState*, JSObject*, JSValue, const ArgList&); 50 static JSValue JSC_HOST_CALL stringProtoFuncSlice(ExecState*, JSObject*, JSValue, const ArgList&); 51 static JSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState*, JSObject*, JSValue, const ArgList&); 52 static JSValue JSC_HOST_CALL stringProtoFuncSubstr(ExecState*, JSObject*, JSValue, const ArgList&); 53 static JSValue JSC_HOST_CALL stringProtoFuncSubstring(ExecState*, JSObject*, JSValue, const ArgList&); 54 static JSValue JSC_HOST_CALL stringProtoFuncToLowerCase(ExecState*, JSObject*, JSValue, const ArgList&); 55 static JSValue JSC_HOST_CALL stringProtoFuncToUpperCase(ExecState*, JSObject*, JSValue, const ArgList&); 56 static JSValue JSC_HOST_CALL stringProtoFuncLocaleCompare(ExecState*, JSObject*, JSValue, const ArgList&); 57 58 static JSValue JSC_HOST_CALL stringProtoFuncBig(ExecState*, JSObject*, JSValue, const ArgList&); 59 static JSValue JSC_HOST_CALL stringProtoFuncSmall(ExecState*, JSObject*, JSValue, const ArgList&); 60 static JSValue JSC_HOST_CALL stringProtoFuncBlink(ExecState*, JSObject*, JSValue, const ArgList&); 61 static JSValue JSC_HOST_CALL stringProtoFuncBold(ExecState*, JSObject*, JSValue, const ArgList&); 62 static JSValue JSC_HOST_CALL stringProtoFuncFixed(ExecState*, JSObject*, JSValue, const ArgList&); 63 static JSValue JSC_HOST_CALL stringProtoFuncItalics(ExecState*, JSObject*, JSValue, const ArgList&); 64 static JSValue JSC_HOST_CALL stringProtoFuncStrike(ExecState*, JSObject*, JSValue, const ArgList&); 65 static JSValue JSC_HOST_CALL stringProtoFuncSub(ExecState*, JSObject*, JSValue, const ArgList&); 66 static JSValue JSC_HOST_CALL stringProtoFuncSup(ExecState*, JSObject*, JSValue, const ArgList&); 67 static JSValue JSC_HOST_CALL stringProtoFuncFontcolor(ExecState*, JSObject*, JSValue, const ArgList&); 68 static JSValue JSC_HOST_CALL stringProtoFuncFontsize(ExecState*, JSObject*, JSValue, const ArgList&); 69 static JSValue JSC_HOST_CALL stringProtoFuncAnchor(ExecState*, JSObject*, JSValue, const ArgList&); 70 static JSValue JSC_HOST_CALL stringProtoFuncLink(ExecState*, JSObject*, JSValue, const ArgList&); 71 71 72 72 } … … 206 206 } 207 207 208 JSValue stringProtoFuncReplace(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)208 JSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 209 209 { 210 210 JSString* sourceVal = thisValue.toThisJSString(exec); … … 356 356 } 357 357 358 JSValue stringProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)358 JSValue JSC_HOST_CALL stringProtoFuncToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 359 359 { 360 360 // Also used for valueOf. … … 369 369 } 370 370 371 JSValue stringProtoFuncCharAt(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)371 JSValue JSC_HOST_CALL stringProtoFuncCharAt(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 372 372 { 373 373 UString s = thisValue.toThisString(exec); … … 386 386 } 387 387 388 JSValue stringProtoFuncCharCodeAt(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)388 JSValue JSC_HOST_CALL stringProtoFuncCharCodeAt(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 389 389 { 390 390 UString s = thisValue.toThisString(exec); … … 403 403 } 404 404 405 JSValue stringProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)405 JSValue JSC_HOST_CALL stringProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 406 406 { 407 407 UString s = thisValue.toThisString(exec); … … 413 413 } 414 414 415 JSValue stringProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)415 JSValue JSC_HOST_CALL stringProtoFuncIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 416 416 { 417 417 UString s = thisValue.toThisString(exec); … … 438 438 } 439 439 440 JSValue stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)440 JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 441 441 { 442 442 UString s = thisValue.toThisString(exec); … … 455 455 } 456 456 457 JSValue stringProtoFuncMatch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)457 JSValue JSC_HOST_CALL stringProtoFuncMatch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 458 458 { 459 459 UString s = thisValue.toThisString(exec); … … 506 506 } 507 507 508 JSValue stringProtoFuncSearch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)508 JSValue JSC_HOST_CALL stringProtoFuncSearch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 509 509 { 510 510 UString s = thisValue.toThisString(exec); … … 531 531 } 532 532 533 JSValue stringProtoFuncSlice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)533 JSValue JSC_HOST_CALL stringProtoFuncSlice(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 534 534 { 535 535 UString s = thisValue.toThisString(exec); … … 555 555 } 556 556 557 JSValue stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)557 JSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 558 558 { 559 559 UString s = thisValue.toThisString(exec); … … 617 617 } 618 618 619 JSValue stringProtoFuncSubstr(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)619 JSValue JSC_HOST_CALL stringProtoFuncSubstr(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 620 620 { 621 621 UString s = thisValue.toThisString(exec); … … 639 639 } 640 640 641 JSValue stringProtoFuncSubstring(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)641 JSValue JSC_HOST_CALL stringProtoFuncSubstring(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 642 642 { 643 643 UString s = thisValue.toThisString(exec); … … 671 671 } 672 672 673 JSValue stringProtoFuncToLowerCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)673 JSValue JSC_HOST_CALL stringProtoFuncToLowerCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 674 674 { 675 675 JSString* sVal = thisValue.toThisJSString(exec); … … 705 705 } 706 706 707 JSValue stringProtoFuncToUpperCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)707 JSValue JSC_HOST_CALL stringProtoFuncToUpperCase(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 708 708 { 709 709 JSString* sVal = thisValue.toThisJSString(exec); … … 739 739 } 740 740 741 JSValue stringProtoFuncLocaleCompare(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)741 JSValue JSC_HOST_CALL stringProtoFuncLocaleCompare(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 742 742 { 743 743 if (args.size() < 1) … … 749 749 } 750 750 751 JSValue stringProtoFuncBig(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)751 JSValue JSC_HOST_CALL stringProtoFuncBig(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 752 752 { 753 753 UString s = thisValue.toThisString(exec); … … 755 755 } 756 756 757 JSValue stringProtoFuncSmall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)757 JSValue JSC_HOST_CALL stringProtoFuncSmall(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 758 758 { 759 759 UString s = thisValue.toThisString(exec); … … 761 761 } 762 762 763 JSValue stringProtoFuncBlink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)763 JSValue JSC_HOST_CALL stringProtoFuncBlink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 764 764 { 765 765 UString s = thisValue.toThisString(exec); … … 767 767 } 768 768 769 JSValue stringProtoFuncBold(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)769 JSValue JSC_HOST_CALL stringProtoFuncBold(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 770 770 { 771 771 UString s = thisValue.toThisString(exec); … … 773 773 } 774 774 775 JSValue stringProtoFuncFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)775 JSValue JSC_HOST_CALL stringProtoFuncFixed(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 776 776 { 777 777 UString s = thisValue.toThisString(exec); … … 779 779 } 780 780 781 JSValue stringProtoFuncItalics(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)781 JSValue JSC_HOST_CALL stringProtoFuncItalics(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 782 782 { 783 783 UString s = thisValue.toThisString(exec); … … 785 785 } 786 786 787 JSValue stringProtoFuncStrike(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)787 JSValue JSC_HOST_CALL stringProtoFuncStrike(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 788 788 { 789 789 UString s = thisValue.toThisString(exec); … … 791 791 } 792 792 793 JSValue stringProtoFuncSub(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)793 JSValue JSC_HOST_CALL stringProtoFuncSub(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 794 794 { 795 795 UString s = thisValue.toThisString(exec); … … 797 797 } 798 798 799 JSValue stringProtoFuncSup(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)799 JSValue JSC_HOST_CALL stringProtoFuncSup(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) 800 800 { 801 801 UString s = thisValue.toThisString(exec); … … 803 803 } 804 804 805 JSValue stringProtoFuncFontcolor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)805 JSValue JSC_HOST_CALL stringProtoFuncFontcolor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 806 806 { 807 807 UString s = thisValue.toThisString(exec); … … 810 810 } 811 811 812 JSValue stringProtoFuncFontsize(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)812 JSValue JSC_HOST_CALL stringProtoFuncFontsize(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 813 813 { 814 814 UString s = thisValue.toThisString(exec); … … 851 851 } 852 852 853 JSValue stringProtoFuncAnchor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)853 JSValue JSC_HOST_CALL stringProtoFuncAnchor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 854 854 { 855 855 UString s = thisValue.toThisString(exec); … … 858 858 } 859 859 860 JSValue stringProtoFuncLink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)860 JSValue JSC_HOST_CALL stringProtoFuncLink(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) 861 861 { 862 862 UString s = thisValue.toThisString(exec); -
trunk/JavaScriptCore/wtf/Platform.h
r43047 r43372 500 500 #endif 501 501 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 502 516 /* Yet Another Regex Runtime. */ 503 517 /* YARR supports x86 & x86-64, and has been tested on Mac and Windows. */ -
trunk/JavaScriptGlue/ChangeLog
r43122 r43372 1 2009-05-07 Oliver Hunt <[email protected]> 2 3 Reviewed by Gavin Barraclough. 4 5 Add calling convention annotation 6 7 * JSObject.cpp: 8 1 9 2009-05-01 Geoffrey Garen <[email protected]> 2 10 -
trunk/JavaScriptGlue/JSObject.cpp
r43122 r43372 74 74 } 75 75 76 static JSValue JSC_HOST_CALL nativeCallFunction(ExecState* exec, JSObject* functionObject, JSValue thisValue, const ArgList& args); 76 77 static JSValue nativeCallFunction(ExecState* exec, JSObject* functionObject, JSValue thisValue, const ArgList& args) 77 78 { -
trunk/WebCore/ChangeLog
r43367 r43372 1 2009-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 1 23 2009-05-07 Nikolas Zimmermann <[email protected]> 2 24 -
trunk/WebCore/bindings/js/JSHTMLCollectionCustom.cpp
r43187 r43372 52 52 // HTMLCollections are strange objects, they support both get and call, 53 53 // so that document.forms.item(0) and document.forms(0) both work. 54 static JSValue callHTMLCollection(ExecState* exec, JSObject* function, JSValue, const ArgList& args)54 static JSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec, JSObject* function, JSValue, const ArgList& args) 55 55 { 56 56 if (args.size() < 1) -
trunk/WebCore/bindings/js/JSNodeListCustom.cpp
r43122 r43372 37 37 38 38 // Need to support call so that list(0) works. 39 static JSValue callNodeList(ExecState* exec, JSObject* function, JSValue, const ArgList& args)39 static JSValue JSC_HOST_CALL callNodeList(ExecState* exec, JSObject* function, JSValue, const ArgList& args) 40 40 { 41 41 bool ok; -
trunk/WebCore/bindings/js/JSPluginElementFunctions.cpp
r43122 r43372 98 98 } 99 99 100 static JSValue callPlugin(ExecState* exec, JSObject* function, JSValue, const ArgList& args)100 static JSValue JSC_HOST_CALL callPlugin(ExecState* exec, JSObject* function, JSValue, const ArgList& args) 101 101 { 102 102 Instance* instance = pluginInstance(static_cast<JSHTMLElement*>(function)->impl()); -
trunk/WebCore/bindings/js/JSQuarantinedObjectWrapper.h
r43122 r43372 90 90 void transferExceptionToExecState(JSC::ExecState*) const; 91 91 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&); 93 93 static JSC::JSObject* construct(JSC::ExecState*, JSC::JSObject*, const JSC::ArgList&); 94 94 -
trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm
r43242 r43372 691 691 foreach my $function (@{$dataNode->functions}) { 692 692 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"); 694 694 } 695 695 } … … 1326 1326 my $functionImplementationName = $function->signature->extendedAttributes->{"ImplementationFunction"} || $codeGenerator->WK_lcfirst($function->signature->name); 1327 1327 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"); 1329 1329 push(@implContent, "{\n"); 1330 1330 push(@implContent, " UNUSED_PARAM(args);\n"); -
trunk/WebCore/bridge/runtime_method.cpp
r43122 r43372 71 71 } 72 72 73 static JSValue callRuntimeMethod(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args)73 static JSValue JSC_HOST_CALL callRuntimeMethod(ExecState* exec, JSObject* function, JSValue thisValue, const ArgList& args) 74 74 { 75 75 RuntimeMethod* method = static_cast<RuntimeMethod*>(function); -
trunk/WebCore/bridge/runtime_object.cpp
r43122 r43372 204 204 } 205 205 206 static JSValue callRuntimeObject(ExecState* exec, JSObject* function, JSValue, const ArgList& args)206 static JSValue JSC_HOST_CALL callRuntimeObject(ExecState* exec, JSObject* function, JSValue, const ArgList& args) 207 207 { 208 208 RefPtr<Instance> instance(static_cast<RuntimeObjectImp*>(function)->getInternalInstance());
Note:
See TracChangeset
for help on using the changeset viewer.