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 JSCell's superclass to NoncopyableCustomAllocated
20 https://bugs.webkit.org/show_bug.cgi?id=27248
22 JSCell class customizes operator new, since Noncopyable will be
23 inherited from FastAllocBase, NoncopyableCustomAllocated has
28 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
30 Reviewed by Darin Adler.
32 Change all Noncopyable inheriting visibility to public.
33 https://bugs.webkit.org/show_bug.cgi?id=27225
35 Change all Noncopyable inheriting visibility to public because
36 it is needed to the custom allocation framework (bug #20422).
38 * bytecode/SamplingTool.h:
39 * bytecompiler/RegisterID.h:
40 * interpreter/CachedCall.h:
41 * interpreter/RegisterFile.h:
45 * runtime/BatchedTransitionOptimizer.h:
46 * runtime/Collector.h:
47 * runtime/CommonIdentifiers.h:
49 * runtime/JSGlobalObject.h:
51 * runtime/JSONObject.cpp:
52 * runtime/SmallStrings.cpp:
53 * runtime/SmallStrings.h:
54 * wtf/CrossThreadRefCounted.h:
59 * wtf/OwnFastMallocPtr.h:
62 * wtf/ThreadSpecific.h:
65 * wtf/unicode/Collator.h:
67 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
69 Reviewed by Darin Adler.
71 Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated
72 https://bugs.webkit.org/show_bug.cgi?id=27249
74 ParserArenaDeletable customizes operator new, to avoid double inheritance
75 ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated.
79 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
81 Reviewed by Darin Adler.
83 Add RefCountedCustomAllocated to RefCounted.h
84 https://bugs.webkit.org/show_bug.cgi?id=27232
86 Some class which are inherited from RefCounted customize
87 operator new, but RefCounted is inherited from Noncopyable
88 which will be inherited from FastAllocBase. To avoid
89 conflicts Noncopyable inheriting was moved down to RefCounted
90 and to avoid double inheritance this class has been added.
93 (WTF::RefCountedCustomAllocated::deref):
94 (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated):
96 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
98 Reviewed by Darin Adler.
100 Add NoncopyableCustomAllocated to Noncopyable.h.
101 https://bugs.webkit.org/show_bug.cgi?id=27228
103 Some classes which inherited from Noncopyable overrides operator new
104 since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h
105 needs to be extended with this new class to support the overriding.
108 (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated):
109 (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated):
111 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
113 Reviewed by Darin Adler.
115 Allow custom memory allocation control for JavaScriptCore's IdentifierTable class
116 https://bugs.webkit.org/show_bug.cgi?id=27260
118 Inherits IdentifierTable class from FastAllocBase because it has been
119 instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70.
121 * runtime/Identifier.cpp:
123 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
125 Reviewed by Darin Adler.
127 Allow custom memory allocation control for JavaScriptCore's Profiler class
128 https://bugs.webkit.org/show_bug.cgi?id=27253
130 Inherits Profiler class from FastAllocBase because it has been instantiated by
131 'new' in JavaScriptCore/profiler/Profiler.cpp:56.
133 * profiler/Profiler.h:
135 2009-07-06 George Staikos <george.staikos@torchmobile.com>
137 Reviewed by Adam Treat.
139 Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura
141 https://bugs.webkit.org/show_bug.cgi?id=27030
142 Implement custom RNG for WinCE using Mersenne Twister
144 * wtf/RandomNumber.cpp:
146 * wtf/RandomNumberSeed.h:
147 (WTF::initializeRandomNumberGenerator):
148 * wtf/wince/mt19937ar.c: Added.
158 2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
160 Unreviewed make dist build fix.
164 2009-07-13 Drew Wilson <atwilson@google.com>
166 Reviewed by David Levin.
168 Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
169 https://bugs.webkit.org/show_bug.cgi?id=26932
171 Added ENABLE(SHARED_WORKERS) flag (off by default).
173 * Configurations/FeatureDefines.xcconfig:
175 2009-07-07 Norbert Leser <norbert.leser@nokia.com>
177 Reviewed by Maciej Stachoviak.
179 https://bugs.webkit.org/show_bug.cgi?id=27058
181 Removed superfluous parenthesis around single expression.
182 Compilers on Symbian platform fail to properly parse and compile.
184 * JavaScriptCore/wtf/Platform.h:
186 2009-07-13 Norbert Leser <norbert.leser@nokia.com>
188 Reviewed by Maciej Stachoviak.
190 https://bugs.webkit.org/show_bug.cgi?id=27054
192 Renamed Translator to HashTranslator
194 Codewarrior compiler (WINSCW) latest b482 cannot resolve typename
195 mismatch between template declaration and definition
196 (HashTranslator / Translator)
200 2009-07-13 Norbert Leser <norbert.leser@nokia.com>
202 Reviewed by Eric Seidel.
204 https://bugs.webkit.org/show_bug.cgi?id=27053
206 Ambiguity in LabelScope initialization
208 Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve
209 type of "0" unambiguously. Set expression explicitly to
210 PassRefPtr<Label>::PassRefPtr()
212 * bytecompiler/BytecodeGenerator.cpp
214 2009-07-11 Simon Fraser <simon.fraser@apple.com>
216 Enable support for accelerated compositing and 3d transforms on Leopard.
217 <https://bugs.webkit.org/show_bug.cgi?id=20166>
218 <rdar://problem/6120614>
220 Reviewed by Oliver Hunt.
222 * Configurations/FeatureDefines.xcconfig:
225 2009-07-10 Mark Rowe <mrowe@apple.com>
227 Second part of the "make Windows happier" dance.
229 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
230 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
232 2009-07-10 Mark Rowe <mrowe@apple.com>
234 Try and make the Windows build happy.
236 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
237 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
239 2009-07-10 Kevin McCullough <kmccullough@apple.com>
241 Reviewed by Geoffrey Garen.
243 * debugger/Debugger.h: Made this function virtual for use in WebCore's
246 2009-07-10 Kwang Yul Seo <skyul@company100.net>
248 Reviewed by Darin Adler.
250 ParserArenaDeletable should override delete
251 https://bugs.webkit.org/show_bug.cgi?id=26790
253 ParserArenaDeletable overrides new, but it does not override delete.
254 ParserArenaDeletable must be freed by fastFree
255 because it is allocated by fastMalloc.
257 * parser/NodeConstructors.h:
258 (JSC::ParserArenaDeletable::operator delete):
261 2009-07-10 Adam Roben <aroben@apple.com>
263 Sort all our Xcode projects
265 Accomplished using sort-Xcode-project-file.
267 Requested by Dave Kilzer.
269 * JavaScriptCore.xcodeproj/project.pbxproj:
271 2009-07-09 Maciej Stachowiak <mjs@apple.com>
273 Not reviewed, build fix.
275 Windows build fix for the last change.
277 * wtf/dtoa.cpp: Forgot to include Vector.h
279 2009-07-09 Maciej Stachowiak <mjs@apple.com>
281 Reviewed by Darin Adler.
283 REGRESSION: crash in edge cases of floating point parsing.
284 https://bugs.webkit.org/show_bug.cgi?id=27110
285 <rdar://problem/7044458>
287 Tests: fast/css/number-parsing-crash.html
288 fast/css/number-parsing-crash.html
289 fast/js/number-parsing-crash.html
292 (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector
295 (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts.
296 Added an assertion to verify that invariants are maintained.
298 All other functions are adapted fairly mechanically to the above changes.
299 (WTF::BigInt::clear):
301 (WTF::BigInt::resize):
302 (WTF::BigInt::words):
303 (WTF::BigInt::append):
317 2009-07-09 Drew Wilson <atwilson@google.com>
319 Reviewed by Alexey Proskuryakov.
321 Turned on CHANNEL_MESSAGING by default because the MessageChannel API
322 can now be implemented for Web Workers and is reasonably stable.
324 * Configurations/FeatureDefines.xcconfig:
326 2009-07-09 Oliver Hunt <oliver@apple.com>
328 Reviewed by NOBODY (Build fix).
330 * interpreter/Interpreter.cpp:
331 (JSC::Interpreter::privateExecute):
333 2009-07-09 Oliver Hunt <oliver@apple.com>
335 Reviewed by Darin Adler.
337 Bug 27016 - Interpreter crashes due to invalid array indexes
338 <https://bugs.webkit.org/show_bug.cgi?id=27016>
340 Unsigned vs signed conversions results in incorrect behaviour in
341 64bit interpreter builds.
343 * interpreter/Interpreter.cpp:
344 (JSC::Interpreter::privateExecute):
346 2009-07-09 Dimitri Glazkov <dglazkov@chromium.org>
348 Reviewed by Darin Fisher.
350 [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build.
351 https://bugs.webkit.org/show_bug.cgi?id=27135
353 * JavaScriptCore.gypi: Added.
355 2009-07-09 Joe Mason <joe.mason@torchmobile.com>
357 Reviewed by George Staikos.
359 Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
361 https://bugs.webkit.org/show_bug.cgi?id=27031
362 Add an override for deleteOwnedPtr(HDC) on Windows
364 * wtf/OwnPtrCommon.h:
366 (WTF::deleteOwnedPtr):
368 2009-07-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
370 Reviewed by Darin Adler.
372 Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc
375 https://bugs.webkit.org/show_bug.cgi?id=27026
377 Based on Norbert Leser's work.
380 (printUsageStatement):
384 2009-07-07 Gavin Barraclough <barraclough@apple.com>
386 Reviewed by Sam Weinig.
388 Stop loading constants into the register file.
390 Instead, use high register values (highest bit bar the sign bit set) to indicate
391 constants in the instruction stream, and when we encounter such a value load it
392 directly from the CodeBlock.
394 Since constants are no longer copied into the register file, this patch renders
395 the 'unexpected constant' mechanism redundant, and removes it.
397 2% improvement, thanks to Sam Weinig.
399 * bytecode/CodeBlock.cpp:
400 (JSC::CodeBlock::dump):
401 (JSC::CodeBlock::CodeBlock):
402 (JSC::CodeBlock::mark):
403 (JSC::CodeBlock::shrinkToFit):
404 * bytecode/CodeBlock.h:
405 (JSC::CodeBlock::isTemporaryRegisterIndex):
406 (JSC::CodeBlock::constantRegister):
407 (JSC::CodeBlock::isConstantRegisterIndex):
408 (JSC::CodeBlock::getConstant):
411 * bytecompiler/BytecodeGenerator.cpp:
412 (JSC::BytecodeGenerator::preserveLastVar):
413 (JSC::BytecodeGenerator::BytecodeGenerator):
414 (JSC::BytecodeGenerator::addConstantValue):
415 (JSC::BytecodeGenerator::emitEqualityOp):
416 (JSC::BytecodeGenerator::emitLoad):
417 (JSC::BytecodeGenerator::emitResolveBase):
418 (JSC::BytecodeGenerator::emitResolveWithBase):
419 (JSC::BytecodeGenerator::emitNewError):
420 * bytecompiler/BytecodeGenerator.h:
421 (JSC::BytecodeGenerator::emitNode):
422 * interpreter/CallFrame.h:
423 (JSC::ExecState::noCaller):
424 (JSC::ExecState::hasHostCallFrameFlag):
425 (JSC::ExecState::addHostCallFrameFlag):
426 (JSC::ExecState::removeHostCallFrameFlag):
427 * interpreter/Interpreter.cpp:
428 (JSC::Interpreter::resolve):
429 (JSC::Interpreter::resolveSkip):
430 (JSC::Interpreter::resolveGlobal):
431 (JSC::Interpreter::resolveBase):
432 (JSC::Interpreter::resolveBaseAndProperty):
433 (JSC::Interpreter::resolveBaseAndFunc):
434 (JSC::Interpreter::dumpRegisters):
435 (JSC::Interpreter::throwException):
436 (JSC::Interpreter::createExceptionScope):
437 (JSC::Interpreter::privateExecute):
438 (JSC::Interpreter::retrieveArguments):
440 (JSC::JIT::privateCompileMainPass):
441 * jit/JITInlineMethods.h:
442 (JSC::JIT::emitLoadDouble):
443 (JSC::JIT::emitLoadInt32ToDouble):
444 * jit/JITOpcodes.cpp:
445 (JSC::JIT::emit_op_new_error):
446 (JSC::JIT::emit_op_enter):
447 (JSC::JIT::emit_op_enter_with_activation):
449 (JSC::DeleteResolveNode::emitBytecode):
450 (JSC::DeleteValueNode::emitBytecode):
451 (JSC::PrefixResolveNode::emitBytecode):
452 * runtime/JSActivation.cpp:
453 (JSC::JSActivation::JSActivation):
456 2009-07-07 Mark Rowe <mrowe@apple.com>
458 Reviewed by Darin Adler.
460 Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>.
461 Bug 27025: Crashes and regression test failures related to regexps in 64-bit
463 For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but
464 neglects to save and restore it. The change in handling of the output vector in r45545
465 altered code generation so that the RegExp::match was now storing important data in rbx,
466 which caused crashes and bogus results when it was clobbered.
469 (JSC::Yarr::RegexGenerator::generateEnter): Save rbx.
470 (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx.
472 2009-07-06 Ada Chan <adachan@apple.com>
474 Reviewed by Darin Adler and Mark Rowe.
476 Decommitted spans are added to the list of normal spans rather than
477 the returned spans in TCMalloc_PageHeap::Delete().
478 https://bugs.webkit.org/show_bug.cgi?id=26998
480 In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in
481 the process of merging with neighboring spans that are also decommitted.
482 The merged span needs to be placed in the list of returned spans (spans
483 whose memory has been returned to the system). Right now it's always added
484 to the list of the normal spans which can theoretically cause thrashing.
486 * wtf/FastMalloc.cpp:
487 (WTF::TCMalloc_PageHeap::Delete):
489 2009-07-05 Lars Knoll <lars.knoll@nokia.com>
491 Reviewed by Maciej Stachowiak.
493 https://bugs.webkit.org/show_bug.cgi?id=26843
495 Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
497 The Metrowerks compiler on the Symbian platform moves the globally
498 defined Hashtables into read-only memory, despite one of the members
499 being mutable. This causes crashes at run-time due to write access to
502 Avoid the use of const with this compiler by introducing the
503 JSC_CONST_HASHTABLE macro.
505 Based on idea by Norbert Leser.
507 * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
508 * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
509 * runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
511 2009-07-04 Dan Bernstein <mitz@apple.com>
515 * runtime/RegExpConstructor.cpp:
516 (JSC::RegExpConstructor::getLastParen):
518 2009-07-03 Yong Li <yong.li@torchmobile.com>
520 Reviewed by Maciej Stachowiak (and revised slightly)
522 RegExp::match to be optimized
523 https://bugs.webkit.org/show_bug.cgi?id=26957
525 Allow regexp matching to use Vectors with inline capacity instead of
526 allocating a new ovector buffer every time.
528 ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall.
530 * runtime/RegExp.cpp:
531 (JSC::RegExp::match):
533 * runtime/RegExpConstructor.cpp:
534 (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
535 (JSC::RegExpConstructorPrivate::lastOvector):
536 (JSC::RegExpConstructorPrivate::tempOvector):
537 (JSC::RegExpConstructorPrivate::changeLastOvector):
538 (JSC::RegExpConstructor::performMatch):
539 (JSC::RegExpMatchesArray::RegExpMatchesArray):
540 (JSC::RegExpMatchesArray::fillArrayInstance):
541 (JSC::RegExpConstructor::getBackref):
542 (JSC::RegExpConstructor::getLastParen):
543 (JSC::RegExpConstructor::getLeftContext):
544 (JSC::RegExpConstructor::getRightContext):
545 * runtime/StringPrototype.cpp:
546 (JSC::stringProtoFuncSplit):
548 2009-06-30 Kwang Yul Seo <skyul@company100.net>
550 Reviewed by Eric Seidel.
552 Override operator new/delete with const std::nothrow_t& as the second
554 https://bugs.webkit.org/show_bug.cgi?id=26792
556 On Windows CE, operator new/delete, new[]/delete[] with const
557 std::nothrow_t& must be overrided because some standard template
558 libraries use these operators.
560 The problem occurs when memory allocated by new(size_t s, const
561 std::nothrow_t&) is freed by delete(void* p). This causes the umatched
564 The patch overrides all new, delete, new[] and delete[] to use
565 fastMaloc and fastFree consistently.
570 2009-06-30 Gabor Loki <loki@inf.u-szeged.hu>
572 Reviewed by Sam Weinig.
574 <https://bugs.webkit.org/show_bug.cgi?id=24986>
576 Remove unnecessary references to AssemblerBuffer.
578 * interpreter/Interpreter.cpp:
579 * interpreter/Interpreter.h:
581 2009-06-29 David Levin <levin@chromium.org>
583 Reviewed by Oliver Hunt.
585 Still seeing occasional leaks from UString::sharedBuffer code
586 https://bugs.webkit.org/show_bug.cgi?id=26420
588 The problem is that the pointer to the memory allocation isn't visible
589 by "leaks" due to the lower bits being used as flags. The fix is to
590 make the pointer visible in memory (in debug only). The downside of
591 this fix that the memory allocated by sharedBuffer will still look like
592 a leak in non-debug builds when any flags are set.
595 (WTF::PtrAndFlags::set):
597 2009-06-29 Sam Weinig <sam@webkit.org>
599 Reviewed by Mark Rowe.
601 Remove more unused scons support.
603 * SConstruct: Removed.
605 2009-06-29 Oliver Hunt <oliver@apple.com>
607 Reviewed by Gavin Barraclough.
609 <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters
610 <https://bugs.webkit.org/show_bug.cgi?id=26802>
612 In the original JSON.parse patch unicode was handled correctly, however in some last
613 minute "clean up" I oversimplified isSafeStringCharacter. This patch corrects this bug.
615 * runtime/LiteralParser.cpp:
616 (JSC::isSafeStringCharacter):
617 (JSC::LiteralParser::Lexer::lexString):
619 2009-06-26 Oliver Hunt <oliver@apple.com>
621 Reviewed by Dan Bernstein.
623 <rdar://problem/7009684> REGRESSION(r45039): Crashes inside JSEvent::put on PowerPC (26746)
624 <https://bugs.webkit.org/show_bug.cgi?id=26746>
626 Fix for r45039 incorrectly uncached a get_by_id by converting it to put_by_id. Clearly this
627 is less than correct. This patch corrects that error.
629 * interpreter/Interpreter.cpp:
630 (JSC::Interpreter::tryCacheGetByID):
632 2009-06-26 Eric Seidel <eric@webkit.org>
634 No review, only rolling out r45259.
636 Roll out r45259 after crash appeared on the bots:
637 plugins/undefined-property-crash.html
638 ASSERTION FAILED: s <= HeapConstants<heapType>::cellSize
639 (leopard-intel-debug-tests/build/JavaScriptCore/runtime/Collector.cpp:278
640 void* JSC::Heap::heapAllocate(size_t) [with JSC::HeapType heapType = PrimaryHeap])
642 * runtime/DateInstance.cpp:
643 * runtime/Identifier.cpp:
645 * runtime/RegExpConstructor.cpp:
646 * runtime/RegExpObject.h:
647 * runtime/ScopeChain.h:
650 2009-06-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
652 Reviewed by Simon Hausmann.
654 Add support for QDataStream operators to Vector.
660 2009-06-24 Sam Weinig <sam@webkit.org>
662 Reviewed by Gavin Barraclough.
664 Make the opcode sampler work once again.
667 (JSC::JIT::compileGetByIdProto):
668 (JSC::JIT::compileGetByIdSelfList):
669 (JSC::JIT::compileGetByIdProtoList):
670 (JSC::JIT::compileGetByIdChainList):
671 (JSC::JIT::compileGetByIdChain):
672 (JSC::JIT::compilePutByIdTransition):
673 (JSC::JIT::compileCTIMachineTrampolines):
674 (JSC::JIT::compilePatchGetArrayLength):
676 (JSC::JITStubCall::call):
678 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
680 Reviewed by Maciej Stachowiak.
682 Extend FastAllocBase.h with 'using WTF::FastAllocBase' to avoid
683 unnecessary WTF:: usings.
684 Remove existing unnecessary WTF:: usings.
686 * interpreter/Interpreter.h:
687 * profiler/CallIdentifier.h:
688 * runtime/ScopeChain.h:
689 * wtf/FastAllocBase.h:
691 2009-06-24 David Levin <levin@chromium.org>
695 * bytecode/CodeBlock.h:
696 * bytecompiler/BytecodeGenerator.h:
697 * interpreter/Register.h:
699 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
701 Reviewed by Maciej Stachowiak.
703 https://bugs.webkit.org/show_bug.cgi?id=26677
705 Inherits CodeBlock class from FastAllocBase because it
706 has been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.h:217.
708 * bytecode/CodeBlock.h:
710 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
712 Reviewed by Maciej Stachowiak.
714 https://bugs.webkit.org/show_bug.cgi?id=26676
716 Inherits BytecodeGenerator class from FastAllocBase because it has been
717 instantiated by 'new' in JavaScriptCore/parser/Nodes.cpp:1892.
719 * bytecompiler/BytecodeGenerator.h:
721 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
723 Reviewed by Maciej Stachowiak.
725 https://bugs.webkit.org/show_bug.cgi?id=26675
727 Inherits Register class from FastAllocBase because it has been
728 instantiated by 'new' in JavaScriptCore/runtime/JSVariableObject.h:149.
730 * interpreter/Register.h:
732 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
734 Reviewed by Darin Adler.
736 https://bugs.webkit.org/show_bug.cgi?id=26674
738 Inherits HashMap class from FastAllocBase because it has been
739 instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:458.
743 2009-06-24 Oliver Hunt <oliver@apple.com>
745 Reviewed by Darin Adler.
747 <rdar://problem/6940519> REGRESSION (Safari 4 Public Beta - TOT): google.com/adplanner shows blank page instead of site details in "basic research'
749 The problem was caused by the page returned with a function using a
750 var declaration list containing around ~3000 variables. The solution
751 to this is to flatten the comma expression representation and make
752 codegen comma expressions and initializer lists iterative rather than
756 * parser/NodeConstructors.h:
757 (JSC::CommaNode::CommaNode):
759 (JSC::CommaNode::emitBytecode):
761 (JSC::ExpressionNode::isCommaNode):
762 (JSC::CommaNode::isCommaNode):
763 (JSC::CommaNode::append):
765 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
767 Reviewed by Maciej Stachowiak.
769 https://bugs.webkit.org/show_bug.cgi?id=26645
771 Inherits ScopeChainNode class from FastAllocBase because it has been
772 instantiated by 'new' in JavaScriptCore/runtime/ScopeChain.h:95.
776 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
778 Reviewed by Darin Adler.
780 https://bugs.webkit.org/show_bug.cgi?id=26648
782 Inherits Deque class from FastAllocBase because it has been
783 instantiated by 'new' with DEFINE_STATIC_LOCAL macro in
784 JavaScriptCore/wtf/MainThread.cpp:62.
788 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
790 Reviewed by Darin Adler.
792 https://bugs.webkit.org/show_bug.cgi?id=26644
794 Inherits RefPtr class from FastAllocBase because it has been
795 instantiated by 'new' in JavaScriptCore/runtime/StructureChain.cpp:41.
799 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
801 Reviewed by Darin Adler.
803 Inherits HashSet class from FastAllocBase, because it has been
804 instantiated by 'new' in JavaScriptCore/runtime/Collector.h:116.
808 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
810 Reviewed by Darin Adler.
812 Inherits Vector class from FastAllocBase because it has been
813 instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:633.
817 2009-06-24 Norbert Leser <norbert.leser@nokia.com>
819 Reviewed by Maciej Stachoviak.
821 The BytecodeGenerator objects were instantiated on stack, which takes up ~38kB per instance
822 (each instance includes copy of JSC::CodeBlock with large SymbolTable, etc.).
823 Specifically, since there is nested invocation (e.g., GlobalCode --> FunctionCode),
824 the stack overflows immediately on Symbian hardware (max. 80 kB).
825 Proposed change allocates generator objects on heap.
826 Performance impact (if any) should be negligible and change is proposed as general fix,
827 rather than ifdef'd for SYMBIAN.
830 (JSC::ProgramNode::generateBytecode):
831 (JSC::EvalNode::generateBytecode):
832 (JSC::EvalNode::bytecodeForExceptionInfoReparse):
833 (JSC::FunctionBodyNode::generateBytecode):
834 (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
836 2009-06-23 Oliver Hunt <oliver@apple.com>
838 Reviewed by Gavin Barraclough.
840 <rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593)
841 <https://bugs.webkit.org/show_bug.cgi?id=26593>
843 Do not attempt to cache structure chains if they contain a dictionary at any level.
845 * interpreter/Interpreter.cpp:
846 (JSC::Interpreter::tryCachePutByID):
847 (JSC::Interpreter::tryCacheGetByID):
849 (JSC::JITThunks::tryCachePutByID):
850 * runtime/Structure.cpp:
851 (JSC::Structure::getEnumerablePropertyNames):
852 (JSC::Structure::addPropertyTransition):
853 * runtime/StructureChain.cpp:
854 (JSC::StructureChain::isCacheable):
855 * runtime/StructureChain.h:
857 2009-06-23 Yong Li <yong.li@torchmobile.com>
859 Reviewed by George Staikos.
861 https://bugs.webkit.org/show_bug.cgi?id=26654
862 Add the proper export define for the JavaScriptCore API when building for WINCE.
866 2009-06-23 Joe Mason <joe.mason@torchmobile.com>
868 Reviewed by Adam Treat.
870 Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
872 https://bugs.webkit.org/show_bug.cgi?id=26611
873 Implement currentThreadStackBase on WINCE by adding a global,
874 g_stackBase, which must be set to the address of a local variable
875 by the caller before calling any WebKit function that invokes JSC.
877 * runtime/Collector.cpp:
878 (JSC::isPageWritable):
880 Starts at the top of the stack and returns the entire range of
881 consecutive writable pages as an estimate of the actual stack.
882 This will be much bigger than the actual stack range, so some
883 dead objects can't be collected, but it guarantees live objects
884 aren't collected prematurely.
886 (JSC::currentThreadStackBase):
887 On WinCE, returns g_stackBase if set or call getStackBase as a
890 2009-06-23 Oliver Hunt <oliver@apple.com>
892 Reviewed by Alexey Proskuryakov.
894 Fix stupid performance problem in the LiteralParser
896 The LiteralParser was making a new UString in order to use
897 toDouble, however UString's toDouble allows a much wider range
898 of numberic strings than the LiteralParser accepts, and requires
899 an additional heap allocation or two for the construciton of the
900 UString. To rectify this we just call WTF::dtoa directly using
901 a stack allocated buffer to hold the validated numeric literal.
903 * runtime/LiteralParser.cpp:
904 (JSC::LiteralParser::Lexer::lexNumber):
905 (JSC::LiteralParser::parse):
906 * runtime/LiteralParser.h:
908 2009-06-22 Oliver Hunt <oliver@apple.com>
910 Reviewed by Alexey Proskuryakov.
912 Bug 26640: JSON.stringify needs to special case Boolean objects
913 <https://bugs.webkit.org/show_bug.cgi?id=26640>
915 Add special case handling of the Boolean object so we match current
918 * runtime/JSONObject.cpp:
919 (JSC::unwrapBoxedPrimitive): renamed from unwrapNumberOrString
921 (JSC::Stringifier::appendStringifiedValue):
923 2009-06-22 Oliver Hunt <oliver@apple.com>
925 Reviewed by Darin Adler.
927 Bug 26591: Support revivers in JSON.parse
928 <https://bugs.webkit.org/show_bug.cgi?id=26591>
930 Add reviver support to JSON.parse. This completes the JSON object.
932 * runtime/JSONObject.cpp:
933 (JSC::Walker::Walker):
934 (JSC::Walker::callReviver):
936 (JSC::JSONProtoFuncParse):
938 2009-06-21 Oliver Hunt <oliver@apple.com>
940 Reviewed by Darin Adler.
942 Bug 26592: Support standard toJSON functions
943 <https://bugs.webkit.org/show_bug.cgi?id=26592>
945 Add support for the standard Date.toJSON function.
947 * runtime/DatePrototype.cpp:
948 (JSC::dateProtoFuncToJSON):
950 2009-06-21 Oliver Hunt <oliver@apple.com>
952 Reviewed by Sam Weinig.
954 Bug 26594: JSC needs to support Date.toISOString
955 <https://bugs.webkit.org/show_bug.cgi?id=26594>
957 Add support for Date.toISOString.
959 * runtime/DatePrototype.cpp:
960 (JSC::dateProtoFuncToISOString):
962 2009-06-21 Oliver Hunt <oliver@apple.com>
964 Reviewed by NOBODY (Build fix).
968 * runtime/LiteralParser.cpp:
969 (JSC::LiteralParser::parse):
971 2009-06-21 Oliver Hunt <oliver@apple.com>
973 Reviewed by Darin Adler and Cameron Zwarich.
975 Bug 26587: Support JSON.parse
976 <https://bugs.webkit.org/show_bug.cgi?id=26587>
978 Extend the LiteralParser to support the full strict JSON
979 grammar, fix a few places where the grammar was incorrectly
980 lenient. Doesn't yet support the JSON.parse reviver function
981 but that does not block the JSON.parse functionality itself.
983 * interpreter/Interpreter.cpp:
984 (JSC::Interpreter::callEval):
985 * runtime/JSGlobalObjectFunctions.cpp:
986 (JSC::globalFuncEval):
987 * runtime/JSONObject.cpp:
988 (JSC::JSONProtoFuncParse):
989 * runtime/LiteralParser.cpp:
990 (JSC::LiteralParser::Lexer::lex):
991 (JSC::isSafeStringCharacter):
992 (JSC::LiteralParser::Lexer::lexString):
993 (JSC::LiteralParser::parse):
994 * runtime/LiteralParser.h:
995 (JSC::LiteralParser::LiteralParser):
996 (JSC::LiteralParser::tryJSONParse):
997 (JSC::LiteralParser::):
998 (JSC::LiteralParser::Lexer::Lexer):
1000 2009-06-21 David Levin <levin@chromium.org>
1002 Reviewed by NOBODY (speculative build fix for windows).
1004 Simply removed some whitespace form this file to make windows build wtf and
1005 hopefully copy the new MessageQueque.h so that WebCore picks it up.
1007 * wtf/Assertions.cpp:
1009 2009-06-21 Drew Wilson <atwilson@google.com>
1011 Reviewed by David Levin.
1013 <https://bugs.webkit.org/show_bug.cgi?id=25043>
1014 Added support for multi-threaded MessagePorts.
1016 * wtf/MessageQueue.h:
1017 (WTF::::appendAndCheckEmpty):
1018 Added API to test whether the queue was empty before adding an element.
1020 2009-06-20 David D. Kilzer <ddkilzer@webkit.org>
1022 Fix namespace comment in SegmentedVector.h
1024 * wtf/SegmentedVector.h: Updated namespace comment to reflect
1025 new namespace after r44897.
1027 2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
1029 Bug 24986: ARM JIT port
1030 <https://bugs.webkit.org/show_bug.cgi?id=24986>
1032 Reviewed by Oliver Hunt.
1034 An Iterator added for SegmentedVector. Currently
1035 only the pre ++ operator is supported.
1037 * wtf/SegmentedVector.h:
1038 (WTF::SegmentedVectorIterator::~SegmentedVectorIterator):
1039 (WTF::SegmentedVectorIterator::operator*):
1040 (WTF::SegmentedVectorIterator::operator->):
1041 (WTF::SegmentedVectorIterator::operator++):
1042 (WTF::SegmentedVectorIterator::operator==):
1043 (WTF::SegmentedVectorIterator::operator!=):
1044 (WTF::SegmentedVectorIterator::operator=):
1045 (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
1046 (WTF::SegmentedVector::alloc):
1047 (WTF::SegmentedVector::begin):
1048 (WTF::SegmentedVector::end):
1050 2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
1052 Bug 24986: ARM JIT port
1053 <https://bugs.webkit.org/show_bug.cgi?id=24986>
1055 Reviewed by Oliver Hunt.
1057 Move SegmentedVector to /wtf subdirectory
1058 and change "namespace JSC" to "namespace WTF"
1060 Additional build file updates by David Kilzer.
1062 * GNUmakefile.am: Updated path to SegmentedVector.h.
1063 * JavaScriptCore.order: Updated SegmentedVector namespace from
1064 JSC to WTF in mangled C++ method name.
1065 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1066 Removed reference to bytecompiler\SegmentedVector.h.
1067 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to
1068 wtf\SegmentedVector.h.
1069 * JavaScriptCore.xcodeproj/project.pbxproj: Moved
1070 SegmentedVector.h definition from bytecompiler subdirectory to
1072 * bytecompiler/BytecodeGenerator.h: Updated #include path to
1073 SegmentedVector.h and prepended WTF:: namespace to its use.
1074 * parser/Lexer.h: Ditto.
1075 * wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h.
1076 (WTF::SegmentedVector::SegmentedVector):
1077 (WTF::SegmentedVector::~SegmentedVector):
1078 (WTF::SegmentedVector::size):
1079 (WTF::SegmentedVector::at):
1080 (WTF::SegmentedVector::operator[]):
1081 (WTF::SegmentedVector::last):
1082 (WTF::SegmentedVector::append):
1083 (WTF::SegmentedVector::removeLast):
1084 (WTF::SegmentedVector::grow):
1085 (WTF::SegmentedVector::clear):
1086 (WTF::SegmentedVector::deleteAllSegments):
1087 (WTF::SegmentedVector::segmentExistsFor):
1088 (WTF::SegmentedVector::segmentFor):
1089 (WTF::SegmentedVector::subscriptFor):
1090 (WTF::SegmentedVector::ensureSegmentsFor):
1091 (WTF::SegmentedVector::ensureSegment):
1093 2009-06-19 Gavin Barraclough <barraclough@apple.com>
1095 Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h).
1098 (JSC::JIT::privateCompile):
1099 (JSC::JIT::privateCompileCTIMachineTrampolines):
1100 (JSC::JIT::emitGetVariableObjectRegister):
1101 (JSC::JIT::emitPutVariableObjectRegister):
1103 * jit/JITArithmetic.cpp:
1104 (JSC::JIT::emit_op_rshift):
1105 (JSC::JIT::emitSlow_op_jnless):
1106 (JSC::JIT::emitSlow_op_jnlesseq):
1107 (JSC::JIT::compileBinaryArithOp):
1109 (JSC::JIT::compileOpCallInitializeCallFrame):
1110 (JSC::JIT::compileOpCall):
1111 * jit/JITInlineMethods.h:
1112 (JSC::JIT::restoreArgumentReference):
1113 (JSC::JIT::checkStructure):
1114 * jit/JITOpcodes.cpp:
1115 (JSC::JIT::emit_op_instanceof):
1116 (JSC::JIT::emit_op_get_scoped_var):
1117 (JSC::JIT::emit_op_put_scoped_var):
1118 (JSC::JIT::emit_op_construct_verify):
1119 (JSC::JIT::emit_op_resolve_global):
1120 (JSC::JIT::emit_op_jeq_null):
1121 (JSC::JIT::emit_op_jneq_null):
1122 (JSC::JIT::emit_op_to_jsnumber):
1123 (JSC::JIT::emit_op_catch):
1124 (JSC::JIT::emit_op_eq_null):
1125 (JSC::JIT::emit_op_neq_null):
1126 (JSC::JIT::emit_op_convert_this):
1127 (JSC::JIT::emit_op_profile_will_call):
1128 (JSC::JIT::emit_op_profile_did_call):
1129 (JSC::JIT::emitSlow_op_get_by_val):
1130 * jit/JITPropertyAccess.cpp:
1131 (JSC::JIT::emit_op_get_by_val):
1132 (JSC::JIT::emit_op_put_by_val):
1133 (JSC::JIT::emit_op_method_check):
1134 (JSC::JIT::compileGetByIdHotPath):
1135 (JSC::JIT::emit_op_put_by_id):
1136 (JSC::JIT::compilePutDirectOffset):
1137 (JSC::JIT::compileGetDirectOffset):
1138 (JSC::JIT::privateCompilePutByIdTransition):
1139 (JSC::JIT::privateCompilePatchGetArrayLength):
1141 (JSC::JITThunks::JITThunks):
1143 2009-06-19 Gavin Barraclough <barraclough@apple.com>
1145 Reviewed by NOBODY (Windows build fix).
1148 * jit/JITInlineMethods.h:
1150 2009-06-19 Gabor Loki <loki@inf.u-szeged.hu>
1152 Reviewed by Gavin Barraclough.
1154 Reorganize ARM architecture specific macros.
1155 Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).
1157 Bug 24986: ARM JIT port
1158 <https://bugs.webkit.org/show_bug.cgi?id=24986>
1160 * assembler/ARMv7Assembler.h:
1161 * assembler/AbstractMacroAssembler.h:
1162 (JSC::AbstractMacroAssembler::Imm32::Imm32):
1163 * assembler/MacroAssembler.h:
1164 * assembler/MacroAssemblerCodeRef.h:
1165 (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
1166 * jit/ExecutableAllocator.h:
1167 (JSC::ExecutableAllocator::cacheFlush):
1169 * jit/JITInlineMethods.h:
1170 (JSC::JIT::restoreArgumentReferenceForTrampoline):
1174 * yarr/RegexJIT.cpp:
1175 (JSC::Yarr::RegexGenerator::generateEnter):
1176 (JSC::Yarr::RegexGenerator::generateReturn):
1178 2009-06-19 Gavin Barraclough <barraclough@apple.com>
1180 Reviewed by Oliver Hunt.
1182 Fix armv7 JIT build issues.
1184 Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types),
1185 and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros.
1187 * Replace offsetofs with FIELD_OFFSETs (safe on C++ objects).
1188 * Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor.
1192 * jit/JITInlineMethods.h:
1193 (JSC::JIT::restoreArgumentReference):
1194 * jit/JITOpcodes.cpp:
1195 (JSC::JIT::emit_op_catch):
1197 (JSC::JITThunks::JITThunks):
1199 2009-06-19 Adam Treat <adam.treat@torchmobile.com>
1201 Blind attempt at build fix.
1203 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1204 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1206 2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
1208 Reviewed by Oliver Hunt.
1210 Inherits CallIdentifier struct from FastAllocBase because it has been
1211 instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86.
1213 * wtf/HashCountedSet.h:
1215 2009-06-19 Adam Treat <adam.treat@torchmobile.com>
1217 Reviewed by Oliver Hunt.
1219 https://bugs.webkit.org/show_bug.cgi?id=26540
1220 Modify the test shell to add a new function 'checkSyntax' that will
1221 only parse the source instead of executing it. In this way we can test
1222 pure parsing performance against some of the larger scripts in the wild.
1225 (GlobalObject::GlobalObject):
1226 (functionCheckSyntax):
1228 2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
1230 Reviewed by Darin Adler.
1232 Inherits HashCountedSet class from FastAllocBase because it has been
1233 instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095.
1235 * wtf/HashCountedSet.h:
1237 2009-06-19 Yong Li <yong.li@torchmobile.com>
1239 Reviewed by George Staikos.
1241 https://bugs.webkit.org/show_bug.cgi?id=26558
1242 Declare these symbols extern for WINCE as they are provided by libce.
1244 * runtime/DateConstructor.cpp:
1245 * runtime/DatePrototype.cpp:
1246 (JSC::formatLocaleDate):
1248 2009-06-19 Oliver Hunt <oliver@apple.com>
1250 Reviewed by Maciej Stachowiak.
1252 <rdar://problem/6988973> ScopeChain leak in interpreter builds
1254 Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT)
1257 * runtime/JSFunction.cpp:
1258 (JSC::JSFunction::~JSFunction):
1261 2009-06-19 Yong Li <yong.li@torchmobile.com>
1263 Reviewed by George Staikos.
1265 https://bugs.webkit.org/show_bug.cgi?id=26543
1266 Windows CE uses 'GetLastError' instead of 'errno.'
1268 * interpreter/RegisterFile.h:
1269 (JSC::RegisterFile::RegisterFile):
1270 (JSC::RegisterFile::grow):
1272 2009-06-19 David Levin <levin@chromium.org>
1274 Reviewed by NOBODY (Windows build fix).
1276 Add export for Windows corresponding to OSX export done in r44844.
1277 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1278 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1280 2009-06-18 Oliver Hunt <oliver@apple.com>
1282 Reviewed by Gavin "Viceroy of Venezuela" Barraclough.
1284 Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected
1285 <https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385>
1287 We need to make sure that each native function instance correctly unlinks any references to it
1288 when it is collected. Allowing this to happen required a few changes:
1289 * Every native function needs a codeblock to track the link information
1290 * To have this codeblock, every function now also needs its own functionbodynode
1291 so we no longer get to have a single shared instance.
1292 * Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode
1294 * JavaScriptCore.exp:
1295 * bytecode/CodeBlock.cpp:
1296 (JSC::CodeBlock::CodeBlock):
1297 Constructor for NativeCode CodeBlock
1298 (JSC::CodeBlock::derefStructures):
1299 (JSC::CodeBlock::refStructures):
1300 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
1301 (JSC::CodeBlock::handlerForBytecodeOffset):
1302 (JSC::CodeBlock::lineNumberForBytecodeOffset):
1303 (JSC::CodeBlock::expressionRangeForBytecodeOffset):
1304 (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
1305 (JSC::CodeBlock::functionRegisterForBytecodeOffset):
1306 (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
1307 (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
1308 (JSC::CodeBlock::setJITCode):
1309 Add assertions to ensure we don't try and use NativeCode CodeBlocks as
1312 * bytecode/CodeBlock.h:
1314 (JSC::CodeBlock::source):
1315 (JSC::CodeBlock::sourceOffset):
1316 (JSC::CodeBlock::evalCodeCache):
1317 (JSC::CodeBlock::createRareDataIfNecessary):
1321 (JSC::JIT::privateCompileCTIMachineTrampolines):
1322 (JSC::JIT::linkCall):
1323 Update logic to allow native function caching
1327 (JSC::FunctionBodyNode::createNativeThunk):
1328 (JSC::FunctionBodyNode::isHostFunction):
1330 * runtime/JSFunction.cpp:
1331 (JSC::JSFunction::JSFunction):
1332 (JSC::JSFunction::~JSFunction):
1333 (JSC::JSFunction::mark):
1334 * runtime/JSGlobalData.cpp:
1335 (JSC::JSGlobalData::~JSGlobalData):
1336 * runtime/JSGlobalData.h:
1338 2009-06-18 Gavin Barraclough <barraclough@apple.com>
1340 Reviewed by NOBODY (Windows build fix).
1343 (WTF::calculateUTCOffset):
1345 2009-06-18 Gavin Barraclough <barraclough@apple.com>
1347 Reviewed by Geoff Garen.
1349 Timezone calculation incorrect in Venezuela.
1351 https://bugs.webkit.org/show_bug.cgi?id=26531
1352 <rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3
1354 The problem is that we're calculating the timezone relative to 01/01/2000,
1355 but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007.
1356 According to the spec, section 15.9.1.9 states "the time since the beginning
1357 of the year", presumably meaning the *current* year. Change the calculation
1358 to be based on whatever the current year is, rather than a canned date.
1360 No performance impact.
1363 (WTF::calculateUTCOffset):
1365 2009-06-18 Gavin Barraclough <barraclough@apple.com>
1367 Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig).
1369 (Reintroducing patch added in r44492, and reverted in r44796.)
1371 Change the implementation of op_throw so the stub function always modifies its
1372 return address - if it doesn't find a 'catch' it will switch to a trampoline
1373 to force a return from JIT execution. This saves memory, by avoiding the need
1374 for a unique return for every op_throw.
1376 * jit/JITOpcodes.cpp:
1377 (JSC::JIT::emit_op_throw):
1378 JITStubs::cti_op_throw now always changes its return address,
1379 remove return code generated after the stub call (this is now
1380 handled by ctiOpThrowNotCaught).
1383 Add ctiOpThrowNotCaught definitions.
1384 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
1385 Change cti_op_throw to always change its return address.
1387 Add ctiOpThrowNotCaught declaration.
1389 2009-06-18 Kevin McCullough <kmccullough@apple.com>
1391 Reviewed by Oliver Hunt.
1393 <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
1395 - Exposed functions now needed by WebCore.
1397 * JavaScriptCore.exp:
1399 2009-06-17 Darin Adler <darin@apple.com>
1401 Reviewed by Oliver Hunt.
1403 Bug 26429: Make JSON.stringify non-recursive so it can handle objects
1404 of arbitrary complexity
1405 https://bugs.webkit.org/show_bug.cgi?id=26429
1407 For marking I decided not to use gcProtect, because this is inside the engine
1408 so it's easy enough to just do marking. And that darned gcProtect does locking!
1409 Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor
1410 for that class says "FIXME: Remove all clients of this API, then remove this API."
1412 * runtime/Collector.cpp:
1413 (JSC::Heap::collect): Add a call to JSONObject::markStringifiers.
1415 * runtime/CommonIdentifiers.cpp:
1416 (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier.
1417 * runtime/CommonIdentifiers.h: Ditto.
1419 * runtime/JSGlobalData.cpp:
1420 (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0.
1421 * runtime/JSGlobalData.h: Added firstStringifierToMark.
1423 * runtime/JSONObject.cpp: Cut down the includes to the needed ones only.
1424 (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string
1425 objects to get their number and string values.
1426 (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used
1427 to wrap an identifier or integer so we don't have to do any work unless we
1428 actually call a replacer.
1429 (JSC::ReplacerPropertyName::value): Added.
1430 (JSC::gap): Added. Helper function for the Stringifier constructor.
1431 (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added.
1432 The class is used to wrap an identifier or integer so we don't have to
1433 allocate a number or string until we actually call toJSON or a replacer.
1434 (JSC::PropertyNameForFunctionCall::asJSValue): Added.
1435 (JSC::Stringifier::Stringifier): Updated and moved out of the class
1436 definition. Added code to hook this into a singly linked list for marking.
1437 (JSC::Stringifier::~Stringifier): Remove from the singly linked list.
1438 (JSC::Stringifier::mark): Mark all the objects in the holder stacks.
1439 (JSC::Stringifier::stringify): Updated.
1440 (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit.
1441 (JSC::Stringifier::toJSON): Renamed from toJSONValue.
1442 (JSC::Stringifier::appendStringifiedValue): Renamed from stringify.
1443 Added code to use the m_holderStack to do non-recursive stringify of
1444 objects and arrays. This code also uses the timeout checker since in
1445 pathological cases it could be slow even without calling into the
1446 JavaScript virtual machine.
1447 (JSC::Stringifier::willIndent): Added.
1448 (JSC::Stringifier::indent): Added.
1449 (JSC::Stringifier::unindent): Added.
1450 (JSC::Stringifier::startNewLine): Added.
1451 (JSC::Stringifier::Holder::Holder): Added.
1452 (JSC::Stringifier::Holder::appendNextProperty): Added. This is the
1453 function that handles the format of arrays and objects.
1454 (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom
1455 of the file so the JSONObject class is not interleaved with the
1457 (JSC::JSONObject::markStringifiers): Added. Calls mark.
1458 (JSC::JSONProtoFuncStringify): Streamlined the code here. The code
1459 to compute the gap string is now a separate function.
1461 * runtime/JSONObject.h: Made everything private. Added markStringifiers.
1463 2009-06-17 Oliver Hunt <oliver@apple.com>
1465 Reviewed by Gavin Barraclough.
1467 <rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com
1469 Roll out r43849 as it appears that we cannot rely on the address of
1470 an objects property storage being constant even if the structure is
1474 * jit/JITPropertyAccess.cpp:
1475 (JSC::JIT::compileGetDirectOffset):
1476 (JSC::JIT::privateCompileGetByIdProto):
1477 (JSC::JIT::privateCompileGetByIdProtoList):
1478 (JSC::JIT::privateCompileGetByIdChainList):
1479 (JSC::JIT::privateCompileGetByIdChain):
1481 2009-06-17 Gavin Barraclough <barraclough@apple.com>
1483 Rubber Stamped by Mark Rowe.
1485 Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>.
1487 * jit/JITOpcodes.cpp:
1488 (JSC::JIT::emit_op_throw):
1491 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
1494 2009-06-17 Gavin Barraclough <barraclough@apple.com>
1496 Reviewed by Mark Rowe.
1498 <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit
1500 On 64-bit, NaN-encoded values must be detagged before they can be used in rshift.
1502 No performance impact.
1504 * jit/JITArithmetic.cpp:
1505 (JSC::JIT::emit_op_rshift):
1507 2009-06-17 Adam Treat <adam.treat@torchmobile.com>
1509 Reviewed by George Staikos.
1511 https://bugs.webkit.org/show_bug.cgi?id=23155
1512 Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
1517 2009-06-17 George Staikos <george.staikos@torchmobile.com>
1519 Reviewed by Adam Treat.
1521 https://bugs.webkit.org/show_bug.cgi?id=23155
1522 Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
1526 * wtf/Assertions.cpp:
1528 * wtf/CurrentTime.cpp:
1529 (WTF::lowResUTCTime):
1531 (WTF::getLocalTime):
1534 * wtf/StringExtras.h:
1536 * wtf/win/MainThreadWin.cpp:
1538 2009-06-17 Gavin Barraclough <barraclough@apple.com>
1540 Reviewed by Oliver Hunt.
1542 <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
1544 Remove PropertySlot::putValue - PropertySlots should only be used for getting,
1545 not putting. Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite,
1546 which is what it really was being used to ask, and remove some other getOwnPropertySlot
1547 & getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion.
1549 * runtime/JSGlobalObject.h:
1550 (JSC::JSGlobalObject::hasOwnPropertyForWrite):
1551 * runtime/JSObject.h:
1552 * runtime/JSStaticScopeObject.cpp:
1553 * runtime/JSStaticScopeObject.h:
1554 * runtime/PropertySlot.h:
1556 2009-06-16 Gavin Barraclough <barraclough@apple.com>
1558 Reviewed by Oliver hunt.
1560 Temporarily partially disable r44492, since this is causing some problems on internal builds.
1562 * jit/JITOpcodes.cpp:
1563 (JSC::JIT::emit_op_throw):
1565 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
1567 2009-06-16 Sam Weinig <sam@webkit.org>
1574 2009-06-16 Sam Weinig <sam@webkit.org>
1576 Reviewed by Oliver Hunt.
1578 Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize
1579 it for each type of stub using the return address to find the correct
1585 (JSC::JIT::compileGetByIdProto):
1586 (JSC::JIT::compileGetByIdSelfList):
1587 (JSC::JIT::compileGetByIdProtoList):
1588 (JSC::JIT::compileGetByIdChainList):
1589 (JSC::JIT::compileGetByIdChain):
1590 (JSC::JIT::compilePutByIdTransition):
1591 (JSC::JIT::compileCTIMachineTrampolines):
1592 (JSC::JIT::compilePatchGetArrayLength):
1593 * jit/JITStubCall.h:
1594 (JSC::JITStubCall::call):
1596 == Rolled over to ChangeLog-2009-06-16 ==