1. 01 Feb, 2012 1 commit
    • mhahnenberg@apple.com's avatar
      Replace JSArray destructor with finalizer · 59415ea5
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=77488
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      * JavaScriptCore.exp:
      * runtime/JSArray.cpp:
      (JSC::JSArray::finalize): Added finalizer.
      (JSC::JSArray::allocateSparseMap): Factored out code for allocating new sparse maps.
      (JSC):
      (JSC::JSArray::deallocateSparseMap): Factored out code for deallocating sparse maps.
      (JSC::JSArray::enterDictionaryMode): Renamed enterSparseMode to enterDictionaryMode 
      because the old name was confusing because we could have a sparse array that never 
      called enterSparseMode.
      (JSC::JSArray::defineOwnNumericProperty):
      (JSC::JSArray::setLengthWritable):
      (JSC::JSArray::putByIndexBeyondVectorLength):
      (JSC::JSArray::setLength):
      (JSC::JSArray::pop):
      (JSC::JSArray::sort):
      (JSC::JSArray::compactForSorting):
      * runtime/JSArray.h:
      (JSArray):
      
      LayoutTests: 
      
      * fast/js/script-tests/sparse-array.js: Added code to test oscillation between 
      sparse and dense arrays.
      * fast/js/sparse-array-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59415ea5
  2. 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
  3. 19 Jan, 2012 1 commit
    • mhahnenberg@apple.com's avatar
      Implement a new allocator for backing stores · 5d0b30a2
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=75181
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore: 
      
      We want to move away from using fastMalloc for the backing stores for 
      some of our objects (e.g. JSArray, JSObject, JSString, etc).  These backing 
      stores have a nice property in that they only have a single owner (i.e. a 
      single pointer to them at any one time).  One way that we can take advantage 
      of this property is to implement a simple bump allocator/copying collector, 
      which will run alongside our normal mark/sweep collector, that only needs to 
      update the single owner pointer rather than having to redirect an arbitrary 
      number of pointers in from-space to to-space.
      
      This plan can give us a number of benefits. We can beat fastMalloc in terms 
      of both performance and memory usage, we can track how much memory we're using 
      far more accurately than our rough estimation now through the use of 
      reportExtraMemoryCost, and we can allocate arbitrary size objects (as opposed 
      to being limited to size classes like we have been historically). This is also 
      another step toward moving away from lazy destruction, which will improve our memory footprint.
      
      We start by creating said allocator and moving the ArrayStorage for JSArray 
      to use it rather than fastMalloc.
      
      The design of the collector is as follows:
      Allocation:
      -The collector allocates 64KB chunks from the OS to use for object allocation.
      -Each chunk contains an offset, a flag indicating if the block has been pinned, 
       and a payload, along with next and prev pointers so that they can be put in DoublyLinkedLists.
      -Any allocation greater than 64KB gets its own separate oversize block, which 
       is managed separately from the rest.
      -If the allocator receives a request for more than the remaining amount in the 
       current block, it grabs a fresh block.
      -Grabbing a fresh block means grabbing one off of the global free list (which is now 
       shared between the mark/sweep allocator and the bump allocator) if there is one. 
       If there isn't a new one we do one of two things: allocate a new block from the OS 
       if we're not ready for a GC yet, or run a GC and then try again. If we still don't 
       have enough space after the GC, we allocate a new block from the OS.
      
      Garbage collection:
      -At the start of garbage collection during conservative stack scanning, if we encounter 
       what appears to be a pointer to a bump-allocated block of memory, we pin that block so 
       that it will not be copied for this round of collection.
      -We also pin any oversize blocks that we encounter, which effectively doubles as a 
       "mark bit" for that block. Any oversize blocks that aren't pinned at the end of copying 
       are given back to the OS.
      -Marking threads are now also responsible for copying bump-allocated objects to newSpace
      -Each marking thread has a private 64KB block into which it copies bump-allocated objects that it encounters.
      -When that block fills up, the marking thread gives it back to the allocator and requests a new one.
      -When all marking has concluded, each thread gives back its copy block, even if it isn't full.
      -At the conclusion of copying (which is done by the end of the marking phase), we un-pin 
       any pinned blocks and give any blocks left in from-space to the global free list.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * heap/AllocationSpace.cpp:
      (JSC::AllocationSpace::allocateSlowCase):
      (JSC::AllocationSpace::allocateBlock):
      (JSC::AllocationSpace::freeBlocks):
      * heap/AllocationSpace.h:
      (JSC::AllocationSpace::waterMark):
      * heap/BumpBlock.h: Added.
      (JSC::BumpBlock::BumpBlock):
      * heap/BumpSpace.cpp: Added.
      (JSC::BumpSpace::tryAllocateSlowCase):
      * heap/BumpSpace.h: Added.
      (JSC::BumpSpace::isInCopyPhase):
      (JSC::BumpSpace::totalMemoryAllocated):
      (JSC::BumpSpace::totalMemoryUtilized):
      * heap/BumpSpaceInlineMethods.h: Added.
      (JSC::BumpSpace::BumpSpace):
      (JSC::BumpSpace::init):
      (JSC::BumpSpace::contains):
      (JSC::BumpSpace::pin):
      (JSC::BumpSpace::startedCopying):
      (JSC::BumpSpace::doneCopying):
      (JSC::BumpSpace::doneFillingBlock):
      (JSC::BumpSpace::recycleBlock):
      (JSC::BumpSpace::getFreshBlock):
      (JSC::BumpSpace::borrowBlock):
      (JSC::BumpSpace::addNewBlock):
      (JSC::BumpSpace::allocateNewBlock):
      (JSC::BumpSpace::fitsInBlock):
      (JSC::BumpSpace::fitsInCurrentBlock):
      (JSC::BumpSpace::tryAllocate):
      (JSC::BumpSpace::tryAllocateOversize):
      (JSC::BumpSpace::allocateFromBlock):
      (JSC::BumpSpace::tryReallocate):
      (JSC::BumpSpace::tryReallocateOversize):
      (JSC::BumpSpace::isOversize):
      (JSC::BumpSpace::isPinned):
      (JSC::BumpSpace::oversizeBlockFor):
      (JSC::BumpSpace::blockFor):
      * heap/ConservativeRoots.cpp:
      (JSC::ConservativeRoots::ConservativeRoots):
      (JSC::ConservativeRoots::genericAddPointer):
      (JSC::ConservativeRoots::add):
      * heap/ConservativeRoots.h:
      * heap/Heap.cpp:
      (JSC::Heap::Heap):
      (JSC::Heap::blockFreeingThreadMain):
      (JSC::Heap::reportExtraMemoryCostSlowCase):
      (JSC::Heap::getConservativeRegisterRoots):
      (JSC::Heap::markRoots):
      (JSC::Heap::collect):
      (JSC::Heap::releaseFreeBlocks):
      * heap/Heap.h:
      (JSC::Heap::waterMark):
      (JSC::Heap::highWaterMark):
      (JSC::Heap::setHighWaterMark):
      (JSC::Heap::tryAllocateStorage):
      (JSC::Heap::tryReallocateStorage):
      * heap/HeapBlock.h: Added.
      (JSC::HeapBlock::HeapBlock):
      * heap/MarkStack.cpp:
      (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
      (JSC::SlotVisitor::drain):
      (JSC::SlotVisitor::drainFromShared):
      (JSC::SlotVisitor::startCopying):
      (JSC::SlotVisitor::allocateNewSpace):
      (JSC::SlotVisitor::copy):
      (JSC::SlotVisitor::copyAndAppend):
      (JSC::SlotVisitor::doneCopying):
      * heap/MarkStack.h:
      * heap/MarkedBlock.cpp:
      (JSC::MarkedBlock::recycle):
      (JSC::MarkedBlock::MarkedBlock):
      * heap/MarkedBlock.h:
      * heap/MarkedSpace.cpp:
      (JSC::MarkedSpace::MarkedSpace):
      * heap/MarkedSpace.h:
      (JSC::MarkedSpace::allocate):
      (JSC::MarkedSpace::forEachBlock):
      (JSC::MarkedSpace::SizeClass::resetAllocator):
      * heap/SlotVisitor.h:
      (JSC::SlotVisitor::SlotVisitor):
      * heap/TinyBloomFilter.h:
      (JSC::TinyBloomFilter::reset):
      * runtime/JSArray.cpp:
      (JSC::JSArray::JSArray):
      (JSC::JSArray::finishCreation):
      (JSC::JSArray::tryFinishCreationUninitialized):
      (JSC::JSArray::~JSArray):
      (JSC::JSArray::enterSparseMode):
      (JSC::JSArray::defineOwnNumericProperty):
      (JSC::JSArray::setLengthWritable):
      (JSC::JSArray::getOwnPropertySlotByIndex):
      (JSC::JSArray::getOwnPropertyDescriptor):
      (JSC::JSArray::putByIndexBeyondVectorLength):
      (JSC::JSArray::deletePropertyByIndex):
      (JSC::JSArray::getOwnPropertyNames):
      (JSC::JSArray::increaseVectorLength):
      (JSC::JSArray::unshiftCountSlowCase):
      (JSC::JSArray::setLength):
      (JSC::JSArray::pop):
      (JSC::JSArray::unshiftCount):
      (JSC::JSArray::visitChildren):
      (JSC::JSArray::sortNumeric):
      (JSC::JSArray::sort):
      (JSC::JSArray::compactForSorting):
      (JSC::JSArray::subclassData):
      (JSC::JSArray::setSubclassData):
      (JSC::JSArray::checkConsistency):
      * runtime/JSArray.h:
      (JSC::JSArray::inSparseMode):
      (JSC::JSArray::isLengthWritable):
      * wtf/CheckedBoolean.h: Added.
      (CheckedBoolean::CheckedBoolean):
      (CheckedBoolean::~CheckedBoolean):
      (CheckedBoolean::operator bool):
      * wtf/DoublyLinkedList.h:
      (WTF::::push):
      * wtf/StdLibExtras.h:
      (WTF::isPointerAligned):
      
      Source/JavaScriptGlue: 
      
      Added forwarding header for new CheckedBoolean used in the bump allocator.
      
      * ForwardingHeaders/wtf/CheckedBoolean.h: Added.
      
      Source/WebCore: 
      
      No new tests.
      
      Added forwarding header for new CheckedBoolean used in the bump allocator.
      
      * ForwardingHeaders/wtf/CheckedBoolean.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d0b30a2
  4. 12 Jan, 2012 1 commit
    • barraclough@apple.com's avatar
      Allow accessor get/set property to be set to undefined · c709a123
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=76148
      
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore: 
      
      AccessorDescriptor properties may have their get & set properties defined to reference a function
      (Callable object) or be set to undefined. Valid PropertyDescriptors created by toPropertyDescriptor
      (defined from JS code via Object.defineProperty, etc) have get and set properties that are in one of
      three states (1) nonexistent, (2) set to undefined, or (3) a function (any Callable object).
      
      On the PropertyDescriptor object these three states are represneted by JSValue(), jsUndefined(), and
      any JSObject* (with a constraint that this must be callable).
      
      Logically the get/set property of an accessor descriptor on an object might be in any of the three
      states above, but in practice there is no way to distinguish between the first two states. As such
      we stor the get/set values in property storage in a JSObject* field, with 0 indicating absent or
      undefined. When unboxing to a PropertyDescriptor, map this back to a JS undefined value.
      
      * runtime/GetterSetter.h:
      (JSC::GetterSetter::setGetter):
      (JSC::GetterSetter::setSetter):
          - Allow the getter/setter to be cleared.
      * runtime/JSArray.cpp:
      (JSC::JSArray::putDescriptor):
          - Changed to call getterObject/setterObject.
      (JSC::JSArray::defineOwnNumericProperty):
          - Added ASSERT.
      * runtime/JSObject.cpp:
      (JSC::putDescriptor):
      (JSC::JSObject::defineOwnProperty):
          - Changed to call getterObject/setterObject.
      * runtime/ObjectConstructor.cpp:
      (JSC::objectConstructorGetOwnPropertyDescriptor):
          - getter/setter values read from properties on object are never missing, they will now be set as undefined by 'setDescriptor'.
      (JSC::toPropertyDescriptor):
          - Do not translate undefined->empty, this loses an important distinction between a get/set property being absent, or being explicitly set to undefined.
      * runtime/PropertyDescriptor.cpp:
      (JSC::PropertyDescriptor::getterObject):
      (JSC::PropertyDescriptor::setterObject):
          - Accessors to convert the get/set property to an object pointer, converting undefined to 0.
      (JSC::PropertyDescriptor::setDescriptor):
      (JSC::PropertyDescriptor::setAccessorDescriptor):
          - Translate a getter/setter internally represented at 0 to undefined, indicating that it is present.
      * runtime/PropertyDescriptor.h:
          - Declare getterObject/setterObject.
      
      LayoutTests: 
      
      * fast/js/Object-defineProperty-expected.txt:
      * fast/js/script-tests/Object-defineProperty.js:
          - Update a couple of inaccurate tests (it is invalid for a property to have
            both a get: and value: field; AccessorDescritor properties do not have a
            writable property). Add more test cases.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c709a123
  5. 11 Jan, 2012 2 commits
    • barraclough@apple.com's avatar
      Merge 'Getter'/'Setter' attributes into 'Accessor' · bebfe4db
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=76141
      
      Reviewed by Filip Pizlo.
      
      These are currently ambiguous (and used inconsistently). It would logically appear
      that either being bit set implies that the corresponding type of accessor is present
      but (a) we don't correctly enforce this, and (b) this means the attributes would not
      be able to distinguish between a data descriptor and an accessor descriptor with
      neither a getter nor setter defined (which is a descriptor permissible under the spec).
      This ambiguity would lead to unsafe property caching behavior (though this does not
      represent an actual current bug, since we are currently unable to create descriptors
      that have neither a getter nor setter, it just prevents us from doing so).
      
      * runtime/Arguments.cpp:
      (JSC::Arguments::createStrictModeCallerIfNecessary):
      (JSC::Arguments::createStrictModeCalleeIfNecessary):
      * runtime/JSArray.cpp:
      (JSC::SparseArrayValueMap::put):
      (JSC::JSArray::putDescriptor):
      * runtime/JSBoundFunction.cpp:
      (JSC::JSBoundFunction::finishCreation):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::getOwnPropertySlot):
      (JSC::JSFunction::getOwnPropertyDescriptor):
      * runtime/JSObject.cpp:
      (JSC::JSObject::defineGetter):
      (JSC::JSObject::initializeGetterSetterProperty):
      (JSC::JSObject::defineSetter):
      (JSC::putDescriptor):
      (JSC::JSObject::defineOwnProperty):
      * runtime/JSObject.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::objectConstructorDefineProperty):
      * runtime/PropertyDescriptor.cpp:
      (JSC::PropertyDescriptor::setDescriptor):
      (JSC::PropertyDescriptor::setAccessorDescriptor):
      (JSC::PropertyDescriptor::setSetter):
      (JSC::PropertyDescriptor::setGetter):
      (JSC::PropertyDescriptor::attributesOverridingCurrent):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bebfe4db
    • barraclough@apple.com's avatar
      Object.defineProperty([], 'length', {}) should not make length read-only · bc9e3d16
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=76097
      
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore: 
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::defineOwnProperty):
          - We should be checking writablePresent().
      
      LayoutTests: 
      
      * fast/js/array-defineOwnProperty-expected.txt:
      * fast/js/script-tests/array-defineOwnProperty.js:
          - Added test.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc9e3d16
  6. 10 Jan, 2012 3 commits
    • barraclough@apple.com's avatar
      Build fix following https://bugs.webkit.org/show_bug.cgi?id=75935 · 4d2fdd84
      barraclough@apple.com authored
      Fix 32-bit builds.
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertyNames):
      (JSC::JSArray::setLength):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d2fdd84
    • barraclough@apple.com's avatar
      Source/JavaScriptCore: Do not allow Array length to be set if it is non-configurable · cd7d2b0a
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=75935
      
      Reviewed by Sam Weinig.
      
      Do not allow Array length to be set if it is non-configurable, and if the new
      length is less than the old length then intervening properties should removed
      in reverse order. Removal of properties should cease if an intervening indexed
      property being removed is non-configurable.
      
      * JavaScriptCore.exp:
          - Removed export for setLength.
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncConcat):
          - JSArray::setLength now takes an ExecState*
      (JSC::arrayProtoFuncSlice):
          - JSArray::setLength now takes an ExecState*
      * runtime/JSArray.cpp:
      (JSC::JSArray::defineOwnProperty):
          - JSArray::setLength now takes an ExecState*
      (JSC::JSArray::put):
          - JSArray::setLength now takes an ExecState*
      (JSC::compareKeysForQSort):
          - Keys extracted from the map can be stored as unsigneds.
      (JSC::JSArray::getOwnPropertyNames):
          - Keys extracted from the map can be stored as unsigneds.
      (JSC::JSArray::setLength):
          - Check lengthIsReadOnly(), rather than copying the entire map to iterate
            over to determine which keys to remove, instead just copy the keys from
            the map to a Vector. When inSparseMode sort the keys in the Vector so
            that we can remove properties in reverse order.
      * runtime/JSArray.h:
          - JSArray::setLength now takes an ExecState*
      
      Source/WebCore: Do not allow Array length to be set if it is non-configurable
      https://bugs.webkit.org/show_bug.cgi?id=75935
      
      Reviewed by Sam Weinig.
      
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::CloneDeserializer::deserialize):
          - remove unnecessary call to JSArray::setLength.
      
      LayoutTests: rebaselining some canvas images
      https://bugs.webkit.org/show_bug.cgi?id=75552
      
      Patch by Elliot Poger <epoger@google.com> on 2012-01-10
      Reviewed by Ryosuke Niwa.
      
      * platform/chromium-gpu-linux/fast/canvas/canvas-text-baseline-expected.png:
      * platform/chromium-gpu-linux/fast/canvas/quadraticCurveTo-expected.png:
      * platform/chromium-gpu-mac/fast/canvas/canvas-text-baseline-expected.png: Added.
      * platform/chromium-gpu-mac/fast/canvas/quadraticCurveTo-expected.png: Added.
      * platform/chromium-gpu-win/fast/canvas/canvas-text-baseline-expected.png:
      * platform/chromium-gpu-win/fast/canvas/quadraticCurveTo-expected.png:
      * platform/chromium-mac-leopard/fast/canvas/quadraticCurveTo-expected.png: Added.
      * platform/chromium-mac-snowleopard/fast/canvas/canvas-lineWidth-expected.txt: Added.
      * platform/chromium-mac-snowleopard/fast/canvas/canvas-text-baseline-expected.png: Added.
      * platform/chromium-mac-snowleopard/fast/canvas/quadraticCurveTo-expected.png: Added.
      * platform/chromium/test_expectations.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd7d2b0a
    • barraclough@apple.com's avatar
      Use SameValue to compare property descriptor values · beb7f228
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=75975
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      Rather than strictEqual.
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::defineOwnNumericProperty):
          - Missing configurablePresent() check.
      * runtime/JSObject.cpp:
      (JSC::JSObject::defineOwnProperty):
          - call sameValue.
      * runtime/PropertyDescriptor.cpp:
      (JSC::sameValue):
          - Moved from JSArray.cpp, fix NaN comparison.
      (JSC::PropertyDescriptor::equalTo):
          - call sameValue.
      * runtime/PropertyDescriptor.h:
          - Added declaration for sameValue.
      
      LayoutTests: 
      
      * fast/js/array-defineOwnProperty-expected.txt:
      * fast/js/script-tests/array-defineOwnProperty.js:
          - Add new test cases.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      beb7f228
  7. 09 Jan, 2012 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=75789 · 166c9077
      barraclough@apple.com authored
      defineOwnProperty not implemented for Array objects
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      Implements support for getter/setter & non-default attribute properties on arrays,
      by forcing them into a dictionary-like 'SparseMode'. This fixes ~300 test-262
      test failures.
      
      * JavaScriptCore.exp:
          - Updated exports.
      * dfg/DFGOperations.cpp:
          - JSArray::pop now requires an exec state.
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncPop):
          - JSArray::pop now requires an exec state.
      * runtime/JSArray.cpp:
      (JSC::SparseArrayValueMap::add):
          - Add a potentially empty entry into the map.
      (JSC::SparseArrayValueMap::put):
          - Changed to call setter.
      (JSC::SparseArrayEntry::get):
          - calls getters.
      (JSC::SparseArrayEntry::getNonSparseMode):
          - does not call getters.
      (JSC::JSArray::enterSparseMode):
          - Convert into 'SparseMode' - removes the vectors, don't allow it to be recreated.
      (JSC::JSArray::putDescriptor):
          - Create a numeric property based on a descriptor.
      (JSC::sameValue):
          - See ES5.1 9.12.
      (JSC::reject):
          - Helper for the [[DefineOwnProperty]] algorithm.
      (JSC::JSArray::defineOwnNumericProperty):
          - Define an indexed property on an array object.
      (JSC::JSArray::setLengthWritable):
          - Marks the length read-only, enters SparseMode as necessary.
      (JSC::JSArray::defineOwnProperty):
          - Defines either an indexed property or 'length' on an array object.
      (JSC::JSArray::getOwnPropertySlotByIndex):
          - Updated to correctly handle accessor descriptors & attributes.
      (JSC::JSArray::getOwnPropertyDescriptor):
          - Updated to correctly handle accessor descriptors & attributes.
      (JSC::JSArray::put):
          - Pass strict mode flag to setLength.
      (JSC::JSArray::putByIndex):
          - putByIndexBeyondVectorLength requires an ExecState* rather than a JSGloablData&.
      (JSC::JSArray::putByIndexBeyondVectorLength):
          - Pass exec to SparseArrayValueMap::put.
      (JSC::JSArray::deletePropertyByIndex):
          - Do not allow deletion of non-configurable properties.
      (JSC::compareKeysForQSort):
          - used in implementation of getOwnPropertyNames.
      (JSC::JSArray::getOwnPropertyNames):
          - Properties in the sparse map should be iterated in order.
      (JSC::JSArray::setLength):
          - Updated to take a 'shouldThrow' flag, return a result indicating error.
      (JSC::JSArray::pop):
          - pop should throw an error if length is not writable, even if the array is empty.
      (JSC::JSArray::push):
          - putByIndexBeyondVectorLength requires an ExecState* rather than a JSGloablData&.
      (JSC::JSArray::sort):
          - Changed 'get' to 'getNonSparseMode' (can't be getters to call).
      (JSC::JSArray::compactForSorting):
          - Changed 'get' to 'getNonSparseMode' (can't be getters to call).
      * runtime/JSArray.h:
      (JSC::SparseArrayValueMap::lengthIsReadOnly):
          - Check if the length is read only.
      (JSC::SparseArrayValueMap::setLengthIsReadOnly):
          - Mark the length as read only.
      (JSC::SparseArrayValueMap::find):
          - Moved into header.
      (JSC::JSArray::isLengthWritable):
          - Wraps SparseArrayValueMap::lengthIsReadOnly.
      * runtime/JSObject.cpp:
      (JSC::JSObject::defineOwnProperty):
          - Should be returning the result of putDescriptor.
      * runtime/PropertyDescriptor.cpp:
      (JSC::PropertyDescriptor::attributesOverridingCurrent):
          - Added attributesOverridingCurrent - this should probably be merged with attributesWithOverride.
      * runtime/PropertyDescriptor.h:
          - Added attributesOverridingCurrent.
      
      LayoutTests: 
      
      * fast/js/array-defineOwnProperty-expected.txt: Added.
      * fast/js/array-defineOwnProperty.html: Added.
      * fast/js/script-tests/array-defineOwnProperty.js: Added.
          - Added tests for array properties with accessors & non-defulat attributes.
      * fast/js/mozilla/strict/15.4.4.6-expected.txt:
      * fast/js/mozilla/strict/8.12.5-expected.txt:
      * ietestcenter/Javascript/15.4.4.14-9-a-12-expected.txt:
      * ietestcenter/Javascript/15.4.4.15-8-a-12-expected.txt:
          - Check in passing results.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      166c9077
  8. 06 Jan, 2012 1 commit
  9. 05 Jan, 2012 3 commits
    • barraclough@apple.com's avatar
      push/shift fifo may consume excessive memory · a4c41fd7
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=75610
      
      Reviewed by Sam Weinig.
      
      Array object commonly store data in a vector, consisting of a portion that is
      in use, a pre-capacity (m_indexBias) and a post-capacity (the delta between
      m_length and m_vectorLength). Calls to shift with grow the pre-capacity, and
      the current algorithm for increaseVectorLength (used by push, or [[Put]]) will
      never shrink the pre-capacity, so a push/shift fifo may consume an inordinate
      amount of memory, whilst having a relatively small active length.
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::increaseVectorLength):
          - If m_indexBias is non-zero, decay it over time.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a4c41fd7
    • ossy@webkit.org's avatar
      unshift/pop fifo may consume excessive memory · 5ff458cf
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=75588
      
      Reviewed by Zoltan Herczeg.
      
      Buildfix after r104120.
      
      * runtime/JSArray.cpp: Remove useless asserts, baecause unsigned expression >= 0 is always true
      (JSC::JSArray::unshiftCount):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ff458cf
    • barraclough@apple.com's avatar
      unshift/pop fifo may consume excessive memory · 5e4d2f12
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=75588
      
      Reviewed by Sam Weinig.
      
      The Array object commonly store data in a vector, consisting of a portion that
      is in use, a pre-capacity (m_indexBias) and a post-capacity (the delta between
      m_length and m_vectorLength). Calls to pop with grow the post-capacity, and the
      current algorithm for increasePrefixVectorLength (used by unshift) will never
      stink the post-capacity, so a unshift/pop fifo may consume an inordinate amount
      of memory, whilst having a relatively small active length.
      
      * runtime/JSArray.cpp:
      (JSC::storageSize):
          - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>)
      (JSC::SparseArrayValueMap::put):
          - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>)
      (JSC::JSArray::increaseVectorLength):
          - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>)
      (JSC::JSArray::unshiftCountSlowCase):
          - renamed from increaseVectorPrefixLength (this was a bad name, since it
            also moved the ArrayStorage header), rewritten.
      (JSC::JSArray::shiftCount):
          - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>), count should be unsigned
      (JSC::JSArray::unshiftCount):
          - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>), count should be unsigned,
            increaseVectorPrefixLength renamed to unshiftCountSlowCase
      (JSC::JSArray::sortNumeric):
      * runtime/JSArray.h:
          - Updated function declarations, m_indexBias should be unsigned.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5e4d2f12
  10. 03 Jan, 2012 2 commits
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=75140 · cf553561
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      Rewrite JSArray::putSlowCase to be much cleaner & simpler.
      
      This rewrite only significantly changes behaviour for sparse array, specifically
      in how sparse arrays are reified back to vector form. This does not affect arrays
      with less than 10000 entries (since these always use a vector). The more common
      cases of sparse array behavior (though large sparse arrays are rare) - arrays that
      always remain sparse, and arrays that are filled in reverse sequential order -
      should be just as fast or faster (since reification is simpler & no longer
      requires map lookups) after these changes.
      
      Simplifying this code allows all cases of putByIndex that need to grow the vector
      to do so via increaseVectorLength, which means that this method can encapsulate
      the policy of determining how the vector should be grown.
      
      No performance impact.
      
      * runtime/JSArray.cpp:
      (JSC::isDenseEnoughForVector):
          - any array of length <= MIN_SPARSE_ARRAY_INDEX is dense enough for a vector.
      (JSC::JSArray::putByIndex):
          - simplify & comment.
      (JSC::JSArray::putByIndexBeyondVectorLength):
          - Re-written to be much clearer & simpler.
      (JSC::JSArray::increaseVectorLength):
      (JSC::JSArray::increaseVectorPrefixLength):
          - add explicit checks against MAX_STORAGE_VECTOR_LENGTH, so clients do not need do so.
      (JSC::JSArray::push):
          - simplify & comment.
      * runtime/JSArray.h:
          - removed SparseArrayValueMap::take.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf553561
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=75140 · 535d8bb7
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      Simplify JSArray creation - remove ArgsList/JSValue* create methods
      (this functionality can be implemented in terms of tryCreateUninitialized).
      
      * JavaScriptCore.exp:
      * runtime/ArrayConstructor.cpp:
          - use constructArray/constructEmptyArray instead of calling JSArray::create directly
      (JSC::constructArrayWithSizeQuirk):
      * runtime/JSArray.cpp:
      * runtime/JSArray.h:
          - removed ArgsList/JSValue* create methods
      * runtime/JSGlobalObject.h:
      (JSC::constructEmptyArray):
      (JSC::constructArray):
          - changed to be implemented in terms of JSArray::tryCreateUninitialized
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      535d8bb7
  11. 29 Dec, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=75140 · 907d1a40
      barraclough@apple.com authored
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore: 
      
      Start cleaning up JSArray construction. JSArray has a set of create methods,
      one of which (currently) takes a 'creation mode' enum parameter. Based on that
      parameter, the constructor does one of two completely different things. If the
      parameter is 'CreateInitialized' it creates an array, setting the length, but
      does not eagerly allocate a storage vector of the specified length. A small
      (BASE_VECTOR_LEN sized) initial vector will be allocated, and cleared, property
      access to the vector will read the hole value (return undefined). The alternate
      usage of this method ('CreateCompact') does something very different. It tries
      to create an array of the requested length, and also allocates a storage vector
      large enough to hold all properties. It does not clear the storage vector,
      leaving the memory uninitialized and requiring the user to call a method
      'uncheckedSetIndex' to initialize values in the vector.
      
      This patch factors out these two behaviours, moving the 'CreateCompact' mode
      into its own method, 'tryCreateUninitialized' (matching the naming for this
      functionality in the string classes). 'tryCreateUninitialized' may return 0 if
      memory allocation fails during construction of the object. The construction
      pattern changes such that values added during initialization will be marked if
      a GC is triggered during array allocation. 'CreateInitialized' no longer need
      be passed to create a normal, fully constructed array with a length, and this
      method is merged with the version of 'create' that does not take an initial
      length (length parameter defaults to 0).
      
      * JavaScriptCore.exp:
      * runtime/ArrayConstructor.cpp:
      (JSC::constructArrayWithSizeQuirk):
          - removed 'CreateInitialized' argument
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncSplice):
          - changed to call 'tryCreateUninitialized'
      * runtime/FunctionPrototype.cpp:
      (JSC::functionProtoFuncBind):
          - changed to call 'tryCreateUninitialized'
      * runtime/JSArray.cpp:
      (JSC::JSArray::JSArray):
          - initialize m_storage to null; if construction fails, make destruction safe
      (JSC::JSArray::finishCreation):
          - merge versions of this method, takes an initialLength parameter defaulting to zero
      (JSC::JSArray::tryFinishCreationUninitialized):
          - version of 'finishCreation' that tries to eagerly allocate storage; may fail & return 0
      (JSC::JSArray::~JSArray):
          - check for null m_storage, in case array construction failed.
      (JSC::JSArray::increaseVectorPrefixLength):
      * runtime/JSArray.h:
      (JSC::JSArray::create):
          - merge versions of this method, takes an initialLength parameter defaulting to zero
      (JSC::JSArray::tryCreateUninitialized):
          - version of 'create' that tries to eagerly allocate storage; may fail & return 0
      (JSC::JSArray::initializeIndex):
      (JSC::JSArray::completeInitialization):
          - used in conjunction with 'tryCreateUninitialized' to initialize the array
      * runtime/JSGlobalObject.h:
      (JSC::constructEmptyArray):
          - removed 'CreateInitialized' argument
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpMatchesArray::finishCreation):
          - removed 'CreateInitialized' argument
      
      LayoutTests: 
      
      Added test case.
      
      * fast/js/script-tests/array-splice.js:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      907d1a40
  12. 22 Dec, 2011 2 commits
    • barraclough@apple.com's avatar
      Unreviewed - fix stylebot issues from last patch. · dcb8b769
      barraclough@apple.com authored
      * runtime/JSArray.cpp:
      (JSC::JSArray::putSlowCase):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dcb8b769
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=75151 · 617f4646
      barraclough@apple.com authored
      Add attributes field to JSArray's SparseMap
      
      Reviewed by Sam Weinig.
      
      This will be necessary to be able to support non- writable/configurable/enumerable
      properties, and helpful for getters/setters.
      
      Added a concept of being 'inSparseMode' - this indicates the array has a non-standard
      
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncSort):
          - JSArray::sort methods not allowed on arrays that are 'inSparseMode'.
            (must fall back to generic sort alogrithm).
      * runtime/JSArray.cpp:
      (JSC::JSArray::finishCreation):
          - moved reportedMapCapacity into the SparseArrayValueMap object.
      (JSC::SparseArrayValueMap::find):
      (JSC::SparseArrayValueMap::put):
      (JSC::SparseArrayValueMap::visitChildren):
          - Added.
      (JSC::JSArray::getOwnPropertySlotByIndex):
      (JSC::JSArray::getOwnPropertyDescriptor):
      (JSC::JSArray::putSlowCase):
      (JSC::JSArray::deletePropertyByIndex):
      (JSC::JSArray::getOwnPropertyNames):
      (JSC::JSArray::setLength):
      (JSC::JSArray::pop):
      (JSC::JSArray::visitChildren):
          - Updated for changes in SparseArrayValueMap.
      (JSC::JSArray::sortNumeric):
      (JSC::JSArray::sort):
      (JSC::JSArray::compactForSorting):
          - Disallow on 'SparseMode' arrays.
      * runtime/JSArray.h:
      (JSC::SparseArrayEntry::SparseArrayEntry):
          - An entry in the sparse array - value (WriteBarrier) + attributes.
      (JSC::SparseArrayValueMap::SparseArrayValueMap):
      (JSC::SparseArrayValueMap::sparseMode):
      (JSC::SparseArrayValueMap::setSparseMode):
          - Flags to track whether an Array is forced into SparseMode.
      (JSC::SparseArrayValueMap::remove):
      (JSC::SparseArrayValueMap::notFound):
      (JSC::SparseArrayValueMap::isEmpty):
      (JSC::SparseArrayValueMap::contains):
      (JSC::SparseArrayValueMap::size):
      (JSC::SparseArrayValueMap::begin):
      (JSC::SparseArrayValueMap::end):
          - accessors to the map
      (JSC::SparseArrayValueMap::take):
          - only for use on non-SpareMode arrays.
      (JSC::JSArray::inSparseMode):
          - Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      617f4646
  13. 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
  14. 11 Dec, 2011 1 commit
    • ggaren@apple.com's avatar
      v8 benchmark takes 12-13 million function call slow paths due to extra arguments · 0af1468f
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=74244
      
      Reviewed by Filip Pizlo.
              
      .arguments function of order the Reversed
              
      10% speedup on v8-raytrace, 1.7% speedup on v8 overall, neutral on Kraken
      and SunSpider.
      
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::valueProfileForArgument): Clarified that the interface
      to this function is an argument number.
      
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      (JSC::BytecodeGenerator::emitCall):
      (JSC::BytecodeGenerator::emitConstruct):
      (JSC::BytecodeGenerator::isArgumentNumber): Switched to using CallFrame
      helper functions for computing offsets for arguments, rather than doing
      the math by hand.
              
      Switched to iterating argument offsets backwards (--) instead of forwards (++).
      
      * bytecompiler/BytecodeGenerator.h:
      (JSC::CallArguments::thisRegister):
      (JSC::CallArguments::argumentRegister):
      (JSC::CallArguments::registerOffset): Updated for arguments being reversed.
      
      * bytecompiler/NodesCodegen.cpp: Allocate arguments in reverse order.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::getArgument):
      (JSC::DFG::ByteCodeParser::setArgument):
      (JSC::DFG::ByteCodeParser::flush):
      (JSC::DFG::ByteCodeParser::addCall):
      (JSC::DFG::ByteCodeParser::handleCall):
      (JSC::DFG::ByteCodeParser::handleInlining):
      (JSC::DFG::ByteCodeParser::handleMinMax):
      (JSC::DFG::ByteCodeParser::handleIntrinsic):
      (JSC::DFG::ByteCodeParser::parseBlock):
      (JSC::DFG::ByteCodeParser::processPhiStack): Use abstract argument indices
      that just-in-time convert to bytecode operands (i.e., indexes in the register
      file) through helper functions. This means only one piece of code needs
      to know how arguments are laid out in the register file.
      
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::dump): Ditto.
      
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::valueProfileFor): Ditto.
      
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::compileFunction): The whole point of this patch:
      Treat too many arguments as an arity match.
      
      * dfg/DFGOSRExit.h:
      (JSC::DFG::OSRExit::variableForIndex):
      (JSC::DFG::OSRExit::operandForIndex): Use helper functions, as above.
      
      * dfg/DFGOperands.h:
      (JSC::DFG::operandToArgument):
      (JSC::DFG::argumentToOperand): These are now the only two lines of code in
      the DFG compiler that know how arguments are laid out in memory.
      
      (JSC::DFG::Operands::operand):
      (JSC::DFG::Operands::setOperand): Use helper functions, as above.
      
      * dfg/DFGOperations.cpp: The whole point of this patch:
      Treat too many arguments as an arity match.
      
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::emitCall): Use helper functions, as above.
              
      Also, don't tag the caller frame slot as a cell, because it's not a cell.
      
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::emitCall): Use helper functions, as above.
      
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile): Use helper functions, as above.
      
      (JSC::DFG::SpeculativeJIT::checkArgumentTypes): Use already-computed
      argument virtual register instead of recomputing by hand.
      
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callFrameSlot):
      (JSC::DFG::SpeculativeJIT::argumentSlot):
      (JSC::DFG::SpeculativeJIT::callFrameTagSlot):
      (JSC::DFG::SpeculativeJIT::callFramePayloadSlot):
      (JSC::DFG::SpeculativeJIT::argumentTagSlot):
      (JSC::DFG::SpeculativeJIT::argumentPayloadSlot): Added a few helper
      functions for dealing with callee arguments specifically. These still
      build on top of our other helper functions, and have no direct knowledge
      of how arguments are laid out in the register file.
      
      (JSC::DFG::SpeculativeJIT::resetCallArguments):
      (JSC::DFG::SpeculativeJIT::addCallArgument): Renamed argumentIndex to
      argumentOffset to match CallFrame naming.
      
      (JSC::DFG::SpeculativeJIT::valueSourceReferenceForOperand): Use helper
      functions, as above.
      
      * interpreter/CallFrame.h:
      (JSC::ExecState::argumentOffset):
      (JSC::ExecState::argumentOffsetIncludingThis):
      (JSC::ExecState::argument):
      (JSC::ExecState::setArgument):
      (JSC::ExecState::thisArgumentOffset):
      (JSC::ExecState::thisValue):
      (JSC::ExecState::setThisValue):
      (JSC::ExecState::offsetFor):
      (JSC::ExecState::hostThisRegister):
      (JSC::ExecState::hostThisValue): Added a bunch of helper functions for
      computing where an argument is in the register file. Anything in the
      runtime that needs to access arguments should use these helpers.
      
      * interpreter/CallFrameClosure.h:
      (JSC::CallFrameClosure::setThis):
      (JSC::CallFrameClosure::setArgument):
      (JSC::CallFrameClosure::resetCallFrame): This stuff is a lot simpler, now
      that too many arguments counts as an arity match and doesn't require
      preserving two copies of our arguments.
      
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::slideRegisterWindowForCall): Only need to do something
      special if the caller provided too few arguments.
              
      Key simplification: We never need to maintain two copies of our arguments
      anymore.
      
      (JSC::eval):
      (JSC::loadVarargs): Use helper functions.
      
      (JSC::Interpreter::unwindCallFrame): Updated for new interface.
      
      (JSC::Interpreter::execute):
      (JSC::Interpreter::executeCall):
      (JSC::Interpreter::executeConstruct):
      (JSC::Interpreter::prepareForRepeatCall): Seriously, though: use helper
      functions.
      
      (JSC::Interpreter::privateExecute): No need to check for stack overflow
      when calling host functions because they have zero callee registers.
      
      (JSC::Interpreter::retrieveArguments): Explicitly tear off the arguments
      object, since there's no special constructor for this anymore.
      
      * interpreter/Interpreter.h: Reduced the C++ re-entry depth because some
      workers tests were hitting stack overflow in some of my testing. We should
      make this test more exact in future.
      
      * interpreter/RegisterFile.h: Death to all runtime knowledge of argument
      location that does not belong to the CallFrame class!
      
      * jit/JIT.cpp:
      (JSC::JIT::privateCompile): I am a broken record and I use helper functions.
              
      Also, the whole point of this patch: Treat too many arguments as an arity match.
      
      * jit/JITCall32_64.cpp:
      (JSC::JIT::compileLoadVarargs):
      * jit/JITCall.cpp:
      (JSC::JIT::compileLoadVarargs): Updated the argument copying math to use
      helper functions, for backwards-correctness. Removed the condition
      pertaining to declared argument count because, now that arguments are
      always in just one place, this optimization is valid for all functions.
      Standardized the if predicate for each line of the optimization. This might
      fix a bug, but I couldn't get the bug to crash in practice.
      
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_create_arguments):
      (JSC::JIT::emit_op_get_argument_by_val):
      (JSC::JIT::emitSlow_op_get_argument_by_val):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_create_arguments):
      (JSC::JIT::emit_op_get_argument_by_val):
      (JSC::JIT::emitSlow_op_get_argument_by_val): Removed cti_op_create_arguments_no_params
      optimization because it's no longer an optimization, now that arguments
      are always contiguous in a known location.
              
      Updated argument access opcode math for backwards-correctness.
      
      * jit/JITStubs.cpp:
      (JSC::arityCheckFor): Updated just like slideRegisterWindowForCall. This
      function is slightly different because it copies the call frame in
      addition to the arguments. (In the Interpreter, the call frame is not
      set up by this point.)
      
      (JSC::lazyLinkFor): The whole point of this patch: Treat too many
      arguments as an arity match.
      
      (JSC::DEFINE_STUB_FUNCTION): Updated for new iterface to tearOff().
      
      * jit/JITStubs.h:
      * jit/SpecializedThunkJIT.h:
      (JSC::SpecializedThunkJIT::loadDoubleArgument):
      (JSC::SpecializedThunkJIT::loadCellArgument):
      (JSC::SpecializedThunkJIT::loadInt32Argument): Use helper functions! They
      build strong bones and teeth!
      
      * runtime/ArgList.cpp:
      (JSC::ArgList::getSlice):
      (JSC::MarkedArgumentBuffer::slowAppend):
      * runtime/ArgList.h:
      (JSC::MarkedArgumentBuffer::MarkedArgumentBuffer):
      (JSC::MarkedArgumentBuffer::~MarkedArgumentBuffer):
      (JSC::MarkedArgumentBuffer::at):
      (JSC::MarkedArgumentBuffer::clear):
      (JSC::MarkedArgumentBuffer::append):
      (JSC::MarkedArgumentBuffer::removeLast):
      (JSC::MarkedArgumentBuffer::last):
      (JSC::ArgList::ArgList):
      (JSC::ArgList::at): Updated for backwards-correctness. WTF::Vector doesn't
      play nice with backwards-ness, so I changed to using manual allocation.
              
      Fixed a FIXME about not all values being marked in the case of out-of-line
      arguments. I had to rewrite the loop anyway, and I didn't feel like
      maintaining fidelity to its old bugs.
      
      * runtime/Arguments.cpp:
      (JSC::Arguments::visitChildren):
      (JSC::Arguments::copyToArguments):
      (JSC::Arguments::fillArgList):
      (JSC::Arguments::getOwnPropertySlotByIndex):
      (JSC::Arguments::getOwnPropertySlot):
      (JSC::Arguments::getOwnPropertyDescriptor):
      (JSC::Arguments::putByIndex):
      (JSC::Arguments::put):
      (JSC::Arguments::tearOff):
      * runtime/Arguments.h:
      (JSC::Arguments::create):
      (JSC::Arguments::Arguments):
      (JSC::Arguments::argument):
      (JSC::Arguments::finishCreation): Secondary benefit of this patch: deleted
      lots of tricky code designed to maintain two different copies of function
      arguments. Now that arguments are always contiguous in one place in memory,
      this complexity can go away.
              
      Reduced down to one create function for the Arguments class, from three.
      
      Moved tearOff() into an out-of-line function because it's huge.
              
      Moved logic about whether to tear off eagerly into the Arguments class,
      so we didn't have to duplicate it elsewhere.
      
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      (JSC::JSActivation::visitChildren): Renamed m_numParametersMinusThis to
      m_numCapturedArgs because if the value really were m_numParametersMinusThis
      we would be marking too much. (We shouldn't mark 'this' because it can't
      be captured.) Also, use helper functions.
      
      * runtime/JSActivation.h:
      (JSC::JSActivation::tearOff): Use helper functions.
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::copyToArguments):
      * runtime/JSArray.h: Use helper functions, as above.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@102545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0af1468f
  15. 30 Nov, 2011 1 commit
    • ggaren@apple.com's avatar
      Removed ArgList iterators. · 3575fead
      ggaren@apple.com authored
      Reviewed by Gavin Barraclough.
              
      Another step toward reversing the argument order.
      
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::executeCall):
      (JSC::Interpreter::executeConstruct): Switched from iterator to int.
      
      * runtime/ArgList.h:
      (JSC::ArgList::ArgList):
      (JSC::ArgList::isEmpty): Removed iterators.
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::finishCreation): Switched from iterator to int.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@101604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3575fead
  16. 16 Nov, 2011 2 commits
  17. 15 Nov, 2011 1 commit
    • ggaren@apple.com's avatar
      Removed a use of ArgList that baked in the assumption that arguments · f1944922
      ggaren@apple.com authored
      are forward in the regiter file.
      
      Reviewed by Sam Weinig.
      
      * dfg/DFGOperations.cpp:
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION): Use new API.
      
      * runtime/ArgList.cpp:
      (JSC::ArgList::getSlice): No need to provide an arbitrary constructor --
      getSlice can do the right thing by using its rights to private data.
      
      * runtime/ArgList.h: Removed constructor that took a forward-contiguous
      set of arguments.
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::finishCreation):
      * runtime/JSArray.h:
      (JSC::JSArray::create):
      * runtime/JSGlobalObject.h:
      (JSC::constructArray): Added explicit support for creating an array from
      a pre-allocated set of values, so we could stop relying on the ArgList
      API we want to remove.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f1944922
  18. 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
  19. 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
  20. 02 Nov, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      De-virtualize JSObject::getOwnPropertyNames · 5726238d
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=71307
      
      Reviewed by Darin Adler.
      
      Source/JavaScriptCore: 
      
      Added getOwnPropertyNames to the MethodTable, changed all the virtual 
      implementations of getOwnPropertyNames to static ones, and replaced 
      all call sites with corresponding lookups in the MethodTable.
      
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getOwnPropertyNames):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::getOwnPropertyNames):
      * debugger/DebuggerActivation.h:
      * runtime/Arguments.cpp:
      (JSC::Arguments::getOwnPropertyNames):
      * runtime/Arguments.h:
      * runtime/ClassInfo.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::getOwnPropertyNames):
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertyNames):
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::getOwnPropertyNames):
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::getOwnPropertyNames):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::getOwnPropertyNames):
      * runtime/JSFunction.h:
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::getOwnPropertyNames):
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      (JSC::Stringifier::Holder::appendNextProperty):
      (JSC::Walker::walk):
      * runtime/JSObject.cpp:
      (JSC::JSObject::getPropertyNames):
      (JSC::JSObject::getOwnPropertyNames):
      * runtime/JSObject.h:
      * runtime/JSVariableObject.cpp:
      (JSC::JSVariableObject::~JSVariableObject):
      (JSC::JSVariableObject::getOwnPropertyNames):
      * runtime/JSVariableObject.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::objectConstructorGetOwnPropertyNames):
      (JSC::objectConstructorKeys):
      (JSC::defineProperties):
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::getOwnPropertyNames):
      * runtime/StringObject.cpp:
      (JSC::StringObject::getOwnPropertyNames):
      * runtime/StringObject.h:
      * runtime/Structure.h:
      
      Source/JavaScriptGlue: 
      
      Added getOwnPropertyNames to the MethodTable, changed all the virtual 
      implementations of getOwnPropertyNames to static ones, and replaced 
      all call sites with corresponding lookups in the MethodTable.
      
      * UserObjectImp.cpp:
      (UserObjectImp::getOwnPropertyNames):
      * UserObjectImp.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Added getOwnPropertyNames to the MethodTable, changed all the virtual 
      implementations of getOwnPropertyNames to static ones, and replaced 
      all call sites with corresponding lookups in the MethodTable.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMStringMapCustom.cpp:
      (WebCore::JSDOMStringMap::getOwnPropertyNames):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::getOwnPropertyNames):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::getOwnPropertyNames):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSHistoryCustom.cpp:
      (WebCore::JSHistory::getOwnPropertyNames):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::getOwnPropertyNames):
      * bindings/js/JSStorageCustom.cpp:
      (WebCore::JSStorage::getOwnPropertyNames):
      * bindings/js/ScriptValue.cpp:
      (WebCore::jsToInspectorValue):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::CloneSerializer::serialize):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertyNames):
      (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertyNames):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::getOwnPropertyNames):
      * bridge/runtime_array.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::getOwnPropertyNames):
      * bridge/runtime_object.h:
      
      Source/WebKit2: 
      
      Added getOwnPropertyNames to the MethodTable, changed all the virtual 
      implementations of getOwnPropertyNames to static ones, and replaced 
      all call sites with corresponding lookups in the MethodTable.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::getOwnPropertyNames):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5726238d
  21. 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
  22. 25 Oct, 2011 2 commits
    • mhahnenberg@apple.com's avatar
      Remove deletePropertyVirtual · c0f87c17
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70738
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      Removed all declarations and definitions of deletePropertyVirtual.
      Also replaced all call sites to deletePropertyVirtual with a 
      corresponding lookup in the MethodTable.
      
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::deletePropertyByIndex):
      * API/JSObjectRef.cpp:
      (JSObjectDeleteProperty):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::deleteProperty):
      * debugger/DebuggerActivation.h:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/Arguments.cpp:
      * runtime/Arguments.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncPop):
      (JSC::arrayProtoFuncReverse):
      (JSC::arrayProtoFuncShift):
      (JSC::arrayProtoFuncSplice):
      (JSC::arrayProtoFuncUnShift):
      * runtime/JSActivation.cpp:
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::deleteProperty):
      (JSC::JSArray::deletePropertyByIndex):
      * runtime/JSArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::deleteProperty):
      (JSC::JSCell::deletePropertyByIndex):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      * runtime/JSFunction.h:
      * runtime/JSNotAnObject.cpp:
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      (JSC::Walker::walk):
      * runtime/JSObject.cpp:
      (JSC::JSObject::deletePropertyByIndex):
      (JSC::JSObject::defineOwnProperty):
      * runtime/JSObject.h:
      * runtime/JSVariableObject.cpp:
      * runtime/JSVariableObject.h:
      * runtime/RegExpMatchesArray.h:
      * runtime/StrictEvalActivation.cpp:
      * runtime/StrictEvalActivation.h:
      * runtime/StringObject.cpp:
      * runtime/StringObject.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Removed all declarations and definitions of deletePropertyVirtual.
      Also replaced all call sites to deletePropertyVirtual with a 
      corresponding lookup in the MethodTable.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMStringMapCustom.cpp:
      (WebCore::JSDOMStringMap::deleteProperty):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::deleteProperty):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::deleteProperty):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSHistoryCustom.cpp:
      (WebCore::JSHistory::deleteProperty):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::deleteProperty):
      * bindings/js/JSStorageCustom.cpp:
      (WebCore::JSStorage::deleteProperty):
      * bindings/js/ScriptObject.cpp:
      (WebCore::ScriptGlobalObject::remove):
      * bindings/objc/WebScriptObject.mm:
      (-[WebScriptObject removeWebScriptKey:]):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      * bridge/NP_jsobject.cpp:
      (_NPN_RemoveProperty):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::removeMember):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      * bridge/runtime_array.cpp:
      * bridge/runtime_array.h:
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      Removed all declarations and definitions of deletePropertyVirtual.
      Also replaced all call sites to deletePropertyVirtual with a 
      corresponding lookup in the MethodTable.
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::removeProperty):
      
      Source/WebKit2: 
      
      Removed all declarations and definitions of deletePropertyVirtual.
      Also replaced all call sites to deletePropertyVirtual with a 
      corresponding lookup in the MethodTable.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      * WebProcess/Plugins/Netscape/NPJSObject.cpp:
      (WebKit::NPJSObject::removeProperty):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c0f87c17
    • mhahnenberg@apple.com's avatar
      Remove putVirtual · 39512785
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70740
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Removed all declarations and definitions of putVirtual.
      Also replaced all call sites to putVirtual with a
      corresponding lookup in the MethodTable.
      
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      * API/JSObjectRef.cpp:
      (JSObjectSetProperty):
      (JSObjectSetPropertyAtIndex):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::put):
      * debugger/DebuggerActivation.h:
      * dfg/DFGOperations.cpp:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::execute):
      (JSC::Interpreter::privateExecute):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      * runtime/Arguments.cpp:
      * runtime/Arguments.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::putProperty):
      (JSC::arrayProtoFuncConcat):
      (JSC::arrayProtoFuncPush):
      (JSC::arrayProtoFuncReverse):
      (JSC::arrayProtoFuncShift):
      (JSC::arrayProtoFuncSlice):
      (JSC::arrayProtoFuncSort):
      (JSC::arrayProtoFuncSplice):
      (JSC::arrayProtoFuncUnShift):
      (JSC::arrayProtoFuncFilter):
      (JSC::arrayProtoFuncMap):
      * runtime/JSActivation.cpp:
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::putSlowCase):
      (JSC::JSArray::push):
      (JSC::JSArray::shiftCount):
      (JSC::JSArray::unshiftCount):
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::put):
      (JSC::JSCell::putByIndex):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/JSNotAnObject.cpp:
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      (JSC::Walker::walk):
      * runtime/JSObject.cpp:
      (JSC::JSObject::putByIndex):
      (JSC::JSObject::defineOwnProperty):
      * runtime/JSObject.h:
      (JSC::JSValue::put):
      * runtime/JSStaticScopeObject.cpp:
      * runtime/JSStaticScopeObject.h:
      * runtime/ObjectPrototype.cpp:
      * runtime/ObjectPrototype.h:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      * runtime/RegExpObject.cpp:
      * runtime/RegExpObject.h:
      * runtime/StringObject.cpp:
      * runtime/StringObject.h:
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncSplit):
      
      Source/JavaScriptGlue:
      
      Removed all declarations and definitions of putVirtual.
      Also replaced all call sites to putVirtual with a
      corresponding lookup in the MethodTable.
      
      * JSValueWrapper.cpp:
      (JSValueWrapper::JSObjectSetProperty):
      * UserObjectImp.cpp:
      * UserObjectImp.h:
      
      Source/WebCore:
      
      No new tests.
      
      Removed all declarations and definitions of putVirtual.
      Also replaced all call sites to putVirtual with a
      corresponding lookup in the MethodTable.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMWindowCustom.cpp:
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::put):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::runtimeObjectCustomPut):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::CloneDeserializer::putProperty):
      * bindings/objc/WebScriptObject.mm:
      (-[WebScriptObject setValue:forKey:]):
      (-[WebScriptObject setWebScriptValueAtIndex:value:]):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bridge/NP_jsobject.cpp:
      (_NPN_SetProperty):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::setMember):
      (JavaJSObject::setSlot):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::convertQVariantToValue):
      * bridge/runtime_array.cpp:
      * bridge/runtime_array.h:
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      * bridge/testqtbindings.cpp:
      (main):
      
      Source/WebKit/efl:
      
      Removed all declarations and definitions of putVirtual.
      Also replaced all call sites to putVirtual with a
      corresponding lookup in the MethodTable.
      
      * ewk/ewk_view.cpp:
      (ewk_view_js_object_add):
      
      Source/WebKit/mac:
      
      Removed all declarations and definitions of putVirtual.
      Also replaced all call sites to putVirtual with a
      corresponding lookup in the MethodTable.
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::setProperty):
      
      Source/WebKit/qt:
      
      Removed all declarations and definitions of putVirtual.
      Also replaced all call sites to putVirtual with a
      corresponding lookup in the MethodTable.
      
      * Api/qwebframe.cpp:
      (QWebFrame::addToJavaScriptWindowObject):
      
      Source/WebKit2:
      
      Removed all declarations and definitions of putVirtual.
      Also replaced all call sites to putVirtual with a
      corresponding lookup in the MethodTable.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      * WebProcess/Plugins/Netscape/NPJSObject.cpp:
      (WebKit::NPJSObject::setProperty):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98415 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39512785
  23. 24 Oct, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Rename static getOwnPropertySlot to getOwnPropertySlotByIndex · 6f0c32e0
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70271
      
      Reviewed by Darin Adler.
      
      Source/JavaScriptCore:
      
      Renaming versions of getOwnPropertySlot that use an unsigned as the property
      name to "getOwnPropertySlotByIndex" in preparation for adding them to the
      MethodTable, which requires unique names for each method.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * runtime/Arguments.cpp:
      (JSC::Arguments::getOwnPropertySlotVirtual):
      (JSC::Arguments::getOwnPropertySlotByIndex):
      * runtime/Arguments.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertySlotVirtual):
      (JSC::JSArray::getOwnPropertySlotByIndex):
      (JSC::JSArray::getOwnPropertySlot):
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::getOwnPropertySlotVirtual):
      (JSC::JSByteArray::getOwnPropertySlotByIndex):
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::getOwnPropertySlotVirtual):
      (JSC::JSCell::getOwnPropertySlotByIndex):
      * runtime/JSCell.h:
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::getOwnPropertySlotVirtual):
      (JSC::JSNotAnObject::getOwnPropertySlotByIndex):
      * runtime/JSNotAnObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::getOwnPropertySlotVirtual):
      (JSC::JSObject::getOwnPropertySlotByIndex):
      * runtime/JSObject.h:
      * runtime/JSString.cpp:
      (JSC::JSString::getOwnPropertySlotVirtual):
      (JSC::JSString::getOwnPropertySlotByIndex):
      * runtime/JSString.h:
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::getOwnPropertySlotVirtual):
      (JSC::ObjectPrototype::getOwnPropertySlotByIndex):
      * runtime/ObjectPrototype.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::getOwnPropertySlotVirtual):
      (JSC::RegExpMatchesArray::getOwnPropertySlotByIndex):
      * runtime/StringObject.cpp:
      (JSC::StringObject::getOwnPropertySlotVirtual):
      (JSC::StringObject::getOwnPropertySlotByIndex):
      * runtime/StringObject.h:
      
      Source/WebCore:
      
      No new tests.
      
      Renaming versions of getOwnPropertySlot that use an unsigned as the property
      name to "getOwnPropertySlotByIndex" in preparation for adding them to the
      MethodTable, which requires unique names for each method.
      
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::CloneSerializer::getSparseIndex):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::getOwnPropertySlotVirtual):
      (JSC::RuntimeArray::getOwnPropertySlotByIndex):
      * bridge/runtime_array.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f0c32e0
  24. 20 Oct, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Rename static deleteProperty to deletePropertyByIndex · 8a10db98
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70257
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      Renaming versions of deleteProperty that use an unsigned as the property
      name to "deletePropertyByIndex" in preparation for adding them to the 
      MethodTable, which requires unique names for each method.
      
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::deletePropertyVirtual):
      (JSC::::deletePropertyByIndex):
      * runtime/Arguments.cpp:
      (JSC::Arguments::deletePropertyVirtual):
      (JSC::Arguments::deletePropertyByIndex):
      * runtime/Arguments.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::deletePropertyVirtual):
      (JSC::JSArray::deletePropertyByIndex):
      * runtime/JSArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::deletePropertyVirtual):
      (JSC::JSCell::deletePropertyByIndex):
      * runtime/JSCell.h:
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::deletePropertyVirtual):
      (JSC::JSNotAnObject::deletePropertyByIndex):
      * runtime/JSNotAnObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::deletePropertyVirtual):
      (JSC::JSObject::deletePropertyByIndex):
      * runtime/JSObject.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::deletePropertyVirtual):
      (JSC::RegExpMatchesArray::deletePropertyByIndex):
      
      Source/WebCore: 
      
      No new tests.
      
      Renaming versions of deleteProperty that use an unsigned as the property
      name to "deletePropertyByIndex" in preparation for adding them to the 
      MethodTable, which requires unique names for each method.
      
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::deletePropertyVirtual):
      (JSC::RuntimeArray::deletePropertyByIndex):
      * bridge/runtime_array.h:
      
      Source/WebKit2: 
      
      Renaming versions of deleteProperty that use an unsigned as the property
      name to "deletePropertyByIndex" in preparation for adding them to the 
      MethodTable, which requires unique names for each method.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::deletePropertyVirtual):
      (WebKit::JSNPObject::deletePropertyByIndex):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a10db98
  25. 18 Oct, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Rename static put to putByIndex · 4f33efea
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70281
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Renaming versions of deleteProperty that use an unsigned as the property
      name to "deletePropertyByIndex" in preparation for adding them to the
      MethodTable, which requires unique names for each method.
      
      * dfg/DFGOperations.cpp:
      (JSC::DFG::putByVal):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/Arguments.cpp:
      (JSC::Arguments::putVirtual):
      (JSC::Arguments::putByIndex):
      * runtime/Arguments.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncMap):
      * runtime/JSArray.cpp:
      (JSC::JSArray::put):
      (JSC::JSArray::putVirtual):
      (JSC::JSArray::putByIndex):
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::putVirtual):
      (JSC::JSByteArray::putByIndex):
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::putVirtual):
      (JSC::JSCell::putByIndex):
      * runtime/JSCell.h:
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::putVirtual):
      (JSC::JSNotAnObject::putByIndex):
      * runtime/JSNotAnObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::putVirtual):
      (JSC::JSObject::putByIndex):
      * runtime/JSObject.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpMatchesArray::fillArrayInstance):
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::putVirtual):
      (JSC::RegExpMatchesArray::putByIndex):
      
      Source/WebCore:
      
      No new tests.
      
      Renaming versions of deleteProperty that use an unsigned as the property
      name to "deletePropertyByIndex" in preparation for adding them to the
      MethodTable, which requires unique names for each method.
      
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::putVirtual):
      (JSC::RuntimeArray::putByIndex):
      * bridge/runtime_array.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4f33efea
  26. 17 Oct, 2011 1 commit
    • ggaren@apple.com's avatar
      Simplified GC marking logic · 3a7b479f
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70258
      
      Reviewed by Filip Pizlo.
              
      No perf. change.
              
      This is a first step toward GC allocating string backing stores, starting
      with ropes. It also enables future simplifications and optimizations.
              
      - Replaced some complex mark stack logic with a simple linear stack of
      JSCell pointers.
              
      - Replaced logic for short-circuiting marking based on JSType and/or
      Structure flags with special cases for object, array, and string.
              
      - Fiddled with inlining for better codegen.
      
      * JavaScriptCore.exp:
      * heap/HandleStack.cpp: Build!
      
      * heap/Heap.cpp:
      (JSC::Heap::Heap): Provide more vptrs to SlotVisitor, for use in marking.
      
      * heap/HeapRootVisitor.h: Removed unused functions that no longer build.
      
      * heap/MarkStack.cpp:
      (JSC::MarkStackArray::MarkStackArray):
      (JSC::MarkStackArray::~MarkStackArray):
      (JSC::MarkStackArray::expand):
      (JSC::MarkStackArray::shrinkAllocation):
      (JSC::MarkStack::reset):
      (JSC::visitChildren):
      (JSC::SlotVisitor::drain):
      * heap/MarkStack.h:
      (JSC::MarkStack::MarkStack):
      (JSC::MarkStack::~MarkStack):
      (JSC::MarkStackArray::append):
      (JSC::MarkStackArray::removeLast):
      (JSC::MarkStackArray::isEmpty):
      (JSC::MarkStack::append):
      (JSC::MarkStack::appendUnbarrieredPointer):
      (JSC::MarkStack::internalAppend): Replaced complex mark set logic with
      simple linear stack.
      
      * heap/SlotVisitor.h:
      (JSC::SlotVisitor::SlotVisitor): Updated for above changes.
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::visitChildren):
      * runtime/JSArray.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::visitChildren):
      * runtime/JSObject.h: Don't inline visitChildren; it's too big.
      
      * runtime/Structure.h:
      (JSC::MarkStack::internalAppend): Nixed the short-circuit for CompoundType
      because it prevented strings from owning GC pointers.
      
      * runtime/WriteBarrier.h:
      (JSC::MarkStack::appendValues): No need to validate; internalAppend will
      do that for us.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a7b479f
  27. 14 Oct, 2011 3 commits
    • 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
    • mhahnenberg@apple.com's avatar
      Rename virtual put to putVirtual · e0c1d019
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69851
      
      Reviewed by Darin Adler.
      
      .: 
      
      Renamed virtual versions of put to putVirtual in prepration for 
      adding the static put to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same 
      name.
      
      * Source/autotools/symbols.filter:
      
      Source/JavaScriptCore: 
      
      Renamed virtual versions of put to putVirtual in prepration for 
      adding the static put to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same 
      name.
      
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::putVirtual):
      * API/JSObjectRef.cpp:
      (JSObjectSetProperty):
      (JSObjectSetPropertyAtIndex):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::putVirtual):
      (JSC::DebuggerActivation::put):
      * debugger/DebuggerActivation.h:
      * dfg/DFGOperations.cpp:
      (JSC::DFG::putByVal):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::execute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      * runtime/Arguments.cpp:
      (JSC::Arguments::putVirtual):
      * runtime/Arguments.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::putProperty):
      (JSC::arrayProtoFuncConcat):
      (JSC::arrayProtoFuncPush):
      (JSC::arrayProtoFuncReverse):
      (JSC::arrayProtoFuncShift):
      (JSC::arrayProtoFuncSlice):
      (JSC::arrayProtoFuncSort):
      (JSC::arrayProtoFuncSplice):
      (JSC::arrayProtoFuncUnShift):
      (JSC::arrayProtoFuncFilter):
      (JSC::arrayProtoFuncMap):
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::putVirtual):
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::putVirtual):
      (JSC::JSArray::putSlowCase):
      (JSC::JSArray::push):
      (JSC::JSArray::shiftCount):
      (JSC::JSArray::unshiftCount):
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::putVirtual):
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::putVirtual):
      (JSC::JSCell::put):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::putVirtual):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::putVirtual):
      (JSC::JSGlobalObject::putWithAttributes):
      * runtime/JSGlobalObject.h:
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::putVirtual):
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      (JSC::Walker::walk):
      * runtime/JSObject.cpp:
      (JSC::JSObject::putVirtual):
      (JSC::JSObject::put):
      (JSC::JSObject::defineOwnProperty):
      * runtime/JSObject.h:
      (JSC::JSValue::put):
      * runtime/JSStaticScopeObject.cpp:
      (JSC::JSStaticScopeObject::putVirtual):
      * runtime/JSStaticScopeObject.h:
      * runtime/Lookup.h:
      (JSC::lookupPut):
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::putVirtual):
      * runtime/ObjectPrototype.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpMatchesArray::fillArrayInstance):
      (JSC::RegExpConstructor::putVirtual):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::putVirtual):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::putVirtual):
      * runtime/RegExpObject.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::putVirtual):
      * runtime/StringObject.h:
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncSplit):
      
      Source/JavaScriptGlue: 
      
      Renamed virtual versions of put to putVirtual in prepration for 
      adding the static put to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same 
      name.
      
      * JSValueWrapper.cpp:
      (JSValueWrapper::JSObjectSetProperty):
      * UserObjectImp.cpp:
      (UserObjectImp::putVirtual):
      * UserObjectImp.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Renamed virtual versions of put to putVirtual in prepration for 
      adding the static put to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same 
      name.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::putVirtual):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::putVirtual):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::putDelegate):
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::runtimeObjectCustomPut):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::CloneDeserializer::putProperty):
      * bindings/objc/WebScriptObject.mm:
      (-[WebScriptObject setValue:forKey:]):
      (-[WebScriptObject setWebScriptValueAtIndex:value:]):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::putVirtual):
      * bindings/scripts/test/JS/JSTestObj.h:
      * bridge/NP_jsobject.cpp:
      (_NPN_SetProperty):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::setMember):
      (JavaJSObject::setSlot):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::putVirtual):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtInstance::put):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::convertQVariantToValue):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::putVirtual):
      * bridge/runtime_array.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::putVirtual):
      * bridge/runtime_object.h:
      * bridge/testqtbindings.cpp:
      (main):
      
      Source/WebKit/efl: 
      
      Renamed virtual versions of put to putVirtual in prepration for 
      adding the static put to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same 
      name.
      
      * ewk/ewk_view.cpp:
      (ewk_view_js_object_add):
      
      Source/WebKit/mac: 
      
      Renamed virtual versions of put to putVirtual in prepration for 
      adding the static put to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same 
      name.
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::setProperty):
      
      Source/WebKit/qt: 
      
      Renamed virtual versions of put to putVirtual in prepration for 
      adding the static put to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same 
      name.
      
      * Api/qwebframe.cpp:
      (QWebFrame::addToJavaScriptWindowObject):
      
      Source/WebKit2: 
      
      Renamed virtual versions of put to putVirtual in prepration for 
      adding the static put to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same 
      name.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::putVirtual):
      (WebKit::JSNPObject::put):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      * WebProcess/Plugins/Netscape/NPJSObject.cpp:
      (WebKit::NPJSObject::setProperty):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e0c1d019
    • mhahnenberg@apple.com's avatar
      Rename virtual deleteProperty to deletePropertyVirtual · d710a4a6
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69884
      
      Reviewed by Darin Adler.
      
      Source/JavaScriptCore: 
      
      Renamed virtual versions of deleteProperty to deletePropertyVirtual in prepration for 
      adding the static deleteProperty to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same name.
      
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::deletePropertyVirtual):
      (JSC::::deleteProperty):
      * API/JSObjectRef.cpp:
      (JSObjectDeleteProperty):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::deletePropertyVirtual):
      (JSC::DebuggerActivation::deleteProperty):
      * debugger/DebuggerActivation.h:
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/Arguments.cpp:
      (JSC::Arguments::deletePropertyVirtual):
      * runtime/Arguments.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncPop):
      (JSC::arrayProtoFuncReverse):
      (JSC::arrayProtoFuncShift):
      (JSC::arrayProtoFuncSplice):
      (JSC::arrayProtoFuncUnShift):
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::deletePropertyVirtual):
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::deletePropertyVirtual):
      (JSC::JSArray::deleteProperty):
      * runtime/JSArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::deletePropertyVirtual):
      (JSC::JSCell::deleteProperty):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::deletePropertyVirtual):
      * runtime/JSFunction.h:
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::deletePropertyVirtual):
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      (JSC::Walker::walk):
      * runtime/JSObject.cpp:
      (JSC::JSObject::deletePropertyVirtual):
      (JSC::JSObject::deleteProperty):
      (JSC::JSObject::defineOwnProperty):
      * runtime/JSObject.h:
      * runtime/JSVariableObject.cpp:
      (JSC::JSVariableObject::deletePropertyVirtual):
      * runtime/JSVariableObject.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::deletePropertyVirtual):
      * runtime/StrictEvalActivation.cpp:
      (JSC::StrictEvalActivation::deletePropertyVirtual):
      * runtime/StrictEvalActivation.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::deletePropertyVirtual):
      * runtime/StringObject.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Renamed virtual versions of deleteProperty to deletePropertyVirtual in prepration for 
      adding the static deleteProperty to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same name.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMStringMapCustom.cpp:
      (WebCore::JSDOMStringMap::deletePropertyVirtual):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::deletePropertyVirtual):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::deletePropertyVirtual):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSHistoryCustom.cpp:
      (WebCore::JSHistory::deletePropertyVirtual):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::deletePropertyVirtual):
      * bindings/js/JSStorageCustom.cpp:
      (WebCore::JSStorage::deletePropertyVirtual):
      * bindings/js/ScriptObject.cpp:
      (WebCore::ScriptGlobalObject::remove):
      * bindings/objc/WebScriptObject.mm:
      (-[WebScriptObject removeWebScriptKey:]):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      * bridge/NP_jsobject.cpp:
      (_NPN_RemoveProperty):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::removeMember):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::deletePropertyVirtual):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::deletePropertyVirtual):
      * bridge/runtime_array.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::deletePropertyVirtual):
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      Renamed virtual versions of deleteProperty to deletePropertyVirtual in prepration for 
      adding the static deleteProperty to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same name.
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::removeProperty):
      
      Source/WebKit2: 
      
      Renamed virtual versions of deleteProperty to deletePropertyVirtual in prepration for 
      adding the static deleteProperty to the MethodTable in ClassInfo since the 
      compiler gets mad if the virtual and static versions have the same name.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::deletePropertyVirtual):
      (WebKit::JSNPObject::deleteProperty):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      * WebProcess/Plugins/Netscape/NPJSObject.cpp:
      (WebKit::NPJSObject::removeProperty):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d710a4a6
  28. 08 Oct, 2011 2 commits
    • 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
    • mhahnenberg@apple.com's avatar
      Add static version of JSCell::deleteProperty · 914c3eeb
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69659
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Added static version of both versions of put to all classes that
      override them and changed the virtual versions to call the static
      versions.  This is the first step in de-virtualizing JSCell::deleteProperty.
      
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::deleteProperty):
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::deleteProperty):
      * debugger/DebuggerActivation.h:
      * runtime/Arguments.cpp:
      (JSC::Arguments::deleteProperty):
      * runtime/Arguments.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::deleteProperty):
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::deleteProperty):
      * runtime/JSArray.h:
      * runtime/JSCell.cpp:
      (JSC::JSCell::deleteProperty):
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::deleteProperty):
      * runtime/JSFunction.h:
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::deleteProperty):
      * runtime/JSNotAnObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::deleteProperty):
      * runtime/JSObject.h:
      * runtime/JSVariableObject.cpp:
      (JSC::JSVariableObject::deleteProperty):
      * runtime/JSVariableObject.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::deleteProperty):
      * runtime/StrictEvalActivation.cpp:
      (JSC::StrictEvalActivation::deleteProperty):
      * runtime/StrictEvalActivation.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::deleteProperty):
      * runtime/StringObject.h:
      
      Source/WebCore:
      
      No new tests.
      
      Added static version of both versions of put to all classes that
      override them and changed the virtual versions to call the static
      versions.  This is the first step in de-virtualizing JSCell::deleteProperty.
      
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::deleteProperty):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::deleteProperty):
      * bridge/runtime_array.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::deleteProperty):
      * bridge/runtime_object.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      914c3eeb