2010-10-25 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove exec and globalData arguments from jsNumber
https://bugs.webkit.org/show_bug.cgi?id=48270
Remove the now unused exec and globalData arguments from jsNumber
and mechanically update all users of jsNumber.
* API/JSValueRef.cpp:
(JSValueMakeNumber):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoad):
* bytecompiler/NodesCodegen.cpp:
(JSC::ArrayNode::emitBytecode):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(functionRun):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
* runtime/CachedTranscendentalFunction.h:
(JSC::CachedTranscendentalFunction::operator()):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
(JSC::dateParse):
(JSC::dateNow):
(JSC::dateUTC):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
* runtime/Error.cpp:
(JSC::addErrorSourceInfo):
(JSC::addErrorDivotInfo):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSByteArray.h:
(JSC::JSByteArray::getIndex):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::lengthGetter):
(JSC::JSFunction::getOwnPropertyDescriptor):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
* runtime/JSNumberCell.h:
(JSC::JSValue::JSValue):
(JSC::jsNaN):
(JSC::JSValue::toJSNumber):
* runtime/JSONObject.cpp:
(JSC::unwrapBoxedPrimitive):
(JSC::PropertyNameForFunctionCall::value):
(JSC::JSONStringify):
* runtime/JSString.cpp:
(JSC::JSString::getStringPropertyDescriptor):
* runtime/JSString.h:
(JSC::JSString::getStringPropertySlot):
* runtime/JSValue.h:
(JSC::jsDoubleNumber):
(JSC::jsNumber):
(JSC::jsNaN):
(JSC::JSValue::JSValue):
(JSC::JSValue::toJSNumber):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
(JSC::mathProtoFuncAbs):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncCeil):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncFloor):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
(JSC::mathProtoFuncRandom):
(JSC::mathProtoFuncRound):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncSqrt):
(JSC::mathProtoFuncTan):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::numberConstructorNaNValue):
(JSC::numberConstructorNegInfinity):
(JSC::numberConstructorPosInfinity):
(JSC::numberConstructorMaxValue):
(JSC::numberConstructorMinValue):
(JSC::constructWithNumberConstructor):
(JSC::callNumberConstructor):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
* runtime/Operations.cpp:
(JSC::jsAddSlowCase):
* runtime/Operations.h:
(JSC::jsAdd):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
(JSC::RegExpMatchesArray::fillArrayInstance):
* runtime/RegExpObject.cpp:
(JSC::regExpObjectLastIndex):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncLocaleCompare):
2010-10-25 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove exec and globalData arguments from jsNumber
https://bugs.webkit.org/show_bug.cgi?id=48270
Don't pass exec to jsNumber
* JSUtils.cpp:
(JSObjectKJSValue):
* UserObjectImp.cpp:
(UserObjectImp::toPrimitive):
2010-10-25 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove exec and globalData arguments from jsNumber
https://bugs.webkit.org/show_bug.cgi?id=48270
Mechanical removal of exec parameter to jsNumber.
* bindings/js/JSAudioConstructor.cpp:
(WebCore::JSAudioConstructor::JSAudioConstructor):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::nameGetter):
* bindings/js/JSCoordinatesCustom.cpp:
(WebCore::JSCoordinates::altitude):
(WebCore::JSCoordinates::altitudeAccuracy):
(WebCore::JSCoordinates::heading):
(WebCore::JSCoordinates::speed):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::setTimeout):
(WebCore::JSDOMWindow::setInterval):
* bindings/js/JSDeviceMotionEventCustom.cpp:
(WebCore::createAccelerationObject):
(WebCore::createRotationRateObject):
(WebCore::JSDeviceMotionEvent::interval):
* bindings/js/JSDeviceOrientationEventCustom.cpp:
(WebCore::JSDeviceOrientationEvent::alpha):
(WebCore::JSDeviceOrientationEvent::beta):
(WebCore::JSDeviceOrientationEvent::gamma):
* bindings/js/JSGeolocationCustom.cpp:
(WebCore::JSGeolocation::watchPosition):
* bindings/js/JSHTMLInputElementCustom.cpp:
(WebCore::JSHTMLInputElement::selectionStart):
(WebCore::JSHTMLInputElement::selectionEnd):
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::length):
* bindings/js/JSIDBKeyCustom.cpp:
(WebCore::toJS):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::InjectedScriptHost::createInjectedScript):
(WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
* bindings/js/JSOptionConstructor.cpp:
(WebCore::JSOptionConstructor::JSOptionConstructor):
* bindings/js/JSSQLResultSetRowListCustom.cpp:
(WebCore::JSSQLResultSetRowList::item):
* bindings/js/JSSVGLengthCustom.cpp:
(WebCore::JSSVGLength::value):
* bindings/js/JSScriptProfileNodeCustom.cpp:
(WebCore::JSScriptProfileNode::callUID):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/js/JSWorkerContextCustom.cpp:
(WebCore::JSWorkerContext::setTimeout):
(WebCore::JSWorkerContext::setInterval):
* bindings/js/JSWorkerContextErrorHandler.cpp:
(WebCore::JSWorkerContextErrorHandler::handleEvent):
* bindings/js/ScriptFunctionCall.cpp:
(WebCore::ScriptCallArgumentHandler::appendArgument):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readTerminal):
* bindings/scripts/CodeGeneratorJS.pm:
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::numberValue):
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertNPVariantToValue):
* bridge/jni/jsc/JNIBridgeJSC.cpp:
(JavaField::valueFromInstance):
(JavaArray::valueAt):
* bridge/jni/jsc/JavaInstanceJSC.cpp:
(JavaInstance::numberValue):
(JavaInstance::invokeMethod):
* bridge/objc/objc_instance.mm:
(ObjcInstance::numberValue):
* bridge/objc/objc_utility.mm:
(JSC::Bindings::convertObjcValueToValue):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::lengthGetter):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::lengthGetter):
2010-10-25 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove exec and globalData arguments from jsNumber
https://bugs.webkit.org/show_bug.cgi?id=48270
Mechanical removal of exec parameter to jsNumber
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
* Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyInstance::numberValue):
2010-10-25 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove exec and globalData arguments from jsNumber
https://bugs.webkit.org/show_bug.cgi?id=48270
Mechanical removal of exec parameter to jsNumber
* WebProcess/Plugins/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/runtime/NumberConstructor.cpp b/JavaScriptCore/runtime/NumberConstructor.cpp
index a197952..5369ca0 100644
--- a/JavaScriptCore/runtime/NumberConstructor.cpp
+++ b/JavaScriptCore/runtime/NumberConstructor.cpp
@@ -61,7 +61,7 @@
putDirectWithoutTransition(exec->propertyNames().prototype, numberPrototype, DontEnum | DontDelete | ReadOnly);
// no. of arguments for constructor
- putDirectWithoutTransition(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontEnum | DontDelete);
+ putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
}
bool NumberConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
@@ -74,29 +74,29 @@
return getStaticValueDescriptor<NumberConstructor, InternalFunction>(exec, ExecState::numberTable(exec), this, propertyName, descriptor);
}
-static JSValue numberConstructorNaNValue(ExecState* exec, JSValue, const Identifier&)
+static JSValue numberConstructorNaNValue(ExecState*, JSValue, const Identifier&)
{
- return jsNaN(exec);
+ return jsNaN();
}
-static JSValue numberConstructorNegInfinity(ExecState* exec, JSValue, const Identifier&)
+static JSValue numberConstructorNegInfinity(ExecState*, JSValue, const Identifier&)
{
- return jsNumber(exec, -Inf);
+ return jsNumber(-Inf);
}
-static JSValue numberConstructorPosInfinity(ExecState* exec, JSValue, const Identifier&)
+static JSValue numberConstructorPosInfinity(ExecState*, JSValue, const Identifier&)
{
- return jsNumber(exec, Inf);
+ return jsNumber(Inf);
}
-static JSValue numberConstructorMaxValue(ExecState* exec, JSValue, const Identifier&)
+static JSValue numberConstructorMaxValue(ExecState*, JSValue, const Identifier&)
{
- return jsNumber(exec, 1.7976931348623157E+308);
+ return jsNumber(1.7976931348623157E+308);
}
-static JSValue numberConstructorMinValue(ExecState* exec, JSValue, const Identifier&)
+static JSValue numberConstructorMinValue(ExecState*, JSValue, const Identifier&)
{
- return jsNumber(exec, 5E-324);
+ return jsNumber(5E-324);
}
// ECMA 15.7.1
@@ -104,7 +104,7 @@
{
NumberObject* object = new (exec) NumberObject(exec->lexicalGlobalObject()->numberObjectStructure());
double n = exec->argumentCount() ? exec->argument(0).toNumber(exec) : 0;
- object->setInternalValue(jsNumber(exec, n));
+ object->setInternalValue(jsNumber(n));
return JSValue::encode(object);
}
@@ -117,7 +117,7 @@
// ECMA 15.7.2
static EncodedJSValue JSC_HOST_CALL callNumberConstructor(ExecState* exec)
{
- return JSValue::encode(jsNumber(exec, !exec->argumentCount() ? 0 : exec->argument(0).toNumber(exec)));
+ return JSValue::encode(jsNumber(!exec->argumentCount() ? 0 : exec->argument(0).toNumber(exec)));
}
CallType NumberConstructor::getCallData(CallData& callData)