1. 05 Nov, 2012 1 commit
    • fpizlo@apple.com's avatar
      Reduce the verbosity of referring to QNaN in JavaScriptCore · 3494d02f
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=101174
      
      Reviewed by Geoffrey Garen.
      
      Introduces a #define QNaN in JSValue.h, and replaces all previous uses of
      std::numeric_limits<double>::quiet_NaN() with QNaN.
      
      * API/JSValueRef.cpp:
      (JSValueMakeNumber):
      (JSValueToNumber):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::emitFloatTypedArrayGetByVal):
      * runtime/CachedTranscendentalFunction.h:
      (JSC::CachedTranscendentalFunction::initialize):
      * runtime/DateConstructor.cpp:
      (JSC::constructDate):
      * runtime/DateInstanceCache.h:
      (JSC::DateInstanceData::DateInstanceData):
      (JSC::DateInstanceCache::reset):
      * runtime/ExceptionHelpers.cpp:
      (JSC::InterruptedExecutionError::defaultValue):
      (JSC::TerminatedExecutionError::defaultValue):
      * runtime/JSCell.h:
      (JSC::JSValue::getPrimitiveNumber):
      * runtime/JSDateMath.cpp:
      (JSC::parseDateFromNullTerminatedCharacters):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      (JSC::JSGlobalData::resetDateCache):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::parseInt):
      (JSC::jsStrDecimalLiteral):
      (JSC::toDouble):
      (JSC::jsToNumber):
      (JSC::parseFloat):
      * runtime/JSValue.cpp:
      (JSC::JSValue::toNumberSlowCase):
      * runtime/JSValue.h:
      (JSC):
      * runtime/JSValueInlineMethods.h:
      (JSC::jsNaN):
      * runtime/MathObject.cpp:
      (JSC::mathProtoFuncMax):
      (JSC::mathProtoFuncMin):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3494d02f
  2. 11 Oct, 2012 1 commit
    • ggaren@apple.com's avatar
      Removed ASSERT_CLASS_FITS_IN_CELL · 0aac150b
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97634
      
      Reviewed by Mark Hahnenberg.
      
      Source/JavaScriptCore: 
      
      Our collector now supports arbitrarily sized objects, so the ASSERT is not needed.
      
      * API/JSCallbackFunction.cpp:
      * API/JSCallbackObject.cpp:
      * heap/MarkedSpace.h:
      * jsc.cpp:
      * runtime/Arguments.cpp:
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayPrototype.cpp:
      * runtime/BooleanConstructor.cpp:
      * runtime/BooleanObject.cpp:
      * runtime/BooleanPrototype.cpp:
      * runtime/DateConstructor.cpp:
      * runtime/DatePrototype.cpp:
      * runtime/Error.cpp:
      * runtime/ErrorConstructor.cpp:
      * runtime/ErrorPrototype.cpp:
      * runtime/FunctionConstructor.cpp:
      * runtime/FunctionPrototype.cpp:
      * runtime/InternalFunction.cpp:
      * runtime/JSActivation.cpp:
      * runtime/JSArray.cpp:
      * runtime/JSBoundFunction.cpp:
      * runtime/JSFunction.cpp:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalThis.cpp:
      * runtime/JSNameScope.cpp:
      * runtime/JSNotAnObject.cpp:
      * runtime/JSONObject.cpp:
      * runtime/JSObject.cpp:
      * runtime/JSPropertyNameIterator.cpp:
      * runtime/JSScope.cpp:
      * runtime/JSWithScope.cpp:
      * runtime/JSWrapperObject.cpp:
      * runtime/MathObject.cpp:
      * runtime/NameConstructor.cpp:
      * runtime/NamePrototype.cpp:
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NativeErrorPrototype.cpp:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberObject.cpp:
      * runtime/NumberPrototype.cpp:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectPrototype.cpp:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpMatchesArray.cpp:
      * runtime/RegExpObject.cpp:
      * runtime/RegExpPrototype.cpp:
      * runtime/StringConstructor.cpp:
      * runtime/StringObject.cpp:
      * runtime/StringPrototype.cpp:
      * testRegExp.cpp: Removed the ASSERT.
      
      Source/WebCore: 
      
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore):
      * bindings/js/JSImageConstructor.cpp:
      (WebCore):
      * bindings/js/JSNodeFilterCondition.cpp:
      (WebCore):
      * bindings/js/JSWorkerContextBase.cpp:
      (WebCore):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSFloat64Array.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestEventTarget.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestException.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestNode.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore):
      * bridge/runtime_method.cpp:
      (JSC):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0aac150b
  3. 06 Aug, 2012 1 commit
    • paroga@webkit.org's avatar
      Unify JSC date and time formating functions · f5643b95
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92282
      
      Reviewed by Geoffrey Garen.
      
      Replace the existing functions for formating GregorianDateTime
      with one single function. This removes some code duplications
      in DatePrototype and is a preperation to fix encoding issues,
      since we can add UChar* values to the resulting string now.
      
      * runtime/DateConstructor.cpp:
      (JSC::callDate):
      * runtime/DateConversion.cpp:
      (JSC::formatDateTime):
      * runtime/DateConversion.h:
      (JSC):
      * runtime/DatePrototype.cpp:
      (JSC::formateDateInstance):
      (JSC::dateProtoFuncToString):
      (JSC::dateProtoFuncToUTCString):
      (JSC::dateProtoFuncToDateString):
      (JSC::dateProtoFuncToTimeString):
      (JSC::dateProtoFuncToGMTString):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f5643b95
  4. 24 Jul, 2012 1 commit
    • paroga@webkit.org's avatar
      Store the full year in GregorianDateTime · 683889fe
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92067
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Use the full year instead of the offset from year 1900
      for the year member variable of GregorianDateTime.
      
      * runtime/DateConstructor.cpp:
      (JSC::constructDate):
      (JSC::dateUTC):
      * runtime/DateConversion.cpp:
      (JSC::formatDate):
      (JSC::formatDateUTCVariant):
      * runtime/DatePrototype.cpp:
      (JSC::formatLocaleDate):
      (JSC::fillStructuresUsingDateArgs):
      (JSC::dateProtoFuncToISOString):
      (JSC::dateProtoFuncGetFullYear):
      (JSC::dateProtoFuncGetUTCFullYear):
      (JSC::dateProtoFuncSetYear):
      * runtime/JSDateMath.cpp:
      (JSC::gregorianDateTimeToMS):
      (JSC::msToGregorianDateTime):
      
      Source/WebCore:
      
      Use the full year instead of the offset from year 1900
      for the year member variable of GregorianDateTime.
      
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::convertValueToQVariant):
      (JSC::Bindings::convertQVariantToValue):
      * bridge/qt/qt_runtime_qt4.cpp:
      (JSC::Bindings::convertValueToQVariant):
      (JSC::Bindings::convertQVariantToValue):
      
      Source/WTF:
      
      Use the full year instead of the offset from year 1900
      for the year member variable of GregorianDateTime.
      
      * wtf/GregorianDateTime.h:
      (WTF::GregorianDateTime::operator tm):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      683889fe
  5. 23 Jul, 2012 1 commit
    • paroga@webkit.org's avatar
      Move GregorianDateTime from JSC to WTF namespace · 175d46f1
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91948
      
      Reviewed by Geoffrey Garen.
      
      Moving GregorianDateTime into the WTF namespace allows us to us to
      use it in WebCore too. The new class has the same behaviour as the
      old struct. Only the unused timeZone member has been removed.
      
      Source/JavaScriptCore:
      
      * runtime/DateConstructor.cpp:
      * runtime/DateConversion.cpp:
      * runtime/DateConversion.h:
      * runtime/DateInstance.h:
      * runtime/DatePrototype.cpp:
      * runtime/JSDateMath.cpp:
      * runtime/JSDateMath.h:
      
      Source/WebCore:
      
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::convertValueToQVariant):
      (JSC::Bindings::convertQVariantToValue):
      * bridge/qt/qt_runtime_qt4.cpp:
      (JSC::Bindings::convertValueToQVariant):
      (JSC::Bindings::convertQVariantToValue):
      
      Source/WTF:
      
      * GNUmakefile.list.am:
      * WTF.gypi:
      * WTF.pro:
      * WTF.vcproj/WTF.vcproj:
      * WTF.xcodeproj/project.pbxproj:
      * wtf/CMakeLists.txt:
      * wtf/GregorianDateTime.h: Added.
      (GregorianDateTime):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      175d46f1
  6. 11 May, 2012 1 commit
    • barraclough@apple.com's avatar
      Introduce PropertyName class · 38d3c75b
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=86241
      
      Reviewed by Geoff Garen.
      
      Replace 'const Identifier&' arguments to functions accessing object properties with a new 'PropertyName' type.
      This change paves the way to allow for properties keyed by values that are not Identifiers.
      
      This change is largely a mechanical find & replace.
      It also changes JSFunction's constructor to take a UString& instead of an Identifier&
      (since in some cases we can no longer guarantee that we'lll have an Identifier), and
      unifies Identifier's methods to obtain array indices onto PropertyName.
      
      The new PropertyName class retains the ability to support .impl() and .ustring(), but
      in a future patch we may need to rework this, since not all PropertyNames should be
      equal based on their string representation.
      
      Source/JavaScriptCore: 
      
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::finishCreation):
      * API/JSCallbackFunction.h:
      (JSCallbackFunction):
      (JSC::JSCallbackFunction::create):
      * API/JSCallbackObject.h:
      (JSCallbackObject):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getOwnPropertySlot):
      (JSC::::getOwnPropertyDescriptor):
      (JSC::::put):
      (JSC::::deleteProperty):
      (JSC::::getStaticValue):
      (JSC::::staticFunctionGetter):
      (JSC::::callbackGetter):
      * API/JSObjectRef.cpp:
      (JSObjectMakeFunctionWithCallback):
      * JSCTypedArrayStubs.h:
      (JSC):
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::getOwnPropertySlot):
      (JSC::DebuggerActivation::put):
      (JSC::DebuggerActivation::putDirectVirtual):
      (JSC::DebuggerActivation::deleteProperty):
      (JSC::DebuggerActivation::getOwnPropertyDescriptor):
      (JSC::DebuggerActivation::defineOwnProperty):
      * debugger/DebuggerActivation.h:
      (DebuggerActivation):
      * jsc.cpp:
      (GlobalObject::addFunction):
      (GlobalObject::addConstructableFunction):
      * runtime/Arguments.cpp:
      (JSC::Arguments::getOwnPropertySlot):
      (JSC::Arguments::getOwnPropertyDescriptor):
      (JSC::Arguments::put):
      (JSC::Arguments::deleteProperty):
      (JSC::Arguments::defineOwnProperty):
      * runtime/Arguments.h:
      (Arguments):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::finishCreation):
      (JSC::ArrayConstructor::getOwnPropertySlot):
      (JSC::ArrayConstructor::getOwnPropertyDescriptor):
      * runtime/ArrayConstructor.h:
      (ArrayConstructor):
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::getOwnPropertySlot):
      (JSC::ArrayPrototype::getOwnPropertyDescriptor):
      (JSC::putProperty):
      * runtime/ArrayPrototype.h:
      (ArrayPrototype):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::finishCreation):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::getOwnPropertySlot):
      (JSC::BooleanPrototype::getOwnPropertyDescriptor):
      * runtime/BooleanPrototype.h:
      (BooleanPrototype):
      * runtime/ClassInfo.h:
      (MethodTable):
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::finishCreation):
      (JSC::DateConstructor::getOwnPropertySlot):
      (JSC::DateConstructor::getOwnPropertyDescriptor):
      * runtime/DateConstructor.h:
      (DateConstructor):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::getOwnPropertySlot):
      (JSC::DatePrototype::getOwnPropertyDescriptor):
      * runtime/DatePrototype.h:
      (DatePrototype):
      * runtime/Error.h:
      (JSC::StrictModeTypeErrorFunction::create):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::finishCreation):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::getOwnPropertySlot):
      (JSC::ErrorPrototype::getOwnPropertyDescriptor):
      * runtime/ErrorPrototype.h:
      (ErrorPrototype):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::finishCreation):
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::finishCreation):
      (JSC::FunctionPrototype::addFunctionProperties):
      (JSC::functionProtoFuncBind):
      * runtime/FunctionPrototype.h:
      (JSC::FunctionPrototype::create):
      (FunctionPrototype):
      * runtime/Identifier.cpp:
      (JSC):
      * runtime/Identifier.h:
      (Identifier):
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::finishCreation):
      * runtime/InternalFunction.h:
      (InternalFunction):
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::symbolTableGet):
      (JSC::JSActivation::symbolTablePut):
      (JSC::JSActivation::symbolTablePutWithAttributes):
      (JSC::JSActivation::getOwnPropertySlot):
      (JSC::JSActivation::put):
      (JSC::JSActivation::putDirectVirtual):
      (JSC::JSActivation::deleteProperty):
      (JSC::JSActivation::argumentsGetter):
      * runtime/JSActivation.h:
      (JSActivation):
      * runtime/JSArray.cpp:
      (JSC::JSArray::defineOwnProperty):
      (JSC::JSArray::getOwnPropertySlot):
      (JSC::JSArray::getOwnPropertyDescriptor):
      (JSC::JSArray::put):
      (JSC::JSArray::deleteProperty):
      * runtime/JSArray.h:
      (JSArray):
      (JSC):
      * runtime/JSBoundFunction.cpp:
      (JSC::JSBoundFunction::create):
      (JSC::JSBoundFunction::finishCreation):
      * runtime/JSBoundFunction.h:
      (JSBoundFunction):
      * runtime/JSCell.cpp:
      (JSC::JSCell::getOwnPropertySlot):
      (JSC::JSCell::put):
      (JSC::JSCell::deleteProperty):
      (JSC::JSCell::putDirectVirtual):
      (JSC::JSCell::defineOwnProperty):
      (JSC::JSCell::getOwnPropertyDescriptor):
      * runtime/JSCell.h:
      (JSCell):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::create):
      (JSC::JSFunction::finishCreation):
      (JSC::JSFunction::argumentsGetter):
      (JSC::JSFunction::callerGetter):
      (JSC::JSFunction::lengthGetter):
      (JSC::JSFunction::getOwnPropertySlot):
      (JSC::JSFunction::getOwnPropertyDescriptor):
      (JSC::JSFunction::put):
      (JSC::JSFunction::deleteProperty):
      (JSC::JSFunction::defineOwnProperty):
      (JSC::getCalculatedDisplayName):
      * runtime/JSFunction.h:
      (JSFunction):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::put):
      (JSC::JSGlobalObject::putDirectVirtual):
      (JSC::JSGlobalObject::defineOwnProperty):
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::createThrowTypeError):
      (JSC::JSGlobalObject::getOwnPropertySlot):
      (JSC::JSGlobalObject::getOwnPropertyDescriptor):
      * runtime/JSGlobalObject.h:
      (JSGlobalObject):
      (JSC::JSGlobalObject::hasOwnPropertyForWrite):
      (JSC::JSGlobalObject::symbolTableHasProperty):
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::getOwnPropertySlot):
      (JSC::JSNotAnObject::getOwnPropertyDescriptor):
      (JSC::JSNotAnObject::put):
      (JSC::JSNotAnObject::deleteProperty):
      * runtime/JSNotAnObject.h:
      (JSNotAnObject):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::getOwnPropertySlot):
      (JSC::JSONObject::getOwnPropertyDescriptor):
      * runtime/JSONObject.h:
      (JSONObject):
      * runtime/JSObject.cpp:
      (JSC::JSObject::put):
      (JSC::JSObject::putDirectVirtual):
      (JSC::JSObject::putDirectAccessor):
      (JSC::JSObject::hasProperty):
      (JSC::JSObject::deleteProperty):
      (JSC::JSObject::hasOwnProperty):
      (JSC::callDefaultValueFunction):
      (JSC::JSObject::findPropertyHashEntry):
      (JSC::JSObject::getPropertySpecificValue):
      (JSC::JSObject::removeDirect):
      (JSC::JSObject::getOwnPropertyDescriptor):
      (JSC::JSObject::getPropertyDescriptor):
      (JSC::putDescriptor):
      (JSC::JSObject::defineOwnProperty):
      * runtime/JSObject.h:
      (JSObject):
      (JSC::JSObject::getDirect):
      (JSC::JSObject::getDirectLocation):
      (JSC::JSObject::inlineGetOwnPropertySlot):
      (JSC::JSObject::getOwnPropertySlot):
      (JSC::JSCell::fastGetOwnPropertySlot):
      (JSC::JSObject::getPropertySlot):
      (JSC::JSObject::get):
      (JSC::JSObject::putDirectInternal):
      (JSC::JSObject::putOwnDataProperty):
      (JSC::JSObject::putDirect):
      (JSC::JSObject::putDirectWithoutTransition):
      (JSC::JSValue::get):
      (JSC::JSValue::put):
      * runtime/JSStaticScopeObject.cpp:
      (JSC::JSStaticScopeObject::put):
      (JSC::JSStaticScopeObject::putDirectVirtual):
      (JSC::JSStaticScopeObject::getOwnPropertySlot):
      * runtime/JSStaticScopeObject.h:
      (JSStaticScopeObject):
      * runtime/JSString.cpp:
      (JSC::JSString::getOwnPropertySlot):
      (JSC::JSString::getStringPropertyDescriptor):
      * runtime/JSString.h:
      (JSString):
      (JSC::JSString::getStringPropertySlot):
      * runtime/JSValue.cpp:
      (JSC::JSValue::putToPrimitive):
      * runtime/JSValue.h:
      (JSC):
      (JSValue):
      * runtime/JSVariableObject.cpp:
      (JSC::JSVariableObject::deleteProperty):
      (JSC::JSVariableObject::symbolTableGet):
      (JSC::JSVariableObject::putDirectVirtual):
      * runtime/JSVariableObject.h:
      (JSVariableObject):
      (JSC::JSVariableObject::symbolTableGet):
      (JSC::JSVariableObject::symbolTablePut):
      (JSC::JSVariableObject::symbolTablePutWithAttributes):
      * runtime/Lookup.cpp:
      (JSC::setUpStaticFunctionSlot):
      * runtime/Lookup.h:
      (JSC::HashTable::entry):
      (JSC):
      (JSC::getStaticPropertySlot):
      (JSC::getStaticPropertyDescriptor):
      (JSC::getStaticFunctionSlot):
      (JSC::getStaticFunctionDescriptor):
      (JSC::getStaticValueSlot):
      (JSC::getStaticValueDescriptor):
      (JSC::lookupPut):
      * runtime/MathObject.cpp:
      (JSC::MathObject::getOwnPropertySlot):
      (JSC::MathObject::getOwnPropertyDescriptor):
      * runtime/MathObject.h:
      (MathObject):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::finishCreation):
      * runtime/NumberConstructor.cpp:
      (JSC):
      (JSC::NumberConstructor::finishCreation):
      (JSC::NumberConstructor::getOwnPropertySlot):
      (JSC::NumberConstructor::getOwnPropertyDescriptor):
      (JSC::NumberConstructor::put):
      (JSC::numberConstructorNaNValue):
      (JSC::numberConstructorNegInfinity):
      (JSC::numberConstructorPosInfinity):
      (JSC::numberConstructorMaxValue):
      (JSC::numberConstructorMinValue):
      * runtime/NumberConstructor.h:
      (NumberConstructor):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::getOwnPropertySlot):
      (JSC::NumberPrototype::getOwnPropertyDescriptor):
      * runtime/NumberPrototype.h:
      (NumberPrototype):
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::finishCreation):
      (JSC::ObjectConstructor::getOwnPropertySlot):
      (JSC::ObjectConstructor::getOwnPropertyDescriptor):
      * runtime/ObjectConstructor.h:
      (ObjectConstructor):
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::put):
      (JSC::ObjectPrototype::defineOwnProperty):
      (JSC::ObjectPrototype::getOwnPropertySlot):
      (JSC::ObjectPrototype::getOwnPropertyDescriptor):
      * runtime/ObjectPrototype.h:
      (ObjectPrototype):
      * runtime/PropertySlot.h:
      (PropertySlot):
      (JSC::PropertySlot::getValue):
      * runtime/RegExpConstructor.cpp:
      (JSC):
      (JSC::RegExpConstructor::finishCreation):
      (JSC::RegExpConstructor::getOwnPropertySlot):
      (JSC::RegExpConstructor::getOwnPropertyDescriptor):
      (JSC::regExpConstructorDollar1):
      (JSC::regExpConstructorDollar2):
      (JSC::regExpConstructorDollar3):
      (JSC::regExpConstructorDollar4):
      (JSC::regExpConstructorDollar5):
      (JSC::regExpConstructorDollar6):
      (JSC::regExpConstructorDollar7):
      (JSC::regExpConstructorDollar8):
      (JSC::regExpConstructorDollar9):
      (JSC::regExpConstructorInput):
      (JSC::regExpConstructorMultiline):
      (JSC::regExpConstructorLastMatch):
      (JSC::regExpConstructorLastParen):
      (JSC::regExpConstructorLeftContext):
      (JSC::regExpConstructorRightContext):
      (JSC::RegExpConstructor::put):
      * runtime/RegExpConstructor.h:
      (RegExpConstructor):
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::getOwnPropertySlot):
      (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
      (JSC::RegExpMatchesArray::put):
      (JSC::RegExpMatchesArray::deleteProperty):
      (JSC::RegExpMatchesArray::defineOwnProperty):
      * runtime/RegExpObject.cpp:
      (JSC):
      (JSC::RegExpObject::getOwnPropertySlot):
      (JSC::RegExpObject::getOwnPropertyDescriptor):
      (JSC::RegExpObject::deleteProperty):
      (JSC::RegExpObject::defineOwnProperty):
      (JSC::regExpObjectGlobal):
      (JSC::regExpObjectIgnoreCase):
      (JSC::regExpObjectMultiline):
      (JSC::regExpObjectSource):
      (JSC::RegExpObject::put):
      * runtime/RegExpObject.h:
      (RegExpObject):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::getOwnPropertySlot):
      (JSC::RegExpPrototype::getOwnPropertyDescriptor):
      * runtime/RegExpPrototype.h:
      (RegExpPrototype):
      * runtime/StrictEvalActivation.cpp:
      (JSC::StrictEvalActivation::deleteProperty):
      * runtime/StrictEvalActivation.h:
      (StrictEvalActivation):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::finishCreation):
      (JSC::StringConstructor::getOwnPropertySlot):
      (JSC::StringConstructor::getOwnPropertyDescriptor):
      * runtime/StringConstructor.h:
      (StringConstructor):
      * runtime/StringObject.cpp:
      (JSC::StringObject::getOwnPropertySlot):
      (JSC::StringObject::getOwnPropertyDescriptor):
      (JSC::StringObject::put):
      (JSC::StringObject::defineOwnProperty):
      (JSC::StringObject::deleteProperty):
      * runtime/StringObject.h:
      (StringObject):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::getOwnPropertySlot):
      (JSC::StringPrototype::getOwnPropertyDescriptor):
      * runtime/StringPrototype.h:
      (StringPrototype):
      * runtime/Structure.cpp:
      (JSC::Structure::despecifyDictionaryFunction):
      (JSC::Structure::addPropertyTransitionToExistingStructure):
      (JSC::Structure::addPropertyTransition):
      (JSC::Structure::removePropertyTransition):
      (JSC::Structure::despecifyFunctionTransition):
      (JSC::Structure::attributeChangeTransition):
      (JSC::Structure::addPropertyWithoutTransition):
      (JSC::Structure::removePropertyWithoutTransition):
      (JSC::Structure::get):
      (JSC::Structure::despecifyFunction):
      (JSC::Structure::putSpecificValue):
      (JSC::Structure::remove):
      * runtime/Structure.h:
      (Structure):
      (JSC::Structure::get):
      
      Source/WebCore: 
      
      * WebCore.exp.in:
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      (WebCore::cssPropertyIDForJSCSSPropertyName):
      (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
      (WebCore::JSCSSStyleDeclaration::getOwnPropertyDescriptorDelegate):
      (WebCore::JSCSSStyleDeclaration::putDelegate):
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::findAtomicString):
      (WebCore::objectToStringFunctionGetter):
      * bindings/js/JSDOMBinding.h:
      (WebCore):
      (WebCore::propertyNameToString):
      (WebCore::propertyNameToAtomicString):
      * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
      (WebCore::JSDOMMimeTypeArray::canGetItemsForName):
      (WebCore::JSDOMMimeTypeArray::nameGetter):
      * bindings/js/JSDOMPluginArrayCustom.cpp:
      (WebCore::JSDOMPluginArray::canGetItemsForName):
      (WebCore::JSDOMPluginArray::nameGetter):
      * bindings/js/JSDOMPluginCustom.cpp:
      (WebCore::JSDOMPlugin::canGetItemsForName):
      (WebCore::JSDOMPlugin::nameGetter):
      * bindings/js/JSDOMStringMapCustom.cpp:
      (WebCore::JSDOMStringMap::canGetItemsForName):
      (WebCore::JSDOMStringMap::nameGetter):
      (WebCore::JSDOMStringMap::deleteProperty):
      (WebCore::JSDOMStringMap::putDelegate):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::nonCachingStaticFunctionGetter):
      (WebCore::childFrameGetter):
      (WebCore::namedItemGetter):
      (WebCore::JSDOMWindow::getOwnPropertySlot):
      (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
      (WebCore::JSDOMWindow::put):
      (WebCore::JSDOMWindow::deleteProperty):
      (WebCore::JSDOMWindow::defineOwnProperty):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::getOwnPropertySlot):
      (WebCore::JSDOMWindowShell::getOwnPropertyDescriptor):
      (WebCore::JSDOMWindowShell::put):
      (WebCore::JSDOMWindowShell::putDirectVirtual):
      (WebCore::JSDOMWindowShell::defineOwnProperty):
      (WebCore::JSDOMWindowShell::deleteProperty):
      * bindings/js/JSDOMWindowShell.h:
      (JSDOMWindowShell):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      (WebCore::getNamedItems):
      (WebCore::callHTMLAllCollection):
      (WebCore::JSHTMLAllCollection::canGetItemsForName):
      (WebCore::JSHTMLAllCollection::nameGetter):
      (WebCore::JSHTMLAllCollection::item):
      * bindings/js/JSHTMLAppletElementCustom.cpp:
      (WebCore::JSHTMLAppletElement::getOwnPropertySlotDelegate):
      (WebCore::JSHTMLAppletElement::getOwnPropertyDescriptorDelegate):
      (WebCore::JSHTMLAppletElement::putDelegate):
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::getNamedItems):
      (WebCore::JSHTMLCollection::canGetItemsForName):
      (WebCore::JSHTMLCollection::nameGetter):
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::JSHTMLDocument::canGetItemsForName):
      (WebCore::JSHTMLDocument::nameGetter):
      * bindings/js/JSHTMLEmbedElementCustom.cpp:
      (WebCore::JSHTMLEmbedElement::getOwnPropertySlotDelegate):
      (WebCore::JSHTMLEmbedElement::getOwnPropertyDescriptorDelegate):
      (WebCore::JSHTMLEmbedElement::putDelegate):
      * bindings/js/JSHTMLFormElementCustom.cpp:
      (WebCore::JSHTMLFormElement::canGetItemsForName):
      (WebCore::JSHTMLFormElement::nameGetter):
      * bindings/js/JSHTMLFrameSetElementCustom.cpp:
      (WebCore::JSHTMLFrameSetElement::canGetItemsForName):
      (WebCore::JSHTMLFrameSetElement::nameGetter):
      * bindings/js/JSHTMLObjectElementCustom.cpp:
      (WebCore::JSHTMLObjectElement::getOwnPropertySlotDelegate):
      (WebCore::JSHTMLObjectElement::getOwnPropertyDescriptorDelegate):
      (WebCore::JSHTMLObjectElement::putDelegate):
      * bindings/js/JSHistoryCustom.cpp:
      (WebCore::nonCachingStaticBackFunctionGetter):
      (WebCore::nonCachingStaticForwardFunctionGetter):
      (WebCore::nonCachingStaticGoFunctionGetter):
      (WebCore::JSHistory::getOwnPropertySlotDelegate):
      (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
      (WebCore::JSHistory::putDelegate):
      (WebCore::JSHistory::deleteProperty):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::nonCachingStaticReplaceFunctionGetter):
      (WebCore::nonCachingStaticReloadFunctionGetter):
      (WebCore::nonCachingStaticAssignFunctionGetter):
      (WebCore::JSLocation::getOwnPropertySlotDelegate):
      (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
      (WebCore::JSLocation::putDelegate):
      (WebCore::JSLocation::deleteProperty):
      (WebCore::JSLocation::defineOwnProperty):
      (WebCore::JSLocationPrototype::putDelegate):
      (WebCore::JSLocationPrototype::defineOwnProperty):
      * bindings/js/JSNamedNodeMapCustom.cpp:
      (WebCore::JSNamedNodeMap::canGetItemsForName):
      (WebCore::JSNamedNodeMap::nameGetter):
      * bindings/js/JSNodeListCustom.cpp:
      (WebCore::JSNodeList::canGetItemsForName):
      (WebCore::JSNodeList::nameGetter):
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::runtimeObjectPropertyGetter):
      (WebCore::runtimeObjectCustomGetOwnPropertySlot):
      (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
      (WebCore::runtimeObjectCustomPut):
      * bindings/js/JSPluginElementFunctions.h:
      (WebCore):
      * bindings/js/JSStorageCustom.cpp:
      (WebCore::JSStorage::canGetItemsForName):
      (WebCore::JSStorage::nameGetter):
      (WebCore::JSStorage::deleteProperty):
      (WebCore::JSStorage::putDelegate):
      * bindings/js/JSStyleSheetListCustom.cpp:
      (WebCore::JSStyleSheetList::canGetItemsForName):
      (WebCore::JSStyleSheetList::nameGetter):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::getOwnPropertySlotDelegate):
      (WebCore::JSWorkerContext::getOwnPropertyDescriptorDelegate):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateGetOwnPropertySlotBody):
      (GenerateGetOwnPropertyDescriptorBody):
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateConstructorDeclaration):
      (GenerateConstructorDefinition):
      * bridge/c/c_class.cpp:
      (JSC::Bindings::CClass::methodsNamed):
      (JSC::Bindings::CClass::fieldNamed):
      * bridge/c/c_class.h:
      (CClass):
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CRuntimeMethod::create):
      (JSC::Bindings::CRuntimeMethod::finishCreation):
      (JSC::Bindings::CInstance::getMethod):
      * bridge/c/c_instance.h:
      (CInstance):
      * bridge/jni/jsc/JavaClassJSC.cpp:
      (JavaClass::methodsNamed):
      (JavaClass::fieldNamed):
      * bridge/jni/jsc/JavaClassJSC.h:
      (JavaClass):
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaRuntimeMethod::create):
      (JavaRuntimeMethod::finishCreation):
      * bridge/jni/jsc/JavaInstanceJSC.h:
      (JavaInstance):
      * bridge/jsc/BridgeJSC.h:
      (Class):
      (JSC::Bindings::Class::fallbackObject):
      (JSC::Bindings::Instance::setValueOfUndefinedField):
      (Instance):
      (JSC::Bindings::Instance::getOwnPropertySlot):
      (JSC::Bindings::Instance::getOwnPropertyDescriptor):
      (JSC::Bindings::Instance::put):
      * bridge/objc/objc_class.h:
      (ObjcClass):
      * bridge/objc/objc_class.mm:
      (JSC::Bindings::ObjcClass::methodsNamed):
      (JSC::Bindings::ObjcClass::fieldNamed):
      (JSC::Bindings::ObjcClass::fallbackObject):
      * bridge/objc/objc_instance.h:
      (ObjcInstance):
      * bridge/objc/objc_instance.mm:
      (ObjCRuntimeMethod::create):
      (ObjCRuntimeMethod::finishCreation):
      (ObjcInstance::setValueOfUndefinedField):
      (ObjcInstance::getValueOfUndefinedField):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::create):
      (JSC::Bindings::ObjcFallbackObjectImp::propertyName):
      (ObjcFallbackObjectImp):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot):
      (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertyDescriptor):
      (JSC::Bindings::ObjcFallbackObjectImp::put):
      (JSC::Bindings::callObjCFallbackObject):
      (JSC::Bindings::ObjcFallbackObjectImp::deleteProperty):
      (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::lengthGetter):
      (JSC::RuntimeArray::getOwnPropertySlot):
      (JSC::RuntimeArray::getOwnPropertyDescriptor):
      (JSC::RuntimeArray::put):
      (JSC::RuntimeArray::deleteProperty):
      * bridge/runtime_array.h:
      (RuntimeArray):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::finishCreation):
      (JSC::RuntimeMethod::lengthGetter):
      (JSC::RuntimeMethod::getOwnPropertySlot):
      (JSC::RuntimeMethod::getOwnPropertyDescriptor):
      * bridge/runtime_method.h:
      (JSC::RuntimeMethod::create):
      (RuntimeMethod):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
      (JSC::Bindings::RuntimeObject::fieldGetter):
      (JSC::Bindings::RuntimeObject::methodGetter):
      (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
      (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
      (JSC::Bindings::RuntimeObject::put):
      (JSC::Bindings::RuntimeObject::deleteProperty):
      * bridge/runtime_object.h:
      (RuntimeObject):
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/ProxyInstance.h:
      (ProxyInstance):
      * Plugins/Hosted/ProxyInstance.mm:
      (ProxyClass):
      (WebKit::ProxyClass::methodsNamed):
      (WebKit::ProxyClass::fieldNamed):
      (WebKit::ProxyRuntimeMethod::create):
      (WebKit::ProxyRuntimeMethod::finishCreation):
      (WebKit::ProxyInstance::getMethod):
      (WebKit::ProxyInstance::methodsNamed):
      (WebKit::ProxyInstance::fieldNamed):
      
      Source/WebKit2: 
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::create):
      (JSNPMethod):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::npIdentifierFromIdentifier):
      (WebKit::JSNPObject::getOwnPropertySlot):
      (WebKit::JSNPObject::getOwnPropertyDescriptor):
      (WebKit::JSNPObject::put):
      (WebKit::JSNPObject::deleteProperty):
      (WebKit::JSNPObject::propertyGetter):
      (WebKit::JSNPObject::methodGetter):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (JSNPObject):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38d3c75b
  7. 06 Apr, 2012 1 commit
  8. 05 Apr, 2012 1 commit
    • paroga@webkit.org's avatar
      Add WTF::getCurrentLocalTime() · c09d77eb
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=83164
      
      Reviewed by Alexey Proskuryakov.
      
      Replace the calls to WTF::getLocalTime() with time(0) with the new function.
      This allows us to use Win32 API on windows to get the same result in a next step.
      
      Source/JavaScriptCore:
      
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * runtime/DateConstructor.cpp:
      (JSC::callDate):
      
      Source/WebCore:
      
      * html/FTPDirectoryDocument.cpp:
      (WebCore::processFileDateString):
      * loader/archive/mhtml/MHTMLArchive.cpp:
      (WebCore::MHTMLArchive::generateMHTMLData):
      
      Source/WTF:
      
      Also remove the inline keyword from WTF::getLocalTime(), since there is no need for
      it and it will make the later Win32 API changes easier.
      
      * WTF.gyp/WTF.gyp:
      * wtf/CurrentTime.cpp:
      (WTF::getLocalTime):
      (WTF::getCurrentLocalTime):
      * wtf/CurrentTime.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c09d77eb
  9. 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
  10. 05 Jan, 2012 1 commit
  11. 16 Dec, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      De-virtualize destructors · c58d54d7
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=74331
      
      Reviewed by Geoffrey Garen.
      
      .: 
      
      * Source/autotools/symbols.filter: Removed symbol no longer present.
      
      Source/JavaScriptCore: 
      
      This is a megapatch which frees us from the chains of virtual destructors.
      
      In order to remove the virtual destructors, which are the last of the virtual 
      functions, from the JSCell hierarchy, we need to add the ClassInfo pointer to 
      the cell rather than to the structure because in order to be able to lazily call 
      the static destroy() functions that will replace the virtual destructors, we 
      need to be able to access the ClassInfo without the danger of the object's 
      Structure being collected before the object itself.
      
      After adding the ClassInfo to the cell, we can then begin to remove our use 
      of vptrs for optimizations within the JIT and the GC.  When we have removed 
      all of the stored vptrs from JSGlobalData, we can then also remove all of 
      the related VPtrStealingHack code.
      
      The replacement for virtual destructors will be to add a static destroy function 
      pointer to the MethodTable stored in ClassInfo.  Any subclass of JSCell that has 
      a non-trivial destructor will require its own static destroy function to static 
      call its corresponding destructor, which will now be non-virtual.  In future 
      patches we will slowly move away from destructors altogether as we make more and 
      more objects backed by GC memory rather than malloc-ed memory.  The GC will now 
      call the static destroy method rather than the virtual destructor.
      
      As we go through the hierarchy and add static destroy functions to classes, 
      we will also add a new assert, ASSERT_HAS_TRIVIAL_DESTRUCTOR, to those classes 
      to which it applies.  The future goal is to eventually have every class have that assert.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::destroy): Add a destroy function to statically call 
      ~JSCallbackConstructor because it has some extra destruction logic.
      * API/JSCallbackConstructor.h:
      * API/JSCallbackFunction.cpp: Add trivial destructor assert for JSCallbackFunction.
      * API/JSCallbackObject.cpp: Add a destroy function to statically call ~JSCallbackObject 
      because it has a member OwnPtr that needs destruction.
      (JSC::::destroy):
      * API/JSCallbackObject.h:
      * JavaScriptCore.exp: Add/remove necessary symbols for JSC.
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Same for Windows symbols.
      * debugger/DebuggerActivation.cpp: DebuggerActivation, for some strange reason, didn't 
      have its own ClassInfo despite the fact that it overrides a number of MethodTable 
      methods.  Added the ClassInfo, along with an assertion that its destructor is trivial.
      * debugger/DebuggerActivation.h:
      * dfg/DFGOperations.cpp: Remove global data first argument to isJSArray, isJSByteArray, 
      isJSString, as it is no longer necessary.
      (JSC::DFG::putByVal):
      * dfg/DFGRepatch.cpp:  Ditto.  Also remove uses of jsArrayVPtr in favor of using the 
      JSArray ClassInfo pointer.
      (JSC::DFG::tryCacheGetByID):
      * dfg/DFGSpeculativeJIT.cpp:  Replace uses of the old vptrs with new ClassInfo 
      comparisons since we don't have vptrs anymore.
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
      (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
      (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
      (JSC::DFG::SpeculativeJIT::compileGetTypedArrayLength):
      (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compare):
      (JSC::DFG::SpeculativeJIT::compileStrictEq):
      (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
      * dfg/DFGSpeculativeJIT.h: Ditto.
      (JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject):
      * dfg/DFGSpeculativeJIT32_64.cpp: Ditto.
      (JSC::DFG::SpeculativeJIT::compileObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
      (JSC::DFG::SpeculativeJIT::compileLogicalNot):
      (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
      (JSC::DFG::SpeculativeJIT::emitBranch):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp: Ditto.
      (JSC::DFG::SpeculativeJIT::compileObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
      (JSC::DFG::SpeculativeJIT::compileLogicalNot):
      (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
      (JSC::DFG::SpeculativeJIT::emitBranch):
      (JSC::DFG::SpeculativeJIT::compile):
      * heap/Heap.cpp: Remove all uses of vptrs in GC optimizations and replace them with 
      ClassInfo comparisons.
      (JSC::Heap::Heap):
      * heap/MarkStack.cpp: Ditto.
      (JSC::MarkStackThreadSharedData::markingThreadMain):
      (JSC::visitChildren):
      (JSC::SlotVisitor::drain):
      * heap/MarkStack.h: Ditto.
      (JSC::MarkStack::MarkStack):
      * heap/MarkedBlock.cpp: Ditto.
      (JSC::MarkedBlock::callDestructor):
      (JSC::MarkedBlock::specializedSweep):
      * heap/MarkedBlock.h: Ditto.
      * heap/SlotVisitor.h: Ditto.
      (JSC::SlotVisitor::SlotVisitor):
      * heap/VTableSpectrum.cpp: Now that we don't have vptrs, we can't count them.  
      We'll have to rename this class and make it use ClassInfo ptrs in a future patch.
      (JSC::VTableSpectrum::count):
      * interpreter/Interpreter.cpp: Remove all global data arguments from isJSArray, 
      etc. functions.
      (JSC::loadVarargs):
      (JSC::Interpreter::tryCacheGetByID):
      (JSC::Interpreter::privateExecute):
      * jit/JIT.h: Remove vptr argument from emitAllocateBasicJSObject 
      * jit/JITInlineMethods.h: Remove vptr planting, and add ClassInfo planting, 
      remove all vtable related code.
      (JSC::JIT::emitLoadCharacterString):
      (JSC::JIT::emitAllocateBasicJSObject):
      (JSC::JIT::emitAllocateJSFinalObject):
      (JSC::JIT::emitAllocateJSFunction):
      * jit/JITOpcodes.cpp: Replace vptr related branch code with corresponding ClassInfo.
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      (JSC::JIT::emit_op_to_primitive):
      (JSC::JIT::emit_op_convert_this):
      * jit/JITOpcodes32_64.cpp: Ditto.
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      (JSC::JIT::emit_op_to_primitive):
      (JSC::JIT::emitSlow_op_eq):
      (JSC::JIT::emitSlow_op_neq):
      (JSC::JIT::compileOpStrictEq):
      (JSC::JIT::emit_op_convert_this):
      * jit/JITPropertyAccess.cpp: Ditto.
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::emit_op_get_by_val):
      (JSC::JIT::emitSlow_op_get_by_val):
      (JSC::JIT::emit_op_put_by_val):
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      * jit/JITPropertyAccess32_64.cpp: Ditto.
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::emit_op_get_by_val):
      (JSC::JIT::emitSlow_op_get_by_val):
      (JSC::JIT::emit_op_put_by_val):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      * jit/JITStubs.cpp: Remove global data argument from isJSString, etc.
      (JSC::JITThunks::tryCacheGetByID):
      (JSC::DEFINE_STUB_FUNCTION):
      * jit/SpecializedThunkJIT.h: Replace vptr related stuff with ClassInfo stuff.
      (JSC::SpecializedThunkJIT::loadJSStringArgument):
      * runtime/ArrayConstructor.cpp: Add trivial destructor assert.
      * runtime/ArrayPrototype.cpp: Remove global data argument from isJSArray.
      (JSC::arrayProtoFuncToString):
      (JSC::arrayProtoFuncJoin):
      (JSC::arrayProtoFuncPop):
      (JSC::arrayProtoFuncPush):
      (JSC::arrayProtoFuncShift):
      (JSC::arrayProtoFuncSplice):
      (JSC::arrayProtoFuncUnShift):
      (JSC::arrayProtoFuncFilter):
      (JSC::arrayProtoFuncMap):
      (JSC::arrayProtoFuncEvery):
      (JSC::arrayProtoFuncForEach):
      (JSC::arrayProtoFuncSome):
      (JSC::arrayProtoFuncReduce):
      (JSC::arrayProtoFuncReduceRight):
      * runtime/BooleanConstructor.cpp: Add trivial destructor assert.
      * runtime/BooleanObject.cpp: Ditto.
      * runtime/BooleanPrototype.cpp: Ditto.
      * runtime/ClassInfo.h: Add destroy function pointer to MethodTable.
      * runtime/DateConstructor.cpp: Add trivial destructor assert.
      * runtime/DateInstance.cpp: Add destroy function for DateInstance because it has a RefPtr 
      that needs destruction.
      (JSC::DateInstance::destroy):
      * runtime/DateInstance.h:
      * runtime/Error.cpp: Ditto (because of UString member).
      (JSC::StrictModeTypeErrorFunction::destroy):
      * runtime/Error.h:
      * runtime/ErrorConstructor.cpp: Add trivial destructor assert.
      * runtime/ErrorInstance.cpp: Ditto.
      * runtime/ExceptionHelpers.cpp: Ditto.
      * runtime/Executable.cpp: Add destroy functions for ExecutableBase and subclasses.
      (JSC::ExecutableBase::destroy):
      (JSC::NativeExecutable::destroy):
      (JSC::ScriptExecutable::destroy):
      (JSC::EvalExecutable::destroy):
      (JSC::ProgramExecutable::destroy):
      (JSC::FunctionExecutable::destroy):
      * runtime/Executable.h:
      * runtime/FunctionConstructor.cpp: Add trivial destructor assert.
      * runtime/FunctionPrototype.cpp: Ditto. Also remove global data first arg from isJSArray.
      (JSC::functionProtoFuncApply):
      * runtime/GetterSetter.cpp: Ditto.
      * runtime/InitializeThreading.cpp: Remove call to JSGlobalData::storeVPtrs since it no 
      longer exists.
      (JSC::initializeThreadingOnce):
      * runtime/InternalFunction.cpp: Remove vtableAnchor function, add trivial destructor assert, 
      remove first arg from isJSString.
      (JSC::InternalFunction::displayName):
      * runtime/InternalFunction.h: Remove VPtrStealingHack.
      * runtime/JSAPIValueWrapper.cpp: Add trivial destructor assert.
      * runtime/JSArray.cpp: Add static destroy to call ~JSArray.  Replace vptr checks in 
      destructor with ClassInfo checks.
      (JSC::JSArray::~JSArray):
      (JSC::JSArray::destroy):
      * runtime/JSArray.h: Remove VPtrStealingHack.  Remove globalData argument from isJSArray 
      and change them to check the ClassInfo rather than the vptrs.
      (JSC::isJSArray):
      * runtime/JSBoundFunction.cpp: Add trival destructor assert. Remove first arg from isJSArray.
      (JSC::boundFunctionCall):
      (JSC::boundFunctionConstruct):
      * runtime/JSByteArray.cpp: Add static destroy function, replace vptr checks with ClassInfo checks.
      (JSC::JSByteArray::~JSByteArray):
      (JSC::JSByteArray::destroy):
      * runtime/JSByteArray.h: Remove VPtrStealingHack code.
      (JSC::isJSByteArray):
      * runtime/JSCell.cpp: Add trivial destructor assert.  Add static destroy function.
      (JSC::JSCell::destroy):
      * runtime/JSCell.h: Remove VPtrStealingHack code.  Add function for returning the offset 
      of the ClassInfo pointer in the object for use by the JIT.  Add the ClassInfo pointer to 
      the JSCell itself, and grab it from the Structure.  Remove the vptr and setVPtr functions, 
      as they are no longer used.  Add a validatedClassInfo function to JSCell for any clients 
      that want to verify, while in Debug mode, that the ClassInfo contained in the cell is the 
      same one as that contained in the Structure.  This isn't used too often, because most of 
      the places where we compare the ClassInfo to things can be called during destruction.  
      Since the Structure is unreliable during the phase when destructors are being called, 
      we can't call validatedClassInfo.
      (JSC::JSCell::classInfoOffset):
      (JSC::JSCell::structure):
      (JSC::JSCell::classInfo):
      * runtime/JSFunction.cpp: Remove VPtrStealingHack code.  Add static destroy, remove vtableAnchor, 
      remove first arg from call to isJSString.
      (JSC::JSFunction::destroy):
      (JSC::JSFunction::displayName):
      * runtime/JSFunction.h: 
      * runtime/JSGlobalData.cpp: Remove all VPtr stealing code and storage, including storeVPtrs, 
      as these vptrs are no longer needed in the codebase.
      * runtime/JSGlobalData.h:
      (JSC::TypedArrayDescriptor::TypedArrayDescriptor): Changed the TypedArrayDescriptor to use 
      ClassInfo rather than the vptr.
      * runtime/JSGlobalObject.cpp: Add static destroy function.
      (JSC::JSGlobalObject::destroy):
      * runtime/JSGlobalObject.h:
      * runtime/JSGlobalThis.cpp: Add trivial destructor assert.
      * runtime/JSNotAnObject.cpp: Ditto.
      * runtime/JSONObject.cpp: Ditto. Remove first arg from isJSArray calls.
      (JSC::Stringifier::Holder::appendNextProperty):
      (JSC::Walker::walk):
      * runtime/JSObject.cpp: 
      (JSC::JSFinalObject::destroy):
      (JSC::JSNonFinalObject::destroy):
      (JSC::JSObject::destroy):
      * runtime/JSObject.h: Add trivial destructor assert for JSObject, remove vtableAnchor 
      from JSNonFinalObject and JSFinalObject, add static destroy for JSFinalObject and 
      JSNonFinalObject, add isJSFinalObject utility function similar to isJSArray, remove all VPtrStealingHack code.
      (JSC::JSObject::finishCreation):
      (JSC::JSNonFinalObject::finishCreation):
      (JSC::JSFinalObject::finishCreation):
      (JSC::isJSFinalObject):
      * runtime/JSPropertyNameIterator.cpp: Add static destroy.
      (JSC::JSPropertyNameIterator::destroy):
      * runtime/JSPropertyNameIterator.h:
      * runtime/JSStaticScopeObject.cpp: Ditto.
      (JSC::JSStaticScopeObject::destroy):
      * runtime/JSStaticScopeObject.h: Ditto. 
      * runtime/JSString.cpp:
      (JSC::JSString::destroy):
      * runtime/JSString.h: Ditto. Remove VPtrStealingHack code. Also remove fixupVPtr code, 
      since we no longer need to fixup vptrs.
      (JSC::jsSingleCharacterString):
      (JSC::jsSingleCharacterSubstring):
      (JSC::jsNontrivialString):
      (JSC::jsString):
      (JSC::jsSubstring8):
      (JSC::jsSubstring):
      (JSC::jsOwnedString):
      (JSC::jsStringBuilder):
      (JSC::isJSString):
      * runtime/JSVariableObject.cpp: 
      (JSC::JSVariableObject::destroy):
      * runtime/JSVariableObject.h: Ditto.
      * runtime/JSWrapperObject.cpp:
      * runtime/JSWrapperObject.h: Add trivial destructor assert.
      * runtime/MathObject.cpp: Ditto.
      * runtime/NativeErrorConstructor.cpp: Ditto.
      * runtime/NumberConstructor.cpp: Ditto.
      * runtime/NumberObject.cpp: Ditto.
      * runtime/NumberPrototype.cpp: Ditto.
      * runtime/ObjectConstructor.cpp: Ditto.
      * runtime/ObjectPrototype.cpp: Ditto.
      * runtime/Operations.h: Remove calls to fixupVPtr, remove first arg to isJSString.
      (JSC::jsString):
      (JSC::jsLess):
      (JSC::jsLessEq):
      * runtime/RegExp.cpp: Add static destroy.
      (JSC::RegExp::destroy):
      * runtime/RegExp.h:
      * runtime/RegExpConstructor.cpp: Add static destroy for RegExpConstructor and RegExpMatchesArray.
      (JSC::RegExpConstructor::destroy):
      (JSC::RegExpMatchesArray::destroy):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      * runtime/RegExpObject.cpp: Add static destroy.
      (JSC::RegExpObject::destroy):
      * runtime/RegExpObject.h:
      * runtime/ScopeChain.cpp: Add trivial destructor assert.
      * runtime/ScopeChain.h:
      * runtime/StrictEvalActivation.cpp: Ditto.
      * runtime/StringConstructor.cpp:
      * runtime/StringObject.cpp: Ditto. Remove vtableAnchor.
      * runtime/StringObject.h:
      * runtime/StringPrototype.cpp: Ditto.
      * runtime/Structure.cpp: Add static destroy.
      (JSC::Structure::destroy):
      * runtime/Structure.h: Move JSCell::finishCreation and JSCell constructor into Structure.h 
      because they need to have the full Structure type to access the ClassInfo to store in the JSCell.
      (JSC::JSCell::setStructure):
      (JSC::JSCell::validatedClassInfo):
      (JSC::JSCell::JSCell):
      (JSC::JSCell::finishCreation):
      * runtime/StructureChain.cpp: Add static destroy.
      (JSC::StructureChain::destroy):
      * runtime/StructureChain.h:
      * wtf/Assertions.h: Add new assertion ASSERT_HAS_TRIVIAL_DESTRUCTOR, which uses clangs 
      ability to tell us when a class has a trivial destructor. We will use this assert 
      more in future patches as we move toward having all JSC objects backed by GC memory, 
      which means moving away from using destructors/finalizers.
      
      Source/JavaScriptGlue: 
      
      * UserObjectImp.cpp: Add static destroy function.
      (UserObjectImp::destroy):
      * UserObjectImp.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Doing everything here that was done to the JSCell hierarchy in JavaScriptCore. 
      See the ChangeLog for this commit for a more in-depth description.
      
      * WebCore.exp.in: Add/remove symbols.
      * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Remove first arg from isJSArray call.
      (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
      * bindings/js/JSDOMBinding.cpp: Add trival destructor assert for DOMConstructorObject 
      and DOMConstructorWithDocument.
      * bindings/js/JSDOMGlobalObject.cpp: Add static destroy.  Add implementation for 
      scriptExecutionContext that dispatches to different functions in subclasses 
      depending on our current ClassInfo.  We do this so that we can get rid of the 
      virtual-ness of scriptExecutionContext, because any virtual functions will throw 
      off the layout of the object and we'll crash at runtime.
      (WebCore::JSDOMGlobalObject::destroy):
      (WebCore::JSDOMGlobalObject::scriptExecutionContext):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowBase.cpp: Add static destroy.
      (WebCore::JSDOMWindowBase::destroy):
      * bindings/js/JSDOMWindowBase.h: De-virtualize scriptExecutionContext.
      * bindings/js/JSDOMWindowShell.cpp: Add static destroy.
      (WebCore::JSDOMWindowShell::destroy):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSDOMWrapper.cpp: Add trivial destructor assert.
      * bindings/js/JSDOMWrapper.h: Add a ClassInfo to JSDOMWrapper since it now overrides 
      a MethodTable function. Remove vtableAnchor virtual function.
      * bindings/js/JSImageConstructor.cpp: Add trivial destructor assert.
      * bindings/js/JSNodeCustom.cpp: Change implementation of pushEventHandlerScope so that 
      it dispatches to the correct function depending on the 
      identity of the class as specified by the ClassInfo.  
      See JSDOMGlobalObject::scriptExecutionContext for explanation.
      (WebCore::JSNode::pushEventHandlerScope):
      * bindings/js/JSWebSocketCustom.cpp: Remove first arg to isJSArray call.
      (WebCore::JSWebSocketConstructor::constructJSWebSocket):
      * bindings/js/JSWorkerContextBase.cpp: Add static destroy.
      (WebCore::JSWorkerContextBase::destroy):
      * bindings/js/JSWorkerContextBase.h: 
      * bindings/js/ScriptValue.cpp: Remove first arg to isJSArray call.
      (WebCore::jsToInspectorValue): 
      * bindings/js/SerializedScriptValue.cpp: Ditto.
      (WebCore::CloneSerializer::isArray):
      (WebCore::CloneSerializer::getSparseIndex):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader): Remove virtual-ness of any custom pushEventHandlerScope (see 
      JSNodeCustom::pushEventHandlerScope for explanation).  Remove virtual toBoolean 
      for anybody who masquerades as undefined, since our JSObject implementation handles 
      this based on the TypeInfo in the Structure. Add trivial destructor assert for any 
      class other than DOMWindow or WorkerContexts.
      (GenerateImplementation): Change ClassInfo definitions to use Base::s_info, since 
      typing the parent class more than once is duplication of information and increases 
      the likelihood of mistakes.  Pass ClassInfo to TypeArrayDescriptors instead of vptr. 
      (GenerateConstructorDefinition): Add trivial destructor assert for all generated constructors.
      * bridge/c/CRuntimeObject.cpp: Remove empty virtual destructor.
      * bridge/c/CRuntimeObject.h: 
      * bridge/jni/jsc/JavaRuntimeObject.cpp: Ditto.
      * bridge/jni/jsc/JavaRuntimeObject.h: 
      * bridge/objc/ObjCRuntimeObject.h: Ditto.
      * bridge/objc/ObjCRuntimeObject.mm:
      * bridge/objc/objc_runtime.h: Add static destroy for ObjcFallbackObjectImp. De-virtualize 
      toBoolean in the short term.  Need longer term fix.
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::destroy):
      * bridge/qt/qt_runtime.cpp: Add static destroy to QtRuntimeMethod.
      (JSC::Bindings::QtRuntimeMethod::destroy):
      * bridge/qt/qt_runtime.h: De-virtualize ~QtRuntimeMethod.
      * bridge/runtime_array.cpp: De-virtualize destructor. Add static destroy.
      (JSC::RuntimeArray::destroy):
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp: Remove vtableAnchor. Add static destroy.
      (JSC::RuntimeMethod::destroy):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp: Add static destroy.
      (JSC::Bindings::RuntimeObject::destroy):
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/ProxyRuntimeObject.h: Remove empty virtual destructor.
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      
      Source/WebKit2: 
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Add trivial destructor assert.
      * WebProcess/Plugins/Netscape/JSNPObject.cpp: Add static destroy.
      (WebKit::JSNPObject::destroy):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      * win/WebKit2.def: Add/remove necessary symbols.
      * win/WebKit2CFLite.def: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c58d54d7
  12. 14 Nov, 2011 1 commit
    • abarth@webkit.org's avatar
      DateMath.cpp should not depend on JavaScriptCore · 2e4652ac
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=71747
      
      Reviewed by Darin Adler.
      
      This patch moves the JSC-specific parts of DateMath into JSDateMath in
      JavaScriptCore.  There shouldn't be any behavior change.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * runtime/DateConstructor.cpp:
      * runtime/DateConversion.cpp:
      * runtime/DateInstance.cpp:
      * runtime/DateInstanceCache.h:
      * runtime/DatePrototype.cpp:
      * runtime/InitializeThreading.cpp:
      * runtime/JSDateMath.cpp: Copied from Source/JavaScriptCore/wtf/DateMath.cpp.
      (JSC::timeToMS):
      (JSC::msToSeconds):
      * runtime/JSDateMath.h: Copied from Source/JavaScriptCore/wtf/DateMath.h.
      * wtf/DateMath.cpp:
      (WTF::isLeapYear):
      (WTF::msToDays):
      (WTF::msToMinutes):
      (WTF::msToHours):
      (WTF::parseDateFromNullTerminatedCharacters):
      (WTF::makeRFC2822DateString):
      * wtf/DateMath.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e4652ac
  13. 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
  14. 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
  15. 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
  16. 23 Oct, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Remove getConstructDataVirtual · 99f1bca0
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70638
      
      Reviewed by Darin Adler.
      
      Source/JavaScriptCore: 
      
      Removed all declarations and definitions of getConstructDataVirtual.
      Also replaced all call sites to getConstructDataVirtual with a 
      corresponding lookup in the MethodTable.
      
      * API/JSCallbackConstructor.cpp:
      * API/JSCallbackConstructor.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      * API/JSObjectRef.cpp:
      (JSObjectIsConstructor):
      (JSObjectCallAsConstructor):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * dfg/DFGOperations.cpp:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayConstructor.h:
      * runtime/BooleanConstructor.cpp:
      * runtime/BooleanConstructor.h:
      * runtime/DateConstructor.cpp:
      * runtime/DateConstructor.h:
      * runtime/Error.h:
      (JSC::StrictModeTypeErrorFunction::getConstructData):
      * runtime/ErrorConstructor.cpp:
      * runtime/ErrorConstructor.h:
      * runtime/FunctionConstructor.cpp:
      * runtime/FunctionConstructor.h:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      * runtime/JSFunction.h:
      * runtime/JSObject.h:
      (JSC::getConstructData):
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberConstructor.h:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpConstructor.h:
      * runtime/StringConstructor.cpp:
      * runtime/StringConstructor.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Removed all declarations and definitions of getConstructDataVirtual.
      Also replaced all call sites to getConstructDataVirtual with a 
      corresponding lookup in the MethodTable.
      
      * WebCore.exp.in:
      * bindings/js/JSAudioConstructor.cpp:
      * bindings/js/JSAudioConstructor.h:
      * bindings/js/JSImageConstructor.cpp:
      * bindings/js/JSImageConstructor.h:
      * bindings/js/JSOptionConstructor.cpp:
      * bindings/js/JSOptionConstructor.h:
      * bindings/js/ScriptFunctionCall.cpp:
      (WebCore::ScriptFunctionCall::construct):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateConstructorDeclaration):
      (GenerateConstructorDefinition):
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      Removed all declarations and definitions of getConstructDataVirtual.
      Also replaced all call sites to getConstructDataVirtual with a 
      corresponding lookup in the MethodTable.
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::construct):
      
      Source/WebKit2: 
      
      Removed all declarations and definitions of getConstructDataVirtual.
      Also replaced all call sites to getConstructDataVirtual 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@98203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      99f1bca0
  17. 14 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
  18. 13 Oct, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Rename virtual getConstructData to getConstructDataVirtual · 8fb2b748
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69872
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Renamed virtual getConstructData functions to getConstructDataVirtual to
      avoid conflicts when we add static getConstructData to the MethodTable.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::getConstructDataVirtual):
      * API/JSCallbackConstructor.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getConstructDataVirtual):
      * API/JSObjectRef.cpp:
      (JSObjectIsConstructor):
      (JSObjectCallAsConstructor):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * dfg/DFGOperations.cpp:
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::getConstructDataVirtual):
      * runtime/ArrayConstructor.h:
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::getConstructDataVirtual):
      * runtime/BooleanConstructor.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::getConstructDataVirtual):
      * runtime/DateConstructor.h:
      * runtime/Error.h:
      (JSC::StrictModeTypeErrorFunction::getConstructDataVirtual):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::getConstructDataVirtual):
      * runtime/ErrorConstructor.h:
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::getConstructDataVirtual):
      * runtime/FunctionConstructor.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::getConstructDataVirtual):
      * runtime/JSCell.h:
      (JSC::getConstructData):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::getConstructDataVirtual):
      * runtime/JSFunction.h:
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::getConstructDataVirtual):
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getConstructDataVirtual):
      * runtime/NumberConstructor.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::getConstructDataVirtual):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::getConstructDataVirtual):
      * runtime/RegExpConstructor.h:
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::getConstructDataVirtual):
      * runtime/StringConstructor.h:
      
      Source/WebCore:
      
      No new tests.
      
      Renamed virtual getConstructData functions to getConstructDataVirtual to
      avoid conflicts when we add static getConstructData to the MethodTable.
      
      * WebCore.exp.in:
      * bindings/js/JSAudioConstructor.cpp:
      (WebCore::JSAudioConstructor::getConstructDataVirtual):
      * bindings/js/JSAudioConstructor.h:
      * bindings/js/JSImageConstructor.cpp:
      (WebCore::JSImageConstructor::getConstructDataVirtual):
      * bindings/js/JSImageConstructor.h:
      * bindings/js/JSOptionConstructor.cpp:
      (WebCore::JSOptionConstructor::getConstructDataVirtual):
      * bindings/js/JSOptionConstructor.h:
      * bindings/js/ScriptFunctionCall.cpp:
      (WebCore::ScriptFunctionCall::construct):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateConstructorDeclaration):
      (GenerateConstructorDefinition):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterfaceConstructor::getConstructDataVirtual):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::getConstructDataVirtual):
      * bridge/runtime_object.h:
      
      Source/WebKit/mac:
      
      Renamed virtual getConstructData functions to getConstructDataVirtual to
      avoid conflicts when we add static getConstructData to the MethodTable.
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::construct):
      
      Source/WebKit2:
      
      Renamed virtual getConstructData functions to getConstructDataVirtual to
      avoid conflicts when we add static getConstructData to the MethodTable.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::getConstructDataVirtual):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8fb2b748
  19. 10 Oct, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Remove getCallDataVirtual methods · 6fb47cf1
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69186
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Removed all getCallDataVirtual methods and replaced their call sites
      with an explicit lookup in the MethodTable.
      
      * API/JSCallbackFunction.cpp:
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      * API/JSObjectRef.cpp:
      (JSObjectIsFunction):
      (JSObjectCallAsFunction):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayConstructor.h:
      * runtime/BooleanConstructor.cpp:
      * runtime/BooleanConstructor.h:
      * runtime/DateConstructor.cpp:
      * runtime/DateConstructor.h:
      
      Moved StrictModeTypeErrorFunction to Error.h in order to be able to include
      the class definition in JSGlobalObject.cpp.
      * runtime/Error.cpp:
      (JSC::createTypeErrorFunction):
      * runtime/Error.h:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      (JSC::StrictModeTypeErrorFunction::create):
      (JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
      (JSC::StrictModeTypeErrorFunction::getConstructData):
      (JSC::StrictModeTypeErrorFunction::callThrowTypeError):
      (JSC::StrictModeTypeErrorFunction::getCallData):
      (JSC::StrictModeTypeErrorFunction::createStructure):
      * runtime/ErrorConstructor.cpp:
      * runtime/ErrorConstructor.h:
      * runtime/FunctionConstructor.cpp:
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      * runtime/FunctionPrototype.h:
      
      To allow subclasses of InternalFunction (e.g. QtRuntimeMethod) to not have
      to declare their own ClassInfo if they don't override getCallData, provided
      an implementation that calls ASSERT_NOT_REACHED if called, providing roughly the same
      functionality as of the pure virtual method InternalFunction used to have.
      Also made this new implementation protected rather than private for the same reason.
      Also added an ASSERT in InternalFunction::finishCreation to make sure that whatever
      object is being created provides their own implementation of getCallData.  This
      just makes execution fail earlier in a place where the source of the error is
      easy to trace.  These ASSERTs are better than putting a null in the MethodTable because
      they appear much more intentional to anybody who fails to provide their own
      implementation or who tries to explicitly call InternalFunction::getCallData.
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::finishCreation):
      (JSC::InternalFunction::getCallData):
      * runtime/InternalFunction.h:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      * runtime/JSFunction.h:
      
      Added a global structure to JSGlobalObject for StrictModeTypeErrorFunction to enable
      it to be reused rather than creating a new Structure every time we instantiate it.
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::visitChildren):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::strictModeTypeErrorFunctionStructure):
      * runtime/JSONObject.cpp:
      (JSC::Stringifier::Stringifier):
      (JSC::Stringifier::toJSON):
      (JSC::Stringifier::appendStringifiedValue):
      * runtime/JSObject.cpp:
      (JSC::JSObject::put):
      * runtime/JSObject.h:
      (JSC::getCallData):
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberConstructor.h:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectConstructor.h:
      * runtime/Operations.cpp:
      (JSC::jsTypeStringForValue):
      (JSC::jsIsObjectType):
      (JSC::jsIsFunctionType):
      * runtime/PropertySlot.cpp:
      (JSC::PropertySlot::functionGetter):
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpConstructor.h:
      * runtime/StringConstructor.cpp:
      * runtime/StringConstructor.h:
      * runtime/Structure.h:
      
      Source/JavaScriptGlue:
      
      Removed all getCallDataVirtual methods and replaced their call sites
      with an explicit lookup in the MethodTable.
      
      * JSValueWrapper.cpp:
      (JSValueWrapper::JSObjectCallFunction):
      * UserObjectImp.cpp:
      * UserObjectImp.h:
      
      Source/WebCore:
      
      No new tests.
      
      Removed all getCallDataVirtual methods and replaced their call sites
      with an explicit lookup in the MethodTable.
      
      * WebCore.exp.in:
      * bindings/js/JSCallbackData.cpp:
      (WebCore::JSCallbackData::invokeCallback):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/js/JSErrorHandler.cpp:
      (WebCore::JSErrorHandler::handleEvent):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      * bindings/js/JSHTMLAppletElementCustom.cpp:
      * bindings/js/JSHTMLEmbedElementCustom.cpp:
      * bindings/js/JSHTMLObjectElementCustom.cpp:
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::JSInjectedScriptHost::evaluate):
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::runtimeObjectGetCallData):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeConnectionMethod::call):
      (JSC::Bindings::isJavaScriptFunction):
      * bridge/qt/qt_runtime.h:
      (JSC::Bindings::QtRuntimeMetaMethod::create):
      (JSC::Bindings::QtRuntimeMetaMethod::createStructure):
      (JSC::Bindings::QtRuntimeConnectionMethod::create):
      (JSC::Bindings::QtRuntimeConnectionMethod::createStructure):
      * bridge/runtime_method.cpp:
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      
      Source/WebKit/mac:
      
      Removed all getCallDataVirtual methods and replaced their call sites
      with an explicit lookup in the MethodTable.
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::invokeDefault):
      
      Source/WebKit2:
      
      Removed all getCallDataVirtual methods and replaced their call sites
      with an explicit lookup in the MethodTable.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6fb47cf1
  20. 08 Oct, 2011 3 commits
    • mhahnenberg@apple.com's avatar
      Add static version of JSCell::getConstructData · 79c8e6e4
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69673
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Added static version of getConstructData to all classes that
      override it and changed the virtual versions to call the static
      versions.  This is the first step in de-virtualizing JSCell::getConstructData.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::getConstructData):
      * API/JSCallbackConstructor.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getConstructData):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::getConstructData):
      * runtime/ArrayConstructor.h:
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::getConstructData):
      * runtime/BooleanConstructor.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::getConstructData):
      * runtime/DateConstructor.h:
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::getConstructData):
      * runtime/ErrorConstructor.h:
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::getConstructData):
      * runtime/FunctionConstructor.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::getConstructData):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::getConstructData):
      * runtime/JSFunction.h:
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::getConstructData):
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getConstructData):
      * runtime/NumberConstructor.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::getConstructData):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::getConstructData):
      * runtime/RegExpConstructor.h:
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::getConstructData):
      * runtime/StringConstructor.h:
      
      Source/WebCore:
      
      No new tests.
      
      Added static version of getConstructData to all classes that
      override it and changed the virtual versions to call the static
      versions.  This is the first step in de-virtualizing JSCell::getConstructData.
      
      * bindings/js/JSAudioConstructor.cpp:
      (WebCore::JSAudioConstructor::getConstructData):
      * bindings/js/JSAudioConstructor.h:
      * bindings/js/JSImageConstructor.cpp:
      (WebCore::JSImageConstructor::getConstructData):
      * bindings/js/JSImageConstructor.h:
      * bindings/js/JSOptionConstructor.cpp:
      (WebCore::JSOptionConstructor::getConstructData):
      * bindings/js/JSOptionConstructor.h:
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateConstructorDeclaration):
      (GenerateConstructorDefinition):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterfaceConstructor::getConstructData):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::getConstructData):
      * bridge/runtime_object.h:
      
      Source/WebKit2:
      
      Added static version of getConstructData to all classes that
      override it and changed the virtual versions to call the static
      versions.  This is the first step in de-virtualizing JSCell::getConstructData.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::getConstructData):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      79c8e6e4
    • 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
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r96996. · c7d21fd4
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/96996
      https://bugs.webkit.org/show_bug.cgi?id=69697
      
      It broke all tests on the Qt bot (Requested by Ossy_night on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-10-08
      
      Source/JavaScriptCore:
      
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::getCallDataVirtual):
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getCallDataVirtual):
      * API/JSObjectRef.cpp:
      (JSObjectIsFunction):
      (JSObjectCallAsFunction):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::getCallDataVirtual):
      * runtime/ArrayConstructor.h:
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::getCallDataVirtual):
      * runtime/BooleanConstructor.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::getCallDataVirtual):
      * runtime/DateConstructor.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      (JSC::StrictModeTypeErrorFunction::create):
      (JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
      (JSC::StrictModeTypeErrorFunction::getConstructData):
      (JSC::StrictModeTypeErrorFunction::callThrowTypeError):
      (JSC::StrictModeTypeErrorFunction::getCallDataVirtual):
      (JSC::StrictModeTypeErrorFunction::getCallData):
      (JSC::StrictModeTypeErrorFunction::createStructure):
      (JSC::createTypeErrorFunction):
      * runtime/Error.h:
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::getCallDataVirtual):
      * runtime/ErrorConstructor.h:
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::getCallDataVirtual):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::getCallDataVirtual):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::finishCreation):
      * runtime/InternalFunction.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::getCallDataVirtual):
      * runtime/JSCell.h:
      (JSC::getCallData):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::getCallDataVirtual):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::visitChildren):
      * runtime/JSGlobalObject.h:
      * runtime/JSONObject.cpp:
      (JSC::Stringifier::Stringifier):
      (JSC::Stringifier::toJSON):
      (JSC::Stringifier::appendStringifiedValue):
      * runtime/JSObject.cpp:
      (JSC::JSObject::put):
      * runtime/JSObject.h:
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::getCallDataVirtual):
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getCallDataVirtual):
      * runtime/NumberConstructor.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::getCallDataVirtual):
      * runtime/ObjectConstructor.h:
      * runtime/Operations.cpp:
      (JSC::jsTypeStringForValue):
      (JSC::jsIsObjectType):
      (JSC::jsIsFunctionType):
      * runtime/PropertySlot.cpp:
      (JSC::PropertySlot::functionGetter):
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::getCallDataVirtual):
      * runtime/RegExpConstructor.h:
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::getCallDataVirtual):
      * runtime/StringConstructor.h:
      * runtime/Structure.h:
      
      Source/JavaScriptGlue:
      
      * JSValueWrapper.cpp:
      (JSValueWrapper::JSObjectCallFunction):
      * UserObjectImp.cpp:
      (UserObjectImp::getCallDataVirtual):
      * UserObjectImp.h:
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * bindings/js/JSCallbackData.cpp:
      (WebCore::JSCallbackData::invokeCallback):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/js/JSErrorHandler.cpp:
      (WebCore::JSErrorHandler::handleEvent):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      (WebCore::JSHTMLAllCollection::getCallDataVirtual):
      * bindings/js/JSHTMLAppletElementCustom.cpp:
      (WebCore::JSHTMLAppletElement::getCallDataVirtual):
      * bindings/js/JSHTMLEmbedElementCustom.cpp:
      (WebCore::JSHTMLEmbedElement::getCallDataVirtual):
      * bindings/js/JSHTMLObjectElementCustom.cpp:
      (WebCore::JSHTMLObjectElement::getCallDataVirtual):
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::JSInjectedScriptHost::evaluate):
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::runtimeObjectGetCallData):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::getCallDataVirtual):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMetaMethod::getCallDataVirtual):
      (JSC::Bindings::QtRuntimeConnectionMethod::call):
      (JSC::Bindings::QtRuntimeConnectionMethod::getCallDataVirtual):
      (JSC::Bindings::isJavaScriptFunction):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::getCallDataVirtual):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::getCallDataVirtual):
      * bridge/runtime_object.h:
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::invokeDefault):
      
      Source/WebKit2:
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::getCallDataVirtual):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::getCallDataVirtual):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c7d21fd4
  21. 07 Oct, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Remove getCallDataVirtual methods · 597be029
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69186
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      Removed all getCallDataVirtual methods and replaced their call sites 
      with an explicit lookup in the MethodTable.
      
      * API/JSCallbackFunction.cpp:
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      * API/JSObjectRef.cpp:
      (JSObjectIsFunction):
      (JSObjectCallAsFunction):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayConstructor.h:
      * runtime/BooleanConstructor.cpp:
      * runtime/BooleanConstructor.h:
      * runtime/DateConstructor.cpp:
      * runtime/DateConstructor.h:
      * runtime/Error.cpp:
      (JSC::createTypeErrorFunction):
      
      Moved StrictModeTypeErrorFunction to Error.h in order to be able to include 
      the class definition in JSGlobalObject.cpp.
      * runtime/Error.h:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      (JSC::StrictModeTypeErrorFunction::create):
      (JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
      (JSC::StrictModeTypeErrorFunction::getConstructData):
      (JSC::StrictModeTypeErrorFunction::callThrowTypeError):
      (JSC::StrictModeTypeErrorFunction::getCallData):
      (JSC::StrictModeTypeErrorFunction::createStructure):
      * runtime/ErrorConstructor.cpp:
      * runtime/ErrorConstructor.h:
      * runtime/FunctionConstructor.cpp:
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      * runtime/FunctionPrototype.h:
      
      To allow subclasses of InternalFunction (e.g. QtRuntimeMethod) to not have 
      to declare their own ClassInfo if they don't override getCallData, provided 
      an implementation that calls ASSERT_NOT_REACHED if called, providing roughly the same 
      functionality as of the pure virtual method InternalFunction used to have.
      Also made this new implementation protected rather than private for the same reason.
      Also added an ASSERT in InternalFunction::finishCreation to make sure that whatever 
      object is being created provides their own implementation of getCallData.  This 
      just makes execution fail earlier in a place where the source of the error is 
      easy to trace.  These ASSERTs are better than putting a null in the MethodTable because
      they appear much more intentional to anybody who fails to provide their own 
      implementation or who tries to explicitly call InternalFunction::getCallData.
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::finishCreation):
      (JSC::InternalFunction::getCallData):
      * runtime/InternalFunction.h:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      * runtime/JSFunction.h:
      
      Added a global structure to JSGlobalObject for StrictModeTypeErrorFunction to enable 
      it to be reused rather than creating a new Structure every time we instantiate it.
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::visitChildren):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::strictModeTypeErrorFunctionStructure):
      * runtime/JSONObject.cpp:
      (JSC::Stringifier::Stringifier):
      (JSC::Stringifier::toJSON):
      (JSC::Stringifier::appendStringifiedValue):
      * runtime/JSObject.cpp:
      (JSC::JSObject::put):
      * runtime/JSObject.h:
      (JSC::getCallData):
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberConstructor.h:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectConstructor.h:
      * runtime/Operations.cpp:
      (JSC::jsTypeStringForValue):
      (JSC::jsIsObjectType):
      (JSC::jsIsFunctionType):
      * runtime/PropertySlot.cpp:
      (JSC::PropertySlot::functionGetter):
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpConstructor.h:
      * runtime/StringConstructor.cpp:
      * runtime/StringConstructor.h:
      * runtime/Structure.h:
      
      Source/JavaScriptGlue: 
      
      Removed all getCallDataVirtual methods and replaced their call sites 
      with an explicit lookup in the MethodTable.
      
      * JSValueWrapper.cpp:
      (JSValueWrapper::JSObjectCallFunction):
      * UserObjectImp.cpp:
      * UserObjectImp.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Removed all getCallDataVirtual methods and replaced their call sites 
      with an explicit lookup in the MethodTable.
      
      * WebCore.exp.in:
      * bindings/js/JSCallbackData.cpp:
      (WebCore::JSCallbackData::invokeCallback):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/js/JSErrorHandler.cpp:
      (WebCore::JSErrorHandler::handleEvent):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      * bindings/js/JSHTMLAppletElementCustom.cpp:
      * bindings/js/JSHTMLEmbedElementCustom.cpp:
      * bindings/js/JSHTMLObjectElementCustom.cpp:
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::JSInjectedScriptHost::evaluate):
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::runtimeObjectGetCallData):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeConnectionMethod::call):
      (JSC::Bindings::isJavaScriptFunction):
      * bridge/qt/qt_runtime.h:
      (JSC::Bindings::QtRuntimeMetaMethod::createStructure):
      (JSC::Bindings::QtRuntimeConnectionMethod::createStructure):
      * bridge/runtime_method.cpp:
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      Removed all getCallDataVirtual methods and replaced their call sites 
      with an explicit lookup in the MethodTable.
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::invokeDefault):
      
      Source/WebKit2: 
      
      Removed all getCallDataVirtual methods and replaced their call sites 
      with an explicit lookup in the MethodTable.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      597be029
  22. 27 Sep, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Source/JavaScriptCore: Add static version of JSCell::getCallData · 2413eb86
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68741
      
      Reviewed by Darin Adler.
      
      In this patch we just extract the bodies of the virtual getCallData methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of getCallData into our own method table stored in 
      ClassInfo.  We need to convert the methods to static methods because static methods 
      can be represented as function pointers rather than pointers to member functions, and
      function pointers are smaller and faster to call than pointers to member functions.
      
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::getCallDataVirtual):
      (JSC::JSCallbackFunction::getCallData):
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getCallDataVirtual):
      (JSC::::getCallData):
      * API/JSObjectRef.cpp:
      (JSObjectIsFunction):
      (JSObjectCallAsFunction):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::getCallDataVirtual):
      (JSC::ArrayConstructor::getCallData):
      * runtime/ArrayConstructor.h:
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::getCallDataVirtual):
      (JSC::BooleanConstructor::getCallData):
      * runtime/BooleanConstructor.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::getCallDataVirtual):
      (JSC::DateConstructor::getCallData):
      * runtime/DateConstructor.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::getCallDataVirtual):
      (JSC::StrictModeTypeErrorFunction::getCallData):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::getCallDataVirtual):
      (JSC::ErrorConstructor::getCallData):
      * runtime/ErrorConstructor.h:
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::getCallDataVirtual):
      (JSC::FunctionConstructor::getCallData):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::getCallDataVirtual):
      (JSC::FunctionPrototype::getCallData):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::getCallDataVirtual):
      (JSC::JSCell::getCallData):
      * runtime/JSCell.h:
      (JSC::getCallData):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::getCallDataVirtual):
      (JSC::JSFunction::getCallData):
      * runtime/JSFunction.h:
      * runtime/JSONObject.cpp:
      (JSC::Stringifier::Stringifier):
      (JSC::Stringifier::toJSON):
      (JSC::Stringifier::appendStringifiedValue):
      * runtime/JSObject.cpp:
      (JSC::JSObject::put):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::getCallDataVirtual):
      (JSC::NativeErrorConstructor::getCallData):
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getCallDataVirtual):
      (JSC::NumberConstructor::getCallData):
      * runtime/NumberConstructor.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::getCallDataVirtual):
      (JSC::ObjectConstructor::getCallData):
      * runtime/ObjectConstructor.h:
      * runtime/Operations.cpp:
      (JSC::jsTypeStringForValue):
      (JSC::jsIsObjectType):
      (JSC::jsIsFunctionType):
      * runtime/PropertySlot.cpp:
      (JSC::PropertySlot::functionGetter):
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::getCallDataVirtual):
      (JSC::RegExpConstructor::getCallData):
      * runtime/RegExpConstructor.h:
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::getCallDataVirtual):
      (JSC::StringConstructor::getCallData):
      * runtime/StringConstructor.h:
      
      Source/JavaScriptGlue: Add static version of JSCell::getCallData
      https://bugs.webkit.org/show_bug.cgi?id=68741
      
      Reviewed by Darin Adler.
      
      In this patch we just extract the bodies of the virtual getCallData methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of getCallData into our own method table stored in 
      ClassInfo.  We need to convert the methods to static methods because static methods 
      can be represented as function pointers rather than pointers to member functions, and
      function pointers are smaller and faster to call than pointers to member functions.
      
      * JSValueWrapper.cpp:
      (JSValueWrapper::JSObjectCallFunction):
      * UserObjectImp.cpp:
      (UserObjectImp::getCallDataVirtual):
      (UserObjectImp::getCallData):
      * UserObjectImp.h:
      
      Source/WebCore: Add static version of JSCell::visitChildren
      https://bugs.webkit.org/show_bug.cgi?id=68404
      
      Reviewed by Darin Adler.
      
      No new tests.
      
      In this patch we just extract the bodies of the virtual visitChildren methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of visitChildren into our own custom vtable stored in 
      ClassInfo.  We need to convert the methods to static methods in order to be 
      able to more easily store and refer to them in our custom vtable since normal 
      member methods store some implicit information in their types, making it 
      impossible to store them generically in ClassInfo.
      
      * WebCore.exp.in:
      * bindings/js/JSAttrCustom.cpp:
      (WebCore::JSAttr::visitChildrenVirtual):
      (WebCore::JSAttr::visitChildren):
      * bindings/js/JSAudioContextCustom.cpp:
      (WebCore::JSAudioContext::visitChildrenVirtual):
      (WebCore::JSAudioContext::visitChildren):
      * bindings/js/JSCSSRuleCustom.cpp:
      (WebCore::JSCSSRule::visitChildrenVirtual):
      (WebCore::JSCSSRule::visitChildren):
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      (WebCore::JSCSSStyleDeclaration::visitChildrenVirtual):
      (WebCore::JSCSSStyleDeclaration::visitChildren):
      * bindings/js/JSCanvasRenderingContextCustom.cpp:
      (WebCore::JSCanvasRenderingContext::visitChildrenVirtual):
      (WebCore::JSCanvasRenderingContext::visitChildren):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::visitChildrenVirtual):
      (WebCore::JSDOMGlobalObject::visitChildren):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::visitChildrenVirtual):
      (WebCore::JSDOMWindow::visitChildren):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::visitChildrenVirtual):
      (WebCore::JSDOMWindowShell::visitChildren):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
      (WebCore::JSJavaScriptAudioNode::visitChildrenVirtual):
      (WebCore::JSJavaScriptAudioNode::visitChildren):
      * bindings/js/JSMessageChannelCustom.cpp:
      (WebCore::JSMessageChannel::visitChildrenVirtual):
      (WebCore::JSMessageChannel::visitChildren):
      * bindings/js/JSMessagePortCustom.cpp:
      (WebCore::JSMessagePort::visitChildrenVirtual):
      (WebCore::JSMessagePort::visitChildren):
      * bindings/js/JSNamedNodeMapCustom.cpp:
      (WebCore::JSNamedNodeMap::visitChildrenVirtual):
      (WebCore::JSNamedNodeMap::visitChildren):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::visitChildrenVirtual):
      (WebCore::JSNode::visitChildren):
      * bindings/js/JSNodeFilterCustom.cpp:
      (WebCore::JSNodeFilter::visitChildrenVirtual):
      (WebCore::JSNodeFilter::visitChildren):
      * bindings/js/JSNodeIteratorCustom.cpp:
      (WebCore::JSNodeIterator::visitChildrenVirtual):
      (WebCore::JSNodeIterator::visitChildren):
      * bindings/js/JSSVGElementInstanceCustom.cpp:
      (WebCore::JSSVGElementInstance::visitChildrenVirtual):
      (WebCore::JSSVGElementInstance::visitChildren):
      * bindings/js/JSSharedWorkerCustom.cpp:
      (WebCore::JSSharedWorker::visitChildrenVirtual):
      (WebCore::JSSharedWorker::visitChildren):
      * bindings/js/JSStyleSheetCustom.cpp:
      (WebCore::JSStyleSheet::visitChildrenVirtual):
      (WebCore::JSStyleSheet::visitChildren):
      * bindings/js/JSTreeWalkerCustom.cpp:
      (WebCore::JSTreeWalker::visitChildrenVirtual):
      (WebCore::JSTreeWalker::visitChildren):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::JSWebGLRenderingContext::visitChildrenVirtual):
      (WebCore::JSWebGLRenderingContext::visitChildren):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::visitChildrenVirtual):
      (WebCore::JSWorkerContext::visitChildren):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::visitChildrenVirtual):
      (WebCore::JSXMLHttpRequest::visitChildren):
      * bindings/js/JSXPathResultCustom.cpp:
      (WebCore::JSXPathResult::visitChildrenVirtual):
      (WebCore::JSXPathResult::visitChildren):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::visitChildrenVirtual):
      (WebCore::JSTestObj::visitChildren):
      * bindings/scripts/test/JS/JSTestObj.h:
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::visitChildrenVirtual):
      (JSC::Bindings::QtRuntimeObject::visitChildren):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMetaMethod::visitChildrenVirtual):
      (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
      * bridge/qt/qt_runtime.h:
      * workers/WorkerContext.h:
      
      Source/WebKit/mac: Add static version of JSCell::getCallData
      https://bugs.webkit.org/show_bug.cgi?id=68741
      
      Reviewed by Darin Adler.
      
      In this patch we just extract the bodies of the virtual getCallData methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of getCallData into our own method table stored in 
      ClassInfo.  We need to convert the methods to static methods because static methods 
      can be represented as function pointers rather than pointers to member functions, and
      function pointers are smaller and faster to call than pointers to member functions.
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::invokeDefault):
      
      Source/WebKit2: Add static version of JSCell::getCallData
      https://bugs.webkit.org/show_bug.cgi?id=68741
      
      Reviewed by Darin Adler.
      
      In this patch we just extract the bodies of the virtual getCallData methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of getCallData into our own method table stored in 
      ClassInfo.  We need to convert the methods to static methods because static methods 
      can be represented as function pointers rather than pointers to member functions, and
      function pointers are smaller and faster to call than pointers to member functions.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::getCallDataVirtual):
      (WebKit::JSNPMethod::getCallData):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::getCallDataVirtual):
      (WebKit::JSNPObject::getCallData):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2413eb86
  23. 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
  24. 14 Sep, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Unzip initialization lists and constructors in JSCell hierarchy (6/7) · 5e10972f
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67692
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Completed the sixth 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 fifth 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/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::JSCallbackFunction):
      * API/JSCallbackFunction.h:
      (JSC::JSCallbackFunction::create):
      * jsc.cpp:
      (GlobalObject::create):
      (GlobalObject::GlobalObject):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      * runtime/ArrayConstructor.h:
      (JSC::ArrayConstructor::create):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::BooleanConstructor):
      * runtime/BooleanConstructor.h:
      (JSC::BooleanConstructor::create):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      * runtime/BooleanPrototype.h:
      (JSC::BooleanPrototype::create):
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      * runtime/DateConstructor.h:
      (JSC::DateConstructor::create):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      * runtime/DatePrototype.h:
      (JSC::DatePrototype::create):
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      (JSC::StrictModeTypeErrorFunction::create):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::ErrorConstructor):
      * runtime/ErrorConstructor.h:
      (JSC::ErrorConstructor::create):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::FunctionConstructor):
      * runtime/FunctionConstructor.h:
      (JSC::FunctionConstructor::create):
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::FunctionPrototype):
      * runtime/FunctionPrototype.h:
      (JSC::FunctionPrototype::create):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::create):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::finishCreation):
      * runtime/NativeErrorPrototype.h:
      (JSC::NativeErrorPrototype::create):
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::NumberConstructor):
      * runtime/NumberConstructor.h:
      (JSC::NumberConstructor::create):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      * runtime/NumberPrototype.h:
      (JSC::NumberPrototype::create):
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      * runtime/ObjectConstructor.h:
      (JSC::ObjectConstructor::create):
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::RegExpConstructor):
      * runtime/RegExpConstructor.h:
      (JSC::RegExpConstructor::create):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      * runtime/RegExpPrototype.h:
      (JSC::RegExpPrototype::create):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      * runtime/StringConstructor.h:
      (JSC::StringConstructor::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::create):
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      * runtime/StringPrototype.h:
      (JSC::StringPrototype::create):
      
      Source/JavaScriptGlue:
      
      Completed the sixth 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 fifth 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):
      * JSRun.h:
      (JSGlueGlobalObject::create):
      
      Source/WebCore:
      
      No new tests.
      
      Completed the sixth 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 fifth 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):
      (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
      (WebCore::DOMConstructorWithDocument::finishCreation):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowBase.cpp:
      (WebCore::JSDOMWindowBase::JSDOMWindowBase):
      (WebCore::JSDOMWindowBase::finishCreation):
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSWorkerContextBase.cpp:
      (WebCore::JSWorkerContextBase::JSWorkerContextBase):
      (WebCore::JSWorkerContextBase::finishCreation):
      * bindings/js/JSWorkerContextBase.h:
      * bindings/scripts/CodeGeneratorJS.pm:
      
      Added a finishCreation declaration and Moved the finishCreation call into the
      create method for all classes except for subclasses of JSWorkerContextBase and
      JSDOMWindowBase because those classes are on the next level, and it's easier
      to do all of these classes in one fell swoop rather than level by level.
      (GenerateHeader):
      Added the implementation of the finishCreation method for the classes described above.
      (GenerateImplementation):
      Also added the finishCreation calls to the autogenerated DOM constructor classes.
      (GenerateConstructorDeclaration):
      (GenerateConstructorDefinition):
      
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterfaceConstructor::create):
      (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor):
      (WebCore::JSTestInterfaceConstructor::finishCreation):
      (WebCore::JSTestInterface::JSTestInterface):
      (WebCore::JSTestInterface::finishCreation):
      * bindings/scripts/test/JS/JSTestInterface.h:
      (WebCore::JSTestInterface::create):
      (WebCore::JSTestInterfacePrototype::create):
      (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListenerConstructor::create):
      (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor):
      (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
      (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
      (WebCore::JSTestMediaQueryListListener::finishCreation):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
      (WebCore::JSTestMediaQueryListListener::create):
      (WebCore::JSTestMediaQueryListListenerPrototype::create):
      (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObjConstructor::create):
      (WebCore::JSTestObjConstructor::JSTestObjConstructor):
      (WebCore::JSTestObjConstructor::finishCreation):
      (WebCore::JSTestObj::JSTestObj):
      (WebCore::JSTestObj::finishCreation):
      * bindings/scripts/test/JS/JSTestObj.h:
      (WebCore::JSTestObj::create):
      (WebCore::JSTestObjPrototype::create):
      (WebCore::JSTestObjPrototype::JSTestObjPrototype):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
      (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor):
      (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
      (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
      (WebCore::JSTestSerializedScriptValueInterface::finishCreation):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
      (WebCore::JSTestSerializedScriptValueInterface::create):
      (WebCore::JSTestSerializedScriptValueInterfacePrototype::create):
      (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
      * bridge/c/CRuntimeObject.cpp:
      (JSC::Bindings::CRuntimeObject::CRuntimeObject):
      * bridge/c/CRuntimeObject.h:
      (JSC::Bindings::CRuntimeObject::create):
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
      (JSC::Bindings::CRuntimeMethod::finishCreation):
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaRuntimeMethod::JavaRuntimeMethod):
      (JavaRuntimeMethod::finishCreation):
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      (JSC::Bindings::JavaRuntimeObject::create):
      * bridge/objc/ObjCRuntimeObject.h:
      (JSC::Bindings::ObjCRuntimeObject::create):
      * bridge/objc/ObjCRuntimeObject.mm:
      (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
      * bridge/objc/objc_instance.mm:
      (ObjCRuntimeMethod::ObjCRuntimeMethod):
      (ObjCRuntimeMethod::finishCreation):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::create):
      (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
      * bridge/qt/qt_pixmapruntime.cpp:
      (JSC::Bindings::QtPixmapRuntimeObject::create):
      (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
      (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
      (JSC::Bindings::QtRuntimeMetaMethod::finishCreation):
      (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod):
      (JSC::Bindings::QtRuntimeConnectionMethod::finishCreation):
      * bridge/qt/qt_runtime.h:
      (JSC::Bindings::QtRuntimeMetaMethod::create):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::RuntimeMethod):
      * bridge/runtime_method.h:
      (JSC::RuntimeMethod::create):
      
      Source/WebKit/mac:
      
      Completed the sixth 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 fifth 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/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
      (WebKit::ProxyRuntimeMethod::finishCreation):
      
      Source/WebKit2:
      
      Completed the sixth 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 fifth 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):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::create):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5e10972f
  25. 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
  26. 07 Sep, 2011 1 commit
    • 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
  27. 06 Sep, 2011 1 commit
    • 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
  28. 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
  29. 10 Jun, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=16777 · f1fa579d
      barraclough@apple.com authored
      Eliminate JSC::NaN and JSC::Inf
      
      Reviewed by Sam Weinig.
      
      There's no good reason for -K-J-S- JSC to have its own NAN and infinity constants.
      The ones in std::numeric_limits are perfectly good.
      Remove JSC::Inf, JSC::NaN, switch some cases of (isnan || isinf) to !isfinite.
      
      Source/JavaScriptCore: 
      
      * API/JSCallbackObjectFunctions.h:
      (JSC::::toNumber):
      * API/JSValueRef.cpp:
      (JSValueMakeNumber):
      (JSValueToNumber):
      * JavaScriptCore.exp:
      * runtime/CachedTranscendentalFunction.h:
      (JSC::CachedTranscendentalFunction::initialize):
      * runtime/DateConstructor.cpp:
      (JSC::constructDate):
      * runtime/DateInstanceCache.h:
      (JSC::DateInstanceData::DateInstanceData):
      (JSC::DateInstanceCache::reset):
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      (JSC::JSCell::JSValue::getPrimitiveNumber):
      (JSC::JSCell::JSValue::toNumber):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      (JSC::JSGlobalData::resetDateCache):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::globalFuncParseInt):
      (JSC::globalFuncIsFinite):
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::toNumber):
      * runtime/JSValue.cpp:
      * runtime/JSValue.h:
      * runtime/JSValueInlineMethods.h:
      (JSC::jsNaN):
      * runtime/MathObject.cpp:
      (JSC::mathProtoFuncMax):
      (JSC::mathProtoFuncMin):
      * runtime/NumberConstructor.cpp:
      (JSC::numberConstructorNegInfinity):
      (JSC::numberConstructorPosInfinity):
      * runtime/NumberPrototype.cpp:
      (JSC::numberProtoFuncToExponential):
      (JSC::numberProtoFuncToFixed):
      (JSC::numberProtoFuncToPrecision):
      (JSC::numberProtoFuncToString):
      * runtime/UString.cpp:
      * wtf/DecimalNumber.h:
      (WTF::DecimalNumber::DecimalNumber):
      * wtf/dtoa.cpp:
      (WTF::dtoa):
      
      Source/WebCore: 
      
      * bindings/js/JSDataViewCustom.cpp:
      (WebCore::getDataViewMember):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f1fa579d
  30. 17 May, 2011 4 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
    • 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
  31. 16 May, 2011 1 commit
    • 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
  32. 15 Apr, 2011 2 commits
  33. 13 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
  34. 29 Mar, 2011 1 commit