1 2007-10-25 Geoffrey Garen <ggaren@apple.com>
3 Reviewed by Oliver Hunt.
5 Rolled out my last patch. It turns out that I needed 2 words, not 1,
8 2007-10-25 Geoffrey Garen <ggaren@apple.com>
10 Reviewed by Oliver Hunt.
12 Fixed http://bugs.webkit.org/show_bug.cgi?id=15694
13 Shrink the size of an activation object by 1 word
15 This is in preparation for adding a symbol table to the activation
18 The basic strategy here is to rely on the mutual exclusion between
19 the arguments object pointer and the function pointer (you only need
20 the latter in order to create the former), and store them in the same
21 place. The LazyArgumentsObject class encapsulates this strategy.
23 Also inlined the ArgumentsImp constructor, for good measure.
25 SunSpider reports no regression. Regression tests pass.
27 * JavaScriptCore.xcodeproj/project.pbxproj:
29 (KJS::Context::~Context):
31 (KJS::ActivationImp::LazyArgumentsObject::createArgumentsObject):
32 (KJS::ActivationImp::LazyArgumentsObject::mark):
34 (KJS::ActivationImp::argumentsGetter):
35 (KJS::ActivationImp::mark):
37 (KJS::ActivationImp::LazyArgumentsObject::LazyArgumentsObject):
38 (KJS::ActivationImp::LazyArgumentsObject::getOrCreate):
39 (KJS::ActivationImp::LazyArgumentsObject::resetArguments):
40 (KJS::ActivationImp::LazyArgumentsObject::setArgumentsObject):
41 (KJS::ActivationImp::LazyArgumentsObject::argumentsObject):
42 (KJS::ActivationImp::LazyArgumentsObject::setFunction):
43 (KJS::ActivationImp::LazyArgumentsObject::function):
44 (KJS::ActivationImp::LazyArgumentsObject::createdArgumentsObject):
45 (KJS::ActivationImp::LazyArgumentsObject::):
46 (KJS::ActivationImp::ActivationImp::ActivationImp):
47 (KJS::ActivationImp::resetArguments):
49 2007-10-25 Adam Roben <aroben@apple.com>
51 Change JavaScriptCore.vcproj to use DerivedSources.make
53 We were trying to emulate the logic of make in
54 build-generated-files.sh, but we got it wrong. We now use a
55 build-generated-files very much like the one that WebCore uses to
58 We also now only have a Debug configuration of dftables which we build
59 even when doing a Release build of JavaScriptCore. dftables also no
60 longer has the "_debug" name suffix.
62 Changes mostly made by Darin, reviewed by me.
64 * DerivedSources.make: Add a variable to set the extension used for
65 the dftables executable.
66 * JavaScriptCore.vcproj/JavaScriptCore.sln: Updated to use Debug
67 dftables in Release configurations.
68 * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Ditto.
69 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
70 - Updated include path to point to the new location of the derived
72 - Modified pre-build event to pass the right arguments to
73 build-generated-files.sh and not call dftables directly.
74 - Added the derived source files to the project.
75 - Removed grammarWrapper.cpp, which isn't needed now that we're
76 compiling grammar.cpp directly.
77 * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
78 Slightly modified from the WebCore version.
79 * JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp: Removed.
80 * JavaScriptCore.vcproj/dftables/dftables.vcproj:
81 - Changed the output location to match Mac.
82 - Removed the Release configuration.
83 - Removed the _debug suffix.
85 2007-10-25 Geoffrey Garen <ggaren@apple.com>
87 Reviewed by Eric Seidel.
89 Slightly elaborated the differences between declaration procesing in
90 Function Code and Program Code.
92 .3% speedup on SunSpider.
95 (KJS::FunctionBodyNode::processDeclarationsFunctionCode):
96 (KJS::FunctionBodyNode::processDeclarationsProgramCode): Store a
97 minimum set of attributes instead of recomputing all the time. Also,
98 ignore m_parameters, since programs don't have arguments.
100 2007-10-25 Eric Seidel <eric@webkit.org>
104 More preparation work before adding long-running mode to testkjs.
107 (TestFunctionImp::callAsFunction):
112 (fillBufferWithContentsOfFile):
114 2007-10-25 Eric Seidel <eric@webkit.org>
118 Bring testkjs code out of the dark ages in preparation for more
119 radical improvements (like long-running testing support!)
122 (TestFunctionImp::callAsFunction):
125 (fillBufferWithContentsOfFile):
127 2007-10-25 Geoffrey Garen <ggaren@apple.com>
129 Reviewed by Maciej Stachowiak.
131 Make a fast path for declaration processing inside Function Code.
133 Lifted declaration processing code up from individual declaration nodes
134 and into processDeclarations.
136 Broke out processDeclarations into two cases, depending on the type of
137 code. This eliminates 2 branches, and facilitates more radical
138 divergeance in the future.
140 2.5% SunSpider speedup.
142 * JavaScriptCore.xcodeproj/project.pbxproj:
144 (KJS::FunctionBodyNode::initializeDeclarationStacks):
145 (KJS::FunctionBodyNode::processDeclarationsFunctionCode):
146 (KJS::FunctionBodyNode::processDeclarationsProgramCode):
147 (KJS::FunctionBodyNode::execute):
148 (KJS::FuncDeclNode::makeFunction):
152 2007-10-25 Maciej Stachowiak <mjs@apple.com>
156 - add header includes needed on platforms that don't use AllInOneFile.cpp
158 * API/JSCallbackObject.cpp:
161 * kjs/array_instance.cpp:
162 * kjs/function_object.cpp:
163 * kjs/interpreter.cpp:
166 2007-10-25 Eric Seidel <eric@webkit.org>
170 * JavaScriptCore.xcodeproj/project.pbxproj: re-mark JSGlobalObject.h as private
172 2007-10-25 Geoffrey Garen <ggaren@apple.com>
174 Reviewed by Maciej Stachowiak.
176 Fixed http://bugs.webkit.org/show_bug.cgi?id=15683
177 Re-order declaration initialization to avoid calling hasProperty inside
178 VarDeclNode::processDeclaration
180 .7% speedup on SunSpider.
183 * kjs/function.cpp: Merged parameter processing into FunctionBodyNode's
184 other processing of declared symbols, so the order of execution could
188 (KJS::VarDeclNode::getDeclarations): Added special case for the
189 "arguments" property name, explained in the comment.
191 (KJS::VarDeclNode::processDeclaration): Removed call to hasProperty
192 in the case of function code, since we know the declared symbol
193 management will resolve conflicts between symbols. Yay!
195 (KJS::VarDeclListNode::getDeclarations): Now that VarDeclNode's
196 implementation of getDeclarations is non-trivial, we can't take a
197 short-cut here any longer -- we need to put the VarDecl node on the
198 stack so it gets processed normally.
200 (KJS::FunctionBodyNode::processDeclarations): Changed the order of
201 processing to enforce mutual exclusion rules.
204 (KJS::DeclarationStacks::DeclarationStacks): Structure includes an
205 ExecState now, for fast access to the "arguments" property name.
207 2007-10-24 Eric Seidel <eric@webkit.org>
211 Add a JSGlobalObject class and remove the InterpreterMap
212 http://bugs.webkit.org/show_bug.cgi?id=15681
214 This required making JSCallbackObject a template class to allow for
215 JSGlobalObjects with JSCallbackObject functionality.
217 SunSpider claims this was a 0.5% speedup.
219 * API/JSCallbackObject.cpp:
221 * API/JSCallbackObject.h:
222 * API/JSCallbackObjectFunctions.h: Copied from API/JSCallbackObject.cpp.
223 (KJS::::JSCallbackObject):
225 (KJS::::~JSCallbackObject):
226 (KJS::::initializeIfNeeded):
228 (KJS::::getOwnPropertySlot):
230 (KJS::::deleteProperty):
231 (KJS::::implementsConstruct):
233 (KJS::::implementsHasInstance):
234 (KJS::::hasInstance):
235 (KJS::::implementsCall):
236 (KJS::::callAsFunction):
237 (KJS::::getPropertyNames):
243 (KJS::::cachedValueGetter):
244 (KJS::::staticValueGetter):
245 (KJS::::staticFunctionGetter):
246 (KJS::::callbackGetter):
247 * API/JSClassRef.cpp:
248 (OpaqueJSClass::prototype):
249 * API/JSContextRef.cpp:
250 (JSGlobalContextCreate):
251 * API/JSObjectRef.cpp:
253 (JSObjectGetPrivate):
254 (JSObjectSetPrivate):
255 * API/JSValueRef.cpp:
256 (JSValueIsObjectOfClass):
257 * JavaScriptCore.exp:
258 * JavaScriptCore.xcodeproj/project.pbxproj:
259 * bindings/c/c_utility.cpp:
260 (KJS::Bindings::convertValueToNPVariant):
261 * bindings/jni/jni_jsobject.cpp:
262 * bindings/objc/objc_utility.mm:
263 (KJS::Bindings::convertValueToObjcValue):
265 (KJS::Context::Context):
267 (KJS::ExecState::lexicalInterpreter):
268 * kjs/JSGlobalObject.h: Added.
269 (KJS::JSGlobalObject::JSGlobalObject):
270 (KJS::JSGlobalObject::isGlobalObject):
271 (KJS::JSGlobalObject::interpreter):
272 (KJS::JSGlobalObject::setInterpreter):
273 * kjs/array_instance.cpp:
276 (KJS::FunctionImp::callAsFunction):
277 (KJS::GlobalFuncImp::callAsFunction):
278 * kjs/interpreter.cpp:
279 (KJS::Interpreter::Interpreter):
280 (KJS::Interpreter::init):
281 (KJS::Interpreter::~Interpreter):
282 (KJS::Interpreter::globalObject):
283 (KJS::Interpreter::initGlobalObject):
284 (KJS::Interpreter::evaluate):
287 (KJS::cacheGlobalObject):
289 (KJS::JSObject::isGlobalObject):
292 2007-10-24 Eric Seidel <eric@webkit.org>
294 Build fix for Gtk, no review.
296 * kjs/collector.cpp: #include "context.h"
298 2007-10-24 Eric Seidel <eric@webkit.org>
302 Stop checking isOutOfMemory after every allocation, instead let the collector
303 notify all ExecStates if we ever hit this rare condition.
305 SunSpider claims this was a 2.2% speedup.
308 (KJS::Collector::collect):
309 (KJS::Collector::reportOutOfMemoryToAllInterpreters):
312 (KJS::TryNode::execute):
314 2007-10-24 Mark Rowe <mrowe@apple.com>
318 * kjs/identifier.h: Remove extra qualification.
320 2007-10-24 Geoffrey Garen <ggaren@apple.com>
322 Reviewed by Sam Weinig.
324 Disable ALWAYS_INLINE in debug builds, since it drives the debugger
327 * wtf/AlwaysInline.h:
329 2007-10-24 Geoffrey Garen <ggaren@apple.com>
331 Reviewed by Sam Weinig.
333 Inlined the fast path for creating an Identifier from an Identifier.
335 This is a .4% speedup on SunSpider overall, but as big as a 2.5%
336 speedup on certain individual tests. 65% of the Identifiers creating
337 by SunSpider are already Identifiers.
339 (The main reason I'm making this change is that it resolves a large
340 regression in a patch I haven't checked in yet.)
342 * JavaScriptCore.exp:
343 * kjs/identifier.cpp:
344 (KJS::Identifier::addSlowCase):
346 (KJS::Identifier::Identifier::add):
348 2007-10-24 Lars Knoll <lars@trolltech.com>
352 some changes to the way JS values are converted to Qt values in the script bindings. Added support for converting JS arrays into QStringList's.
354 * bindings/qt/qt_instance.cpp:
355 (KJS::Bindings::QtInstance::invokeMethod):
356 * bindings/qt/qt_runtime.cpp:
357 (KJS::Bindings::convertValueToQVariant):
358 (KJS::Bindings::QtField::setValueToInstance):
360 2007-10-24 Oliver Hunt <oliver@apple.com>
364 Remove old relation method, replace with specialised LessThan and lessThenEq functions for a 0.5-0.6% improvement in SunSpider
369 (KJS::LessNode::evaluate):
370 (KJS::GreaterNode::evaluate):
371 (KJS::LessEqNode::evaluate):
372 (KJS::GreaterEqNode::evaluate):
373 * kjs/operations.cpp:
376 2007-10-24 Eric Seidel <eric@webkit.org>
381 (KJS::ImmediateNumberNode::): Fix ASSERT correctness (and debug build!)
383 2007-10-24 Darin Adler <darin@apple.com>
387 * kjs/object.cpp: (KJS::JSObject::defaultValue): Get rid of a little
388 Identifier ref/deref for what SunSpider claims is a 0.4% speedup.
390 2007-10-24 Darin Adler <darin@apple.com>
394 - separate out the code to create a hash table the first time from the code
397 SunSpider claims this was a 0.7% speedup.
399 * kjs/property_map.cpp:
400 (KJS::PropertyMap::expand): Changed to call either createTable or rehash.
401 (KJS::PropertyMap::createTable): Added. For the case where we had no table.
402 (KJS::PropertyMap::rehash): Removed code needed only in the case where we
404 * kjs/property_map.h: Added createTable.
406 2007-10-24 Eric Seidel <eric@webkit.org>
410 Add ImmediateNumberNode to hold a JSValue* instead of a double for numbers
411 which can be represented by JSImmediate.
413 SunSpider claims this was a 0.6% speedup.
417 (KJS::NumberNode::evaluate):
418 (KJS::ImmediateNumberNode::evaluate):
421 (KJS::ImmediateNumberNode::):
422 * kjs/nodes2string.cpp:
423 (ImmediateNumberNode::streamTo):
425 2007-10-24 Darin Adler <darin@apple.com>
429 - http://bugs.webkit.org/show_bug.cgi?id=15657
430 change static hash tables to use powers of two for speed
432 Seems to give 0.7% SunSpider speedup.
434 * kjs/create_hash_table: Updated to generate new format.
436 (KJS::keysMatch): Took out unneeded typecast.
437 (KJS::findEntry): Updated to expect table type 3 -- changed the printf to a plain old assert.
438 Replaced the modulus with a bit mask.
439 (KJS::Lookup::findEntry): Get the hash directly, since we know identifiers already have computed
440 their hash -- saves a branch.
441 (KJS::Lookup::find): Ditto.
442 * kjs/lookup.h: Changed attr from 2-byte value to one-byte value. Replaced hashSize with hashSizeMask.
444 2007-10-24 Maciej Stachowiak <mjs@apple.com>
448 - remove KJS_CHECKEXCEPTIONs in places where exceptions can't happen for 0.6% SunSpider speedup
451 (KJS::DoWhileNode::execute):
452 (KJS::WhileNode::execute):
453 (KJS::ForNode::execute):
454 (KJS::ForInNode::execute):
455 (KJS::SourceElementsNode::execute):
457 2007-10-23 Darin Adler <darin@apple.com>
461 * kjs/JSImmediate.h: (KJS::JSImmediate::getUInt32):
462 Changed an && to an & for a 1% gain in SunSpider.
464 2007-10-23 Oliver Hunt <oliver@apple.com>
468 Reduce branching in implementations of some operator implementations, yielding 1.3% boost to SunSpider.
471 (KJS::MultNode::evaluate):
472 (KJS::DivNode::evaluate):
473 (KJS::ModNode::evaluate):
476 (KJS::AddNode::evaluate):
477 (KJS::SubNode::evaluate):
478 (KJS::valueForReadModifyAssignment):
479 * kjs/operations.cpp:
482 2007-10-23 Oliver Hunt <oliver@apple.com>
486 Separating all of the simple (eg. non-read-modify-write) binary operators
487 into separate classes in preparation for further JS optimisations.
489 Happily this produces a 0.8% to 1.0% performance increase in SunSpider with
492 * JavaScriptCore.xcodeproj/project.pbxproj:
495 (KJS::MultNode::evaluate):
496 (KJS::DivNode::evaluate):
497 (KJS::ModNode::evaluate):
498 (KJS::AddNode::evaluate):
499 (KJS::SubNode::evaluate):
500 (KJS::LeftShiftNode::evaluate):
501 (KJS::RightShiftNode::evaluate):
502 (KJS::UnsignedRightShiftNode::evaluate):
503 (KJS::LessNode::evaluate):
504 (KJS::GreaterNode::evaluate):
505 (KJS::LessEqNode::evaluate):
506 (KJS::GreaterEqNode::evaluate):
507 (KJS::InstanceOfNode::evaluate):
508 (KJS::InNode::evaluate):
509 (KJS::EqualNode::evaluate):
510 (KJS::NotEqualNode::evaluate):
511 (KJS::StrictEqualNode::evaluate):
512 (KJS::NotStrictEqualNode::evaluate):
513 (KJS::BitAndNode::evaluate):
514 (KJS::BitXOrNode::evaluate):
515 (KJS::BitOrNode::evaluate):
516 (KJS::LogicalAndNode::evaluate):
517 (KJS::LogicalOrNode::evaluate):
524 (KJS::LeftShiftNode::):
525 (KJS::RightShiftNode::):
526 (KJS::UnsignedRightShiftNode::):
528 (KJS::GreaterNode::):
530 (KJS::GreaterEqNode::):
531 (KJS::InstanceOfNode::):
534 (KJS::NotEqualNode::):
535 (KJS::StrictEqualNode::):
536 (KJS::NotStrictEqualNode::):
540 (KJS::LogicalAndNode::):
541 (KJS::LogicalOrNode::):
542 * kjs/nodes2string.cpp:
543 (MultNode::streamTo):
548 (LeftShiftNode::streamTo):
549 (RightShiftNode::streamTo):
550 (UnsignedRightShiftNode::streamTo):
551 (LessNode::streamTo):
552 (GreaterNode::streamTo):
553 (LessEqNode::streamTo):
554 (GreaterEqNode::streamTo):
555 (InstanceOfNode::streamTo):
557 (EqualNode::streamTo):
558 (NotEqualNode::streamTo):
559 (StrictEqualNode::streamTo):
560 (NotStrictEqualNode::streamTo):
561 (BitAndNode::streamTo):
562 (BitXOrNode::streamTo):
563 (BitOrNode::streamTo):
564 (LogicalAndNode::streamTo):
566 2007-10-23 Darin Adler <darin@apple.com>
570 - fix http://bugs.webkit.org/show_bug.cgi?id=15639
571 fix Math.abs(0), Math.ceil(-0), and Math.floor(-0)
573 Test: fast/js/math.html
575 * kjs/math_object.cpp: (MathFuncImp::callAsFunction):
576 Fix abs to look at the sign bit. Add a special case for values in the range
577 between -0 and -1 and a special case for ceil and for -0 for floor.
579 2007-10-23 Darin Adler <darin@apple.com>
583 - streamline exception handling code for a >1% speed-up of SunSpider
585 * kjs/nodes.cpp: Changed macros to use functions for everything that's not
586 part of normal execution. We'll take function call overhead when propagating
587 an exception or out of memory.
588 (KJS::createOutOfMemoryCompletion): Added.
589 (KJS::substitute): Use append instead of the relatively inefficient + operator.
590 (KJS::Node::rethrowException): Added.
591 * kjs/nodes.h: Added rethrowException.
593 2007-10-22 Darin Adler <darin@apple.com>
597 - fix http://bugs.webkit.org/show_bug.cgi?id=15636
598 some JavaScriptCore regression tests are failing due to numeric conversion
600 This should restore correctness and make speed better too, restoring some
601 of the optimization we lost in my last check-in.
604 (KJS::JSImmediate::getTruncatedInt32): Added. Uses the range checking idiom
605 I used in my patch yesterday.
606 (KJS::JSImmediate::getTruncatedUInt32): Ditto.
608 * kjs/internal.h: Removed getInt32 and added getTruncatedInt/UInt32.
610 (KJS::NumberImp::getUInt32): Changed to always use double, since I can't find
611 a way to write this more efficiently for float.
612 (KJS::NumberImp::getTruncatedInt32): Added.
613 (KJS::NumberImp::getTruncatedUInt32): Added.
615 * kjs/value.h: Removed getInt32 and added getTruncatedInt/UInt32.
616 (KJS::JSValue::getUInt32):
617 (KJS::JSValue::getTruncatedInt32): Added.
618 (KJS::JSValue::getTruncatedUInt32): Added.
619 (KJS::JSValue::toInt32): Changed getInt32 call to getTruncatedInt32.
620 (KJS::JSValue::toUInt32): Changed getUInt32 call to getTruncatedUInt32.
622 (KJS::JSCell::getTruncatedInt32): Added.
623 (KJS::JSCell::getTruncatedUInt32): Added.
624 (KJS::JSValue::toInteger): Changed getUInt32 call to getTruncatedInt32.
625 (KJS::JSValue::toInt32SlowCase): Removed extra getInt32 call I accidentally
627 (KJS::JSValue::toUInt32SlowCase): Ditto.
628 (KJS::JSValue::toUInt16): Changed getUInt32 call to getTruncatedUInt32.
630 * JavaScriptCore.exp: Updated.
632 2007-10-22 Darin Adler <darin@apple.com>
636 - fix http://bugs.webkit.org/show_bug.cgi?id=15632
637 js1_5/Array/array-001.js test failing
639 One of the JavaScriptCore tests was failing; it failed because of
640 my change to NumberImp::getUInt32. The incorrect code I copied was
641 from JSImmediate::getUInt32, and was a pre-existing bug.
643 This patch fixes correctness, but will surely slow down SunSpider.
644 We may be able to code this tighter and get the speed back.
647 (KJS::JSImmediate::getInt32): Renamed from toInt32 to more accurately
648 reflect the fact that this function only returns true if the value is
649 accurate (no fractional part, etc.). Changed code so that it returns
650 false when the value has a fraction.
651 (KJS::JSImmediate::getUInt32): Ditto.
654 (KJS::NumberImp::getInt32): Changed code so that it returns false when
655 the value has a fraction. Restores the old behavior.
656 (KJS::NumberImp::getUInt32): Ditto.
659 (KJS::JSValue::getInt32): Updated for name change.
660 (KJS::JSValue::getUInt32): Ditto.
661 (KJS::JSValue::toInt32): Ditto.
662 (KJS::JSValue::toUInt32): Ditto.
664 2007-10-22 Darin Adler <darin@apple.com>
668 - fix crash seen when running JavaScriptCore tests
670 * kjs/array_instance.cpp: (KJS::ArrayInstance::mark):
671 Copy and paste error: I accidentally had code here that was
672 making a copy of the HashMap -- that's illegal inside a mark
673 function and was unnecessary. The other callsite was modifying
674 the map as it iterated it, but this function is not.
676 2007-10-22 Maciej Stachowiak <mjs@apple.com>
680 - Avoid moving floats into integer registers in jsNumber() for 3% speedup on SunSpider
681 http://bugs.webkit.org/show_bug.cgi?id=15627
684 (KJS::JSImmediate::fromDouble): Avoid moving floats to integer
685 registers since this is very slow.
687 2007-10-22 Darin Adler <darin@apple.com>
689 Reviewed by Eric Seidel.
691 - http://bugs.webkit.org/show_bug.cgi?id=15617
692 improve speed of integer conversions
694 Makes SunSpider 6% faster.
696 * kjs/JSImmediate.h: Added toInt32 and toUInt32, with separate versions for
699 (KJS::JSValue::getUInt32): Call JSImmediate::toUInt32.
701 * kjs/internal.h: Added getInt32.
703 (KJS::NumberImp::getInt32): Added.
704 (KJS::NumberImp::getUInt32): Replaced with more-optimal implementation
708 (KJS::jsNumber): Marked ALWAYS_INLINE, because this wasn't getting
710 (KJS::JSValue::getInt32): Added.
711 (KJS::JSValue::getUInt32): Changed to call the new JSImmediate::toUInt32
712 to avoid converting from float to double.
713 (KJS::JSValue::toInt32): Made inline, separated out the slow case.
714 (KJS::JSValue::toUInt32): Ditto.
716 (KJS::JSCell::getInt32): Added.
717 (KJS::JSValue::toInt32SlowCase): Renamed from toInt32. Changed to use the
718 new getInt32. Added a faster case for in-range numbers.
719 (KJS::JSValue::toUInt32SlowCase): Ditto.
720 (KJS::JSValue::toUInt16): Added a faster case for in-range numbers.
722 * JavaScriptCore.exp: Updated for changes.
724 2007-10-22 Adam Roben <aroben@apple.com>
728 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Turn off
729 warning about implicit conversion to bool.
731 2007-10-22 Mark Rowe <mrowe@apple.com>
735 * kjs/array_instance.cpp:
737 2007-10-22 Darin Adler <darin@apple.com>
741 - http://bugs.webkit.org/show_bug.cgi?id=15606
742 make cut-off for sparse vs. dense arrays smarter for speed with large arrays
744 Makes the morph test in SunSpider 26% faster, and the overall
747 This also fixes some small problems we had with the distinction
748 between nonexistent and undefined values in arrays.
750 * kjs/array_instance.h: Tweaked formatting and naming.
751 * kjs/array_instance.cpp: Copied from kjs/array_object.cpp.
752 (KJS::storageSize): Added. Computes the size of the storage given a vector length.
753 (KJS::increasedVectorLength): Added. Implements the rule for resizing the vector.
754 (KJS::isDenseEnoughForVector): Added.
755 (KJS::ArrayInstance::ArrayInstance): Initialize the new fields.
756 (KJS::ArrayInstance::~ArrayInstance): Since m_storage is now never 0, delete it.
757 (KJS::ArrayInstance::getItem): Updated for name changes.
758 (KJS::ArrayInstance::lengthGetter): Ditto.
759 (KJS::ArrayInstance::inlineGetOwnPropertySlot): Added. Allows both versions of
760 getOwnPropertySlot to share more code.
761 (KJS::ArrayInstance::getOwnPropertySlot): Just refactored, no code change.
762 (KJS::ArrayInstance::put): Added logic for extending the vector as long as the
763 array is dense enough. Also keep m_numValuesInVector up to date.
764 (KJS::ArrayInstance::deleteProperty): Added code to keep m_numValuesInVector
766 (KJS::ArrayInstance::getPropertyNames): Fixed bug where this would omit names
767 for array indices with undefined values.
768 (KJS::ArrayInstance::increaseVectorLength): Renamed from resizeStorage. Also
769 simplified to only handle getting larger.
770 (KJS::ArrayInstance::setLength): Added code to update m_numValuesInVector, to
771 zero out the unused part of the vector and to delete the map if it's no longer
773 (KJS::ArrayInstance::mark): Tweaked formatting.
774 (KJS::compareByStringForQSort): Ditto.
775 (KJS::ArrayInstance::sort): Ditto.
776 (KJS::CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments):
778 (KJS::compareWithCompareFunctionForQSort): Ditto.
779 (KJS::ArrayInstance::compactForSorting): Fixed bug where this would turn
780 undefined values into nonexistent values in some cases.
782 * kjs/array_object.h: Removed MAX_ARRAY_INDEX.
783 * kjs/array_object.cpp: Removed ArrayInstance. Moved to a separate file.
785 * JavaScriptCore.pri: Added array_instance.cpp.
786 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
787 * kjs/AllInOneFile.cpp: Ditto.
789 2007-10-22 Andrew Wellington <proton@wiretapped.net>
791 Reviewed by Mark Rowe.
793 Fix for local database support after r26879
794 Ensure that ENABLE_DATABASE and ENABLE_ICONDATABASE are correctly set
796 * Configurations/JavaScriptCore.xcconfig:
798 2007-10-22 Simon Hausmann <hausmann@kde.org>
802 Build fix for the non-qmake builds.
804 * wtf/Platform.h: Default to enabling the database features unless
805 otherwise specified. (similar to ENABLE_ICONDATABASE)
807 2007-10-22 Holger Freyther <zecke@selfish.org>
809 Reviewed by Simon Hausmann <hausmann@kde.org>.
811 * Do not build testkjs as an application bundle. This is
812 needed for run-javascriptcore-tests on OSX.
813 * Also, based on r26633, allow to test the WebKit/Qt port on OSX.
814 * Set DYLD_LIBRARY_PATH if it was set in the environment. It must be set
815 as we do not have -rpath on OSX.
819 2007-10-21 Mark Rowe <mrowe@apple.com>
823 http://bugs.webkit.org/show_bug.cgi?id=15575
824 Bug 15575: [GTK] Implement threading using GThread
826 * wtf/Platform.h: Do not enable pthreads for Gtk.
828 2007-10-21 Mark Rowe <mrowe@apple.com>
832 Fix http://bugs.webkit.org/show_bug.cgi?id=15603
833 Bug 15603: Regression(r26847): Crash when sorting an empty array from JavaScript
835 * kjs/array_object.cpp:
836 (KJS::freeStorage): Reinstate null-check that was removed in r26847.
838 2007-10-21 Darin Adler <darin@apple.com>
842 * kjs/array_instance.h: Removed unused ExecState parameter.
843 * kjs/array_object.cpp:
844 (KJS::ArrayInstance::put): Ditto.
845 (KJS::ArrayInstance::setLength): Ditto.
847 2007-10-21 Darin Adler <darin@apple.com>
849 * kjs/array_object.cpp: (KJS::ArrayInstance::put):
850 Add missing assignment that was causing regression test crash.
852 2007-10-21 Darin Adler <darin@apple.com>
856 - http://bugs.webkit.org/show_bug.cgi?id=15585
857 speed up sparse arrays by using a custom map
859 Speeds up SunSpider by 10%.
861 * kjs/array_object.cpp:
862 (allocateStorage): Leave room for an additional pointer.
863 (reallocateStorage): Ditto.
864 (freeStorage): Ditto.
865 (ArrayInstance::~ArrayInstance): Delete the overflow map if present.
866 (ArrayInstance::getItem): Read values from the overflow map if present.
867 Removed the check of length, since it slows down the common case.
868 (ArrayInstance::getOwnPropertySlot): Ditto. Also removed the fallback
870 (ArrayInstance::put): Write values into the overflow map as needed.
871 Also create overflow map when needed.
872 (ArrayInstance::deleteProperty): Remove values from the overflow map
874 (ArrayInstance::getPropertyNames): Add a name for each identifier in
875 the property map. This is extremely inefficient.
876 (ArrayInstance::setLength): Remove any values in the overflow map
877 that are past the new length, as we formerly did with the property map.
878 (ArrayInstance::mark): Mark any values in the overflow map.
879 (compareByStringForQSort): Removed unneeded undefined case, since
880 compactForSorting guarantees we will have no undefined values.
881 (compareWithCompareFunctionForQSort): Ditto.
882 (ArrayInstance::compactForSorting): Copy all the values out of the
883 overflow map and destroy it.
885 * kjs/property_map.h: Removed now-unused getSparseArrayPropertyNames.
886 * kjs/property_map.cpp: Ditto.
888 2007-10-20 Darin Adler <darin@apple.com>
892 - http://bugs.webkit.org/show_bug.cgi?id=15579
893 stop churning identifier reference counts copying Completion objects
895 * kjs/completion.h: Replace the Identifier with an Identifier*.
897 (ForInNode::execute): Update for change to Completion constructor.
898 (ContinueNode::execute): Ditto.
899 (BreakNode::execute): Ditto.
901 2007-10-20 Mark Rowe <mrowe@apple.com>
905 Gtk changes needed to enable HTML 5 client-side database storage.
907 * wtf/Platform.h: Have Gtk use pthreads for now.
909 2007-10-20 Geoffrey Garen <ggaren@apple.com>
911 Reviewed by Maciej Stachowiak.
913 Fixed http://bugs.webkit.org/show_bug.cgi?id=15570
914 Store gathered declaration nodes in the function body node.
916 This means that you only have to gather the declaration nodes the first
917 time the function executes. Performance gain of 2.10% on SunSpider,
918 0.90% on command-line JS iBench.
920 * kjs/nodes.cpp: Split declaration stack initialization code off into
921 initializeDeclarationStacks().
922 (FunctionBodyNode::FunctionBodyNode):
923 (FunctionBodyNode::initializeDeclarationStacks):
924 (FunctionBodyNode::processDeclarations):
926 * kjs/nodes.h: Changed DeclarationStacks structure to hold references,
927 since the actual Vectors are now stored either on the stack or in the
930 2007-10-19 Geoffrey Garen <ggaren@apple.com>
932 Reviewed by Darin Adler.
934 http://bugs.webkit.org/show_bug.cgi?id=15559
935 Moved processDeclarations call into FunctionBodyNode::execute
937 To improve encapsulation, moved processDeclarations call into
938 FunctionBodyNode::execute. Also marked processDeclarations
939 ALWAYS_INLINE, since it has only 1 caller now. This is a .71% speedup
940 on command-line JS iBench.
943 (KJS::FunctionImp::callAsFunction):
944 (KJS::GlobalFuncImp::callAsFunction):
946 * kjs/interpreter.cpp:
947 (KJS::Interpreter::evaluate):
949 (FunctionBodyNode::execute):
952 2007-10-19 Brady Eidson <beidson@apple.com>
956 Queue -> Deque! and small style tweaks
958 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
959 * JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
960 * wtf/Deque.h: Added.
961 (WTF::DequeNode::DequeNode):
963 (WTF::Deque::~Deque):
965 (WTF::Deque::isEmpty):
966 (WTF::Deque::append):
967 (WTF::Deque::prepend):
970 (WTF::Deque::removeFirst):
972 * wtf/Queue.h: Removed.
975 2007-10-19 Brady Eidson <beidson@apple.com>
979 Added a simple LinkedList based Queue to wtf
980 We can make a better, more sophisticated an efficient one later, but have
981 needed one for some time, now!
983 * JavaScriptCore.xcodeproj/project.pbxproj:
984 * wtf/Queue.h: Added.
985 (WTF::QueueNode::QueueNode):
987 (WTF::Queue::~Queue):
989 (WTF::Queue::isEmpty):
990 (WTF::Queue::append):
991 (WTF::Queue::prepend):
994 (WTF::Queue::removeFirst):
997 2007-10-19 Nikolas Zimmermann <zimmermann@kde.org>
1001 Try to fix Qt/Win build slave, by including windows.h also on Qt/Win.
1003 * kjs/testkjs.cpp: Change PLATFORM(WIN) to PLATFORM(WIN_OS)
1005 2007-10-19 Simon Hausmann <hausmann@kde.org>
1009 Fix compilation on Windows when wchar_t is a typedef instead of a native type (triggered by -Zc:wchar_t-).
1010 Don't provide the wchar_t overloads then as they conflict with the unsigned short ones.
1013 (WTF::isASCIIAlpha):
1014 (WTF::isASCIIAlphanumeric):
1015 (WTF::isASCIIDigit):
1016 (WTF::isASCIIHexDigit):
1017 (WTF::isASCIILower):
1018 (WTF::isASCIISpace):
1019 (WTF::toASCIILower):
1020 (WTF::toASCIIUpper):
1022 2007-10-19 Simon Hausmann <hausmann@kde.org>
1026 Another build fix for the windows/qt build: Apply the same fix as in revision 26686 also to kjs/config.h to disable the disallowctype feature.
1030 2007-10-18 Maciej Stachowiak <mjs@apple.com>
1034 - use __declspec(thread) for fast thread-local storage on Windows
1036 - 2.2% speedup on sunspider (on Windows)
1037 - 7% speedup on the string section
1038 - 6% speedup on JS iBench
1040 - fixed <rdar://problem/5473084> PLT on Windows got 2.5% slower between r25406 and r25422
1041 - fixed at least some of <rdar://5527965? i-Bench JS was 14% slower in 310A11 than 310A10
1044 * wtf/FastMalloc.cpp:
1045 (WTF::getThreadHeap):
1046 (WTF::setThreadHeap):
1047 (WTF::TCMalloc_ThreadCache::GetCache):
1048 (WTF::TCMalloc_ThreadCache::GetCacheIfPresent):
1049 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
1051 2007-10-17 Darin Adler <darin@apple.com>
1053 Reviewed by Mark Rowe.
1055 - fix http://bugs.webkit.org/show_bug.cgi?id=15543
1056 <rdar://problem/5545639> REGRESSION (r26697):
1057 GoogleDocs: Can't create new documents or open existing ones
1059 Test: fast/js/regexp-non-character.html
1061 * pcre/pcre_compile.c: (check_escape): Take out the checks for valid characters
1062 in the \u sequences -- not needed and actively harmful.
1064 2007-10-17 Anders Carlsson <andersca@apple.com>
1069 #define USE_PTHREADS on Mac.
1071 2007-10-17 Geoffrey Garen <ggaren@apple.com>
1073 Reviewed by Darin Adler.
1075 Merged DeclaredFunctionImp into FunctionImp (the base class) because
1076 the distinction between the two was unused.
1078 Removed codeType() from FunctionImp because FunctionImp and its
1079 subclasses all returned FunctionCode, so it was unused, practically
1082 Removed a different codeType() from GlobalFuncImp because it was unused.
1083 (Perhaps it was vestigial from a time when GlobalFuncImp used to
1084 inherit from FunctionImp.)
1086 * bindings/runtime_method.cpp:
1087 * bindings/runtime_method.h:
1090 (KJS::FunctionImp::FunctionImp):
1091 (KJS::FunctionImp::callAsFunction):
1092 (KJS::FunctionImp::construct):
1093 (KJS::FunctionImp::execute):
1094 (KJS::FunctionImp::processVarDecls):
1096 (KJS::FunctionImp::implementsConstruct):
1097 (KJS::FunctionImp::scope):
1098 * kjs/function_object.cpp:
1099 (FunctionProtoFunc::callAsFunction):
1100 (FunctionObjectImp::construct):
1102 (FuncDeclNode::processFuncDecl):
1103 (FuncExprNode::evaluate):
1105 2007-10-17 Adam Roben <aroben@apple.com>
1107 Windows build fix part 2.
1109 Fix was by Darin, reviewed by Anders and Adam.
1111 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add
1112 FastMallocPCRE.cpp to the project, and let Visual Studio have its way
1113 with the post-build step.
1114 * pcre/pcre.h: Don't DLL export the entry points just because this
1115 is Win32 -- this is an internal copy of PCRE and should be private.
1116 * pcre/pcre_compile.c: Fix an uninitialized variable warning --
1117 there's no real problem but it's better to quiet the compiler by
1118 tweaking the code slightly than turn off the warning entirely.
1120 2007-10-17 Adam Roben <aroben@apple.com>
1126 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable
1127 some mismatched signed/unsigned comparison warnings.
1129 (match): #if-out some labels that don't seem to exist.
1131 2007-10-17 Mark Rowe <mrowe@apple.com>
1135 * JavaScriptCore.pri: Add FastMallocPCRE.cpp.
1136 * pcre/pcre_get. #if out two functions that depend on pcre_get_stringnumber, which
1137 is currently unavailable for UTF-16.
1139 2007-10-16 Darin Adler <darin@apple.com>
1143 - merged PCRE changes between 6.4 and 6.5
1145 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1146 * JavaScriptCore.xcodeproj/project.pbxproj:
1147 Removed pcre_config.c, pcre_globals.c, pcre_info.c, pcre_maketables.c,
1148 pcre_printint.src, pcre_refcount.c, pcre_study.c, pcre_try_flipped.c,
1149 pcre_ucp_findchar.c, pcre_version.c, and ucptable.c. Added pcre_ucp_searchfuncs.c.
1155 * pcre/pcre-config.h:
1158 * pcre/pcre_compile.c:
1160 * pcre/pcre_fullinfo.c:
1162 * pcre/pcre_internal.h:
1163 * pcre/pcre_maketables.c:
1164 * pcre/pcre_ord2utf8.c:
1165 * pcre/pcre_tables.c:
1166 * pcre/pcre_ucp_searchfuncs.c: Copied from pcre/pcre_ucp_findchar.c.
1167 * pcre/pcre_xclass.c:
1169 * pcre/ucpinternal.h:
1171 Updated with new versions from the PCRE 6.5 release, merged with changes.
1173 * pcre/pcre_config.c: Removed.
1174 * pcre/pcre_globals.c: Removed.
1175 * pcre/pcre_info.c: Removed.
1176 * pcre/pcre_printint.src: Removed.
1177 * pcre/pcre_refcount.c: Removed.
1178 * pcre/pcre_study.c: Removed.
1179 * pcre/pcre_try_flipped.c: Removed.
1180 * pcre/pcre_ucp_findchar.c: Removed.
1181 * pcre/pcre_version.c: Removed.
1183 2007-10-16 Geoffrey Garen <ggaren@apple.com>
1185 Reviewed by Darin Adler.
1187 Removed KJS_VERBOSE because it was getting in the way of readability,
1188 and the messages didn't seem very helpful.
1191 (KJS::FunctionImp::callAsFunction):
1192 (KJS::FunctionImp::passInParameters):
1196 (KJS::JSObject::put):
1199 2007-10-16 Geoffrey Garen <ggaren@apple.com>
1201 Reviewed by Darin Adler.
1203 Removed the Parameter class because it was a redundant wrapper around
1207 (KJS::FunctionImp::passInParameters):
1208 (KJS::FunctionImp::getParameterName):
1210 (FunctionBodyNode::addParam):
1212 (KJS::FunctionBodyNode::):
1214 2007-10-16 Geoffrey Garen <ggaren@apple.com>
1216 Reviewed by Darin Adler.
1218 Global replace of assert with ASSERT.
1220 2007-10-16 Adam Roben <aroben@apple.com>
1222 Make testkjs not delay-load WebKit
1224 Soon, delay-loading WebKit will be impossible (because we will be
1225 using __declspec(thread) for thread-local storage). This change
1226 prepares testkjs for the future.
1230 * JavaScriptCore.vcproj/JavaScriptCore.sln: Removed WebKitInitializer,
1232 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Don't link against
1233 WebKitInitializer, don't delay-load WebKit.
1234 * kjs/testkjs.cpp: Don't use WebKitInitializer.
1236 2007-10-16 Adam Roben <aroben@apple.com>
1238 Updated testkjs for the rename of WebKit_debug.dll to WebKit.dll for the Debug configuration
1240 Reviewed by Kevin McCullough.
1242 * JavaScriptCore.vcproj/debug.vsprops: Added WebKitDLLConfigSuffix.
1243 * JavaScriptCore.vcproj/debug_internal.vsprops: Ditto.
1244 * JavaScriptCore.vcproj/release.vsprops: Ditto.
1245 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Use
1246 WebKitDLLConfigSuffix when referring to WebKit.dll, and fixed a typo
1247 in the name of icuuc36[_debug].dll.
1249 2007-10-16 Geoffrey Garen <ggaren@apple.com>
1251 Reviewed by Maciej Stachowiak.
1253 Re-structured variable and function declaration code.
1255 Command-line JS iBench shows no regression.
1257 Here are the changes:
1259 1. Function declarations are now processed at the same time as var
1260 declarations -- namely, immediately upon entry to an execution context.
1261 This does not match Firefox, which waits to process a function
1262 declaration until the declaration's containing block executes, but it
1263 does match IE and the ECMA spec. (10.1.3 states that var and function
1264 declarations should be processed at the same time -- namely, "On
1265 entering an execution context." 12.2 states that "A Block does not
1266 define a new execution scope.")
1268 2. Declaration processing proceeds iteratively now, rather than
1269 recursively, storing the nodes is finds in stacks. This will later
1270 facilitate an optimization to hold on to the gathered declaration nodes,
1271 rather than re-fetching them in every function call.
1272 [ http://bugs.webkit.org/show_bug.cgi?id=14868 ]
1274 Modified these tests because they expected the incorrect Mozilla
1275 behavior described above:
1277 * tests/mozilla/ecma_3/Function/scope-001.js:
1278 * tests/mozilla/js1_5/Scope/regress-184107.js:
1280 2007-10-16 Darin Adler <darin@apple.com>
1282 - try to fix the GTK build
1284 * kjs/ustring.cpp: Include ASCIICType.h, not ASCIICtype.h.
1286 2007-10-16 Darin Adler <darin@apple.com>
1288 - try to fix the Windows build
1290 * kjs/date_object.cpp: (KJS::parseDate): A couple instances of isspace were
1291 in here. Not sure why it wasn't failing elsewhere. Changed to isASCIISpace.
1293 2007-10-16 Darin Adler <darin@apple.com>
1295 - try to fix the GTK build
1297 * kjs/ustring.cpp: Include ASCIICType.h.
1299 2007-10-16 Darin Adler <darin@apple.com>
1301 Reviewed by Maciej and Geoff (and looked over by Eric).
1303 - http://bugs.webkit.org/show_bug.cgi?id=15519
1304 eliminate use of <ctype.h> for processing ASCII
1306 * wtf/ASCIICType.h: Added.
1307 * wtf/DisallowCType.h: Added.
1309 * kjs/config.h: Include DisallowCType.h.
1311 * kjs/date_object.cpp:
1312 (KJS::skipSpacesAndComments):
1318 (KJS::UString::toDouble):
1319 Use ASCIICType.h functions instead of ctype.h ones.
1321 2007-10-14 Maciej Stachowiak <mjs@apple.com>
1325 - fixes for "New JavaScript benchmark"
1326 http://bugs.webkit.org/show_bug.cgi?id=15515
1329 (TestFunctionImp::callAsFunction): Implement "load" for compatibility
1331 (TestFunctionImp::): ditto
1333 (kjsmain): Drop useless --> from output.
1335 2007-10-15 Geoffrey Garen <ggaren@apple.com>
1337 Removed unnecessary #include.
1339 * API/JSObjectRef.cpp:
1341 2007-10-15 Geoffrey Garen <ggaren@apple.com>
1343 Double-reverse build fix. My tree was out of date.
1346 (NumberNode::evaluate):
1348 2007-10-15 Geoffrey Garen <ggaren@apple.com>
1353 (NumberNode::evaluate):
1355 2007-10-15 Geoffrey Garen <ggaren@apple.com>
1357 Reviewed by Darin Adler.
1359 Removed surprising self-named "hack" that made nested functions
1360 available as named properties of their containing functions, and placed
1361 containing function objects in the scope chains of nested functions.
1363 There were a few reasons to remove this "hack:"
1365 1. It contradicted FF, IE, and the ECMA spec.
1367 2. It incurred a performance penalty, since merely parsing a function
1368 required parsing its body for nested functions (and so on).
1370 3. SVN history contains no explanation for why it was added. It was just
1371 legacy code in a large merge a long, long time ago.
1373 [ Patch broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ]
1376 (FuncDeclNode::processFuncDecl):
1378 2007-10-15 Geoffrey Garen <ggaren@apple.com>
1380 Reviewed by Darin Adler.
1382 Removed the concept of AnonymousCode. It was unused, and it doesn't
1383 exist in the ECMA spec.
1385 [ Patch broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ]
1388 (KJS::Context::Context):
1392 (ReturnNode::execute):
1394 2007-10-15 Geoffrey Garen <ggaren@apple.com>
1396 Reviewed by Darin Adler.
1398 Made function parameters DontDelete. This matches FF and the vague
1399 description in ECMA 10.1.3. It's also required in order to make
1400 symbol table based lookup of function parameters valid. (If the
1401 parameters aren't DontDelete, you can't guarantee that you'll find
1402 them later in the symbol table.)
1404 [ Patch broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ]
1407 (KJS::FunctionImp::passInParameters):
1409 2007-10-15 Geoffrey Garen <ggaren@apple.com>
1411 Reviewed by Maciej Stachowiak.
1413 Some Vector optimizations. These are especially important when using
1414 Vector as a stack for implementing recursive algorithms iteratively.
1416 [ Broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ]
1418 1. Added shrink(), which is a version of resize() that you can call
1419 to save a branch / improve code generation and inlining when you know
1420 that the vector is not getting bigger.
1422 2. Changed subclassing relationship in VectorBuffer to remove a call to
1423 fastFree() in the destructor for the inlineCapacity != 0 template
1424 specialization. This brings inline Vectors one step closer to true
1425 stack-allocated arrays.
1427 Also changed abort() to CRASH(), since the latter works better.
1430 (WTF::VectorBufferBase::allocateBuffer):
1431 (WTF::VectorBufferBase::deallocateBuffer):
1432 (WTF::VectorBufferBase::VectorBufferBase):
1433 (WTF::VectorBufferBase::~VectorBufferBase):
1435 (WTF::VectorBuffer::VectorBuffer):
1436 (WTF::VectorBuffer::~VectorBuffer):
1437 (WTF::VectorBuffer::deallocateBuffer):
1438 (WTF::VectorBuffer::releaseBuffer):
1439 (WTF::Vector::clear):
1440 (WTF::Vector::removeLast):
1445 2007-10-12 Geoffrey Garen <ggaren@apple.com>
1447 Reviewed by Maciej Stachowiak.
1449 Fixed http://bugs.webkit.org/show_bug.cgi?id=15490
1450 Iteration statements sometimes incorrectly evaluate to the empty value
1453 [ Broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ]
1455 This patch is a merge of KDE r670547, with substantial modification
1458 It fixes do-while statements to evaluate to a value. (They used
1459 to evaluate to the empty value in all cases.)
1461 It also fixes SourceElementsNode to maintain the value of abnormal
1462 completions like "break" and "continue."
1464 It also re-works the main execution loop in SourceElementsNode so that
1465 it (1) makes a little more sense and (2) avoids unnecessary work. This
1466 is a .28% speedup on command-line JS iBench.
1469 (DoWhileNode::execute):
1470 (SourceElementsNode::execute):
1472 2007-10-15 Simon Hausmann <hausmann@kde.org>
1476 Fix compilation with gcc 4.3 by including 'limits' due to the use of std::numeric_limits.
1480 2007-10-5 Kevin Ollivier <kevino@theolliviers.com>
1484 Add support for MSVC7, and fix cases where PLATFORM(WIN) should
1485 be PLATFORM(WIN_OS) for other ports building on Windows.
1488 (KJS::getDSTOffsetSimple):
1489 * kjs/JSImmediate.h:
1490 * wtf/Assertions.cpp:
1493 * wtf/StringExtras.h:
1497 2007-10-14 Cameron Zwarich <cwzwarich@uwaterloo.ca>
1501 Adds NegateNode optimization from KJS. The relevant revision in KDE
1506 (NumberNode::evaluate):
1509 (KJS::NumberNode::):
1510 * kjs/nodes2string.cpp:
1511 (NumberNode::streamTo):
1513 2007-10-14 Jason Foreman <jason@threeve.org>
1517 Fix http://bugs.webkit.org/show_bug.cgi?id=15145
1519 Ensure that if adjusting n to minimize the difference of n*intPow10(e-p+1) to x,
1520 that the property n < intPow10(p) is maintained.
1522 * kjs/number_object.cpp:
1523 (NumberProtoFunc::callAsFunction):
1525 == Rolled over to ChangeLog-2007-10-14 ==