2010-10-25 Oliver Hunt <oliver@apple.com>
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Oct 2010 22:40:53 +0000 (22:40 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Oct 2010 22:40:53 +0000 (22:40 +0000)
        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: https://svn.webkit.org/repository/webkit/trunk@70496 268f45cc-cd09-0410-ab3c-d52691b4dbfc

83 files changed:
JavaScriptCore/API/JSValueRef.cpp
JavaScriptCore/ChangeLog
JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
JavaScriptCore/bytecompiler/NodesCodegen.cpp
JavaScriptCore/jit/JITArithmetic.cpp
JavaScriptCore/jit/JITArithmetic32_64.cpp
JavaScriptCore/jit/JITOpcodes.cpp
JavaScriptCore/jit/JITStubs.cpp
JavaScriptCore/jsc.cpp
JavaScriptCore/runtime/Arguments.cpp
JavaScriptCore/runtime/ArrayConstructor.cpp
JavaScriptCore/runtime/ArrayPrototype.cpp
JavaScriptCore/runtime/BooleanConstructor.cpp
JavaScriptCore/runtime/CachedTranscendentalFunction.h
JavaScriptCore/runtime/DateConstructor.cpp
JavaScriptCore/runtime/DateInstance.cpp
JavaScriptCore/runtime/DatePrototype.cpp
JavaScriptCore/runtime/Error.cpp
JavaScriptCore/runtime/ErrorConstructor.cpp
JavaScriptCore/runtime/FunctionConstructor.cpp
JavaScriptCore/runtime/FunctionPrototype.cpp
JavaScriptCore/runtime/JSArray.cpp
JavaScriptCore/runtime/JSByteArray.cpp
JavaScriptCore/runtime/JSByteArray.h
JavaScriptCore/runtime/JSFunction.cpp
JavaScriptCore/runtime/JSGlobalObject.cpp
JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
JavaScriptCore/runtime/JSNumberCell.h
JavaScriptCore/runtime/JSONObject.cpp
JavaScriptCore/runtime/JSString.cpp
JavaScriptCore/runtime/JSString.h
JavaScriptCore/runtime/JSValue.h
JavaScriptCore/runtime/LiteralParser.cpp
JavaScriptCore/runtime/MathObject.cpp
JavaScriptCore/runtime/NativeErrorConstructor.cpp
JavaScriptCore/runtime/NumberConstructor.cpp
JavaScriptCore/runtime/NumberPrototype.cpp
JavaScriptCore/runtime/ObjectConstructor.cpp
JavaScriptCore/runtime/Operations.cpp
JavaScriptCore/runtime/Operations.h
JavaScriptCore/runtime/PrototypeFunction.cpp
JavaScriptCore/runtime/RegExpConstructor.cpp
JavaScriptCore/runtime/RegExpObject.cpp
JavaScriptCore/runtime/StringConstructor.cpp
JavaScriptCore/runtime/StringPrototype.cpp
JavaScriptGlue/ChangeLog
JavaScriptGlue/JSUtils.cpp
JavaScriptGlue/UserObjectImp.cpp
WebCore/ChangeLog
WebCore/bindings/js/JSAudioConstructor.cpp
WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
WebCore/bindings/js/JSCoordinatesCustom.cpp
WebCore/bindings/js/JSDOMWindowCustom.cpp
WebCore/bindings/js/JSDeviceMotionEventCustom.cpp
WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp
WebCore/bindings/js/JSGeolocationCustom.cpp
WebCore/bindings/js/JSHTMLInputElementCustom.cpp
WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
WebCore/bindings/js/JSIDBKeyCustom.cpp
WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
WebCore/bindings/js/JSOptionConstructor.cpp
WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp
WebCore/bindings/js/JSSVGLengthCustom.cpp
WebCore/bindings/js/JSScriptProfileNodeCustom.cpp
WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
WebCore/bindings/js/JSWorkerContextCustom.cpp
WebCore/bindings/js/JSWorkerContextErrorHandler.cpp
WebCore/bindings/js/ScriptFunctionCall.cpp
WebCore/bindings/js/SerializedScriptValue.cpp
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bridge/c/c_instance.cpp
WebCore/bridge/c/c_utility.cpp
WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp
WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
WebCore/bridge/objc/objc_instance.mm
WebCore/bridge/objc/objc_utility.mm
WebCore/bridge/runtime_array.cpp
WebCore/bridge/runtime_method.cpp
WebKit/mac/ChangeLog
WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
WebKit/mac/Plugins/Hosted/ProxyInstance.mm
WebKit2/ChangeLog
WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.cpp

index c22e8d8..b8dd7c6 100644 (file)
@@ -219,7 +219,7 @@ JSValueRef JSValueMakeNumber(JSContextRef ctx, double value)
     if (isnan(value))
         value = NaN;
 
-    return toRef(exec, jsNumber(exec, value));
+    return toRef(exec, jsNumber(value));
 }
 
 JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string)
index a227f13..bca3265 100644 (file)
@@ -1,3 +1,186 @@
+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  David Tapuska  <dtapuska@rim.com>
 
         Reviewed by David Kilzer.
index f34c38c..87f0beb 100644 (file)
@@ -1080,10 +1080,10 @@ RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, double number)
     // FIXME: Our hash tables won't hold infinity, so we make a new JSNumberCell each time.
     // Later we can do the extra work to handle that like the other cases.
     if (number == HashTraits<double>::emptyValue() || HashTraits<double>::isDeletedValue(number))
-        return emitLoad(dst, jsNumber(globalData(), number));
+        return emitLoad(dst, jsNumber(number));
     JSValue& valueInMap = m_numberMap.add(number, JSValue()).first->second;
     if (!valueInMap)
-        valueInMap = jsNumber(globalData(), number);
+        valueInMap = jsNumber(number);
     return emitLoad(dst, valueInMap);
 }
 
index 449cae9..f282542 100644 (file)
@@ -208,7 +208,7 @@ RegisterID* ArrayNode::emitBytecode(BytecodeGenerator& generator, RegisterID* ds
     }
 
     if (m_elision) {
-        RegisterID* value = generator.emitLoad(0, jsNumber(generator.globalData(), m_elision + length));
+        RegisterID* value = generator.emitLoad(0, jsNumber(m_elision + length));
         generator.emitPutById(array.get(), generator.propertyNames().length, value);
     }
 
index d4fa12f..f0a049a 100644 (file)
@@ -888,7 +888,7 @@ void JIT::emit_op_mod(Instruction* currentInstruction)
     emitJumpSlowCaseIfNotImmediateInteger(regT0);
     emitJumpSlowCaseIfNotImmediateInteger(regT2);
 
-    addSlowCase(branchPtr(Equal, regT2, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0)))));
+    addSlowCase(branchPtr(Equal, regT2, ImmPtr(JSValue::encode(jsNumber(0)))));
     m_assembler.cdq();
     m_assembler.idivl_r(regT2);
     emitFastArithReTagImmediate(regT1, regT0);
index e53af77..8683c74 100644 (file)
@@ -1323,7 +1323,7 @@ void JIT::emit_op_mod(Instruction* currentInstruction)
     // If the remainder is zero and the dividend is negative, the result is -0.
     Jump storeResult1 = branchTest32(NonZero, X86Registers::edx);
     Jump storeResult2 = branchTest32(Zero, X86Registers::ebx, Imm32(0x80000000)); // not negative
-    emitStore(dst, jsNumber(m_globalData, -0.0));
+    emitStore(dst, jsNumber(-0.0));
     Jump end = jump();
 
     storeResult1.link(this);
index a468c18..0a9acfb 100644 (file)
@@ -711,7 +711,7 @@ void JIT::emit_op_jfalse(Instruction* currentInstruction)
     unsigned target = currentInstruction[2].u.operand;
     emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
 
-    addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0)))), target);
+    addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(0)))), target);
     Jump isNonZero = emitJumpIfImmediateInteger(regT0);
 
     addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsBoolean(false)))), target);
@@ -831,7 +831,7 @@ void JIT::emit_op_jtrue(Instruction* currentInstruction)
     unsigned target = currentInstruction[2].u.operand;
     emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
 
-    Jump isZero = branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0))));
+    Jump isZero = branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(0))));
     addJump(emitJumpIfImmediateInteger(regT0), target);
 
     addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsBoolean(true)))), target);
index 8340211..0715328 100644 (file)
@@ -1342,7 +1342,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_add)
 
     double left = 0.0, right;
     if (v1.getNumber(left) && v2.getNumber(right))
-        return JSValue::encode(jsNumber(stackFrame.globalData, left + right));
+        return JSValue::encode(jsNumber(left + right));
 
     // All other cases are pretty uncommon
     JSValue result = jsAddSlowCase(callFrame, v1, v2);
@@ -1357,7 +1357,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_pre_inc)
     JSValue v = stackFrame.args[0].jsValue();
 
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, v.toNumber(callFrame) + 1);
+    JSValue result = jsNumber(v.toNumber(callFrame) + 1);
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -1913,10 +1913,10 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_mul)
     double left;
     double right;
     if (src1.getNumber(left) && src2.getNumber(right))
-        return JSValue::encode(jsNumber(stackFrame.globalData, left * right));
+        return JSValue::encode(jsNumber(left * right));
 
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, src1.toNumber(callFrame) * src2.toNumber(callFrame));
+    JSValue result = jsNumber(src1.toNumber(callFrame) * src2.toNumber(callFrame));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -2475,10 +2475,10 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_sub)
     double left;
     double right;
     if (src1.getNumber(left) && src2.getNumber(right))
-        return JSValue::encode(jsNumber(stackFrame.globalData, left - right));
+        return JSValue::encode(jsNumber(left - right));
 
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, src1.toNumber(callFrame) - src2.toNumber(callFrame));
+    JSValue result = jsNumber(src1.toNumber(callFrame) - src2.toNumber(callFrame));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -2685,10 +2685,10 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_negate)
 
     double v;
     if (src.getNumber(v))
-        return JSValue::encode(jsNumber(stackFrame.globalData, -v));
+        return JSValue::encode(jsNumber(-v));
 
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, -src.toNumber(callFrame));
+    JSValue result = jsNumber(-src.toNumber(callFrame));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -2808,10 +2808,10 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_div)
     double left;
     double right;
     if (src1.getNumber(left) && src2.getNumber(right))
-        return JSValue::encode(jsNumber(stackFrame.globalData, left / right));
+        return JSValue::encode(jsNumber(left / right));
 
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, src1.toNumber(callFrame) / src2.toNumber(callFrame));
+    JSValue result = jsNumber(src1.toNumber(callFrame) / src2.toNumber(callFrame));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -2823,7 +2823,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_pre_dec)
     JSValue v = stackFrame.args[0].jsValue();
 
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, v.toNumber(callFrame) - 1);
+    JSValue result = jsNumber(v.toNumber(callFrame) - 1);
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -2891,7 +2891,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_post_inc)
     JSValue number = v.toJSNumber(callFrame);
     CHECK_FOR_EXCEPTION_AT_END();
 
-    callFrame->registers()[stackFrame.args[1].int32()] = jsNumber(stackFrame.globalData, number.uncheckedGetNumber() + 1);
+    callFrame->registers()[stackFrame.args[1].int32()] = jsNumber(number.uncheckedGetNumber() + 1);
     return JSValue::encode(number);
 }
 
@@ -3019,7 +3019,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_lshift)
     JSValue shift = stackFrame.args[1].jsValue();
 
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, (val.toInt32(callFrame)) << (shift.toUInt32(callFrame) & 0x1f));
+    JSValue result = jsNumber((val.toInt32(callFrame)) << (shift.toUInt32(callFrame) & 0x1f));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -3033,7 +3033,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_bitand)
 
     ASSERT(!src1.isInt32() || !src2.isInt32());
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, src1.toInt32(callFrame) & src2.toInt32(callFrame));
+    JSValue result = jsNumber(src1.toInt32(callFrame) & src2.toInt32(callFrame));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -3046,7 +3046,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_rshift)
     JSValue shift = stackFrame.args[1].jsValue();
 
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, (val.toInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));
+    JSValue result = jsNumber((val.toInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));
 
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
@@ -3060,7 +3060,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_bitnot)
 
     ASSERT(!src.isInt32());
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, ~src.toInt32(callFrame));
+    JSValue result = jsNumber(~src.toInt32(callFrame));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -3134,7 +3134,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_mod)
 
     CallFrame* callFrame = stackFrame.callFrame;
     double d = dividendValue.toNumber(callFrame);
-    JSValue result = jsNumber(stackFrame.globalData, fmod(d, divisorValue.toNumber(callFrame)));
+    JSValue result = jsNumber(fmod(d, divisorValue.toNumber(callFrame)));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -3160,7 +3160,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_post_dec)
     JSValue number = v.toJSNumber(callFrame);
     CHECK_FOR_EXCEPTION_AT_END();
 
-    callFrame->registers()[stackFrame.args[1].int32()] = jsNumber(stackFrame.globalData, number.uncheckedGetNumber() - 1);
+    callFrame->registers()[stackFrame.args[1].int32()] = jsNumber(number.uncheckedGetNumber() - 1);
     return JSValue::encode(number);
 }
 
@@ -3172,7 +3172,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_urshift)
     JSValue shift = stackFrame.args[1].jsValue();
 
     CallFrame* callFrame = stackFrame.callFrame;
-    JSValue result = jsNumber(stackFrame.globalData, (val.toUInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));
+    JSValue result = jsNumber((val.toUInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -3186,7 +3186,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_bitxor)
 
     CallFrame* callFrame = stackFrame.callFrame;
 
-    JSValue result = jsNumber(stackFrame.globalData, src1.toInt32(callFrame) ^ src2.toInt32(callFrame));
+    JSValue result = jsNumber(src1.toInt32(callFrame) ^ src2.toInt32(callFrame));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
@@ -3207,7 +3207,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_bitor)
 
     CallFrame* callFrame = stackFrame.callFrame;
 
-    JSValue result = jsNumber(stackFrame.globalData, src1.toInt32(callFrame) | src2.toInt32(callFrame));
+    JSValue result = jsNumber(src1.toInt32(callFrame) | src2.toInt32(callFrame));
     CHECK_FOR_EXCEPTION_AT_END();
     return JSValue::encode(result);
 }
index ba506e4..16647ec 100644 (file)
@@ -220,7 +220,7 @@ EncodedJSValue JSC_HOST_CALL functionRun(ExecState* exec)
     evaluate(globalObject->globalExec(), globalObject->globalScopeChain(), makeSource(script.data(), fileName));
     stopWatch.stop();
 
-    return JSValue::encode(jsNumber(globalObject->globalExec(), stopWatch.getElapsedMS()));
+    return JSValue::encode(jsNumber(stopWatch.getElapsedMS()));
 }
 
 EncodedJSValue JSC_HOST_CALL functionLoad(ExecState* exec)
