Commit 92fdaefb authored by weinig@apple.com's avatar weinig@apple.com

JavaScriptCore:

2009-01-19  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Gavin Barraclough.

        Remove temporary operator-> from JSValuePtr.

        * API/JSCallbackFunction.cpp:
        (JSC::JSCallbackFunction::call):
        * API/JSCallbackObjectFunctions.h:
        (JSC::::call):
        (JSC::::toNumber):
        (JSC::::toString):
        * API/JSObjectRef.cpp:
        (JSObjectSetPrototype):
        * API/JSValueRef.cpp:
        (JSValueGetType):
        (JSValueIsUndefined):
        (JSValueIsNull):
        (JSValueIsBoolean):
        (JSValueIsNumber):
        (JSValueIsString):
        (JSValueIsObject):
        (JSValueIsObjectOfClass):
        (JSValueToBoolean):
        (JSValueToNumber):
        (JSValueToStringCopy):
        (JSValueToObject):
        * bytecode/CodeBlock.cpp:
        (JSC::valueToSourceString):
        (JSC::CodeBlock::mark):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::isKnownNotImmediate):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::emitEqualityOp):
        (JSC::keyForImmediateSwitch):
        * interpreter/Interpreter.cpp:
        (JSC::jsLess):
        (JSC::jsLessEq):
        (JSC::jsAddSlowCase):
        (JSC::jsAdd):
        (JSC::jsTypeStringForValue):
        (JSC::jsIsObjectType):
        (JSC::jsIsFunctionType):
        (JSC::isNotObject):
        (JSC::Interpreter::callEval):
        (JSC::Interpreter::throwException):
        (JSC::cachePrototypeChain):
        (JSC::Interpreter::tryCachePutByID):
        (JSC::countPrototypeChainEntriesAndCheckForProxies):
        (JSC::Interpreter::tryCacheGetByID):
        (JSC::Interpreter::privateExecute):
        (JSC::Interpreter::tryCTICachePutByID):
        (JSC::Interpreter::tryCTICacheGetByID):
        (JSC::Interpreter::cti_op_convert_this):
        (JSC::Interpreter::cti_op_add):
        (JSC::Interpreter::cti_op_pre_inc):
        (JSC::Interpreter::cti_op_put_by_id_generic):
        (JSC::Interpreter::cti_op_get_by_id_generic):
        (JSC::Interpreter::cti_op_put_by_id):
        (JSC::Interpreter::cti_op_put_by_id_second):
        (JSC::Interpreter::cti_op_put_by_id_fail):
        (JSC::Interpreter::cti_op_get_by_id):
        (JSC::Interpreter::cti_op_get_by_id_second):
        (JSC::Interpreter::cti_op_get_by_id_self_fail):
        (JSC::Interpreter::cti_op_get_by_id_proto_list):
        (JSC::Interpreter::cti_op_get_by_id_proto_list_full):
        (JSC::Interpreter::cti_op_get_by_id_proto_fail):
        (JSC::Interpreter::cti_op_get_by_id_array_fail):
        (JSC::Interpreter::cti_op_get_by_id_string_fail):
        (JSC::Interpreter::cti_op_instanceof):
        (JSC::Interpreter::cti_op_del_by_id):
        (JSC::Interpreter::cti_op_mul):
        (JSC::Interpreter::cti_op_call_JSFunction):
        (JSC::Interpreter::cti_op_call_NotJSFunction):
        (JSC::Interpreter::cti_op_construct_JSConstruct):
        (JSC::Interpreter::cti_op_construct_NotJSConstruct):
        (JSC::Interpreter::cti_op_get_by_val):
        (JSC::Interpreter::cti_op_get_by_val_byte_array):
        (JSC::Interpreter::cti_op_sub):
        (JSC::Interpreter::cti_op_put_by_val):
        (JSC::Interpreter::cti_op_put_by_val_array):
        (JSC::Interpreter::cti_op_put_by_val_byte_array):
        (JSC::Interpreter::cti_op_loop_if_true):
        (JSC::Interpreter::cti_op_negate):
        (JSC::Interpreter::cti_op_div):
        (JSC::Interpreter::cti_op_pre_dec):
        (JSC::Interpreter::cti_op_not):
        (JSC::Interpreter::cti_op_jtrue):
        (JSC::Interpreter::cti_op_post_inc):
        (JSC::Interpreter::cti_op_lshift):
        (JSC::Interpreter::cti_op_bitand):
        (JSC::Interpreter::cti_op_rshift):
        (JSC::Interpreter::cti_op_bitnot):
        (JSC::Interpreter::cti_op_mod):
        (JSC::Interpreter::cti_op_post_dec):
        (JSC::Interpreter::cti_op_urshift):
        (JSC::Interpreter::cti_op_bitxor):
        (JSC::Interpreter::cti_op_bitor):
        (JSC::Interpreter::cti_op_push_scope):
        (JSC::Interpreter::cti_op_is_undefined):
        (JSC::Interpreter::cti_op_is_boolean):
        (JSC::Interpreter::cti_op_is_number):
        (JSC::Interpreter::cti_op_to_jsnumber):
        (JSC::Interpreter::cti_op_in):
        (JSC::Interpreter::cti_op_put_by_index):
        (JSC::Interpreter::cti_op_switch_imm):
        (JSC::Interpreter::cti_op_switch_char):
        (JSC::Interpreter::cti_op_switch_string):
        (JSC::Interpreter::cti_op_del_by_val):
        (JSC::Interpreter::cti_op_put_getter):
        (JSC::Interpreter::cti_op_put_setter):
        (JSC::Interpreter::cti_op_new_error):
        * interpreter/Interpreter.h:
        (JSC::Interpreter::isJSArray):
        (JSC::Interpreter::isJSString):
        (JSC::Interpreter::isJSByteArray):
        * interpreter/Register.h:
        (JSC::Register::marked):
        (JSC::Register::mark):
        * jit/JITInlineMethods.h:
        (JSC::JIT::getConstantOperandImmediateInt):
        (JSC::JIT::isOperandConstantImmediateInt):
        * jsc.cpp:
        (functionPrint):
        (functionDebug):
        (functionRun):
        (functionLoad):
        (runWithScripts):
        (runInteractive):
        * parser/Nodes.cpp:
        (JSC::processClauseList):
        * profiler/ProfileGenerator.cpp:
        (JSC::ProfileGenerator::addParentForConsoleStart):
        * profiler/Profiler.cpp:
        (JSC::Profiler::createCallIdentifier):
        * runtime/ArrayConstructor.cpp:
        (JSC::constructArrayWithSizeQuirk):
        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncToString):
        (JSC::arrayProtoFuncToLocaleString):
        (JSC::arrayProtoFuncJoin):
        (JSC::arrayProtoFuncConcat):
        (JSC::arrayProtoFuncPop):
        (JSC::arrayProtoFuncPush):
        (JSC::arrayProtoFuncReverse):
        (JSC::arrayProtoFuncShift):
        (JSC::arrayProtoFuncSlice):
        (JSC::arrayProtoFuncSort):
        (JSC::arrayProtoFuncSplice):
        (JSC::arrayProtoFuncUnShift):
        (JSC::arrayProtoFuncFilter):
        (JSC::arrayProtoFuncMap):
        (JSC::arrayProtoFuncEvery):
        (JSC::arrayProtoFuncForEach):
        (JSC::arrayProtoFuncSome):
        (JSC::arrayProtoFuncIndexOf):
        (JSC::arrayProtoFuncLastIndexOf):
        * runtime/BooleanConstructor.cpp:
        (JSC::constructBoolean):
        (JSC::callBooleanConstructor):
        * runtime/BooleanPrototype.cpp:
        (JSC::booleanProtoFuncToString):
        (JSC::booleanProtoFuncValueOf):
        * runtime/Collector.cpp:
        (JSC::Heap::protect):
        (JSC::Heap::unprotect):
        (JSC::Heap::heap):
        (JSC::Heap::collect):
        (JSC::typeName):
        * runtime/Completion.cpp:
        (JSC::evaluate):
        * runtime/DateConstructor.cpp:
        (JSC::constructDate):
        (JSC::dateParse):
        (JSC::dateUTC):
        * runtime/DateInstance.h:
        (JSC::DateInstance::internalNumber):
        * runtime/DatePrototype.cpp:
        (JSC::formatLocaleDate):
        (JSC::fillStructuresUsingTimeArgs):
        (JSC::fillStructuresUsingDateArgs):
        (JSC::dateProtoFuncToString):
        (JSC::dateProtoFuncToUTCString):
        (JSC::dateProtoFuncToDateString):
        (JSC::dateProtoFuncToTimeString):
        (JSC::dateProtoFuncToLocaleString):
        (JSC::dateProtoFuncToLocaleDateString):
        (JSC::dateProtoFuncToLocaleTimeString):
        (JSC::dateProtoFuncGetTime):
        (JSC::dateProtoFuncGetFullYear):
        (JSC::dateProtoFuncGetUTCFullYear):
        (JSC::dateProtoFuncToGMTString):
        (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/ErrorConstructor.cpp:
        (JSC::constructError):
        * runtime/ErrorPrototype.cpp:
        (JSC::errorProtoFuncToString):
        * runtime/ExceptionHelpers.cpp:
        (JSC::createError):
        (JSC::createErrorMessage):
        * runtime/FunctionConstructor.cpp:
        (JSC::constructFunction):
        * runtime/FunctionPrototype.cpp:
        (JSC::functionProtoFuncToString):
        (JSC::functionProtoFuncApply):
        (JSC::functionProtoFuncCall):
        * runtime/GetterSetter.cpp:
        (JSC::GetterSetter::toObject):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::getOwnPropertySlot):
        * runtime/JSArray.cpp:
        (JSC::JSArray::put):
        (JSC::JSArray::mark):
        (JSC::JSArray::sort):
        (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key):
        (JSC::JSArray::compactForSorting):
        * runtime/JSByteArray.h:
        (JSC::JSByteArray::setIndex):
        * runtime/JSCell.h:
        (JSC::asCell):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::call):
        (JSC::JSFunction::construct):
        * runtime/JSGlobalObject.cpp:
        (JSC::markIfNeeded):
        (JSC::lastInPrototypeChain):
        * runtime/JSGlobalObjectFunctions.cpp:
        (JSC::encode):
        (JSC::decode):
        (JSC::globalFuncEval):
        (JSC::globalFuncParseInt):
        (JSC::globalFuncParseFloat):
        (JSC::globalFuncIsNaN):
        (JSC::globalFuncIsFinite):
        (JSC::globalFuncEscape):
        (JSC::globalFuncUnescape):
        (JSC::globalFuncJSCPrint):
        * runtime/JSImmediate.cpp:
        (JSC::JSImmediate::toThisObject):
        (JSC::JSImmediate::toObject):
        (JSC::JSImmediate::prototype):
        (JSC::JSImmediate::toString):
        * runtime/JSImmediate.h:
        * runtime/JSObject.cpp:
        (JSC::JSObject::mark):
        (JSC::JSObject::put):
        (JSC::callDefaultValueFunction):
        (JSC::JSObject::getPrimitiveNumber):
        (JSC::JSObject::defineGetter):
        (JSC::JSObject::defineSetter):
        (JSC::JSObject::lookupGetter):
        (JSC::JSObject::lookupSetter):
        (JSC::JSObject::hasInstance):
        (JSC::JSObject::toNumber):
        (JSC::JSObject::toString):
        * runtime/JSObject.h:
        (JSC::JSObject::JSObject):
        (JSC::JSObject::inlineGetOwnPropertySlot):
        (JSC::JSObject::getOwnPropertySlotForWrite):
        (JSC::JSObject::getPropertySlot):
        (JSC::JSValuePtr::get):
        * runtime/JSPropertyNameIterator.h:
        (JSC::JSPropertyNameIterator::create):
        * runtime/JSString.cpp:
        (JSC::JSString::getOwnPropertySlot):
        * runtime/JSValue.h:
        * runtime/JSWrapperObject.cpp:
        (JSC::JSWrapperObject::mark):
        * runtime/JSWrapperObject.h:
        (JSC::JSWrapperObject::setInternalValue):
        * runtime/MathObject.cpp:
        (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::mathProtoFuncRound):
        (JSC::mathProtoFuncSin):
        (JSC::mathProtoFuncSqrt):
        (JSC::mathProtoFuncTan):
        * runtime/NativeErrorConstructor.cpp:
        (JSC::NativeErrorConstructor::NativeErrorConstructor):
        (JSC::NativeErrorConstructor::construct):
        * runtime/NumberConstructor.cpp:
        (JSC::constructWithNumberConstructor):
        (JSC::callNumberConstructor):
        * runtime/NumberPrototype.cpp:
        (JSC::numberProtoFuncToString):
        (JSC::numberProtoFuncToLocaleString):
        (JSC::numberProtoFuncValueOf):
        (JSC::numberProtoFuncToFixed):
        (JSC::numberProtoFuncToExponential):
        (JSC::numberProtoFuncToPrecision):
        * runtime/ObjectConstructor.cpp:
        (JSC::constructObject):
        * runtime/ObjectPrototype.cpp:
        (JSC::objectProtoFuncValueOf):
        (JSC::objectProtoFuncHasOwnProperty):
        (JSC::objectProtoFuncIsPrototypeOf):
        (JSC::objectProtoFuncDefineGetter):
        (JSC::objectProtoFuncDefineSetter):
        (JSC::objectProtoFuncLookupGetter):
        (JSC::objectProtoFuncLookupSetter):
        (JSC::objectProtoFuncPropertyIsEnumerable):
        (JSC::objectProtoFuncToLocaleString):
        (JSC::objectProtoFuncToString):
        * runtime/Operations.h:
        (JSC::JSValuePtr::equalSlowCaseInline):
        (JSC::JSValuePtr::strictEqual):
        (JSC::JSValuePtr::strictEqualSlowCaseInline):
        * runtime/Protect.h:
        (JSC::gcProtect):
        (JSC::gcUnprotect):
        * runtime/RegExpConstructor.cpp:
        (JSC::setRegExpConstructorInput):
        (JSC::setRegExpConstructorMultiline):
        (JSC::constructRegExp):
        * runtime/RegExpObject.cpp:
        (JSC::setRegExpObjectLastIndex):
        (JSC::RegExpObject::match):
        * runtime/RegExpPrototype.cpp:
        (JSC::regExpProtoFuncTest):
        (JSC::regExpProtoFuncExec):
        (JSC::regExpProtoFuncCompile):
        (JSC::regExpProtoFuncToString):
        * runtime/StringConstructor.cpp:
        (JSC::stringFromCharCodeSlowCase):
        (JSC::stringFromCharCode):
        (JSC::constructWithStringConstructor):
        (JSC::callStringConstructor):
        * runtime/StringPrototype.cpp:
        (JSC::stringProtoFuncReplace):
        (JSC::stringProtoFuncToString):
        (JSC::stringProtoFuncCharAt):
        (JSC::stringProtoFuncCharCodeAt):
        (JSC::stringProtoFuncConcat):
        (JSC::stringProtoFuncIndexOf):
        (JSC::stringProtoFuncLastIndexOf):
        (JSC::stringProtoFuncMatch):
        (JSC::stringProtoFuncSearch):
        (JSC::stringProtoFuncSlice):
        (JSC::stringProtoFuncSplit):
        (JSC::stringProtoFuncSubstr):
        (JSC::stringProtoFuncSubstring):
        (JSC::stringProtoFuncToLowerCase):
        (JSC::stringProtoFuncToUpperCase):
        (JSC::stringProtoFuncLocaleCompare):
        (JSC::stringProtoFuncBig):
        (JSC::stringProtoFuncSmall):
        (JSC::stringProtoFuncBlink):
        (JSC::stringProtoFuncBold):
        (JSC::stringProtoFuncFixed):
        (JSC::stringProtoFuncItalics):
        (JSC::stringProtoFuncStrike):
        (JSC::stringProtoFuncSub):
        (JSC::stringProtoFuncSup):
        (JSC::stringProtoFuncFontcolor):
        (JSC::stringProtoFuncFontsize):
        (JSC::stringProtoFuncAnchor):
        (JSC::stringProtoFuncLink):
        * runtime/Structure.cpp:
        (JSC::Structure::Structure):
        (JSC::Structure::getEnumerablePropertyNames):
        (JSC::Structure::createCachedPrototypeChain):
        * runtime/Structure.h:
        (JSC::Structure::mark):
        * runtime/StructureChain.cpp:
        (JSC::StructureChain::StructureChain):

