Changeset 163496 in webkit
- Timestamp:
- Feb 5, 2014 4:58:13 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackObject.h
r162139 r163496 212 212 213 213 JSValue getStaticValue(ExecState*, PropertyName); 214 static EncodedJSValue staticFunctionGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);215 static EncodedJSValue callbackGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);214 static EncodedJSValue staticFunctionGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 215 static EncodedJSValue callbackGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 216 216 217 217 OwnPtr<JSCallbackObjectData> m_callbackObjectData; -
trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
r163225 r163496 592 592 593 593 template <class Parent> 594 EncodedJSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, EncodedJSValueslotParent, EncodedJSValue, PropertyName propertyName)594 EncodedJSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, JSObject* slotParent, EncodedJSValue, PropertyName propertyName) 595 595 { 596 596 JSCallbackObject* thisObj = asCallbackObject(slotParent); … … 620 620 621 621 template <class Parent> 622 EncodedJSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, EncodedJSValueslotParent, EncodedJSValue, PropertyName propertyName)622 EncodedJSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, JSObject* slotParent, EncodedJSValue, PropertyName propertyName) 623 623 { 624 624 JSCallbackObject* thisObj = asCallbackObject(slotParent); -
trunk/Source/JavaScriptCore/ChangeLog
r163483 r163496 1 2014-02-05 Oliver Hunt <oliver@apple.com> 2 3 Change custom getter signature to make the base reference an object pointer 4 https://bugs.webkit.org/show_bug.cgi?id=128279 5 6 Reviewed by Geoffrey Garen. 7 8 Make custom getters take a JSObject* instead of EncodedJSValue as the base 9 reference. This allows us to drop one pointer from the JSVALUE32_64 calling 10 convention. 11 12 * API/JSCallbackObject.h: 13 * API/JSCallbackObjectFunctions.h: 14 (JSC::JSCallbackObject<Parent>::staticFunctionGetter): 15 (JSC::JSCallbackObject<Parent>::callbackGetter): 16 * jit/JITOperations.cpp: 17 * jit/Repatch.cpp: 18 (JSC::generateProtoChainAccessStub): 19 (JSC::tryBuildGetByIDList): 20 * runtime/JSActivation.cpp: 21 (JSC::JSActivation::argumentsGetter): 22 * runtime/JSActivation.h: 23 * runtime/JSFunction.cpp: 24 (JSC::JSFunction::argumentsGetter): 25 (JSC::JSFunction::callerGetter): 26 (JSC::JSFunction::lengthGetter): 27 (JSC::JSFunction::nameGetter): 28 * runtime/JSFunction.h: 29 * runtime/JSObject.h: 30 (JSC::PropertySlot::getValue): 31 * runtime/NumberConstructor.cpp: 32 (JSC::numberConstructorNaNValue): 33 (JSC::numberConstructorNegInfinity): 34 (JSC::numberConstructorPosInfinity): 35 (JSC::numberConstructorMaxValue): 36 (JSC::numberConstructorMinValue): 37 * runtime/PropertySlot.h: 38 * runtime/RegExpConstructor.cpp: 39 (JSC::regExpConstructorDollar1): 40 (JSC::regExpConstructorDollar2): 41 (JSC::regExpConstructorDollar3): 42 (JSC::regExpConstructorDollar4): 43 (JSC::regExpConstructorDollar5): 44 (JSC::regExpConstructorDollar6): 45 (JSC::regExpConstructorDollar7): 46 (JSC::regExpConstructorDollar8): 47 (JSC::regExpConstructorDollar9): 48 (JSC::regExpConstructorInput): 49 (JSC::regExpConstructorMultiline): 50 (JSC::regExpConstructorLastMatch): 51 (JSC::regExpConstructorLastParen): 52 (JSC::regExpConstructorLeftContext): 53 (JSC::regExpConstructorRightContext): 54 * runtime/RegExpObject.cpp: 55 (JSC::regExpObjectGlobal): 56 (JSC::regExpObjectIgnoreCase): 57 (JSC::regExpObjectMultiline): 58 (JSC::regExpObjectSource): 59 1 60 2014-02-05 Andreas Kling <akling@apple.com> 2 61 -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r163321 r163496 220 220 Identifier ident(vm, uid); 221 221 222 return function(exec, JSValue::encode(base), JSValue::encode(base), ident);222 return function(exec, jsCast<JSObject*>(base), JSValue::encode(base), ident); 223 223 } 224 224 -
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r163342 r163496 305 305 } else { 306 306 #if USE(JSVALUE64) 307 // EncodedJSValue (*GetValueFunc)(ExecState*, EncodedJSValueslotBase, EncodedJSValue thisValue, PropertyName);307 // EncodedJSValue (*GetValueFunc)(ExecState*, JSObject* slotBase, EncodedJSValue thisValue, PropertyName); 308 308 stubJit.setupArgumentsWithExecState(MacroAssembler::TrustedImmPtr(protoObject), scratchGPR, MacroAssembler::TrustedImmPtr(propertyName.impl())); 309 309 operationFunction = FunctionPtr(slot.customGetter()); … … 618 618 } else { 619 619 #if USE(JSVALUE64) 620 // EncodedJSValue (*GetValueFunc)(ExecState*, EncodedJSValueslotBase, EncodedJSValue thisValue, PropertyName);620 // EncodedJSValue (*GetValueFunc)(ExecState*, JSObject* slotBase, EncodedJSValue thisValue, PropertyName); 621 621 stubJit.setupArgumentsWithExecState(baseGPR, baseGPR, MacroAssembler::TrustedImmPtr(ident.impl())); 622 622 operationFunction = FunctionPtr(slot.customGetter()); -
trunk/Source/JavaScriptCore/runtime/JSActivation.cpp
r163225 r163496 211 211 } 212 212 213 EncodedJSValue JSActivation::argumentsGetter(ExecState*, EncodedJSValueslotBase, EncodedJSValue, PropertyName)214 { 215 JSActivation* activation = jsCast<JSActivation*>( JSValue::decode(slotBase));213 EncodedJSValue JSActivation::argumentsGetter(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName) 214 { 215 JSActivation* activation = jsCast<JSActivation*>(slotBase); 216 216 CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(activation->m_registers)); 217 217 ASSERT(!activation->isTornOff() && (callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval())); -
trunk/Source/JavaScriptCore/runtime/JSActivation.h
r163322 r163496 101 101 bool symbolTablePutWithAttributes(VM&, PropertyName, JSValue, unsigned attributes); 102 102 103 static EncodedJSValue argumentsGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);103 static EncodedJSValue argumentsGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 104 104 105 105 static size_t allocationSize(SymbolTable*); -
trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
r163321 r163496 224 224 } 225 225 226 EncodedJSValue JSFunction::argumentsGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)227 { 228 JSFunction* thisObj = jsCast<JSFunction*>( JSValue::decode(slotBase));226 EncodedJSValue JSFunction::argumentsGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 227 { 228 JSFunction* thisObj = jsCast<JSFunction*>(slotBase); 229 229 ASSERT(!thisObj->isHostFunction()); 230 230 … … 279 279 } 280 280 281 EncodedJSValue JSFunction::callerGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)282 { 283 JSFunction* thisObj = jsCast<JSFunction*>( JSValue::decode(slotBase));281 EncodedJSValue JSFunction::callerGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 282 { 283 JSFunction* thisObj = jsCast<JSFunction*>(slotBase); 284 284 ASSERT(!thisObj->isHostFunction()); 285 285 JSValue caller = retrieveCallerFunction(exec, thisObj); … … 294 294 } 295 295 296 EncodedJSValue JSFunction::lengthGetter(ExecState*, EncodedJSValueslotBase, EncodedJSValue, PropertyName)297 { 298 JSFunction* thisObj = jsCast<JSFunction*>( JSValue::decode(slotBase));296 EncodedJSValue JSFunction::lengthGetter(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName) 297 { 298 JSFunction* thisObj = jsCast<JSFunction*>(slotBase); 299 299 ASSERT(!thisObj->isHostFunction()); 300 300 return JSValue::encode(jsNumber(thisObj->jsExecutable()->parameterCount())); 301 301 } 302 302 303 EncodedJSValue JSFunction::nameGetter(ExecState*, EncodedJSValueslotBase, EncodedJSValue, PropertyName)304 { 305 JSFunction* thisObj = jsCast<JSFunction*>( JSValue::decode(slotBase));303 EncodedJSValue JSFunction::nameGetter(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName) 304 { 305 JSFunction* thisObj = jsCast<JSFunction*>(slotBase); 306 306 ASSERT(!thisObj->isHostFunction()); 307 307 return JSValue::encode(thisObj->jsExecutable()->nameValue()); -
trunk/Source/JavaScriptCore/runtime/JSFunction.h
r163321 r163496 173 173 JS_EXPORT_PRIVATE bool isHostFunctionNonInline() const; 174 174 175 static EncodedJSValue argumentsGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);176 static EncodedJSValue callerGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);177 static EncodedJSValue lengthGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);178 static EncodedJSValue nameGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);175 static EncodedJSValue argumentsGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 176 static EncodedJSValue callerGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 177 static EncodedJSValue lengthGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 178 static EncodedJSValue nameGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 179 179 180 180 WriteBarrier<ExecutableBase> m_executable; -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r163225 r163496 1544 1544 return JSValue::decode(m_data.value); 1545 1545 if (m_propertyType == TypeCustomIndex) 1546 return JSValue::decode(m_data.customIndex.getIndexValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), m_data.customIndex.index));1546 return JSValue::decode(m_data.customIndex.getIndexValue(exec, slotBase(), JSValue::encode(m_thisValue), m_data.customIndex.index)); 1547 1547 if (m_propertyType == TypeGetter) 1548 1548 return functionGetter(exec); 1549 return JSValue::decode(m_data.custom.getValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), propertyName));1549 return JSValue::decode(m_data.custom.getValue(exec, slotBase(), JSValue::encode(m_thisValue), propertyName)); 1550 1550 } 1551 1551 … … 1555 1555 return JSValue::decode(m_data.value); 1556 1556 if (m_propertyType == TypeCustomIndex) 1557 return JSValue::decode(m_data.customIndex.getIndexValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), m_data.customIndex.index));1557 return JSValue::decode(m_data.customIndex.getIndexValue(exec, slotBase(), JSValue::encode(m_thisValue), m_data.customIndex.index)); 1558 1558 if (m_propertyType == TypeGetter) 1559 1559 return functionGetter(exec); 1560 return JSValue::decode(m_data.custom.getValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), Identifier::from(exec, propertyName)));1560 return JSValue::decode(m_data.custom.getValue(exec, slotBase(), JSValue::encode(m_thisValue), Identifier::from(exec, propertyName))); 1561 1561 } 1562 1562 -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp
r162740 r163496 30 30 namespace JSC { 31 31 32 static EncodedJSValue numberConstructorNaNValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);33 static EncodedJSValue numberConstructorNegInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);34 static EncodedJSValue numberConstructorPosInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);35 static EncodedJSValue numberConstructorMaxValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);36 static EncodedJSValue numberConstructorMinValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);32 static EncodedJSValue numberConstructorNaNValue(ExecState*, JSObject*, EncodedJSValue, PropertyName); 33 static EncodedJSValue numberConstructorNegInfinity(ExecState*, JSObject*, EncodedJSValue, PropertyName); 34 static EncodedJSValue numberConstructorPosInfinity(ExecState*, JSObject*, EncodedJSValue, PropertyName); 35 static EncodedJSValue numberConstructorMaxValue(ExecState*, JSObject*, EncodedJSValue, PropertyName); 36 static EncodedJSValue numberConstructorMinValue(ExecState*, JSObject*, EncodedJSValue, PropertyName); 37 37 38 38 } // namespace JSC … … 78 78 } 79 79 80 static EncodedJSValue numberConstructorNaNValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)80 static EncodedJSValue numberConstructorNaNValue(ExecState*, JSObject*, EncodedJSValue, PropertyName) 81 81 { 82 82 return JSValue::encode(jsNaN()); 83 83 } 84 84 85 static EncodedJSValue numberConstructorNegInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)85 static EncodedJSValue numberConstructorNegInfinity(ExecState*, JSObject*, EncodedJSValue, PropertyName) 86 86 { 87 87 return JSValue::encode(jsNumber(-std::numeric_limits<double>::infinity())); 88 88 } 89 89 90 static EncodedJSValue numberConstructorPosInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)90 static EncodedJSValue numberConstructorPosInfinity(ExecState*, JSObject*, EncodedJSValue, PropertyName) 91 91 { 92 92 return JSValue::encode(jsNumber(std::numeric_limits<double>::infinity())); 93 93 } 94 94 95 static EncodedJSValue numberConstructorMaxValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)95 static EncodedJSValue numberConstructorMaxValue(ExecState*, JSObject*, EncodedJSValue, PropertyName) 96 96 { 97 97 return JSValue::encode(jsNumber(1.7976931348623157E+308)); 98 98 } 99 99 100 static EncodedJSValue numberConstructorMinValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)100 static EncodedJSValue numberConstructorMinValue(ExecState*, JSObject*, EncodedJSValue, PropertyName) 101 101 { 102 102 return JSValue::encode(jsNumber(5E-324)); -
trunk/Source/JavaScriptCore/runtime/PropertySlot.h
r163225 r163496 32 32 class ExecState; 33 33 class GetterSetter; 34 class JSObject; 34 35 35 36 // ECMA 262-3 8.6.1 … … 62 63 } 63 64 64 typedef EncodedJSValue (*GetValueFunc)(ExecState*, EncodedJSValueslotBase, EncodedJSValue thisValue, PropertyName);65 typedef EncodedJSValue (*GetIndexValueFunc)(ExecState*, EncodedJSValueslotBase, EncodedJSValue thisValue, unsigned);65 typedef EncodedJSValue (*GetValueFunc)(ExecState*, JSObject* slotBase, EncodedJSValue thisValue, PropertyName); 66 typedef EncodedJSValue (*GetIndexValueFunc)(ExecState*, JSObject* slotBase, EncodedJSValue thisValue, unsigned); 66 67 67 68 JSValue getValue(ExecState*, PropertyName) const; -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp
r163225 r163496 30 30 namespace JSC { 31 31 32 static EncodedJSValue regExpConstructorInput(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);33 static EncodedJSValue regExpConstructorMultiline(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);34 static EncodedJSValue regExpConstructorLastMatch(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);35 static EncodedJSValue regExpConstructorLastParen(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);36 static EncodedJSValue regExpConstructorLeftContext(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);37 static EncodedJSValue regExpConstructorRightContext(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);38 static EncodedJSValue regExpConstructorDollar1(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);39 static EncodedJSValue regExpConstructorDollar2(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);40 static EncodedJSValue regExpConstructorDollar3(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);41 static EncodedJSValue regExpConstructorDollar4(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);42 static EncodedJSValue regExpConstructorDollar5(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);43 static EncodedJSValue regExpConstructorDollar6(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);44 static EncodedJSValue regExpConstructorDollar7(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);45 static EncodedJSValue regExpConstructorDollar8(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);46 static EncodedJSValue regExpConstructorDollar9(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);32 static EncodedJSValue regExpConstructorInput(ExecState*, JSObject*, EncodedJSValue, PropertyName); 33 static EncodedJSValue regExpConstructorMultiline(ExecState*, JSObject*, EncodedJSValue, PropertyName); 34 static EncodedJSValue regExpConstructorLastMatch(ExecState*, JSObject*, EncodedJSValue, PropertyName); 35 static EncodedJSValue regExpConstructorLastParen(ExecState*, JSObject*, EncodedJSValue, PropertyName); 36 static EncodedJSValue regExpConstructorLeftContext(ExecState*, JSObject*, EncodedJSValue, PropertyName); 37 static EncodedJSValue regExpConstructorRightContext(ExecState*, JSObject*, EncodedJSValue, PropertyName); 38 static EncodedJSValue regExpConstructorDollar1(ExecState*, JSObject*, EncodedJSValue, PropertyName); 39 static EncodedJSValue regExpConstructorDollar2(ExecState*, JSObject*, EncodedJSValue, PropertyName); 40 static EncodedJSValue regExpConstructorDollar3(ExecState*, JSObject*, EncodedJSValue, PropertyName); 41 static EncodedJSValue regExpConstructorDollar4(ExecState*, JSObject*, EncodedJSValue, PropertyName); 42 static EncodedJSValue regExpConstructorDollar5(ExecState*, JSObject*, EncodedJSValue, PropertyName); 43 static EncodedJSValue regExpConstructorDollar6(ExecState*, JSObject*, EncodedJSValue, PropertyName); 44 static EncodedJSValue regExpConstructorDollar7(ExecState*, JSObject*, EncodedJSValue, PropertyName); 45 static EncodedJSValue regExpConstructorDollar8(ExecState*, JSObject*, EncodedJSValue, PropertyName); 46 static EncodedJSValue regExpConstructorDollar9(ExecState*, JSObject*, EncodedJSValue, PropertyName); 47 47 48 48 static void setRegExpConstructorInput(ExecState*, JSObject*, EncodedJSValue, EncodedJSValue); … … 164 164 } 165 165 166 EncodedJSValue regExpConstructorDollar1(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)166 EncodedJSValue regExpConstructorDollar1(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 167 167 { 168 168 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 1)); 169 169 } 170 170 171 EncodedJSValue regExpConstructorDollar2(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)171 EncodedJSValue regExpConstructorDollar2(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 172 172 { 173 173 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 2)); 174 174 } 175 175 176 EncodedJSValue regExpConstructorDollar3(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)176 EncodedJSValue regExpConstructorDollar3(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 177 177 { 178 178 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 3)); 179 179 } 180 180 181 EncodedJSValue regExpConstructorDollar4(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)181 EncodedJSValue regExpConstructorDollar4(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 182 182 { 183 183 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 4)); 184 184 } 185 185 186 EncodedJSValue regExpConstructorDollar5(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)186 EncodedJSValue regExpConstructorDollar5(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 187 187 { 188 188 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 5)); 189 189 } 190 190 191 EncodedJSValue regExpConstructorDollar6(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)191 EncodedJSValue regExpConstructorDollar6(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 192 192 { 193 193 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 6)); 194 194 } 195 195 196 EncodedJSValue regExpConstructorDollar7(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)196 EncodedJSValue regExpConstructorDollar7(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 197 197 { 198 198 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 7)); 199 199 } 200 200 201 EncodedJSValue regExpConstructorDollar8(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)201 EncodedJSValue regExpConstructorDollar8(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 202 202 { 203 203 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 8)); 204 204 } 205 205 206 EncodedJSValue regExpConstructorDollar9(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)206 EncodedJSValue regExpConstructorDollar9(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 207 207 { 208 208 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 9)); 209 209 } 210 210 211 EncodedJSValue regExpConstructorInput(ExecState*, EncodedJSValueslotBase, EncodedJSValue, PropertyName)211 EncodedJSValue regExpConstructorInput(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName) 212 212 { 213 213 return JSValue::encode(asRegExpConstructor(slotBase)->input()); 214 214 } 215 215 216 EncodedJSValue regExpConstructorMultiline(ExecState*, EncodedJSValueslotBase, EncodedJSValue, PropertyName)216 EncodedJSValue regExpConstructorMultiline(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName) 217 217 { 218 218 return JSValue::encode(jsBoolean(asRegExpConstructor(slotBase)->multiline())); 219 219 } 220 220 221 EncodedJSValue regExpConstructorLastMatch(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)221 EncodedJSValue regExpConstructorLastMatch(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 222 222 { 223 223 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 0)); 224 224 } 225 225 226 EncodedJSValue regExpConstructorLastParen(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)226 EncodedJSValue regExpConstructorLastParen(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 227 227 { 228 228 return JSValue::encode(asRegExpConstructor(slotBase)->getLastParen(exec)); 229 229 } 230 230 231 EncodedJSValue regExpConstructorLeftContext(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)231 EncodedJSValue regExpConstructorLeftContext(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 232 232 { 233 233 return JSValue::encode(asRegExpConstructor(slotBase)->getLeftContext(exec)); 234 234 } 235 235 236 EncodedJSValue regExpConstructorRightContext(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)236 EncodedJSValue regExpConstructorRightContext(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 237 237 { 238 238 return JSValue::encode(asRegExpConstructor(slotBase)->getRightContext(exec)); -
trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp
r162740 r163496 40 40 namespace JSC { 41 41 42 static EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);43 static EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);44 static EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);45 static EncodedJSValue regExpObjectSource(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);42 static EncodedJSValue regExpObjectGlobal(ExecState*, JSObject*, EncodedJSValue, PropertyName); 43 static EncodedJSValue regExpObjectIgnoreCase(ExecState*, JSObject*, EncodedJSValue, PropertyName); 44 static EncodedJSValue regExpObjectMultiline(ExecState*, JSObject*, EncodedJSValue, PropertyName); 45 static EncodedJSValue regExpObjectSource(ExecState*, JSObject*, EncodedJSValue, PropertyName); 46 46 47 47 } // namespace JSC … … 161 161 } 162 162 163 EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValueslotBase, EncodedJSValue, PropertyName)163 EncodedJSValue regExpObjectGlobal(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName) 164 164 { 165 165 return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->global())); 166 166 } 167 167 168 EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValueslotBase, EncodedJSValue, PropertyName)168 EncodedJSValue regExpObjectIgnoreCase(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName) 169 169 { 170 170 return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->ignoreCase())); 171 171 } 172 172 173 EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValueslotBase, EncodedJSValue, PropertyName)173 EncodedJSValue regExpObjectMultiline(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName) 174 174 { 175 175 return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->multiline())); … … 284 284 285 285 286 EncodedJSValue regExpObjectSource(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName)286 EncodedJSValue regExpObjectSource(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName) 287 287 { 288 288 String pattern = asRegExpObject(slotBase)->regExp()->pattern(); -
trunk/Source/WebCore/ChangeLog
r163486 r163496 1 2014-02-05 Oliver Hunt <oliver@apple.com> 2 3 Change custom getter signature to make the base reference an object pointer 4 https://bugs.webkit.org/show_bug.cgi?id=128279 5 6 Reviewed by Geoffrey Garen. 7 8 Update everything to the new calling convention. 9 10 * bindings/js/JSCSSStyleDeclarationCustom.cpp: 11 (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): 12 (WebCore::cssPropertyGetterCallback): 13 * bindings/js/JSDOMBinding.cpp: 14 (WebCore::objectToStringFunctionGetter): 15 * bindings/js/JSDOMBinding.h: 16 * bindings/js/JSDOMMimeTypeArrayCustom.cpp: 17 (WebCore::JSDOMMimeTypeArray::nameGetter): 18 * bindings/js/JSDOMPluginArrayCustom.cpp: 19 (WebCore::JSDOMPluginArray::nameGetter): 20 * bindings/js/JSDOMPluginCustom.cpp: 21 (WebCore::JSDOMPlugin::nameGetter): 22 * bindings/js/JSDOMWindowCustom.cpp: 23 (WebCore::nonCachingStaticFunctionGetter): 24 (WebCore::childFrameGetter): 25 (WebCore::indexGetter): 26 (WebCore::namedItemGetter): 27 * bindings/js/JSHTMLAllCollectionCustom.cpp: 28 (WebCore::JSHTMLAllCollection::nameGetter): 29 * bindings/js/JSHTMLCollectionCustom.cpp: 30 (WebCore::JSHTMLCollection::nameGetter): 31 * bindings/js/JSHTMLDocumentCustom.cpp: 32 (WebCore::JSHTMLDocument::nameGetter): 33 * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: 34 (WebCore::JSHTMLFormControlsCollection::nameGetter): 35 * bindings/js/JSHTMLFormElementCustom.cpp: 36 (WebCore::JSHTMLFormElement::nameGetter): 37 * bindings/js/JSHTMLFrameSetElementCustom.cpp: 38 (WebCore::JSHTMLFrameSetElement::nameGetter): 39 * bindings/js/JSHistoryCustom.cpp: 40 (WebCore::nonCachingStaticBackFunctionGetter): 41 (WebCore::nonCachingStaticForwardFunctionGetter): 42 (WebCore::nonCachingStaticGoFunctionGetter): 43 * bindings/js/JSLocationCustom.cpp: 44 (WebCore::nonCachingStaticReplaceFunctionGetter): 45 (WebCore::nonCachingStaticReloadFunctionGetter): 46 (WebCore::nonCachingStaticAssignFunctionGetter): 47 * bindings/js/JSNamedNodeMapCustom.cpp: 48 (WebCore::JSNamedNodeMap::nameGetter): 49 * bindings/js/JSPluginElementFunctions.cpp: 50 (WebCore::pluginElementPropertyGetter): 51 * bindings/js/JSPluginElementFunctions.h: 52 * bindings/js/JSRTCStatsResponseCustom.cpp: 53 (WebCore::JSRTCStatsResponse::nameGetter): 54 * bindings/js/JSStorageCustom.cpp: 55 (WebCore::JSStorage::nameGetter): 56 * bindings/js/JSStyleSheetListCustom.cpp: 57 (WebCore::JSStyleSheetList::nameGetter): 58 * bindings/scripts/CodeGeneratorJS.pm: 59 (GenerateHeader): 60 (GenerateImplementation): 61 * bridge/runtime_array.cpp: 62 (JSC::RuntimeArray::lengthGetter): 63 (JSC::RuntimeArray::indexGetter): 64 * bridge/runtime_array.h: 65 * bridge/runtime_method.cpp: 66 (JSC::RuntimeMethod::lengthGetter): 67 * bridge/runtime_method.h: 68 * bridge/runtime_object.cpp: 69 (JSC::Bindings::RuntimeObject::fallbackObjectGetter): 70 (JSC::Bindings::RuntimeObject::fieldGetter): 71 (JSC::Bindings::RuntimeObject::methodGetter): 72 * bridge/runtime_object.h: 73 1 74 2014-02-04 Andy Estes <aestes@apple.com> 2 75 -
trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
r160879 r163496 304 304 } 305 305 306 static EncodedJSValue cssPropertyGetterPixelOrPosPrefixCallback(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, unsigned propertyID)306 static EncodedJSValue cssPropertyGetterPixelOrPosPrefixCallback(ExecState* exec, JSObject*, EncodedJSValue thisValue, unsigned propertyID) 307 307 { 308 308 JSCSSStyleDeclaration* thisObject = jsDynamicCast<JSCSSStyleDeclaration*>(JSValue::decode(thisValue)); … … 321 321 } 322 322 323 static EncodedJSValue cssPropertyGetterCallback(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, unsigned propertyID)323 static EncodedJSValue cssPropertyGetterCallback(ExecState* exec, JSObject*, EncodedJSValue thisValue, unsigned propertyID) 324 324 { 325 325 JSCSSStyleDeclaration* thisObject = jsDynamicCast<JSCSSStyleDeclaration*>(JSValue::decode(thisValue)); -
trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp
r163027 r163496 278 278 } 279 279 280 EncodedJSValue objectToStringFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)280 EncodedJSValue objectToStringFunctionGetter(ExecState* exec, JSObject*, EncodedJSValue, PropertyName propertyName) 281 281 { 282 282 return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), objectProtoFuncToString)); -
trunk/Source/WebCore/bindings/js/JSDOMBinding.h
r163413 r163496 579 579 580 580 void printErrorMessageForFrame(Frame*, const String& message); 581 JSC::EncodedJSValue objectToStringFunctionGetter(JSC::ExecState*, JSC:: EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);581 JSC::EncodedJSValue objectToStringFunctionGetter(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName); 582 582 583 583 inline JSC::JSValue jsStringWithCache(JSC::ExecState* exec, const String& s) -
trunk/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp
r160208 r163496 34 34 } 35 35 36 EncodedJSValue JSDOMMimeTypeArray::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)36 EncodedJSValue JSDOMMimeTypeArray::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 37 37 { 38 JSDOMMimeTypeArray* thisObj = jsDynamicCast<JSDOMMimeTypeArray*>( JSValue::decode(slotBase));38 JSDOMMimeTypeArray* thisObj = jsDynamicCast<JSDOMMimeTypeArray*>(slotBase); 39 39 if (!thisObj) 40 40 return throwVMTypeError(exec); -
trunk/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp
r160208 r163496 34 34 } 35 35 36 EncodedJSValue JSDOMPluginArray::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)36 EncodedJSValue JSDOMPluginArray::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 37 37 { 38 JSDOMPluginArray* thisObj = jsCast<JSDOMPluginArray*>( JSValue::decode(slotBase));38 JSDOMPluginArray* thisObj = jsCast<JSDOMPluginArray*>(slotBase); 39 39 return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)))); 40 40 } -
trunk/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp
r160208 r163496 33 33 } 34 34 35 EncodedJSValue JSDOMPlugin::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)35 EncodedJSValue JSDOMPlugin::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 36 36 { 37 JSDOMPlugin* thisObj = jsCast<JSDOMPlugin*>( JSValue::decode(slotBase));37 JSDOMPlugin* thisObj = jsCast<JSDOMPlugin*>(slotBase); 38 38 return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)))); 39 39 } -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r163026 r163496 73 73 74 74 template<NativeFunction nativeFunction, int length> 75 EncodedJSValue nonCachingStaticFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)75 EncodedJSValue nonCachingStaticFunctionGetter(ExecState* exec, JSObject*, EncodedJSValue, PropertyName propertyName) 76 76 { 77 77 return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), length, propertyName.publicName(), nativeFunction)); 78 78 } 79 79 80 static EncodedJSValue childFrameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)81 { 82 return JSValue::encode(toJS(exec, jsCast<JSDOMWindow*>( JSValue::decode(slotBase))->impl().frame()->tree().scopedChild(propertyNameToAtomicString(propertyName))->document()->domWindow()));83 } 84 85 static EncodedJSValue indexGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, unsigned index)86 { 87 return JSValue::encode(toJS(exec, jsCast<JSDOMWindow*>( JSValue::decode(slotBase))->impl().frame()->tree().scopedChild(index)->document()->domWindow()));88 } 89 90 static EncodedJSValue namedItemGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)91 { 92 JSDOMWindowBase* thisObj = jsCast<JSDOMWindow*>( JSValue::decode(slotBase));80 static EncodedJSValue childFrameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 81 { 82 return JSValue::encode(toJS(exec, jsCast<JSDOMWindow*>(slotBase)->impl().frame()->tree().scopedChild(propertyNameToAtomicString(propertyName))->document()->domWindow())); 83 } 84 85 static EncodedJSValue indexGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, unsigned index) 86 { 87 return JSValue::encode(toJS(exec, jsCast<JSDOMWindow*>(slotBase)->impl().frame()->tree().scopedChild(index)->document()->domWindow())); 88 } 89 90 static EncodedJSValue namedItemGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 91 { 92 JSDOMWindowBase* thisObj = jsCast<JSDOMWindow*>(slotBase); 93 93 Document* document = thisObj->impl().frame()->document(); 94 94 -
trunk/Source/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp
r160208 r163496 101 101 } 102 102 103 EncodedJSValue JSHTMLAllCollection::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)103 EncodedJSValue JSHTMLAllCollection::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 104 104 { 105 JSHTMLAllCollection* thisObj = jsCast<JSHTMLAllCollection*>( JSValue::decode(slotBase));105 JSHTMLAllCollection* thisObj = jsCast<JSHTMLAllCollection*>(slotBase); 106 106 return JSValue::encode(getNamedItems(exec, thisObj, propertyName)); 107 107 } -
trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp
r160208 r163496 46 46 } 47 47 48 EncodedJSValue JSHTMLCollection::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)48 EncodedJSValue JSHTMLCollection::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 49 49 { 50 JSHTMLCollection* collection = jsCast<JSHTMLCollection*>( JSValue::decode(slotBase));50 JSHTMLCollection* collection = jsCast<JSHTMLCollection*>(slotBase); 51 51 const AtomicString& name = propertyNameToAtomicString(propertyName); 52 52 return JSValue::encode(toJS(exec, collection->globalObject(), collection->impl().namedItem(name))); -
trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
r160208 r163496 58 58 } 59 59 60 EncodedJSValue JSHTMLDocument::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)60 EncodedJSValue JSHTMLDocument::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 61 61 { 62 JSHTMLDocument* thisObj = jsCast<JSHTMLDocument*>( JSValue::decode(slotBase));62 JSHTMLDocument* thisObj = jsCast<JSHTMLDocument*>(slotBase); 63 63 HTMLDocument& document = thisObj->impl(); 64 64 -
trunk/Source/WebCore/bindings/js/JSHTMLFormControlsCollectionCustom.cpp
r160208 r163496 58 58 } 59 59 60 EncodedJSValue JSHTMLFormControlsCollection::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)60 EncodedJSValue JSHTMLFormControlsCollection::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 61 61 { 62 JSHTMLFormControlsCollection* thisObj = jsCast<JSHTMLFormControlsCollection*>( JSValue::decode(slotBase));62 JSHTMLFormControlsCollection* thisObj = jsCast<JSHTMLFormControlsCollection*>(slotBase); 63 63 return JSValue::encode(getNamedItems(exec, thisObj, propertyName)); 64 64 } -
trunk/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
r160208 r163496 43 43 } 44 44 45 EncodedJSValue JSHTMLFormElement::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)45 EncodedJSValue JSHTMLFormElement::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 46 46 { 47 JSHTMLFormElement* jsForm = jsCast<JSHTMLFormElement*>( JSValue::decode(slotBase));47 JSHTMLFormElement* jsForm = jsCast<JSHTMLFormElement*>(slotBase); 48 48 HTMLFormElement& form = jsForm->impl(); 49 49 -
trunk/Source/WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp
r160208 r163496 48 48 } 49 49 50 EncodedJSValue JSHTMLFrameSetElement::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)50 EncodedJSValue JSHTMLFrameSetElement::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 51 51 { 52 HTMLElement& element = jsCast<JSHTMLElement*>( JSValue::decode(slotBase))->impl();52 HTMLElement& element = jsCast<JSHTMLElement*>(slotBase)->impl(); 53 53 Node* frameElement = element.children()->namedItem(propertyNameToAtomicString(propertyName)); 54 54 if (Document* document = toHTMLFrameElement(frameElement)->contentDocument()) { -
trunk/Source/WebCore/bindings/js/JSHistoryCustom.cpp
r161593 r163496 39 39 namespace WebCore { 40 40 41 static EncodedJSValue nonCachingStaticBackFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)41 static EncodedJSValue nonCachingStaticBackFunctionGetter(ExecState* exec, JSObject*, EncodedJSValue, PropertyName propertyName) 42 42 { 43 43 return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsHistoryPrototypeFunctionBack)); 44 44 } 45 45 46 static EncodedJSValue nonCachingStaticForwardFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)46 static EncodedJSValue nonCachingStaticForwardFunctionGetter(ExecState* exec, JSObject*, EncodedJSValue, PropertyName propertyName) 47 47 { 48 48 return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsHistoryPrototypeFunctionForward)); 49 49 } 50 50 51 static EncodedJSValue nonCachingStaticGoFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)51 static EncodedJSValue nonCachingStaticGoFunctionGetter(ExecState* exec, JSObject*, EncodedJSValue, PropertyName propertyName) 52 52 { 53 53 return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsHistoryPrototypeFunctionGo)); -
trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp
r160208 r163496 31 31 namespace WebCore { 32 32 33 static EncodedJSValue nonCachingStaticReplaceFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)33 static EncodedJSValue nonCachingStaticReplaceFunctionGetter(ExecState* exec, JSObject*, EncodedJSValue, PropertyName propertyName) 34 34 { 35 35 return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsLocationPrototypeFunctionReplace)); 36 36 } 37 37 38 static EncodedJSValue nonCachingStaticReloadFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)38 static EncodedJSValue nonCachingStaticReloadFunctionGetter(ExecState* exec, JSObject*, EncodedJSValue, PropertyName propertyName) 39 39 { 40 40 return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsLocationPrototypeFunctionReload)); 41 41 } 42 42 43 static EncodedJSValue nonCachingStaticAssignFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)43 static EncodedJSValue nonCachingStaticAssignFunctionGetter(ExecState* exec, JSObject*, EncodedJSValue, PropertyName propertyName) 44 44 { 45 45 return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsLocationPrototypeFunctionAssign)); -
trunk/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp
r160208 r163496 41 41 } 42 42 43 EncodedJSValue JSNamedNodeMap::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)43 EncodedJSValue JSNamedNodeMap::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 44 44 { 45 JSNamedNodeMap* thisObj = jsCast<JSNamedNodeMap*>( JSValue::decode(slotBase));45 JSNamedNodeMap* thisObj = jsCast<JSNamedNodeMap*>(slotBase); 46 46 return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().getNamedItem(propertyNameToAtomicString(propertyName)))); 47 47 } -
trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.cpp
r160879 r163496 101 101 } 102 102 103 EncodedJSValue pluginElementPropertyGetter(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, PropertyName propertyName)103 EncodedJSValue pluginElementPropertyGetter(ExecState* exec, JSObject*, EncodedJSValue thisValue, PropertyName propertyName) 104 104 { 105 105 -
trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.h
r160208 r163496 39 39 JSC::JSObject* pluginScriptObject(JSC::ExecState*, JSHTMLElement*); 40 40 41 JSC::EncodedJSValue pluginElementPropertyGetter(JSC::ExecState*, JSC:: EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);41 JSC::EncodedJSValue pluginElementPropertyGetter(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName); 42 42 bool pluginElementCustomGetOwnPropertySlot(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&, JSHTMLElement*); 43 43 bool pluginElementCustomPut(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSHTMLElement*, JSC::PutPropertySlot&); -
trunk/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp
r160208 r163496 41 41 } 42 42 43 EncodedJSValue JSRTCStatsResponse::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)43 EncodedJSValue JSRTCStatsResponse::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 44 44 { 45 JSRTCStatsResponse* thisObj = jsCast<JSRTCStatsResponse*>( JSValue::decode(slotBase));45 JSRTCStatsResponse* thisObj = jsCast<JSRTCStatsResponse*>(slotBase); 46 46 return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)))); 47 47 } -
trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp
r163413 r163496 43 43 } 44 44 45 EncodedJSValue JSStorage::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)45 EncodedJSValue JSStorage::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 46 46 { 47 JSStorage* thisObj = jsCast<JSStorage*>( JSValue::decode(slotBase));47 JSStorage* thisObj = jsCast<JSStorage*>(slotBase); 48 48 49 JSValue prototype = asObject(JSValue::decode(slotBase))->prototype();49 JSValue prototype = slotBase->prototype(); 50 50 if (prototype.isObject() && asObject(prototype)->hasProperty(exec, propertyName)) 51 51 return JSValue::encode(asObject(prototype)->get(exec, propertyName)); -
trunk/Source/WebCore/bindings/js/JSStyleSheetListCustom.cpp
r160208 r163496 41 41 } 42 42 43 EncodedJSValue JSStyleSheetList::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)43 EncodedJSValue JSStyleSheetList::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 44 44 { 45 JSStyleSheetList* thisObj = jsCast<JSStyleSheetList*>( JSValue::decode(slotBase));45 JSStyleSheetList* thisObj = jsCast<JSStyleSheetList*>(slotBase); 46 46 HTMLStyleElement* element = thisObj->impl().getNamedItem(propertyNameToString(propertyName)); 47 47 ASSERT(element); -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r163413 r163496 982 982 push(@headerContent, " JSC::JSValue getByIndex(JSC::ExecState*, unsigned index);\n"); 983 983 } else { 984 push(@headerContent, " static JSC::EncodedJSValue indexGetter(JSC::ExecState*, JSC:: EncodedJSValue, JSC::EncodedJSValue, unsigned);\n");984 push(@headerContent, " static JSC::EncodedJSValue indexGetter(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, unsigned);\n"); 985 985 } 986 986 } … … 994 994 push(@headerContent, "private:\n"); 995 995 push(@headerContent, " static bool canGetItemsForName(JSC::ExecState*, $interfaceName*, JSC::PropertyName);\n"); 996 push(@headerContent, " static JSC::EncodedJSValue nameGetter(JSC::ExecState*, JSC:: EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");996 push(@headerContent, " static JSC::EncodedJSValue nameGetter(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);\n"); 997 997 } 998 998 … … 1135 1135 push(@headerContent, "#if ${conditionalString}\n") if $conditionalString; 1136 1136 my $getter = GetAttributeGetterName($interfaceName, $className, $attribute); 1137 push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC:: EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");1137 push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);\n"); 1138 1138 if (!IsReadonly($attribute)) { 1139 1139 my $setter = GetAttributeSetterName($interfaceName, $className, $attribute); … … 1145 1145 if (!$interface->extendedAttributes->{"NoInterfaceObject"}) { 1146 1146 my $getter = "js" . $interfaceName . "Constructor"; 1147 push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC:: EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");1147 push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);\n"); 1148 1148 } 1149 1149 … … 1160 1160 push(@headerContent, "#if ${conditionalString}\n") if $conditionalString; 1161 1161 my $getter = "js" . $interfaceName . $codeGenerator->WK_ucfirst($constant->name); 1162 push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC:: EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");1162 push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);\n"); 1163 1163 push(@headerContent, "#endif\n") if $conditionalString; 1164 1164 } … … 1965 1965 push(@implContent, "#if ${attributeConditionalString}\n") if $attributeConditionalString; 1966 1966 1967 push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue thisValue, PropertyName)\n");1967 push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)\n"); 1968 1968 push(@implContent, "{\n"); 1969 1969 … … 2148 2148 my $constructorFunctionName = "js" . $interfaceName . "Constructor"; 2149 2149 2150 push(@implContent, "EncodedJSValue ${constructorFunctionName}(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, PropertyName)\n");2150 push(@implContent, "EncodedJSValue ${constructorFunctionName}(ExecState* exec, JSObject*, EncodedJSValue thisValue, PropertyName)\n"); 2151 2151 push(@implContent, "{\n"); 2152 2152 if ($interfaceName eq "DOMWindow") { … … 2629 2629 2630 2630 # FIXME: this casts into int to match our previous behavior which turned 0xFFFFFFFF in -1 for NodeFilter.SHOW_ALL 2631 push(@implContent, "EncodedJSValue ${getter}(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName)\n");2631 push(@implContent, "EncodedJSValue ${getter}(ExecState* exec, JSObject*, EncodedJSValue, PropertyName)\n"); 2632 2632 push(@implContent, "{\n"); 2633 2633 if ($constant->type eq "DOMString") { … … 2643 2643 2644 2644 if ($indexedGetterFunction && !$hasNumericIndexedGetter) { 2645 push(@implContent, "\nEncodedJSValue ${className}::indexGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, unsigned index)\n");2645 push(@implContent, "\nEncodedJSValue ${className}::indexGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, unsigned index)\n"); 2646 2646 push(@implContent, "{\n"); 2647 push(@implContent, " ${className}* thisObj = jsCast<$className*>( JSValue::decode(slotBase));\n");2647 push(@implContent, " ${className}* thisObj = jsCast<$className*>(slotBase);\n"); 2648 2648 push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObj, info());\n"); 2649 2649 if ($indexedGetterFunction->signature->type eq "DOMString") { … … 2682 2682 push(@implContent, " return collection->hasNamedItem(propertyNameToAtomicString(propertyName));\n"); 2683 2683 push(@implContent, "}\n\n"); 2684 push(@implContent, "EncodedJSValue ${className}::nameGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)\n");2684 push(@implContent, "EncodedJSValue ${className}::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName)\n"); 2685 2685 push(@implContent, "{\n"); 2686 push(@implContent, " ${className}* thisObj = jsCast<$className*>( JSValue::decode(slotBase));\n");2686 push(@implContent, " ${className}* thisObj = jsCast<$className*>(slotBase);\n"); 2687 2687 push(@implContent, " return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));\n"); 2688 2688 push(@implContent, "}\n\n"); -
trunk/Source/WebCore/bridge/runtime_array.cpp
r160879 r163496 61 61 } 62 62 63 EncodedJSValue RuntimeArray::lengthGetter(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, PropertyName)63 EncodedJSValue RuntimeArray::lengthGetter(ExecState* exec, JSObject*, EncodedJSValue thisValue, PropertyName) 64 64 { 65 65 RuntimeArray* thisObject = jsDynamicCast<RuntimeArray*>(JSValue::decode(thisValue)); … … 69 69 } 70 70 71 EncodedJSValue RuntimeArray::indexGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, unsigned index)71 EncodedJSValue RuntimeArray::indexGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, unsigned index) 72 72 { 73 RuntimeArray* thisObj = jsCast<RuntimeArray*>( JSValue::decode(slotBase));73 RuntimeArray* thisObj = jsCast<RuntimeArray*>(slotBase); 74 74 return JSValue::encode(thisObj->getConcreteArray()->valueAt(exec, index)); 75 75 } -
trunk/Source/WebCore/bridge/runtime_array.h
r160208 r163496 85 85 private: 86 86 RuntimeArray(ExecState*, Structure*); 87 static EncodedJSValue lengthGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);88 static EncodedJSValue indexGetter(ExecState*, EncodedJSValue, EncodedJSValue, unsigned);87 static EncodedJSValue lengthGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 88 static EncodedJSValue indexGetter(ExecState*, JSObject*, EncodedJSValue, unsigned); 89 89 90 90 BindingsArray* m_array; -
trunk/Source/WebCore/bridge/runtime_method.cpp
r160879 r163496 55 55 } 56 56 57 EncodedJSValue RuntimeMethod::lengthGetter(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, PropertyName)57 EncodedJSValue RuntimeMethod::lengthGetter(ExecState* exec, JSObject*, EncodedJSValue thisValue, PropertyName) 58 58 { 59 59 RuntimeMethod* thisObject = jsDynamicCast<RuntimeMethod*>(JSValue::decode(thisValue)); -
trunk/Source/WebCore/bridge/runtime_method.h
r160208 r163496 68 68 69 69 private: 70 static EncodedJSValue lengthGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);70 static EncodedJSValue lengthGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 71 71 72 72 Bindings::Method* m_method; -
trunk/Source/WebCore/bridge/runtime_object.cpp
r160208 r163496 63 63 } 64 64 65 EncodedJSValue RuntimeObject::fallbackObjectGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)66 { 67 RuntimeObject* thisObj = jsCast<RuntimeObject*>( JSValue::decode(slotBase));65 EncodedJSValue RuntimeObject::fallbackObjectGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 66 { 67 RuntimeObject* thisObj = jsCast<RuntimeObject*>(slotBase); 68 68 RefPtr<Instance> instance = thisObj->m_instance; 69 69 … … 81 81 } 82 82 83 EncodedJSValue RuntimeObject::fieldGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)83 EncodedJSValue RuntimeObject::fieldGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 84 84 { 85 RuntimeObject* thisObj = jsCast<RuntimeObject*>( JSValue::decode(slotBase));85 RuntimeObject* thisObj = jsCast<RuntimeObject*>(slotBase); 86 86 RefPtr<Instance> instance = thisObj->m_instance; 87 87 … … 100 100 } 101 101 102 EncodedJSValue RuntimeObject::methodGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)103 { 104 RuntimeObject* thisObj = jsCast<RuntimeObject*>( JSValue::decode(slotBase));102 EncodedJSValue RuntimeObject::methodGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 103 { 104 RuntimeObject* thisObj = jsCast<RuntimeObject*>(slotBase); 105 105 RefPtr<Instance> instance = thisObj->m_instance; 106 106 -
trunk/Source/WebCore/bridge/runtime_object.h
r160208 r163496 79 79 80 80 private: 81 static EncodedJSValue fallbackObjectGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);82 static EncodedJSValue fieldGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);83 static EncodedJSValue methodGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);81 static EncodedJSValue fallbackObjectGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 82 static EncodedJSValue fieldGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 83 static EncodedJSValue methodGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName); 84 84 85 85 RefPtr<Instance> m_instance; -
trunk/Source/WebKit2/ChangeLog
r163483 r163496 1 2014-02-05 Oliver Hunt <oliver@apple.com> 2 3 Change custom getter signature to make the base reference an object pointer 4 https://bugs.webkit.org/show_bug.cgi?id=128279 5 6 Reviewed by Geoffrey Garen. 7 8 Update everything to the new calling convention. 9 10 * WebProcess/Plugins/Netscape/JSNPObject.cpp: 11 (WebKit::JSNPObject::propertyGetter): 12 (WebKit::JSNPObject::methodGetter): 13 * WebProcess/Plugins/Netscape/JSNPObject.h: 14 1 15 2014-02-05 Andreas Kling <akling@apple.com> 2 16 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp
r160208 r163496 418 418 } 419 419 420 EncodedJSValue JSNPObject::propertyGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)421 { 422 JSNPObject* thisObj = jsCast<JSNPObject*>( JSValue::decode(slotBase));420 EncodedJSValue JSNPObject::propertyGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 421 { 422 JSNPObject* thisObj = jsCast<JSNPObject*>(slotBase); 423 423 ASSERT_GC_OBJECT_INHERITS(thisObj, info()); 424 424 … … 454 454 } 455 455 456 EncodedJSValue JSNPObject::methodGetter(ExecState* exec, EncodedJSValueslotBase, EncodedJSValue, PropertyName propertyName)457 { 458 JSNPObject* thisObj = jsCast<JSNPObject*>( JSValue::decode(slotBase));456 EncodedJSValue JSNPObject::methodGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName) 457 { 458 JSNPObject* thisObj = jsCast<JSNPObject*>(slotBase); 459 459 ASSERT_GC_OBJECT_INHERITS(thisObj, info()); 460 460 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h
r160208 r163496 96 96 static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode); 97 97 98 static JSC::EncodedJSValue propertyGetter(JSC::ExecState*, JSC:: EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);99 static JSC::EncodedJSValue methodGetter(JSC::ExecState*, JSC:: EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);98 static JSC::EncodedJSValue propertyGetter(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName); 99 static JSC::EncodedJSValue methodGetter(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName); 100 100 static JSC::JSObject* throwInvalidAccessError(JSC::ExecState*); 101 101
Note: See TracChangeset
for help on using the changeset viewer.