1 2007-12-20 Eric Seidel <eric@webkit.org>
3 Reviewed by Geoff, then re-rubber-stamped by Geoff after final search/replace and testing.
5 Small reworking of Date code for 4% speedup on Date tests (0.2% overall)
6 http://bugs.webkit.org/show_bug.cgi?id=16537
8 Make msToYear human-readable
9 Make msToDayInMonth slightly more readable and avoid recalculating msToYear
10 Remove use of isInLeapYear to avoid calling msToYear
11 Remove dayInYear call by changing msToDayInMonth to dayInMonthFromDayInYear
12 Remove more duplicate calls to dayInYear and getUTCOffset for further speedup
15 (KJS::daysFrom1970ToYear):
17 (KJS::monthFromDayInYear):
19 (KJS::dayInMonthFromDayInYear):
20 (KJS::dateToDayInYear):
21 (KJS::getDSTOffsetSimple):
23 (KJS::gregorianDateTimeToMS):
24 (KJS::msToGregorianDateTime):
26 2007-12-20 Rodney Dawes <dobey@wayofthemonkey.com>
28 Reviewed by Darin Adler.
30 Proxy includes of npruntime.h or npapi.h through npruntime_internal.h
31 Include stdio.h in npapi.h for the use of FILE with XP_UNIX defined
32 This is for building with X11, as some type and enum names conflict
33 with #define names in X11 headers.
34 http://bugs.webkit.org/show_bug.cgi?id=15669
36 * JavaScriptCore.xcodeproj/project.pbxproj:
37 * bindings/NP_jsobject.h:
39 * bindings/npruntime.cpp:
40 * bindings/npruntime_impl.h:
41 * bindings/npruntime_priv.h:
42 * bindings/npruntime_internal.h:
43 * bindings/testbindings.cpp:
44 * bindings/c/c_class.h:
45 * bindings/c/c_runtime.h:
46 * bindings/c/c_utility.h:
48 2007-12-20 Darin Adler <darin@apple.com>
50 - re-fix http://bugs.webkit.org/show_bug.cgi?id=16471
51 Completions need to be smaller (or not exist at all)
53 Same patch as last time with the test failures problem fixed.
56 (KJS::GlobalFuncImp::callAsFunction): Make sure to check the completion
57 type from newExec to see if the execute raised an exception.
59 2007-12-20 Darin Adler <darin@apple.com>
61 - roll out that last change -- it was causing test failures;
62 I'll check it back in after fixing them
64 2007-12-20 Darin Adler <darin@apple.com>
68 - http://bugs.webkit.org/show_bug.cgi?id=16471
69 Completions need to be smaller (or not exist at all)
71 SuSpider shows 2.4% speedup.
73 Stop using completions in the execution engine.
74 Instead, the completion type and label target are both
75 stored in the ExecState.
77 * API/JSContextRef.cpp: Removed unneeded include of "completion.h".
78 * bindings/runtime_method.cpp: Removed unused execute function.
79 * bindings/runtime_method.h: Ditto.
81 * kjs/ExecState.h: Added completionType, breakOrContinueTarget,
82 setCompletionType, setNormalCompletion, setBreakCompletion,
83 setContinueCompletion, setReturnValueCompletion, setThrowCompletion,
84 setInterruptedCompletion, m_completionType, and m_breakOrContinueTarget.
86 * kjs/completion.h: Removed constructor and getter for target
87 for break and continue from Completion. This class is now only
88 used for the public API to Interpreter and such.
90 * kjs/date_object.h: Removed unused execute function.
93 (KJS::FunctionImp::callAsFunction): Removed some unneeded
94 exception processing. Updated to call the new execute function
95 and to get the completion type from the ExecState. Merged in
96 the execute function, which repeated some of the same logic and
97 was called only from here.
98 (KJS::GlobalFuncImp::callAsFunction): More of the same for eval.
99 * kjs/function.h: Removed execute.
101 * kjs/interpreter.cpp:
102 (KJS::Interpreter::evaluate): Added code to convert the result of
103 execut into a Completion.
106 (KJS::Node::setErrorCompletion): Renamed from createErrorCompletion.
107 Now sets the completion type in the ExecState.
108 (KJS::Node::rethrowException): Now sets the completion type in the
110 (KJS::StatementNode::hitStatement): Now sets the completion type in
112 (KJS::VarStatementNode::execute): Updated to put completion type in
113 the ExecState instead of a Completion object.
114 (KJS::statementListExecute): Ditto. Also changed the for loop to use
115 indices instead of iterators.
116 (KJS::BlockNode::execute): Updated return type.
117 (KJS::EmptyStatementNode::execute): Updated to put completion type in
118 the ExecState instead of a Completion object.
119 (KJS::ExprStatementNode::execute): Ditto.
120 (KJS::IfNode::execute): Ditto.
121 (KJS::DoWhileNode::execute): Ditto. Also streamlined the logic a little
122 to make the normal case a little faster and moved the end outside the
123 loop so that "break" can do a break.
124 (KJS::WhileNode::execute): Ditto.
125 (KJS::ForNode::execute): Ditto.
126 (KJS::ForInNode::execute): Ditto.
127 (KJS::ContinueNode::execute): Updated to put completion type in
128 the ExecState instead of a Completion object.
129 (KJS::BreakNode::execute): Ditto.
130 (KJS::ReturnNode::execute): Ditto.
131 (KJS::WithNode::execute): Ditto.
132 (KJS::CaseClauseNode::executeStatements): Ditto. Also renamed to have
133 execute in its name to reflect the fact that it's a member of the same
135 (KJS::CaseBlockNode::executeBlock): Ditto.
136 (KJS::SwitchNode::execute): Ditto.
137 (KJS::LabelNode::execute): Ditto.
138 (KJS::ThrowNode::execute): Ditto.
139 (KJS::TryNode::execute): Ditto.
140 (KJS::ProgramNode::execute): Ditto.
141 (KJS::EvalNode::execute): Ditto.
142 (KJS::FunctionBodyNode::execute): Ditto.
143 (KJS::FuncDeclNode::execute): Ditto.
145 * kjs/nodes.h: Renamed setErrorCompletion to createErrorCompletion, made
146 hitStatement protected, changed return value of execute to a JSValue,
147 renamed evalStatements to executeStatements, and evalBlock to executeBlock.
149 * kjs/number_object.h: Removed unused execute function.
151 2007-12-20 Geoffrey Garen <ggaren@apple.com>
156 (KJS::ProgramNode::processDeclarations):
158 2007-12-20 Geoffrey Garen <ggaren@apple.com>
160 Linux build fix: config.h has to come first.
162 * kjs/error_object.cpp:
164 2007-12-19 Geoffrey Garen <ggaren@apple.com>
166 Reviewed by Oliver Hunt.
168 Optimized global access to global variables, using a symbol table.
170 SunSpider reports a 1.5% overall speedup, a 6.2% speedup on 3d-morph,
171 and a whopping 33.1% speedup on bitops-bitwise-and.
173 * API/JSCallbackObjectFunctions.h: Replaced calls to JSObject:: with
174 calls to Base::, since JSObject is not always our base class. This
175 was always a bug, but the bug is even more apparent after some of my
178 (KJS::::staticFunctionGetter): Replaced use of getDirect with call to
179 getOwnPropertySlot. Global declarations are no longer stored in the
180 property map, so a call to getDirect is insufficient for finding
184 * API/testapi.js: Added test for the getDirect change mentioned above.
187 * kjs/ExecState.h: Dialed back the optimization to store a direct
188 pointer to the localStorage buffer. One ExecState can grow the global
189 object's localStorage without another ExecState's knowledge, so
190 ExecState can't store a direct pointer to the localStorage buffer
191 unless/until we invent a way to update all the relevant ExecStates.
193 * kjs/JSGlobalObject.cpp: Inserted the symbol table into get and put
195 (KJS::JSGlobalObject::reset): Reset the symbol table and local storage,
196 too. Also, clear the property map here, removing the need for a
199 * kjs/JSVariableObject.cpp:
200 * kjs/JSVariableObject.h: Added support for saving localStorage and the
201 symbol table to the back/forward cache, and restoring them.
204 (KJS::GlobalFuncImp::callAsFunction): Renamed progNode to evalNode
205 because it's an EvalNode, not a ProgramNode.
208 (KJS::cacheGlobalObject): Replaced put with faster putDirect, since
209 that's how the rest of lookup.h works. putDirect is safe here because
210 cacheGlobalObject is only used for objects whose names are not valid
213 * kjs/nodes.cpp: The good stuff!
215 (KJS::EvalNode::processDeclarations): Replaced hasProperty with
216 the new hasOwnProperty, which is slightly faster.
218 * kjs/object.h: Nixed clearProperties because clear() does this job now.
220 * kjs/property_map.cpp:
221 * kjs/property_map.h: More back/forward cache support.
224 (WTF::::grow): Added fast non-branching grow function. I used it in
225 an earlier version of this patch, even though it's not used anymore.
227 2007-12-09 Mark Rowe <mrowe@apple.com>
229 Reviewed by Oliver Hunt.
231 Build fix for non-Mac platforms. Move NodeInfo into its own header so that the YYTYPE
232 declaration in grammar.h is able to declare members of that type.
234 * kjs/NodeInfo.h: Added.
235 (KJS::createNodeInfo):
236 (KJS::mergeDeclarationLists):
237 (KJS::appendToVarDeclarationList):
241 2007-12-19 Oliver Hunt <oliver@apple.com>
243 Make appendToVarDeclarationList static
249 2007-12-18 Oliver Hunt <oliver@apple.com>
251 Remove dead code due to removal of post-parse declaration discovery.
255 Due to the removal of the declaration discovery pass after parsing we
256 no longer need any of the logic used for that discovery.
260 (KJS::VarDeclNode::VarDeclNode):
261 (KJS::BlockNode::BlockNode):
262 (KJS::ForInNode::ForInNode):
263 (KJS::CaseBlockNode::CaseBlockNode):
265 (KJS::VarStatementNode::):
267 (KJS::DoWhileNode::):
272 (KJS::FuncDeclNode::):
273 (KJS::CaseClauseNode::):
274 (KJS::ClauseListNode::):
277 2007-12-18 Oliver Hunt <oliver@apple.com>
279 Replace post-parse pass to find declarations with logic in the parser itself
283 Instead of finding declarations in a pass following the initial parsing of
284 a program, we incorporate the logic directly into the parser. This lays
285 the groundwork for further optimisations (such as improving performance in
286 declaration expressions -- var x = y; -- to match that of standard assignment)
287 in addition to providing a 0.4% performance improvement in SunSpider.
289 * JavaScriptCore.exp:
291 (KJS::Parser::parse):
293 (KJS::Parser::didFinishParsing):
294 (KJS::Parser::parse):
297 (KJS::ParserTracked::ParserTracked):
298 (KJS::ParserTracked::~ParserTracked):
299 (KJS::ParserTracked::ref):
300 (KJS::ParserTracked::deref):
301 (KJS::ParserTracked::refcount):
302 (KJS::ParserTracked::clearNewTrackedObjects):
304 (KJS::ScopeNode::ScopeNode):
305 (KJS::ProgramNode::ProgramNode):
306 (KJS::EvalNode::EvalNode):
307 (KJS::FunctionBodyNode::FunctionBodyNode):
308 (KJS::FunctionBodyNode::initializeSymbolTable):
309 (KJS::FunctionBodyNode::processDeclarations):
311 (KJS::ParserTracked::):
315 2007-12-18 Xan Lopez <xan@gnome.org>
319 Fix http://bugs.webkit.org/show_bug.cgi?id=14521
320 Bug 14521: JavaScriptCore fails to build on Linux/PPC gcc 4.1.2
323 (TCMalloc_SpinLock::Unlock):
325 Use less strict memory operand constraint on inline asm generation.
326 PLATFORM(DARWIN) left unpatched due to Apple's GCC bug.
328 Patch by David Kilzer <ddkilzer@webkit.org>
330 2007-12-18 Mark Rowe <mrowe@apple.com>
332 Rubber-stamped by Maciej Stachowiak.
334 Remove outdated and non-functioning project files for the Apollo port.
336 * JavaScriptCore.apolloproj: Removed.
338 2007-12-18 Darin Adler <darin@apple.com>
342 * pcre/pcre_exec.cpp:
343 (jsRegExpExecute): Change back from false/true to 0/1 -- I probably should not have
344 deleted MATCH_MATCH and MATCH_NOMATCH, but I'm going to leave them out.
346 2007-12-18 Darin Adler <darin@apple.com>
350 - fix http://bugs.webkit.org/show_bug.cgi?id=16458
351 REGRESSION (r28164): regular expressions can now hang due to lack of a match limit
352 <rdar://problem/5636067>
354 Test: fast/regex/slow.html
356 Slows down SunSpider a bit (about 1.01x); filed a bug to follow up on that:
357 http://bugs.webkit.org/show_bug.cgi?id=16503
359 * pcre/pcre.h: Changed name of error code to not specifically mention "recursion".
360 * pcre/pcre_exec.cpp:
361 (match): Replaced the depth limit, MATCH_RECURSION_LIMIT, with a total match looping
362 limit, matchLimit. Also eliminated the constants for MATCH_MATCH and MATCH_NOMATCH,
363 since they are just true and false (1 and 0).
364 (jsRegExpExecute): More of the MATCH_MATCH change.
366 2007-12-17 Darin Adler <darin@apple.com>
368 - speculative build fix for non-gcc platforms
370 * pcre/pcre_exec.cpp: (match): Remove unused cases from return switch.
372 2007-12-16 Mark Rowe <mrowe@apple.com>
374 Speculative build fix for non-Mac platforms.
376 * pcre/pcre_compile.cpp: Include string.h for memset, memmove, etc.
378 2007-12-16 Darin Adler <darin@apple.com>
382 - http://bugs.webkit.org/show_bug.cgi?id=16438
383 - removed some more unused code
384 - changed quite a few more names to WebKit-style
385 - moved more things out of pcre_internal.h
386 - changed some indentation to WebKit-style
387 - improved design of the functions for reading and writing
388 2-byte values from the opcode stream (in pcre_internal.h)
391 (main): Added the kjs prefix a normal way in lieu of using macros.
393 * pcre/pcre_compile.cpp: Moved some definitions here from pcre_internal.h.
394 (errorText): Name changes, fewer typedefs.
395 (checkEscape): Ditto. Changed uppercase conversion to use toASCIIUpper.
396 (isCountedRepeat): Name change.
397 (readRepeatCounts): Name change.
398 (firstSignificantOpcode): Got rid of the use of OP_lengths, which is
399 very lightly used here. Hard-coded the length of OP_BRANUMBER.
400 (firstSignificantOpcodeSkippingAssertions): Ditto. Also changed to
401 use the advanceToEndOfBracket function.
402 (getOthercaseRange): Name changes.
404 (compileBranch): Name changes. Removed unused after_manual_callout and
405 the code to handle it. Removed code to handle OP_ONCE since we never
406 emit this opcode. Changed to use advanceToEndOfBracket in more places.
407 (compileBracket): Name changes.
408 (branchIsAnchored): Removed code to handle OP_ONCE since we never emit
410 (bracketIsAnchored): Name changes.
411 (branchNeedsLineStart): More fo the same.
412 (bracketNeedsLineStart): Ditto.
413 (branchFindFirstAssertedCharacter): Removed OP_ONCE code.
414 (bracketFindFirstAssertedCharacter): More of the same.
415 (calculateCompiledPatternLengthAndFlags): Ditto.
416 (returnError): Name changes.
417 (jsRegExpCompile): Ditto.
419 * pcre/pcre_exec.cpp: Moved some definitions here from pcre_internal.h.
420 (matchRef): Updated names.
421 Improved macros to use the do { } while(0) idiom so they expand to single
422 statements rather than to blocks or multiple statements. And refeactored
423 the recursive match macros.
424 (MatchStack::pushNewFrame): Name changes.
425 (getUTF8CharAndIncrementLength): Name changes.
426 (match): Name changes. Removed the ONCE opcode.
427 (jsRegExpExecute): Name changes.
429 * pcre/pcre_internal.h: Removed quite a few unneeded includes. Rewrote
430 quite a few comments. Removed the macros that add kjs prefixes to the
431 functions with external linkage; instead renamed the functions. Removed
432 the unneeded typedefs pcre_uint16, pcre_uint32, and uschar. Removed the
433 dead and not-all-working code for LINK_SIZE values other than 2, although
434 we aim to keep the abstraction working. Removed the OP_LENGTHS macro.
435 (put2ByteValue): Replaces put2ByteOpcodeValueAtOffset.
436 (get2ByteValue): Replaces get2ByteOpcodeValueAtOffset.
437 (put2ByteValueAndAdvance): Replaces put2ByteOpcodeValueAtOffsetAndAdvance.
438 (putLinkValueAllowZero): Replaces putOpcodeValueAtOffset; doesn't do the
439 addition, since a comma is really no better than a plus sign. Added an
440 assertion to catch out of range values and changed the parameter type to
441 int rather than unsigned.
442 (getLinkValueAllowZero): Replaces getOpcodeValueAtOffset.
443 (putLinkValue): New function that most former callers of the
444 putOpcodeValueAtOffset function can use; asserts the value that is
445 being stored is non-zero and then calls putLinkValueAllowZero.
446 (getLinkValue): Ditto.
447 (putLinkValueAndAdvance): Replaces putOpcodeValueAtOffsetAndAdvance. No
448 caller was using an offset, which makes sense given the advancing behavior.
449 (putLinkValueAllowZeroAndAdvance): Ditto.
450 (isBracketOpcode): Added. For use in an assertion.
451 (advanceToEndOfBracket): Renamed from moveOpcodePtrPastAnyAlternateBranches,
452 and removed comments about how it's not well designed. This function takes
453 a pointer to the beginning of a bracket and advances to the end of the
456 * pcre/pcre_tables.cpp: Updated names.
457 * pcre/pcre_ucp_searchfuncs.cpp:
458 (kjs_pcre_ucp_othercase): Ditto.
459 * pcre/pcre_xclass.cpp:
460 (getUTF8CharAndAdvancePointer): Ditto.
461 (kjs_pcre_xclass): Ditto.
462 * pcre/ucpinternal.h: Ditto.
465 (WTF::isASCIIAlpha): Added an int overload, like the one we already have for
467 (WTF::isASCIIAlphanumeric): Ditto.
468 (WTF::isASCIIHexDigit): Ditto.
469 (WTF::isASCIILower): Ditto.
470 (WTF::isASCIISpace): Ditto.
471 (WTF::toASCIILower): Ditto.
472 (WTF::toASCIIUpper): Ditto.
474 2007-12-16 Darin Adler <darin@apple.com>
478 - fix http://bugs.webkit.org/show_bug.cgi?id=16459
479 REGRESSION: assertion failure with regexp with \B in a case-ignoring character range
480 <rdar://problem/5646361>
482 The problem was that \B was not handled properly in character classes.
484 Test: fast/js/regexp-overflow.html
486 * pcre/pcre_compile.cpp:
487 (check_escape): Added handling of ESC_b and ESC_B in character classes here.
488 Allows us to get rid of the handling of \b in character classes from all the
489 call sites that handle it separately and to handle \B properly as well.
490 (compileBranch): Remove the ESC_b handling, since it's not needed any more.
491 (calculateCompiledPatternLengthAndFlags): Ditto.
493 2007-12-16 Mark Rowe <mrowe@apple.com>
495 Reviewed by Maciej Stachowiak.
497 Fix http://bugs.webkit.org/show_bug.cgi?id=16448
498 Bug 16448: [GTK] Celtic Kane JavaScript performance on Array test is slow relative to Mac
500 * kjs/array_instance.cpp:
501 (KJS::compareByStringPairForQSort):
502 (KJS::ArrayInstance::sort): Convert JSValue's to strings once up front and then sort the
503 results. This avoids calling toString twice per comparison, but requires a temporary buffer
504 so we only use this approach in cases where the array being sorted is not too large.
506 2007-12-16 Geoffrey Garen <ggaren@apple.com>
508 Reviewed by Darin Adler and Maciej Stachowiak.
510 More refactoring to support global variable optimization.
512 Changed SymbolTable to use RefPtr<UString::Rep> as its key instead of
513 UString::Rep*. With globals, the symbol table can outlast the
514 declaration node for any given symbol, so the symbol table needs to ref
517 In support, specialized HashMaps with RefPtr keys to allow lookup
518 via raw pointer, avoiding refcount churn.
520 SunSpider reports a .6% speedup (prolly just noise).
522 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added new file: wtf/RefPtrHashMap.h
523 * JavaScriptCore.xcodeproj/project.pbxproj: ditto
525 * kjs/JSVariableObject.cpp:
526 (KJS::JSVariableObject::getPropertyNames): Symbol table keys are RefPtrs now.
528 * kjs/SymbolTable.h: Modified key traits to match RefPtr. Added a
529 static Rep* for null, which helps compute the deletedValue() trait.
531 * wtf/HashMap.h: #include the RefPtr specialization so everyone can use it.
533 * wtf/RefPtrHashMap.h: Copied from wtf/HashMap.h. Added overloaded versions
534 of find(), contains(), get(), set(), add(), remove(), and take() that take
535 raw pointers as keys.
537 2007-12-16 Alexey Proskuryakov <ap@webkit.org>
541 http://bugs.webkit.org/show_bug.cgi?id=16162
542 Problems with float parsing on Linux (locale-dependent parsing was used).
544 * kjs/dtoa.cpp: Removed USE_LOCALE to reduce future confusion.
545 * kjs/lexer.cpp: (KJS::Lexer::lex): Parse with kjs_strtod, not the system one.
547 2007-12-14 Alp Toker <alp@atoker.com>
549 Reviewed by Mark Rowe.
551 Enable the AllInOneFile.cpp optimization for the GTK+ port.
553 * JavaScriptCore.pri:
555 2007-12-14 Mark Rowe <mrowe@apple.com>
557 Unreviewed. Remove commented out fprintf's that were for debugging purposes only.
559 * wtf/FastMalloc.cpp:
560 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
562 2007-12-14 Mark Rowe <mrowe@apple.com>
564 Reviewed by Maciej Stachowiak.
566 Don't use the MADV_DONTNEED code path for now as it has no effect on Mac OS X and is
567 currently untested on other platforms.
569 * wtf/TCSystemAlloc.cpp:
570 (TCMalloc_SystemRelease): Return after releasing memory rather than potentially falling
571 through into another mechanism if multiple are supported.
573 2007-12-14 Alp Toker <alp@atoker.com>
575 Build fix for GTK+/Qt and ports that don't use AllInOneFile.cpp.
577 Include UnusedParam.h.
579 * wtf/TCSystemAlloc.cpp:
581 2007-12-14 Oliver Hunt <oliver@apple.com>
583 Reviewed by Stephanie.
587 * wtf/FastMalloc.cpp:
588 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
590 2007-12-14 Dan Bernstein <mitz@apple.com>
592 - try again to fix the Windows build
594 * wtf/TCSystemAlloc.cpp:
595 (TCMalloc_SystemRelease):
597 2007-12-14 Dan Bernstein <mitz@apple.com>
599 - try to fix the Windows build
601 * wtf/TCSystemAlloc.cpp:
602 (TCMalloc_SystemRelease):
604 2007-12-14 Mark Rowe <mrowe@apple.com>
606 Reviewed by Maciej and Oliver.
608 Add final changes to make TCMalloc release memory to the system.
609 This results in a 0.4% regression against ToT, but this is offset
610 against the gains made by the original TCMalloc r38 merge - in fact
611 we retain around 0.3-0.4% progression overall.
613 * wtf/FastMalloc.cpp:
614 (WTF::InitSizeClasses):
615 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
616 * wtf/TCSystemAlloc.cpp:
617 (TCMalloc_SystemRelease):
619 2007-12-14 Darin Adler <darin@apple.com>
623 - removed unnecessary includes of "Vector.h"
626 (WTF::copyKeysToVector): Make the type of the vector be a template parameter.
627 This allows copying keys into a vector of a base class or one with an inline capacity.
628 (WTF::copyValuesToVector): Ditto.
630 (WTF::copyToVector): Ditto.
632 2007-12-14 Anders Carlsson <andersca@apple.com>
634 Reviewed by Darin and Geoff.
636 <rdar://problem/5619295>
637 REGRESSION: 303-304: Embedded YouTube video fails to render- JS errors (16150) (Flash 9)
639 Get rid of unnecessary and incorrect security checks for plug-ins accessing JavaScript objects.
641 The way this used to work was that each NPObject that wrapped a JSObject would have a root object
642 corresponding to the frame object (used for managing the lifecycle) and an origin root object (used for
643 doing security checks).
645 This would prevent a plug-in from accessing a frame's window object if it's security origin was different
646 (some parts of the window, such as the location object, can be accessed from frames with different security
647 origins, and those checks are being done in WebCore).
649 Also, if a plug-in were to access a window object of a frame that later went away, it could lead to that
650 Window JSObject being garbage collected and the NPObject pointing to freed memory.
652 How this works now is that there is no origin root object anymore, and all NPObject wrappers that are created
653 for a plug-in will have the root object of the containing frame of that plug-in.
655 * bindings/NP_jsobject.cpp:
657 Don't free the origin root object.
659 (_NPN_CreateScriptObject):
660 Remove the origin root object parameter.
662 (_NPN_InvokeDefault):
667 (_NPN_RemoveProperty):
671 Get rid of all security checks.
673 * bindings/NP_jsobject.h:
674 Remove originRootObject from the JavaScriptObject struct.
676 * bindings/c/c_utility.cpp:
677 (KJS::Bindings::convertValueToNPVariant):
678 Always use the root object from the ExecState.
680 2007-12-13 Steve Falkenburg <sfalken@apple.com>
682 Move source file generation into its own vcproj to fix build dependencies.
686 * JavaScriptCore.vcproj/JavaScriptCore.sln:
687 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
688 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Added.
689 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Added.
690 * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
692 2007-12-13 Alp Toker <alp@atoker.com>
694 http://bugs.webkit.org/show_bug.cgi?id=16406
695 [Gtk] JavaScriptCore needs -lpthread
697 Build fix for Debian and any other platforms that don't implicitly
700 Link to pthread on non-Windows platforms until this dependency is
703 2007-12-11 Geoffrey Garen <ggaren@apple.com>
705 Reviewed by Sam Weinig.
707 Build fix: Note some variables that are used only for ASSERTs.
711 (globalObject_initialize):
712 (testInitializeFinalize):
714 2007-12-11 Geoffrey Garen <ggaren@apple.com>
716 Reviewed by Darin Adler.
718 Fixed: All JS tests crash on Windows.
720 NDEBUG wasn't defined when compiling testkjs in release builds, so the
721 HashTable definition in HashTable.h included an extra data member.
723 The solution was to add NDEBUG to the release testkjs configuration on
726 For giggles, I also added other missing #defines to testkjs on Windows.
728 * Configurations/Base.xcconfig:
729 * Configurations/JavaScriptCore.xcconfig:
730 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
731 * JavaScriptCore.xcodeproj/project.pbxproj:
735 2007-12-11 Geoffrey Garen <ggaren@apple.com>
737 Reviewed by Darin Adler.
739 Removed bogus ASSERT.
741 ASSERT should only be used when we know that a code path will not be
742 taken. This code path is taken often during the jsFunFuzz test.
744 * pcre/pcre_exec.cpp:
747 2007-12-11 Darin Adler <darin@apple.com>
749 * wtf/unicode/qt4/UnicodeQt4.h: Try to fix Qt build by adding U16_IS_SINGLE.
751 2007-12-10 Darin Adler <darin@apple.com>
753 Reviewed by Sam Weinig.
755 - fix http://bugs.webkit.org/show_bug.cgi?id=16379
756 REGRESSION(r28525): Failures in http/tests/xmlhttprequest/response-encoding.html and
757 fast/dom/xmlhttprequest-html-response-encoding.html
758 and <rdar://problem/5640230> REGRESSION (306A4-ToT): Access violation in PCRE function
759 find_firstassertedchar
761 Test: fast/js/regexp-find-first-asserted.html
763 * pcre/pcre_compile.cpp:
764 (compileBracket): Take out unnecessary initialization of out parameters.
765 (branchFindFirstAssertedCharacter): Added. Broke out the half of the function that handles
767 (bracketFindFirstAssertedCharacter): Renamed from find_firstassertedchar. Also removed the
768 options parameter -- the caller can handle the options.
769 (jsRegExpCompile): Changed call site to call the appropriate bracket or branch version of
770 the find_firstassertedchar function. Also put the REQ_IGNORE_CASE code here instead of
771 passing in the options.
773 2007-12-10 Geoffrey Garen <ggaren@apple.com>
775 Reviewed by Sam Weinig.
789 FunctionBodyNode ProgramNode EvalNode
791 in preparation for specializing each class more while optimizing global
794 Also removed some cruft from the FunctionBodyNode interface to simplify
797 SunSpider says this patch is a .8% speedup, which seems reasonable,
798 since it eliminates a few branches and adds KJS_FAST_CALL in a few
801 Layout tests and JS tests pass. Also, this baby builds on Windows! (Qt
804 2007-12-10 Geoffrey Garen <ggaren@apple.com>
808 Mac build fix: added some exported symbols, now that Parser::parse is
809 defined in the header.
811 * JavaScriptCore.exp:
813 2007-12-10 Sam Weinig <sam@webkit.org>
817 Template methods need to be in the header.
819 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
822 (KJS::Parser::parse):
824 2007-12-10 Geoffrey Garen <ggaren@apple.com>
826 Reviewed by Sam Weinig.
828 Merged different implementations of Parser::parse into a single,
829 templatized implementation, in preparation for adding yet another
830 implementation for "eval" code.
832 JS and layout tests pass.
834 2007-12-10 Timothy Hatcher <timothy@apple.com>
836 Reviewed by Mark Rowe
838 <rdar://problem/5639463> Bundle versions on Tiger should be 4523.x not 523.x
840 * Configurations/Version.xcconfig: Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR,
841 so assume Tiger and use a 4 for the SYSTEM_VERSION_PREFIX.
843 2007-12-10 Mark Rowe <mrowe@apple.com>
847 * kjs/grammar.y: Use @1 and @0 in place of @$ where Tiger's bison chokes.
849 2007-12-10 Darin Adler <darin@apple.com>
851 Reviewed by Mark Rowe.
853 - fix http://bugs.webkit.org/show_bug.cgi?id=16375
854 REGRESSION: Safari crashes on quit
856 Probably a debug-only issue.
859 (KJS::parser): Create the parser and never destroy it by using a pointer instead
862 2007-12-09 Darin Adler <darin@apple.com>
864 Reviewed by Sam Weinig.
866 - fix http://bugs.webkit.org/show_bug.cgi?id=16369
867 REGRESSION (r28525): regular expression tests failing due to bad firstByte optimization
869 * pcre/pcre_compile.cpp: Changed some names to use interCaps intead of under_scores.
870 (branchIsAnchored): Broke is_anchored into two separate functions; this one works on a
871 branch and the other on an anchor. The old function would only work on a bracket.
872 Also removed unneeded parameters; the anchored check does not require the bracket
873 map or the options any more because we have a reduced set of features.
874 (bracketIsAnchored): Ditto.
875 (branchNeedsLineStart): Broke canApplyFirstCharOptimization into two functions and gave
876 both a better name. This is the function that was returning the wrong value. The failure
877 was beacuse the old function would only work on a bracket.
878 (bracketNeedsLineStart): Ditto.
879 (jsRegExpCompile): Changed to call the appropriate branch or bracket flavor of the
880 functions based on whether we compiled an outer bracket. Also removed inaccurate comments
881 and unneeded parameters.
883 - other small changes
885 * pcre/pcre.h: Renumbered error codes, in a logical order. First, normal failure, then
886 the recursion limit, then running out of memory, and finally an unexpected internal error.
888 * pcre/pcre_exec.cpp: Fixed indentation.
889 (jsRegExpExecute): Corrected an inaccurate comment.
891 2007-12-09 Darin Adler <darin@apple.com>
895 - fix http://bugs.webkit.org/show_bug.cgi?id=16370
896 REGRESSION (r28540): source URL and line number no longer set for outer function/programs
898 Test: fast/js/exception-linenums-in-html-1.html
899 Test: fast/js/exception-linenums-in-html-2.html
900 Test: fast/js/exception-linenums.html
902 By the time the ProgramNode was constructed, the source URL was empty.
905 (KJS::Parser::parseProgram): Added code to set and clear m_sourceURL, which is now
906 handled here instead of in the lexer; it needs to still be set when we create the
907 program node. Call setLoc to set the first and last line number.
908 (KJS::Parser::parseFunctionBody): Ditto, but for the body.
909 (KJS::Parser::parse): Removed the sourceURL argument.
911 * kjs/Parser.h: Added sourceURL(), m_sourceURL, and m_lastLine. Added a lastLine
912 parameter to didFinishParsing, since the bison grammar knows the last line number
913 and we otherwise do not know it. Removed the sourceURL parameter from parse, since
914 that's now handled at a higher level.
916 * kjs/grammar.y: Pass the last line number to didFinishParsing.
919 (KJS::Lexer::setCode): Removed the sourceURL argument and the code to set m_sourceURL.
920 (KJS::Lexer::clear): Ditto.
921 * kjs/lexer.h: More of the same.
924 (KJS::FunctionBodyNode::FunctionBodyNode): Get the source URL from the parser rather
925 than from the lexer. Removed unneeded call to setLoc, since the line numbers already
928 2007-12-08 Oliver Hunt <oliver@apple.com>
932 Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags.
934 Fixes <rdar://problem/5620249> Must disable SVG animation
935 <rdar://problem/5612772> Disable SVG filters on Mac to match Windows behavior
937 Minor config changes.
939 * Configurations/JavaScriptCore.xcconfig:
940 * JavaScriptCore.xcodeproj/project.pbxproj:
942 2007-12-07 Sam Weinig <sam@webkit.org>
946 - Rename isSafeScript to allowsAccessFrom.
948 * bindings/NP_jsobject.cpp:
950 * kjs/JSGlobalObject.h:
951 (KJS::JSGlobalObject::allowsAccessFrom): Reverse caller/argument of allowsAccessFrom to match
954 2007-12-07 Geoffrey Garen <ggaren@apple.com>
956 Reviewed by Sam Weinig.
958 Refactored variable access optimization: Removed the assumption that
959 the FunctionBodyNode holds the symbol table.
961 2007-12-07 Geoffrey Garen <ggaren@apple.com>
963 Build fix: added #include.
967 2007-12-07 Geoffrey Garen <ggaren@apple.com>
969 Build fix: added #include.
971 * kjs/interpreter.cpp:
973 2007-12-07 Geoffrey Garen <ggaren@apple.com>
975 Build fix: added #include.
979 2007-12-07 Geoffrey Garen <ggaren@apple.com>
981 Build fix: added #include.
983 * kjs/function_object.cpp:
985 2007-12-07 Geoffrey Garen <ggaren@apple.com>
987 Reviewed by Sam Weinig.
989 Fixed crash seen running layout tests.
991 Reverted a change I made earlier today. Added a comment to try to
992 discourage myself from making this mistake a third time.
995 (KJS::ActivationImp::mark):
997 (KJS::ActivationImp::ActivationImpData::ActivationImpData):
999 2007-12-07 Geoffrey Garen <ggaren@apple.com>
1001 Reviewed by Sam Weinig.
1003 Refactored parsing of global code: Removed the assumption that
1004 ProgramNode inherits from FunctionBodyNode from the parser.
1007 (KJS::Parser::parseProgram):
1008 (KJS::Parser::parseFunctionBody):
1009 (KJS::Parser::parse):
1011 (KJS::Parser::didFinishParsing):
1016 2007-12-07 Geoffrey Garen <ggaren@apple.com>
1018 Build fix: added JSVariableObject.cpp to the .pri file.
1020 * JavaScriptCore.pri:
1022 2007-12-07 Geoffrey Garen <ggaren@apple.com>
1024 Build fix: added #include.
1028 2007-12-07 Steve Falkenburg <sfalken@apple.com>
1030 Re-named our B&I flag from BUILDBOT to PRODUCTION.
1032 Reviewed by Sam Weinig.
1034 * JavaScriptCore.vcproj/JavaScriptCore.make:
1035 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
1037 2007-12-07 Geoffrey Garen <ggaren@apple.com>
1039 Build fix: removed stray name qualification.
1042 (KJS::ActivationImp::ActivationImp):
1044 2007-12-07 Geoffrey Garen <ggaren@apple.com>
1046 Build fix: moved functions with qualified names outside of class
1049 * kjs/JSVariableObject.h:
1050 (KJS::JSVariableObject::symbolTableGet):
1051 (KJS::JSVariableObject::symbolTablePut):
1053 2007-12-07 Geoffrey Garen <ggaren@apple.com>
1055 Reviewed by Sam Weinig.
1057 Next step in refactoring JSGlobalObject: Added JSVariableObject class,
1058 and factored symbol-table-related code into it. (JSGlobalObject doesn't
1059 use the symbol table code yet, though.)
1061 Layout and JS tests, and testapi, pass. SunSpider reports no regression.
1063 2007-12-07 Darin Adler <darin@apple.com>
1067 - fix http://bugs.webkit.org/show_bug.cgi?id=16185
1068 jsRegExpCompile should not add implicit non-capturing bracket
1070 While this does not make SunSpider faster, it will make many regular
1071 expressions a bit faster.
1073 * pcre/pcre_compile.cpp: Moved CompileData struct in here from the
1074 header since it's private to this file.
1075 (compile_branch): Updated for function name change.
1076 (compile_bracket): Renamed from compile_regex, since, for one thing,
1077 this does not compile an entire regular expression.
1078 (calculateCompiledPatternLengthAndFlags): Removed unused item_count
1079 local variable. Renamed CompileData to cd instead of compile_block
1080 to be consistent with other functions. Added code to set the
1081 needOuterBracket flag if there's at least one "|" at the outer level.
1082 (jsRegExpCompile): Renamed CompileData to cd instead of compile_block
1083 to be consistent with other functions. Removed unneeded "size" field
1084 from the compiled regular expression. If no outer bracket is needed,
1085 then use compile_branch to compile the regular expression.
1087 * pcre/pcre_internal.h: Removed the CompileData struct, which is now
1088 private to pcre_compile.cpp. Removed the size member from JSRegExp.
1090 2007-12-06 Kevin Ollivier <kevino@theolliviers.com>
1092 MSVC7 build fix due to a compiler bug with placement new and/or
1093 templates and casting.
1095 Reviewed by Darin Adler.
1100 2007-12-06 Darin Adler <darin@apple.com>
1102 Reviewed by Eric Seidel.
1104 - fix http://bugs.webkit.org/show_bug.cgi?id=16321
1105 new RegExp("[\u0097]{4,6}", "gmy") crashes in DEBUG builds
1106 <rdar://problem/5632992>
1108 Test: fast/js/regexp-oveflow.html
1110 * pcre/pcre_compile.cpp:
1111 (calculateCompiledPatternLengthAndFlags): In the case where a single character
1112 character class is optimized to not use a character class at all, the preflight
1113 code was not setting the lastitemlength variable.
1115 2007-12-05 Mark Rowe <mrowe@apple.com>
1117 Qt Windows build fix. Include the time-related headers in the correct place.
1119 * kjs/JSGlobalObject.cpp:
1120 * kjs/interpreter.cpp:
1122 2007-12-05 Darin Adler <darin@apple.com>
1124 Not reviewed; just undoing a previous commit.
1126 - remove earlier incorrect fix for http://bugs.webkit.org/show_bug.cgi?id=16220
1127 <rdar://problem/5625221> Crash opening www.news.com (CNet)
1129 The real bug was the backwards ?: in the compile function, which Geoff just
1130 fixed. Rolling out the incorrect earlier fix.
1132 * pcre/pcre_compile.cpp: (calculateCompiledPatternLengthAndFlags): Take out
1133 the unneeded preflight change. The regression test proves this is still working
1134 fine, so the bug remains fixed.
1136 2007-12-01 Mark Rowe <mrowe@apple.com>
1138 Build fix. Include headers before trying to use the things that they declare.
1140 * kjs/JSImmediate.cpp:
1143 * kjs/object_object.cpp:
1144 * kjs/regexp_object.cpp:
1145 * kjs/string_object.cpp:
1147 2007-12-05 Geoffrey Garen <ggaren@apple.com>
1149 Build fix: added some #includes.
1151 * kjs/JSImmediate.cpp:
1153 2007-12-05 Geoffrey Garen <ggaren@apple.com>
1155 Build fix: added some #includes.
1157 * kjs/JSGlobalObject.cpp:
1158 * kjs/JSImmediate.cpp:
1160 2007-12-05 Geoffrey Garen <ggaren@apple.com>
1162 Build fix: Fixed #include spelling.
1166 2007-12-05 Geoffrey Garen <ggaren@apple.com>
1168 Build fix: added #include.
1172 2007-12-05 Geoffrey Garen <ggaren@apple.com>
1174 Build fix: added a forward declaration.
1178 2007-12-05 Geoffrey Garen <ggaren@apple.com>
1180 Build fix: added an #include.
1182 * kjs/error_object.cpp:
1184 2007-12-05 Geoffrey Garen <ggaren@apple.com>
1186 Build fix: added an #include.
1188 * kjs/bool_object.cpp:
1190 2007-12-05 Geoffrey Garen <ggaren@apple.com>
1192 Reviewed by Darin Adler.
1194 Third step in refactoring JSGlobalObject: Moved data members and
1195 functions accessing data members from Interpreter to JSGlobalObject.
1196 Changed Interpreter member functions to static functions.
1198 This resolves a bug in global object bootstrapping, where the global
1199 ExecState could be used when uninitialized.
1201 This is a big change, but it's mostly code motion and renaming.
1203 Layout and JS tests, and testjsglue and testapi, pass. SunSpider reports
1204 a .7% regression, but Shark sees no difference related to this patch,
1205 and SunSpider reported a .7% speedup from an earlier step in this
1206 refactoring, so I think it's fair to call that a wash.
1208 2007-12-05 Geoffrey Garen <ggaren@apple.com>
1210 Reviewed by Darin Adler. (Or vice versa.)
1212 Fixed ASSERT during run-javascriptcore-tests. (Darin just added the
1213 ASSERT, but the bug wasn't new.)
1215 * pcre/pcre_compile.cpp:
1216 (compile_branch): The ?: operator here was backwards, causing us to
1217 execute the loop too many times, adding stray KET opcodes to the
1218 compiled regular expression.
1220 2007-12-05 Kevin McCullough <kmccullough@apple.com>
1224 - Wait until local variable data is fully constructed before notifying the debugger of entering
1225 or leaving a call frame.
1228 (KJS::FunctionImp::callAsFunction):
1230 (KJS::FunctionBodyNode::execute):
1232 2007-12-05 Mark Rowe <mrowe@apple.com>
1236 Build fix for GCC 4.2. Cast via a union to avoid strict-aliasing issues.
1238 * wtf/FastMalloc.cpp:
1242 2007-12-05 Mark Rowe <mrowe@apple.com>
1246 Fix testkjs in 64-bit.
1248 When built for 64-bit the TCMalloc spin lock uses pthread mutexes rather than a custom spin lock
1249 implemented in assembly. If we fail to initialize the pthread mutex, attempts to lock or unlock
1250 it will fail and trigger a call to abort.
1252 * wtf/FastMalloc.cpp: Initialize the spin lock so that we can later lock and unlock it.
1253 * wtf/TCSpinLock.h: Add an Init method to the optimised spin lock.
1255 2007-12-04 Oliver Hunt <oliver@apple.com>
1257 Reviewed by NOBODY (Build fix).
1261 * wtf/TCSystemAlloc.cpp:
1263 2007-12-03 Oliver Hunt <oliver@apple.com>
1265 Reviewed by Mark Rowe and Geoff Garen.
1269 It also result in a performance progression between 0.5% and
1270 0.9% depending on the test, however most if not all of this
1271 gain will be consumed by the overhead involved in the later
1272 change to release memory to the system.
1274 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1275 * JavaScriptCore.xcodeproj/project.pbxproj:
1276 * wtf/FastMalloc.cpp:
1277 (WTF::KernelSupportsTLS):
1278 (WTF::CheckIfKernelSupportsTLS):
1285 (WTF::SLL_PopRange):
1286 (WTF::SLL_PushRange):
1289 (WTF::ByteSizeForClass):
1291 (WTF::InitSizeClasses):
1292 (WTF::AllocationSize):
1293 (WTF::TCMalloc_PageHeap::GetSizeClassIfCached):
1294 (WTF::TCMalloc_PageHeap::CacheSizeClass):
1295 (WTF::TCMalloc_PageHeap::init):
1296 (WTF::TCMalloc_PageHeap::New):
1297 (WTF::TCMalloc_PageHeap::AllocLarge):
1298 (WTF::TCMalloc_PageHeap::Carve):
1299 (WTF::TCMalloc_PageHeap::Delete):
1300 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
1302 (WTF::TCMalloc_PageHeap::Dump):
1303 (WTF::TCMalloc_PageHeap::GrowHeap):
1304 (WTF::TCMalloc_PageHeap::Check):
1305 (WTF::ReleaseFreeList):
1306 (WTF::TCMalloc_PageHeap::ReleaseFreePages):
1307 (WTF::TCMalloc_ThreadCache_FreeList::Push):
1308 (WTF::TCMalloc_ThreadCache_FreeList::PushRange):
1309 (WTF::TCMalloc_ThreadCache_FreeList::PopRange):
1310 (WTF::TCMalloc_ThreadCache_FreeList::Pop):
1311 (WTF::TCMalloc_Central_FreeList::length):
1312 (WTF::TCMalloc_Central_FreeList::tc_length):
1313 (WTF::TCMalloc_Central_FreeList::Init):
1314 (WTF::TCMalloc_Central_FreeList::ReleaseListToSpans):
1315 (WTF::TCMalloc_Central_FreeList::EvictRandomSizeClass):
1316 (WTF::TCMalloc_Central_FreeList::MakeCacheSpace):
1317 (WTF::TCMalloc_Central_FreeList::ShrinkCache):
1318 (WTF::TCMalloc_Central_FreeList::InsertRange):
1319 (WTF::TCMalloc_Central_FreeList::RemoveRange):
1320 (WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe):
1321 (WTF::TCMalloc_Central_FreeList::Populate):
1322 (WTF::TCMalloc_ThreadCache::Init):
1323 (WTF::TCMalloc_ThreadCache::Cleanup):
1324 (WTF::TCMalloc_ThreadCache::Allocate):
1325 (WTF::TCMalloc_ThreadCache::Deallocate):
1326 (WTF::TCMalloc_ThreadCache::FetchFromCentralCache):
1327 (WTF::TCMalloc_ThreadCache::ReleaseToCentralCache):
1328 (WTF::TCMalloc_ThreadCache::Scavenge):
1329 (WTF::TCMalloc_ThreadCache::PickNextSample):
1330 (WTF::TCMalloc_ThreadCache::NewHeap):
1331 (WTF::TCMalloc_ThreadCache::GetThreadHeap):
1332 (WTF::TCMalloc_ThreadCache::GetCache):
1333 (WTF::TCMalloc_ThreadCache::GetCacheIfPresent):
1334 (WTF::TCMalloc_ThreadCache::InitTSD):
1335 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
1336 (WTF::TCMallocStats::ExtractStats):
1337 (WTF::TCMallocStats::DumpStats):
1338 (WTF::TCMallocStats::DumpStackTraces):
1339 (WTF::TCMallocStats::TCMallocImplementation::MarkThreadIdle):
1340 (WTF::TCMallocStats::TCMallocImplementation::ReleaseFreeMemory):
1341 (WTF::TCMallocStats::TCMallocGuard::TCMallocGuard):
1342 (WTF::TCMallocStats::TCMallocGuard::~TCMallocGuard):
1343 (WTF::TCMallocStats::DoSampledAllocation):
1344 (WTF::TCMallocStats::CheckCachedSizeClass):
1345 (WTF::TCMallocStats::CheckedMallocResult):
1346 (WTF::TCMallocStats::SpanToMallocResult):
1347 (WTF::TCMallocStats::do_malloc):
1348 (WTF::TCMallocStats::do_free):
1349 (WTF::TCMallocStats::do_memalign):
1350 (WTF::TCMallocStats::do_malloc_stats):
1351 (WTF::TCMallocStats::do_mallopt):
1352 (WTF::TCMallocStats::do_mallinfo):
1353 (WTF::TCMallocStats::realloc):
1354 (WTF::TCMallocStats::cpp_alloc):
1355 (WTF::TCMallocStats::operator new):
1356 (WTF::TCMallocStats::):
1357 (WTF::TCMallocStats::operator new[]):
1358 (WTF::TCMallocStats::malloc_stats):
1359 (WTF::TCMallocStats::mallopt):
1360 (WTF::TCMallocStats::mallinfo):
1361 * wtf/TCPackedCache.h: Added.
1362 (PackedCache::PackedCache):
1365 (PackedCache::GetOrDefault):
1366 (PackedCache::Clear):
1367 (PackedCache::EntryToValue):
1368 (PackedCache::EntryToUpper):
1369 (PackedCache::KeyToUpper):
1370 (PackedCache::UpperToPartialKey):
1371 (PackedCache::Hash):
1372 (PackedCache::KeyMatch):
1374 (TCMalloc_PageMap2::PreallocateMoreMemory):
1375 * wtf/TCSystemAlloc.cpp:
1376 (TCMalloc_SystemRelease):
1377 * wtf/TCSystemAlloc.h:
1379 2007-12-04 Anders Carlsson <andersca@apple.com>
1383 Make isSafeScript const.
1385 * kjs/JSGlobalObject.h:
1386 (KJS::JSGlobalObject::isSafeScript):
1388 2007-12-04 Darin Adler <darin@apple.com>
1392 - fix first part of http://bugs.webkit.org/show_bug.cgi?id=16220
1393 <rdar://problem/5625221> Crash opening www.news.com (CNet)
1395 Test: fast/js/regexp-overflow.html
1397 * pcre/pcre_compile.cpp:
1398 (calculateCompiledPatternLengthAndFlags): Add room for the additional BRA/KET that
1399 was generated in the compile code but not taken into account here.
1401 2007-12-03 Darin Adler <darin@apple.com>
1405 - fix http://bugs.webkit.org/show_bug.cgi?id=15618
1406 <rdar://problem/5619353> REGRESSION: Stack overflow/crash in KJS::equal (15618)
1408 Test: fast/js/recursion-limit-equal.html
1410 * kjs/operations.cpp: (KJS::equal): Check the exception from toPrimitive.
1412 2007-12-03 Dan Bernstein <mitz@apple.com>
1414 - fix a copy-and-paste-o
1416 * bindings/npruntime.cpp:
1417 (_NPN_GetIntIdentifier):
1419 2007-12-03 Dan Bernstein <mitz@apple.com>
1421 Reviewed by Darin Adler.
1423 - fix an ASSERT when getIntIdentifier is called with 0 or -1
1425 * bindings/npruntime.cpp:
1426 (_NPN_GetIntIdentifier): We cannot use the hashmap for 0 and -1 since
1427 they are the empty value and the deleted value. Instead, keep the
1428 identifiers for those two integers in a static array.
1430 2007-12-02 Darin Adler <darin@apple.com>
1434 - fix http://bugs.webkit.org/show_bug.cgi?id=15848
1435 <rdar://problem/5619330> REGRESSION: Assertion failure viewing comments page on digg.com
1437 Test: fast/js/sparse-array.html
1439 * kjs/array_instance.cpp:
1440 (KJS::ArrayInstance::inlineGetOwnPropertySlot): Check sparse array cutoff before looking
1441 in hash map. Can't avoid the branch because we can't look for 0 in the hash.
1442 (KJS::ArrayInstance::deleteProperty): Ditto.
1444 2007-12-02 Geoffrey Garen <ggaren@apple.com>
1446 Build fix: added an #include.
1448 * kjs/collector.cpp:
1450 2007-12-02 Geoffrey Garen <ggaren@apple.com>
1452 Reviewed by Eric Seidel.
1454 Second step in refactoring JSGlobalObject: moved virtual functions from
1455 Interpreter to JSGlobalObject.
1457 Layout and JS tests pass. SunSpider reports a .7% speedup -- don't
1460 2007-12-01 Alp Toker <alp@atoker.com>
1462 Reviewed by Adam Roben.
1464 http://bugs.webkit.org/show_bug.cgi?id=16228
1465 kJSClassDefinitionEmpty is not exported with JS_EXPORT
1467 Add JS_EXPORT to kJSClassDefinitionEmpty.
1469 Make the gcc compiler check take precedence over the WIN32||_WIN32
1470 check to ensure that symbols are exported on Windows when using gcc.
1472 Add a TODO referencing the bug about JS_EXPORT in the Win build
1473 (http://bugs.webkit.org/show_bug.cgi?id=16227)
1475 Don't define JS_EXPORT as 'extern' when the compiler is unknown since
1476 it would result in the incorrect expansion:
1478 extern extern const JSClassDefinition kJSClassDefinitionEmpty;
1480 (This was something we inherited from CFBase.h that doesn't make sense
1484 * API/JSObjectRef.h:
1486 2007-11-30 Geoffrey Garen <ggaren@apple.com>
1488 Reviewed by Beth Dakin.
1490 Reversed the ownership relationship between Interpreter and JSGlobalObject.
1491 Now, the JSGlobalObject owns the Interpreter, and top-level objects
1492 that need the two to persist just protect the JSGlobalObject from GC.
1494 Global object bootstrapping looks a little odd right now, but it will
1495 make much more sense soon, after further rounds of refactoring.
1497 * bindings/runtime_root.h: Made this class inherit from RefCounted,
1498 to avoid code duplication.
1500 * kjs/collector.cpp:
1501 (KJS::Collector::collect): No need to give special GC treatment to
1502 Interpreters, since we mark their global objects, which mark them.
1504 * kjs/interpreter.cpp:
1505 (KJS::Interpreter::mark): No need to mark our global object, since it
1507 * kjs/interpreter.h: Don't inherit from RefCounted -- JSGlobalObject
1510 * kjs/testkjs.cpp: Modified to follow the new rules.
1511 (createGlobalObject):
1514 2007-11-30 Brent Fulgham <bfulgham@gmail.com>
1519 * pcre/pcre_compile.cpp:
1522 2007-11-30 Eric Seidel <eric@webkit.org>
1524 No review, build fix only.
1526 Fix uninitialized var warnings in release build.
1528 * JavaScriptCore.xcodeproj/project.pbxproj:
1529 * pcre/pcre_compile.cpp:
1532 2007-11-30 Darin Adler <darin@apple.com>
1534 Reviewed by Adam Roben.
1536 - fix http://bugs.webkit.org/show_bug.cgi?id=16207
1537 JavaScript regular expressions should match UTF-16 code units rather than characters
1539 SunSpider says this is 5.5% faster on the regexp test, 0.4% faste overall.
1541 Test: fast/js/regexp-non-bmp.html
1543 Renamed ANY_CHAR to NOT_NEWLINE to more-accurately reflect its meaning.
1545 * pcre/pcre_compile.cpp:
1546 (compile_branch): Removed calls to the UTF-16 character accessor functions, replacing
1547 them with simple pointer dereferences in some cases, and no code at all in others.
1548 (calculateCompiledPatternLengthAndFlags): Ditto.
1550 * pcre/pcre_exec.cpp:
1551 (match): Fixed indentation of some case labels (including all the BEGIN_OPCODE).
1552 Removed calls to the UTF-16 character accessor functions, replacing them with simple
1553 pointer dereferences in some cases, and no code at all in others. Also removed some
1554 explicit UTF-16 support code in a few cases. Removed the unneeded "UTF-8" code path
1555 in the ANY_CHAR repeat code, and in another case, eliminated the code to check against
1556 end_subject in because it is already done outside the loop.
1559 * pcre/pcre_internal.h: Removed all the UTF-16 helper functions.
1561 2007-11-30 Eric Seidel <eric@webkit.org>
1565 PCRE crashes under GuardMalloc
1566 http://bugs.webkit.org/show_bug.cgi?id=16127
1567 check against patternEnd to make sure we don't walk off the end of the string
1569 * pcre/pcre_compile.cpp:
1571 (calculateCompiledPatternLengthAndFlags):
1573 2007-11-30 Eric Seidel <eric@webkit.org>
1577 Fix layout test regressions caused by r28186
1578 http://bugs.webkit.org/show_bug.cgi?id=16195
1579 change first_byte and req_byte back to shorts instead of chars
1580 (I think PCRE stuffs information in the high bits)
1582 * pcre/pcre_internal.h:
1584 2007-11-29 Oliver Hunt <oliver@apple.com>
1586 Reviewed by Maciej and Darin.
1588 Make the JS collector work with multiple threads
1590 Under heavy contention it was possible the GC to suspend other
1591 threads inside the pthread spinlock, which could lead to the GC
1592 thread blocking on the pthread spinlock itself.
1594 We now determine and store each thread's stack base when it is
1595 registered, thus removing the need for any calls to pthread_get_stackaddr_np
1596 that needed the pthread spinlock.
1598 * kjs/collector.cpp:
1599 (KJS::Collector::Thread::Thread):
1600 (KJS::Collector::registerThread):
1601 (KJS::Collector::markOtherThreadConservatively):
1603 2007-11-29 Adam Roben <aroben@apple.com>
1607 Removed some unreachable code (ironically, the code was some
1608 ASSERT_NOT_REACHED()s).
1610 * pcre/pcre_compile.cpp:
1612 * pcre/pcre_exec.cpp:
1615 2007-11-29 Eric Seidel <eric@webkit.org>
1617 Reviewed by Mark Rowe.
1619 Fix for --guard crash of fast/js/regexp-charclass-crash introduced by r28151.
1621 * pcre/pcre_compile.cpp:
1624 2007-11-28 Mark Rowe <mrowe@apple.com>
1626 Gtk build fix. Rubber-stamped by Eric.
1628 * pcre/pcre_exec.cpp:
1629 (match): Add braces around the body of the case statement to prevent
1630 wanings about jumps across the initialization of a variable.
1632 2007-11-29 Eric Seidel <eric@webkit.org>
1634 Reviewed by Mark Rowe.
1636 Attempt to fix non-mac builds after PCRE cleanup.
1638 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1639 * JavaScriptCoreSources.bkl:
1642 2007-11-28 Eric Seidel <eric@webkit.org>
1646 Centralize code for subjectPtr adjustments using inlines, only ever check for a single
1647 trailing surrogate (as UTF16 only allows one), possibly fix PCRE bugs involving char
1648 classes and garbled UTF16 strings.
1650 * pcre/pcre_exec.cpp:
1653 * pcre/pcre_internal.h:
1655 (movePtrToPreviousChar):
1656 (movePtrToNextChar):
1657 (movePtrToStartOfCurrentChar):
1659 2007-11-28 Eric Seidel <eric@webkit.org>
1663 change getChar* functions to return result and push 'c' into local scopes for clarity
1665 * pcre/pcre_compile.cpp:
1667 (calculateCompiledPatternLengthAndFlags):
1668 * pcre/pcre_exec.cpp:
1670 * pcre/pcre_internal.h:
1672 (getCharAndAdvance):
1674 (getCharAndAdvanceIfSurrogate):
1676 2007-11-28 Eric Seidel <eric@webkit.org>
1682 * pcre/pcre_exec.cpp:
1685 2007-11-26 Eric Seidel <eric@webkit.org>
1689 Further cleanups to calculateCompiledPatternLengthAndFlags
1691 * pcre/pcre_compile.cpp:
1692 (calculateCompiledPatternLengthAndFlags):
1693 * pcre/pcre_internal.h:
1695 2007-11-26 Eric Seidel <eric@webkit.org>
1699 Give consistent naming to the RegExp options/compile flags
1701 * pcre/pcre_compile.cpp:
1704 (find_firstassertedchar):
1705 (printCompiledRegExp):
1707 * pcre/pcre_exec.cpp:
1709 * pcre/pcre_internal.h:
1711 2007-11-26 Eric Seidel <eric@webkit.org>
1715 Pull first_byte and req_byte optimizations out into separate static funtions, SunSpider reported this as a win.
1717 * pcre/pcre_exec.cpp:
1718 (tryFirstByteOptimization):
1719 (tryRequiredByteOptimization):
1721 * pcre/pcre_internal.h:
1723 2007-11-26 Eric Seidel <eric@webkit.org>
1727 give PCRE_MULTILINE a better name: OptionMatchAcrossMultipleLines
1729 * pcre/pcre_compile.cpp:
1732 (printCompiledRegExp):
1734 * pcre/pcre_exec.cpp:
1736 * pcre/pcre_internal.h:
1738 2007-11-26 Eric Seidel <eric@webkit.org>
1742 Deprecate jsRegExpExecute's offset-vector fallback code
1744 * pcre/pcre_exec.cpp:
1747 2007-11-26 Eric Seidel <eric@webkit.org>
1751 Make cur_is_word and prev_is_word locals, and change OP_ANY to OP_ANY_CHAR for clarity
1753 * pcre/pcre_compile.cpp:
1756 (canApplyFirstCharOptimization):
1757 * pcre/pcre_exec.cpp:
1759 * pcre/pcre_internal.h:
1761 2007-11-26 Eric Seidel <eric@webkit.org>
1763 Reviewed by Mitz & Maciej.
1765 Change _NC operators to use _IGNORING_CASE for clarity
1767 * pcre/pcre_compile.cpp:
1770 (find_firstassertedchar):
1771 * pcre/pcre_exec.cpp:
1773 * pcre/pcre_internal.h:
1775 2007-11-26 Eric Seidel <eric@webkit.org>
1779 Remove branch from return
1781 * pcre/pcre_compile.cpp:
1783 * pcre/pcre_exec.cpp:
1786 2007-11-26 Eric Seidel <eric@webkit.org>
1790 Add repeatInformationFromInstructionOffset inline
1792 * pcre/pcre_exec.cpp:
1793 (repeatInformationFromInstructionOffset):
1796 2007-11-26 Eric Seidel <eric@webkit.org>
1800 Remove no longer used error code JSRegExpErrorMatchLimit
1803 (KJS::RegExp::match):
1805 * pcre/pcre_internal.h:
1807 2007-11-26 Eric Seidel <eric@webkit.org>
1811 Make i locally scoped for better code clarity
1813 * pcre/pcre_exec.cpp:
1816 2007-11-26 Eric Seidel <eric@webkit.org>
1820 Give subjectPtr and instructionPtr sane names, reduce size of MatchFrame for a 0.2% speedup.
1822 * pcre/pcre_compile.cpp:
1824 (calculateCompiledPatternLengthAndFlags):
1825 * pcre/pcre_exec.cpp:
1827 (MatchStack::pushNewFrame):
1828 (getUTF8CharAndIncrementLength):
1830 * pcre/pcre_internal.h:
1832 (getCharAndAdvance):
1834 (getCharAndAdvanceIfSurrogate):
1835 * pcre/pcre_xclass.cpp:
1836 (getUTF8CharAndAdvancePointer):
1838 2007-11-26 Eric Seidel <eric@webkit.org>
1842 Small speedup (0.7%) by simplifying canUseStackBufferForNextFrame() check
1844 * pcre/pcre_exec.cpp:
1845 (MatchStack::MatchStack):
1846 (MatchStack::popCurrentFrame):
1848 2007-11-25 Eric Seidel <eric@webkit.org>
1852 Lower MATCH_LIMIT_RECURSION to more sane levels to prevent hangs on run-javascriptcore-tests
1854 * pcre/pcre_internal.h:
1856 2007-11-25 Eric Seidel <eric@webkit.org>
1860 Remove match_is_group variable for another 5% speedup
1862 * pcre/pcre_compile.cpp:
1863 * pcre/pcre_exec.cpp:
1867 2007-11-28 Eric Seidel <eric@webkit.org>
1871 Abstract frame variables into locals and args
1873 * pcre/pcre_compile.cpp:
1875 * pcre/pcre_exec.cpp:
1877 * pcre/pcre_internal.h:
1879 2007-11-28 Eric Seidel <eric@webkit.org>
1883 Section off MatchData arguments into args struct
1885 * pcre/pcre_exec.cpp:
1886 (MatchStack::pushNewFrame):
1889 2007-11-24 Eric Seidel <eric@webkit.org>
1893 Remove redundant eptrblock struct
1895 * pcre/pcre_exec.cpp:
1896 (MatchStack::pushNewFrame):
1899 2007-11-24 Eric Seidel <eric@webkit.org>
1903 Remove redundant match_call_count and move recursion check out of super-hot code path
1904 SunSpider says this is at least an 8% speedup for regexp.
1906 * pcre/pcre_exec.cpp:
1907 (MatchStack::MatchStack):
1908 (MatchStack::pushNewFrame):
1909 (MatchStack::popCurrentFrame):
1910 (MatchStack::popAllFrames):
1913 * pcre/pcre_internal.h:
1915 2007-11-24 Eric Seidel <eric@webkit.org>
1919 Get rid of GETCHAR* macros, replacing them with better named inlines
1921 * pcre/pcre_compile.cpp:
1923 (calculateCompiledPatternLengthAndFlags):
1924 * pcre/pcre_exec.cpp:
1926 * pcre/pcre_internal.h:
1927 (getCharAndAdvance):
1929 (getCharAndAdvanceIfSurrogate):
1931 2007-11-24 Eric Seidel <eric@webkit.org>
1935 Further cleanup GET/PUT inlines
1937 * pcre/pcre_internal.h:
1938 (putOpcodeValueAtOffset):
1939 (getOpcodeValueAtOffset):
1940 (putOpcodeValueAtOffsetAndAdvance):
1941 (put2ByteOpcodeValueAtOffset):
1942 (get2ByteOpcodeValueAtOffset):
1943 (put2ByteOpcodeValueAtOffsetAndAdvance):
1945 2007-11-24 Eric Seidel <eric@webkit.org>
1949 Give GET, PUT better names, and add (poor) moveOpcodePtrPastAnyAlternateBranches
1951 * pcre/pcre_compile.cpp:
1952 (firstSignificantOpCodeSkippingAssertions):
1958 (canApplyFirstCharOptimization):
1959 (find_firstassertedchar):
1960 * pcre/pcre_exec.cpp:
1962 * pcre/pcre_internal.h:
1963 (putOpcodeValueAtOffset):
1964 (getOpcodeValueAtOffset):
1965 (putOpcodeValueAtOffsetAndAdvance):
1966 (put2ByteOpcodeValueAtOffset):
1967 (get2ByteOpcodeValueAtOffset):
1968 (moveOpcodePtrPastAnyAlternateBranches):
1969 * pcre/pcre_ucp_searchfuncs.cpp:
1970 (_pcre_ucp_othercase):
1972 2007-11-24 Eric Seidel <eric@webkit.org>
1976 Add inlines for toLowerCase, isWordChar, isSpaceChar for further regexp speedup
1978 * pcre/pcre_compile.cpp:
1981 * pcre/pcre_exec.cpp:
1984 * pcre/pcre_internal.h:
1987 (classBitmapForChar):
1991 (CompileData::CompileData):
1992 * pcre/pcre_xclass.cpp:
1995 2007-11-24 Eric Seidel <eric@webkit.org>
1999 cleanup _pcre_ucp_othercase
2001 * pcre/pcre_ucp_searchfuncs.cpp:
2002 (_pcre_ucp_othercase):
2004 2007-11-24 Eric Seidel <eric@webkit.org>
2008 Use better variable names for case ignoring options
2010 * pcre/pcre_compile.cpp:
2012 (find_firstassertedchar):
2013 (printCompiledRegExp):
2015 * pcre/pcre_exec.cpp:
2019 * pcre/pcre_internal.h:
2021 2007-11-24 Eric Seidel <eric@webkit.org>
2025 split first_significant_code into two simpler functions
2027 * pcre/pcre_compile.cpp:
2028 (firstSignificantOpCode):
2029 (firstSignificantOpCodeSkippingAssertions):
2031 (canApplyFirstCharOptimization):
2032 (find_firstassertedchar):
2034 2007-11-24 Eric Seidel <eric@webkit.org>
2038 clean up is_counted_repeat
2040 * pcre/pcre_compile.cpp:
2041 (is_counted_repeat):
2043 2007-11-24 Eric Seidel <eric@webkit.org>
2047 clean up check_escape
2049 * pcre/pcre_compile.cpp:
2052 2007-11-24 Eric Seidel <eric@webkit.org>
2056 Reformat find_fixedlength
2058 * pcre/pcre_compile.cpp:
2061 2007-11-24 Eric Seidel <eric@webkit.org>
2065 reformat is_anchored
2067 * pcre/pcre_compile.cpp:
2070 2007-11-24 Eric Seidel <eric@webkit.org>
2074 Remove unused function could_be_empty_branch
2076 * pcre/pcre_compile.cpp:
2077 (first_significant_code):
2080 (canApplyFirstCharOptimization):
2082 2007-11-24 Eric Seidel <eric@webkit.org>
2086 Pass around MatchData objects by reference
2088 * pcre/pcre_exec.cpp:
2094 2007-11-24 Eric Seidel <eric@webkit.org>
2098 give PCRE_STARTLINE a better name and rename match_data to MatchData
2100 * pcre/pcre_compile.cpp:
2102 (canApplyFirstCharOptimization):
2103 (find_firstassertedchar):
2104 (printCompiledRegExp):
2106 * pcre/pcre_exec.cpp:
2109 * pcre/pcre_internal.h:
2111 2007-11-24 Eric Seidel <eric@webkit.org>
2115 Clean up find_firstassertedchar
2117 * pcre/pcre_compile.cpp:
2118 (get_othercase_range):
2119 (find_firstassertedchar):
2120 (calculateCompiledPatternLengthAndFlags):
2122 2007-11-24 Eric Seidel <eric@webkit.org>
2124 Reviewed by Tim Hatcher.
2126 Pass around CompileData& instead of CompileData*
2128 * pcre/pcre_compile.cpp:
2132 2007-11-24 Eric Seidel <eric@webkit.org>
2136 Clean up compile_branch, move _pcre_ord2utf8, and rename CompileData
2138 * JavaScriptCore.xcodeproj/project.pbxproj:
2139 * pcre/pcre_compile.cpp:
2141 (calculateCompiledPatternLengthAndFlags):
2143 * pcre/pcre_internal.h:
2144 * pcre/pcre_ord2utf8.cpp: Removed.
2146 2007-11-24 Eric Seidel <eric@webkit.org>
2150 removing more macros
2152 * pcre/pcre_compile.cpp:
2153 (could_be_empty_branch):
2155 (calculateCompiledPatternLengthAndFlags):
2156 * pcre/pcre_exec.cpp:
2159 * pcre/pcre_internal.h:
2160 * pcre/pcre_xclass.cpp:
2162 2007-11-24 Eric Seidel <eric@webkit.org>
2166 clean up formating in compile_branch
2168 * pcre/pcre_compile.cpp:
2171 2007-11-24 Eric Seidel <eric@webkit.org>
2175 Fix spacing for read_repeat_counts
2177 * pcre/pcre_compile.cpp:
2178 (read_repeat_counts):
2180 2007-11-24 Eric Seidel <eric@webkit.org>
2184 Get rid of PCRE custom char types
2186 * pcre/pcre_compile.cpp:
2191 (calculateCompiledPatternLengthAndFlags):
2193 * pcre/pcre_exec.cpp:
2197 * pcre/pcre_internal.h:
2199 2007-11-24 Eric Seidel <eric@webkit.org>
2203 reformat get_othercase_range
2205 * pcre/pcre_compile.cpp:
2206 (get_othercase_range):
2208 2007-11-24 Eric Seidel <eric@webkit.org>
2212 Remove register keyword and more cleanup
2214 * pcre/pcre_compile.cpp:
2219 (find_firstassertedchar):
2220 (calculateCompiledPatternLengthAndFlags):
2222 * pcre/pcre_exec.cpp:
2223 (MatchStack::canUseStackBufferForNextFrame):
2224 (MatchStack::allocateNextFrame):
2225 (MatchStack::pushNewFrame):
2226 (MatchStack::frameIsStackAllocated):
2227 (MatchStack::popCurrentFrame):
2228 (MatchStack::unrollAnyHeapAllocatedFrames):
2229 (getUTF8CharAndIncrementLength):
2232 * pcre/pcre_internal.h:
2234 (isLeadingSurrogate):
2235 (isTrailingSurrogate):
2236 (decodeSurrogatePair):
2238 * pcre/pcre_ord2utf8.cpp:
2240 * pcre/pcre_xclass.cpp:
2241 (getUTF8CharAndAdvancePointer):
2244 2007-11-24 Eric Seidel <eric@webkit.org>
2248 Clean up jsRegExpExecute
2250 * pcre/pcre_compile.cpp:
2253 * pcre/pcre_exec.cpp:
2255 * pcre/pcre_internal.h:
2257 2007-11-29 Oliver Hunt <oliver@apple.com>
2261 Merging updated system alloc and spinlock code from r38 of TCMalloc.
2263 This is needed as a precursor to the merge of TCMalloc proper.
2265 * wtf/FastMalloc.cpp:
2266 (WTF::TCMalloc_PageHeap::GrowHeap):
2268 (TCMalloc_SpinLock::TCMalloc_SpinLock):
2269 (TCMalloc_SpinLock::):
2270 (TCMalloc_SpinLock::Lock):
2271 (TCMalloc_SpinLock::Unlock):
2272 (TCMalloc_SpinLock::IsHeld):
2273 * wtf/TCSystemAlloc.cpp:
2278 (TCMalloc_SystemAlloc):
2279 * wtf/TCSystemAlloc.h:
2281 2007-11-28 Brady Eidson <beidson@apple.com>
2285 Add copyKeysToVector utility, mirroring copyValuesToVector
2286 Also change the copyValuesToVector implementation to be a little more attractive
2289 (WTF::copyKeysToVector):
2290 (WTF::copyValuesToVector):
2292 2007-11-27 Alp Toker <alp@atoker.com>
2294 Reviewed by Mark Rowe.
2296 Add a list of public JavaScriptCore headers for installation.
2298 This follows the convention used for the Qt and GTK+ header lists.
2300 * headers.pri: Added.
2302 2007-11-27 Alp Toker <alp@atoker.com>
2304 Prospective MSVC build fix.
2306 Roll back dllexport/dllimport support for now.
2310 2007-11-27 Alp Toker <alp@atoker.com>
2314 http://bugs.webkit.org/show_bug.cgi?id=15569
2315 [gtk] GTK JavaScriptCore needs to export symbols for JSC API and WTF
2317 Introduce JS_EXPORT to mark symbols to be exported as public API.
2319 Export all public symbols in the JavaScriptCore C API.
2321 This matches conventions for exporting symbols set by the CF and CG
2325 * API/JSContextRef.h:
2326 * API/JSObjectRef.h:
2327 * API/JSStringRef.h:
2328 * API/JSStringRefBSTR.h:
2329 * API/JSStringRefCF.h:
2332 2007-11-27 Anders Carlsson <andersca@apple.com>
2336 Make PropertyNameArray and ScopeChain COMEnumVariant friendly.
2338 * kjs/PropertyNameArray.cpp:
2339 (KJS::PropertyNameArray::swap):
2340 Implement PropertyNameArray::swap.
2342 * kjs/PropertyNameArray.h:
2343 Add ValueType typedef. Replace PropertyNameArrayIterator with
2344 PropertyNameArray::const_iterator.
2347 (KJS::ForInNode::execute):
2348 * kjs/scope_chain.cpp:
2349 (KJS::ScopeChain::print):
2350 Update for changes to PropertyNameArray.
2352 * kjs/scope_chain.h:
2353 Add const_iterator and ValueType typedef.
2355 2007-11-27 Anders Carlsson <andersca@apple.com>
2359 Add a ValueType typedef.
2363 2007-11-26 Darin Adler <darin@apple.com>
2367 - fix http://bugs.webkit.org/show_bug.cgi?id=16096
2368 REGRESSION (r26653-r26699): Plaxo.com addressbook does not load in webkit nightlies
2370 Test: fast/js/regexp-overflow.html
2372 * pcre/pcre_compile.cpp: (calculateCompiledPatternLengthAndFlags):
2373 Removed a stray "ptr++" that I added by accident when merging the
2374 changes between PCRE 6.4 and 6.5.
2376 2007-11-26 Geoffrey Garen <ggaren@apple.com>
2378 Reviewed by Kevin McCullough.
2380 Fixed <rdar://problem/5597937> REGRESSION (r27126): Drosera does not
2381 show variables (can't enumerate ActivationImp properties)
2383 Implemented a custom ActivationImp::getPropertyNames, since
2384 ActivationImp now uses a custom property storage mechanism for local
2388 (KJS::ActivationImp::getPropertyNames):
2391 2007-11-26 Alp Toker <alp@atoker.com>
2393 GTK+/Qt/Wx build fix for breakage introduced in r28039.
2395 * ForwardingHeaders/JavaScriptCore/JSRetainPtr.h: Added.
2397 2007-11-24 Laszlo Gombos <laszlo.gombos@gmail.com>
2399 Reviewed by Maciej Stachowiak.
2401 Fix minor compiler warning (GCC 4.1.3)
2403 * pcre/pcre_internal.h:
2404 * pcre/pcre_ucp_searchfuncs.cpp:
2405 (_pcre_ucp_othercase):
2407 2007-11-25 Mark Rowe <mrowe@apple.com>
2409 Reviewed by Dan Bernstein.
2411 Fix http://bugs.webkit.org/show_bug.cgi?id=16129
2412 Bug 16129: REGRESSION (r27761-r27811): malloc error while visiting http://mysit.es (crashes release build)
2414 * pcre/pcre_compile.cpp: Change errorcode to be passed by reference so that any error code is propagated
2415 to our caller like they expect.
2417 2007-11-23 Kevin Ollivier <kevino@theolliviers.com>
2419 MSVC7 build fix. (rand_s doesn't exist there)
2421 Reviewed by Adam Roben.
2426 2007-11-23 Kevin Ollivier <kevino@theolliviers.com>
2428 wx build fix. Move WX_PYTHON logic into project build settings,
2429 add WebKitLibraries dirs on Win, and explicitly include JSCore
2430 headers in testkjs rather than getting them from a template.
2431 (Include dir order of JSCore/WTF and ICU headers is important due
2432 to wtf/unicode/utf8.h.)
2436 2007-11-23 Simon Hausmann <hausmann@webkit.org>
2438 Reviewed by George Staikos <staikos@kde.org>.
2440 Fix make (dist)clean on Windows.
2442 OBJECTS_DIR_WTR does not exist anymore, use GENERATED_SOURCES_DIR.
2445 * JavaScriptCore.pri:
2448 2007-11-22 Simon Hausmann <hausmann@kde.org>
2452 Make the directory of where to put the generated sources configurable through the GENERATED_SOURCE_DIR variable
2454 * JavaScriptCore.pri:
2457 2007-11-22 Simon Hausmann <hausmann@kde.org>
2461 Centralize the setup for all the extra compilers in a addExtraCompiler function.
2463 This allows adding a "generated_files" target that builds all generated files using "make generated_files".
2464 For the build inside Qt we do not generate actual rules for the extra compilers but instead
2465 do the variable substitution of compiler.output manually and add the generated sources to SOURCES.
2467 * JavaScriptCore.pri:
2470 2007-11-20 Mark Rowe <mrowe@apple.com>
2472 Reviewed by Tim Hatcher.
2474 <rdar://problem/5602936> Need to resolve new GCC 4.2 warnings
2476 Fix all warnings emitted by GCC 4.2 when building JavaScriptCore. This allows builds with
2477 -Werror to succeed. At present they will crash when executed due to code that is not safe
2478 under strict aliasing (<rdar://problem/5536806>).
2480 * Configurations/Base.xcconfig: Remove the -Wno-long-double flag.
2481 * kjs/date_object.cpp:
2482 (KJS::formatTime): Test whether the stack-allocated string is empty rather than at a non-null address.
2484 (Bigint::): Tweak formatting to silence warnings.
2485 * pcre/pcre_exec.cpp:
2486 (match): Tweak formatting to silence warnings
2487 * wtf/Assertions.cpp: Add printf format attribute to functions that warrant it.
2488 * wtf/Assertions.h: Ditto.
2490 2007-11-19 Kevin Ollivier <kevino@theolliviers.com>
2492 wx port build fix (wx headers include ctype functions).
2496 2007-11-19 Kevin Ollivier <kevino@theolliviers.com>
2498 Remove outdated and unused Windows port files.
2500 Reviewed by Adam Roben.
2502 * Makefile.vc: Removed.
2503 * README-Win32.txt: Removed.
2505 2007-11-18 Eric Seidel <eric@webkit.org>
2509 * tests/mozilla/jsDriver.pl: exit non-0 when user aborts test run
2511 2007-11-17 Mark Rowe <mrowe@apple.com>
2513 Reviewed by Darin Adler.
2515 Fix: <rdar://problem/5607032> REGRESSION: testapi exits with assertion failure in debug build
2516 <rdar://problem/5440659> JSGlobalContextCreate throws away globalObjectClass's prototype
2517 http://bugs.webkit.org/show_bug.cgi?id=16033
2519 Split Interpreter's initialization into two distinct steps: the creation of the global prototypes
2520 and constructors, and storing them on the global object. This allows JSClassRef's passed to
2521 JSGlobalContextCreate to be instantiated with the correct prototype.
2523 * API/JSCallbackObject.cpp: Assert at compile-time that the custom global object will fit in a collector cell.
2524 * API/JSCallbackObject.h:
2525 * API/JSCallbackObjectFunctions.h:
2526 (KJS::::JSCallbackObject):
2528 * API/JSContextRef.cpp:
2529 (JSGlobalContextCreate): Construct and set the interpreter's global object separately. When globalObjectClass
2530 is passed we need to set the interpreter's global object before doing the JSCallbackObject's initialization to
2531 prevent any JSObjectInitializeCallback's being invoked before a global object is set.
2533 (globalObject_initialize): Test the object passed in is correct and that it has the expected global properties.
2537 * API/testapi.js: Test that any static properties exposed by the global object's custom class are found.
2538 * JavaScriptCore.exp:
2539 * bindings/testbindings.cpp:
2540 (main): Update for changes in Interpreter method signatures.
2541 * bindings/testbindings.mm:
2543 * kjs/ExecState.cpp:
2544 (KJS::ExecState::ExecState):
2545 (KJS::ExecState::mark):
2546 (KJS::ExecState::setGlobalObject):
2547 * kjs/ExecState.h: Rename scope to m_scopeChain.
2548 * kjs/interpreter.cpp:
2549 (KJS::Interpreter::Interpreter):
2550 (KJS::Interpreter::init):
2551 (KJS::Interpreter::globalObject):
2552 (KJS::Interpreter::setGlobalObject):
2553 (KJS::Interpreter::resetGlobalObjectProperties):
2554 (KJS::Interpreter::createObjectsForGlobalObjectProperties):
2555 (KJS::Interpreter::setGlobalObjectProperties): Switch to using putDirect to ensure that the global object's put method
2556 cannot interfere with setting of the global properties. This prevents a user-written JSClassRef from attempting to
2557 call back into JavaScript from the initialization of the global object's members.
2558 * kjs/interpreter.h:
2560 (setupInterpreter): Update for changes in Interpreter method signatures.
2562 2007-11-17 Mark Rowe <mrowe@apple.com>
2564 Reviewed by Sam Weinig.
2566 Prevent testapi from reporting false leaks. Clear out local variables pointing at
2567 JSObjectRefs to allow their values to be collected.
2572 2007-11-17 Mark Rowe <mrowe@apple.com>
2574 Reviewed by Sam Weinig.
2576 Prevent testapi from crashing if testapi.js can not be found by nil-checking the result of createStringWithContentsOfFile.
2581 2007-11-17 Alp Toker <alp@atoker.com>
2585 http://bugs.webkit.org/show_bug.cgi?id=16032
2586 JS minidom is not portable
2588 Use a plain UTF-8 string instead of a CFString.
2590 Print to stdout, not stderr like CFShow() would have done, since that
2591 behaviour seems unintentional.
2596 2007-11-17 Steve Falkenburg <sfalken@apple.com>
2600 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2602 2007-11-16 Mark Rowe <mrowe@apple.com>
2607 (KJS::Lexer::record8):
2609 2007-11-16 Mark Rowe <mrowe@apple.com>
2613 Replace strings, identifier, buffer8 and buffer16 members of Lexer with vectors.
2614 SunSpider claims this is a 0.7% speedup.
2617 (KJS::Lexer::Lexer):
2619 (KJS::Lexer::record8):
2620 (KJS::Lexer::record16):
2621 (KJS::Lexer::scanRegExp):
2622 (KJS::Lexer::clear):
2623 (KJS::Lexer::makeIdentifier):
2624 (KJS::Lexer::makeUString):
2627 (KJS::UString::UString): Add a convenience constructor that takes a const Vector<UChar>&.
2630 2007-11-16 Adam Roben <aroben@apple.com>
2634 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Add a new include path
2635 and ignore the int -> bool conversion warning.
2637 2007-11-16 Alexey Proskuryakov <ap@webkit.org>
2639 Fix Windows debug build.
2640 Rubber-stamped by Eric
2642 * pcre/pcre_exec.cpp: (match): Removed ASSERT_NOT_REACHED assertions that were making MSVC
2643 complain about unreachable code.
2645 2007-11-15 Mark Rowe <mrowe@apple.com>
2651 2007-11-15 Mark Rowe <mrowe@apple.com>
2653 Mac build and header search path sanity fix.
2655 Reviewed by Sam Weinig and Tim Hatcher.
2657 Move base setting for HEADER_SEARCH_PATHS into Base.xcconfig, and extend
2658 it in JavaScriptCore.xcconfig. This removes the need to override it on a
2659 per-target basis inside the .xcodeproj file.
2661 * Configurations/Base.xcconfig:
2662 * Configurations/JavaScriptCore.xcconfig:
2663 * JavaScriptCore.xcodeproj/project.pbxproj:
2665 2007-11-15 Mark Rowe <mrowe@apple.com>
2671 2007-11-15 Geoffrey Garen <ggaren@apple.com>
2673 Reviewed by Eric Seidel.
2675 Another round of grammar / parsing cleanup.
2677 1. Created distinct parser calls for parsing function bodies vs
2678 programs. This will help later with optimizing global variable access.
2680 2. Turned Parser into a singleton. Cleaned up Lexer's singleton
2683 3. Modified Lexer to free a little more memory when done lexing. (Added
2684 FIXMEs for similar issues that I didn't fix.)
2686 4. Changed Lexer::makeIdentifier and Lexer::makeUString to start
2687 respecting the arguments passed to them. (No behavior change, but this
2688 problem could have caused serious problems for an unsuspecting user of
2691 5. Removed KJS_DEBUG_MEM because it was bit-rotted.
2693 6. Removed Parser::prettyPrint because the same work was simpler to do
2698 "Parser::accept" => "Parser::didFinishParsing"
2699 "Parser::sid" => "Parser::m_sourceID"
2700 "Lexer::doneParsing" => "Lexer::clear"
2702 "lineno" => "lineNo"
2704 * JavaScriptCore.exp:
2706 (KJS::Parser::Parser):
2707 (KJS::Parser::parseProgram):
2708 (KJS::Parser::parseFunctionBody):
2709 (KJS::Parser::parse):
2710 (KJS::Parser::didFinishParsing):
2713 (KJS::Parser::sourceId):
2715 (KJS::GlobalFuncImp::callAsFunction):
2716 * kjs/function_object.cpp:
2717 (FunctionObjectImp::construct):
2719 * kjs/interpreter.cpp:
2720 (KJS::Interpreter::checkSyntax):
2721 (KJS::Interpreter::evaluate):
2722 * kjs/interpreter.h:
2726 (KJS::Lexer::Lexer):
2727 (KJS::Lexer::~Lexer):
2728 (KJS::Lexer::scanRegExp):
2729 (KJS::Lexer::doneParsing):
2730 (KJS::Lexer::makeIdentifier):
2731 (KJS::Lexer::makeUString):
2733 (KJS::Lexer::pattern):
2734 (KJS::Lexer::flags):
2735 (KJS::Lexer::sawError):
2738 (KJS::FunctionBodyNode::FunctionBodyNode):
2741 (prettyPrintScript):
2746 2007-11-15 Oliver Hunt <oliver@apple.com>
2750 <rdar://problem/5601548> REGRESSION: All SourceElements and their children leak after a syntax error
2752 Add a stub node to maintain the Vector of SourceElements until assignment.
2756 (KJS::SourceElementsStub::SourceElementsStub):
2757 (KJS::SourceElementsStub::append):
2758 (KJS::SourceElementsStub::release):
2759 (KJS::SourceElementsStub::):
2760 (KJS::SourceElementsStub::precedence):
2762 2007-11-15 Eric Seidel <eric@webkit.org>
2766 Abstract most of RMATCH into MatchStack functions.
2768 SunSpider claims this, combined with the last 2 patches was a 1% speedup, 10% for dna-regexp.
2770 * pcre/pcre_exec.cpp:
2771 (MatchStack::canUseStackBufferForNextFrame):
2772 (MatchStack::allocateNextFrame):
2773 (MatchStack::pushNewFrame):
2774 (MatchStack::frameIsStackAllocated):
2775 (MatchStack::popCurrentFrame):
2776 (MatchStack::unrollAnyHeapAllocatedFrames):
2779 2007-11-15 Eric Seidel <eric@webkit.org>
2783 Remove RETURN_ERROR, add MatchStack
2785 * pcre/pcre_exec.cpp:
2786 (MatchStack::MatchStack):
2787 (MatchStack::unrollAnyHeapAllocatedFrames):
2791 2007-11-15 Eric Seidel <eric@webkit.org>
2795 Clean up match function to match WebKit style
2797 * JavaScriptCore.xcodeproj/project.pbxproj:
2798 * pcre/pcre_exec.cpp:
2801 2007-11-15 Steve Falkenburg <sfalken@apple.com>
2805 * JavaScriptCore.vcproj/JavaScriptCore.make:
2807 2007-11-14 Alexey Proskuryakov <ap@webkit.org>
2811 http://bugs.webkit.org/show_bug.cgi?id=15982
2812 Improve JSString UTF-8 decoding
2814 * API/JSStringRef.cpp:
2815 (JSStringCreateWithUTF8CString): Use strict decoding, return 0 on error.
2817 * wtf/unicode/UTF8.cpp:
2818 (WTF::Unicode::convertUTF16ToUTF8):
2819 (WTF::Unicode::convertUTF8ToUTF16):
2820 * wtf/unicode/UTF8.h:
2821 Made these function names start with a lower case letter.
2823 * kjs/ustring.cpp: (KJS::UString::UTF8String): Updated for the above renaming.
2825 * bindings/c/c_utility.cpp:
2826 (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback): Renamed to highlight the difference
2827 from convertUTF8ToUTF16 in wtf/unicode.
2828 (KJS::Bindings::convertNPStringToUTF16): Updated for the above renaming.
2829 (KJS::Bindings::identifierFromNPIdentifier): Ditto.
2830 * bindings/c/c_utility.h: Made convertUTF8ToUTF16WithLatin1Fallback() a file static.
2832 2007-11-14 Sam Weinig <sam@webkit.org>
2834 Rubber-stamped by Anders.
2836 Fix the Xcode project file after it was messed up in r27402.
2838 * JavaScriptCore.xcodeproj/project.pbxproj:
2840 2007-11-14 Eric Seidel <eric@webkit.org>
2844 More PCRE style cleanup.
2846 * pcre/pcre_compile.cpp:
2849 2007-11-14 Adam Roben <aroben@apple.com>
2851 Clean up the bison conflict checking script
2855 * DerivedSources.make:
2857 2007-11-14 Eric Seidel <eric@webkit.org>
2861 Another round of PCRE cleanups: inlines
2863 SunSpider claims that this, combined with my previous PCRE cleanup were a 0.7% speedup, go figure.
2865 * pcre/pcre_compile.cpp:
2867 * pcre/pcre_exec.cpp:
2870 * pcre/pcre_internal.h:
2877 2007-11-14 Eric Seidel <eric@webkit.org>
2881 Give PCRE a (small) bath.
2882 Fix some formating and break things off into separate functions
2883 http://bugs.webkit.org/show_bug.cgi?id=15993
2885 * pcre/pcre_compile.cpp:
2886 (calculateCompiledPatternLengthAndFlags):
2887 (printCompiledRegExp):
2890 * pcre/pcre_internal.h:
2891 (compile_data::compile_data):
2893 2007-11-14 Geoffrey Garen <ggaren@apple.com>
2895 Reviewed by Eric Seidel.
2897 Cleaned up the JavaScript grammar a bit.
2899 1. Changed BlockNode to always hold a child vector (which may be empty),
2900 eliminating a few NULL-check branches in the common execution case.
2902 2. Changed the Block production to correctly report its starting and
2903 ending line numbers to the debugger. (It used to report its ending line
2904 as its starting line.) Also, removed duplicate line-reporting code
2905 inside the BlockNode constructor.
2907 3. Moved curly braces up from FunctionBody production into parent
2908 productions. (I had to move the line number reporting code, too, since
2909 it depends on the location of the curly braces.) This matches the ECMA
2910 spec more closely, and makes some future changes I plan easier.
2912 4. Fixed statementList* convenience functions to deal appropriately with
2915 SunSpider reports a small and statistically insignificant speedup.
2919 (KJS::statementListPushFIFO):
2920 (KJS::statementListGetDeclarations):
2921 (KJS::statementListInitializeDeclarationStack):
2922 (KJS::statementListInitializeVariableAccessStack):
2923 (KJS::BlockNode::BlockNode):
2924 (KJS::BlockNode::optimizeVariableAccess):
2925 (KJS::BlockNode::getDeclarations):
2926 (KJS::BlockNode::execute):
2927 (KJS::FunctionBodyNode::initializeDeclarationStacks):
2928 (KJS::FunctionBodyNode::optimizeVariableAccess):
2930 2007-11-13 Anders Carlsson <andersca@apple.com>
2932 Add RefCounted.h (And remove Shared.h)
2934 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2936 2007-11-13 Geoffrey Garen <ggaren@apple.com>
2942 2007-11-13 Geoffrey Garen <ggaren@apple.com>
2944 Reviewed by Anders Carlsson.
2946 Renamed Shared to RefCounted.
2949 * JavaScriptCore.xcodeproj/project.pbxproj:
2950 * kjs/interpreter.h:
2952 * wtf/RefCounted.h: Copied from JavaScriptCore/wtf/Shared.h.
2953 (WTF::RefCounted::RefCounted):
2954 * wtf/Shared.h: Removed.
2956 2007-11-13 Adam Roben <aroben@apple.com>
2962 * kjs/regexp.h: Added a missing #include.
2964 2007-11-13 Geoffrey Garen <ggaren@apple.com>
2966 Reviewed by Sam Weinig.
2968 Moved Shared.h into wtf so it could be used in more places. Deployed
2969 Shared in places where JSCore previously had hand-rolled ref-counting
2972 * API/JSClassRef.cpp:
2973 (OpaqueJSClass::OpaqueJSClass):
2975 * API/JSObjectRef.cpp:
2978 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2979 * JavaScriptCore.xcodeproj/project.pbxproj:
2980 * kjs/interpreter.cpp:
2981 (KJS::Interpreter::init):
2982 * kjs/interpreter.h:
2984 (KJS::RegExp::RegExp):
2986 * wtf/Shared.h: Copied from WebCore/platform/Shared.h.
2988 2007-11-13 Eric Seidel <eric@webkit.org>
2992 Add an ASSERT to getTruncatedInt32 to enforce proper usage.
2993 Best part about this patch? It doesn't break the web!
2995 * kjs/JSImmediate.h:
2996 (KJS::JSImmediate::getTruncatedInt32):
2997 (KJS::JSImmediate::toDouble):
2998 (KJS::JSImmediate::getUInt32):
3000 2007-11-13 Alexey Proskuryakov <ap@webkit.org>
3004 * bindings/c/c_utility.cpp:
3005 (KJS::Bindings::convertUTF8ToUTF16):
3007 (KJS::UString::UTF8String):
3008 * wtf/unicode/UTF8.cpp:
3009 (WTF::Unicode::ConvertUTF8ToUTF16):
3011 2007-11-13 Darin Adler <darin@apple.com>
3015 - fix http://bugs.webkit.org/show_bug.cgi?id=11231
3016 RegExp bug when handling newline characters
3017 and a number of other differences between PCRE behvior
3018 and JavaScript regular expressions:
3020 + single-digit sequences like \4 should be treated as octal
3021 character constants, unless there is a sufficient number
3022 of brackets for them to be treated as backreferences
3024 + \8 turns into the character "8", not a binary zero character
3025 followed by "8" (same for 9)
3027 + only the first 3 digits should be considered part of an
3028 octal character constant (the old behavior was to decode
3029 an arbitrarily long sequence and then mask with 0xFF)
3031 + if \x is followed by anything other than two valid hex digits,
3032 then it should simply be treated a the letter "x"; that includes
3033 not supporting the \x{41} syntax
3035 + if \u is followed by anything less than four valid hex digits,
3036 then it should simply be treated a the letter "u"
3038 + an extra "+" should be a syntax error, rather than being treated
3039 as the "possessive quantifier"
3041 + if a "]" character appears immediately after a "[" character that
3042 starts a character class, then that's an empty character class,
3043 rather than being the start of a character class that includes a
3046 + a "$" should not match a terminating newline; we could have gotten
3047 PCRE to handle this the way we wanted by passing an appropriate option
3049 Test: fast/js/regexp-no-extensions.html
3051 * pcre/pcre_compile.cpp:
3052 (check_escape): Check backreferences against bracount to catch both
3053 overflows and things that should be treated as octal. Rewrite octal
3054 loop to not go on indefinitely. Rewrite both hex loops to match and
3055 remove \x{} support.
3056 (compile_branch): Restructure loops so that we don't special-case a "]"
3057 at the beginning of a character class. Remove code that treated "+" as
3058 the possessive quantifier.
3059 (jsRegExpCompile): Change the "]" handling here too.
3061 * pcre/pcre_exec.cpp: (match): Changed CIRC to match the DOLL implementation.
3062 Changed DOLL to remove handling of "terminating newline", a Perl concept
3063 which we don't need.
3065 * tests/mozilla/expected.html: Two tests are fixed now:
3066 ecma_3/RegExp/regress-100199.js and ecma_3/RegExp/regress-188206.js.
3067 One test fails now: ecma_3/RegExp/perlstress-002.js -- our success before
3068 was due to a bug (we treated all 1-character numeric escapes as backreferences).
3069 The date tests also now both expect success -- whatever was making them fail
3070 before was probably due to the time being close to a DST shift; maybe we need
3071 to get rid of those tests.
3073 2007-11-13 Darin Adler <darin@apple.com>
3075 * kjs/JSImmediate.h: (KJS::JSImmediate::getTruncatedInt32):
3076 Remove too-strong assert that was firing constantly and preventing even basic
3077 web browsing from working in a debug build. This function is used in many
3078 cases where the immediate value is not a number; the assertion could perhaps
3079 be added back later with a bit of reorganization.
3081 2007-11-13 Alp Toker <alp@atoker.com>
3083 Build fix for breakage to non-Mac builds introduced in r27746.
3087 2007-11-13 Eric Seidel <eric@webkit.org>
3091 Clean up evaluateToBoolean functions to use inlines instead of copy/paste code
3093 * kjs/JSImmediate.h:
3095 (KJS::GreaterNode::inlineEvaluateToBoolean):
3096 (KJS::GreaterNode::evaluate):
3097 (KJS::LessEqNode::inlineEvaluateToBoolean):
3098 (KJS::LessEqNode::evaluate):
3099 (KJS::GreaterEqNode::inlineEvaluateToBoolean):
3100 (KJS::GreaterEqNode::evaluate):
3101 (KJS::InNode::evaluateToBoolean):
3102 (KJS::EqualNode::inlineEvaluateToBoolean):
3103 (KJS::EqualNode::evaluate):
3104 (KJS::NotEqualNode::inlineEvaluateToBoolean):
3105 (KJS::NotEqualNode::evaluate):
3106 (KJS::StrictEqualNode::inlineEvaluateToBoolean):
3107 (KJS::StrictEqualNode::evaluate):
3108 (KJS::NotStrictEqualNode::inlineEvaluateToBoolean):
3109 (KJS::NotStrictEqualNode::evaluate):
3112 2007-11-12 Geoffrey Garen <ggaren@apple.com>
3114 Reviewed by Sam Weinig.
3116 Fixed http://bugs.webkit.org/show_bug.cgi?id=15958
3117 base64 spends 1.1% of total time checking for special Infinity case
3119 Use a fast character test instead of calling strncmp.
3121 1.1% speedup on string-base64. SunSpider reports a .4% speedup overall;
3122 Sharks reports only .1%. Who are you going to believe? Huh?
3125 (KJS::UString::toDouble):
3127 2007-11-12 Eric Seidel <eric@webkit.org>
3131 Add evaluateToInt32 and evaluateUInt32 methods and deploy them.
3132 Fix a few missing evaluateToBoolean methods
3133 Deploy all evaluateTo* functions to more nodes to avoid slowdowns
3134 http://bugs.webkit.org/show_bug.cgi?id=15950
3136 SunSpider claims this is at least a 1.4% speedup.
3138 * kjs/JSImmediate.h:
3139 (KJS::JSImmediate::getTruncatedInt32):
3140 (KJS::JSImmediate::toDouble):
3141 (KJS::JSImmediate::getUInt32):
3143 (KJS::ExpressionNode::evaluateToNumber):
3144 (KJS::ExpressionNode::evaluateToInt32):
3145 (KJS::ExpressionNode::evaluateToUInt32):
3146 (KJS::NumberNode::evaluateToInt32):
3147 (KJS::NumberNode::evaluateToUInt32):
3148 (KJS::ImmediateNumberNode::evaluateToInt32):
3149 (KJS::ImmediateNumberNode::evaluateToUInt32):
3150 (KJS::ResolveNode::evaluate):
3151 (KJS::ResolveNode::evaluateToNumber):
3152 (KJS::ResolveNode::evaluateToBoolean):
3153 (KJS::ResolveNode::evaluateToInt32):
3154 (KJS::ResolveNode::evaluateToUInt32):
3155 (KJS::LocalVarAccessNode::evaluateToInt32):
3156 (KJS::LocalVarAccessNode::evaluateToUInt32):
3157 (KJS::BracketAccessorNode::evaluateToNumber):
3158 (KJS::BracketAccessorNode::evaluateToBoolean):
3159 (KJS::BracketAccessorNode::evaluateToInt32):
3160 (KJS::BracketAccessorNode::evaluateToUInt32):
3161 (KJS::DotAccessorNode::inlineEvaluate):
3162 (KJS::DotAccessorNode::evaluate):
3163 (KJS::DotAccessorNode::evaluateToNumber):
3164 (KJS::DotAccessorNode::evaluateToBoolean):
3165 (KJS::DotAccessorNode::evaluateToInt32):
3166 (KJS::DotAccessorNode::evaluateToUInt32):
3167 (KJS::NewExprNode::inlineEvaluate):
3168 (KJS::NewExprNode::evaluate):
3169 (KJS::NewExprNode::evaluateToNumber):
3170 (KJS::NewExprNode::evaluateToBoolean):
3171 (KJS::NewExprNode::evaluateToInt32):
3172 (KJS::NewExprNode::evaluateToUInt32):
3173 (KJS::FunctionCallResolveNode::inlineEvaluate):
3174 (KJS::FunctionCallResolveNode::evaluate):
3175 (KJS::FunctionCallResolveNode::evaluateToNumber):
3176 (KJS::FunctionCallResolveNode::evaluateToBoolean):
3177 (KJS::FunctionCallResolveNode::evaluateToInt32):
3178 (KJS::FunctionCallResolveNode::evaluateToUInt32):
3179 (KJS::LocalVarFunctionCallNode::evaluate):
3180 (KJS::LocalVarFunctionCallNode::evaluateToNumber):
3181 (KJS::LocalVarFunctionCallNode::evaluateToBoolean):
3182 (KJS::LocalVarFunctionCallNode::evaluateToInt32):
3183 (KJS::LocalVarFunctionCallNode::evaluateToUInt32):
3184 (KJS::FunctionCallDotNode::evaluate):
3185 (KJS::FunctionCallDotNode::evaluateToNumber):
3186 (KJS::FunctionCallDotNode::evaluateToBoolean):
3187 (KJS::FunctionCallDotNode::evaluateToInt32):
3188 (KJS::FunctionCallDotNode::evaluateToUInt32):
3189 (KJS::PostDecLocalVarNode::inlineEvaluateToNumber):
3190 (KJS::PostDecLocalVarNode::evaluateToNumber):
3191 (KJS::PostDecLocalVarNode::evaluateToBoolean):
3192 (KJS::PostDecLocalVarNode::evaluateToInt32):
3193 (KJS::PostDecLocalVarNode::evaluateToUInt32):
3194 (KJS::typeStringForValue):
3195 (KJS::UnaryPlusNode::evaluate):
3196 (KJS::UnaryPlusNode::evaluateToBoolean):
3197 (KJS::UnaryPlusNode::evaluateToNumber):
3198 (KJS::UnaryPlusNode::evaluateToInt32):
3199 (KJS::BitwiseNotNode::inlineEvaluateToInt32):
3200 (KJS::BitwiseNotNode::evaluate):
3201 (KJS::BitwiseNotNode::evaluateToNumber):
3202 (KJS::BitwiseNotNode::evaluateToBoolean):
3203 (KJS::BitwiseNotNode::evaluateToInt32):
3204 (KJS::MultNode::evaluateToBoolean):
3205 (KJS::MultNode::evaluateToInt32):
3206 (KJS::MultNode::evaluateToUInt32):
3207 (KJS::DivNode::evaluateToInt32):
3208 (KJS::DivNode::evaluateToUInt32):
3209 (KJS::ModNode::evaluateToBoolean):
3210 (KJS::ModNode::evaluateToInt32):
3211 (KJS::ModNode::evaluateToUInt32):
3212 (KJS::AddNode::evaluateToNumber):
3213 (KJS::AddNode::evaluateToInt32):
3214 (KJS::AddNode::evaluateToUInt32):
3215 (KJS::AddNumbersNode::evaluateToInt32):
3216 (KJS::AddNumbersNode::evaluateToUInt32):
3217 (KJS::SubNode::evaluateToInt32):
3218 (KJS::SubNode::evaluateToUInt32):
3219 (KJS::LeftShiftNode::inlineEvaluateToInt32):
3220 (KJS::LeftShiftNode::evaluate):
3221 (KJS::LeftShiftNode::evaluateToNumber):
3222 (KJS::LeftShiftNode::evaluateToInt32):
3223 (KJS::RightShiftNode::inlineEvaluateToInt32):
3224 (KJS::RightShiftNode::evaluate):
3225 (KJS::RightShiftNode::evaluateToNumber):
3226 (KJS::RightShiftNode::evaluateToInt32):
3227 (KJS::UnsignedRightShiftNode::inlineEvaluateToUInt32):
3228 (KJS::UnsignedRightShiftNode::evaluate):
3229 (KJS::UnsignedRightShiftNode::evaluateToNumber):
3230 (KJS::UnsignedRightShiftNode::evaluateToInt32):
3231 (KJS::LessNode::inlineEvaluateToBoolean):
3232 (KJS::LessNode::evaluate):
3233 (KJS::LessNode::evaluateToBoolean):
3234 (KJS::LessNumbersNode::inlineEvaluateToBoolean):
3235 (KJS::LessNumbersNode::evaluate):
3236 (KJS::LessNumbersNode::evaluateToBoolean):
3237 (KJS::LessStringsNode::inlineEvaluateToBoolean):
3238 (KJS::LessStringsNode::evaluate):
3239 (KJS::BitAndNode::evaluate):
3240 (KJS::BitAndNode::inlineEvaluateToInt32):
3241 (KJS::BitAndNode::evaluateToNumber):
3242 (KJS::BitAndNode::evaluateToBoolean):
3243 (KJS::BitAndNode::evaluateToInt32):
3244 (KJS::BitXOrNode::inlineEvaluateToInt32):
3245 (KJS::BitXOrNode::evaluate):
3246 (KJS::BitXOrNode::evaluateToNumber):
3247 (KJS::BitXOrNode::evaluateToBoolean):
3248 (KJS::BitXOrNode::evaluateToInt32):
3249 (KJS::BitOrNode::inlineEvaluateToInt32):
3250 (KJS::BitOrNode::evaluate):
3251 (KJS::BitOrNode::evaluateToNumber):
3252 (KJS::BitOrNode::evaluateToBoolean):
3253 (KJS::BitOrNode::evaluateToInt32):
3254 (KJS::ConditionalNode::evaluateToNumber):
3255 (KJS::ConditionalNode::evaluateToInt32):
3256 (KJS::ConditionalNode::evaluateToUInt32):
3257 (KJS::valueForReadModifyAssignment):
3258 (KJS::AssignExprNode::evaluate):
3259 (KJS::AssignExprNode::evaluateToBoolean):
3260 (KJS::AssignExprNode::evaluateToNumber):
3261 (KJS::AssignExprNode::evaluateToInt32):
3262 (KJS::VarDeclNode::handleSlowCase):
3264 (KJS::FunctionCallResolveNode::precedence):
3265 (KJS::AddNode::precedence):
3267 (KJS::LessNumbersNode::):
3268 (KJS::LessStringsNode::):
3270 (KJS::JSValue::toInt32SlowCase):
3271 (KJS::JSValue::toUInt32SlowCase):
3273 (KJS::JSValue::asCell):
3274 (KJS::JSValue::toInt32):
3275 (KJS::JSValue::toUInt32):
3277 2007-11-12 Alexey Proskuryakov <ap@webkit.org>
3281 http://bugs.webkit.org/show_bug.cgi?id=15953
3282 Add UTF-8 encoding/decoding to WTF
3284 * kjs/ustring.h: Moved UTF8SequenceLength() and decodeUTF8Sequence() to wtf/unicode.
3285 * kjs/ustring.cpp: (KJS::UString::UTF8String): Changed this function to take a strict/lenient
3286 parameter. Callers are not interested in getting decoding results in strict mode, so
3287 this allows for bailing out as soon as an error is seen.
3290 (KJS::encode): Updated for new UString::UTF8String() signature.
3292 * API/JSStringRef.cpp:
3293 (JSStringCreateWithCharacters): Disambiguate UChar.
3294 (JSStringCreateWithUTF8CString): Actually use UTF-8 when creating the string!
3295 * bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16): Use ConvertUTF8ToUTF16().
3297 * wtf/unicode/UTF8.cpp: Added.
3298 (WTF::Unicode::inlineUTF8SequenceLengthNonASCII):
3299 (WTF::Unicode::inlineUTF8SequenceLength):
3300 (WTF::Unicode::UTF8SequenceLength):
3301 (WTF::Unicode::decodeUTF8Sequence):
3303 (WTF::Unicode::ConvertUTF16ToUTF8):
3304 (WTF::Unicode::isLegalUTF8):
3305 (WTF::Unicode::ConvertUTF8ToUTF16):
3306 * wtf/unicode/UTF8.h: Added.
3308 Some code moved from ustring.h, some adapted from unicode.org sources.
3310 * JavaScriptCore.exp:
3311 * JavaScriptCore.pri:
3312 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3313 * JavaScriptCore.xcodeproj/project.pbxproj:
3314 * JavaScriptCoreSources.bkl:
3317 2007-11-12 Josh Aas <joshmoz@gmail.com>
3321 - http://bugs.webkit.org/show_bug.cgi?id=15946
3322 add NPPValue NPPVpluginDrawingModel (Mozilla bug 403418 compat)
3326 2007-11-12 Darin Adler <darin@apple.com>
3330 - http://bugs.webkit.org/show_bug.cgi?id=15951
3331 REGRESSION: assertion failure in regexp match() when running JS tests
3333 Test: fast/js/regexp-many-brackets.html
3335 * pcre/pcre_exec.cpp: (match): Added back accidentally-removed case for
3336 the BRANUMBER opcode.
3338 2007-11-12 Darin Adler <darin@apple.com>
3342 - fix use of prefix and config.h, got rid of a few unneeded things in
3343 the PCRE code; no behavior changes
3345 * API/JSBase.cpp: Added include of config.h.
3346 * API/JSCallbackConstructor.cpp: Ditto.
3347 * API/JSCallbackFunction.cpp: Ditto.
3348 * API/JSCallbackObject.cpp: Ditto.
3349 * API/JSClassRef.cpp: Ditto.
3350 * API/JSContextRef.cpp: Ditto.
3351 * API/JSObjectRef.cpp: Ditto.
3352 * API/JSStringRef.cpp: Ditto.
3353 * API/JSValueRef.cpp: Ditto.
3355 * JavaScriptCorePrefix.h: Removed obsolete <ctype.h> workaround.
3356 Moved new/delete macros after includes, as they are in WebCore's prefix.
3359 * pcre/dftables.cpp: (main): Changed back to not use a separate maketables
3360 function. This is needed for PCRE, but not helpful for our use. Also changed
3361 the tables to all be 128 entries long instead of 256, since only the first
3364 * pcre/pcre_compile.cpp: Added include of config.h. Eliminated digitab,
3365 which was only being used to check hex digits. Changed all uses of TRUE and
3366 FALSE to use the C++ true and false instead.
3367 (check_escape): Just the TRUE/FALSE thing.
3368 (is_counted_repeat): Ditto.
3369 (could_be_empty_branch): Ditto.
3370 (get_othercase_range): Ditto.
3371 (compile_branch): Ditto.
3372 (compile_regex): Ditto.
3373 (is_anchored): Ditto.
3374 (is_startline): Ditto.
3375 (find_firstassertedchar): Ditto.
3376 (jsRegExpCompile): Ditto.
3378 * pcre/pcre_exec.cpp: Added include of config.h. Changed all uses of TRUE and
3379 FALSE to use the C++ true and false instead.
3380 (match_ref): Just the TRUE/FALSE thing.
3381 (match): Ditto. Removed some unneeded braces.
3382 (jsRegExpExecute): Just the TRUE/FALSE thing.
3384 * pcre/pcre_internal.h: Moved the constants needed by dftables.cpp to the top
3385 of the file instead of the bottom, so they can be used. Also changed the table
3386 sizes to 128 instead of 256. Removed macro definitions of FALSE and TRUE.
3387 Set array sizes for all the const arrays. Changed _pcre_utf8_table1_size to
3388 be a macro instead of a extern int.
3390 * pcre/pcre_maketables.cpp: Removed. It's all in dftables.cpp now.
3392 * pcre/pcre_tables.cpp: Made table sizes explicit.
3394 * pcre/pcre_xclass.cpp: Just the TRUE/FALSE thing.
3396 2007-11-12 Adam Roben <aroben@apple.com>
3400 * wtf/FastMalloc.h: Add missing using statement.
3402 2007-11-11 Oliver Hunt <oliver@apple.com>
3406 Add special fastZeroedMalloc function to replace a
3407 number of fastCalloc calls where one argument was 1.
3409 This results in a 0.4% progression in SunSpider, more
3410 than making up for the earlier regression caused by
3411 additional overflow checks.
3413 * JavaScriptCore.exp:
3414 * kjs/array_instance.cpp:
3415 * kjs/property_map.cpp:
3416 * wtf/FastMalloc.cpp:
3420 2007-11-11 Adam Roben <aroben@apple.com>
3422 Fix <rdar://5578982> ASSERT in HashTable::checkTableConsistencyExceptSize beneath WebNotificationCenter
3424 The bug was due to a mismatch between HashMap::remove and
3425 HashTable::checkTableConsistency. HashMap::remove can delete the value
3426 stored in the HashTable (by derefing it), which is not normally
3427 allowed by HashTable. It's OK in this case because the value is about
3428 to be removed from the table, but HashTable wasn't aware of this.
3430 HashMap::remove now performs the consistency check itself before
3433 Darin noticed that the same bug would occur in HashSet, so I've fixed
3439 (WTF::HashMap::remove): Perform the HashTable consistency check
3440 manually before calling deref.
3442 (WTF::HashSet::remove): Ditto.
3443 * wtf/HashTable.h: Made checkTableConsistency public so that HashMap
3444 and HashSet can call it.
3445 (WTF::HashTable::removeAndInvalidateWithoutEntryConsistencyCheck):
3447 (WTF::HashTable::removeAndInvalidate): Added.
3448 (WTF::HashTable::remove):
3449 (WTF::HashTable::removeWithoutEntryConsistencyCheck): Added.
3451 2007-11-11 Mark Rowe <mrowe@apple.com>
3453 Build fix. Use the correct filename case.
3457 2007-11-11 Geoffrey Garen <ggaren@apple.com>
3459 Reviewed by Sam Weinig.
3461 Fixed http://bugs.webkit.org/show_bug.cgi?id=15902
3462 15% of string-validate-input.js is spent compiling the same regular expression
3464 Store a compiled representation of the regular expression in the AST.
3466 Only a .2% SunSpider speedup overall, but a 10.6% speedup on
3467 string-validate-input.js.
3470 (KJS::RegExpNode::evaluate):
3472 (KJS::RegExpNode::):
3473 * kjs/nodes2string.cpp:
3474 (KJS::RegExpNode::streamTo):
3476 (KJS::RegExp::flags):
3478 (KJS::RegExp::pattern):
3479 * kjs/regexp_object.cpp:
3480 (KJS::RegExpObjectImp::construct):
3481 (KJS::RegExpObjectImp::createRegExpImp):
3482 * kjs/regexp_object.h:
3484 2007-11-11 Oliver Hunt <oliver@apple.com>
3488 Partial fix for <rdar://problem/5585334> numfuzz: integer overflows opening malformed SVG file in WebCore::ImageBuffer::create
3490 Unfortunately this is a very slight regression, but is unavoidable.
3492 * wtf/FastMalloc.cpp:
3494 2007-11-10 Eric Seidel <eric@webkit.org>
3498 Add simple type inferencing to the parser, and create custom
3499 AddNode and LessNode subclasses based on inferred types.
3500 http://bugs.webkit.org/show_bug.cgi?id=15884
3502 SunSpider claims this is at least a 0.5% speedup.
3504 * JavaScriptCore.exp:
3507 (KJS::NumberImp::getPrimitiveNumber):
3508 (KJS::GetterSetterImp::getPrimitiveNumber):
3514 (KJS::StringNode::evaluate):
3515 (KJS::StringNode::evaluateToNumber):
3516 (KJS::StringNode::evaluateToBoolean):
3517 (KJS::RegExpNode::evaluate):
3518 (KJS::UnaryPlusNode::optimizeVariableAccess):
3519 (KJS::AddNode::evaluate):
3520 (KJS::AddNode::evaluateToNumber):
3521 (KJS::AddNumbersNode::inlineEvaluateToNumber):
3522 (KJS::AddNumbersNode::evaluate):
3523 (KJS::AddNumbersNode::evaluateToNumber):
3524 (KJS::AddStringsNode::evaluate):
3525 (KJS::AddStringLeftNode::evaluate):
3526 (KJS::AddStringRightNode::evaluate):
3529 (KJS::LessNumbersNode::evaluate):
3530 (KJS::LessStringsNode::evaluate):
3532 (KJS::ExpressionNode::):
3533 (KJS::RegExpNode::):
3534 (KJS::RegExpNode::precedence):
3535 (KJS::TypeOfResolveNode::):
3536 (KJS::LocalVarTypeOfNode::):
3537 (KJS::UnaryPlusNode::):
3538 (KJS::UnaryPlusNode::precedence):
3540 (KJS::AddNode::precedence):
3541 (KJS::AddNumbersNode::):
3542 (KJS::AddStringLeftNode::):
3543 (KJS::AddStringRightNode::):
3544 (KJS::AddStringsNode::):
3546 (KJS::LessNode::precedence):
3547 (KJS::LessNumbersNode::):
3548 (KJS::LessStringsNode::):
3549 * kjs/nodes2string.cpp:
3550 (KJS::StringNode::streamTo):
3554 (KJS::JSValue::getPrimitiveNumber):
3556 2007-11-11 Darin Adler <darin@apple.com>
3558 - try another way of fixing dftables builds -- refactor pcre_internal.h a bit
3560 * pcre/pcre_internal.h: Make most of this header do nothing when DFTABLES is set.
3561 Later we can break it into two files.
3563 * JavaScriptCore.vcproj/dftables/dftables.vcproj: Take out now-unneeded include paths.
3564 * pcre/dftables.cpp: Set DFTABLES. Use delete instead of free.
3565 * pcre/dftables.pro: Take out now-unneeded include paths.
3566 * pcre/pcre_maketables.cpp: Use new instead of malloc.
3568 2007-11-11 Darin Adler <darin@apple.com>
3570 * pcre/dftables.pro: Try fixing Qt builds (I looked at qt-win) by adding
3571 another include path.
3573 2007-11-11 Darin Adler <darin@apple.com>
3575 * JavaScriptCore.xcodeproj/project.pbxproj: Try fixing Mac Tiger builds
3576 by adding another include path.
3578 2007-11-11 Darin Adler <darin@apple.com>
3582 - http://bugs.webkit.org/show_bug.cgi?id=15924
3583 next round of changes to JSRegExp (formerly PCRE)
3585 This is a combination of converting to C++, tweaking the API, and adding
3586 some additional optimizations.
3588 Future steps will involve getting rid of the use of UTF-8 completely
3589 (we'll use UTF-16 exclusively instead), eliminating more source files,
3590 and some more speed-ups.
3592 SunSpider says the current round is an 0.9% speed-up overall, and a
3593 5.3% speed-up for regexp.
3595 * JavaScriptCore.exp: Updated for new entry points.
3597 * JavaScriptCore.pri:
3598 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3599 * JavaScriptCore.vcproj/dftables/dftables.vcproj:
3600 * JavaScriptCore.xcodeproj/project.pbxproj:
3601 * JavaScriptCoreSources.bkl:
3603 Updated for new source file names and ForwardingHeaders.
3606 (KJS::RegExp::RegExp): Changed to use the error message without calling
3607 strdup on it and to pass the new types and options.
3608 (KJS::RegExp::~RegExp): Removed the now-unneeded free of the error message.
3609 (KJS::RegExp::match): Pass the new types and options.
3610 * kjs/regexp.h: Update type of m_constructionError.
3612 * pcre/AUTHORS: Update to reflect the status of the project -- we don't include
3613 the Google parts, and this isn't the PCRE library, per se.
3614 * pcre/COPYING: Ditto.
3616 * pcre/dftables.cpp: Copied from JavaScriptCore/pcre/dftables.c.
3617 (main): Removed unneeded ctype_digit.
3619 * pcre/pcre.h: Convert to C++, tweak API a bit. Use UChar instead of JSRegExpChar.
3621 * pcre/pcre_compile.cpp: Copied from JavaScriptCore/pcre/pcre_compile.c.
3622 Moved a lot of private stuff used only within this file here from pcre_internal.h.
3623 Renumbered the error codes.
3624 (error_text): Use a single string with embedded nulls for the error text (I got
3625 this idea from newer versions of PCRE).
3626 (check_escape): Changed return type to be enum instead of int. Replaced ctype_digit
3627 uses with isASCIIDigit.
3628 (is_counted_repeat): Ditto.
3629 (read_repeat_counts): Ditto.
3630 (first_significant_code): Ditto.
3631 (find_fixedlength): Ditto.
3632 (could_be_empty_branch): Ditto.
3633 (compile_branch): Ditto. Also removed some code that handles changing options.
3634 JavaScript doesn't have any of the features that allow options to change.
3635 (compile_regex): Updated for change to options parameter.
3636 (is_anchored): Ditto.
3637 (find_firstassertedchar): Ditto.
3638 (jsRegExpCompile): Changed to take separate flags instead of an options int.
3639 Also changed to call new/delete instead of pcre_malloc/free.
3640 (jsRegExpFree): Ditto.
3642 * pcre/pcre_exec.cpp: Copied from JavaScriptCore/pcre/pcre_exec.c.
3643 Added a case that uses computed goto for the opcode loop, but did not turn it on.
3644 Changed the RMATCH macro to handle returns more efficiently by putting the where
3645 pointer in the new frame instead of the old one, allowing us to branch to the
3646 return with a single statement. Switched to new/delete from pcre_malloc/free.
3647 Changed many RRETURN callers to not set the return value since it's already
3648 set correctly. Replaced the rrc variable with an is_match variable. Values other
3649 than "match" and "no match" are now handled differently. This allows us to remove
3650 the code to check for those cases in various rules.
3651 (match): All the case statements use a macro BEGIN_OPCODE instead. And all the
3652 continue statements, or break statements that break out of the outer case use
3653 a macro NEXT_OPCODE instead. Replaced a few if statements with assertions.
3654 (jsRegExpExecute): Use new/delete instead of pcre_malloc/free. Removed unused
3655 start_match field from the match block.
3657 * pcre/pcre_internal.h: Moved the last few configuration macros from pcre-config.h
3658 in here. Removed various unused types. Converted from JSRegExpChar to UChar.
3659 Eliminated pcre_malloc/free. Replaced the opcode enum with a macro that can be
3660 used in multiple places. Unfortunately we lose the comments for each opcode; we
3661 should find a place to put those back. Removed ctype_digit.
3663 * pcre/pcre_maketables.cpp: Copied from JavaScriptCore/pcre/pcre_maketables.c.
3664 (pcre_maketables): Got rid of the conditional code that allows this to be compiled
3665 in -- it's only used for dftables now (and soon may be obsolete entirely).
3666 Changed code for cbit_digit to not use isdigit, and took the "_" case out of the
3667 loop. Removed ctype_digit.
3669 * pcre/pcre_ord2utf8.cpp: Copied from JavaScriptCore/pcre/pcre_ord2utf8.c.
3671 * pcre/pcre_tables.cpp: Copied from JavaScriptCore/pcre/pcre_tables.c.
3672 Moved _pcre_OP_lengths out of here into pcre_exec.cpp.
3674 * pcre/pcre_ucp_searchfuncs.cpp: Copied from JavaScriptCore/pcre/pcre_ucp_searchfuncs.c.
3675 Updated for other file name changes.
3677 * pcre/pcre_xclass.cpp: Copied from JavaScriptCore/pcre/pcre_xclass.c.
3679 * pcre/ucpinternal.h: Updated header.
3681 * pcre/ucptable.cpp: Copied from JavaScriptCore/pcre/ucptable.c.
3683 * wtf/ASCIICType.h: (WTF::isASCIIDigit): Removed a branch by changing from && to
3684 & for this operation. Also added an overload that takes an int because that's
3685 useful for PCRE. Later we could optimize for int and overload other functions in
3686 this file; stuck to this simple one for now.
3688 * wtf/unicode/icu/UnicodeIcu.h: Removed unused isUpper.
3689 * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
3691 * pcre/LICENCE: Removed.
3692 * pcre/pcre-config.h: Removed.
3693 * wtf/FastMallocPCRE.cpp: Removed.
3695 * pcre/dftables.c: Renamed to cpp.
3696 * pcre/pcre_compile.c: Ditto.
3697 * pcre/pcre_exec.c: Ditto.
3698 * pcre/pcre_maketables.c: Ditto.
3699 * pcre/pcre_ord2utf8.c: Ditto.
3700 * pcre/pcre_tables.c: Ditto.
3701 * pcre/pcre_ucp_searchfuncs.c: Ditto.
3702 * pcre/pcre_xclass.c: Ditto.
3703 * pcre/ucptable.c: Ditto.
3705 2007-11-11 Eric Seidel <eric@webkit.org>
3709 Add KJS_CHECKEXCEPTIONBOOLEAN to match rest of nodes.cpp
3712 (KJS::ExpressionNode::evaluateToBoolean):
3713 (KJS::LessNode::evaluateToBoolean):
3714 (KJS::GreaterNode::evaluateToBoolean):
3715 (KJS::LessEqNode::evaluateToBoolean):
3716 (KJS::GreaterEqNode::evaluateToBoolean):
3717 (KJS::InstanceOfNode::evaluateToBoolean):
3718 (KJS::InNode::evaluateToBoolean):
3719 (KJS::EqualNode::evaluateToBoolean):
3720 (KJS::NotEqualNode::evaluateToBoolean):
3721 (KJS::StrictEqualNode::evaluateToBoolean):
3722 (KJS::NotStrictEqualNode::evaluateToBoolean):
3723 (KJS::LogicalAndNode::evaluateToBoolean):
3724 (KJS::LogicalOrNode::evaluateToBoolean):
3725 (KJS::ConditionalNode::evaluateToBoolean):
3727 2007-11-10 Darin Adler <darin@apple.com>
3731 - fix http://bugs.webkit.org/show_bug.cgi?id=15927
3732 REGRESSION(r27487): delete a.c followed by __defineGetter__("c", ...) incorrectly deletes another property
3733 and <rdar://problem/5586384> REGRESSION (r27487): Can't switch out of Edit HTML Source mode on Leopard Wiki
3735 Test: fast/js/delete-then-put.html
3737 * kjs/property_map.cpp:
3738 (KJS::PropertyMap::put): Added a missing "- 1"; code to find an empty slot was not working.
3739 (KJS::PropertyMap::checkConsistency): Added a missing range check that would have caught this
3742 - roll out a last-minute change to my evaluateToBoolean patch that was incorrect.
3744 * kjs/nodes.h: (KJS::ExprStatementNode::ExprStatementNode): Take out call to
3745 optimizeForUnnecessaryResult, since the result is used in some cases.
3747 2007-11-10 Adam Roben <aroben@apple.com>
3751 Roll out some changes that were (seemingly accidentally) checked in
3754 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3756 2007-11-10 Darin Adler <darin@apple.com>
3760 - http://bugs.webkit.org/show_bug.cgi?id=15915
3761 add an evaluation path for booleans like the one we have for numbers
3763 Gives 1.1% on SunSpider.
3765 * kjs/grammar.y: Create TrueNode and FalseNode instead of BooleanNode.
3767 * kjs/nodes.h: Changed to use Noncopyable. Moved optimizeForUnnecessaryResult
3768 down from Node to ExpressionNode. Changed some classes to not inherit from
3769 ExpressionNode where not necessary, and removed unnneeded evaluate functions
3770 as well as evaluate functions that need not be virtual. Call the
3771 optimizeForUnnecessaryResult function on the start of a for loop too.
3773 (KJS::ExpressionNode::evaluateToBoolean): Added.
3774 (KJS::FalseNode::evaluate): Added.
3775 (KJS::TrueNode::evaluate): Added.
3776 (KJS::NumberNode::evaluateToBoolean): Added.
3777 (KJS::StringNode::evaluateToBoolean): Added.
3778 (KJS::LocalVarAccessNode::evaluateToBoolean): Added.
3779 (KJS::BracketAccessorNode::evaluateToBoolean): Added.
3780 (KJS::LogicalNotNode::evaluate): Changed to call evaluateToBoolean.
3781 (KJS::LogicalNotNode::evaluateToBoolean): Added.
3782 (KJS::lessThan): Changed to return bool.
3783 (KJS::lessThanEq): Ditto.
3784 (KJS::LessNode::evaluate): Changed since lessThan returns bool.
3785 (KJS::LessNode::evaluateToBoolean): Added.
3786 (KJS::GreaterNode::evaluate): Changed since lessThanEq returns bool.
3787 (KJS::GreaterNode::evaluateToBoolean): Added.
3788 (KJS::LessEqNode::evaluate): Changed since lessThanEq returns bool.
3789 (KJS::LessEqNode::evaluateToBoolean): Added.
3790 (KJS::GreaterEqNode::evaluate): Changed since lessThan returns bool.
3791 (KJS::GreaterEqNode::evaluateToBoolean): Added.
3792 (KJS::InstanceOfNode::evaluateToBoolean): Added.
3793 (KJS::InNode::evaluateToBoolean): Added.
3794 (KJS::EqualNode::evaluateToBoolean): Added.
3795 (KJS::NotEqualNode::evaluateToBoolean): Added.
3796 (KJS::StrictEqualNode::evaluateToBoolean): Added.
3797 (KJS::NotStrictEqualNode::evaluateToBoolean): Added.
3798 (KJS::ConditionalNode::evaluate): Changed to call evaluateToBoolean.
3799 (KJS::IfNode::execute): Ditto.
3800 (KJS::DoWhileNode::execute): Ditto.
3801 (KJS::WhileNode::execute): Ditto.
3802 (KJS::ForNode::execute): Ditto.
3804 * kjs/nodes2string.cpp:
3805 (KJS::FalseNode::streamTo): Added.
3806 (KJS::TrueNode::streamTo): Added.
3808 2007-11-09 Adam Roben <aroben@apple.com>
3815 (KJS::jsNumber): Add some explicit casts.
3817 2007-11-08 Darin Adler <darin@apple.com>
3823 * kjs/property_map.cpp:
3825 2007-11-08 Darin Adler <darin@apple.com>
3827 - roll out accidentally-checked in changes
3829 * kjs/nodes.cpp: Back to previous version.
3830 * kjs/nodes.h: Ditto.
3831 * kjs/grammar.y: Ditto.
3833 2007-11-08 Darin Adler <darin@apple.com>
3837 - http://bugs.webkit.org/show_bug.cgi?id=15912
3838 fasta spends a lot of time in qsort
3840 * kjs/property_map.cpp:
3841 (KJS::PropertyMap::getEnumerablePropertyNames):
3842 Use insertion sort instead of qsort for small sets of property names.
3843 We can probably do some even-better speedups of for/in, but this nets
3844 0.6% overall and 6.7% on fasta.
3846 2007-11-08 Darin Adler <darin@apple.com>
3850 - http://bugs.webkit.org/show_bug.cgi?id=15906
3851 getting characters by indexing into a string is very slow
3853 This fixes one source of the slowness -- the conversion to an unused
3854 Identifier as we call the get function from the slot -- but doesn't
3855 fix others, such as the fact that we have to allocate a new UString::Rep
3856 for every single character.
3858 Speeds up string-base64 30%, and at least 0.5% overall.
3859 But does slow down access-fannkuch quite a bit. Might be worth
3860 revisiting in the future to see what we can do about that (although
3861 I did look at a profile for a while).
3863 * kjs/property_slot.h: Add a new marker for "numeric" property slots;
3864 slots where we don't need to pass the identifier to the get function.
3865 (KJS::PropertySlot::getValue): Added code to call the numeric get function.
3866 (KJS::PropertySlot::setCustomNumeric): Added.
3867 * kjs/string_object.cpp:
3868 (KJS::StringInstance::indexGetter): Changed to use substr() instead
3869 of constructing a wholly new UString each time.
3870 (KJS::stringInstanceNumericPropertyGetter): Added. Like indexGetter, but
3871 takes advantage of setCustomNumeric to avoid creating an Identifier.
3872 (KJS::StringInstance::getOwnPropertySlot): Changed to use setCustomNumeric.
3874 2007-11-08 Darin Adler <darin@apple.com>
3878 - http://bugs.webkit.org/show_bug.cgi?id=15904
3879 more speed-ups possible by tightening up int version of JSImmediate
3881 1% improvement of SunSpider
3883 * kjs/JSImmediate.h: Eliminate the now-unneeded FPBitValues struct template.
3884 (KJS::JSImmediate::from): Overload for most numeric types; many types can
3885 do fewer branches and checks.
3886 (KJS::JSImmediate::getUInt32): Removed unneeded check for undefined.
3887 (KJS::JSImmediate::getTruncatedInt32): Ditto.
3888 (KJS::JSImmediate::getTruncatedUInt32): Ditto. There's no difference any more
3889 between getUInt32 and getTruncatedUInt32, so that's worth a rename and merge later.
3891 * kjs/grammar.y: Update since fromDouble is now just from.
3892 * kjs/nodes.h: Ditto.
3894 * kjs/value.h: (KJS::jsNumber): Overload for most numeric types.
3896 2007-11-08 Kevin Ollivier <kevino@theolliviers.com>
3898 Bakefiles for building JavaScriptCore, needed by wx port.
3900 Reviewed by Mark Rowe.
3902 * JavaScriptCoreSources.bkl: Added.
3903 * jscore.bkl: Added.
3905 2007-11-08 Oliver Hunt <oliver@apple.com>
3909 Fix regression caused by earlier bitwise and optimisation. 1 & undefined != 1.
3911 The implementation of JSImmediate::areBothImmediateNumbers relies on
3912 (JSImmediate::getTag(immediate1) & JSImmediate::getTag(immediate2)) having
3913 a unique result when both immediate values are numbers.
3915 The regression was due to UndefinedType & NumberType returning NumberType (3 & 1).
3916 By swapping the value of NumberType and UndefinedType this ceases to be a problem.
3921 2007-11-08 Darin Adler <darin@apple.com>
3925 * kjs/nodes.h: Add missing parameter name.
3927 2007-11-08 Eric Seidel <eric@webkit.org>
3931 Add ExpressionNode subclass of Node, use it.
3935 (KJS::ForInNode::ForInNode):
3937 (KJS::ExpressionNode::):
3939 (KJS::NullNode::precedence):
3940 (KJS::BooleanNode::):
3941 (KJS::BooleanNode::precedence):
3942 (KJS::RegExpNode::):
3943 (KJS::RegExpNode::precedence):
3945 (KJS::ThisNode::precedence):
3946 (KJS::ResolveNode::):
3947 (KJS::ElementNode::):
3949 (KJS::PropertyNode::):
3950 (KJS::PropertyNode::precedence):
3951 (KJS::PropertyNode::name):
3952 (KJS::PropertyListNode::):
3953 (KJS::ObjectLiteralNode::):
3954 (KJS::ObjectLiteralNode::precedence):
3955 (KJS::BracketAccessorNode::):
3956 (KJS::DotAccessorNode::):
3957 (KJS::DotAccessorNode::precedence):
3958 (KJS::ArgumentListNode::):
3959 (KJS::ArgumentsNode::):
3960 (KJS::NewExprNode::):
3961 (KJS::NewExprNode::precedence):
3962 (KJS::FunctionCallValueNode::):
3963 (KJS::FunctionCallValueNode::precedence):
3964 (KJS::FunctionCallResolveNode::):
3965 (KJS::FunctionCallBracketNode::):
3966 (KJS::FunctionCallBracketNode::precedence):
3967 (KJS::FunctionCallDotNode::):
3968 (KJS::FunctionCallDotNode::precedence):
3969 (KJS::PrePostResolveNode::):
3970 (KJS::PostfixBracketNode::):
3971 (KJS::PostfixBracketNode::precedence):
3972 (KJS::PostIncBracketNode::):
3973 (KJS::PostIncBracketNode::isIncrement):
3974 (KJS::PostDecBracketNode::):
3975 (KJS::PostDecBracketNode::isIncrement):
3976 (KJS::PostfixDotNode::):
3977 (KJS::PostfixDotNode::precedence):
3978 (KJS::PostIncDotNode::):
3979 (KJS::PostIncDotNode::isIncrement):
3980 (KJS::PostDecDotNode::):
3981 (KJS::PostDecDotNode::isIncrement):
3982 (KJS::PostfixErrorNode::):
3983 (KJS::PostfixErrorNode::precedence):
3984 (KJS::DeleteResolveNode::):
3985 (KJS::DeleteBracketNode::):
3986 (KJS::DeleteBracketNode::precedence):
3987 (KJS::DeleteDotNode::):
3988 (KJS::DeleteDotNode::precedence):
3989 (KJS::DeleteValueNode::):
3990 (KJS::DeleteValueNode::precedence):
3992 (KJS::VoidNode::precedence):
3993 (KJS::TypeOfResolveNode::):
3994 (KJS::TypeOfValueNode::):
3995 (KJS::PrefixBracketNode::):
3996 (KJS::PrefixBracketNode::precedence):
3997 (KJS::PreIncBracketNode::):
3998 (KJS::PreIncBracketNode::isIncrement):
3999 (KJS::PreDecBracketNode::):
4000 (KJS::PreDecBracketNode::isIncrement):
4001 (KJS::PrefixDotNode::):
4002 (KJS::PrefixDotNode::precedence):
4003 (KJS::PreIncDotNode::):
4004 (KJS::PreIncDotNode::isIncrement):
4005 (KJS::PreDecDotNode::):
4006 (KJS::PreDecDotNode::isIncrement):
4007 (KJS::PrefixErrorNode::):
4008 (KJS::PrefixErrorNode::precedence):
4009 (KJS::UnaryPlusNode::):
4010 (KJS::UnaryPlusNode::precedence):
4011 (KJS::NegateNode::):
4012 (KJS::NegateNode::precedence):
4013 (KJS::BitwiseNotNode::):
4014 (KJS::BitwiseNotNode::precedence):
4015 (KJS::LogicalNotNode::):
4016 (KJS::LogicalNotNode::precedence):
4018 (KJS::AddNode::precedence):
4019 (KJS::LeftShiftNode::):
4020 (KJS::LeftShiftNode::precedence):
4021 (KJS::RightShiftNode::):
4022 (KJS::RightShiftNode::precedence):
4023 (KJS::UnsignedRightShiftNode::):
4024 (KJS::UnsignedRightShiftNode::precedence):
4026 (KJS::LessNode::precedence):
4027 (KJS::GreaterNode::):
4028 (KJS::GreaterNode::precedence):
4029 (KJS::LessEqNode::):
4030 (KJS::LessEqNode::precedence):
4031 (KJS::GreaterEqNode::):
4032 (KJS::GreaterEqNode::precedence):
4033 (KJS::InstanceOfNode::):
4034 (KJS::InstanceOfNode::precedence):
4036 (KJS::InNode::precedence):
4038 (KJS::EqualNode::precedence):
4039 (KJS::NotEqualNode::):
4040 (KJS::NotEqualNode::precedence):
4041 (KJS::StrictEqualNode::):
4042 (KJS::StrictEqualNode::precedence):
4043 (KJS::NotStrictEqualNode::):
4044 (KJS::NotStrictEqualNode::precedence):
4045 (KJS::BitAndNode::):
4046 (KJS::BitAndNode::precedence):
4048 (KJS::BitOrNode::precedence):
4049 (KJS::BitXOrNode::):
4050 (KJS::BitXOrNode::precedence):
4051 (KJS::LogicalAndNode::):
4052 (KJS::LogicalAndNode::precedence):
4053 (KJS::LogicalOrNode::):
4054 (KJS::LogicalOrNode::precedence):
4055 (KJS::ConditionalNode::):
4056 (KJS::ConditionalNode::precedence):
4057 (KJS::ReadModifyResolveNode::):
4058 (KJS::ReadModifyResolveNode::precedence):
4059 (KJS::AssignResolveNode::):
4060 (KJS::AssignResolveNode::precedence):
4061 (KJS::ReadModifyBracketNode::):
4062 (KJS::ReadModifyBracketNode::precedence):
4063 (KJS::AssignBracketNode::):
4064 (KJS::AssignBracketNode::precedence):
4065 (KJS::AssignDotNode::):
4066 (KJS::AssignDotNode::precedence):
4067 (KJS::ReadModifyDotNode::):
4068 (KJS::ReadModifyDotNode::precedence):
4069 (KJS::AssignErrorNode::):
4070 (KJS::AssignErrorNode::precedence):
4072 (KJS::CommaNode::precedence):
4073 (KJS::AssignExprNode::):
4074 (KJS::AssignExprNode::precedence):
4075 (KJS::ExprStatementNode::):
4077 (KJS::DoWhileNode::):
4079 (KJS::ReturnNode::):
4082 (KJS::ParameterNode::):
4083 (KJS::CaseClauseNode::):
4084 (KJS::CaseClauseNode::precedence):
4085 (KJS::ClauseListNode::):
4086 (KJS::SwitchNode::):
4088 2007-11-08 Oliver Hunt <oliver@apple.com>
4092 Add a fast path for bitwise-and of two immediate numbers for a 0.7% improvement in SunSpider (4% bitop improvement).
4094 This only improves bitwise-and performance, as the additional logic required
4095 for similar code paths on or, xor, and shifting requires additional operations
4096 and branches that negate (and in certain cases, regress) any advantage we might
4099 This improves performance on all bitop tests, the cryptography tests, as well as
4100 the string-base64 and string-unpack-code tests. No significant degradation on
4103 * kjs/JSImmediate.h:
4104 (KJS::JSImmediate::areBothImmediateNumbers):
4105 (KJS::JSImmediate::andImmediateNumbers):
4107 (KJS::BitAndNode::evaluate):
4109 (KJS::jsNumberFromAnd):
4111 2007-11-08 Adam Roben <aroben@apple.com>
4113 Stop using KJS inside of MathExtras.h
4117 * wtf/MathExtras.h: Removed an unused header, and a now-unused
4118 forward-declaration.
4119 (wtf_atan2): Use std::numeric_limits intead of KJS.
4121 2007-11-08 Sam Weinig <sam@webkit.org>
4125 * kjs/date_object.cpp:
4126 (KJS::DateProtoFuncToLocaleString::callAsFunction): Fix unused arg warning.
4127 (KJS::DateProtoFuncToLocaleDateString::callAsFunction): ditto
4128 (KJS::DateProtoFuncToLocaleTimeString::callAsFunction): ditto
4130 2007-11-08 Mark Rowe <mrowe@apple.com>
4134 * kjs/lookup.h: Add missing include.
4136 2007-11-08 Sam Weinig <sam@webkit.org>
4140 Convert JavaScript internal function objects to use one class per
4141 function. This avoids a switch statement inside what used to be
4142 the shared function classes and will allow Shark to better analyze
4145 To make this switch, the value property of the HashEntry was changed
4146 to a union of an intptr_t (which is used to continue handle valueGetters)
4147 and function pointer which points to a static constructor for the
4148 individual new function objects.
4150 SunSpider claims this is a 1.0% speedup.
4152 * kjs/array_object.cpp:
4153 (KJS::ArrayPrototype::getOwnPropertySlot):
4155 (KJS::ArrayProtoFuncToString::callAsFunction):
4156 (KJS::ArrayProtoFuncToLocaleString::callAsFunction):
4157 (KJS::ArrayProtoFuncJoin::callAsFunction):
4158 (KJS::ArrayProtoFuncConcat::callAsFunction):
4159 (KJS::ArrayProtoFuncPop::callAsFunction):
4160 (KJS::ArrayProtoFuncPush::callAsFunction):
4161 (KJS::ArrayProtoFuncReverse::callAsFunction):
4162 (KJS::ArrayProtoFuncShift::callAsFunction):
4163 (KJS::ArrayProtoFuncSlice::callAsFunction):
4164 (KJS::ArrayProtoFuncSort::callAsFunction):
4165 (KJS::ArrayProtoFuncSplice::callAsFunction):
4166 (KJS::ArrayProtoFuncUnShift::callAsFunction):
4167 (KJS::ArrayProtoFuncFilter::callAsFunction):
4168 (KJS::ArrayProtoFuncMap::callAsFunction):
4169 (KJS::ArrayProtoFuncEvery::callAsFunction):
4170 (KJS::ArrayProtoFuncForEach::callAsFunction):
4171 (KJS::ArrayProtoFuncSome::callAsFunction):
4172 (KJS::ArrayProtoFuncIndexOf::callAsFunction):
4173 (KJS::ArrayProtoFuncLastIndexOf::callAsFunction):
4174 * kjs/array_object.h:
4175 (KJS::ArrayPrototype::classInfo):
4176 * kjs/create_hash_table:
4177 * kjs/date_object.cpp:
4178 (KJS::DatePrototype::getOwnPropertySlot):
4179 (KJS::DateProtoFuncToString::callAsFunction):
4180 (KJS::DateProtoFuncToUTCString::callAsFunction):
4181 (KJS::DateProtoFuncToDateString::callAsFunction):
4182 (KJS::DateProtoFuncToTimeString::callAsFunction):
4183 (KJS::DateProtoFuncToLocaleString::callAsFunction):
4184 (KJS::DateProtoFuncToLocaleDateString::callAsFunction):
4185 (KJS::DateProtoFuncToLocaleTimeString::callAsFunction):
4186 (KJS::DateProtoFuncValueOf::callAsFunction):
4187 (KJS::DateProtoFuncGetTime::callAsFunction):
4188 (KJS::DateProtoFuncGetFullYear::callAsFunction):
4189 (KJS::DateProtoFuncGetUTCFullYear::callAsFunction):
4190 (KJS::DateProtoFuncToGMTString::callAsFunction):
4191 (KJS::DateProtoFuncGetMonth::callAsFunction):
4192 (KJS::DateProtoFuncGetUTCMonth::callAsFunction):
4193 (KJS::DateProtoFuncGetDate::callAsFunction):
4194 (KJS::DateProtoFuncGetUTCDate::callAsFunction):
4195 (KJS::DateProtoFuncGetDay::callAsFunction):
4196 (KJS::DateProtoFuncGetUTCDay::callAsFunction):
4197 (KJS::DateProtoFuncGetHours::callAsFunction):
4198 (KJS::DateProtoFuncGetUTCHours::callAsFunction):
4199 (KJS::DateProtoFuncGetMinutes::callAsFunction):
4200 (KJS::DateProtoFuncGetUTCMinutes::callAsFunction):
4201 (KJS::DateProtoFuncGetSeconds::callAsFunction):
4202 (KJS::DateProtoFuncGetUTCSeconds::callAsFunction):
4203 (KJS::DateProtoFuncGetMilliSeconds::callAsFunction):
4204 (KJS::DateProtoFuncGetUTCMilliseconds::callAsFunction):
4205 (KJS::DateProtoFuncGetTimezoneOffset::callAsFunction):
4206 (KJS::DateProtoFuncSetTime::callAsFunction):
4207 (KJS::DateProtoFuncSetMilliSeconds::callAsFunction):
4208 (KJS::DateProtoFuncSetUTCMilliseconds::callAsFunction):
4209 (KJS::DateProtoFuncSetSeconds::callAsFunction):
4210 (KJS::DateProtoFuncSetUTCSeconds::callAsFunction):
4211 (KJS::DateProtoFuncSetMinutes::callAsFunction):
4212 (KJS::DateProtoFuncSetUTCMinutes::callAsFunction):
4213 (KJS::DateProtoFuncSetHours::callAsFunction):
4214 (KJS::DateProtoFuncSetUTCHours::callAsFunction):