index 5c5e522..39886a8 100644 (file)
@@ -191,7 +191,7 @@ bool Arguments::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa
     }
 
     if (propertyName == exec->propertyNames().length && LIKELY(!d->overrodeLength)) {
-        slot.setValue(jsNumber(exec, d->numArguments));
+        slot.setValue(jsNumber(d->numArguments));
         return true;
     }
 
@@ -222,7 +222,7 @@ bool Arguments::getOwnPropertyDescriptor(ExecState* exec, const Identifier& prop
     }
     
     if (propertyName == exec->propertyNames().length && LIKELY(!d->overrodeLength)) {
-        descriptor.setDescriptor(jsNumber(exec, d->numArguments), DontEnum);
+        descriptor.setDescriptor(jsNumber(d->numArguments), DontEnum);
         return true;
     }
     
index e5d0dac..632d466 100644 (file)
@@ -45,7 +45,7 @@ ArrayConstructor::ArrayConstructor(ExecState* exec, JSGlobalObject* globalObject
     putDirectWithoutTransition(exec->propertyNames().prototype, arrayPrototype, 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);
 
     // ES5
     putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().isArray, arrayConstructorIsArray), DontEnum);
index 6002ebb..8a19f77 100644 (file)
@@ -379,12 +379,12 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncPop(ExecState* exec)
     JSValue result;
     unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
     if (length == 0) {
-        putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(exec, length));
+        putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(length));
         result = jsUndefined();
     } else {
         result = thisObj->get(exec, length - 1);
         thisObj->deleteProperty(exec, length - 1);
-        putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(exec, length - 1));
+        putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(length - 1));
     }
     return JSValue::encode(result);
 }
@@ -395,7 +395,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncPush(ExecState* exec)
     if (isJSArray(&exec->globalData(), thisValue) && exec->argumentCount() == 1) {
         JSArray* array = asArray(thisValue);
         array->push(exec, exec->argument(0));
-        return JSValue::encode(jsNumber(exec, array->length()));
+        return JSValue::encode(jsNumber(array->length()));
     }
 
     JSObject* thisObj = thisValue.toThisObject(exec);
@@ -403,8 +403,8 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncPush(ExecState* exec)
     for (unsigned n = 0; n < exec->argumentCount(); n++)
         thisObj->put(exec, length + n, exec->argument(n));
     length += exec->argumentCount();
-    putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(exec, length));
-    return JSValue::encode(jsNumber(exec, length));
+    putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(length));
+    return JSValue::encode(jsNumber(length));
 }
 
 EncodedJSValue JSC_HOST_CALL arrayProtoFuncReverse(ExecState* exec)
@@ -438,7 +438,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncShift(ExecState* exec)
 
     unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
     if (length == 0) {
-        putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(exec, length));
+        putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(length));
         result = jsUndefined();
     } else {
         result = thisObj->get(exec, 0);
@@ -453,7 +453,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncShift(ExecState* exec)
             }
             thisObj->deleteProperty(exec, length - 1);
         }
-        putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(exec, length - 1));
+        putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(length - 1));
     }
     return JSValue::encode(result);
 }
@@ -600,7 +600,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState* exec)
     for (unsigned k = 0; k < additionalArgs; ++k)
         thisObj->put(exec, k + begin, exec->argument(k + 2));
 
-    putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(exec, length - deleteCount + additionalArgs));
+    putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(length - deleteCount + additionalArgs));
     return JSValue::encode(result);
 }
 
@@ -625,7 +625,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncUnShift(ExecState* exec)
     }
     for (unsigned k = 0; k < nrArgs; ++k)
         thisObj->put(exec, k, exec->argument(k));
-    JSValue result = jsNumber(exec, length + nrArgs);
+    JSValue result = jsNumber(length + nrArgs);
     putProperty(exec, thisObj, exec->propertyNames().length, result);
     return JSValue::encode(result);
 }
@@ -656,7 +656,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncFilter(ExecState* exec)
             JSValue v = array->getIndex(k);
             cachedCall.setThis(applyThis);
             cachedCall.setArgument(0, v);
-            cachedCall.setArgument(1, jsNumber(exec, k));
+            cachedCall.setArgument(1, jsNumber(k));
             cachedCall.setArgument(2, thisObj);
             
             JSValue result = cachedCall.call();
@@ -677,7 +677,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncFilter(ExecState* exec)
         MarkedArgumentBuffer eachArguments;
 
         eachArguments.append(v);
-        eachArguments.append(jsNumber(exec, k));
+        eachArguments.append(jsNumber(k));
         eachArguments.append(thisObj);
 
         JSValue result = call(exec, function, callType, callData, applyThis, eachArguments);
@@ -714,7 +714,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncMap(ExecState* exec)
 
             cachedCall.setThis(applyThis);
             cachedCall.setArgument(0, array->getIndex(k));
-            cachedCall.setArgument(1, jsNumber(exec, k));
+            cachedCall.setArgument(1, jsNumber(k));
             cachedCall.setArgument(2, thisObj);
 
             resultArray->JSArray::put(exec, k, cachedCall.call());
@@ -730,7 +730,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncMap(ExecState* exec)
         MarkedArgumentBuffer eachArguments;
 
         eachArguments.append(v);
-        eachArguments.append(jsNumber(exec, k));
+        eachArguments.append(jsNumber(k));
         eachArguments.append(thisObj);
 
         JSValue result = call(exec, function, callType, callData, applyThis, eachArguments);
@@ -771,7 +771,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncEvery(ExecState* exec)
             
             cachedCall.setThis(applyThis);
             cachedCall.setArgument(0, array->getIndex(k));
-            cachedCall.setArgument(1, jsNumber(exec, k));
+            cachedCall.setArgument(1, jsNumber(k));
             cachedCall.setArgument(2, thisObj);
             JSValue result = cachedCall.call();
             if (!result.toBoolean(cachedCall.newCallFrame(exec)))
@@ -787,7 +787,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncEvery(ExecState* exec)
         MarkedArgumentBuffer eachArguments;
 
         eachArguments.append(slot.getValue(exec, k));
-        eachArguments.append(jsNumber(exec, k));
+        eachArguments.append(jsNumber(k));
         eachArguments.append(thisObj);
 
         bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments).toBoolean(exec);
@@ -825,7 +825,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncForEach(ExecState* exec)
 
             cachedCall.setThis(applyThis);
             cachedCall.setArgument(0, array->getIndex(k));
-            cachedCall.setArgument(1, jsNumber(exec, k));
+            cachedCall.setArgument(1, jsNumber(k));
             cachedCall.setArgument(2, thisObj);
 
             cachedCall.call();
@@ -838,7 +838,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncForEach(ExecState* exec)
 
         MarkedArgumentBuffer eachArguments;
         eachArguments.append(slot.getValue(exec, k));
-        eachArguments.append(jsNumber(exec, k));
+        eachArguments.append(jsNumber(k));
         eachArguments.append(thisObj);
 
         call(exec, function, callType, callData, applyThis, eachArguments);
@@ -872,7 +872,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSome(ExecState* exec)
             
             cachedCall.setThis(applyThis);
             cachedCall.setArgument(0, array->getIndex(k));
-            cachedCall.setArgument(1, jsNumber(exec, k));
+            cachedCall.setArgument(1, jsNumber(k));
             cachedCall.setArgument(2, thisObj);
             JSValue result = cachedCall.call();
             if (result.toBoolean(cachedCall.newCallFrame(exec)))
@@ -886,7 +886,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSome(ExecState* exec)
 
         MarkedArgumentBuffer eachArguments;
         eachArguments.append(slot.getValue(exec, k));
-        eachArguments.append(jsNumber(exec, k));
+        eachArguments.append(jsNumber(k));
         eachArguments.append(thisObj);
 
         bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments).toBoolean(exec);
@@ -945,7 +945,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncReduce(ExecState* exec)
             else
                 break; // length has been made unsafe while we enumerate fallback to slow path
             cachedCall.setArgument(1, v);
-            cachedCall.setArgument(2, jsNumber(exec, i));
+            cachedCall.setArgument(2, jsNumber(i));
             cachedCall.setArgument(3, array);
             rv = cachedCall.call();
         }
@@ -961,7 +961,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncReduce(ExecState* exec)
         MarkedArgumentBuffer eachArguments;
         eachArguments.append(rv);
         eachArguments.append(prop);
-        eachArguments.append(jsNumber(exec, i));
+        eachArguments.append(jsNumber(i));
         eachArguments.append(thisObj);
         
         rv = call(exec, function, callType, callData, jsNull(), eachArguments);
@@ -1013,7 +1013,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncReduceRight(ExecState* exec)
             if (UNLIKELY(!array->canGetIndex(idx)))
                 break; // length has been made unsafe while we enumerate fallback to slow path
             cachedCall.setArgument(1, array->getIndex(idx));
-            cachedCall.setArgument(2, jsNumber(exec, idx));
+            cachedCall.setArgument(2, jsNumber(idx));
             cachedCall.setArgument(3, array);
             rv = cachedCall.call();
         }
@@ -1030,7 +1030,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncReduceRight(ExecState* exec)
         MarkedArgumentBuffer eachArguments;
         eachArguments.append(rv);
         eachArguments.append(prop);
-        eachArguments.append(jsNumber(exec, idx));
+        eachArguments.append(jsNumber(idx));
         eachArguments.append(thisObj);
         
         rv = call(exec, function, callType, callData, jsNull(), eachArguments);
@@ -1053,10 +1053,10 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncIndexOf(ExecState* exec)
         if (!e)
             continue;
         if (JSValue::strictEqual(exec, searchElement, e))
-            return JSValue::encode(jsNumber(exec, index));
+            return JSValue::encode(jsNumber(index));
     }
 
-    return JSValue::encode(jsNumber(exec, -1));
+    return JSValue::encode(jsNumber(-1));
 }
 
 EncodedJSValue JSC_HOST_CALL arrayProtoFuncLastIndexOf(ExecState* exec)
@@ -1067,7 +1067,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncLastIndexOf(ExecState* exec)
 
     unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
     if (!length)
-        return JSValue::encode(jsNumber(exec, -1));
+        return JSValue::encode(jsNumber(-1));
 
     unsigned index = length - 1;
     JSValue fromValue = exec->argument(1);
@@ -1076,7 +1076,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncLastIndexOf(ExecState* exec)
         if (fromDouble < 0) {
             fromDouble += length;
             if (fromDouble < 0)
-                return JSValue::encode(jsNumber(exec, -1));
+                return JSValue::encode(jsNumber(-1));
         }
         if (fromDouble < length)
             index = static_cast<unsigned>(fromDouble);
@@ -1089,10 +1089,10 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncLastIndexOf(ExecState* exec)
         if (!e)
             continue;
         if (JSValue::strictEqual(exec, searchElement, e))
-            return JSValue::encode(jsNumber(exec, index));
+            return JSValue::encode(jsNumber(index));
     } while (index--);
 
-    return JSValue::encode(jsNumber(exec, -1));
+    return JSValue::encode(jsNumber(-1));
 }
 
 } // namespace JSC
index 953bddc..0167e03 100644 (file)
@@ -34,7 +34,7 @@ BooleanConstructor::BooleanConstructor(ExecState* exec, JSGlobalObject* globalOb
     putDirectWithoutTransition(exec->propertyNames().prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
 
     // no. of arguments for constructor
-    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontDelete | DontEnum);
+    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
 }
 
 // ECMA 15.6.2
index 04f7f62..67c7af8 100644 (file)
@@ -56,18 +56,18 @@ public:
             fastFree(m_cache);
     }
 
-    JSValue operator() (ExecState* exec, double operand)
+    JSValue operator() (double operand)
     {
         if (UNLIKELY(!m_cache))
             initialize();
         CacheEntry* entry = &m_cache[hash(operand)];
 
         if (entry->operand == operand)
-            return jsDoubleNumber(exec, entry->result);
+            return jsDoubleNumber(entry->result);
         double result = orignalFunction(operand);
         entry->operand = operand;
         entry->result = result;
-        return jsDoubleNumber(exec, result);
+        return jsDoubleNumber(result);
     }
 
 private:
index 49e0405..dcbe12d 100644 (file)
@@ -67,7 +67,7 @@ DateConstructor::DateConstructor(ExecState* exec, JSGlobalObject* globalObject,
       putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 7, exec->propertyNames().UTC, dateUTC), DontEnum);
       putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().now, dateNow), DontEnum);
 
-      putDirectWithoutTransition(exec->propertyNames().length, jsNumber(exec, 7), ReadOnly | DontEnum | DontDelete);
+      putDirectWithoutTransition(exec->propertyNames().length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
 }
 
 // ECMA 15.9.3
@@ -159,12 +159,12 @@ CallType DateConstructor::getCallData(CallData& callData)
 
 static EncodedJSValue JSC_HOST_CALL dateParse(ExecState* exec)
 {
-    return JSValue::encode(jsNumber(exec, parseDate(exec, exec->argument(0).toString(exec))));
+    return JSValue::encode(jsNumber(parseDate(exec, exec->argument(0).toString(exec))));
 }
 
-static EncodedJSValue JSC_HOST_CALL dateNow(ExecState* exec)
+static EncodedJSValue JSC_HOST_CALL dateNow(ExecState*)
 {
-    return JSValue::encode(jsNumber(exec, jsCurrentTime()));
+    return JSValue::encode(jsNumber(jsCurrentTime()));
 }
 
 static EncodedJSValue JSC_HOST_CALL dateUTC(ExecState* exec) 
@@ -186,7 +186,7 @@ static EncodedJSValue JSC_HOST_CALL dateUTC(ExecState* exec)
             || (n >= 5 && isnan(doubleArguments[4]))
             || (n >= 6 && isnan(doubleArguments[5]))
             || (n >= 7 && isnan(doubleArguments[6])))
-        return JSValue::encode(jsNaN(exec));
+        return JSValue::encode(jsNaN());
 
     GregorianDateTime t;
     int year = JSC::toInt32(doubleArguments[0]);
@@ -197,7 +197,7 @@ static EncodedJSValue JSC_HOST_CALL dateUTC(ExecState* exec)
     t.minute = JSC::toInt32(doubleArguments[4]);
     t.second = JSC::toInt32(doubleArguments[5]);
     double ms = (n >= 7) ? doubleArguments[6] : 0;
-    return JSValue::encode(jsNumber(exec, timeClip(gregorianDateTimeToMS(exec, t, ms, true))));
+    return JSValue::encode(jsNumber(timeClip(gregorianDateTimeToMS(exec, t, ms, true))));
 }
 
 } // namespace JSC
