1. 27 Jun, 2008 5 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
      2d983abd
    • 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
    • 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 4 commits
    • 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 6 commits
  5. 23 Jun, 2008 1 commit
    • 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...
      1edff436
  6. 21 Jun, 2008 3 commits
  7. 20 Jun, 2008 1 commit
  8. 19 Jun, 2008 6 commits
  9. 17 Jun, 2008 5 commits
    • timothy@apple.com's avatar
      Use accurate call frame title's based on the call frame type. · c14b52ce
      timothy@apple.com authored
      Added a type to DebuggerCallFrame so the under interface can
      distinguish anonymous functions and program call frames.
      
      JavaScriptCore:
      
      2008-06-16  Timothy Hatcher  <timothy@apple.com>
      
              Added a type to DebuggerCallFrame so the under interface can
              distinguish anonymous functions and program call frames.
      
              https://bugs.webkit.org/show_bug.cgi?id=19585
      
              Reviewed by Geoff Garen.
      
              * JavaScriptCore.exp: Export the DebuggerCallFrame::type symbol.
              * kjs/DebuggerCallFrame.cpp:
              (KJS::DebuggerCallFrame::type): Added.
              * kjs/DebuggerCallFrame.h:
      
      WebCore:
      
      2008-06-16  Timothy Hatcher  <timothy@apple.com>
      
              Use accurate call frame title's based on the call frame type.
      
              https://bugs.webkit.org/show_bug.cgi?id=19585
      
              Reviewed by Geoff Garen.
      
              * English.lproj/localizedStrings.js: Updated strings.
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::evaluate): Removed the isValid()
              check since the evaluate() functiondoes the check already.
              (WebCore::JSJavaScriptCallFrame::thisObject): Removed the isValid()
              check, since thisObject() does the check and returns null if invalid.
              (WebCore::JSJavaScriptCallFrame::type): Return a string
              based on the enum value of the type.
              (WebCore::JSJavaScriptCallFrame::scopeChain): Removed the isValid()
              check, since scopeChain() does the check and returns null if invalid.
              So just null check scopeChain().
              * page/JavaScriptCallFrame.cpp:
              (WebCore::JavaScriptCallFrame::type): Return the DebuggerCallFrame::Type.
              Return DebuggerCallFrame::UnknownType if the call frame is invalid.
              * page/JavaScriptCallFrame.h:
              * page/JavaScriptCallFrame.idl: Add the type property.
              * page/inspector/CallStackSidebarPane.js:
              (WebInspector.CallStackSidebarPane.prototype.update): Check the type
              of the call frame to create the correct title.
              * page/inspector/ScriptsPanel.js:
              (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use the
              "(program)" title for the file menu to match the call frames.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c14b52ce
    • eric@webkit.org's avatar
      Reviewed by Tim H. · c7fcd941
      eric@webkit.org authored
              Remove bogus ASSERT which tripped every time for those who use PAC files.
      
              * kjs/Parser.cpp:
              (KJS::Parser::parse):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c7fcd941
    • hausmann@webkit.org's avatar
      2008-06-17 Ariya Hidayat <ariya.hidayat@trolltech.com> · e3ca3fcc
      hausmann@webkit.org authored
              Rubber stamped by Adam Robben.
      
              Include JSGlobalObject.h to fix the build.
      
              * kjs/ScopeChain.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3ca3fcc
    • cwzwarich@webkit.org's avatar
      2008-06-17 Cameron Zwarich <cwzwarich@uwaterloo.ca> · e8a07e98
      cwzwarich@webkit.org authored
              Reviewed by Oliver.
      
              Reduce code duplication in emitReadModifyAssignment().
      
              * kjs/nodes.cpp:
              (KJS::emitReadModifyAssignment):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8a07e98
    • cwzwarich@webkit.org's avatar
      2008-06-17 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 12b8add0
      cwzwarich@webkit.org authored
              Reviewed by Oliver.
      
              Sort includes alphabetically.
      
              * kjs/nodes.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      12b8add0
  10. 16 Jun, 2008 4 commits
    • mjs@apple.com's avatar
      JavaScriptCore: · c77e8ea9
      mjs@apple.com authored
      2008-06-16  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Alexey.
              
              - removed nearly unused types.h and LocalStorageEntry.h headers
      
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * kjs/ExecState.h:
              * kjs/LocalStorageEntry.h: Removed.
              * kjs/RegExpObject.cpp:
              * kjs/error_object.cpp:
              * kjs/grammar.y:
              * kjs/nodes.cpp:
              * kjs/types.h: Removed.
      
      JavaScriptGlue:
      
      2008-06-16  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Alexey.
      
              - removed nearly unused types.h and LocalStorageEntry.h headers
      
              * JSUtils.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c77e8ea9
    • ap@webkit.org's avatar
      Trying to fix Windows build. · f602437b
      ap@webkit.org authored
              * kjs/PropertyNameArray.h:
              * kjs/identifier.cpp:
              Include ExecState.h
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f602437b
    • ggaren@apple.com's avatar
      2008-06-16 Geoffrey Garen <ggaren@apple.com> · 6d97ad6a
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
              
              Slight cleanup to the SymbolTableEntry class.
              
              Renamed isEmpty to isNull, since we usually use "empty" to mean "holds
              the valid, empty value", and "null" to mean "holds no value".
              
              Changed an "== 0" to a "!", to match our style guidelines.
              
              Added some ASSERTs to verify the (possibly questionable) assumption that
              all register indexes will have their high two bits set. Also clarified a
              comment to make that assumption clear.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d97ad6a
    • ap@webkit.org's avatar
      Reviewed by Geoff Garen. · 07e5bced
      ap@webkit.org authored
              Make Identifier construction use an explicitly passed IdentifierTable.
      
              No change on SunSpider total.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07e5bced