JavaScriptGlue:

2009-01-19  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Gavin Barraclough.

        Remove temporary operator-> from JSValuePtr.

        * JSUtils.cpp:
        (KJSValueToJSObject):
        (KJSValueToCFTypeInternal):
        * JSValueWrapper.cpp:
        (JSValueWrapper::JSObjectCopyPropertyNames):
        (JSValueWrapper::JSObjectCopyProperty):
        (JSValueWrapper::JSObjectSetProperty):
        (JSValueWrapper::JSObjectCallFunction):
        (JSValueWrapper::JSObjectMark):
        * UserObjectImp.cpp:
        (UserObjectImp::getOwnPropertySlot):

WebCore:

2009-01-19  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Gavin Barraclough.

        Remove temporary operator-> from JSValuePtr.

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSAudioConstructor.cpp:
        (WebCore::constructAudio):
        * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
        (WebCore::toHTMLCanvasStyle):
        (WebCore::JSCanvasRenderingContext2D::setFillColor):
        (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
        (WebCore::JSCanvasRenderingContext2D::strokeRect):
        (WebCore::JSCanvasRenderingContext2D::drawImage):
        (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
        (WebCore::JSCanvasRenderingContext2D::setShadow):
        (WebCore::JSCanvasRenderingContext2D::createPattern):
        (WebCore::JSCanvasRenderingContext2D::putImageData):
        (WebCore::JSCanvasRenderingContext2D::fillText):
        (WebCore::JSCanvasRenderingContext2D::strokeText):
        * bindings/js/JSClipboardCustom.cpp:
        (WebCore::JSClipboard::clearData):
        (WebCore::JSClipboard::getData):
        (WebCore::JSClipboard::setData):
        (WebCore::JSClipboard::setDragImage):
        * bindings/js/JSCustomPositionCallback.cpp:
        (WebCore::JSCustomPositionCallback::handleEvent):
        * bindings/js/JSCustomPositionErrorCallback.cpp:
        (WebCore::JSCustomPositionErrorCallback::handleEvent):
        * bindings/js/JSCustomSQLStatementCallback.cpp:
        (WebCore::JSCustomSQLStatementCallback::handleEvent):
        * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
        (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
        * bindings/js/JSCustomSQLTransactionCallback.cpp:
        (WebCore::JSCustomSQLTransactionCallback::handleEvent):
        * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
        (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
        * bindings/js/JSCustomVoidCallback.cpp:
        (WebCore::JSCustomVoidCallback::handleEvent):
        (WebCore::toVoidCallback):
        * bindings/js/JSCustomXPathNSResolver.cpp:
        (WebCore::JSCustomXPathNSResolver::create):
        (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
        * bindings/js/JSDOMApplicationCacheCustom.cpp:
        (WebCore::JSDOMApplicationCache::hasItem):
        (WebCore::JSDOMApplicationCache::add):
        (WebCore::JSDOMApplicationCache::remove):
        (WebCore::JSDOMApplicationCache::addEventListener):
        (WebCore::JSDOMApplicationCache::removeEventListener):
        * bindings/js/JSDOMBinding.cpp:
        (WebCore::valueToStringWithNullCheck):
        (WebCore::valueToStringWithUndefinedOrNullCheck):
        (WebCore::reportException):
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::JSDOMGlobalObject::findJSEventListener):
        (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
        (WebCore::JSDOMGlobalObject::findJSUnprotectedEventListener):
        (WebCore::JSDOMGlobalObject::findOrCreateJSUnprotectedEventListener):
        * bindings/js/JSDOMStringListCustom.cpp:
        (WebCore::JSDOMStringList::item):
        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::getOwnPropertySlot):
        (windowProtoFuncOpen):
        (WebCore::toJSDOMWindow):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::setLocation):
        (WebCore::JSDOMWindow::postMessage):
        (WebCore::setTimeoutOrInterval):
        (WebCore::JSDOMWindow::clearTimeout):
        (WebCore::JSDOMWindow::clearInterval):
        (WebCore::JSDOMWindow::atob):
        (WebCore::JSDOMWindow::btoa):
        (WebCore::JSDOMWindow::addEventListener):
        (WebCore::JSDOMWindow::removeEventListener):
        (WebCore::toDOMWindow):
        * bindings/js/JSDatabaseCustom.cpp:
        (WebCore::JSDatabase::changeVersion):
        (WebCore::JSDatabase::transaction):
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::JSDocument::setLocation):
        * bindings/js/JSElementCustom.cpp:
        (WebCore::JSElement::setAttribute):
        (WebCore::JSElement::setAttributeNS):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSAbstractEventListener::handleEvent):
        (WebCore::JSLazyEventListener::parseCode):
        * bindings/js/JSEventTargetNodeCustom.cpp:
        (WebCore::JSEventTargetNode::addEventListener):
        (WebCore::JSEventTargetNode::removeEventListener):
        * bindings/js/JSGeolocationCustom.cpp:
        (WebCore::createPositionOptions):
        (WebCore::JSGeolocation::getCurrentPosition):
        (WebCore::JSGeolocation::watchPosition):
        * bindings/js/JSHTMLCollectionCustom.cpp:
        (WebCore::callHTMLCollection):
        (WebCore::JSHTMLCollection::canGetItemsForName):
        (WebCore::JSHTMLCollection::item):
        (WebCore::JSHTMLCollection::namedItem):
        * bindings/js/JSHTMLDocumentCustom.cpp:
        (WebCore::JSHTMLDocument::open):
        (WebCore::writeHelper):
        * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
        (WebCore::JSHTMLOptionsCollection::setLength):
        (WebCore::JSHTMLOptionsCollection::add):
        * bindings/js/JSHTMLSelectElementCustom.cpp:
        (WebCore::JSHTMLSelectElement::remove):
        (WebCore::selectIndexSetter):
        * bindings/js/JSImageConstructor.cpp:
        (WebCore::constructImage):
        * bindings/js/JSInspectedObjectWrapper.cpp:
        (WebCore::JSInspectedObjectWrapper::wrap):
        (WebCore::JSInspectedObjectWrapper::prepareIncomingValue):
        * bindings/js/JSInspectorCallbackWrapper.cpp:
        (WebCore::JSInspectorCallbackWrapper::wrap):
        * bindings/js/JSJavaScriptCallFrameCustom.cpp:
        (WebCore::JSJavaScriptCallFrame::evaluate):
        * bindings/js/JSLocationCustom.cpp:
        (WebCore::JSLocation::setHref):
        (WebCore::JSLocation::setProtocol):
        (WebCore::JSLocation::setHost):
        (WebCore::JSLocation::setHostname):
        (WebCore::JSLocation::setPort):
        (WebCore::JSLocation::setPathname):
        (WebCore::JSLocation::setSearch):
        (WebCore::JSLocation::setHash):
        (WebCore::JSLocation::replace):
        (WebCore::JSLocation::assign):
        * bindings/js/JSMessageChannelConstructor.cpp:
        (WebCore::JSMessageChannelConstructor::mark):
        * bindings/js/JSMessagePortCustom.cpp:
        (WebCore::JSMessagePort::startConversation):
        (WebCore::JSMessagePort::addEventListener):
        (WebCore::JSMessagePort::removeEventListener):
        * bindings/js/JSNodeFilterCondition.cpp:
        (WebCore::JSNodeFilterCondition::mark):
        (WebCore::JSNodeFilterCondition::acceptNode):
        * bindings/js/JSNodeFilterCondition.h:
        * bindings/js/JSNodeFilterCustom.cpp:
        (WebCore::toNodeFilter):
        * bindings/js/JSNodeListCustom.cpp:
        (WebCore::callNodeList):
        * bindings/js/JSOptionConstructor.cpp:
        (WebCore::constructHTMLOptionElement):
        * bindings/js/JSQuarantinedObjectWrapper.cpp:
        (WebCore::JSQuarantinedObjectWrapper::asWrapper):
        (WebCore::JSQuarantinedObjectWrapper::construct):
        * bindings/js/JSSQLResultSetRowListCustom.cpp:
        (WebCore::JSSQLResultSetRowList::item):
        * bindings/js/JSSQLTransactionCustom.cpp:
        (WebCore::JSSQLTransaction::executeSql):
        * bindings/js/JSSVGElementInstanceCustom.cpp:
        (WebCore::JSSVGElementInstance::addEventListener):
        (WebCore::JSSVGElementInstance::removeEventListener):
        * bindings/js/JSSVGLengthCustom.cpp:
        (WebCore::JSSVGLength::convertToSpecifiedUnits):
        * bindings/js/JSSVGMatrixCustom.cpp:
        (WebCore::JSSVGMatrix::translate):
        (WebCore::JSSVGMatrix::scale):
        (WebCore::JSSVGMatrix::scaleNonUniform):
        (WebCore::JSSVGMatrix::rotate):
        (WebCore::JSSVGMatrix::rotateFromVector):
        (WebCore::JSSVGMatrix::skewX):
        (WebCore::JSSVGMatrix::skewY):
        * bindings/js/JSSVGPathSegListCustom.cpp:
        (WebCore::JSSVGPathSegList::getItem):
        (WebCore::JSSVGPathSegList::insertItemBefore):
        (WebCore::JSSVGPathSegList::replaceItem):
        (WebCore::JSSVGPathSegList::removeItem):
        * bindings/js/JSSVGPointListCustom.cpp:
        (WebCore::JSSVGPointList::getItem):
        (WebCore::JSSVGPointList::insertItemBefore):
        (WebCore::JSSVGPointList::replaceItem):
        (WebCore::JSSVGPointList::removeItem):
        * bindings/js/JSSVGTransformListCustom.cpp:
        (WebCore::JSSVGTransformList::getItem):
        (WebCore::JSSVGTransformList::insertItemBefore):
        (WebCore::JSSVGTransformList::replaceItem):
        (WebCore::JSSVGTransformList::removeItem):
        * bindings/js/JSStorageCustom.cpp:
        (WebCore::JSStorage::deleteProperty):
        (WebCore::JSStorage::customPut):
        * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
        (WebCore::constructWebKitCSSMatrix):
        * bindings/js/JSWorkerConstructor.cpp:
        (WebCore::constructWorker):
        * bindings/js/JSWorkerContextCustom.cpp:
        (WebCore::JSWorkerContext::addEventListener):
        (WebCore::JSWorkerContext::removeEventListener):
        * bindings/js/JSWorkerCustom.cpp:
        (WebCore::JSWorker::addEventListener):
        (WebCore::JSWorker::removeEventListener):
        * bindings/js/JSXMLHttpRequestCustom.cpp:
        (WebCore::JSXMLHttpRequest::open):
        (WebCore::JSXMLHttpRequest::setRequestHeader):
        (WebCore::JSXMLHttpRequest::send):
        (WebCore::JSXMLHttpRequest::getResponseHeader):
        (WebCore::JSXMLHttpRequest::overrideMimeType):
        (WebCore::JSXMLHttpRequest::addEventListener):
        (WebCore::JSXMLHttpRequest::removeEventListener):
        * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
        (WebCore::JSXMLHttpRequestUpload::addEventListener):
        (WebCore::JSXMLHttpRequestUpload::removeEventListener):
        * bindings/js/JSXSLTProcessorCustom.cpp:
        (WebCore::JSXSLTProcessor::importStylesheet):
        (WebCore::JSXSLTProcessor::transformToFragment):
        (WebCore::JSXSLTProcessor::transformToDocument):
        (WebCore::JSXSLTProcessor::setParameter):
        (WebCore::JSXSLTProcessor::getParameter):
        (WebCore::JSXSLTProcessor::removeParameter):
        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::executeFunctionInContext):
        * bindings/js/ScriptCallStack.cpp:
        (WebCore::ScriptCallStack::initialize):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::createScriptObjectForPluginElement):
        * bindings/js/ScriptValue.cpp:
        (WebCore::ScriptValue::getString):
        (WebCore::ScriptValue::isNull):
        (WebCore::ScriptValue::isUndefined):
        * bindings/objc/WebScriptObject.mm:
        (-[WebScriptObject callWebScriptMethod:withArguments:]):
        (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
        * bindings/scripts/CodeGeneratorJS.pm:
        * bridge/NP_jsobject.cpp:
        (_NPN_InvokeDefault):
        (_NPN_Invoke):
        (_NPN_HasMethod):
        (_NPN_Construct):
        * bridge/c/c_utility.cpp:
        (JSC::Bindings::convertValueToNPVariant):
        * bridge/jni/jni_instance.cpp:
        (JavaInstance::invokeMethod):
        * bridge/jni/jni_jsobject.mm:
        (JavaJSObject::call):
        (JavaJSObject::convertValueToJObject):
        * bridge/jni/jni_runtime.cpp:
        (JavaField::dispatchValueFromInstance):
        (JavaField::valueFromInstance):
        (JavaField::dispatchSetValueToInstance):
        (JavaField::setValueToInstance):
        * bridge/jni/jni_utility.cpp:
        (JSC::Bindings::convertArrayInstanceToJavaArray):
        (JSC::Bindings::convertValueToJValue):
        * bridge/objc/objc_runtime.mm:
        (JSC::Bindings::callObjCFallbackObject):
        * bridge/objc/objc_utility.mm:
        (JSC::Bindings::convertValueToObjcValue):
        * bridge/runtime_method.cpp:
        (JSC::callRuntimeMethod):
        * bridge/runtime_object.cpp:
        (JSC::RuntimeObjectImp::getOwnPropertySlot):
        (JSC::callRuntimeConstructor):

WebKit/mac:

2009-01-19  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Gavin Barraclough.

        Remove temporary operator-> from JSValuePtr.

        * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
        (WebKit::NetscapePluginInstanceProxy::invoke):
        (WebKit::NetscapePluginInstanceProxy::hasMethod):
        (WebKit::NetscapePluginInstanceProxy::marshalValue):
        * WebView/WebFrame.mm:
        (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
        * WebView/WebView.mm:
        (aeDescFromJSValue):

WebKit/win:

2009-01-19  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Gavin Barraclough.

        Remove temporary operator-> from JSValuePtr.

        * WebScriptCallFrame.cpp:
        (WebScriptCallFrame::jsValueToString):
        * WebView.cpp:
        (WebView::stringByEvaluatingJavaScriptFromString):

WebKit/wx:

2009-01-19  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Gavin Barraclough.

        Remove temporary operator-> from JSValuePtr.

        * WebFrame.cpp:
        (wxWebFrame::RunScript):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3a6f4624
......@@ -50,7 +50,7 @@ JSValuePtr JSCallbackFunction::call(ExecState* exec, JSObject* functionObject, J
{
JSContextRef execRef = toRef(exec);
JSObjectRef functionRef = toRef(functionObject);
JSObjectRef thisObjRef = toRef(thisValue->toThisObject(exec));
JSObjectRef thisObjRef = toRef(thisValue.toThisObject(exec));
int argumentCount = static_cast<int>(args.size());
Vector<JSValueRef, 16> arguments(argumentCount);
......
......@@ -308,7 +308,7 @@ JSValuePtr JSCallbackObject<Base>::call(ExecState* exec, JSObject* functionObjec
{
JSContextRef execRef = toRef(exec);
JSObjectRef functionRef = toRef(functionObject);
JSObjectRef thisObjRef = toRef(thisValue->toThisObject(exec));
JSObjectRef thisObjRef = toRef(thisValue.toThisObject(exec));
for (JSClassRef jsClass = static_cast<JSCallbackObject<Base>*>(functionObject)->classRef(); jsClass; jsClass = jsClass->parentClass) {
if (JSObjectCallAsFunctionCallback callAsFunction = jsClass->callAsFunction) {
......@@ -379,7 +379,7 @@ double JSCallbackObject<Base>::toNumber(ExecState* exec) const
JSLock::DropAllLocks dropAllLocks(exec);
if (JSValueRef value = convertToType(ctx, thisRef, kJSTypeNumber, toRef(exec->exceptionSlot()))) {
double dValue;
return toJS(value)->getNumber(dValue) ? dValue : NaN;
return toJS(value).getNumber(dValue) ? dValue : NaN;
}
}
......@@ -400,7 +400,7 @@ UString JSCallbackObject<Base>::toString(ExecState* exec) const
value = convertToType(ctx, thisRef, kJSTypeString, toRef(exec->exceptionSlot()));
}
if (value)
return toJS(value)->getString();
return toJS(value).getString();
}
return Base::toString(exec);
......
......@@ -237,7 +237,7 @@ void JSObjectSetPrototype(JSContextRef, JSObjectRef object, JSValueRef value)
JSObject* jsObject = toJS(object);
JSValuePtr jsValue = toJS(value);
jsObject->setPrototype(jsValue->isObject() ? jsValue : jsNull());
jsObject->setPrototype(jsValue.isObject() ? jsValue : jsNull());
}
bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName)
......
......@@ -44,17 +44,17 @@
JSType JSValueGetType(JSContextRef, JSValueRef value)
{
JSC::JSValuePtr jsValue = toJS(value);
if (jsValue->isUndefined())
if (jsValue.isUndefined())
return kJSTypeUndefined;
if (jsValue->isNull())
if (jsValue.isNull())
return kJSTypeNull;
if (jsValue->isBoolean())
if (jsValue.isBoolean())
return kJSTypeBoolean;
if (jsValue->isNumber())
if (jsValue.isNumber())
return kJSTypeNumber;
if (jsValue->isString())
if (jsValue.isString())
return kJSTypeString;
ASSERT(jsValue->isObject());
ASSERT(jsValue.isObject());
return kJSTypeObject;
}
......@@ -63,44 +63,44 @@ using namespace JSC; // placed here to avoid conflict between JSC::JSType and JS
bool JSValueIsUndefined(JSContextRef, JSValueRef value)
{
JSValuePtr jsValue = toJS(value);
return jsValue->isUndefined();
return jsValue.isUndefined();
}
bool JSValueIsNull(JSContextRef, JSValueRef value)
{
JSValuePtr jsValue = toJS(value);
return jsValue->isNull();
return jsValue.isNull();
}
bool JSValueIsBoolean(JSContextRef, JSValueRef value)
{
JSValuePtr jsValue = toJS(value);
return jsValue->isBoolean();
return jsValue.isBoolean();
}
bool JSValueIsNumber(JSContextRef, JSValueRef value)
{
JSValuePtr jsValue = toJS(value);
return jsValue->isNumber();
return jsValue.isNumber();
}
bool JSValueIsString(JSContextRef, JSValueRef value)
{
JSValuePtr jsValue = toJS(value);
return jsValue->isString();
return jsValue.isString();
}
bool JSValueIsObject(JSContextRef, JSValueRef value)
{
JSValuePtr jsValue = toJS(value);
return jsValue->isObject();
return jsValue.isObject();
}
bool JSValueIsObjectOfClass(JSContextRef, JSValueRef value, JSClassRef jsClass)
{
JSValuePtr jsValue = toJS(value);
if (JSObject* o = jsValue->getObject()) {
if (JSObject* o = jsValue.getObject()) {
if (o->inherits(&JSCallbackObject<JSGlobalObject>::info))
return static_cast<JSCallbackObject<JSGlobalObject>*>(o)->inherits(jsClass);
else if (o->inherits(&JSCallbackObject<JSObject>::info))
......@@ -192,7 +192,7 @@ bool JSValueToBoolean(JSContextRef ctx, JSValueRef value)
{
ExecState* exec = toJS(ctx);
JSValuePtr jsValue = toJS(value);
return jsValue->toBoolean(exec);
return jsValue.toBoolean(exec);
}
double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception)
......@@ -203,7 +203,7 @@ double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception
JSValuePtr jsValue = toJS(value);
double number = jsValue->toNumber(exec);
double number = jsValue.toNumber(exec);
if (exec->hadException()) {
if (exception)
*exception = toRef(exec->exception());
......@@ -221,7 +221,7 @@ JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef*
JSValuePtr jsValue = toJS(value);
RefPtr<OpaqueJSString> stringRef(OpaqueJSString::create(jsValue->toString(exec)));
RefPtr<OpaqueJSString> stringRef(OpaqueJSString::create(jsValue.toString(exec)));
if (exec->hadException()) {
if (exception)
*exception = toRef(exec->exception());
......@@ -239,7 +239,7 @@ JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exce
JSValuePtr jsValue = toJS(value);
JSObjectRef objectRef = toRef(jsValue->toObject(exec));
JSObjectRef objectRef = toRef(jsValue.toObject(exec));
if (exec->hadException()) {
if (exception)
*exception = toRef(exec->exception());
......
This diff is collapsed.
......@@ -57,13 +57,13 @@ static UString escapeQuotes(const UString& str)
static UString valueToSourceString(ExecState* exec, JSValuePtr val)
{
if (val->isString()) {
if (val.isString()) {
UString result("\"");
result += escapeQuotes(val->toString(exec)) + "\"";
result += escapeQuotes(val.toString(exec)) + "\"";
return result;
}
return val->toString(exec);
return val.toString(exec);
}
static CString registerName(int r)
......@@ -1379,8 +1379,8 @@ void CodeBlock::mark()
m_rareData->m_functions[i]->body()->mark();
for (size_t i = 0; i < m_rareData->m_unexpectedConstants.size(); ++i) {
if (!m_rareData->m_unexpectedConstants[i]->marked())
m_rareData->m_unexpectedConstants[i]->mark();
if (!m_rareData->m_unexpectedConstants[i].marked())
m_rareData->m_unexpectedConstants[i].mark();
}
m_rareData->m_evalCodeCache.mark();
}
......
......@@ -253,7 +253,7 @@ namespace JSC {
return true;
if (isConstantRegisterIndex(index))
return getConstant(index)->isCell();
return getConstant(index).isCell();
return false;
}
......
......@@ -814,7 +814,7 @@ RegisterID* BytecodeGenerator::emitEqualityOp(OpcodeID opcodeID, RegisterID* dst
if (src1->index() == dstIndex
&& src1->isTemporary()
&& m_codeBlock->isConstantRegisterIndex(src2->index())
&& m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue(m_scopeChain->globalObject()->globalExec())->isString()) {
&& m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue(m_scopeChain->globalObject()->globalExec()).isString()) {
const UString& value = asString(m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue(m_scopeChain->globalObject()->globalExec()))->value();
if (value == "undefined") {
rewindUnaryOp();
......@@ -1687,7 +1687,7 @@ static int32_t keyForImmediateSwitch(ExpressionNode* node, int32_t min, int32_t
ASSERT(node->isNumber());
double value = static_cast<NumberNode*>(node)->value();
int32_t key = static_cast<int32_t>(value);
ASSERT(JSValuePtr::makeInt32Fast(key) && (JSValuePtr::makeInt32Fast(key)->getInt32Fast() == value));
ASSERT(JSValuePtr::makeInt32Fast(key) && (JSValuePtr::makeInt32Fast(key).getInt32Fast() == value));
ASSERT(key == value);
ASSERT(key >= min);
ASSERT(key <= max);
......
This diff is collapsed.
......@@ -292,9 +292,9 @@ namespace JSC {
// Default number of ticks before a timeout check should be done.
static const int initialTickCountThreshold = 1024;
bool isJSArray(JSValuePtr v) { return v->isCell() && v->asCell()->vptr() == m_jsArrayVptr; }
bool isJSString(JSValuePtr v) { return v->isCell() && v->asCell()->vptr() == m_jsStringVptr; }
bool isJSByteArray(JSValuePtr v) { return v->isCell() && v->asCell()->vptr() == m_jsByteArrayVptr; }
bool isJSArray(JSValuePtr v) { return v.isCell() && v.asCell()->vptr() == m_jsArrayVptr; }
bool isJSString(JSValuePtr v) { return v.isCell() && v.asCell()->vptr() == m_jsStringVptr; }
bool isJSByteArray(JSValuePtr v) { return v.isCell() && v.asCell()->vptr() == m_jsByteArrayVptr; }
private:
enum ExecutionFlag { Normal, InitializeAndReturn };
......
......@@ -162,12 +162,12 @@ namespace JSC {
ALWAYS_INLINE bool Register::marked() const
{
return getJSValue()->marked();
return getJSValue().marked();
}
ALWAYS_INLINE void Register::mark()
{
getJSValue()->mark();
getJSValue().mark();
}
// Interpreter functions
......
......@@ -120,12 +120,12 @@ ALWAYS_INLINE JSValuePtr JIT::getConstantOperand(unsigned src)
ALWAYS_INLINE int32_t JIT::getConstantOperandImmediateInt(unsigned src)
{
return getConstantOperand(src)->getInt32Fast();
return getConstantOperand(src).getInt32Fast();
}
ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(unsigned src)
{
return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src)->isInt32Fast();
return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isInt32Fast();
}
// get arg puts an arg from the SF register array onto the stack, as an arg to a context threaded function.
......
......@@ -180,7 +180,7 @@ JSValuePtr functionPrint(ExecState* exec, JSObject*, JSValuePtr, const ArgList&
if (i != 0)
putchar(' ');
printf("%s", args.at(exec, i)->toString(exec).UTF8String().c_str());
printf("%s", args.at(exec, i).toString(exec).UTF8String().c_str());
}
putchar('\n');
......@@ -190,7 +190,7 @@ JSValuePtr functionPrint(ExecState* exec, JSObject*, JSValuePtr, const ArgList&
JSValuePtr functionDebug(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
fprintf(stderr, "--> %s\n", args.at(exec, 0)->toString(exec).UTF8String().c_str());
fprintf(stderr, "--> %s\n", args.at(exec, 0).toString(exec).UTF8String().c_str());
return jsUndefined();
}
......@@ -211,7 +211,7 @@ JSValuePtr functionVersion(ExecState*, JSObject*, JSValuePtr, const ArgList&)
JSValuePtr functionRun(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
StopWatch stopWatch;
UString fileName = args.at(exec, 0)->toString(exec);
UString fileName = args.at(exec, 0).toString(exec);
Vector<char> script;
if (!fillBufferWithContentsOfFile(fileName, script))
return throwError(exec, GeneralError, "Could not open file.");
......@@ -227,7 +227,7 @@ JSValuePtr functionRun(ExecState* exec, JSObject*, JSValuePtr, const ArgList& ar
JSValuePtr functionLoad(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
UString fileName = args.at(exec, 0)->toString(exec);
UString fileName = args.at(exec, 0).toString(exec);
Vector<char> script;
if (!fillBufferWithContentsOfFile(fileName, script))
return throwError(exec, GeneralError, "Could not open file.");
......@@ -340,9 +340,9 @@ static bool runWithScripts(GlobalObject* globalObject, const Vector<UString>& fi
success = success && completion.complType() != Throw;
if (dump) {
if (completion.complType() == Throw)
printf("Exception: %s\n", completion.value()->toString(globalObject->globalExec()).ascii());
printf("Exception: %s\n", completion.value().toString(globalObject->globalExec()).ascii());
else
printf("End: %s\n", completion.value()->toString(globalObject->globalExec()).ascii());
printf("End: %s\n", completion.value().toString(globalObject->globalExec()).ascii());
}
globalObject->globalExec()->clearException();
......@@ -384,9 +384,9 @@ static void runInteractive(GlobalObject* globalObject)
Completion completion = evaluate(globalObject->globalExec(), globalObject->globalScopeChain(), makeSource(line.data(), interpreterName));
#endif
if (completion.complType() == Throw)
printf("Exception: %s\n", completion.value()->toString(globalObject->globalExec()).ascii());
printf("Exception: %s\n", completion.value().toString(globalObject->globalExec()).ascii());
else
printf("%s\n", completion.value()->toString(globalObject->globalExec()).UTF8String().c_str());
printf("%s\n", completion.value().toString(globalObject->globalExec()).UTF8String().c_str());
globalObject->globalExec()->clearException();
}
......
......@@ -2102,7 +2102,7 @@ static void processClauseList(ClauseListNode* list, Vector<ExpressionNode*, 8>&
if (clauseExpression->isNumber()) {
double value = static_cast<NumberNode*>(clauseExpression)->value();
JSValuePtr jsValue = JSValuePtr::makeInt32Fast(static_cast<int32_t>(value));
if ((typeForTable & ~SwitchNumber) || !jsValue || (jsValue->getInt32Fast() != value)) {
if ((typeForTable & ~SwitchNumber) || !jsValue || (jsValue.getInt32Fast() != value)) {
typeForTable = SwitchNeither;
break;
}
......
......@@ -62,7 +62,7 @@ void ProfileGenerator::addParentForConsoleStart(ExecState* exec)
JSValuePtr function;
exec->interpreter()->retrieveLastCaller(exec, lineNumber, sourceID, sourceURL, function);
m_currentNode = ProfileNode::create(Profiler::createCallIdentifier(&exec->globalData(), function ? function->toThisObject(exec) : 0, sourceURL, lineNumber), m_head.get(), m_head.get());
m_currentNode = ProfileNode::create(Profiler::createCallIdentifier(&exec->globalData(), function ? function.toThisObject(exec) : 0, sourceURL, lineNumber), m_head.get(), m_head.get());
m_head->insertNode(m_currentNode.get());
}
......
......@@ -135,7 +135,7 @@ CallIdentifier Profiler::createCallIdentifier(JSGlobalData* globalData, JSValueP
{
if (!function)
return CallIdentifier(GlobalCodeExecution, defaultSourceURL, defaultLineNumber);
if (!function->isObject())
if (!function.isObject())
return CallIdentifier("(unknown)", defaultSourceURL, defaultLineNumber);
if (asObject(function)->inherits(&JSFunction::info))
return createCallIdentifierFromFunctionImp(globalData, asFunction(function));
......
......@@ -45,9 +45,9 @@ ArrayConstructor::ArrayConstructor(ExecState* exec, PassRefPtr<Structure> struct
static JSObject* constructArrayWithSizeQuirk(ExecState* exec, const ArgList& args)
{
// a single numeric argument denotes the array size (!)
if (args.size() == 1 && args.at(exec, 0)->isNumber()) {
uint32_t n = args.at(exec, 0)->toUInt32(exec);
if (n != args.at(exec, 0)->toNumber(exec))
if (args.size() == 1 && args.at(exec, 0).isNumber()) {
uint32_t n = args.at(exec, 0).toUInt32(exec);
if (n != args.at(exec, 0).toNumber(exec))
return throwError(exec, RangeError, "Array size is not a small enough positive integer.");
return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), n);
}
......
This diff is collapsed.
......@@ -41,7 +41,7 @@ BooleanConstructor::BooleanConstructor(ExecState* exec, PassRefPtr<Structure> st
JSObject* constructBoolean(ExecState* exec, const ArgList& args)
{
BooleanObject* obj = new (exec) BooleanObject(exec->lexicalGlobalObject()->booleanObjectStructure());
obj->setInternalValue(jsBoolean(args.at(exec, 0)->toBoolean(exec)));
obj->setInternalValue(jsBoolean(args.at(exec, 0).toBoolean(exec)));
return obj;
}
......@@ -59,7 +59,7 @@ ConstructType BooleanConstructor::getConstructData(ConstructData& constructData)
// ECMA 15.6.1
static JSValuePtr callBooleanConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
return jsBoolean(args.at(exec, 0)->toBoolean(exec));
return jsBoolean(args.at(exec, 0).toBoolean(exec));
}
CallType BooleanConstructor::getCallData(CallData& callData)
......
......@@ -58,7 +58,7 @@ JSValuePtr booleanProtoFuncToString(ExecState* exec, JSObject*, JSValuePtr thisV
if (thisValue == jsBoolean(true))
return jsNontrivialString(exec, "true");
if (!thisValue->isObject(&BooleanObject::info))
if (!thisValue.isObject(&BooleanObject::info))
return throwError(exec, TypeError);
if (asBooleanObject(thisValue)->internalValue() == jsBoolean(false))
......@@ -70,10 +70,10 @@ JSValuePtr booleanProtoFuncToString(ExecState* exec, JSObject*, JSValuePtr thisV
JSValuePtr booleanProtoFuncValueOf(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
if (thisValue->isBoolean())
if (thisValue.isBoolean())
return thisValue;
if (!thisValue->isObject(&BooleanObject::info))
if (!thisValue.isObject(&BooleanObject::info))
return throwError(exec, TypeError);
return asBooleanObject(thisValue)->internalValue();
......
......@@ -809,13 +809,13 @@ void Heap::protect(JSValuePtr k)
ASSERT(k);
ASSERT(JSLock::currentThreadIsHoldingLock() || !m_globalData->isSharedInstance);
if (!k->isCell())
if (!k.isCell())
return;
if (m_protectedValuesMutex)
m_protectedValuesMutex->lock();
m_protectedValues.add(k->asCell());
m_protectedValues.add(k.asCell());
if (m_protectedValuesMutex)
m_protectedValuesMutex->unlock();
......@@ -826,13 +826,13 @@ void Heap::unprotect(JSValuePtr k)
ASSERT(k);
ASSERT(JSLock::currentThreadIsHoldingLock() || !m_globalData->isSharedInstance);
if (!k->isCell())
if (!k.isCell())
return;
if (m_protectedValuesMutex)
m_protectedValuesMutex->lock();
m_protectedValues.remove(k->asCell());
m_protectedValues.remove(k.asCell());
if (m_protectedValuesMutex)
m_protectedValuesMutex->unlock();
......@@ -840,9 +840,9 @@ void Heap::unprotect(JSValuePtr k)
Heap* Heap::heap(JSValuePtr v)
{
if (!v->isCell())
if (!v.isCell())
return 0;
return Heap::cellBlock(v->asCell())->heap;
return Heap::cellBlock(v.asCell())->heap;
}
void Heap::markProtectedObjects()
......@@ -983,8 +983,8 @@ bool Heap::collect()
markProtectedObjects();
if (m_markListSet && m_markListSet->size())
ArgList::markLists(*m_markListSet);
if (m_globalData->exception && !m_globalData->exception->marked())
m_globalData->exception->mark();
if (m_globalData->exception && !m_globalData->exception.marked())
m_globalData->exception.mark();
m_globalData->interpreter->registerFile().markCallFrames(this);
m_globalData->smallStrings.mark();
if (m_globalData->scopeNodeBeingReparsed)
......@@ -1075,16 +1075,16 @@ size_t Heap::protectedObjectCount()
return result;
}
static const char* typeName(JSCell* val)
static const char* typeName(JSCell* cell)
{
if (val->isString())
if (cell->isString())
return "string";
if (val->isNumber())
if (cell->isNumber())
return "number";
if (val->isGetterSetter())
if (cell->isGetterSetter())
return "gettersetter";
ASSERT(val->isObject());
const ClassInfo* info = static_cast<JSObject*>(val)->classInfo();
ASSERT(cell->isObject());
const ClassInfo* info = static_cast<JSObject*>(cell)->classInfo();
return info ? info->className : "Object";
}
......
......@@ -61,13 +61,13 @@ Completion evaluate(ExecState* exec, ScopeChain& scopeChain, const SourceCode& s
if (!programNode)
return Completion(Throw, Error::create(exec, SyntaxError, errMsg, errLine, source.provider()->asID(), source.provider()->url()));
JSObject* thisObj = (!thisValue || thisValue->isUndefinedOrNull()) ? exec->dynamicGlobalObject() : thisValue->toObject(exec);
JSObject* thisObj = (!thisValue || thisValue.isUndefinedOrNull()) ? exec->dynamicGlobalObject() : thisValue.toObject(exec);
JSValuePtr exception = noValue();
JSValuePtr result = exec->interpreter()->execute(programNode.get(), exec, scopeChain.node(), thisObj, &exception);
if (exception) {
if (exception->isObject() && asObject(exception)->isWatchdogException())
if (exception.isObject() && asObject(exception)->isWatchdogException())
return Completion(Interrupted, result);
return Completion(Throw, exception);
}
......
......@@ -73,35 +73,35 @@ JSObject* constructDate(ExecState* exec, const ArgList& args)
if (numArgs == 0) // new Date() ECMA 15.9.3.3
value = getCurrentUTCTime();
else if (numArgs == 1) {
if (args.at(exec, 0)->isObject(&DateInstance::info))
if (args.at(exec, 0).isObject(&DateInstance::info))
value = asDateInstance(args.at(exec, 0))->internalNumber();
else {
JSValuePtr primitive = args.at(exec, 0)->toPrimitive(exec);
if (primitive->isString())
value = parseDate(primitive->getString());
JSValuePtr primitive = args.at(exec, 0).toPrimitive(exec);
if (primitive.isString())
value = parseDate(primitive.getString());
else
value = primitive->toNumber(exec);
value = primitive.toNumber(exec);
}
} else {
if (isnan(args.at(exec, 0)->toNumber(exec))
|| isnan(args.at(exec, 1)->toNumber(exec))
|| (numArgs >= 3 && isnan(args.at(exec, 2)->toNumber(exec)))
|| (numArgs >= 4 && isnan(args.at(exec, 3)->toNumber(exec)))
|| (numArgs >= 5 && isnan(args.at(exec, 4)->toNumber(exec)))
|| (numArgs >= 6 && isnan(args.at(exec, 5)->toNumber(exec)))
|| (numArgs >= 7 && isnan(args.at(exec, 6)->toNumber(exec))))
if (isnan(args.at(exec, 0).toNumber(exec))
|| isnan(args.at(exec, 1).toNumber(exec))
|| (numArgs >= 3 && isnan(args.at(exec, 2).toNumber(exec)))
|| (numArgs >= 4 && isnan(args.at(exec, 3).toNumber(exec)))