index b43b183..8562e2d 100644 (file)
@@ -34,22 +34,22 @@ namespace JSC {
 
 const ClassInfo DateInstance::info = {"Date", 0, 0, 0};
 
-DateInstance::DateInstance(ExecState* exec, NonNullPassRefPtr<Structure> structure)
+DateInstance::DateInstance(ExecState*, NonNullPassRefPtr<Structure> structure)
     : JSWrapperObject(structure)
 {
-    setInternalValue(jsNaN(exec));
+    setInternalValue(jsNaN());
 }
 
-DateInstance::DateInstance(ExecState* exec, NonNullPassRefPtr<Structure> structure, double time)
+DateInstance::DateInstance(ExecState*, NonNullPassRefPtr<Structure> structure, double time)
     : JSWrapperObject(structure)
 {
-    setInternalValue(jsNumber(exec, timeClip(time)));
+    setInternalValue(jsNumber(timeClip(time)));
 }
 
 DateInstance::DateInstance(ExecState* exec, double time)
     : JSWrapperObject(exec->lexicalGlobalObject()->dateStructure())
 {
-    setInternalValue(jsNumber(exec, timeClip(time)));
+    setInternalValue(jsNumber(timeClip(time)));
 }
 
 const GregorianDateTime* DateInstance::calculateGregorianDateTime(ExecState* exec) const
index c755ee9..085cb33 100644 (file)
@@ -585,8 +585,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetFullYear(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, 1900 + gregorianDateTime->year));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(1900 + gregorianDateTime->year));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCFullYear(ExecState* exec)
@@ -599,8 +599,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCFullYear(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, 1900 + gregorianDateTime->year));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(1900 + gregorianDateTime->year));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState* exec)
@@ -631,8 +631,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMonth(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->month));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->month));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMonth(ExecState* exec)
@@ -645,8 +645,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMonth(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->month));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->month));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetDate(ExecState* exec)
@@ -659,8 +659,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetDate(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->monthDay));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->monthDay));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCDate(ExecState* exec)
@@ -673,8 +673,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCDate(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->monthDay));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->monthDay));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetDay(ExecState* exec)
@@ -687,8 +687,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetDay(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->weekDay));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->weekDay));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCDay(ExecState* exec)
@@ -701,8 +701,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCDay(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->weekDay));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->weekDay));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetHours(ExecState* exec)
@@ -715,8 +715,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetHours(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->hour));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->hour));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCHours(ExecState* exec)
@@ -729,8 +729,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCHours(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->hour));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->hour));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMinutes(ExecState* exec)
@@ -743,8 +743,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMinutes(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->minute));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->minute));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMinutes(ExecState* exec)
@@ -757,8 +757,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMinutes(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->minute));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->minute));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetSeconds(ExecState* exec)
@@ -771,8 +771,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetSeconds(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->second));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->second));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCSeconds(ExecState* exec)
@@ -785,8 +785,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCSeconds(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->second));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(gregorianDateTime->second));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMilliSeconds(ExecState* exec)
@@ -798,11 +798,11 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMilliSeconds(ExecState* exec)
     DateInstance* thisDateObj = asDateInstance(thisValue); 
     double milli = thisDateObj->internalNumber();
     if (isnan(milli))
-        return JSValue::encode(jsNaN(exec));
+        return JSValue::encode(jsNaN());
 
     double secs = floor(milli / msPerSecond);
     double ms = milli - secs * msPerSecond;
-    return JSValue::encode(jsNumber(exec, ms));
+    return JSValue::encode(jsNumber(ms));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMilliseconds(ExecState* exec)
@@ -814,11 +814,11 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMilliseconds(ExecState* exec)
     DateInstance* thisDateObj = asDateInstance(thisValue); 
     double milli = thisDateObj->internalNumber();
     if (isnan(milli))
-        return JSValue::encode(jsNaN(exec));
+        return JSValue::encode(jsNaN());
 
     double secs = floor(milli / msPerSecond);
     double ms = milli - secs * msPerSecond;
-    return JSValue::encode(jsNumber(exec, ms));
+    return JSValue::encode(jsNumber(ms));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState* exec)
@@ -831,8 +831,8 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, -gregorianDateTime->utcOffset / minutesPerHour));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(-gregorianDateTime->utcOffset / minutesPerHour));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncSetTime(ExecState* exec)
@@ -844,7 +844,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncSetTime(ExecState* exec)
     DateInstance* thisDateObj = asDateInstance(thisValue); 
 
     double milli = timeClip(exec->argument(0).toNumber(exec));
-    JSValue result = jsNumber(exec, milli);
+    JSValue result = jsNumber(milli);
     thisDateObj->setInternalValue(result);
     return JSValue::encode(result);
 }
@@ -859,7 +859,7 @@ static EncodedJSValue setNewValueFromTimeArgs(ExecState* exec, int numArgsToUse,
     double milli = thisDateObj->internalNumber();
     
     if (!exec->argumentCount() || isnan(milli)) {
-        JSValue result = jsNaN(exec);
+        JSValue result = jsNaN();
         thisDateObj->setInternalValue(result);
         return JSValue::encode(result);
     }
@@ -871,17 +871,17 @@ static EncodedJSValue setNewValueFromTimeArgs(ExecState* exec, int numArgsToUse,
         ? thisDateObj->gregorianDateTimeUTC(exec)
         : thisDateObj->gregorianDateTime(exec);
     if (!other)
-        return JSValue::encode(jsNaN(exec));
+        return JSValue::encode(jsNaN());
 
     GregorianDateTime gregorianDateTime;
     gregorianDateTime.copyFrom(*other);
     if (!fillStructuresUsingTimeArgs(exec, numArgsToUse, &ms, &gregorianDateTime)) {
-        JSValue result = jsNaN(exec);
+        JSValue result = jsNaN();
         thisDateObj->setInternalValue(result);
         return JSValue::encode(result);
     } 
     
-    JSValue result = jsNumber(exec, gregorianDateTimeToMS(exec, gregorianDateTime, ms, inputIsUTC));
+    JSValue result = jsNumber(gregorianDateTimeToMS(exec, gregorianDateTime, ms, inputIsUTC));
     thisDateObj->setInternalValue(result);
     return JSValue::encode(result);
 }
@@ -894,7 +894,7 @@ static EncodedJSValue setNewValueFromDateArgs(ExecState* exec, int numArgsToUse,
 
     DateInstance* thisDateObj = asDateInstance(thisValue);
     if (!exec->argumentCount()) {
-        JSValue result = jsNaN(exec);
+        JSValue result = jsNaN();
         thisDateObj->setInternalValue(result);
         return JSValue::encode(result);
     }      
@@ -911,17 +911,17 @@ static EncodedJSValue setNewValueFromDateArgs(ExecState* exec, int numArgsToUse,
             ? thisDateObj->gregorianDateTimeUTC(exec)
             : thisDateObj->gregorianDateTime(exec);
         if (!other)
-            return JSValue::encode(jsNaN(exec));
+            return JSValue::encode(jsNaN());
         gregorianDateTime.copyFrom(*other);
     }
     
     if (!fillStructuresUsingDateArgs(exec, numArgsToUse, &ms, &gregorianDateTime)) {
-        JSValue result = jsNaN(exec);
+        JSValue result = jsNaN();
         thisDateObj->setInternalValue(result);
         return JSValue::encode(result);
     } 
            
-    JSValue result = jsNumber(exec, gregorianDateTimeToMS(exec, gregorianDateTime, ms, inputIsUTC));
+    JSValue result = jsNumber(gregorianDateTimeToMS(exec, gregorianDateTime, ms, inputIsUTC));
     thisDateObj->setInternalValue(result);
     return JSValue::encode(result);
 }
@@ -1018,7 +1018,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec)
 
     DateInstance* thisDateObj = asDateInstance(thisValue);     
     if (!exec->argumentCount()) { 
-        JSValue result = jsNaN(exec);
+        JSValue result = jsNaN();
         thisDateObj->setInternalValue(result);
         return JSValue::encode(result);
     }
@@ -1040,13 +1040,13 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec)
     
     double year = exec->argument(0).toIntegerPreserveNaN(exec);
     if (!isfinite(year)) {
-        JSValue result = jsNaN(exec);
+        JSValue result = jsNaN();
         thisDateObj->setInternalValue(result);
         return JSValue::encode(result);
     }
             
     gregorianDateTime.year = toInt32((year > 99 || year < 0) ? year - 1900 : year);
-    JSValue result = jsNumber(exec, gregorianDateTimeToMS(exec, gregorianDateTime, ms, false));
+    JSValue result = jsNumber(gregorianDateTimeToMS(exec, gregorianDateTime, ms, false));
     thisDateObj->setInternalValue(result);
     return JSValue::encode(result);
 }
@@ -1061,10 +1061,10 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetYear(ExecState* exec)
 
     const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTime(exec);
     if (!gregorianDateTime)
-        return JSValue::encode(jsNaN(exec));
+        return JSValue::encode(jsNaN());
 
     // NOTE: IE returns the full year even in getYear.
-    return JSValue::encode(jsNumber(exec, gregorianDateTime->year));
+    return JSValue::encode(jsNumber(gregorianDateTime->year));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncToJSON(ExecState* exec)
index 6b27d7d..fd97beb 100644 (file)
@@ -125,19 +125,19 @@ static void addErrorSourceInfo(JSGlobalData* globalData, JSObject* error, int li
     const UString& sourceURL = source.provider()->url();
 
     if (line != -1)
-        error->putWithAttributes(globalData, Identifier(globalData, linePropertyName), jsNumber(globalData, line), ReadOnly | DontDelete);
+        error->putWithAttributes(globalData, Identifier(globalData, linePropertyName), jsNumber(line), ReadOnly | DontDelete);
     if (sourceID != -1)
-        error->putWithAttributes(globalData, Identifier(globalData, sourceIdPropertyName), jsNumber(globalData, (double)sourceID), ReadOnly | DontDelete);
+        error->putWithAttributes(globalData, Identifier(globalData, sourceIdPropertyName), jsNumber((double)sourceID), ReadOnly | DontDelete);
     if (!sourceURL.isNull())
         error->putWithAttributes(globalData, Identifier(globalData, sourceURLPropertyName), jsString(globalData, sourceURL), ReadOnly | DontDelete);
 }
 
 static void addErrorDivotInfo(JSGlobalData* globalData, JSObject* error, int divotPoint, int startOffset, int endOffset, bool withCaret)
 {
-    error->putWithAttributes(globalData, Identifier(globalData, expressionBeginOffsetPropertyName), jsNumber(globalData, divotPoint - startOffset), ReadOnly | DontDelete);
-    error->putWithAttributes(globalData, Identifier(globalData, expressionEndOffsetPropertyName), jsNumber(globalData, divotPoint + endOffset), ReadOnly | DontDelete);
+    error->putWithAttributes(globalData, Identifier(globalData, expressionBeginOffsetPropertyName), jsNumber(divotPoint - startOffset), ReadOnly | DontDelete);
+    error->putWithAttributes(globalData, Identifier(globalData, expressionEndOffsetPropertyName), jsNumber(divotPoint + endOffset), ReadOnly | DontDelete);
     if (withCaret)
-        error->putWithAttributes(globalData, Identifier(globalData, expressionCaretOffsetPropertyName), jsNumber(globalData, divotPoint), ReadOnly | DontDelete);
+        error->putWithAttributes(globalData, Identifier(globalData, expressionCaretOffsetPropertyName), jsNumber(divotPoint), ReadOnly | DontDelete);
 }
 
 JSObject* addErrorInfo(JSGlobalData* globalData, JSObject* error, int line, const SourceCode& source)
index a0874d4..4326a4d 100644 (file)
@@ -34,7 +34,7 @@ ErrorConstructor::ErrorConstructor(ExecState* exec, JSGlobalObject* globalObject
 {
     // ECMA 15.11.3.1 Error.prototype
     putDirectWithoutTransition(exec->propertyNames().prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(exec, 1), DontDelete | ReadOnly | DontEnum);
+    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
 }
 
 // ECMA 15.9.3
index bc2158e..45b4802 100644 (file)
@@ -43,7 +43,7 @@ FunctionConstructor::FunctionConstructor(ExecState* exec, JSGlobalObject* global
     putDirectWithoutTransition(exec->propertyNames().prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);
 
     // Number of arguments for constructor
-    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontDelete | DontEnum);
+    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
 }
 
 static EncodedJSValue JSC_HOST_CALL constructWithFunctionConstructor(ExecState* exec)
index ef42cdc..cd7739d 100644 (file)
@@ -41,7 +41,7 @@ static EncodedJSValue JSC_HOST_CALL functionProtoFuncCall(ExecState*);
 FunctionPrototype::FunctionPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure)
     : InternalFunction(&exec->globalData(), globalObject, structure, exec->propertyNames().nullIdentifier)
 {
-    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(exec, 0), DontDelete | ReadOnly | DontEnum);
+    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
 }
 
 void FunctionPrototype::addFunctionProperties(ExecState* exec, JSGlobalObject* globalObject, Structure* prototypeFunctionStructure, NativeFunctionWrapper** callFunction, NativeFunctionWrapper** applyFunction)
