1. 11 Nov, 2007 11 commits
    • mrowe@apple.com's avatar
      Roll out r27708 as it breaks the Mac PowerPC build. · c05214d7
      mrowe@apple.com authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c05214d7
    • mrowe@apple.com's avatar
      2007-11-11 Mike Hommey <mh+webkit@glandium.org> · 383057a9
      mrowe@apple.com authored
              Reviewed by Maciej.
      
              Fix http://bugs.webkit.org/show_bug.cgi?id=14521
              Bug 14521: JavaScriptCore fails to build on Linux/PPC gcc 4.1.2
      
              * wtf/TCSpinLock.h:
              (TCMalloc_SpinLock::Unlock): Change constraint from o to m.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      383057a9
    • mrowe@apple.com's avatar
      2007-11-11 Mark Rowe <mrowe@apple.com> · 3f065f4a
      mrowe@apple.com authored
              Build fix.  Use the correct filename case.
      
              * kjs/nodes.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f065f4a
    • ggaren@apple.com's avatar
      Reviewed by Sam Weinig. · a862ba22
      ggaren@apple.com authored
              
              Fixed http://bugs.webkit.org/show_bug.cgi?id=15902
              15% of string-validate-input.js is spent compiling the same regular expression
              
              Store a compiled representation of the regular expression in the AST.
              
              Only a .2% SunSpider speedup overall, but a 10.6% speedup on 
              string-validate-input.js.
      
              * kjs/nodes.cpp:
              (KJS::RegExpNode::evaluate):
              * kjs/nodes.h:
              (KJS::RegExpNode::):
              * kjs/nodes2string.cpp:
              (KJS::RegExpNode::streamTo):
              * kjs/regexp.cpp:
              (KJS::RegExp::flags):
              * kjs/regexp.h:
              (KJS::RegExp::pattern):
              * kjs/regexp_object.cpp:
              (KJS::RegExpObjectImp::construct):
              (KJS::RegExpObjectImp::createRegExpImp):
              * kjs/regexp_object.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a862ba22
    • oliver's avatar
      Partial fix for <rdar://problem/5585334> numfuzz: integer overflows opening... · ef506fee
      oliver authored
      Partial fix for <rdar://problem/5585334> numfuzz: integer overflows opening malformed SVG file in WebCore::ImageBuffer::create
      
      Reviewed By Eric.
      
      Unfortunately this is a very slight regression, but is unavoidable.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ef506fee
    • eseidel's avatar
      2007-11-10 Eric Seidel <eric@webkit.org> · dc7c497d
      eseidel authored
              Reviewed by darin.
      
              Add simple type inferencing to the parser, and create custom
              AddNode and LessNode subclasses based on inferred types.
              http://bugs.webkit.org/show_bug.cgi?id=15884
      
              SunSpider claims this is at least a 0.5% speedup.
      
              * JavaScriptCore.exp:
              * kjs/grammar.y:
              * kjs/internal.cpp:
              (KJS::NumberImp::getPrimitiveNumber):
              (KJS::GetterSetterImp::getPrimitiveNumber):
              * kjs/internal.h:
              * kjs/lexer.cpp:
              (KJS::Lexer::lex):
              * kjs/nodes.cpp:
              (KJS::Node::Node):
              (KJS::StringNode::evaluate):
              (KJS::StringNode::evaluateToNumber):
              (KJS::StringNode::evaluateToBoolean):
              (KJS::RegExpNode::evaluate):
              (KJS::UnaryPlusNode::optimizeVariableAccess):
              (KJS::AddNode::evaluate):
              (KJS::AddNode::evaluateToNumber):
              (KJS::AddNumbersNode::inlineEvaluateToNumber):
              (KJS::AddNumbersNode::evaluate):
              (KJS::AddNumbersNode::evaluateToNumber):
              (KJS::AddStringsNode::evaluate):
              (KJS::AddStringLeftNode::evaluate):
              (KJS::AddStringRightNode::evaluate):
              (KJS::lessThan):
              (KJS::lessThanEq):
              (KJS::LessNumbersNode::evaluate):
              (KJS::LessStringsNode::evaluate):
              * kjs/nodes.h:
              (KJS::ExpressionNode::):
              (KJS::RegExpNode::):
              (KJS::RegExpNode::precedence):
              (KJS::TypeOfResolveNode::):
              (KJS::LocalVarTypeOfNode::):
              (KJS::UnaryPlusNode::):
              (KJS::UnaryPlusNode::precedence):
              (KJS::AddNode::):
              (KJS::AddNode::precedence):
              (KJS::AddNumbersNode::):
              (KJS::AddStringLeftNode::):
              (KJS::AddStringRightNode::):
              (KJS::AddStringsNode::):
              (KJS::LessNode::):
              (KJS::LessNode::precedence):
              (KJS::LessNumbersNode::):
              (KJS::LessStringsNode::):
              * kjs/nodes2string.cpp:
              (KJS::StringNode::streamTo):
              * kjs/object.cpp:
              * kjs/object.h:
              * kjs/value.h:
              (KJS::JSValue::getPrimitiveNumber):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc7c497d
    • darin@apple.com's avatar
      - try another way of fixing dftables builds -- refactor pcre_internal.h a bit · 68af1ff4
      darin@apple.com authored
              * pcre/pcre_internal.h: Make most of this header do nothing when DFTABLES is set.
              Later we can break it into two files.
      
              * JavaScriptCore.vcproj/dftables/dftables.vcproj: Take out now-unneeded include paths.
              * pcre/dftables.cpp: Set DFTABLES. Use delete instead of free.
              * pcre/dftables.pro: Take out now-unneeded include paths.
              * pcre/pcre_maketables.cpp: Use new instead of malloc.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      68af1ff4
    • darin@apple.com's avatar
      * pcre/dftables.pro: Try fixing Qt builds (I looked at qt-win) by adding · a9d53cc3
      darin@apple.com authored
              another include path.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9d53cc3
    • darin@apple.com's avatar
      * JavaScriptCore.xcodeproj/project.pbxproj: Try fixing Mac Tiger builds · c00bf2b6
      darin@apple.com authored
              by adding another include path.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c00bf2b6
    • darin@apple.com's avatar
      JavaScriptCore: · ee752e7d
      darin@apple.com authored
              Reviewed by Sam.
      
              - http://bugs.webkit.org/show_bug.cgi?id=15924
                next round of changes to JSRegExp (formerly PCRE)
      
              This is a combination of converting to C++, tweaking the API, and adding
              some additional optimizations.
      
              Future steps will involve getting rid of the use of UTF-8 completely
              (we'll use UTF-16 exclusively instead), eliminating more source files,
              and some more speed-ups.
      
              SunSpider says the current round is an 0.9% speed-up overall, and a
              5.3% speed-up for regexp.
      
              * JavaScriptCore.exp: Updated for new entry points.
      
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.vcproj/dftables/dftables.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * jscore.bkl:
              Updated for new source file names and ForwardingHeaders.
      
              * kjs/regexp.cpp:
              (KJS::RegExp::RegExp): Changed to use the error message without calling
              strdup on it and to pass the new types and options.
              (KJS::RegExp::~RegExp): Removed the now-unneeded free of the error message.
              (KJS::RegExp::match): Pass the new types and options.
              * kjs/regexp.h: Update type of m_constructionError.
      
              * pcre/AUTHORS: Update to reflect the status of the project -- we don't include
              the Google parts, and this isn't the PCRE library, per se.
              * pcre/COPYING: Ditto.
      
              * pcre/dftables.cpp: Copied from JavaScriptCore/pcre/dftables.c.
              (main): Removed unneeded ctype_digit.
      
              * pcre/pcre.h: Convert to C++, tweak API a bit. Use UChar instead of JSRegExpChar.
      
              * pcre/pcre_compile.cpp: Copied from JavaScriptCore/pcre/pcre_compile.c.
              Moved a lot of private stuff used only within this file here from pcre_internal.h.
              Renumbered the error codes.
              (error_text): Use a single string with embedded nulls for the error text (I got
              this idea from newer versions of PCRE).
              (check_escape): Changed return type to be enum instead of int. Replaced ctype_digit
              uses with isASCIIDigit.
              (is_counted_repeat): Ditto.
              (read_repeat_counts): Ditto.
              (first_significant_code): Ditto.
              (find_fixedlength): Ditto.
              (could_be_empty_branch): Ditto.
              (compile_branch): Ditto. Also removed some code that handles changing options.
              JavaScript doesn't have any of the features that allow options to change.
              (compile_regex): Updated for change to options parameter.
              (is_anchored): Ditto.
              (find_firstassertedchar): Ditto.
              (jsRegExpCompile): Changed to take separate flags instead of an options int.
              Also changed to call new/delete instead of pcre_malloc/free.
              (jsRegExpFree): Ditto.
      
              * pcre/pcre_exec.cpp: Copied from JavaScriptCore/pcre/pcre_exec.c.
              Added a case that uses computed goto for the opcode loop, but did not turn it on.
              Changed the RMATCH macro to handle returns more efficiently by putting the where
              pointer in the new frame instead of the old one, allowing us to branch to the
              return with a single statement. Switched to new/delete from pcre_malloc/free.
              Changed many RRETURN callers to not set the return value since it's already
              set correctly. Replaced the rrc variable with an is_match variable. Values other
              than "match" and "no match" are now handled differently. This allows us to remove
              the code to check for those cases in various rules.
              (match): All the case statements use a macro BEGIN_OPCODE instead. And all the
              continue statements, or break statements that break out of the outer case use
              a macro NEXT_OPCODE instead. Replaced a few if statements with assertions.
              (jsRegExpExecute): Use new/delete instead of pcre_malloc/free. Removed unused
              start_match field from the match block.
      
              * pcre/pcre_internal.h: Moved the last few configuration macros from pcre-config.h
              in here. Removed various unused types. Converted from JSRegExpChar to UChar.
              Eliminated pcre_malloc/free. Replaced the opcode enum with a macro that can be
              used in multiple places. Unfortunately we lose the comments for each opcode; we
              should find a place to put those back. Removed ctype_digit.
      
              * pcre/pcre_maketables.cpp: Copied from JavaScriptCore/pcre/pcre_maketables.c.
              (pcre_maketables): Got rid of the conditional code that allows this to be compiled
              in -- it's only used for dftables now (and soon may be obsolete entirely).
              Changed code for cbit_digit to not use isdigit, and took the "_" case out of the
              loop. Removed ctype_digit.
      
              * pcre/pcre_ord2utf8.cpp: Copied from JavaScriptCore/pcre/pcre_ord2utf8.c.
      
              * pcre/pcre_tables.cpp: Copied from JavaScriptCore/pcre/pcre_tables.c.
              Moved _pcre_OP_lengths out of here into pcre_exec.cpp.
      
              * pcre/pcre_ucp_searchfuncs.cpp: Copied from JavaScriptCore/pcre/pcre_ucp_searchfuncs.c.
              Updated for other file name changes.
      
              * pcre/pcre_xclass.cpp: Copied from JavaScriptCore/pcre/pcre_xclass.c.
      
              * pcre/ucpinternal.h: Updated header.
      
              * pcre/ucptable.cpp: Copied from JavaScriptCore/pcre/ucptable.c.
      
              * wtf/ASCIICType.h: (WTF::isASCIIDigit): Removed a branch by changing from && to
              & for this operation. Also added an overload that takes an int because that's
              useful for PCRE. Later we could optimize for int and overload other functions in
              this file; stuck to this simple one for now.
      
              * wtf/unicode/icu/UnicodeIcu.h: Removed unused isUpper.
              * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
      
              * pcre/LICENCE: Removed.
              * pcre/pcre-config.h: Removed.
              * wtf/FastMallocPCRE.cpp: Removed.
      
              * pcre/dftables.c: Renamed to cpp.
              * pcre/pcre_compile.c: Ditto.
              * pcre/pcre_exec.c: Ditto.
              * pcre/pcre_maketables.c: Ditto.
              * pcre/pcre_ord2utf8.c: Ditto.
              * pcre/pcre_tables.c: Ditto.
              * pcre/pcre_ucp_searchfuncs.c: Ditto.
              * pcre/pcre_xclass.c: Ditto.
              * pcre/ucptable.c: Ditto.
      
      WebCore:
      
              Reviewed by Sam.
      
              - updated for JSRegExp function changes
      
              * platform/RegularExpression.cpp:
              (WebCore::RegularExpression::Private::compile):
              (WebCore::RegularExpression::match):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee752e7d
    • eseidel's avatar
      2007-11-11 Eric Seidel <eric@webkit.org> · 06d70621
      eseidel authored
              Reviewed by Oliver.
      
              Add KJS_CHECKEXCEPTIONBOOLEAN to match rest of nodes.cpp
      
              * kjs/nodes.cpp:
              (KJS::ExpressionNode::evaluateToBoolean):
              (KJS::LessNode::evaluateToBoolean):
              (KJS::GreaterNode::evaluateToBoolean):
              (KJS::LessEqNode::evaluateToBoolean):
              (KJS::GreaterEqNode::evaluateToBoolean):
              (KJS::InstanceOfNode::evaluateToBoolean):
              (KJS::InNode::evaluateToBoolean):
              (KJS::EqualNode::evaluateToBoolean):
              (KJS::NotEqualNode::evaluateToBoolean):
              (KJS::StrictEqualNode::evaluateToBoolean):
              (KJS::NotStrictEqualNode::evaluateToBoolean):
              (KJS::LogicalAndNode::evaluateToBoolean):
              (KJS::LogicalOrNode::evaluateToBoolean):
              (KJS::ConditionalNode::evaluateToBoolean):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      06d70621
  2. 10 Nov, 2007 3 commits
    • darin@apple.com's avatar
      JavaScriptCore: · 42667586
      darin@apple.com authored
              Reviewed by Sam.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=15927
                REGRESSION(r27487): delete a.c followed by __defineGetter__("c", ...) incorrectly deletes another property
                and <rdar://problem/5586384> REGRESSION (r27487): Can't switch out of Edit HTML Source mode on Leopard Wiki
      
              Test: fast/js/delete-then-put.html
      
              * kjs/property_map.cpp:
              (KJS::PropertyMap::put): Added a missing "- 1"; code to find an empty slot was not working.
              (KJS::PropertyMap::checkConsistency): Added a missing range check that would have caught this
              problem before.
      
              - roll out a last-minute change to my evaluateToBoolean patch that was incorrect.
      
              * kjs/nodes.h: (KJS::ExprStatementNode::ExprStatementNode): Take out call to
              optimizeForUnnecessaryResult, since the result is used in some cases.
      
      LayoutTests:
      
              Reviewed by Sam.
      
              - test for http://bugs.webkit.org/show_bug.cgi?id=15927
                delete a.c followed by __defineGetter__("c", ...) incorrectly deletes another property
      
              * fast/js/delete-then-put-expected.txt: Added.
              * fast/js/delete-then-put.html: Added.
              * fast/js/resources/delete-then-put.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      42667586
    • aroben@apple.com's avatar
      Windows build fix · 98745f91
      aroben@apple.com authored
              Roll out some changes that were (seemingly accidentally) checked in
              with r27664.
      
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98745f91
    • darin@apple.com's avatar
      Reviewed by Sam. · 30fc0f4a
      darin@apple.com authored
              - http://bugs.webkit.org/show_bug.cgi?id=15915
                add an evaluation path for booleans like the one we have for numbers
      
              Gives 1.1% on SunSpider.
      
              * kjs/grammar.y: Create TrueNode and FalseNode instead of BooleanNode.
      
              * kjs/nodes.h: Changed to use Noncopyable. Moved optimizeForUnnecessaryResult
              down from Node to ExpressionNode. Changed some classes to not inherit from
              ExpressionNode where not necessary, and removed unnneeded evaluate functions
              as well as evaluate functions that need not be virtual. Call the
              optimizeForUnnecessaryResult function on the start of a for loop too.
              * kjs/nodes.cpp:
              (KJS::ExpressionNode::evaluateToBoolean): Added.
              (KJS::FalseNode::evaluate): Added.
              (KJS::TrueNode::evaluate): Added.
              (KJS::NumberNode::evaluateToBoolean): Added.
              (KJS::StringNode::evaluateToBoolean): Added.
              (KJS::LocalVarAccessNode::evaluateToBoolean): Added.
              (KJS::BracketAccessorNode::evaluateToBoolean): Added.
              (KJS::LogicalNotNode::evaluate): Changed to call evaluateToBoolean.
              (KJS::LogicalNotNode::evaluateToBoolean): Added.
              (KJS::lessThan): Changed to return bool.
              (KJS::lessThanEq): Ditto.
              (KJS::LessNode::evaluate): Changed since lessThan returns bool.
              (KJS::LessNode::evaluateToBoolean): Added.
              (KJS::GreaterNode::evaluate): Changed since lessThanEq returns bool.
              (KJS::GreaterNode::evaluateToBoolean): Added.
              (KJS::LessEqNode::evaluate): Changed since lessThanEq returns bool.
              (KJS::LessEqNode::evaluateToBoolean): Added.
              (KJS::GreaterEqNode::evaluate): Changed since lessThan returns bool.
              (KJS::GreaterEqNode::evaluateToBoolean): Added.
              (KJS::InstanceOfNode::evaluateToBoolean): Added.
              (KJS::InNode::evaluateToBoolean): Added.
              (KJS::EqualNode::evaluateToBoolean): Added.
              (KJS::NotEqualNode::evaluateToBoolean): Added.
              (KJS::StrictEqualNode::evaluateToBoolean): Added.
              (KJS::NotStrictEqualNode::evaluateToBoolean): Added.
              (KJS::ConditionalNode::evaluate): Changed to call evaluateToBoolean.
              (KJS::IfNode::execute): Ditto.
              (KJS::DoWhileNode::execute): Ditto.
              (KJS::WhileNode::execute): Ditto.
              (KJS::ForNode::execute): Ditto.
      
              * kjs/nodes2string.cpp:
              (KJS::FalseNode::streamTo): Added.
              (KJS::TrueNode::streamTo): Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30fc0f4a
  3. 09 Nov, 2007 1 commit
  4. 08 Nov, 2007 23 commits
    • darin@apple.com's avatar
      - fix build · 927ee73e
      darin@apple.com authored
              * kjs/grammar.y:
              * kjs/nodes.h:
              * kjs/property_map.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      927ee73e
    • darin@apple.com's avatar
      - roll out accidentally-checked in changes · 170c31be
      darin@apple.com authored
              * kjs/nodes.cpp: Back to previous version.
              * kjs/nodes.h: Ditto.
              * kjs/grammar.y: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      170c31be
    • darin@apple.com's avatar
      - roll out accidentally-checked in changes · a89ace7f
      darin@apple.com authored
              * kjs/nodes.cpp: Back to previous version.
              * kjs/nodes.h: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a89ace7f
    • darin@apple.com's avatar
      Reviewed by Maciej. · 0f11872e
      darin@apple.com authored
              - http://bugs.webkit.org/show_bug.cgi?id=15912
                fasta spends a lot of time in qsort
      
              * kjs/property_map.cpp:
              (KJS::PropertyMap::getEnumerablePropertyNames):
              Use insertion sort instead of qsort for small sets of property names.
              We can probably do some even-better speedups of for/in, but this nets
              0.6% overall and 6.7% on fasta.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0f11872e
    • darin@apple.com's avatar
      Reviewed by Maciej. · b8a5a8e5
      darin@apple.com authored
              - http://bugs.webkit.org/show_bug.cgi?id=15906
                getting characters by indexing into a string is very slow
      
              This fixes one source of the slowness -- the conversion to an unused
              Identifier as we call the get function from the slot -- but doesn't
              fix others, such as the fact that we have to allocate a new UString::Rep
              for every single character.
      
              Speeds up string-base64 30%, and at least 0.5% overall.
              But does slow down access-fannkuch quite a bit. Might be worth
              revisiting in the future to see what we can do about that (although
              I did look at a profile for a while).
      
              * kjs/property_slot.h: Add a new marker for "numeric" property slots;
              slots where we don't need to pass the identifier to the get function.
              (KJS::PropertySlot::getValue): Added code to call the numeric get function.
              (KJS::PropertySlot::setCustomNumeric): Added.
              * kjs/string_object.cpp:
              (KJS::StringInstance::indexGetter): Changed to use substr() instead
              of constructing a wholly new UString each time.
              (KJS::stringInstanceNumericPropertyGetter): Added. Like indexGetter, but
              takes advantage of setCustomNumeric to avoid creating an Identifier.
              (KJS::StringInstance::getOwnPropertySlot): Changed to use setCustomNumeric.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b8a5a8e5
    • darin@apple.com's avatar
      Reviewed by Oliver. · 6a95834c
      darin@apple.com authored
              - http://bugs.webkit.org/show_bug.cgi?id=15904
                more speed-ups possible by tightening up int version of JSImmediate
      
              1% improvement of SunSpider
      
              * kjs/JSImmediate.h: Eliminate the now-unneeded FPBitValues struct template.
              (KJS::JSImmediate::from): Overload for most numeric types; many types can
              do fewer branches and checks.
              (KJS::JSImmediate::getUInt32): Removed unneeded check for undefined.
              (KJS::JSImmediate::getTruncatedInt32): Ditto.
              (KJS::JSImmediate::getTruncatedUInt32): Ditto. There's no difference any more
              between getUInt32 and getTruncatedUInt32, so that's worth a rename and merge later.
      
              * kjs/grammar.y: Update since fromDouble is now just from.
              * kjs/nodes.h: Ditto.
      
              * kjs/value.h: (KJS::jsNumber): Overload for most numeric types.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a95834c
    • kevino@webkit.org's avatar
      Adding Bakefiles for JSCore, WebCore, and WebKit, and adding wxWebKit implementation. · 56b2f6f1
      kevino@webkit.org authored
      Reviewed by Mark Rowe
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56b2f6f1
    • oliver's avatar
      Fix regression caused by earlier bitwise and optimisation. 1 & undefined != 1. · e7f10a33
      oliver authored
      Reviewed by Maciej.
      
      The implementation of JSImmediate::areBothImmediateNumbers relies on
      (JSImmediate::getTag(immediate1) & JSImmediate::getTag(immediate2)) having
      a unique result when both immediate values are numbers.
      
      The regression was due to UndefinedType & NumberType returning NumberType (3 & 1).
      By swapping the value of NumberType and UndefinedType this ceases to be a problem.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e7f10a33
    • darin@apple.com's avatar
      - fix build · d4f97596
      darin@apple.com authored
              * kjs/nodes.h: Add missing parameter name.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d4f97596
    • eseidel's avatar
      2007-11-08 Eric Seidel <eric@webkit.org> · 93b803fa
      eseidel authored
              Reviewed by darin.
      
              Add ExpressionNode subclass of Node, use it.
      
              * kjs/grammar.y:
              * kjs/nodes.cpp:
              (KJS::ForInNode::ForInNode):
              * kjs/nodes.h:
              (KJS::ExpressionNode::):
              (KJS::NullNode::):
              (KJS::NullNode::precedence):
              (KJS::BooleanNode::):
              (KJS::BooleanNode::precedence):
              (KJS::RegExpNode::):
              (KJS::RegExpNode::precedence):
              (KJS::ThisNode::):
              (KJS::ThisNode::precedence):
              (KJS::ResolveNode::):
              (KJS::ElementNode::):
              (KJS::ArrayNode::):
              (KJS::PropertyNode::):
              (KJS::PropertyNode::precedence):
              (KJS::PropertyNode::name):
              (KJS::PropertyListNode::):
              (KJS::ObjectLiteralNode::):
              (KJS::ObjectLiteralNode::precedence):
              (KJS::BracketAccessorNode::):
              (KJS::DotAccessorNode::):
              (KJS::DotAccessorNode::precedence):
              (KJS::ArgumentListNode::):
              (KJS::ArgumentsNode::):
              (KJS::NewExprNode::):
              (KJS::NewExprNode::precedence):
              (KJS::FunctionCallValueNode::):
              (KJS::FunctionCallValueNode::precedence):
              (KJS::FunctionCallResolveNode::):
              (KJS::FunctionCallBracketNode::):
              (KJS::FunctionCallBracketNode::precedence):
              (KJS::FunctionCallDotNode::):
              (KJS::FunctionCallDotNode::precedence):
              (KJS::PrePostResolveNode::):
              (KJS::PostfixBracketNode::):
              (KJS::PostfixBracketNode::precedence):
              (KJS::PostIncBracketNode::):
              (KJS::PostIncBracketNode::isIncrement):
              (KJS::PostDecBracketNode::):
              (KJS::PostDecBracketNode::isIncrement):
              (KJS::PostfixDotNode::):
              (KJS::PostfixDotNode::precedence):
              (KJS::PostIncDotNode::):
              (KJS::PostIncDotNode::isIncrement):
              (KJS::PostDecDotNode::):
              (KJS::PostDecDotNode::isIncrement):
              (KJS::PostfixErrorNode::):
              (KJS::PostfixErrorNode::precedence):
              (KJS::DeleteResolveNode::):
              (KJS::DeleteBracketNode::):
              (KJS::DeleteBracketNode::precedence):
              (KJS::DeleteDotNode::):
              (KJS::DeleteDotNode::precedence):
              (KJS::DeleteValueNode::):
              (KJS::DeleteValueNode::precedence):
              (KJS::VoidNode::):
              (KJS::VoidNode::precedence):
              (KJS::TypeOfResolveNode::):
              (KJS::TypeOfValueNode::):
              (KJS::PrefixBracketNode::):
              (KJS::PrefixBracketNode::precedence):
              (KJS::PreIncBracketNode::):
              (KJS::PreIncBracketNode::isIncrement):
              (KJS::PreDecBracketNode::):
              (KJS::PreDecBracketNode::isIncrement):
              (KJS::PrefixDotNode::):
              (KJS::PrefixDotNode::precedence):
              (KJS::PreIncDotNode::):
              (KJS::PreIncDotNode::isIncrement):
              (KJS::PreDecDotNode::):
              (KJS::PreDecDotNode::isIncrement):
              (KJS::PrefixErrorNode::):
              (KJS::PrefixErrorNode::precedence):
              (KJS::UnaryPlusNode::):
              (KJS::UnaryPlusNode::precedence):
              (KJS::NegateNode::):
              (KJS::NegateNode::precedence):
              (KJS::BitwiseNotNode::):
              (KJS::BitwiseNotNode::precedence):
              (KJS::LogicalNotNode::):
              (KJS::LogicalNotNode::precedence):
              (KJS::AddNode::):
              (KJS::AddNode::precedence):
              (KJS::LeftShiftNode::):
              (KJS::LeftShiftNode::precedence):
              (KJS::RightShiftNode::):
              (KJS::RightShiftNode::precedence):
              (KJS::UnsignedRightShiftNode::):
              (KJS::UnsignedRightShiftNode::precedence):
              (KJS::LessNode::):
              (KJS::LessNode::precedence):
              (KJS::GreaterNode::):
              (KJS::GreaterNode::precedence):
              (KJS::LessEqNode::):
              (KJS::LessEqNode::precedence):
              (KJS::GreaterEqNode::):
              (KJS::GreaterEqNode::precedence):
              (KJS::InstanceOfNode::):
              (KJS::InstanceOfNode::precedence):
              (KJS::InNode::):
              (KJS::InNode::precedence):
              (KJS::EqualNode::):
              (KJS::EqualNode::precedence):
              (KJS::NotEqualNode::):
              (KJS::NotEqualNode::precedence):
              (KJS::StrictEqualNode::):
              (KJS::StrictEqualNode::precedence):
              (KJS::NotStrictEqualNode::):
              (KJS::NotStrictEqualNode::precedence):
              (KJS::BitAndNode::):
              (KJS::BitAndNode::precedence):
              (KJS::BitOrNode::):
              (KJS::BitOrNode::precedence):
              (KJS::BitXOrNode::):
              (KJS::BitXOrNode::precedence):
              (KJS::LogicalAndNode::):
              (KJS::LogicalAndNode::precedence):
              (KJS::LogicalOrNode::):
              (KJS::LogicalOrNode::precedence):
              (KJS::ConditionalNode::):
              (KJS::ConditionalNode::precedence):
              (KJS::ReadModifyResolveNode::):
              (KJS::ReadModifyResolveNode::precedence):
              (KJS::AssignResolveNode::):
              (KJS::AssignResolveNode::precedence):
              (KJS::ReadModifyBracketNode::):
              (KJS::ReadModifyBracketNode::precedence):
              (KJS::AssignBracketNode::):
              (KJS::AssignBracketNode::precedence):
              (KJS::AssignDotNode::):
              (KJS::AssignDotNode::precedence):
              (KJS::ReadModifyDotNode::):
              (KJS::ReadModifyDotNode::precedence):
              (KJS::AssignErrorNode::):
              (KJS::AssignErrorNode::precedence):
              (KJS::CommaNode::):
              (KJS::CommaNode::precedence):
              (KJS::AssignExprNode::):
              (KJS::AssignExprNode::precedence):
              (KJS::ExprStatementNode::):
              (KJS::IfNode::):
              (KJS::DoWhileNode::):
              (KJS::WhileNode::):
              (KJS::ReturnNode::):
              (KJS::WithNode::):
              (KJS::ThrowNode::):
              (KJS::ParameterNode::):
              (KJS::CaseClauseNode::):
              (KJS::CaseClauseNode::precedence):
              (KJS::ClauseListNode::):
              (KJS::SwitchNode::):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      93b803fa
    • weinig@apple.com's avatar
      Correct ChangeLogs to reflect that the speedup was 1% not .5%. Turns out you... · 38d24b45
      weinig@apple.com authored
      Correct ChangeLogs to reflect that the speedup was 1% not .5%.  Turns out you are not supposed to test in Debug builds.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38d24b45
    • ggaren@apple.com's avatar
      Fixed bug title in old check-in. · cb30a758
      ggaren@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb30a758
    • oliver's avatar
      Add a fast path for bitwise-and of two immediate numbers for a 0.7%... · 678e6b8c
      oliver authored
      Add a fast path for bitwise-and of two immediate numbers for a 0.7% improvement in SunSpider (4% bitop improvement).
      
      Reviewed by Sam.
      
      This only improves bitwise-and performance, as the additional logic required
      for similar code paths on or, xor, and shifting requires additional operations
      and branches that negate (and in certain cases, regress) any advantage we might
      otherwise receive.
      
      This improves performance on all bitop tests, the cryptography tests, as well as
      the string-base64 and string-unpack-code tests.  No significant degradation on
      any other tests.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      678e6b8c
    • aroben@apple.com's avatar
      Stop using KJS inside of MathExtras.h · 9fb42da2
      aroben@apple.com authored
               Reviewed by Darin.
      
               * wtf/MathExtras.h: Removed an unused header, and a now-unused
               forward-declaration.
               (wtf_atan2): Use std::numeric_limits intead of KJS.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9fb42da2
    • weinig@apple.com's avatar
      Windows build fix. · 8af3f7c0
      weinig@apple.com authored
              * kjs/date_object.cpp:
              (KJS::DateProtoFuncToLocaleString::callAsFunction): Fix unused arg warning.
              (KJS::DateProtoFuncToLocaleDateString::callAsFunction): ditto
              (KJS::DateProtoFuncToLocaleTimeString::callAsFunction): ditto
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8af3f7c0
    • mrowe@apple.com's avatar
      2007-11-08 Mark Rowe <mrowe@apple.com> · 027c3977
      mrowe@apple.com authored
              Gtk build fix.
      
              * kjs/lookup.h: Add missing include.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      027c3977
    • weinig@apple.com's avatar
      JavaScriptCore: · a73c15f5
      weinig@apple.com authored
              Reviewed by Darin.
      
              Convert JavaScript internal function objects to use one class per
              function.  This avoids a switch statement inside what used to be
              the shared function classes and will allow Shark to better analyze
              the code.
      
              To make this switch, the value property of the HashEntry was changed
              to a union of an intptr_t (which is used to continue handle valueGetters)
              and function pointer which points to a static constructor for the
              individual new function objects.
      
              SunSpider claims this is a 0.5% speedup. 
      
              * kjs/array_object.cpp:
              (KJS::ArrayPrototype::getOwnPropertySlot):
              (KJS::getProperty):
              (KJS::ArrayProtoFuncToString::callAsFunction):
              (KJS::ArrayProtoFuncToLocaleString::callAsFunction):
              (KJS::ArrayProtoFuncJoin::callAsFunction):
              (KJS::ArrayProtoFuncConcat::callAsFunction):
              (KJS::ArrayProtoFuncPop::callAsFunction):
              (KJS::ArrayProtoFuncPush::callAsFunction):
              (KJS::ArrayProtoFuncReverse::callAsFunction):
              (KJS::ArrayProtoFuncShift::callAsFunction):
              (KJS::ArrayProtoFuncSlice::callAsFunction):
              (KJS::ArrayProtoFuncSort::callAsFunction):
              (KJS::ArrayProtoFuncSplice::callAsFunction):
              (KJS::ArrayProtoFuncUnShift::callAsFunction):
              (KJS::ArrayProtoFuncFilter::callAsFunction):
              (KJS::ArrayProtoFuncMap::callAsFunction):
              (KJS::ArrayProtoFuncEvery::callAsFunction):
              (KJS::ArrayProtoFuncForEach::callAsFunction):
              (KJS::ArrayProtoFuncSome::callAsFunction):
              (KJS::ArrayProtoFuncIndexOf::callAsFunction):
              (KJS::ArrayProtoFuncLastIndexOf::callAsFunction):
              * kjs/array_object.h:
              (KJS::ArrayPrototype::classInfo):
              * kjs/create_hash_table:
              * kjs/date_object.cpp:
              (KJS::DatePrototype::getOwnPropertySlot):
              (KJS::DateProtoFuncToString::callAsFunction):
              (KJS::DateProtoFuncToUTCString::callAsFunction):
              (KJS::DateProtoFuncToDateString::callAsFunction):
              (KJS::DateProtoFuncToTimeString::callAsFunction):
              (KJS::DateProtoFuncToLocaleString::callAsFunction):
              (KJS::DateProtoFuncToLocaleDateString::callAsFunction):
              (KJS::DateProtoFuncToLocaleTimeString::callAsFunction):
              (KJS::DateProtoFuncValueOf::callAsFunction):
              (KJS::DateProtoFuncGetTime::callAsFunction):
              (KJS::DateProtoFuncGetFullYear::callAsFunction):
              (KJS::DateProtoFuncGetUTCFullYear::callAsFunction):
              (KJS::DateProtoFuncToGMTString::callAsFunction):
              (KJS::DateProtoFuncGetMonth::callAsFunction):
              (KJS::DateProtoFuncGetUTCMonth::callAsFunction):
              (KJS::DateProtoFuncGetDate::callAsFunction):
              (KJS::DateProtoFuncGetUTCDate::callAsFunction):
              (KJS::DateProtoFuncGetDay::callAsFunction):
              (KJS::DateProtoFuncGetUTCDay::callAsFunction):
              (KJS::DateProtoFuncGetHours::callAsFunction):
              (KJS::DateProtoFuncGetUTCHours::callAsFunction):
              (KJS::DateProtoFuncGetMinutes::callAsFunction):
              (KJS::DateProtoFuncGetUTCMinutes::callAsFunction):
              (KJS::DateProtoFuncGetSeconds::callAsFunction):
              (KJS::DateProtoFuncGetUTCSeconds::callAsFunction):
              (KJS::DateProtoFuncGetMilliSeconds::callAsFunction):
              (KJS::DateProtoFuncGetUTCMilliseconds::callAsFunction):
              (KJS::DateProtoFuncGetTimezoneOffset::callAsFunction):
              (KJS::DateProtoFuncSetTime::callAsFunction):
              (KJS::DateProtoFuncSetMilliSeconds::callAsFunction):
              (KJS::DateProtoFuncSetUTCMilliseconds::callAsFunction):
              (KJS::DateProtoFuncSetSeconds::callAsFunction):
              (KJS::DateProtoFuncSetUTCSeconds::callAsFunction):
              (KJS::DateProtoFuncSetMinutes::callAsFunction):
              (KJS::DateProtoFuncSetUTCMinutes::callAsFunction):
              (KJS::DateProtoFuncSetHours::callAsFunction):
              (KJS::DateProtoFuncSetUTCHours::callAsFunction):
              (KJS::DateProtoFuncSetDate::callAsFunction):
              (KJS::DateProtoFuncSetUTCDate::callAsFunction):
              (KJS::DateProtoFuncSetMonth::callAsFunction):
              (KJS::DateProtoFuncSetUTCMonth::callAsFunction):
              (KJS::DateProtoFuncSetFullYear::callAsFunction):
              (KJS::DateProtoFuncSetUTCFullYear::callAsFunction):
              (KJS::DateProtoFuncSetYear::callAsFunction):
              (KJS::DateProtoFuncGetYear::callAsFunction):
              * kjs/date_object.h:
              * kjs/lookup.cpp:
              (KJS::Lookup::find):
              * kjs/lookup.h:
              (KJS::HashEntry::):
              (KJS::staticFunctionGetter):
              (KJS::staticValueGetter):
              (KJS::getStaticPropertySlot):
              (KJS::getStaticFunctionSlot):
              (KJS::lookupPut):
              * kjs/math_object.cpp:
              (KJS::MathObjectImp::getOwnPropertySlot):
              (KJS::MathProtoFuncAbs::callAsFunction):
              (KJS::MathProtoFuncACos::callAsFunction):
              (KJS::MathProtoFuncASin::callAsFunction):
              (KJS::MathProtoFuncATan::callAsFunction):
              (KJS::MathProtoFuncATan2::callAsFunction):
              (KJS::MathProtoFuncCeil::callAsFunction):
              (KJS::MathProtoFuncCos::callAsFunction):
              (KJS::MathProtoFuncExp::callAsFunction):
              (KJS::MathProtoFuncFloor::callAsFunction):
              (KJS::MathProtoFuncLog::callAsFunction):
              (KJS::MathProtoFuncMax::callAsFunction):
              (KJS::MathProtoFuncMin::callAsFunction):
              (KJS::MathProtoFuncPow::callAsFunction):
              (KJS::MathProtoFuncRandom::callAsFunction):
              (KJS::MathProtoFuncRound::callAsFunction):
              (KJS::MathProtoFuncSin::callAsFunction):
              (KJS::MathProtoFuncSqrt::callAsFunction):
              (KJS::MathProtoFuncTan::callAsFunction):
              * kjs/math_object.h:
              (KJS::MathObjectImp::classInfo):
              (KJS::MathObjectImp::):
              * kjs/string_object.cpp:
              (KJS::StringPrototype::getOwnPropertySlot):
              (KJS::StringProtoFuncToString::callAsFunction):
              (KJS::StringProtoFuncValueOf::callAsFunction):
              (KJS::StringProtoFuncCharAt::callAsFunction):
              (KJS::StringProtoFuncCharCodeAt::callAsFunction):
              (KJS::StringProtoFuncConcat::callAsFunction):
              (KJS::StringProtoFuncIndexOf::callAsFunction):
              (KJS::StringProtoFuncLastIndexOf::callAsFunction):
              (KJS::StringProtoFuncMatch::callAsFunction):
              (KJS::StringProtoFuncSearch::callAsFunction):
              (KJS::StringProtoFuncReplace::callAsFunction):
              (KJS::StringProtoFuncSlice::callAsFunction):
              (KJS::StringProtoFuncSplit::callAsFunction):
              (KJS::StringProtoFuncSubstr::callAsFunction):
              (KJS::StringProtoFuncSubstring::callAsFunction):
              (KJS::StringProtoFuncToLowerCase::callAsFunction):
              (KJS::StringProtoFuncToUpperCase::callAsFunction):
              (KJS::StringProtoFuncToLocaleLowerCase::callAsFunction):
              (KJS::StringProtoFuncToLocaleUpperCase::callAsFunction):
              (KJS::StringProtoFuncLocaleCompare::callAsFunction):
              (KJS::StringProtoFuncBig::callAsFunction):
              (KJS::StringProtoFuncSmall::callAsFunction):
              (KJS::StringProtoFuncBlink::callAsFunction):
              (KJS::StringProtoFuncBold::callAsFunction):
              (KJS::StringProtoFuncFixed::callAsFunction):
              (KJS::StringProtoFuncItalics::callAsFunction):
              (KJS::StringProtoFuncStrike::callAsFunction):
              (KJS::StringProtoFuncSub::callAsFunction):
              (KJS::StringProtoFuncSup::callAsFunction):
              (KJS::StringProtoFuncFontcolor::callAsFunction):
              (KJS::StringProtoFuncFontsize::callAsFunction):
              (KJS::StringProtoFuncAnchor::callAsFunction):
              (KJS::StringProtoFuncLink::callAsFunction):
              * kjs/string_object.h:
      
      WebCore:
      
              Reviewed by Darin.
      
              Convert JavaScript internal function objects to use one class per
              function.  This avoids a switch statement inside what used to be
              the shared function classes and will allow Shark to better analyze
              the code.
      
              To make this switch, the value property of the HashEntry was changed
              to a union of an intptr_t (which is used to continue handle valueGetters)
              and function pointer which points to a static constructor for the
              individual new function objects.
      
              SunSpider claims this is a 0.5% speedup.
      
              - On the WebCore side, I updated CodeGeneratorJS.pm to generate the
                new classes and hand updated the remain non-generated (groan) classes.
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::customGetOwnPropertySlot):
              * bindings/js/JSEventTargetNode.cpp:
              (WebCore::JSEventTargetNodePrototypeFunctionAddEventListener::callAsFunction):
              (WebCore::JSEventTargetNodePrototypeFunctionRemoveEventListener::callAsFunction):
              (WebCore::JSEventTargetNodePrototypeFunctionDispatchEvent::callAsFunction):
              * bindings/js/JSEventTargetNode.h:
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::JSHTMLInputElementBaseFunctionSetSelectionRange::callAsFunction):
              (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
              * bindings/js/JSHTMLInputElementBase.h:
              (WebCore::JSHTMLInputElementBase::):
              * bindings/js/JSXMLHttpRequest.cpp:
              (KJS::JSXMLHttpRequestPrototypeFunctionAbort::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionGetAllResponseHeaders::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionGetResponseHeader::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionOpen::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionSend::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionSetRequestHeader::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionOverrideMIMEType::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionAddEventListener::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionRemoveEventListener::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionDispatchEvent::callAsFunction):
              * bindings/js/JSXMLHttpRequest.h:
              (KJS::JSXMLHttpRequest::impl):
              * bindings/js/JSXSLTProcessor.cpp:
              (KJS::JSXSLTProcessorPrototypeFunctionImportStylesheet::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionTransformToDocument::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionSetParameter::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionGetParameter::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionRemoveParameter::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionClearParameters::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionReset::callAsFunction):
              * bindings/js/JSXSLTProcessor.h:
              * bindings/js/kjs_events.cpp:
              (WebCore::JSClipboardPrototypeFunctionClearData::callAsFunction):
              (WebCore::JSClipboardPrototypeFunctionGetData::callAsFunction):
              (WebCore::JSClipboardPrototypeFunctionSetData::callAsFunction):
              (WebCore::JSClipboardPrototypeFunctionSetDragImage::callAsFunction):
              * bindings/js/kjs_events.h:
              * bindings/js/kjs_navigator.cpp:
              (KJS::Plugins::):
              (KJS::Navigator::getOwnPropertySlot):
              (KJS::Plugins::getOwnPropertySlot):
              (KJS::PluginsFunctionRefresh::callAsFunction):
              (KJS::NavigatorProtoFuncJavaEnabled::callAsFunction):
              * bindings/js/kjs_navigator.h:
              (KJS::Navigator::):
              * bindings/js/kjs_window.cpp:
              (KJS::Window::getOwnPropertySlot):
              (KJS::Window::put):
              (KJS::WindowProtoFuncAToB::callAsFunction):
              (KJS::WindowProtoFuncBToA::callAsFunction):
              (KJS::WindowProtoFuncOpen::callAsFunction):
              (KJS::WindowProtoFuncScrollBy::callAsFunction):
              (KJS::WindowProtoFuncScrollTo::callAsFunction):
              (KJS::WindowProtoFuncMoveBy::callAsFunction):
              (KJS::WindowProtoFuncMoveTo::callAsFunction):
              (KJS::WindowProtoFuncResizeBy::callAsFunction):
              (KJS::WindowProtoFuncResizeTo::callAsFunction):
              (KJS::WindowProtoFuncSetTimeout::callAsFunction):
              (KJS::WindowProtoFuncClearTimeout::callAsFunction):
              (KJS::WindowProtoFuncSetInterval::callAsFunction):
              (KJS::WindowProtoFuncAddEventListener::callAsFunction):
              (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
              (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
              (KJS::WindowProtoFuncNotImplemented::callAsFunction):
              (KJS::Location::getOwnPropertySlot):
              (KJS::Location::put):
              (KJS::LocationProtoFuncReplace::callAsFunction):
              (KJS::LocationProtoFuncReload::callAsFunction):
              (KJS::LocationProtoFuncAssign::callAsFunction):
              (KJS::LocationProtoFuncToString::callAsFunction):
              * bindings/js/kjs_window.h:
              (KJS::Window::):
              * bindings/scripts/CodeGeneratorJS.pm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a73c15f5
    • aroben@apple.com's avatar
      Windows build fix · 62f20d99
      aroben@apple.com authored
              Reviewed by Sam and Ada.
      
              * wtf/MathExtras.h: Get rid of a circular #include dependency to fix
              the build.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62f20d99
    • aroben@apple.com's avatar
      Fix a precedence warning on Windows · fdc5b60f
      aroben@apple.com authored
              * kjs/JSImmediate.h:
              (KJS::JSImmediate::toBoolean):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fdc5b60f
    • mrowe@apple.com's avatar
      2007-11-08 Mark Rowe <mrowe@apple.com> · fa241e9f
      mrowe@apple.com authored
              Build fix for JavaScriptGlue.
      
              * wtf/MathExtras.h: Include stdlib.h for srand and RAND_MAX.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa241e9f
    • darin@apple.com's avatar
      - Windows build fix · 5df77945
      darin@apple.com authored
              * kjs/JSImmediate.h: Include MathExtras.h rather than math.h since this file uses "signbit".
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5df77945
    • oliver's avatar
      Replace the use of floats for immediate values with the use of integers for a... · a1fe5a42
      oliver authored
      Replace the use of floats for immediate values with the use of integers for a 4.5% improvement in SunSpider.
      
      Reviewed by Darin.
      
      Unfortunately this change results in NaN, +Inf, -Inf, and -0 being heap allocated now, but
      we should now have faster array access, faster immediate to double conversion, and the
      potential to further improve bitwise operators in future.
      
      This also removes the need for unions to avoid strict aliasing problems when extracting
      a value from immediates.
      
      * kjs/JSImmediate.h:
      (KJS::):
      (KJS::JSImmediate::trueImmediate):
      (KJS::JSImmediate::falseImmediate):
      (KJS::JSImmediate::undefinedImmediate):
      (KJS::JSImmediate::nullImmediate):
      (KJS::JSImmediate::toBoolean):
      * kjs/value.h:
      (KJS::jsNaN):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a1fe5a42
    • eric@webkit.org's avatar
      2007-11-07 Eric Seidel <eric@webkit.org> · f02d3796
      eric@webkit.org authored
              Reviewed by Darin and Oliver.
              
              Add evaluateToNumber parallel evaluation tree to speed up number operations.
              Make ImmediateNumberNode a subclass of NumberNode.
              Share evaluate logic between evaluate and evaluateToNumber using inline functions
              There is still a lot of improvement to be made here.
              
              SunSpider claims this is a 1.0% speedup overall (nbody 7.9%), base64 slowing 2.0%
              Given the huge win that this prepares us for with simple type inferencing I see the small
              regression in base64 being worth the substantial overall improvement.
      
              * kjs/grammar.y:
              * kjs/nodes.cpp:
              (KJS::Node::evaluateToNumber):
              (KJS::NumberNode::evaluate):
              (KJS::NumberNode::evaluateToNumber):
              (KJS::StringNode::evaluateToNumber):
              (KJS::LocalVarAccessNode::inlineEvaluate):
              (KJS::LocalVarAccessNode::evaluate):
              (KJS::LocalVarAccessNode::evaluateToNumber):
              (KJS::BracketAccessorNode::inlineEvaluate):
              (KJS::BracketAccessorNode::evaluate):
              (KJS::BracketAccessorNode::evaluateToNumber):
              (KJS::NegateNode::evaluate):
              (KJS::NegateNode::evaluateToNumber):
              (KJS::MultNode::inlineEvaluateToNumber):
              (KJS::MultNode::evaluate):
              (KJS::MultNode::evaluateToNumber):
              (KJS::DivNode::inlineEvaluateToNumber):
              (KJS::DivNode::evaluate):
              (KJS::DivNode::evaluateToNumber):
              (KJS::ModNode::inlineEvaluateToNumber):
              (KJS::ModNode::evaluate):
              (KJS::ModNode::evaluateToNumber):
              (KJS::throwOutOfMemoryErrorToNumber):
              (KJS::addSlowCaseToNumber):
              (KJS::add):
              (KJS::addToNumber):
              (KJS::AddNode::evaluateToNumber):
              (KJS::SubNode::inlineEvaluateToNumber):
              (KJS::SubNode::evaluate):
              (KJS::SubNode::evaluateToNumber):
              (KJS::valueForReadModifyAssignment):
              (KJS::ReadModifyLocalVarNode::evaluate):
              (KJS::ReadModifyResolveNode::evaluate):
              (KJS::ReadModifyDotNode::evaluate):
              (KJS::ReadModifyBracketNode::evaluate):
              * kjs/nodes.h:
              (KJS::Node::):
              (KJS::NumberNode::):
              (KJS::ImmediateNumberNode::):
              (KJS::AddNode::precedence):
              * kjs/nodes2string.cpp:
              (KJS::NumberNode::streamTo):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f02d3796
  5. 07 Nov, 2007 2 commits