1. 04 Apr, 2011 1 commit
  2. 28 Mar, 2011 1 commit
    • oliver@apple.com's avatar
      2011-03-28 Oliver Hunt <oliver@apple.com> · 3b6dc575
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              instanceof Array test fails when using iframes
              https://bugs.webkit.org/show_bug.cgi?id=17250
      
              Add test cases for correct behaviour
      
              * fast/js/js-constructors-use-correct-global-expected.txt: Added.
              * fast/js/js-constructors-use-correct-global.html: Added.
              * fast/js/resources/js-constructors-use-correct-global.js: Added.
      2011-03-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              instanceof Array test fails when using iframes
              https://bugs.webkit.org/show_bug.cgi?id=17250
      
              This is a problem with all built in constructors, the use of
              lexicalGlobalObject rather than the constructors own
              global object reference means that a builtin will always use
              the prototype from the lexical global object rather than that
              of the constructors origin.
      
              * API/JSObjectRef.cpp:
              (JSObjectMakeFunction):
              (JSObjectMakeRegExp):
              * JavaScriptCore.exp:
              * runtime/ArrayConstructor.cpp:
              (JSC::constructArrayWithSizeQuirk):
              * runtime/BooleanConstructor.cpp:
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * runtime/BooleanConstructor.h:
              * runtime/DateConstructor.cpp:
              (JSC::constructDate):
              * runtime/DateInstance.cpp:
              * runtime/DateInstance.h:
              * runtime/ErrorConstructor.cpp:
              (JSC::constructWithErrorConstructor):
              (JSC::callErrorConstructor):
              * runtime/FunctionConstructor.cpp:
              (JSC::constructWithFunctionConstructor):
              (JSC::callFunctionConstructor):
              (JSC::constructFunction):
              * runtime/FunctionConstructor.h:
              * runtime/JSCell.cpp:
              (JSC::JSCell::getOwnPropertySlot):
              (JSC::JSCell::put):
              (JSC::JSCell::deleteProperty):
              (JSC::JSCell::toThisObject):
              (JSC::JSCell::toObject):
              * runtime/JSCell.h:
              (JSC::JSCell::JSValue::toObject):
              * runtime/JSNotAnObject.cpp:
              (JSC::JSNotAnObject::toObject):
              * runtime/JSNotAnObject.h:
              * runtime/JSObject.cpp:
              (JSC::JSObject::toObject):
              * runtime/JSObject.h:
              * runtime/JSString.cpp:
              (JSC::StringObject::create):
              (JSC::JSString::toObject):
              (JSC::JSString::toThisObject):
              * runtime/JSString.h:
              * runtime/JSValue.cpp:
              (JSC::JSValue::toObjectSlowCase):
              (JSC::JSValue::toThisObjectSlowCase):
              (JSC::JSValue::synthesizeObject):
              * runtime/JSValue.h:
              * runtime/NumberConstructor.cpp:
              (JSC::constructWithNumberConstructor):
              * runtime/NumberObject.cpp:
              (JSC::constructNumber):
              * runtime/NumberObject.h:
              * runtime/ObjectConstructor.cpp:
              (JSC::constructObject):
              (JSC::constructWithObjectConstructor):
              (JSC::callObjectConstructor):
              * runtime/RegExpConstructor.cpp:
              (JSC::constructRegExp):
              (JSC::constructWithRegExpConstructor):
              (JSC::callRegExpConstructor):
              * runtime/RegExpConstructor.h:
              * runtime/StringConstructor.cpp:
              (JSC::constructWithStringConstructor):
              * runtime/StringObject.h:
      2011-03-25  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              instanceof Array test fails when using iframes
              https://bugs.webkit.org/show_bug.cgi?id=17250
      
              Up date for new toObject api
      
              * UserObjectImp.cpp:
              (UserObjectImp::toPrimitive):
              (UserObjectImp::toBoolean):
              (UserObjectImp::toNumber):
              (UserObjectImp::toString):
      2011-03-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              instanceof Array test fails when using iframes
              https://bugs.webkit.org/show_bug.cgi?id=17250
      
              Update for new function and date apis
      
              Test: fast/js/js-constructors-use-correct-global.html
      
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::jsDateOrNull):
              * bindings/js/JSLazyEventListener.cpp:
              (WebCore::JSLazyEventListener::initializeJSFunction):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b6dc575
  3. 16 Mar, 2011 1 commit
    • oliver@apple.com's avatar
      2011-03-15 Oliver Hunt <oliver@apple.com> · 90cf7d51
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Make Structure creation require a JSGlobalData
              https://bugs.webkit.org/show_bug.cgi?id=56438
      
              Mechanical change to make Structure::create require JSGlobalData&, and
              require all users to provide the globalData.
      
              * 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.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              * debugger/DebuggerActivation.h:
              (JSC::DebuggerActivation::createStructure):
              * jit/JITStubs.cpp:
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              (functionRun):
              (jscmain):
              * runtime/Arguments.h:
              (JSC::Arguments::createStructure):
              * runtime/ArrayPrototype.h:
              (JSC::ArrayPrototype::createStructure):
              * runtime/BooleanObject.h:
              (JSC::BooleanObject::createStructure):
              * runtime/DateInstance.h:
              (JSC::DateInstance::createStructure):
              * runtime/DatePrototype.h:
              (JSC::DatePrototype::createStructure):
              * runtime/ErrorInstance.h:
              (JSC::ErrorInstance::createStructure):
              * runtime/Executable.h:
              (JSC::ExecutableBase::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.cpp:
              (JSC::JSArray::JSArray):
              * runtime/JSArray.h:
              (JSC::JSArray::createStructure):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::createStructure):
              * runtime/JSByteArray.h:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::JSCell::createDummyStructure):
              * runtime/JSFunction.h:
              (JSC::JSFunction::createStructure):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::storeVPtrs):
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObject):
              (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):
              (JSC::JSObject::inheritorID):
              * 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/JSZombie.h:
              (JSC::JSZombie::createStructure):
              * runtime/MathObject.h:
              (JSC::MathObject::createStructure):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorConstructor.h:
              (JSC::NativeErrorConstructor::createStructure):
              * runtime/NumberConstructor.h:
              (JSC::NumberConstructor::createStructure):
              * runtime/NumberObject.h:
              (JSC::NumberObject::createStructure):
              * runtime/ObjectConstructor.h:
              (JSC::ObjectConstructor::createStructure):
              * runtime/RegExpConstructor.h:
              (JSC::RegExpConstructor::createStructure):
              * runtime/RegExpObject.h:
              (JSC::RegExpObject::createStructure):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::createStructure):
              * runtime/StringObject.h:
              (JSC::StringObject::createStructure):
              * runtime/StringObjectThatMasqueradesAsUndefined.h:
              (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
              * runtime/StringPrototype.h:
              (JSC::StringPrototype::createStructure):
              * runtime/Structure.h:
              (JSC::Structure::create):
      2011-03-15  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make Structure creation require a JSGlobalData
              https://bugs.webkit.org/show_bug.cgi?id=56438
      
              Mechanical change to make all structure creation pass a JSGlobalData&.
      
              * JSRun.cpp:
              (JSGlueGlobalObject::JSGlueGlobalObject):
              (JSRun::JSRun):
              * JSRun.h:
              * JSUtils.cpp:
              (getThreadGlobalObject):
              * UserObjectImp.h:
              (UserObjectImp::createStructure):
      2011-03-15  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make Structure creation require a JSGlobalData
              https://bugs.webkit.org/show_bug.cgi?id=56438
      
              Mechanical change to make all structure creation use GlobalData
      
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSAudioConstructor.h:
              (WebCore::JSAudioConstructor::createStructure):
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMObjectWithGlobalPointer::createStructure):
              (WebCore::DOMConstructorObject::createStructure):
              (WebCore::getDOMStructure):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::createStructure):
              * bindings/js/JSDOMWindowBase.h:
              (WebCore::JSDOMWindowBase::createStructure):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::createStructure):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSImageConstructor.h:
              (WebCore::JSImageConstructor::createStructure):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * 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:
              * 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):
      2011-03-15  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make Structure creation require a JSGlobalData
              https://bugs.webkit.org/show_bug.cgi?id=56438
      
              Mechanical change to make all Structure creation use a JSGlobalData&
      
              * Plugins/Hosted/ProxyInstance.mm:
              (WebKit::ProxyRuntimeMethod::createStructure):
              * Plugins/Hosted/ProxyRuntimeObject.h:
              (WebKit::ProxyRuntimeObject::createStructure):
      2011-03-15  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make Structure creation require a JSGlobalData
              https://bugs.webkit.org/show_bug.cgi?id=56438
      
              Mechanical change to make all Structure creation use a JSGlobalData&.
      
              * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
              (WebKit::JSNPMethod::JSNPMethod):
              * WebProcess/Plugins/Netscape/JSNPMethod.h:
              (WebKit::JSNPMethod::createStructure):
              * WebProcess/Plugins/Netscape/JSNPObject.cpp:
              (WebKit::JSNPObject::JSNPObject):
              * WebProcess/Plugins/Netscape/JSNPObject.h:
              (WebKit::JSNPObject::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      90cf7d51
  4. 14 Mar, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-03-14 Geoffrey Garen <ggaren@apple.com> · e74d2d0a
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Removed more cases of DeprecatedPtr (exception, SmallStrings)
              https://bugs.webkit.org/show_bug.cgi?id=56332
      
              * runtime/Identifier.cpp:
              (JSC::Identifier::add):
              (JSC::Identifier::addSlowCase): Use a variable instead of a hard-coded
              constant, to make this code less brittle.
      
              * runtime/JSGlobalData.h: Use HeapRoot instead of DeprecatedPtr because
              this reference is owned and managed directly by the heap.
      
              * runtime/JSString.cpp:
              (JSC::JSString::substringFromRope):
              * runtime/JSString.h:
              (JSC::jsSingleCharacterString):
              (JSC::jsSingleCharacterSubstring):
              (JSC::jsString):
              (JSC::jsStringWithFinalizer):
              (JSC::jsSubstring):
              (JSC::jsOwnedString): Use a variable instead of a hard-coded
              constant, to make this code less brittle.
      
              * runtime/SmallStrings.cpp:
              (JSC::SmallStringsStorage::rep):
              (JSC::SmallStringsStorage::SmallStringsStorage):
              (JSC::SmallStrings::SmallStrings):
              (JSC::SmallStrings::markChildren):
              (JSC::SmallStrings::clear):
              (JSC::SmallStrings::count): Use a variable instead of a hard-coded
              constant, to make this code less brittle.
      
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::singleCharacterString): Use HeapRoot instead of
              DeprecatedPtr because these references are owned and managed directly by
              the heap.
              
              Stop using FixedArray because we only want a very limited set
              of classes to be able to use HeapRoot. (Replaced with manual ASSERTs.)
      
              * runtime/WriteBarrier.h:
              (JSC::operator==):
              (JSC::WriteBarrier::WriteBarrier):
              (JSC::HeapRoot::HeapRoot):
              (JSC::HeapRoot::operator=): Added HeapRoot, which is allowed to set
              without write barrier because we assume all HeapRoots are scanned during
              all GC passes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e74d2d0a
  5. 19 Feb, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 54786 - Devirtualize JSCell::classInfo() · a5540da1
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      Instead of making a virtual function call, add a pointer to the ClassInfo
      onto Structure.
      
      This removes a virtual function call, and paves the way towards removing all
      the createStructure methods, and StructureFlags/AnonymousSlotCount properties
      (these should be able to move onto ClassInfo).
      
      Calls to Structure::create must now pass a pointer to the ClassInfo for the
      structure. All objects now have a ClassInfo pointer, non-object cell types
      still do not.
      
      Changes are most mechanical, involving three steps:
          * Remove virtual classInfo() methods.
          * Add &s_info parameter to calls to Structure::create.
          * Rename ClassInfo static members on classes from 'info' to 's_info',
            for consistency.
      
      Source/JavaScriptCore: 
      
      * API/JSCallbackConstructor.cpp:
      * API/JSCallbackConstructor.h:
      * API/JSCallbackFunction.cpp:
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.cpp:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      * API/JSObjectRef.cpp:
      * API/JSValueRef.cpp:
      * API/JSWeakObjectMapRefPrivate.cpp:
      * JavaScriptCore.exp:
      * debugger/Debugger.cpp:
      * debugger/DebuggerActivation.h:
      * debugger/DebuggerCallFrame.cpp:
      * interpreter/Interpreter.cpp:
      * jit/JITCall32_64.cpp:
      * jit/JITOpcodes.cpp:
      * jit/JITStubs.cpp:
      * profiler/Profiler.cpp:
      * runtime/Arguments.cpp:
      * runtime/Arguments.h:
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayPrototype.cpp:
      * runtime/ArrayPrototype.h:
      * runtime/BooleanObject.cpp:
      * runtime/BooleanObject.h:
      * runtime/BooleanPrototype.cpp:
      * runtime/DateConstructor.cpp:
      * runtime/DateInstance.cpp:
      * runtime/DateInstance.h:
      * runtime/DatePrototype.cpp:
      * runtime/DatePrototype.h:
      * runtime/ErrorInstance.cpp:
      * runtime/ErrorInstance.h:
      * runtime/ErrorPrototype.cpp:
      * runtime/FunctionPrototype.cpp:
      * runtime/FunctionPrototype.h:
      * runtime/GetterSetter.h:
      * runtime/GlobalEvalFunction.h:
      * runtime/InternalFunction.cpp:
      * runtime/InternalFunction.h:
      * runtime/JSAPIValueWrapper.h:
      * runtime/JSActivation.cpp:
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      * runtime/JSFunction.h:
      * runtime/JSGlobalData.cpp:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      * runtime/JSONObject.h:
      * runtime/JSObject.cpp:
      * runtime/JSObject.h:
      * runtime/JSObjectWithGlobalObject.h:
      * runtime/JSPropertyNameIterator.h:
      * runtime/JSStaticScopeObject.h:
      * runtime/JSString.h:
      * runtime/JSVariableObject.h:
      * runtime/JSWrapperObject.h:
      * runtime/JSZombie.cpp:
      * runtime/JSZombie.h:
      * runtime/Lookup.cpp:
      * runtime/MathObject.cpp:
      * runtime/MathObject.h:
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      * runtime/NumberObject.h:
      * runtime/NumberPrototype.cpp:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectPrototype.cpp:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpConstructor.h:
      * runtime/RegExpObject.cpp:
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      * runtime/ScopeChain.cpp:
      * runtime/StringConstructor.cpp:
      * runtime/StringObject.cpp:
      * runtime/StringObject.h:
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      * runtime/StringPrototype.cpp:
      * runtime/StringPrototype.h:
      * runtime/Structure.cpp:
      * runtime/Structure.h:
      
      Source/JavaScriptGlue: 
      
      * JSUtils.cpp:
      (KJSValueToJSObject):
      (KJSValueToCFTypeInternal):
      * UserObjectImp.cpp:
      * UserObjectImp.h:
      (UserObjectImp::createStructure):
      
      Source/WebCore: 
      
      * WebCore.exp.in:
      * bindings/js/JSAudioConstructor.cpp:
      * bindings/js/JSAudioConstructor.h:
      * bindings/js/JSDOMBinding.cpp:
      * bindings/js/JSDOMBinding.h:
      * bindings/js/JSDOMGlobalObject.cpp:
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowBase.cpp:
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSGeolocationCustom.cpp:
      * bindings/js/JSImageConstructor.cpp:
      * bindings/js/JSImageConstructor.h:
      * bindings/js/JSImageDataCustom.cpp:
      * bindings/js/JSOptionConstructor.cpp:
      * bindings/js/JSOptionConstructor.h:
      * bindings/js/JSWorkerContextBase.cpp:
      * bindings/js/JSWorkerContextBase.h:
      * bindings/js/SerializedScriptValue.cpp:
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/c/CRuntimeObject.cpp:
      * bridge/c/CRuntimeObject.h:
      * bridge/c/c_instance.cpp:
      * bridge/jni/jsc/JNIUtilityPrivate.cpp:
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/jsc/BridgeJSC.cpp:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      * bridge/objc/objc_instance.mm:
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      * bridge/runtime_array.cpp:
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp:
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
      (WebKit::ProxyRuntimeMethod::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.h:
      (WebKit::ProxyRuntimeObject::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      * WebView/WebView.mm:
      (aeDescFromJSValue):
      
      Source/WebKit2: 
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::createStructure):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::createStructure):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5540da1
  6. 11 Jan, 2011 1 commit
  7. 10 Jan, 2011 1 commit
  8. 01 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move JavaScriptCore to Source · 76da8fc1
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51604
      
      Reviewed by Eric Seidel.
      
      Update references to JavaScriptCore to point to the new location.
      
      * Android.mk:
      * CMakeLists.txt:
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * WebKit.pri:
      * WebKit.pro:
      * wscript:
      
      Tools: 
      
      Update references to JavaScriptCore to point to the new location.
      
      * BuildSlaveSupport/build.webkit.org-config/master.cfg:
      * DumpRenderTree/qt/DumpRenderTree.pro:
      * DumpRenderTree/qt/ImageDiff.pro:
      * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
      * DumpRenderTree/wscript:
      * Scripts/build-jsc:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/run-javascriptcore-tests:
      * Scripts/update-javascriptcore-test-results:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/common/config/build_unittest.py:
      * Scripts/webkitpy/style/checker.py:
      * Scripts/webkitpy/style/checker_unittest.py:
      * Scripts/webkitpy/style/checkers/cpp_unittest.py:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      * wx/build/settings.py:
      
      WebCore: 
      
      Update references to JavaScriptCore.
      
      * Android.derived.jscbindings.mk:
      * Android.v8bindings.mk:
      * CMakeLists.txt:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.pro:
        - These changes are subtle and might not be 100% correct.
      * move-js-headers.sh:
      
      WebKit/chromium: 
      
      * WebKit.gyp:
        - Point to JavaScriptCore in its new location.
      
      WebKit/gtk: 
      
      * GNUmakefile.am:
      * docs/GNUmakefile.am:
        - Point to JavaScriptCore in its new location.
      
      WebKit/qt: 
      
      * WebKit_pch.h:
      * docs/qtwebkit.qdocconf:
        - Point to JavaScriptCore in its new location.
      
      WebKit/win: 
      
      * WebKit.vcproj/WebKit.sln:
        - Point to JavaScriptCore in its new location.
      
      WebKit/wx: 
      
      * bindings/python/wscript:
      * wscript:
        - Point to JavaScriptCore in its new location.
      
      WebKit2: 
      
      * WebKit2.pro:
        - Point to JavaScriptCore in its new location.
      
      Websites/bugs.webkit.org: 
      
      * PrettyPatch/PrettyPatch.rb:
        - Remove reference to JavaScriptCore as a source directory.
      
      Websites/webkit.org: 
      
      * coding/assertion-guidelines.html:
        - Update documentation to point to the new location of
          JavaScriptCore.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76da8fc1
  9. 07 Dec, 2010 1 commit
    • antti@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=50412 · 6261f1f0
      antti@apple.com authored
      http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading 
              
      Reviewed by Gavin Barraclough.
      
      Creating a substring caused the original string be flattened if it was in the rope form. This could use
      significant amount of memory by reducing buffer sharing between strings.
              
      Add a rope specific substring function that constructs the substring by reusing the rope fibers
      instead of flattening the rope.
              
      No change observed in SunSpider.
      
      * runtime/JSString.cpp:
      (JSC::JSString::substringFromRope):
      * runtime/JSString.h:
      (JSC::jsSubstring):
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncSubstr):
      (JSC::stringProtoFuncSubstring):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6261f1f0
  10. 04 Nov, 2010 1 commit
  11. 28 Oct, 2010 1 commit
    • xan@webkit.org's avatar
      2010-10-28 Xan Lopez <xlopez@igalia.com> · 0b31aa52
      xan@webkit.org authored
              Reviewed by Oliver Hunt.
      
              Do not have two different asCell APIs in JSValue
              https://bugs.webkit.org/show_bug.cgi?id=47979
      
              Remove JSCell* asCell(JSValue) in favor of only using
              JSValue::asCell().
      
              * API/APICast.h:
              (toRef):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::testPrototype):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCachePutByID):
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              * runtime/GetterSetter.h:
              (JSC::asGetterSetter):
              * runtime/JSByteArray.h:
              (JSC::asByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::getCallData):
              (JSC::JSCell::getConstructData):
              * runtime/JSString.h:
              (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
              (JSC::asString):
              * runtime/JSValue.h:
              * runtime/Operations.cpp:
              (JSC::jsIsObjectType):
              * runtime/Operations.h:
              (JSC::normalizePrototypeChain):
              * runtime/Protect.h:
              (JSC::gcProtect):
              (JSC::gcUnprotect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b31aa52
  12. 25 Oct, 2010 1 commit
    • oliver@apple.com's avatar
      2010-10-25 Oliver Hunt <oliver@apple.com> · 5b67d9e4
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Remove exec and globalData arguments from jsNumber
              https://bugs.webkit.org/show_bug.cgi?id=48270
      
              Remove the now unused exec and globalData arguments from jsNumber
              and mechanically update all users of jsNumber.
      
              * API/JSValueRef.cpp:
              (JSValueMakeNumber):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::emitLoad):
              * bytecompiler/NodesCodegen.cpp:
              (JSC::ArrayNode::emitBytecode):
              * jit/JITArithmetic.cpp:
              (JSC::JIT::emit_op_mod):
              * jit/JITArithmetic32_64.cpp:
              (JSC::JIT::emit_op_mod):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::emit_op_jfalse):
              (JSC::JIT::emit_op_jtrue):
              * jit/JITStubs.cpp:
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (functionRun):
              * runtime/Arguments.cpp:
              (JSC::Arguments::getOwnPropertySlot):
              (JSC::Arguments::getOwnPropertyDescriptor):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncPop):
              (JSC::arrayProtoFuncPush):
              (JSC::arrayProtoFuncShift):
              (JSC::arrayProtoFuncSplice):
              (JSC::arrayProtoFuncUnShift):
              (JSC::arrayProtoFuncFilter):
              (JSC::arrayProtoFuncMap):
              (JSC::arrayProtoFuncEvery):
              (JSC::arrayProtoFuncForEach):
              (JSC::arrayProtoFuncSome):
              (JSC::arrayProtoFuncReduce):
              (JSC::arrayProtoFuncReduceRight):
              (JSC::arrayProtoFuncIndexOf):
              (JSC::arrayProtoFuncLastIndexOf):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              * runtime/CachedTranscendentalFunction.h:
              (JSC::CachedTranscendentalFunction::operator()):
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              (JSC::dateParse):
              (JSC::dateNow):
              (JSC::dateUTC):
              * runtime/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * runtime/DatePrototype.cpp:
              (JSC::dateProtoFuncGetFullYear):
              (JSC::dateProtoFuncGetUTCFullYear):
              (JSC::dateProtoFuncGetMonth):
              (JSC::dateProtoFuncGetUTCMonth):
              (JSC::dateProtoFuncGetDate):
              (JSC::dateProtoFuncGetUTCDate):
              (JSC::dateProtoFuncGetDay):
              (JSC::dateProtoFuncGetUTCDay):
              (JSC::dateProtoFuncGetHours):
              (JSC::dateProtoFuncGetUTCHours):
              (JSC::dateProtoFuncGetMinutes):
              (JSC::dateProtoFuncGetUTCMinutes):
              (JSC::dateProtoFuncGetSeconds):
              (JSC::dateProtoFuncGetUTCSeconds):
              (JSC::dateProtoFuncGetMilliSeconds):
              (JSC::dateProtoFuncGetUTCMilliseconds):
              (JSC::dateProtoFuncGetTimezoneOffset):
              (JSC::dateProtoFuncSetTime):
              (JSC::setNewValueFromTimeArgs):
              (JSC::setNewValueFromDateArgs):
              (JSC::dateProtoFuncSetYear):
              (JSC::dateProtoFuncGetYear):
              * runtime/Error.cpp:
              (JSC::addErrorSourceInfo):
              (JSC::addErrorDivotInfo):
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              * runtime/JSArray.cpp:
              (JSC::JSArray::getOwnPropertySlot):
              (JSC::JSArray::getOwnPropertyDescriptor):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSByteArray.h:
              (JSC::JSByteArray::getIndex):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::lengthGetter):
              (JSC::JSFunction::getOwnPropertyDescriptor):
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::globalFuncParseInt):
              (JSC::globalFuncParseFloat):
              * runtime/JSNumberCell.h:
              (JSC::JSValue::JSValue):
              (JSC::jsNaN):
              (JSC::JSValue::toJSNumber):
              * runtime/JSONObject.cpp:
              (JSC::unwrapBoxedPrimitive):
              (JSC::PropertyNameForFunctionCall::value):
              (JSC::JSONStringify):
              * runtime/JSString.cpp:
              (JSC::JSString::getStringPropertyDescriptor):
              * runtime/JSString.h:
              (JSC::JSString::getStringPropertySlot):
              * runtime/JSValue.h:
              (JSC::jsDoubleNumber):
              (JSC::jsNumber):
              (JSC::jsNaN):
              (JSC::JSValue::JSValue):
              (JSC::JSValue::toJSNumber):
              * runtime/LiteralParser.cpp:
              (JSC::LiteralParser::parse):
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              (JSC::mathProtoFuncAbs):
              (JSC::mathProtoFuncACos):
              (JSC::mathProtoFuncASin):
              (JSC::mathProtoFuncATan):
              (JSC::mathProtoFuncATan2):
              (JSC::mathProtoFuncCeil):
              (JSC::mathProtoFuncCos):
              (JSC::mathProtoFuncExp):
              (JSC::mathProtoFuncFloor):
              (JSC::mathProtoFuncLog):
              (JSC::mathProtoFuncMax):
              (JSC::mathProtoFuncMin):
              (JSC::mathProtoFuncPow):
              (JSC::mathProtoFuncRandom):
              (JSC::mathProtoFuncRound):
              (JSC::mathProtoFuncSin):
              (JSC::mathProtoFuncSqrt):
              (JSC::mathProtoFuncTan):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              (JSC::numberConstructorNaNValue):
              (JSC::numberConstructorNegInfinity):
              (JSC::numberConstructorPosInfinity):
              (JSC::numberConstructorMaxValue):
              (JSC::numberConstructorMinValue):
              (JSC::constructWithNumberConstructor):
              (JSC::callNumberConstructor):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              * runtime/Operations.cpp:
              (JSC::jsAddSlowCase):
              * runtime/Operations.h:
              (JSC::jsAdd):
              * runtime/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              (JSC::RegExpMatchesArray::fillArrayInstance):
              * runtime/RegExpObject.cpp:
              (JSC::regExpObjectLastIndex):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              (JSC::stringProtoFuncReplace):
              (JSC::stringProtoFuncCharCodeAt):
              (JSC::stringProtoFuncIndexOf):
              (JSC::stringProtoFuncLastIndexOf):
              (JSC::stringProtoFuncSearch):
              (JSC::stringProtoFuncLocaleCompare):
      2010-10-25  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Remove exec and globalData arguments from jsNumber
              https://bugs.webkit.org/show_bug.cgi?id=48270
      
              Don't pass exec to jsNumber
      
              * JSUtils.cpp:
              (JSObjectKJSValue):
              * UserObjectImp.cpp:
              (UserObjectImp::toPrimitive):
      2010-10-25  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Remove exec and globalData arguments from jsNumber
              https://bugs.webkit.org/show_bug.cgi?id=48270
      
              Mechanical removal of exec parameter to jsNumber.
      
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              (WebCore::JSCSSStyleDeclaration::nameGetter):
              * bindings/js/JSCoordinatesCustom.cpp:
              (WebCore::JSCoordinates::altitude):
              (WebCore::JSCoordinates::altitudeAccuracy):
              (WebCore::JSCoordinates::heading):
              (WebCore::JSCoordinates::speed):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::setTimeout):
              (WebCore::JSDOMWindow::setInterval):
              * bindings/js/JSDeviceMotionEventCustom.cpp:
              (WebCore::createAccelerationObject):
              (WebCore::createRotationRateObject):
              (WebCore::JSDeviceMotionEvent::interval):
              * bindings/js/JSDeviceOrientationEventCustom.cpp:
              (WebCore::JSDeviceOrientationEvent::alpha):
              (WebCore::JSDeviceOrientationEvent::beta):
              (WebCore::JSDeviceOrientationEvent::gamma):
              * bindings/js/JSGeolocationCustom.cpp:
              (WebCore::JSGeolocation::watchPosition):
              * bindings/js/JSHTMLInputElementCustom.cpp:
              (WebCore::JSHTMLInputElement::selectionStart):
              (WebCore::JSHTMLInputElement::selectionEnd):
              * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
              (WebCore::JSHTMLOptionsCollection::length):
              * bindings/js/JSIDBKeyCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSInjectedScriptHostCustom.cpp:
              (WebCore::InjectedScriptHost::createInjectedScript):
              (WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              (WebCore::JSSQLResultSetRowList::item):
              * bindings/js/JSSVGLengthCustom.cpp:
              (WebCore::JSSVGLength::value):
              * bindings/js/JSScriptProfileNodeCustom.cpp:
              (WebCore::JSScriptProfileNode::callUID):
              * bindings/js/JSWebGLRenderingContextCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSWorkerContextCustom.cpp:
              (WebCore::JSWorkerContext::setTimeout):
              (WebCore::JSWorkerContext::setInterval):
              * bindings/js/JSWorkerContextErrorHandler.cpp:
              (WebCore::JSWorkerContextErrorHandler::handleEvent):
              * bindings/js/ScriptFunctionCall.cpp:
              (WebCore::ScriptCallArgumentHandler::appendArgument):
              * bindings/js/SerializedScriptValue.cpp:
              (WebCore::CloneDeserializer::readTerminal):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/c/c_instance.cpp:
              (JSC::Bindings::CInstance::numberValue):
              * bridge/c/c_utility.cpp:
              (JSC::Bindings::convertNPVariantToValue):
              * bridge/jni/jsc/JNIBridgeJSC.cpp:
              (JavaField::valueFromInstance):
              (JavaArray::valueAt):
              * bridge/jni/jsc/JavaInstanceJSC.cpp:
              (JavaInstance::numberValue):
              (JavaInstance::invokeMethod):
              * bridge/objc/objc_instance.mm:
              (ObjcInstance::numberValue):
              * bridge/objc/objc_utility.mm:
              (JSC::Bindings::convertObjcValueToValue):
              * bridge/runtime_array.cpp:
              (JSC::RuntimeArray::lengthGetter):
              * bridge/runtime_method.cpp:
              (JSC::RuntimeMethod::lengthGetter):
      2010-10-25  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Remove exec and globalData arguments from jsNumber
              https://bugs.webkit.org/show_bug.cgi?id=48270
      
              Mechanical removal of exec parameter to jsNumber
      
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
              * Plugins/Hosted/ProxyInstance.mm:
              (WebKit::ProxyInstance::numberValue):
      2010-10-25  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Remove exec and globalData arguments from jsNumber
              https://bugs.webkit.org/show_bug.cgi?id=48270
      
              Mechanical removal of exec parameter to jsNumber
      
              * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
              (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b67d9e4
  13. 18 Aug, 2010 1 commit
    • barraclough@apple.com's avatar
      Bug 44146 - Remove toDouble/toUInt32 methods from UString. · 794f4617
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      JavaScriptCore: 
      
      These methods all implement JavaScript language specific behaviour, and as such
      are not suited to being on a generic string object.  They are also inefficient
      and incorrectly used, refactor & cleanup.  Uses of these methods really divide
      out into two cases.
      
      ToNumber:
      Uses of toDouble from JSString and from parseFloat are implementing ecma's
      ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble
      should largely just be moved out to a global jsToNumber function.  ToNumber is
      capable of recognizing either decimal or hexadecimal numbers, but parseFloat
      should only recognize decimal values.  This is currently handled by testing for
      hexadecimal before calling toDouble, which should unnecessary - instead we can
      just split out the two parts to the grammar into separate functions. Also,
      strtod recognizes a set of literals (nan, inf, and infinity - all with any
      capitalization) - which are not defined by any of the specs we are implementing.
      To handle this we need to perform additional work in toDouble to convert the
      unsupported cases of infinities back to NaNs.  Instead we should simply remove
      support for this literals from strtod.  This should provide a more desirable
      behaviour for all clients of strtod.
      
      Indexed properties:
      Uses of the toStrictUInt32 methods are were all converting property names to
      indices, and all uses of toUInt32 were incorrect; in all cases we should have
      been calling toUInt32.  This error results in some incorrect behaviour in the
      DOM (accessing property "0 " of a NodeList should fail; it currently does not).
      Move this method onto Identifier (our canonical property name), and make it
      always perform a strict conversion. Add a layout test to check NodeList does
      convert indexed property names correctly.
      
      * JavaScriptCore.exp:
      * runtime/Arguments.cpp:
      (JSC::Arguments::getOwnPropertySlot):
      (JSC::Arguments::getOwnPropertyDescriptor):
      (JSC::Arguments::put):
      (JSC::Arguments::deleteProperty):
      * runtime/Identifier.cpp:
      (JSC::Identifier::toUInt32):
      * runtime/Identifier.h:
      (JSC::Identifier::toUInt32):
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertySlot):
      (JSC::JSArray::getOwnPropertyDescriptor):
      (JSC::JSArray::put):
      (JSC::JSArray::deleteProperty):
      * runtime/JSArray.h:
      (JSC::Identifier::toArrayIndex):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::getOwnPropertySlot):
      (JSC::JSByteArray::getOwnPropertyDescriptor):
      (JSC::JSByteArray::put):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::isInfinity):
      (JSC::jsHexIntegerLiteral):
      (JSC::jsStrDecimalLiteral):
      (JSC::jsToNumber):
      (JSC::parseFloat):
      * runtime/JSGlobalObjectFunctions.h:
      * runtime/JSString.cpp:
      (JSC::JSString::getPrimitiveNumber):
      (JSC::JSString::toNumber):
      (JSC::JSString::getStringPropertyDescriptor):
      * runtime/JSString.h:
      (JSC::JSString::getStringPropertySlot):
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::put):
      * runtime/StringObject.cpp:
      (JSC::StringObject::deleteProperty):
      * runtime/UString.cpp:
      * runtime/UString.h:
      * wtf/dtoa.cpp:
      (WTF::strtod):
      
      WebCore: 
      
      These methods all implement JavaScript language specific behaviour, and as such
      are not suited to being on a generic string object.  They are also inefficient
      and incorrectly used, refactor & cleanup.  Uses of these methods really divide
      out into two cases.
      
      ToNumber:
      Uses of toDouble from JSString and from parseFloat are implementing ecma's
      ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble
      should largely just be moved out to a global jsToNumber function.  ToNumber is
      capable of recognizing either decimal or hexadecimal numbers, but parseFloat
      should only recognize decimal values.  This is currently handled by testing for
      hexadecimal before calling toDouble, which should unnecessary - instead we can
      just split out the two parts to the grammar into separate functions. Also,
      strtod recognizes a set of literals (nan, inf, and infinity - all with any
      capitalization) - which are not defined by any of the specs we are implementing.
      To handle this we need to perform additional work in toDouble to convert the
      unsupported cases of infinities back to NaNs.  Instead we should simply remove
      support for this literals from strtod.  This should provide a more desirable
      behaviour for all clients of strtod.
      
      Indexed properties:
      Uses of the toStrictUInt32 methods are were all converting property names to
      indices, and all uses of toUInt32 were incorrect; in all cases we should have
      been calling toUInt32.  This error results in some incorrect behaviour in the
      DOM (accessing property "0 " of a NodeList should fail; it currently does not).
      Move this method onto Identifier (our canonical property name), and make it
      always perform a strict conversion. Add a layout test to check NodeList does
      convert indexed property names correctly.
      
      Test: fast/dom/NodeList/nodelist-item-with-index.html
      
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::getOwnPropertySlot):
      (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      (WebCore::callHTMLAllCollection):
      (WebCore::JSHTMLAllCollection::item):
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::callHTMLCollection):
      (WebCore::JSHTMLCollection::item):
      * bindings/js/JSNodeListCustom.cpp:
      (WebCore::callNodeList):
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::getOwnPropertySlot):
      (JSC::RuntimeArray::getOwnPropertyDescriptor):
      (JSC::RuntimeArray::put):
      
      LayoutTests: 
      
      Test that indexing into nodelists works correctly, particularly
      wrt indices passed as strings that contain whitespace.
      
      * fast/dom/NodeList/nodelist-item-with-index-expected.txt: Added.
      * fast/dom/NodeList/nodelist-item-with-index.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      794f4617
  14. 13 Aug, 2010 2 commits
    • barraclough@apple.com's avatar
      Unify UString::UTF8String() & String::utf8() methods, · 3158a387
      barraclough@apple.com authored
      remove UString::cost() & make atArrayIndex a free function.
      
      Reviewed by Sam Weinig
      
      JavaScriptCore: 
      
      * JavaScriptCore.exp:
      * bytecode/CodeBlock.cpp:
      (JSC::constantName):
      (JSC::idName):
      (JSC::CodeBlock::registerName):
      (JSC::regexpName):
      (JSC::printGlobalResolveInfo):
      (JSC::printStructureStubInfo):
      (JSC::CodeBlock::printStructure):
      (JSC::CodeBlock::printStructures):
      * jsc.cpp:
      (functionPrint):
      (functionDebug):
      (runInteractive):
      (fillBufferWithContentsOfFile):
      * pcre/pcre_exec.cpp:
      (Histogram::~Histogram):
      * profiler/CallIdentifier.h:
      (JSC::CallIdentifier::c_str):
      * profiler/Profile.cpp:
      (JSC::Profile::debugPrintDataSampleStyle):
      * profiler/ProfileGenerator.cpp:
      (JSC::ProfileGenerator::willExecute):
      (JSC::ProfileGenerator::didExecute):
      * profiler/ProfileNode.cpp:
      (JSC::ProfileNode::debugPrintData):
      (JSC::ProfileNode::debugPrintDataSampleStyle):
      * runtime/Arguments.cpp:
      (JSC::Arguments::getOwnPropertySlot):
      (JSC::Arguments::getOwnPropertyDescriptor):
      (JSC::Arguments::put):
      (JSC::Arguments::deleteProperty):
      * runtime/DateConversion.cpp:
      (JSC::parseDate):
      * runtime/Identifier.h:
      (JSC::Identifier::toStrictUInt32):
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertySlot):
      (JSC::JSArray::getOwnPropertyDescriptor):
      (JSC::JSArray::put):
      (JSC::JSArray::deleteProperty):
      * runtime/JSArray.h:
      (JSC::toArrayIndex):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::encode):
      (JSC::parseInt):
      (JSC::globalFuncJSCPrint):
      * runtime/JSString.h:
      (JSC::RopeBuilder::JSString):
      * runtime/UString.cpp:
      (JSC::UString::toDouble):
      (JSC::putUTF8Triple):
      (JSC::UString::utf8):
      * runtime/UString.h:
      (JSC::UString::~UString):
      (JSC::UString::isNull):
      (JSC::UString::isEmpty):
      (JSC::UString::impl):
      * wtf/text/WTFString.cpp:
      (WTF::String::utf8):
      * wtf/text/WTFString.h:
      (WTF::String::~String):
      (WTF::String::swap):
      (WTF::String::isNull):
      (WTF::String::isEmpty):
      (WTF::String::impl):
      (WTF::String::length):
      (WTF::String::String):
      (WTF::String::isHashTableDeletedValue):
      
      WebCore: 
      
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::getOwnPropertySlot):
      (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
      * bridge/NP_jsobject.cpp:
      (_NPN_Enumerate):
      * bridge/c/c_utility.cpp:
      (JSC::Bindings::convertValueToNPVariant):
      * bridge/jni/JNIBridge.cpp:
      (JavaParameter::JavaParameter):
      (JavaMethod::JavaMethod):
      (JavaMethod::signature):
      (JavaMethod::methodID):
      * bridge/jni/JNIBridge.h:
      (JSC::Bindings::JavaString::utf8):
      (JSC::Bindings::JavaParameter::type):
      (JSC::Bindings::JavaMethod::returnType):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::call):
      (JavaJSObject::eval):
      (JavaJSObject::getMember):
      (JavaJSObject::setMember):
      (JavaJSObject::removeMember):
      (JavaJSObject::convertJObjectToValue):
      * bridge/jni/jsc/JNIBridgeJSC.cpp:
      (JavaField::JavaField):
      (JavaField::valueFromInstance):
      (JavaField::setValueToInstance):
      * bridge/jni/jsc/JNIBridgeJSC.h:
      (JSC::Bindings::JavaField::type):
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaInstance::invokeMethod):
      * bridge/jni/jsc/JavaStringJSC.h:
      (JSC::Bindings::JavaStringImpl::utf8):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::getOwnPropertySlot):
      (JSC::RuntimeArray::getOwnPropertyDescriptor):
      (JSC::RuntimeArray::put):
      
      WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::enumerate):
      
      WebKit/wx: 
      
      * WebFrame.cpp:
      (wxWebFrame::RunScript):
      
      WebKit2: 
      
      * WebProcess/Plugins/JSNPObject.cpp:
      (WebKit::npIdentifierFromIdentifier):
      * WebProcess/Plugins/NPJSObject.cpp:
      (WebKit::NPJSObject::enumerate):
      * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
      (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3158a387
    • ossy@webkit.org's avatar
      2010-08-12 Sheriff Bot <webkit.review.bot@gmail.com> · eb7ea4be
      ossy@webkit.org authored
              Unreviewed, rolling out r65295.
              http://trac.webkit.org/changeset/65295
              https://bugs.webkit.org/show_bug.cgi?id=43950
      
              It broke 4 sputnik tests (Requested by Ossy on #webkit).
      
              * JavaScriptCore.exp:
              * bytecode/CodeBlock.cpp:
              (JSC::constantName):
              (JSC::idName):
              (JSC::CodeBlock::registerName):
              (JSC::regexpName):
              (JSC::printGlobalResolveInfo):
              (JSC::printStructureStubInfo):
              (JSC::CodeBlock::printStructure):
              (JSC::CodeBlock::printStructures):
              * jsc.cpp:
              (functionPrint):
              (functionDebug):
              (runInteractive):
              (fillBufferWithContentsOfFile):
              * pcre/pcre_exec.cpp:
              (Histogram::~Histogram):
              * profiler/CallIdentifier.h:
              (JSC::CallIdentifier::c_str):
              * profiler/Profile.cpp:
              (JSC::Profile::debugPrintDataSampleStyle):
              * profiler/ProfileGenerator.cpp:
              (JSC::ProfileGenerator::willExecute):
              (JSC::ProfileGenerator::didExecute):
              * profiler/ProfileNode.cpp:
              (JSC::ProfileNode::debugPrintData):
              (JSC::ProfileNode::debugPrintDataSampleStyle):
              * runtime/Arguments.cpp:
              (JSC::Arguments::getOwnPropertySlot):
              (JSC::Arguments::getOwnPropertyDescriptor):
              (JSC::Arguments::put):
              (JSC::Arguments::deleteProperty):
              * runtime/DateConversion.cpp:
              (JSC::parseDate):
              * runtime/Identifier.h:
              (JSC::Identifier::Identifier):
              (JSC::Identifier::toArrayIndex):
              * runtime/JSArray.cpp:
              (JSC::JSArray::getOwnPropertySlot):
              (JSC::JSArray::getOwnPropertyDescriptor):
              (JSC::JSArray::put):
              (JSC::JSArray::deleteProperty):
              * runtime/JSArray.h:
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::encode):
              (JSC::parseInt):
              (JSC::globalFuncJSCPrint):
              * runtime/JSString.h:
              (JSC::RopeBuilder::JSString):
              * runtime/UString.cpp:
              (JSC::UString::toDouble):
              (JSC::UString::UTF8String):
              * runtime/UString.h:
              (JSC::UString::isNull):
              (JSC::UString::isEmpty):
              (JSC::UString::impl):
              (JSC::UString::cost):
              (JSC::UString::~UString):
              (JSC::UString::toArrayIndex):
              * wtf/text/WTFString.cpp:
              (WTF::String::utf8):
              * wtf/text/WTFString.h:
              (WTF::String::String):
              (WTF::String::isHashTableDeletedValue):
              (WTF::String::length):
              (WTF::String::operator[]):
              (WTF::String::isNull):
              (WTF::String::isEmpty):
              (WTF::String::impl):
      2010-08-12  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r65295.
              http://trac.webkit.org/changeset/65295
              https://bugs.webkit.org/show_bug.cgi?id=43950
      
              It broke 4 sputnik tests (Requested by Ossy on #webkit).
      
              * WebFrame.cpp:
              (wxWebFrame::RunScript):
      2010-08-12  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r65295.
              http://trac.webkit.org/changeset/65295
              https://bugs.webkit.org/show_bug.cgi?id=43950
      
              It broke 4 sputnik tests (Requested by Ossy on #webkit).
      
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::enumerate):
      2010-08-12  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r65295.
              http://trac.webkit.org/changeset/65295
              https://bugs.webkit.org/show_bug.cgi?id=43950
      
              It broke 4 sputnik tests (Requested by Ossy on #webkit).
      
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::getOwnPropertySlot):
              (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
              * bridge/NP_jsobject.cpp:
              (_NPN_Enumerate):
              * bridge/c/c_utility.cpp:
              (JSC::Bindings::convertValueToNPVariant):
              * bridge/jni/JNIBridge.cpp:
              (JavaParameter::JavaParameter):
              (JavaMethod::JavaMethod):
              (JavaMethod::signature):
              (JavaMethod::methodID):
              * bridge/jni/JNIBridge.h:
              (JSC::Bindings::JavaString::UTF8String):
              (JSC::Bindings::JavaParameter::type):
              (JSC::Bindings::JavaMethod::returnType):
              * bridge/jni/jni_jsobject.mm:
              (JavaJSObject::call):
              (JavaJSObject::eval):
              (JavaJSObject::getMember):
              (JavaJSObject::setMember):
              (JavaJSObject::removeMember):
              (JavaJSObject::convertJObjectToValue):
              * bridge/jni/jsc/JNIBridgeJSC.cpp:
              (JavaField::JavaField):
              (JavaField::valueFromInstance):
              (JavaField::setValueToInstance):
              * bridge/jni/jsc/JNIBridgeJSC.h:
              (JSC::Bindings::JavaField::type):
              * bridge/jni/jsc/JavaInstanceJSC.cpp:
              (JavaInstance::invokeMethod):
              * bridge/jni/jsc/JavaStringJSC.h:
              (JSC::Bindings::JavaStringImpl::UTF8String):
              * bridge/runtime_array.cpp:
              (JSC::RuntimeArray::getOwnPropertySlot):
              (JSC::RuntimeArray::getOwnPropertyDescriptor):
              (JSC::RuntimeArray::put):
      2010-08-12  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r65295.
              http://trac.webkit.org/changeset/65295
              https://bugs.webkit.org/show_bug.cgi?id=43950
      
              It broke 4 sputnik tests (Requested by Ossy on #webkit).
      
              * WebProcess/Plugins/JSNPObject.cpp:
              (WebKit::npIdentifierFromIdentifier):
              * WebProcess/Plugins/NPJSObject.cpp:
              (WebKit::NPJSObject::enumerate):
              * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
              (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb7ea4be
  15. 12 Aug, 2010 1 commit
    • barraclough@apple.com's avatar
      Unify UString::UTF8String() & String::utf8() methods, · d22274e7
      barraclough@apple.com authored
      remove UString::cost() & make atArrayIndex a free function.
      
      Reviewed by Sam Weinig
      
      JavaScriptCore: 
      
      * JavaScriptCore.exp:
      * bytecode/CodeBlock.cpp:
      (JSC::constantName):
      (JSC::idName):
      (JSC::CodeBlock::registerName):
      (JSC::regexpName):
      (JSC::printGlobalResolveInfo):
      (JSC::printStructureStubInfo):
      (JSC::CodeBlock::printStructure):
      (JSC::CodeBlock::printStructures):
      * jsc.cpp:
      (functionPrint):
      (functionDebug):
      (runInteractive):
      (fillBufferWithContentsOfFile):
      * pcre/pcre_exec.cpp:
      (Histogram::~Histogram):
      * profiler/CallIdentifier.h:
      (JSC::CallIdentifier::c_str):
      * profiler/Profile.cpp:
      (JSC::Profile::debugPrintDataSampleStyle):
      * profiler/ProfileGenerator.cpp:
      (JSC::ProfileGenerator::willExecute):
      (JSC::ProfileGenerator::didExecute):
      * profiler/ProfileNode.cpp:
      (JSC::ProfileNode::debugPrintData):
      (JSC::ProfileNode::debugPrintDataSampleStyle):
      * runtime/Arguments.cpp:
      (JSC::Arguments::getOwnPropertySlot):
      (JSC::Arguments::getOwnPropertyDescriptor):
      (JSC::Arguments::put):
      (JSC::Arguments::deleteProperty):
      * runtime/DateConversion.cpp:
      (JSC::parseDate):
      * runtime/Identifier.h:
      (JSC::Identifier::toStrictUInt32):
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertySlot):
      (JSC::JSArray::getOwnPropertyDescriptor):
      (JSC::JSArray::put):
      (JSC::JSArray::deleteProperty):
      * runtime/JSArray.h:
      (JSC::toArrayIndex):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::encode):
      (JSC::parseInt):
      (JSC::globalFuncJSCPrint):
      * runtime/JSString.h:
      (JSC::RopeBuilder::JSString):
      * runtime/UString.cpp:
      (JSC::UString::toDouble):
      (JSC::putUTF8Triple):
      (JSC::UString::utf8):
      * runtime/UString.h:
      (JSC::UString::~UString):
      (JSC::UString::isNull):
      (JSC::UString::isEmpty):
      (JSC::UString::impl):
      * wtf/text/WTFString.cpp:
      (WTF::String::utf8):
      * wtf/text/WTFString.h:
      (WTF::String::~String):
      (WTF::String::swap):
      (WTF::String::isNull):
      (WTF::String::isEmpty):
      (WTF::String::impl):
      (WTF::String::length):
      (WTF::String::String):
      (WTF::String::isHashTableDeletedValue):
      
      WebCore: 
      
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::getOwnPropertySlot):
      (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
      * bridge/NP_jsobject.cpp:
      (_NPN_Enumerate):
      * bridge/c/c_utility.cpp:
      (JSC::Bindings::convertValueToNPVariant):
      * bridge/jni/JNIBridge.cpp:
      (JavaParameter::JavaParameter):
      (JavaMethod::JavaMethod):
      (JavaMethod::signature):
      (JavaMethod::methodID):
      * bridge/jni/JNIBridge.h:
      (JSC::Bindings::JavaString::utf8):
      (JSC::Bindings::JavaParameter::type):
      (JSC::Bindings::JavaMethod::returnType):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::call):
      (JavaJSObject::eval):
      (JavaJSObject::getMember):
      (JavaJSObject::setMember):
      (JavaJSObject::removeMember):
      (JavaJSObject::convertJObjectToValue):
      * bridge/jni/jsc/JNIBridgeJSC.cpp:
      (JavaField::JavaField):
      (JavaField::valueFromInstance):
      (JavaField::setValueToInstance):
      * bridge/jni/jsc/JNIBridgeJSC.h:
      (JSC::Bindings::JavaField::type):
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaInstance::invokeMethod):
      * bridge/jni/jsc/JavaStringJSC.h:
      (JSC::Bindings::JavaStringImpl::utf8):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::getOwnPropertySlot):
      (JSC::RuntimeArray::getOwnPropertyDescriptor):
      (JSC::RuntimeArray::put):
      
      WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::enumerate):
      
      WebKit/wx: 
      
      * WebFrame.cpp:
      (wxWebFrame::RunScript):
      
      WebKit2: 
      
      * WebProcess/Plugins/JSNPObject.cpp:
      (WebKit::npIdentifierFromIdentifier):
      * WebProcess/Plugins/NPJSObject.cpp:
      (WebKit::NPJSObject::enumerate):
      * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
      (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d22274e7
  16. 11 Aug, 2010 1 commit
    • barraclough@apple.com's avatar
      Rubber stamps by Darin Adler & Sam Weinig. · c2527d64
      barraclough@apple.com authored
      Bug 43867 - Some UString cleanup
      
      Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String.
      Move string concatenation methods to a new header to simplify down UString.h.  Remove is8Bit().
      
      JavaScriptCore: 
      
      * API/JSClassRef.cpp:
      (OpaqueJSClass::~OpaqueJSClass):
      (OpaqueJSClass::className):
      * API/OpaqueJSString.cpp:
      (OpaqueJSString::create):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/CodeBlock.cpp:
      (JSC::constantName):
      (JSC::idName):
      (JSC::CodeBlock::registerName):
      (JSC::regexpName):
      * bytecode/EvalCodeCache.h:
      (JSC::EvalCodeCache::get):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ResolveNode::emitBytecode):
      (JSC::FunctionCallResolveNode::emitBytecode):
      (JSC::ReadModifyResolveNode::emitBytecode):
      (JSC::processClauseList):
      * parser/ASTBuilder.h:
      (JSC::ASTBuilder::createRegex):
      * parser/ParserArena.h:
      (JSC::IdentifierArena::makeNumericIdentifier):
      * parser/SourceProvider.h:
      (JSC::UStringSourceProvider::data):
      (JSC::UStringSourceProvider::length):
      * profiler/Profiler.cpp:
      * runtime/Arguments.cpp:
      (JSC::Arguments::getOwnPropertySlot):
      (JSC::Arguments::getOwnPropertyNames):
      (JSC::Arguments::put):
      (JSC::Arguments::deleteProperty):
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      * runtime/DatePrototype.cpp:
      (JSC::formatLocaleDate):
      * runtime/ExceptionHelpers.cpp:
      * runtime/FunctionConstructor.cpp:
      * runtime/FunctionPrototype.cpp:
      (JSC::insertSemicolonIfNeeded):
      * runtime/Identifier.h:
      (JSC::Identifier::characters):
      (JSC::Identifier::length):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::decode):
      (JSC::parseInt):
      (JSC::parseFloat):
      (JSC::globalFuncEscape):
      (JSC::globalFuncUnescape):
      * runtime/JSNumberCell.cpp:
      (JSC::JSNumberCell::toString):
      * runtime/JSONObject.cpp:
      (JSC::gap):
      (JSC::Stringifier::appendQuotedString):
      (JSC::Stringifier::appendStringifiedValue):
      (JSC::Stringifier::indent):
      (JSC::Stringifier::unindent):
      (JSC::Walker::walk):
      * runtime/JSString.cpp:
      (JSC::JSString::replaceCharacter):
      (JSC::JSString::getIndexSlowCase):
      * runtime/JSString.h:
      (JSC::RopeBuilder::JSString):
      (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
      (JSC::RopeBuilder::fiberCount):
      (JSC::jsSingleCharacterSubstring):
      (JSC::jsNontrivialString):
      (JSC::JSString::getIndex):
      (JSC::jsString):
      (JSC::jsStringWithFinalizer):
      (JSC::jsSubstring):
      (JSC::jsOwnedString):
      * runtime/JSStringBuilder.h:
      (JSC::JSStringBuilder::append):
      * runtime/LiteralParser.h:
      (JSC::LiteralParser::Lexer::Lexer):
      * runtime/NumberPrototype.cpp:
      (JSC::numberProtoFuncToString):
      (JSC::numberProtoFuncToFixed):
      (JSC::numberProtoFuncToExponential):
      (JSC::numberProtoFuncToPrecision):
      * runtime/NumericStrings.h:
      (JSC::NumericStrings::add):
      (JSC::NumericStrings::lookupSmallString):
      * runtime/Operations.h:
      (JSC::jsString):
      * runtime/RegExp.cpp:
      (JSC::RegExp::match):
      * runtime/RegExpCache.cpp:
      (JSC::RegExpCache::lookupOrCreate):
      (JSC::RegExpCache::create):
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::getRightContext):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::match):
      * runtime/RegExpPrototype.cpp:
      (JSC::regExpProtoFuncToString):
      * runtime/StringBuilder.h:
      (JSC::StringBuilder::append):
      * runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h.
      (JSC::):
      (JSC::sumWithOverflow):
      (JSC::tryMakeString):
      (JSC::makeString):
      * runtime/StringObject.cpp:
      (JSC::StringObject::getOwnPropertyNames):
      * runtime/StringPrototype.cpp:
      (JSC::substituteBackreferencesSlow):
      (JSC::localeCompare):
      (JSC::jsSpliceSubstringsWithSeparators):
      (JSC::stringProtoFuncReplace):
      (JSC::stringProtoFuncCharAt):
      (JSC::stringProtoFuncCharCodeAt):
      (JSC::stringProtoFuncIndexOf):
      (JSC::stringProtoFuncLastIndexOf):
      (JSC::stringProtoFuncSlice):
      (JSC::stringProtoFuncSplit):
      (JSC::stringProtoFuncSubstr):
      (JSC::stringProtoFuncSubstring):
      (JSC::stringProtoFuncToLowerCase):
      (JSC::stringProtoFuncToUpperCase):
      (JSC::stringProtoFuncFontsize):
      (JSC::stringProtoFuncLink):
      (JSC::trimString):
      * runtime/UString.cpp:
      (JSC::UString::number):
      (JSC::UString::ascii):
      (JSC::UString::operator[]):
      (JSC::UString::toDouble):
      (JSC::UString::find):
      (JSC::UString::rfind):
      (JSC::UString::substr):
      (JSC::operator==):
      (JSC::operator<):
      (JSC::operator>):
      (JSC::UString::UTF8String):
      * runtime/UString.h:
      (JSC::UString::UString):
      (JSC::UString::adopt):
      (JSC::UString::length):
      (JSC::UString::characters):
      (JSC::UString::isNull):
      (JSC::UString::isEmpty):
      (JSC::UString::impl):
      (JSC::UString::cost):
      (JSC::operator==):
      (JSC::operator!=):
      (JSC::codePointCompare):
      (JSC::UString::toArrayIndex):
      (JSC::IdentifierRepHash::hash):
      (WTF::):
      * yarr/RegexJIT.cpp:
      (JSC::Yarr::jitCompileRegex):
      * yarr/RegexParser.h:
      (JSC::Yarr::Parser::Parser):
      
      JavaScriptGlue: 
      
      * JSUtils.cpp:
      (UStringToCFString):
      (KJSValueToCFTypeInternal):
      * JavaScriptGlue.xcodeproj/project.pbxproj:
      
      WebCore: 
      
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      (WebCore::hasCSSPropertyNamePrefix):
      (WebCore::cssPropertyName):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::setPort):
      * bindings/js/ScriptDebugServer.cpp:
      (WebCore::ScriptDebugServer::dispatchDidParseSource):
      * bindings/js/ScriptString.h:
      (WebCore::ScriptString::size):
      * bindings/js/ScriptValue.cpp:
      (WebCore::jsToInspectorValue):
      * bindings/objc/WebScriptObject.mm:
      (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::convertValueToJObject):
      * bridge/jni/jsc/JNIUtilityPrivate.cpp:
      (JSC::Bindings::convertArrayInstanceToJavaArray):
      (JSC::Bindings::convertValueToJValue):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::callObjCFallbackObject):
      
      WebKit/mac: 
      
      * WebView/WebScriptDebugger.mm:
      (toNSString):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c2527d64
  17. 10 Aug, 2010 2 commits
    • barraclough@apple.com's avatar
      Bug 43817 - Remove UString::Rep · ee2085b2
      barraclough@apple.com authored
      UString::Rep has for a long time been replaced by UStringImpl (Rep
      remaining as a typedef).  UStringImpl has since been removed too
      (unified with StringImpl). Remove Rep, rename rep() to impl() and
      m_rep to m_impl.  Also add impl() method to Identifier, and rename
      its UString member from _ustring to m_string.
      
      Rubber stamped by Sam Weinig
      
      JavaScriptCore: 
      
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
      (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
      (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getOwnPropertySlot):
      (JSC::::put):
      (JSC::::deleteProperty):
      (JSC::::getOwnPropertyNames):
      (JSC::::staticValueGetter):
      (JSC::::staticFunctionGetter):
      * API/JSClassRef.cpp:
      (tryCreateStringFromUTF8):
      (OpaqueJSClass::OpaqueJSClass):
      (OpaqueJSClass::~OpaqueJSClass):
      (OpaqueJSClassContextData::OpaqueJSClassContextData):
      * API/JSClassRef.h:
      * API/OpaqueJSString.cpp:
      (OpaqueJSString::ustring):
      * bytecode/EvalCodeCache.h:
      (JSC::EvalCodeCache::get):
      * bytecode/JumpTable.h:
      (JSC::StringJumpTable::offsetForValue):
      (JSC::StringJumpTable::ctiForValue):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::addVar):
      (JSC::BytecodeGenerator::addGlobalVar):
      (JSC::BytecodeGenerator::BytecodeGenerator):
      (JSC::BytecodeGenerator::addParameter):
      (JSC::BytecodeGenerator::registerFor):
      (JSC::BytecodeGenerator::willResolveToArguments):
      (JSC::BytecodeGenerator::uncheckedRegisterForArguments):
      (JSC::BytecodeGenerator::constRegisterFor):
      (JSC::BytecodeGenerator::isLocal):
      (JSC::BytecodeGenerator::isLocalConstant):
      (JSC::BytecodeGenerator::addConstant):
      (JSC::BytecodeGenerator::emitLoad):
      (JSC::BytecodeGenerator::findScopedProperty):
      (JSC::keyForCharacterSwitch):
      (JSC::prepareJumpTableForStringSwitch):
      * bytecompiler/BytecodeGenerator.h:
      * bytecompiler/NodesCodegen.cpp:
      (JSC::processClauseList):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * parser/JSParser.cpp:
      (JSC::JSParser::parseStrictObjectLiteral):
      * pcre/pcre_exec.cpp:
      (Histogram::add):
      * profiler/CallIdentifier.h:
      (JSC::CallIdentifier::Hash::hash):
      * profiler/Profile.cpp:
      * profiler/ProfileNode.cpp:
      (JSC::ProfileNode::debugPrintDataSampleStyle):
      * profiler/ProfileNode.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      * runtime/Identifier.cpp:
      (JSC::Identifier::equal):
      (JSC::IdentifierCStringTranslator::hash):
      (JSC::IdentifierCStringTranslator::equal):
      (JSC::IdentifierCStringTranslator::translate):
      (JSC::Identifier::add):
      (JSC::IdentifierUCharBufferTranslator::hash):
      (JSC::IdentifierUCharBufferTranslator::equal):
      (JSC::IdentifierUCharBufferTranslator::translate):
      (JSC::Identifier::addSlowCase):
      * runtime/Identifier.h:
      (JSC::Identifier::Identifier):
      (JSC::Identifier::ustring):
      (JSC::Identifier::impl):
      (JSC::Identifier::data):
      (JSC::Identifier::size):
      (JSC::Identifier::ascii):
      (JSC::Identifier::isNull):
      (JSC::Identifier::isEmpty):
      (JSC::Identifier::toUInt32):
      (JSC::Identifier::toStrictUInt32):
      (JSC::Identifier::toArrayIndex):
      (JSC::Identifier::toDouble):
      (JSC::Identifier::equal):
      (JSC::Identifier::add):
      * runtime/InitializeThreading.cpp:
      (JSC::initializeThreadingOnce):
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::displayName):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::displayName):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::addStaticGlobals):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.h:
      (JSC::):
      (JSC::RopeBuilder::appendStringInConstruct):
      (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
      (JSC::jsSingleCharacterSubstring):
      (JSC::jsSubstring):
      * runtime/JSVariableObject.cpp:
      (JSC::JSVariableObject::deleteProperty):
      (JSC::JSVariableObject::symbolTableGet):
      * runtime/JSVariableObject.h:
      (JSC::JSVariableObject::symbolTableGet):
      (JSC::JSVariableObject::symbolTablePut):
      (JSC::JSVariableObject::symbolTablePutWithAttributes):
      * runtime/Lookup.cpp:
      (JSC::HashTable::createTable):
      (JSC::HashTable::deleteTable):
      * runtime/Lookup.h:
      (JSC::HashEntry::initialize):
      (JSC::HashEntry::setKey):
      (JSC::HashEntry::key):
      (JSC::HashTable::entry):
      * runtime/PropertyMapHashTable.h:
      (JSC::PropertyMapEntry::PropertyMapEntry):
      * runtime/PropertyNameArray.cpp:
      (JSC::PropertyNameArray::add):
      * runtime/PropertyNameArray.h:
      (JSC::PropertyNameArray::add):
      (JSC::PropertyNameArray::addKnownUnique):
      * runtime/RegExp.cpp:
      (JSC::RegExp::match):
      * runtime/RegExpCache.cpp:
      (JSC::RegExpCache::create):
      * runtime/RegExpKey.h:
      (JSC::RegExpKey::RegExpKey):
      * runtime/SmallStrings.cpp:
      (JSC::SmallStringsStorage::rep):
      (JSC::SmallStrings::singleCharacterStringRep):
      * runtime/SmallStrings.h:
      * runtime/StringPrototype.cpp:
      (JSC::jsSpliceSubstringsWithSeparators):
      (JSC::stringProtoFuncMatch):
      (JSC::stringProtoFuncSearch):
      * runtime/Structure.cpp:
      (JSC::Structure::~Structure):
      (JSC::Structure::despecifyDictionaryFunction):
      (JSC::Structure::addPropertyTransitionToExistingStructure):
      (JSC::Structure::addPropertyTransition):
      (JSC::Structure::copyPropertyTable):
      (JSC::Structure::get):
      (JSC::Structure::despecifyFunction):
      (JSC::Structure::put):
      (JSC::Structure::hasTransition):
      (JSC::Structure::remove):
      (JSC::Structure::checkConsistency):
      * runtime/Structure.h:
      (JSC::Structure::get):
      (JSC::Structure::hasTransition):
      * runtime/StructureTransitionTable.h:
      * runtime/SymbolTable.h:
      * runtime/UString.cpp:
      (JSC::UString::UString):
      (JSC::UString::toStrictUInt32):
      (JSC::UString::substr):
      * runtime/UString.h:
      (JSC::UString::UString):
      (JSC::UString::adopt):
      (JSC::UString::data):
      (JSC::UString::size):
      (JSC::UString::isNull):
      (JSC::UString::isEmpty):
      (JSC::UString::impl):
      (JSC::UString::cost):
      (JSC::operator==):
      (JSC::codePointCompare):
      (JSC::IdentifierRepHash::hash):
      (WTF::):
      
      WebCore: 
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::findAtomicString):
      * bindings/js/JSDOMBinding.h:
      (WebCore::ustringToString):
      (WebCore::identifierToString):
      (WebCore::ustringToAtomicString):
      (WebCore::identifierToAtomicString):
      * bindings/js/SerializedScriptValue.h:
      (WebCore::SerializedScriptValueData::SerializedScriptValueData):
      * bridge/IdentifierRep.cpp:
      (WebCore::IdentifierRep::get):
      * bridge/c/c_class.cpp:
      (JSC::Bindings::CClass::methodsNamed):
      (JSC::Bindings::CClass::fieldNamed):
      * bridge/jni/jsc/JavaClassJSC.cpp:
      (JavaClass::JavaClass):
      (JavaClass::methodsNamed):
      (JavaClass::fieldNamed):
      * bridge/jni/jsc/JavaStringJSC.h:
      (JSC::Bindings::JavaStringImpl::~JavaStringImpl):
      (JSC::Bindings::JavaStringImpl::init):
      (JSC::Bindings::JavaStringImpl::UTF8String):
      (JSC::Bindings::JavaStringImpl::uchars):
      (JSC::Bindings::JavaStringImpl::length):
      (JSC::Bindings::JavaStringImpl::uString):
      * bridge/jsc/BridgeJSC.h:
      
      WebKit/mac: 
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyInstance::methodsNamed):
      (WebKit::ProxyInstance::fieldNamed):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee2085b2
    • barraclough@apple.com's avatar
      Bug 43816 - Remove UStringImpl · 4d95c9ee
      barraclough@apple.com authored
      The class was actually removed a long time ago, replaced by StringImpl.
      UStringImpl is just a typedef onto StringImpl.  Remove this.
      
      JavaScriptCore: 
      
      * API/JSClassRef.cpp:
      (OpaqueJSClass::OpaqueJSClass):
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * runtime/JSString.cpp:
      (JSC::JSString::resolveRope):
      (JSC::JSString::replaceCharacter):
      * runtime/JSString.h:
      (JSC::RopeBuilder::RopeIterator::operator*):
      (JSC::RopeBuilder::JSString):
      (JSC::RopeBuilder::appendStringInConstruct):
      (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
      (JSC::jsSingleCharacterSubstring):
      (JSC::jsSubstring):
      * runtime/JSStringBuilder.h:
      (JSC::jsMakeNontrivialString):
      * runtime/RopeImpl.cpp:
      (JSC::RopeImpl::derefFibersNonRecursive):
      * runtime/RopeImpl.h:
      (JSC::RopeImpl::deref):
      * runtime/SmallStrings.cpp:
      (JSC::SmallStringsStorage::SmallStringsStorage):
      * runtime/StringConstructor.cpp:
      (JSC::stringFromCharCodeSlowCase):
      * runtime/StringPrototype.cpp:
      (JSC::jsSpliceSubstringsWithSeparators):
      (JSC::stringProtoFuncFontsize):
      (JSC::stringProtoFuncLink):
      * runtime/UString.cpp:
      (JSC::initializeUString):
      * runtime/UString.h:
      (JSC::UString::adopt):
      (JSC::tryMakeString):
      (JSC::makeString):
      * runtime/UStringImpl.h: Removed.
      
      WebCore: 
      
      Rubber stamped by Sam Weinig.
      
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::findAtomicString):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d95c9ee
  18. 02 Jul, 2010 1 commit
    • oliver@apple.com's avatar
      2010-07-01 Oliver Hunt <oliver@apple.com> · 6d90ce1b
      oliver@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              Add a FixedArray template to encapsulate fixed length arrays
              https://bugs.webkit.org/show_bug.cgi?id=41506
      
              This new type is used in place of fixed length C arrays so
              that debug builds can guard against attempts to go beyond
              the end of the array.
      
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bytecode/Opcode.cpp:
              (JSC::OpcodeStats::~OpcodeStats):
              * pcre/pcre_compile.cpp:
              (calculateCompiledPatternLength):
              * runtime/Collector.cpp:
              (JSC::Heap::allocateBlock):
              (JSC::Heap::allocate):
              * runtime/Collector.h:
              (JSC::CollectorBitmap::clearAll):
              * runtime/CollectorHeapIterator.h:
              (JSC::CollectorHeapIterator::operator*):
              * runtime/DateInstanceCache.h:
              * runtime/JSString.cpp:
              (JSC::JSString::replaceCharacter):
              * runtime/JSString.h:
              (JSC::RopeBuilder::JSStringFinalizerStruct::):
              * runtime/NumericStrings.h:
              * runtime/RegExpCache.h:
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::singleCharacterStrings):
              * wtf/AVLTree.h:
              * wtf/FixedArray.h: Added.
              (WTF::FixedArray::operator[]):
              (WTF::FixedArray::data):
      2010-07-01  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Maciej Stachowiak.
      
              Add a FixedArray template to encapsulate fixed length arrays
              https://bugs.webkit.org/show_bug.cgi?id=41506
      
              Add forwarding header.
      
              * ForwardingHeaders/wtf/FixedArray.h: Added.
      2010-07-01  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Maciej Stachowiak.
      
              Add a FixedArray template to encapsulate fixed length arrays
              https://bugs.webkit.org/show_bug.cgi?id=41506
      
              Add forwarding header, and replace a few fixed length arrays
              with the new FixedArray type.
      
              * ForwardingHeaders/wtf/FixedArray.h: Added.
              * dom/Document.h:
              * platform/graphics/GlyphMetricsMap.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d90ce1b
  19. 29 May, 2010 1 commit
    • ggaren@apple.com's avatar
      JavaScriptCore: Simplified the host calling convention. · fea29f1e
      ggaren@apple.com authored
              
      Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
      
      22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host
      function calls.
              
      No change on SunSpider.
              
      All JS calls (but not constructs, yet) now go through the normal JS
      calling convention via the RegisterFile. As a result, the host calling
      convention, which used to be this
      
          JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&)
                  
      is now this
      
          JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*)
                  
      Callee, 'this', and argument access all hapen relative to the ExecState*,
      which is a pointer into the RegisterFile.
              
      This patch comes in two parts.
              
      PART ONE: Functional code changes.
              
      * wtf/Platform.h: Disabled optimized calls on platforms I didn't test.
      We can re-enable once we verify that host calls on these platforms are
      correct.
      
      * debugger/DebuggerCallFrame.cpp:
      (JSC::DebuggerCallFrame::functionName):
      (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to
      ExecState::callee().
      
      (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue().
      
      * interpreter/CallFrame.cpp:
      * interpreter/CallFrame.h:
      (JSC::ExecState::callee):
      (JSC::ExecState::scopeChain):
      (JSC::ExecState::init): Changed callee() to be JSObject* instead of
      JSFunction* -- now, it might be some other callable host object.
      
      (JSC::ExecState::hostThisRegister):
      (JSC::ExecState::hostThisValue):
      (JSC::ExecState::argumentCount):
      (JSC::ExecState::argumentCountIncludingThis):
      (JSC::ExecState::argument):
      (JSC::ExecState::setArgumentCountIncludingThis):
      (JSC::ExecState::setCallee): Added convenient accessors for arguments
      from within a host function. Removed thisValue() because it was too
      tempting to use incorrectly, and it only had one or two clients, anyway.
      
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue().
      
      (JSC::Interpreter::throwException): Be sure to shrink the register file
      before invoking the exception handler, to reduce the chances that the
      handler will re-throw in the case of stack overflow. (Re-throwing is now
      more likely than it used to be, since standardizing the calling convention
      implicitly added stack overflow checks to some places where they used to be missing.)
      
      (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope.
      Updated for CallFrame::init API change.
      
      (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope.
      Updated for CallFrame::init API change. Added support for calling a host
      function.
      
      (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope.
      Updated for CallFrame::init API change. 
      
      (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change. 
      
      (JSC::Interpreter::privateExecute): Updated for CallFrame::init API change.
      Added some explicit JSValue(JSObject*) initialization, since relaxing
      the JSFunction* restriction on callee has made register types more ambiguous.
      Removed toThisObject() conversion, since all callees do it themselves now.
      Updated host function call for new host function signature. Updated for
      change to ExecState::argumentCount() API.
      
      * interpreter/Register.h:
      (JSC::Register::):
      (JSC::Register::operator=):
      (JSC::Register::function): Changed callee() to be JSObject* instead of
      JSFunction* -- now, it might be some other callable host object.
      
      * jit/JITOpcodes.cpp:
      (JSC::JIT::privateCompileCTINativeCall):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that
      set up the arguments to host functions -- all but one of the arguments
      are gone now. This is the actual optimization.
      
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API
      changes noted above. Removed toThisObject() conversion, since all callees
      do it themselves now.
              
      * runtime/ArgList.h:
      (JSC::ArgList::ArgList): ArgList is getting close to unused. Added a
      temporary shim for converting from ExecState* to ArgList where it's still
      necessary.
      
      * runtime/Arguments.h:
      (JSC::Arguments::getArgumentsData):
      (JSC::Arguments::Arguments): Updated for ExecState and Register API
      changes noted above. 
      
      * runtime/CallData.cpp:
      (JSC::call): Changed call always to call Interpreter::executeCall, even
      for host functions. This ensures that the normal calling convention is
      set up in the RegsiterFile when calling from C++ to host function.
      
      * runtime/CallData.h: Changed host function signature as described above.
      
      * runtime/ConstructData.cpp:
      (JSC::construct): Moved JSFunction::construct code here so I could nix
      JSFunction::call and JSFunction::call. We want a JSFunction-agnostic
      way to call and construct, so that everything works naturally for non-
      JSFunction objects. 
      
      * runtime/JSFunction.cpp:
      (JSC::callHostFunctionAsConstructor):
      * runtime/JSFunction.h: Updated for ExecState and Register API changes
      noted above. Nixed JSFunction::call and JSFunction::construct, noted above.
       
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::init): Ditto.
      
      PART TWO: Global search and replace.
              
      In the areas below, I used global search-and-replace to change
          (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
          args.size() => exec->argumentCount()
          args.at(i) => exec->argument(i)
      
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::call):
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::call):
      * JavaScriptCore.exp:
      * jsc.cpp:
      (functionPrint):
      (functionDebug):
      (functionGC):
      (functionVersion):
      (functionRun):
      (functionLoad):
      (functionCheckSyntax):
      (functionSetSamplingFlags):
      (functionClearSamplingFlags):
      (functionReadline):
      (functionQuit):
      * runtime/ArrayConstructor.cpp:
      (JSC::callArrayConstructor):
      (JSC::arrayConstructorIsArray):
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      (JSC::arrayProtoFuncToLocaleString):
      (JSC::arrayProtoFuncJoin):
      (JSC::arrayProtoFuncConcat):
      (JSC::arrayProtoFuncPop):
      (JSC::arrayProtoFuncPush):
      (JSC::arrayProtoFuncReverse):
      (JSC::arrayProtoFuncShift):
      (JSC::arrayProtoFuncSlice):
      (JSC::arrayProtoFuncSort):
      (JSC::arrayProtoFuncSplice):
      (JSC::arrayProtoFuncUnShift):
      (JSC::arrayProtoFuncFilter):
      (JSC::arrayProtoFuncMap):
      (JSC::arrayProtoFuncEvery):
      (JSC::arrayProtoFuncForEach):
      (JSC::arrayProtoFuncSome):
      (JSC::arrayProtoFuncReduce):
      (JSC::arrayProtoFuncReduceRight):
      (JSC::arrayProtoFuncIndexOf):
      (JSC::arrayProtoFuncLastIndexOf):
      * runtime/BooleanConstructor.cpp:
      (JSC::callBooleanConstructor):
      * runtime/BooleanPrototype.cpp:
      (JSC::booleanProtoFuncToString):
      (JSC::booleanProtoFuncValueOf):
      * runtime/DateConstructor.cpp:
      (JSC::callDate):
      (JSC::dateParse):
      (JSC::dateNow):
      (JSC::dateUTC):
      * runtime/DatePrototype.cpp:
      (JSC::formatLocaleDate):
      (JSC::fillStructuresUsingTimeArgs):
      (JSC::fillStructuresUsingDateArgs):
      (JSC::dateProtoFuncToString):
      (JSC::dateProtoFuncToUTCString):
      (JSC::dateProtoFuncToISOString):
      (JSC::dateProtoFuncToDateString):
      (JSC::dateProtoFuncToTimeString):
      (JSC::dateProtoFuncToLocaleString):
      (JSC::dateProtoFuncToLocaleDateString):
      (JSC::dateProtoFuncToLocaleTimeString):
      (JSC::dateProtoFuncGetTime):
      (JSC::dateProtoFuncGetFullYear):
      (JSC::dateProtoFuncGetUTCFullYear):
      (JSC::dateProtoFuncToGMTString):
      (JSC::dateProtoFuncGetMonth):
      (JSC::dateProtoFuncGetUTCMonth):
      (JSC::dateProtoFuncGetDate):
      (JSC::dateProtoFuncGetUTCDate):
      (JSC::dateProtoFuncGetDay):
      (JSC::dateProtoFuncGetUTCDay):
      (JSC::dateProtoFuncGetHours):
      (JSC::dateProtoFuncGetUTCHours):
      (JSC::dateProtoFuncGetMinutes):
      (JSC::dateProtoFuncGetUTCMinutes):
      (JSC::dateProtoFuncGetSeconds):
      (JSC::dateProtoFuncGetUTCSeconds):
      (JSC::dateProtoFuncGetMilliSeconds):
      (JSC::dateProtoFuncGetUTCMilliseconds):
      (JSC::dateProtoFuncGetTimezoneOffset):
      (JSC::dateProtoFuncSetTime):
      (JSC::setNewValueFromTimeArgs):
      (JSC::setNewValueFromDateArgs):
      (JSC::dateProtoFuncSetMilliSeconds):
      (JSC::dateProtoFuncSetUTCMilliseconds):
      (JSC::dateProtoFuncSetSeconds):
      (JSC::dateProtoFuncSetUTCSeconds):
      (JSC::dateProtoFuncSetMinutes):
      (JSC::dateProtoFuncSetUTCMinutes):
      (JSC::dateProtoFuncSetHours):
      (JSC::dateProtoFuncSetUTCHours):
      (JSC::dateProtoFuncSetDate):
      (JSC::dateProtoFuncSetUTCDate):
      (JSC::dateProtoFuncSetMonth):
      (JSC::dateProtoFuncSetUTCMonth):
      (JSC::dateProtoFuncSetFullYear):
      (JSC::dateProtoFuncSetUTCFullYear):
      (JSC::dateProtoFuncSetYear):
      (JSC::dateProtoFuncGetYear):
      (JSC::dateProtoFuncToJSON):
      * runtime/ErrorConstructor.cpp:
      (JSC::callErrorConstructor):
      * runtime/ErrorPrototype.cpp:
      (JSC::errorProtoFuncToString):
      * runtime/FunctionConstructor.cpp:
      (JSC::callFunctionConstructor):
      * runtime/FunctionPrototype.cpp:
      (JSC::callFunctionPrototype):
      (JSC::functionProtoFuncToString):
      (JSC::functionProtoFuncApply):
      (JSC::functionProtoFuncCall):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::encode):
      (JSC::decode):
      (JSC::globalFuncEval):
      (JSC::globalFuncParseInt):
      (JSC::globalFuncParseFloat):
      (JSC::globalFuncIsNaN):
      (JSC::globalFuncIsFinite):
      (JSC::globalFuncDecodeURI):
      (JSC::globalFuncDecodeURIComponent):
      (JSC::globalFuncEncodeURI):
      (JSC::globalFuncEncodeURIComponent):
      (JSC::globalFuncEscape):
      (JSC::globalFuncUnescape):
      (JSC::globalFuncJSCPrint):
      * runtime/JSGlobalObjectFunctions.h:
      * runtime/JSONObject.cpp:
      (JSC::JSONProtoFuncParse):
      (JSC::JSONProtoFuncStringify):
      * runtime/JSString.h:
      * runtime/MathObject.cpp:
      (JSC::mathProtoFuncAbs):
      (JSC::mathProtoFuncACos):
      (JSC::mathProtoFuncASin):
      (JSC::mathProtoFuncATan):
      (JSC::mathProtoFuncATan2):
      (JSC::mathProtoFuncCeil):
      (JSC::mathProtoFuncCos):
      (JSC::mathProtoFuncExp):
      (JSC::mathProtoFuncFloor):
      (JSC::mathProtoFuncLog):
      (JSC::mathProtoFuncMax):
      (JSC::mathProtoFuncMin):
      (JSC::mathProtoFuncPow):
      (JSC::mathProtoFuncRandom):
      (JSC::mathProtoFuncRound):
      (JSC::mathProtoFuncSin):
      (JSC::mathProtoFuncSqrt):
      (JSC::mathProtoFuncTan):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::callNativeErrorConstructor):
      * runtime/NumberConstructor.cpp:
      (JSC::callNumberConstructor):
      * runtime/NumberPrototype.cpp:
      (JSC::numberProtoFuncToString):
      (JSC::numberProtoFuncToLocaleString):
      (JSC::numberProtoFuncValueOf):
      (JSC::numberProtoFuncToFixed):
      (JSC::numberProtoFuncToExponential):
      (JSC::numberProtoFuncToPrecision):
      * runtime/ObjectConstructor.cpp:
      (JSC::callObjectConstructor):
      (JSC::objectConstructorGetPrototypeOf):
      (JSC::objectConstructorGetOwnPropertyDescriptor):
      (JSC::objectConstructorGetOwnPropertyNames):
      (JSC::objectConstructorKeys):
      (JSC::objectConstructorDefineProperty):
      (JSC::objectConstructorDefineProperties):
      (JSC::objectConstructorCreate):
      * runtime/ObjectPrototype.cpp:
      (JSC::objectProtoFuncValueOf):
      (JSC::objectProtoFuncHasOwnProperty):
      (JSC::objectProtoFuncIsPrototypeOf):
      (JSC::objectProtoFuncDefineGetter):
      (JSC::objectProtoFuncDefineSetter):
      (JSC::objectProtoFuncLookupGetter):
      (JSC::objectProtoFuncLookupSetter):
      (JSC::objectProtoFuncPropertyIsEnumerable):
      (JSC::objectProtoFuncToLocaleString):
      (JSC::objectProtoFuncToString):
      * runtime/ObjectPrototype.h:
      * runtime/Operations.h:
      (JSC::jsString):
      * runtime/RegExpConstructor.cpp:
      (JSC::callRegExpConstructor):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::test):
      (JSC::RegExpObject::exec):
      (JSC::callRegExpObject):
      (JSC::RegExpObject::match):
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      (JSC::regExpProtoFuncTest):
      (JSC::regExpProtoFuncExec):
      (JSC::regExpProtoFuncCompile):
      (JSC::regExpProtoFuncToString):
      * runtime/StringConstructor.cpp:
      (JSC::stringFromCharCodeSlowCase):
      (JSC::stringFromCharCode):
      (JSC::callStringConstructor):
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncReplace):
      (JSC::stringProtoFuncToString):
      (JSC::stringProtoFuncCharAt):
      (JSC::stringProtoFuncCharCodeAt):
      (JSC::stringProtoFuncConcat):
      (JSC::stringProtoFuncIndexOf):
      (JSC::stringProtoFuncLastIndexOf):
      (JSC::stringProtoFuncMatch):
      (JSC::stringProtoFuncSearch):
      (JSC::stringProtoFuncSlice):
      (JSC::stringProtoFuncSplit):
      (JSC::stringProtoFuncSubstr):
      (JSC::stringProtoFuncSubstring):
      (JSC::stringProtoFuncToLowerCase):
      (JSC::stringProtoFuncToUpperCase):
      (JSC::stringProtoFuncLocaleCompare):
      (JSC::stringProtoFuncBig):
      (JSC::stringProtoFuncSmall):
      (JSC::stringProtoFuncBlink):
      (JSC::stringProtoFuncBold):
      (JSC::stringProtoFuncFixed):
      (JSC::stringProtoFuncItalics):
      (JSC::stringProtoFuncStrike):
      (JSC::stringProtoFuncSub):
      (JSC::stringProtoFuncSup):
      (JSC::stringProtoFuncFontcolor):
      (JSC::stringProtoFuncFontsize):
      (JSC::stringProtoFuncAnchor):
      (JSC::stringProtoFuncLink):
      (JSC::stringProtoFuncTrim):
      (JSC::stringProtoFuncTrimLeft):
      (JSC::stringProtoFuncTrimRight):
      
      JavaScriptGlue: Simplified the host calling convention.
      
      Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
      
      PART ONE: Functional code changes.
              
      [ None in JavaScriptGlue ]
              
      PART TWO: Global search and replace.
              
      In the areas below, I used global search-and-replace to change
          (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
          args.size() => exec->argumentCount()
          args.at(i) => exec->argument(i)
      
      * JSObject.cpp:
      (nativeCallFunction):
      * UserObjectImp.cpp:
      (UserObjectImp::callAsFunction):
      * UserObjectImp.h:
      
      WebCore: Simplified the host calling convention.
      
      Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
      
      PART ONE: Functional code changes.
              
      [ None in WebCore ]
              
      PART TWO: Global search and replace.
              
      In the areas below, I used global search-and-replace to change
          (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
          args.size() => exec->argumentCount()
          args.at(i) => exec->argument(i)
      
      * bindings/js/JSArrayBufferViewCustom.cpp:
      (WebCore::JSArrayBufferView::slice):
      * bindings/js/JSArrayBufferViewHelper.h:
      (WebCore::setWebGLArrayHelper):
      * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
      (WebCore::JSCanvasRenderingContext2D::setFillColor):
      (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
      (WebCore::JSCanvasRenderingContext2D::strokeRect):
      (WebCore::JSCanvasRenderingContext2D::drawImage):
      (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
      (WebCore::JSCanvasRenderingContext2D::setShadow):
      (WebCore::JSCanvasRenderingContext2D::createPattern):
      (WebCore::JSCanvasRenderingContext2D::createImageData):
      (WebCore::JSCanvasRenderingContext2D::putImageData):
      (WebCore::JSCanvasRenderingContext2D::fillText):
      (WebCore::JSCanvasRenderingContext2D::strokeText):
      * bindings/js/JSClipboardCustom.cpp:
      (WebCore::JSClipboard::clearData):
      (WebCore::JSClipboard::getData):
      (WebCore::JSClipboard::setDragImage):
      * bindings/js/JSDOMApplicationCacheCustom.cpp:
      (WebCore::JSDOMApplicationCache::hasItem):
      (WebCore::JSDOMApplicationCache::add):
      (WebCore::JSDOMApplicationCache::remove):
      * bindings/js/JSDOMFormDataCustom.cpp:
      (WebCore::JSDOMFormData::append):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::open):
      (WebCore::JSDOMWindow::showModalDialog):
      (WebCore::JSDOMWindow::postMessage):
      (WebCore::JSDOMWindow::setTimeout):
      (WebCore::JSDOMWindow::setInterval):
      (WebCore::JSDOMWindow::addEventListener):
      (WebCore::JSDOMWindow::removeEventListener):
      (WebCore::JSDOMWindow::openDatabase):
      * bindings/js/JSDatabaseCustom.cpp:
      (WebCore::JSDatabase::changeVersion):
      (WebCore::createTransaction):
      (WebCore::JSDatabase::transaction):
      (WebCore::JSDatabase::readTransaction):
      * bindings/js/JSDatabaseSyncCustom.cpp:
      (WebCore::JSDatabaseSync::changeVersion):
      (WebCore::createTransaction):
      (WebCore::JSDatabaseSync::transaction):
      (WebCore::JSDatabaseSync::readTransaction):
      * bindings/js/JSDedicatedWorkerContextCustom.cpp:
      (WebCore::JSDedicatedWorkerContext::postMessage):
      * bindings/js/JSDesktopNotificationsCustom.cpp:
      (WebCore::JSNotificationCenter::requestPermission):
      * bindings/js/JSFloatArrayCustom.cpp:
      (WebCore::JSFloatArray::set):
      * bindings/js/JSGeolocationCustom.cpp:
      (WebCore::JSGeolocation::getCurrentPosition):
      (WebCore::JSGeolocation::watchPosition):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      (WebCore::callHTMLAllCollection):
      (WebCore::JSHTMLAllCollection::item):
      (WebCore::JSHTMLAllCollection::namedItem):
      * bindings/js/JSHTMLCanvasElementCustom.cpp:
      (WebCore::JSHTMLCanvasElement::getContext):
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::callHTMLCollection):
      (WebCore::JSHTMLCollection::item):
      (WebCore::JSHTMLCollection::namedItem):
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::JSHTMLDocument::open):
      (WebCore::documentWrite):
      (WebCore::JSHTMLDocument::write):
      (WebCore::JSHTMLDocument::writeln):
      * bindings/js/JSHTMLInputElementCustom.cpp:
      (WebCore::JSHTMLInputElement::setSelectionRange):
      * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
      (WebCore::JSHTMLOptionsCollection::add):
      (WebCore::JSHTMLOptionsCollection::remove):
      * bindings/js/JSHTMLSelectElementCustom.cpp:
      (WebCore::JSHTMLSelectElement::remove):
      * bindings/js/JSHistoryCustom.cpp:
      (WebCore::JSHistory::pushState):
      (WebCore::JSHistory::replaceState):
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::JSInjectedScriptHost::databaseForId):
      (WebCore::JSInjectedScriptHost::currentCallFrame):
      (WebCore::JSInjectedScriptHost::nodeForId):
      (WebCore::JSInjectedScriptHost::pushNodePathToFrontend):
      (WebCore::JSInjectedScriptHost::selectDatabase):
      (WebCore::JSInjectedScriptHost::selectDOMStorage):
      (WebCore::JSInjectedScriptHost::reportDidDispatchOnInjectedScript):
      * bindings/js/JSInspectorFrontendHostCustom.cpp:
      (WebCore::JSInspectorFrontendHost::platform):
      (WebCore::JSInspectorFrontendHost::port):
      (WebCore::JSInspectorFrontendHost::showContextMenu):
      * bindings/js/JSInt16ArrayCustom.cpp:
      (WebCore::JSInt16Array::set):
      * bindings/js/JSInt32ArrayCustom.cpp:
      (WebCore::JSInt32Array::set):
      * bindings/js/JSInt8ArrayCustom.cpp:
      (WebCore::JSInt8Array::set):
      * bindings/js/JSJavaScriptCallFrameCustom.cpp:
      (WebCore::JSJavaScriptCallFrame::evaluate):
      (WebCore::JSJavaScriptCallFrame::scopeType):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::replace):
      (WebCore::JSLocation::reload):
      (WebCore::JSLocation::assign):
      (WebCore::JSLocation::toString):
      * bindings/js/JSMessageEventCustom.cpp:
      (WebCore::JSMessageEvent::initMessageEvent):
      * bindings/js/JSMessagePortCustom.cpp:
      (WebCore::JSMessagePort::postMessage):
      * bindings/js/JSMessagePortCustom.h:
      (WebCore::handlePostMessage):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::insertBefore):
      (WebCore::JSNode::replaceChild):
      (WebCore::JSNode::removeChild):
      (WebCore::JSNode::appendChild):
      * bindings/js/JSNodeListCustom.cpp:
      (WebCore::callNodeList):
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::callPlugin):
      * bindings/js/JSSQLResultSetRowListCustom.cpp:
      (WebCore::JSSQLResultSetRowList::item):
      * bindings/js/JSSQLTransactionCustom.cpp:
      (WebCore::JSSQLTransaction::executeSql):
      * bindings/js/JSSQLTransactionSyncCustom.cpp:
      (WebCore::JSSQLTransactionSync::executeSql):
      * bindings/js/JSSVGLengthCustom.cpp:
      (WebCore::JSSVGLength::convertToSpecifiedUnits):
      * bindings/js/JSSVGMatrixCustom.cpp:
      (WebCore::JSSVGMatrix::multiply):
      (WebCore::JSSVGMatrix::inverse):
      (WebCore::JSSVGMatrix::rotateFromVector):
      * bindings/js/JSSVGPODListCustom.h:
      (WebCore::JSSVGPODListCustom::clear):
      (WebCore::JSSVGPODListCustom::initialize):
      (WebCore::JSSVGPODListCustom::getItem):
      (WebCore::JSSVGPODListCustom::insertItemBefore):
      (WebCore::JSSVGPODListCustom::replaceItem):
      (WebCore::JSSVGPODListCustom::removeItem):
      (WebCore::JSSVGPODListCustom::appendItem):
      * bindings/js/JSSVGPathSegListCustom.cpp:
      (WebCore::JSSVGPathSegList::clear):
      (WebCore::JSSVGPathSegList::initialize):
      (WebCore::JSSVGPathSegList::getItem):
      (WebCore::JSSVGPathSegList::insertItemBefore):
      (WebCore::JSSVGPathSegList::replaceItem):
      (WebCore::JSSVGPathSegList::removeItem):
      (WebCore::JSSVGPathSegList::appendItem):
      * bindings/js/JSUint16ArrayCustom.cpp:
      (WebCore::JSUint16Array::set):
      * bindings/js/JSUint32ArrayCustom.cpp:
      (WebCore::JSUint32Array::set):
      * bindings/js/JSUint8ArrayCustom.cpp:
      (WebCore::JSUint8Array::set):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::JSWebGLRenderingContext::bufferData):
      (WebCore::JSWebGLRenderingContext::bufferSubData):
      (WebCore::getObjectParameter):
      (WebCore::JSWebGLRenderingContext::getBufferParameter):
      (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
      (WebCore::JSWebGLRenderingContext::getParameter):
      (WebCore::JSWebGLRenderingContext::getProgramParameter):
      (WebCore::JSWebGLRenderingContext::getRenderbufferParameter):
      (WebCore::JSWebGLRenderingContext::getShaderParameter):
      (WebCore::JSWebGLRenderingContext::getTexParameter):
      (WebCore::JSWebGLRenderingContext::getUniform):
      (WebCore::JSWebGLRenderingContext::getVertexAttrib):
      (WebCore::JSWebGLRenderingContext::texImage2D):
      (WebCore::JSWebGLRenderingContext::texSubImage2D):
      (WebCore::dataFunctionf):
      (WebCore::dataFunctioni):
      (WebCore::dataFunctionMatrix):
      (WebCore::JSWebGLRenderingContext::uniform1fv):
      (WebCore::JSWebGLRenderingContext::uniform1iv):
      (WebCore::JSWebGLRenderingContext::uniform2fv):
      (WebCore::JSWebGLRenderingContext::uniform2iv):
      (WebCore::JSWebGLRenderingContext::uniform3fv):
      (WebCore::JSWebGLRenderingContext::uniform3iv):
      (WebCore::JSWebGLRenderingContext::uniform4fv):
      (WebCore::JSWebGLRenderingContext::uniform4iv):
      (WebCore::JSWebGLRenderingContext::uniformMatrix2fv):
      (WebCore::JSWebGLRenderingContext::uniformMatrix3fv):
      (WebCore::JSWebGLRenderingContext::uniformMatrix4fv):
      (WebCore::JSWebGLRenderingContext::vertexAttrib1fv):
      (WebCore::JSWebGLRenderingContext::vertexAttrib2fv):
      (WebCore::JSWebGLRenderingContext::vertexAttrib3fv):
      (WebCore::JSWebGLRenderingContext::vertexAttrib4fv):
      * bindings/js/JSWebSocketCustom.cpp:
      (WebCore::JSWebSocket::send):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::importScripts):
      (WebCore::JSWorkerContext::setTimeout):
      (WebCore::JSWorkerContext::setInterval):
      (WebCore::JSWorkerContext::openDatabase):
      (WebCore::JSWorkerContext::openDatabaseSync):
      * bindings/js/JSWorkerCustom.cpp:
      (WebCore::JSWorker::postMessage):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::open):
      (WebCore::JSXMLHttpRequest::send):
      * bindings/js/JSXSLTProcessorCustom.cpp:
      (WebCore::JSXSLTProcessor::importStylesheet):
      (WebCore::JSXSLTProcessor::transformToFragment):
      (WebCore::JSXSLTProcessor::transformToDocument):
      (WebCore::JSXSLTProcessor::setParameter):
      (WebCore::JSXSLTProcessor::getParameter):
      (WebCore::JSXSLTProcessor::removeParameter):
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::create):
      (WebCore::ScheduledAction::ScheduledAction):
      * bindings/js/ScheduledAction.h:
      * bindings/js/ScriptCallFrame.cpp:
      (WebCore::ScriptCallFrame::ScriptCallFrame):
      * bindings/js/ScriptCallFrame.h:
      * bindings/js/ScriptCallStack.cpp:
      (WebCore::ScriptCallStack::ScriptCallStack):
      (WebCore::ScriptCallStack::initialize):
      * bindings/js/ScriptCallStack.h:
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CInstance::invokeMethod):
      (JSC::Bindings::CInstance::invokeDefaultMethod):
      * bridge/c/c_instance.h:
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaInstance::invokeMethod):
      * bridge/jni/jsc/JavaInstanceJSC.h:
      * bridge/jsc/BridgeJSC.h:
      (JSC::Bindings::Instance::invokeDefaultMethod):
      * bridge/objc/objc_instance.h:
      * bridge/objc/objc_instance.mm:
      (ObjcInstance::invokeMethod):
      (ObjcInstance::invokeObjcMethod):
      (ObjcInstance::invokeDefaultMethod):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::callObjCFallbackObject):
      * bridge/runtime_method.cpp:
      (JSC::callRuntimeMethod):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::callRuntimeObject):
      
      WebKit/mac: Simplified the host calling convention.
      
      Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
      
      PART ONE: Functional code changes.
              
      [ None in WebKit ]
              
      PART TWO: Global search and replace.
              
      In the areas below, I used global search-and-replace to change
          (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
          args.size() => exec->argumentCount()
          args.at(i) => exec->argument(i)
      
      * Plugins/Hosted/ProxyInstance.h:
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyInstance::invoke):
      (WebKit::ProxyInstance::invokeMethod):
      (WebKit::ProxyInstance::invokeDefaultMethod):
      
      LayoutTests: Simplified the host calling convention.
      
      Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
      
      Changed these results to expect to fail to stringify their exception
      objects in the case of stack overflow. (Standardizing the calling
      convention has implicitly added stack overflow checks to some places
      where they used to be missing.)
              
      In a future patch, I plan to implement a more reliable way to stringify
      exceptions without invoking a JS function. For now, though, it seems best
      to match other test results, instead of silently overflowing the stack.
      
      * fast/js/global-recursion-on-full-stack-expected.txt:
      * fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fea29f1e
  20. 21 May, 2010 1 commit
  21. 11 May, 2010 1 commit
    • ggaren@apple.com's avatar
      Start using ropes in String.prototype.replace. · a584a55f
      ggaren@apple.com authored
              
      Reviewed by Oliver Hunt and Darin Adler.
      
      1%-1.5% speedup on SunSpider.
      
      * runtime/JSString.cpp:
      (JSC::JSString::resolveRope): Updated for RopeImpl refactoring.
      
      (JSC::JSString::replaceCharacter): Added a replaceCharacter function, which creates
      a rope for the resulting replacement.
      
      * runtime/JSString.h: A few changes here:
      (JSC::):
      (JSC::RopeBuilder::RopeIterator::RopeIterator):
      (JSC::RopeBuilder::RopeIterator::operator++):
      (JSC::RopeBuilder::RopeIterator::operator*):
      (JSC::RopeBuilder::RopeIterator::operator!=):
      (JSC::RopeBuilder::RopeIterator::WorkItem::WorkItem):
      (JSC::RopeBuilder::RopeIterator::WorkItem::operator!=):
      (JSC::RopeBuilder::RopeIterator::skipRopes): Created a RopeIterator abstraction.
      We use this to do a substring find without having to resolve the rope.
      (We could use this iterator when resolving ropes, too, but resolving
      ropes backwards is usually more efficient.)
      
      (JSC::RopeBuilder::JSString): Added constructors for 2 & 3 UStrings.
      
      (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
      (JSC::RopeBuilder::size): Updated for RopeImpl refactoring.
      
      * runtime/Operations.h: Updated for RopeImpl refactoring.
      (JSC::jsString): Added jsString functions for 2 & 3 UStrings.
      
      * runtime/RopeImpl.cpp:
      (JSC::RopeImpl::derefFibersNonRecursive):
      * runtime/RopeImpl.h:
      (JSC::RopeImpl::initializeFiber):
      (JSC::RopeImpl::size):
      (JSC::RopeImpl::fibers):
      (JSC::RopeImpl::deref):
      (JSC::RopeImpl::RopeImpl): A little refactoring to make this patch easier:
      Moved statics to the top of the class; put multi-statement functions on
      multiple lines; renamed "fiberCount" to "size" to match other collections;
      changed the "fibers" accessor to return the fibers buffer, instead of an
      item in the buffer, to make iteration easier.
      
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncReplace): Don't resolve a rope unless we need to. Do
      use our new replaceCharacter function if possible. Do use a rope to
      represent splicing three strings together.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a584a55f
  22. 26 Apr, 2010 1 commit
    • oliver@apple.com's avatar
      2010-04-26 Oliver Hunt <oliver@apple.com> · 8e293b78
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Need to support more efficient dispatch of lightweight builtins
              https://bugs.webkit.org/show_bug.cgi?id=38155
      
              The problem with calling lightweight builtins is that marshalling
              the call from the nitro calling convention to the system calling
              convention is very expensive relative to the cost of the actually
              evaluating the function.  To work around this problem this patch
              adds the ability to define a custom thunk for a builtin.
      
              This allows us to use high performance custom implementations of
              the common and sensible versions of simple builtins.  This patch
              includes a simple (use of which is currently hardcoded) thunk for
              charCodeAt.
      
              This adds a JSInterfaceJIT subclass called SpecializedThunkJIT
              that has helper functions to remove (or at least reduce) the need
              to have separate thunk implementations for each JSValue encoding.
      
              * GNUmakefile.am:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
                Many project file updates
      
              * create_hash_table:
                Add thunk generation callbacks to the hash tables, currently
                we hardcode the script to only support charCodeAt
      
              * jit/JITStubCall.h:
              * jit/JITStubs.cpp:
              (JSC::JITThunks::~JITThunks):
              (JSC::JITThunks::specializedThunk):
              * jit/JITStubs.h:
              * jit/SpecializedThunkJIT.h: Added.
              (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
              (JSC::SpecializedThunkJIT::loadCellArgument):
              (JSC::SpecializedThunkJIT::loadJSStringArgument):
              (JSC::SpecializedThunkJIT::loadInt32Argument):
              (JSC::SpecializedThunkJIT::appendFailure):
              (JSC::SpecializedThunkJIT::returnInt32):
              (JSC::SpecializedThunkJIT::finalize):
              (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
              (JSC::SpecializedThunkJIT::tagReturnAsInt32):
              * jit/ThunkGenerators.cpp: Added.
              (JSC::ThunkHelpers::stringImplDataOffset):
              (JSC::ThunkHelpers::jsStringLengthOffset):
              (JSC::ThunkHelpers::jsStringValueOffset):
              (JSC::charCodeAtThunkGenerator):
              * jit/ThunkGenerators.h: Added.
              * runtime/Executable.h:
              (JSC::NativeExecutable::NativeExecutable):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              * runtime/JSFunction.h:
              * runtime/JSGlobalData.h:
              (JSC::JSGlobalData::getThunk):
              * runtime/JSString.h:
              (JSC::):
              * runtime/JSValue.h:
                Protect some of the JSVALUE32 and JSVALUE32_64 only constants
                and function behind appropriate USE() guards to make it harder
                to use the wrong flags for the target build.
              * runtime/Lookup.cpp:
              (JSC::HashTable::createTable):
              (JSC::setUpStaticFunctionSlot):
              * runtime/Lookup.h:
              (JSC::HashEntry::initialize):
              (JSC::HashEntry::generator):
              (JSC::HashEntry::):
                Make the lookup tables use a specialized thunkGenerator
                if present
              * wtf/text/StringImpl.h:
      2010-04-26  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Need to support more efficient dispatch of lightweight builtins
              https://bugs.webkit.org/show_bug.cgi?id=38155
      
              Update bindings generation to include new thunk generator field
              in the property map hash tables.
      
              * bindings/scripts/CodeGeneratorJS.pm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e293b78
  23. 20 Apr, 2010 1 commit
  24. 04 Apr, 2010 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=37068 · 4f76aacd
      barraclough@apple.com authored
      Change UString to use a 0 rep for null strings instead of a null object.
      
      Reviewed by Oliver Hunt.
      
      No performance impact.
      
      * JavaScriptCore.exp:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/JSString.h:
      (JSC::RopeBuilder::JSString):
      * runtime/UString.cpp:
      (JSC::initializeUString):
      * runtime/UString.h:
      (JSC::UString::UString):
      (JSC::UString::data):
      (JSC::UString::size):
      (JSC::UString::isNull):
      (JSC::UString::isEmpty):
      (JSC::UString::cost):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4f76aacd
  25. 02 Apr, 2010 1 commit
  26. 15 Mar, 2010 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=35843 · 21b33493
      barraclough@apple.com authored
      Re-land reverted fix to JSString::getIndex()
      
      Reviewed by Sam Weinig.
      
      Calling getIndex() on a JSString in rope form may result in a JSException being thrown
      if there is insuficient memory so value(exec) returns UString() with length zero,
      which will be passed to jsSingleCharacterSubstring.
      Add a slow case function to trap the error & return a safe null value, until the
      exception is handled.
      
      * runtime/JSString.cpp:
      (JSC::JSString::getIndexSlowCase):
      (JSC::JSString::getStringPropertyDescriptor):
      * runtime/JSString.h:
      (JSC::jsSingleCharacterSubstring):
      (JSC::JSString::getIndex):
      (JSC::jsSingleCharacterString):
      (JSC::JSString::getStringPropertySlot):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21b33493
  27. 08 Mar, 2010 1 commit
  28. 19 Feb, 2010 1 commit
    • barraclough@apple.com's avatar
      JSString::getIndex() calls value() to resolve the string value (is a rope) · 5001518b
      barraclough@apple.com authored
      to a UString, then passes the result to jsSingleCharacterSubstring without
      checking for an exception.  In case of out-of-memory the returned UString
      is null(), which may result in an out-of-buounds substring being created.
      This is bad.
      
      Reviewed by Oliver Hunt.
      
      Simple fix is to be able to get an index from a rope without resolving to
      UString.  This may be a useful optimization in some test cases.
      
      The same bug exists in some other methods is JSString, these can be fixed
      by changing them to call getIndex().
      
      * runtime/JSString.cpp:
      (JSC::JSString::resolveRope):
      (JSC::JSString::getStringPropertyDescriptor):
      * runtime/JSString.h:
      (JSC::jsSingleCharacterSubstring):
      (JSC::JSString::getIndex):
      (JSC::jsSingleCharacterString):
      (JSC::JSString::getStringPropertySlot):
      * runtime/UStringImpl.cpp:
      (JSC::singleCharacterSubstring):
      * runtime/UStringImpl.h:
      (JSC::UStringImpl::singleCharacterSubstring):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5001518b
  29. 17 Feb, 2010 1 commit
  30. 16 Feb, 2010 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=34964 · 2b3ed85e
      barraclough@apple.com authored
      Leaks tool reports false memory leaks due to Rope implementation.
      
      Reviewed by Oliver Hunt.
      
      JavaScriptCore: 
      
      A rope is a recursive data structure where each node in the rope holds a set of
      pointers, each of which may reference either a string (in UStringImpl form) or
      another rope node.  A low bit in each pointer is used to distinguish between
      rope & string elements, in a fashion similar to the recently-removed
      PtrAndFlags class (see https://bugs.webkit.org/show_bug.cgi?id=33731 ).  Again,
      this causes a problem for Leaks – refactor to remove the magic pointer
      mangling.
      
      Move Rope out from JSString.h and rename to URopeImpl, to match UStringImpl.
      Give UStringImpl and URopeImpl a common parent class, UStringOrRopeImpl.
      Repurpose an otherwise invalid permutation to flags (static & should report
      memory cost) to identify ropes.
      
      This allows us to change the rope's fibers to interrogate the object rather
      than storing a bool within the low bits of the pointer (or in some cases the
      use of a common parent class removes the need to determine the type at all -
      there is a common interface to ref or get the length of either ropes or strings).
      
      * API/JSClassRef.cpp:
      (OpaqueJSClass::OpaqueJSClass):
      (OpaqueJSClassContextData::OpaqueJSClassContextData):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::keyForCharacterSwitch):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      * runtime/Identifier.cpp:
      (JSC::Identifier::equal):
      (JSC::Identifier::addSlowCase):
      * runtime/JSString.cpp:
      (JSC::JSString::resolveRope):
      * runtime/JSString.h:
      (JSC::):
      (JSC::RopeBuilder::JSString):
      (JSC::RopeBuilder::~JSString):
      (JSC::RopeBuilder::appendStringInConstruct):
      (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
      (JSC::RopeBuilder::JSStringFinalizerStruct::JSStringFinalizerStruct):
      (JSC::RopeBuilder::JSStringFinalizerStruct::):
      * runtime/UString.cpp:
      (JSC::UString::toStrictUInt32):
      (JSC::equal):
      * runtime/UString.h:
      (JSC::UString::isEmpty):
      (JSC::UString::size):
      * runtime/UStringImpl.cpp:
      (JSC::URopeImpl::derefFibersNonRecursive):
      (JSC::URopeImpl::destructNonRecursive):
      * runtime/UStringImpl.h:
      (JSC::UStringOrRopeImpl::isRope):
      (JSC::UStringOrRopeImpl::length):
      (JSC::UStringOrRopeImpl::ref):
      (JSC::UStringOrRopeImpl::):
      (JSC::UStringOrRopeImpl::operator new):
      (JSC::UStringOrRopeImpl::UStringOrRopeImpl):
      (JSC::UStringImpl::adopt):
      (JSC::UStringImpl::createUninitialized):
      (JSC::UStringImpl::tryCreateUninitialized):
      (JSC::UStringImpl::data):
      (JSC::UStringImpl::cost):
      (JSC::UStringImpl::deref):
      (JSC::UStringImpl::UStringImpl):
      (JSC::UStringImpl::):
      (JSC::URopeImpl::tryCreateUninitialized):
      (JSC::URopeImpl::initializeFiber):
      (JSC::URopeImpl::fiberCount):
      (JSC::URopeImpl::fibers):
      (JSC::URopeImpl::deref):
      (JSC::URopeImpl::URopeImpl):
      (JSC::URopeImpl::hasOneRef):
      (JSC::UStringOrRopeImpl::deref):
      
      WebCore: 
      
      Renamed cUStringImpl::size() to UStringImpl::size()UStringImpl::length()
      (matches WebCore::StringImpl).
      
      * bridge/jni/jsc/JavaStringJSC.h:
      (JSC::Bindings::JavaStringImpl::length):
      * platform/text/AtomicString.cpp:
      (WebCore::AtomicString::add):
      (WebCore::AtomicString::find):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b3ed85e
  31. 15 Feb, 2010 1 commit
    • barraclough@apple.com's avatar
      Some general Rope related refactoring. · 6eadb492
      barraclough@apple.com authored
      Reviewed by Oliver Hunt.
      
      Rename Rope::m_ropeLength to m_fiberCount, to be more descriptive.
      Rename Rope::m_stringLength to simply m_length (since this is the
      more conventional name for the length of a string).  Move append
      behaviour out into a new RopeBuilder class, so that Rope no longer
      needs any knowledge of the JSString or UString implementation.
      
      Make Rope no longer be nested within JSString.
      (Rope now no-longer need reside within JSString.h, but leaving
      the change of moving this out to a different header as a separate
      change from these renames).
      
      * JavaScriptCore.exp:
      * jit/JITOpcodes.cpp:
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      * runtime/JSString.cpp:
      (JSC::Rope::destructNonRecursive):
      (JSC::Rope::~Rope):
      (JSC::JSString::resolveRope):
      (JSC::JSString::toBoolean):
      (JSC::JSString::getStringPropertyDescriptor):
      * runtime/JSString.h:
      (JSC::Rope::Fiber::Fiber):
      (JSC::Rope::Fiber::deref):
      (JSC::Rope::Fiber::ref):
      (JSC::Rope::Fiber::refAndGetLength):
      (JSC::Rope::Fiber::isRope):
      (JSC::Rope::Fiber::rope):
      (JSC::Rope::Fiber::isString):
      (JSC::Rope::Fiber::string):
      (JSC::Rope::Fiber::nonFiber):
      (JSC::Rope::tryCreateUninitialized):
      (JSC::Rope::append):
      (JSC::Rope::fiberCount):
      (JSC::Rope::length):
      (JSC::Rope::fibers):
      (JSC::Rope::Rope):
      (JSC::Rope::operator new):
      (JSC::):
      (JSC::RopeBuilder::JSString):
      (JSC::RopeBuilder::~JSString):
      (JSC::RopeBuilder::length):
      (JSC::RopeBuilder::canGetIndex):
      (JSC::RopeBuilder::appendStringInConstruct):
      (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
      (JSC::RopeBuilder::isRope):
      (JSC::RopeBuilder::fiberCount):
      (JSC::JSString::getStringPropertySlot):
      * runtime/Operations.h:
      (JSC::jsString):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6eadb492
  32. 09 Feb, 2010 1 commit
    • barraclough@apple.com's avatar
      Three small string fixes: · 3cb3d047
      barraclough@apple.com authored
      (1) StringBuilder::release should CRASH if the buffer allocation failed.
      (2) Remove weird, dead code from JSString::tryGetValue, replace with an ASSERT.
      (3) Move UString::createFromUTF8 out to the API, as tryCreateStringFromUTF8.
          This is only used from the API, and (now) unlike other UString::create
          methods may return UString::null() to indicate failure cases.  Better
          handle these in the API.
      
      Reviewed by Oliver Hunt.
      
      * API/JSClassRef.cpp:
      (tryCreateStringFromUTF8):
      (OpaqueJSClass::OpaqueJSClass):
      (OpaqueJSClassContextData::OpaqueJSClassContextData):
      * runtime/JSString.h:
      (JSC::Fiber::tryGetValue):
      * runtime/StringBuilder.h:
      (JSC::StringBuilder::release):
      * runtime/UString.cpp:
      (JSC::UString::UString):
      (JSC::UString::from):
      (JSC::UString::find):
      * runtime/UString.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3cb3d047
  33. 28 Jan, 2010 1 commit
    • oliver@apple.com's avatar
      2010-01-28 Oliver Hunt <oliver@apple.com> · aa2c55b9
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Simplify anonymous slot implementation
              https://bugs.webkit.org/show_bug.cgi?id=34282
      
              A class must now specify the number of slots it needs at construction time
              rather than later on with a transition.  This makes many things simpler,
              we no longer need to need an additional transition on object creation to
              add the anonymous slots, and we remove the need for a number of transition
              type checks.
      
              * 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):
              * runtime/Arguments.h:
              (JSC::Arguments::createStructure):
              * runtime/BooleanObject.h:
              (JSC::BooleanObject::createStructure):
              * runtime/DateInstance.h:
              (JSC::DateInstance::createStructure):
              * runtime/DatePrototype.h:
              (JSC::DatePrototype::createStructure):
              * runtime/FunctionPrototype.h:
              (JSC::FunctionPrototype::createStructure):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::createStructure):
              * runtime/GlobalEvalFunction.h:
              (JSC::GlobalEvalFunction::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:
              (JSC::JSCell::createDummyStructure):
              * runtime/JSFunction.h:
              (JSC::JSFunction::createStructure):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::createStructure):
              * runtime/JSNotAnObject.h:
              (JSC::JSNotAnObject::createStructure):
              * runtime/JSONObject.h:
              (JSC::JSONObject::createStructure):
              * runtime/JSObject.h:
              (JSC::JSObject::createStructure):
              (JSC::JSObject::putAnonymousValue):
              (JSC::JSObject::getAnonymousValue):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::createStructure):
              * runtime/JSStaticScopeObject.h:
              (JSC::JSStaticScopeObject::createStructure):
              * runtime/JSString.h:
              (JSC::Fiber::createStructure):
              * runtime/JSVariableObject.h:
              (JSC::JSVariableObject::createStructure):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::createStructure):
              (JSC::JSWrapperObject::JSWrapperObject):
              * runtime/MathObject.h:
              (JSC::MathObject::createStructure):
              * runtime/NumberConstructor.h:
              (JSC::NumberConstructor::createStructure):
              * runtime/NumberObject.h:
              (JSC::NumberObject::createStructure):
              * runtime/RegExpConstructor.h:
              (JSC::RegExpConstructor::createStructure):
              * runtime/RegExpObject.h:
              (JSC::RegExpObject::createStructure):
              * runtime/StringObject.h:
              (JSC::StringObject::createStructure):
              * runtime/StringObjectThatMasqueradesAsUndefined.h:
              (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
              * runtime/Structure.cpp:
              (JSC::Structure::~Structure):
              (JSC::Structure::materializePropertyMap):
              * runtime/Structure.h:
              (JSC::Structure::create):
              (JSC::Structure::anonymousSlotCount):
              * runtime/StructureTransitionTable.h:
      2010-01-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Simplify anonymous slot implementation
              https://bugs.webkit.org/show_bug.cgi?id=34282
      
              Update JSGlue Structure usage to pass the anonymous slot count.
      
              * UserObjectImp.h:
              (UserObjectImp::createStructure):
      2010-01-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Simplify anonymous slot implementation
              https://bugs.webkit.org/show_bug.cgi?id=34282
      
              Update the WebCore JS DOM bindings to correctly pass and
              propagate the anonymous slot count information.
      
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMObjectWithGlobalPointer::createStructure):
              (WebCore::DOMConstructorObject::createStructure):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::createStructure):
              * bindings/scripts/CodeGeneratorJS.pm:
              * 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::RuntimeObjectImp::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa2c55b9
  34. 18 Jan, 2010 2 commits
  35. 17 Jan, 2010 1 commit
    • mjs@apple.com's avatar
      2010-01-16 Maciej Stachowiak <mjs@apple.com> · f7e0c7d6
      mjs@apple.com authored
              Reviewed by Oliver Hunt.
      
              Cache JS string values made from DOM strings (Dromaeo speedup)
              https://bugs.webkit.org/show_bug.cgi?id=33768
              <rdar://problem/7353576>
      
              * runtime/JSString.h:
              (JSC::jsStringWithFinalizer): Added new mechanism for a string to have an optional
              finalizer callback, for the benefit of weak-referencing caches.
              (JSC::):
              (JSC::Fiber::JSString):
              (JSC::Fiber::~JSString):
              * runtime/JSString.cpp:
              (JSC::JSString::resolveRope): Clear fibers so this doesn't look like a string with a finalizer.
              * runtime/WeakGCMap.h: Include "Collector.h" to make this header includable by itself.
      2010-01-16  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Oliver Hunt.
      
              Cache JS string values made from DOM strings (Dromaeo speedup)
              https://bugs.webkit.org/show_bug.cgi?id=33768
              <rdar://problem/7353576>
              
              * Plugins/Hosted/ProxyInstance.mm:
              (WebKit::ProxyInstance::stringValue): Explicitly make a String, since char*
              is now ambiguous.
      2010-01-16  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Oliver Hunt.
      
              Cache JS string values made from DOM strings (Dromaeo speedup)
              https://bugs.webkit.org/show_bug.cgi?id=33768
              <rdar://problem/7353576>
      
              Added a new cache for JSString values that are created from Strings or AtomicStrings
              in the DOM. It's common for the same string to be retrieved from the DOM repeatedly,
              and it is wasteful to make a new JS-level string value every time.
              
              The string cache is per-world, and thus thread-safe and not a
              vector for accidental information exchange.
              
              ~30% speedup on Dromaeo Attributes test, also substantially helps other Dromaeo DOM tests.
      
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::jsStringCache): Helper function to get the string cache for the current world.
              (WebCore::jsString): Some new overloads including the caching version.
              (WebCore::stringWrapperDestroyed): Finalizer callback - remove from relevant caches.
              * bindings/js/JSDOMBinding.h:
              (WebCore::jsString): Prototype new overloads (and define a few inline).
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::type): Explicitly make a UString.
              * bindings/js/ScriptFunctionCall.cpp:
              (WebCore::ScriptFunctionCall::appendArgument): Ditto.
              * WebCore.base.exp: Add new JSString overloads that WebCore gets to see.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f7e0c7d6
  36. 07 Jan, 2010 1 commit
    • ap@apple.com's avatar
      Reviewed by Geoffrey Garen. · 1348bdfa
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=33057
              REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows
      
              <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark
      
              Test: fast/js/webcore-string-comparison.html
      
              In r49365, some code was moved from JSString.cpp to JSString.h, and as a result, WebCore
              got a way to directly instantiate JSStrings over DLL borders. Since vftable for JSString was
              not exported, objects created from WebCore got a different vptr, and JavaScriptCore
              optimizations that relied on vptr of all JSString objects being equal failed.
      
              * config.h: Added a JS_EXPORTCLASS macro for exporting classes. It's currently the same as
              JS_EXPORTDATA, but it clearly needed a new name.
      
              * runtime/InitializeThreading.cpp:
              (JSC::initializeThreadingOnce):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::storeVPtrs):
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::createNonDefault):
              (JSC::JSGlobalData::create):
              (JSC::JSGlobalData::sharedInstance):
              * runtime/JSGlobalData.h:
              Store vptrs just once, no need to repeatedly pick and copy them. This makes it possible to
              assert vptr correctness in object destructors (which don't have access to JSGlobalData,
              and even Heap::heap(this) will fail for fake objects created from storeVPtrs()).
      
              * runtime/JSArray.cpp: (JSC::JSArray::~JSArray): Assert that vptr is what we expect it to be.
              It's important to assert in destructor, because MSVC changes the vptr after constructor
              is invoked.
              * runtime/JSByteArray.cpp: (JSC::JSByteArray::~JSByteArray): Ditto.
              * runtime/JSByteArray.h: Ditto.
              * runtime/JSFunction.h: Ditto.
              * runtime/JSFunction.cpp: (JSC::JSFunction::~JSFunction): Ditto.
      
              * runtime/JSCell.h: (JSC::JSCell::setVPtr): Added a method to substitute vptr for another
              one.
      
              * runtime/JSString.h: Export JSString class together with its vftable, and tell other
              libraries tp import it. This is needed on platforms that have a separate JavaScriptCore
              dynamic library - and on Mac, we already did the export via JavaScriptCore.exp.
              (JSC::JSString::~JSString): Assert tha vptr is what we expect it to be.
              (JSC::fixupVPtr): Store a previously saved primary vftable pointer (do nothing if building
              JavaScriptCore itself).
              (JSC::jsSingleCharacterString): Call fixupVPtr in case this is call across DLL boundary.
              (JSC::jsSingleCharacterSubstring): Ditto.
              (JSC::jsNontrivialString): Ditto.
              (JSC::jsString): Ditto.
              (JSC::jsSubstring): Ditto.
              (JSC::jsOwnedString): Ditto.
      
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new static
              JSGlobalData members that are used in WebCore via inline functions.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1348bdfa
  37. 18 Dec, 2009 1 commit
    • barraclough@apple.com's avatar
      Add createNonCopying method to UString to make replace constructor passed bool, · e677126a
      barraclough@apple.com authored
      to make behaviour more explicit.  Add createFromUTF8 to UString (wrapping method
      on UString::Rep), since other cases of transliteration (e.g.  from ascii) are
      performed in UString constructors.  Add/use setHash & size() accessors on Rep,
      rather than accessing _hash/len directly.
      
      Reviewed by Sam Weinig.
      
      * API/JSClassRef.cpp:
      (OpaqueJSClass::OpaqueJSClass):
      * API/OpaqueJSString.cpp:
      (OpaqueJSString::ustring):
      * JavaScriptCore.exp:
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      * runtime/Identifier.cpp:
      (JSC::Identifier::equal):
      (JSC::CStringTranslator::translate):
      (JSC::UCharBufferTranslator::translate):
      (JSC::Identifier::addSlowCase):
      * runtime/JSString.cpp:
      (JSC::JSString::resolveRope):
      * runtime/JSString.h:
      (JSC::JSString::Rope::Fiber::refAndGetLength):
      (JSC::JSString::Rope::append):
      * runtime/StringBuilder.h:
      (JSC::StringBuilder::release):
      * runtime/StringConstructor.cpp:
      (JSC::stringFromCharCodeSlowCase):
      * runtime/StringPrototype.cpp:
      (JSC::substituteBackreferencesSlow):
      (JSC::stringProtoFuncToLowerCase):
      (JSC::stringProtoFuncToUpperCase):
      (JSC::stringProtoFuncFontsize):
      (JSC::stringProtoFuncLink):
      * runtime/UString.cpp:
      (JSC::UString::UString):
      (JSC::UString::createNonCopying):
      (JSC::UString::createFromUTF8):
      * runtime/UString.h:
      (JSC::UString::Rep::setHash):
      (JSC::UString::~UString):
      (JSC::makeString):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e677126a