1. 27 Sep, 2011 3 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r96131. · 3b381c1e
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/96131
      https://bugs.webkit.org/show_bug.cgi?id=68927
      
      It made 18+ tests crash on all platform (Requested by
      Ossy_night on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-09-27
      
      Source/JavaScriptCore:
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::throwException):
      * interpreter/Interpreter.h:
      * jsc.cpp:
      (GlobalObject::finishCreation):
      * parser/Parser.h:
      (JSC::Parser::parse):
      * runtime/CommonIdentifiers.h:
      * runtime/Error.cpp:
      (JSC::addErrorInfo):
      * runtime/Error.h:
      
      LayoutTests:
      
      * fast/js/exception-properties-expected.txt:
      * fast/js/script-tests/exception-properties.js:
      * fast/js/script-tests/stack-trace.js: Removed.
      * fast/js/stack-trace-expected.txt: Removed.
      * fast/js/stack-trace.html: Removed.
      * platform/chromium/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b381c1e
    • mhahnenberg@apple.com's avatar
      De-virtualize JSCell::getPrimitiveNumber · 061133e0
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68851
      
      Reviewed by Darin Adler.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      
      Changed JSCell::getPrimitiveNumber to manually handle the dispatch for 
      JSCells (JSObject and JSString in this case).
      * runtime/JSCell.cpp:
      (JSC::JSCell::getPrimitiveNumber):
      * runtime/JSCell.h:
      
      Removed JSNotAnObject::getPrimitiveNumber since its return value doesn't 
      matter and it already implements defaultValue, so JSObject::getPrimitiveNumber
      can cover the case for JSNotAnObject.
      * runtime/JSNotAnObject.cpp:
      * runtime/JSNotAnObject.h:
      
      De-virtualized JSObject::getPrimitiveNumber and JSString::getPrimitiveNumber 
      and changed them to be const.  Also made JSString::getPrimitiveNumber public 
      because it needs to be called from JSCell::getPrimitiveNumber and also since it's 
      no longer virtual, we want people who have a more specific pointer (JSString* 
      instead of JSCell*) to not have to pay the cost of a virtual method call.
      * runtime/JSObject.cpp:
      (JSC::JSObject::getPrimitiveNumber):
      * runtime/JSObject.h:
      * runtime/JSString.cpp:
      (JSC::JSString::getPrimitiveNumber):
      * runtime/JSString.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      061133e0
    • commit-queue@webkit.org's avatar
      Implement Error.stack · f177874f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=66994
      
      Patch by Juan Carlos Montemayor Elosua <j.mont@me.com> on 2011-09-27
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore:
      
      This patch utilizes topCallFrame to create a stack trace when
      an error is thrown. Users will also be able to use the stack()
      command in jsc to get arrays with stack trace information.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * interpreter/Interpreter.cpp:
      (JSC::getCallerLine):
      (JSC::getSourceURLFromCallFrame):
      (JSC::getStackFrameCodeType):
      (JSC::Interpreter::getStackTrace):
      (JSC::Interpreter::throwException):
      * interpreter/Interpreter.h:
      (JSC::StackFrame::toString):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (functionJSCStack):
      * parser/Parser.h:
      (JSC::Parser::parse):
      * runtime/CommonIdentifiers.h:
      * runtime/Error.cpp:
      (JSC::addErrorInfo):
      * runtime/Error.h:
      
      LayoutTests:
      
      Unit tests that contain both normal and special cases for stack trace
      generation.
      
      * fast/js/exception-properties-expected.txt:
      * fast/js/script-tests/exception-properties.js:
      * fast/js/script-tests/stack-trace.js: Added.
      (printStack):
      (hostThrower):
      (callbacker):
      (outer):
      (inner):
      (evaler):
      (normalOuter):
      (normalInner):
      (scripterInner):
      (scripterOuter):
      * fast/js/stack-trace-expected.txt: Added.
      * fast/js/stack-trace.html: Added.
      * platform/chromium/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f177874f
  2. 26 Sep, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Make JSCell::toBoolean non-virtual · f2fa8ff1
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67727
      
      Reviewed by Geoffrey Garen.
      
      JSCell::toBoolean now manually performs the toBoolean check for objects and strings (where
      before it was simply virtual and would crash if its implementation was called).
      Its descendants in JSObject and JSString have also been made non-virtual.  JSCell now
      explicitly covers all cases of toBoolean, so having a virtual implementation of
      JSCell::toBoolean is no longer necessary.  This is part of a larger process of un-virtualizing JSCell.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSNotAnObject.cpp:
      * runtime/JSNotAnObject.h:
      * runtime/JSObject.h:
      * runtime/JSString.h:
      (JSC::JSCell::toBoolean):
      (JSC::JSValue::toBoolean):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f2fa8ff1
  3. 23 Sep, 2011 3 commits
    • mhahnenberg@apple.com's avatar
      De-virtualize JSCell::getJSNumber · e5e24647
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68651
      
      Reviewed by Oliver Hunt.
      
      Added a new JSType to check whether or not something is a 
      NumberObject (which includes NumberPrototype) in TypeInfo::isNumberObject because there's not 
      currently a better way to determine whether something is indeed a NumberObject.
      Also de-virtualized JSCell::getJSNumber, having it check the TypeInfo 
      for whether the object is a NumberObject or not.  This patch is part of 
      the larger process of de-virtualizing JSCell.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * runtime/JSCell.cpp:
      (JSC::JSCell::getJSNumber):
      * runtime/JSCell.h:
      (JSC::JSValue::getJSNumber):
      * runtime/JSType.h:
      * runtime/JSTypeInfo.h:
      (JSC::TypeInfo::isNumberObject):
      * runtime/JSValue.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::getJSNumber):
      * runtime/NumberObject.h:
      (JSC::NumberObject::createStructure):
      * runtime/NumberPrototype.h:
      (JSC::NumberPrototype::createStructure):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5e24647
    • oliver@apple.com's avatar
      Fix windows build. · 6af13a03
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6af13a03
    • mhahnenberg@apple.com's avatar
      Add static version of JSCell::visitChildren · 982c9ea2
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68404
      
      Reviewed by Darin Adler.
      
      .: 
      
      In this patch we just extract the bodies of the virtual visitChildren methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of visitChildren into our own custom vtable stored in 
      ClassInfo.  We need to convert the methods to static methods in order to be 
      able to more easily store and refer to them in our custom vtable since normal 
      member methods store some implicit information in their types, making it 
      impossible to store them generically in ClassInfo.
      
      * Source/autotools/symbols.filter:
      
      Source/JavaScriptCore: 
      
      In this patch we just extract the bodies of the virtual visitChildren methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of visitChildren into our own custom vtable stored in 
      ClassInfo.  We need to convert the methods to static methods in order to be 
      able to more easily store and refer to them in our custom vtable since normal 
      member methods store some implicit information in their types, making it 
      impossible to store them generically in ClassInfo.
      
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObject::visitChildrenVirtual):
      (JSC::JSCallbackObject::visitChildren):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::visitChildrenVirtual):
      (JSC::DebuggerActivation::visitChildren):
      * debugger/DebuggerActivation.h:
      * heap/MarkStack.cpp:
      (JSC::SlotVisitor::visitChildren):
      (JSC::SlotVisitor::drain):
      * runtime/Arguments.cpp:
      (JSC::Arguments::visitChildrenVirtual):
      (JSC::Arguments::visitChildren):
      * runtime/Arguments.h:
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::visitChildrenVirtual):
      (JSC::EvalExecutable::visitChildren):
      (JSC::ProgramExecutable::visitChildrenVirtual):
      (JSC::ProgramExecutable::visitChildren):
      (JSC::FunctionExecutable::visitChildrenVirtual):
      (JSC::FunctionExecutable::visitChildren):
      * runtime/Executable.h:
      * runtime/GetterSetter.cpp:
      (JSC::GetterSetter::visitChildrenVirtual):
      (JSC::GetterSetter::visitChildren):
      * runtime/GetterSetter.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::visitChildrenVirtual):
      (JSC::JSActivation::visitChildren):
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::visitChildrenVirtual):
      (JSC::JSArray::visitChildren):
      * runtime/JSArray.h:
      * runtime/JSBoundFunction.cpp:
      (JSC::JSBoundFunction::visitChildrenVirtual):
      (JSC::JSBoundFunction::visitChildren):
      * runtime/JSBoundFunction.h:
      * runtime/JSCell.h:
      (JSC::JSCell::visitChildrenVirtual):
      (JSC::JSCell::visitChildren):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::visitChildrenVirtual):
      (JSC::JSFunction::visitChildren):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::visitChildrenVirtual):
      (JSC::JSGlobalObject::visitChildren):
      * runtime/JSGlobalObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::visitChildrenVirtual):
      (JSC::JSObject::visitChildren):
      * runtime/JSObject.h:
      (JSC::JSObject::visitChildrenDirect):
      * runtime/JSPropertyNameIterator.cpp:
      (JSC::JSPropertyNameIterator::visitChildrenVirtual):
      (JSC::JSPropertyNameIterator::visitChildren):
      * runtime/JSPropertyNameIterator.h:
      * runtime/JSStaticScopeObject.cpp:
      (JSC::JSStaticScopeObject::visitChildrenVirtual):
      (JSC::JSStaticScopeObject::visitChildren):
      * runtime/JSStaticScopeObject.h:
      * runtime/JSWrapperObject.cpp:
      (JSC::JSWrapperObject::visitChildrenVirtual):
      (JSC::JSWrapperObject::visitChildren):
      * runtime/JSWrapperObject.h:
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::visitChildrenVirtual):
      (JSC::NativeErrorConstructor::visitChildren):
      * runtime/NativeErrorConstructor.h:
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::visitChildrenVirtual):
      (JSC::RegExpObject::visitChildren):
      * runtime/RegExpObject.h:
      * runtime/ScopeChain.cpp:
      (JSC::ScopeChainNode::visitChildrenVirtual):
      (JSC::ScopeChainNode::visitChildren):
      * runtime/ScopeChain.h:
      * runtime/Structure.cpp:
      (JSC::Structure::visitChildrenVirtual):
      (JSC::Structure::visitChildren):
      * runtime/Structure.h:
      * runtime/StructureChain.cpp:
      (JSC::StructureChain::visitChildrenVirtual):
      (JSC::StructureChain::visitChildren):
      * runtime/StructureChain.h:
      
      Source/JavaScriptGlue: 
      
      In this patch we just extract the bodies of the virtual visitChildren methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of visitChildren into our own custom vtable stored in 
      ClassInfo.  We need to convert the methods to static methods in order to be 
      able to more easily store and refer to them in our custom vtable since normal 
      member methods store some implicit information in their types, making it 
      impossible to store them generically in ClassInfo.
      
      * UserObjectImp.cpp:
      (UserObjectImp::visitChildrenVirtual):
      (UserObjectImp::visitChildren):
      * UserObjectImp.h:
      
      Source/WebCore: 
      
      No new tests.
      
      In this patch we just extract the bodies of the virtual visitChildren methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of visitChildren into our own custom vtable stored in 
      ClassInfo.  We need to convert the methods to static methods in order to be 
      able to more easily store and refer to them in our custom vtable since normal 
      member methods store some implicit information in their types, making it 
      impossible to store them generically in ClassInfo.
      
      * WebCore.exp.in:
      * bindings/js/JSAttrCustom.cpp:
      (WebCore::JSAttr::visitChildrenVirtual):
      (WebCore::JSAttr::visitChildren):
      * bindings/js/JSAudioContextCustom.cpp:
      (WebCore::JSAudioContext::visitChildrenVirtual):
      (WebCore::JSAudioContext::visitChildren):
      * bindings/js/JSCSSRuleCustom.cpp:
      (WebCore::JSCSSRule::visitChildrenVirtual):
      (WebCore::JSCSSRule::visitChildren):
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      (WebCore::JSCSSStyleDeclaration::visitChildrenVirtual):
      (WebCore::JSCSSStyleDeclaration::visitChildren):
      * bindings/js/JSCanvasRenderingContextCustom.cpp:
      (WebCore::JSCanvasRenderingContext::visitChildrenVirtual):
      (WebCore::JSCanvasRenderingContext::visitChildren):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::visitChildrenVirtual):
      (WebCore::JSDOMGlobalObject::visitChildren):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::visitChildrenVirtual):
      (WebCore::JSDOMWindow::visitChildren):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::visitChildrenVirtual):
      (WebCore::JSDOMWindowShell::visitChildren):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
      (WebCore::JSJavaScriptAudioNode::visitChildrenVirtual):
      (WebCore::JSJavaScriptAudioNode::visitChildren):
      * bindings/js/JSMessageChannelCustom.cpp:
      (WebCore::JSMessageChannel::visitChildrenVirtual):
      (WebCore::JSMessageChannel::visitChildren):
      * bindings/js/JSMessagePortCustom.cpp:
      (WebCore::JSMessagePort::visitChildrenVirtual):
      (WebCore::JSMessagePort::visitChildren):
      * bindings/js/JSNamedNodeMapCustom.cpp:
      (WebCore::JSNamedNodeMap::visitChildrenVirtual):
      (WebCore::JSNamedNodeMap::visitChildren):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::visitChildrenVirtual):
      (WebCore::JSNode::visitChildren):
      * bindings/js/JSNodeFilterCustom.cpp:
      (WebCore::JSNodeFilter::visitChildrenVirtual):
      (WebCore::JSNodeFilter::visitChildren):
      * bindings/js/JSNodeIteratorCustom.cpp:
      (WebCore::JSNodeIterator::visitChildrenVirtual):
      (WebCore::JSNodeIterator::visitChildren):
      * bindings/js/JSSVGElementInstanceCustom.cpp:
      (WebCore::JSSVGElementInstance::visitChildrenVirtual):
      (WebCore::JSSVGElementInstance::visitChildren):
      * bindings/js/JSSharedWorkerCustom.cpp:
      (WebCore::JSSharedWorker::visitChildrenVirtual):
      (WebCore::JSSharedWorker::visitChildren):
      * bindings/js/JSStyleSheetCustom.cpp:
      (WebCore::JSStyleSheet::visitChildrenVirtual):
      (WebCore::JSStyleSheet::visitChildren):
      * bindings/js/JSTreeWalkerCustom.cpp:
      (WebCore::JSTreeWalker::visitChildrenVirtual):
      (WebCore::JSTreeWalker::visitChildren):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::JSWebGLRenderingContext::visitChildrenVirtual):
      (WebCore::JSWebGLRenderingContext::visitChildren):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::visitChildrenVirtual):
      (WebCore::JSWorkerContext::visitChildren):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::visitChildrenVirtual):
      (WebCore::JSXMLHttpRequest::visitChildren):
      * bindings/js/JSXPathResultCustom.cpp:
      (WebCore::JSXPathResult::visitChildrenVirtual):
      (WebCore::JSXPathResult::visitChildren):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::visitChildrenVirtual):
      (WebCore::JSTestObj::visitChildren):
      * bindings/scripts/test/JS/JSTestObj.h:
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::visitChildrenVirtual):
      (JSC::Bindings::QtRuntimeObject::visitChildren):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMetaMethod::visitChildrenVirtual):
      (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
      * bridge/qt/qt_runtime.h:
      * workers/WorkerContext.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      982c9ea2
  4. 22 Sep, 2011 2 commits
  5. 20 Sep, 2011 1 commit
    • oliver@apple.com's avatar
      Refactor Heap allocation logic into separate AllocationSpace class · 44d8954c
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68409
      
      Reviewed by Gavin Barraclough.
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:
      
      This patch hoists direct manipulation of the MarkedSpace and related
      data out of Heap and into a separate class.  This will allow us to
      have multiple allocation spaces in future, so easing the way towards
      having GC'd backing stores for objects.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.gypi:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * debugger/Debugger.cpp:
      (JSC::Debugger::recompileAllJSFunctions):
      * heap/AllocationSpace.cpp: Added.
      (JSC::AllocationSpace::tryAllocate):
      (JSC::AllocationSpace::allocateSlowCase):
      (JSC::AllocationSpace::allocateBlock):
      (JSC::AllocationSpace::freeBlocks):
      (JSC::TakeIfEmpty::TakeIfEmpty):
      (JSC::TakeIfEmpty::operator()):
      (JSC::TakeIfEmpty::returnValue):
      (JSC::AllocationSpace::shrink):
      * heap/AllocationSpace.h: Added.
      (JSC::AllocationSpace::AllocationSpace):
      (JSC::AllocationSpace::blocks):
      (JSC::AllocationSpace::sizeClassFor):
      (JSC::AllocationSpace::setHighWaterMark):
      (JSC::AllocationSpace::highWaterMark):
      (JSC::AllocationSpace::canonicalizeBlocks):
      (JSC::AllocationSpace::resetAllocator):
      (JSC::AllocationSpace::forEachCell):
      (JSC::AllocationSpace::forEachBlock):
      (JSC::AllocationSpace::allocate):
      * heap/Heap.cpp:
      (JSC::Heap::Heap):
      (JSC::Heap::reportExtraMemoryCostSlowCase):
      (JSC::Heap::getConservativeRegisterRoots):
      (JSC::Heap::markRoots):
      (JSC::Heap::clearMarks):
      (JSC::Heap::sweep):
      (JSC::Heap::objectCount):
      (JSC::Heap::size):
      (JSC::Heap::capacity):
      (JSC::Heap::globalObjectCount):
      (JSC::Heap::objectTypeCounts):
      (JSC::Heap::collect):
      (JSC::Heap::canonicalizeBlocks):
      (JSC::Heap::resetAllocator):
      (JSC::Heap::freeBlocks):
      (JSC::Heap::shrink):
      * heap/Heap.h:
      (JSC::Heap::objectSpace):
      (JSC::Heap::sizeClassForObject):
      (JSC::Heap::allocate):
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitAllocateBasicJSObject):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::recompileAllJSFunctions):
      (JSC::JSGlobalData::releaseExecutableMemory):
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:
      
      Adding a forwarding header.
      
      * ForwardingHeaders/heap/AllocationSpace.h: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      44d8954c
  6. 19 Sep, 2011 6 commits
    • mhahnenberg@apple.com's avatar
      Remove toPrimitive from JSCell · 02a74eab
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67875
      
      Reviewed by Darin Adler.
      
      Part of the refactoring process to un-virtualize JSCell.  We move
      all of the implicit functionality provided by the virtual toPrimitive method
      in JSCell to be explicit in JSValue::toPrimitive and JSCell:toPrimitive while
      also de-virtualizing JSCell::toPrimitive.
      
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * runtime/JSCell.cpp:
      (JSC::JSCell::toPrimitive):
      * runtime/JSCell.h:
      
      We replace JSNotAnObject::toPrimitive with defaultValue, which it overrides from
      JSObject.  This pushes the virtual method further down, enabling us to get rid
      of the virtual call in JSCell.  Eventually we'll probably have to deal with this
      again, but we'll cross that bridge when we come to it.
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::defaultValue):
      * runtime/JSNotAnObject.h:
      * runtime/JSObject.h:
      * runtime/JSString.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02a74eab
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r95493 and r95496. · 27504650
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/95493
      http://trac.webkit.org/changeset/95496
      https://bugs.webkit.org/show_bug.cgi?id=68418
      
      Broke Windows build (Requested by rniwa on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-09-19
      
      Source/JavaScriptCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.gypi:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * debugger/Debugger.cpp:
      (JSC::Debugger::recompileAllJSFunctions):
      * heap/AllocationSpace.cpp: Removed.
      * heap/AllocationSpace.h: Removed.
      * heap/Heap.cpp:
      (JSC::CountFunctor::TakeIfEmpty::TakeIfEmpty):
      (JSC::CountFunctor::TakeIfEmpty::operator()):
      (JSC::CountFunctor::TakeIfEmpty::returnValue):
      (JSC::Heap::Heap):
      (JSC::Heap::reportExtraMemoryCostSlowCase):
      (JSC::Heap::tryAllocate):
      (JSC::Heap::allocateSlowCase):
      (JSC::Heap::getConservativeRegisterRoots):
      (JSC::Heap::markRoots):
      (JSC::Heap::clearMarks):
      (JSC::Heap::sweep):
      (JSC::Heap::objectCount):
      (JSC::Heap::size):
      (JSC::Heap::capacity):
      (JSC::Heap::globalObjectCount):
      (JSC::Heap::objectTypeCounts):
      (JSC::Heap::collect):
      (JSC::Heap::canonicalizeBlocks):
      (JSC::Heap::resetAllocator):
      (JSC::Heap::allocateBlock):
      (JSC::Heap::freeBlocks):
      (JSC::Heap::shrink):
      * heap/Heap.h:
      (JSC::Heap::markedSpace):
      (JSC::Heap::forEachCell):
      (JSC::Heap::forEachBlock):
      (JSC::Heap::sizeClassFor):
      (JSC::Heap::allocate):
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitAllocateBasicJSObject):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::recompileAllJSFunctions):
      (JSC::JSGlobalData::releaseExecutableMemory):
      
      Source/WebCore:
      
      * ForwardingHeaders/heap/AllocationSpace.h: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      27504650
    • oliver@apple.com's avatar
      Windows build fix. · 6c67a854
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c67a854
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r95466. · a7d0ea5b
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/95466
      https://bugs.webkit.org/show_bug.cgi?id=68389
      
      Incorrect version of the patch. (Requested by mhahnenberg on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-09-19
      
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * runtime/JSCell.cpp:
      (JSC::JSCell::toPrimitive):
      * runtime/JSCell.h:
      (JSC::JSCell::JSValue::toPrimitive):
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::toPrimitive):
      * runtime/JSNotAnObject.h:
      * runtime/JSObject.h:
      * runtime/JSString.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7d0ea5b
    • mhahnenberg@apple.com's avatar
      Remove toPrimitive from JSCell · ff67f6e0
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67875
      
      Reviewed by Geoffrey Garen.
      
      Part of the refactoring process to un-virtualize JSCell.  We move
      all of the implicit functionality provided by the virtual toPrimitive method
      in JSCell to be explicit in JSValue::toPrimitive and JSCell:toPrimitive while
      also de-virtualizing JSCell::toPrimitive.
      
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * runtime/JSCell.cpp:
      (JSC::JSCell::toPrimitive):
      * runtime/JSCell.h:
      
      We replace JSNotAnObject::toPrimitive with defaultValue, which it overrides from
      JSObject.  This pushes the virtual method further down, enabling us to get rid
      of the virtual call in JSCell.  Eventually we'll probably have to deal with this
      again, but we'll cross that bridge when we come to it.
      * runtime/JSNotAnObject.cpp:
      (JSC::JSNotAnObject::defaultValue):
      * runtime/JSNotAnObject.h:
      * runtime/JSObject.h:
      * runtime/JSString.h:
      (JSC::JSValue::toPrimitive):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ff67f6e0
    • oliver@apple.com's avatar
      Rename NewSpace to MarkedSpace · 90283c61
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68375
      
      Reviewed by Gavin Barraclough.
      
      Rename NewSpace to a more accurate name, and update all uses.
      This patch doesn't rename the files themselves as that will
      just make the patch appear bigger than it is.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * heap/Heap.cpp:
      (JSC::CountFunctor::TakeIfEmpty::TakeIfEmpty):
      (JSC::CountFunctor::TakeIfEmpty::operator()):
      (JSC::Heap::Heap):
      (JSC::Heap::reportExtraMemoryCostSlowCase):
      (JSC::Heap::tryAllocate):
      (JSC::Heap::allocateSlowCase):
      (JSC::Heap::collect):
      (JSC::Heap::canonicalizeBlocks):
      (JSC::Heap::resetAllocator):
      (JSC::Heap::isValidAllocation):
      (JSC::Heap::shrink):
      * heap/Heap.h:
      (JSC::Heap::markedSpace):
      (JSC::Heap::sizeClassFor):
      (JSC::Heap::allocate):
      * heap/NewSpace.cpp:
      (JSC::MarkedSpace::MarkedSpace):
      (JSC::MarkedSpace::addBlock):
      (JSC::MarkedSpace::removeBlock):
      (JSC::MarkedSpace::resetAllocator):
      (JSC::MarkedSpace::canonicalizeBlocks):
      * heap/NewSpace.h:
      (JSC::MarkedSpace::waterMark):
      (JSC::MarkedSpace::highWaterMark):
      (JSC::MarkedSpace::setHighWaterMark):
      (JSC::MarkedSpace::sizeClassFor):
      (JSC::MarkedSpace::allocate):
      (JSC::MarkedSpace::forEachBlock):
      (JSC::MarkedSpace::SizeClass::SizeClass):
      (JSC::MarkedSpace::SizeClass::resetAllocator):
      (JSC::MarkedSpace::SizeClass::canonicalizeBlock):
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitAllocateBasicJSObject):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      90283c61
  7. 16 Sep, 2011 1 commit
  8. 15 Sep, 2011 2 commits
  9. 14 Sep, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Make JSCell::toBoolean non-virtual · a0f3daa3
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67727
      
      Reviewed by Sam Weinig.
      
      JSCell::toBoolean now manually performs the toBoolean check for objects and strings (where
      before it was simply virtual and would crash if its implementation was called).
      Its descendants in JSObject and JSString have also been made non-virtual.  JSCell now
      explicitly covers all cases of toBoolean, so having a virtual implementation of
      JSCell::toBoolean is no longer necessary.  This is part of a larger process of un-virtualizing JSCell.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSNotAnObject.cpp:
      * runtime/JSNotAnObject.h:
      * runtime/JSObject.h:
      * runtime/JSString.h:
      (JSC::JSCell::toBoolean):
      (JSC::JSValue::toBoolean):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0f3daa3
  10. 12 Sep, 2011 1 commit
    • msaboff@apple.com's avatar
      Update RegExp and related classes to use 8 bit strings when available · 2cc4150c
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67337
      
      Source/JavaScriptCore: 
      
      Modified both the Yarr interpreter and JIT to handle 8 bit subject strings.
      The code paths are triggered by the UString::is8bit() method which currently
      returns false.  Implemented JIT changes for all current architectures.
      Tested X86_64 and ARM v7.
      
      This includes some code that will likely change as we complete the
      8 bit string changes.  This includes the way the raw buffer pointers
      are accessed as well as replacing the CharAccess class with a
      string interator returned from UString.
      
      Fixed build breakage in testRegExp.cpp due to globalObject construction
      changes.
      
      Reviewed by Gavin Barraclough.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * testRegExp.cpp:
      (GlobalObject::finishCreation):
      (GlobalObject::GlobalObject):
      * assembler/ARMAssembler.cpp:
      (JSC::ARMAssembler::baseIndexTransfer32):
      * assembler/ARMAssembler.h:
      * assembler/ARMv7Assembler.h:
      (JSC::ARMv7Assembler::ubfx):
      (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp12Reg40Imm3Reg4Imm20Imm5):
      * assembler/MacroAssemblerARM.h:
      (JSC::MacroAssemblerARM::load8):
      (JSC::MacroAssemblerARM::branch8):
      (JSC::MacroAssemblerARM::branch16):
      * assembler/MacroAssemblerARMv7.h:
      (JSC::MacroAssemblerARMv7::load8):
      (JSC::MacroAssemblerARMv7::branch16):
      (JSC::MacroAssemblerARMv7::branch8):
      * assembler/MacroAssemblerMIPS.h:
      (JSC::MacroAssemblerMIPS::load8):
      (JSC::MacroAssemblerMIPS::branch8):
      (JSC::MacroAssemblerMIPS::branch16):
      * assembler/MacroAssemblerSH4.h:
      (JSC::MacroAssemblerSH4::load8):
      (JSC::MacroAssemblerSH4::branch8):
      (JSC::MacroAssemblerSH4::branch16):
      * assembler/MacroAssemblerX86Common.h:
      (JSC::MacroAssemblerX86Common::load8):
      (JSC::MacroAssemblerX86Common::branch16):
      (JSC::MacroAssemblerX86Common::branch8):
      * assembler/SH4Assembler.h:
      (JSC::SH4Assembler::extub):
      (JSC::SH4Assembler::printInstr):
      * assembler/X86Assembler.h:
      (JSC::X86Assembler::cmpw_ir):
      (JSC::X86Assembler::movzbl_mr):
      * runtime/RegExp.cpp:
      (JSC::RegExp::compile):
      (JSC::RegExp::compileIfNecessary):
      (JSC::RegExp::match):
      (JSC::RegExp::matchCompareWithInterpreter):
      * runtime/RegExp.h:
      * runtime/UString.h:
      (JSC::UString::is8Bit):
      * yarr/Yarr.h:
      * yarr/YarrInterpreter.cpp:
      (JSC::Yarr::Interpreter::CharAccess::CharAccess):
      (JSC::Yarr::Interpreter::CharAccess::~CharAccess):
      (JSC::Yarr::Interpreter::CharAccess::operator[]):
      (JSC::Yarr::Interpreter::InputStream::InputStream):
      (JSC::Yarr::Interpreter::Interpreter):
      (JSC::Yarr::interpret):
      * yarr/YarrJIT.cpp:
      (JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
      (JSC::Yarr::YarrGenerator::readCharacter):
      (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
      (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
      (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
      (JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
      (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
      (JSC::Yarr::YarrGenerator::generateDotStarEnclosure):
      (JSC::Yarr::YarrGenerator::YarrGenerator):
      (JSC::Yarr::YarrGenerator::compile):
      (JSC::Yarr::jitCompile):
      (JSC::Yarr::execute):
      * yarr/YarrJIT.h:
      (JSC::Yarr::YarrCodeBlock::has8BitCode):
      (JSC::Yarr::YarrCodeBlock::has16BitCode):
      (JSC::Yarr::YarrCodeBlock::set8BitCode):
      (JSC::Yarr::YarrCodeBlock::set16BitCode):
      (JSC::Yarr::YarrCodeBlock::execute):
      * yarr/YarrParser.h:
      (JSC::Yarr::Parser::Parser):
      
      Source/WebCore: 
      
      Updated call to match to use UString& instead of UChar*.
      
      Reviewed by Gavin Barraclough.
      
      No new tests, Covered by existing tests.
      
      * platform/text/RegularExpression.cpp:
      (WebCore::RegularExpression::match):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2cc4150c
  11. 11 Sep, 2011 2 commits
    • weinig@apple.com's avatar
      De-virtualize JSCell::isGetterSetter, type information is available for it · 64d86ab9
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67902
      
      Reviewed by Dan Bernstein.
      
      * runtime/GetterSetter.cpp:
      * runtime/GetterSetter.h:
      Remove override of isGetterSetter.
      
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      De-virtualize and remove silly base implementation.
      
      * runtime/Structure.h:
      (JSC::JSCell::isGetterSetter):
      Use type info to determine getter-setter-hood.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64d86ab9
    • oliver@apple.com's avatar
      Remove support for anonymous storage from jsobjects · 8c798d2c
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67881
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore:
      
      Remove all use of anonymous slots, essentially a mechanical change
      in JavaScriptCore
      
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::createStructure):
      * API/JSCallbackFunction.h:
      (JSC::JSCallbackFunction::createStructure):
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObject::createStructure):
      * JavaScriptCore.exp:
      * debugger/DebuggerActivation.h:
      (JSC::DebuggerActivation::createStructure):
      * heap/MarkStack.cpp:
      (JSC::MarkStack::validateValue):
      * heap/MarkStack.h:
      * runtime/Arguments.h:
      (JSC::Arguments::createStructure):
      * runtime/ArrayConstructor.h:
      (JSC::ArrayConstructor::createStructure):
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::finishCreation):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::createStructure):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::createStructure):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      * runtime/BooleanPrototype.h:
      (JSC::BooleanPrototype::createStructure):
      * runtime/DateConstructor.h:
      (JSC::DateConstructor::createStructure):
      * runtime/DateInstance.h:
      (JSC::DateInstance::createStructure):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      * runtime/DatePrototype.h:
      (JSC::DatePrototype::createStructure):
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::createStructure):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::finishCreation):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::createStructure):
      * runtime/ExceptionHelpers.h:
      (JSC::InterruptedExecutionError::createStructure):
      (JSC::TerminatedExecutionError::createStructure):
      * runtime/Executable.h:
      (JSC::ExecutableBase::createStructure):
      (JSC::NativeExecutable::createStructure):
      (JSC::EvalExecutable::createStructure):
      (JSC::ProgramExecutable::createStructure):
      (JSC::FunctionExecutable::createStructure):
      * runtime/FunctionPrototype.h:
      (JSC::FunctionPrototype::createStructure):
      * runtime/GetterSetter.h:
      (JSC::GetterSetter::createStructure):
      * runtime/InternalFunction.h:
      (JSC::InternalFunction::createStructure):
      * runtime/JSAPIValueWrapper.h:
      (JSC::JSAPIValueWrapper::createStructure):
      * runtime/JSActivation.h:
      (JSC::JSActivation::createStructure):
      * runtime/JSArray.h:
      (JSC::JSArray::createStructure):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::createStructure):
      * runtime/JSCell.h:
      * runtime/JSFunction.h:
      (JSC::JSFunction::createStructure):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::finishCreation):
      (JSC::JSGlobalObject::createStructure):
      * runtime/JSNotAnObject.h:
      (JSC::JSNotAnObject::createStructure):
      * runtime/JSONObject.h:
      (JSC::JSONObject::createStructure):
      * runtime/JSObject.h:
      (JSC::JSObject::createStructure):
      (JSC::JSNonFinalObject::createStructure):
      (JSC::JSFinalObject::createStructure):
      * runtime/JSPropertyNameIterator.cpp:
      (JSC::JSPropertyNameIterator::create):
      * runtime/JSPropertyNameIterator.h:
      (JSC::JSPropertyNameIterator::createStructure):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::createStructure):
      * runtime/JSString.h:
      (JSC::RopeBuilder::createStructure):
      * runtime/JSVariableObject.h:
      (JSC::JSVariableObject::createStructure):
      * runtime/JSWrapperObject.h:
      (JSC::JSWrapperObject::createStructure):
      * runtime/MathObject.h:
      (JSC::MathObject::createStructure):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::createStructure):
      * runtime/NumberConstructor.h:
      (JSC::NumberConstructor::createStructure):
      * runtime/NumberObject.h:
      (JSC::NumberObject::createStructure):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      * runtime/NumberPrototype.h:
      (JSC::NumberPrototype::createStructure):
      * runtime/ObjectConstructor.h:
      (JSC::ObjectConstructor::createStructure):
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::finishCreation):
      * runtime/ObjectPrototype.h:
      (JSC::ObjectPrototype::createStructure):
      * runtime/RegExp.h:
      (JSC::RegExp::createStructure):
      * runtime/RegExpConstructor.h:
      (JSC::RegExpConstructor::createStructure):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::createStructure):
      * runtime/RegExpPrototype.h:
      (JSC::RegExpPrototype::createStructure):
      * runtime/ScopeChain.h:
      (JSC::ScopeChainNode::createStructure):
      * runtime/StrictEvalActivation.h:
      (JSC::StrictEvalActivation::createStructure):
      * runtime/StringConstructor.h:
      (JSC::StringConstructor::createStructure):
      * runtime/StringObject.h:
      (JSC::StringObject::createStructure):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      * runtime/StringPrototype.h:
      (JSC::StringPrototype::createStructure):
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
      (JSC::Structure::materializePropertyMap):
      (JSC::Structure::addPropertyTransitionToExistingStructure):
      (JSC::Structure::addPropertyTransition):
      (JSC::Structure::removePropertyTransition):
      (JSC::Structure::changePrototypeTransition):
      (JSC::Structure::despecifyFunctionTransition):
      (JSC::Structure::getterSetterTransition):
      (JSC::Structure::toDictionaryTransition):
      (JSC::Structure::preventExtensionsTransition):
      (JSC::Structure::flattenDictionaryStructure):
      (JSC::Structure::addPropertyWithoutTransition):
      (JSC::Structure::removePropertyWithoutTransition):
      (JSC::Structure::get):
      (JSC::Structure::putSpecificValue):
      (JSC::Structure::remove):
      (JSC::Structure::checkConsistency):
      * runtime/Structure.h:
      (JSC::Structure::create):
      (JSC::Structure::propertyStorageSize):
      (JSC::Structure::get):
      * runtime/StructureChain.h:
      (JSC::StructureChain::createStructure):
      
      Source/JavaScriptGlue:
      
      Don't need an anonymous slot count anymore
      
      * UserObjectImp.h:
      (UserObjectImp::createStructure):
      
      Source/WebCore:
      
      Remove all use of anonymous slots, this required modifying
      bindings generation to add member variables for cached attributes,
      and override visitChildren with the necessary logic to mark those
      new members.
      
      I added bindings generation tests for these values.
      
      * bindings/js/JSAudioConstructor.h:
      (WebCore::JSAudioConstructor::createStructure):
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::createStructure):
      * bindings/js/JSDOMGlobalObject.h:
      (WebCore::JSDOMGlobalObject::createStructure):
      * bindings/js/JSDOMWindowBase.h:
      (WebCore::JSDOMWindowBase::createStructure):
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::createStructure):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::createStructure):
      * bindings/js/JSImageConstructor.h:
      (WebCore::JSImageConstructor::createStructure):
      * bindings/js/JSMessageEventCustom.cpp:
      (WebCore::JSMessageEvent::data):
      (WebCore::JSMessageEvent::initMessageEvent):
      * bindings/js/JSOptionConstructor.h:
      (WebCore::JSOptionConstructor::createStructure):
      * bindings/js/JSWorkerContextBase.h:
      (WebCore::JSWorkerContextBase::createStructure):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateConstructorDeclaration):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterfaceConstructor::createStructure):
      * bindings/scripts/test/JS/JSTestInterface.h:
      (WebCore::JSTestInterface::createStructure):
      (WebCore::JSTestInterfacePrototype::createStructure):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
      (WebCore::JSTestMediaQueryListListener::createStructure):
      (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObjConstructor::createStructure):
      (WebCore::jsTestObjCachedAttribute1):
      (WebCore::jsTestObjCachedAttribute2):
      (WebCore::JSTestObj::visitChildren):
      * bindings/scripts/test/JS/JSTestObj.h:
      (WebCore::JSTestObj::createStructure):
      (WebCore::JSTestObjPrototype::createStructure):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
      (WebCore::JSTestSerializedScriptValueInterface::createStructure):
      (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
      * bindings/scripts/test/TestObj.idl:
      * bindings/scripts/test/V8/V8TestObj.cpp:
      (WebCore::TestObjInternal::cachedAttribute1AttrGetter):
      (WebCore::TestObjInternal::cachedAttribute2AttrGetter):
      * bridge/c/CRuntimeObject.h:
      (JSC::Bindings::CRuntimeObject::createStructure):
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CRuntimeMethod::createStructure):
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaRuntimeMethod::createStructure):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      (JSC::Bindings::JavaRuntimeObject::createStructure):
      * bridge/objc/ObjCRuntimeObject.h:
      (JSC::Bindings::ObjCRuntimeObject::createStructure):
      * bridge/objc/objc_instance.mm:
      (ObjCRuntimeMethod::createStructure):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::createStructure):
      * bridge/runtime_method.h:
      (JSC::RuntimeMethod::createStructure):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::createStructure):
      
      Source/WebKit/mac:
      
      Remove the use of AnonymousSlotCount
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.h:
      (WebKit::ProxyRuntimeObject::createStructure):
      
      Source/WebKit2:
      
      Remove the use of AnonymousSlotCount.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::createStructure):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c798d2c
  12. 10 Sep, 2011 1 commit
    • weinig@apple.com's avatar
      Add isInterruptedExecutionException and isTerminatedExecutionException predicates · 76c11465
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67892
      
      Reviewed by Andy "First Time Reviewer" Estes.
      
      ../JavaScriptCore: 
      
      * JavaScriptCore.exp:
      Add symbols.
      
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::throwException):
      Use new predicates.
      
      * runtime/ExceptionHelpers.cpp:
      (JSC::createInterruptedExecutionException):
      (JSC::isInterruptedExecutionException):
      (JSC::createTerminatedExecutionException):
      (JSC::isTerminatedExecutionException):
      * runtime/ExceptionHelpers.h:
      (JSC::InterruptedExecutionError::InterruptedExecutionError):
      Add predicates.
      
      ../WebCore: 
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::reportException):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::evaluate):
      Use the new predicates instead of probing the ClassInfo directly.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76c11465
  13. 09 Sep, 2011 1 commit
    • mhahnenberg@apple.com's avatar
      Unzip initialization lists and constructors in JSCell hierarchy (5/7) · 7317a7f6
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67420
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::create):
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::JSCallbackFunction):
      (JSC::JSCallbackFunction::finishCreation):
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::JSCallbackObject):
      (JSC::::finishCreation):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      * debugger/DebuggerActivation.h:
      (JSC::DebuggerActivation::create):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (GlobalObject::GlobalObject):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      (JSC::ArrayConstructor::finishCreation):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::create):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::BooleanConstructor):
      (JSC::BooleanConstructor::finishCreation):
      * runtime/BooleanConstructor.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::create):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      (JSC::BooleanPrototype::finishCreation):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      (JSC::DateConstructor::finishCreation):
      * runtime/DateConstructor.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      * runtime/DateInstance.h:
      (JSC::DateInstance::create):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      (JSC::DatePrototype::finishCreation):
      * runtime/DatePrototype.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::ErrorConstructor):
      (JSC::ErrorConstructor::finishCreation):
      * runtime/ErrorConstructor.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::create):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::FunctionConstructor):
      (JSC::FunctionConstructor::finishCreation):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::FunctionPrototype):
      (JSC::FunctionPrototype::finishCreation):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      * runtime/JSActivation.h:
      (JSC::JSActivation::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::create):
      (JSC::JSGlobalObject::JSGlobalObject):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      * runtime/JSONObject.h:
      (JSC::JSONObject::create):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.cpp:
      (JSC::StringObject::create):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      * runtime/MathObject.h:
      (JSC::MathObject::create):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::finishCreation):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::finishCreation):
      * runtime/NativeErrorPrototype.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::NumberConstructor):
      (JSC::NumberConstructor::finishCreation):
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      * runtime/NumberObject.h:
      (JSC::NumberObject::create):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      (JSC::NumberPrototype::finishCreation):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      (JSC::ObjectConstructor::finishCreation):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::RegExpConstructor):
      (JSC::RegExpConstructor::finishCreation):
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::create):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::create):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      (JSC::StringConstructor::finishCreation):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      (JSC::StringPrototype::finishCreation):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * JSRun.cpp:
      (JSGlueGlobalObject::JSGlueGlobalObject):
      
      Source/WebCore:
      
      No new tests.
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::DOMConstructorObject):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      (WebCore::JSDOMGlobalObject::finishCreation):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterface::JSTestInterface):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::JSTestObj):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
      * bridge/c/CRuntimeObject.cpp:
      (JSC::Bindings::CRuntimeObject::CRuntimeObject):
      (JSC::Bindings::CRuntimeObject::finishCreation):
      * bridge/c/CRuntimeObject.h:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
      (JSC::Bindings::JavaRuntimeObject::finishCreation):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
      (JSC::Bindings::ObjCRuntimeObject::finishCreation):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::create):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
      * bridge/qt/qt_pixmapruntime.cpp:
      (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
      (JSC::Bindings::QtRuntimeMethod::finishCreation):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::RuntimeMethod):
      (JSC::RuntimeMethod::finishCreation):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::create):
      
      Source/WebKit/mac:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * Plugins/Hosted/ProxyRuntimeObject.h:
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      (WebKit::ProxyRuntimeObject::finishCreation):
      
      Source/WebKit2:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      (WebKit::JSNPMethod::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::create):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7317a7f6
  14. 08 Sep, 2011 3 commits
    • oliver@apple.com's avatar
      Use bump allocator for initial property storage · ba6907b7
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67494
      
      Reviewed by Geoffrey Garen.
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:
      
      Use a bump allocator for initial allocation of property storage,
      and promote to fastMalloc memory only if it survives a GC pass.
      
      Comes out as a 1% win on v8, and is a useful step on the way to
      GC allocation of all property storage.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * heap/Heap.cpp:
      (JSC::Heap::collect):
      * heap/Heap.h:
      (JSC::Heap::allocatePropertyStorage):
      (JSC::Heap::inPropertyStorageNursery):
      * heap/MarkedBlock.h:
      * heap/NewSpace.cpp:
      (JSC::NewSpace::NewSpace):
      * heap/NewSpace.h:
      (JSC::NewSpace::resetPropertyStorageNursery):
      (JSC::NewSpace::allocatePropertyStorage):
      (JSC::NewSpace::inPropertyStorageNursery):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/JSObject.cpp:
      (JSC::JSObject::allocatePropertyStorage):
      * runtime/JSObject.h:
      (JSC::JSObject::isUsingInlineStorage):
      (JSC::JSObject::JSObject):
      (JSC::JSObject::propertyStorage):
      (JSC::JSObject::~JSObject):
      (JSC::JSObject::putDirectInternal):
      (JSC::JSObject::putDirectWithoutTransition):
      (JSC::JSObject::putDirectFunctionWithoutTransition):
      (JSC::JSObject::transitionTo):
      (JSC::JSObject::visitChildrenDirect):
      * runtime/StorageBarrier.h: Added.
      (JSC::StorageBarrier::StorageBarrier):
      (JSC::StorageBarrier::set):
      (JSC::StorageBarrier::operator->):
      (JSC::StorageBarrier::operator*):
      (JSC::StorageBarrier::operator[]):
      (JSC::StorageBarrier::get):
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:
      
      Add a forwarding header.
      
      * ForwardingHeaders/runtime/StorageBarrier.h: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba6907b7
    • weinig@apple.com's avatar
      Remove the Completion object from JSC, I have never liked it · f41a7da7
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67755
      
      Reviewed by Gavin Barraclough.
      
      ../JavaScriptCore: 
      
      - Removes the Completion object and replaces its use with out parameter exceptions.
      - Remove ComplType and virtual exceptionType() function on JSObject. Replace with
        ClassInfo for InterruptedExecutionError and TerminatedExecutionError.
      
      * API/JSBase.cpp:
      (JSEvaluateScript):
      (JSCheckScriptSyntax):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::throwException):
      * jsc.cpp:
      (functionLoad):
      (functionCheckSyntax):
      (runWithScripts):
      (runInteractive):
      * runtime/Completion.cpp:
      (JSC::checkSyntax):
      (JSC::evaluate):
      * runtime/Completion.h:
      * runtime/ExceptionHelpers.cpp:
      (JSC::InterruptedExecutionError::toString):
      (JSC::TerminatedExecutionError::toString):
      (JSC::createInterruptedExecutionException):
      * runtime/ExceptionHelpers.h:
      (JSC::InterruptedExecutionError::InterruptedExecutionError):
      (JSC::InterruptedExecutionError::create):
      (JSC::InterruptedExecutionError::createStructure):
      (JSC::TerminatedExecutionError::TerminatedExecutionError):
      (JSC::TerminatedExecutionError::create):
      (JSC::TerminatedExecutionError::createStructure):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      * runtime/JSObject.h:
      
      ../JavaScriptGlue: 
      
      * JSRun.cpp:
      (JSRun::Evaluate):
      (JSRun::CheckSyntax):
      * JSRun.h:
      * JavaScriptGlue.cpp:
      (JSRunEvaluate):
      
      ../WebCore: 
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::reportException):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSInjectedScriptManager.cpp:
      (WebCore::InjectedScriptManager::createInjectedScript):
      * bindings/js/JSMainThreadExecState.h:
      (WebCore::JSMainThreadExecState::evaluate):
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::evaluateInWorld):
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::evaluate):
      * bindings/objc/WebScriptObject.mm:
      (-[WebScriptObject evaluateWebScript:]):
      * bridge/NP_jsobject.cpp:
      (_NPN_Evaluate):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::eval):
      
      ../WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::evaluate):
      
      ../WebKit/qt: 
      
      * Api/qwebelement.cpp:
      (QWebElement::evaluateJavaScript):
      
      ../WebKit2: 
      
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
      (WebKit::NPRuntimeObjectMap::evaluate):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f41a7da7
    • commit-queue@webkit.org's avatar
      Remove getUInt32 from JSCell · bc78b435
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67691
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-08
      Reviewed by Oliver Hunt.
      
       We don't use JSCell::getUInt32 anymore, so it has been removed.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc78b435
  15. 07 Sep, 2011 2 commits
    • oliver@apple.com's avatar
      Remove JSObjectWithGlobalObject · 2346a3e0
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67689
      
      Reviewed by Geoff Garen.
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:
      
      Remove JSObjectWithGlobalObject, and update code to stop using anonymous
      storage to access the global object that a JSObject comes from.  Largely
      mechanical change to remove the use of anonymous storage and JSObjectWithGlobalObject.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      (JSC::JSCallbackConstructor::finishCreation):
      * API/JSCallbackConstructor.h:
      * API/JSCallbackObject.cpp:
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObject::create):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::JSCallbackObject):
      (JSC::::finishCreation):
      (JSC::::staticFunctionGetter):
      * API/JSClassRef.cpp:
      (OpaqueJSClass::prototype):
      * API/JSObjectRef.cpp:
      (JSObjectMake):
      (JSObjectGetPrivate):
      (JSObjectSetPrivate):
      (JSObjectGetPrivateProperty):
      (JSObjectSetPrivateProperty):
      (JSObjectDeletePrivateProperty):
      * API/JSValueRef.cpp:
      (JSValueIsObjectOfClass):
      * API/JSWeakObjectMapRefPrivate.cpp:
      * JavaScriptCore.exp:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/CodeBlock.h:
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::dfgRepatchGetMethodFast):
      (JSC::DFG::tryCacheGetMethod):
      * jit/JIT.h:
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitAllocateJSFunction):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::patchMethodCallProto):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/DatePrototype.cpp:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      (JSC::InternalFunction::finishCreation):
      * runtime/InternalFunction.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::JSFunction):
      (JSC::JSFunction::finishCreation):
      * runtime/JSFunction.h:
      (JSC::JSFunction::create):
      (JSC::JSFunction::createStructure):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      (JSC::JSONObject::finishCreation):
      * runtime/JSONObject.h:
      * runtime/JSObject.h:
      (JSC::JSObject::globalObject):
      * runtime/JSObjectWithGlobalObject.cpp: Removed.
      * runtime/JSObjectWithGlobalObject.h: Removed.
      * runtime/JSValue.cpp:
      (JSC::JSValue::isValidCallee):
      * runtime/Lookup.cpp:
      (JSC::setUpStaticFunctionSlot):
      * runtime/Lookup.h:
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      (JSC::MathObject::finishCreation):
      * runtime/MathObject.h:
      * runtime/NumberPrototype.cpp:
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      (JSC::RegExpObject::finishCreation):
      * runtime/RegExpObject.h:
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
      * runtime/Structure.h:
      (JSC::Structure::create):
      (JSC::Structure::globalObject):
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:
      
      Remove use of anonymous storage and JSObjectWithGlobalObject for
      accessing a JSObject's global object now that they're available
      on the object's structure.
      
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::setWindow):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::globalObject):
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::initScript):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      (JSC::Bindings::RuntimeObject::finishCreation):
      * bridge/runtime_object.h:
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebKit2:
      
      Remove JSObjectWithGlobalObject usage.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      (WebKit::JSNPObject::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2346a3e0
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r94627 and r94632. · f192b44a
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/94627
      http://trac.webkit.org/changeset/94632
      https://bugs.webkit.org/show_bug.cgi?id=67698
      
      It broke tests on GTK and Qt (Requested by Ossy on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-09-07
      
      Source/JavaScriptCore:
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::create):
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::JSCallbackFunction):
      * API/JSCallbackFunction.h:
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::create):
      * debugger/DebuggerActivation.h:
      * jsc.cpp:
      (GlobalObject::constructorBody):
      (GlobalObject::GlobalObject):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::create):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::BooleanConstructor):
      * runtime/BooleanConstructor.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::create):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      * runtime/DateConstructor.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      * runtime/DateInstance.h:
      (JSC::DateInstance::create):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      * runtime/DatePrototype.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::ErrorConstructor):
      * runtime/ErrorConstructor.h:
      (JSC::ErrorConstructor::create):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::create):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::FunctionConstructor):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::FunctionPrototype):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      * runtime/JSActivation.h:
      (JSC::JSActivation::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::create):
      (JSC::JSGlobalObject::JSGlobalObject):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      * runtime/JSONObject.h:
      (JSC::JSONObject::create):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.cpp:
      (JSC::StringObject::create):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      * runtime/MathObject.h:
      (JSC::MathObject::create):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::constructorBody):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::constructorBody):
      * runtime/NativeErrorPrototype.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::NumberConstructor):
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      * runtime/NumberObject.h:
      (JSC::NumberObject::create):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::RegExpConstructor):
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::create):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::create):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue:
      
      * JSRun.cpp:
      (JSGlueGlobalObject::JSGlueGlobalObject):
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::DOMConstructorObject):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterface::JSTestInterface):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::JSTestObj):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
      * bridge/c/CRuntimeObject.cpp:
      (JSC::Bindings::CRuntimeObject::CRuntimeObject):
      * bridge/c/CRuntimeObject.h:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::create):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
      * bridge/qt/qt_pixmapruntime.cpp:
      (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::RuntimeMethod):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::create):
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/ProxyRuntimeObject.h:
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      
      Source/WebKit2:
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      (WebKit::JSNPObject::create):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f192b44a
  16. 06 Sep, 2011 3 commits
    • commit-queue@webkit.org's avatar
      Unzip initialization lists and constructors in JSCell hierarchy (5/7) · 5ab29813
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67420
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-06
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::create):
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::JSCallbackFunction):
      (JSC::JSCallbackFunction::finishCreation):
      * API/JSCallbackFunction.h:
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      * debugger/DebuggerActivation.h:
      (JSC::DebuggerActivation::create):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (GlobalObject::GlobalObject):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      (JSC::ArrayConstructor::finishCreation):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::create):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::BooleanConstructor):
      (JSC::BooleanConstructor::finishCreation):
      * runtime/BooleanConstructor.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::create):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      (JSC::BooleanPrototype::finishCreation):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      (JSC::DateConstructor::finishCreation):
      * runtime/DateConstructor.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      * runtime/DateInstance.h:
      (JSC::DateInstance::create):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      (JSC::DatePrototype::finishCreation):
      * runtime/DatePrototype.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::ErrorConstructor):
      (JSC::ErrorConstructor::finishCreation):
      * runtime/ErrorConstructor.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::create):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::FunctionConstructor):
      (JSC::FunctionConstructor::finishCreation):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::FunctionPrototype):
      (JSC::FunctionPrototype::finishCreation):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      * runtime/JSActivation.h:
      (JSC::JSActivation::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::create):
      (JSC::JSGlobalObject::JSGlobalObject):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      * runtime/JSONObject.h:
      (JSC::JSONObject::create):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.cpp:
      (JSC::StringObject::create):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      * runtime/MathObject.h:
      (JSC::MathObject::create):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::finishCreation):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::finishCreation):
      * runtime/NativeErrorPrototype.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::NumberConstructor):
      (JSC::NumberConstructor::finishCreation):
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      * runtime/NumberObject.h:
      (JSC::NumberObject::create):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      (JSC::NumberPrototype::finishCreation):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      (JSC::ObjectConstructor::finishCreation):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::RegExpConstructor):
      (JSC::RegExpConstructor::finishCreation):
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::create):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::create):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      (JSC::StringConstructor::finishCreation):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      (JSC::StringPrototype::finishCreation):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * JSRun.cpp:
      (JSGlueGlobalObject::JSGlueGlobalObject):
      
      Source/WebCore:
      
      No new tests.
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::DOMConstructorObject):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      (WebCore::JSDOMGlobalObject::finishCreation):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterface::JSTestInterface):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::JSTestObj):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
      * bridge/c/CRuntimeObject.cpp:
      (JSC::Bindings::CRuntimeObject::CRuntimeObject):
      (JSC::Bindings::CRuntimeObject::finishCreation):
      * bridge/c/CRuntimeObject.h:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
      (JSC::Bindings::JavaRuntimeObject::finishCreation):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
      (JSC::Bindings::ObjCRuntimeObject::finishCreation):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::create):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
      * bridge/qt/qt_pixmapruntime.cpp:
      (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
      (JSC::Bindings::QtRuntimeMethod::finishCreation):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::RuntimeMethod):
      (JSC::RuntimeMethod::finishCreation):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::create):
      
      Source/WebKit/mac:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * Plugins/Hosted/ProxyRuntimeObject.h:
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      (WebKit::ProxyRuntimeObject::finishCreation):
      
      Source/WebKit2:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      (WebKit::JSNPMethod::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ab29813
    • oliver@apple.com's avatar
      An object's structure should reference the global object responsible for its creation · ee1bdc80
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67624
      
      Reviewed by Gavin Barraclough.
      
      Source/JavaScriptCore:
      
      Add a reference to a GlobalObject to Structure, and update all calls to
      Structure::create() to pass the global object that is the origin for that
      structure.  For objects where the appropriate global object isn't available
      at construction time (global object prototypes, etc), or objects that
      logically don't have a global object (strings, etc) we just pass null.
      
      This change is largely mechanical (passing a new globalObject parameter
      around).
      
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::createStructure):
      * API/JSCallbackFunction.h:
      (JSC::JSCallbackFunction::createStructure):
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObject::createStructure):
      * API/JSContextRef.cpp:
      * JavaScriptCore.exp:
      * debugger/DebuggerActivation.h:
      (JSC::DebuggerActivation::createStructure):
      * runtime/Arguments.h:
      (JSC::Arguments::createStructure):
      * runtime/ArrayConstructor.h:
      (JSC::ArrayConstructor::createStructure):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::createStructure):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::createStructure):
      * runtime/BooleanPrototype.h:
      (JSC::BooleanPrototype::createStructure):
      * runtime/DateConstructor.h:
      (JSC::DateConstructor::createStructure):
      * runtime/DateInstance.h:
      (JSC::DateInstance::createStructure):
      * runtime/DatePrototype.h:
      (JSC::DatePrototype::createStructure):
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::createStructure):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::createStructure):
      * runtime/Executable.h:
      (JSC::ExecutableBase::createStructure):
      (JSC::NativeExecutable::createStructure):
      (JSC::EvalExecutable::createStructure):
      (JSC::ProgramExecutable::createStructure):
      (JSC::FunctionExecutable::createStructure):
      * runtime/FunctionPrototype.h:
      (JSC::FunctionPrototype::createStructure):
      * runtime/GetterSetter.h:
      (JSC::GetterSetter::createStructure):
      * runtime/InternalFunction.h:
      (JSC::InternalFunction::createStructure):
      * runtime/JSAPIValueWrapper.h:
      (JSC::JSAPIValueWrapper::createStructure):
      * runtime/JSActivation.h:
      (JSC::JSActivation::createStructure):
      * runtime/JSArray.h:
      (JSC::JSArray::createStructure):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::createStructure):
      * runtime/JSByteArray.h:
      * runtime/JSFunction.h:
      (JSC::JSFunction::createStructure):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::finishCreation):
      (JSC::JSGlobalObject::createStructure):
      * runtime/JSNotAnObject.h:
      (JSC::JSNotAnObject::createStructure):
      * runtime/JSONObject.h:
      (JSC::JSONObject::createStructure):
      * runtime/JSObject.cpp:
      (JSC::JSObject::createInheritorID):
      * runtime/JSObject.h:
      (JSC::JSObject::createStructure):
      (JSC::JSNonFinalObject::createStructure):
      (JSC::JSFinalObject::createStructure):
      (JSC::createEmptyObjectStructure):
      * runtime/JSObjectWithGlobalObject.h:
      (JSC::JSObjectWithGlobalObject::createStructure):
      * runtime/JSPropertyNameIterator.h:
      (JSC::JSPropertyNameIterator::createStructure):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::createStructure):
      * runtime/JSString.h:
      (JSC::RopeBuilder::createStructure):
      * runtime/JSVariableObject.h:
      (JSC::JSVariableObject::createStructure):
      * runtime/JSWrapperObject.h:
      (JSC::JSWrapperObject::createStructure):
      * runtime/MathObject.h:
      (JSC::MathObject::createStructure):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::createStructure):
      (JSC::NativeErrorConstructor::constructorBody):
      * runtime/NumberConstructor.h:
      (JSC::NumberConstructor::createStructure):
      * runtime/NumberObject.h:
      (JSC::NumberObject::createStructure):
      * runtime/NumberPrototype.h:
      (JSC::NumberPrototype::createStructure):
      * runtime/ObjectConstructor.h:
      (JSC::ObjectConstructor::createStructure):
      * runtime/ObjectPrototype.h:
      (JSC::ObjectPrototype::createStructure):
      * runtime/RegExp.h:
      (JSC::RegExp::createStructure):
      * runtime/RegExpConstructor.h:
      (JSC::RegExpConstructor::createStructure):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::createStructure):
      * runtime/RegExpPrototype.h:
      (JSC::RegExpPrototype::createStructure):
      * runtime/ScopeChain.h:
      (JSC::ScopeChainNode::createStructure):
      * runtime/StrictEvalActivation.h:
      (JSC::StrictEvalActivation::createStructure):
      * runtime/StringConstructor.h:
      (JSC::StringConstructor::createStructure):
      * runtime/StringObject.h:
      (JSC::StringObject::createStructure):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::create):
      (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
      * runtime/StringPrototype.h:
      (JSC::StringPrototype::createStructure):
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
      (JSC::Structure::visitChildren):
      * runtime/Structure.h:
      (JSC::Structure::create):
      (JSC::Structure::globalObject):
      (JSC::Structure::setGlobalObject):
      * runtime/StructureChain.h:
      (JSC::StructureChain::createStructure):
      
      Source/JavaScriptGlue:
      
      Update for Structure::create() requiring a global object.
      
      * JSRun.h:
      (JSGlueGlobalObject::create):
      * UserObjectImp.h:
      (UserObjectImp::createStructure):
      
      Source/WebCore:
      
      Update calls to Structure::create() to pass the globalObject in,
      and update the CodeGenerator to generate appropriate createStructure
      methods.
      
      * bindings/js/JSAudioConstructor.h:
      (WebCore::JSAudioConstructor::createStructure):
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::createStructure):
      (WebCore::getDOMStructure):
      * bindings/js/JSDOMGlobalObject.h:
      (WebCore::JSDOMGlobalObject::createStructure):
      (WebCore::getDOMConstructor):
      * bindings/js/JSDOMWindowBase.h:
      (WebCore::JSDOMWindowBase::createStructure):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::setWindow):
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::createStructure):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::createStructure):
      * bindings/js/JSImageConstructor.h:
      (WebCore::JSImageConstructor::createStructure):
      * bindings/js/JSImageDataCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSOptionConstructor.h:
      (WebCore::JSOptionConstructor::createStructure):
      * bindings/js/JSWorkerContextBase.h:
      (WebCore::JSWorkerContextBase::createStructure):
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::initScript):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateConstructorDeclaration):
      * bridge/c/CRuntimeObject.h:
      (JSC::Bindings::CRuntimeObject::createStructure):
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CRuntimeMethod::createStructure):
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaRuntimeMethod::createStructure):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      (JSC::Bindings::JavaRuntimeObject::createStructure):
      * bridge/objc/ObjCRuntimeObject.h:
      (JSC::Bindings::ObjCRuntimeObject::createStructure):
      * bridge/objc/objc_instance.mm:
      (ObjCRuntimeMethod::createStructure):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::createStructure):
      * bridge/runtime_method.h:
      (JSC::RuntimeMethod::createStructure):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::createStructure):
      
      Source/WebKit/mac:
      
      Update for new Structure::create() globalObject parameter.
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.h:
      (WebKit::ProxyRuntimeObject::createStructure):
      
      Source/WebKit2:
      
      Update for new Structure::create globalObject parameter.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::createStructure):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::create):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee1bdc80
    • msaboff@apple.com's avatar
      Add windows changes for JSC:RegExp functional tests · cf15d851
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67521
      
      Windows build changes for regular expression functional test.
      
      Rubber-stamped by Gavin Barraclough.
      
      * JavaScriptCore.vcproj/JavaScriptCore.sln:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.vcproj/testRegExp: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExp.vcproj: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpPostBuild.cmd: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpPreBuild.cmd: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpPreLink.cmd: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf15d851
  17. 05 Sep, 2011 1 commit
  18. 02 Sep, 2011 2 commits
    • commit-queue@webkit.org's avatar
      Incorporate newer, faster dtoa library · af20c27e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=66346
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-02
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore:
      
      Added new dtoa library at http://code.google.com/p/double-conversion/.
      Replaced old call to dtoa.  The new library is much faster than the old one.
      We still use the old dtoa for some stuff in WebCore as well as the old strtod,
      but we can phase these out eventually as well.
      
      * GNUmakefile.list.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.gypi:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * runtime/InitializeThreading.cpp:
      * runtime/NumberPrototype.cpp:
      (JSC::numberProtoFuncToExponential):
      (JSC::numberProtoFuncToFixed):
      (JSC::numberProtoFuncToPrecision):
      * runtime/UString.cpp:
      (JSC::UString::number):
      * wtf/CMakeLists.txt:
      * wtf/ThreadingPthreads.cpp:
      (WTF::initializeThreading):
      * wtf/ThreadingWin.cpp:
      (WTF::initializeThreading):
      * wtf/dtoa.cpp:
      (WTF::dtoa):
      * wtf/dtoa.h:
      * wtf/dtoa/COPYING: Added.
      * wtf/dtoa/LICENSE: Added.
      * wtf/dtoa/README: Added.
      * wtf/dtoa/bignum-dtoa.cc: Added.
      * wtf/dtoa/bignum-dtoa.h: Added.
      * wtf/dtoa/bignum.cc: Added.
      * wtf/dtoa/bignum.h: Added.
      (WTF::double_conversion::Bignum::Times10):
      (WTF::double_conversion::Bignum::Equal):
      (WTF::double_conversion::Bignum::LessEqual):
      (WTF::double_conversion::Bignum::Less):
      (WTF::double_conversion::Bignum::PlusEqual):
      (WTF::double_conversion::Bignum::PlusLessEqual):
      (WTF::double_conversion::Bignum::PlusLess):
      (WTF::double_conversion::Bignum::EnsureCapacity):
      (WTF::double_conversion::Bignum::BigitLength):
      * wtf/dtoa/cached-powers.cc: Added.
      * wtf/dtoa/cached-powers.h: Added.
      * wtf/dtoa/diy-fp.cc: Added.
      * wtf/dtoa/diy-fp.h: Added.
      (WTF::double_conversion::DiyFp::DiyFp):
      (WTF::double_conversion::DiyFp::Subtract):
      (WTF::double_conversion::DiyFp::Minus):
      (WTF::double_conversion::DiyFp::Times):
      (WTF::double_conversion::DiyFp::Normalize):
      (WTF::double_conversion::DiyFp::f):
      (WTF::double_conversion::DiyFp::e):
      (WTF::double_conversion::DiyFp::set_f):
      (WTF::double_conversion::DiyFp::set_e):
      * wtf/dtoa/double-conversion.cc: Added.
      * wtf/dtoa/double-conversion.h: Added.
      (WTF::double_conversion::DoubleToStringConverter::DoubleToStringConverter):
      (WTF::double_conversion::StringToDoubleConverter::StringToDoubleConverter):
      * wtf/dtoa/double.h: Added.
      (WTF::double_conversion::double_to_uint64):
      (WTF::double_conversion::uint64_to_double):
      (WTF::double_conversion::Double::Double):
      (WTF::double_conversion::Double::AsDiyFp):
      (WTF::double_conversion::Double::AsNormalizedDiyFp):
      (WTF::double_conversion::Double::AsUint64):
      (WTF::double_conversion::Double::NextDouble):
      (WTF::double_conversion::Double::Exponent):
      (WTF::double_conversion::Double::Significand):
      (WTF::double_conversion::Double::IsDenormal):
      (WTF::double_conversion::Double::IsSpecial):
      (WTF::double_conversion::Double::IsNan):
      (WTF::double_conversion::Double::IsInfinite):
      (WTF::double_conversion::Double::Sign):
      (WTF::double_conversion::Double::UpperBoundary):
      (WTF::double_conversion::Double::NormalizedBoundaries):
      (WTF::double_conversion::Double::value):
      (WTF::double_conversion::Double::SignificandSizeForOrderOfMagnitude):
      (WTF::double_conversion::Double::Infinity):
      (WTF::double_conversion::Double::NaN):
      (WTF::double_conversion::Double::DiyFpToUint64):
      * wtf/dtoa/fast-dtoa.cc: Added.
      * wtf/dtoa/fast-dtoa.h: Added.
      * wtf/dtoa/fixed-dtoa.cc: Added.
      * wtf/dtoa/fixed-dtoa.h: Added.
      * wtf/dtoa/strtod.cc: Added.
      * wtf/dtoa/strtod.h: Added.
      * wtf/dtoa/utils.h: Added.
      (WTF::double_conversion::Max):
      (WTF::double_conversion::Min):
      (WTF::double_conversion::StrLength):
      (WTF::double_conversion::Vector::Vector):
      (WTF::double_conversion::Vector::SubVector):
      (WTF::double_conversion::Vector::length):
      (WTF::double_conversion::Vector::is_empty):
      (WTF::double_conversion::Vector::start):
      (WTF::double_conversion::Vector::operator[]):
      (WTF::double_conversion::Vector::first):
      (WTF::double_conversion::Vector::last):
      (WTF::double_conversion::StringBuilder::StringBuilder):
      (WTF::double_conversion::StringBuilder::~StringBuilder):
      (WTF::double_conversion::StringBuilder::size):
      (WTF::double_conversion::StringBuilder::position):
      (WTF::double_conversion::StringBuilder::Reset):
      (WTF::double_conversion::StringBuilder::AddCharacter):
      (WTF::double_conversion::StringBuilder::AddString):
      (WTF::double_conversion::StringBuilder::AddSubstring):
      (WTF::double_conversion::StringBuilder::AddPadding):
      (WTF::double_conversion::StringBuilder::Finalize):
      (WTF::double_conversion::StringBuilder::is_finalized):
      (WTF::double_conversion::BitCast):
      * wtf/wtf.pri:
      
      Source/WebCore:
      
      No new tests.
      
      Added new dtoa library at http://code.google.com/p/double-conversion/.
      Replaced old call to dtoa.  The new library is much faster than the old one.
      We still use the old dtoa for some stuff in WebCore as well as the old strtod,
      but we can phase these out eventually as well.
      
      * ForwardingHeaders/wtf/dtoa/double-conversion.h: Added.
      * WebCore.vcproj/copyForwardingHeaders.cmd:
      * css/CSSPrimitiveValue.cpp:
      (WebCore::formatNumber):
      * html/parser/HTMLParserIdioms.cpp:
      (WebCore::serializeForNumberType):
      * inspector/InspectorValues.cpp:
      (WebCore::InspectorBasicValue::writeJSON):
      * platform/graphics/Color.cpp:
      (WebCore::Color::serialized):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      af20c27e
    • oliver@apple.com's avatar
      Use bump allocator for initial property storage · 78558736
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67494
      
      Reviewed by Gavin Barraclough.
      
      Switch to a bump allocator for the initial out of line
      property storage.  This gives us slightly faster allocation
      for short lived objects that need out of line storage at
      the cost of an additional memcpy when the object survives
      a GC pass.
      
      No performance impact.
      
      * JavaScriptCore.exp:
      * heap/Heap.cpp:
      (JSC::Heap::collect):
      * heap/Heap.h:
      (JSC::Heap::allocatePropertyStorage):
      (JSC::Heap::inPropertyStorageNursary):
      * heap/NewSpace.cpp:
      (JSC::NewSpace::NewSpace):
      * heap/NewSpace.h:
      (JSC::NewSpace::resetPropertyStorageNursary):
      (JSC::NewSpace::allocatePropertyStorage):
      (JSC::NewSpace::inPropertyStorageNursary):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/JSObject.cpp:
      (JSC::JSObject::allocatePropertyStorage):
      * runtime/JSObject.h:
      (JSC::JSObject::~JSObject):
      (JSC::JSObject::putDirectInternal):
      (JSC::JSObject::putDirectWithoutTransition):
      (JSC::JSObject::putDirectFunctionWithoutTransition):
      (JSC::JSObject::transitionTo):
      (JSC::JSObject::visitChildrenDirect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78558736
  19. 01 Sep, 2011 2 commits
    • commit-queue@webkit.org's avatar
      Unzip initialization lists and constructors in JSCell hierarchy (4/7) · 6e5671b6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67174
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-01
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore:
      
      Completed the fourth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      (JSC::JSCallbackConstructor::finishCreation):
      * API/JSCallbackConstructor.h:
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObject::create):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::JSCallbackObject):
      (JSC::::finishCreation):
      * JavaScriptCore.JSVALUE64only.exp:
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::DebuggerActivation):
      (JSC::DebuggerActivation::create):
      * debugger/DebuggerActivation.h:
      * runtime/Arguments.h:
      (JSC::Arguments::create):
      (JSC::Arguments::createNoParameters):
      (JSC::Arguments::Arguments):
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      (JSC::ArrayPrototype::finishCreation):
      * runtime/ArrayPrototype.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      (JSC::BooleanObject::finishCreation):
      * runtime/BooleanObject.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      (JSC::DateInstance::finishCreation):
      * runtime/DateInstance.h:
      * runtime/ErrorInstance.cpp:
      (JSC::ErrorInstance::ErrorInstance):
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::create):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      (JSC::ErrorPrototype::finishCreation):
      * runtime/ErrorPrototype.h:
      * runtime/ExceptionHelpers.cpp:
      (JSC::InterruptedExecutionError::InterruptedExecutionError):
      (JSC::InterruptedExecutionError::create):
      (JSC::TerminatedExecutionError::TerminatedExecutionError):
      (JSC::TerminatedExecutionError::create):
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::EvalExecutable):
      (JSC::ProgramExecutable::ProgramExecutable):
      (JSC::FunctionExecutable::FunctionExecutable):
      * runtime/Executable.h:
      (JSC::NativeExecutable::create):
      (JSC::NativeExecutable::NativeExecutable):
      (JSC::EvalExecutable::create):
      (JSC::ProgramExecutable::create):
      (JSC::FunctionExecutable::create):
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      (JSC::InternalFunction::finishCreation):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      (JSC::JSActivation::finishCreation):
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::JSArray):
      * runtime/JSArray.h:
      (JSC::JSArray::create):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::JSByteArray):
      * runtime/JSByteArray.h:
      (JSC::JSByteArray::create):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::JSFunction):
      (JSC::JSFunction::finishCreation):
      * runtime/JSFunction.h:
      (JSC::JSFunction::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::JSGlobalObject):
      (JSC::JSGlobalObject::finishCreation):
      * runtime/JSNotAnObject.h:
      (JSC::JSNotAnObject::JSNotAnObject):
      (JSC::JSNotAnObject::create):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      (JSC::JSONObject::finishCreation):
      * runtime/JSONObject.h:
      * runtime/JSObjectWithGlobalObject.cpp:
      (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
      * runtime/JSObjectWithGlobalObject.h:
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::finishCreation):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSVariableObject.h:
      (JSC::JSVariableObject::JSVariableObject):
      * runtime/JSWrapperObject.h:
      (JSC::JSWrapperObject::JSWrapperObject):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      (JSC::MathObject::finishCreation):
      * runtime/MathObject.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      (JSC::NumberObject::finishCreation):
      * runtime/NumberObject.h:
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::ObjectPrototype):
      * runtime/ObjectPrototype.h:
      (JSC::ObjectPrototype::create):
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      (JSC::RegExpMatchesArray::finishCreation):
      * runtime/RegExpMatchesArray.h:
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      (JSC::RegExpObject::finishCreation):
      * runtime/RegExpObject.h:
      * runtime/StrictEvalActivation.cpp:
      (JSC::StrictEvalActivation::StrictEvalActivation):
      * runtime/StrictEvalActivation.h:
      (JSC::StrictEvalActivation::create):
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      (JSC::StringObject::finishCreation):
      * runtime/StringObject.h:
      
      Source/JavaScriptGlue:
      
      Completed the fourth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * UserObjectImp.cpp:
      (UserObjectImp::UserObjectImp):
      * UserObjectImp.h:
      (UserObjectImp::create):
      
      Source/WebCore:
      
      No new tests.
      
      Completed the fourth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::JSDOMWindowShell):
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::createWindowShell):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      * bindings/scripts/test/JS/JSTestInterface.h:
      (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
      (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
      * bindings/scripts/test/JS/JSTestObj.h:
      (WebCore::JSTestObjPrototype::JSTestObjPrototype):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
      (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      (JSC::RuntimeArray::finishCreation):
      * bridge/runtime_array.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      (JSC::Bindings::RuntimeObject::finishCreation):
      * bridge/runtime_object.h:
      
      Source/WebKit2:
      
      Completed the fourth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      (WebKit::JSNPObject::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e5671b6
    • adachan@apple.com's avatar
      Source/JavaScriptCore: Export fastMallocStatistics and Heap::objectTypeCounts... · 025448fd
      adachan@apple.com authored
      Source/JavaScriptCore: Export fastMallocStatistics and Heap::objectTypeCounts for https://bugs.webkit.org/show_bug.cgi?id=67160.
      
      Reviewed by Darin Adler.
      
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      
      Source/WebKit2: Gather JavaScript, FastMalloc, icon, font, and glyph page statistics in WebProcess::getWebCoreStatistics().
      https://bugs.webkit.org/show_bug.cgi?id=67160
      
      Reviewed by Darin Adler.
      
      Encode and decode the data members in StatisticsData.
      * Shared/StatisticsData.cpp:
      (WebKit::StatisticsData::encode):
      (WebKit::StatisticsData::decode):
      (WebKit::StatisticsData::StatisticsData):
      
      Add three data members to StatisticsData:
      - statisticsNumbers: Map containing statistics values that are numbers, mapped by their names, such as 
      JavaScriptObjectsCount, CachedFontDataCount, etc.
      - javaScriptProtectedObjectTypeCounts
      - javaScriptObjectTypeCounts
      * Shared/StatisticsData.h:
      
      Create a WK::Dictionary containing statistics values mapped by their names and return that dictionary
      in WebContext::didGetWebCoreStatistics().
      * UIProcess/WebContext.cpp:
      (WebKit::createDictionaryFromHashMap):
      (WebKit::WebContext::didGetWebCoreStatistics):
      
      Package JavaScript, FastMalloc, icon, font, and glyph page statistics into a StatisticsData object
      and send it to the UIProcess.
      * WebProcess/WebProcess.cpp:
      (WebKit::fromCountedSetToHashMap):
      (WebKit::WebProcess::getWebCoreStatistics):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      025448fd
  20. 26 Aug, 2011 1 commit
    • ap@apple.com's avatar
      Get rid of frame life support timer · 75b54fa4
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=66874
      
              Reviewed by Geoff Garen. V8 fixes courtesy of Dmitry Titov.
      
              Test: fast/frames/detached-frame-property.html
      
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld):
              * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::evaluate):
              * bindings/v8/V8Proxy.cpp:
              (WebCore::V8Proxy::runScript):
              (WebCore::V8Proxy::callFunction):
              (WebCore::V8Proxy::newInstance):
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              (WebCore::Frame::~Frame):
              (WebCore::Frame::pageDestroyed):
              * page/Frame.h:
              * page/Page.cpp: (WebCore::Page::~Page):
              Removed all code that dealt with the life support timer. Protect Frame inside runScript()
              and callFunction() for v8 bindings.
      
              * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent):
              Replaced ref/deref calls on self with a RefPtr.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75b54fa4
  21. 18 Aug, 2011 1 commit
    • commit-queue@webkit.org's avatar
      Move allocation in constructors into separate constructorBody() methods · 53aecd29
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=66265
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-08-18
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore:
      
      Refactoring to put all allocations that need to be done after the object's
      initialization list has executed but before the object is ready for use
      into a separate constructorBody() method.  This method is still called by the constructor,
      so the patch doesn't resolve any potential issues, it's just to set up the code for further refactoring.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * jsc.cpp:
      (GlobalObject::constructorBody):
      (GlobalObject::GlobalObject):
      * runtime/ErrorInstance.cpp:
      (JSC::ErrorInstance::ErrorInstance):
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::constructorBody):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      (JSC::ErrorPrototype::constructorBody):
      * runtime/ErrorPrototype.h:
      * runtime/Executable.cpp:
      (JSC::FunctionExecutable::FunctionExecutable):
      * runtime/Executable.h:
      (JSC::FunctionExecutable::constructorBody):
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      (JSC::InternalFunction::constructorBody):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::JSByteArray):
      * runtime/JSByteArray.h:
      (JSC::JSByteArray::constructorBody):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::JSFunction):
      (JSC::JSFunction::constructorBody):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::JSGlobalObject):
      (JSC::JSGlobalObject::constructorBody):
      * runtime/JSPropertyNameIterator.cpp:
      (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
      * runtime/JSPropertyNameIterator.h:
      (JSC::JSPropertyNameIterator::constructorBody):
      * runtime/JSString.h:
      (JSC::RopeBuilder::JSString):
      (JSC::RopeBuilder::constructorBody):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::constructorBody):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::constructorBody):
      * runtime/NativeErrorPrototype.h:
      * runtime/StringObject.cpp:
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::create):
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      * runtime/StringPrototype.h:
      (JSC::StringPrototype::create):
      
      Source/WebCore:
      
      No new tests.
      
      Refactoring to put all allocations that need to be done after the object's
      initialization list has executed but before the object is ready for use
      into a separate constructorBody() method.  This method is still called by the constructor,
      so the patch doesn't resolve any potential issues, it's just to set up the code for further refactoring.
      
      * bridge/objc/ObjCRuntimeObject.h:
      (JSC::Bindings::ObjCRuntimeObject::create):
      * bridge/objc/ObjCRuntimeObject.mm:
      * bridge/objc/objc_instance.mm:
      (ObjCRuntimeMethod::create):
      (ObjCRuntimeMethod::ObjCRuntimeMethod):
      * bridge/runtime_array.cpp:
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53aecd29