index dae807f..f9384ec 100644 (file)
@@ -278,7 +278,7 @@ bool JSArray::getOwnPropertySlot(ExecState* exec, unsigned i, PropertySlot& slot
 bool JSArray::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
 {
     if (propertyName == exec->propertyNames().length) {
-        slot.setValue(jsNumber(exec, length()));
+        slot.setValue(jsNumber(length()));
         return true;
     }
 
@@ -293,7 +293,7 @@ bool JSArray::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName
 bool JSArray::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 {
     if (propertyName == exec->propertyNames().length) {
-        descriptor.setDescriptor(jsNumber(exec, length()), DontDelete | DontEnum);
+        descriptor.setDescriptor(jsNumber(length()), DontDelete | DontEnum);
         return true;
     }
 
index 88519cf..6af9d75 100644 (file)
@@ -40,7 +40,7 @@ JSByteArray::JSByteArray(ExecState* exec, NonNullPassRefPtr<Structure> structure
     , m_storage(storage)
     , m_classInfo(classInfo)
 {
-    putDirect(exec->globalData().propertyNames->length, jsNumber(exec, m_storage->length()), ReadOnly | DontDelete);
+    putDirect(exec->globalData().propertyNames->length, jsNumber(m_storage->length()), ReadOnly | DontDelete);
 }
 
 #if !ASSERT_DISABLED
index e9a6c64..2ea9d29 100644 (file)
@@ -36,10 +36,10 @@ namespace JSC {
         friend class JSGlobalData;
     public:
         bool canAccessIndex(unsigned i) { return i < m_storage->length(); }
-        JSValue getIndex(ExecState* exec, unsigned i)
+        JSValue getIndex(ExecState*, unsigned i)
         {
             ASSERT(canAccessIndex(i));
-            return jsNumber(exec, m_storage->data()[i]);
+            return jsNumber(m_storage->data()[i]);
         }
 
         void setIndex(unsigned i, int value)
index fdaa509..0697fc3 100644 (file)
@@ -74,7 +74,7 @@ JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPas
     , m_scopeChain(globalObject->globalScopeChain())
 {
     putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
-    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
+    putDirect(exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
 }
 #endif
 
@@ -87,7 +87,7 @@ JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPas
 {
     putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
 #if ENABLE(JIT)
-    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
+    putDirect(exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
 #else
     UNUSED_PARAM(length);
     UNUSED_PARAM(func);
@@ -192,11 +192,11 @@ JSValue JSFunction::callerGetter(ExecState* exec, JSValue slotBase, const Identi
     return exec->interpreter()->retrieveCaller(exec, thisObj);
 }
 
-JSValue JSFunction::lengthGetter(ExecState* exec, JSValue slotBase, const Identifier&)
+JSValue JSFunction::lengthGetter(ExecState*, JSValue slotBase, const Identifier&)
 {
     JSFunction* thisObj = asFunction(slotBase);
     ASSERT(!thisObj->isHostFunction());
-    return jsNumber(exec, thisObj->jsExecutable()->parameterCount());
+    return jsNumber(thisObj->jsExecutable()->parameterCount());
 }
 
 bool JSFunction::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
@@ -266,7 +266,7 @@ bool JSFunction::getOwnPropertyDescriptor(ExecState* exec, const Identifier& pro
     }
     
     if (propertyName == exec->propertyNames().length) {
-        descriptor.setDescriptor(jsNumber(exec, jsExecutable()->parameterCount()), ReadOnly | DontEnum | DontDelete);
+        descriptor.setDescriptor(jsNumber(jsExecutable()->parameterCount()), ReadOnly | DontEnum | DontDelete);
         return true;
     }
     
index 5a63774..a8fb7bf 100644 (file)
@@ -301,8 +301,8 @@ void JSGlobalObject::reset(JSValue prototype)
     // Set global values.
     GlobalPropertyInfo staticGlobals[] = {
         GlobalPropertyInfo(Identifier(exec, "Math"), new (exec) MathObject(exec, this, MathObject::createStructure(d()->objectPrototype)), DontEnum | DontDelete),
-        GlobalPropertyInfo(Identifier(exec, "NaN"), jsNaN(exec), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(Identifier(exec, "Infinity"), jsNumber(exec, Inf), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(Identifier(exec, "NaN"), jsNaN(), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(Identifier(exec, "Infinity"), jsNumber(Inf), DontEnum | DontDelete | ReadOnly),
         GlobalPropertyInfo(Identifier(exec, "undefined"), jsUndefined(), DontEnum | DontDelete | ReadOnly),
         GlobalPropertyInfo(Identifier(exec, "JSON"), new (exec) JSONObject(this, JSONObject::createStructure(d()->objectPrototype)), DontEnum | DontDelete)
     };
index ed06fa5..d146e87 100644 (file)
@@ -464,7 +464,7 @@ EncodedJSValue JSC_HOST_CALL globalFuncParseInt(ExecState* exec)
     int32_t radix = exec->argument(1).toInt32(exec);
 
     if (radix != 0 && radix != 10)
-        return JSValue::encode(jsNumber(exec, parseInt(value.toString(exec), radix)));
+        return JSValue::encode(jsNumber(parseInt(value.toString(exec), radix)));
 
     if (value.isInt32())
         return JSValue::encode(value);
@@ -472,18 +472,18 @@ EncodedJSValue JSC_HOST_CALL globalFuncParseInt(ExecState* exec)
     if (value.isDouble()) {
         double d = value.asDouble();
         if (isfinite(d))
-            return JSValue::encode(jsNumber(exec, (d > 0) ? floor(d) : ceil(d)));
+            return JSValue::encode(jsNumber((d > 0) ? floor(d) : ceil(d)));
         if (isnan(d) || isinf(d))
-            return JSValue::encode(jsNaN(exec));
-        return JSValue::encode(jsNumber(exec, 0));
+            return JSValue::encode(jsNaN());
+        return JSValue::encode(jsNumber(0));
     }
 
-    return JSValue::encode(jsNumber(exec, parseInt(value.toString(exec), radix)));
+    return JSValue::encode(jsNumber(parseInt(value.toString(exec), radix)));
 }
 
 EncodedJSValue JSC_HOST_CALL globalFuncParseFloat(ExecState* exec)
 {
-    return JSValue::encode(jsNumber(exec, parseFloat(exec->argument(0).toString(exec))));
+    return JSValue::encode(jsNumber(parseFloat(exec->argument(0).toString(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL globalFuncIsNaN(ExecState* exec)
index a25c531..0040067 100644 (file)
@@ -36,81 +36,60 @@ namespace JSC {
     extern const double Inf;
 
 #if USE(JSVALUE64)
-    ALWAYS_INLINE JSValue::JSValue(EncodeAsDoubleTag, ExecState*, double d)
+    ALWAYS_INLINE JSValue::JSValue(EncodeAsDoubleTag, double d)
     {
         *this = JSImmediate::fromNumberOutsideIntegerRange(d);
     }
 
-    inline JSValue::JSValue(ExecState*, double d)
+    inline JSValue::JSValue(double d)
     {
         JSValue v = JSImmediate::from(d);
         ASSERT(v);
         *this = v;
     }
 
-    inline JSValue::JSValue(ExecState*, int i)
+    inline JSValue::JSValue(int i)
     {
         JSValue v = JSImmediate::from(i);
         ASSERT(v);
         *this = v;
     }
 
-    inline JSValue::JSValue(ExecState*, unsigned i)
+    inline JSValue::JSValue(unsigned i)
     {
         JSValue v = JSImmediate::from(i);
         ASSERT(v);
         *this = v;
     }
 
-    inline JSValue::JSValue(ExecState*, long i)
+    inline JSValue::JSValue(long i)
     {
         JSValue v = JSImmediate::from(i);
         ASSERT(v);
         *this = v;
     }
 
-    inline JSValue::JSValue(ExecState*, unsigned long i)
+    inline JSValue::JSValue(unsigned long i)
     {
         JSValue v = JSImmediate::from(i);
         ASSERT(v);
         *this = v;
     }
 
-    inline JSValue::JSValue(ExecState*, long long i)
+    inline JSValue::JSValue(long long i)
     {
         JSValue v = JSImmediate::from(static_cast<double>(i));
         ASSERT(v);
         *this = v;
     }
 
-    inline JSValue::JSValue(ExecState*, unsigned long long i)
+    inline JSValue::JSValue(unsigned long long i)
     {
         JSValue v = JSImmediate::from(static_cast<double>(i));
         ASSERT(v);
         *this = v;
     }
 
-    inline JSValue::JSValue(JSGlobalData*, double d)
-    {
-        JSValue v = JSImmediate::from(d);
-        ASSERT(v);
-        *this = v;
-    }
-
-    inline JSValue::JSValue(JSGlobalData*, int i)
-    {
-        JSValue v = JSImmediate::from(i);
-        ASSERT(v);
-        *this = v;
-    }
-
-    inline JSValue::JSValue(JSGlobalData*, unsigned i)
-    {
-        JSValue v = JSImmediate::from(i);
-        ASSERT(v);
-        *this = v;
-    }
-
     inline bool JSValue::isDouble() const
     {
         return JSImmediate::isDouble(asValue());
@@ -136,45 +115,40 @@ namespace JSC {
 
 #if USE(JSVALUE64)
 
-    inline JSValue::JSValue(ExecState*, char i)
+    inline JSValue::JSValue(char i)
     {
         ASSERT(JSImmediate::from(i));
         *this = JSImmediate::from(i);
     }
 
-    inline JSValue::JSValue(ExecState*, unsigned char i)
+    inline JSValue::JSValue(unsigned char i)
     {
         ASSERT(JSImmediate::from(i));
         *this = JSImmediate::from(i);
     }
 
-    inline JSValue::JSValue(ExecState*, short i)
+    inline JSValue::JSValue(short i)
     {
         ASSERT(JSImmediate::from(i));
         *this = JSImmediate::from(i);
     }
 
-    inline JSValue::JSValue(ExecState*, unsigned short i)
+    inline JSValue::JSValue(unsigned short i)
     {
         ASSERT(JSImmediate::from(i));
         *this = JSImmediate::from(i);
     }
 
-    inline JSValue jsNaN(ExecState* exec)
-    {
-        return jsNumber(exec, NaN);
-    }
-
-    inline JSValue jsNaN(JSGlobalData* globalData)
+    inline JSValue jsNaN()
     {
-        return jsNumber(globalData, NaN);
+        return jsNumber(NaN);
     }
 
     // --- JSValue inlines ----------------------------
 
     ALWAYS_INLINE JSValue JSValue::toJSNumber(ExecState* exec) const
     {
-        return isNumber() ? asValue() : jsNumber(exec, this->toNumber(exec));
+        return isNumber() ? asValue() : jsNumber(this->toNumber(exec));
     }
 
     inline bool JSValue::getNumber(double &result) const
index bbdcbd4..b5477a1 100644 (file)
@@ -133,7 +133,7 @@ static inline JSValue unwrapBoxedPrimitive(ExecState* exec, JSValue value)
         return value;
     JSObject* object = asObject(value);
     if (object->inherits(&NumberObject::info))
-        return jsNumber(exec, object->toNumber(exec));
+        return jsNumber(object->toNumber(exec));
     if (object->inherits(&StringObject::info))
         return jsString(exec, object->toString(exec));
     if (object->inherits(&BooleanObject::info))
@@ -189,7 +189,7 @@ JSValue PropertyNameForFunctionCall::value(ExecState* exec) const
         if (m_identifier)
             m_value = jsString(exec, m_identifier->ustring());
         else
-            m_value = jsNumber(exec, m_number);
+            m_value = jsNumber(m_number);
     }
     return m_value;
 }
@@ -868,7 +868,7 @@ EncodedJSValue JSC_HOST_CALL JSONProtoFuncStringify(ExecState* exec)
 
 UString JSONStringify(ExecState* exec, JSValue value, unsigned indent)
 {
-    JSValue result = Stringifier(exec, jsNull(), jsNumber(exec, indent)).stringify(value);
+    JSValue result = Stringifier(exec, jsNull(), jsNumber(indent)).stringify(value);
     if (result.isUndefinedOrNull())
         return UString();
     return result.getString(exec);
index bc0120f..340a898 100644 (file)
@@ -236,7 +236,7 @@ bool JSString::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNam
 bool JSString::getStringPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 {
     if (propertyName == exec->propertyNames().length) {
-        descriptor.setDescriptor(jsNumber(exec, m_length), DontEnum | DontDelete | ReadOnly);
+        descriptor.setDescriptor(jsNumber(m_length), DontEnum | DontDelete | ReadOnly);
         return true;
     }
     
index 12ced10..7101d16 100644 (file)
@@ -559,7 +559,7 @@ namespace JSC {
     ALWAYS_INLINE bool JSString::getStringPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
     {
         if (propertyName == exec->propertyNames().length) {
-            slot.setValue(jsNumber(exec, m_length));
+            slot.setValue(jsNumber(m_length));
             return true;
         }
 
index b5dcbec..0560bc0 100644 (file)
@@ -101,21 +101,18 @@ namespace JSC {
         JSValue(const JSCell* ptr);
 
         // Numbers
-        JSValue(EncodeAsDoubleTag, ExecState*, double);
-        JSValue(ExecState*, double);
-        JSValue(ExecState*, char);
-        JSValue(ExecState*, unsigned char);
-        JSValue(ExecState*, short);
-        JSValue(ExecState*, unsigned short);
-        JSValue(ExecState*, int);
-        JSValue(ExecState*, unsigned);
-        JSValue(ExecState*, long);
-        JSValue(ExecState*, unsigned long);
-        JSValue(ExecState*, long long);
-        JSValue(ExecState*, unsigned long long);
-        JSValue(JSGlobalData*, double);
-        JSValue(JSGlobalData*, int);
-        JSValue(JSGlobalData*, unsigned);
+        JSValue(EncodeAsDoubleTag, double);
+        explicit JSValue(double);
+        explicit JSValue(char);
+        explicit JSValue(unsigned char);
+        explicit JSValue(short);
+        explicit JSValue(unsigned short);
+        explicit JSValue(int);
+        explicit JSValue(unsigned);
+        explicit JSValue(long);
+        explicit JSValue(unsigned long);
+        explicit JSValue(long long);
+        explicit JSValue(unsigned long long);
 
         operator bool() const;
         bool operator==(const JSValue& other) const;
@@ -294,79 +291,64 @@ namespace JSC {
         return b ? JSValue(JSValue::JSTrue) : JSValue(JSValue::JSFalse);
     }
 
-    ALWAYS_INLINE JSValue jsDoubleNumber(ExecState* exec, double d)
+    ALWAYS_INLINE JSValue jsDoubleNumber(double d)
     {
-        return JSValue(JSValue::EncodeAsDouble, exec, d);
+        return JSValue(JSValue::EncodeAsDouble, d);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, double d)
+    ALWAYS_INLINE JSValue jsNumber(double d)
     {
-        return JSValue(exec, d);
+        return JSValue(d);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, char i)
+    ALWAYS_INLINE JSValue jsNumber(char i)
     {
-        return JSValue(exec, i);
+        return JSValue(i);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned char i)
+    ALWAYS_INLINE JSValue jsNumber(unsigned char i)
     {
-        return JSValue(exec, i);
+        return JSValue(i);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, short i)
+    ALWAYS_INLINE JSValue jsNumber(short i)
     {
-        return JSValue(exec, i);
+        return JSValue(i);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned short i)
+    ALWAYS_INLINE JSValue jsNumber(unsigned short i)
     {
-        return JSValue(exec, i);
+        return JSValue(i);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, int i)
+    ALWAYS_INLINE JSValue jsNumber(int i)
     {
-        return JSValue(exec, i);
+        return JSValue(i);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned i)
+    ALWAYS_INLINE JSValue jsNumber(unsigned i)
     {
-        return JSValue(exec, i);
+        return JSValue(i);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, long i)
+    ALWAYS_INLINE JSValue jsNumber(long i)
     {
-        return JSValue(exec, i);
+        return JSValue(i);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned long i)
+    ALWAYS_INLINE JSValue jsNumber(unsigned long i)
     {
-        return JSValue(exec, i);
+        return JSValue(i);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, long long i)
+    ALWAYS_INLINE JSValue jsNumber(long long i)
     {
-        return JSValue(exec, i);
+        return JSValue(i);
     }
 
-    ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned long long i)
+    ALWAYS_INLINE JSValue jsNumber(unsigned long long i)
     {
-        return JSValue(exec, i);
-    }
-
-    ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, double d)
-    {
-        return JSValue(globalData, d);
-    }
-
-    ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, int i)
-    {
-        return JSValue(globalData, i);
-    }
-
-    ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, unsigned i)
-    {
-        return JSValue(globalData, i);
+        return JSValue(i);
     }
 
     inline bool operator==(const JSValue a, const JSCell* b) { return a == JSValue(b); }
@@ -397,9 +379,9 @@ namespace JSC {
     }
 
 #if USE(JSVALUE32_64)
-    inline JSValue jsNaN(ExecState* exec)
+    inline JSValue jsNaN()
     {
-        return JSValue(exec, nonInlineNaN());
+        return JSValue(nonInlineNaN());
     }
 
     // JSValue member functions.
@@ -573,115 +555,90 @@ namespace JSC {
         return reinterpret_cast<JSCell*>(u.asBits.payload);
     }
 
-    ALWAYS_INLINE JSValue::JSValue(EncodeAsDoubleTag, ExecState*, double d)
+    ALWAYS_INLINE JSValue::JSValue(EncodeAsDoubleTag, double d)
     {
         u.asDouble = d;
     }
 
-    inline JSValue::JSValue(ExecState* exec, double d)
+    inline JSValue::JSValue(double d)
     {
         const int32_t asInt32 = static_cast<int32_t>(d);
         if (asInt32 != d || (!asInt32 && signbit(d))) { // true for -0.0
             u.asDouble = d;
             return;
         }
-        *this = JSValue(exec, static_cast<int32_t>(d));
+        *this = JSValue(static_cast<int32_t>(d));
     }
 
-    inline JSValue::JSValue(ExecState* exec, char i)
+    inline JSValue::JSValue(char i)
     {
-        *this = JSValue(exec, static_cast<int32_t>(i));
+        *this = JSValue(static_cast<int32_t>(i));
     }
 
-    inline JSValue::JSValue(ExecState* exec, unsigned char i)
+    inline JSValue::JSValue(unsigned char i)
     {
-        *this = JSValue(exec, static_cast<int32_t>(i));
+        *this = JSValue(static_cast<int32_t>(i));
     }
 
-    inline JSValue::JSValue(ExecState* exec, short i)
+    inline JSValue::JSValue(short i)
     {
-        *this = JSValue(exec, static_cast<int32_t>(i));
+        *this = JSValue(static_cast<int32_t>(i));
     }
 
-    inline JSValue::JSValue(ExecState* exec, unsigned short i)
+    inline JSValue::JSValue(unsigned short i)
     {
-        *this = JSValue(exec, static_cast<int32_t>(i));
+        *this = JSValue(static_cast<int32_t>(i));
     }
 
-    inline JSValue::JSValue(ExecState*, int i)
+    inline JSValue::JSValue(int i)
     {
         u.asBits.tag = Int32Tag;
         u.asBits.payload = i;
     }
 
-    inline JSValue::JSValue(ExecState* exec, unsigned i)
+    inline JSValue::JSValue(unsigned i)
     {
         if (static_cast<int32_t>(i) < 0) {
-            *this = JSValue(exec, static_cast<double>(i));
+            *this = JSValue(static_cast<double>(i));
             return;
         }
-        *this = JSValue(exec, static_cast<int32_t>(i));
+        *this = JSValue(static_cast<int32_t>(i));
     }
 
-    inline JSValue::JSValue(ExecState* exec, long i)
+    inline JSValue::JSValue(long i)
     {
         if (static_cast<int32_t>(i) != i) {
-            *this = JSValue(exec, static_cast<double>(i));
+            *this = JSValue(static_cast<double>(i));
             return;
         }
-        *this = JSValue(exec, static_cast<int32_t>(i));
+        *this = JSValue(static_cast<int32_t>(i));
     }
 
-    inline JSValue::JSValue(ExecState* exec, unsigned long i)
+    inline JSValue::JSValue(unsigned long i)
     {
         if (static_cast<uint32_t>(i) != i) {
-            *this = JSValue(exec, static_cast<double>(i));
+            *this = JSValue(static_cast<double>(i));
             return;
         }
-        *this = JSValue(exec, static_cast<uint32_t>(i));
+        *this = JSValue(static_cast<uint32_t>(i));
     }
 
-    inline JSValue::JSValue(ExecState* exec, long long i)
+    inline JSValue::JSValue(long long i)
     {
         if (static_cast<int32_t>(i) != i) {
-            *this = JSValue(exec, static_cast<double>(i));
+            *this = JSValue(static_cast<double>(i));
             return;
         }
-        *this = JSValue(exec, static_cast<int32_t>(i));
+        *this = JSValue(static_cast<int32_t>(i));
     }
 
-    inline JSValue::JSValue(ExecState* exec, unsigned long long i)
+    inline JSValue::JSValue(unsigned long long i)
     {
         if (static_cast<uint32_t>(i) != i) {
-            *this = JSValue(exec, static_cast<double>(i));
-            return;
-        }
-        *this = JSValue(exec, static_cast<uint32_t>(i));
-    }
-
-    inline JSValue::JSValue(JSGlobalData* globalData, double d)
-    {
-        const int32_t asInt32 = static_cast<int32_t>(d);
-        if (asInt32 != d || (!asInt32 && signbit(d))) { // true for -0.0
-            u.asDouble = d;
-            return;
-        }
-        *this = JSValue(globalData, static_cast<int32_t>(d));
-    }
-    
-    inline JSValue::JSValue(JSGlobalData*, int i)
-    {
-        u.asBits.tag = Int32Tag;
-        u.asBits.payload = i;
-    }
-    
-    inline JSValue::JSValue(JSGlobalData* globalData, unsigned i)
-    {
-        if (static_cast<int32_t>(i) < 0) {
-            *this = JSValue(globalData, static_cast<double>(i));
+            *this = JSValue(static_cast<double>(i));
             return;
         }
-        *this = JSValue(globalData, static_cast<int32_t>(i));
+        *this = JSValue(static_cast<uint32_t>(i));
     }
 
     inline bool JSValue::isNumber() const
@@ -722,7 +679,7 @@ namespace JSC {
 
     ALWAYS_INLINE JSValue JSValue::toJSNumber(ExecState* exec) const
     {
-        return isNumber() ? asValue() : jsNumber(exec, this->toNumber(exec));
+        return isNumber() ? asValue() : jsNumber(this->toNumber(exec));
     }
 
     inline bool JSValue::getNumber(double& result) const
index f1df15f..ed69f4d 100644 (file)
@@ -393,7 +393,7 @@ JSValue LiteralParser::parse(ParserState initialState)
                     case TokNumber: {
                         Lexer::LiteralParserToken numberToken = m_lexer.currentToken();
                         m_lexer.next();
-                        lastValue = jsNumber(m_exec, numberToken.numberToken);
+                        lastValue = jsNumber(numberToken.numberToken);
                         break;
                     }
                     case TokNull:
index 8d2ae2d..080d7d2 100644 (file)
@@ -89,14 +89,14 @@ const ClassInfo MathObject::info = { "Math", 0, 0, ExecState::mathTable };
 MathObject::MathObject(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure)
     : JSObjectWithGlobalObject(globalObject, structure)
 {
-    putDirectWithoutTransition(Identifier(exec, "E"), jsNumber(exec, exp(1.0)), DontDelete | DontEnum | ReadOnly);
-    putDirectWithoutTransition(Identifier(exec, "LN2"), jsNumber(exec, log(2.0)), DontDelete | DontEnum | ReadOnly);
-    putDirectWithoutTransition(Identifier(exec, "LN10"), jsNumber(exec, log(10.0)), DontDelete | DontEnum | ReadOnly);
-    putDirectWithoutTransition(Identifier(exec, "LOG2E"), jsNumber(exec, 1.0 / log(2.0)), DontDelete | DontEnum | ReadOnly);
-    putDirectWithoutTransition(Identifier(exec, "LOG10E"), jsNumber(exec, 1.0 / log(10.0)), DontDelete | DontEnum | ReadOnly);
-    putDirectWithoutTransition(Identifier(exec, "PI"), jsNumber(exec, piDouble), DontDelete | DontEnum | ReadOnly);
-    putDirectWithoutTransition(Identifier(exec, "SQRT1_2"), jsNumber(exec, sqrt(0.5)), DontDelete | DontEnum | ReadOnly);
-    putDirectWithoutTransition(Identifier(exec, "SQRT2"), jsNumber(exec, sqrt(2.0)), DontDelete | DontEnum | ReadOnly);
+    putDirectWithoutTransition(Identifier(exec, "E"), jsNumber(exp(1.0)), DontDelete | DontEnum | ReadOnly);
+    putDirectWithoutTransition(Identifier(exec, "LN2"), jsNumber(log(2.0)), DontDelete | DontEnum | ReadOnly);
+    putDirectWithoutTransition(Identifier(exec, "LN10"), jsNumber(log(10.0)), DontDelete | DontEnum | ReadOnly);
+    putDirectWithoutTransition(Identifier(exec, "LOG2E"), jsNumber(1.0 / log(2.0)), DontDelete | DontEnum | ReadOnly);
+    putDirectWithoutTransition(Identifier(exec, "LOG10E"), jsNumber(1.0 / log(10.0)), DontDelete | DontEnum | ReadOnly);
+    putDirectWithoutTransition(Identifier(exec, "PI"), jsNumber(piDouble), DontDelete | DontEnum | ReadOnly);
+    putDirectWithoutTransition(Identifier(exec, "SQRT1_2"), jsNumber(sqrt(0.5)), DontDelete | DontEnum | ReadOnly);
+    putDirectWithoutTransition(Identifier(exec, "SQRT2"), jsNumber(sqrt(2.0)), DontDelete | DontEnum | ReadOnly);
 }
 
 // ECMA 15.8
@@ -115,54 +115,54 @@ bool MathObject::getOwnPropertyDescriptor(ExecState* exec, const Identifier& pro
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncAbs(ExecState* exec)
 {
-    return JSValue::encode(jsNumber(exec, fabs(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsNumber(fabs(exec->argument(0).toNumber(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncACos(ExecState* exec)
 {
-    return JSValue::encode(jsDoubleNumber(exec, acos(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsDoubleNumber(acos(exec->argument(0).toNumber(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncASin(ExecState* exec)
 {
-    return JSValue::encode(jsDoubleNumber(exec, asin(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsDoubleNumber(asin(exec->argument(0).toNumber(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncATan(ExecState* exec)
 {
-    return JSValue::encode(jsDoubleNumber(exec, atan(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsDoubleNumber(atan(exec->argument(0).toNumber(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncATan2(ExecState* exec)
 {
     double arg0 = exec->argument(0).toNumber(exec);
     double arg1 = exec->argument(1).toNumber(exec);
-    return JSValue::encode(jsDoubleNumber(exec, atan2(arg0, arg1)));
+    return JSValue::encode(jsDoubleNumber(atan2(arg0, arg1)));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncCeil(ExecState* exec)
 {
-    return JSValue::encode(jsNumber(exec, ceil(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsNumber(ceil(exec->argument(0).toNumber(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncCos(ExecState* exec)
 {
-    return JSValue::encode(jsDoubleNumber(exec, cos(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsDoubleNumber(cos(exec->argument(0).toNumber(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncExp(ExecState* exec)
 {
-    return JSValue::encode(jsDoubleNumber(exec, exp(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsDoubleNumber(exp(exec->argument(0).toNumber(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncFloor(ExecState* exec)
 {
-    return JSValue::encode(jsNumber(exec, floor(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsNumber(floor(exec->argument(0).toNumber(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncLog(ExecState* exec)
 {
-    return JSValue::encode(jsDoubleNumber(exec, log(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsDoubleNumber(log(exec->argument(0).toNumber(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncMax(ExecState* exec)
@@ -178,7 +178,7 @@ EncodedJSValue JSC_HOST_CALL mathProtoFuncMax(ExecState* exec)
         if (val > result || (val == 0 && result == 0 && !signbit(val)))
             result = val;
     }
-    return JSValue::encode(jsNumber(exec, result));
+    return JSValue::encode(jsNumber(result));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncMin(ExecState* exec)
@@ -194,7 +194,7 @@ EncodedJSValue JSC_HOST_CALL mathProtoFuncMin(ExecState* exec)
         if (val < result || (val == 0 && result == 0 && signbit(val)))
             result = val;
     }
-    return JSValue::encode(jsNumber(exec, result));
+    return JSValue::encode(jsNumber(result));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncPow(ExecState* exec)
@@ -205,37 +205,37 @@ EncodedJSValue JSC_HOST_CALL mathProtoFuncPow(ExecState* exec)
     double arg2 = exec->argument(1).toNumber(exec);
 
     if (isnan(arg2))
-        return JSValue::encode(jsNaN(exec));
+        return JSValue::encode(jsNaN());
     if (isinf(arg2) && fabs(arg) == 1)
-        return JSValue::encode(jsNaN(exec));
-    return JSValue::encode(jsNumber(exec, pow(arg, arg2)));
+        return JSValue::encode(jsNaN());
+    return JSValue::encode(jsNumber(pow(arg, arg2)));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncRandom(ExecState* exec)
 {
-    return JSValue::encode(jsDoubleNumber(exec, exec->lexicalGlobalObject()->weakRandomNumber()));
+    return JSValue::encode(jsDoubleNumber(exec->lexicalGlobalObject()->weakRandomNumber()));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncRound(ExecState* exec)
 {
     double arg = exec->argument(0).toNumber(exec);
     double integer = ceil(arg);
-    return JSValue::encode(jsNumber(exec, integer - (integer - arg > 0.5)));
+    return JSValue::encode(jsNumber(integer - (integer - arg > 0.5)));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncSin(ExecState* exec)
 {
-    return JSValue::encode(exec->globalData().cachedSin(exec, exec->argument(0).toNumber(exec)));
+    return JSValue::encode(exec->globalData().cachedSin(exec->argument(0).toNumber(exec)));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncSqrt(ExecState* exec)
 {
-    return JSValue::encode(jsDoubleNumber(exec, sqrt(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsDoubleNumber(sqrt(exec->argument(0).toNumber(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncTan(ExecState* exec)
 {
-    return JSValue::encode(jsDoubleNumber(exec, tan(exec->argument(0).toNumber(exec))));
+    return JSValue::encode(jsDoubleNumber(tan(exec->argument(0).toNumber(exec))));
 }
 
 } // namespace JSC
index 31f9bc3..eb508eb 100644 (file)
@@ -37,7 +37,7 @@ NativeErrorConstructor::NativeErrorConstructor(ExecState* exec, JSGlobalObject*
 {
     NativeErrorPrototype* prototype = new (exec) NativeErrorPrototype(exec, globalObject, prototypeStructure, nameAndMessage, this);
 
-    putDirect(exec->propertyNames().length, jsNumber(exec, 1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
+    putDirect(exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
     putDirect(exec->propertyNames().prototype, prototype, DontDelete | ReadOnly | DontEnum);
     m_errorStructure = ErrorInstance::createStructure(prototype);
 }
index a197952..5369ca0 100644 (file)
@@ -61,7 +61,7 @@ NumberConstructor::NumberConstructor(ExecState* exec, JSGlobalObject* globalObje
     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 @@ bool NumberConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifi
     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 @@ static EncodedJSValue JSC_HOST_CALL constructWithNumberConstructor(ExecState* ex
 {
     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 @@ ConstructType NumberConstructor::getConstructData(ConstructData& constructData)
 // 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)
index 4a2ca74..0b86c00 100644 (file)
@@ -49,7 +49,7 @@ static EncodedJSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState*);
 NumberPrototype::NumberPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* prototypeFunctionStructure)
     : NumberObject(structure)
 {
-    setInternalValue(jsNumber(exec, 0));
+    setInternalValue(jsNumber(0));
 
     // The constructor will be added later, after NumberConstructor has been constructed
 
index b1f9d70..ca3dcd7 100644 (file)
@@ -50,7 +50,7 @@ ObjectConstructor::ObjectConstructor(ExecState* exec, JSGlobalObject* globalObje
     putDirectWithoutTransition(exec->propertyNames().prototype, objectPrototype, 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);
     
     putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().getPrototypeOf, objectConstructorGetPrototypeOf), DontEnum);
     putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 2, exec->propertyNames().getOwnPropertyDescriptor, objectConstructorGetOwnPropertyDescriptor), DontEnum);
index cf236bf..de23e17 100644 (file)
@@ -55,7 +55,7 @@ NEVER_INLINE JSValue jsAddSlowCase(CallFrame* callFrame, JSValue v1, JSValue v2)
     if (p2.isString())
         return jsString(callFrame, p1.toString(callFrame), asString(p2));
 
-    return jsNumber(callFrame, p1.toNumber(callFrame) + p2.toNumber(callFrame));
+    return jsNumber(p1.toNumber(callFrame) + p2.toNumber(callFrame));
 }
 
 JSValue jsTypeStringForValue(CallFrame* callFrame, JSValue v)
index 9226953..80580c7 100644 (file)
@@ -398,7 +398,7 @@ namespace JSC {
     {
         double left = 0.0, right;
         if (v1.getNumber(left) && v2.getNumber(right))
-            return jsNumber(callFrame, left + right);
+            return jsNumber(left + right);
         
         if (v1.isString()) {
             return v2.isString()
index b0bf2bd..3529080 100644 (file)
@@ -37,7 +37,7 @@ PrototypeFunction::PrototypeFunction(ExecState* exec, JSGlobalObject* globalObje
     , m_function(function)
 {
     ASSERT_ARG(function, function);
-    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
+    putDirect(exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
 }
 
 PrototypeFunction::PrototypeFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> prototypeFunctionStructure, int length, const Identifier& name, NativeFunction function)
@@ -45,7 +45,7 @@ PrototypeFunction::PrototypeFunction(ExecState* exec, JSGlobalObject* globalObje
     , m_function(function)
 {
     ASSERT_ARG(function, function);
-    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
+    putDirect(exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
 }
     
 CallType PrototypeFunction::getCallData(CallData& callData)
index b9aa587..21ca170 100644 (file)
@@ -103,7 +103,7 @@ RegExpConstructor::RegExpConstructor(ExecState* exec, JSGlobalObject* globalObje
     putDirectWithoutTransition(exec->propertyNames().prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly);
 
     // no. of arguments for constructor
-    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly | DontDelete | DontEnum);
+    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
 }
 
 RegExpMatchesArray::RegExpMatchesArray(ExecState* exec, RegExpConstructorPrivate* data)
@@ -142,7 +142,7 @@ void RegExpMatchesArray::fillArrayInstance(ExecState* exec)
     }
 
     PutPropertySlot slot;
-    JSArray::put(exec, exec->propertyNames().index, jsNumber(exec, d->lastOvector()[0]), slot);
+    JSArray::put(exec, exec->propertyNames().index, jsNumber(d->lastOvector()[0]), slot);
     JSArray::put(exec, exec->propertyNames().input, jsString(exec, d->input), slot);
 
     delete d;
index 7d14814..7fda5b1 100644 (file)
@@ -101,9 +101,9 @@ JSValue regExpObjectSource(ExecState* exec, JSValue slotBase, const Identifier&)
     return jsString(exec, asRegExpObject(slotBase)->regExp()->pattern());
 }
 
-JSValue regExpObjectLastIndex(ExecState* exec, JSValue slotBase, const Identifier&)
+JSValue regExpObjectLastIndex(ExecState*, JSValue slotBase, const Identifier&)
 {
-    return jsNumber(exec, asRegExpObject(slotBase)->lastIndex());
+    return jsNumber(asRegExpObject(slotBase)->lastIndex());
 }
 
 void RegExpObject::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
index 159386d..101650c 100644 (file)
@@ -62,7 +62,7 @@ StringConstructor::StringConstructor(ExecState* exec, JSGlobalObject* globalObje
     putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().fromCharCode, stringFromCharCode), DontEnum);
 #endif
     // no. of arguments for constructor
-    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontEnum | DontDelete);
+    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
 }
 
 // ECMA 15.5.2
index 37436f9..f655c33 100644 (file)
@@ -136,7 +136,7 @@ StringPrototype::StringPrototype(ExecState* exec, JSGlobalObject* globalObject,
 {
     putAnonymousValue(0, globalObject);
     // The constructor will be added later, after StringConstructor has been built
-    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(exec, 0), DontDelete | ReadOnly | DontEnum);
+    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
 }
 
 bool StringPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
@@ -351,7 +351,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState* exec)
                         cachedCall.setArgument(i, jsSubstring(exec, source, matchStart, matchLen));
                 }
 
-                cachedCall.setArgument(i++, jsNumber(exec, completeMatchStart));
+                cachedCall.setArgument(i++, jsNumber(completeMatchStart));
                 cachedCall.setArgument(i++, sourceVal);
 
                 cachedCall.setThis(exec->globalThisValue());
@@ -398,7 +398,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState* exec)
                             args.append(jsSubstring(exec, source, matchStart, matchLen));
                     }
 
-                    args.append(jsNumber(exec, completeMatchStart));
+                    args.append(jsNumber(completeMatchStart));
                     args.append(sourceVal);
 
                     replacements.append(call(exec, replacement, callType, callData, exec->globalThisValue(), args).toString(exec));
@@ -454,7 +454,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState* exec)
     if (callType != CallTypeNone) {
         MarkedArgumentBuffer args;
         args.append(jsSubstring(exec, source, matchPos, matchLen));
-        args.append(jsNumber(exec, matchPos));
+        args.append(jsNumber(matchPos));
         args.append(sourceVal);
 
         replacementString = call(exec, replacement, callType, callData, exec->globalThisValue(), args).toString(exec);
@@ -510,13 +510,13 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncCharCodeAt(ExecState* exec)
     if (a0.isUInt32()) {
         uint32_t i = a0.asUInt32();
         if (i < len)
-            return JSValue::encode(jsNumber(exec, s.characters()[i]));
-        return JSValue::encode(jsNaN(exec));
+            return JSValue::encode(jsNumber(s.characters()[i]));
+        return JSValue::encode(jsNaN());
     }
     double dpos = a0.toInteger(exec);
     if (dpos >= 0 && dpos < len)
-        return JSValue::encode(jsNumber(exec, s[static_cast<int>(dpos)]));
-    return JSValue::encode(jsNaN(exec));
+        return JSValue::encode(jsNumber(s[static_cast<int>(dpos)]));
+    return JSValue::encode(jsNaN());
 }
 
 EncodedJSValue JSC_HOST_CALL stringProtoFuncConcat(ExecState* exec)
@@ -560,8 +560,8 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncIndexOf(ExecState* exec)
 
     size_t result = s.find(u2, pos);
     if (result == notFound)
-        return JSValue::encode(jsNumber(exec, -1));
-    return JSValue::encode(jsNumber(exec, result));
+        return JSValue::encode(jsNumber(-1));
+    return JSValue::encode(jsNumber(result));
 }
 
 EncodedJSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec)
@@ -589,8 +589,8 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec)
 
     size_t result = s.reverseFind(u2, static_cast<unsigned>(dpos));
     if (result == notFound)
-        return JSValue::encode(jsNumber(exec, -1));
-    return JSValue::encode(jsNumber(exec, result));
+        return JSValue::encode(jsNumber(-1));
+    return JSValue::encode(jsNumber(result));
 }
 
 EncodedJSValue JSC_HOST_CALL stringProtoFuncMatch(ExecState* exec)
@@ -672,7 +672,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncSearch(ExecState* exec)
     int pos;
     int matchLength = 0;
     regExpConstructor->performMatch(reg.get(), u, 0, pos, matchLength);
-    return JSValue::encode(jsNumber(exec, pos));
+    return JSValue::encode(jsNumber(pos));
 }
 
 EncodedJSValue JSC_HOST_CALL stringProtoFuncSlice(ExecState* exec)
@@ -909,7 +909,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncToUpperCase(ExecState* exec)
 EncodedJSValue JSC_HOST_CALL stringProtoFuncLocaleCompare(ExecState* exec)
 {
     if (exec->argumentCount() < 1)
-      return JSValue::encode(jsNumber(exec, 0));
+      return JSValue::encode(jsNumber(0));
 
     JSValue thisValue = exec->hostThisValue();
     if (thisValue.isUndefinedOrNull()) // CheckObjectCoercible
@@ -917,7 +917,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncLocaleCompare(ExecState* exec)
 
     UString s = thisValue.toThisString(exec);
     JSValue a0 = exec->argument(0);
-    return JSValue::encode(jsNumber(exec, localeCompare(s, a0.toString(exec))));
+    return JSValue::encode(jsNumber(localeCompare(s, a0.toString(exec))));
 }
 
 EncodedJSValue JSC_HOST_CALL stringProtoFuncBig(ExecState* exec)
index 977baa4..c7b2dce 100644 (file)
@@ -1,3 +1,17 @@
+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  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r70451.
index 5c85475..581999c 100644 (file)
@@ -164,7 +164,7 @@ JSValue JSObjectKJSValue(JSUserObject* ptr)
                     {
                         double num;
                         CFNumberGetValue((CFNumberRef)cfType, kCFNumberDoubleType, &num);
-                        result = jsNumber(getThreadGlobalExecState(), num);
+                        result = jsNumber(num);
                         handled = true;
                     }
                     else if (typeID == CFBooleanGetTypeID())
index 2176f16..1728a7e 100644 (file)
@@ -190,7 +190,7 @@ JSValue UserObjectImp::toPrimitive(ExecState *exec, JSType) const
         } else if (cfType == CFNumberGetTypeID()) {
             double d = 0.0;
             CFNumberGetValue((CFNumberRef)cfValue, kCFNumberDoubleType, &d);
-            result = jsNumber(exec, d);
+            result = jsNumber(d);
         } else if (cfType == CFURLGetTypeID()) {
             CFURLRef absURL = CFURLCopyAbsoluteURL((CFURLRef)cfValue);
             if (absURL) {
index b67adb6..095137a 100644 (file)
@@ -1,3 +1,83 @@
+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-21  Satish Sampath  <satish@chromium.org>
 
         Reviewed by Jeremy Orlow.
index 5bbaf41..1ea5ae4 100644 (file)
@@ -43,7 +43,7 @@ JSAudioConstructor::JSAudioConstructor(ExecState* exec, JSDOMGlobalObject* globa
     : DOMConstructorWithDocument(JSAudioConstructor::createStructure(globalObject->objectPrototype()), globalObject)
 {
     putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, globalObject), None);
-    putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontDelete | DontEnum);
+    putDirect(exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
 }
 
 static EncodedJSValue JSC_HOST_CALL constructAudio(ExecState* exec)
index 3b3465e..458ad5b 100644 (file)
@@ -156,7 +156,7 @@ JSValue JSCSSStyleDeclaration::nameGetter(ExecState* exec, JSValue slotBase, con
     RefPtr<CSSValue> v = thisObj->impl()->getPropertyCSSValue(prop);
     if (v) {
         if (pixelOrPos && v->cssValueType() == CSSValue::CSS_PRIMITIVE_VALUE)
-            return jsNumber(exec, static_pointer_cast<CSSPrimitiveValue>(v)->getFloatValue(CSSPrimitiveValue::CSS_PX));
+            return jsNumber(static_pointer_cast<CSSPrimitiveValue>(v)->getFloatValue(CSSPrimitiveValue::CSS_PX));
         return jsStringOrNull(exec, v->cssText());
     }
 
index 720bb9b..8ef34ad 100644 (file)
@@ -32,36 +32,36 @@ using namespace JSC;
 
 namespace WebCore {
     
-JSValue JSCoordinates::altitude(ExecState* exec) const
+JSValue JSCoordinates::altitude(ExecState*) const
 {
     Coordinates* imp = impl();
     if (!imp->canProvideAltitude())
         return jsNull();
-    return jsNumber(exec, imp->altitude());
+    return jsNumber(imp->altitude());
 }
 
-JSValue JSCoordinates::altitudeAccuracy(ExecState* exec) const
+JSValue JSCoordinates::altitudeAccuracy(ExecState*) const
 {
     Coordinates* imp = impl();
     if (!imp->canProvideAltitudeAccuracy())
         return jsNull();
-    return jsNumber(exec, imp->altitudeAccuracy());
+    return jsNumber(imp->altitudeAccuracy());
 }
 
-JSValue JSCoordinates::heading(ExecState* exec) const
+JSValue JSCoordinates::heading(ExecState*) const
 {
     Coordinates* imp = impl();
     if (!imp->canProvideHeading())
         return jsNull();
-    return jsNumber(exec, imp->heading());
+    return jsNumber(imp->heading());
 }
 
-JSValue JSCoordinates::speed(ExecState* exec) const
+JSValue JSCoordinates::speed(ExecState*) const
 {
     Coordinates* imp = impl();
     if (!imp->canProvideSpeed())
         return jsNull();
-    return jsNumber(exec, imp->speed());
+    return jsNumber(imp->speed());
 }
 
 } // namespace WebCore
index ecb37f3..7119ea6 100644 (file)
@@ -910,7 +910,7 @@ JSValue JSDOMWindow::setTimeout(ExecState* exec)
     int result = impl()->setTimeout(action.release(), delay, ec);
     setDOMException(exec, ec);
 
-    return jsNumber(exec, result);
+    return jsNumber(result);
 }
 
 JSValue JSDOMWindow::setInterval(ExecState* exec)
@@ -924,7 +924,7 @@ JSValue JSDOMWindow::setInterval(ExecState* exec)
     int result = impl()->setInterval(action.release(), delay, ec);
     setDOMException(exec, ec);
 
-    return jsNumber(exec, result);
+    return jsNumber(result);
 }
 
 JSValue JSDOMWindow::addEventListener(ExecState* exec)
index f1c1bc0..7bb09a9 100644 (file)
@@ -114,18 +114,18 @@ static PassRefPtr<DeviceMotionData::RotationRate> readRotationRateArgument(JSVal
 static JSObject* createAccelerationObject(const DeviceMotionData::Acceleration* acceleration, ExecState* exec)
 {
     JSObject* object = constructEmptyObject(exec);
-    object->putDirect(Identifier(exec, "x"), acceleration->canProvideX() ? jsNumber(exec, acceleration->x()) : jsNull());
-    object->putDirect(Identifier(exec, "y"), acceleration->canProvideY() ? jsNumber(exec, acceleration->y()) : jsNull());
-    object->putDirect(Identifier(exec, "z"), acceleration->canProvideZ() ? jsNumber(exec, acceleration->z()) : jsNull());
+    object->putDirect(Identifier(exec, "x"), acceleration->canProvideX() ? jsNumber(acceleration->x()) : jsNull());
+    object->putDirect(Identifier(exec, "y"), acceleration->canProvideY() ? jsNumber(acceleration->y()) : jsNull());
+    object->putDirect(Identifier(exec, "z"), acceleration->canProvideZ() ? jsNumber(acceleration->z()) : jsNull());
     return object;
 }
 
 static JSObject* createRotationRateObject(const DeviceMotionData::RotationRate* rotationRate, ExecState* exec)
 {
     JSObject* object = constructEmptyObject(exec);
-    object->putDirect(Identifier(exec, "alpha"), rotationRate->canProvideAlpha() ? jsNumber(exec, rotationRate->alpha()) : jsNull());
-    object->putDirect(Identifier(exec, "beta"),  rotationRate->canProvideBeta()  ? jsNumber(exec, rotationRate->beta())  : jsNull());
-    object->putDirect(Identifier(exec, "gamma"), rotationRate->canProvideGamma() ? jsNumber(exec, rotationRate->gamma()) : jsNull());
+    object->putDirect(Identifier(exec, "alpha"), rotationRate->canProvideAlpha() ? jsNumber(rotationRate->alpha()) : jsNull());
+    object->putDirect(Identifier(exec, "beta"),  rotationRate->canProvideBeta()  ? jsNumber(rotationRate->beta())  : jsNull());
+    object->putDirect(Identifier(exec, "gamma"), rotationRate->canProvideGamma() ? jsNumber(rotationRate->gamma()) : jsNull());
     return object;
 }
 
@@ -158,7 +158,7 @@ JSValue JSDeviceMotionEvent::interval(ExecState* exec) const
     DeviceMotionEvent* imp = static_cast<DeviceMotionEvent*>(impl());
     if (!imp->deviceMotionData()->canProvideInterval())
         return jsNull();
-    return jsNumber(exec, imp->deviceMotionData()->interval());
+    return jsNumber(imp->deviceMotionData()->interval());
 }
 
 JSValue JSDeviceMotionEvent::initDeviceMotionEvent(ExecState* exec)
index 05f8755..9074a6b 100644 (file)
@@ -40,7 +40,7 @@ JSValue JSDeviceOrientationEvent::alpha(ExecState* exec) const
     DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
     if (!imp->orientation()->canProvideAlpha())
         return jsNull();
-    return jsNumber(exec, imp->orientation()->alpha());
+    return jsNumber(imp->orientation()->alpha());
 }
 
 JSValue JSDeviceOrientationEvent::beta(ExecState* exec) const
@@ -48,7 +48,7 @@ JSValue JSDeviceOrientationEvent::beta(ExecState* exec) const
     DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
     if (!imp->orientation()->canProvideBeta())
         return jsNull();
-    return jsNumber(exec, imp->orientation()->beta());
+    return jsNumber(imp->orientation()->beta());
 }
 
 JSValue JSDeviceOrientationEvent::gamma(ExecState* exec) const
@@ -56,7 +56,7 @@ JSValue JSDeviceOrientationEvent::gamma(ExecState* exec) const
     DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
     if (!imp->orientation()->canProvideGamma())
         return jsNull();
-    return jsNumber(exec, imp->orientation()->gamma());
+    return jsNumber(imp->orientation()->gamma());
 }
 
 JSValue JSDeviceOrientationEvent::initDeviceOrientationEvent(ExecState* exec)
index bd36df8..1e40f86 100644 (file)
@@ -181,7 +181,7 @@ JSValue JSGeolocation::watchPosition(ExecState* exec)
     ASSERT(positionOptions);
 
     int watchID = m_impl->watchPosition(positionCallback.release(), positionErrorCallback.release(), positionOptions.release());
-    return jsNumber(exec, watchID);
+    return jsNumber(watchID);
 }
 
 } // namespace WebCore
index 412a096..171a1f9 100644 (file)
@@ -39,7 +39,7 @@ JSValue JSHTMLInputElement::selectionStart(ExecState* exec) const
     if (!input->canHaveSelection())
         return throwTypeError(exec);
 
-    return jsNumber(exec, input->selectionStart());
+    return jsNumber(input->selectionStart());
 }
 
 void JSHTMLInputElement::setSelectionStart(ExecState* exec, JSValue value)
@@ -57,7 +57,7 @@ JSValue JSHTMLInputElement::selectionEnd(ExecState* exec) const
     if (!input->canHaveSelection())
         return throwTypeError(exec);
 
-    return jsNumber(exec, input->selectionEnd());
+    return jsNumber(input->selectionEnd());
 }
 
 void JSHTMLInputElement::setSelectionEnd(ExecState* exec, JSValue value)
index 6143c1e..d169bc4 100644 (file)
@@ -35,10 +35,10 @@ using namespace JSC;
 
 namespace WebCore {
 
-JSValue JSHTMLOptionsCollection::length(ExecState* exec) const
+JSValue JSHTMLOptionsCollection::length(ExecState*) const
 {
     HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl());
-    return jsNumber(exec, imp->length());
+    return jsNumber(imp->length());
 }
 
 void JSHTMLOptionsCollection::setLength(ExecState* exec, JSValue value)
index 98c9315..f0faef5 100644 (file)
@@ -46,7 +46,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject*, IDBKey* key)
     case IDBKey::NullType:
         return jsNull();
     case IDBKey::NumberType:
-        return jsNumber(exec, key->number());
+        return jsNumber(key->number());
     case IDBKey::StringType:
         return jsString(exec, key->string());
     // FIXME: Implement dates.
index ac5225e..818d549 100644 (file)
@@ -95,7 +95,7 @@ ScriptObject InjectedScriptHost::createInjectedScript(const String& source, Scri
     MarkedArgumentBuffer args;
     args.append(toJS(scriptState, globalObject, this));
     args.append(globalThisValue);
-    args.append(jsNumber(scriptState, id));
+    args.append(jsNumber(id));
     args.append(jsString(scriptState, String("JSC")));
     JSValue result = JSC::call(scriptState, functionValue, callType, callData, globalThisValue, args);
     if (result.isObject())
@@ -149,7 +149,7 @@ JSValue JSInjectedScriptHost::pushNodePathToFrontend(ExecState* exec)
 
     bool withChildren = exec->argument(1).toBoolean(exec);
     bool selectInUI = exec->argument(2).toBoolean(exec);
-    return jsNumber(exec, impl()->pushNodePathToFrontend(node, withChildren, selectInUI));
+    return jsNumber(impl()->pushNodePathToFrontend(node, withChildren, selectInUI));
 }
 
 #if ENABLE(DATABASE)
index d0a51cd..4ecfe58 100644 (file)
@@ -39,7 +39,7 @@ JSOptionConstructor::JSOptionConstructor(ExecState* exec, JSDOMGlobalObject* glo
     : DOMConstructorWithDocument(JSOptionConstructor::createStructure(globalObject->objectPrototype()), globalObject)
 {
     putDirect(exec->propertyNames().prototype, JSHTMLOptionElementPrototype::self(exec, globalObject), None);
-    putDirect(exec->propertyNames().length, jsNumber(exec, 4), ReadOnly|DontDelete|DontEnum);
+    putDirect(exec->propertyNames().length, jsNumber(4), ReadOnly | DontDelete | DontEnum);
 }
 
 static EncodedJSValue JSC_HOST_CALL constructHTMLOptionElement(ExecState* exec)
index e9a97ed..7274cd0 100644 (file)
@@ -68,7 +68,7 @@ JSValue JSSQLResultSetRowList::item(ExecState* exec)
               jsValue = jsNull();
               break;
           case SQLValue::NumberValue:
-              jsValue = jsNumber(exec, value.number());
+              jsValue = jsNumber(value.number());
               break;
           default:
               ASSERT_NOT_REACHED();
index cb5e879..0cc7c6d 100644 (file)
@@ -28,10 +28,10 @@ using namespace JSC;
 
 namespace WebCore {
 
-JSValue JSSVGLength::value(ExecState* exec) const
+JSValue JSSVGLength::value(ExecState*) const
 {
     SVGLength& podImp = impl()->propertyReference();
-    return jsNumber(exec, podImp.value(impl()->contextElement()));
+    return jsNumber(podImp.value(impl()->contextElement()));
 }
 
 JSValue JSSVGLength::convertToSpecifiedUnits(ExecState* exec)
index 127227e..0c2a6a2 100644 (file)
@@ -40,9 +40,9 @@ namespace WebCore {
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
 
-JSValue JSScriptProfileNode::callUID(ExecState* exec) const
+JSValue JSScriptProfileNode::callUID(ExecState*) const
 {
-    JSValue result = jsNumber(exec, impl()->callIdentifier().hash());
+    JSValue result = jsNumber(impl()->callIdentifier().hash());
     return result;
 }
 
index 4b31659..643ce64 100644 (file)
@@ -81,15 +81,15 @@ static JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, const WebG
         return constructArray(exec, list);
     }
     case WebGLGetInfo::kTypeFloat:
-        return jsNumber(exec, info.getFloat());
+        return jsNumber(info.getFloat());
     case WebGLGetInfo::kTypeLong:
-        return jsNumber(exec, info.getLong());
+        return jsNumber(info.getLong());
     case WebGLGetInfo::kTypeNull:
         return jsNull();
     case WebGLGetInfo::kTypeString:
         return jsString(exec, info.getString());
     case WebGLGetInfo::kTypeUnsignedLong:
-        return jsNumber(exec, info.getUnsignedLong());
+        return jsNumber(info.getUnsignedLong());
     case WebGLGetInfo::kTypeWebGLBuffer:
         return toJS(exec, globalObject, info.getWebGLBuffer());
     case WebGLGetInfo::kTypeWebGLFloatArray:
index be47b16..8c1caef 100644 (file)
@@ -126,7 +126,7 @@ JSValue JSWorkerContext::setTimeout(ExecState* exec)
     if (exec->hadException())
         return jsUndefined();
     int delay = exec->argument(1).toInt32(exec);
-    return jsNumber(exec, impl()->setTimeout(action.release(), delay));
+    return jsNumber(impl()->setTimeout(action.release(), delay));
 }
 
 JSValue JSWorkerContext::setInterval(ExecState* exec)
@@ -135,7 +135,7 @@ JSValue JSWorkerContext::setInterval(ExecState* exec)
     if (exec->hadException())
         return jsUndefined();
     int delay = exec->argument(1).toInt32(exec);
-    return jsNumber(exec, impl()->setInterval(action.release(), delay));
+    return jsNumber(impl()->setInterval(action.release(), delay));
 }
 
 
index 85fc496..f7d2b02 100644 (file)
@@ -86,7 +86,7 @@ void JSWorkerContextErrorHandler::handleEvent(ScriptExecutionContext* scriptExec
         MarkedArgumentBuffer args;
         args.append(jsString(exec, errorEvent->message()));
         args.append(jsString(exec, errorEvent->filename()));
-        args.append(jsNumber(exec, errorEvent->lineno()));
+        args.append(jsNumber(errorEvent->lineno()));
 
         JSGlobalData& globalData = globalObject->globalData();
         DynamicGlobalObjectScope globalObjectScope(exec, globalData.dynamicGlobalObject ? globalData.dynamicGlobalObject : globalObject);
index 775e3ad..f77c691 100644 (file)
@@ -82,31 +82,31 @@ void ScriptCallArgumentHandler::appendArgument(JSC::JSValue argument)
 void ScriptCallArgumentHandler::appendArgument(long argument)
 {
     JSLock lock(SilenceAssertionsOnly);
-    m_arguments.append(jsNumber(m_exec, argument));
+    m_arguments.append(jsNumber(argument));
 }
 
 void ScriptCallArgumentHandler::appendArgument(long long argument)
 {
     JSLock lock(SilenceAssertionsOnly);
-    m_arguments.append(jsNumber(m_exec, argument));
+    m_arguments.append(jsNumber(argument));
 }
 
 void ScriptCallArgumentHandler::appendArgument(unsigned int argument)
 {
     JSLock lock(SilenceAssertionsOnly);
-    m_arguments.append(jsNumber(m_exec, argument));
+    m_arguments.append(jsNumber(argument));
 }
 
 void ScriptCallArgumentHandler::appendArgument(unsigned long argument)
 {
     JSLock lock(SilenceAssertionsOnly);
-    m_arguments.append(jsNumber(m_exec, argument));
+    m_arguments.append(jsNumber(argument));
 }
 
 void ScriptCallArgumentHandler::appendArgument(int argument)
 {
     JSLock lock(SilenceAssertionsOnly);
-    m_arguments.append(jsNumber(m_exec, argument));
+    m_arguments.append(jsNumber(argument));
 }
 
 void ScriptCallArgumentHandler::appendArgument(bool argument)
index c9ad0e6..65abd75 100644 (file)
@@ -1041,12 +1041,12 @@ private:
             int32_t i;
             if (!read(i))
                 return JSValue();
-            return jsNumber(m_exec, i);
+            return jsNumber(i);
         }
         case ZeroTag:
-            return jsNumber(m_exec, 0);
+            return jsNumber(0);
         case OneTag:
-            return jsNumber(m_exec, 1);
+            return jsNumber(1);
         case FalseTag:
             return jsBoolean(false);
         case TrueTag:
@@ -1055,7 +1055,7 @@ private:
             double d;
             if (!read(d))
                 return JSValue();
-            return jsNumber(m_exec, d);
+            return jsNumber(d);
         }
         case DateTag: {
             double d;
index 6b7735a..70c327e 100644 (file)
@@ -2158,7 +2158,8 @@ sub GenerateImplementation
             if ($constant->type eq "DOMString") {
                 push(@implContent, "    return jsStringOrNull(exec, String(" . $constant->value . "));\n");
             } else {
-                push(@implContent, "    return jsNumber(exec, static_cast<int>(" . $constant->value . "));\n");
+                push(@implContent, "    UNUSED_PARAM(exec);");
+                push(@implContent, "    return jsNumber(static_cast<int>(" . $constant->value . "));\n");
             }
             push(@implContent, "}\n\n");
         }
@@ -2182,9 +2183,9 @@ sub GenerateImplementation
     }
     
     if ($dataNode->extendedAttributes->{"HasNumericIndexGetter"}) {
-        push(@implContent, "\nJSValue ${className}::getByIndex(ExecState* exec, unsigned index)\n");
+        push(@implContent, "\nJSValue ${className}::getByIndex(ExecState*, unsigned index)\n");
         push(@implContent, "{\n");
-        push(@implContent, "    return jsNumber(exec, static_cast<$implClassName*>(impl())->item(index));\n");
+        push(@implContent, "    return jsNumber(static_cast<$implClassName*>(impl())->item(index));\n");
         push(@implContent, "}\n");
         if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") {
             $implIncludes{"JSNode.h"} = 1;
@@ -2573,7 +2574,7 @@ sub NativeToJSValue
     }
     if ($codeGenerator->IsPrimitiveType($type) or $type eq "SVGPaintType" or $type eq "DOMTimeStamp") {
         $implIncludes{"<runtime/JSNumberCell.h>"} = 1;
-        return "jsNumber(exec, $value)";
+        return "jsNumber($value)";
     }
 
     if ($codeGenerator->IsStringType($type)) {
@@ -2981,7 +2982,7 @@ sub GenerateConstructorDefinition
     } else {
         push(@$outputArray, "    putDirect(exec->propertyNames().prototype, ${protoClassName}::self(exec, globalObject), DontDelete | ReadOnly);\n");
     }
-    push(@$outputArray, "    putDirect(exec->propertyNames().length, jsNumber(exec, ${numberOfconstructParameters}), ReadOnly | DontDelete | DontEnum);\n") if $numberOfconstructParameters;
+    push(@$outputArray, "    putDirect(exec->propertyNames().length, jsNumber(${numberOfconstructParameters}), ReadOnly | DontDelete | DontEnum);\n") if $numberOfconstructParameters;
     push(@$outputArray, "}\n\n");
 
     push(@$outputArray, "bool ${constructorClassName}::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)\n");
index 03e72fc..f1dd4e5 100644 (file)
@@ -265,10 +265,10 @@ JSValue CInstance::stringValue(ExecState* exec) const
     return jsString(exec, buf);
 }
 
-JSValue CInstance::numberValue(ExecState* exec) const
+JSValue CInstance::numberValue(ExecState*) const
 {
     // FIXME: Implement something sensible.
-    return jsNumber(exec, 0);
+    return jsNumber(0);
 }
 
 JSValue CInstance::booleanValue() const
index b160f9f..e786896 100644 (file)
@@ -118,9 +118,9 @@ JSValue convertNPVariantToValue(ExecState* exec, const NPVariant* variant, RootO
     if (type == NPVariantType_Void)
         return jsUndefined();
     if (type == NPVariantType_Int32)
-        return jsNumber(exec, NPVARIANT_TO_INT32(*variant));
+        return jsNumber(NPVARIANT_TO_INT32(*variant));
     if (type == NPVariantType_Double)
-        return jsNumber(exec, NPVARIANT_TO_DOUBLE(*variant));
+        return jsNumber(NPVARIANT_TO_DOUBLE(*variant));
     if (type == NPVariantType_String)
         return WebCore::jsString(exec, convertNPStringToUTF16(&variant->value.stringValue));
     if (type == NPVariantType_Object) {
index 8a34ced..3c16d05 100644 (file)
@@ -132,7 +132,7 @@ JSValue JavaField::valueFromInstance(ExecState* exec, const Instance* i) const
             jint value;
             jvalue result = dispatchValueFromInstance(exec, instance, "getInt", "(Ljava/lang/Object;)I", int_type);
             value = result.i;
-            jsresult = jsNumber(exec, static_cast<int>(value));
+            jsresult = jsNumber(static_cast<int>(value));
         }
         break;
 
@@ -143,7 +143,7 @@ JSValue JavaField::valueFromInstance(ExecState* exec, const Instance* i) const
             jdouble value;
             jvalue result = dispatchValueFromInstance(exec, instance, "getDouble", "(Ljava/lang/Object;)D", double_type);
             value = result.i;
-            jsresult = jsNumber(exec, static_cast<double>(value));
+            jsresult = jsNumber(static_cast<double>(value));
         }
         break;
     default:
@@ -380,7 +380,7 @@ JSValue JavaArray::valueAt(ExecState* exec, unsigned index) const
             jbyteArray byteArray = static_cast<jbyteArray>(javaArray());
             jbyte aByte;
             env->GetByteArrayRegion(byteArray, index, 1, &aByte);
-            return jsNumber(exec, aByte);
+            return jsNumber(aByte);
         }
 
     case char_type:
@@ -388,7 +388,7 @@ JSValue JavaArray::valueAt(ExecState* exec, unsigned index) const
             jcharArray charArray = static_cast<jcharArray>(javaArray());
             jchar aChar;
             env->GetCharArrayRegion(charArray, index, 1, &aChar);
-            return jsNumber(exec, aChar);
+            return jsNumber(aChar);
             break;
         }
 
@@ -397,7 +397,7 @@ JSValue JavaArray::valueAt(ExecState* exec, unsigned index) const
             jshortArray shortArray = static_cast<jshortArray>(javaArray());
             jshort aShort;
             env->GetShortArrayRegion(shortArray, index, 1, &aShort);
-            return jsNumber(exec, aShort);
+            return jsNumber(aShort);
         }
 
     case int_type:
@@ -405,7 +405,7 @@ JSValue JavaArray::valueAt(ExecState* exec, unsigned index) const
             jintArray intArray = static_cast<jintArray>(javaArray());
             jint anInt;
             env->GetIntArrayRegion(intArray, index, 1, &anInt);
-            return jsNumber(exec, anInt);
+            return jsNumber(anInt);
         }
 
     case long_type:
@@ -413,7 +413,7 @@ JSValue JavaArray::valueAt(ExecState* exec, unsigned index) const
             jlongArray longArray = static_cast<jlongArray>(javaArray());
             jlong aLong;
             env->GetLongArrayRegion(longArray, index, 1, &aLong);
-            return jsNumber(exec, aLong);
+            return jsNumber(aLong);
         }
 
     case float_type:
@@ -421,7 +421,7 @@ JSValue JavaArray::valueAt(ExecState* exec, unsigned index) const
             jfloatArray floatArray = static_cast<jfloatArray>(javaArray());
             jfloat aFloat;
             env->GetFloatArrayRegion(floatArray, index, 1, &aFloat);
-            return jsNumber(exec, aFloat);
+            return jsNumber(aFloat);
         }
 
     case double_type:
@@ -429,7 +429,7 @@ JSValue JavaArray::valueAt(ExecState* exec, unsigned index) const
             jdoubleArray doubleArray = static_cast<jdoubleArray>(javaArray());
             jdouble aDouble;
             env->GetDoubleArrayRegion(doubleArray, index, 1, &aDouble);
-            return jsNumber(exec, aDouble);
+            return jsNumber(aDouble);
         }
     default:
         break;
index 7218688..6332545 100644 (file)
@@ -99,10 +99,10 @@ JSValue JavaInstance::stringValue(ExecState* exec) const
     return jsString(exec, u);
 }
 
-JSValue JavaInstance::numberValue(ExecState* exec) const
+JSValue JavaInstance::numberValue(ExecState*) const
 {
     jdouble doubleValue = callJNIMethod<jdouble>(m_instance->m_instance, "doubleValue", "()D");
-    return jsNumber(exec, doubleValue);
+    return jsNumber(doubleValue);
 }
 
 JSValue JavaInstance::booleanValue() const
@@ -279,43 +279,43 @@ JSValue JavaInstance::invokeMethod(ExecState* exec, RuntimeMethod* runtimeMethod
 
     case byte_type:
         {
-            resultValue = jsNumber(exec, result.b);
+            resultValue = jsNumber(result.b);
         }
         break;
 
     case char_type:
         {
-            resultValue = jsNumber(exec, result.c);
+            resultValue = jsNumber(result.c);
         }
         break;
 
     case short_type:
         {
-            resultValue = jsNumber(exec, result.s);
+            resultValue = jsNumber(result.s);
         }
         break;
 
     case int_type:
         {
-            resultValue = jsNumber(exec, result.i);
+            resultValue = jsNumber(result.i);
         }
         break;
 
     case long_type:
         {
-            resultValue = jsNumber(exec, result.j);
+            resultValue = jsNumber(result.j);
         }
         break;
 
     case float_type:
         {
-            resultValue = jsNumber(exec, result.f);
+            resultValue = jsNumber(result.f);
         }
         break;
 
     case double_type:
         {
-            resultValue = jsNumber(exec, result.d);
+            resultValue = jsNumber(result.d);
         }
         break;
 
index 989d9eb..ae9d95d 100644 (file)
@@ -447,10 +447,10 @@ JSValue ObjcInstance::stringValue(ExecState* exec) const
     return convertNSStringToString(exec, [getObject() description]);
 }
 
-JSValue ObjcInstance::numberValue(ExecState* exec) const
+JSValue ObjcInstance::numberValue(ExecState*) const
 {
     // FIXME:  Implement something sensible
-    return jsNumber(exec, 0);
+    return jsNumber(0);
 }
 
 JSValue ObjcInstance::booleanValue() const
index 8eb7ba5..dfba852 100644 (file)
@@ -242,7 +242,7 @@ JSValue convertObjcValueToValue(ExecState* exec, void* buffer, ObjcValueType typ
             if ((CFBooleanRef)obj == kCFBooleanFalse)
                 return jsBoolean(false);
             if ([obj isKindOfClass:[NSNumber class]])
-                return jsNumber(exec, [obj doubleValue]);
+                return jsNumber([obj doubleValue]);
             if ([obj isKindOfClass:[NSArray class]])
                 return new (exec) RuntimeArray(exec, new ObjcArray(obj, rootObject));
             if ([obj isKindOfClass:webScriptObjectClass()]) {
@@ -256,29 +256,29 @@ JSValue convertObjcValueToValue(ExecState* exec, void* buffer, ObjcValueType typ
             return ObjcInstance::create(obj, rootObject)->createRuntimeObject(exec);
         }
         case ObjcCharType:
-            return jsNumber(exec, *(char*)buffer);
+            return jsNumber(*(char*)buffer);
         case ObjcUnsignedCharType:
-            return jsNumber(exec, *(unsigned char*)buffer);
+            return jsNumber(*(unsigned char*)buffer);
         case ObjcShortType:
-            return jsNumber(exec, *(short*)buffer);
+            return jsNumber(*(short*)buffer);
         case ObjcUnsignedShortType:
-            return jsNumber(exec, *(unsigned short*)buffer);
+            return jsNumber(*(unsigned short*)buffer);
         case ObjcIntType:
-            return jsNumber(exec, *(int*)buffer);
+            return jsNumber(*(int*)buffer);
         case ObjcUnsignedIntType:
-            return jsNumber(exec, *(unsigned int*)buffer);
+            return jsNumber(*(unsigned int*)buffer);
         case ObjcLongType:
-            return jsNumber(exec, *(long*)buffer);
+            return jsNumber(*(long*)buffer);
         case ObjcUnsignedLongType:
-            return jsNumber(exec, *(unsigned long*)buffer);
+            return jsNumber(*(unsigned long*)buffer);
         case ObjcLongLongType:
-            return jsNumber(exec, *(long long*)buffer);
+            return jsNumber(*(long long*)buffer);
         case ObjcUnsignedLongLongType:
-            return jsNumber(exec, *(unsigned long long*)buffer);
+            return jsNumber(*(unsigned long long*)buffer);
         case ObjcFloatType:
-            return jsNumber(exec, *(float*)buffer);
+            return jsNumber(*(float*)buffer);
         case ObjcDoubleType:
-            return jsNumber(exec, *(double*)buffer);
+            return jsNumber(*(double*)buffer);
         default:
             // Should never get here. Argument types are filtered.
             fprintf(stderr, "%s: invalid type (%d)\n", __PRETTY_FUNCTION__, (int)type);
index ca12f48..2d0b7e3 100644 (file)
@@ -50,10 +50,10 @@ RuntimeArray::~RuntimeArray()
     delete getConcreteArray();
 }
 
-JSValue RuntimeArray::lengthGetter(ExecState* exec, JSValue slotBase, const Identifier&)
+JSValue RuntimeArray::lengthGetter(ExecState*, JSValue slotBase, const Identifier&)
 {
     RuntimeArray* thisObj = static_cast<RuntimeArray*>(asObject(slotBase));
-    return jsNumber(exec, thisObj->getLength());
+    return jsNumber(thisObj->getLength());
 }
 
 JSValue RuntimeArray::indexGetter(ExecState* exec, JSValue slotBase, unsigned index)
index 15e029c..8a61f2e 100644 (file)
@@ -52,7 +52,7 @@ RuntimeMethod::RuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, cons
 {
 }
 
-JSValue RuntimeMethod::lengthGetter(ExecState* exec, JSValue slotBase, const Identifier&)
+JSValue RuntimeMethod::lengthGetter(ExecState*, JSValue slotBase, const Identifier&)
 {
     RuntimeMethod* thisObj = static_cast<RuntimeMethod*>(asObject(slotBase));
 
@@ -62,7 +62,7 @@ JSValue RuntimeMethod::lengthGetter(ExecState* exec, JSValue slotBase, const Ide
     // Java does.
     // FIXME: a better solution might be to give the maximum number of parameters
     // of any method
-    return jsNumber(exec, thisObj->_methodList->at(0)->numParameters());
+    return jsNumber(thisObj->_methodList->at(0)->numParameters());
 }
 
 bool RuntimeMethod::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
index 5c0b25a..64b3980 100644 (file)
@@ -1,3 +1,17 @@
+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-24  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Anders Carlsson.
index 10e9b42..a2d4a96 100644 (file)
@@ -1334,7 +1334,7 @@ bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArr
             result = jsBoolean([[array objectAtIndex:index++] boolValue]);
             return true;
         case DoubleValueType:
-            result = jsNumber(exec, [[array objectAtIndex:index++] doubleValue]);
+            result = jsNumber([[array objectAtIndex:index++] doubleValue]);
             return true;
         case StringValueType: {
             NSString *string = [array objectAtIndex:index++];
index 11ade8c..927a008 100644 (file)
@@ -273,10 +273,10 @@ JSValue ProxyInstance::stringValue(ExecState* exec) const
     return jsEmptyString(exec);
 }
 
-JSValue ProxyInstance::numberValue(ExecState* exec) const
+JSValue ProxyInstance::numberValue(ExecState*) const
 {
     // FIXME: Implement something sensible.
-    return jsNumber(exec, 0);
+    return jsNumber(0);
 }
 
 JSValue ProxyInstance::booleanValue() const
index e3c121c..5c55c15 100644 (file)
@@ -1,3 +1,15 @@
+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):
+
 2010-10-25  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Darin Adler.
index a39baae..7328d9d 100644 (file)
@@ -122,10 +122,10 @@ JSValue NPRuntimeObjectMap::convertNPVariantToJSValue(JSC::ExecState* exec, JSC:
         return jsBoolean(variant.value.boolValue);
 
     case NPVariantType_Int32:
-        return jsNumber(exec, variant.value.intValue);
+        return jsNumber(variant.value.intValue);
 
     case NPVariantType_Double:
-        return jsNumber(exec, variant.value.doubleValue);
+        return jsNumber(variant.value.doubleValue);
 
     case NPVariantType_String:
         return jsString(exec, String::fromUTF8WithLatin1Fallback(variant.value.stringValue.UTF8Characters,