1. 07 Dec, 2007 3 commits
    • ggaren@apple.com's avatar
      JavaScriptCore: · f5ab0692
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              Next step in refactoring JSGlobalObject: Added JSVariableObject class,
              and factored symbol-table-related code into it. (JSGlobalObject doesn't
              use the symbol table code yet, though.)
              
              Layout and JS tests, and testapi, pass. SunSpider reports no regression.
      
      WebCore:
      
              Reviewed by Sam Weinig.
      
              Added some namespace qualifications and a forwarding header, now that
              KJS::Node is sometimes #included in WebCore by JavaScriptCore headers.
      
              * ForwardingHeaders/wtf/ListRefPtr.h: Added.
              * bindings/js/JSXSLTProcessor.cpp:
              (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
              * bindings/js/kjs_binding.cpp:
              (KJS::ScriptInterpreter::getDOMNodeForDocument):
              (KJS::ScriptInterpreter::forgetDOMNodeForDocument):
              (KJS::ScriptInterpreter::putDOMNodeForDocument):
              (KJS::ScriptInterpreter::markDOMNodesForDocument):
              (KJS::ScriptInterpreter::updateDOMNodeDocument):
      
      WebKit/mac:
      
              Reviewed by Sam Weinig.
              
              Added a forwarding header, since we now #include nodes.h through some
              JavaScriptCore headers.
      
              * ForwardingHeaders/wtf/ListRefPtr.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f5ab0692
    • darin@apple.com's avatar
      Reviewed by Geoff. · 8ad18ea8
      darin@apple.com authored
              - fix http://bugs.webkit.org/show_bug.cgi?id=16185
                jsRegExpCompile should not add implicit non-capturing bracket
      
              While this does not make SunSpider faster, it will make many regular
              expressions a bit faster.
      
              * pcre/pcre_compile.cpp: Moved CompileData struct in here from the
              header since it's private to this file.
              (compile_branch): Updated for function name change.
              (compile_bracket): Renamed from compile_regex, since, for one thing,
              this does not compile an entire regular expression.
              (calculateCompiledPatternLengthAndFlags): Removed unused item_count
              local variable. Renamed CompileData to cd instead of compile_block
              to be consistent with other functions. Added code to set the
              needOuterBracket flag if there's at least one "|" at the outer level.
              (jsRegExpCompile): Renamed CompileData to cd instead of compile_block
              to be consistent with other functions. Removed unneeded "size" field
              from the compiled regular expression. If no outer bracket is needed,
              then use compile_branch to compile the regular expression.
      
              * pcre/pcre_internal.h: Removed the CompileData struct, which is now
              private to pcre_compile.cpp. Removed the size member from JSRegExp.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8ad18ea8
    • kevino@webkit.org's avatar
      MSVC7 build fix due to a compiler bug with placement new and/or templates and casting. · 6db0aa7b
      kevino@webkit.org authored
      Reviewed by Darin Adler.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6db0aa7b
  2. 06 Dec, 2007 1 commit
  3. 05 Dec, 2007 15 commits
  4. 04 Dec, 2007 4 commits
  5. 03 Dec, 2007 6 commits
    • darin@apple.com's avatar
      JavaScriptCore: · a3439610
      darin@apple.com authored
              Reviewed by Geoff.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=15618
                <rdar://problem/5619353> REGRESSION: Stack overflow/crash in KJS::equal (15618)
      
              Test: fast/js/recursion-limit-equal.html
      
              * kjs/operations.cpp: (KJS::equal): Check the exception from toPrimitive.
      
      LayoutTests:
      
              Reviewed by Geoff.
      
              - test for http://bugs.webkit.org/show_bug.cgi?id=15618
                <rdar://problem/5619353> REGRESSION: Stack overflow/crash in KJS::equal (15618)
      
              * fast/js/recursion-limit-equal-expected.txt: Added.
              * fast/js/recursion-limit-equal.html: Added.
              * fast/js/resources/recursion-limit-equal.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a3439610
    • mitz@apple.com's avatar
      - fix a copy-and-paste-o · 03a78889
      mitz@apple.com authored
              * bindings/npruntime.cpp:
              (_NPN_GetIntIdentifier):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      03a78889
    • mitz@apple.com's avatar
      JavaScriptCore: · f94c1d79
      mitz@apple.com authored
              Reviewed by Darin Adler.
      
              - fix an ASSERT when getIntIdentifier is called with 0 or -1
      
              * bindings/npruntime.cpp:
              (_NPN_GetIntIdentifier): We cannot use the hashmap for 0 and -1 since
              they are the empty value and the deleted value. Instead, keep the
              identifiers for those two integers in a static array.
      
      WebKitTools:
      
              Reviewed by Darin Adler.
      
              - added a testGetIntIdentifier() method to TestNetscapePlugIn
      
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              (pluginInvoke):
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              - added a test of the behavior of getIntIdentifier with the integers
                0 and -1
      
              * plugins/getintidentifier-special-values-expected.txt: Added.
              * plugins/getintidentifier-special-values.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f94c1d79
    • darin@apple.com's avatar
      JavaScriptCore: · 7f3c7caf
      darin@apple.com authored
              Reviewed by Mitz.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=15848
                <rdar://problem/5619330> REGRESSION: Assertion failure viewing comments page on digg.com
      
              Test: fast/js/sparse-array.html
      
              * kjs/array_instance.cpp:
              (KJS::ArrayInstance::inlineGetOwnPropertySlot): Check sparse array cutoff before looking
              in hash map. Can't avoid the branch because we can't look for 0 in the hash.
              (KJS::ArrayInstance::deleteProperty): Ditto.
      
      LayoutTests:
      
              Reviewed by Mitz.
      
              - test for http://bugs.webkit.org/show_bug.cgi?id=15848
                <rdar://problem/5619330> REGRESSION: Assertion failure viewing comments page on digg.com
      
              * fast/js/resources/sparse-array.js: Added.
              * fast/js/sparse-array-expected.txt: Added.
              * fast/js/sparse-array.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f3c7caf
    • ggaren@apple.com's avatar
      Build fix: added an #include. · f0863872
      ggaren@apple.com authored
              * kjs/collector.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f0863872
    • ggaren@apple.com's avatar
      JavaScriptCore: · 66bf8cbb
      ggaren@apple.com authored
              Reviewed by Eric Seidel.
      
              Second step in refactoring JSGlobalObject: moved virtual functions from
              Interpreter to JSGlobalObject.
              
              Layout and JS tests pass. SunSpider reports a .7% speedup -- don't 
              believe his lies.
      
      JavaScriptGlue:
      
              Reviewed by Eric Seidel.
      
              Updated to match the JavaScriptCore change to move virtual methods from
              Interpreter to JSGlobalObject.
              
              * JSRun.cpp:
              * JSRun.h:
              * JSValueWrapper.cpp:
              (getThreadGlobalExecState):
              * JavaScriptGlue.cpp:
              (JSRunCopyGlobalObject):
              (JSRunEvaluate):
      
      WebCore:
      
              Reviewed by Eric Seidel.
      
              Updated to match the JavaScriptCore change to move virtual methods from
              Interpreter to JSGlobalObject.
              
              Moved virtual ScriptInterpreter functions to Window.
      
      WebKit/mac:
      
              Reviewed by Eric Seidel.
      
              Updated to match the JavaScriptCore change to move virtual methods from
              Interpreter to JSGlobalObject.
      
              * WebView/WebFrame.mm:
              (-[WebFrame globalContext]): Use the toRef function instead of manually
              casting.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      66bf8cbb
  6. 01 Dec, 2007 2 commits
    • alp@webkit.org's avatar
      2007-12-01 Alp Toker <alp@atoker.com> · 3fdd155c
      alp@webkit.org authored
              Reviewed by Adam Roben.
      
              http://bugs.webkit.org/show_bug.cgi?id=16228
              kJSClassDefinitionEmpty is not exported with JS_EXPORT
      
              Add JS_EXPORT to kJSClassDefinitionEmpty.
      
              Make the gcc compiler check take precedence over the WIN32||_WIN32
              check to ensure that symbols are exported on Windows when using gcc.
      
              Add a TODO referencing the bug about JS_EXPORT in the Win build
              (http://bugs.webkit.org/show_bug.cgi?id=16227)
      
              Don't define JS_EXPORT as 'extern' when the compiler is unknown since
              it would result in the incorrect expansion:
      
                extern extern const JSClassDefinition kJSClassDefinitionEmpty;
      
              (This was something we inherited from CFBase.h that doesn't make sense
              for JSBase.h)
      
              * API/JSBase.h:
              * API/JSObjectRef.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3fdd155c
    • ggaren@apple.com's avatar
      JavaScriptCore: · 41893215
      ggaren@apple.com authored
              Reviewed by Beth Dakin.
              
              Reversed the ownership relationship between Interpreter and JSGlobalObject.
              Now, the JSGlobalObject owns the Interpreter, and top-level objects
              that need the two to persist just protect the JSGlobalObject from GC.
              
              Global object bootstrapping looks a little odd right now, but it will
              make much more sense soon, after further rounds of refactoring.
      
              * bindings/runtime_root.h: Made this class inherit from RefCounted,
              to avoid code duplication.
      
              * kjs/collector.cpp:
              (KJS::Collector::collect): No need to give special GC treatment to 
              Interpreters, since we mark their global objects, which mark them.
      
              * kjs/interpreter.cpp:
              (KJS::Interpreter::mark): No need to mark our global object, since it
              marks us.
              * kjs/interpreter.h: Don't inherit from RefCounted -- JSGlobalObject 
              owns us directly.
      
              * kjs/testkjs.cpp: Modified to follow the new rules.
              (createGlobalObject):
              (runWithScripts):
      
      JavaScriptGlue:
      
              Reviewed by Beth Dakin.
              
              Modified to follow new JSGlobalObject/Interpreter ownership rules 
              in JavaScriptCore.
      
              * JSRun.cpp:
              (JSRun::JSRun):
              (JSRun::GetInterpreter):
              (JSRun::Evaluate):
              (JSRun::CheckSyntax):
              * JSRun.h:
              * JSValueWrapper.cpp:
              (unprotectGlobalObject):
              (initializeGlobalObjectKey):
              (getThreadGlobalExecState):
      
      WebCore:
      
              Reviewed by Beth Dakin.
              
              Modified WebCore to follow the new JSGlobalObject/Interpreter ownership
              rules in JavaScriptCore.
      
              * bindings/js/kjs_binding.cpp:
              * bindings/js/kjs_binding.h: Removed stale, unused 
              interpreterForGlobalObject().
      
              * bindings/js/kjs_proxy.cpp: Changed to store a global object, rather
              than an interpreter.
              (WebCore::KJSProxy::finishedWithEvent): Need to NULL check 
              m_globalObject here because we no longer unnecessarily instantiate it.
      
              * bindings/js/kjs_window.cpp:
              (KJS::ScheduledAction::execute):
              * bindings/js/kjs_window.h: Removed redundant and less efficient 
              interpreter() function -- global objects have direct access to their
              interpreters now.
      
              Changed these functions to pass around JSGlobalObjects instead of 
              Interpreters:
      
              * page/Frame.cpp:
              (WebCore::Frame::bindingRootObject):
              (WebCore::Frame::createRootObject):
              * page/Frame.h:
              * page/mac/WebCoreFrameBridge.mm:
              (createRootObject):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41893215
  7. 30 Nov, 2007 5 commits
  8. 29 Nov, 2007 4 commits