1. 27 Jun, 2008 6 commits
    • weinig@apple.com's avatar
      2008-06-27 Sam Weinig <sam@webkit.org> · 2d983abd
      weinig@apple.com authored
              Reviewed by Oliver Hunt.
              Fix platforms that don't use AllInOne.cpp
              * kjs/BooleanConstructor.h:
              * kjs/BooleanPrototype.h:
              * kjs/FunctionPrototype.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig@apple.com's avatar
      2008-06-27 Sam Weinig <sam@webkit.org> · 282b0a4e
      weinig@apple.com authored
              Rubber-stamped by Oliver Hunt.
              Splits ArrayConstructor out of ArrayPrototype.h/cpp
              Splits BooleanConstructor and BooleanPrototype out of BooleanObject.h/cpp
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * VM/Machine.cpp:
              * kjs/AllInOneFile.cpp:
              * kjs/ArrayConstructor.cpp: Copied from kjs/ArrayPrototype.cpp.
              * kjs/ArrayConstructor.h: Copied from kjs/ArrayPrototype.h.
              * kjs/ArrayPrototype.cpp:
              * kjs/ArrayPrototype.h:
              * kjs/BooleanConstructor.cpp: Copied from kjs/BooleanObject.cpp.
              * kjs/BooleanConstructor.h: Copied from kjs/BooleanObject.h.
              * kjs/BooleanObject.cpp:
              * kjs/BooleanObject.h:
              * kjs/BooleanPrototype.cpp: Copied from kjs/BooleanObject.cpp.
              * kjs/BooleanPrototype.h: Copied from kjs/BooleanObject.h.
              * kjs/CommonIdentifiers.h:
              * kjs/FunctionPrototype.cpp:
              * kjs/JSArray.cpp:
              * kjs/JSGlobalObject.cpp:
              * kjs/JSImmediate.cpp:
              * kjs/Shell.cpp:
              * kjs/internal.cpp:
              * kjs/nodes.cpp:
              * kjs/string_object.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • oliver@apple.com's avatar
      Bug 18626: SQUIRRELFISH: support the "slow script" dialog... · c8f3a755
      oliver@apple.com authored
      Bug 18626: SQUIRRELFISH: support the "slow script" dialog <https://bugs.webkit.org/show_bug.cgi?id=18626>
      <rdar://problem/5973931> Slow script dialog needs to be reimplemented for squirrelfish
      Reviewed by Sam
      Adds support for the slow script dialog in squirrelfish.  This requires the addition
      of three new op codes, op_loop, op_loop_if_true, and op_loop_if_less which have the
      same behaviour as their simple jump equivalents but have an additional time out check.
      Additional assertions were added to other jump instructions to prevent accidentally
      creating loops with jump types that do not support time out checks.
      Sunspider does not report a regression, however this appears very sensitive to code
      layout and hardware, so i would expect up to a 1% regression on other systems.
      Part of this required moving the old timeout logic from JSGlobalObject and into Machine
      which is the cause of a number of the larger diff blocks.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • jmalonzo@webkit.org's avatar
      2008-06-27 Jan Michael Alonzo <jmalonzo@webkit.org> · 86e13f0e
      jmalonzo@webkit.org authored
              Gtk and Qt build fix: Remove RegisterFileStack from the build
              * GNUmakefile.am:
              * JavaScriptCore.pri:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • adele@apple.com's avatar
      2008-06-27 Adele Peterson <adele@apple.com> · 2e1114a5
      adele@apple.com authored
              Reviewed by Geoff.
              Build fixes. 
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * VM/RegisterFile.h:
              * kjs/JSGlobalObject.cpp:
              * kjs/collector.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ggaren@apple.com's avatar
      JavaScriptCore: · 82a62d05
      ggaren@apple.com authored
      2008-06-27  Geoffrey Garen  <ggaren@apple.com>
              Reviewed by Oliver Hunt.
              One RegisterFile to rule them all!
              SunSpider reports a 0.2% speedup.
              This patch removes the RegisterFileStack abstraction and replaces it with
              a single register file that
              (a) allocates a fixed storage area, including a fixed area for global
              vars, so that no operation may cause the register file to reallocate
              (b) swaps between global storage areas when executing code in different 
              global objects.
              This patch also changes the layout of the register file so that all call
              frames, including call frames for global code, get a header. This is
              required to support re-entrant global code. It also just makes things simpler.
              * VM/CodeGenerator.cpp:
              (KJS::CodeGenerator::addGlobalVar): New function. Differs from addVar in
              (a) global vars don't contribute to a CodeBlock's numLocals count, since
              global storage is fixed and allocated at startup
              (b) references to global vars get shifted to elide intermediate stack
              between "r" and the global storage area.
              * VM/Machine.cpp:
              (KJS::Machine::dumpRegisters): Updated this function to match the new
              register file layout, and added the ability to dump exact identifiers
              for the different parts of a call frame.
              (KJS::Machine::unwindCallFrame): Updated this function to match the new
              register file layout.
              (KJS::Machine::execute): Updated this function to initialize a call frame
              header for global code, and to swap global storage areas when switching
              to execution in a new global object.
              (KJS::Machine::privateExecute): Got rid of "safeForReentry" and re-reading
              of registerBase because the register file is always safe for reentry now,
              and registerBase never changes.
              * VM/Machine.h: Moved the call frame header enum from Machine to RegisterFile,
              to resolve a header dependency problem (a good sign that the enum belonged
              in RegisterFile all along!)
              * VM/RegisterFile.cpp:
              * VM/RegisterFile.h: Changed RegisterFile to mmap a fixed size register
              area. This allows us to avoid re-allocting the register file later on.
              Instead, we rely on the OS to allocate physical pages to the register
              file as necessary.
              * VM/RegisterFileStack.cpp: Removed. Tada!
              * VM/RegisterFileStack.h: Removed. Tada!
              * kjs/DebuggerCallFrame.cpp: Updated this class to match the new
              register file layout, greatly simplifying it in the process.
              * kjs/JSActivation.h:
              * kjs/JSActivation.cpp: Moved some of this logic up to JSVariableObject,
              since the global object now needs to be able to tear off its registers
              just like the activation object.
              * kjs/JSFunction.cpp: No need to fiddle with the register file anymore.
              * kjs/JSGlobalObject.h:
              * kjs/JSGlobalObject.cpp: Updated JSGlobalObject to support moving its
              global storage area into and out of the register file.
              * kjs/PropertySlot.cpp: No need to fiddle with the register file anymore.
              * kjs/collector.cpp: Renamed markStackObjectConservatively to
              markConservatively, since we don't just mark stack objects this way.
              Also, added code to mark the machine's register file.
              * kjs/config.h: Moved some platforms #defines from here...
              * wtf/Platform.h: ...to here, to support mmap/VirtualAlloc detection
              in RegisterFile.h.
      2008-06-26  Geoffrey Garen  <ggaren@apple.com>
              Reviewed by Oliver Hunt.
              Added a test for what happens when a script exceeds the limit on declared
              global variables.
              * fast/js/global-var-limit-expected.txt: Added.
              * fast/js/global-var-limit.html: Added.
              * fast/js/global-recursion-on-full-stack-expected.txt: Updated for new
              (slightly more correct) behavior. Since the stack overflow happens in the
              middle of a try/catch block, it should be caught, instead of logged to
              the console.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  2. 26 Jun, 2008 5 commits
    • mrowe@apple.com's avatar
      Speculative fix for the Windows build. · b0edc921
      mrowe@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mrowe@apple.com's avatar
      2008-06-26 Mark Rowe <mrowe@apple.com> · 90bfc79c
      mrowe@apple.com authored
              Reviewed by Darin Adler and Geoff Garen.
              Fix the malloc zone introspection functions so that malloc_zone_statistics does not give
              bogus output in an application that uses JavaScriptCore.
              * kjs/CollectorHeapIntrospector.cpp:
              (KJS::CollectorHeapIntrospector::statistics): Return statistics about memory allocated by the collector.
              * kjs/CollectorHeapIntrospector.h:
              * wtf/FastMalloc.cpp: Zero out the statistics.  FastMalloc doesn't track this information at present.
              Returning zero for all values is preferable to returning bogus data.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin@apple.com's avatar
      2008-06-26 Darin Adler <darin@apple.com> · 59c4d4eb
      darin@apple.com authored
              Reviewed by Geoff.
              - https://bugs.webkit.org/show_bug.cgi?id=19721
                speed up JavaScriptCore by not wrapping strings in objects just
                to call functions on them
              - optimize UString append and the replace function a bit
              SunSpider says 1.8% faster.
              * JavaScriptCore.exp: Updated.
              * VM/JSPropertyNameIterator.cpp: Added include of JSString.h, now needed
              because jsString returns a JSString*.
              * VM/Machine.cpp:
              (KJS::Machine::privateExecute): Removed the toObject call from native
              function calls. Also removed code to put the this value into a register.
              * kjs/BooleanObject.cpp:
              (KJS::booleanProtoFuncToString): Rewrite to handle false and true
              * kjs/FunctionPrototype.cpp:
              (KJS::constructFunction): Use single-character append rather than building
              a string for each character.
              * kjs/JSFunction.cpp:
              (KJS::globalFuncUnescape): Ditto.
              * kjs/JSImmediate.cpp:
              (KJS::JSImmediate::prototype): Added. Gets the appropriate prototype for
              use with an immediate value. To be used instead of toObject when doing a
              get on an immediate value.
              * kjs/JSImmediate.h: Added prototype.
              * kjs/JSObject.cpp:
              (KJS::JSObject::toString): Tweaked formatting.
              * kjs/JSObject.h:
              (KJS::JSValue::get): Use prototype instead of toObject to avoid creating
              an object wrapper just to search for properties. This also saves an
              unnecessary hash table lookup since the object wrappers themselves don't
              have any properties.
              * kjs/JSString.h: Added toThisString and toThisJSString.
              * kjs/JSValue.cpp:
              (KJS::JSCell::toThisString): Added.
              (KJS::JSCell::toThisJSString): Added.
              (KJS::JSCell::getJSNumber): Added.
              (KJS::jsString): Changed return type to JSString*.
              (KJS::jsOwnedString): Ditto.
              * kjs/JSValue.h:
              (KJS::JSValue::toThisString): Added.
              (KJS::JSValue::toThisJSString): Added.
              (KJS::JSValue::getJSNumber): Added.
              * kjs/NumberObject.cpp:
              (KJS::NumberObject::getJSNumber): Added.
              (KJS::integer_part_noexp): Append C string directly rather than first
              turning it into a UString.
              (KJS::numberProtoFuncToString): Use getJSNumber to check if the value
              is a number rather than isObject(&NumberObject::info). This works for
              immediate numbers, number cells, and NumberObject instances.
              (KJS::numberProtoFuncToLocaleString): Ditto.
              (KJS::numberProtoFuncValueOf): Ditto.
              (KJS::numberProtoFuncToFixed): Ditto.
              (KJS::numberProtoFuncToExponential): Ditto.
              (KJS::numberProtoFuncToPrecision): Ditto.
              * kjs/NumberObject.h: Added getJSNumber.
              * kjs/PropertySlot.cpp: Tweaked comment.
              * kjs/internal.cpp:
              (KJS::JSString::toThisString): Added.
              (KJS::JSString::toThisJSString): Added.
              (KJS::JSString::getOwnPropertySlot): Changed code that searches the
              prototype chain to start with the string prototype and not create a
              string object.
              (KJS::JSNumberCell::toThisString): Added.
              (KJS::JSNumberCell::getJSNumber): Added.
              * kjs/lookup.cpp:
              (KJS::staticFunctionGetter): Moved here, because there's no point in
              having a function that's only used for a function pointer be inline.
              (KJS::setUpStaticFunctionSlot): New function for getStaticFunctionSlot.
              * kjs/lookup.h:
              (KJS::staticValueGetter): Don't mark this inline. It doesn't make sense
              to have a function that's only used for a function pointer be inline.
              (KJS::getStaticFunctionSlot): Changed to get properties from the parent
              first before doing any handling of functions. This is the fastest way
              to return the function once the initial setup is done.
              * kjs/string_object.cpp:
              (KJS::StringObject::getPropertyNames): Call value() instead of getString(),
              avoiding an unnecessary virtual function call (the call to the type()
              function in the implementation of the isString() function).
              (KJS::StringObject::toString): Added.
              (KJS::StringObject::toThisString): Added.
              (KJS::StringObject::toThisJSString): Added.
              (KJS::substituteBackreferences): Rewrote to use a appending algorithm
              instead of a the old one that tried to replace in place.
              (KJS::stringProtoFuncReplace): Merged this function and the replace function.
              Replaced the hand-rolled dynamic arrays for source ranges and replacements
              with Vector.
              (KJS::stringProtoFuncToString): Handle JSString as well as StringObject.
              Removed the separate valueOf implementation, since it can just share this.
              (KJS::stringProtoFuncCharAt): Use toThisString, which handles JSString as
              well as StringObject, and is slightly more efficient than the old code too.
              (KJS::stringProtoFuncCharCodeAt): Ditto.
              (KJS::stringProtoFuncConcat): Ditto.
              (KJS::stringProtoFuncIndexOf): Ditto.
              (KJS::stringProtoFuncLastIndexOf): Ditto.
              (KJS::stringProtoFuncMatch): Ditto.
              (KJS::stringProtoFuncSearch): Ditto.
              (KJS::stringProtoFuncSlice): Ditto.
              (KJS::stringProtoFuncSplit): Ditto.
              (KJS::stringProtoFuncSubstr): Ditto.
              (KJS::stringProtoFuncSubstring): Ditto.
              (KJS::stringProtoFuncToLowerCase): Use toThisJSString.
              (KJS::stringProtoFuncToUpperCase): Ditto.
              (KJS::stringProtoFuncToLocaleLowerCase): Ditto.
              (KJS::stringProtoFuncToLocaleUpperCase): Ditto.
              (KJS::stringProtoFuncLocaleCompare): Ditto.
              (KJS::stringProtoFuncBig): Use toThisString.
              (KJS::stringProtoFuncSmall): Ditto.
              (KJS::stringProtoFuncBlink): Ditto.
              (KJS::stringProtoFuncBold): Ditto.
              (KJS::stringProtoFuncFixed): Ditto.
              (KJS::stringProtoFuncItalics): Ditto.
              (KJS::stringProtoFuncStrike): Ditto.
              (KJS::stringProtoFuncSub): Ditto.
              (KJS::stringProtoFuncSup): Ditto.
              (KJS::stringProtoFuncFontcolor): Ditto.
              (KJS::stringProtoFuncFontsize): Ditto.
              (KJS::stringProtoFuncAnchor): Ditto.
              (KJS::stringProtoFuncLink): Ditto.
              * kjs/string_object.h: Added toString, toThisString, and toThisJSString.
              * kjs/ustring.cpp:
              (KJS::UString::append): Added a version that takes a character pointer and
              size, so we don't have to create a UString just to append to another UString.
              * kjs/ustring.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ap@webkit.org's avatar
      Reviewed by Maciej. · 0b7e63be
      ap@webkit.org authored
              Make JSGlobalData per-thread.
              No change on SunSpider total.
              * wtf/ThreadSpecific.h: Re-enabled the actual implementation.
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::~JSGlobalObject): Re-added a JSLock-related assertion. We'll probably
              want to preserve these somehow to keep legacy behavior in working condition.
              (KJS::JSGlobalObject::init): Initialize globalData pointer earlier, so that it is ready
              when updating JSGlobalObject linked list.
              * kjs/JSGlobalObject.h: (KJS::JSGlobalObject::head): Changed head() to be non-static, and
              to use JSGlobalData associated with the current object.
              * kjs/InitializeThreading.cpp: (KJS::initializeThreadingOnce): Removed a no longer needed
              Heap::registerAsMainThread() call.
              * kjs/JSGlobalData.h: Removed a lying lie comment - parserObjectExtraRefCounts is not
              transient, and while newParserObjects may conceptually be such, there is still some node
              manipulation going on outside Parser::parse which touches it.
              * kjs/JSGlobalData.cpp:
              (KJS::JSGlobalData::~JSGlobalData): Delete recently added members.
              (KJS::JSGlobalData::sharedInstance): Actually use a separate instance.
              * kjs/collector.cpp:
              (KJS::Heap::~Heap): Added a destructor, which unconditionally deletes everything.
              (KJS::Heap::sweep): Removed code related to "collect on main thread only" logic.
              (KJS::Heap::collect): Ditto.
              (KJS::Heap::globalObjectCount): Explicitly use per-thread instance of JSGlobalObject linked
              list now that JSGlobalObject::head() is not static. Curently, WebCoreStatistics methods only
              work with the main thread currently anyway.
              (KJS::Heap::protectedGlobalObjectCount): Ditto.
              * kjs/collector.h: Removed code related to "collect on main thread only" logic.
              * JavaScriptCore.exp: Removed Heap::collectOnMainThreadOnly.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ap@webkit.org's avatar
      Reviewed by Darin. · 66abd69a
      ap@webkit.org authored
              REGRESSION: Crash in sort() when visiting http://www.onnyturf.com/subway/
              * kjs/JSArray.cpp: (KJS::AVLTreeAbstractorForArrayCompare::set_balance_factor):
              Made changing balance factor from -1 to +1 work correctly.
              * wtf/AVLTree.h: (KJS::AVLTreeDefaultBSet::operator[]): Added an assertion that catches
              this slightly earlier.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  3. 25 Jun, 2008 5 commits
    • timothy@apple.com's avatar
      Fixes an ASSERT in the profiler when starting multiple profiles · d5f3b85e
      timothy@apple.com authored
              with the same name inside the same function/program.
              Reviewed by Kevin McCullough.
              * profiler/Profile.cpp:
              (KJS::Profile::Profile): Initialize m_stoppedCallDepth to zero.
              (KJS::Profile::stopProfiling): Set the current node to the parent,
              because we are in a call that will not get a didExecute call.
              (KJS::Profile::removeProfile): Increment m_stoppedCallDepth to
              account for didExecute not being called for profile.
              (KJS::Profile::willExecute): Increment m_stoppedCallDepth if stopped.
              (KJS::Profile::didExecute): Decrement m_stoppedCallDepth if stopped and
              greater than zero, and return early.
              * profiler/Profile.h: Added stoppedProfiling().
              * profiler/Profiler.cpp:
              (KJS::Profiler::findProfile): Removed.
              (KJS::Profiler::startProfiling): Don't return early for stopped profiles.
              (KJS::Profiler::stopProfiling): Skipp stopped profiles.
              (KJS::Profiler::didFinishAllExecution): Code clean-up.
              * profiler/Profiler.h: Removed findProfile.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • cwzwarich@webkit.org's avatar
      2008-06-25 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 7576c03d
      cwzwarich@webkit.org authored
              Reviewed by Alexey Proskuryakov.
              Attempt to fix Windows debug build. The compiler gives a warning when
              Structured Exception Handling and destructors are used in the same
              function. Using manual locking and unlocking instead of constructors
              and destructors should fix the warning.
              * kjs/Shell.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ap@webkit.org's avatar
      Forgot to address a review comment about better names for tracked objects, doing it now. · a9535cf0
      ap@webkit.org authored
              * kjs/JSGlobalData.cpp:
              * kjs/JSGlobalData.h:
              * kjs/nodes.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ap@webkit.org's avatar
      Reviewed by Geoff. · 9e7ecd38
      ap@webkit.org authored
              Remove more threadInstance() calls.
              * kjs/JSFunction.cpp:
              * kjs/JSFunction.h:
              Access nullIdentifier without going to thread specific storage.
              * JavaScriptCore.exp:
              * kjs/JSGlobalData.cpp:
              * kjs/JSGlobalData.h:
              * kjs/Parser.cpp:
              * kjs/Parser.h:
              * kjs/grammar.y:
              * kjs/nodes.cpp:
              * kjs/nodes.h:
              Changed ParserRefCounted to hold a JSGlobalData pointer, and used it to replace
              threadInstance calls.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • cwzwarich@webkit.org's avatar
      2008-06-24 Cameron Zwarich <cwzwarich@uwaterloo.ca> · d81ad203
      cwzwarich@webkit.org authored
              Reviewed by Alexey Proskuryakov.
              Make the JavaScript shell collect the heap from main() instead of
              jscmain() to suppress leak messages in debug builds.
              * kjs/Shell.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  4. 24 Jun, 2008 11 commits
  5. 23 Jun, 2008 5 commits
    • mrowe@apple.com's avatar
      Prepration for returning memory to the OS on Windows. Track whether a portion... · 20c85fe3
      mrowe@apple.com authored
      Prepration for returning memory to the OS on Windows.  Track whether a portion of a span of memory was returned to the OS.
      If it was, ask that it be recommitted before returning it to the application as an allocated region.
      Reviewed by Oliver Hunt.
      * wtf/FastMalloc.cpp:
      (WTF::TCMalloc_PageHeap::New):  If the span was decommitted, ask that it be recommitted before returning it.
      (WTF::TCMalloc_PageHeap::AllocLarge):  Ditto.
      (WTF::TCMalloc_PageHeap::Carve):  When splitting a span, ensure that the decommitted state propogates to the two new spans.
      (WTF::TCMalloc_PageHeap::Delete):  When merging a span, ensure that the resulting span is marked as decommitted if any of the
      spans being merged were marked as decommitted.
      (WTF::TCMalloc_PageHeap::IncrementalScavenge):  Mark as decommitted after releasing the span.
      (WTF::TCMalloc_Central_FreeList::FetchFromSpans): Add an assertion to catch a decommitted span being returned to the application
      without first being recommitted.
      (WTF::TCMalloc_Central_FreeList::Populate): Ditto.
      * wtf/TCSystemAlloc.cpp: Stub out TCMalloc_SystemCommit.
      * wtf/TCSystemAlloc.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mrowe@apple.com's avatar
      Remove the sample member of Span when NO_TCMALLOC_SAMPLES is defined. · 8ace5e01
      mrowe@apple.com authored
      Reviewed by Sam Weinig.
      * wtf/FastMalloc.cpp:
      (WTF::TCMalloc_PageHeap::Delete): Only update Span::sample if NO_TCMALLOC_SAMPLES is not defined.
      (WTF::TCMallocStats::do_free):  Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin@apple.com's avatar
      JavaScriptCore: · 1edff436
      darin@apple.com authored
      2008-06-23  Darin Adler  <darin@apple.com>
              Reviewed by Geoff.
              - work toward https://bugs.webkit.org/show_bug.cgi?id=19721
              More preparation toward making functions work on primitive types without
              creating wrapper objects. No speedup this time, but prepares for a future
              speedup without slowing things down.
              SunSpider reports no change.
              - Eliminated the implementsCall, callAsFunction and construct virtual
                functions from JSObject. Instead, the CallData and ConstructData for
                a native function includes a function pointer that the caller can use
                directly. Changed all call sites to use CallData and ConstructData.
              - Changed the "this" argument to native functions to be a JSValue rather
                than a JSObject. This prepares us for passing primitives into these
                functions. The conversion to an object now must be done inside the
                function. Critically, if it's a function that can be c...
    • cwzwarich@webkit.org's avatar
      2008-06-23 Cameron Zwarich <cwzwarich@uwaterloo.ca> · a2e0ef7d
      cwzwarich@webkit.org authored
              Reviewed by Oliver.
              Bug 19716: REGRESSION (SquirrelFish): Reproducible crash after entering a username at mint.com
              When unwinding callframes for exceptions, check whether the callframe
              was created by a reentrant native call to JavaScript after tearing off
              the local variables instead of before.
              * VM/Machine.cpp:
              * fast/js/reentrant-call-unwind-expected.txt: Added.
              * fast/js/reentrant-call-unwind.html: Added.
              * fast/js/resources/reentrant-call-unwind.js: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mrowe@apple.com's avatar
      Get testapi passing again in a debug build. · f558995b
      mrowe@apple.com authored
      Reviewed by Oliver Hunt.
      * API/testapi.c:
      (main): Update the expected output of calling JSValueMakeString on a function object.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  6. 21 Jun, 2008 7 commits
  7. 20 Jun, 2008 1 commit
    • timothy@apple.com's avatar
      Fixed an ASSERT(m_actualSelfTime <= m_actualTotalTime) when starting · e99936a5
      timothy@apple.com authored
              and stopping a profile from the Develop menu. Also prevents
              inserting an incorrect parent node as the new head after profiling
              is stopped from the Develop menu.
              Reviewed by Dan Bernstein.
              * profiler/Profile.cpp:
              (KJS::Profile::stopProfiling): If the current node is already the head
              then there is no more need to record future nodes in didExecute.
              (KJS::Profile::didExecute): Move the code of setupCurrentNodeAsStopped
              into here since this was the only caller. When setting the total time
              keep any current total time while adding the self time of the head.
              (KJS::Profile::setupCurrentNodeAsStopped): Removed.
              * profiler/Profile.h: Removed setupCurrentNodeAsStopped.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34710 268f45cc-cd09-0410-ab3c-d52691b4dbfc