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
diff --git a/JavaScriptCore/runtime/ArrayConstructor.cpp b/JavaScriptCore/runtime/ArrayConstructor.cpp
index e63abbc..dd3ff4b 100644
--- a/JavaScriptCore/runtime/ArrayConstructor.cpp
+++ b/JavaScriptCore/runtime/ArrayConstructor.cpp
@@ -45,9 +45,9 @@
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);
}
diff --git a/JavaScriptCore/runtime/ArrayPrototype.cpp b/JavaScriptCore/runtime/ArrayPrototype.cpp
index 009a87c..1413870 100644
--- a/JavaScriptCore/runtime/ArrayPrototype.cpp
+++ b/JavaScriptCore/runtime/ArrayPrototype.cpp
@@ -120,7 +120,7 @@
JSValuePtr arrayProtoFuncToString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&JSArray::info))
+ if (!thisValue.isObject(&JSArray::info))
return throwError(exec, TypeError);
JSObject* thisObj = asArray(thisValue);
@@ -133,7 +133,7 @@
return jsEmptyString(exec); // return an empty string, avoiding infinite recursion.
Vector<UChar, 256> strBuffer;
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
for (unsigned k = 0; k < length; k++) {
if (k >= 1)
strBuffer.append(',');
@@ -144,10 +144,10 @@
}
JSValuePtr element = thisObj->get(exec, k);
- if (element->isUndefinedOrNull())
+ if (element.isUndefinedOrNull())
continue;
- UString str = element->toString(exec);
+ UString str = element.toString(exec);
strBuffer.append(str.data(), str.size());
if (!strBuffer.data()) {
@@ -164,7 +164,7 @@
JSValuePtr arrayProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&JSArray::info))
+ if (!thisValue.isObject(&JSArray::info))
return throwError(exec, TypeError);
JSObject* thisObj = asArray(thisValue);
@@ -177,7 +177,7 @@
return jsEmptyString(exec); // return an empty string, avoding infinite recursion.
Vector<UChar, 256> strBuffer;
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
for (unsigned k = 0; k < length; k++) {
if (k >= 1)
strBuffer.append(',');
@@ -188,18 +188,18 @@
}
JSValuePtr element = thisObj->get(exec, k);
- if (element->isUndefinedOrNull())
+ if (element.isUndefinedOrNull())
continue;
- JSObject* o = element->toObject(exec);
+ JSObject* o = element.toObject(exec);
JSValuePtr conversionFunction = o->get(exec, exec->propertyNames().toLocaleString);
UString str;
CallData callData;
- CallType callType = conversionFunction->getCallData(callData);
+ CallType callType = conversionFunction.getCallData(callData);
if (callType != CallTypeNone)
- str = call(exec, conversionFunction, callType, callData, element, exec->emptyList())->toString(exec);
+ str = call(exec, conversionFunction, callType, callData, element, exec->emptyList()).toString(exec);
else
- str = element->toString(exec);
+ str = element.toString(exec);
strBuffer.append(str.data(), str.size());
if (!strBuffer.data()) {
@@ -216,7 +216,7 @@
JSValuePtr arrayProtoFuncJoin(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
HashSet<JSObject*>& arrayVisitedElements = exec->globalData().arrayVisitedElements;
if (arrayVisitedElements.size() > MaxReentryDepth)
@@ -229,9 +229,9 @@
Vector<UChar, 256> strBuffer;
UChar comma = ',';
- UString separator = args.at(exec, 0)->isUndefined() ? UString(&comma, 1) : args.at(exec, 0)->toString(exec);
+ UString separator = args.at(exec, 0).isUndefined() ? UString(&comma, 1) : args.at(exec, 0).toString(exec);
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
for (unsigned k = 0; k < length; k++) {
if (k >= 1)
strBuffer.append(separator.data(), separator.size());
@@ -242,10 +242,10 @@
}
JSValuePtr element = thisObj->get(exec, k);
- if (element->isUndefinedOrNull())
+ if (element.isUndefinedOrNull())
continue;
- UString str = element->toString(exec);
+ UString str = element.toString(exec);
strBuffer.append(str.data(), str.size());
if (!strBuffer.data()) {
@@ -264,11 +264,11 @@
{
JSArray* arr = constructEmptyArray(exec);
int n = 0;
- JSValuePtr curArg = thisValue->toThisObject(exec);
+ JSValuePtr curArg = thisValue.toThisObject(exec);
ArgList::const_iterator it = args.begin();
ArgList::const_iterator end = args.end();
while (1) {
- if (curArg->isObject(&JSArray::info)) {
+ if (curArg.isObject(&JSArray::info)) {
JSArray* curArray = asArray(curArg);
unsigned length = curArray->length();
for (unsigned k = 0; k < length; ++k) {
@@ -294,9 +294,9 @@
if (exec->interpreter()->isJSArray(thisValue))
return asArray(thisValue)->pop();
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
JSValuePtr result;
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
if (length == 0) {
putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(exec, length));
result = jsUndefined();
@@ -316,8 +316,8 @@
return jsNumber(exec, array->length());
}
- JSObject* thisObj = thisValue->toThisObject(exec);
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
for (unsigned n = 0; n < args.size(); n++)
thisObj->put(exec, length + n, args.at(exec, n));
length += args.size();
@@ -327,8 +327,8 @@
JSValuePtr arrayProtoFuncReverse(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
unsigned middle = length / 2;
for (unsigned k = 0; k < middle; k++) {
@@ -351,10 +351,10 @@
JSValuePtr arrayProtoFuncShift(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
JSValuePtr result;
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
if (length == 0) {
putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(exec, length));
result = jsUndefined();
@@ -376,13 +376,13 @@
{
// http://developer.netscape.com/docs/manuals/js/client/jsref/array.htm#1193713 or 15.4.4.10
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
// We return a new array
JSArray* resObj = constructEmptyArray(exec);
JSValuePtr result = resObj;
- double begin = args.at(exec, 0)->toInteger(exec);
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ double begin = args.at(exec, 0).toInteger(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
if (begin >= 0) {
if (begin > length)
begin = length;
@@ -392,10 +392,10 @@
begin = 0;
}
double end;
- if (args.at(exec, 1)->isUndefined())
+ if (args.at(exec, 1).isUndefined())
end = length;
else {
- end = args.at(exec, 1)->toInteger(exec);
+ end = args.at(exec, 1).toInteger(exec);
if (end < 0) {
end += length;
if (end < 0)
@@ -419,11 +419,11 @@
JSValuePtr arrayProtoFuncSort(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
JSValuePtr function = args.at(exec, 0);
CallData callData;
- CallType callType = function->getCallData(callData);
+ CallType callType = function.getCallData(callData);
if (thisObj->classInfo() == &JSArray::info) {
if (callType != CallTypeNone)
@@ -433,7 +433,7 @@
return thisObj;
}
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
if (!length)
return thisObj;
@@ -447,17 +447,17 @@
for (unsigned j = i + 1; j < length; ++j) {
JSValuePtr jObj = thisObj->get(exec, j);
double compareResult;
- if (jObj->isUndefined())
+ if (jObj.isUndefined())
compareResult = 1; // don't check minObj because there's no need to differentiate == (0) from > (1)
- else if (minObj->isUndefined())
+ else if (minObj.isUndefined())
compareResult = -1;
else if (callType != CallTypeNone) {
ArgList l;
l.append(jObj);
l.append(minObj);
- compareResult = call(exec, function, callType, callData, exec->globalThisValue(), l)->toNumber(exec);
+ compareResult = call(exec, function, callType, callData, exec->globalThisValue(), l).toNumber(exec);
} else
- compareResult = (jObj->toString(exec) < minObj->toString(exec)) ? -1 : 1;
+ compareResult = (jObj.toString(exec) < minObj.toString(exec)) ? -1 : 1;
if (compareResult < 0) {
themin = j;
@@ -475,15 +475,15 @@
JSValuePtr arrayProtoFuncSplice(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
// 15.4.4.12
JSArray* resObj = constructEmptyArray(exec);
JSValuePtr result = resObj;
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
if (!args.size())
return jsUndefined();
- int begin = args.at(exec, 0)->toUInt32(exec);
+ int begin = args.at(exec, 0).toUInt32(exec);
if (begin < 0)
begin = std::max<int>(begin + length, 0);
else
@@ -491,7 +491,7 @@
unsigned deleteCount;
if (args.size() > 1)
- deleteCount = std::min<int>(std::max<int>(args.at(exec, 1)->toUInt32(exec), 0), length - begin);
+ deleteCount = std::min<int>(std::max<int>(args.at(exec, 1).toUInt32(exec), 0), length - begin);
else
deleteCount = length - begin;
@@ -530,10 +530,10 @@
JSValuePtr arrayProtoFuncUnShift(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
// 15.4.4.13
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
unsigned nrArgs = args.size();
if (nrArgs) {
for (unsigned k = length; k > 0; --k) {
@@ -552,19 +552,19 @@
JSValuePtr arrayProtoFuncFilter(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
JSValuePtr function = args.at(exec, 0);
CallData callData;
- CallType callType = function->getCallData(callData);
+ CallType callType = function.getCallData(callData);
if (callType == CallTypeNone)
return throwError(exec, TypeError);
- JSObject* applyThis = args.at(exec, 1)->isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec, 1)->toObject(exec);
+ JSObject* applyThis = args.at(exec, 1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec, 1).toObject(exec);
JSArray* resultArray = constructEmptyArray(exec);
unsigned filterIndex = 0;
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
for (unsigned k = 0; k < length && !exec->hadException(); ++k) {
PropertySlot slot(thisObj);
@@ -581,7 +581,7 @@
JSValuePtr result = call(exec, function, callType, callData, applyThis, eachArguments);
- if (result->toBoolean(exec))
+ if (result.toBoolean(exec))
resultArray->put(exec, filterIndex++, v);
}
return resultArray;
@@ -589,17 +589,17 @@
JSValuePtr arrayProtoFuncMap(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
JSValuePtr function = args.at(exec, 0);
CallData callData;
- CallType callType = function->getCallData(callData);
+ CallType callType = function.getCallData(callData);
if (callType == CallTypeNone)
return throwError(exec, TypeError);
- JSObject* applyThis = args.at(exec, 1)->isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec, 1)->toObject(exec);
+ JSObject* applyThis = args.at(exec, 1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec, 1).toObject(exec);
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
JSArray* resultArray = constructEmptyArray(exec, length);
@@ -630,19 +630,19 @@
JSValuePtr arrayProtoFuncEvery(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
JSValuePtr function = args.at(exec, 0);
CallData callData;
- CallType callType = function->getCallData(callData);
+ CallType callType = function.getCallData(callData);
if (callType == CallTypeNone)
return throwError(exec, TypeError);
- JSObject* applyThis = args.at(exec, 1)->isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec, 1)->toObject(exec);
+ JSObject* applyThis = args.at(exec, 1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec, 1).toObject(exec);
JSValuePtr result = jsBoolean(true);
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
for (unsigned k = 0; k < length && !exec->hadException(); ++k) {
PropertySlot slot(thisObj);
@@ -655,7 +655,7 @@
eachArguments.append(jsNumber(exec, k));
eachArguments.append(thisObj);
- bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments)->toBoolean(exec);
+ bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments).toBoolean(exec);
if (!predicateResult) {
result = jsBoolean(false);
@@ -668,17 +668,17 @@
JSValuePtr arrayProtoFuncForEach(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
JSValuePtr function = args.at(exec, 0);
CallData callData;
- CallType callType = function->getCallData(callData);
+ CallType callType = function.getCallData(callData);
if (callType == CallTypeNone)
return throwError(exec, TypeError);
- JSObject* applyThis = args.at(exec, 1)->isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec, 1)->toObject(exec);
+ JSObject* applyThis = args.at(exec, 1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec, 1).toObject(exec);
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
for (unsigned k = 0; k < length && !exec->hadException(); ++k) {
PropertySlot slot(thisObj);
if (!thisObj->getPropertySlot(exec, k, slot))
@@ -696,19 +696,19 @@
JSValuePtr arrayProtoFuncSome(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
JSValuePtr function = args.at(exec, 0);
CallData callData;
- CallType callType = function->getCallData(callData);
+ CallType callType = function.getCallData(callData);
if (callType == CallTypeNone)
return throwError(exec, TypeError);
- JSObject* applyThis = args.at(exec, 1)->isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec, 1)->toObject(exec);
+ JSObject* applyThis = args.at(exec, 1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec, 1).toObject(exec);
JSValuePtr result = jsBoolean(false);
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
for (unsigned k = 0; k < length && !exec->hadException(); ++k) {
PropertySlot slot(thisObj);
if (!thisObj->getPropertySlot(exec, k, slot))
@@ -719,7 +719,7 @@
eachArguments.append(jsNumber(exec, k));
eachArguments.append(thisObj);
- bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments)->toBoolean(exec);
+ bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments).toBoolean(exec);
if (predicateResult) {
result = jsBoolean(true);
@@ -734,11 +734,11 @@
// JavaScript 1.5 Extension by Mozilla
// Documentation: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
unsigned index = 0;
- double d = args.at(exec, 1)->toInteger(exec);
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ double d = args.at(exec, 1).toInteger(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
if (d < 0)
d += length;
if (d > 0) {
@@ -765,11 +765,11 @@
// JavaScript 1.6 Extension by Mozilla
// Documentation: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:lastIndexOf
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
- unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
int index = length - 1;
- double d = args.at(exec, 1)->toIntegerPreserveNaN(exec);
+ double d = args.at(exec, 1).toIntegerPreserveNaN(exec);
if (d < 0) {
d += length;
diff --git a/JavaScriptCore/runtime/BooleanConstructor.cpp b/JavaScriptCore/runtime/BooleanConstructor.cpp
index aa245bb..bdf3322 100644
--- a/JavaScriptCore/runtime/BooleanConstructor.cpp
+++ b/JavaScriptCore/runtime/BooleanConstructor.cpp
@@ -41,7 +41,7 @@
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 @@
// 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)
diff --git a/JavaScriptCore/runtime/BooleanPrototype.cpp b/JavaScriptCore/runtime/BooleanPrototype.cpp
index 0bd1270..9eb52d1 100644
--- a/JavaScriptCore/runtime/BooleanPrototype.cpp
+++ b/JavaScriptCore/runtime/BooleanPrototype.cpp
@@ -58,7 +58,7 @@
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 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();
diff --git a/JavaScriptCore/runtime/Collector.cpp b/JavaScriptCore/runtime/Collector.cpp
index 74a3ee3..82449d4 100644
--- a/JavaScriptCore/runtime/Collector.cpp
+++ b/JavaScriptCore/runtime/Collector.cpp
@@ -809,13 +809,13 @@
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 @@
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 @@
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 @@
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 @@
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";
}
diff --git a/JavaScriptCore/runtime/Completion.cpp b/JavaScriptCore/runtime/Completion.cpp
index b4923f7..0231a15 100644
--- a/JavaScriptCore/runtime/Completion.cpp
+++ b/JavaScriptCore/runtime/Completion.cpp
@@ -61,13 +61,13 @@
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);
}
diff --git a/JavaScriptCore/runtime/DateConstructor.cpp b/JavaScriptCore/runtime/DateConstructor.cpp
index 6510f4b..92ab897 100644
--- a/JavaScriptCore/runtime/DateConstructor.cpp
+++ b/JavaScriptCore/runtime/DateConstructor.cpp
@@ -73,35 +73,35 @@
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)))
+ || (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))))
value = NaN;
else {
GregorianDateTime t;
- int year = args.at(exec, 0)->toInt32(exec);
+ int year = args.at(exec, 0).toInt32(exec);
t.year = (year >= 0 && year <= 99) ? year : year - 1900;
- t.month = args.at(exec, 1)->toInt32(exec);
- t.monthDay = (numArgs >= 3) ? args.at(exec, 2)->toInt32(exec) : 1;
- t.hour = args.at(exec, 3)->toInt32(exec);
- t.minute = args.at(exec, 4)->toInt32(exec);
- t.second = args.at(exec, 5)->toInt32(exec);
+ t.month = args.at(exec, 1).toInt32(exec);
+ t.monthDay = (numArgs >= 3) ? args.at(exec, 2).toInt32(exec) : 1;
+ t.hour = args.at(exec, 3).toInt32(exec);
+ t.minute = args.at(exec, 4).toInt32(exec);
+ t.second = args.at(exec, 5).toInt32(exec);
t.isDST = -1;
- double ms = (numArgs >= 7) ? args.at(exec, 6)->toNumber(exec) : 0;
+ double ms = (numArgs >= 7) ? args.at(exec, 6).toNumber(exec) : 0;
value = gregorianDateTimeToMS(t, ms, false);
}
}
@@ -140,7 +140,7 @@
static JSValuePtr dateParse(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, parseDate(args.at(exec, 0)->toString(exec)));
+ return jsNumber(exec, parseDate(args.at(exec, 0).toString(exec)));
}
static JSValuePtr dateNow(ExecState* exec, JSObject*, JSValuePtr, const ArgList&)
@@ -151,24 +151,24 @@
static JSValuePtr dateUTC(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
int n = args.size();
- if (isnan(args.at(exec, 0)->toNumber(exec))
- || isnan(args.at(exec, 1)->toNumber(exec))
- || (n >= 3 && isnan(args.at(exec, 2)->toNumber(exec)))
- || (n >= 4 && isnan(args.at(exec, 3)->toNumber(exec)))
- || (n >= 5 && isnan(args.at(exec, 4)->toNumber(exec)))
- || (n >= 6 && isnan(args.at(exec, 5)->toNumber(exec)))
- || (n >= 7 && isnan(args.at(exec, 6)->toNumber(exec))))
+ if (isnan(args.at(exec, 0).toNumber(exec))
+ || isnan(args.at(exec, 1).toNumber(exec))
+ || (n >= 3 && isnan(args.at(exec, 2).toNumber(exec)))
+ || (n >= 4 && isnan(args.at(exec, 3).toNumber(exec)))
+ || (n >= 5 && isnan(args.at(exec, 4).toNumber(exec)))
+ || (n >= 6 && isnan(args.at(exec, 5).toNumber(exec)))
+ || (n >= 7 && isnan(args.at(exec, 6).toNumber(exec))))
return jsNaN(exec);
GregorianDateTime t;
- int year = args.at(exec, 0)->toInt32(exec);
+ int year = args.at(exec, 0).toInt32(exec);
t.year = (year >= 0 && year <= 99) ? year : year - 1900;
- t.month = args.at(exec, 1)->toInt32(exec);
- t.monthDay = (n >= 3) ? args.at(exec, 2)->toInt32(exec) : 1;
- t.hour = args.at(exec, 3)->toInt32(exec);
- t.minute = args.at(exec, 4)->toInt32(exec);
- t.second = args.at(exec, 5)->toInt32(exec);
- double ms = (n >= 7) ? args.at(exec, 6)->toNumber(exec) : 0;
+ t.month = args.at(exec, 1).toInt32(exec);
+ t.monthDay = (n >= 3) ? args.at(exec, 2).toInt32(exec) : 1;
+ t.hour = args.at(exec, 3).toInt32(exec);
+ t.minute = args.at(exec, 4).toInt32(exec);
+ t.second = args.at(exec, 5).toInt32(exec);
+ double ms = (n >= 7) ? args.at(exec, 6).toNumber(exec) : 0;
return jsNumber(exec, gregorianDateTimeToMS(t, ms, true));
}
diff --git a/JavaScriptCore/runtime/DateInstance.h b/JavaScriptCore/runtime/DateInstance.h
index 8dbca81..398f299 100644
--- a/JavaScriptCore/runtime/DateInstance.h
+++ b/JavaScriptCore/runtime/DateInstance.h
@@ -32,7 +32,7 @@
explicit DateInstance(PassRefPtr<Structure>);
virtual ~DateInstance();
- double internalNumber() const { return internalValue()->uncheckedGetNumber(); }
+ double internalNumber() const { return internalValue().uncheckedGetNumber(); }
bool getTime(GregorianDateTime&, int& offset) const;
bool getUTCTime(GregorianDateTime&) const;
diff --git a/JavaScriptCore/runtime/DatePrototype.cpp b/JavaScriptCore/runtime/DatePrototype.cpp
index 11a7646..b325070 100644
--- a/JavaScriptCore/runtime/DatePrototype.cpp
+++ b/JavaScriptCore/runtime/DatePrototype.cpp
@@ -136,16 +136,16 @@
bool useCustomFormat = false;
UString customFormatString;
- UString arg0String = args.at(exec, 0)->toString(exec);
- if (arg0String == "custom" && !args.at(exec, 1)->isUndefined()) {
+ UString arg0String = args.at(exec, 0).toString(exec);
+ if (arg0String == "custom" && !args.at(exec, 1).isUndefined()) {
useCustomFormat = true;
- customFormatString = args.at(exec, 1)->toString(exec);
- } else if (format == LocaleDateAndTime && !args.at(exec, 1)->isUndefined()) {
+ customFormatString = args.at(exec, 1).toString(exec);
+ } else if (format == LocaleDateAndTime && !args.at(exec, 1).isUndefined()) {
dateStyle = styleFromArgString(arg0String, dateStyle);
- timeStyle = styleFromArgString(args.at(exec, 1)->toString(exec), timeStyle);
- } else if (format != LocaleTime && !args.at(exec, 0)->isUndefined())
+ timeStyle = styleFromArgString(args.at(exec, 1).toString(exec), timeStyle);
+ } else if (format != LocaleTime && !args.at(exec, 0).isUndefined())
dateStyle = styleFromArgString(arg0String, dateStyle);
- else if (format != LocaleDate && !args.at(exec, 0)->isUndefined())
+ else if (format != LocaleDate && !args.at(exec, 0).isUndefined())
timeStyle = styleFromArgString(arg0String, timeStyle);
CFLocaleRef locale = CFLocaleCopyCurrent();
@@ -241,19 +241,19 @@
// hours
if (maxArgs >= 4 && idx < numArgs) {
t->hour = 0;
- milliseconds += args.at(exec, idx++)->toInt32(exec, ok) * msPerHour;
+ milliseconds += args.at(exec, idx++).toInt32(exec, ok) * msPerHour;
}
// minutes
if (maxArgs >= 3 && idx < numArgs && ok) {
t->minute = 0;
- milliseconds += args.at(exec, idx++)->toInt32(exec, ok) * msPerMinute;
+ milliseconds += args.at(exec, idx++).toInt32(exec, ok) * msPerMinute;
}
// seconds
if (maxArgs >= 2 && idx < numArgs && ok) {
t->second = 0;
- milliseconds += args.at(exec, idx++)->toInt32(exec, ok) * msPerSecond;
+ milliseconds += args.at(exec, idx++).toInt32(exec, ok) * msPerSecond;
}
if (!ok)
@@ -261,7 +261,7 @@
// milliseconds
if (idx < numArgs) {
- double millis = args.at(exec, idx)->toNumber(exec);
+ double millis = args.at(exec, idx).toNumber(exec);
ok = isfinite(millis);
milliseconds += millis;
} else
@@ -287,16 +287,16 @@
// years
if (maxArgs >= 3 && idx < numArgs)
- t->year = args.at(exec, idx++)->toInt32(exec, ok) - 1900;
+ t->year = args.at(exec, idx++).toInt32(exec, ok) - 1900;
// months
if (maxArgs >= 2 && idx < numArgs && ok)
- t->month = args.at(exec, idx++)->toInt32(exec, ok);
+ t->month = args.at(exec, idx++).toInt32(exec, ok);
// days
if (idx < numArgs && ok) {
t->monthDay = 0;
- *ms += args.at(exec, idx)->toInt32(exec, ok) * msPerDay;
+ *ms += args.at(exec, idx).toInt32(exec, ok) * msPerDay;
}
return ok;
@@ -371,7 +371,7 @@
JSValuePtr dateProtoFuncToString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -388,7 +388,7 @@
JSValuePtr dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = true;
@@ -405,7 +405,7 @@
JSValuePtr dateProtoFuncToDateString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -422,7 +422,7 @@
JSValuePtr dateProtoFuncToTimeString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -439,7 +439,7 @@
JSValuePtr dateProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
DateInstance* thisDateObj = asDateInstance(thisValue);
@@ -452,7 +452,7 @@
JSValuePtr dateProtoFuncToLocaleDateString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
DateInstance* thisDateObj = asDateInstance(thisValue);
@@ -465,7 +465,7 @@
JSValuePtr dateProtoFuncToLocaleTimeString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
DateInstance* thisDateObj = asDateInstance(thisValue);
@@ -478,7 +478,7 @@
JSValuePtr dateProtoFuncGetTime(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
DateInstance* thisDateObj = asDateInstance(thisValue);
@@ -491,7 +491,7 @@
JSValuePtr dateProtoFuncGetFullYear(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -508,7 +508,7 @@
JSValuePtr dateProtoFuncGetUTCFullYear(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = true;
@@ -525,7 +525,7 @@
JSValuePtr dateProtoFuncToGMTString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = true;
@@ -542,7 +542,7 @@
JSValuePtr dateProtoFuncGetMonth(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -559,7 +559,7 @@
JSValuePtr dateProtoFuncGetUTCMonth(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = true;
@@ -576,7 +576,7 @@
JSValuePtr dateProtoFuncGetDate(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -593,7 +593,7 @@
JSValuePtr dateProtoFuncGetUTCDate(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = true;
@@ -610,7 +610,7 @@
JSValuePtr dateProtoFuncGetDay(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -627,7 +627,7 @@
JSValuePtr dateProtoFuncGetUTCDay(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = true;
@@ -644,7 +644,7 @@
JSValuePtr dateProtoFuncGetHours(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -661,7 +661,7 @@
JSValuePtr dateProtoFuncGetUTCHours(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = true;
@@ -678,7 +678,7 @@
JSValuePtr dateProtoFuncGetMinutes(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -695,7 +695,7 @@
JSValuePtr dateProtoFuncGetUTCMinutes(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = true;
@@ -712,7 +712,7 @@
JSValuePtr dateProtoFuncGetSeconds(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -729,7 +729,7 @@
JSValuePtr dateProtoFuncGetUTCSeconds(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = true;
@@ -746,7 +746,7 @@
JSValuePtr dateProtoFuncGetMilliSeconds(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
DateInstance* thisDateObj = asDateInstance(thisValue);
@@ -761,7 +761,7 @@
JSValuePtr dateProtoFuncGetUTCMilliseconds(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
DateInstance* thisDateObj = asDateInstance(thisValue);
@@ -776,7 +776,7 @@
JSValuePtr dateProtoFuncGetTimezoneOffset(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -793,12 +793,12 @@
JSValuePtr dateProtoFuncSetTime(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
DateInstance* thisDateObj = asDateInstance(thisValue);
- double milli = timeClip(args.at(exec, 0)->toNumber(exec));
+ double milli = timeClip(args.at(exec, 0).toNumber(exec));
JSValuePtr result = jsNumber(exec, milli);
thisDateObj->setInternalValue(result);
return result;
@@ -806,7 +806,7 @@
static JSValuePtr setNewValueFromTimeArgs(ExecState* exec, JSValuePtr thisValue, const ArgList& args, int numArgsToUse, bool inputIsUTC)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
DateInstance* thisDateObj = asDateInstance(thisValue);
@@ -837,7 +837,7 @@
static JSValuePtr setNewValueFromDateArgs(ExecState* exec, JSValuePtr thisValue, const ArgList& args, int numArgsToUse, bool inputIsUTC)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
DateInstance* thisDateObj = asDateInstance(thisValue);
@@ -958,7 +958,7 @@
JSValuePtr dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
@@ -985,7 +985,7 @@
}
bool ok = true;
- int32_t year = args.at(exec, 0)->toInt32(exec, ok);
+ int32_t year = args.at(exec, 0).toInt32(exec, ok);
if (!ok) {
JSValuePtr result = jsNaN(exec);
thisDateObj->setInternalValue(result);
@@ -1000,7 +1000,7 @@
JSValuePtr dateProtoFuncGetYear(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&DateInstance::info))
+ if (!thisValue.isObject(&DateInstance::info))
return throwError(exec, TypeError);
const bool utc = false;
diff --git a/JavaScriptCore/runtime/ErrorConstructor.cpp b/JavaScriptCore/runtime/ErrorConstructor.cpp
index 2e8a523..5cc0df0 100644
--- a/JavaScriptCore/runtime/ErrorConstructor.cpp
+++ b/JavaScriptCore/runtime/ErrorConstructor.cpp
@@ -41,8 +41,8 @@
ErrorInstance* constructError(ExecState* exec, const ArgList& args)
{
ErrorInstance* obj = new (exec) ErrorInstance(exec->lexicalGlobalObject()->errorStructure());
- if (!args.at(exec, 0)->isUndefined())
- obj->putDirect(exec->propertyNames().message, jsString(exec, args.at(exec, 0)->toString(exec)));
+ if (!args.at(exec, 0).isUndefined())
+ obj->putDirect(exec->propertyNames().message, jsString(exec, args.at(exec, 0).toString(exec)));
return obj;
}
diff --git a/JavaScriptCore/runtime/ErrorPrototype.cpp b/JavaScriptCore/runtime/ErrorPrototype.cpp
index 35358f7..8703d81 100644
--- a/JavaScriptCore/runtime/ErrorPrototype.cpp
+++ b/JavaScriptCore/runtime/ErrorPrototype.cpp
@@ -46,19 +46,19 @@
JSValuePtr errorProtoFuncToString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
UString s = "Error";
JSValuePtr v = thisObj->get(exec, exec->propertyNames().name);
- if (!v->isUndefined())
- s = v->toString(exec);
+ if (!v.isUndefined())
+ s = v.toString(exec);
v = thisObj->get(exec, exec->propertyNames().message);
- if (!v->isUndefined()) {
+ if (!v.isUndefined()) {
// Mozilla-compatible format.
s += ": ";
- s += v->toString(exec);
+ s += v.toString(exec);
}
return jsNontrivialString(exec, s);
diff --git a/JavaScriptCore/runtime/ExceptionHelpers.cpp b/JavaScriptCore/runtime/ExceptionHelpers.cpp
index 42ddf04..d04e1a5 100644
--- a/JavaScriptCore/runtime/ExceptionHelpers.cpp
+++ b/JavaScriptCore/runtime/ExceptionHelpers.cpp
@@ -78,7 +78,7 @@
JSValuePtr createError(ExecState* exec, ErrorType e, const char* msg, JSValuePtr v)
{
UString message = msg;
- substitute(message, v->toString(exec));
+ substitute(message, v.toString(exec));
return Error::create(exec, e, message, -1, -1, 0);
}
@@ -107,7 +107,7 @@
static UString createErrorMessage(ExecState* exec, CodeBlock* codeBlock, int, int expressionStart, int expressionStop, JSValuePtr value, UString error)
{
if (!expressionStop || expressionStart > codeBlock->source()->length()) {
- UString errorText = value->toString(exec);
+ UString errorText = value.toString(exec);
errorText.append(" is ");
errorText.append(error);
return errorText;
@@ -119,7 +119,7 @@
errorText.append('\'');
errorText.append(codeBlock->source()->getRange(expressionStart, expressionStop));
errorText.append("' [");
- errorText.append(value->toString(exec));
+ errorText.append(value.toString(exec));
errorText.append("] is ");
} else {
// No range information, so give a few characters of context
@@ -140,7 +140,7 @@
errorText.append("near '...");
errorText.append(codeBlock->source()->getRange(start, stop));
errorText.append("...' [");
- errorText.append(value->toString(exec));
+ errorText.append(value.toString(exec));
errorText.append("] is ");
}
errorText.append(error);
diff --git a/JavaScriptCore/runtime/FunctionConstructor.cpp b/JavaScriptCore/runtime/FunctionConstructor.cpp
index e8cfe65..4973bc1 100644
--- a/JavaScriptCore/runtime/FunctionConstructor.cpp
+++ b/JavaScriptCore/runtime/FunctionConstructor.cpp
@@ -97,12 +97,12 @@
if (args.isEmpty())
program = "(function(){})";
else if (args.size() == 1)
- program = "(function(){" + args.at(exec, 0)->toString(exec) + "})";
+ program = "(function(){" + args.at(exec, 0).toString(exec) + "})";
else {
- program = "(function(" + args.at(exec, 0)->toString(exec);
+ program = "(function(" + args.at(exec, 0).toString(exec);
for (size_t i = 1; i < args.size() - 1; i++)
- program += "," + args.at(exec, i)->toString(exec);
- program += "){" + args.at(exec, args.size() - 1)->toString(exec) + "})";
+ program += "," + args.at(exec, i).toString(exec);
+ program += "){" + args.at(exec, args.size() - 1).toString(exec) + "})";
}
int errLine;
diff --git a/JavaScriptCore/runtime/FunctionPrototype.cpp b/JavaScriptCore/runtime/FunctionPrototype.cpp
index 4d9d682..7be2685 100644
--- a/JavaScriptCore/runtime/FunctionPrototype.cpp
+++ b/JavaScriptCore/runtime/FunctionPrototype.cpp
@@ -65,12 +65,12 @@
JSValuePtr functionProtoFuncToString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (thisValue->isObject(&JSFunction::info)) {
+ if (thisValue.isObject(&JSFunction::info)) {
JSFunction* function = asFunction(thisValue);
return jsString(exec, "function " + function->name(&exec->globalData()) + "(" + function->body()->paramString() + ") " + function->body()->toSourceString());
}
- if (thisValue->isObject(&InternalFunction::info)) {
+ if (thisValue.isObject(&InternalFunction::info)) {
InternalFunction* function = asInternalFunction(thisValue);
return jsString(exec, "function " + function->name(&exec->globalData()) + "() {\n [native code]\n}");
}
@@ -81,7 +81,7 @@
JSValuePtr functionProtoFuncApply(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
CallData callData;
- CallType callType = thisValue->getCallData(callData);
+ CallType callType = thisValue.getCallData(callData);
if (callType == CallTypeNone)
return throwError(exec, TypeError);
@@ -89,21 +89,21 @@
JSValuePtr argArray = args.at(exec, 1);
JSValuePtr applyThis;
- if (thisArg->isUndefinedOrNull())
+ if (thisArg.isUndefinedOrNull())
applyThis = exec->globalThisValue();
else
- applyThis = thisArg->toObject(exec);
+ applyThis = thisArg.toObject(exec);
ArgList applyArgs;
- if (!argArray->isUndefinedOrNull()) {
- if (!argArray->isObject())
+ if (!argArray.isUndefinedOrNull()) {
+ if (!argArray.isObject())
return throwError(exec, TypeError);
if (asObject(argArray)->classInfo() == &Arguments::info)
asArguments(argArray)->fillArgList(exec, applyArgs);
else if (exec->interpreter()->isJSArray(argArray))
asArray(argArray)->fillArgList(exec, applyArgs);
else if (asObject(argArray)->inherits(&JSArray::info)) {
- unsigned length = asArray(argArray)->get(exec, exec->propertyNames().length)->toUInt32(exec);
+ unsigned length = asArray(argArray)->get(exec, exec->propertyNames().length).toUInt32(exec);
for (unsigned i = 0; i < length; ++i)
applyArgs.append(asArray(argArray)->get(exec, i));
} else
@@ -116,17 +116,17 @@
JSValuePtr functionProtoFuncCall(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
CallData callData;
- CallType callType = thisValue->getCallData(callData);
+ CallType callType = thisValue.getCallData(callData);
if (callType == CallTypeNone)
return throwError(exec, TypeError);
JSValuePtr thisArg = args.at(exec, 0);
JSObject* callThis;
- if (thisArg->isUndefinedOrNull())
+ if (thisArg.isUndefinedOrNull())
callThis = exec->globalThisValue();
else
- callThis = thisArg->toObject(exec);
+ callThis = thisArg.toObject(exec);
ArgList argsTail;
args.getSlice(1, argsTail);
diff --git a/JavaScriptCore/runtime/GetterSetter.cpp b/JavaScriptCore/runtime/GetterSetter.cpp
index d24a024..39ee6fc 100644
--- a/JavaScriptCore/runtime/GetterSetter.cpp
+++ b/JavaScriptCore/runtime/GetterSetter.cpp
@@ -73,7 +73,7 @@
JSObject* GetterSetter::toObject(ExecState* exec) const
{
ASSERT_NOT_REACHED();
- return jsNull()->toObject(exec);
+ return jsNull().toObject(exec);
}
bool GetterSetter::isGetterSetter() const
diff --git a/JavaScriptCore/runtime/JSActivation.cpp b/JavaScriptCore/runtime/JSActivation.cpp
index d03b3f0..a2d2634 100644
--- a/JavaScriptCore/runtime/JSActivation.cpp
+++ b/JavaScriptCore/runtime/JSActivation.cpp
@@ -99,7 +99,7 @@
// We don't call through to JSObject because there's no way to give an
// activation object getter properties or a prototype.
ASSERT(!hasGetterSetterProperties());
- ASSERT(prototype()->isNull());
+ ASSERT(prototype().isNull());
return false;
}
diff --git a/JavaScriptCore/runtime/JSArray.cpp b/JavaScriptCore/runtime/JSArray.cpp
index 35d0dec..342d073 100644
--- a/JavaScriptCore/runtime/JSArray.cpp
+++ b/JavaScriptCore/runtime/JSArray.cpp
@@ -244,8 +244,8 @@
}
if (propertyName == exec->propertyNames().length) {
- unsigned newLength = value->toUInt32(exec);
- if (value->toNumber(exec) != static_cast<double>(newLength)) {
+ unsigned newLength = value.toUInt32(exec);
+ if (value.toNumber(exec) != static_cast<double>(newLength)) {
throwError(exec, RangeError, "Invalid array length.");
return;
}
@@ -600,16 +600,16 @@
unsigned usedVectorLength = min(storage->m_length, storage->m_vectorLength);
for (unsigned i = 0; i < usedVectorLength; ++i) {
JSValuePtr value = storage->m_vector[i];
- if (value && !value->marked())
- value->mark();
+ if (value && !value.marked())
+ value.mark();
}
if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
SparseArrayValueMap::iterator end = map->end();
for (SparseArrayValueMap::iterator it = map->begin(); it != end; ++it) {
JSValuePtr value = it->second;
- if (!value->marked())
- value->mark();
+ if (!value.marked())
+ value.mark();
}
}
}
@@ -647,7 +647,7 @@
for (size_t i = 0; i < lengthNotIncludingUndefined; i++) {
JSValuePtr value = m_storage->m_vector[i];
- ASSERT(!value->isUndefined());
+ ASSERT(!value.isUndefined());
values[i].first = value;
}
@@ -658,7 +658,7 @@
// a toString call raises an exception.
for (size_t i = 0; i < lengthNotIncludingUndefined; i++)
- values[i].second = values[i].first->toString(exec);
+ values[i].second = values[i].first.toString(exec);
if (exec->hadException())
return;
@@ -733,8 +733,8 @@
int compare_key_key(key va, key vb)
{
- ASSERT(!va->isUndefined());
- ASSERT(!vb->isUndefined());
+ ASSERT(!va.isUndefined());
+ ASSERT(!vb.isUndefined());
if (m_exec->hadException())
return 1;
@@ -742,7 +742,7 @@
ArgList arguments;
arguments.append(va);
arguments.append(vb);
- double compareResult = call(m_exec, m_compareFunction, m_compareCallType, *m_compareCallData, m_globalThisValue, arguments)->toNumber(m_exec);
+ double compareResult = call(m_exec, m_compareFunction, m_compareCallType, *m_compareCallData, m_globalThisValue, arguments).toNumber(m_exec);
return (compareResult < 0) ? -1 : 1; // Not passing equality through, because we need to store all values, even if equivalent.
}
@@ -791,7 +791,7 @@
// Iterate over the array, ignoring missing values, counting undefined ones, and inserting all other ones into the tree.
for (; numDefined < usedVectorLength; ++numDefined) {
JSValuePtr v = m_storage->m_vector[numDefined];
- if (!v || v->isUndefined())
+ if (!v || v.isUndefined())
break;
tree.abstractor().m_nodes[numDefined].value = v;
tree.insert(numDefined);
@@ -799,7 +799,7 @@
for (unsigned i = numDefined; i < usedVectorLength; ++i) {
JSValuePtr v = m_storage->m_vector[i];
if (v) {
- if (v->isUndefined())
+ if (v.isUndefined())
++numUndefined;
else {
tree.abstractor().m_nodes[numDefined].value = v;
@@ -882,13 +882,13 @@
for (; numDefined < usedVectorLength; ++numDefined) {
JSValuePtr v = storage->m_vector[numDefined];
- if (!v || v->isUndefined())
+ if (!v || v.isUndefined())
break;
}
for (unsigned i = numDefined; i < usedVectorLength; ++i) {
JSValuePtr v = storage->m_vector[i];
if (v) {
- if (v->isUndefined())
+ if (v.isUndefined())
++numUndefined;
else
storage->m_vector[numDefined++] = v;
diff --git a/JavaScriptCore/runtime/JSByteArray.h b/JavaScriptCore/runtime/JSByteArray.h
index 7c99f4f..1974713 100644
--- a/JavaScriptCore/runtime/JSByteArray.h
+++ b/JavaScriptCore/runtime/JSByteArray.h
@@ -65,7 +65,7 @@
void setIndex(ExecState* exec, unsigned i, JSValuePtr value)
{
- double byteValue = value->toNumber(exec);
+ double byteValue = value.toNumber(exec);
if (exec->hadException())
return;
if (canAccessIndex(i))
diff --git a/JavaScriptCore/runtime/JSCell.h b/JavaScriptCore/runtime/JSCell.h
index 966c531..43d81a5 100644
--- a/JavaScriptCore/runtime/JSCell.h
+++ b/JavaScriptCore/runtime/JSCell.h
@@ -112,7 +112,7 @@
inline JSCell* asCell(JSValuePtr value)
{
- return value->asCell();
+ return value.asCell();
}
inline JSCell::JSCell(Structure* structure)
diff --git a/JavaScriptCore/runtime/JSFunction.cpp b/JavaScriptCore/runtime/JSFunction.cpp
index a22cb34..cb18115 100644
--- a/JavaScriptCore/runtime/JSFunction.cpp
+++ b/JavaScriptCore/runtime/JSFunction.cpp
@@ -79,7 +79,7 @@
JSValuePtr JSFunction::call(ExecState* exec, JSValuePtr thisValue, const ArgList& args)
{
- return exec->interpreter()->execute(m_body.get(), exec, this, thisValue->toThisObject(exec), args, m_scopeChain.node(), exec->exceptionSlot());
+ return exec->interpreter()->execute(m_body.get(), exec, this, thisValue.toThisObject(exec), args, m_scopeChain.node(), exec->exceptionSlot());
}
JSValuePtr JSFunction::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
@@ -159,14 +159,14 @@
{
Structure* structure;
JSValuePtr prototype = get(exec, exec->propertyNames().prototype);
- if (prototype->isObject())
+ if (prototype.isObject())
structure = asObject(prototype)->inheritorID();
else
structure = exec->lexicalGlobalObject()->emptyObjectStructure();
JSObject* thisObj = new (exec) JSObject(structure);
JSValuePtr result = exec->interpreter()->execute(m_body.get(), exec, this, thisObj, args, m_scopeChain.node(), exec->exceptionSlot());
- if (exec->hadException() || !result->isObject())
+ if (exec->hadException() || !result.isObject())
return thisObj;
return asObject(result);
}
diff --git a/JavaScriptCore/runtime/JSGlobalObject.cpp b/JavaScriptCore/runtime/JSGlobalObject.cpp
index dfe291c..eb2b349 100644
--- a/JavaScriptCore/runtime/JSGlobalObject.cpp
+++ b/JavaScriptCore/runtime/JSGlobalObject.cpp
@@ -80,8 +80,8 @@
static inline void markIfNeeded(JSValuePtr v)
{
- if (v && !v->marked())
- v->mark();
+ if (v && !v.marked())
+ v.mark();
}
static inline void markIfNeeded(const RefPtr<Structure>& s)
@@ -190,7 +190,7 @@
static inline JSObject* lastInPrototypeChain(JSObject* object)
{
JSObject* o = object;
- while (o->prototype()->isObject())
+ while (o->prototype().isObject())
o = asObject(o->prototype());
return o;
}
diff --git a/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp b/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
index ad4a677..6441223 100644
--- a/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
+++ b/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
@@ -49,7 +49,7 @@
static JSValuePtr encode(ExecState* exec, const ArgList& args, const char* doNotEscape)
{
- UString str = args.at(exec, 0)->toString(exec);
+ UString str = args.at(exec, 0).toString(exec);
CString cstr = str.UTF8String(true);
if (!cstr.c_str())
return throwError(exec, URIError, "String contained an illegal UTF-16 sequence.");
@@ -72,7 +72,7 @@
static JSValuePtr decode(ExecState* exec, const ArgList& args, const char* doNotUnescape, bool strict)
{
UString result = "";
- UString str = args.at(exec, 0)->toString(exec);
+ UString str = args.at(exec, 0).toString(exec);
int k = 0;
int len = str.size();
const UChar* d = str.data();
@@ -270,16 +270,16 @@
JSValuePtr globalFuncEval(ExecState* exec, JSObject* function, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObject = thisValue->toThisObject(exec);
+ JSObject* thisObject = thisValue.toThisObject(exec);
JSObject* unwrappedObject = thisObject->unwrappedObject();
if (!unwrappedObject->isGlobalObject() || static_cast<JSGlobalObject*>(unwrappedObject)->evalFunction() != function)
return throwError(exec, EvalError, "The \"this\" value passed to eval must be the global object from which eval originated");
JSValuePtr x = args.at(exec, 0);
- if (!x->isString())
+ if (!x.isString())
return x;
- UString s = x->toString(exec);
+ UString s = x.toString(exec);
int errLine;
UString errMsg;
@@ -296,12 +296,12 @@
JSValuePtr globalFuncParseInt(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
JSValuePtr value = args.at(exec, 0);
- int32_t radix = args.at(exec, 1)->toInt32(exec);
+ int32_t radix = args.at(exec, 1).toInt32(exec);
- if (value->isNumber() && (radix == 0 || radix == 10)) {
- if (value->isInt32Fast())
+ if (value.isNumber() && (radix == 0 || radix == 10)) {
+ if (value.isInt32Fast())
return value;
- double d = value->uncheckedGetNumber();
+ double d = value.uncheckedGetNumber();
if (isfinite(d))
return jsNumber(exec, floor(d));
if (isnan(d))
@@ -309,22 +309,22 @@
return js0();
}
- return jsNumber(exec, parseInt(value->toString(exec), radix));
+ return jsNumber(exec, parseInt(value.toString(exec), radix));
}
JSValuePtr globalFuncParseFloat(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, parseFloat(args.at(exec, 0)->toString(exec)));
+ return jsNumber(exec, parseFloat(args.at(exec, 0).toString(exec)));
}
JSValuePtr globalFuncIsNaN(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsBoolean(isnan(args.at(exec, 0)->toNumber(exec)));
+ return jsBoolean(isnan(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr globalFuncIsFinite(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- double n = args.at(exec, 0)->toNumber(exec);
+ double n = args.at(exec, 0).toNumber(exec);
return jsBoolean(!isnan(n) && !isinf(n));
}
@@ -373,7 +373,7 @@
UString result = "";
UString s;
- UString str = args.at(exec, 0)->toString(exec);
+ UString str = args.at(exec, 0).toString(exec);
const UChar* c = str.data();
for (int k = 0; k < str.size(); k++, c++) {
int u = c[0];
@@ -397,7 +397,7 @@
JSValuePtr globalFuncUnescape(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
UString result = "";
- UString str = args.at(exec, 0)->toString(exec);
+ UString str = args.at(exec, 0).toString(exec);
int k = 0;
int len = str.size();
while (k < len) {
@@ -425,7 +425,7 @@
JSValuePtr globalFuncJSCPrint(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
CStringBuffer string;
- args.at(exec, 0)->toString(exec).getCString(string);
+ args.at(exec, 0).toString(exec).getCString(string);
puts(string.data());
return jsUndefined();
}
diff --git a/JavaScriptCore/runtime/JSImmediate.cpp b/JavaScriptCore/runtime/JSImmediate.cpp
index 956eb96..c6cca80 100644
--- a/JavaScriptCore/runtime/JSImmediate.cpp
+++ b/JavaScriptCore/runtime/JSImmediate.cpp
@@ -39,10 +39,10 @@
return constructNumber(exec, v);
if (isBoolean(v))
return constructBooleanFromImmediateBoolean(exec, v);
- if (v->isNull())
+ if (v.isNull())
return exec->globalThisValue();
- JSNotAnObjectErrorStub* exception = createNotAnObjectErrorStub(exec, v->isNull());
+ JSNotAnObjectErrorStub* exception = createNotAnObjectErrorStub(exec, v.isNull());
exec->setException(exception);
return new (exec) JSNotAnObject(exec, exception);
}
@@ -55,7 +55,7 @@
if (isBoolean(v))
return constructBooleanFromImmediateBoolean(exec, v);
- JSNotAnObjectErrorStub* exception = createNotAnObjectErrorStub(exec, v->isNull());
+ JSNotAnObjectErrorStub* exception = createNotAnObjectErrorStub(exec, v.isNull());
exec->setException(exception);
return new (exec) JSNotAnObject(exec, exception);
}
@@ -68,7 +68,7 @@
if (isBoolean(v))
return exec->lexicalGlobalObject()->booleanPrototype();
- JSNotAnObjectErrorStub* exception = createNotAnObjectErrorStub(exec, v->isNull());
+ JSNotAnObjectErrorStub* exception = createNotAnObjectErrorStub(exec, v.isNull());
exec->setException(exception);
return new (exec) JSNotAnObject(exec, exception);
}
@@ -93,9 +93,9 @@
return "false";
if (jsBoolean(true) == v)
return "true";
- if (v->isNull())
+ if (v.isNull())
return "null";
- ASSERT(v->isUndefined());
+ ASSERT(v.isUndefined());
return "undefined";
}
diff --git a/JavaScriptCore/runtime/JSImmediate.h b/JavaScriptCore/runtime/JSImmediate.h
index 6e47b17..3a44825 100644
--- a/JavaScriptCore/runtime/JSImmediate.h
+++ b/JavaScriptCore/runtime/JSImmediate.h
@@ -602,7 +602,7 @@
return JSImmediate::impossibleValue();
}
- // These are identical logic to the JSValue functions above, and faster than jsNumber(number)->toInt32().
+ // These are identical logic to the JSValue functions above, and faster than jsNumber(number).toInt32().
int32_t toInt32(double);
uint32_t toUInt32(double);
int32_t toInt32SlowCase(double, bool& ok);
diff --git a/JavaScriptCore/runtime/JSObject.cpp b/JavaScriptCore/runtime/JSObject.cpp
index d38c325..e9e95f6 100644
--- a/JavaScriptCore/runtime/JSObject.cpp
+++ b/JavaScriptCore/runtime/JSObject.cpp
@@ -72,8 +72,8 @@
size_t storageSize = m_structure->propertyStorageSize();
for (size_t i = 0; i < storageSize; ++i) {
JSValuePtr v = m_propertyStorage[i];
- if (!v->marked())
- v->mark();
+ if (!v.marked())
+ v.mark();
}
JSOBJECT_MARK_END();
@@ -105,11 +105,11 @@
if (propertyName == exec->propertyNames().underscoreProto) {
// Setting __proto__ to a non-object, non-null value is silently ignored to match Mozilla.
- if (!value->isObject() && !value->isNull())
+ if (!value.isObject() && !value.isNull())
return;
JSValuePtr nextPrototypeValue = value;
- while (nextPrototypeValue && nextPrototypeValue->isObject()) {
+ while (nextPrototypeValue && nextPrototypeValue.isObject()) {
JSObject* nextPrototype = asObject(nextPrototypeValue)->unwrappedObject();
if (nextPrototype == this) {
throwError(exec, GeneralError, "cyclic __proto__ value");
@@ -126,7 +126,7 @@
JSValuePtr prototype;
for (JSObject* obj = this; !obj->structure()->hasGetterSetterProperties(); obj = asObject(prototype)) {
prototype = obj->prototype();
- if (prototype->isNull()) {
+ if (prototype.isNull()) {
putDirect(propertyName, value, 0, true, slot);
return;
}
@@ -138,7 +138,7 @@
for (JSObject* obj = this; ; obj = asObject(prototype)) {
if (JSValuePtr gs = obj->getDirect(propertyName)) {
- if (gs->isGetterSetter()) {
+ if (gs.isGetterSetter()) {
JSObject* setterFunc = asGetterSetter(gs)->setter();
if (!setterFunc) {
throwSetterError(exec);
@@ -159,7 +159,7 @@
}
prototype = obj->prototype();
- if (prototype->isNull())
+ if (prototype.isNull())
break;
}
@@ -230,7 +230,7 @@
{
JSValuePtr function = object->get(exec, propertyName);
CallData callData;
- CallType callType = function->getCallData(callData);
+ CallType callType = function.getCallData(callData);
if (callType == CallTypeNone)
return exec->exception();
@@ -240,10 +240,10 @@
return exec->exception();
JSValuePtr result = call(exec, function, callType, callData, const_cast<JSObject*>(object), exec->emptyList());
- ASSERT(!result->isGetterSetter());
+ ASSERT(!result.isGetterSetter());
if (exec->hadException())
return exec->exception();
- if (result->isObject())
+ if (result.isObject())
return noValue();
return result;
}
@@ -251,8 +251,8 @@
bool JSObject::getPrimitiveNumber(ExecState* exec, double& number, JSValuePtr& result)
{
result = defaultValue(exec, PreferNumber);
- number = result->toNumber(exec);
- return !result->isString();
+ number = result.toNumber(exec);
+ return !result.isString();
}
// ECMA 8.6.2.6
@@ -294,7 +294,7 @@
void JSObject::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction)
{
JSValuePtr object = getDirect(propertyName);
- if (object && object->isGetterSetter()) {
+ if (object && object.isGetterSetter()) {
ASSERT(m_structure->hasGetterSetterProperties());
asGetterSetter(object)->setGetter(getterFunction);
return;
@@ -321,7 +321,7 @@
void JSObject::defineSetter(ExecState* exec, const Identifier& propertyName, JSObject* setterFunction)
{
JSValuePtr object = getDirect(propertyName);
- if (object && object->isGetterSetter()) {
+ if (object && object.isGetterSetter()) {
ASSERT(m_structure->hasGetterSetterProperties());
asGetterSetter(object)->setSetter(setterFunction);
return;
@@ -350,7 +350,7 @@
JSObject* object = this;
while (true) {
if (JSValuePtr value = object->getDirect(propertyName)) {
- if (!value->isGetterSetter())
+ if (!value.isGetterSetter())
return jsUndefined();
JSObject* functionObject = asGetterSetter(value)->getter();
if (!functionObject)
@@ -358,7 +358,7 @@
return functionObject;
}
- if (!object->prototype() || !object->prototype()->isObject())
+ if (!object->prototype() || !object->prototype().isObject())
return jsUndefined();
object = asObject(object->prototype());
}
@@ -369,7 +369,7 @@
JSObject* object = this;
while (true) {
if (JSValuePtr value = object->getDirect(propertyName)) {
- if (!value->isGetterSetter())
+ if (!value.isGetterSetter())
return jsUndefined();
JSObject* functionObject = asGetterSetter(value)->setter();
if (!functionObject)
@@ -377,7 +377,7 @@
return functionObject;
}
- if (!object->prototype() || !object->prototype()->isObject())
+ if (!object->prototype() || !object->prototype().isObject())
return jsUndefined();
object = asObject(object->prototype());
}
@@ -385,16 +385,16 @@
bool JSObject::hasInstance(ExecState* exec, JSValuePtr value, JSValuePtr proto)
{
- if (!proto->isObject()) {
+ if (!proto.isObject()) {
throwError(exec, TypeError, "instanceof called on an object with an invalid prototype property.");
return false;
}
- if (!value->isObject())
+ if (!value.isObject())
return false;
JSObject* object = asObject(value);
- while ((object = object->prototype()->getObject())) {
+ while ((object = object->prototype().getObject())) {
if (proto == object)
return true;
}
@@ -439,7 +439,7 @@
JSValuePtr primitive = toPrimitive(exec, PreferNumber);
if (exec->hadException()) // should be picked up soon in Nodes.cpp
return 0.0;
- return primitive->toNumber(exec);
+ return primitive.toNumber(exec);
}
UString JSObject::toString(ExecState* exec) const
@@ -447,7 +447,7 @@
JSValuePtr primitive = toPrimitive(exec, PreferString);
if (exec->hadException())
return "";
- return primitive->toString(exec);
+ return primitive.toString(exec);
}
JSObject* JSObject::toObject(ExecState*) const
diff --git a/JavaScriptCore/runtime/JSObject.h b/JavaScriptCore/runtime/JSObject.h
index a89fc07..dc453ec 100644
--- a/JavaScriptCore/runtime/JSObject.h
+++ b/JavaScriptCore/runtime/JSObject.h
@@ -222,7 +222,7 @@
ASSERT(m_structure);
ASSERT(m_structure->propertyStorageCapacity() == inlineStorageCapacity);
ASSERT(m_structure->isEmpty());
- ASSERT(prototype()->isNull() || Heap::heap(this) == Heap::heap(prototype()));
+ ASSERT(prototype().isNull() || Heap::heap(this) == Heap::heap(prototype()));
}
inline JSObject::~JSObject()
@@ -276,7 +276,7 @@
ALWAYS_INLINE bool JSObject::inlineGetOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
if (JSValuePtr* location = getDirectLocation(propertyName)) {
- if (m_structure->hasGetterSetterProperties() && location[0]->isGetterSetter())
+ if (m_structure->hasGetterSetterProperties() && location[0].isGetterSetter())
fillGetterPropertySlot(slot, location);
else
slot.setValueSlot(this, location, offsetForLocation(location));
@@ -296,7 +296,7 @@
{
unsigned attributes;
if (JSValuePtr* location = getDirectLocation(propertyName, attributes)) {
- if (m_structure->hasGetterSetterProperties() && location[0]->isGetterSetter()) {
+ if (m_structure->hasGetterSetterProperties() && location[0].isGetterSetter()) {
slotIsWriteable = false;
fillGetterPropertySlot(slot, location);
} else {
@@ -340,7 +340,7 @@
if (object->fastGetOwnPropertySlot(exec, propertyName, slot))
return true;
JSValuePtr prototype = object->prototype();
- if (!prototype->isObject())
+ if (!prototype.isObject())
return false;
object = asObject(prototype);
}
@@ -353,7 +353,7 @@
if (object->getOwnPropertySlot(exec, propertyName, slot))
return true;
JSValuePtr prototype = object->prototype();
- if (!prototype->isObject())
+ if (!prototype.isObject())
return false;
object = asObject(prototype);
}
@@ -485,7 +485,7 @@
return slot.getValue(exec, propertyName);
ASSERT(cell->isObject());
JSValuePtr prototype = static_cast<JSObject*>(cell)->prototype();
- if (!prototype->isObject())
+ if (!prototype.isObject())
return jsUndefined();
cell = asObject(prototype);
}
@@ -511,9 +511,9 @@
return slot.getValue(exec, propertyName);
ASSERT(cell->isObject());
JSValuePtr prototype = static_cast<JSObject*>(cell)->prototype();
- if (!prototype->isObject())
+ if (!prototype.isObject())
return jsUndefined();
- cell = prototype->asCell();
+ cell = prototype.asCell();
}
}
diff --git a/JavaScriptCore/runtime/JSPropertyNameIterator.h b/JavaScriptCore/runtime/JSPropertyNameIterator.h
index fddb4f6..a6d6cd2 100644
--- a/JavaScriptCore/runtime/JSPropertyNameIterator.h
+++ b/JavaScriptCore/runtime/JSPropertyNameIterator.h
@@ -85,10 +85,10 @@
inline JSPropertyNameIterator* JSPropertyNameIterator::create(ExecState* exec, JSValuePtr v)
{
- if (v->isUndefinedOrNull())
+ if (v.isUndefinedOrNull())
return new (exec) JSPropertyNameIterator;
- JSObject* o = v->toObject(exec);
+ JSObject* o = v.toObject(exec);
PropertyNameArray propertyNames(exec);
o->getPropertyNames(exec, propertyNames);
return new (exec) JSPropertyNameIterator(o, propertyNames.releaseData());
diff --git a/JavaScriptCore/runtime/JSString.cpp b/JavaScriptCore/runtime/JSString.cpp
index e644bf6..48391de 100644
--- a/JavaScriptCore/runtime/JSString.cpp
+++ b/JavaScriptCore/runtime/JSString.cpp
@@ -90,7 +90,7 @@
return true;
slot.setBase(this);
JSObject* object;
- for (JSValuePtr prototype = exec->lexicalGlobalObject()->stringPrototype(); !prototype->isNull(); prototype = object->prototype()) {
+ for (JSValuePtr prototype = exec->lexicalGlobalObject()->stringPrototype(); !prototype.isNull(); prototype = object->prototype()) {
object = asObject(prototype);
if (object->getOwnPropertySlot(exec, propertyName, slot))
return true;
diff --git a/JavaScriptCore/runtime/JSValue.h b/JavaScriptCore/runtime/JSValue.h
index f694608..1172a1b 100644
--- a/JavaScriptCore/runtime/JSValue.h
+++ b/JavaScriptCore/runtime/JSValue.h
@@ -76,11 +76,6 @@
{
}
- JSValuePtr* operator->() const
- {
- return const_cast<JSValuePtr*>(this);
- }
-
operator bool() const
{
return m_ptr;
diff --git a/JavaScriptCore/runtime/JSWrapperObject.cpp b/JavaScriptCore/runtime/JSWrapperObject.cpp
index c791d93..fb57018 100644
--- a/JavaScriptCore/runtime/JSWrapperObject.cpp
+++ b/JavaScriptCore/runtime/JSWrapperObject.cpp
@@ -29,8 +29,8 @@
void JSWrapperObject::mark()
{
JSObject::mark();
- if (m_internalValue && !m_internalValue->marked())
- m_internalValue->mark();
+ if (m_internalValue && !m_internalValue.marked())
+ m_internalValue.mark();
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/JSWrapperObject.h b/JavaScriptCore/runtime/JSWrapperObject.h
index 4ca96f4..7381128 100644
--- a/JavaScriptCore/runtime/JSWrapperObject.h
+++ b/JavaScriptCore/runtime/JSWrapperObject.h
@@ -51,7 +51,7 @@
inline void JSWrapperObject::setInternalValue(JSValuePtr value)
{
ASSERT(value);
- ASSERT(!value->isObject());
+ ASSERT(!value.isObject());
m_internalValue = value;
}
diff --git a/JavaScriptCore/runtime/MathObject.cpp b/JavaScriptCore/runtime/MathObject.cpp
index 5bec2e6..e62643b 100644
--- a/JavaScriptCore/runtime/MathObject.cpp
+++ b/JavaScriptCore/runtime/MathObject.cpp
@@ -115,52 +115,52 @@
JSValuePtr mathProtoFuncAbs(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, fabs(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, fabs(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncACos(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, acos(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, acos(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncASin(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, asin(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, asin(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncATan(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, atan(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, atan(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncATan2(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, atan2(args.at(exec, 0)->toNumber(exec), args.at(exec, 1)->toNumber(exec)));
+ return jsNumber(exec, atan2(args.at(exec, 0).toNumber(exec), args.at(exec, 1).toNumber(exec)));
}
JSValuePtr mathProtoFuncCeil(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, ceil(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, ceil(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncCos(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, cos(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, cos(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncExp(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, exp(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, exp(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncFloor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, floor(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, floor(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncLog(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, log(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, log(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncMax(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
@@ -168,7 +168,7 @@
unsigned argsCount = args.size();
double result = -Inf;
for (unsigned k = 0; k < argsCount; ++k) {
- double val = args.at(exec, k)->toNumber(exec);
+ double val = args.at(exec, k).toNumber(exec);
if (isnan(val)) {
result = NaN;
break;
@@ -184,7 +184,7 @@
unsigned argsCount = args.size();
double result = +Inf;
for (unsigned k = 0; k < argsCount; ++k) {
- double val = args.at(exec, k)->toNumber(exec);
+ double val = args.at(exec, k).toNumber(exec);
if (isnan(val)) {
result = NaN;
break;
@@ -199,8 +199,8 @@
{
// ECMA 15.8.2.1.13
- double arg = args.at(exec, 0)->toNumber(exec);
- double arg2 = args.at(exec, 1)->toNumber(exec);
+ double arg = args.at(exec, 0).toNumber(exec);
+ double arg2 = args.at(exec, 1).toNumber(exec);
if (isnan(arg2))
return jsNaN(exec);
@@ -216,7 +216,7 @@
JSValuePtr mathProtoFuncRound(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- double arg = args.at(exec, 0)->toNumber(exec);
+ double arg = args.at(exec, 0).toNumber(exec);
if (signbit(arg) && arg >= -0.5)
return jsNumber(exec, -0.0);
return jsNumber(exec, floor(arg + 0.5));
@@ -224,17 +224,17 @@
JSValuePtr mathProtoFuncSin(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, sin(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, sin(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncSqrt(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, sqrt(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, sqrt(args.at(exec, 0).toNumber(exec)));
}
JSValuePtr mathProtoFuncTan(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, tan(args.at(exec, 0)->toNumber(exec)));
+ return jsNumber(exec, tan(args.at(exec, 0).toNumber(exec)));
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/NativeErrorConstructor.cpp b/JavaScriptCore/runtime/NativeErrorConstructor.cpp
index 3d043e9..eee9890 100644
--- a/JavaScriptCore/runtime/NativeErrorConstructor.cpp
+++ b/JavaScriptCore/runtime/NativeErrorConstructor.cpp
@@ -33,7 +33,7 @@
const ClassInfo NativeErrorConstructor::info = { "Function", &InternalFunction::info, 0, 0 };
NativeErrorConstructor::NativeErrorConstructor(ExecState* exec, PassRefPtr<Structure> structure, NativeErrorPrototype* nativeErrorPrototype)
- : InternalFunction(&exec->globalData(), structure, Identifier(exec, nativeErrorPrototype->getDirect(exec->propertyNames().name)->getString()))
+ : InternalFunction(&exec->globalData(), structure, Identifier(exec, nativeErrorPrototype->getDirect(exec->propertyNames().name).getString()))
, m_errorStructure(ErrorInstance::createStructure(nativeErrorPrototype))
{
putDirect(exec->propertyNames().length, jsNumber(exec, 1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
@@ -43,8 +43,8 @@
ErrorInstance* NativeErrorConstructor::construct(ExecState* exec, const ArgList& args)
{
ErrorInstance* object = new (exec) ErrorInstance(m_errorStructure);
- if (!args.at(exec, 0)->isUndefined())
- object->putDirect(exec->propertyNames().message, jsString(exec, args.at(exec, 0)->toString(exec)));
+ if (!args.at(exec, 0).isUndefined())
+ object->putDirect(exec->propertyNames().message, jsString(exec, args.at(exec, 0).toString(exec)));
return object;
}
diff --git a/JavaScriptCore/runtime/NumberConstructor.cpp b/JavaScriptCore/runtime/NumberConstructor.cpp
index 87ac79f..caa4a70 100644
--- a/JavaScriptCore/runtime/NumberConstructor.cpp
+++ b/JavaScriptCore/runtime/NumberConstructor.cpp
@@ -97,7 +97,7 @@
static JSObject* constructWithNumberConstructor(ExecState* exec, JSObject*, const ArgList& args)
{
NumberObject* object = new (exec) NumberObject(exec->lexicalGlobalObject()->numberObjectStructure());
- double n = args.isEmpty() ? 0 : args.at(exec, 0)->toNumber(exec);
+ double n = args.isEmpty() ? 0 : args.at(exec, 0).toNumber(exec);
object->setInternalValue(jsNumber(exec, n));
return object;
}
@@ -111,7 +111,7 @@
// ECMA 15.7.2
static JSValuePtr callNumberConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
- return jsNumber(exec, args.isEmpty() ? 0 : args.at(exec, 0)->toNumber(exec));
+ return jsNumber(exec, args.isEmpty() ? 0 : args.at(exec, 0).toNumber(exec));
}
CallType NumberConstructor::getCallData(CallData& callData)
diff --git a/JavaScriptCore/runtime/NumberPrototype.cpp b/JavaScriptCore/runtime/NumberPrototype.cpp
index 8b45f54..3e5ac91 100644
--- a/JavaScriptCore/runtime/NumberPrototype.cpp
+++ b/JavaScriptCore/runtime/NumberPrototype.cpp
@@ -135,13 +135,13 @@
JSValuePtr numberProtoFuncToString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSValuePtr v = thisValue->getJSNumber();
+ JSValuePtr v = thisValue.getJSNumber();
if (!v)
return throwError(exec, TypeError);
- double radixAsDouble = args.at(exec, 0)->toInteger(exec); // nan -> 0
- if (radixAsDouble == 10 || args.at(exec, 0)->isUndefined())
- return jsString(exec, v->toString(exec));
+ double radixAsDouble = args.at(exec, 0).toInteger(exec); // nan -> 0
+ if (radixAsDouble == 10 || args.at(exec, 0).isUndefined())
+ return jsString(exec, v.toString(exec));
if (radixAsDouble < 2 || radixAsDouble > 36)
return throwError(exec, RangeError, "toString() radix argument must be between 2 and 36");
@@ -153,7 +153,7 @@
// unless someone finds a precise rule.
char s[2048 + 3];
const char* lastCharInString = s + sizeof(s) - 1;
- double x = v->uncheckedGetNumber();
+ double x = v.uncheckedGetNumber();
if (isnan(x) || isinf(x))
return jsString(exec, UString::from(x));
@@ -201,16 +201,16 @@
{
// FIXME: Not implemented yet.
- JSValuePtr v = thisValue->getJSNumber();
+ JSValuePtr v = thisValue.getJSNumber();
if (!v)
return throwError(exec, TypeError);
- return jsString(exec, v->toString(exec));
+ return jsString(exec, v.toString(exec));
}
JSValuePtr numberProtoFuncValueOf(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- JSValuePtr v = thisValue->getJSNumber();
+ JSValuePtr v = thisValue.getJSNumber();
if (!v)
return throwError(exec, TypeError);
@@ -219,17 +219,17 @@
JSValuePtr numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSValuePtr v = thisValue->getJSNumber();
+ JSValuePtr v = thisValue.getJSNumber();
if (!v)
return throwError(exec, TypeError);
JSValuePtr fractionDigits = args.at(exec, 0);
- double df = fractionDigits->toInteger(exec);
+ double df = fractionDigits.toInteger(exec);
if (!(df >= 0 && df <= 20))
return throwError(exec, RangeError, "toFixed() digits argument must be between 0 and 20");
int f = static_cast<int>(df);
- double x = v->uncheckedGetNumber();
+ double x = v.uncheckedGetNumber();
if (isnan(x))
return jsNontrivialString(exec, "NaN");
@@ -304,21 +304,21 @@
JSValuePtr numberProtoFuncToExponential(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSValuePtr v = thisValue->getJSNumber();
+ JSValuePtr v = thisValue.getJSNumber();
if (!v)
return throwError(exec, TypeError);
- double x = v->uncheckedGetNumber();
+ double x = v.uncheckedGetNumber();
if (isnan(x) || isinf(x))
return jsString(exec, UString::from(x));
JSValuePtr fractionalDigitsValue = args.at(exec, 0);
- double df = fractionalDigitsValue->toInteger(exec);
+ double df = fractionalDigitsValue.toInteger(exec);
if (!(df >= 0 && df <= 20))
return throwError(exec, RangeError, "toExponential() argument must between 0 and 20");
int fractionalDigits = static_cast<int>(df);
- bool includeAllDigits = fractionalDigitsValue->isUndefined();
+ bool includeAllDigits = fractionalDigitsValue.isUndefined();
int decimalAdjust = 0;
if (x && !includeAllDigits) {
@@ -374,14 +374,14 @@
JSValuePtr numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSValuePtr v = thisValue->getJSNumber();
+ JSValuePtr v = thisValue.getJSNumber();
if (!v)
return throwError(exec, TypeError);
- double doublePrecision = args.at(exec, 0)->toIntegerPreserveNaN(exec);
- double x = v->uncheckedGetNumber();
- if (args.at(exec, 0)->isUndefined() || isnan(x) || isinf(x))
- return jsString(exec, v->toString(exec));
+ double doublePrecision = args.at(exec, 0).toIntegerPreserveNaN(exec);
+ double x = v.uncheckedGetNumber();
+ if (args.at(exec, 0).isUndefined() || isnan(x) || isinf(x))
+ return jsString(exec, v.toString(exec));
UString s;
if (x < 0) {
diff --git a/JavaScriptCore/runtime/ObjectConstructor.cpp b/JavaScriptCore/runtime/ObjectConstructor.cpp
index ff97ca4..2d61127 100644
--- a/JavaScriptCore/runtime/ObjectConstructor.cpp
+++ b/JavaScriptCore/runtime/ObjectConstructor.cpp
@@ -42,9 +42,9 @@
static ALWAYS_INLINE JSObject* constructObject(ExecState* exec, const ArgList& args)
{
JSValuePtr arg = args.at(exec, 0);
- if (arg->isUndefinedOrNull())
+ if (arg.isUndefinedOrNull())
return new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure());
- return arg->toObject(exec);
+ return arg.toObject(exec);
}
static JSObject* constructWithObjectConstructor(ExecState* exec, JSObject*, const ArgList& args)
diff --git a/JavaScriptCore/runtime/ObjectPrototype.cpp b/JavaScriptCore/runtime/ObjectPrototype.cpp
index 696570b..4b776a7 100644
--- a/JavaScriptCore/runtime/ObjectPrototype.cpp
+++ b/JavaScriptCore/runtime/ObjectPrototype.cpp
@@ -62,25 +62,25 @@
JSValuePtr objectProtoFuncValueOf(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- return thisValue->toThisObject(exec);
+ return thisValue.toThisObject(exec);
}
JSValuePtr objectProtoFuncHasOwnProperty(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- return jsBoolean(thisValue->toThisObject(exec)->hasOwnProperty(exec, Identifier(exec, args.at(exec, 0)->toString(exec))));
+ return jsBoolean(thisValue.toThisObject(exec)->hasOwnProperty(exec, Identifier(exec, args.at(exec, 0).toString(exec))));
}
JSValuePtr objectProtoFuncIsPrototypeOf(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSObject* thisObj = thisValue->toThisObject(exec);
+ JSObject* thisObj = thisValue.toThisObject(exec);
- if (!args.at(exec, 0)->isObject())
+ if (!args.at(exec, 0).isObject())
return jsBoolean(false);
JSValuePtr v = asObject(args.at(exec, 0))->prototype();
while (true) {
- if (!v->isObject())
+ if (!v.isObject())
return jsBoolean(false);
if (v == thisObj)
return jsBoolean(true);
@@ -91,44 +91,44 @@
JSValuePtr objectProtoFuncDefineGetter(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
CallData callData;
- if (args.at(exec, 1)->getCallData(callData) == CallTypeNone)
+ if (args.at(exec, 1).getCallData(callData) == CallTypeNone)
return throwError(exec, SyntaxError, "invalid getter usage");
- thisValue->toThisObject(exec)->defineGetter(exec, Identifier(exec, args.at(exec, 0)->toString(exec)), asObject(args.at(exec, 1)));
+ thisValue.toThisObject(exec)->defineGetter(exec, Identifier(exec, args.at(exec, 0).toString(exec)), asObject(args.at(exec, 1)));
return jsUndefined();
}
JSValuePtr objectProtoFuncDefineSetter(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
CallData callData;
- if (args.at(exec, 1)->getCallData(callData) == CallTypeNone)
+ if (args.at(exec, 1).getCallData(callData) == CallTypeNone)
return throwError(exec, SyntaxError, "invalid setter usage");
- thisValue->toThisObject(exec)->defineSetter(exec, Identifier(exec, args.at(exec, 0)->toString(exec)), asObject(args.at(exec, 1)));
+ thisValue.toThisObject(exec)->defineSetter(exec, Identifier(exec, args.at(exec, 0).toString(exec)), asObject(args.at(exec, 1)));
return jsUndefined();
}
JSValuePtr objectProtoFuncLookupGetter(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- return thisValue->toThisObject(exec)->lookupGetter(exec, Identifier(exec, args.at(exec, 0)->toString(exec)));
+ return thisValue.toThisObject(exec)->lookupGetter(exec, Identifier(exec, args.at(exec, 0).toString(exec)));
}
JSValuePtr objectProtoFuncLookupSetter(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- return thisValue->toThisObject(exec)->lookupSetter(exec, Identifier(exec, args.at(exec, 0)->toString(exec)));
+ return thisValue.toThisObject(exec)->lookupSetter(exec, Identifier(exec, args.at(exec, 0).toString(exec)));
}
JSValuePtr objectProtoFuncPropertyIsEnumerable(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- return jsBoolean(thisValue->toThisObject(exec)->propertyIsEnumerable(exec, Identifier(exec, args.at(exec, 0)->toString(exec))));
+ return jsBoolean(thisValue.toThisObject(exec)->propertyIsEnumerable(exec, Identifier(exec, args.at(exec, 0).toString(exec))));
}
JSValuePtr objectProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- return thisValue->toThisJSString(exec);
+ return thisValue.toThisJSString(exec);
}
JSValuePtr objectProtoFuncToString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- return jsNontrivialString(exec, "[object " + thisValue->toThisObject(exec)->className() + "]");
+ return jsNontrivialString(exec, "[object " + thisValue.toThisObject(exec)->className() + "]");
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/Operations.h b/JavaScriptCore/runtime/Operations.h
index 9a04708..c6a7e7a 100644
--- a/JavaScriptCore/runtime/Operations.h
+++ b/JavaScriptCore/runtime/Operations.h
@@ -42,32 +42,32 @@
ASSERT(!JSImmediate::areBothImmediateIntegerNumbers(v1, v2));
do {
- if (v1->isNumber() && v2->isNumber())
- return v1->uncheckedGetNumber() == v2->uncheckedGetNumber();
+ if (v1.isNumber() && v2.isNumber())
+ return v1.uncheckedGetNumber() == v2.uncheckedGetNumber();
- bool s1 = v1->isString();
- bool s2 = v2->isString();
+ bool s1 = v1.isString();
+ bool s2 = v2.isString();
if (s1 && s2)
return asString(v1)->value() == asString(v2)->value();
- if (v1->isUndefinedOrNull()) {
- if (v2->isUndefinedOrNull())
+ if (v1.isUndefinedOrNull()) {
+ if (v2.isUndefinedOrNull())
return true;
if (JSImmediate::isImmediate(v2))
return false;
- return v2->asCell()->structure()->typeInfo().masqueradesAsUndefined();
+ return v2.asCell()->structure()->typeInfo().masqueradesAsUndefined();
}
- if (v2->isUndefinedOrNull()) {
+ if (v2.isUndefinedOrNull()) {
if (JSImmediate::isImmediate(v1))
return false;
- return v1->asCell()->structure()->typeInfo().masqueradesAsUndefined();
+ return v1.asCell()->structure()->typeInfo().masqueradesAsUndefined();
}
- if (v1->isObject()) {
- if (v2->isObject())
+ if (v1.isObject()) {
+ if (v2.isObject())
return v1 == v2;
- JSValuePtr p1 = v1->toPrimitive(exec);
+ JSValuePtr p1 = v1.toPrimitive(exec);
if (exec->hadException())
return false;
v1 = p1;
@@ -76,8 +76,8 @@
continue;
}
- if (v2->isObject()) {
- JSValuePtr p2 = v2->toPrimitive(exec);
+ if (v2.isObject()) {
+ JSValuePtr p2 = v2.toPrimitive(exec);
if (exec->hadException())
return false;
v2 = p2;
@@ -87,17 +87,17 @@
}
if (s1 || s2) {
- double d1 = v1->toNumber(exec);
- double d2 = v2->toNumber(exec);
+ double d1 = v1.toNumber(exec);
+ double d2 = v2.toNumber(exec);
return d1 == d2;
}
- if (v1->isBoolean()) {
- if (v2->isNumber())
- return static_cast<double>(v1->getBoolean()) == v2->uncheckedGetNumber();
- } else if (v2->isBoolean()) {
- if (v1->isNumber())
- return v1->uncheckedGetNumber() == static_cast<double>(v2->getBoolean());
+ if (v1.isBoolean()) {
+ if (v2.isNumber())
+ return static_cast<double>(v1.getBoolean()) == v2.uncheckedGetNumber();
+ } else if (v2.isBoolean()) {
+ if (v1.isNumber())
+ return v1.uncheckedGetNumber() == static_cast<double>(v2.getBoolean());
}
return v1 == v2;
@@ -110,8 +110,8 @@
if (JSImmediate::areBothImmediateIntegerNumbers(v1, v2))
return v1 == v2;
- if (v1->isNumber() && v2->isNumber())
- return v1->uncheckedGetNumber() == v2->uncheckedGetNumber();
+ if (v1.isNumber() && v2.isNumber())
+ return v1.uncheckedGetNumber() == v2.uncheckedGetNumber();
if (JSImmediate::isEitherImmediate(v1, v2))
return v1 == v2;
@@ -123,7 +123,7 @@
{
ASSERT(!JSImmediate::isEitherImmediate(v1, v2));
- if (v1->asCell()->isString() && v2->asCell()->isString())
+ if (v1.asCell()->isString() && v2.asCell()->isString())
return asString(v1)->value() == asString(v2)->value();
return v1 == v2;
diff --git a/JavaScriptCore/runtime/Protect.h b/JavaScriptCore/runtime/Protect.h
index b418ccd..c7f6b2d 100644
--- a/JavaScriptCore/runtime/Protect.h
+++ b/JavaScriptCore/runtime/Protect.h
@@ -51,13 +51,13 @@
inline void gcProtect(JSValuePtr value)
{
- if (value && value->isCell())
+ if (value && value.isCell())
gcProtect(asCell(value));
}
inline void gcUnprotect(JSValuePtr value)
{
- if (value && value->isCell())
+ if (value && value.isCell())
gcUnprotect(asCell(value));
}
diff --git a/JavaScriptCore/runtime/RegExpConstructor.cpp b/JavaScriptCore/runtime/RegExpConstructor.cpp
index 84a297c..bff51e0 100644
--- a/JavaScriptCore/runtime/RegExpConstructor.cpp
+++ b/JavaScriptCore/runtime/RegExpConstructor.cpp
@@ -308,12 +308,12 @@
void setRegExpConstructorInput(ExecState* exec, JSObject* baseObject, JSValuePtr value)
{
- asRegExpConstructor(baseObject)->setInput(value->toString(exec));
+ asRegExpConstructor(baseObject)->setInput(value.toString(exec));
}
void setRegExpConstructorMultiline(ExecState* exec, JSObject* baseObject, JSValuePtr value)
{
- asRegExpConstructor(baseObject)->setMultiline(value->toBoolean(exec));
+ asRegExpConstructor(baseObject)->setMultiline(value.toBoolean(exec));
}
// ECMA 15.10.4
@@ -322,14 +322,14 @@
JSValuePtr arg0 = args.at(exec, 0);
JSValuePtr arg1 = args.at(exec, 1);
- if (arg0->isObject(&RegExpObject::info)) {
- if (!arg1->isUndefined())
+ if (arg0.isObject(&RegExpObject::info)) {
+ if (!arg1.isUndefined())
return throwError(exec, TypeError, "Cannot supply flags when constructing one RegExp from another.");
return asObject(arg0);
}
- UString pattern = arg0->isUndefined() ? UString("") : arg0->toString(exec);
- UString flags = arg1->isUndefined() ? UString("") : arg1->toString(exec);
+ UString pattern = arg0.isUndefined() ? UString("") : arg0.toString(exec);
+ UString flags = arg1.isUndefined() ? UString("") : arg1.toString(exec);
RefPtr<RegExp> regExp = RegExp::create(&exec->globalData(), pattern, flags);
if (!regExp->isValid())
diff --git a/JavaScriptCore/runtime/RegExpObject.cpp b/JavaScriptCore/runtime/RegExpObject.cpp
index 5a54ad0..f8e0522 100644
--- a/JavaScriptCore/runtime/RegExpObject.cpp
+++ b/JavaScriptCore/runtime/RegExpObject.cpp
@@ -103,7 +103,7 @@
void setRegExpObjectLastIndex(ExecState* exec, JSObject* baseObject, JSValuePtr value)
{
- asRegExpObject(baseObject)->setLastIndex(value->toInteger(exec));
+ asRegExpObject(baseObject)->setLastIndex(value.toInteger(exec));
}
JSValuePtr RegExpObject::test(ExecState* exec, const ArgList& args)
@@ -134,7 +134,7 @@
{
RegExpConstructor* regExpConstructor = exec->lexicalGlobalObject()->regExpConstructor();
- UString input = args.isEmpty() ? regExpConstructor->input() : args.at(exec, 0)->toString(exec);
+ UString input = args.isEmpty() ? regExpConstructor->input() : args.at(exec, 0).toString(exec);
if (input.isNull()) {
throwError(exec, GeneralError, "No input to " + toString(exec) + ".");
return false;
diff --git a/JavaScriptCore/runtime/RegExpPrototype.cpp b/JavaScriptCore/runtime/RegExpPrototype.cpp
index b47d489..73787bc 100644
--- a/JavaScriptCore/runtime/RegExpPrototype.cpp
+++ b/JavaScriptCore/runtime/RegExpPrototype.cpp
@@ -57,34 +57,34 @@
JSValuePtr regExpProtoFuncTest(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- if (!thisValue->isObject(&RegExpObject::info))
+ if (!thisValue.isObject(&RegExpObject::info))
return throwError(exec, TypeError);
return asRegExpObject(thisValue)->test(exec, args);
}
JSValuePtr regExpProtoFuncExec(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- if (!thisValue->isObject(&RegExpObject::info))
+ if (!thisValue.isObject(&RegExpObject::info))
return throwError(exec, TypeError);
return asRegExpObject(thisValue)->exec(exec, args);
}
JSValuePtr regExpProtoFuncCompile(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- if (!thisValue->isObject(&RegExpObject::info))
+ if (!thisValue.isObject(&RegExpObject::info))
return throwError(exec, TypeError);
RefPtr<RegExp> regExp;
JSValuePtr arg0 = args.at(exec, 0);
JSValuePtr arg1 = args.at(exec, 1);
- if (arg0->isObject(&RegExpObject::info)) {
- if (!arg1->isUndefined())
+ if (arg0.isObject(&RegExpObject::info)) {
+ if (!arg1.isUndefined())
return throwError(exec, TypeError, "Cannot supply flags when constructing one RegExp from another.");
regExp = asRegExpObject(arg0)->regExp();
} else {
- UString pattern = args.isEmpty() ? UString("") : arg0->toString(exec);
- UString flags = arg1->isUndefined() ? UString("") : arg1->toString(exec);
+ UString pattern = args.isEmpty() ? UString("") : arg0.toString(exec);
+ UString flags = arg1.isUndefined() ? UString("") : arg1.toString(exec);
regExp = RegExp::create(&exec->globalData(), pattern, flags);
}
@@ -98,19 +98,19 @@
JSValuePtr regExpProtoFuncToString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- if (!thisValue->isObject(&RegExpObject::info)) {
- if (thisValue->isObject(&RegExpPrototype::info))
+ if (!thisValue.isObject(&RegExpObject::info)) {
+ if (thisValue.isObject(&RegExpPrototype::info))
return jsNontrivialString(exec, "//");
return throwError(exec, TypeError);
}
- UString result = "/" + asRegExpObject(thisValue)->get(exec, exec->propertyNames().source)->toString(exec);
+ UString result = "/" + asRegExpObject(thisValue)->get(exec, exec->propertyNames().source).toString(exec);
result.append('/');
- if (asRegExpObject(thisValue)->get(exec, exec->propertyNames().global)->toBoolean(exec))
+ if (asRegExpObject(thisValue)->get(exec, exec->propertyNames().global).toBoolean(exec))
result.append('g');
- if (asRegExpObject(thisValue)->get(exec, exec->propertyNames().ignoreCase)->toBoolean(exec))
+ if (asRegExpObject(thisValue)->get(exec, exec->propertyNames().ignoreCase).toBoolean(exec))
result.append('i');
- if (asRegExpObject(thisValue)->get(exec, exec->propertyNames().multiline)->toBoolean(exec))
+ if (asRegExpObject(thisValue)->get(exec, exec->propertyNames().multiline).toBoolean(exec))
result.append('m');
return jsNontrivialString(exec, result);
}
diff --git a/JavaScriptCore/runtime/StringConstructor.cpp b/JavaScriptCore/runtime/StringConstructor.cpp
index bac819f..dc1d60f 100644
--- a/JavaScriptCore/runtime/StringConstructor.cpp
+++ b/JavaScriptCore/runtime/StringConstructor.cpp
@@ -33,14 +33,14 @@
UChar* p = buf;
ArgList::const_iterator end = args.end();
for (ArgList::const_iterator it = args.begin(); it != end; ++it)
- *p++ = static_cast<UChar>((*it).jsValue(exec)->toUInt32(exec));
+ *p++ = static_cast<UChar>((*it).jsValue(exec).toUInt32(exec));
return jsString(exec, UString(buf, p - buf, false));
}
static JSValuePtr stringFromCharCode(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args)
{
if (LIKELY(args.size() == 1))
- return jsSingleCharacterString(exec, args.at(exec, 0)->toUInt32(exec));
+ return jsSingleCharacterString(exec, args.at(exec, 0).toUInt32(exec));
return stringFromCharCodeSlowCase(exec, args);
}
@@ -64,7 +64,7 @@
{
if (args.isEmpty())
return new (exec) StringObject(exec, exec->lexicalGlobalObject()->stringObjectStructure());
- return new (exec) StringObject(exec, exec->lexicalGlobalObject()->stringObjectStructure(), args.at(exec, 0)->toString(exec));
+ return new (exec) StringObject(exec, exec->lexicalGlobalObject()->stringObjectStructure(), args.at(exec, 0).toString(exec));
}
ConstructType StringConstructor::getConstructData(ConstructData& constructData)
@@ -78,7 +78,7 @@
{
if (args.isEmpty())
return jsEmptyString(exec);
- return jsString(exec, args.at(exec, 0)->toString(exec));
+ return jsString(exec, args.at(exec, 0).toString(exec));
}
CallType StringConstructor::getCallData(CallData& callData)
diff --git a/JavaScriptCore/runtime/StringPrototype.cpp b/JavaScriptCore/runtime/StringPrototype.cpp
index ddad642..2041329 100644
--- a/JavaScriptCore/runtime/StringPrototype.cpp
+++ b/JavaScriptCore/runtime/StringPrototype.cpp
@@ -206,7 +206,7 @@
JSValuePtr stringProtoFuncReplace(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- JSString* sourceVal = thisValue->toThisJSString(exec);
+ JSString* sourceVal = thisValue.toThisJSString(exec);
const UString& source = sourceVal->value();
JSValuePtr pattern = args.at(exec, 0);
@@ -214,11 +214,11 @@
JSValuePtr replacement = args.at(exec, 1);
UString replacementString;
CallData callData;
- CallType callType = replacement->getCallData(callData);
+ CallType callType = replacement.getCallData(callData);
if (callType == CallTypeNone)
- replacementString = replacement->toString(exec);
+ replacementString = replacement.toString(exec);
- if (pattern->isObject(&RegExpObject::info)) {
+ if (pattern.isObject(&RegExpObject::info)) {
RegExp* reg = asRegExpObject(pattern)->regExp();
bool global = reg->global();
@@ -258,7 +258,7 @@
args.append(jsNumber(exec, completeMatchStart));
args.append(sourceVal);
- replacements.append(call(exec, replacement, callType, callData, exec->globalThisValue(), args)->toString(exec));
+ replacements.append(call(exec, replacement, callType, callData, exec->globalThisValue(), args).toString(exec));
if (exec->hadException())
break;
} else
@@ -287,7 +287,7 @@
}
// First arg is a string
- UString patternString = pattern->toString(exec);
+ UString patternString = pattern.toString(exec);
int matchPos = source.find(patternString);
int matchLen = patternString.size();
// Do the replacement
@@ -300,7 +300,7 @@
args.append(jsNumber(exec, matchPos));
args.append(sourceVal);
- replacementString = call(exec, replacement, callType, callData, exec->globalThisValue(), args)->toString(exec);
+ replacementString = call(exec, replacement, callType, callData, exec->globalThisValue(), args).toString(exec);
}
int ovector[2] = { matchPos, matchPos + matchLen };
@@ -313,10 +313,10 @@
{
// Also used for valueOf.
- if (thisValue->isString())
+ if (thisValue.isString())
return thisValue;
- if (thisValue->isObject(&StringObject::info))
+ if (thisValue.isObject(&StringObject::info))
return asStringObject(thisValue)->internalValue();
return throwError(exec, TypeError);
@@ -324,16 +324,16 @@
JSValuePtr stringProtoFuncCharAt(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
unsigned len = s.size();
JSValuePtr a0 = args.at(exec, 0);
- if (a0->isUInt32Fast()) {
- uint32_t i = a0->getUInt32Fast();
+ if (a0.isUInt32Fast()) {
+ uint32_t i = a0.getUInt32Fast();
if (i < len)
return jsSingleCharacterSubstring(exec, s, i);
return jsEmptyString(exec);
}
- double dpos = a0->toInteger(exec);
+ double dpos = a0.toInteger(exec);
if (dpos >= 0 && dpos < len)
return jsSingleCharacterSubstring(exec, s, static_cast<unsigned>(dpos));
return jsEmptyString(exec);
@@ -341,16 +341,16 @@
JSValuePtr stringProtoFuncCharCodeAt(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
unsigned len = s.size();
JSValuePtr a0 = args.at(exec, 0);
- if (a0->isUInt32Fast()) {
- uint32_t i = a0->getUInt32Fast();
+ if (a0.isUInt32Fast()) {
+ uint32_t i = a0.getUInt32Fast();
if (i < len)
return jsNumber(exec, s.data()[i]);
return jsNaN(exec);
}
- double dpos = a0->toInteger(exec);
+ double dpos = a0.toInteger(exec);
if (dpos >= 0 && dpos < len)
return jsNumber(exec, s[static_cast<int>(dpos)]);
return jsNaN(exec);
@@ -358,23 +358,23 @@
JSValuePtr stringProtoFuncConcat(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
ArgList::const_iterator end = args.end();
for (ArgList::const_iterator it = args.begin(); it != end; ++it)
- s += (*it).jsValue(exec)->toString(exec);
+ s += (*it).jsValue(exec).toString(exec);
return jsString(exec, s);
}
JSValuePtr stringProtoFuncIndexOf(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
int len = s.size();
JSValuePtr a0 = args.at(exec, 0);
JSValuePtr a1 = args.at(exec, 1);
- UString u2 = a0->toString(exec);
- double dpos = a1->toInteger(exec);
+ UString u2 = a0.toString(exec);
+ double dpos = a1.toInteger(exec);
if (dpos < 0)
dpos = 0;
else if (dpos > len)
@@ -384,14 +384,14 @@
JSValuePtr stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
int len = s.size();
JSValuePtr a0 = args.at(exec, 0);
JSValuePtr a1 = args.at(exec, 1);
- UString u2 = a0->toString(exec);
- double dpos = a1->toIntegerPreserveNaN(exec);
+ UString u2 = a0.toString(exec);
+ double dpos = a1.toIntegerPreserveNaN(exec);
if (dpos < 0)
dpos = 0;
else if (!(dpos <= len)) // true for NaN
@@ -401,14 +401,14 @@
JSValuePtr stringProtoFuncMatch(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
JSValuePtr a0 = args.at(exec, 0);
UString u = s;
RefPtr<RegExp> reg;
RegExpObject* imp = 0;
- if (a0->isObject(&RegExpObject::info))
+ if (a0.isObject(&RegExpObject::info))
reg = asRegExpObject(a0)->regExp();
else {
/*
@@ -416,7 +416,7 @@
* If regexp is not an object whose [[Class]] property is "RegExp", it is
* replaced with the result of the expression new RegExp(regexp).
*/
- reg = RegExp::create(&exec->globalData(), a0->toString(exec));
+ reg = RegExp::create(&exec->globalData(), a0.toString(exec));
}
RegExpConstructor* regExpConstructor = exec->lexicalGlobalObject()->regExpConstructor();
int pos;
@@ -452,13 +452,13 @@
JSValuePtr stringProtoFuncSearch(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
JSValuePtr a0 = args.at(exec, 0);
UString u = s;
RefPtr<RegExp> reg;
- if (a0->isObject(&RegExpObject::info))
+ if (a0.isObject(&RegExpObject::info))
reg = asRegExpObject(a0)->regExp();
else {
/*
@@ -466,7 +466,7 @@
* If regexp is not an object whose [[Class]] property is "RegExp", it is
* replaced with the result of the expression new RegExp(regexp).
*/
- reg = RegExp::create(&exec->globalData(), a0->toString(exec));
+ reg = RegExp::create(&exec->globalData(), a0.toString(exec));
}
RegExpConstructor* regExpConstructor = exec->lexicalGlobalObject()->regExpConstructor();
int pos;
@@ -477,15 +477,15 @@
JSValuePtr stringProtoFuncSlice(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
int len = s.size();
JSValuePtr a0 = args.at(exec, 0);
JSValuePtr a1 = args.at(exec, 1);
// The arg processing is very much like ArrayProtoFunc::Slice
- double start = a0->toInteger(exec);
- double end = a1->isUndefined() ? len : a1->toInteger(exec);
+ double start = a0.toInteger(exec);
+ double end = a1.isUndefined() ? len : a1.toInteger(exec);
double from = start < 0 ? len + start : start;
double to = end < 0 ? len + end : end;
if (to > from && to > 0 && from < len) {
@@ -501,7 +501,7 @@
JSValuePtr stringProtoFuncSplit(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
JSValuePtr a0 = args.at(exec, 0);
JSValuePtr a1 = args.at(exec, 1);
@@ -509,8 +509,8 @@
JSArray* result = constructEmptyArray(exec);
unsigned i = 0;
int p0 = 0;
- unsigned limit = a1->isUndefined() ? 0xFFFFFFFFU : a1->toUInt32(exec);
- if (a0->isObject(&RegExpObject::info)) {
+ unsigned limit = a1.isUndefined() ? 0xFFFFFFFFU : a1.toUInt32(exec);
+ if (a0.isObject(&RegExpObject::info)) {
RegExp* reg = asRegExpObject(a0)->regExp();
if (s.isEmpty() && reg->match(s, 0) >= 0) {
// empty string matched by regexp -> empty array
@@ -537,7 +537,7 @@
}
}
} else {
- UString u2 = a0->toString(exec);
+ UString u2 = a0.toString(exec);
if (u2.isEmpty()) {
if (s.isEmpty()) {
// empty separator matches empty string -> empty array
@@ -563,14 +563,14 @@
JSValuePtr stringProtoFuncSubstr(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
int len = s.size();
JSValuePtr a0 = args.at(exec, 0);
JSValuePtr a1 = args.at(exec, 1);
- double start = a0->toInteger(exec);
- double length = a1->isUndefined() ? len : a1->toInteger(exec);
+ double start = a0.toInteger(exec);
+ double length = a1.isUndefined() ? len : a1.toInteger(exec);
if (start >= len || length <= 0)
return jsEmptyString(exec);
if (start < 0) {
@@ -585,14 +585,14 @@
JSValuePtr stringProtoFuncSubstring(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
int len = s.size();
JSValuePtr a0 = args.at(exec, 0);
JSValuePtr a1 = args.at(exec, 1);
- double start = a0->toNumber(exec);
- double end = a1->toNumber(exec);
+ double start = a0.toNumber(exec);
+ double end = a1.toNumber(exec);
if (isnan(start))
start = 0;
if (isnan(end))
@@ -605,7 +605,7 @@
start = len;
if (end > len)
end = len;
- if (a1->isUndefined())
+ if (a1.isUndefined())
end = len;
if (start > end) {
double temp = end;
@@ -617,7 +617,7 @@
JSValuePtr stringProtoFuncToLowerCase(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- JSString* sVal = thisValue->toThisJSString(exec);
+ JSString* sVal = thisValue.toThisJSString(exec);
const UString& s = sVal->value();
int sSize = s.size();
@@ -651,7 +651,7 @@
JSValuePtr stringProtoFuncToUpperCase(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- JSString* sVal = thisValue->toThisJSString(exec);
+ JSString* sVal = thisValue.toThisJSString(exec);
const UString& s = sVal->value();
int sSize = s.size();
@@ -688,91 +688,91 @@
if (args.size() < 1)
return jsNumber(exec, 0);
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
JSValuePtr a0 = args.at(exec, 0);
- return jsNumber(exec, localeCompare(s, a0->toString(exec)));
+ return jsNumber(exec, localeCompare(s, a0.toString(exec)));
}
JSValuePtr stringProtoFuncBig(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
return jsString(exec, "<big>" + s + "</big>");
}
JSValuePtr stringProtoFuncSmall(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
return jsString(exec, "<small>" + s + "</small>");
}
JSValuePtr stringProtoFuncBlink(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
return jsString(exec, "<blink>" + s + "</blink>");
}
JSValuePtr stringProtoFuncBold(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
return jsString(exec, "<b>" + s + "</b>");
}
JSValuePtr stringProtoFuncFixed(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
return jsString(exec, "<tt>" + s + "</tt>");
}
JSValuePtr stringProtoFuncItalics(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
return jsString(exec, "<i>" + s + "</i>");
}
JSValuePtr stringProtoFuncStrike(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
return jsString(exec, "<strike>" + s + "</strike>");
}
JSValuePtr stringProtoFuncSub(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
return jsString(exec, "<sub>" + s + "</sub>");
}
JSValuePtr stringProtoFuncSup(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList&)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
return jsString(exec, "<sup>" + s + "</sup>");
}
JSValuePtr stringProtoFuncFontcolor(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
JSValuePtr a0 = args.at(exec, 0);
- return jsString(exec, "<font color=\"" + a0->toString(exec) + "\">" + s + "</font>");
+ return jsString(exec, "<font color=\"" + a0.toString(exec) + "\">" + s + "</font>");
}
JSValuePtr stringProtoFuncFontsize(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
JSValuePtr a0 = args.at(exec, 0);
- return jsString(exec, "<font size=\"" + a0->toString(exec) + "\">" + s + "</font>");
+ return jsString(exec, "<font size=\"" + a0.toString(exec) + "\">" + s + "</font>");
}
JSValuePtr stringProtoFuncAnchor(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
JSValuePtr a0 = args.at(exec, 0);
- return jsString(exec, "<a name=\"" + a0->toString(exec) + "\">" + s + "</a>");
+ return jsString(exec, "<a name=\"" + a0.toString(exec) + "\">" + s + "</a>");
}
JSValuePtr stringProtoFuncLink(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
{
- UString s = thisValue->toThisString(exec);
+ UString s = thisValue.toThisString(exec);
JSValuePtr a0 = args.at(exec, 0);
- return jsString(exec, "<a href=\"" + a0->toString(exec) + "\">" + s + "</a>");
+ return jsString(exec, "<a href=\"" + a0.toString(exec) + "\">" + s + "</a>");
}
} // namespace JSC
diff --git a/JavaScriptCore/runtime/Structure.cpp b/JavaScriptCore/runtime/Structure.cpp
index 94d9f23..52f745a 100644
--- a/JavaScriptCore/runtime/Structure.cpp
+++ b/JavaScriptCore/runtime/Structure.cpp
@@ -136,7 +136,7 @@
, m_attributesInPrevious(0)
{
ASSERT(m_prototype);
- ASSERT(m_prototype->isObject() || m_prototype->isNull());
+ ASSERT(m_prototype.isObject() || m_prototype.isNull());
m_transitions.singleTransition = 0;
@@ -320,7 +320,7 @@
}
}
- if (m_prototype->isObject())
+ if (m_prototype.isObject())
asObject(m_prototype)->getPropertyNames(exec, propertyNames);
if (shouldCache) {
@@ -540,7 +540,7 @@
ASSERT(!m_cachedPrototypeChain);
JSValuePtr prototype = storedPrototype();
- if (!prototype->isCell())
+ if (!prototype.isCell())
return 0;
RefPtr<StructureChain> chain = StructureChain::create(asObject(prototype)->structure());
diff --git a/JavaScriptCore/runtime/Structure.h b/JavaScriptCore/runtime/Structure.h
index c326b3f..569738b 100644
--- a/JavaScriptCore/runtime/Structure.h
+++ b/JavaScriptCore/runtime/Structure.h
@@ -73,8 +73,8 @@
void mark()
{
- if (!m_prototype->marked())
- m_prototype->mark();
+ if (!m_prototype.marked())
+ m_prototype.mark();
}
// These should be used with caution.
diff --git a/JavaScriptCore/runtime/StructureChain.cpp b/JavaScriptCore/runtime/StructureChain.cpp
index 84c67c3..4d00263 100644
--- a/JavaScriptCore/runtime/StructureChain.cpp
+++ b/JavaScriptCore/runtime/StructureChain.cpp
@@ -37,7 +37,7 @@
size_t size = 1;
Structure* tmp = structure;
- while (!tmp->storedPrototype()->isNull()) {
+ while (!tmp->storedPrototype().isNull()) {
++size;
tmp = asCell(tmp->storedPrototype())->structure();
}