1 2009-07-14 Steve Falkenburg <sfalken@apple.com>
3 Reorganize JavaScriptCore headers into:
4 API: include/JavaScriptCore/
5 Private: include/private/JavaScriptCore/
7 Reviewed by Darin Adler.
9 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
10 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
11 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
12 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
13 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
15 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
17 Reviewed by Darin Adler.
19 Change all Noncopyable inheriting visibility to public.
20 https://bugs.webkit.org/show_bug.cgi?id=27225
22 Change all Noncopyable inheriting visibility to public because
23 it is needed to the custom allocation framework (bug #20422).
25 * bytecode/SamplingTool.h:
26 * bytecompiler/RegisterID.h:
27 * interpreter/CachedCall.h:
28 * interpreter/RegisterFile.h:
32 * runtime/BatchedTransitionOptimizer.h:
33 * runtime/Collector.h:
34 * runtime/CommonIdentifiers.h:
36 * runtime/JSGlobalObject.h:
38 * runtime/JSONObject.cpp:
39 * runtime/SmallStrings.cpp:
40 * runtime/SmallStrings.h:
41 * wtf/CrossThreadRefCounted.h:
46 * wtf/OwnFastMallocPtr.h:
49 * wtf/ThreadSpecific.h:
52 * wtf/unicode/Collator.h:
54 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
56 Reviewed by Darin Adler.
58 Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated
59 https://bugs.webkit.org/show_bug.cgi?id=27249
61 ParserArenaDeletable customizes operator new, to avoid double inheritance
62 ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated.
66 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
68 Reviewed by Darin Adler.
70 Add RefCountedCustomAllocated to RefCounted.h
71 https://bugs.webkit.org/show_bug.cgi?id=27232
73 Some class which are inherited from RefCounted customize
74 operator new, but RefCounted is inherited from Noncopyable
75 which will be inherited from FastAllocBase. To avoid
76 conflicts Noncopyable inheriting was moved down to RefCounted
77 and to avoid double inheritance this class has been added.
80 (WTF::RefCountedCustomAllocated::deref):
81 (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated):
83 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
85 Reviewed by Darin Adler.
87 Add NoncopyableCustomAllocated to Noncopyable.h.
88 https://bugs.webkit.org/show_bug.cgi?id=27228
90 Some classes which inherited from Noncopyable overrides operator new
91 since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h
92 needs to be extended with this new class to support the overriding.
95 (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated):
96 (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated):
98 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
100 Reviewed by Darin Adler.
102 Allow custom memory allocation control for JavaScriptCore's IdentifierTable class
103 https://bugs.webkit.org/show_bug.cgi?id=27260
105 Inherits IdentifierTable class from FastAllocBase because it has been
106 instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70.
108 * runtime/Identifier.cpp:
110 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
112 Reviewed by Darin Adler.
114 Allow custom memory allocation control for JavaScriptCore's Profiler class
115 https://bugs.webkit.org/show_bug.cgi?id=27253
117 Inherits Profiler class from FastAllocBase because it has been instantiated by
118 'new' in JavaScriptCore/profiler/Profiler.cpp:56.
120 * profiler/Profiler.h:
122 2009-07-06 George Staikos <george.staikos@torchmobile.com>
124 Reviewed by Adam Treat.
126 Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura
128 https://bugs.webkit.org/show_bug.cgi?id=27030
129 Implement custom RNG for WinCE using Mersenne Twister
131 * wtf/RandomNumber.cpp:
133 * wtf/RandomNumberSeed.h:
134 (WTF::initializeRandomNumberGenerator):
135 * wtf/wince/mt19937ar.c: Added.
145 2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
147 Unreviewed make dist build fix.
151 2009-07-13 Drew Wilson <atwilson@google.com>
153 Reviewed by David Levin.
155 Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
156 https://bugs.webkit.org/show_bug.cgi?id=26932
158 Added ENABLE(SHARED_WORKERS) flag (off by default).
160 * Configurations/FeatureDefines.xcconfig:
162 2009-07-07 Norbert Leser <norbert.leser@nokia.com>
164 Reviewed by Maciej Stachoviak.
166 https://bugs.webkit.org/show_bug.cgi?id=27058
168 Removed superfluous parenthesis around single expression.
169 Compilers on Symbian platform fail to properly parse and compile.
171 * JavaScriptCore/wtf/Platform.h:
173 2009-07-13 Norbert Leser <norbert.leser@nokia.com>
175 Reviewed by Maciej Stachoviak.
177 https://bugs.webkit.org/show_bug.cgi?id=27054
179 Renamed Translator to HashTranslator
181 Codewarrior compiler (WINSCW) latest b482 cannot resolve typename
182 mismatch between template declaration and definition
183 (HashTranslator / Translator)
187 2009-07-13 Norbert Leser <norbert.leser@nokia.com>
189 Reviewed by Eric Seidel.
191 https://bugs.webkit.org/show_bug.cgi?id=27053
193 Ambiguity in LabelScope initialization
195 Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve
196 type of "0" unambiguously. Set expression explicitly to
197 PassRefPtr<Label>::PassRefPtr()
199 * bytecompiler/BytecodeGenerator.cpp
201 2009-07-11 Simon Fraser <simon.fraser@apple.com>
203 Enable support for accelerated compositing and 3d transforms on Leopard.
204 <https://bugs.webkit.org/show_bug.cgi?id=20166>
205 <rdar://problem/6120614>
207 Reviewed by Oliver Hunt.
209 * Configurations/FeatureDefines.xcconfig:
212 2009-07-10 Mark Rowe <mrowe@apple.com>
214 Second part of the "make Windows happier" dance.
216 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
217 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
219 2009-07-10 Mark Rowe <mrowe@apple.com>
221 Try and make the Windows build happy.
223 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
224 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
226 2009-07-10 Kevin McCullough <kmccullough@apple.com>
228 Reviewed by Geoffrey Garen.
230 * debugger/Debugger.h: Made this function virtual for use in WebCore's
233 2009-07-10 Kwang Yul Seo <skyul@company100.net>
235 Reviewed by Darin Adler.
237 ParserArenaDeletable should override delete
238 https://bugs.webkit.org/show_bug.cgi?id=26790
240 ParserArenaDeletable overrides new, but it does not override delete.
241 ParserArenaDeletable must be freed by fastFree
242 because it is allocated by fastMalloc.
244 * parser/NodeConstructors.h:
245 (JSC::ParserArenaDeletable::operator delete):
248 2009-07-10 Adam Roben <aroben@apple.com>
250 Sort all our Xcode projects
252 Accomplished using sort-Xcode-project-file.
254 Requested by Dave Kilzer.
256 * JavaScriptCore.xcodeproj/project.pbxproj:
258 2009-07-09 Maciej Stachowiak <mjs@apple.com>
260 Not reviewed, build fix.
262 Windows build fix for the last change.
264 * wtf/dtoa.cpp: Forgot to include Vector.h
266 2009-07-09 Maciej Stachowiak <mjs@apple.com>
268 Reviewed by Darin Adler.
270 REGRESSION: crash in edge cases of floating point parsing.
271 https://bugs.webkit.org/show_bug.cgi?id=27110
272 <rdar://problem/7044458>
274 Tests: fast/css/number-parsing-crash.html
275 fast/css/number-parsing-crash.html
276 fast/js/number-parsing-crash.html
279 (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector
282 (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts.
283 Added an assertion to verify that invariants are maintained.
285 All other functions are adapted fairly mechanically to the above changes.
286 (WTF::BigInt::clear):
288 (WTF::BigInt::resize):
289 (WTF::BigInt::words):
290 (WTF::BigInt::append):
304 2009-07-09 Drew Wilson <atwilson@google.com>
306 Reviewed by Alexey Proskuryakov.
308 Turned on CHANNEL_MESSAGING by default because the MessageChannel API
309 can now be implemented for Web Workers and is reasonably stable.
311 * Configurations/FeatureDefines.xcconfig:
313 2009-07-09 Oliver Hunt <oliver@apple.com>
315 Reviewed by NOBODY (Build fix).
317 * interpreter/Interpreter.cpp:
318 (JSC::Interpreter::privateExecute):
320 2009-07-09 Oliver Hunt <oliver@apple.com>
322 Reviewed by Darin Adler.
324 Bug 27016 - Interpreter crashes due to invalid array indexes
325 <https://bugs.webkit.org/show_bug.cgi?id=27016>
327 Unsigned vs signed conversions results in incorrect behaviour in
328 64bit interpreter builds.
330 * interpreter/Interpreter.cpp:
331 (JSC::Interpreter::privateExecute):
333 2009-07-09 Dimitri Glazkov <dglazkov@chromium.org>
335 Reviewed by Darin Fisher.
337 [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build.
338 https://bugs.webkit.org/show_bug.cgi?id=27135
340 * JavaScriptCore.gypi: Added.
342 2009-07-09 Joe Mason <joe.mason@torchmobile.com>
344 Reviewed by George Staikos.
346 Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
348 https://bugs.webkit.org/show_bug.cgi?id=27031
349 Add an override for deleteOwnedPtr(HDC) on Windows
351 * wtf/OwnPtrCommon.h:
353 (WTF::deleteOwnedPtr):
355 2009-07-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
357 Reviewed by Darin Adler.
359 Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc
362 https://bugs.webkit.org/show_bug.cgi?id=27026
364 Based on Norbert Leser's work.
367 (printUsageStatement):
371 2009-07-07 Gavin Barraclough <barraclough@apple.com>
373 Reviewed by Sam Weinig.
375 Stop loading constants into the register file.
377 Instead, use high register values (highest bit bar the sign bit set) to indicate
378 constants in the instruction stream, and when we encounter such a value load it
379 directly from the CodeBlock.
381 Since constants are no longer copied into the register file, this patch renders
382 the 'unexpected constant' mechanism redundant, and removes it.
384 2% improvement, thanks to Sam Weinig.
386 * bytecode/CodeBlock.cpp:
387 (JSC::CodeBlock::dump):
388 (JSC::CodeBlock::CodeBlock):
389 (JSC::CodeBlock::mark):
390 (JSC::CodeBlock::shrinkToFit):
391 * bytecode/CodeBlock.h:
392 (JSC::CodeBlock::isTemporaryRegisterIndex):
393 (JSC::CodeBlock::constantRegister):
394 (JSC::CodeBlock::isConstantRegisterIndex):
395 (JSC::CodeBlock::getConstant):
398 * bytecompiler/BytecodeGenerator.cpp:
399 (JSC::BytecodeGenerator::preserveLastVar):
400 (JSC::BytecodeGenerator::BytecodeGenerator):
401 (JSC::BytecodeGenerator::addConstantValue):
402 (JSC::BytecodeGenerator::emitEqualityOp):
403 (JSC::BytecodeGenerator::emitLoad):
404 (JSC::BytecodeGenerator::emitResolveBase):
405 (JSC::BytecodeGenerator::emitResolveWithBase):
406 (JSC::BytecodeGenerator::emitNewError):
407 * bytecompiler/BytecodeGenerator.h:
408 (JSC::BytecodeGenerator::emitNode):
409 * interpreter/CallFrame.h:
410 (JSC::ExecState::noCaller):
411 (JSC::ExecState::hasHostCallFrameFlag):
412 (JSC::ExecState::addHostCallFrameFlag):
413 (JSC::ExecState::removeHostCallFrameFlag):
414 * interpreter/Interpreter.cpp:
415 (JSC::Interpreter::resolve):
416 (JSC::Interpreter::resolveSkip):
417 (JSC::Interpreter::resolveGlobal):
418 (JSC::Interpreter::resolveBase):
419 (JSC::Interpreter::resolveBaseAndProperty):
420 (JSC::Interpreter::resolveBaseAndFunc):
421 (JSC::Interpreter::dumpRegisters):
422 (JSC::Interpreter::throwException):
423 (JSC::Interpreter::createExceptionScope):
424 (JSC::Interpreter::privateExecute):
425 (JSC::Interpreter::retrieveArguments):
427 (JSC::JIT::privateCompileMainPass):
428 * jit/JITInlineMethods.h:
429 (JSC::JIT::emitLoadDouble):
430 (JSC::JIT::emitLoadInt32ToDouble):
431 * jit/JITOpcodes.cpp:
432 (JSC::JIT::emit_op_new_error):
433 (JSC::JIT::emit_op_enter):
434 (JSC::JIT::emit_op_enter_with_activation):
436 (JSC::DeleteResolveNode::emitBytecode):
437 (JSC::DeleteValueNode::emitBytecode):
438 (JSC::PrefixResolveNode::emitBytecode):
439 * runtime/JSActivation.cpp:
440 (JSC::JSActivation::JSActivation):
443 2009-07-07 Mark Rowe <mrowe@apple.com>
445 Reviewed by Darin Adler.
447 Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>.
448 Bug 27025: Crashes and regression test failures related to regexps in 64-bit
450 For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but
451 neglects to save and restore it. The change in handling of the output vector in r45545
452 altered code generation so that the RegExp::match was now storing important data in rbx,
453 which caused crashes and bogus results when it was clobbered.
456 (JSC::Yarr::RegexGenerator::generateEnter): Save rbx.
457 (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx.
459 2009-07-06 Ada Chan <adachan@apple.com>
461 Reviewed by Darin Adler and Mark Rowe.
463 Decommitted spans are added to the list of normal spans rather than
464 the returned spans in TCMalloc_PageHeap::Delete().
465 https://bugs.webkit.org/show_bug.cgi?id=26998
467 In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in
468 the process of merging with neighboring spans that are also decommitted.
469 The merged span needs to be placed in the list of returned spans (spans
470 whose memory has been returned to the system). Right now it's always added
471 to the list of the normal spans which can theoretically cause thrashing.
473 * wtf/FastMalloc.cpp:
474 (WTF::TCMalloc_PageHeap::Delete):
476 2009-07-05 Lars Knoll <lars.knoll@nokia.com>
478 Reviewed by Maciej Stachowiak.
480 https://bugs.webkit.org/show_bug.cgi?id=26843
482 Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
484 The Metrowerks compiler on the Symbian platform moves the globally
485 defined Hashtables into read-only memory, despite one of the members
486 being mutable. This causes crashes at run-time due to write access to
489 Avoid the use of const with this compiler by introducing the
490 JSC_CONST_HASHTABLE macro.
492 Based on idea by Norbert Leser.
494 * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
495 * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
496 * runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
498 2009-07-04 Dan Bernstein <mitz@apple.com>
502 * runtime/RegExpConstructor.cpp:
503 (JSC::RegExpConstructor::getLastParen):
505 2009-07-03 Yong Li <yong.li@torchmobile.com>
507 Reviewed by Maciej Stachowiak (and revised slightly)
509 RegExp::match to be optimized
510 https://bugs.webkit.org/show_bug.cgi?id=26957
512 Allow regexp matching to use Vectors with inline capacity instead of
513 allocating a new ovector buffer every time.
515 ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall.
517 * runtime/RegExp.cpp:
518 (JSC::RegExp::match):
520 * runtime/RegExpConstructor.cpp:
521 (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
522 (JSC::RegExpConstructorPrivate::lastOvector):
523 (JSC::RegExpConstructorPrivate::tempOvector):
524 (JSC::RegExpConstructorPrivate::changeLastOvector):
525 (JSC::RegExpConstructor::performMatch):
526 (JSC::RegExpMatchesArray::RegExpMatchesArray):
527 (JSC::RegExpMatchesArray::fillArrayInstance):
528 (JSC::RegExpConstructor::getBackref):
529 (JSC::RegExpConstructor::getLastParen):
530 (JSC::RegExpConstructor::getLeftContext):
531 (JSC::RegExpConstructor::getRightContext):
532 * runtime/StringPrototype.cpp:
533 (JSC::stringProtoFuncSplit):
535 2009-06-30 Kwang Yul Seo <skyul@company100.net>
537 Reviewed by Eric Seidel.
539 Override operator new/delete with const std::nothrow_t& as the second
541 https://bugs.webkit.org/show_bug.cgi?id=26792
543 On Windows CE, operator new/delete, new[]/delete[] with const
544 std::nothrow_t& must be overrided because some standard template
545 libraries use these operators.
547 The problem occurs when memory allocated by new(size_t s, const
548 std::nothrow_t&) is freed by delete(void* p). This causes the umatched
551 The patch overrides all new, delete, new[] and delete[] to use
552 fastMaloc and fastFree consistently.
557 2009-06-30 Gabor Loki <loki@inf.u-szeged.hu>
559 Reviewed by Sam Weinig.
561 <https://bugs.webkit.org/show_bug.cgi?id=24986>
563 Remove unnecessary references to AssemblerBuffer.
565 * interpreter/Interpreter.cpp:
566 * interpreter/Interpreter.h:
568 2009-06-29 David Levin <levin@chromium.org>
570 Reviewed by Oliver Hunt.
572 Still seeing occasional leaks from UString::sharedBuffer code
573 https://bugs.webkit.org/show_bug.cgi?id=26420
575 The problem is that the pointer to the memory allocation isn't visible
576 by "leaks" due to the lower bits being used as flags. The fix is to
577 make the pointer visible in memory (in debug only). The downside of
578 this fix that the memory allocated by sharedBuffer will still look like
579 a leak in non-debug builds when any flags are set.
582 (WTF::PtrAndFlags::set):
584 2009-06-29 Sam Weinig <sam@webkit.org>
586 Reviewed by Mark Rowe.
588 Remove more unused scons support.
590 * SConstruct: Removed.
592 2009-06-29 Oliver Hunt <oliver@apple.com>
594 Reviewed by Gavin Barraclough.
596 <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters
597 <https://bugs.webkit.org/show_bug.cgi?id=26802>
599 In the original JSON.parse patch unicode was handled correctly, however in some last
600 minute "clean up" I oversimplified isSafeStringCharacter. This patch corrects this bug.
602 * runtime/LiteralParser.cpp:
603 (JSC::isSafeStringCharacter):
604 (JSC::LiteralParser::Lexer::lexString):
606 2009-06-26 Oliver Hunt <oliver@apple.com>
608 Reviewed by Dan Bernstein.
610 <rdar://problem/7009684> REGRESSION(r45039): Crashes inside JSEvent::put on PowerPC (26746)
611 <https://bugs.webkit.org/show_bug.cgi?id=26746>
613 Fix for r45039 incorrectly uncached a get_by_id by converting it to put_by_id. Clearly this
614 is less than correct. This patch corrects that error.
616 * interpreter/Interpreter.cpp:
617 (JSC::Interpreter::tryCacheGetByID):
619 2009-06-26 Eric Seidel <eric@webkit.org>
621 No review, only rolling out r45259.
623 Roll out r45259 after crash appeared on the bots:
624 plugins/undefined-property-crash.html
625 ASSERTION FAILED: s <= HeapConstants<heapType>::cellSize
626 (leopard-intel-debug-tests/build/JavaScriptCore/runtime/Collector.cpp:278
627 void* JSC::Heap::heapAllocate(size_t) [with JSC::HeapType heapType = PrimaryHeap])
629 * runtime/DateInstance.cpp:
630 * runtime/Identifier.cpp:
632 * runtime/RegExpConstructor.cpp:
633 * runtime/RegExpObject.h:
634 * runtime/ScopeChain.h:
637 2009-06-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
639 Reviewed by Simon Hausmann.
641 Add support for QDataStream operators to Vector.
647 2009-06-24 Sam Weinig <sam@webkit.org>
649 Reviewed by Gavin Barraclough.
651 Make the opcode sampler work once again.
654 (JSC::JIT::compileGetByIdProto):
655 (JSC::JIT::compileGetByIdSelfList):
656 (JSC::JIT::compileGetByIdProtoList):
657 (JSC::JIT::compileGetByIdChainList):
658 (JSC::JIT::compileGetByIdChain):
659 (JSC::JIT::compilePutByIdTransition):
660 (JSC::JIT::compileCTIMachineTrampolines):
661 (JSC::JIT::compilePatchGetArrayLength):
663 (JSC::JITStubCall::call):
665 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
667 Reviewed by Maciej Stachowiak.
669 Extend FastAllocBase.h with 'using WTF::FastAllocBase' to avoid
670 unnecessary WTF:: usings.
671 Remove existing unnecessary WTF:: usings.
673 * interpreter/Interpreter.h:
674 * profiler/CallIdentifier.h:
675 * runtime/ScopeChain.h:
676 * wtf/FastAllocBase.h:
678 2009-06-24 David Levin <levin@chromium.org>
682 * bytecode/CodeBlock.h:
683 * bytecompiler/BytecodeGenerator.h:
684 * interpreter/Register.h:
686 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
688 Reviewed by Maciej Stachowiak.
690 https://bugs.webkit.org/show_bug.cgi?id=26677
692 Inherits CodeBlock class from FastAllocBase because it
693 has been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.h:217.
695 * bytecode/CodeBlock.h:
697 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
699 Reviewed by Maciej Stachowiak.
701 https://bugs.webkit.org/show_bug.cgi?id=26676
703 Inherits BytecodeGenerator class from FastAllocBase because it has been
704 instantiated by 'new' in JavaScriptCore/parser/Nodes.cpp:1892.
706 * bytecompiler/BytecodeGenerator.h:
708 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
710 Reviewed by Maciej Stachowiak.
712 https://bugs.webkit.org/show_bug.cgi?id=26675
714 Inherits Register class from FastAllocBase because it has been
715 instantiated by 'new' in JavaScriptCore/runtime/JSVariableObject.h:149.
717 * interpreter/Register.h:
719 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
721 Reviewed by Darin Adler.
723 https://bugs.webkit.org/show_bug.cgi?id=26674
725 Inherits HashMap class from FastAllocBase because it has been
726 instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:458.
730 2009-06-24 Oliver Hunt <oliver@apple.com>
732 Reviewed by Darin Adler.
734 <rdar://problem/6940519> REGRESSION (Safari 4 Public Beta - TOT): google.com/adplanner shows blank page instead of site details in "basic research'
736 The problem was caused by the page returned with a function using a
737 var declaration list containing around ~3000 variables. The solution
738 to this is to flatten the comma expression representation and make
739 codegen comma expressions and initializer lists iterative rather than
743 * parser/NodeConstructors.h:
744 (JSC::CommaNode::CommaNode):
746 (JSC::CommaNode::emitBytecode):
748 (JSC::ExpressionNode::isCommaNode):
749 (JSC::CommaNode::isCommaNode):
750 (JSC::CommaNode::append):
752 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
754 Reviewed by Maciej Stachowiak.
756 https://bugs.webkit.org/show_bug.cgi?id=26645
758 Inherits ScopeChainNode class from FastAllocBase because it has been
759 instantiated by 'new' in JavaScriptCore/runtime/ScopeChain.h:95.
763 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
765 Reviewed by Darin Adler.
767 https://bugs.webkit.org/show_bug.cgi?id=26648
769 Inherits Deque class from FastAllocBase because it has been
770 instantiated by 'new' with DEFINE_STATIC_LOCAL macro in
771 JavaScriptCore/wtf/MainThread.cpp:62.
775 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
777 Reviewed by Darin Adler.
779 https://bugs.webkit.org/show_bug.cgi?id=26644
781 Inherits RefPtr class from FastAllocBase because it has been
782 instantiated by 'new' in JavaScriptCore/runtime/StructureChain.cpp:41.
786 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
788 Reviewed by Darin Adler.
790 Inherits HashSet class from FastAllocBase, because it has been
791 instantiated by 'new' in JavaScriptCore/runtime/Collector.h:116.
795 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
797 Reviewed by Darin Adler.
799 Inherits Vector class from FastAllocBase because it has been
800 instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:633.
804 2009-06-24 Norbert Leser <norbert.leser@nokia.com>
806 Reviewed by Maciej Stachoviak.
808 The BytecodeGenerator objects were instantiated on stack, which takes up ~38kB per instance
809 (each instance includes copy of JSC::CodeBlock with large SymbolTable, etc.).
810 Specifically, since there is nested invocation (e.g., GlobalCode --> FunctionCode),
811 the stack overflows immediately on Symbian hardware (max. 80 kB).
812 Proposed change allocates generator objects on heap.
813 Performance impact (if any) should be negligible and change is proposed as general fix,
814 rather than ifdef'd for SYMBIAN.
817 (JSC::ProgramNode::generateBytecode):
818 (JSC::EvalNode::generateBytecode):
819 (JSC::EvalNode::bytecodeForExceptionInfoReparse):
820 (JSC::FunctionBodyNode::generateBytecode):
821 (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
823 2009-06-23 Oliver Hunt <oliver@apple.com>
825 Reviewed by Gavin Barraclough.
827 <rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593)
828 <https://bugs.webkit.org/show_bug.cgi?id=26593>
830 Do not attempt to cache structure chains if they contain a dictionary at any level.
832 * interpreter/Interpreter.cpp:
833 (JSC::Interpreter::tryCachePutByID):
834 (JSC::Interpreter::tryCacheGetByID):
836 (JSC::JITThunks::tryCachePutByID):
837 * runtime/Structure.cpp:
838 (JSC::Structure::getEnumerablePropertyNames):
839 (JSC::Structure::addPropertyTransition):
840 * runtime/StructureChain.cpp:
841 (JSC::StructureChain::isCacheable):
842 * runtime/StructureChain.h:
844 2009-06-23 Yong Li <yong.li@torchmobile.com>
846 Reviewed by George Staikos.
848 https://bugs.webkit.org/show_bug.cgi?id=26654
849 Add the proper export define for the JavaScriptCore API when building for WINCE.
853 2009-06-23 Joe Mason <joe.mason@torchmobile.com>
855 Reviewed by Adam Treat.
857 Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
859 https://bugs.webkit.org/show_bug.cgi?id=26611
860 Implement currentThreadStackBase on WINCE by adding a global,
861 g_stackBase, which must be set to the address of a local variable
862 by the caller before calling any WebKit function that invokes JSC.
864 * runtime/Collector.cpp:
865 (JSC::isPageWritable):
867 Starts at the top of the stack and returns the entire range of
868 consecutive writable pages as an estimate of the actual stack.
869 This will be much bigger than the actual stack range, so some
870 dead objects can't be collected, but it guarantees live objects
871 aren't collected prematurely.
873 (JSC::currentThreadStackBase):
874 On WinCE, returns g_stackBase if set or call getStackBase as a
877 2009-06-23 Oliver Hunt <oliver@apple.com>
879 Reviewed by Alexey Proskuryakov.
881 Fix stupid performance problem in the LiteralParser
883 The LiteralParser was making a new UString in order to use
884 toDouble, however UString's toDouble allows a much wider range
885 of numberic strings than the LiteralParser accepts, and requires
886 an additional heap allocation or two for the construciton of the
887 UString. To rectify this we just call WTF::dtoa directly using
888 a stack allocated buffer to hold the validated numeric literal.
890 * runtime/LiteralParser.cpp:
891 (JSC::LiteralParser::Lexer::lexNumber):
892 (JSC::LiteralParser::parse):
893 * runtime/LiteralParser.h:
895 2009-06-22 Oliver Hunt <oliver@apple.com>
897 Reviewed by Alexey Proskuryakov.
899 Bug 26640: JSON.stringify needs to special case Boolean objects
900 <https://bugs.webkit.org/show_bug.cgi?id=26640>
902 Add special case handling of the Boolean object so we match current
905 * runtime/JSONObject.cpp:
906 (JSC::unwrapBoxedPrimitive): renamed from unwrapNumberOrString
908 (JSC::Stringifier::appendStringifiedValue):
910 2009-06-22 Oliver Hunt <oliver@apple.com>
912 Reviewed by Darin Adler.
914 Bug 26591: Support revivers in JSON.parse
915 <https://bugs.webkit.org/show_bug.cgi?id=26591>
917 Add reviver support to JSON.parse. This completes the JSON object.
919 * runtime/JSONObject.cpp:
920 (JSC::Walker::Walker):
921 (JSC::Walker::callReviver):
923 (JSC::JSONProtoFuncParse):
925 2009-06-21 Oliver Hunt <oliver@apple.com>
927 Reviewed by Darin Adler.
929 Bug 26592: Support standard toJSON functions
930 <https://bugs.webkit.org/show_bug.cgi?id=26592>
932 Add support for the standard Date.toJSON function.
934 * runtime/DatePrototype.cpp:
935 (JSC::dateProtoFuncToJSON):
937 2009-06-21 Oliver Hunt <oliver@apple.com>
939 Reviewed by Sam Weinig.
941 Bug 26594: JSC needs to support Date.toISOString
942 <https://bugs.webkit.org/show_bug.cgi?id=26594>
944 Add support for Date.toISOString.
946 * runtime/DatePrototype.cpp:
947 (JSC::dateProtoFuncToISOString):
949 2009-06-21 Oliver Hunt <oliver@apple.com>
951 Reviewed by NOBODY (Build fix).
955 * runtime/LiteralParser.cpp:
956 (JSC::LiteralParser::parse):
958 2009-06-21 Oliver Hunt <oliver@apple.com>
960 Reviewed by Darin Adler and Cameron Zwarich.
962 Bug 26587: Support JSON.parse
963 <https://bugs.webkit.org/show_bug.cgi?id=26587>
965 Extend the LiteralParser to support the full strict JSON
966 grammar, fix a few places where the grammar was incorrectly
967 lenient. Doesn't yet support the JSON.parse reviver function
968 but that does not block the JSON.parse functionality itself.
970 * interpreter/Interpreter.cpp:
971 (JSC::Interpreter::callEval):
972 * runtime/JSGlobalObjectFunctions.cpp:
973 (JSC::globalFuncEval):
974 * runtime/JSONObject.cpp:
975 (JSC::JSONProtoFuncParse):
976 * runtime/LiteralParser.cpp:
977 (JSC::LiteralParser::Lexer::lex):
978 (JSC::isSafeStringCharacter):
979 (JSC::LiteralParser::Lexer::lexString):
980 (JSC::LiteralParser::parse):
981 * runtime/LiteralParser.h:
982 (JSC::LiteralParser::LiteralParser):
983 (JSC::LiteralParser::tryJSONParse):
984 (JSC::LiteralParser::):
985 (JSC::LiteralParser::Lexer::Lexer):
987 2009-06-21 David Levin <levin@chromium.org>
989 Reviewed by NOBODY (speculative build fix for windows).
991 Simply removed some whitespace form this file to make windows build wtf and
992 hopefully copy the new MessageQueque.h so that WebCore picks it up.
994 * wtf/Assertions.cpp:
996 2009-06-21 Drew Wilson <atwilson@google.com>
998 Reviewed by David Levin.
1000 <https://bugs.webkit.org/show_bug.cgi?id=25043>
1001 Added support for multi-threaded MessagePorts.
1003 * wtf/MessageQueue.h:
1004 (WTF::::appendAndCheckEmpty):
1005 Added API to test whether the queue was empty before adding an element.
1007 2009-06-20 David D. Kilzer <ddkilzer@webkit.org>
1009 Fix namespace comment in SegmentedVector.h
1011 * wtf/SegmentedVector.h: Updated namespace comment to reflect
1012 new namespace after r44897.
1014 2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
1016 Bug 24986: ARM JIT port
1017 <https://bugs.webkit.org/show_bug.cgi?id=24986>
1019 Reviewed by Oliver Hunt.
1021 An Iterator added for SegmentedVector. Currently
1022 only the pre ++ operator is supported.
1024 * wtf/SegmentedVector.h:
1025 (WTF::SegmentedVectorIterator::~SegmentedVectorIterator):
1026 (WTF::SegmentedVectorIterator::operator*):
1027 (WTF::SegmentedVectorIterator::operator->):
1028 (WTF::SegmentedVectorIterator::operator++):
1029 (WTF::SegmentedVectorIterator::operator==):
1030 (WTF::SegmentedVectorIterator::operator!=):
1031 (WTF::SegmentedVectorIterator::operator=):
1032 (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
1033 (WTF::SegmentedVector::alloc):
1034 (WTF::SegmentedVector::begin):
1035 (WTF::SegmentedVector::end):
1037 2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
1039 Bug 24986: ARM JIT port
1040 <https://bugs.webkit.org/show_bug.cgi?id=24986>
1042 Reviewed by Oliver Hunt.
1044 Move SegmentedVector to /wtf subdirectory
1045 and change "namespace JSC" to "namespace WTF"
1047 Additional build file updates by David Kilzer.
1049 * GNUmakefile.am: Updated path to SegmentedVector.h.
1050 * JavaScriptCore.order: Updated SegmentedVector namespace from
1051 JSC to WTF in mangled C++ method name.
1052 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1053 Removed reference to bytecompiler\SegmentedVector.h.
1054 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to
1055 wtf\SegmentedVector.h.
1056 * JavaScriptCore.xcodeproj/project.pbxproj: Moved
1057 SegmentedVector.h definition from bytecompiler subdirectory to
1059 * bytecompiler/BytecodeGenerator.h: Updated #include path to
1060 SegmentedVector.h and prepended WTF:: namespace to its use.
1061 * parser/Lexer.h: Ditto.
1062 * wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h.
1063 (WTF::SegmentedVector::SegmentedVector):
1064 (WTF::SegmentedVector::~SegmentedVector):
1065 (WTF::SegmentedVector::size):
1066 (WTF::SegmentedVector::at):
1067 (WTF::SegmentedVector::operator[]):
1068 (WTF::SegmentedVector::last):
1069 (WTF::SegmentedVector::append):
1070 (WTF::SegmentedVector::removeLast):
1071 (WTF::SegmentedVector::grow):
1072 (WTF::SegmentedVector::clear):
1073 (WTF::SegmentedVector::deleteAllSegments):
1074 (WTF::SegmentedVector::segmentExistsFor):
1075 (WTF::SegmentedVector::segmentFor):
1076 (WTF::SegmentedVector::subscriptFor):
1077 (WTF::SegmentedVector::ensureSegmentsFor):
1078 (WTF::SegmentedVector::ensureSegment):
1080 2009-06-19 Gavin Barraclough <barraclough@apple.com>
1082 Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h).
1085 (JSC::JIT::privateCompile):
1086 (JSC::JIT::privateCompileCTIMachineTrampolines):
1087 (JSC::JIT::emitGetVariableObjectRegister):
1088 (JSC::JIT::emitPutVariableObjectRegister):
1090 * jit/JITArithmetic.cpp:
1091 (JSC::JIT::emit_op_rshift):
1092 (JSC::JIT::emitSlow_op_jnless):
1093 (JSC::JIT::emitSlow_op_jnlesseq):
1094 (JSC::JIT::compileBinaryArithOp):
1096 (JSC::JIT::compileOpCallInitializeCallFrame):
1097 (JSC::JIT::compileOpCall):
1098 * jit/JITInlineMethods.h:
1099 (JSC::JIT::restoreArgumentReference):
1100 (JSC::JIT::checkStructure):
1101 * jit/JITOpcodes.cpp:
1102 (JSC::JIT::emit_op_instanceof):
1103 (JSC::JIT::emit_op_get_scoped_var):
1104 (JSC::JIT::emit_op_put_scoped_var):
1105 (JSC::JIT::emit_op_construct_verify):
1106 (JSC::JIT::emit_op_resolve_global):
1107 (JSC::JIT::emit_op_jeq_null):
1108 (JSC::JIT::emit_op_jneq_null):
1109 (JSC::JIT::emit_op_to_jsnumber):
1110 (JSC::JIT::emit_op_catch):
1111 (JSC::JIT::emit_op_eq_null):
1112 (JSC::JIT::emit_op_neq_null):
1113 (JSC::JIT::emit_op_convert_this):
1114 (JSC::JIT::emit_op_profile_will_call):
1115 (JSC::JIT::emit_op_profile_did_call):
1116 (JSC::JIT::emitSlow_op_get_by_val):
1117 * jit/JITPropertyAccess.cpp:
1118 (JSC::JIT::emit_op_get_by_val):
1119 (JSC::JIT::emit_op_put_by_val):
1120 (JSC::JIT::emit_op_method_check):
1121 (JSC::JIT::compileGetByIdHotPath):
1122 (JSC::JIT::emit_op_put_by_id):
1123 (JSC::JIT::compilePutDirectOffset):
1124 (JSC::JIT::compileGetDirectOffset):
1125 (JSC::JIT::privateCompilePutByIdTransition):
1126 (JSC::JIT::privateCompilePatchGetArrayLength):
1128 (JSC::JITThunks::JITThunks):
1130 2009-06-19 Gavin Barraclough <barraclough@apple.com>
1132 Reviewed by NOBODY (Windows build fix).
1135 * jit/JITInlineMethods.h:
1137 2009-06-19 Gabor Loki <loki@inf.u-szeged.hu>
1139 Reviewed by Gavin Barraclough.
1141 Reorganize ARM architecture specific macros.
1142 Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).
1144 Bug 24986: ARM JIT port
1145 <https://bugs.webkit.org/show_bug.cgi?id=24986>
1147 * assembler/ARMv7Assembler.h:
1148 * assembler/AbstractMacroAssembler.h:
1149 (JSC::AbstractMacroAssembler::Imm32::Imm32):
1150 * assembler/MacroAssembler.h:
1151 * assembler/MacroAssemblerCodeRef.h:
1152 (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
1153 * jit/ExecutableAllocator.h:
1154 (JSC::ExecutableAllocator::cacheFlush):
1156 * jit/JITInlineMethods.h:
1157 (JSC::JIT::restoreArgumentReferenceForTrampoline):
1161 * yarr/RegexJIT.cpp:
1162 (JSC::Yarr::RegexGenerator::generateEnter):
1163 (JSC::Yarr::RegexGenerator::generateReturn):
1165 2009-06-19 Gavin Barraclough <barraclough@apple.com>
1167 Reviewed by Oliver Hunt.
1169 Fix armv7 JIT build issues.
1171 Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types),
1172 and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros.
1174 * Replace offsetofs with FIELD_OFFSETs (safe on C++ objects).
1175 * Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor.
1179 * jit/JITInlineMethods.h:
1180 (JSC::JIT::restoreArgumentReference):
1181 * jit/JITOpcodes.cpp:
1182 (JSC::JIT::emit_op_catch):
1184 (JSC::JITThunks::JITThunks):
1186 2009-06-19 Adam Treat <adam.treat@torchmobile.com>
1188 Blind attempt at build fix.
1190 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1191 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1193 2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
1195 Reviewed by Oliver Hunt.
1197 Inherits CallIdentifier struct from FastAllocBase because it has been
1198 instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86.
1200 * wtf/HashCountedSet.h:
1202 2009-06-19 Adam Treat <adam.treat@torchmobile.com>
1204 Reviewed by Oliver Hunt.
1206 https://bugs.webkit.org/show_bug.cgi?id=26540
1207 Modify the test shell to add a new function 'checkSyntax' that will
1208 only parse the source instead of executing it. In this way we can test
1209 pure parsing performance against some of the larger scripts in the wild.
1212 (GlobalObject::GlobalObject):
1213 (functionCheckSyntax):
1215 2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
1217 Reviewed by Darin Adler.
1219 Inherits HashCountedSet class from FastAllocBase because it has been
1220 instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095.
1222 * wtf/HashCountedSet.h:
1224 2009-06-19 Yong Li <yong.li@torchmobile.com>
1226 Reviewed by George Staikos.
1228 https://bugs.webkit.org/show_bug.cgi?id=26558
1229 Declare these symbols extern for WINCE as they are provided by libce.
1231 * runtime/DateConstructor.cpp:
1232 * runtime/DatePrototype.cpp:
1233 (JSC::formatLocaleDate):
1235 2009-06-19 Oliver Hunt <oliver@apple.com>
1237 Reviewed by Maciej Stachowiak.
1239 <rdar://problem/6988973> ScopeChain leak in interpreter builds
1241 Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT)
1244 * runtime/JSFunction.cpp:
1245 (JSC::JSFunction::~JSFunction):
1248 2009-06-19 Yong Li <yong.li@torchmobile.com>
1250 Reviewed by George Staikos.
1252 https://bugs.webkit.org/show_bug.cgi?id=26543
1253 Windows CE uses 'GetLastError' instead of 'errno.'
1255 * interpreter/RegisterFile.h:
1256 (JSC::RegisterFile::RegisterFile):
1257 (JSC::RegisterFile::grow):
1259 2009-06-19 David Levin <levin@chromium.org>
1261 Reviewed by NOBODY (Windows build fix).
1263 Add export for Windows corresponding to OSX export done in r44844.
1264 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1265 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1267 2009-06-18 Oliver Hunt <oliver@apple.com>
1269 Reviewed by Gavin "Viceroy of Venezuela" Barraclough.
1271 Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected
1272 <https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385>
1274 We need to make sure that each native function instance correctly unlinks any references to it
1275 when it is collected. Allowing this to happen required a few changes:
1276 * Every native function needs a codeblock to track the link information
1277 * To have this codeblock, every function now also needs its own functionbodynode
1278 so we no longer get to have a single shared instance.
1279 * Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode
1281 * JavaScriptCore.exp:
1282 * bytecode/CodeBlock.cpp:
1283 (JSC::CodeBlock::CodeBlock):
1284 Constructor for NativeCode CodeBlock
1285 (JSC::CodeBlock::derefStructures):
1286 (JSC::CodeBlock::refStructures):
1287 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
1288 (JSC::CodeBlock::handlerForBytecodeOffset):
1289 (JSC::CodeBlock::lineNumberForBytecodeOffset):
1290 (JSC::CodeBlock::expressionRangeForBytecodeOffset):
1291 (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
1292 (JSC::CodeBlock::functionRegisterForBytecodeOffset):
1293 (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
1294 (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
1295 (JSC::CodeBlock::setJITCode):
1296 Add assertions to ensure we don't try and use NativeCode CodeBlocks as
1299 * bytecode/CodeBlock.h:
1301 (JSC::CodeBlock::source):
1302 (JSC::CodeBlock::sourceOffset):
1303 (JSC::CodeBlock::evalCodeCache):
1304 (JSC::CodeBlock::createRareDataIfNecessary):
1308 (JSC::JIT::privateCompileCTIMachineTrampolines):
1309 (JSC::JIT::linkCall):
1310 Update logic to allow native function caching
1314 (JSC::FunctionBodyNode::createNativeThunk):
1315 (JSC::FunctionBodyNode::isHostFunction):
1317 * runtime/JSFunction.cpp:
1318 (JSC::JSFunction::JSFunction):
1319 (JSC::JSFunction::~JSFunction):
1320 (JSC::JSFunction::mark):
1321 * runtime/JSGlobalData.cpp:
1322 (JSC::JSGlobalData::~JSGlobalData):
1323 * runtime/JSGlobalData.h:
1325 2009-06-18 Gavin Barraclough <barraclough@apple.com>
1327 Reviewed by NOBODY (Windows build fix).
1330 (WTF::calculateUTCOffset):
1332 2009-06-18 Gavin Barraclough <barraclough@apple.com>
1334 Reviewed by Geoff Garen.
1336 Timezone calculation incorrect in Venezuela.
1338 https://bugs.webkit.org/show_bug.cgi?id=26531
1339 <rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3
1341 The problem is that we're calculating the timezone relative to 01/01/2000,
1342 but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007.
1343 According to the spec, section 15.9.1.9 states "the time since the beginning
1344 of the year", presumably meaning the *current* year. Change the calculation
1345 to be based on whatever the current year is, rather than a canned date.
1347 No performance impact.
1350 (WTF::calculateUTCOffset):
1352 2009-06-18 Gavin Barraclough <barraclough@apple.com>
1354 Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig).
1356 (Reintroducing patch added in r44492, and reverted in r44796.)
1358 Change the implementation of op_throw so the stub function always modifies its
1359 return address - if it doesn't find a 'catch' it will switch to a trampoline
1360 to force a return from JIT execution. This saves memory, by avoiding the need
1361 for a unique return for every op_throw.
1363 * jit/JITOpcodes.cpp:
1364 (JSC::JIT::emit_op_throw):
1365 JITStubs::cti_op_throw now always changes its return address,
1366 remove return code generated after the stub call (this is now
1367 handled by ctiOpThrowNotCaught).
1370 Add ctiOpThrowNotCaught definitions.
1371 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
1372 Change cti_op_throw to always change its return address.
1374 Add ctiOpThrowNotCaught declaration.
1376 2009-06-18 Kevin McCullough <kmccullough@apple.com>
1378 Reviewed by Oliver Hunt.
1380 <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
1382 - Exposed functions now needed by WebCore.
1384 * JavaScriptCore.exp:
1386 2009-06-17 Darin Adler <darin@apple.com>
1388 Reviewed by Oliver Hunt.
1390 Bug 26429: Make JSON.stringify non-recursive so it can handle objects
1391 of arbitrary complexity
1392 https://bugs.webkit.org/show_bug.cgi?id=26429
1394 For marking I decided not to use gcProtect, because this is inside the engine
1395 so it's easy enough to just do marking. And that darned gcProtect does locking!
1396 Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor
1397 for that class says "FIXME: Remove all clients of this API, then remove this API."
1399 * runtime/Collector.cpp:
1400 (JSC::Heap::collect): Add a call to JSONObject::markStringifiers.
1402 * runtime/CommonIdentifiers.cpp:
1403 (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier.
1404 * runtime/CommonIdentifiers.h: Ditto.
1406 * runtime/JSGlobalData.cpp:
1407 (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0.
1408 * runtime/JSGlobalData.h: Added firstStringifierToMark.
1410 * runtime/JSONObject.cpp: Cut down the includes to the needed ones only.
1411 (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string
1412 objects to get their number and string values.
1413 (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used
1414 to wrap an identifier or integer so we don't have to do any work unless we
1415 actually call a replacer.
1416 (JSC::ReplacerPropertyName::value): Added.
1417 (JSC::gap): Added. Helper function for the Stringifier constructor.
1418 (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added.
1419 The class is used to wrap an identifier or integer so we don't have to
1420 allocate a number or string until we actually call toJSON or a replacer.
1421 (JSC::PropertyNameForFunctionCall::asJSValue): Added.
1422 (JSC::Stringifier::Stringifier): Updated and moved out of the class
1423 definition. Added code to hook this into a singly linked list for marking.
1424 (JSC::Stringifier::~Stringifier): Remove from the singly linked list.
1425 (JSC::Stringifier::mark): Mark all the objects in the holder stacks.
1426 (JSC::Stringifier::stringify): Updated.
1427 (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit.
1428 (JSC::Stringifier::toJSON): Renamed from toJSONValue.
1429 (JSC::Stringifier::appendStringifiedValue): Renamed from stringify.
1430 Added code to use the m_holderStack to do non-recursive stringify of
1431 objects and arrays. This code also uses the timeout checker since in
1432 pathological cases it could be slow even without calling into the
1433 JavaScript virtual machine.
1434 (JSC::Stringifier::willIndent): Added.
1435 (JSC::Stringifier::indent): Added.
1436 (JSC::Stringifier::unindent): Added.
1437 (JSC::Stringifier::startNewLine): Added.
1438 (JSC::Stringifier::Holder::Holder): Added.
1439 (JSC::Stringifier::Holder::appendNextProperty): Added. This is the
1440 function that handles the format of arrays and objects.
1441 (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom
1442 of the file so the JSONObject class is not interleaved with the
1444 (JSC::JSONObject::markStringifiers): Added. Calls mark.
1445 (JSC::JSONProtoFuncStringify): Streamlined the code here. The code
1446 to compute the gap string is now a separate function.
1448 * runtime/JSONObject.h: Made everything private. Added markStringifiers.
1450 2009-06-17 Oliver Hunt <oliver@apple.com>
1452 Reviewed by Gavin Barraclough.
1454 <rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com
1456 Roll out r43849 as it appears that we cannot rely on the address of
1457 an objects property storage being constant even if the structure is
1461 * jit/JITPropertyAccess.cpp:
1462 (JSC::JIT::compileGetDirectOffset):
1463 (JSC::JIT::privateCompileGetByIdProto):
1464 (JSC::JIT::privateCompileGetByIdProtoList):
1465 (JSC::JIT::privateCompileGetByIdChainList):
1466 (JSC::JIT::privateCompileGetByIdChain):
1468 2009-06-17 Gavin Barraclough <barraclough@apple.com>
1470 Rubber Stamped by Mark Rowe.
1472 Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>.
1474 * jit/JITOpcodes.cpp:
1475 (JSC::JIT::emit_op_throw):
1478 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
1481 2009-06-17 Gavin Barraclough <barraclough@apple.com>
1483 Reviewed by Mark Rowe.
1485 <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit
1487 On 64-bit, NaN-encoded values must be detagged before they can be used in rshift.
1489 No performance impact.
1491 * jit/JITArithmetic.cpp:
1492 (JSC::JIT::emit_op_rshift):
1494 2009-06-17 Adam Treat <adam.treat@torchmobile.com>
1496 Reviewed by George Staikos.
1498 https://bugs.webkit.org/show_bug.cgi?id=23155
1499 Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
1504 2009-06-17 George Staikos <george.staikos@torchmobile.com>
1506 Reviewed by Adam Treat.
1508 https://bugs.webkit.org/show_bug.cgi?id=23155
1509 Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
1513 * wtf/Assertions.cpp:
1515 * wtf/CurrentTime.cpp:
1516 (WTF::lowResUTCTime):
1518 (WTF::getLocalTime):
1521 * wtf/StringExtras.h:
1523 * wtf/win/MainThreadWin.cpp:
1525 2009-06-17 Gavin Barraclough <barraclough@apple.com>
1527 Reviewed by Oliver Hunt.
1529 <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
1531 Remove PropertySlot::putValue - PropertySlots should only be used for getting,
1532 not putting. Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite,
1533 which is what it really was being used to ask, and remove some other getOwnPropertySlot
1534 & getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion.
1536 * runtime/JSGlobalObject.h:
1537 (JSC::JSGlobalObject::hasOwnPropertyForWrite):
1538 * runtime/JSObject.h:
1539 * runtime/JSStaticScopeObject.cpp:
1540 * runtime/JSStaticScopeObject.h:
1541 * runtime/PropertySlot.h:
1543 2009-06-16 Gavin Barraclough <barraclough@apple.com>
1545 Reviewed by Oliver hunt.
1547 Temporarily partially disable r44492, since this is causing some problems on internal builds.
1549 * jit/JITOpcodes.cpp:
1550 (JSC::JIT::emit_op_throw):
1552 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
1554 2009-06-16 Sam Weinig <sam@webkit.org>
1561 2009-06-16 Sam Weinig <sam@webkit.org>
1563 Reviewed by Oliver Hunt.
1565 Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize
1566 it for each type of stub using the return address to find the correct
1572 (JSC::JIT::compileGetByIdProto):
1573 (JSC::JIT::compileGetByIdSelfList):
1574 (JSC::JIT::compileGetByIdProtoList):
1575 (JSC::JIT::compileGetByIdChainList):
1576 (JSC::JIT::compileGetByIdChain):
1577 (JSC::JIT::compilePutByIdTransition):
1578 (JSC::JIT::compileCTIMachineTrampolines):
1579 (JSC::JIT::compilePatchGetArrayLength):
1580 * jit/JITStubCall.h:
1581 (JSC::JITStubCall::call):
1583 == Rolled over to ChangeLog-2009-06-16 ==