1. 27 Jun, 2008 5 commits
    • 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
      282b0a4e
    • 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
      c8f3a755
    • 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
              scripts.
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      86e13f0e
    • 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::RegisterFile::RegisterFile):
              * kjs/JSGlobalObject.cpp:
              * kjs/collector.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e1114a5
    • 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
              
              and
      
              (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
              that
              
              (a) global vars don't contribute to a CodeBlock's numLocals count, since
              global storage is fixed and allocated at startup
              
              and
              
              (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.
      
      LayoutTests:
      
      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
      82a62d05
  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
      b0edc921
    • 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
      90bfc79c
    • 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
              separately.
      
              * 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
      59c4d4eb
    • 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):
              (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
      0b7e63be
    • ap@webkit.org's avatar
      Reviewed by Darin. · 66abd69a
      ap@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=19767
              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
      66abd69a
  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
      d5f3b85e
    • 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:
              (main):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7576c03d
    • 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::JSGlobalData):
              * kjs/JSGlobalData.h:
              * kjs/nodes.cpp:
              (KJS::ParserRefCounted::ParserRefCounted):
              (KJS::ParserRefCounted::ref):
              (KJS::ParserRefCounted::deref):
              (KJS::ParserRefCounted::hasOneRef):
              (KJS::ParserRefCounted::deleteNewObjects):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9535cf0
    • ap@webkit.org's avatar
      Reviewed by Geoff. · 9e7ecd38
      ap@webkit.org authored
              Remove more threadInstance() calls.
      
              * kjs/JSFunction.cpp:
              (KJS::JSFunction::getParameterName):
              (KJS::IndexToNameMap::unMap):
              (KJS::Arguments::deleteProperty):
              * kjs/JSFunction.h:
              Access nullIdentifier without going to thread specific storage.
      
              * JavaScriptCore.exp:
              * kjs/JSGlobalData.cpp:
              (KJS::JSGlobalData::JSGlobalData):
              * kjs/JSGlobalData.h:
              * kjs/Parser.cpp:
              (KJS::Parser::parse):
              * kjs/Parser.h:
              (KJS::ParserRefCountedData::ParserRefCountedData):
              (KJS::Parser::parse):
              * kjs/grammar.y:
              * kjs/nodes.cpp:
              (KJS::ParserRefCounted::ParserRefCounted):
              (KJS::ParserRefCounted::ref):
              (KJS::ParserRefCounted::deref):
              (KJS::ParserRefCounted::hasOneRef):
              (KJS::ParserRefCounted::deleteNewObjects):
              (KJS::Node::Node):
              (KJS::StatementNode::StatementNode):
              (KJS::BreakpointCheckStatement::BreakpointCheckStatement):
              (KJS::ConstDeclNode::ConstDeclNode):
              (KJS::BlockNode::BlockNode):
              (KJS::ForInNode::ForInNode):
              (KJS::ScopeNode::ScopeNode):
              (KJS::ProgramNode::ProgramNode):
              (KJS::ProgramNode::create):
              (KJS::EvalNode::EvalNode):
              (KJS::EvalNode::create):
              (KJS::FunctionBodyNode::FunctionBodyNode):
              (KJS::FunctionBodyNode::create):
              * kjs/nodes.h:
              (KJS::ExpressionNode::):
              (KJS::NullNode::):
              (KJS::BooleanNode::):
              (KJS::NumberNode::):
              (KJS::ImmediateNumberNode::):
              (KJS::StringNode::):
              (KJS::RegExpNode::):
              (KJS::ThisNode::):
              (KJS::ResolveNode::):
              (KJS::ElementNode::):
              (KJS::ArrayNode::):
              (KJS::PropertyNode::):
              (KJS::PropertyListNode::):
              (KJS::ObjectLiteralNode::):
              (KJS::BracketAccessorNode::):
              (KJS::DotAccessorNode::):
              (KJS::ArgumentListNode::):
              (KJS::ArgumentsNode::):
              (KJS::NewExprNode::):
              (KJS::EvalFunctionCallNode::):
              (KJS::FunctionCallValueNode::):
              (KJS::FunctionCallResolveNode::):
              (KJS::FunctionCallBracketNode::):
              (KJS::FunctionCallDotNode::):
              (KJS::PrePostResolveNode::):
              (KJS::PostIncResolveNode::):
              (KJS::PostDecResolveNode::):
              (KJS::PostfixBracketNode::):
              (KJS::PostIncBracketNode::):
              (KJS::PostDecBracketNode::):
              (KJS::PostfixDotNode::):
              (KJS::PostIncDotNode::):
              (KJS::PostDecDotNode::):
              (KJS::PostfixErrorNode::):
              (KJS::DeleteResolveNode::):
              (KJS::DeleteBracketNode::):
              (KJS::DeleteDotNode::):
              (KJS::DeleteValueNode::):
              (KJS::VoidNode::):
              (KJS::TypeOfResolveNode::):
              (KJS::TypeOfValueNode::):
              (KJS::PreIncResolveNode::):
              (KJS::PreDecResolveNode::):
              (KJS::PrefixBracketNode::):
              (KJS::PreIncBracketNode::):
              (KJS::PreDecBracketNode::):
              (KJS::PrefixDotNode::):
              (KJS::PreIncDotNode::):
              (KJS::PreDecDotNode::):
              (KJS::PrefixErrorNode::):
              (KJS::UnaryOpNode::UnaryOpNode):
              (KJS::UnaryPlusNode::):
              (KJS::NegateNode::):
              (KJS::BitwiseNotNode::):
              (KJS::LogicalNotNode::):
              (KJS::BinaryOpNode::BinaryOpNode):
              (KJS::ReverseBinaryOpNode::ReverseBinaryOpNode):
              (KJS::MultNode::):
              (KJS::DivNode::):
              (KJS::ModNode::):
              (KJS::AddNode::):
              (KJS::SubNode::):
              (KJS::LeftShiftNode::):
              (KJS::RightShiftNode::):
              (KJS::UnsignedRightShiftNode::):
              (KJS::LessNode::):
              (KJS::GreaterNode::):
              (KJS::LessEqNode::):
              (KJS::GreaterEqNode::):
              (KJS::InstanceOfNode::):
              (KJS::InNode::):
              (KJS::EqualNode::):
              (KJS::NotEqualNode::):
              (KJS::StrictEqualNode::):
              (KJS::NotStrictEqualNode::):
              (KJS::BitAndNode::):
              (KJS::BitOrNode::):
              (KJS::BitXOrNode::):
              (KJS::LogicalAndNode::):
              (KJS::LogicalOrNode::):
              (KJS::ConditionalNode::):
              (KJS::ReadModifyResolveNode::):
              (KJS::AssignResolveNode::):
              (KJS::ReadModifyBracketNode::):
              (KJS::AssignBracketNode::):
              (KJS::AssignDotNode::):
              (KJS::ReadModifyDotNode::):
              (KJS::AssignErrorNode::):
              (KJS::CommaNode::):
              (KJS::VarDeclCommaNode::):
              (KJS::ConstStatementNode::):
              (KJS::SourceElements::SourceElements):
              (KJS::EmptyStatementNode::):
              (KJS::DebuggerStatementNode::):
              (KJS::ExprStatementNode::):
              (KJS::VarStatementNode::):
              (KJS::IfNode::):
              (KJS::IfElseNode::):
              (KJS::DoWhileNode::):
              (KJS::WhileNode::):
              (KJS::ForNode::):
              (KJS::ContinueNode::):
              (KJS::BreakNode::):
              (KJS::ReturnNode::):
              (KJS::WithNode::):
              (KJS::LabelNode::):
              (KJS::ThrowNode::):
              (KJS::TryNode::):
              (KJS::ParameterNode::):
              (KJS::FuncExprNode::):
              (KJS::FuncDeclNode::):
              (KJS::CaseClauseNode::):
              (KJS::ClauseListNode::):
              (KJS::CaseBlockNode::):
              (KJS::SwitchNode::):
              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
      9e7ecd38
    • 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:
              (main):
              (jscmain):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d81ad203
  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
      20c85fe3
    • 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
      8ace5e01
    • 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 called on a DOM
                window object, then we have to be sure to call toThisObject on the
                argument before we use it for anything even if it's already an object.
      
              - Eliminated the practice of using constructor objects in the global
                object to make objects of the various basic types. Since these
                constructors can't be replaced by script, there's no reason to involve
                a constructor object at all. Added functions to do the construction
                directly.
      
              - Made some more class members private and protected, including virtual
                function overrides. This can catch code using unnecessarily slow virtual
                function code paths when the type of an object is known statically. If we
                later find a new reason use the members outside the class it's easy to
                make them public again.
      
              - Moved the declarations of the native implementations for functions out
                of header files. These can have internal linkage and be declared inside
                the source file.
      
              - Changed PrototypeFunction to take function pointers with the right
                arguments to be put directly into CallData. This eliminates the
                need to have a separate PrototypeReflexiveFunction, and reveals that the
                real purpose of that class included something else specific to eval --
                storage of a cached global object. So renamed PrototypeReflexiveFunction
                to GlobalEvalFunction.
      
              * API/JSCallbackConstructor.cpp:
              (KJS::constructJSCallback):
              (KJS::JSCallbackConstructor::getConstructData):
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              (KJS::JSCallbackFunction::implementsHasInstance):
              (KJS::JSCallbackFunction::call):
              (KJS::JSCallbackFunction::getCallData):
              * API/JSCallbackFunction.h:
              (KJS::JSCallbackFunction::classInfo):
              * API/JSCallbackObject.h:
              (KJS::JSCallbackObject::classRef):
              (KJS::JSCallbackObject::classInfo):
              * API/JSCallbackObjectFunctions.h:
              (KJS::::getConstructData):
              (KJS::::construct):
              (KJS::::getCallData):
              (KJS::::call):
              * API/JSObjectRef.cpp:
              (JSObjectMakeFunction):
              (JSObjectIsFunction):
              (JSObjectCallAsFunction):
              (JSObjectCallAsConstructor):
              * JavaScriptCore.exp:
              * VM/Machine.cpp:
              (KJS::jsTypeStringForValue):
              (KJS::Machine::privateExecute):
              * kjs/ArrayPrototype.cpp:
              (KJS::arrayProtoFuncToString):
              (KJS::arrayProtoFuncToLocaleString):
              (KJS::arrayProtoFuncJoin):
              (KJS::arrayProtoFuncConcat):
              (KJS::arrayProtoFuncPop):
              (KJS::arrayProtoFuncPush):
              (KJS::arrayProtoFuncReverse):
              (KJS::arrayProtoFuncShift):
              (KJS::arrayProtoFuncSlice):
              (KJS::arrayProtoFuncSort):
              (KJS::arrayProtoFuncSplice):
              (KJS::arrayProtoFuncUnShift):
              (KJS::arrayProtoFuncFilter):
              (KJS::arrayProtoFuncMap):
              (KJS::arrayProtoFuncEvery):
              (KJS::arrayProtoFuncForEach):
              (KJS::arrayProtoFuncSome):
              (KJS::arrayProtoFuncIndexOf):
              (KJS::arrayProtoFuncLastIndexOf):
              (KJS::ArrayConstructor::ArrayConstructor):
              (KJS::constructArrayWithSizeQuirk):
              (KJS::constructWithArrayConstructor):
              (KJS::ArrayConstructor::getConstructData):
              (KJS::callArrayConstructor):
              (KJS::ArrayConstructor::getCallData):
              * kjs/ArrayPrototype.h:
              * kjs/BooleanObject.cpp:
              (KJS::booleanProtoFuncToString):
              (KJS::booleanProtoFuncValueOf):
              (KJS::constructBoolean):
              (KJS::constructWithBooleanConstructor):
              (KJS::BooleanConstructor::getConstructData):
              (KJS::callBooleanConstructor):
              (KJS::BooleanConstructor::getCallData):
              (KJS::constructBooleanFromImmediateBoolean):
              * kjs/BooleanObject.h:
              * kjs/CallData.h:
              (KJS::):
              * kjs/ConstructData.h:
              (KJS::):
              * kjs/FunctionPrototype.cpp:
              (KJS::callFunctionPrototype):
              (KJS::FunctionPrototype::getCallData):
              (KJS::functionProtoFuncToString):
              (KJS::functionProtoFuncApply):
              (KJS::functionProtoFuncCall):
              (KJS::constructWithFunctionConstructor):
              (KJS::FunctionConstructor::getConstructData):
              (KJS::callFunctionConstructor):
              (KJS::FunctionConstructor::getCallData):
              (KJS::constructFunction):
              * kjs/FunctionPrototype.h:
              * kjs/JSArray.cpp:
              (KJS::AVLTreeAbstractorForArrayCompare::compare_key_key):
              (KJS::JSArray::sort):
              (KJS::constructEmptyArray):
              (KJS::constructArray):
              * kjs/JSArray.h:
              (KJS::JSArray::classInfo):
              * kjs/JSFunction.cpp:
              (KJS::JSFunction::call):
              (KJS::globalFuncEval):
              (KJS::globalFuncParseInt):
              (KJS::globalFuncParseFloat):
              (KJS::globalFuncIsNaN):
              (KJS::globalFuncIsFinite):
              (KJS::globalFuncDecodeURI):
              (KJS::globalFuncDecodeURIComponent):
              (KJS::globalFuncEncodeURI):
              (KJS::globalFuncEncodeURIComponent):
              (KJS::globalFuncEscape):
              (KJS::globalFuncUnescape):
              (KJS::globalFuncKJSPrint):
              (KJS::PrototypeFunction::PrototypeFunction):
              (KJS::PrototypeFunction::getCallData):
              (KJS::GlobalEvalFunction::GlobalEvalFunction):
              (KJS::GlobalEvalFunction::mark):
              * kjs/JSFunction.h:
              (KJS::InternalFunction::classInfo):
              (KJS::InternalFunction::functionName):
              (KJS::JSFunction::classInfo):
              (KJS::GlobalEvalFunction::cachedGlobalObject):
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::reset):
              (KJS::JSGlobalObject::mark):
              * kjs/JSGlobalObject.h:
              (KJS::JSGlobalObject::JSGlobalObject):
              (KJS::JSGlobalObject::evalFunction):
              * kjs/JSImmediate.cpp:
              (KJS::JSImmediate::toObject):
              * kjs/JSNotAnObject.cpp:
              * kjs/JSNotAnObject.h:
              * kjs/JSObject.cpp:
              (KJS::JSObject::put):
              (KJS::callDefaultValueFunction):
              (KJS::JSObject::defaultValue):
              (KJS::JSObject::lookupGetter):
              (KJS::JSObject::lookupSetter):
              (KJS::JSObject::hasInstance):
              (KJS::JSObject::fillGetterPropertySlot):
              (KJS::Error::create):
              (KJS::constructEmptyObject):
              * kjs/JSObject.h:
              (KJS::GetterSetter::GetterSetter):
              (KJS::GetterSetter::getter):
              (KJS::GetterSetter::setGetter):
              (KJS::GetterSetter::setter):
              (KJS::GetterSetter::setSetter):
              * kjs/JSValue.cpp:
              (KJS::JSCell::deleteProperty):
              (KJS::call):
              (KJS::construct):
              * kjs/JSValue.h:
              * kjs/MathObject.cpp:
              (KJS::mathProtoFuncAbs):
              (KJS::mathProtoFuncACos):
              (KJS::mathProtoFuncASin):
              (KJS::mathProtoFuncATan):
              (KJS::mathProtoFuncATan2):
              (KJS::mathProtoFuncCeil):
              (KJS::mathProtoFuncCos):
              (KJS::mathProtoFuncExp):
              (KJS::mathProtoFuncFloor):
              (KJS::mathProtoFuncLog):
              (KJS::mathProtoFuncMax):
              (KJS::mathProtoFuncMin):
              (KJS::mathProtoFuncPow):
              (KJS::mathProtoFuncRandom):
              (KJS::mathProtoFuncRound):
              (KJS::mathProtoFuncSin):
              (KJS::mathProtoFuncSqrt):
              (KJS::mathProtoFuncTan):
              * kjs/MathObject.h:
              * kjs/NumberObject.cpp:
              (KJS::numberProtoFuncToString):
              (KJS::numberProtoFuncToLocaleString):
              (KJS::numberProtoFuncValueOf):
              (KJS::numberProtoFuncToFixed):
              (KJS::numberProtoFuncToExponential):
              (KJS::numberProtoFuncToPrecision):
              (KJS::NumberConstructor::NumberConstructor):
              (KJS::constructWithNumberConstructor):
              (KJS::NumberConstructor::getConstructData):
              (KJS::callNumberConstructor):
              (KJS::NumberConstructor::getCallData):
              (KJS::constructNumber):
              (KJS::constructNumberFromImmediateNumber):
              * kjs/NumberObject.h:
              (KJS::NumberObject::classInfo):
              (KJS::NumberConstructor::classInfo):
              * kjs/PropertySlot.cpp:
              (KJS::PropertySlot::functionGetter):
              * kjs/RegExpObject.cpp:
              (KJS::regExpProtoFuncTest):
              (KJS::regExpProtoFuncExec):
              (KJS::regExpProtoFuncCompile):
              (KJS::regExpProtoFuncToString):
              (KJS::callRegExpObject):
              (KJS::RegExpObject::getCallData):
              (KJS::constructRegExp):
              (KJS::constructWithRegExpConstructor):
              (KJS::RegExpConstructor::getConstructData):
              (KJS::callRegExpConstructor):
              (KJS::RegExpConstructor::getCallData):
              * kjs/RegExpObject.h:
              (KJS::RegExpConstructor::classInfo):
              * kjs/Shell.cpp:
              (GlobalObject::GlobalObject):
              (functionPrint):
              (functionDebug):
              (functionGC):
              (functionVersion):
              (functionRun):
              (functionLoad):
              (functionReadline):
              (functionQuit):
              * kjs/date_object.cpp:
              (KJS::gmtoffset):
              (KJS::formatLocaleDate):
              (KJS::fillStructuresUsingDateArgs):
              (KJS::DateInstance::getTime):
              (KJS::DateInstance::getUTCTime):
              (KJS::DateConstructor::DateConstructor):
              (KJS::constructDate):
              (KJS::DateConstructor::getConstructData):
              (KJS::callDate):
              (KJS::DateConstructor::getCallData):
              (KJS::dateParse):
              (KJS::dateNow):
              (KJS::dateUTC):
              (KJS::dateProtoFuncToString):
              (KJS::dateProtoFuncToUTCString):
              (KJS::dateProtoFuncToDateString):
              (KJS::dateProtoFuncToTimeString):
              (KJS::dateProtoFuncToLocaleString):
              (KJS::dateProtoFuncToLocaleDateString):
              (KJS::dateProtoFuncToLocaleTimeString):
              (KJS::dateProtoFuncValueOf):
              (KJS::dateProtoFuncGetTime):
              (KJS::dateProtoFuncGetFullYear):
              (KJS::dateProtoFuncGetUTCFullYear):
              (KJS::dateProtoFuncToGMTString):
              (KJS::dateProtoFuncGetMonth):
              (KJS::dateProtoFuncGetUTCMonth):
              (KJS::dateProtoFuncGetDate):
              (KJS::dateProtoFuncGetUTCDate):
              (KJS::dateProtoFuncGetDay):
              (KJS::dateProtoFuncGetUTCDay):
              (KJS::dateProtoFuncGetHours):
              (KJS::dateProtoFuncGetUTCHours):
              (KJS::dateProtoFuncGetMinutes):
              (KJS::dateProtoFuncGetUTCMinutes):
              (KJS::dateProtoFuncGetSeconds):
              (KJS::dateProtoFuncGetUTCSeconds):
              (KJS::dateProtoFuncGetMilliSeconds):
              (KJS::dateProtoFuncGetUTCMilliseconds):
              (KJS::dateProtoFuncGetTimezoneOffset):
              (KJS::dateProtoFuncSetTime):
              (KJS::setNewValueFromTimeArgs):
              (KJS::setNewValueFromDateArgs):
              (KJS::dateProtoFuncSetMilliSeconds):
              (KJS::dateProtoFuncSetUTCMilliseconds):
              (KJS::dateProtoFuncSetSeconds):
              (KJS::dateProtoFuncSetUTCSeconds):
              (KJS::dateProtoFuncSetMinutes):
              (KJS::dateProtoFuncSetUTCMinutes):
              (KJS::dateProtoFuncSetHours):
              (KJS::dateProtoFuncSetUTCHours):
              (KJS::dateProtoFuncSetDate):
              (KJS::dateProtoFuncSetUTCDate):
              (KJS::dateProtoFuncSetMonth):
              (KJS::dateProtoFuncSetUTCMonth):
              (KJS::dateProtoFuncSetFullYear):
              (KJS::dateProtoFuncSetUTCFullYear):
              (KJS::dateProtoFuncSetYear):
              (KJS::dateProtoFuncGetYear):
              * kjs/date_object.h:
              (KJS::DateInstance::internalNumber):
              (KJS::DateInstance::classInfo):
              * kjs/error_object.cpp:
              (KJS::errorProtoFuncToString):
              (KJS::constructError):
              (KJS::constructWithErrorConstructor):
              (KJS::ErrorConstructor::getConstructData):
              (KJS::callErrorConstructor):
              (KJS::ErrorConstructor::getCallData):
              (KJS::NativeErrorConstructor::construct):
              (KJS::constructWithNativeErrorConstructor):
              (KJS::NativeErrorConstructor::getConstructData):
              (KJS::callNativeErrorConstructor):
              (KJS::NativeErrorConstructor::getCallData):
              * kjs/error_object.h:
              (KJS::NativeErrorConstructor::classInfo):
              * kjs/internal.cpp:
              (KJS::JSNumberCell::toObject):
              (KJS::JSNumberCell::toThisObject):
              (KJS::GetterSetter::mark):
              (KJS::GetterSetter::toPrimitive):
              (KJS::GetterSetter::toBoolean):
              (KJS::GetterSetter::toNumber):
              (KJS::GetterSetter::toString):
              (KJS::GetterSetter::toObject):
              (KJS::InternalFunction::InternalFunction):
              (KJS::InternalFunction::implementsHasInstance):
              * kjs/lookup.h:
              (KJS::HashEntry::):
              * kjs/nodes.cpp:
              (KJS::FuncDeclNode::makeFunction):
              (KJS::FuncExprNode::makeFunction):
              * kjs/object_object.cpp:
              (KJS::objectProtoFuncValueOf):
              (KJS::objectProtoFuncHasOwnProperty):
              (KJS::objectProtoFuncIsPrototypeOf):
              (KJS::objectProtoFuncDefineGetter):
              (KJS::objectProtoFuncDefineSetter):
              (KJS::objectProtoFuncLookupGetter):
              (KJS::objectProtoFuncLookupSetter):
              (KJS::objectProtoFuncPropertyIsEnumerable):
              (KJS::objectProtoFuncToLocaleString):
              (KJS::objectProtoFuncToString):
              (KJS::ObjectConstructor::ObjectConstructor):
              (KJS::constructObject):
              (KJS::constructWithObjectConstructor):
              (KJS::ObjectConstructor::getConstructData):
              (KJS::callObjectConstructor):
              (KJS::ObjectConstructor::getCallData):
              * kjs/object_object.h:
              * kjs/string_object.cpp:
              (KJS::replace):
              (KJS::stringProtoFuncToString):
              (KJS::stringProtoFuncValueOf):
              (KJS::stringProtoFuncCharAt):
              (KJS::stringProtoFuncCharCodeAt):
              (KJS::stringProtoFuncConcat):
              (KJS::stringProtoFuncIndexOf):
              (KJS::stringProtoFuncLastIndexOf):
              (KJS::stringProtoFuncMatch):
              (KJS::stringProtoFuncSearch):
              (KJS::stringProtoFuncReplace):
              (KJS::stringProtoFuncSlice):
              (KJS::stringProtoFuncSplit):
              (KJS::stringProtoFuncSubstr):
              (KJS::stringProtoFuncSubstring):
              (KJS::stringProtoFuncToLowerCase):
              (KJS::stringProtoFuncToUpperCase):
              (KJS::stringProtoFuncToLocaleLowerCase):
              (KJS::stringProtoFuncToLocaleUpperCase):
              (KJS::stringProtoFuncLocaleCompare):
              (KJS::stringProtoFuncBig):
              (KJS::stringProtoFuncSmall):
              (KJS::stringProtoFuncBlink):
              (KJS::stringProtoFuncBold):
              (KJS::stringProtoFuncFixed):
              (KJS::stringProtoFuncItalics):
              (KJS::stringProtoFuncStrike):
              (KJS::stringProtoFuncSub):
              (KJS::stringProtoFuncSup):
              (KJS::stringProtoFuncFontcolor):
              (KJS::stringProtoFuncFontsize):
              (KJS::stringProtoFuncAnchor):
              (KJS::stringProtoFuncLink):
              (KJS::stringFromCharCode):
              (KJS::StringConstructor::StringConstructor):
              (KJS::constructWithStringConstructor):
              (KJS::StringConstructor::getConstructData):
              (KJS::callStringConstructor):
              (KJS::StringConstructor::getCallData):
              * kjs/string_object.h:
      
      JavaScriptGlue:
      
      2008-06-23  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoff.
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectCallFunction): Updated to use getCallData and call instead
              of the old callAsFunction.
      
      WebCore:
      
      2008-06-23  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoff.
      
              Update for JavaScript changes.
      
              - Use CallData and ConstructData instead of the obsolete implementsCall,
                callAsFunction, and construct functions.
      
              - Updated native function arguments, specifically to allow a JSValue
                rather than a JSObject for the this argument, and to call toThisObject
                as needed when treating it as an object.
      
              - Made some more class members private and protected, including virtual
                function overrides.
      
              - Eliminated the use of getCallData in the JavaScript bridging code as
                a way to check if an instance supports invokeDefaultMethod.
      
              - Eliminated unnecessary polymorphism in the NodeIterator and TreeWalker
                classes. They were using virtual functions simply to share an instance
                of the RefCounted template, which was not helpful.
      
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::constructAudio):
              (WebCore::JSAudioConstructor::getConstructData):
              * bindings/js/JSAudioConstructor.h:
              (WebCore::JSAudioConstructor::document):
              (WebCore::JSAudioConstructor::classInfo):
              * bindings/js/JSClipboardCustom.cpp:
              (WebCore::JSClipboard::types):
              * bindings/js/JSCustomSQLStatementCallback.cpp:
              (WebCore::JSCustomSQLStatementCallback::handleEvent):
              * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
              (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
              * bindings/js/JSCustomSQLTransactionCallback.cpp:
              (WebCore::JSCustomSQLTransactionCallback::handleEvent):
              * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
              (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
              * bindings/js/JSCustomVoidCallback.cpp:
              (WebCore::JSCustomVoidCallback::handleEvent):
              * bindings/js/JSCustomXPathNSResolver.cpp:
              (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMObject::DOMObject):
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::windowProtoFuncAToB):
              (WebCore::windowProtoFuncBToA):
              (WebCore::windowProtoFuncOpen):
              (WebCore::windowProtoFuncSetTimeout):
              (WebCore::windowProtoFuncClearTimeout):
              (WebCore::windowProtoFuncSetInterval):
              (WebCore::windowProtoFuncAddEventListener):
              (WebCore::windowProtoFuncRemoveEventListener):
              (WebCore::windowProtoFuncShowModalDialog):
              (WebCore::windowProtoFuncNotImplemented):
              (WebCore::toJSDOMWindow):
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::classInfo):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSAbstractEventListener::handleEvent):
              (WebCore::JSLazyEventListener::parseCode):
              * bindings/js/JSEventTargetBase.cpp:
              (WebCore::retrieveEventTargetAndCorrespondingNode):
              (WebCore::jsEventTargetAddEventListener):
              (WebCore::jsEventTargetRemoveEventListener):
              (WebCore::jsEventTargetDispatchEvent):
              * bindings/js/JSEventTargetBase.h:
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              (WebCore::JSHTMLAppletElement::customGetOwnPropertySlot):
              (WebCore::JSHTMLAppletElement::customPut):
              (WebCore::JSHTMLAppletElement::getCallData):
              * bindings/js/JSHTMLCollectionCustom.cpp:
              (WebCore::callHTMLCollection):
              (WebCore::JSHTMLCollection::getCallData):
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::open):
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              (WebCore::JSHTMLEmbedElement::customGetOwnPropertySlot):
              (WebCore::JSHTMLEmbedElement::customPut):
              (WebCore::JSHTMLEmbedElement::getCallData):
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::jsHTMLInputElementBaseFunctionSetSelectionRange):
              * bindings/js/JSHTMLInputElementBase.h:
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              (WebCore::JSHTMLObjectElement::customGetOwnPropertySlot):
              (WebCore::JSHTMLObjectElement::customPut):
              (WebCore::JSHTMLObjectElement::getCallData):
              * bindings/js/JSHTMLOptionElementConstructor.cpp:
              (WebCore::constructHTMLOptionElement):
              (WebCore::JSHTMLOptionElementConstructor::getConstructData):
              * bindings/js/JSHTMLOptionElementConstructor.h:
              (WebCore::JSHTMLOptionElementConstructor::document):
              (WebCore::JSHTMLOptionElementConstructor::classInfo):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::constructImage):
              (WebCore::JSImageConstructor::getConstructData):
              * bindings/js/JSImageConstructor.h:
              (WebCore::JSImageConstructor::document):
              (WebCore::JSImageConstructor::classInfo):
              * bindings/js/JSInspectedObjectWrapper.h:
              (WebCore::JSInspectedObjectWrapper::classInfo):
              * bindings/js/JSInspectorCallbackWrapper.cpp:
              (WebCore::JSInspectorCallbackWrapper::prepareIncomingValue):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::scopeChain):
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
              (WebCore::JSNodeFilterCondition::mark):
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              (WebCore::JSNodeFilterCondition::create):
              * bindings/js/JSNodeFilterCustom.cpp:
              (WebCore::toNodeFilter):
              * bindings/js/JSNodeListCustom.cpp:
              (WebCore::callNodeList):
              (WebCore::JSNodeList::getCallData):
              (WebCore::JSNodeList::canGetItemsForName):
              (WebCore::JSNodeList::nameGetter):
              * bindings/js/JSPluginElementFunctions.cpp:
              (WebCore::runtimeObjectGetter):
              (WebCore::runtimeObjectPropertyGetter):
              (WebCore::runtimeObjectCustomGetOwnPropertySlot):
              (WebCore::runtimeObjectCustomPut):
              (WebCore::runtimeObjectGetCallData):
              (WebCore::pluginInstance):
              (WebCore::getRuntimeObject):
              (WebCore::callPlugin):
              * bindings/js/JSPluginElementFunctions.h:
              * bindings/js/JSQuarantinedObjectWrapper.cpp:
              (WebCore::JSQuarantinedObjectWrapper::put):
              (WebCore::JSQuarantinedObjectWrapper::construct):
              (WebCore::JSQuarantinedObjectWrapper::getConstructData):
              (WebCore::JSQuarantinedObjectWrapper::hasInstance):
              (WebCore::JSQuarantinedObjectWrapper::call):
              (WebCore::JSQuarantinedObjectWrapper::getCallData):
              * bindings/js/JSQuarantinedObjectWrapper.h:
              (WebCore::JSQuarantinedObjectWrapper::className):
              * bindings/js/JSRGBColor.cpp:
              * bindings/js/JSXMLHttpRequestConstructor.cpp:
              (WebCore::constructXMLHttpRequest):
              (WebCore::JSXMLHttpRequestConstructor::getConstructData):
              * bindings/js/JSXMLHttpRequestConstructor.h:
              (WebCore::JSXMLHttpRequestConstructor::document):
              (WebCore::JSXMLHttpRequestConstructor::classInfo):
              * bindings/js/JSXSLTProcessorConstructor.cpp:
              (WebCore::constructXSLTProcessor):
              (WebCore::JSXSLTProcessorConstructor::getConstructData):
              * bindings/js/JSXSLTProcessorConstructor.h:
              (WebCore::JSXSLTProcessorConstructor::classInfo):
              * bindings/js/ScheduledAction.cpp:
              (WebCore::ScheduledAction::ScheduledAction):
              (WebCore::ScheduledAction::execute):
              * bindings/js/ScheduledAction.h:
              * bindings/objc/WebScriptObject.mm:
              (-[WebScriptObject callWebScriptMethod:withArguments:]):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/NP_jsobject.cpp:
              (_NPN_InvokeDefault):
              (_NPN_Invoke):
              * bridge/c/c_instance.cpp:
              (KJS::Bindings::CInstance::supportsInvokeDefaultMethod):
              * bridge/c/c_instance.h:
              * bridge/jni/jni_jsobject.mm:
              (JavaJSObject::call):
              * bridge/objc/objc_instance.h:
              * bridge/objc/objc_instance.mm:
              (ObjcInstance::supportsInvokeDefaultMethod):
              * bridge/objc/objc_runtime.h:
              (KJS::Bindings::ObjcFallbackObjectImp::propertyName):
              (KJS::Bindings::ObjcFallbackObjectImp::classInfo):
              * bridge/objc/objc_runtime.mm:
              (Bindings::webScriptObjectClass):
              (Bindings::webUndefinedClass):
              (ObjcFallbackObjectImp::ObjcFallbackObjectImp):
              (callObjCFallbackObject):
              (ObjcFallbackObjectImp::getCallData):
              * bridge/qt/qt_instance.h:
              * bridge/runtime.cpp:
              (KJS::Bindings::Instance::createRuntimeObject):
              (KJS::Bindings::Instance::getInstance):
              * bridge/runtime.h:
              (KJS::Bindings::Field::~Field):
              (KJS::Bindings::Method::~Method):
              (KJS::Bindings::Class::~Class):
              (KJS::Bindings::Instance::supportsInvokeDefaultMethod):
              * bridge/runtime_method.cpp:
              (KJS::callRuntimeMethod):
              (KJS::RuntimeMethod::getCallData):
              * bridge/runtime_method.h:
              (KJS::RuntimeMethod::methods):
              * bridge/runtime_object.cpp:
              (RuntimeObjectImp::defaultValue):
              (callRuntimeObject):
              (RuntimeObjectImp::getCallData):
              * bridge/runtime_object.h:
              (KJS::RuntimeObjectImp::getInternalInstance):
              (KJS::RuntimeObjectImp::classInfo):
              * dom/NodeIterator.h:
              * dom/Traversal.cpp:
              * dom/Traversal.h:
              * dom/TreeWalker.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1edff436
    • 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
              <https://bugs.webkit.org/show_bug.cgi?id=19716>
      
              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.
      
              JavaScriptCore:
      
              * VM/Machine.cpp:
              (KJS::Machine::unwindCallFrame):
      
              LayoutTests:
      
              * 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
      a2e0ef7d
    • 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
      f558995b
  6. 21 Jun, 2008 7 commits
  7. 20 Jun, 2008 2 commits