1. 24 Jan, 2012 1 commit
    • ggaren@apple.com's avatar
      JSValue::toString() should return a JSString* instead of a UString · 64be5e90
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=76861
      
      ../JavaScriptCore: 
      
      Reviewed by Gavin Barraclough.
              
      This makes the common case -- toString() on a string -- faster and
      inline-able. (Not a measureable speedup, but we can now remove a bunch
      of duplicate hand-rolled code for this optimization.)
              
      This also clarifies the boundary between "C++ strings" and "JS strings".
              
      In all cases other than true, false, null, undefined, and multi-digit
      numbers, the JS runtime was just retrieving a UString from a JSString,
      so returning a JSString* is strictly better. In the other cases, we can
      optimize to avoid creating a new JSString if we care to, but it doesn't
      seem to be a big deal.
      
      * JavaScriptCore.exp: Export!
              
      * jsc.cpp:
      (functionPrint):
      (functionDebug):
      (functionRun):
      (functionLoad):
      (functionCheckSyntax):
      (runWithScripts):
      (runInteractive):
      * API/JSValueRef.cpp:
      (JSValueToStringCopy):
      * bytecode/CodeBlock.cpp:
      (JSC::valueToSourceString): Call value() after calling toString(), to
      convert from "JS string" (JSString*) to "C++ string" (UString), since
      toString() no longer returns a "C++ string".
      
      * dfg/DFGOperations.cpp:
      (JSC::DFG::operationValueAddNotNumber):
      * jit/JITStubs.cpp:
      (op_add): Updated for removal of toPrimitiveString():
      all '+' operands can use toString(), except for object operands, which
      need to take a slow path to call toPrimitive().
      
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      (JSC::arrayProtoFuncToLocaleString):
      (JSC::arrayProtoFuncJoin):
      (JSC::arrayProtoFuncPush):
      * runtime/CommonSlowPaths.h:
      (JSC::CommonSlowPaths::opIn):
      * runtime/DateConstructor.cpp:
      (JSC::dateParse):
      * runtime/DatePrototype.cpp:
      (JSC::formatLocaleDate): Call value() after calling toString(), as above.
      
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::create): Simplified down to one canonical create()
      function, to make string handling easier.
      
      * runtime/ErrorPrototype.cpp:
      (JSC::errorProtoFuncToString):
      * runtime/ExceptionHelpers.cpp:
      (JSC::createInvalidParamError):
      (JSC::createNotAConstructorError):
      (JSC::createNotAFunctionError):
      (JSC::createNotAnObjectError):
      * runtime/FunctionConstructor.cpp:
      (JSC::constructFunctionSkippingEvalEnabledCheck):
      * runtime/FunctionPrototype.cpp:
      (JSC::functionProtoFuncBind):
      * runtime/JSArray.cpp:
      (JSC::JSArray::sort): Call value() after calling toString(), as above.
      
      * runtime/JSCell.cpp:
      * runtime/JSCell.h: Removed JSCell::toString() because JSValue does this
      job now. Doing it in JSCell is slower (requires extra type checking), and
      creates the misimpression that language-defined toString() behavior is
      an implementation detail of JSCell.
              
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::encode):
      (JSC::decode):
      (JSC::globalFuncEval):
      (JSC::globalFuncParseInt):
      (JSC::globalFuncParseFloat):
      (JSC::globalFuncEscape):
      (JSC::globalFuncUnescape): Call value() after calling toString(), as above.
      
      * runtime/JSONObject.cpp:
      (JSC::unwrapBoxedPrimitive):
      (JSC::Stringifier::Stringifier):
      (JSC::JSONProtoFuncParse): Removed some manual optimization that toString()
      takes care of.
      
      * runtime/JSObject.cpp:
      (JSC::JSObject::toString):
      * runtime/JSObject.h: Updated to return JSString*.
      
      * runtime/JSString.cpp:
      * runtime/JSString.h:
      (JSC::JSValue::toString): Removed, since I removed JSCell::toString().
      
      * runtime/JSValue.cpp:
      (JSC::JSValue::toStringSlowCase): Removed toPrimitiveString(), and re-
      spawned toStringSlowCase() from its zombie corpse, since toPrimitiveString()
      basically did what we want all the time. (Note that the toPrimitive()
      preference changes from NoPreference to PreferString, because that's
      how ToString is defined in the language. op_add does not want this behavior.)
      
      * runtime/NumberPrototype.cpp:
      (JSC::numberProtoFuncToString):
      (JSC::numberProtoFuncToLocaleString): A little simpler, now that toString()
      returns a JSString*.
      
      * runtime/ObjectConstructor.cpp:
      (JSC::objectConstructorGetOwnPropertyDescriptor):
      (JSC::objectConstructorDefineProperty):
      * runtime/ObjectPrototype.cpp:
      (JSC::objectProtoFuncHasOwnProperty):
      (JSC::objectProtoFuncDefineGetter):
      (JSC::objectProtoFuncDefineSetter):
      (JSC::objectProtoFuncLookupGetter):
      (JSC::objectProtoFuncLookupSetter):
      (JSC::objectProtoFuncPropertyIsEnumerable): More calls to value(), as above.
      
      * runtime/Operations.cpp:
      (JSC::jsAddSlowCase): Need to check for object before taking the toString()
      fast path becuase adding an object to a string requires calling toPrimitive()
      on the object, not toString(). (They differ in their preferred conversion
      type.)
      
      * runtime/Operations.h:
      (JSC::jsString):
      (JSC::jsStringFromArguments): This code gets simpler, now that toString()
      does the right thing.
      
      (JSC::jsAdd): Now checks for object, just like jsAddSlowCase().
      
      * runtime/RegExpConstructor.cpp:
      (JSC::setRegExpConstructorInput):
      (JSC::constructRegExp):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::match):
      * runtime/RegExpPrototype.cpp:
      (JSC::regExpProtoFuncCompile):
      (JSC::regExpProtoFuncToString): More calls to value(), as above.
      
      * runtime/StringConstructor.cpp:
      (JSC::constructWithStringConstructor):
      (JSC::callStringConstructor): This code gets simpler, now that toString()
      does the right thing.
      
      * runtime/StringPrototype.cpp:
      (JSC::replaceUsingRegExpSearch):
      (JSC::replaceUsingStringSearch):
      (JSC::stringProtoFuncReplace):
      (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):
      (JSC::trimString): Some of this code gets simpler, now that toString()
      does the right thing. More calls to value(), as above.
      
      ../JavaScriptGlue: 
      
      Reviewed by Gavin Barraclough.
      
      * JSUtils.cpp:
      (KJSValueToCFTypeInternal):
      
      ../WebCore: 
      
      Reviewed by Gavin Barraclough.
      
      Mechanical changes to call value() after calling toString(), to
      convert from "JS string" (JSString*) to "C++ string" (UString), since
      toString() no longer returns a "C++ string".
      
      * bindings/js/IDBBindingUtilities.cpp:
      (WebCore::createIDBKeyFromValue):
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
      * bindings/js/JSClipboardCustom.cpp:
      (WebCore::JSClipboard::clearData):
      (WebCore::JSClipboard::getData):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::valueToStringWithNullCheck):
      (WebCore::valueToStringWithUndefinedOrNullCheck):
      (WebCore::reportException):
      * bindings/js/JSDOMFormDataCustom.cpp:
      (WebCore::JSDOMFormData::append):
      * bindings/js/JSDOMStringMapCustom.cpp:
      (WebCore::JSDOMStringMap::putDelegate):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::setLocation):
      (WebCore::JSDOMWindow::open):
      (WebCore::JSDOMWindow::addEventListener):
      (WebCore::JSDOMWindow::removeEventListener):
      * bindings/js/JSDeviceMotionEventCustom.cpp:
      (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
      * bindings/js/JSDeviceOrientationEventCustom.cpp:
      (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
      * bindings/js/JSDictionary.cpp:
      (WebCore::JSDictionary::convertValue):
      * bindings/js/JSDocumentCustom.cpp:
      (WebCore::JSDocument::setLocation):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      (WebCore::callHTMLAllCollection):
      (WebCore::JSHTMLAllCollection::item):
      (WebCore::JSHTMLAllCollection::namedItem):
      * bindings/js/JSHTMLCanvasElementCustom.cpp:
      (WebCore::JSHTMLCanvasElement::getContext):
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::JSHTMLCollection::item):
      (WebCore::JSHTMLCollection::namedItem):
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::documentWrite):
      * bindings/js/JSHTMLInputElementCustom.cpp:
      (WebCore::JSHTMLInputElement::setSelectionDirection):
      (WebCore::JSHTMLInputElement::setSelectionRange):
      * bindings/js/JSInspectorFrontendHostCustom.cpp:
      (WebCore::JSInspectorFrontendHost::showContextMenu):
      * 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/JSMessageEventCustom.cpp:
      (WebCore::handleInitMessageEvent):
      * bindings/js/JSSQLTransactionCustom.cpp:
      (WebCore::JSSQLTransaction::executeSql):
      * bindings/js/JSSQLTransactionSyncCustom.cpp:
      (WebCore::JSSQLTransactionSync::executeSql):
      * bindings/js/JSSharedWorkerCustom.cpp:
      (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
      * bindings/js/JSStorageCustom.cpp:
      (WebCore::JSStorage::putDelegate):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::JSWebGLRenderingContext::getExtension):
      * bindings/js/JSWebSocketCustom.cpp:
      (WebCore::JSWebSocketConstructor::constructJSWebSocket):
      (WebCore::JSWebSocket::send):
      (WebCore::JSWebSocket::close):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::importScripts):
      * bindings/js/JSWorkerCustom.cpp:
      (WebCore::JSWorkerConstructor::constructJSWorker):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::open):
      (WebCore::JSXMLHttpRequest::send):
      * bindings/js/JSXSLTProcessorCustom.cpp:
      (WebCore::JSXSLTProcessor::setParameter):
      (WebCore::JSXSLTProcessor::getParameter):
      (WebCore::JSXSLTProcessor::removeParameter):
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::create):
      * bindings/js/ScriptEventListener.cpp:
      (WebCore::eventListenerHandlerBody):
      * bindings/js/ScriptValue.cpp:
      (WebCore::ScriptValue::toString):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateEventListenerCall):
      (JSValueToNative):
      (GenerateConstructorDefinition):
      * bridge/c/c_utility.cpp:
      (JSC::Bindings::convertValueToNPVariant):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::convertValueToJObject):
      * bridge/jni/jsc/JNIUtilityPrivate.cpp:
      (JSC::Bindings::convertArrayInstanceToJavaArray):
      (JSC::Bindings::convertValueToJValue):
      * bridge/jni/jsc/JavaFieldJSC.cpp:
      (JavaField::dispatchValueFromInstance):
      (JavaField::valueFromInstance):
      (JavaField::dispatchSetValueToInstance):
      (JavaField::setValueToInstance):
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaInstance::invokeMethod):
      * testing/js/JSInternalsCustom.cpp:
      (WebCore::JSInternals::setUserPreferredLanguages):
      
      ../WebKit/mac: 
      
      Reviewed by Gavin Barraclough.
      
      Mechanical changes to call value() after calling toString(), to
      convert from "JS string" (JSString*) to "C++ string" (UString), since
      toString() no longer returns a "C++ string".
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::addValueToArray):
      * WebView/WebFrame.mm:
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
      
      ../WebKit2: 
      
      Reviewed by Gavin Barraclough.
      
      Mechanical changes to call value() after calling toString(), to
      convert from "JS string" (JSString*) to "C++ string" (UString), since
      toString() no longer returns a "C++ string".
      
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
      (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64be5e90
  2. 15 Nov, 2011 1 commit
  3. 11 Nov, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Add jsCast to replace static_cast · 135f0517
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=72071
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      Added new jsCast and changed all of the static_cast sites in functions that 
      are in the MethodTable to use jsCast instead.
      
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::toStringCallback):
      (JSC::JSCallbackFunction::valueOfCallback):
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObject::visitChildren):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::className):
      (JSC::::getOwnPropertySlot):
      (JSC::::getOwnPropertyDescriptor):
      (JSC::::put):
      (JSC::::deleteProperty):
      (JSC::::deletePropertyByIndex):
      (JSC::::getConstructData):
      (JSC::::hasInstance):
      (JSC::::getCallData):
      (JSC::::getOwnPropertyNames):
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::visitChildren):
      (JSC::DebuggerActivation::className):
      (JSC::DebuggerActivation::getOwnPropertySlot):
      (JSC::DebuggerActivation::put):
      (JSC::DebuggerActivation::putWithAttributes):
      (JSC::DebuggerActivation::deleteProperty):
      (JSC::DebuggerActivation::getOwnPropertyNames):
      (JSC::DebuggerActivation::getOwnPropertyDescriptor):
      (JSC::DebuggerActivation::defineGetter):
      (JSC::DebuggerActivation::defineSetter):
      * runtime/Arguments.cpp:
      (JSC::Arguments::visitChildren):
      (JSC::Arguments::getOwnPropertySlotByIndex):
      (JSC::Arguments::getOwnPropertySlot):
      (JSC::Arguments::getOwnPropertyDescriptor):
      (JSC::Arguments::getOwnPropertyNames):
      (JSC::Arguments::putByIndex):
      (JSC::Arguments::put):
      (JSC::Arguments::deletePropertyByIndex):
      (JSC::Arguments::deleteProperty):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::getOwnPropertySlot):
      (JSC::ArrayConstructor::getOwnPropertyDescriptor):
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::getOwnPropertySlot):
      (JSC::ArrayPrototype::getOwnPropertyDescriptor):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::getOwnPropertySlot):
      (JSC::BooleanPrototype::getOwnPropertyDescriptor):
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::getOwnPropertySlot):
      (JSC::DateConstructor::getOwnPropertyDescriptor):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::getOwnPropertySlot):
      (JSC::DatePrototype::getOwnPropertyDescriptor):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::getOwnPropertySlot):
      (JSC::ErrorPrototype::getOwnPropertyDescriptor):
      * runtime/Executable.cpp:
      (JSC::ExecutableBase::clearCode):
      (JSC::EvalExecutable::visitChildren):
      (JSC::ProgramExecutable::visitChildren):
      (JSC::FunctionExecutable::visitChildren):
      * runtime/GetterSetter.cpp:
      (JSC::GetterSetter::visitChildren):
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::visitChildren):
      (JSC::JSActivation::getOwnPropertyNames):
      (JSC::JSActivation::getOwnPropertySlot):
      (JSC::JSActivation::put):
      (JSC::JSActivation::putWithAttributes):
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertySlotByIndex):
      (JSC::JSArray::getOwnPropertySlot):
      (JSC::JSArray::getOwnPropertyDescriptor):
      (JSC::JSArray::put):
      (JSC::JSArray::putByIndex):
      (JSC::JSArray::deleteProperty):
      (JSC::JSArray::deletePropertyByIndex):
      (JSC::JSArray::getOwnPropertyNames):
      (JSC::JSArray::visitChildren):
      * runtime/JSBoundFunction.cpp:
      (JSC::JSBoundFunction::hasInstance):
      (JSC::JSBoundFunction::visitChildren):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::getOwnPropertySlot):
      (JSC::JSByteArray::getOwnPropertyDescriptor):
      (JSC::JSByteArray::getOwnPropertySlotByIndex):
      (JSC::JSByteArray::put):
      (JSC::JSByteArray::putByIndex):
      (JSC::JSByteArray::getOwnPropertyNames):
      * runtime/JSCell.h:
      (JSC::JSCell::visitChildren):
      (JSC::jsCast):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::visitChildren):
      (JSC::JSFunction::getCallData):
      (JSC::JSFunction::getOwnPropertySlot):
      (JSC::JSFunction::getOwnPropertyDescriptor):
      (JSC::JSFunction::getOwnPropertyNames):
      (JSC::JSFunction::put):
      (JSC::JSFunction::deleteProperty):
      (JSC::JSFunction::getConstructData):
      * runtime/JSGlobalData.cpp:
      (JSC::StackPreservingRecompiler::operator()):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::put):
      (JSC::JSGlobalObject::putWithAttributes):
      (JSC::JSGlobalObject::defineGetter):
      (JSC::JSGlobalObject::defineSetter):
      (JSC::JSGlobalObject::visitChildren):
      (JSC::JSGlobalObject::getOwnPropertySlot):
      (JSC::JSGlobalObject::getOwnPropertyDescriptor):
      (JSC::JSGlobalObject::clearRareData):
      * runtime/JSGlobalThis.cpp:
      (JSC::JSGlobalThis::visitChildren):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::getOwnPropertySlot):
      (JSC::JSONObject::getOwnPropertyDescriptor):
      * runtime/JSObject.cpp:
      (JSC::JSObject::finalize):
      (JSC::JSObject::visitChildren):
      (JSC::JSObject::getOwnPropertySlotByIndex):
      (JSC::JSObject::put):
      (JSC::JSObject::putByIndex):
      (JSC::JSObject::deleteProperty):
      (JSC::JSObject::deletePropertyByIndex):
      * runtime/JSObject.h:
      (JSC::JSObject::getOwnPropertySlot):
      * runtime/JSPropertyNameIterator.cpp:
      (JSC::JSPropertyNameIterator::visitChildren):
      * runtime/JSStaticScopeObject.cpp:
      (JSC::JSStaticScopeObject::visitChildren):
      (JSC::JSStaticScopeObject::put):
      (JSC::JSStaticScopeObject::putWithAttributes):
      (JSC::JSStaticScopeObject::getOwnPropertySlot):
      * runtime/JSString.cpp:
      (JSC::JSString::visitChildren):
      (JSC::JSString::toThisObject):
      (JSC::JSString::getOwnPropertySlot):
      (JSC::JSString::getOwnPropertySlotByIndex):
      * runtime/JSVariableObject.cpp:
      (JSC::JSVariableObject::deleteProperty):
      (JSC::JSVariableObject::getOwnPropertyNames):
      * runtime/JSWrapperObject.cpp:
      (JSC::JSWrapperObject::visitChildren):
      * runtime/MathObject.cpp:
      (JSC::MathObject::getOwnPropertySlot):
      (JSC::MathObject::getOwnPropertyDescriptor):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::visitChildren):
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getOwnPropertySlot):
      (JSC::NumberConstructor::getOwnPropertyDescriptor):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::getOwnPropertySlot):
      (JSC::NumberPrototype::getOwnPropertyDescriptor):
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::getOwnPropertySlot):
      (JSC::ObjectConstructor::getOwnPropertyDescriptor):
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::put):
      (JSC::ObjectPrototype::getOwnPropertySlotByIndex):
      (JSC::ObjectPrototype::getOwnPropertySlot):
      (JSC::ObjectPrototype::getOwnPropertyDescriptor):
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::getOwnPropertySlot):
      (JSC::RegExpConstructor::getOwnPropertyDescriptor):
      (JSC::RegExpConstructor::put):
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::getOwnPropertySlot):
      (JSC::RegExpMatchesArray::getOwnPropertySlotByIndex):
      (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
      (JSC::RegExpMatchesArray::put):
      (JSC::RegExpMatchesArray::putByIndex):
      (JSC::RegExpMatchesArray::deleteProperty):
      (JSC::RegExpMatchesArray::deletePropertyByIndex):
      (JSC::RegExpMatchesArray::getOwnPropertyNames):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::visitChildren):
      (JSC::RegExpObject::getOwnPropertySlot):
      (JSC::RegExpObject::getOwnPropertyDescriptor):
      (JSC::RegExpObject::put):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::getOwnPropertySlot):
      (JSC::RegExpPrototype::getOwnPropertyDescriptor):
      * runtime/ScopeChain.cpp:
      (JSC::ScopeChainNode::visitChildren):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::getOwnPropertySlot):
      (JSC::StringConstructor::getOwnPropertyDescriptor):
      * runtime/StringObject.cpp:
      (JSC::StringObject::getOwnPropertySlot):
      (JSC::StringObject::getOwnPropertySlotByIndex):
      (JSC::StringObject::getOwnPropertyDescriptor):
      (JSC::StringObject::deleteProperty):
      (JSC::StringObject::getOwnPropertyNames):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::getOwnPropertySlot):
      (JSC::StringPrototype::getOwnPropertyDescriptor):
      * runtime/Structure.cpp:
      (JSC::Structure::visitChildren):
      * runtime/StructureChain.cpp:
      (JSC::StructureChain::visitChildren):
      
      Source/JavaScriptGlue: 
      
      Added new jsCast and changed all of the static_cast sites in functions that 
      are in the MethodTable to use jsCast instead.
      
      * UserObjectImp.cpp:
      (UserObjectImp::getCallData):
      (UserObjectImp::getOwnPropertyNames):
      (UserObjectImp::getOwnPropertySlot):
      (UserObjectImp::put):
      (UserObjectImp::visitChildren):
      
      Source/WebCore: 
      
      No new tests. 
      
      Added new jsCast and changed all of the static_cast sites in functions that 
      are in the MethodTable to use jsCast instead.
      
      * bindings/js/JSAttrCustom.cpp:
      (WebCore::JSAttr::visitChildren):
      * bindings/js/JSAudioContextCustom.cpp:
      (WebCore::JSAudioContext::visitChildren):
      * bindings/js/JSCSSRuleCustom.cpp:
      (WebCore::JSCSSRule::visitChildren):
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      (WebCore::JSCSSStyleDeclaration::visitChildren):
      * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
      (WebCore::toHTMLCanvasStyle):
      * bindings/js/JSCanvasRenderingContextCustom.cpp:
      (WebCore::JSCanvasRenderingContext::visitChildren):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::visitChildren):
      * bindings/js/JSDOMStringMapCustom.cpp:
      (WebCore::JSDOMStringMap::getOwnPropertyNames):
      (WebCore::JSDOMStringMap::deleteProperty):
      * bindings/js/JSDOMWindowBase.cpp:
      (WebCore::JSDOMWindowBase::toThisObject):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::visitChildren):
      (WebCore::JSDOMWindow::getOwnPropertySlot):
      (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
      (WebCore::JSDOMWindow::put):
      (WebCore::JSDOMWindow::deleteProperty):
      (WebCore::JSDOMWindow::getPropertyNames):
      (WebCore::JSDOMWindow::getOwnPropertyNames):
      (WebCore::JSDOMWindow::defineGetter):
      (WebCore::JSDOMWindow::defineSetter):
      (WebCore::JSDOMWindow::defineOwnProperty):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::className):
      (WebCore::JSDOMWindowShell::getOwnPropertySlot):
      (WebCore::JSDOMWindowShell::getOwnPropertyDescriptor):
      (WebCore::JSDOMWindowShell::put):
      (WebCore::JSDOMWindowShell::putWithAttributes):
      (WebCore::JSDOMWindowShell::defineOwnProperty):
      (WebCore::JSDOMWindowShell::deleteProperty):
      (WebCore::JSDOMWindowShell::getPropertyNames):
      (WebCore::JSDOMWindowShell::getOwnPropertyNames):
      (WebCore::JSDOMWindowShell::defineGetter):
      (WebCore::JSDOMWindowShell::defineSetter):
      * bindings/js/JSHTMLAppletElementCustom.cpp:
      (WebCore::JSHTMLAppletElement::getCallData):
      * bindings/js/JSHTMLEmbedElementCustom.cpp:
      (WebCore::JSHTMLEmbedElement::getCallData):
      * bindings/js/JSHTMLObjectElementCustom.cpp:
      (WebCore::JSHTMLObjectElement::getCallData):
      * bindings/js/JSHistoryCustom.cpp:
      (WebCore::JSHistory::deleteProperty):
      (WebCore::JSHistory::getOwnPropertyNames):
      * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
      (WebCore::JSJavaScriptAudioNode::visitChildren):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::deleteProperty):
      (WebCore::JSLocation::getOwnPropertyNames):
      * bindings/js/JSMessageChannelCustom.cpp:
      (WebCore::JSMessageChannel::visitChildren):
      * bindings/js/JSMessagePortCustom.cpp:
      (WebCore::JSMessagePort::visitChildren):
      * bindings/js/JSNamedNodeMapCustom.cpp:
      (WebCore::JSNamedNodeMap::visitChildren):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::visitChildren):
      * bindings/js/JSNodeFilterCustom.cpp:
      (WebCore::JSNodeFilter::visitChildren):
      * bindings/js/JSNodeIteratorCustom.cpp:
      (WebCore::JSNodeIterator::visitChildren):
      * bindings/js/JSSVGElementInstanceCustom.cpp:
      (WebCore::JSSVGElementInstance::visitChildren):
      * bindings/js/JSSharedWorkerCustom.cpp:
      (WebCore::JSSharedWorker::visitChildren):
      * bindings/js/JSStorageCustom.cpp:
      (WebCore::JSStorage::deleteProperty):
      (WebCore::JSStorage::getOwnPropertyNames):
      * bindings/js/JSStyleSheetCustom.cpp:
      (WebCore::JSStyleSheet::visitChildren):
      * bindings/js/JSTreeWalkerCustom.cpp:
      (WebCore::JSTreeWalker::visitChildren):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::JSWebGLRenderingContext::visitChildren):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::visitChildren):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::visitChildren):
      * bindings/js/JSXPathResultCustom.cpp:
      (WebCore::JSXPathResult::visitChildren):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterface::getOwnPropertySlot):
      (WebCore::JSTestInterface::getOwnPropertyDescriptor):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot):
      (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertyDescriptor):
      (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
      (WebCore::JSTestMediaQueryListListener::getOwnPropertyDescriptor):
      * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
      (WebCore::JSTestNamedConstructor::getOwnPropertySlot):
      (WebCore::JSTestNamedConstructor::getOwnPropertyDescriptor):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObjPrototype::getOwnPropertySlot):
      (WebCore::JSTestObjPrototype::getOwnPropertyDescriptor):
      (WebCore::JSTestObj::getOwnPropertySlot):
      (WebCore::JSTestObj::getOwnPropertyDescriptor):
      (WebCore::JSTestObj::put):
      (WebCore::JSTestObj::visitChildren):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
      (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertyDescriptor):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::getCallData):
      (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::visitChildren):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
      (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertySlot):
      (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertyDescriptor):
      (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertySlot):
      (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertyDescriptor):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::getOwnPropertyNames):
      (JSC::RuntimeArray::getOwnPropertySlot):
      (JSC::RuntimeArray::getOwnPropertyDescriptor):
      (JSC::RuntimeArray::getOwnPropertySlotByIndex):
      (JSC::RuntimeArray::put):
      (JSC::RuntimeArray::putByIndex):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::getOwnPropertySlot):
      (JSC::RuntimeMethod::getOwnPropertyDescriptor):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
      (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
      (JSC::Bindings::RuntimeObject::put):
      (JSC::Bindings::RuntimeObject::defaultValue):
      (JSC::Bindings::RuntimeObject::getCallData):
      (JSC::Bindings::RuntimeObject::getConstructData):
      (JSC::Bindings::RuntimeObject::getOwnPropertyNames):
      
      Source/WebKit2: 
      
      Added new jsCast and changed all of the static_cast sites in functions that 
      are in the MethodTable to use jsCast instead.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::getCallData):
      (WebKit::JSNPObject::getConstructData):
      (WebKit::JSNPObject::getOwnPropertySlot):
      (WebKit::JSNPObject::getOwnPropertyDescriptor):
      (WebKit::JSNPObject::put):
      (WebKit::JSNPObject::deleteProperty):
      (WebKit::JSNPObject::deletePropertyByIndex):
      (WebKit::JSNPObject::getOwnPropertyNames):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      135f0517
  4. 09 Nov, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      De-virtualize JSObject::getOwnPropertyDescriptor · 7f2f7e53
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=71523
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      Added getOwnPropertyDescriptor to the MethodTable, changed all of the 
      virtual versions of getOwnPropertyDescriptor to static ones, and 
      changed all of the call sites to the corresponding lookup in the MethodTable.
      
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getOwnPropertyDescriptor):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::getOwnPropertyDescriptor):
      * debugger/DebuggerActivation.h:
      * runtime/Arguments.cpp:
      (JSC::Arguments::getOwnPropertyDescriptor):
      * runtime/Arguments.h:
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::getOwnPropertyDescriptor):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::getOwnPropertyDescriptor):
      * runtime/ArrayPrototype.h:
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::getOwnPropertyDescriptor):
      * runtime/BooleanPrototype.h:
      * runtime/ClassInfo.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::getOwnPropertyDescriptor):
      * runtime/DateConstructor.h:
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::getOwnPropertyDescriptor):
      * runtime/DatePrototype.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::getOwnPropertyDescriptor):
      * runtime/ErrorPrototype.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertyDescriptor):
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::getOwnPropertyDescriptor):
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::getOwnPropertyDescriptor):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::getOwnPropertyDescriptor):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::getOwnPropertyDescriptor):
      * runtime/JSGlobalObject.h:
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::getOwnPropertyDescriptor):
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::getOwnPropertyDescriptor):
      * runtime/JSONObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::vtableAnchor):
      (JSC::JSObject::propertyIsEnumerable):
      (JSC::JSObject::getOwnPropertyDescriptor):
      (JSC::JSObject::getPropertyDescriptor):
      (JSC::JSObject::defineOwnProperty):
      * runtime/JSObject.h:
      * runtime/JSString.cpp: Removed getOwnPropertyDescriptor, since this seems to be a relic from a 
      bygone era when getOwnPropertyDescriptor was rooted in JSCell rather than JSObject.  There were 
      no call sites for this version of getOwnPropertyDescriptor in the entire project.
      * runtime/JSString.h:
      * runtime/Lookup.h:
      (JSC::getStaticPropertyDescriptor):
      (JSC::getStaticFunctionDescriptor):
      (JSC::getStaticValueDescriptor):
      * runtime/MathObject.cpp:
      (JSC::MathObject::getOwnPropertyDescriptor):
      * runtime/MathObject.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getOwnPropertyDescriptor):
      * runtime/NumberConstructor.h:
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::getOwnPropertyDescriptor):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::getOwnPropertyDescriptor):
      (JSC::objectConstructorGetOwnPropertyDescriptor):
      * runtime/ObjectConstructor.h:
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::getOwnPropertyDescriptor):
      * runtime/ObjectPrototype.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::getOwnPropertyDescriptor):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::getOwnPropertyDescriptor):
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::getOwnPropertyDescriptor):
      * runtime/RegExpPrototype.h:
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::getOwnPropertyDescriptor):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::vtableAnchor): Added to prevent a weak vtable.
      (JSC::StringObject::getOwnPropertyDescriptor):
      * runtime/StringObject.h:
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::getOwnPropertyDescriptor):
      * runtime/StringPrototype.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Added getOwnPropertyDescriptor to the MethodTable, changed all of the 
      virtual versions of getOwnPropertyDescriptor to static ones, and 
      changed all of the call sites to the corresponding lookup in the MethodTable.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::getOwnPropertyDescriptor):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::getOwnPropertyDescriptorDelegate):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateGetOwnPropertyDescriptorBody):
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateConstructorDeclaration):
      (GenerateConstructorDefinition):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterfaceConstructor::getOwnPropertyDescriptor):
      (WebCore::JSTestInterface::getOwnPropertyDescriptor):
      * bindings/scripts/test/JS/JSTestInterface.h:
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertyDescriptor):
      (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertyDescriptor):
      (WebCore::JSTestMediaQueryListListener::getOwnPropertyDescriptor):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObjConstructor::getOwnPropertyDescriptor):
      (WebCore::JSTestObjPrototype::getOwnPropertyDescriptor):
      (WebCore::JSTestObj::getOwnPropertyDescriptor):
      * bindings/scripts/test/JS/JSTestObj.h:
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertyDescriptor):
      (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertyDescriptor):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertyDescriptor):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertyDescriptor):
      (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertyDescriptor):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::getOwnPropertyDescriptor):
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::vtableAnchor): Added to prevent a weak vtable.
      (JSC::RuntimeMethod::getOwnPropertyDescriptor):
      * bridge/runtime_method.h: Changed getOwnPropertyDescriptor from private to protected to allow 
      subclasses to use it in their MethodTables.
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
      * bridge/runtime_object.h:
      
      Source/WebKit2: 
      
      Added getOwnPropertyDescriptor to the MethodTable, changed all of the 
      virtual versions of getOwnPropertyDescriptor to static ones, and 
      changed all of the call sites to the corresponding lookup in the MethodTable.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::getOwnPropertyDescriptor):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f2f7e53
  5. 26 Oct, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Remove getOwnPropertySlotVirtual · 5c103b05
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70741
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      Removed all declarations and definitions of getOwnPropertySlotVirtual.
      Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
      corresponding lookup in the MethodTable.
      
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getOwnPropertyDescriptor):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::getOwnPropertySlot):
      * debugger/DebuggerActivation.h:
      * runtime/Arguments.cpp:
      * runtime/Arguments.h:
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      * runtime/ArrayPrototype.h:
      * runtime/BooleanPrototype.cpp:
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      * runtime/DateConstructor.h:
      * runtime/DatePrototype.cpp:
      * runtime/DatePrototype.h:
      (JSC::DatePrototype::create):
      * runtime/ErrorPrototype.cpp:
      * runtime/ErrorPrototype.h:
      * runtime/JSActivation.cpp:
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertySlotByIndex):
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::getOwnPropertyDescriptor):
      (JSC::JSFunction::getOwnPropertyNames):
      (JSC::JSFunction::put):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/JSNotAnObject.cpp:
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      (JSC::Stringifier::Holder::appendNextProperty):
      (JSC::Walker::walk):
      * runtime/JSONObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::getOwnPropertySlotByIndex):
      (JSC::JSObject::hasOwnProperty):
      * runtime/JSObject.h:
      (JSC::JSCell::fastGetOwnPropertySlot):
      (JSC::JSObject::getPropertySlot):
      (JSC::JSValue::get):
      * runtime/JSStaticScopeObject.cpp:
      * runtime/JSStaticScopeObject.h:
      * runtime/JSString.cpp:
      (JSC::JSString::getOwnPropertySlot):
      * runtime/JSString.h:
      * runtime/MathObject.cpp:
      * runtime/MathObject.h:
      (JSC::MathObject::create):
      * runtime/NumberConstructor.cpp:
      * runtime/NumberConstructor.h:
      * runtime/NumberPrototype.cpp:
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectConstructor.h:
      * runtime/ObjectPrototype.cpp:
      * runtime/ObjectPrototype.h:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::createStructure):
      * runtime/RegExpObject.cpp:
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      * runtime/RegExpPrototype.h:
      * runtime/StringConstructor.cpp:
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      * runtime/StringObject.h:
      * runtime/StringPrototype.cpp:
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue: 
      
      Removed all declarations and definitions of getOwnPropertySlotVirtual.
      Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
      corresponding lookup in the MethodTable.
      
      * UserObjectImp.cpp:
      * UserObjectImp.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Removed all declarations and definitions of getOwnPropertySlotVirtual.
      Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
      corresponding lookup in the MethodTable.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::DialogHandler::returnValue):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::getOwnPropertySlot):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::CloneSerializer::getSparseIndex):
      (WebCore::CloneSerializer::getProperty):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateConstructorDeclaration):
      (GenerateConstructorDefinition):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      * bridge/qt/qt_runtime.cpp:
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp:
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      
      Source/WebKit2: 
      
      Removed all declarations and definitions of getOwnPropertySlotVirtual.
      Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
      corresponding lookup in the MethodTable.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c103b05
  6. 15 Oct, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Rename getOwnPropertySlot to getOwnPropertySlotVirtual · f0418c85
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69810
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      Renamed the virtual version of getOwnPropertySlot to getOwnPropertySlotVirtual
      in preparation for when we add the static getOwnPropertySlot to the MethodTable 
      in ClassInfo.
      
      Also added a few static getOwnPropertySlot functions where they had been overlooked 
      before (especially in CodeGeneratorJS.pm).
      
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getOwnPropertySlotVirtual):
      (JSC::::getOwnPropertySlot):
      (JSC::::getOwnPropertyDescriptor):
      (JSC::::staticFunctionGetter):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::getOwnPropertySlotVirtual):
      (JSC::DebuggerActivation::getOwnPropertySlot):
      * debugger/DebuggerActivation.h:
      * runtime/Arguments.cpp:
      (JSC::Arguments::getOwnPropertySlotVirtual):
      (JSC::Arguments::getOwnPropertySlot):
      * runtime/Arguments.h:
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::getOwnPropertySlotVirtual):
      (JSC::ArrayConstructor::getOwnPropertySlot):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::getOwnPropertySlotVirtual):
      * runtime/ArrayPrototype.h:
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::getOwnPropertySlotVirtual):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::getOwnPropertySlotVirtual):
      * runtime/DateConstructor.h:
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::getOwnPropertySlotVirtual):
      * runtime/DatePrototype.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::getOwnPropertySlotVirtual):
      * runtime/ErrorPrototype.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::getOwnPropertySlotVirtual):
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertySlotVirtual):
      (JSC::JSArray::getOwnPropertySlot):
      * runtime/JSArray.h:
      * runtime/JSBoundFunction.cpp:
      (JSC::JSBoundFunction::getOwnPropertySlotVirtual):
      * runtime/JSBoundFunction.h:
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::getOwnPropertySlotVirtual):
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::getOwnPropertySlotVirtual):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::getOwnPropertySlotVirtual):
      (JSC::JSFunction::getOwnPropertyDescriptor):
      (JSC::JSFunction::getOwnPropertyNames):
      (JSC::JSFunction::put):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::getOwnPropertySlotVirtual):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::hasOwnPropertyForWrite):
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::getOwnPropertySlotVirtual):
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      (JSC::Stringifier::Holder::appendNextProperty):
      (JSC::JSONObject::getOwnPropertySlotVirtual):
      (JSC::Walker::walk):
      * runtime/JSONObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::getOwnPropertySlotVirtual):
      (JSC::JSObject::getOwnPropertySlot):
      (JSC::JSObject::hasOwnProperty):
      * runtime/JSObject.h:
      (JSC::JSObject::getOwnPropertySlotVirtual):
      (JSC::JSCell::fastGetOwnPropertySlot):
      (JSC::JSObject::getPropertySlot):
      (JSC::JSValue::get):
      * runtime/JSStaticScopeObject.cpp:
      (JSC::JSStaticScopeObject::getOwnPropertySlotVirtual):
      * runtime/JSStaticScopeObject.h:
      * runtime/JSString.cpp:
      (JSC::JSString::getOwnPropertySlotVirtual):
      (JSC::JSString::getOwnPropertySlot):
      * runtime/JSString.h:
      * runtime/Lookup.h:
      (JSC::getStaticPropertySlot):
      (JSC::getStaticFunctionSlot):
      (JSC::getStaticValueSlot):
      * runtime/MathObject.cpp:
      (JSC::MathObject::getOwnPropertySlotVirtual):
      * runtime/MathObject.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getOwnPropertySlotVirtual):
      * runtime/NumberConstructor.h:
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::getOwnPropertySlotVirtual):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::getOwnPropertySlotVirtual):
      * runtime/ObjectConstructor.h:
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::getOwnPropertySlotVirtual):
      * runtime/ObjectPrototype.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::getOwnPropertySlotVirtual):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::getOwnPropertySlotVirtual):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::getOwnPropertySlotVirtual):
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::getOwnPropertySlotVirtual):
      * runtime/RegExpPrototype.h:
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::getOwnPropertySlotVirtual):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::getOwnPropertySlotVirtual):
      * runtime/StringObject.h:
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::getOwnPropertySlotVirtual):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue: 
      
      Renamed the virtual version of getOwnPropertySlot to getOwnPropertySlotVirtual
      in preparation for when we add the static getOwnPropertySlot to the MethodTable 
      in ClassInfo.
      
      Also added a few static getOwnPropertySlot functions where they had been overlooked 
      before (especially in CodeGeneratorJS.pm).
      
      * UserObjectImp.cpp:
      (UserObjectImp::getOwnPropertySlotVirtual):
      * UserObjectImp.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Renamed the virtual version of getOwnPropertySlot to getOwnPropertySlotVirtual
      in preparation for when we add the static getOwnPropertySlot to the MethodTable 
      in ClassInfo.
      
      Also added a few static getOwnPropertySlot functions where they had been overlooked 
      before (especially in CodeGeneratorJS.pm).
      
      * WebCore.exp.in:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::getOwnPropertySlotVirtual):
      (WebCore::JSDOMWindow::getOwnPropertySlot):
      (WebCore::DialogHandler::returnValue):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::getOwnPropertySlotVirtual):
      (WebCore::JSDOMWindowShell::getOwnPropertySlot):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::getOwnPropertySlotDelegate):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::CloneSerializer::getSparseIndex):
      (WebCore::CloneSerializer::getProperty):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateGetOwnPropertySlotBody):
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateConstructorDeclaration):
      (GenerateConstructorDefinition):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterfaceConstructor::getOwnPropertySlotVirtual):
      (WebCore::JSTestInterfaceConstructor::getOwnPropertySlot):
      (WebCore::JSTestInterface::getOwnPropertySlotVirtual):
      (WebCore::JSTestInterface::getOwnPropertySlot):
      * bindings/scripts/test/JS/JSTestInterface.h:
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlotVirtual):
      (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlot):
      (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlotVirtual):
      (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot):
      (WebCore::JSTestMediaQueryListListener::getOwnPropertySlotVirtual):
      (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObjConstructor::getOwnPropertySlotVirtual):
      (WebCore::JSTestObjConstructor::getOwnPropertySlot):
      (WebCore::JSTestObjPrototype::getOwnPropertySlotVirtual):
      (WebCore::JSTestObjPrototype::getOwnPropertySlot):
      (WebCore::JSTestObj::getOwnPropertySlotVirtual):
      (WebCore::JSTestObj::getOwnPropertySlot):
      * bindings/scripts/test/JS/JSTestObj.h:
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlotVirtual):
      (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlot):
      (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlotVirtual):
      (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlotVirtual):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtInstance::getOwnPropertySlot):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertySlotVirtual):
      (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertySlotVirtual):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::getOwnPropertySlotVirtual):
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::getOwnPropertySlotVirtual):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::getOwnPropertySlotVirtual):
      * bridge/runtime_object.h:
      
      Source/WebKit2: 
      
      Renamed the virtual version of getOwnPropertySlot to getOwnPropertySlotVirtual
      in preparation for when we add the static getOwnPropertySlot to the MethodTable 
      in ClassInfo.
      
      Also added a few static getOwnPropertySlot functions where they had been overlooked 
      before (especially in CodeGeneratorJS.pm).
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::getOwnPropertySlotVirtual):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f0418c85
  7. 08 Oct, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Add static version of JSCell::getOwnPropertySlot · 1986964e
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69593
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Added static version of getOwnPropertySlot to every class that overrides
      JSCell::getOwnPropertySlot.  The virtual versions now call the static versions.
      This is the first step in de-virtualizing JSCell::getOwnPropertySlot.
      
      * JavaScriptCore.exp:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::getOwnPropertySlot):
      * debugger/DebuggerActivation.h:
      * runtime/Arguments.cpp:
      (JSC::Arguments::getOwnPropertySlot):
      * runtime/Arguments.h:
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::getOwnPropertySlot):
      * runtime/ArrayPrototype.h:
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::getOwnPropertySlot):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::getOwnPropertySlot):
      * runtime/DateConstructor.h:
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::getOwnPropertySlot):
      * runtime/DatePrototype.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::getOwnPropertySlot):
      * runtime/ErrorPrototype.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::getOwnPropertySlot):
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertySlot):
      * runtime/JSArray.h:
      * runtime/JSBoundFunction.cpp:
      (JSC::JSBoundFunction::getOwnPropertySlot):
      * runtime/JSBoundFunction.h:
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::getOwnPropertySlot):
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::getOwnPropertySlot):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::getOwnPropertySlot):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::getOwnPropertySlot):
      * runtime/JSGlobalObject.h:
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::getOwnPropertySlot):
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::getOwnPropertySlot):
      * runtime/JSONObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::getOwnPropertySlot):
      * runtime/JSObject.h:
      (JSC::JSObject::getOwnPropertySlot):
      * runtime/JSStaticScopeObject.cpp:
      (JSC::JSStaticScopeObject::getOwnPropertySlot):
      * runtime/JSStaticScopeObject.h:
      * runtime/JSString.cpp:
      (JSC::JSString::getOwnPropertySlot):
      * runtime/JSString.h:
      * runtime/MathObject.cpp:
      (JSC::MathObject::getOwnPropertySlot):
      * runtime/MathObject.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getOwnPropertySlot):
      * runtime/NumberConstructor.h:
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::getOwnPropertySlot):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::getOwnPropertySlot):
      * runtime/ObjectConstructor.h:
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::getOwnPropertySlot):
      * runtime/ObjectPrototype.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::getOwnPropertySlot):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::getOwnPropertySlot):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::getOwnPropertySlot):
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::getOwnPropertySlot):
      * runtime/RegExpPrototype.h:
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::getOwnPropertySlot):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::getOwnPropertySlot):
      * runtime/StringObject.h:
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::getOwnPropertySlot):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue:
      
      Added static version of getOwnPropertySlot to every class that overrides
      JSCell::getOwnPropertySlot.  The virtual versions now call the static versions.
      This is the first step in de-virtualizing JSCell::getOwnPropertySlot.
      
      * UserObjectImp.cpp:
      (UserObjectImp::getOwnPropertySlot):
      * UserObjectImp.h:
      
      Source/WebCore:
      
      No new tests.
      
      Added static version of getOwnPropertySlot to every class that overrides
      JSCell::getOwnPropertySlot.  The virtual versions now call the static versions.
      This is the first step in de-virtualizing JSCell::getOwnPropertySlot.
      
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::getOwnPropertySlot):
      * bindings/js/JSDOMWindowShell.h:
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertySlot):
      (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertySlot):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::getOwnPropertySlot):
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::getOwnPropertySlot):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
      * bridge/runtime_object.h:
      
      Source/WebKit2:
      
      Added static version of getOwnPropertySlot to every class that overrides
      JSCell::getOwnPropertySlot.  The virtual versions now call the static versions.
      This is the first step in de-virtualizing JSCell::getOwnPropertySlot.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::getOwnPropertySlot):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1986964e
  8. 30 Sep, 2011 1 commit
    • barraclough@apple.com's avatar
      StringRecursionChecker should not work in terms of EncodedJSValue · 4782ba83
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69188
      
      Reviewed by Oliver Hunt.
      
      0 is not the empty value on 32_64.
      Code that casts literals to EncodedJSValues may be unsafe if we change our internal representation.
      
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      (JSC::arrayProtoFuncToLocaleString):
      (JSC::arrayProtoFuncJoin):
      * runtime/ErrorPrototype.cpp:
      (JSC::errorProtoFuncToString):
      * runtime/RegExpPrototype.cpp:
      (JSC::regExpProtoFuncToString):
      * runtime/StringRecursionChecker.cpp:
      (JSC::StringRecursionChecker::throwStackOverflowError):
      (JSC::StringRecursionChecker::emptyString):
      * runtime/StringRecursionChecker.h:
      (JSC::StringRecursionChecker::performCheck):
      (JSC::StringRecursionChecker::earlyReturnValue):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4782ba83
  9. 26 Sep, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Add custom vtable struct to ClassInfo struct · 3e084662
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68567
      
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore:
      
      Declared/defined the MethodTable struct and added it to the ClassInfo struct.
      Also defined the CREATE_METHOD_TABLE macro to generate these method tables
      succinctly where they need to be defined.
      
      Also added to it the first function to use this macro, visitChildren.
      
      This is part of the process of getting rid of all C++ virtual methods in JSCell.
      Eventually all virtual functions in JSCell that can't easily be converted to
      non-virtual functions will be put into this custom vtable structure.
      * runtime/ClassInfo.h:
      
      Added the CREATE_METHOD_TABLE macro call as the last argument to each of the
      ClassInfo structs declared in these classes.  This saves us from having to visit
      each s_info definition in the future when we add more methods to the MethodTable.
      * API/JSCallbackConstructor.cpp:
      * API/JSCallbackFunction.cpp:
      * API/JSCallbackObject.cpp:
      * JavaScriptCore.exp:
      * runtime/Arguments.cpp:
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayPrototype.cpp:
      * runtime/BooleanObject.cpp:
      * runtime/BooleanPrototype.cpp:
      * runtime/DateConstructor.cpp:
      * runtime/DateInstance.cpp:
      * runtime/DatePrototype.cpp:
      * runtime/ErrorInstance.cpp:
      * runtime/ErrorPrototype.cpp:
      * runtime/ExceptionHelpers.cpp:
      * runtime/Executable.cpp:
      * runtime/GetterSetter.cpp:
      * runtime/InternalFunction.cpp:
      * runtime/JSAPIValueWrapper.cpp:
      * runtime/JSActivation.cpp:
      * runtime/JSArray.cpp:
      * runtime/JSByteArray.cpp:
      * runtime/JSFunction.cpp:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSONObject.cpp:
      * runtime/JSObject.cpp:
      * runtime/JSPropertyNameIterator.cpp:
      * runtime/JSString.cpp:
      * runtime/MathObject.cpp:
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberObject.cpp:
      * runtime/NumberPrototype.cpp:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectPrototype.cpp:
      * runtime/RegExp.cpp:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpObject.cpp:
      * runtime/RegExpPrototype.cpp:
      * runtime/ScopeChain.cpp:
      * runtime/StringConstructor.cpp:
      * runtime/StringObject.cpp:
      * runtime/StringPrototype.cpp:
      * runtime/Structure.cpp:
      * runtime/StructureChain.cpp:
      
      Had to make visitChildren and visitChildrenVirtual protected instead of private
      because some of the subclasses of JSWrapperObject need access to JSWrapperObject's
      visitChildren function pointer in their vtable since they don't provide their own
      implementation. Same for RegExpObject.
      * runtime/JSWrapperObject.h:
      * runtime/RegExpObject.h:
      
      Source/JavaScriptGlue:
      
      Added CREATE_METHOD_TABLE macro to generate the custom vtable for the
      specified class in its ClassInfo.  Also added to it the first function to use
      this macro, visitChildren.  This is part of the process of getting rid of all
      C++ virtual methods in JSCell.  Eventually all virtual functions in JSCell
      that can't easily be converted to non-virtual functions will be put into
      this custom vtable structure.
      
      * UserObjectImp.cpp:
      
      Source/WebCore:
      
      No new tests.
      
      Added CREATE_METHOD_TABLE macro to generate the custom vtable for the
      specified class in its ClassInfo.  Also added to it the first function to use
      this macro, visitChildren.  This is part of the process of getting rid of all
      C++ virtual methods in JSCell.  Eventually all virtual functions in JSCell
      that can't easily be converted to non-virtual functions will be put into
      this custom vtable structure.
      
      * bindings/js/JSAudioConstructor.cpp:
      * bindings/js/JSDOMGlobalObject.cpp:
      * bindings/js/JSDOMWindowBase.cpp:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSImageConstructor.cpp:
      * bindings/js/JSImageDataCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSOptionConstructor.cpp:
      * bindings/js/JSWorkerContextBase.cpp:
      
      Changed the bindings generator to add the call to the CREATE_METHOD_TABLE macro where
      necessary.
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      (GenerateConstructorDefinition):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      * bindings/scripts/test/JS/JSTestObj.cpp:
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      * bridge/c/CRuntimeObject.cpp:
      * bridge/c/c_instance.cpp:
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      * bridge/objc/ObjCRuntimeObject.mm:
      * bridge/objc/objc_instance.mm:
      * bridge/objc/objc_runtime.mm:
      * bridge/qt/qt_instance.cpp:
      * bridge/qt/qt_pixmapruntime.cpp:
      * bridge/qt/qt_runtime.cpp:
      * bridge/runtime_array.cpp:
      * bridge/runtime_method.cpp:
      * bridge/runtime_object.cpp:
      
      Source/WebKit/mac:
      
      Added CREATE_METHOD_TABLE macro to generate the custom vtable for the
      specified class in its ClassInfo.  Also added to it the first function to use
      this macro, visitChildren.  This is part of the process of getting rid of all
      C++ virtual methods in JSCell.  Eventually all virtual functions in JSCell
      that can't easily be converted to non-virtual functions will be put into
      this custom vtable structure.
      
      * Plugins/Hosted/ProxyInstance.mm:
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      
      Source/WebKit2:
      
      Added CREATE_METHOD_TABLE macro to generate the custom vtable for the
      specified class in its ClassInfo.  Also added to it the first function to use
      this macro, visitChildren.  This is part of the process of getting rid of all
      C++ virtual methods in JSCell.  Eventually all virtual functions in JSCell
      that can't easily be converted to non-virtual functions will be put into
      this custom vtable structure.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e084662
  10. 11 Sep, 2011 1 commit
    • oliver@apple.com's avatar
      Remove support for anonymous storage from jsobjects · 8c798d2c
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67881
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore:
      
      Remove all use of anonymous slots, essentially a mechanical change
      in JavaScriptCore
      
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::createStructure):
      * API/JSCallbackFunction.h:
      (JSC::JSCallbackFunction::createStructure):
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObject::createStructure):
      * JavaScriptCore.exp:
      * debugger/DebuggerActivation.h:
      (JSC::DebuggerActivation::createStructure):
      * heap/MarkStack.cpp:
      (JSC::MarkStack::validateValue):
      * heap/MarkStack.h:
      * runtime/Arguments.h:
      (JSC::Arguments::createStructure):
      * runtime/ArrayConstructor.h:
      (JSC::ArrayConstructor::createStructure):
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::finishCreation):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::createStructure):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::createStructure):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      * runtime/BooleanPrototype.h:
      (JSC::BooleanPrototype::createStructure):
      * runtime/DateConstructor.h:
      (JSC::DateConstructor::createStructure):
      * runtime/DateInstance.h:
      (JSC::DateInstance::createStructure):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      * runtime/DatePrototype.h:
      (JSC::DatePrototype::createStructure):
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::createStructure):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::finishCreation):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::createStructure):
      * runtime/ExceptionHelpers.h:
      (JSC::InterruptedExecutionError::createStructure):
      (JSC::TerminatedExecutionError::createStructure):
      * runtime/Executable.h:
      (JSC::ExecutableBase::createStructure):
      (JSC::NativeExecutable::createStructure):
      (JSC::EvalExecutable::createStructure):
      (JSC::ProgramExecutable::createStructure):
      (JSC::FunctionExecutable::createStructure):
      * runtime/FunctionPrototype.h:
      (JSC::FunctionPrototype::createStructure):
      * runtime/GetterSetter.h:
      (JSC::GetterSetter::createStructure):
      * runtime/InternalFunction.h:
      (JSC::InternalFunction::createStructure):
      * runtime/JSAPIValueWrapper.h:
      (JSC::JSAPIValueWrapper::createStructure):
      * runtime/JSActivation.h:
      (JSC::JSActivation::createStructure):
      * runtime/JSArray.h:
      (JSC::JSArray::createStructure):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::createStructure):
      * runtime/JSCell.h:
      * runtime/JSFunction.h:
      (JSC::JSFunction::createStructure):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::finishCreation):
      (JSC::JSGlobalObject::createStructure):
      * runtime/JSNotAnObject.h:
      (JSC::JSNotAnObject::createStructure):
      * runtime/JSONObject.h:
      (JSC::JSONObject::createStructure):
      * runtime/JSObject.h:
      (JSC::JSObject::createStructure):
      (JSC::JSNonFinalObject::createStructure):
      (JSC::JSFinalObject::createStructure):
      * runtime/JSPropertyNameIterator.cpp:
      (JSC::JSPropertyNameIterator::create):
      * runtime/JSPropertyNameIterator.h:
      (JSC::JSPropertyNameIterator::createStructure):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::createStructure):
      * runtime/JSString.h:
      (JSC::RopeBuilder::createStructure):
      * runtime/JSVariableObject.h:
      (JSC::JSVariableObject::createStructure):
      * runtime/JSWrapperObject.h:
      (JSC::JSWrapperObject::createStructure):
      * runtime/MathObject.h:
      (JSC::MathObject::createStructure):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::createStructure):
      * runtime/NumberConstructor.h:
      (JSC::NumberConstructor::createStructure):
      * runtime/NumberObject.h:
      (JSC::NumberObject::createStructure):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      * runtime/NumberPrototype.h:
      (JSC::NumberPrototype::createStructure):
      * runtime/ObjectConstructor.h:
      (JSC::ObjectConstructor::createStructure):
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::finishCreation):
      * runtime/ObjectPrototype.h:
      (JSC::ObjectPrototype::createStructure):
      * runtime/RegExp.h:
      (JSC::RegExp::createStructure):
      * runtime/RegExpConstructor.h:
      (JSC::RegExpConstructor::createStructure):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::createStructure):
      * runtime/RegExpPrototype.h:
      (JSC::RegExpPrototype::createStructure):
      * runtime/ScopeChain.h:
      (JSC::ScopeChainNode::createStructure):
      * runtime/StrictEvalActivation.h:
      (JSC::StrictEvalActivation::createStructure):
      * runtime/StringConstructor.h:
      (JSC::StringConstructor::createStructure):
      * runtime/StringObject.h:
      (JSC::StringObject::createStructure):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      * runtime/StringPrototype.h:
      (JSC::StringPrototype::createStructure):
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
      (JSC::Structure::materializePropertyMap):
      (JSC::Structure::addPropertyTransitionToExistingStructure):
      (JSC::Structure::addPropertyTransition):
      (JSC::Structure::removePropertyTransition):
      (JSC::Structure::changePrototypeTransition):
      (JSC::Structure::despecifyFunctionTransition):
      (JSC::Structure::getterSetterTransition):
      (JSC::Structure::toDictionaryTransition):
      (JSC::Structure::preventExtensionsTransition):
      (JSC::Structure::flattenDictionaryStructure):
      (JSC::Structure::addPropertyWithoutTransition):
      (JSC::Structure::removePropertyWithoutTransition):
      (JSC::Structure::get):
      (JSC::Structure::putSpecificValue):
      (JSC::Structure::remove):
      (JSC::Structure::checkConsistency):
      * runtime/Structure.h:
      (JSC::Structure::create):
      (JSC::Structure::propertyStorageSize):
      (JSC::Structure::get):
      * runtime/StructureChain.h:
      (JSC::StructureChain::createStructure):
      
      Source/JavaScriptGlue:
      
      Don't need an anonymous slot count anymore
      
      * UserObjectImp.h:
      (UserObjectImp::createStructure):
      
      Source/WebCore:
      
      Remove all use of anonymous slots, this required modifying
      bindings generation to add member variables for cached attributes,
      and override visitChildren with the necessary logic to mark those
      new members.
      
      I added bindings generation tests for these values.
      
      * bindings/js/JSAudioConstructor.h:
      (WebCore::JSAudioConstructor::createStructure):
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::createStructure):
      * bindings/js/JSDOMGlobalObject.h:
      (WebCore::JSDOMGlobalObject::createStructure):
      * bindings/js/JSDOMWindowBase.h:
      (WebCore::JSDOMWindowBase::createStructure):
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::createStructure):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::createStructure):
      * bindings/js/JSImageConstructor.h:
      (WebCore::JSImageConstructor::createStructure):
      * bindings/js/JSMessageEventCustom.cpp:
      (WebCore::JSMessageEvent::data):
      (WebCore::JSMessageEvent::initMessageEvent):
      * bindings/js/JSOptionConstructor.h:
      (WebCore::JSOptionConstructor::createStructure):
      * bindings/js/JSWorkerContextBase.h:
      (WebCore::JSWorkerContextBase::createStructure):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateConstructorDeclaration):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterfaceConstructor::createStructure):
      * bindings/scripts/test/JS/JSTestInterface.h:
      (WebCore::JSTestInterface::createStructure):
      (WebCore::JSTestInterfacePrototype::createStructure):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
      (WebCore::JSTestMediaQueryListListener::createStructure):
      (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObjConstructor::createStructure):
      (WebCore::jsTestObjCachedAttribute1):
      (WebCore::jsTestObjCachedAttribute2):
      (WebCore::JSTestObj::visitChildren):
      * bindings/scripts/test/JS/JSTestObj.h:
      (WebCore::JSTestObj::createStructure):
      (WebCore::JSTestObjPrototype::createStructure):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
      (WebCore::JSTestSerializedScriptValueInterface::createStructure):
      (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
      * bindings/scripts/test/TestObj.idl:
      * bindings/scripts/test/V8/V8TestObj.cpp:
      (WebCore::TestObjInternal::cachedAttribute1AttrGetter):
      (WebCore::TestObjInternal::cachedAttribute2AttrGetter):
      * bridge/c/CRuntimeObject.h:
      (JSC::Bindings::CRuntimeObject::createStructure):
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CRuntimeMethod::createStructure):
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaRuntimeMethod::createStructure):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      (JSC::Bindings::JavaRuntimeObject::createStructure):
      * bridge/objc/ObjCRuntimeObject.h:
      (JSC::Bindings::ObjCRuntimeObject::createStructure):
      * bridge/objc/objc_instance.mm:
      (ObjCRuntimeMethod::createStructure):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::createStructure):
      * bridge/runtime_method.h:
      (JSC::RuntimeMethod::createStructure):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::createStructure):
      
      Source/WebKit/mac:
      
      Remove the use of AnonymousSlotCount
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.h:
      (WebKit::ProxyRuntimeObject::createStructure):
      
      Source/WebKit2:
      
      Remove the use of AnonymousSlotCount.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::createStructure):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c798d2c
  11. 09 Sep, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Unzip initialization lists and constructors in JSCell hierarchy (5/7) · 7317a7f6
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67420
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::create):
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::JSCallbackFunction):
      (JSC::JSCallbackFunction::finishCreation):
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::JSCallbackObject):
      (JSC::::finishCreation):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      * debugger/DebuggerActivation.h:
      (JSC::DebuggerActivation::create):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (GlobalObject::GlobalObject):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      (JSC::ArrayConstructor::finishCreation):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::create):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::BooleanConstructor):
      (JSC::BooleanConstructor::finishCreation):
      * runtime/BooleanConstructor.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::create):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      (JSC::BooleanPrototype::finishCreation):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      (JSC::DateConstructor::finishCreation):
      * runtime/DateConstructor.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      * runtime/DateInstance.h:
      (JSC::DateInstance::create):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      (JSC::DatePrototype::finishCreation):
      * runtime/DatePrototype.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::ErrorConstructor):
      (JSC::ErrorConstructor::finishCreation):
      * runtime/ErrorConstructor.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::create):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::FunctionConstructor):
      (JSC::FunctionConstructor::finishCreation):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::FunctionPrototype):
      (JSC::FunctionPrototype::finishCreation):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      * runtime/JSActivation.h:
      (JSC::JSActivation::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::create):
      (JSC::JSGlobalObject::JSGlobalObject):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      * runtime/JSONObject.h:
      (JSC::JSONObject::create):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.cpp:
      (JSC::StringObject::create):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      * runtime/MathObject.h:
      (JSC::MathObject::create):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::finishCreation):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::finishCreation):
      * runtime/NativeErrorPrototype.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::NumberConstructor):
      (JSC::NumberConstructor::finishCreation):
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      * runtime/NumberObject.h:
      (JSC::NumberObject::create):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      (JSC::NumberPrototype::finishCreation):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      (JSC::ObjectConstructor::finishCreation):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::RegExpConstructor):
      (JSC::RegExpConstructor::finishCreation):
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::create):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::create):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      (JSC::StringConstructor::finishCreation):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      (JSC::StringPrototype::finishCreation):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * JSRun.cpp:
      (JSGlueGlobalObject::JSGlueGlobalObject):
      
      Source/WebCore:
      
      No new tests.
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::DOMConstructorObject):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      (WebCore::JSDOMGlobalObject::finishCreation):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterface::JSTestInterface):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::JSTestObj):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
      * bridge/c/CRuntimeObject.cpp:
      (JSC::Bindings::CRuntimeObject::CRuntimeObject):
      (JSC::Bindings::CRuntimeObject::finishCreation):
      * bridge/c/CRuntimeObject.h:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
      (JSC::Bindings::JavaRuntimeObject::finishCreation):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
      (JSC::Bindings::ObjCRuntimeObject::finishCreation):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::create):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
      * bridge/qt/qt_pixmapruntime.cpp:
      (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
      (JSC::Bindings::QtRuntimeMethod::finishCreation):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::RuntimeMethod):
      (JSC::RuntimeMethod::finishCreation):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::create):
      
      Source/WebKit/mac:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * Plugins/Hosted/ProxyRuntimeObject.h:
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      (WebKit::ProxyRuntimeObject::finishCreation):
      
      Source/WebKit2:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      (WebKit::JSNPMethod::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::create):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7317a7f6
  12. 07 Sep, 2011 2 commits
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r94627 and r94632. · f192b44a
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/94627
      http://trac.webkit.org/changeset/94632
      https://bugs.webkit.org/show_bug.cgi?id=67698
      
      It broke tests on GTK and Qt (Requested by Ossy on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-09-07
      
      Source/JavaScriptCore:
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::create):
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::JSCallbackFunction):
      * API/JSCallbackFunction.h:
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::create):
      * debugger/DebuggerActivation.h:
      * jsc.cpp:
      (GlobalObject::constructorBody):
      (GlobalObject::GlobalObject):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::create):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::BooleanConstructor):
      * runtime/BooleanConstructor.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::create):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      * runtime/DateConstructor.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      * runtime/DateInstance.h:
      (JSC::DateInstance::create):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      * runtime/DatePrototype.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::ErrorConstructor):
      * runtime/ErrorConstructor.h:
      (JSC::ErrorConstructor::create):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::create):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::FunctionConstructor):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::FunctionPrototype):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      * runtime/JSActivation.h:
      (JSC::JSActivation::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::create):
      (JSC::JSGlobalObject::JSGlobalObject):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      * runtime/JSONObject.h:
      (JSC::JSONObject::create):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.cpp:
      (JSC::StringObject::create):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      * runtime/MathObject.h:
      (JSC::MathObject::create):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::constructorBody):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::constructorBody):
      * runtime/NativeErrorPrototype.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::NumberConstructor):
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      * runtime/NumberObject.h:
      (JSC::NumberObject::create):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::RegExpConstructor):
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::create):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::create):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue:
      
      * JSRun.cpp:
      (JSGlueGlobalObject::JSGlueGlobalObject):
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::DOMConstructorObject):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterface::JSTestInterface):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::JSTestObj):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
      * bridge/c/CRuntimeObject.cpp:
      (JSC::Bindings::CRuntimeObject::CRuntimeObject):
      * bridge/c/CRuntimeObject.h:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::create):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
      * bridge/qt/qt_pixmapruntime.cpp:
      (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::RuntimeMethod):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::create):
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/ProxyRuntimeObject.h:
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      
      Source/WebKit2:
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      (WebKit::JSNPObject::create):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f192b44a
    • commit-queue@webkit.org's avatar
      Unzip initialization lists and constructors in JSCell hierarchy (5/7) · 5ab29813
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67420
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-06
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::create):
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::JSCallbackFunction):
      (JSC::JSCallbackFunction::finishCreation):
      * API/JSCallbackFunction.h:
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      * debugger/DebuggerActivation.h:
      (JSC::DebuggerActivation::create):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (GlobalObject::GlobalObject):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      (JSC::ArrayConstructor::finishCreation):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::create):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::BooleanConstructor):
      (JSC::BooleanConstructor::finishCreation):
      * runtime/BooleanConstructor.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::create):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      (JSC::BooleanPrototype::finishCreation):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      (JSC::DateConstructor::finishCreation):
      * runtime/DateConstructor.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      * runtime/DateInstance.h:
      (JSC::DateInstance::create):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      (JSC::DatePrototype::finishCreation):
      * runtime/DatePrototype.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::ErrorConstructor):
      (JSC::ErrorConstructor::finishCreation):
      * runtime/ErrorConstructor.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::create):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::FunctionConstructor):
      (JSC::FunctionConstructor::finishCreation):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::FunctionPrototype):
      (JSC::FunctionPrototype::finishCreation):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      * runtime/JSActivation.h:
      (JSC::JSActivation::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::create):
      (JSC::JSGlobalObject::JSGlobalObject):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      * runtime/JSONObject.h:
      (JSC::JSONObject::create):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.cpp:
      (JSC::StringObject::create):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      * runtime/MathObject.h:
      (JSC::MathObject::create):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::finishCreation):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::finishCreation):
      * runtime/NativeErrorPrototype.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::NumberConstructor):
      (JSC::NumberConstructor::finishCreation):
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      * runtime/NumberObject.h:
      (JSC::NumberObject::create):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      (JSC::NumberPrototype::finishCreation):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      (JSC::ObjectConstructor::finishCreation):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::RegExpConstructor):
      (JSC::RegExpConstructor::finishCreation):
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::create):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::create):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      (JSC::StringConstructor::finishCreation):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      (JSC::StringPrototype::finishCreation):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * JSRun.cpp:
      (JSGlueGlobalObject::JSGlueGlobalObject):
      
      Source/WebCore:
      
      No new tests.
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::DOMConstructorObject):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      (WebCore::JSDOMGlobalObject::finishCreation):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterface::JSTestInterface):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::JSTestObj):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
      * bridge/c/CRuntimeObject.cpp:
      (JSC::Bindings::CRuntimeObject::CRuntimeObject):
      (JSC::Bindings::CRuntimeObject::finishCreation):
      * bridge/c/CRuntimeObject.h:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
      (JSC::Bindings::JavaRuntimeObject::finishCreation):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
      (JSC::Bindings::ObjCRuntimeObject::finishCreation):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::create):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
      * bridge/qt/qt_pixmapruntime.cpp:
      (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
      (JSC::Bindings::QtRuntimeMethod::finishCreation):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::RuntimeMethod):
      (JSC::RuntimeMethod::finishCreation):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::create):
      
      Source/WebKit/mac:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * Plugins/Hosted/ProxyRuntimeObject.h:
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      (WebKit::ProxyRuntimeObject::finishCreation):
      
      Source/WebKit2:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      (WebKit::JSNPMethod::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ab29813
  13. 01 Sep, 2011 1 commit
    • commit-queue@webkit.org's avatar
      Unzip initialization lists and constructors in JSCell hierarchy (4/7) · 6e5671b6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67174
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-01
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore:
      
      Completed the fourth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      (JSC::JSCallbackConstructor::finishCreation):
      * API/JSCallbackConstructor.h:
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObject::create):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::JSCallbackObject):
      (JSC::::finishCreation):
      * JavaScriptCore.JSVALUE64only.exp:
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::DebuggerActivation):
      (JSC::DebuggerActivation::create):
      * debugger/DebuggerActivation.h:
      * runtime/Arguments.h:
      (JSC::Arguments::create):
      (JSC::Arguments::createNoParameters):
      (JSC::Arguments::Arguments):
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      (JSC::ArrayPrototype::finishCreation):
      * runtime/ArrayPrototype.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      (JSC::BooleanObject::finishCreation):
      * runtime/BooleanObject.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      (JSC::DateInstance::finishCreation):
      * runtime/DateInstance.h:
      * runtime/ErrorInstance.cpp:
      (JSC::ErrorInstance::ErrorInstance):
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::create):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      (JSC::ErrorPrototype::finishCreation):
      * runtime/ErrorPrototype.h:
      * runtime/ExceptionHelpers.cpp:
      (JSC::InterruptedExecutionError::InterruptedExecutionError):
      (JSC::InterruptedExecutionError::create):
      (JSC::TerminatedExecutionError::TerminatedExecutionError):
      (JSC::TerminatedExecutionError::create):
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::EvalExecutable):
      (JSC::ProgramExecutable::ProgramExecutable):
      (JSC::FunctionExecutable::FunctionExecutable):
      * runtime/Executable.h:
      (JSC::NativeExecutable::create):
      (JSC::NativeExecutable::NativeExecutable):
      (JSC::EvalExecutable::create):
      (JSC::ProgramExecutable::create):
      (JSC::FunctionExecutable::create):
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      (JSC::InternalFunction::finishCreation):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      (JSC::JSActivation::finishCreation):
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::JSArray):
      * runtime/JSArray.h:
      (JSC::JSArray::create):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::JSByteArray):
      * runtime/JSByteArray.h:
      (JSC::JSByteArray::create):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::JSFunction):
      (JSC::JSFunction::finishCreation):
      * runtime/JSFunction.h:
      (JSC::JSFunction::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::JSGlobalObject):
      (JSC::JSGlobalObject::finishCreation):
      * runtime/JSNotAnObject.h:
      (JSC::JSNotAnObject::JSNotAnObject):
      (JSC::JSNotAnObject::create):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      (JSC::JSONObject::finishCreation):
      * runtime/JSONObject.h:
      * runtime/JSObjectWithGlobalObject.cpp:
      (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
      * runtime/JSObjectWithGlobalObject.h:
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::finishCreation):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSVariableObject.h:
      (JSC::JSVariableObject::JSVariableObject):
      * runtime/JSWrapperObject.h:
      (JSC::JSWrapperObject::JSWrapperObject):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      (JSC::MathObject::finishCreation):
      * runtime/MathObject.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      (JSC::NumberObject::finishCreation):
      * runtime/NumberObject.h:
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::ObjectPrototype):
      * runtime/ObjectPrototype.h:
      (JSC::ObjectPrototype::create):
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      (JSC::RegExpMatchesArray::finishCreation):
      * runtime/RegExpMatchesArray.h:
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      (JSC::RegExpObject::finishCreation):
      * runtime/RegExpObject.h:
      * runtime/StrictEvalActivation.cpp:
      (JSC::StrictEvalActivation::StrictEvalActivation):
      * runtime/StrictEvalActivation.h:
      (JSC::StrictEvalActivation::create):
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      (JSC::StringObject::finishCreation):
      * runtime/StringObject.h:
      
      Source/JavaScriptGlue:
      
      Completed the fourth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * UserObjectImp.cpp:
      (UserObjectImp::UserObjectImp):
      * UserObjectImp.h:
      (UserObjectImp::create):
      
      Source/WebCore:
      
      No new tests.
      
      Completed the fourth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::JSDOMWindowShell):
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::createWindowShell):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      * bindings/scripts/test/JS/JSTestInterface.h:
      (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
      (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
      * bindings/scripts/test/JS/JSTestObj.h:
      (WebCore::JSTestObjPrototype::JSTestObjPrototype):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
      (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      (JSC::RuntimeArray::finishCreation):
      * bridge/runtime_array.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      (JSC::Bindings::RuntimeObject::finishCreation):
      * bridge/runtime_object.h:
      
      Source/WebKit2:
      
      Completed the fourth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      (WebKit::JSNPObject::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e5671b6
  14. 19 Aug, 2011 1 commit
    • commit-queue@webkit.org's avatar
      Move allocation in constructors into separate constructorBody() methods · 53aecd29
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=66265
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-08-18
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore:
      
      Refactoring to put all allocations that need to be done after the object's
      initialization list has executed but before the object is ready for use
      into a separate constructorBody() method.  This method is still called by the constructor,
      so the patch doesn't resolve any potential issues, it's just to set up the code for further refactoring.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * jsc.cpp:
      (GlobalObject::constructorBody):
      (GlobalObject::GlobalObject):
      * runtime/ErrorInstance.cpp:
      (JSC::ErrorInstance::ErrorInstance):
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::constructorBody):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      (JSC::ErrorPrototype::constructorBody):
      * runtime/ErrorPrototype.h:
      * runtime/Executable.cpp:
      (JSC::FunctionExecutable::FunctionExecutable):
      * runtime/Executable.h:
      (JSC::FunctionExecutable::constructorBody):
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      (JSC::InternalFunction::constructorBody):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::JSByteArray):
      * runtime/JSByteArray.h:
      (JSC::JSByteArray::constructorBody):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::JSFunction):
      (JSC::JSFunction::constructorBody):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::JSGlobalObject):
      (JSC::JSGlobalObject::constructorBody):
      * runtime/JSPropertyNameIterator.cpp:
      (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
      * runtime/JSPropertyNameIterator.h:
      (JSC::JSPropertyNameIterator::constructorBody):
      * runtime/JSString.h:
      (JSC::RopeBuilder::JSString):
      (JSC::RopeBuilder::constructorBody):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::constructorBody):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::constructorBody):
      * runtime/NativeErrorPrototype.h:
      * runtime/StringObject.cpp:
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::create):
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      * runtime/StringPrototype.h:
      (JSC::StringPrototype::create):
      
      Source/WebCore:
      
      No new tests.
      
      Refactoring to put all allocations that need to be done after the object's
      initialization list has executed but before the object is ready for use
      into a separate constructorBody() method.  This method is still called by the constructor,
      so the patch doesn't resolve any potential issues, it's just to set up the code for further refactoring.
      
      * bridge/objc/ObjCRuntimeObject.h:
      (JSC::Bindings::ObjCRuntimeObject::create):
      * bridge/objc/ObjCRuntimeObject.mm:
      * bridge/objc/objc_instance.mm:
      (ObjCRuntimeMethod::create):
      (ObjCRuntimeMethod::ObjCRuntimeMethod):
      * bridge/runtime_array.cpp:
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53aecd29
  15. 18 Jul, 2011 1 commit
    • oliver@apple.com's avatar
      2011-07-18 Mark Hahnenberg <mhahnenberg@apple.com> · fcacd3c8
      oliver@apple.com authored
              Refactor JSC to replace JSCell::operator new with static create method
              https://bugs.webkit.org/show_bug.cgi?id=64466
      
              Reviewed by Oliver Hunt (oliver@apple.com) and Darin Adler (darin@apple.com).
      
              First step in a longer refactoring process to remove the use of
              operator new overloading in order to allocate GC objects and to replace
              this method with static create methods for each individual type of heap-allocated
              JS object.  This particular patch only deals with replacing uses of
              operator new within JSC proper.  Future patches will remove it from the
              parts that interface with the DOM.  Due to the DOM's continued dependence
              on it, operator new has not actually been removed from JSCell.
      
              * API/JSCallbackConstructor.h:
              (JSC::JSCallbackConstructor::create):
              * API/JSCallbackFunction.h:
              (JSC::JSCallbackFunction::create):
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObject::operator new):
              (JSC::JSCallbackObject::create):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::staticFunctionGetter):
              * API/JSClassRef.cpp:
              (OpaqueJSClass::prototype):
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              (JSObjectMake):
              (JSObjectMakeFunctionWithCallback):
              (JSObjectMakeConstructor):
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::createActivation):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::BytecodeGenerator):
              * bytecompiler/BytecodeGenerator.h:
              (JSC::BytecodeGenerator::makeFunction):
              * bytecompiler/NodesCodegen.cpp:
              (JSC::RegExpNode::emitBytecode):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::privateExecute):
              (JSC::Interpreter::retrieveArguments):
              * jit/JITStubs.cpp:
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::create):
              (GlobalObject::GlobalObject):
              (functionRun):
              (jscmain):
              * runtime/Arguments.h:
              (JSC::Arguments::create):
              (JSC::Arguments::createNoParameters):
              * runtime/ArrayConstructor.cpp:
              (JSC::constructArrayWithSizeQuirk):
              * runtime/ArrayConstructor.h:
              (JSC::ArrayConstructor::create):
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncSplice):
              * runtime/ArrayPrototype.h:
              (JSC::ArrayPrototype::create):
              * runtime/BooleanConstructor.cpp:
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * runtime/BooleanConstructor.h:
              (JSC::BooleanConstructor::create):
              * runtime/BooleanObject.h:
              (JSC::BooleanObject::create):
              * runtime/BooleanPrototype.h:
              (JSC::BooleanPrototype::create):
              * runtime/DateConstructor.cpp:
              (JSC::constructDate):
              * runtime/DateConstructor.h:
              (JSC::DateConstructor::create):
              * runtime/DateInstance.h:
              (JSC::DateInstance::create):
              * runtime/DatePrototype.h:
              (JSC::DatePrototype::create):
              * runtime/Error.cpp:
              (JSC::createError):
              (JSC::createEvalError):
              (JSC::createRangeError):
              (JSC::createReferenceError):
              (JSC::createSyntaxError):
              (JSC::createTypeError):
              (JSC::createURIError):
              (JSC::StrictModeTypeErrorFunction::create):
              (JSC::createTypeErrorFunction):
              * runtime/ErrorConstructor.h:
              (JSC::ErrorConstructor::create):
              * runtime/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              (JSC::ErrorInstance::create):
              * runtime/ErrorInstance.h:
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/ErrorPrototype.h:
              (JSC::ErrorPrototype::create):
              * runtime/ExceptionHelpers.cpp:
              (JSC::InterruptedExecutionError::InterruptedExecutionError):
              (JSC::InterruptedExecutionError::create):
              (JSC::createInterruptedExecutionException):
              (JSC::TerminatedExecutionError::TerminatedExecutionError):
              (JSC::TerminatedExecutionError::create):
              (JSC::createTerminatedExecutionException):
              * runtime/Executable.cpp:
              (JSC::FunctionExecutable::FunctionExecutable):
              (JSC::FunctionExecutable::fromGlobalCode):
              * runtime/Executable.h:
              (JSC::ExecutableBase::create):
              (JSC::NativeExecutable::create):
              (JSC::ScriptExecutable::ScriptExecutable):
              (JSC::EvalExecutable::create):
              (JSC::ProgramExecutable::create):
              (JSC::FunctionExecutable::create):
              (JSC::FunctionExecutable::make):
              * runtime/FunctionConstructor.cpp:
              (JSC::constructFunctionSkippingEvalEnabledCheck):
              * runtime/FunctionConstructor.h:
              (JSC::FunctionConstructor::create):
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::addFunctionProperties):
              * runtime/FunctionPrototype.h:
              (JSC::FunctionPrototype::create):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::create):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::create):
              (JSC::jsAPIValueWrapper):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::argumentsGetter):
              * runtime/JSActivation.h:
              (JSC::JSActivation::create):
              * runtime/JSArray.h:
              (JSC::JSArray::create):
              * runtime/JSCell.h:
              (JSC::JSCell::allocateCell):
              * runtime/JSFunction.h:
              (JSC::JSFunction::create):
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::init):
              (JSC::JSGlobalObject::reset):
              * runtime/JSGlobalObject.h:
              (JSC::constructEmptyArray):
              (JSC::constructArray):
              * runtime/JSNotAnObject.h:
              (JSC::JSNotAnObject::create):
              * runtime/JSONObject.h:
              (JSC::JSONObject::create):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::putDescriptor):
              * runtime/JSObject.h:
              (JSC::JSFinalObject::create):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::create):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::create):
              * runtime/JSString.cpp:
              (JSC::JSString::substringFromRope):
              (JSC::JSString::replaceCharacter):
              (JSC::StringObject::create):
              * runtime/JSString.h:
              (JSC::RopeBuilder::JSString):
              (JSC::RopeBuilder::create):
              (JSC::RopeBuilder::createHasOtherOwner):
              (JSC::jsSingleCharacterString):
              (JSC::jsSingleCharacterSubstring):
              (JSC::jsNontrivialString):
              (JSC::jsString):
              (JSC::jsSubstring):
              (JSC::jsOwnedString):
              * runtime/JSValue.cpp:
              (JSC::JSValue::toObjectSlowCase):
              (JSC::JSValue::synthesizeObject):
              (JSC::JSValue::synthesizePrototype):
              * runtime/Lookup.cpp:
              (JSC::setUpStaticFunctionSlot):
              * runtime/MathObject.h:
              (JSC::MathObject::create):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorConstructor.h:
              (JSC::NativeErrorConstructor::create):
              * runtime/NativeErrorPrototype.h:
              (JSC::NativeErrorPrototype::create):
              * runtime/NumberConstructor.cpp:
              (JSC::constructWithNumberConstructor):
              * runtime/NumberConstructor.h:
              (JSC::NumberConstructor::create):
              * runtime/NumberObject.cpp:
              (JSC::constructNumber):
              * runtime/NumberObject.h:
              (JSC::NumberObject::create):
              * runtime/NumberPrototype.h:
              (JSC::NumberPrototype::create):
              * runtime/ObjectConstructor.h:
              (JSC::ObjectConstructor::create):
              * runtime/ObjectPrototype.h:
              (JSC::ObjectPrototype::create):
              * runtime/Operations.h:
              (JSC::jsString):
              * runtime/RegExp.cpp:
              (JSC::RegExp::RegExp):
              (JSC::RegExp::createWithoutCaching):
              (JSC::RegExp::create):
              * runtime/RegExp.h:
              * runtime/RegExpCache.cpp:
              (JSC::RegExpCache::lookupOrCreate):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::arrayOfMatches):
              (JSC::constructRegExp):
              * runtime/RegExpConstructor.h:
              (JSC::RegExpConstructor::create):
              * runtime/RegExpMatchesArray.h:
              (JSC::RegExpMatchesArray::create):
              * runtime/RegExpObject.h:
              (JSC::RegExpObject::create):
              * runtime/RegExpPrototype.cpp:
              (JSC::regExpProtoFuncCompile):
              * runtime/RegExpPrototype.h:
              (JSC::RegExpPrototype::create):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::create):
              (JSC::ScopeChainNode::push):
              * runtime/SmallStrings.cpp:
              (JSC::SmallStrings::createEmptyString):
              (JSC::SmallStrings::createSingleCharacterString):
              * runtime/StringConstructor.cpp:
              (JSC::constructWithStringConstructor):
              * runtime/StringConstructor.h:
              (JSC::StringConstructor::create):
              * runtime/StringObject.h:
              (JSC::StringObject::create):
              * runtime/StringObjectThatMasqueradesAsUndefined.h:
              (JSC::StringObjectThatMasqueradesAsUndefined::create):
              * runtime/StringPrototype.cpp:
              (JSC::stringProtoFuncMatch):
              (JSC::stringProtoFuncSearch):
              * runtime/StringPrototype.h:
              (JSC::StringPrototype::create):
              * runtime/Structure.h:
              (JSC::Structure::create):
              (JSC::Structure::createStructure):
              * runtime/StructureChain.h:
              (JSC::StructureChain::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fcacd3c8
  16. 15 Jul, 2011 1 commit
  17. 18 May, 2011 3 commits
    • ggaren@apple.com's avatar
      Rolled out attempts to fix EFL build because they're not enough -- the · a9ac5900
      ggaren@apple.com authored
      build script needs to be fixed.
      
      * runtime/BooleanPrototype.cpp:
      * runtime/DateConstructor.cpp:
      * runtime/ErrorPrototype.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9ac5900
    • ggaren@apple.com's avatar
      More attempts to work around the EFL build system being borken. · aec17f43
      ggaren@apple.com authored
      * runtime/DateConstructor.cpp:
      * runtime/ErrorPrototype.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aec17f43
    • ggaren@apple.com's avatar
      Source/JavaScriptCore: Rolling back in r86653 with build fixed. · 19fe5092
      ggaren@apple.com authored
      Reviewed by Gavin Barraclough and Oliver Hunt.
      
      Global object initialization is expensive
      https://bugs.webkit.org/show_bug.cgi?id=60933
              
      Changed a bunch of globals to allocate their properties lazily, and changed
      the global object to allocate a bunch of its globals lazily.
              
      This reduces the footprint of a global object from 287 objects with 58
      functions for 24K to 173 objects with 20 functions for 15K.
      
      Large patch, but it's all mechanical.
      
      * DerivedSources.make:
      * JavaScriptCore.exp: Build!
      
      * create_hash_table: Added a special case for fromCharCode, since it uses
      a custom "thunk generator".
      
      * heap/Heap.cpp:
      (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
      overcount objects that were owned through more than one mechanism because
      it was getting in the way of counting the results for this patch.
      
      * interpreter/CallFrame.h:
      (JSC::ExecState::arrayConstructorTable):
      (JSC::ExecState::arrayPrototypeTable):
      (JSC::ExecState::booleanPrototypeTable):
      (JSC::ExecState::dateConstructorTable):
      (JSC::ExecState::errorPrototypeTable):
      (JSC::ExecState::globalObjectTable):
      (JSC::ExecState::numberConstructorTable):
      (JSC::ExecState::numberPrototypeTable):
      (JSC::ExecState::objectPrototypeTable):
      (JSC::ExecState::regExpPrototypeTable):
      (JSC::ExecState::stringConstructorTable): Added new tables.
      
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      (JSC::ArrayConstructor::getOwnPropertySlot):
      (JSC::ArrayConstructor::getOwnPropertyDescriptor):
      * runtime/ArrayConstructor.h:
      (JSC::ArrayConstructor::createStructure):
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::getOwnPropertySlot):
      (JSC::ArrayPrototype::getOwnPropertyDescriptor):
      * runtime/ArrayPrototype.h:
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      (JSC::BooleanPrototype::getOwnPropertySlot):
      (JSC::BooleanPrototype::getOwnPropertyDescriptor):
      * runtime/BooleanPrototype.h:
      (JSC::BooleanPrototype::createStructure):
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      (JSC::DateConstructor::getOwnPropertySlot):
      (JSC::DateConstructor::getOwnPropertyDescriptor):
      * runtime/DateConstructor.h:
      (JSC::DateConstructor::createStructure):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      (JSC::ErrorPrototype::getOwnPropertySlot):
      (JSC::ErrorPrototype::getOwnPropertyDescriptor):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::createStructure): Standardized these objects
      to use static tables for function properties.
      
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      (JSC::JSGlobalData::~JSGlobalData):
      * runtime/JSGlobalData.h: Added new tables.
      
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::addStaticGlobals):
      (JSC::JSGlobalObject::getOwnPropertySlot):
      (JSC::JSGlobalObject::getOwnPropertyDescriptor):
      * runtime/JSGlobalObject.h:
      * runtime/JSGlobalObjectFunctions.cpp:
      * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
      static table for its global functions. This required uninlining some
      things to avoid a circular header dependency. However, those things
      probably shouldn't have been inlined in the first place.
              
      Even more global object properties can be made lazy, but that requires
      more in-depth changes.
      
      * runtime/MathObject.cpp:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getOwnPropertySlot):
      (JSC::NumberConstructor::getOwnPropertyDescriptor):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      (JSC::NumberPrototype::getOwnPropertySlot):
      (JSC::NumberPrototype::getOwnPropertyDescriptor):
      * runtime/NumberPrototype.h:
      (JSC::NumberPrototype::createStructure):
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::ObjectPrototype):
      (JSC::ObjectPrototype::put):
      (JSC::ObjectPrototype::getOwnPropertySlot):
      (JSC::ObjectPrototype::getOwnPropertyDescriptor):
      * runtime/ObjectPrototype.h:
      (JSC::ObjectPrototype::createStructure):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      (JSC::RegExpPrototype::getOwnPropertySlot):
      (JSC::RegExpPrototype::getOwnPropertyDescriptor):
      * runtime/RegExpPrototype.h:
      (JSC::RegExpPrototype::createStructure):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      (JSC::StringConstructor::getOwnPropertySlot):
      (JSC::StringConstructor::getOwnPropertyDescriptor):
      * runtime/StringConstructor.h:
      (JSC::StringConstructor::createStructure): Standardized these objects
      to use static tables for function properties.
      
      LayoutTests: Global object initialization is expensive
      https://bugs.webkit.org/show_bug.cgi?id=60933
              
      Reviewed by Gavin Barraclough.
      
      Added a few more expected failures, now that more code uses static hash
      tables.
              
      The fact that built-ins are not deletable, but should be, is covered by
      https://bugs.webkit.org/show_bug.cgi?id=61014
      
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.2/S15.6.2.1_A4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.3/15.6.3.1_Boolean.prototype/S15.6.3.1_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.4/S15.6.4_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.2/S15.7.2.1_A4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.3/15.7.3.1_Number.prototype/S15.7.3.1_A2_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.4/S15.7.4_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.4/15.9.4.2_Date.parse/S15.9.4.2_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.4/15.9.4.3_Date.UTC/S15.9.4.3_A1_T2-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19fe5092
  18. 17 May, 2011 2 commits
    • commit-queue@webkit.org's avatar
      2011-05-16 Sheriff Bot <webkit.review.bot@gmail.com> · 5a39502a
      commit-queue@webkit.org authored
              Unreviewed, rolling out r86653.
              http://trac.webkit.org/changeset/86653
              https://bugs.webkit.org/show_bug.cgi?id=60944
      
              "Caused regressions on Windows, OSX and EFL" (Requested by
              yutak on #webkit).
      
              * DerivedSources.make:
              * DerivedSources.pro:
              * GNUmakefile.am:
              * GNUmakefile.list.am:
              * JavaScriptCore.exp:
              * JavaScriptCore.gypi:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * create_hash_table:
              * heap/Heap.cpp:
              (JSC::TypeCounter::operator()):
              * interpreter/CallFrame.h:
              (JSC::ExecState::arrayTable):
              (JSC::ExecState::numberTable):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              * runtime/ArrayConstructor.h:
              * runtime/ArrayPrototype.cpp:
              (JSC::ArrayPrototype::getOwnPropertySlot):
              (JSC::ArrayPrototype::getOwnPropertyDescriptor):
              * runtime/ArrayPrototype.h:
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/BooleanPrototype.h:
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateConstructor.h:
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/ErrorPrototype.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::~JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::addStaticGlobals):
              (JSC::JSGlobalObject::getOwnPropertySlot):
              (JSC::JSGlobalObject::getOwnPropertyDescriptor):
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::globalFuncJSCPrint):
              * runtime/JSGlobalObjectFunctions.h:
              * runtime/MathObject.cpp:
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::getOwnPropertySlot):
              (JSC::NumberConstructor::getOwnPropertyDescriptor):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/NumberPrototype.h:
              * runtime/ObjectPrototype.cpp:
              (JSC::ObjectPrototype::ObjectPrototype):
              (JSC::ObjectPrototype::put):
              (JSC::ObjectPrototype::getOwnPropertySlot):
              * runtime/ObjectPrototype.h:
              * runtime/RegExpPrototype.cpp:
              (JSC::RegExpPrototype::RegExpPrototype):
              * runtime/RegExpPrototype.h:
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringConstructor.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5a39502a
    • ggaren@apple.com's avatar
      2011-05-16 Geoffrey Garen <ggaren@apple.com> · 836c5d91
      ggaren@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Global object initialization is expensive
              https://bugs.webkit.org/show_bug.cgi?id=60933
              
              Changed a bunch of globals to allocate their properties lazily, and changed
              the global object to allocate a bunch of its globals lazily.
              
              This reduces the footprint of a global object from 287 objects with 58
              functions for 24K to 173 objects with 20 functions for 15K.
      
              Large patch, but it's all mechanical.
      
              * DerivedSources.make:
              * JavaScriptCore.exp: Build!
      
              * create_hash_table: Added a special case for fromCharCode, since it uses
              a custom "thunk generator".
      
              * heap/Heap.cpp:
              (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
              overcount objects that were owned through more than one mechanism because
              it was getting in the way of counting the results for this patch.
      
              * interpreter/CallFrame.h:
              (JSC::ExecState::arrayConstructorTable):
              (JSC::ExecState::arrayPrototypeTable):
              (JSC::ExecState::booleanPrototypeTable):
              (JSC::ExecState::dateConstructorTable):
              (JSC::ExecState::errorPrototypeTable):
              (JSC::ExecState::globalObjectTable):
              (JSC::ExecState::numberConstructorTable):
              (JSC::ExecState::numberPrototypeTable):
              (JSC::ExecState::objectPrototypeTable):
              (JSC::ExecState::regExpPrototypeTable):
              (JSC::ExecState::stringConstructorTable): Added new tables.
      
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::ArrayConstructor::getOwnPropertySlot):
              (JSC::ArrayConstructor::getOwnPropertyDescriptor):
              * runtime/ArrayConstructor.h:
              (JSC::ArrayConstructor::createStructure):
              * runtime/ArrayPrototype.cpp:
              (JSC::ArrayPrototype::getOwnPropertySlot):
              (JSC::ArrayPrototype::getOwnPropertyDescriptor):
              * runtime/ArrayPrototype.h:
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              (JSC::BooleanPrototype::getOwnPropertySlot):
              (JSC::BooleanPrototype::getOwnPropertyDescriptor):
              * runtime/BooleanPrototype.h:
              (JSC::BooleanPrototype::createStructure):
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              (JSC::DateConstructor::getOwnPropertySlot):
              (JSC::DateConstructor::getOwnPropertyDescriptor):
              * runtime/DateConstructor.h:
              (JSC::DateConstructor::createStructure):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              (JSC::ErrorPrototype::getOwnPropertySlot):
              (JSC::ErrorPrototype::getOwnPropertyDescriptor):
              * runtime/ErrorPrototype.h:
              (JSC::ErrorPrototype::createStructure): Standardized these objects
              to use static tables for function properties.
      
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::~JSGlobalData):
              * runtime/JSGlobalData.h: Added new tables.
      
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::addStaticGlobals):
              (JSC::JSGlobalObject::getOwnPropertySlot):
              (JSC::JSGlobalObject::getOwnPropertyDescriptor):
              * runtime/JSGlobalObject.h:
              * runtime/JSGlobalObjectFunctions.cpp:
              * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
              static table for its global functions. This required uninlining some
              things to avoid a circular header dependency. However, those things
              probably shouldn't have been inlined in the first place.
              
              Even more global object properties can be made lazy, but that requires
              more in-depth changes.
      
              * runtime/MathObject.cpp:
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::getOwnPropertySlot):
              (JSC::NumberConstructor::getOwnPropertyDescriptor):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              (JSC::NumberPrototype::getOwnPropertySlot):
              (JSC::NumberPrototype::getOwnPropertyDescriptor):
              * runtime/NumberPrototype.h:
              (JSC::NumberPrototype::createStructure):
              * runtime/ObjectPrototype.cpp:
              (JSC::ObjectPrototype::ObjectPrototype):
              (JSC::ObjectPrototype::put):
              (JSC::ObjectPrototype::getOwnPropertySlot):
              (JSC::ObjectPrototype::getOwnPropertyDescriptor):
              * runtime/ObjectPrototype.h:
              (JSC::ObjectPrototype::createStructure):
              * runtime/RegExpPrototype.cpp:
              (JSC::RegExpPrototype::RegExpPrototype):
              (JSC::RegExpPrototype::getOwnPropertySlot):
              (JSC::RegExpPrototype::getOwnPropertyDescriptor):
              * runtime/RegExpPrototype.h:
              (JSC::RegExpPrototype::createStructure):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              (JSC::StringConstructor::getOwnPropertySlot):
              (JSC::StringConstructor::getOwnPropertyDescriptor):
              * runtime/StringConstructor.h:
              (JSC::StringConstructor::createStructure): Standardized these objects
              to use static tables for function properties.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      836c5d91
  19. 15 Apr, 2011 2 commits
  20. 14 Apr, 2011 1 commit
    • oliver@apple.com's avatar
      2011-04-13 Oliver Hunt <oliver@apple.com> · bb8da910
      oliver@apple.com authored
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Additional structures are allocated beyond the expected threshold
              so we preflight the test to get them allocated.
      
              * fast/dom/gc-10.html:
      2011-04-13  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Turn Structure into a GC allocated object.  Most of this patch
              is the mechanical change of replacing variations on RefPtr<Structure>
              with either Structure* (for arguments and locals), WriteBarrier<Structure>
              for the few cases where Structures are held by GC allocated objects
              and Strong<Structure> for the root structure objects in GlobalData.
      
              * API/JSCallbackConstructor.cpp:
              (JSC::JSCallbackConstructor::JSCallbackConstructor):
              * API/JSCallbackConstructor.h:
              (JSC::JSCallbackConstructor::createStructure):
              * API/JSCallbackFunction.h:
              (JSC::JSCallbackFunction::createStructure):
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObject::createStructure):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::JSCallbackObject):
              * API/JSContextRef.cpp:
              * JavaScriptCore.JSVALUE32_64only.exp:
              * JavaScriptCore.JSVALUE64only.exp:
              * JavaScriptCore.exp:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::~CodeBlock):
              (JSC::CodeBlock::markStructures):
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::MethodCallLinkInfo::setSeen):
              (JSC::GlobalResolveInfo::GlobalResolveInfo):
              * bytecode/Instruction.h:
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
              (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
              (JSC::PolymorphicAccessStructureList::markAggregate):
              (JSC::Instruction::Instruction):
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::deref):
              (JSC::StructureStubInfo::markAggregate):
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::initGetByIdSelf):
              (JSC::StructureStubInfo::initGetByIdProto):
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::initPutByIdTransition):
              (JSC::StructureStubInfo::initPutByIdReplace):
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              * debugger/DebuggerActivation.h:
              (JSC::DebuggerActivation::createStructure):
              * heap/Handle.h:
              * heap/MarkStack.cpp:
              (JSC::MarkStack::markChildren):
              (JSC::MarkStack::drain):
              * heap/MarkedBlock.cpp:
              (JSC::MarkedBlock::MarkedBlock):
              (JSC::MarkedBlock::sweep):
              * heap/Strong.h:
              (JSC::Strong::Strong):
              (JSC::Strong::set):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::resolveGlobal):
              (JSC::Interpreter::resolveGlobalDynamic):
              (JSC::Interpreter::tryCachePutByID):
              (JSC::Interpreter::uncachePutByID):
              (JSC::Interpreter::tryCacheGetByID):
              (JSC::Interpreter::uncacheGetByID):
              (JSC::Interpreter::privateExecute):
              * jit/JIT.h:
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::privateCompilePutByIdTransition):
              (JSC::JIT::patchMethodCallProto):
              (JSC::JIT::privateCompileGetByIdProto):
              (JSC::JIT::privateCompileGetByIdSelfList):
              (JSC::JIT::privateCompileGetByIdProtoList):
              (JSC::JIT::privateCompileGetByIdChainList):
              (JSC::JIT::privateCompileGetByIdChain):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::privateCompilePutByIdTransition):
              (JSC::JIT::patchMethodCallProto):
              (JSC::JIT::privateCompileGetByIdProto):
              (JSC::JIT::privateCompileGetByIdSelfList):
              (JSC::JIT::privateCompileGetByIdProtoList):
              (JSC::JIT::privateCompileGetByIdChainList):
              (JSC::JIT::privateCompileGetByIdChain):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCachePutByID):
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              (JSC::getPolymorphicAccessStructureListSlot):
              * jit/JSInterfaceJIT.h:
              (JSC::JSInterfaceJIT::storePtrWithWriteBarrier):
              * jsc.cpp:
              (cleanupGlobalData):
              * runtime/Arguments.h:
              (JSC::Arguments::createStructure):
              (JSC::Arguments::Arguments):
              (JSC::JSActivation::copyRegisters):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::constructArrayWithSizeQuirk):
              * runtime/ArrayConstructor.h:
              * runtime/ArrayPrototype.cpp:
              (JSC::ArrayPrototype::ArrayPrototype):
              (JSC::arrayProtoFuncSplice):
              * runtime/ArrayPrototype.h:
              (JSC::ArrayPrototype::createStructure):
              * runtime/BatchedTransitionOptimizer.h:
              (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              * runtime/BooleanConstructor.h:
              * runtime/BooleanObject.cpp:
              (JSC::BooleanObject::BooleanObject):
              * runtime/BooleanObject.h:
              (JSC::BooleanObject::createStructure):
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/BooleanPrototype.h:
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateConstructor.h:
              * runtime/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * runtime/DateInstance.h:
              (JSC::DateInstance::createStructure):
              * runtime/DatePrototype.cpp:
              (JSC::DatePrototype::DatePrototype):
              * runtime/DatePrototype.h:
              (JSC::DatePrototype::createStructure):
              * runtime/Error.cpp:
              (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorConstructor.h:
              * runtime/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              (JSC::ErrorInstance::create):
              * runtime/ErrorInstance.h:
              (JSC::ErrorInstance::createStructure):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/ErrorPrototype.h:
              * runtime/ExceptionHelpers.cpp:
              (JSC::InterruptedExecutionError::InterruptedExecutionError):
              (JSC::TerminatedExecutionError::TerminatedExecutionError):
              * runtime/Executable.cpp:
              * runtime/Executable.h:
              (JSC::ExecutableBase::ExecutableBase):
              (JSC::ExecutableBase::createStructure):
              (JSC::NativeExecutable::createStructure):
              (JSC::NativeExecutable::NativeExecutable):
              (JSC::ScriptExecutable::ScriptExecutable):
              (JSC::EvalExecutable::createStructure):
              (JSC::ProgramExecutable::createStructure):
              (JSC::FunctionExecutable::createStructure):
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionConstructor.h:
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              * runtime/FunctionPrototype.h:
              (JSC::FunctionPrototype::createStructure):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::GetterSetter):
              (JSC::GetterSetter::createStructure):
              * runtime/InitializeThreading.cpp:
              (JSC::initializeThreadingOnce):
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/InternalFunction.h:
              (JSC::InternalFunction::createStructure):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::createStructure):
              (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::JSActivation):
              * runtime/JSActivation.h:
              (JSC::JSActivation::createStructure):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              * runtime/JSArray.h:
              (JSC::JSArray::createStructure):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              (JSC::JSByteArray::createStructure):
              * runtime/JSByteArray.h:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.cpp:
              (JSC::isZombie):
              * runtime/JSCell.h:
              (JSC::JSCell::JSCell::JSCell):
              (JSC::JSCell::JSCell::addressOfStructure):
              (JSC::JSCell::JSCell::structure):
              (JSC::JSCell::JSCell::markChildren):
              (JSC::JSCell::JSValue::isZombie):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              * runtime/JSFunction.h:
              (JSC::JSFunction::createStructure):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::storeVPtrs):
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::clearBuiltinStructures):
              (JSC::JSGlobalData::createLeaked):
              * runtime/JSGlobalData.h:
              (JSC::allocateGlobalHandle):
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::markChildren):
              (JSC::JSGlobalObject::copyGlobalsFrom):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObject):
              (JSC::JSGlobalObject::createStructure):
              (JSC::Structure::prototypeChain):
              (JSC::Structure::isValid):
              (JSC::constructEmptyArray):
              * runtime/JSNotAnObject.h:
              (JSC::JSNotAnObject::JSNotAnObject):
              (JSC::JSNotAnObject::createStructure):
              * runtime/JSONObject.cpp:
              (JSC::JSONObject::JSONObject):
              * runtime/JSONObject.h:
              (JSC::JSONObject::createStructure):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::JSObject::seal):
              (JSC::JSObject::freeze):
              (JSC::JSObject::preventExtensions):
              (JSC::JSObject::removeDirect):
              (JSC::JSObject::createInheritorID):
              * runtime/JSObject.h:
              (JSC::JSObject::createStructure):
              (JSC::JSObject::JSObject):
              (JSC::JSNonFinalObject::createStructure):
              (JSC::JSNonFinalObject::JSNonFinalObject):
              (JSC::JSFinalObject::create):
              (JSC::JSFinalObject::createStructure):
              (JSC::JSFinalObject::JSFinalObject):
              (JSC::constructEmptyObject):
              (JSC::createEmptyObjectStructure):
              (JSC::JSObject::~JSObject):
              (JSC::JSObject::setPrototype):
              (JSC::JSObject::setStructure):
              (JSC::JSObject::inheritorID):
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::transitionTo):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSObjectWithGlobalObject.cpp:
              (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
              * runtime/JSObjectWithGlobalObject.h:
              (JSC::JSObjectWithGlobalObject::createStructure):
              (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
              (JSC::JSPropertyNameIterator::create):
              (JSC::JSPropertyNameIterator::get):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::createStructure):
              (JSC::JSPropertyNameIterator::setCachedStructure):
              (JSC::Structure::setEnumerationCache):
              * runtime/JSStaticScopeObject.h:
              (JSC::JSStaticScopeObject::JSStaticScopeObject):
              (JSC::JSStaticScopeObject::createStructure):
              * runtime/JSString.h:
              (JSC::RopeBuilder::JSString):
              (JSC::RopeBuilder::createStructure):
              * runtime/JSType.h:
              * runtime/JSTypeInfo.h:
              (JSC::TypeInfo::TypeInfo):
              * runtime/JSValue.h:
              * runtime/JSVariableObject.h:
              (JSC::JSVariableObject::createStructure):
              (JSC::JSVariableObject::JSVariableObject):
              (JSC::JSVariableObject::copyRegisterArray):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::createStructure):
              (JSC::JSWrapperObject::JSWrapperObject):
              * runtime/JSZombie.cpp:
              * runtime/JSZombie.h:
              (JSC::JSZombie::JSZombie):
              (JSC::JSZombie::createStructure):
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/MathObject.h:
              (JSC::MathObject::createStructure):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              (JSC::NativeErrorConstructor::markChildren):
              * runtime/NativeErrorConstructor.h:
              (JSC::NativeErrorConstructor::createStructure):
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NativeErrorPrototype.h:
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              * runtime/NumberConstructor.h:
              (JSC::NumberConstructor::createStructure):
              * runtime/NumberObject.cpp:
              (JSC::NumberObject::NumberObject):
              * runtime/NumberObject.h:
              (JSC::NumberObject::createStructure):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/NumberPrototype.h:
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              * runtime/ObjectConstructor.h:
              (JSC::ObjectConstructor::createStructure):
              * runtime/ObjectPrototype.cpp:
              (JSC::ObjectPrototype::ObjectPrototype):
              * runtime/ObjectPrototype.h:
              * runtime/PropertyMapHashTable.h:
              (JSC::PropertyTable::PropertyTable):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              (JSC::RegExpMatchesArray::RegExpMatchesArray):
              * runtime/RegExpConstructor.h:
              (JSC::RegExpConstructor::createStructure):
              * runtime/RegExpObject.cpp:
              (JSC::RegExpObject::RegExpObject):
              * runtime/RegExpObject.h:
              (JSC::RegExpObject::createStructure):
              * runtime/RegExpPrototype.cpp:
              (JSC::RegExpPrototype::RegExpPrototype):
              * runtime/RegExpPrototype.h:
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::ScopeChainNode):
              (JSC::ScopeChainNode::createStructure):
              * runtime/StrictEvalActivation.cpp:
              (JSC::StrictEvalActivation::StrictEvalActivation):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringConstructor.h:
              * runtime/StringObject.cpp:
              (JSC::StringObject::StringObject):
              * runtime/StringObject.h:
              (JSC::StringObject::createStructure):
              * runtime/StringObjectThatMasqueradesAsUndefined.h:
              (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
              (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/StringPrototype.h:
              (JSC::StringPrototype::createStructure):
              * runtime/Structure.cpp:
              (JSC::StructureTransitionTable::remove):
              (JSC::StructureTransitionTable::add):
              (JSC::Structure::Structure):
              (JSC::Structure::~Structure):
              (JSC::Structure::materializePropertyMap):
              (JSC::Structure::addPropertyTransitionToExistingStructure):
              (JSC::Structure::addPropertyTransition):
              (JSC::Structure::removePropertyTransition):
              (JSC::Structure::changePrototypeTransition):
              (JSC::Structure::despecifyFunctionTransition):
              (JSC::Structure::getterSetterTransition):
              (JSC::Structure::toDictionaryTransition):
              (JSC::Structure::toCacheableDictionaryTransition):
              (JSC::Structure::toUncacheableDictionaryTransition):
              (JSC::Structure::sealTransition):
              (JSC::Structure::freezeTransition):
              (JSC::Structure::preventExtensionsTransition):
              (JSC::Structure::flattenDictionaryStructure):
              (JSC::Structure::copyPropertyTable):
              (JSC::Structure::put):
              (JSC::Structure::markChildren):
              * runtime/Structure.h:
              (JSC::Structure::create):
              (JSC::Structure::setPrototypeWithoutTransition):
              (JSC::Structure::createStructure):
              (JSC::JSCell::createDummyStructure):
              (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::keyForFinalizer):
              * runtime/StructureChain.cpp:
              (JSC::StructureChain::StructureChain):
              (JSC::StructureChain::markChildren):
              * runtime/StructureChain.h:
              (JSC::StructureChain::create):
              (JSC::StructureChain::head):
              (JSC::StructureChain::createStructure):
              * runtime/StructureTransitionTable.h:
              (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::finalizerContextFor):
              (JSC::StructureTransitionTable::~StructureTransitionTable):
              (JSC::StructureTransitionTable::slot):
              (JSC::StructureTransitionTable::setMap):
              (JSC::StructureTransitionTable::singleTransition):
              (JSC::StructureTransitionTable::clearSingleTransition):
              (JSC::StructureTransitionTable::setSingleTransition):
              * runtime/WeakGCMap.h:
              (JSC::DefaultWeakGCMapFinalizerCallback::finalizerContextFor):
              (JSC::DefaultWeakGCMapFinalizerCallback::keyForFinalizer):
              (JSC::WeakGCMap::contains):
              (JSC::WeakGCMap::find):
              (JSC::WeakGCMap::remove):
              (JSC::WeakGCMap::add):
              (JSC::WeakGCMap::set):
              (JSC::WeakGCMap::finalize):
              * runtime/WriteBarrier.h:
              (JSC::writeBarrier):
              (JSC::WriteBarrierBase::set):
              (JSC::WriteBarrierBase::operator*):
              (JSC::WriteBarrierBase::operator->):
              (JSC::WriteBarrierBase::setWithoutWriteBarrier):
      2011-04-13  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Fix up JSG to correctly mark Structure, et al.
      
              * JSRun.cpp:
              (JSGlueGlobalObject::JSGlueGlobalObject):
              * JSRun.h:
              * JSUtils.cpp:
              (JSObjectKJSValue):
              * UserObjectImp.cpp:
              (UserObjectImp::UserObjectImp):
              * UserObjectImp.h:
              (UserObjectImp::createStructure):
      2011-04-13  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Update WebCore for Structure being a GC allocated object
      
              * WebCore.exp.in:
              * bindings/js/JSAudioConstructor.h:
              (WebCore::JSAudioConstructor::createStructure):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::cacheDOMStructure):
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMObjectWithGlobalPointer::createStructure):
              (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
              (WebCore::DOMConstructorObject::createStructure):
              (WebCore::DOMConstructorObject::DOMConstructorObject):
              (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
              (WebCore::JSDOMGlobalObject::markChildren):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::createStructure):
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::JSDOMWindowBase):
              * bindings/js/JSDOMWindowBase.h:
              (WebCore::JSDOMWindowBase::createStructure):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::createStructure):
              * bindings/js/JSDOMWrapper.h:
              (WebCore::DOMObject::DOMObject):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              * bindings/js/JSImageConstructor.h:
              (WebCore::JSImageConstructor::createStructure):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSOptionConstructor.h:
              (WebCore::JSOptionConstructor::createStructure):
              * bindings/js/JSWorkerContextBase.cpp:
              (WebCore::JSWorkerContextBase::JSWorkerContextBase):
              * bindings/js/JSWorkerContextBase.h:
              (WebCore::JSWorkerContextBase::createStructure):
              * bindings/js/ScriptCachedFrameData.h:
              * bindings/js/SerializedScriptValue.h:
              * bindings/js/WorkerScriptController.cpp:
              (WebCore::WorkerScriptController::initScript):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/c/CRuntimeObject.h:
              (JSC::Bindings::CRuntimeObject::createStructure):
              * bridge/c/c_instance.cpp:
              (JSC::Bindings::CRuntimeMethod::createStructure):
              * bridge/jni/jsc/JavaInstanceJSC.cpp:
              (JavaRuntimeMethod::createStructure):
              * bridge/jni/jsc/JavaRuntimeObject.h:
              (JSC::Bindings::JavaRuntimeObject::createStructure):
              * bridge/objc/ObjCRuntimeObject.h:
              (JSC::Bindings::ObjCRuntimeObject::createStructure):
              * bridge/objc/objc_instance.mm:
              (ObjCRuntimeMethod::createStructure):
              * bridge/objc/objc_runtime.h:
              (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
              * bridge/runtime_array.cpp:
              (JSC::RuntimeArray::RuntimeArray):
              * bridge/runtime_array.h:
              (JSC::RuntimeArray::createStructure):
              * bridge/runtime_method.cpp:
              (JSC::RuntimeMethod::RuntimeMethod):
              * bridge/runtime_method.h:
              (JSC::RuntimeMethod::createStructure):
              * bridge/runtime_object.cpp:
              (JSC::Bindings::RuntimeObject::RuntimeObject):
              * bridge/runtime_object.h:
              (JSC::Bindings::RuntimeObject::createStructure):
              * history/HistoryItem.h:
      2011-04-13  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Update WebKit for the world of GC allocated Structure
      
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              * Plugins/Hosted/ProxyInstance.mm:
              (WebKit::ProxyRuntimeMethod::createStructure):
              * Plugins/Hosted/ProxyRuntimeObject.h:
              (WebKit::ProxyRuntimeObject::createStructure):
      2011-04-13  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Update WK2 for the world of GC allocated Structure
      
              * WebProcess/Plugins/Netscape/JSNPMethod.h:
              (WebKit::JSNPMethod::createStructure):
              * WebProcess/Plugins/Netscape/JSNPObject.h:
              (WebKit::JSNPObject::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb8da910
  21. 21 Feb, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=54839 · 9788fe2f
      barraclough@apple.com authored
      Remove PrototypeFunction, NativeFunctionWrapper, and GlobalEvalFunction.
      
      Reviewed by Oliver Hunt.
      
      Historically, Native functions used to be represented by PrototypeFunctions, however
      since introducing call optimizations to the JIT this has used JSFunctions for host
      calls too. At the point this change was made, the interpreter continued to use
      PrototypeFunctions, however since fallback from the JIT to interpreter was introduced
      the interpreter has had to be able to run using host functions represented using
      JSFunctions - leading to an unnecessary and redundant divergence in behaviour between 
      interpreter only builds, and situations where the JIT has fallen back to interpreting.
      
      NativeFunctionWrapper only existed to select between PrototypeFunction and JSFunction
      for wrappers for host functions, and as such can also be removed.
      
      GlobalEvalFunction is a redundant wrapper that happens to be derived from
      PrototypeFunction. It existed to hold a reference to the global object - but since all
      functions how derive from JSObjectWithGlobalObject, this no longer requires an
      additional class to provide this functionality.
      
      Source/JavaScriptCore: 
      
      * JavaScriptCore.JSVALUE32_64only.exp:
      * JavaScriptCore.JSVALUE64only.exp:
      * JavaScriptCore.xcodeproj/project.pbxproj:
          Removed symbols / references to files.
      
      * runtime/GlobalEvalFunction.cpp: Removed.
      * runtime/GlobalEvalFunction.h: Removed.
      * runtime/NativeFunctionWrapper.h: Removed.
      * runtime/PrototypeFunction.cpp: Removed.
      * runtime/PrototypeFunction.h: Removed.
          Removed.
      
      * runtime/Executable.cpp:
      (JSC::NativeExecutable::~NativeExecutable):
      * runtime/Executable.h:
      (JSC::NativeExecutable::create):
      (JSC::NativeExecutable::NativeExecutable):
      (JSC::JSFunction::nativeFunction):
      * runtime/JSFunction.cpp:
      (JSC::callHostFunctionAsConstructor):
      (JSC::JSFunction::JSFunction):
      (JSC::JSFunction::getCallData):
      * runtime/JSFunction.h:
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::getHostFunction):
      * runtime/JSGlobalData.h:
      (JSC::JSGlobalData::getCTIStub):
          Added interpreter-friendly constructors for NativeExecutables.
      
      * bytecompiler/BytecodeGenerator.cpp:
      * interpreter/Interpreter.cpp:
      * jit/JITStubs.cpp:
      * jsc.cpp:
      * runtime/ArrayConstructor.cpp:
      * runtime/BooleanPrototype.cpp:
      * runtime/BooleanPrototype.h:
      * runtime/CallData.h:
      * runtime/DateConstructor.cpp:
      * runtime/DateConstructor.h:
      * runtime/ErrorPrototype.cpp:
      * runtime/ErrorPrototype.h:
      * runtime/FunctionPrototype.cpp:
      * runtime/FunctionPrototype.h:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/JSGlobalObjectFunctions.cpp:
      * runtime/Lookup.cpp:
      * runtime/NumberPrototype.cpp:
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectConstructor.h:
      * runtime/ObjectPrototype.cpp:
      * runtime/ObjectPrototype.h:
      * runtime/RegExpPrototype.cpp:
      * runtime/RegExpPrototype.h:
      * runtime/SmallStrings.h:
      * runtime/StringConstructor.cpp:
      * runtime/StringConstructor.h:
          Removed use of redundant classes.
      
      Source/WebCore: 
      
      * bindings/js/JSDOMBinding.cpp:
      * bindings/js/JSDOMWindowCustom.cpp:
      * bindings/js/JSHistoryCustom.cpp:
      * bindings/js/JSLocationCustom.cpp:
          Removed use of redundant classes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9788fe2f
  22. 20 Feb, 2011 1 commit
    • barraclough@apple.com's avatar
      Interpreter build fix. · c83b88c6
      barraclough@apple.com authored
      * runtime/ArrayConstructor.cpp:
      * runtime/BooleanPrototype.cpp:
      * runtime/DateConstructor.cpp:
      * runtime/ErrorPrototype.cpp:
      * runtime/FunctionPrototype.cpp:
      * runtime/Lookup.cpp:
      * runtime/NumberPrototype.cpp:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectPrototype.cpp:
      * runtime/RegExpPrototype.cpp:
      * runtime/StringConstructor.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c83b88c6
  23. 19 Feb, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 54786 - Devirtualize JSCell::classInfo() · a5540da1
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      Instead of making a virtual function call, add a pointer to the ClassInfo
      onto Structure.
      
      This removes a virtual function call, and paves the way towards removing all
      the createStructure methods, and StructureFlags/AnonymousSlotCount properties
      (these should be able to move onto ClassInfo).
      
      Calls to Structure::create must now pass a pointer to the ClassInfo for the
      structure. All objects now have a ClassInfo pointer, non-object cell types
      still do not.
      
      Changes are most mechanical, involving three steps:
          * Remove virtual classInfo() methods.
          * Add &s_info parameter to calls to Structure::create.
          * Rename ClassInfo static members on classes from 'info' to 's_info',
            for consistency.
      
      Source/JavaScriptCore: 
      
      * API/JSCallbackConstructor.cpp:
      * API/JSCallbackConstructor.h:
      * API/JSCallbackFunction.cpp:
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.cpp:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      * API/JSObjectRef.cpp:
      * API/JSValueRef.cpp:
      * API/JSWeakObjectMapRefPrivate.cpp:
      * JavaScriptCore.exp:
      * debugger/Debugger.cpp:
      * debugger/DebuggerActivation.h:
      * debugger/DebuggerCallFrame.cpp:
      * interpreter/Interpreter.cpp:
      * jit/JITCall32_64.cpp:
      * jit/JITOpcodes.cpp:
      * jit/JITStubs.cpp:
      * profiler/Profiler.cpp:
      * runtime/Arguments.cpp:
      * runtime/Arguments.h:
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayPrototype.cpp:
      * runtime/ArrayPrototype.h:
      * runtime/BooleanObject.cpp:
      * runtime/BooleanObject.h:
      * runtime/BooleanPrototype.cpp:
      * runtime/DateConstructor.cpp:
      * runtime/DateInstance.cpp:
      * runtime/DateInstance.h:
      * runtime/DatePrototype.cpp:
      * runtime/DatePrototype.h:
      * runtime/ErrorInstance.cpp:
      * runtime/ErrorInstance.h:
      * runtime/ErrorPrototype.cpp:
      * runtime/FunctionPrototype.cpp:
      * runtime/FunctionPrototype.h:
      * runtime/GetterSetter.h:
      * runtime/GlobalEvalFunction.h:
      * runtime/InternalFunction.cpp:
      * runtime/InternalFunction.h:
      * runtime/JSAPIValueWrapper.h:
      * runtime/JSActivation.cpp:
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      * runtime/JSFunction.h:
      * runtime/JSGlobalData.cpp:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      * runtime/JSONObject.h:
      * runtime/JSObject.cpp:
      * runtime/JSObject.h:
      * runtime/JSObjectWithGlobalObject.h:
      * runtime/JSPropertyNameIterator.h:
      * runtime/JSStaticScopeObject.h:
      * runtime/JSString.h:
      * runtime/JSVariableObject.h:
      * runtime/JSWrapperObject.h:
      * runtime/JSZombie.cpp:
      * runtime/JSZombie.h:
      * runtime/Lookup.cpp:
      * runtime/MathObject.cpp:
      * runtime/MathObject.h:
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      * runtime/NumberObject.h:
      * runtime/NumberPrototype.cpp:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectPrototype.cpp:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpConstructor.h:
      * runtime/RegExpObject.cpp:
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      * runtime/ScopeChain.cpp:
      * runtime/StringConstructor.cpp:
      * runtime/StringObject.cpp:
      * runtime/StringObject.h:
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      * runtime/StringPrototype.cpp:
      * runtime/StringPrototype.h:
      * runtime/Structure.cpp:
      * runtime/Structure.h:
      
      Source/JavaScriptGlue: 
      
      * JSUtils.cpp:
      (KJSValueToJSObject):
      (KJSValueToCFTypeInternal):
      * UserObjectImp.cpp:
      * UserObjectImp.h:
      (UserObjectImp::createStructure):
      
      Source/WebCore: 
      
      * WebCore.exp.in:
      * bindings/js/JSAudioConstructor.cpp:
      * bindings/js/JSAudioConstructor.h:
      * bindings/js/JSDOMBinding.cpp:
      * bindings/js/JSDOMBinding.h:
      * bindings/js/JSDOMGlobalObject.cpp:
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowBase.cpp:
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSGeolocationCustom.cpp:
      * bindings/js/JSImageConstructor.cpp:
      * bindings/js/JSImageConstructor.h:
      * bindings/js/JSImageDataCustom.cpp:
      * bindings/js/JSOptionConstructor.cpp:
      * bindings/js/JSOptionConstructor.h:
      * bindings/js/JSWorkerContextBase.cpp:
      * bindings/js/JSWorkerContextBase.h:
      * bindings/js/SerializedScriptValue.cpp:
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/c/CRuntimeObject.cpp:
      * bridge/c/CRuntimeObject.h:
      * bridge/c/c_instance.cpp:
      * bridge/jni/jsc/JNIUtilityPrivate.cpp:
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/jsc/BridgeJSC.cpp:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      * bridge/objc/objc_instance.mm:
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      * bridge/runtime_array.cpp:
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp:
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
      (WebKit::ProxyRuntimeMethod::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.h:
      (WebKit::ProxyRuntimeObject::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      * WebView/WebView.mm:
      (aeDescFromJSValue):
      
      Source/WebKit2: 
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::createStructure):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::createStructure):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5540da1
  24. 31 Jan, 2011 3 commits
    • oliver@apple.com's avatar
      2011-01-31 Oliver Hunt <oliver@apple.com> · 168e5064
      oliver@apple.com authored
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              rolling r77098, r77099, r77100, r77109, and
              r77111 back in, along with a few more Qt fix attempts.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77151 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      168e5064
    • ossy@webkit.org's avatar
      2011-01-30 Csaba Osztrogonác <ossy@webkit.org> · ad0e9df1
      ossy@webkit.org authored
              Unreviewed, rolling out r77098, r77099, r77100, r77109, and
              r77111.
              http://trac.webkit.org/changeset/77098
              http://trac.webkit.org/changeset/77099
              http://trac.webkit.org/changeset/77100
              http://trac.webkit.org/changeset/77109
              http://trac.webkit.org/changeset/77111
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Qt build is broken
      
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObjectData::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
              (JSC::JSCallbackObject::setPrivateProperty):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::put):
              (JSC::::staticFunctionGetter):
              * API/JSObjectRef.cpp:
              (JSObjectMakeConstructor):
              (JSObjectSetPrivateProperty):
              * API/JSWeakObjectMapRefInternal.h:
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::CodeBlock::globalObject):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::BytecodeGenerator):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              (JSC::BytecodeGenerator::findScopedProperty):
              * debugger/Debugger.cpp:
              (JSC::evaluateInGlobalCallFrame):
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              (JSC::DebuggerActivation::markChildren):
              * debugger/DebuggerActivation.h:
              * debugger/DebuggerCallFrame.cpp:
              (JSC::DebuggerCallFrame::evaluate):
              * interpreter/CallFrame.h:
              (JSC::ExecState::exception):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::resolve):
              (JSC::Interpreter::resolveSkip):
              (JSC::Interpreter::resolveGlobal):
              (JSC::Interpreter::resolveGlobalDynamic):
              (JSC::Interpreter::resolveBaseAndProperty):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::appendSourceToError):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::tryCacheGetByID):
              (JSC::Interpreter::privateExecute):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              * runtime/ArgList.cpp:
              (JSC::MarkedArgumentBuffer::markLists):
              * runtime/Arguments.cpp:
              (JSC::Arguments::markChildren):
              (JSC::Arguments::getOwnPropertySlot):
              (JSC::Arguments::getOwnPropertyDescriptor):
              (JSC::Arguments::put):
              * runtime/Arguments.h:
              (JSC::Arguments::setActivation):
              (JSC::Arguments::Arguments):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::constructArrayWithSizeQuirk):
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncSplice):
              * runtime/BatchedTransitionOptimizer.h:
              (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
              (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/ConservativeSet.cpp:
              (JSC::ConservativeSet::grow):
              * runtime/ConservativeSet.h:
              (JSC::ConservativeSet::~ConservativeSet):
              (JSC::ConservativeSet::mark):
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * runtime/DatePrototype.cpp:
              (JSC::dateProtoFuncSetTime):
              (JSC::setNewValueFromTimeArgs):
              (JSC::setNewValueFromDateArgs):
              (JSC::dateProtoFuncSetYear):
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              * runtime/GetterSetter.cpp:
              (JSC::GetterSetter::markChildren):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::GetterSetter):
              (JSC::GetterSetter::getter):
              (JSC::GetterSetter::setGetter):
              (JSC::GetterSetter::setter):
              (JSC::GetterSetter::setSetter):
              * runtime/GlobalEvalFunction.cpp:
              (JSC::GlobalEvalFunction::GlobalEvalFunction):
              (JSC::GlobalEvalFunction::markChildren):
              * runtime/GlobalEvalFunction.h:
              (JSC::GlobalEvalFunction::cachedGlobalObject):
              * runtime/Heap.cpp:
              (JSC::Heap::markProtectedObjects):
              (JSC::Heap::markTempSortVectors):
              (JSC::Heap::markRoots):
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::value):
              (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::markChildren):
              (JSC::JSActivation::put):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              (JSC::JSArray::getOwnPropertySlot):
              (JSC::JSArray::getOwnPropertyDescriptor):
              (JSC::JSArray::put):
              (JSC::JSArray::putSlowCase):
              (JSC::JSArray::deleteProperty):
              (JSC::JSArray::increaseVectorLength):
              (JSC::JSArray::setLength):
              (JSC::JSArray::pop):
              (JSC::JSArray::push):
              (JSC::JSArray::unshiftCount):
              (JSC::JSArray::sort):
              (JSC::JSArray::fillArgList):
              (JSC::JSArray::copyToRegisters):
              (JSC::JSArray::compactForSorting):
              * runtime/JSArray.h:
              (JSC::JSArray::getIndex):
              (JSC::JSArray::setIndex):
              (JSC::JSArray::uncheckedSetIndex):
              (JSC::JSArray::markChildrenDirect):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::JSValue::toThisObject):
              (JSC::JSCell::MarkStack::append):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::getOwnPropertySlot):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::resetPrototype):
              (JSC::JSGlobalObject::markChildren):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
              (JSC::JSGlobalObject::regExpConstructor):
              (JSC::JSGlobalObject::errorConstructor):
              (JSC::JSGlobalObject::evalErrorConstructor):
              (JSC::JSGlobalObject::rangeErrorConstructor):
              (JSC::JSGlobalObject::referenceErrorConstructor):
              (JSC::JSGlobalObject::syntaxErrorConstructor):
              (JSC::JSGlobalObject::typeErrorConstructor):
              (JSC::JSGlobalObject::URIErrorConstructor):
              (JSC::JSGlobalObject::evalFunction):
              (JSC::JSGlobalObject::objectPrototype):
              (JSC::JSGlobalObject::functionPrototype):
              (JSC::JSGlobalObject::arrayPrototype):
              (JSC::JSGlobalObject::booleanPrototype):
              (JSC::JSGlobalObject::stringPrototype):
              (JSC::JSGlobalObject::numberPrototype):
              (JSC::JSGlobalObject::datePrototype):
              (JSC::JSGlobalObject::regExpPrototype):
              (JSC::JSGlobalObject::methodCallDummy):
              (JSC::Structure::prototypeForLookup):
              (JSC::constructArray):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Holder::object):
              (JSC::Stringifier::markAggregate):
              (JSC::Stringifier::stringify):
              (JSC::Stringifier::Holder::appendNextProperty):
              (JSC::Walker::callReviver):
              (JSC::Walker::walk):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::JSObject::removeDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::putDescriptor):
              (JSC::JSObject::defineOwnProperty):
              * runtime/JSObject.h:
              (JSC::JSObject::getDirectOffset):
              (JSC::JSObject::putDirectOffset):
              (JSC::JSObject::flattenDictionaryObject):
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::putDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectWithoutTransition):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::JSValue::putDirect):
              (JSC::JSObject::allocatePropertyStorageInline):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
              (JSC::JSPropertyNameIterator::get):
              * runtime/JSPropertyNameIterator.h:
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSString.cpp:
              (JSC::StringObject::create):
              * runtime/JSValue.h:
              * runtime/JSWrapperObject.cpp:
              (JSC::JSWrapperObject::markChildren):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::internalValue):
              (JSC::JSWrapperObject::setInternalValue):
              * runtime/LiteralParser.cpp:
              (JSC::LiteralParser::parse):
              * runtime/Lookup.cpp:
              (JSC::setUpStaticFunctionSlot):
              * runtime/Lookup.h:
              (JSC::lookupPut):
              * runtime/MarkStack.h:
              (JSC::MarkStack::appendValues):
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              (JSC::constructWithNumberConstructor):
              * runtime/NumberObject.cpp:
              (JSC::constructNumber):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              (JSC::objectConstructorGetOwnPropertyDescriptor):
              * runtime/Operations.h:
              (JSC::normalizePrototypeChain):
              (JSC::resolveBase):
              * runtime/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * runtime/PutPropertySlot.h:
              (JSC::PutPropertySlot::setExistingProperty):
              (JSC::PutPropertySlot::setNewProperty):
              (JSC::PutPropertySlot::base):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              * runtime/ScopeChain.cpp:
              (JSC::ScopeChainNode::print):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::~ScopeChainNode):
              (JSC::ScopeChainIterator::operator*):
              (JSC::ScopeChainIterator::operator->):
              (JSC::ScopeChain::top):
              * runtime/ScopeChainMark.h:
              (JSC::ScopeChain::markAggregate):
              * runtime/SmallStrings.cpp:
              (JSC::isMarked):
              (JSC::SmallStrings::markChildren):
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::emptyString):
              (JSC::SmallStrings::singleCharacterString):
              (JSC::SmallStrings::singleCharacterStrings):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringObject.cpp:
              (JSC::StringObject::StringObject):
              * runtime/StringObject.h:
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/Structure.cpp:
              (JSC::Structure::Structure):
              (JSC::Structure::addPropertyTransition):
              (JSC::Structure::toDictionaryTransition):
              (JSC::Structure::flattenDictionaryStructure):
              * runtime/Structure.h:
              (JSC::Structure::storedPrototype):
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::uncheckedGet):
              (JSC::WeakGCMap::isValid):
              (JSC::::get):
              (JSC::::take):
              (JSC::::set):
              (JSC::::uncheckedRemove):
              * runtime/WriteBarrier.h: Removed.
      2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
      
              Unreviewed, rolling out r77098, r77099, r77100, r77109, and
              r77111.
              http://trac.webkit.org/changeset/77098
              http://trac.webkit.org/changeset/77099
              http://trac.webkit.org/changeset/77100
              http://trac.webkit.org/changeset/77109
              http://trac.webkit.org/changeset/77111
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Qt build is broken
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
      
              Unreviewed, rolling out r77098, r77099, r77100, r77109, and
              r77111.
              http://trac.webkit.org/changeset/77098
              http://trac.webkit.org/changeset/77099
              http://trac.webkit.org/changeset/77100
              http://trac.webkit.org/changeset/77109
              http://trac.webkit.org/changeset/77111
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Qt build is broken
      
              * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
              * WebCore.exp.in:
              * bindings/js/DOMWrapperWorld.h:
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::markDOMNodesForDocument):
              (WebCore::markDOMObjectWrapper):
              (WebCore::markDOMNodeWrapper):
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::markChildren):
              (WebCore::JSDOMGlobalObject::setInjectedScript):
              (WebCore::JSDOMGlobalObject::injectedScript):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
              (WebCore::getDOMConstructor):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::setLocation):
              (WebCore::DialogHandler::dialogCreated):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              (WebCore::JSDOMWindowShell::markChildren):
              (WebCore::JSDOMWindowShell::unwrappedObject):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::window):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSDeviceMotionEventCustom.cpp:
              (WebCore::createAccelerationObject):
              (WebCore::createRotationRateObject):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              (WebCore::JSEventListener::markJSFunction):
              * bindings/js/JSEventListener.h:
              (WebCore::JSEventListener::jsFunction):
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::setAll):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::scopeChain):
              (WebCore::JSJavaScriptCallFrame::scopeType):
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::markAggregate):
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              (WebCore::JSSQLResultSetRowList::item):
              * bindings/js/ScriptCachedFrameData.cpp:
              (WebCore::ScriptCachedFrameData::restore):
              * bindings/js/ScriptObject.cpp:
              (WebCore::ScriptGlobalObject::set):
              * bindings/js/SerializedScriptValue.cpp:
              (WebCore::CloneDeserializer::putProperty):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/qt/qt_instance.cpp:
              (JSC::Bindings::QtInstance::QtInstance):
              (JSC::Bindings::QtInstance::removeCachedMethod):
              (JSC::Bindings::QtInstance::markAggregate):
              * bridge/qt/qt_instance.h:
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
              (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
              (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
              (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
              * bridge/qt/qt_runtime.h:
              * bridge/runtime_root.cpp:
              (JSC::Bindings::RootObject::invalidate):
              * bridge/runtime_root.h:
              * dom/Document.h:
      2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
      
              Unreviewed, rolling out r77098, r77099, r77100, r77109, and
              r77111.
              http://trac.webkit.org/changeset/77098
              http://trac.webkit.org/changeset/77099
              http://trac.webkit.org/changeset/77100
              http://trac.webkit.org/changeset/77109
              http://trac.webkit.org/changeset/77111
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Qt build is broken
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad0e9df1
    • oliver@apple.com's avatar
      Convert markstack to a slot visitor API · ba805bee
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=53219
      
      rolling r77006 and r77020 back in.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba805bee
  25. 29 Jan, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com> · 3857b1ea
      rniwa@webkit.org authored
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObjectData::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
              (JSC::JSCallbackObject::setPrivateProperty):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::put):
              (JSC::::staticFunctionGetter):
              * API/JSObjectRef.cpp:
              (JSObjectMakeConstructor):
              (JSObjectSetPrivateProperty):
              * API/JSWeakObjectMapRefInternal.h:
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::CodeBlock::globalObject):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::BytecodeGenerator):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              (JSC::BytecodeGenerator::findScopedProperty):
              * debugger/Debugger.cpp:
              (JSC::evaluateInGlobalCallFrame):
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              (JSC::DebuggerActivation::markChildren):
              * debugger/DebuggerActivation.h:
              * debugger/DebuggerCallFrame.cpp:
              (JSC::DebuggerCallFrame::evaluate):
              * interpreter/CallFrame.h:
              (JSC::ExecState::exception):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::resolve):
              (JSC::Interpreter::resolveSkip):
              (JSC::Interpreter::resolveGlobal):
              (JSC::Interpreter::resolveGlobalDynamic):
              (JSC::Interpreter::resolveBaseAndProperty):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::appendSourceToError):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::tryCacheGetByID):
              (JSC::Interpreter::privateExecute):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              * runtime/ArgList.cpp:
              (JSC::MarkedArgumentBuffer::markLists):
              * runtime/Arguments.cpp:
              (JSC::Arguments::markChildren):
              (JSC::Arguments::getOwnPropertySlot):
              (JSC::Arguments::getOwnPropertyDescriptor):
              (JSC::Arguments::put):
              * runtime/Arguments.h:
              (JSC::Arguments::setActivation):
              (JSC::Arguments::Arguments):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::constructArrayWithSizeQuirk):
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncSplice):
              * runtime/BatchedTransitionOptimizer.h:
              (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
              (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/ConservativeSet.cpp:
              (JSC::ConservativeSet::grow):
              * runtime/ConservativeSet.h:
              (JSC::ConservativeSet::~ConservativeSet):
              (JSC::ConservativeSet::mark):
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * runtime/DatePrototype.cpp:
              (JSC::dateProtoFuncSetTime):
              (JSC::setNewValueFromTimeArgs):
              (JSC::setNewValueFromDateArgs):
              (JSC::dateProtoFuncSetYear):
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              * runtime/GetterSetter.cpp:
              (JSC::GetterSetter::markChildren):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::GetterSetter):
              (JSC::GetterSetter::getter):
              (JSC::GetterSetter::setGetter):
              (JSC::GetterSetter::setter):
              (JSC::GetterSetter::setSetter):
              * runtime/GlobalEvalFunction.cpp:
              (JSC::GlobalEvalFunction::GlobalEvalFunction):
              (JSC::GlobalEvalFunction::markChildren):
              * runtime/GlobalEvalFunction.h:
              (JSC::GlobalEvalFunction::cachedGlobalObject):
              * runtime/Heap.cpp:
              (JSC::Heap::markProtectedObjects):
              (JSC::Heap::markTempSortVectors):
              (JSC::Heap::markRoots):
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::value):
              (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::markChildren):
              (JSC::JSActivation::put):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              (JSC::JSArray::getOwnPropertySlot):
              (JSC::JSArray::getOwnPropertyDescriptor):
              (JSC::JSArray::put):
              (JSC::JSArray::putSlowCase):
              (JSC::JSArray::deleteProperty):
              (JSC::JSArray::increaseVectorLength):
              (JSC::JSArray::setLength):
              (JSC::JSArray::pop):
              (JSC::JSArray::push):
              (JSC::JSArray::unshiftCount):
              (JSC::JSArray::sort):
              (JSC::JSArray::fillArgList):
              (JSC::JSArray::copyToRegisters):
              (JSC::JSArray::compactForSorting):
              * runtime/JSArray.h:
              (JSC::JSArray::getIndex):
              (JSC::JSArray::setIndex):
              (JSC::JSArray::uncheckedSetIndex):
              (JSC::JSArray::markChildrenDirect):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::JSValue::toThisObject):
              (JSC::JSCell::MarkStack::append):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::getOwnPropertySlot):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::resetPrototype):
              (JSC::JSGlobalObject::markChildren):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
              (JSC::JSGlobalObject::regExpConstructor):
              (JSC::JSGlobalObject::errorConstructor):
              (JSC::JSGlobalObject::evalErrorConstructor):
              (JSC::JSGlobalObject::rangeErrorConstructor):
              (JSC::JSGlobalObject::referenceErrorConstructor):
              (JSC::JSGlobalObject::syntaxErrorConstructor):
              (JSC::JSGlobalObject::typeErrorConstructor):
              (JSC::JSGlobalObject::URIErrorConstructor):
              (JSC::JSGlobalObject::evalFunction):
              (JSC::JSGlobalObject::objectPrototype):
              (JSC::JSGlobalObject::functionPrototype):
              (JSC::JSGlobalObject::arrayPrototype):
              (JSC::JSGlobalObject::booleanPrototype):
              (JSC::JSGlobalObject::stringPrototype):
              (JSC::JSGlobalObject::numberPrototype):
              (JSC::JSGlobalObject::datePrototype):
              (JSC::JSGlobalObject::regExpPrototype):
              (JSC::JSGlobalObject::methodCallDummy):
              (JSC::Structure::prototypeForLookup):
              (JSC::constructArray):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Holder::object):
              (JSC::Stringifier::markAggregate):
              (JSC::Stringifier::stringify):
              (JSC::Stringifier::Holder::appendNextProperty):
              (JSC::Walker::callReviver):
              (JSC::Walker::walk):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::JSObject::removeDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::putDescriptor):
              (JSC::JSObject::defineOwnProperty):
              * runtime/JSObject.h:
              (JSC::JSObject::getDirectOffset):
              (JSC::JSObject::putDirectOffset):
              (JSC::JSObject::flattenDictionaryObject):
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::putDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectWithoutTransition):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::JSValue::putDirect):
              (JSC::JSObject::allocatePropertyStorageInline):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
              (JSC::JSPropertyNameIterator::get):
              * runtime/JSPropertyNameIterator.h:
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSString.cpp:
              (JSC::StringObject::create):
              * runtime/JSValue.h:
              * runtime/JSWrapperObject.cpp:
              (JSC::JSWrapperObject::markChildren):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::internalValue):
              (JSC::JSWrapperObject::setInternalValue):
              * runtime/LiteralParser.cpp:
              (JSC::LiteralParser::parse):
              * runtime/Lookup.cpp:
              (JSC::setUpStaticFunctionSlot):
              * runtime/Lookup.h:
              (JSC::lookupPut):
              * runtime/MarkStack.h:
              (JSC::MarkStack::appendValues):
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              (JSC::constructWithNumberConstructor):
              * runtime/NumberObject.cpp:
              (JSC::constructNumber):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              (JSC::objectConstructorGetOwnPropertyDescriptor):
              * runtime/Operations.h:
              (JSC::normalizePrototypeChain):
              (JSC::resolveBase):
              * runtime/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * runtime/PutPropertySlot.h:
              (JSC::PutPropertySlot::setExistingProperty):
              (JSC::PutPropertySlot::setNewProperty):
              (JSC::PutPropertySlot::base):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              * runtime/ScopeChain.cpp:
              (JSC::ScopeChainNode::print):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::~ScopeChainNode):
              (JSC::ScopeChainIterator::operator*):
              (JSC::ScopeChainIterator::operator->):
              (JSC::ScopeChain::top):
              * runtime/ScopeChainMark.h:
              (JSC::ScopeChain::markAggregate):
              * runtime/SmallStrings.cpp:
              (JSC::isMarked):
              (JSC::SmallStrings::markChildren):
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::emptyString):
              (JSC::SmallStrings::singleCharacterString):
              (JSC::SmallStrings::singleCharacterStrings):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringObject.cpp:
              (JSC::StringObject::StringObject):
              * runtime/StringObject.h:
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/Structure.cpp:
              (JSC::Structure::Structure):
              (JSC::Structure::addPropertyTransition):
              (JSC::Structure::toDictionaryTransition):
              (JSC::Structure::flattenDictionaryStructure):
              * runtime/Structure.h:
              (JSC::Structure::storedPrototype):
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::uncheckedGet):
              (JSC::WeakGCMap::isValid):
              (JSC::::get):
              (JSC::::take):
              (JSC::::set):
              (JSC::::uncheckedRemove):
              * runtime/WriteBarrier.h: Removed.
      2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
              * WebCore.exp.in:
              * bindings/js/DOMWrapperWorld.h:
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::markDOMNodesForDocument):
              (WebCore::markDOMObjectWrapper):
              (WebCore::markDOMNodeWrapper):
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::markChildren):
              (WebCore::JSDOMGlobalObject::setInjectedScript):
              (WebCore::JSDOMGlobalObject::injectedScript):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
              (WebCore::getDOMConstructor):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::setLocation):
              (WebCore::DialogHandler::dialogCreated):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              (WebCore::JSDOMWindowShell::markChildren):
              (WebCore::JSDOMWindowShell::unwrappedObject):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::window):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSDeviceMotionEventCustom.cpp:
              (WebCore::createAccelerationObject):
              (WebCore::createRotationRateObject):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              (WebCore::JSEventListener::markJSFunction):
              * bindings/js/JSEventListener.h:
              (WebCore::JSEventListener::jsFunction):
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::setAll):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::scopeChain):
              (WebCore::JSJavaScriptCallFrame::scopeType):
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::markAggregate):
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              (WebCore::JSSQLResultSetRowList::item):
              * bindings/js/ScriptCachedFrameData.cpp:
              (WebCore::ScriptCachedFrameData::restore):
              * bindings/js/ScriptObject.cpp:
              (WebCore::ScriptGlobalObject::set):
              * bindings/js/SerializedScriptValue.cpp:
              (WebCore::CloneDeserializer::putProperty):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
              (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
              (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
              (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
              * bridge/qt/qt_runtime.h:
              * bridge/runtime_root.cpp:
              (JSC::Bindings::RootObject::invalidate):
              * bridge/runtime_root.h:
              * dom/Document.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3857b1ea
  26. 28 Jan, 2011 1 commit
    • oliver@apple.com's avatar
      2011-01-27 Oliver Hunt <oliver@apple.com> · c975423a
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Move the MarkStack over to a slot based marking API.
      
              In order to avoiding aliasing concerns there are two new types
              that need to be used when holding on to JSValues and JSCell that
              need to be marked: WriteBarrier and DeprecatedPtr.  WriteBarrier
              is expected to be used for any JSValue or Cell that's lifetime and
              marking is controlled by another GC object.  DeprecatedPtr is used
              for any value that we need to rework ownership for.
      
              The change over to this model has produced a large amount of
              code changes, but they are mostly mechanical (forwarding JSGlobalData,
              etc).
      
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObjectData::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
              (JSC::JSCallbackObject::setPrivateProperty):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::put):
              (JSC::::staticFunctionGetter):
              * API/JSObjectRef.cpp:
              (JSObjectMakeConstructor):
              (JSObjectSetPrivateProperty):
              * API/JSWeakObjectMapRefInternal.h:
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::CodeBlock::globalObject):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::BytecodeGenerator):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              (JSC::BytecodeGenerator::findScopedProperty):
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              (JSC::DebuggerActivation::markChildren):
              * debugger/DebuggerActivation.h:
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::resolve):
              (JSC::Interpreter::resolveSkip):
              (JSC::Interpreter::resolveGlobalDynamic):
              (JSC::Interpreter::resolveBaseAndProperty):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::appendSourceToError):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::privateExecute):
              * interpreter/Register.h:
              (JSC::Register::jsValueSlot):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              * runtime/Arguments.cpp:
              (JSC::Arguments::markChildren):
              (JSC::Arguments::getOwnPropertySlot):
              (JSC::Arguments::getOwnPropertyDescriptor):
              (JSC::Arguments::put):
              * runtime/Arguments.h:
              (JSC::Arguments::setActivation):
              (JSC::Arguments::Arguments):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::constructArrayWithSizeQuirk):
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncSplice):
              * runtime/BatchedTransitionOptimizer.h:
              (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
              (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/ConservativeSet.h:
              (JSC::ConservativeSet::mark):
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * runtime/DatePrototype.cpp:
              (JSC::dateProtoFuncSetTime):
              (JSC::setNewValueFromTimeArgs):
              (JSC::setNewValueFromDateArgs):
              (JSC::dateProtoFuncSetYear):
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              * runtime/GetterSetter.cpp:
              (JSC::GetterSetter::markChildren):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::GetterSetter):
              (JSC::GetterSetter::getter):
              (JSC::GetterSetter::setGetter):
              (JSC::GetterSetter::setter):
              (JSC::GetterSetter::setSetter):
              * runtime/GlobalEvalFunction.cpp:
              (JSC::GlobalEvalFunction::GlobalEvalFunction):
              (JSC::GlobalEvalFunction::markChildren):
              * runtime/GlobalEvalFunction.h:
              (JSC::GlobalEvalFunction::cachedGlobalObject):
              * runtime/Heap.cpp:
              (JSC::Heap::markProtectedObjects):
              (JSC::Heap::markTempSortVectors):
              (JSC::Heap::markRoots):
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::value):
              (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::put):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              (JSC::JSArray::getOwnPropertySlot):
              (JSC::JSArray::getOwnPropertyDescriptor):
              (JSC::JSArray::put):
              (JSC::JSArray::putSlowCase):
              (JSC::JSArray::deleteProperty):
              (JSC::JSArray::increaseVectorLength):
              (JSC::JSArray::setLength):
              (JSC::JSArray::pop):
              (JSC::JSArray::push):
              (JSC::JSArray::unshiftCount):
              (JSC::JSArray::sort):
              (JSC::JSArray::fillArgList):
              (JSC::JSArray::copyToRegisters):
              (JSC::JSArray::compactForSorting):
              * runtime/JSArray.h:
              (JSC::JSArray::getIndex):
              (JSC::JSArray::setIndex):
              (JSC::JSArray::uncheckedSetIndex):
              (JSC::JSArray::markChildrenDirect):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::MarkStack::append):
              (JSC::JSCell::MarkStack::appendCell):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::getOwnPropertySlot):
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::resetPrototype):
              (JSC::JSGlobalObject::markChildren):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
              (JSC::JSGlobalObject::regExpConstructor):
              (JSC::JSGlobalObject::errorConstructor):
              (JSC::JSGlobalObject::evalErrorConstructor):
              (JSC::JSGlobalObject::rangeErrorConstructor):
              (JSC::JSGlobalObject::referenceErrorConstructor):
              (JSC::JSGlobalObject::syntaxErrorConstructor):
              (JSC::JSGlobalObject::typeErrorConstructor):
              (JSC::JSGlobalObject::URIErrorConstructor):
              (JSC::JSGlobalObject::evalFunction):
              (JSC::JSGlobalObject::objectPrototype):
              (JSC::JSGlobalObject::functionPrototype):
              (JSC::JSGlobalObject::arrayPrototype):
              (JSC::JSGlobalObject::booleanPrototype):
              (JSC::JSGlobalObject::stringPrototype):
              (JSC::JSGlobalObject::numberPrototype):
              (JSC::JSGlobalObject::datePrototype):
              (JSC::JSGlobalObject::regExpPrototype):
              (JSC::JSGlobalObject::methodCallDummy):
              (JSC::constructArray):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Holder::object):
              (JSC::Stringifier::Holder::objectSlot):
              (JSC::Stringifier::markAggregate):
              (JSC::Stringifier::stringify):
              (JSC::Stringifier::Holder::appendNextProperty):
              (JSC::Walker::callReviver):
              (JSC::Walker::walk):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::JSObject::removeDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::putDescriptor):
              (JSC::JSObject::defineOwnProperty):
              * runtime/JSObject.h:
              (JSC::JSObject::putDirectOffset):
              (JSC::JSObject::putUndefinedAtDirectOffset):
              (JSC::JSObject::flattenDictionaryObject):
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::putDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectWithoutTransition):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::JSValue::putDirect):
              (JSC::JSObject::allocatePropertyStorageInline):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSString.cpp:
              (JSC::StringObject::create):
              * runtime/JSValue.h:
              * runtime/JSWrapperObject.cpp:
              (JSC::JSWrapperObject::markChildren):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::internalValue):
              (JSC::JSWrapperObject::setInternalValue):
              * runtime/LiteralParser.cpp:
              (JSC::LiteralParser::parse):
              * runtime/Lookup.cpp:
              (JSC::setUpStaticFunctionSlot):
              * runtime/Lookup.h:
              (JSC::lookupPut):
              * runtime/MarkStack.h:
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              (JSC::constructWithNumberConstructor):
              * runtime/NumberObject.cpp:
              (JSC::constructNumber):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              (JSC::objectConstructorGetOwnPropertyDescriptor):
              * runtime/Operations.h:
              (JSC::normalizePrototypeChain):
              (JSC::resolveBase):
              * runtime/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * runtime/PutPropertySlot.h:
              (JSC::PutPropertySlot::setExistingProperty):
              (JSC::PutPropertySlot::setNewProperty):
              (JSC::PutPropertySlot::base):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              * runtime/ScopeChain.cpp:
              (JSC::ScopeChainNode::print):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::~ScopeChainNode):
              (JSC::ScopeChainIterator::operator*):
              (JSC::ScopeChainIterator::operator->):
              (JSC::ScopeChain::top):
              * runtime/ScopeChainMark.h:
              (JSC::ScopeChain::markAggregate):
              * runtime/SmallStrings.cpp:
              (JSC::isMarked):
              (JSC::SmallStrings::markChildren):
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::emptyString):
              (JSC::SmallStrings::singleCharacterString):
              (JSC::SmallStrings::singleCharacterStrings):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringObject.cpp:
              (JSC::StringObject::StringObject):
              * runtime/StringObject.h:
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/Structure.cpp:
              (JSC::Structure::flattenDictionaryStructure):
              * runtime/Structure.h:
              (JSC::Structure::storedPrototypeSlot):
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::uncheckedGet):
              (JSC::WeakGCMap::uncheckedGetSlot):
              (JSC::::get):
              (JSC::::take):
              (JSC::::set):
              (JSC::::uncheckedRemove):
              * runtime/WriteBarrier.h: Added.
              (JSC::DeprecatedPtr::DeprecatedPtr):
              (JSC::DeprecatedPtr::get):
              (JSC::DeprecatedPtr::operator*):
              (JSC::DeprecatedPtr::operator->):
              (JSC::DeprecatedPtr::slot):
              (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
              (JSC::DeprecatedPtr::operator!):
              (JSC::WriteBarrierBase::set):
              (JSC::WriteBarrierBase::get):
              (JSC::WriteBarrierBase::operator*):
              (JSC::WriteBarrierBase::operator->):
              (JSC::WriteBarrierBase::slot):
              (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
              (JSC::WriteBarrierBase::operator!):
              (JSC::WriteBarrier::WriteBarrier):
              (JSC::operator==):
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              There's no reason to recurse here, the value we
              were marking was protected.
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Update WebCore to the new marking apis, correct bindings
              codegen.
      
              * ForwardingHeaders/runtime/WriteBarrier.h: Added.
              * WebCore.exp.in:
              * bindings/js/DOMWrapperWorld.h:
              (WebCore::DOMWrapperWorld::globalData):
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::markDOMNodesForDocument):
              (WebCore::markDOMObjectWrapper):
              (WebCore::markDOMNodeWrapper):
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::markChildren):
              (WebCore::JSDOMGlobalObject::setInjectedScript):
              (WebCore::JSDOMGlobalObject::injectedScript):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
              (WebCore::getDOMConstructor):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::setLocation):
              (WebCore::DialogHandler::dialogCreated):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              (WebCore::JSDOMWindowShell::markChildren):
              (WebCore::JSDOMWindowShell::unwrappedObject):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::window):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              (WebCore::JSEventListener::markJSFunction):
              * bindings/js/JSEventListener.h:
              (WebCore::JSEventListener::jsFunction):
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::setAll):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::scopeChain):
              (WebCore::JSJavaScriptCallFrame::scopeType):
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::markAggregate):
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              (WebCore::JSSQLResultSetRowList::item):
              * bindings/js/ScriptCachedFrameData.cpp:
              (WebCore::ScriptCachedFrameData::restore):
              * bindings/js/ScriptObject.cpp:
              (WebCore::ScriptGlobalObject::set):
              * bindings/js/SerializedScriptValue.cpp:
              (WebCore::CloneDeserializer::putProperty):
              * bindings/scripts/CodeGeneratorJS.pm:
              * dom/Document.h:
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Update to new marking api
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c975423a
  27. 20 Jan, 2011 1 commit
    • darin@apple.com's avatar
      2011-01-18 Darin Adler <darin@apple.com> · 4cd37c31
      darin@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Stack overflow when converting an Error object to string
              https://bugs.webkit.org/show_bug.cgi?id=46410
      
              * fast/js/script-tests/toString-recursion.js: Added.
              * fast/js/toString-recursion-expected.txt: Added.
              * fast/js/toString-recursion.html: Added.
      2011-01-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Stack overflow when converting an Error object to string
              https://bugs.webkit.org/show_bug.cgi?id=46410
      
              * Android.mk: Added StringRecursionChecker.cpp and
              StringRecursionChecker.h.
              * CMakeLists.txt: Ditto.
              * GNUmakefile.am: Ditto.
              * JavaScriptCore.gypi: Ditto.
              * JavaScriptCore.pro: Ditto.
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
              * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
      
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncToString): Use StringRecursionChecker instead
              of the older hand-written code to do the same thing.
              (JSC::arrayProtoFuncToLocaleString): Ditto.
              (JSC::arrayProtoFuncJoin): Ditto.
      
              * runtime/ErrorPrototype.cpp:
              (JSC::errorProtoFuncToString): Use StringRecursionChecker.
      
              * runtime/JSGlobalData.h: Renamed arrayVisitedElements to
              stringRecursionCheckVisitedObjects.
      
              * runtime/RegExpPrototype.cpp:
              (JSC::regExpProtoFuncToString): Use StringRecursionChecker.
      
              * runtime/StringRecursionChecker.cpp: Added.
              * runtime/StringRecursionChecker.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4cd37c31
  28. 02 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move JavaScriptCore to Source · 76da8fc1
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51604
      
      Reviewed by Eric Seidel.
      
      Update references to JavaScriptCore to point to the new location.
      
      * Android.mk:
      * CMakeLists.txt:
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * WebKit.pri:
      * WebKit.pro:
      * wscript:
      
      Tools: 
      
      Update references to JavaScriptCore to point to the new location.
      
      * BuildSlaveSupport/build.webkit.org-config/master.cfg:
      * DumpRenderTree/qt/DumpRenderTree.pro:
      * DumpRenderTree/qt/ImageDiff.pro:
      * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
      * DumpRenderTree/wscript:
      * Scripts/build-jsc:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/run-javascriptcore-tests:
      * Scripts/update-javascriptcore-test-results:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/common/config/build_unittest.py:
      * Scripts/webkitpy/style/checker.py:
      * Scripts/webkitpy/style/checker_unittest.py:
      * Scripts/webkitpy/style/checkers/cpp_unittest.py:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      * wx/build/settings.py:
      
      WebCore: 
      
      Update references to JavaScriptCore.
      
      * Android.derived.jscbindings.mk:
      * Android.v8bindings.mk:
      * CMakeLists.txt:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.pro:
        - These changes are subtle and might not be 100% correct.
      * move-js-headers.sh:
      
      WebKit/chromium: 
      
      * WebKit.gyp:
        - Point to JavaScriptCore in its new location.
      
      WebKit/gtk: 
      
      * GNUmakefile.am:
      * docs/GNUmakefile.am:
        - Point to JavaScriptCore in its new location.
      
      WebKit/qt: 
      
      * WebKit_pch.h:
      * docs/qtwebkit.qdocconf:
        - Point to JavaScriptCore in its new location.
      
      WebKit/win: 
      
      * WebKit.vcproj/WebKit.sln:
        - Point to JavaScriptCore in its new location.
      
      WebKit/wx: 
      
      * bindings/python/wscript:
      * wscript:
        - Point to JavaScriptCore in its new location.
      
      WebKit2: 
      
      * WebKit2.pro:
        - Point to JavaScriptCore in its new location.
      
      Websites/bugs.webkit.org: 
      
      * PrettyPatch/PrettyPatch.rb:
        - Remove reference to JavaScriptCore as a source directory.
      
      Websites/webkit.org: 
      
      * coding/assertion-guidelines.html:
        - Update documentation to point to the new location of
          JavaScriptCore.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76da8fc1
  29. 01 Sep, 2010 1 commit
    • barraclough@apple.com's avatar
      JavaScriptCore: Ecma-262 15.11.1.1 states that if the argument is undefined then an · 8a85c512
      barraclough@apple.com authored
      Error object's message property should be set to the empty string.
      
      Rubber stamped by Oliver Hunt.
      
      * runtime/ErrorInstance.cpp:
      (JSC::ErrorInstance::ErrorInstance):
      (JSC::ErrorInstance::create):
      * runtime/ErrorInstance.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      
      LayoutTests: Fix three tests in fast/js/kde are failing; fix them.
      
      Rubber stamped by Oliver Hunt.
      
      exceptions.js:
          This is failing because it redefines the method 'should be'.
          Rename the test's version of this method.
      
      RegExp.js:
          This tests erroneously expects a failed match to update the
          cached results on the RegExp object; these are only updated
          on a successful match.
      
      evil-n.js:
          This test erroneously expects the message property of a newly
          constructed Error with no arguments to be undefined; the ECMA
          262-5 spec requires this to be "". Two sputnik tests contain
          the same error (the sputnik tests is actually testing 262-3
          compatibility, which is not what we're interested in).
      
      * fast/js/kde/RegExp-expected.txt:
      * fast/js/kde/evil-n-expected.txt:
      * fast/js/kde/exceptions-expected.txt:
      * fast/js/kde/script-tests/RegExp.js:
      * fast/js/kde/script-tests/evil-n.js:
      * fast/js/kde/script-tests/exceptions.js:
      (kdeShouldBe):
      (testThrow):
      (testThrow2):
      (testReferenceError):
      (testFunctionError):
      (testMathFunctionError):
      (testWhileAbortion):
      * fast/js/sputnik/Conformance/15_Native_Objects/15.11_Error/15.11.1/S15.11.1.1_A1_T1.html:
      * fast/js/sputnik/Conformance/15_Native_Objects/15.11_Error/15.11.2/S15.11.2.1_A1_T1.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a85c512
  30. 06 Jun, 2010 1 commit
    • barraclough@apple.com's avatar
      Bug 40214 - Clean up error construction / throwing in JSC. · 9c099f96
      barraclough@apple.com authored
              
      Reviewed by Sam Weinig.
      
      The one egregious insanity here is that creating an error requires
      a VM-entry-esqe-host call (the string argument is wrapped as a JS
      object & pushed on the RegisterFile, then unwrapped back to a
      UString).  Changing this also means you only require a global
      object, not an ExecState, to create an error.
      
      The methods to create error objects are also parameterized
      requiring a switch on the type, which can be made cleaner and
      faster by moving to a separate method per error type.  Code to add
      divot information to error had been duplicated, and is coalesced
      back into a single function.
      
      Convenience methods added to create & throw type & syntax error
      with a default error message, since this is a common case.
      
      Also, errors are currently thrown either using
      "throwError(exec, error)" or "exec->setException(error)" - unify
      on the former, since this is more commonly used.  Add
      "throwVMError(exec, error)" equivalents, as a convenience for
      cases where the result was being wrapped in "JSValue::encode(...)".
      
      JavaScriptCore: 
      
      * API/JSCallbackConstructor.cpp:
      (JSC::constructJSCallback):
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::call):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getOwnPropertySlot):
      (JSC::::put):
      (JSC::::deleteProperty):
      (JSC::::construct):
      (JSC::::hasInstance):
      (JSC::::call):
      (JSC::::toNumber):
      (JSC::::toString):
      (JSC::::staticValueGetter):
      (JSC::::staticFunctionGetter):
      (JSC::::callbackGetter):
      * API/JSObjectRef.cpp:
      (JSObjectMakeError):
      * JavaScriptCore.exp:
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitNewError):
      (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
      * bytecompiler/BytecodeGenerator.h:
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ThrowableExpressionData::emitThrowError):
      (JSC::RegExpNode::emitBytecode):
      (JSC::PostfixErrorNode::emitBytecode):
      (JSC::PrefixErrorNode::emitBytecode):
      (JSC::AssignErrorNode::emitBytecode):
      (JSC::ForInNode::emitBytecode):
      (JSC::ContinueNode::emitBytecode):
      (JSC::BreakNode::emitBytecode):
      (JSC::ReturnNode::emitBytecode):
      (JSC::LabelNode::emitBytecode):
      * interpreter/CallFrame.h:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::throwException):
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * jsc.cpp:
      (functionRun):
      (functionLoad):
      (functionCheckSyntax):
      * parser/Nodes.h:
      * runtime/ArrayConstructor.cpp:
      (JSC::constructArrayWithSizeQuirk):
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      (JSC::arrayProtoFuncToLocaleString):
      (JSC::arrayProtoFuncJoin):
      (JSC::arrayProtoFuncFilter):
      (JSC::arrayProtoFuncMap):
      (JSC::arrayProtoFuncEvery):
      (JSC::arrayProtoFuncForEach):
      (JSC::arrayProtoFuncSome):
      (JSC::arrayProtoFuncReduce):
      (JSC::arrayProtoFuncReduceRight):
      * runtime/BooleanPrototype.cpp:
      (JSC::booleanProtoFuncToString):
      (JSC::booleanProtoFuncValueOf):
      * runtime/DatePrototype.cpp:
      (JSC::dateProtoFuncToString):
      (JSC::dateProtoFuncToUTCString):
      (JSC::dateProtoFuncToISOString):
      (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::dateProtoFuncSetMilliSeconds):
      (JSC::dateProtoFuncSetUTCMilliseconds):
      (JSC::dateProtoFuncSetSeconds):
      (JSC::dateProtoFuncSetUTCSeconds):
      (JSC::dateProtoFuncSetMinutes):
      (JSC::dateProtoFuncSetUTCMinutes):
      (JSC::dateProtoFuncSetHours):
      (JSC::dateProtoFuncSetUTCHours):
      (JSC::dateProtoFuncSetDate):
      (JSC::dateProtoFuncSetUTCDate):
      (JSC::dateProtoFuncSetMonth):
      (JSC::dateProtoFuncSetUTCMonth):
      (JSC::dateProtoFuncSetFullYear):
      (JSC::dateProtoFuncSetUTCFullYear):
      (JSC::dateProtoFuncSetYear):
      (JSC::dateProtoFuncGetYear):
      (JSC::dateProtoFuncToJSON):
      * runtime/Error.cpp:
      (JSC::createError):
      (JSC::createEvalError):
      (JSC::createRangeError):
      (JSC::createReferenceError):
      (JSC::createSyntaxError):
      (JSC::createTypeError):
      (JSC::createURIError):
      (JSC::addErrorSourceInfo):
      (JSC::addErrorDivotInfo):
      (JSC::addErrorInfo):
      (JSC::hasErrorInfo):
      (JSC::throwError):
      (JSC::throwTypeError):
      (JSC::throwSyntaxError):
      * runtime/Error.h:
      (JSC::throwVMError):
      (JSC::throwVMTypeError):
      * runtime/ErrorConstructor.cpp:
      (JSC::constructWithErrorConstructor):
      (JSC::callErrorConstructor):
      * runtime/ErrorConstructor.h:
      * runtime/ErrorInstance.cpp:
      (JSC::ErrorInstance::ErrorInstance):
      (JSC::ErrorInstance::create):
      * runtime/ErrorInstance.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      * runtime/ExceptionHelpers.cpp:
      (JSC::createStackOverflowError):
      (JSC::createUndefinedVariableError):
      (JSC::createInvalidParamError):
      (JSC::createNotAConstructorError):
      (JSC::createNotAFunctionError):
      (JSC::createNotAnObjectError):
      (JSC::throwOutOfMemoryError):
      * runtime/ExceptionHelpers.h:
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::compile):
      (JSC::ProgramExecutable::checkSyntax):
      (JSC::ProgramExecutable::compile):
      * runtime/FunctionConstructor.cpp:
      (JSC::constructFunction):
      * runtime/FunctionPrototype.cpp:
      (JSC::functionProtoFuncToString):
      (JSC::functionProtoFuncApply):
      (JSC::functionProtoFuncCall):
      * runtime/Identifier.cpp:
      (JSC::Identifier::from):
      * runtime/Identifier.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::put):
      * runtime/JSFunction.cpp:
      (JSC::callHostFunctionAsConstructor):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::encode):
      (JSC::decode):
      (JSC::globalFuncEval):
      * runtime/JSONObject.cpp:
      (JSC::Stringifier::appendStringifiedValue):
      (JSC::Walker::walk):
      (JSC::JSONProtoFuncParse):
      (JSC::JSONProtoFuncStringify):
      * runtime/JSObject.cpp:
      (JSC::throwSetterError):
      (JSC::JSObject::put):
      (JSC::JSObject::putWithAttributes):
      (JSC::JSObject::defaultValue):
      (JSC::JSObject::hasInstance):
      (JSC::JSObject::defineOwnProperty):
      * runtime/JSObject.h:
      * runtime/JSValue.cpp:
      (JSC::JSValue::toObjectSlowCase):
      (JSC::JSValue::synthesizeObject):
      (JSC::JSValue::synthesizePrototype):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::constructWithNativeErrorConstructor):
      (JSC::callNativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberPrototype.cpp:
      (JSC::numberProtoFuncToString):
      (JSC::numberProtoFuncToLocaleString):
      (JSC::numberProtoFuncValueOf):
      (JSC::numberProtoFuncToFixed):
      (JSC::numberProtoFuncToExponential):
      (JSC::numberProtoFuncToPrecision):
      * runtime/ObjectConstructor.cpp:
      (JSC::objectConstructorGetPrototypeOf):
      (JSC::objectConstructorGetOwnPropertyDescriptor):
      (JSC::objectConstructorGetOwnPropertyNames):
      (JSC::objectConstructorKeys):
      (JSC::toPropertyDescriptor):
      (JSC::objectConstructorDefineProperty):
      (JSC::objectConstructorDefineProperties):
      (JSC::objectConstructorCreate):
      * runtime/ObjectPrototype.cpp:
      (JSC::objectProtoFuncDefineGetter):
      (JSC::objectProtoFuncDefineSetter):
      * runtime/RegExpConstructor.cpp:
      (JSC::constructRegExp):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::match):
      * runtime/RegExpPrototype.cpp:
      (JSC::regExpProtoFuncTest):
      (JSC::regExpProtoFuncExec):
      (JSC::regExpProtoFuncCompile):
      (JSC::regExpProtoFuncToString):
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncToString):
      
      WebCore: 
      
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSArrayBufferConstructor.h:
      (WebCore::construct):
      * bindings/js/JSArrayBufferViewHelper.h:
      (WebCore::setWebGLArrayHelper):
      * bindings/js/JSAudioConstructor.cpp:
      (WebCore::constructAudio):
      * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
      (WebCore::JSCanvasRenderingContext2D::setFillColor):
      (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
      (WebCore::JSCanvasRenderingContext2D::drawImage):
      (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
      (WebCore::JSCanvasRenderingContext2D::setShadow):
      (WebCore::JSCanvasRenderingContext2D::createPattern):
      (WebCore::JSCanvasRenderingContext2D::fillText):
      (WebCore::JSCanvasRenderingContext2D::strokeText):
      * bindings/js/JSClipboardCustom.cpp:
      (WebCore::JSClipboard::clearData):
      (WebCore::JSClipboard::getData):
      (WebCore::JSClipboard::setDragImage):
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::setDOMException):
      (WebCore::toJSSequence):
      * bindings/js/JSDOMWrapper.cpp:
      (WebCore::DOMObject::defineOwnProperty):
      * bindings/js/JSDesktopNotificationsCustom.cpp:
      (WebCore::JSNotificationCenter::requestPermission):
      * bindings/js/JSEventSourceConstructor.cpp:
      (WebCore::constructEventSource):
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::JSHTMLDocument::open):
      * bindings/js/JSHTMLInputElementCustom.cpp:
      (WebCore::JSHTMLInputElement::selectionStart):
      (WebCore::JSHTMLInputElement::setSelectionStart):
      (WebCore::JSHTMLInputElement::selectionEnd):
      (WebCore::JSHTMLInputElement::setSelectionEnd):
      (WebCore::JSHTMLInputElement::setSelectionRange):
      * bindings/js/JSImageConstructor.cpp:
      (WebCore::constructImage):
      * bindings/js/JSJavaScriptCallFrameCustom.cpp:
      (WebCore::JSJavaScriptCallFrame::evaluate):
      * bindings/js/JSMessageChannelConstructor.cpp:
      (WebCore::JSMessageChannelConstructor::construct):
      * bindings/js/JSMessagePortCustom.cpp:
      (WebCore::fillMessagePortArray):
      * bindings/js/JSOptionConstructor.cpp:
      (WebCore::constructHTMLOptionElement):
      * bindings/js/JSSVGMatrixCustom.cpp:
      (WebCore::JSSVGMatrix::multiply):
      * bindings/js/JSSharedWorkerConstructor.cpp:
      (WebCore::constructSharedWorker):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::JSWebGLRenderingContext::bufferData):
      (WebCore::JSWebGLRenderingContext::bufferSubData):
      (WebCore::getObjectParameter):
      (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
      (WebCore::JSWebGLRenderingContext::getParameter):
      (WebCore::JSWebGLRenderingContext::getProgramParameter):
      (WebCore::JSWebGLRenderingContext::getShaderParameter):
      (WebCore::JSWebGLRenderingContext::getUniform):
      (WebCore::JSWebGLRenderingContext::texImage2D):
      (WebCore::JSWebGLRenderingContext::texSubImage2D):
      (WebCore::dataFunctionf):
      (WebCore::dataFunctioni):
      (WebCore::dataFunctionMatrix):
      * bindings/js/JSWebSocketConstructor.cpp:
      (WebCore::constructWebSocket):
      * bindings/js/JSWebSocketCustom.cpp:
      (WebCore::JSWebSocket::send):
      * bindings/js/JSWorkerConstructor.cpp:
      (WebCore::constructWorker):
      * bindings/js/JSXMLHttpRequestConstructor.cpp:
      (WebCore::constructXMLHttpRequest):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::open):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::BaseWalker::throwStackOverflow):
      (WebCore::BaseWalker::throwInterruptedException):
      (WebCore::SerializingTreeWalker::startArray):
      (WebCore::SerializingTreeWalker::startObject):
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::setException):
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
      (JSC::Bindings::CInstance::invokeMethod):
      (JSC::Bindings::CInstance::invokeDefaultMethod):
      (JSC::Bindings::CInstance::invokeConstruct):
      * bridge/jni/jsc/JNIBridgeJSC.cpp:
      (JavaField::dispatchValueFromInstance):
      (JavaField::dispatchSetValueToInstance):
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaInstance::invokeMethod):
      * bridge/objc/objc_instance.mm:
      (ObjcInstance::moveGlobalExceptionToExecState):
      (ObjcInstance::invokeMethod):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcField::valueFromInstance):
      (JSC::Bindings::ObjcField::setValueToInstance):
      (JSC::Bindings::ObjcArray::setValueAt):
      (JSC::Bindings::ObjcArray::valueAt):
      (JSC::Bindings::callObjCFallbackObject):
      * bridge/objc/objc_utility.h:
      * bridge/objc/objc_utility.mm:
      (JSC::Bindings::throwError):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::put):
      * bridge/runtime_method.cpp:
      (JSC::callRuntimeMethod):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::throwInvalidAccessError):
      
      WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyInstance::invokeMethod):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c099f96
  31. 03 Jun, 2010 1 commit
    • barraclough@apple.com's avatar
      Bug 40094 - The return type of NativeFunction should be EncodedJSValue · 99ff3435
      barraclough@apple.com authored
      On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
      
      Reviewed by Oliver Hunt.
      
      JavaScriptCore: 
      
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::call):
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::call):
      * JavaScriptCore.exp:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::executeCall):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * jit/JITStubs.h:
      * jsc.cpp:
      (functionPrint):
      (functionDebug):
      (functionGC):
      (functionVersion):
      (functionRun):
      (functionLoad):
      (functionCheckSyntax):
      (functionSetSamplingFlags):
      (functionClearSamplingFlags):
      (functionReadline):
      (functionQuit):
      * runtime/ArrayConstructor.cpp:
      (JSC::callArrayConstructor):
      (JSC::arrayConstructorIsArray):
      * 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::arrayProtoFuncReduce):
      (JSC::arrayProtoFuncReduceRight):
      (JSC::arrayProtoFuncIndexOf):
      (JSC::arrayProtoFuncLastIndexOf):
      * runtime/BooleanConstructor.cpp:
      (JSC::callBooleanConstructor):
      * runtime/BooleanPrototype.cpp:
      (JSC::booleanProtoFuncToString):
      (JSC::booleanProtoFuncValueOf):
      * runtime/CallData.h:
      * runtime/DateConstructor.cpp:
      (JSC::callDate):
      (JSC::dateParse):
      (JSC::dateNow):
      (JSC::dateUTC):
      * runtime/DatePrototype.cpp:
      (JSC::dateProtoFuncToString):
      (JSC::dateProtoFuncToUTCString):
      (JSC::dateProtoFuncToISOString):
      (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::dateProtoFuncSetMilliSeconds):
      (JSC::dateProtoFuncSetUTCMilliseconds):
      (JSC::dateProtoFuncSetSeconds):
      (JSC::dateProtoFuncSetUTCSeconds):
      (JSC::dateProtoFuncSetMinutes):
      (JSC::dateProtoFuncSetUTCMinutes):
      (JSC::dateProtoFuncSetHours):
      (JSC::dateProtoFuncSetUTCHours):
      (JSC::dateProtoFuncSetDate):
      (JSC::dateProtoFuncSetUTCDate):
      (JSC::dateProtoFuncSetMonth):
      (JSC::dateProtoFuncSetUTCMonth):
      (JSC::dateProtoFuncSetFullYear):
      (JSC::dateProtoFuncSetUTCFullYear):
      (JSC::dateProtoFuncSetYear):
      (JSC::dateProtoFuncGetYear):
      (JSC::dateProtoFuncToJSON):
      * runtime/ErrorConstructor.cpp:
      (JSC::callErrorConstructor):
      * runtime/ErrorPrototype.cpp:
      (JSC::errorProtoFuncToString):
      * runtime/FunctionConstructor.cpp:
      (JSC::callFunctionConstructor):
      * runtime/FunctionPrototype.cpp:
      (JSC::callFunctionPrototype):
      (JSC::functionProtoFuncToString):
      (JSC::functionProtoFuncApply):
      (JSC::functionProtoFuncCall):
      * runtime/JSCell.h:
      (JSC::getCallData):
      (JSC::getConstructData):
      * runtime/JSFunction.cpp:
      (JSC::callHostFunctionAsConstructor):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::globalFuncEval):
      (JSC::globalFuncParseInt):
      (JSC::globalFuncParseFloat):
      (JSC::globalFuncIsNaN):
      (JSC::globalFuncIsFinite):
      (JSC::globalFuncDecodeURI):
      (JSC::globalFuncDecodeURIComponent):
      (JSC::globalFuncEncodeURI):
      (JSC::globalFuncEncodeURIComponent):
      (JSC::globalFuncEscape):
      (JSC::globalFuncUnescape):
      (JSC::globalFuncJSCPrint):
      * runtime/JSGlobalObjectFunctions.h:
      * runtime/JSONObject.cpp:
      (JSC::JSONProtoFuncParse):
      (JSC::JSONProtoFuncStringify):
      * runtime/JSObject.cpp:
      (JSC::callDefaultValueFunction):
      * runtime/JSValue.h:
      * 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::mathProtoFuncRandom):
      (JSC::mathProtoFuncRound):
      (JSC::mathProtoFuncSin):
      (JSC::mathProtoFuncSqrt):
      (JSC::mathProtoFuncTan):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::callNativeErrorConstructor):
      * runtime/NumberConstructor.cpp:
      (JSC::callNumberConstructor):
      * runtime/NumberPrototype.cpp:
      (JSC::numberProtoFuncToString):
      (JSC::numberProtoFuncToLocaleString):
      (JSC::numberProtoFuncValueOf):
      (JSC::numberProtoFuncToFixed):
      (JSC::numberProtoFuncToExponential):
      (JSC::numberProtoFuncToPrecision):
      * runtime/ObjectConstructor.cpp:
      (JSC::callObjectConstructor):
      (JSC::objectConstructorGetPrototypeOf):
      (JSC::objectConstructorGetOwnPropertyDescriptor):
      (JSC::objectConstructorGetOwnPropertyNames):
      (JSC::objectConstructorKeys):
      (JSC::toPropertyDescriptor):
      (JSC::objectConstructorDefineProperty):
      (JSC::objectConstructorDefineProperties):
      (JSC::objectConstructorCreate):
      * runtime/ObjectPrototype.cpp:
      (JSC::objectProtoFuncValueOf):
      (JSC::objectProtoFuncHasOwnProperty):
      (JSC::objectProtoFuncIsPrototypeOf):
      (JSC::objectProtoFuncDefineGetter):
      (JSC::objectProtoFuncDefineSetter):
      (JSC::objectProtoFuncLookupGetter):
      (JSC::objectProtoFuncLookupSetter):
      (JSC::objectProtoFuncPropertyIsEnumerable):
      (JSC::objectProtoFuncToLocaleString):
      (JSC::objectProtoFuncToString):
      * runtime/ObjectPrototype.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::callRegExpConstructor):
      * runtime/RegExpObject.cpp:
      (JSC::callRegExpObject):
      * runtime/RegExpPrototype.cpp:
      (JSC::regExpProtoFuncTest):
      (JSC::regExpProtoFuncExec):
      (JSC::regExpProtoFuncCompile):
      (JSC::regExpProtoFuncToString):
      * runtime/StringConstructor.cpp:
      (JSC::stringFromCharCode):
      (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):
      (JSC::stringProtoFuncTrim):
      (JSC::stringProtoFuncTrimLeft):
      (JSC::stringProtoFuncTrimRight):
      
      JavaScriptGlue: 
      
      * JSObject.cpp:
      (nativeCallFunction):
      
      WebCore: 
      
      * bindings/js/JSCallbackData.cpp:
      (WebCore::JSCallbackData::invokeCallback):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      (WebCore::callHTMLAllCollection):
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::callHTMLCollection):
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::JSHTMLDocument::open):
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::InjectedScriptHost::createInjectedScript):
      * bindings/js/JSNodeFilterCondition.cpp:
      (WebCore::JSNodeFilterCondition::acceptNode):
      * bindings/js/JSNodeListCustom.cpp:
      (WebCore::callNodeList):
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::callPlugin):
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::create):
      (WebCore::ScheduledAction::executeFunctionInContext):
      * bindings/js/ScriptFunctionCall.cpp:
      (WebCore::ScriptFunctionCall::call):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::SerializingTreeWalker::convertIfTerminal):
      * bindings/objc/WebScriptObject.mm:
      (-[WebScriptObject callWebScriptMethod:withArguments:]):
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/NP_jsobject.cpp:
      (_NPN_InvokeDefault):
      (_NPN_Invoke):
      (_NPN_Construct):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::call):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::callObjCFallbackObject):
      * bridge/runtime_method.cpp:
      (JSC::callRuntimeMethod):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::callRuntimeObject):
      
      WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.h:
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::invoke):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      99ff3435
  32. 29 May, 2010 1 commit
    • ggaren@apple.com's avatar
      JavaScriptCore: Simplified the host calling convention. · fea29f1e
      ggaren@apple.com authored
              
      Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
      
      22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host
      function calls.
              
      No change on SunSpider.
              
      All JS calls (but not constructs, yet) now go through the normal JS
      calling convention via the RegisterFile. As a result, the host calling
      convention, which used to be this
      
          JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&)
                  
      is now this
      
          JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*)
                  
      Callee, 'this', and argument access all hapen relative to the ExecState*,
      which is a pointer into the RegisterFile.
              
      This patch comes in two parts.
              
      PART ONE: Functional code changes.
              
      * wtf/Platform.h: Disabled optimized calls on platforms I didn't test.
      We can re-enable once we verify that host calls on these platforms are
      correct.
      
      * debugger/DebuggerCallFrame.cpp:
      (JSC::DebuggerCallFrame::functionName):
      (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to
      ExecState::callee().
      
      (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue().
      
      * interpreter/CallFrame.cpp:
      * interpreter/CallFrame.h:
      (JSC::ExecState::callee):
      (JSC::ExecState::scopeChain):
      (JSC::ExecState::init): Changed callee() to be JSObject* instead of
      JSFunction* -- now, it might be some other callable host object.
      
      (JSC::ExecState::hostThisRegister):
      (JSC::ExecState::hostThisValue):
      (JSC::ExecState::argumentCount):
      (JSC::ExecState::argumentCountIncludingThis):
      (JSC::ExecState::argument):
      (JSC::ExecState::setArgumentCountIncludingThis):
      (JSC::ExecState::setCallee): Added convenient accessors for arguments
      from within a host function. Removed thisValue() because it was too
      tempting to use incorrectly, and it only had one or two clients, anyway.
      
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue().
      
      (JSC::Interpreter::throwException): Be sure to shrink the register file
      before invoking the exception handler, to reduce the chances that the
      handler will re-throw in the case of stack overflow. (Re-throwing is now
      more likely than it used to be, since standardizing the calling convention
      implicitly added stack overflow checks to some places where they used to be missing.)
      
      (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope.
      Updated for CallFrame::init API change.
      
      (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope.
      Updated for CallFrame::init API change. Added support for calling a host
      function.
      
      (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope.
      Updated for CallFrame::init API change. 
      
      (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change. 
      
      (JSC::Interpreter::privateExecute): Updated for CallFrame::init API change.
      Added some explicit JSValue(JSObject*) initialization, since relaxing
      the JSFunction* restriction on callee has made register types more ambiguous.
      Removed toThisObject() conversion, since all callees do it themselves now.
      Updated host function call for new host function signature. Updated for
      change to ExecState::argumentCount() API.
      
      * interpreter/Register.h:
      (JSC::Register::):
      (JSC::Register::operator=):
      (JSC::Register::function): Changed callee() to be JSObject* instead of
      JSFunction* -- now, it might be some other callable host object.
      
      * jit/JITOpcodes.cpp:
      (JSC::JIT::privateCompileCTINativeCall):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that
      set up the arguments to host functions -- all but one of the arguments
      are gone now. This is the actual optimization.
      
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API
      changes noted above. Removed toThisObject() conversion, since all callees
      do it themselves now.
              
      * runtime/ArgList.h:
      (JSC::ArgList::ArgList): ArgList is getting close to unused. Added a
      temporary shim for converting from ExecState* to ArgList where it's still
      necessary.
      
      * runtime/Arguments.h:
      (JSC::Arguments::getArgumentsData):
      (JSC::Arguments::Arguments): Updated for ExecState and Register API
      changes noted above. 
      
      * runtime/CallData.cpp:
      (JSC::call): Changed call always to call Interpreter::executeCall, even
      for host functions. This ensures that the normal calling convention is
      set up in the RegsiterFile when calling from C++ to host function.
      
      * runtime/CallData.h: Changed host function signature as described above.
      
      * runtime/ConstructData.cpp:
      (JSC::construct): Moved JSFunction::construct code here so I could nix
      JSFunction::call and JSFunction::call. We want a JSFunction-agnostic
      way to call and construct, so that everything works naturally for non-
      JSFunction objects. 
      
      * runtime/JSFunction.cpp:
      (JSC::callHostFunctionAsConstructor):
      * runtime/JSFunction.h: Updated for ExecState and Register API changes
      noted above. Nixed JSFunction::call and JSFunction::construct, noted above.
       
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::init): Ditto.
      
      PART TWO: Global search and replace.
              
      In the areas below, I used global search-and-replace to change
          (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
          args.size() => exec->argumentCount()
          args.at(i) => exec->argument(i)
      
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::call):
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::call):
      * JavaScriptCore.exp:
      * jsc.cpp:
      (functionPrint):
      (functionDebug):
      (functionGC):
      (functionVersion):
      (functionRun):
      (functionLoad):
      (functionCheckSyntax):
      (functionSetSamplingFlags):
      (functionClearSamplingFlags):
      (functionReadline):
      (functionQuit):
      * runtime/ArrayConstructor.cpp:
      (JSC::callArrayConstructor):
      (JSC::arrayConstructorIsArray):
      * 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::arrayProtoFuncReduce):
      (JSC::arrayProtoFuncReduceRight):
      (JSC::arrayProtoFuncIndexOf):
      (JSC::arrayProtoFuncLastIndexOf):
      * runtime/BooleanConstructor.cpp:
      (JSC::callBooleanConstructor):
      * runtime/BooleanPrototype.cpp:
      (JSC::booleanProtoFuncToString):
      (JSC::booleanProtoFuncValueOf):
      * runtime/DateConstructor.cpp:
      (JSC::callDate):
      (JSC::dateParse):
      (JSC::dateNow):
      (JSC::dateUTC):
      * runtime/DatePrototype.cpp:
      (JSC::formatLocaleDate):
      (JSC::fillStructuresUsingTimeArgs):
      (JSC::fillStructuresUsingDateArgs):
      (JSC::dateProtoFuncToString):
      (JSC::dateProtoFuncToUTCString):
      (JSC::dateProtoFuncToISOString):
      (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::dateProtoFuncSetMilliSeconds):
      (JSC::dateProtoFuncSetUTCMilliseconds):
      (JSC::dateProtoFuncSetSeconds):
      (JSC::dateProtoFuncSetUTCSeconds):
      (JSC::dateProtoFuncSetMinutes):
      (JSC::dateProtoFuncSetUTCMinutes):
      (JSC::dateProtoFuncSetHours):
      (JSC::dateProtoFuncSetUTCHours):
      (JSC::dateProtoFuncSetDate):
      (JSC::dateProtoFuncSetUTCDate):
      (JSC::dateProtoFuncSetMonth):
      (JSC::dateProtoFuncSetUTCMonth):
      (JSC::dateProtoFuncSetFullYear):
      (JSC::dateProtoFuncSetUTCFullYear):
      (JSC::dateProtoFuncSetYear):
      (JSC::dateProtoFuncGetYear):
      (JSC::dateProtoFuncToJSON):
      * runtime/ErrorConstructor.cpp:
      (JSC::callErrorConstructor):
      * runtime/ErrorPrototype.cpp:
      (JSC::errorProtoFuncToString):
      * runtime/FunctionConstructor.cpp:
      (JSC::callFunctionConstructor):
      * runtime/FunctionPrototype.cpp:
      (JSC::callFunctionPrototype):
      (JSC::functionProtoFuncToString):
      (JSC::functionProtoFuncApply):
      (JSC::functionProtoFuncCall):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::encode):
      (JSC::decode):
      (JSC::globalFuncEval):
      (JSC::globalFuncParseInt):
      (JSC::globalFuncParseFloat):
      (JSC::globalFuncIsNaN):
      (JSC::globalFuncIsFinite):
      (JSC::globalFuncDecodeURI):
      (JSC::globalFuncDecodeURIComponent):
      (JSC::globalFuncEncodeURI):
      (JSC::globalFuncEncodeURIComponent):
      (JSC::globalFuncEscape):
      (JSC::globalFuncUnescape):
      (JSC::globalFuncJSCPrint):
      * runtime/JSGlobalObjectFunctions.h:
      * runtime/JSONObject.cpp:
      (JSC::JSONProtoFuncParse):
      (JSC::JSONProtoFuncStringify):
      * runtime/JSString.h:
      * 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::mathProtoFuncRandom):
      (JSC::mathProtoFuncRound):
      (JSC::mathProtoFuncSin):
      (JSC::mathProtoFuncSqrt):
      (JSC::mathProtoFuncTan):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::callNativeErrorConstructor):
      * runtime/NumberConstructor.cpp:
      (JSC::callNumberConstructor):
      * runtime/NumberPrototype.cpp:
      (JSC::numberProtoFuncToString):
      (JSC::numberProtoFuncToLocaleString):
      (JSC::numberProtoFuncValueOf):
      (JSC::numberProtoFuncToFixed):
      (JSC::numberProtoFuncToExponential):
      (JSC::numberProtoFuncToPrecision):
      * runtime/ObjectConstructor.cpp:
      (JSC::callObjectConstructor):
      (JSC::objectConstructorGetPrototypeOf):
      (JSC::objectConstructorGetOwnPropertyDescriptor):
      (JSC::objectConstructorGetOwnPropertyNames):
      (JSC::objectConstructorKeys):
      (JSC::objectConstructorDefineProperty):
      (JSC::objectConstructorDefineProperties):
      (JSC::objectConstructorCreate):
      * runtime/ObjectPrototype.cpp:
      (JSC::objectProtoFuncValueOf):
      (JSC::objectProtoFuncHasOwnProperty):
      (JSC::objectProtoFuncIsPrototypeOf):
      (JSC::objectProtoFuncDefineGetter):
      (JSC::objectProtoFuncDefineSetter):
      (JSC::objectProtoFuncLookupGetter):
      (JSC::objectProtoFuncLookupSetter):
      (JSC::objectProtoFuncPropertyIsEnumerable):
      (JSC::objectProtoFuncToLocaleString):
      (JSC::objectProtoFuncToString):
      * runtime/ObjectPrototype.h:
      * runtime/Operations.h:
      (JSC::jsString):
      * runtime/RegExpConstructor.cpp:
      (JSC::callRegExpConstructor):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::test):
      (JSC::RegExpObject::exec):
      (JSC::callRegExpObject):
      (JSC::RegExpObject::match):
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      (JSC::regExpProtoFuncTest):
      (JSC::regExpProtoFuncExec):
      (JSC::regExpProtoFuncCompile):
      (JSC::regExpProtoFuncToString):
      * runtime/StringConstructor.cpp:
      (JSC::stringFromCharCodeSlowCase):
      (JSC::stringFromCharCode):
      (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):
      (JSC::stringProtoFuncTrim):
      (JSC::stringProtoFuncTrimLeft):
      (JSC::stringProtoFuncTrimRight):
      
      JavaScriptGlue: Simplified the host calling convention.
      
      Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
      
      PART ONE: Functional code changes.
              
      [ None in JavaScriptGlue ]
              
      PART TWO: Global search and replace.
              
      In the areas below, I used global search-and-replace to change
          (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
          args.size() => exec->argumentCount()
          args.at(i) => exec->argument(i)
      
      * JSObject.cpp:
      (nativeCallFunction):
      * UserObjectImp.cpp:
      (UserObjectImp::callAsFunction):
      * UserObjectImp.h:
      
      WebCore: Simplified the host calling convention.
      
      Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
      
      PART ONE: Functional code changes.
              
      [ None in WebCore ]
              
      PART TWO: Global search and replace.
              
      In the areas below, I used global search-and-replace to change
          (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
          args.size() => exec->argumentCount()
          args.at(i) => exec->argument(i)
      
      * bindings/js/JSArrayBufferViewCustom.cpp:
      (WebCore::JSArrayBufferView::slice):
      * bindings/js/JSArrayBufferViewHelper.h:
      (WebCore::setWebGLArrayHelper):
      * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
      (WebCore::JSCanvasRenderingContext2D::setFillColor):
      (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
      (WebCore::JSCanvasRenderingContext2D::strokeRect):
      (WebCore::JSCanvasRenderingContext2D::drawImage):
      (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
      (WebCore::JSCanvasRenderingContext2D::setShadow):
      (WebCore::JSCanvasRenderingContext2D::createPattern):
      (WebCore::JSCanvasRenderingContext2D::createImageData):
      (WebCore::JSCanvasRenderingContext2D::putImageData):
      (WebCore::JSCanvasRenderingContext2D::fillText):
      (WebCore::JSCanvasRenderingContext2D::strokeText):
      * bindings/js/JSClipboardCustom.cpp:
      (WebCore::JSClipboard::clearData):
      (WebCore::JSClipboard::getData):
      (WebCore::JSClipboard::setDragImage):
      * bindings/js/JSDOMApplicationCacheCustom.cpp:
      (WebCore::JSDOMApplicationCache::hasItem):
      (WebCore::JSDOMApplicationCache::add):
      (WebCore::JSDOMApplicationCache::remove):
      * bindings/js/JSDOMFormDataCustom.cpp:
      (WebCore::JSDOMFormData::append):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::open):
      (WebCore::JSDOMWindow::showModalDialog):
      (WebCore::JSDOMWindow::postMessage):
      (WebCore::JSDOMWindow::setTimeout):
      (WebCore::JSDOMWindow::setInterval):
      (WebCore::JSDOMWindow::addEventListener):
      (WebCore::JSDOMWindow::removeEventListener):
      (WebCore::JSDOMWindow::openDatabase):
      * bindings/js/JSDatabaseCustom.cpp:
      (WebCore::JSDatabase::changeVersion):
      (WebCore::createTransaction):
      (WebCore::JSDatabase::transaction):
      (WebCore::JSDatabase::readTransaction):
      * bindings/js/JSDatabaseSyncCustom.cpp:
      (WebCore::JSDatabaseSync::changeVersion):
      (WebCore::createTransaction):
      (WebCore::JSDatabaseSync::transaction):
      (WebCore::JSDatabaseSync::readTransaction):
      * bindings/js/JSDedicatedWorkerContextCustom.cpp:
      (WebCore::JSDedicatedWorkerContext::postMessage):
      * bindings/js/JSDesktopNotificationsCustom.cpp:
      (WebCore::JSNotificationCenter::requestPermission):
      * bindings/js/JSFloatArrayCustom.cpp:
      (WebCore::JSFloatArray::set):
      * bindings/js/JSGeolocationCustom.cpp:
      (WebCore::JSGeolocation::getCurrentPosition):
      (WebCore::JSGeolocation::watchPosition):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      (WebCore::callHTMLAllCollection):
      (WebCore::JSHTMLAllCollection::item):
      (WebCore::JSHTMLAllCollection::namedItem):
      * bindings/js/JSHTMLCanvasElementCustom.cpp:
      (WebCore::JSHTMLCanvasElement::getContext):
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::callHTMLCollection):
      (WebCore::JSHTMLCollection::item):
      (WebCore::JSHTMLCollection::namedItem):
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::JSHTMLDocument::open):
      (WebCore::documentWrite):
      (WebCore::JSHTMLDocument::write):
      (WebCore::JSHTMLDocument::writeln):
      * bindings/js/JSHTMLInputElementCustom.cpp:
      (WebCore::JSHTMLInputElement::setSelectionRange):
      * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
      (WebCore::JSHTMLOptionsCollection::add):
      (WebCore::JSHTMLOptionsCollection::remove):
      * bindings/js/JSHTMLSelectElementCustom.cpp:
      (WebCore::JSHTMLSelectElement::remove):
      * bindings/js/JSHistoryCustom.cpp:
      (WebCore::JSHistory::pushState):
      (WebCore::JSHistory::replaceState):
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::JSInjectedScriptHost::databaseForId):
      (WebCore::JSInjectedScriptHost::currentCallFrame):
      (WebCore::JSInjectedScriptHost::nodeForId):
      (WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
      (WebCore::JSInjectedScriptHost::selectDatabase):
      (WebCore::JSInjectedScriptHost::selectDOMStorage):
      (WebCore::JSInjectedScriptHost::reportDidDispatchOnInjectedScript):
      * bindings/js/JSInspectorFrontendHostCustom.cpp:
      (WebCore::JSInspectorFrontendHost::platform):
      (WebCore::JSInspectorFrontendHost::port):
      (WebCore::JSInspectorFrontendHost::showContextMenu):
      * bindings/js/JSInt16ArrayCustom.cpp:
      (WebCore::JSInt16Array::set):
      * bindings/js/JSInt32ArrayCustom.cpp:
      (WebCore::JSInt32Array::set):
      * bindings/js/JSInt8ArrayCustom.cpp:
      (WebCore::JSInt8Array::set):
      * bindings/js/JSJavaScriptCallFrameCustom.cpp:
      (WebCore::JSJavaScriptCallFrame::evaluate):
      (WebCore::JSJavaScriptCallFrame::scopeType):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::replace):
      (WebCore::JSLocation::reload):
      (WebCore::JSLocation::assign):
      (WebCore::JSLocation::toString):
      * bindings/js/JSMessageEventCustom.cpp:
      (WebCore::JSMessageEvent::initMessageEvent):
      * bindings/js/JSMessagePortCustom.cpp:
      (WebCore::JSMessagePort::postMessage):
      * bindings/js/JSMessagePortCustom.h:
      (WebCore::handlePostMessage):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::insertBefore):
      (WebCore::JSNode::replaceChild):
      (WebCore::JSNode::removeChild):
      (WebCore::JSNode::appendChild):
      * bindings/js/JSNodeListCustom.cpp:
      (WebCore::callNodeList):
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::callPlugin):
      * bindings/js/JSSQLResultSetRowListCustom.cpp:
      (WebCore::JSSQLResultSetRowList::item):
      * bindings/js/JSSQLTransactionCustom.cpp:
      (WebCore::JSSQLTransaction::executeSql):
      * bindings/js/JSSQLTransactionSyncCustom.cpp:
      (WebCore::JSSQLTransactionSync::executeSql):
      * bindings/js/JSSVGLengthCustom.cpp:
      (WebCore::JSSVGLength::convertToSpecifiedUnits):
      * bindings/js/JSSVGMatrixCustom.cpp:
      (WebCore::JSSVGMatrix::multiply):
      (WebCore::JSSVGMatrix::inverse):
      (WebCore::JSSVGMatrix::rotateFromVector):
      * bindings/js/JSSVGPODListCustom.h:
      (WebCore::JSSVGPODListCustom::clear):
      (WebCore::JSSVGPODListCustom::initialize):
      (WebCore::JSSVGPODListCustom::getItem):
      (WebCore::JSSVGPODListCustom::insertItemBefore):
      (WebCore::JSSVGPODListCustom::replaceItem):
      (WebCore::JSSVGPODListCustom::removeItem):
      (WebCore::JSSVGPODListCustom::appendItem):
      * bindings/js/JSSVGPathSegListCustom.cpp:
      (WebCore::JSSVGPathSegList::clear):
      (WebCore::JSSVGPathSegList::initialize):
      (WebCore::JSSVGPathSegList::getItem):
      (WebCore::JSSVGPathSegList::insertItemBefore):
      (WebCore::JSSVGPathSegList::replaceItem):
      (WebCore::JSSVGPathSegList::removeItem):
      (WebCore::JSSVGPathSegList::appendItem):
      * bindings/js/JSUint16ArrayCustom.cpp:
      (WebCore::JSUint16Array::set):
      * bindings/js/JSUint32ArrayCustom.cpp:
      (WebCore::JSUint32Array::set):
      * bindings/js/JSUint8ArrayCustom.cpp:
      (WebCore::JSUint8Array::set):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::JSWebGLRenderingContext::bufferData):
      (WebCore::JSWebGLRenderingContext::bufferSubData):
      (WebCore::getObjectParameter):
      (WebCore::JSWebGLRenderingContext::getBufferParameter):
      (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
      (WebCore::JSWebGLRenderingContext::getParameter):
      (WebCore::JSWebGLRenderingContext::getProgramParameter):
      (WebCore::JSWebGLRenderingContext::getRenderbufferParameter):
      (WebCore::JSWebGLRenderingContext::getShaderParameter):
      (WebCore::JSWebGLRenderingContext::getTexParameter):
      (WebCore::JSWebGLRenderingContext::getUniform):
      (WebCore::JSWebGLRenderingContext::getVertexAttrib):
      (WebCore::JSWebGLRenderingContext::texImage2D):
      (WebCore::JSWebGLRenderingContext::texSubImage2D):
      (WebCore::dataFunctionf):
      (WebCore::dataFunctioni):
      (WebCore::dataFunctionMatrix):
      (WebCore::JSWebGLRenderingContext::uniform1fv):
      (WebCore::JSWebGLRenderingContext::uniform1iv):
      (WebCore::JSWebGLRenderingContext::uniform2fv):
      (WebCore::JSWebGLRenderingContext::uniform2iv):
      (WebCore::JSWebGLRenderingContext::uniform3fv):
      (WebCore::JSWebGLRenderingContext::uniform3iv):
      (WebCore::JSWebGLRenderingContext::uniform4fv):
      (WebCore::JSWebGLRenderingContext::uniform4iv):
      (WebCore::JSWebGLRenderingContext::uniformMatrix2fv):
      (WebCore::JSWebGLRenderingContext::uniformMatrix3fv):
      (WebCore::JSWebGLRenderingContext::uniformMatrix4fv):
      (WebCore::JSWebGLRenderingContext::vertexAttrib1fv):
      (WebCore::JSWebGLRenderingContext::vertexAttrib2fv):
      (WebCore::JSWebGLRenderingContext::vertexAttrib3fv):
      (WebCore::JSWebGLRenderingContext::vertexAttrib4fv):
      * bindings/js/JSWebSocketCustom.cpp:
      (WebCore::JSWebSocket::send):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::importScripts):
      (WebCore::JSWorkerContext::setTimeout):
      (WebCore::JSWorkerContext::setInterval):
      (WebCore::JSWorkerContext::openDatabase):
      (WebCore::JSWorkerContext::openDatabaseSync):
      * bindings/js/JSWorkerCustom.cpp:
      (WebCore::JSWorker::postMessage):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::open):
      (WebCore::JSXMLHttpRequest::send):
      * 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::create):
      (WebCore::ScheduledAction::ScheduledAction):
      * bindings/js/ScheduledAction.h:
      * bindings/js/ScriptCallFrame.cpp:
      (WebCore::ScriptCallFrame::ScriptCallFrame):
      * bindings/js/ScriptCallFrame.h:
      * bindings/js/ScriptCallStack.cpp:
      (WebCore::ScriptCallStack::ScriptCallStack):
      (WebCore::ScriptCallStack::initialize):
      * bindings/js/ScriptCallStack.h:
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CInstance::invokeMethod):
      (JSC::Bindings::CInstance::invokeDefaultMethod):
      * bridge/c/c_instance.h:
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaInstance::invokeMethod):
      * bridge/jni/jsc/JavaInstanceJSC.h:
      * bridge/jsc/BridgeJSC.h:
      (JSC::Bindings::Instance::invokeDefaultMethod):
      * bridge/objc/objc_instance.h:
      * bridge/objc/objc_instance.mm:
      (ObjcInstance::invokeMethod):
      (ObjcInstance::invokeObjcMethod):
      (ObjcInstance::invokeDefaultMethod):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::callObjCFallbackObject):
      * bridge/runtime_method.cpp:
      (JSC::callRuntimeMethod):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::callRuntimeObject):
      
      WebKit/mac: Simplified the host calling convention.
      
      Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
      
      PART ONE: Functional code changes.
              
      [ None in WebKit ]
              
      PART TWO: Global search and replace.
              
      In the areas below, I used global search-and-replace to change
          (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
          args.size() => exec->argumentCount()
          args.at(i) => exec->argument(i)
      
      * Plugins/Hosted/ProxyInstance.h:
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyInstance::invoke):
      (WebKit::ProxyInstance::invokeMethod):
      (WebKit::ProxyInstance::invokeDefaultMethod):
      
      LayoutTests: Simplified the host calling convention.
      
      Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
      
      Changed these results to expect to fail to stringify their exception
      objects in the case of stack overflow. (Standardizing the calling
      convention has implicitly added stack overflow checks to some places
      where they used to be missing.)
              
      In a future patch, I plan to implement a more reliable way to stringify
      exceptions without invoking a JS function. For now, though, it seems best
      to match other test results, instead of silently overflowing the stack.
      
      * fast/js/global-recursion-on-full-stack-expected.txt:
      * fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fea29f1e
  33. 21 May, 2010 1 commit
    • oliver@apple.com's avatar
      2010-05-21 Oliver Hunt <oliver@apple.com> · 5dea615d
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              All callable objects should have a global object reference
              https://bugs.webkit.org/show_bug.cgi?id=39495
      
              All objects that may ever return a value other CallTypeNone
              or ConstructTypeNone now get a global object in their constructor
              and store that in their first anonymous slot.  We add a new type
              JSObjectWithGlobalObject to allow us to share this logic as much
              as possible, however some objects have specific inheritance
              requirements so we can't just use it universally.
      
              To enforce this requirement JSValue::getCallData and getConstructData
              make use of a new "isValidCallee" function to assert that any object
              that returns a value other than CallType/ConstructTypeNone has a
              global object in anonymous slot 0.
      
              In order to ensure that static function slots are converted into
              function objects with the correct global object, all prototype objects
              and other classes with static function slots also gain a global object
              reference.  Happily this fixes the long standing issue where host
              function objects get a prototype from the lexical global object of the
              first function that calls them, instead of the global object that they
              are defined on.
      
              * API/JSCallbackConstructor.cpp:
              (JSC::JSCallbackConstructor::JSCallbackConstructor):
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              (JSC::JSCallbackFunction::JSCallbackFunction):
              * API/JSCallbackFunction.h:
              * API/JSCallbackObject.cpp:
              (JSC::):
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              (JSC::::JSCallbackObject):
              (JSC::::staticFunctionGetter):
              * API/JSClassRef.cpp:
              (OpaqueJSClass::prototype):
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              (JSObjectMake):
              (JSObjectMakeFunctionWithCallback):
              (JSObjectMakeConstructor):
              (JSObjectGetPrivate):
              (JSObjectSetPrivate):
              (JSObjectGetPrivateProperty):
              (JSObjectSetPrivateProperty):
              (JSObjectDeletePrivateProperty):
              * API/JSValueRef.cpp:
              (JSValueIsObjectOfClass):
              * API/JSWeakObjectMapRefPrivate.cpp:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * JavaScriptCore.exp:
              * JavaScriptCore.gypi:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::privateExecute):
              * jit/JITStubs.cpp:
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              * runtime/ArrayConstructor.h:
              * runtime/ArrayPrototype.cpp:
              (JSC::ArrayPrototype::ArrayPrototype):
              * runtime/ArrayPrototype.h:
              (JSC::ArrayPrototype::createStructure):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              * runtime/BooleanConstructor.h:
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/BooleanPrototype.h:
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateConstructor.h:
              * runtime/DatePrototype.cpp:
              (JSC::DatePrototype::DatePrototype):
              * runtime/DatePrototype.h:
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorConstructor.h:
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/ErrorPrototype.h:
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionConstructor.h:
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              (JSC::FunctionPrototype::addFunctionProperties):
              * runtime/FunctionPrototype.h:
              * runtime/GlobalEvalFunction.cpp:
              (JSC::GlobalEvalFunction::GlobalEvalFunction):
              * runtime/GlobalEvalFunction.h:
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/InternalFunction.h:
              * runtime/JSCell.h:
              (JSC::JSValue::getCallData):
              (JSC::JSValue::getConstructData):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              * runtime/JSFunction.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObject):
              * runtime/JSONObject.cpp:
              (JSC::JSONObject::JSONObject):
              * runtime/JSONObject.h:
              * runtime/JSObject.h:
              * runtime/JSObjectWithGlobalObject.cpp: Added.
              (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
              * runtime/JSObjectWithGlobalObject.h: Added.
              (JSC::JSObjectWithGlobalObject::createStructure):
              (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
              * runtime/JSValue.cpp:
              (JSC::JSValue::isValidCallee):
              * runtime/JSValue.h:
              * runtime/Lookup.cpp:
              (JSC::setUpStaticFunctionSlot):
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/MathObject.h:
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorConstructor.h:
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NativeErrorPrototype.h:
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              * runtime/NumberConstructor.h:
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/NumberPrototype.h:
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              * runtime/ObjectConstructor.h:
              * runtime/ObjectPrototype.cpp:
              (JSC::ObjectPrototype::ObjectPrototype):
              * runtime/ObjectPrototype.h:
              * runtime/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * runtime/PrototypeFunction.h:
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              (JSC::constructRegExp):
              * runtime/RegExpConstructor.h:
              * runtime/RegExpObject.cpp:
              (JSC::RegExpObject::RegExpObject):
              * runtime/RegExpObject.h:
              * runtime/RegExpPrototype.cpp:
              (JSC::RegExpPrototype::RegExpPrototype):
              * runtime/RegExpPrototype.h:
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringConstructor.h:
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/StringPrototype.h:
      2010-05-21  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              All callable objects should have a global object reference
              https://bugs.webkit.org/show_bug.cgi?id=39495
      
              Update expected results as we now give all function objects
              get their prototypes from the correct global object.
      
              * fast/dom/prototype-inheritance-expected.txt:
      2010-05-21  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              All callable objects should have a global object reference
              https://bugs.webkit.org/show_bug.cgi?id=39495
      
              Update the bindings generator to give prototype objects a
              global object.  Update all the manually written JSObject
              subclasses to pass a global object.
      
              * ForwardingHeaders/runtime/JSObjectWithGlobalObject.h: Added.
              * WebCore.PluginHostProcess.exp:
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::objectToStringFunctionGetter):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::nonCachingStaticFunctionGetter):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSHistoryCustom.cpp:
              (WebCore::nonCachingStaticBackFunctionGetter):
              (WebCore::nonCachingStaticForwardFunctionGetter):
              (WebCore::nonCachingStaticGoFunctionGetter):
              * bindings/js/JSLocationCustom.cpp:
              (WebCore::nonCachingStaticReplaceFunctionGetter):
              (WebCore::nonCachingStaticReloadFunctionGetter):
              (WebCore::nonCachingStaticAssignFunctionGetter):
              * bindings/js/WorkerScriptController.cpp:
              (WebCore::WorkerScriptController::initScript):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/c/CRuntimeObject.cpp:
              (JSC::Bindings::CRuntimeObject::CRuntimeObject):
              * bridge/c/CRuntimeObject.h:
              * bridge/c/c_instance.cpp:
              (JSC::Bindings::CInstance::newRuntimeObject):
              (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
              (JSC::Bindings::CInstance::getMethod):
              * bridge/jni/jsc/JavaInstanceJSC.cpp:
              (JavaInstance::newRuntimeObject):
              (JavaRuntimeMethod::JavaRuntimeMethod):
              (JavaInstance::getMethod):
              * bridge/jni/jsc/JavaRuntimeObject.cpp:
              (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
              * bridge/jni/jsc/JavaRuntimeObject.h:
              * bridge/jsc/BridgeJSC.cpp:
              (JSC::Bindings::Instance::newRuntimeObject):
              * bridge/objc/ObjCRuntimeObject.h:
              * bridge/objc/ObjCRuntimeObject.mm:
              (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
              * bridge/objc/objc_class.mm:
              (JSC::Bindings::ObjcClass::fallbackObject):
              * bridge/objc/objc_instance.mm:
              (ObjcInstance::newRuntimeObject):
              (ObjCRuntimeMethod::ObjCRuntimeMethod):
              (ObjcInstance::getMethod):
              * bridge/objc/objc_runtime.h:
              * bridge/objc/objc_runtime.mm:
              (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
              * bridge/runtime_method.cpp:
              (JSC::RuntimeMethod::RuntimeMethod):
              * bridge/runtime_method.h:
              * bridge/runtime_object.cpp:
              (JSC::Bindings::RuntimeObject::RuntimeObject):
              * bridge/runtime_object.h:
      2010-05-21  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              All callable objects should have a global object reference
              https://bugs.webkit.org/show_bug.cgi?id=39495
      
              Update the plugin proxy to handle the need for global object.
      
              * Plugins/Hosted/ProxyInstance.mm:
              (WebKit::ProxyInstance::newRuntimeObject):
              (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
              (WebKit::ProxyInstance::getMethod):
              * Plugins/Hosted/ProxyRuntimeObject.h:
              * Plugins/Hosted/ProxyRuntimeObject.mm:
              (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5dea615d