1. 13 Jun, 2007 3 commits
    • lars's avatar
      Disable FastMalloc for the Qt build and make sure we · cc7d55ce
      lars authored
              don't reimplement the global new/delete operators
              when using the system malloc.	
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc7d55ce
    • andersca's avatar
      JavaScriptCore: · 89c5d677
      andersca authored
              Reviewed by Geoff.
      
              Make sure that bindings instances get correct root objects.
              
              * JavaScriptCore.exp:
              * bindings/NP_jsobject.cpp:
              (listFromVariantArgs):
              (_NPN_InvokeDefault):
              (_NPN_Invoke):
              (_NPN_SetProperty):
              * bindings/c/c_instance.cpp:
              (KJS::Bindings::CInstance::invokeMethod):
              (KJS::Bindings::CInstance::invokeDefaultMethod):
              * bindings/c/c_runtime.cpp:
              (KJS::Bindings::CField::valueFromInstance):
              * bindings/c/c_utility.cpp:
              (KJS::Bindings::convertNPVariantToValue):
              * bindings/c/c_utility.h:
              * bindings/objc/objc_instance.mm:
              (ObjcInstance::invokeMethod):
              (ObjcInstance::invokeDefaultMethod):
              (ObjcInstance::getValueOfUndefinedField):
              * bindings/objc/objc_runtime.mm:
              (ObjcField::valueFromInstance):
              (ObjcArray::valueAt):
              * bindings/objc/objc_utility.h:
              * bindings/objc/objc_utility.mm:
              (KJS::Bindings::convertObjcValueToValue):
              * bindings/runtime.h:
      
      WebCore:
      
              Reviewed by Geoff.
      
              Pass the root object to methods that end up creating new ObjcInstance objects.
              
              * bindings/objc/WebScriptObject.mm:
              (listFromNSArray):
              (-[WebScriptObject callWebScriptMethod:withArguments:]):
              (-[WebScriptObject evaluateWebScript:]):
              (-[WebScriptObject setValue:forKey:]):
              (-[WebScriptObject valueForKey:]):
              (-[WebScriptObject removeWebScriptKey:]):
              (-[WebScriptObject setWebScriptValueAtIndex:value:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89c5d677
    • hausmann's avatar
      Fix the build: WebKitQt is now called QtWebKit · c14b0062
      hausmann authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c14b0062
  2. 12 Jun, 2007 12 commits
    • andersca's avatar
      Another build fix. · 5835026e
      andersca authored
              
              * bindings/qt/qt_instance.cpp:
              (KJS::Bindings::QtInstance::invokeMethod):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5835026e
    • andersca's avatar
      Reviewed by Geoff. · 60ba4e54
      andersca authored
              Move the notion of field type to the JNI runtime since that's the only 
              one that was actually using it.
              
              * bindings/c/c_runtime.h:
              (KJS::Bindings::CField::CField):
              * bindings/jni/jni_runtime.h:
              * bindings/objc/objc_runtime.h:
              * bindings/objc/objc_runtime.mm:
              * bindings/qt/qt_runtime.h:
              * bindings/runtime.h:
              * bindings/runtime_method.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      60ba4e54
    • andersca's avatar
      Build fix. · 1c920040
      andersca authored
              
              * bindings/qt/qt_class.cpp:
              (KJS::Bindings::QtClass::methodsNamed):
              * bindings/qt/qt_instance.cpp:
              (KJS::Bindings::QtInstance::invokeMethod):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c920040
    • andersca's avatar
      Reviewed by Oliver. · 27856417
      andersca authored
              
              Get rid of the MethodList class and use a good ol' Vector instead.
      
              * bindings/c/c_class.cpp:
              (KJS::Bindings::CClass::methodsNamed):
              * bindings/c/c_instance.cpp:
              (KJS::Bindings::CInstance::invokeMethod):
              * bindings/jni/jni_class.cpp:
              (JavaClass::JavaClass):
              (JavaClass::~JavaClass):
              * bindings/jni/jni_instance.cpp:
              (JavaInstance::invokeMethod):
              * bindings/objc/objc_class.mm:
              (KJS::Bindings::ObjcClass::methodsNamed):
              * bindings/objc/objc_instance.mm:
              (ObjcInstance::invokeMethod):
              * bindings/objc/objc_runtime.mm:
              (ObjcFallbackObjectImp::callAsFunction):
              * bindings/runtime.cpp:
              * bindings/runtime.h:
              * bindings/runtime_method.cpp:
              (RuntimeMethod::lengthGetter):
              (RuntimeMethod::callAsFunction):
              * bindings/runtime_object.cpp:
              (RuntimeObjectImp::getOwnPropertySlot):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      27856417
    • andersca's avatar
      Reviewed by Geoff. · b7e13e4e
      andersca authored
              Make RuntimeMethod's method list a pointer so that the object size doesn't
              grow beyond 32 bytes when we later will replace MethodList with a Vector.
              
              * bindings/runtime_method.cpp:
              (RuntimeMethod::RuntimeMethod):
              (RuntimeMethod::lengthGetter):
              (RuntimeMethod::callAsFunction):
              * bindings/runtime_method.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b7e13e4e
    • andersca's avatar
      Reviewed by Geoff. · 164cf009
      andersca authored
              Get rid of the Parameter class.
              
              * bindings/jni/jni_instance.cpp:
              (JavaInstance::invokeMethod):
              * bindings/jni/jni_runtime.cpp:
              (JavaMethod::signature):
              * bindings/jni/jni_runtime.h:
              (KJS::Bindings::JavaParameter::JavaParameter):
              (KJS::Bindings::JavaParameter::~JavaParameter):
              (KJS::Bindings::JavaParameter::type):
              (KJS::Bindings::JavaMethod::parameterAt):
              (KJS::Bindings::JavaMethod::numParameters):
              * bindings/runtime.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      164cf009
    • andersca's avatar
      Build fix. · 9cc63ece
      andersca authored
              
              * bindings/qt/qt_class.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9cc63ece
    • bdash's avatar
      2007-06-12 Mark Rowe <mrowe@apple.com> · f1c12864
      bdash authored
              Build fix.
      
              * bindings/objc/objc_runtime.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f1c12864
    • andersca's avatar
      Reviewed by Geoff. · 255f15f4
      andersca authored
              Get rid of Constructor and its only subclass JavaConstructor.
              
              * bindings/c/c_class.h:
              * bindings/jni/jni_class.cpp:
              (JavaClass::JavaClass):
              (JavaClass::~JavaClass):
              * bindings/jni/jni_class.h:
              * bindings/jni/jni_runtime.cpp:
              * bindings/jni/jni_runtime.h:
              * bindings/objc/objc_class.h:
              * bindings/runtime.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      255f15f4
    • andersca's avatar
      Reviewed by Geoff. · 81caa9fc
      andersca authored
              Use RetainPtr throughout the bindings code.
              
              * bindings/objc/objc_class.h:
              * bindings/objc/objc_class.mm:
              (KJS::Bindings::ObjcClass::ObjcClass):
              (KJS::Bindings::ObjcClass::methodsNamed):
              (KJS::Bindings::ObjcClass::fieldNamed):
              * bindings/objc/objc_instance.h:
              (KJS::Bindings::ObjcInstance::getObject):
              * bindings/objc/objc_instance.mm:
              (ObjcInstance::ObjcInstance):
              (ObjcInstance::~ObjcInstance):
              (ObjcInstance::implementsCall):
              (ObjcInstance::invokeMethod):
              (ObjcInstance::invokeDefaultMethod):
              (ObjcInstance::defaultValue):
              * bindings/objc/objc_runtime.h:
              (KJS::Bindings::ObjcMethod::setJavaScriptName):
              (KJS::Bindings::ObjcMethod::javaScriptName):
              (KJS::Bindings::ObjcArray::getObjcArray):
              * bindings/objc/objc_runtime.mm:
              (ObjcField::name):
              (ObjcArray::ObjcArray):
              (ObjcArray::setValueAt):
              (ObjcArray::valueAt):
              (ObjcArray::getLength):
              * wtf/RetainPtr.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      81caa9fc
    • andersca's avatar
      Reviewed by Maciej. · 575a56b6
      andersca authored
              Have JSCell inherit from Noncopyable.
              
              * bindings/objc/objc_runtime.h:
              * bindings/runtime_object.h:
              * kjs/value.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      575a56b6
    • andersca's avatar
      Reviewed by Darin and Maciej. · c88db709
      andersca authored
              More cleanup. Use our Noncopyable WTF class, add a root object member
              to the Array class.
              
              * bindings/c/c_class.h:
              * bindings/jni/jni_class.h:
              * bindings/jni/jni_instance.h:
              * bindings/jni/jni_runtime.cpp:
              (JavaArray::JavaArray):
              * bindings/jni/jni_runtime.h:
              * bindings/objc/objc_class.h:
              * bindings/objc/objc_runtime.h:
              * bindings/objc/objc_runtime.mm:
              (ObjcArray::ObjcArray):
              * bindings/objc/objc_utility.mm:
              (KJS::Bindings::convertObjcValueToValue):
              * bindings/runtime.cpp:
              (KJS::Bindings::Array::Array):
              (KJS::Bindings::Array::~Array):
              * bindings/runtime.h:
              * bindings/runtime_object.h:
              * bindings/runtime_root.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c88db709
  3. 08 Jun, 2007 1 commit
  4. 07 Jun, 2007 2 commits
    • andersca's avatar
      Reviewed by Geoff. · 9f2c3782
      andersca authored
              Get rid of Instance::setRootObject and pass the root object to the instance constructor instead.
              
              * bindings/c/c_instance.cpp:
              (KJS::Bindings::CInstance::CInstance):
              * bindings/c/c_instance.h:
              * bindings/jni/jni_instance.cpp:
              (JavaInstance::JavaInstance):
              * bindings/jni/jni_instance.h:
              * bindings/jni/jni_jsobject.cpp:
              (JavaJSObject::convertJObjectToValue):
              * bindings/objc/objc_instance.h:
              * bindings/objc/objc_instance.mm:
              (ObjcInstance::ObjcInstance):
              * bindings/runtime.cpp:
              (KJS::Bindings::Instance::Instance):
              (KJS::Bindings::Instance::createBindingForLanguageInstance):
              * bindings/runtime.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@22056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9f2c3782
    • andersca's avatar
      Reviewed by Adam. · ab66911c
      andersca authored
              Don't use a JavaInstance to store the field when all we want to do is to keep the field
              from being garbage collected. Instead, use a JObjectWrapper.
              
              * bindings/jni/jni_instance.h:
              * bindings/jni/jni_runtime.cpp:
              (JavaField::JavaField):
              (JavaField::dispatchValueFromInstance):
              (JavaField::dispatchSetValueToInstance):
              * bindings/jni/jni_runtime.h:
              (KJS::Bindings::JavaField::JavaField):
              (KJS::Bindings::JavaField::operator=):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@22055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ab66911c
  5. 30 May, 2007 4 commits
  6. 29 May, 2007 1 commit
  7. 28 May, 2007 1 commit
  8. 27 May, 2007 2 commits
  9. 26 May, 2007 1 commit
  10. 25 May, 2007 4 commits
  11. 24 May, 2007 1 commit
    • weinig's avatar
      Reviewed by Darin · 2abbd43a
      weinig authored
              Patch for http://bugs.webkit.org/show_bug.cgi?id=13855
              Port patch 666176 to JavaScriptCore
      
              - Renamed JSValue::downcast() to JSValue::asCell() which makes the
              function meaning cleaner. It's modeled after Harri Porten change in 
              KDE trunk.
      
              * kjs/collector.cpp:
              (KJS::Collector::protect):
              (KJS::Collector::unprotect):
              (KJS::Collector::collectOnMainThreadOnly):
              * kjs/object.h:
              (KJS::JSValue::isObject):
              * kjs/string_object.cpp:
              (KJS::StringProtoFunc::callAsFunction):
              * kjs/value.h:
              (KJS::JSValue::asCell):
              (KJS::JSValue::isNumber):
              (KJS::JSValue::isString):
              (KJS::JSValue::isObject):
              (KJS::JSValue::getNumber):
              (KJS::JSValue::getString):
              (KJS::JSValue::getObject):
              (KJS::JSValue::getUInt32):
              (KJS::JSValue::mark):
              (KJS::JSValue::marked):
              (KJS::JSValue::type):
              (KJS::JSValue::toPrimitive):
              (KJS::JSValue::toBoolean):
              (KJS::JSValue::toNumber):
              (KJS::JSValue::toString):
              (KJS::JSValue::toObject):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2abbd43a
  12. 18 May, 2007 1 commit
    • bdash's avatar
      2007-05-18 Holger Hans Peter Freyther <zecke@selfish.org> · 98f449d6
      bdash authored
              Reviewed by Mark Rowe.
      
              No test added as this is hard to time.
      
              * platform/gdk/FrameGdk.cpp: Use needsLayout() to decide if layout()
              is needed.
      
              (WebCore::FrameGdk::dumpRenderTree):
              (WebCore::FrameGdk::handleGdkEvent):
      
      2007-05-18  Holger Hans Peter Freyther  <zecke@selfish.org>
      
              Reviewed by Mark Rowe.
      
              * kjs/testkjs.pro: Make the Gdk port link to icu
      
      2007-05-18  Holger Hans Peter Freyther  <zecke@selfish.org>
      
              Reviewed by Mark Rowe.
      
              * WebKit.pro: Build testkjs for Gdk and Qt
      
      2007-05-18  Holger Hans Peter Freyther  <zecke@selfish.org>
      
              Reviewed by Mark Rowe.
      
              * GdkLauncher/main.cpp:
              (main): Call Frame::init to catch up with Maciej's changes.
              * Scripts/run-javascriptcore-tests: Remove --gdk from the command line
              passed to the helper scripts.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98f449d6
  13. 15 May, 2007 2 commits
  14. 14 May, 2007 2 commits
    • bdash's avatar
      2007-05-14 Kimmo Kinnunen <kimmok@iki.fi> · 06b94bf8
      bdash authored
              Reviewed by Darin.
      
              - Fixes http://bugs.webkit.org/show_bug.cgi?id=13622 (Decompiler
                omits trailing comma in array literal)
      
               * kjs/nodes2string.cpp:
               (ArrayNode::streamTo): print extra ',' in case there was elision
               commas (check opt member var) and array elements present
               in the array expression
      
      2007-05-14  Kimmo Kinnunen  <kimmok@iki.fi>
      
              Reviewed by Darin.
      
              - Tests for fix to http://bugs.webkit.org/show_bug.cgi?id=13622 (Decompiler omits
                trailing comma in array literal)
      
              * fast/js/resources/toString-elision-trailing-comma.js: Added.
              * fast/js/toString-elision-trailing-comma-expected.txt: Added.
              * fast/js/toString-elision-trailing-comma.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      06b94bf8
    • ggaren's avatar
      JavaScriptCore: · 8401112a
      ggaren authored
              Reviewed by Oliver Hunt.
              
              Added HashMap::swap and HashSet::swap. WebCore now uses HashSet::swap.
              I figured while I was in the neighborhood I might as well add HashMap::swap,
              too.
      
              * wtf/HashMap.h:
              (WTF::::operator):
              (WTF::::swap):
              * wtf/HashSet.h:
              (WTF::::operator):
              (WTF::::swap):
      
      WebCore:
      
              Reviewed by Oliver Hunt.
              
              Some improvements on my last patch, suggested by Darin.
      
              * history/PageCache.cpp:
              (WebCore::PageCache::autoreleaseNow): Swap with an empty set instead of 
              building up an array and then calling clear(). This is slightly more 
              efficient and the code is cleaner.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8401112a
  15. 11 May, 2007 3 commits
    • bdash's avatar
      2007-05-11 Kimmo Kinnunen <kimmok@iki.fi> · 9acb9e24
      bdash authored
              Reviewed by Darin.
      
              - Fix for bug http://bugs.webkit.org/show_bug.cgi?id=13620
                Bogus decompilation of "for (var j = 1 in [])"
              - ForInNode toString()'ed to syntax error if there was var decl
                and initializer
              - ForNode toStringed()'ed lost 'var ' if it was present
      
              * kjs/nodes2string.cpp:
              (VarDeclListNode::streamTo): Print "var " here
              (VarStatementNode::streamTo): Don't print "var " here
              (ForNode::streamTo): Remove TODO comment, VarDeclListNode will
              stream the "var "
              (ForInNode::streamTo): ForIn initializer is printed by VarDeclNode
      
      2007-05-11  Kimmo Kinnunen  <kimmok@iki.fi>
      
              Reviewed by Darin.
      
              - Tests for bug http://bugs.webkit.org/show_bug.cgi?id=13620
                Bogus decompilation of "for (var j = 1 in [])"
      
              Testcase covers toString()ing functions with
              for-statements of form for (var j = 1 in []) and for (var j=0;j<10;j++)
      
           ...
      9acb9e24
    • bdash's avatar
      2007-05-11 Kimmo Kinnunen <kimmok@iki.fi> · eac52814
      bdash authored
              Reviewed by Darin.
      
              - Fixes http://bugs.webkit.org/show_bug.cgi?id=10878
                (Incorrect decompilation for "4..x")
              - Group numbers in dotted expressions in toString() output, so we
                avoid the 4.x constructs  when the original input is 4..x.
                4..x means the same as 4. .x or (4).x or Number(4).x
      
              * kjs/nodes2string.cpp:
              (KJS::SourceStream::):
              Add boolean flag to indicate that if next item is a number, it should be grouped.
              Add new formatting enum which turns on the boolean flag.
              (KJS::SourceStream::SourceStream): Added. Initialize the flag.
              (SourceStream::operator<<): Added. New overloaded operator with double value as parameter.
              (NumberNode::streamTo): Use the double operator
              (ArrayNode::streamTo):
              (DotAccessorNode::streamTo):
              (FunctionCallDotNode::streamTo):
              (FunctionCallParenDotNode::streamTo):
              (PostfixDotNode::streamTo):
              (DeleteDotNode::streamTo):
              (PrefixDotNode::streamTo):
              (AssignDotNode::streamTo): Use the new formatting enum to turn on the grouping flag.
      
      2007-05-11  Kimmo Kinnunen  <kimmok@iki.fi>
      
              Reviewed by Darin.
      
              Tests for http://bugs.webkit.org/show_bug.cgi?id=10878
              Bug 10878: Incorrect decompilation for "4..x"
      
              * fast/js/resources/toString-number-dot-expr.js: Added.
              * fast/js/toString-number-dot-expr-expected.txt: Added.
              * fast/js/toString-number-dot-expr.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eac52814
    • bdash's avatar
      Roll out r21393 due to the JavaScriptCore test failure it introduced. · 4b620aa2
      bdash authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b620aa2