1 2011-06-04 Kevin Ollivier <kevino@theolliviers.com>
3 [wx] Unreviewed build fix. Restore the PPC build and allow users to specify architectures
8 2011-06-04 Gustavo Noronha Silva <gns@gnome.org>
10 Unreviewed, MIPS build fix.
12 WebKitGTK+ tarball fails to build on MIPS.
13 https://buildd.debian.org/status/fetch.php?pkg=webkitgtk%2B&arch=mips&ver=1.4.0-1&stamp=1304786691
15 * GNUmakefile.list.am: Add missing MIPS-related file to the list
16 of files that are added to the tarball on make dist, and fix
19 2011-06-04 Sam Weinig <sam@webkit.org>
21 Reviewed by Darin Adler.
23 Fix formatting of the output generated by KeywordLookupGenerator.py
24 https://bugs.webkit.org/show_bug.cgi?id=62083
26 - Uses correct year for copyright.
27 - Puts ending brace on same line as "else if"
28 - Puts starting brace of function on its own line.
29 - Adds some tasteful whitespace.
30 - Adds comments to make clear that scopes are ending
31 - Make macros actually split on two lines.
33 * KeywordLookupGenerator.py:
35 2011-06-04 Adam Barth <abarth@webkit.org>
37 Reviewed by Eric Seidel.
39 KeywordLookupGenerator.py spams stdout in Chromium Linux build
40 https://bugs.webkit.org/show_bug.cgi?id=62087
42 This action does not appear to be needed.
44 * JavaScriptCore.gyp/JavaScriptCore.gyp:
46 2011-06-03 Oliver Hunt <oliver@apple.com>
48 Reviewed by Maciej Stachowiak.
50 Lexer needs to provide Identifier for reserved words
51 https://bugs.webkit.org/show_bug.cgi?id=62086
53 Alas it is necessary to provide an Identifier reference for keywords
54 so that we can do the right thing when they're used in object literals.
55 We now keep Identifiers for all reserved words in the CommonIdentifiers
56 structure so that we can access them without a hash lookup.
58 * KeywordLookupGenerator.py:
60 (JSC::Lexer::parseIdentifier):
62 * runtime/CommonIdentifiers.cpp:
63 (JSC::CommonIdentifiers::CommonIdentifiers):
64 * runtime/CommonIdentifiers.h:
66 2011-06-03 Gavin Barraclough <barraclough@apple.com>
68 Reviewed by Sam Weinig.
70 Add debug code to break on speculation failures.
72 * dfg/DFGJITCompiler.cpp:
73 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
74 (JSC::DFG::JITCompiler::compileFunction):
77 2011-06-03 Gavin Barraclough <barraclough@apple.com>
79 Reviewed by Sam Weinig.
81 https://bugs.webkit.org/show_bug.cgi?id=62082
82 DFG JIT - bug passing arguments that need swap
84 This is really just a typo.
85 When setting up the arguments for a call out to a C operation, we'll
86 fail to swap arguments where this is necessary. For example, in the
87 case of 2 arg calls, where the first argument is in %rdx & the second
88 is in %rsi we should swap (exec will be passed in %rdi), but we don't.
90 This can also affect function calls passing three arguments.
92 * dfg/DFGJITCodeGenerator.h:
93 (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
94 - Call swap with the correct arguments.
96 2011-06-03 Oliver Hunt <oliver@apple.com>
98 Reviewed by Gavin Barraclough.
100 Force inlining of some hot lexer functions
101 https://bugs.webkit.org/show_bug.cgi?id=62079
103 Fix more GCC stupidity
106 (JSC::Lexer::isWhiteSpace):
107 (JSC::Lexer::isLineTerminator):
109 2011-06-03 Oliver Hunt <oliver@apple.com>
111 Reviewed by Gavin Barraclough.
113 GCC not inlining some functions that it really should be
114 https://bugs.webkit.org/show_bug.cgi?id=62075
116 Add ALWAYS_INLINE to a number of parsing and lexing functions
117 that should always be inlined. This gets us ~1.4% on my ad hoc
120 * KeywordLookupGenerator.py:
121 * parser/JSParser.cpp:
122 (JSC::JSParser::next):
123 (JSC::JSParser::nextTokenIsColon):
124 (JSC::JSParser::consume):
125 (JSC::JSParser::match):
126 (JSC::JSParser::tokenStart):
127 (JSC::JSParser::tokenLine):
128 (JSC::JSParser::tokenEnd):
132 2011-06-03 Oliver Hunt <oliver@apple.com>
134 Whoops, fix last minute bug.
137 (JSC::Lexer::parseIdentifier):
139 2011-06-03 Martin Robinson <mrobinson@igalia.com>
141 Try to fix the GTK+ build.
143 * GNUmakefile.am: Clean up some spaces that should be tabs.
144 * GNUmakefile.list.am: Add KeywordLookup.h to the source list
145 and clean up some spaces that should be tabs.
147 2011-06-03 Oliver Hunt <oliver@apple.com>
149 Reviewed by Geoffrey Garen.
151 Improve keyword lookup
152 https://bugs.webkit.org/show_bug.cgi?id=61913
154 Rather than doing multiple hash lookups as we currently
155 do when trying to identify keywords we now use an
156 automatically generated decision tree (essentially it's
157 a hard coded patricia trie). We still use the regular
158 lookup table for the last few characters of an input as
159 this allows us to completely skip all bounds checks.
162 * DerivedSources.make:
163 * DerivedSources.pro:
165 * JavaScriptCore.gyp/JavaScriptCore.gyp:
166 * JavaScriptCore.xcodeproj/project.pbxproj:
167 * KeywordLookupGenerator.py: Added.
168 * make-generated-sources.sh:
170 (JSC::Lexer::internalShift):
172 (JSC::Lexer::parseIdentifier):
175 2011-06-03 Siddharth Mathur <siddharth.mathur@nokia.com>
177 Reviewed by Benjamin Poulain.
179 [Qt] Build flag for experimental ICU library support
180 https://bugs.webkit.org/show_bug.cgi?id=60786
182 Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental
183 ICU powered Unicode support.
185 * JavaScriptCore.pri: Support for use_system_icu CONFIG flag.
186 * wtf/unicode/qt4/UnicodeQt4.h: Guard an include file with USE(ICU_UNICODE).
188 2011-06-03 Alexis Menard <alexis.menard@openbossa.org>
190 Reviewed by Benjamin Poulain.
192 [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
193 https://bugs.webkit.org/show_bug.cgi?id=61957
195 When building inside the Qt source tree, qmake always append the mkspecs
196 defines after ours. We have to workaround and make sure that we append
197 our flags after the qmake variable used inside Qt. This workaround was provided
198 by our qmake folks. We need to append in both case because qmake behave differently
199 when called with -spec or via SUBDIR+=. This patch unbreak r87950 on Mac for Qt port.
201 * JavaScriptCore.pro:
203 2011-06-02 Jay Civelli <jcivelli@chromium.org>
205 Reviewed by Adam Barth.
207 Added a method to generate RFC 2822 compliant date strings.
208 https://bugs.webkit.org/show_bug.cgi?id=7169
211 (WTF::twoDigitStringFromNumber):
212 (WTF::makeRFC2822DateString):
215 2011-06-02 Alexis Menard <alexis.menard@openbossa.org>
217 Reviewed by Andreas Kling.
219 [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
220 https://bugs.webkit.org/show_bug.cgi?id=61957
222 When building inside the Qt source tree, qmake always append the mkspecs
223 defines after ours. We have to workaround and make sure that we append
224 our flags after the qmake variable used inside Qt. This workaround was provided
227 * JavaScriptCore.pro:
229 2011-06-01 Oliver Hunt <oliver@apple.com>
231 Reviewed by Geoffrey Garen.
233 Add single character lookup cache to IdentifierArena
234 https://bugs.webkit.org/show_bug.cgi?id=61879
236 Add a simple lookup cache for single ascii character
237 identifiers. Produces around a 2% improvement in parse
238 time for my adhoc parser test.
240 * parser/ParserArena.h:
241 (JSC::IdentifierArena::IdentifierArena):
242 (JSC::IdentifierArena::clear):
243 (JSC::IdentifierArena::makeIdentifier):
245 2011-05-31 Oliver Hunt <oliver@apple.com>
247 Reviewed by Geoffrey Garen.
249 Freezing a function and its prototype causes browser to crash.
250 https://bugs.webkit.org/show_bug.cgi?id=61758
252 Make JSObject::preventExtensions virtual so that we can override it
253 and instantiate all lazy
255 * JavaScriptCore.exp:
256 * runtime/JSFunction.cpp:
257 (JSC::createPrototypeProperty):
258 (JSC::JSFunction::preventExtensions):
259 (JSC::JSFunction::getOwnPropertySlot):
260 * runtime/JSFunction.h:
261 * runtime/JSObject.h:
262 * runtime/JSObject.cpp:
263 (JSC::JSObject::seal):
264 (JSC::JSObject::seal):
266 2011-06-01 Sheriff Bot <webkit.review.bot@gmail.com>
268 Unreviewed, rolling out r87788.
269 http://trac.webkit.org/changeset/87788
270 https://bugs.webkit.org/show_bug.cgi?id=61856
272 breaks windows chromium canary (Requested by jknotten on
279 2011-06-01 Jay Civelli <jcivelli@chromium.org>
281 Reviewed by Adam Barth.
283 Added a method to generate RFC 2822 compliant date strings.
284 https://bugs.webkit.org/show_bug.cgi?id=7169
287 (WTF::twoDigitStringFromNumber):
288 (WTF::makeRFC2822DateString):
291 2011-05-31 Yong Li <yoli@rim.com>
293 Reviewed by Eric Seidel.
295 https://bugs.webkit.org/show_bug.cgi?id=54807
296 We have been assuming plain bitfields (like "int a : 31") are always signed integers.
297 However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain
298 bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned.
299 http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html
300 Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers,
301 always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good
302 rule we should have in order to make our code independent from compilers and compiler flags.
304 No new test added because this change is not known to fix any issue.
306 * bytecode/StructureStubInfo.h:
308 2011-05-30 Hojong Han <hojong.han@samsung.com>
310 Reviewed by Geoffrey Garen.
312 [JSC] malfunction during arithmetic condition check with negative number (-2147483648)
313 https://bugs.webkit.org/show_bug.cgi?id=61416
315 * assembler/MacroAssemblerARM.h:
316 (JSC::MacroAssemblerARM::branch32):
317 * tests/mozilla/ecma/Expressions/11.12-1.js:
320 2011-05-29 Geoffrey Garen <ggaren@apple.com>
322 Reviewed by Sam Weinig.
324 Some heap refactoring
325 https://bugs.webkit.org/show_bug.cgi?id=61704
327 SunSpider says no change.
329 * JavaScriptCore.exp: Export!
331 * heap/Heap.cpp: COLLECT_ON_EVERY_ALLOCATION can actually do so now.
333 (JSC::Heap::Heap): Changed Heap sub-objects to point to the heap.
335 (JSC::Heap::allocate): Changed inline allocation code to only select the
336 size class, since this can be optimized out at compile time -- everything
337 else is now inlined into this out-of-line function.
339 No need to duplicate ASSERTs made in our caller.
343 (JSC::Heap::isMarked):
344 (JSC::Heap::testAndSetMarked):
345 (JSC::Heap::testAndClearMarked):
346 (JSC::Heap::setMarked): Call directly into MarkedBlock instead of adding
347 a layer of indirection through MarkedSpace.
349 (JSC::Heap::allocate): See above.
351 * heap/MarkedBlock.cpp:
352 (JSC::MarkedBlock::create):
353 (JSC::MarkedBlock::MarkedBlock):
354 * heap/MarkedBlock.h: Changed Heap sub-objects to point to the heap.
356 * heap/MarkedSpace.cpp:
357 (JSC::MarkedSpace::MarkedSpace):
358 (JSC::MarkedSpace::allocateBlock):
359 * heap/MarkedSpace.h:
360 (JSC::MarkedSpace::allocate): Updated to match changes above.
362 2011-05-28 David Kilzer <ddkilzer@apple.com>
364 BUILD FIX when building only the interpreter
366 Fixes the following compiler warning:
368 JavaScriptCore/runtime/JSGlobalData.cpp:462:6: error: no previous prototype for function 'releaseExecutableMemory' [-Werror,-Wmissing-prototypes,3]
369 void releaseExecutableMemory(JSGlobalData& globalData)
372 * jit/ExecutableAllocator.h: Moved declaration of
373 JSC::releaseExecutableMemory().
375 2011-05-28 David Kilzer <ddkilzer@apple.com>
377 BUILD FIX after r87527 with ENABLE(BRANCH_COMPACTION)
379 * assembler/LinkBuffer.h:
380 (JSC::LinkBuffer::linkCode): Added missing argument.
382 2011-05-27 Geoffrey Garen <ggaren@apple.com>
384 Reviewed by Oliver Hunt.
386 JS API is too aggressive about throwing exceptions for NULL get or set operations
387 https://bugs.webkit.org/show_bug.cgi?id=61678
389 * API/JSCallbackObject.h: Changed our staticValueGetter to a regular
390 function that returns a JSValue, so it can fail and still forward to
391 normal property lookup.
393 * API/JSCallbackObjectFunctions.h:
394 (JSC::::getOwnPropertySlot): Don't throw an exception when failing to
395 access a static property -- just forward the access. This allows objects
396 to observe get/set operations but still let the JS object manage lifetime.
400 (JSC::::getStaticValue): Same as JSCallbackObject.h.
402 * API/tests/testapi.c:
403 (MyObject_set_nullGetForwardSet):
404 * API/tests/testapi.js: Updated tests to reflect slightly less strict
405 behavior, which matches headerdoc claims.
407 2011-05-27 Geoffrey Garen <ggaren@apple.com>
409 Reviewed by Oliver Hunt.
411 Property caching is too aggressive for API objects
412 https://bugs.webkit.org/show_bug.cgi?id=61677
414 * API/JSCallbackObject.h: Opt in to ProhibitsPropertyCaching, since our
415 callback APIs allow the client to change its mind about our propertis at
418 * API/tests/testapi.c:
419 (PropertyCatchalls_getProperty):
420 (PropertyCatchalls_setProperty):
421 (PropertyCatchalls_getPropertyNames):
422 (PropertyCatchalls_class):
424 * API/tests/testapi.js: Some tests for dynamic API objects.
426 * interpreter/Interpreter.cpp:
427 (JSC::Interpreter::tryCachePutByID):
428 (JSC::Interpreter::tryCacheGetByID):
430 (JSC::JITThunks::tryCachePutByID):
431 (JSC::JITThunks::tryCacheGetByID):
432 (JSC::DEFINE_STUB_FUNCTION): Opt out of property caching if the client
435 * runtime/JSTypeInfo.h:
436 (JSC::TypeInfo::TypeInfo):
437 (JSC::TypeInfo::isFinal):
438 (JSC::TypeInfo::prohibitsPropertyCaching):
439 (JSC::TypeInfo::flags): Added a flag to track opting out of property
440 caching. Fixed an "&&" vs "&" typo that was previously harmless, but
441 is now harmful since m_flags2 can have more than one bit set.
443 2011-05-27 Stephanie Lewis <slewis@apple.com>
447 Fix a typo in the order_file flag.
449 * Configurations/Base.xcconfig:
451 2011-05-27 Patrick Gansterer <paroga@webkit.org>
453 Unreviewed. Build fix for !ENABLE(ASSEMBLER) after r87527.
455 * runtime/JSGlobalData.cpp:
456 (JSGlobalData::JSGlobalData):
458 2011-05-27 Oliver Hunt <oliver@apple.com>
460 Reviewed by Geoffrey Garen.
462 Add a few validity assertions to JSCallbackObject
463 https://bugs.webkit.org/show_bug.cgi?id=61659
465 * API/JSCallbackObject.h:
466 (JSC::JSCallbackObject::visitChildren):
468 2011-05-27 Oliver Hunt <oliver@apple.com>
472 * runtime/RegExpCache.cpp:
473 (JSC::RegExpCache::invalidateCode):
475 2011-05-27 Oliver Hunt <oliver@apple.com>
477 Reviewed by Geoffrey Garen.
479 Try to release unused executable memory when the FixedVMPool allocator is under pressure
480 https://bugs.webkit.org/show_bug.cgi?id=61651
482 Rather than crashing when full the FixedVMPool allocator now returns a null
483 allocation. We replace the code that used to CRASH() on null allocations
484 with logic that asks the provided globalData to release any executable memory
485 that it can. Currently this just means throwing away all regexp code, but
486 in future we'll try to be more aggressive.
488 * assembler/ARMAssembler.cpp:
489 (JSC::ARMAssembler::executableCopy):
490 * assembler/ARMAssembler.h:
491 * assembler/AssemblerBuffer.h:
492 (JSC::AssemblerBuffer::executableCopy):
493 * assembler/AssemblerBufferWithConstantPool.h:
494 * assembler/LinkBuffer.h:
495 (JSC::LinkBuffer::LinkBuffer):
496 (JSC::LinkBuffer::linkCode):
497 * assembler/MIPSAssembler.h:
498 (JSC::MIPSAssembler::executableCopy):
499 * assembler/SH4Assembler.h:
500 (JSC::SH4Assembler::executableCopy):
501 * assembler/X86Assembler.h:
502 (JSC::X86Assembler::executableCopy):
503 (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
504 * dfg/DFGJITCompiler.cpp:
505 (JSC::DFG::JITCompiler::compileFunction):
506 * jit/ExecutableAllocator.h:
507 (JSC::ExecutablePool::create):
508 (JSC::ExecutablePool::alloc):
509 (JSC::ExecutableAllocator::ExecutableAllocator):
510 (JSC::ExecutableAllocator::poolForSize):
511 (JSC::ExecutablePool::ExecutablePool):
512 (JSC::ExecutablePool::poolAllocate):
513 * jit/ExecutableAllocatorFixedVMPool.cpp:
514 (JSC::FixedVMPoolAllocator::alloc):
516 (JSC::JIT::privateCompile):
517 * jit/JITOpcodes.cpp:
518 (JSC::JIT::privateCompileCTIMachineTrampolines):
519 * jit/JITOpcodes32_64.cpp:
520 (JSC::JIT::privateCompileCTIMachineTrampolines):
521 (JSC::JIT::privateCompileCTINativeCall):
522 * jit/JITPropertyAccess.cpp:
523 (JSC::JIT::stringGetByValStubGenerator):
524 (JSC::JIT::privateCompilePutByIdTransition):
525 (JSC::JIT::privateCompilePatchGetArrayLength):
526 (JSC::JIT::privateCompileGetByIdProto):
527 (JSC::JIT::privateCompileGetByIdSelfList):
528 (JSC::JIT::privateCompileGetByIdProtoList):
529 (JSC::JIT::privateCompileGetByIdChainList):
530 (JSC::JIT::privateCompileGetByIdChain):
531 * jit/JITPropertyAccess32_64.cpp:
532 (JSC::JIT::stringGetByValStubGenerator):
533 (JSC::JIT::privateCompilePutByIdTransition):
534 (JSC::JIT::privateCompilePatchGetArrayLength):
535 (JSC::JIT::privateCompileGetByIdProto):
536 (JSC::JIT::privateCompileGetByIdSelfList):
537 (JSC::JIT::privateCompileGetByIdProtoList):
538 (JSC::JIT::privateCompileGetByIdChainList):
539 (JSC::JIT::privateCompileGetByIdChain):
540 * jit/SpecializedThunkJIT.h:
541 (JSC::SpecializedThunkJIT::finalize):
542 * jit/ThunkGenerators.cpp:
543 (JSC::charCodeAtThunkGenerator):
544 (JSC::charAtThunkGenerator):
545 (JSC::fromCharCodeThunkGenerator):
546 (JSC::sqrtThunkGenerator):
547 (JSC::powThunkGenerator):
548 * runtime/JSGlobalData.cpp:
549 (JSC::JSGlobalData::JSGlobalData):
550 (JSC::JSGlobalData::releaseExecutableMemory):
551 (JSC::releaseExecutableMemory):
552 * runtime/JSGlobalData.h:
553 * runtime/RegExpCache.cpp:
554 (JSC::RegExpCache::invalidateCode):
555 * runtime/RegExpCache.h:
557 (JSC::Yarr::YarrGenerator::compile):
559 2011-05-26 Geoffrey Garen <ggaren@apple.com>
561 Reviewed by Oliver Hunt.
563 Optimized ConservativeSet to avoid double-visiting objects
564 https://bugs.webkit.org/show_bug.cgi?id=61592
566 SunSpider thinks this might be a 1% speedup
568 * heap/ConservativeRoots.h:
569 (JSC::ConservativeRoots::add): Use testAndClearMarked to avoid double-visiting
573 (JSC::Heap::isMarked):
574 (JSC::Heap::testAndSetMarked):
575 (JSC::Heap::testAndClearMarked):
576 (JSC::Heap::setMarked): Added testAndClearMarked. Changed argument type
577 to void*, since clients want to ask questions about arbitrary pointers
578 into the heap, even when they aren't known to be JSCells.
580 * heap/MarkedBlock.h:
581 (JSC::MarkedBlock::testAndClearMarked):
582 * heap/MarkedSpace.h:
583 (JSC::MarkedSpace::isMarked):
584 (JSC::MarkedSpace::testAndSetMarked):
585 (JSC::MarkedSpace::testAndClearMarked):
586 (JSC::MarkedSpace::setMarked):
587 (JSC::MarkedSpace::contains): Ditto.
590 (WTF::::testAndClear): New function for ConservativeRoots's inverted
593 2011-05-27 Stephanie Lewis <slewis@apple.com>
595 Rubber Stamped by Adam Roben.
597 Update Order Files. Use -order_file flag since it can order more of the binary.
599 * Configurations/Base.xcconfig:
600 * JavaScriptCore.order:
602 2011-05-26 Geoffrey Garen <ggaren@apple.com>
604 Reviewed by Oliver Hunt.
606 Renamed heapRootMarker to heapRootVisitor to match its class name
607 https://bugs.webkit.org/show_bug.cgi?id=61584
610 (JSC::Heap::markProtectedObjects):
611 (JSC::Heap::markTempSortVectors):
612 (JSC::Heap::markRoots):
614 2011-05-26 Geoffrey Garen <ggaren@apple.com>
616 Reviewed by Oliver Hunt.
618 Removed some interdependency between Heap and SmallStrings by simplifying
619 the SmallStrings lifetime model
620 https://bugs.webkit.org/show_bug.cgi?id=61579
622 SunSpider reports no change.
624 Using Weak<T> could accomplish this too, but we're not sure it will give
625 us the performance we need. This is a first step, and it accomplishes
626 most of the value of using Weak<T>.
629 (JSC::Heap::destroy):
630 (JSC::Heap::markRoots):
631 (JSC::Heap::reset): Finalize small strings just like other weak handles.
633 * runtime/SmallStrings.cpp:
635 (JSC::SmallStrings::finalizeSmallStrings):
636 * runtime/SmallStrings.h: Make all small strings trivially weak, instead
637 of having an "all for one, one for all" memory model.
639 2011-05-26 Oliver Hunt <oliver@apple.com>
641 Reviewed by Geoffrey Garen.
643 Make RegExpCache a weak map
644 https://bugs.webkit.org/show_bug.cgi?id=61554
646 Switch to a weak map for the regexp cache, and hide that
647 behaviour behind RegExp::create.
649 When a RegExp is compiled it attempts to add itself to
650 the "strong" cache. This cache is a simple round-robin
651 buffer as was the old strong cache. Happily this can
652 be smaller than the old strong cache as RegExps are only
653 added when they're compiled so it is under less pressure
656 * bytecompiler/NodesCodegen.cpp:
657 (JSC::RegExpNode::emitBytecode):
658 * runtime/RegExp.cpp:
659 (JSC::RegExp::RegExp):
660 (JSC::RegExp::create):
661 (JSC::RegExp::match):
663 (JSC::RegExp::gcShouldInvalidateCode):
664 (JSC::RegExp::hasCode):
666 * runtime/RegExpCache.cpp:
667 (JSC::RegExpCache::lookupOrCreate):
668 (JSC::RegExpCache::RegExpCache):
669 (JSC::RegExpCache::isReachableFromOpaqueRoots):
670 (JSC::RegExpCache::finalize):
671 * runtime/RegExpCache.h:
672 * runtime/RegExpConstructor.cpp:
673 (JSC::constructRegExp):
674 * runtime/RegExpPrototype.cpp:
675 (JSC::regExpProtoFuncCompile):
676 * runtime/StringPrototype.cpp:
677 (JSC::stringProtoFuncMatch):
678 (JSC::stringProtoFuncSearch):
680 2011-05-26 Geoffrey Garen <ggaren@apple.com>
682 Reviewed by Oliver Hunt.
684 Moved Heap-related functions out of JSCell.h and into respective header files
685 https://bugs.webkit.org/show_bug.cgi?id=61567
688 (JSC::Heap::allocate):
690 * heap/MarkedBlock.h:
691 (JSC::MarkedBlock::allocate):
692 * heap/MarkedSpace.h:
693 (JSC::MarkedSpace::sizeClassFor):
694 (JSC::MarkedSpace::allocate):
696 (JSC::JSCell::destructor):
698 2011-05-26 Geoffrey Garen <ggaren@apple.com>
700 Try to fix Windows build.
702 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
704 2011-05-26 Ryosuke Niwa <rniwa@webkit.org>
706 Reviewed by Eric Seidel.
708 [debug feature] WTFString should have show() method
709 https://bugs.webkit.org/show_bug.cgi?id=61149
711 Added String::show and AtomicString::show in NDEBUG.
713 * wtf/text/AtomicString.cpp:
714 (WTF::AtomicString::show):
715 * wtf/text/AtomicString.h:
716 * wtf/text/WTFString.cpp:
718 * wtf/text/WTFString.h:
720 2011-05-26 Geoffrey Garen <ggaren@apple.com>
722 Reviewed by Geoffrey Garen.
724 Factored out some Heap ASSERTs
725 https://bugs.webkit.org/show_bug.cgi?id=61565
727 * JavaScriptCore.exp:
729 (JSC::isValidSharedInstanceThreadState):
730 (JSC::isValidThreadState):
731 (JSC::Heap::markRoots):
732 (JSC::Heap::isValidAllocation):
735 (JSC::JSCell::Heap::allocate):
737 2011-05-26 Gavin Barraclough <barraclough@apple.com>
739 Reviewed by Geoff Garen.
741 https://bugs.webkit.org/show_bug.cgi?id=61508
742 DFG JIT - Add support for get by id self caching.
744 Change the call out to be an unexpected call (using silent spill/fill functions),
745 add a structure check & compact load to the JIT code, and add repatching mechanisms.
746 Since DFGOperations may want to be be implemented in asm, make these symbols be extern
747 "C". Add an asm wrapper to pass the return address to the optimizing get-by-id operation,
748 so that it can look up its StructureStubInfo.
750 * JavaScriptCore.xcodeproj/project.pbxproj:
752 * bytecode/StructureStubInfo.h:
753 - Added 'unset' entries to union.
754 * dfg/DFGJITCodeGenerator.h:
755 (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheck):
756 - Return the call, we need this to populate the StructureStubInfo.
757 * dfg/DFGJITCompiler.cpp:
758 (JSC::DFG::JITCompiler::compileFunction):
759 - Populate the CodebBlock's StructureStubInfo Vector.
760 * dfg/DFGJITCompiler.h:
761 (JSC::DFG::JITCompiler::appendCallWithExceptionCheck):
762 - Return the call, we need this to populate the StructureStubInfo.
763 (JSC::DFG::JITCompiler::addPropertyAccess):
764 (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
765 - Add structures to record property access info during compilation.
766 * dfg/DFGOperations.cpp:
767 - Made all external methods extern "C".
768 (JSC::DFG::operationPutByValInternal):
769 - Moved outside of the extern "C" block.
770 * dfg/DFGOperations.h:
771 - Made all external methods extern "C".
772 * dfg/DFGRepatch.cpp: Added.
773 (JSC::DFG::dfgRepatchCall):
774 - repatch a call to link to a new callee function.
775 (JSC::DFG::dfgRepatchGetByIdSelf):
776 - Modify the JIT code to optimize self accesses.
777 (JSC::DFG::tryCacheGetByID):
778 - Internal implementation of dfgRepatchGetByID (factor out failing cases).
779 (JSC::DFG::dfgRepatchGetByID):
780 - Used to optimize 'operationGetByIdOptimize' - repatches to 'operationGetById', and tries to optimize self accesses!
781 * dfg/DFGRepatch.h: Added.
782 - Expose dfgRepatchGetByID.
783 * dfg/DFGSpeculativeJIT.cpp:
784 (JSC::DFG::SpeculativeJIT::compile):
785 - Changed implementation of GetById ops.
787 2011-05-26 Geoffrey Garen <ggaren@apple.com>
789 Rolled back in http://trac.webkit.org/changeset/87408 with Windows build fixed.
791 * heap/MarkedBlock.cpp:
792 (JSC::MarkedBlock::MarkedBlock):
793 * heap/MarkedBlock.h:
794 * wtf/DoublyLinkedList.h:
795 (WTF::::DoublyLinkedListNode):
800 (WTF::::DoublyLinkedList):
809 2011-05-26 Geoffrey Garen <ggaren@apple.com>
811 Rolled out http://trac.webkit.org/changeset/87408 because it broke the
814 * heap/MarkedBlock.cpp:
815 (JSC::MarkedBlock::MarkedBlock):
816 * heap/MarkedBlock.h:
817 (JSC::MarkedBlock::setPrev):
818 (JSC::MarkedBlock::setNext):
819 (JSC::MarkedBlock::prev):
820 (JSC::MarkedBlock::next):
821 * wtf/DoublyLinkedList.h:
822 (WTF::::DoublyLinkedList):
828 2011-05-26 Geoffrey Garen <ggaren@apple.com>
830 Reviewed by Oliver Hunt.
832 Provide a real owner when copying a property table, for the sake of
834 https://bugs.webkit.org/show_bug.cgi?id=61547
836 No test because we can't enable the writeBarrier() ASSERT just yet.
838 * runtime/Structure.cpp:
839 (JSC::Structure::addPropertyTransition):
841 2011-05-26 Adam Roben <aroben@apple.com>
843 Windows build fix after r87346
845 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Fixed up exports to match
848 2011-05-26 Patrick Gansterer <paroga@webkit.org>
850 Reviewed by Adam Barth.
852 ASSERT(isMainThread()) when using single threaded jsc executable
853 https://bugs.webkit.org/show_bug.cgi?id=60846
855 Remove the ASSERT since we do not have the concept of MainThread in JSC.
857 * wtf/CryptographicallyRandomNumber.cpp:
858 (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
859 (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
861 2011-05-25 Gavin Barraclough <barraclough@apple.com>
863 Reviewed by Sam Weinig.
865 https://bugs.webkit.org/show_bug.cgi?id=61506
867 Move the silent spill/fill methods in the DFG JIT to the JITCodeGenerator
868 so that they are available to the SpeculativeJIT.
870 * dfg/DFGJITCodeGenerator.h:
871 (JSC::DFG::JITCodeGenerator::silentSpillGPR):
872 (JSC::DFG::JITCodeGenerator::silentSpillFPR):
873 (JSC::DFG::JITCodeGenerator::silentFillGPR):
874 (JSC::DFG::JITCodeGenerator::silentFillFPR):
875 (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
876 (JSC::DFG::JITCodeGenerator::silentFillAllRegisters):
877 * dfg/DFGNonSpeculativeJIT.h:
879 2011-05-25 Ryosuke Niwa <rniwa@webkit.org>
881 An attempt to revive Windows bots.
883 * runtime/RegExp.cpp:
886 2011-05-25 Gavin Barraclough <barraclough@apple.com>
888 Reviewed by Sam Weinig.
890 Bug 61503 - Move population of CodeBlock::m_structureStubInfos into JIT
892 This data structure, used at runtime by the JIT, is currently unnecessarily populated
893 with default entries during byte compilation.
895 Aside from meaning that there is JIT specific code in the bytecompiler, this also ties
896 us to one entry per corresponding bytecode op, which may be undesirable. Instead,
897 populate this array from the JIT.
899 The type StructureStubInfo has two unused states, one for gets & one for puts. Unify
900 these, so that the class can have a default constructor (and to simply switch statements
901 in code walking over the table).
903 This change has ramification for the DFG JIT, in that the DFG JIT used this datastructure
904 to check for functions containing property access. Instead do so in the DFGByteCodeParser.
906 * bytecode/CodeBlock.cpp:
907 (JSC::printStructureStubInfo):
908 * bytecode/CodeBlock.h:
909 (JSC::CodeBlock::setNumberOfStructureStubInfos):
910 (JSC::CodeBlock::numberOfStructureStubInfos):
911 * bytecode/StructureStubInfo.cpp:
912 (JSC::StructureStubInfo::deref):
913 (JSC::StructureStubInfo::visitAggregate):
914 * bytecode/StructureStubInfo.h:
915 (JSC::StructureStubInfo::StructureStubInfo):
916 * bytecompiler/BytecodeGenerator.cpp:
917 (JSC::BytecodeGenerator::emitGetById):
918 (JSC::BytecodeGenerator::emitPutById):
919 (JSC::BytecodeGenerator::emitDirectPutById):
920 * dfg/DFGByteCodeParser.cpp:
921 (JSC::DFG::ByteCodeParser::parseBlock):
924 (JSC::JIT::privateCompileMainPass):
925 (JSC::JIT::privateCompileSlowCases):
926 (JSC::JIT::privateCompile):
928 * jit/JITPropertyAccess.cpp:
929 (JSC::JIT::emit_op_get_by_id):
930 (JSC::JIT::emit_op_put_by_id):
931 (JSC::JIT::emit_op_method_check):
932 (JSC::JIT::compileGetByIdHotPath):
933 (JSC::JIT::compileGetByIdSlowCase):
934 (JSC::JIT::emitSlow_op_put_by_id):
935 * jit/JITPropertyAccess32_64.cpp:
936 (JSC::JIT::emit_op_get_by_id):
937 (JSC::JIT::emitSlow_op_get_by_id):
938 (JSC::JIT::emit_op_put_by_id):
939 (JSC::JIT::emitSlow_op_put_by_id):
940 (JSC::JIT::emit_op_method_check):
941 (JSC::JIT::compileGetByIdHotPath):
942 (JSC::JIT::compileGetByIdSlowCase):
943 * runtime/Executable.cpp:
944 (JSC::tryDFGCompile):
946 2011-05-25 Gavin Barraclough <barraclough@apple.com>
948 Reviewed by Sam Weinig.
950 Bug 61501 - Unify AbstractMacroAssembler::differenceBetween methods.
952 * assembler/AbstractMacroAssembler.h:
953 (JSC::AbstractMacroAssembler::Call::Call):
954 (JSC::AbstractMacroAssembler::Call::fromTailJump):
955 (JSC::AbstractMacroAssembler::Jump::Jump):
956 (JSC::AbstractMacroAssembler::Jump::link):
957 (JSC::AbstractMacroAssembler::Jump::linkTo):
958 (JSC::AbstractMacroAssembler::Jump::isSet):
959 (JSC::AbstractMacroAssembler::differenceBetween):
960 (JSC::AbstractMacroAssembler::linkJump):
961 (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
962 * assembler/LinkBuffer.h:
963 (JSC::LinkBuffer::link):
964 (JSC::LinkBuffer::locationOf):
965 (JSC::LinkBuffer::locationOfNearCall):
966 (JSC::LinkBuffer::returnAddressOffset):
967 * assembler/MacroAssemblerARM.h:
968 (JSC::MacroAssemblerARM::linkCall):
969 * assembler/MacroAssemblerARMv7.h:
970 (JSC::MacroAssemblerARMv7::linkCall):
971 * assembler/MacroAssemblerMIPS.h:
972 (JSC::MacroAssemblerMIPS::linkCall):
973 * assembler/MacroAssemblerSH4.cpp:
974 (JSC::MacroAssemblerSH4::linkCall):
975 * assembler/MacroAssemblerX86.h:
976 (JSC::MacroAssemblerX86::linkCall):
977 * assembler/MacroAssemblerX86_64.h:
978 (JSC::MacroAssemblerX86_64::linkCall):
980 2011-05-25 Gavin Barraclough <barraclough@apple.com>
982 Reviewed by Sam Weinig.
984 https://bugs.webkit.org/show_bug.cgi?id=61500
985 Add JSObject::offsetOfPropertyStorage
987 * jit/JITPropertyAccess.cpp:
988 (JSC::JIT::compileGetDirectOffset):
989 (JSC::JIT::compileGetByIdHotPath):
990 (JSC::JIT::emit_op_put_by_id):
991 (JSC::JIT::compilePutDirectOffset):
992 * jit/JITPropertyAccess32_64.cpp:
993 (JSC::JIT::compileGetByIdHotPath):
994 (JSC::JIT::emit_op_put_by_id):
995 (JSC::JIT::compilePutDirectOffset):
996 (JSC::JIT::compileGetDirectOffset):
997 * runtime/JSObject.h:
998 (JSC::JSObject::offsetOfPropertyStorage):
1000 2011-05-25 Oliver Hunt <oliver@apple.com>
1002 Reviewed by Geoffrey Garen.
1004 Make RegExp GC allocated
1005 https://bugs.webkit.org/show_bug.cgi?id=61490
1007 Make RegExp GC allocated. Basically mechanical change to replace
1008 most use of [Pass]RefPtr<RegExp> with RegExp* or WriteBarrier<RegExp>
1009 where actual ownership happens.
1011 Made the RegExpCache use Strong<> references currently to avoid any
1012 changes in behaviour.
1014 * JavaScriptCore.exp:
1015 * bytecode/CodeBlock.cpp:
1016 (JSC::CodeBlock::visitAggregate):
1017 * bytecode/CodeBlock.h:
1018 (JSC::CodeBlock::addRegExp):
1019 * bytecompiler/BytecodeGenerator.cpp:
1020 (JSC::BytecodeGenerator::addRegExp):
1021 (JSC::BytecodeGenerator::emitNewRegExp):
1022 * bytecompiler/BytecodeGenerator.h:
1024 * runtime/JSGlobalData.cpp:
1025 (JSC::JSGlobalData::JSGlobalData):
1026 (JSC::JSGlobalData::clearBuiltinStructures):
1027 (JSC::JSGlobalData::addRegExpToTrace):
1028 * runtime/JSGlobalData.h:
1029 * runtime/JSGlobalObject.cpp:
1030 (JSC::JSGlobalObject::reset):
1031 * runtime/RegExp.cpp:
1032 (JSC::RegExp::RegExp):
1033 (JSC::RegExp::create):
1034 (JSC::RegExp::invalidateCode):
1036 (JSC::RegExp::createStructure):
1037 * runtime/RegExpCache.cpp:
1038 (JSC::RegExpCache::lookupOrCreate):
1039 (JSC::RegExpCache::create):
1040 * runtime/RegExpCache.h:
1041 * runtime/RegExpConstructor.cpp:
1042 (JSC::constructRegExp):
1043 * runtime/RegExpObject.cpp:
1044 (JSC::RegExpObject::RegExpObject):
1045 (JSC::RegExpObject::visitChildren):
1046 * runtime/RegExpObject.h:
1047 (JSC::RegExpObject::setRegExp):
1048 (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
1049 * runtime/RegExpPrototype.cpp:
1050 (JSC::RegExpPrototype::RegExpPrototype):
1051 (JSC::regExpProtoFuncCompile):
1052 * runtime/RegExpPrototype.h:
1053 * runtime/StringPrototype.cpp:
1054 (JSC::stringProtoFuncMatch):
1055 (JSC::stringProtoFuncSearch):
1057 2011-05-25 Oliver Hunt <oliver@apple.com>
1059 Reviewed by Geoffrey Garen.
1061 Generate regexp code lazily
1062 https://bugs.webkit.org/show_bug.cgi?id=61476
1064 RegExp construction now simply validates the RegExp, it does
1065 not perform actual codegen.
1067 * runtime/RegExp.cpp:
1068 (JSC::RegExp::RegExp):
1069 (JSC::RegExp::recompile):
1070 (JSC::RegExp::compile):
1071 (JSC::RegExp::match):
1073 (JSC::RegExp::recompileIfNecessary):
1074 * runtime/RegExpConstructor.h:
1075 (JSC::RegExpConstructor::performMatch):
1076 * runtime/RegExpObject.cpp:
1077 (JSC::RegExpObject::match):
1078 * runtime/StringPrototype.cpp:
1079 (JSC::stringProtoFuncReplace):
1080 (JSC::stringProtoFuncMatch):
1081 (JSC::stringProtoFuncSearch):
1082 (JSC::stringProtoFuncSplit):
1084 2011-05-24 Geoffrey Garen <ggaren@apple.com>
1086 Reviewed by Geoffrey Garen.
1088 Removed MarkSetProperties because it was unused
1089 https://bugs.webkit.org/show_bug.cgi?id=61418
1092 (JSC::MarkSet::MarkSet):
1093 (JSC::MarkStack::append):
1094 * runtime/JSActivation.cpp:
1095 (JSC::JSActivation::visitChildren):
1096 * runtime/JSArray.h:
1097 (JSC::JSArray::visitChildrenDirect):
1098 * runtime/JSPropertyNameIterator.cpp:
1099 (JSC::JSPropertyNameIterator::visitChildren):
1100 * runtime/WriteBarrier.h:
1101 (JSC::MarkStack::appendValues):
1103 2011-05-25 Oliver Hunt <oliver@apple.com>
1105 Reviewed by Geoffrey Garen.
1107 Make allocations with guard pages ensure that the allocation succeeded
1108 https://bugs.webkit.org/show_bug.cgi?id=61453
1110 Add null checks, and make PageBlock's operator bool() use
1111 the realbase, rather than the start of usable memory.
1113 * wtf/OSAllocatorPosix.cpp:
1114 (WTF::OSAllocator::reserveAndCommit):
1116 (WTF::PageBlock::operator bool):
1117 (WTF::PageBlock::PageBlock):
1119 2011-04-10 Kevin Ollivier <kevino@theolliviers.com>
1121 Reviewed by Eric Seidel.
1123 Add JS_EXPORT_PRIVATE macro for exported methods in bytecompiler headers.
1125 https://bugs.webkit.org/show_bug.cgi?id=27551
1127 * bytecompiler/BytecodeGenerator.h:
1129 2011-05-24 Keishi Hattori <keishi@webkit.org>
1131 Reviewed by Kent Tamura.
1133 Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
1134 https://bugs.webkit.org/show_bug.cgi?id=61273
1136 * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
1138 2011-05-24 Kevin Ollivier <kevino@theolliviers.com>
1140 Reviewed by Eric Seidel.
1142 Add export macros to WTFString.h.
1144 https://bugs.webkit.org/show_bug.cgi?id=27551
1146 * wtf/text/WTFString.h:
1147 (WTF::String::String):
1148 (WTF::String::findIgnoringCase):
1149 (WTF::String::isHashTableDeletedValue):
1151 2011-05-24 Geoffrey Garen <ggaren@apple.com>
1153 Maybe fix the Mac build now?
1155 * JavaScriptCore.xcodeproj/project.pbxproj:
1157 2011-05-24 Geoffrey Garen <ggaren@apple.com>
1159 Maybe fix the Mac build?
1161 * JavaScriptCore.xcodeproj/project.pbxproj:
1163 2011-05-24 Geoffrey Garen <ggaren@apple.com>
1165 Reviewed by Oliver Hunt.
1167 Split HeapRootVisitor into its own class
1168 https://bugs.webkit.org/show_bug.cgi?id=61399
1170 * GNUmakefile.list.am:
1171 * JavaScriptCore.gypi:
1172 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1173 * JavaScriptCore.xcodeproj/project.pbxproj:
1174 * heap/HandleHeap.cpp:
1175 * heap/HandleStack.cpp:
1177 * heap/HeapRootVisitor.h: Copied from Source/JavaScriptCore/heap/MarkStack.h.
1179 * runtime/ArgList.cpp:
1180 * runtime/SmallStrings.cpp:
1182 2011-05-24 Jay Civelli <jcivelli@chromium.org>
1184 Rubberstamped by David Kilzer.
1186 Updated some files that I forgot in my previous MHTML CL.
1188 * Configurations/FeatureDefines.xcconfig:
1190 2011-05-24 Geoffrey Garen <ggaren@apple.com>
1192 Fix the Mac build: Yes, please do remove these files, svn.
1194 * JavaScriptCore.xcodeproj/project.pbxproj:
1196 2011-05-24 Geoffrey Garen <ggaren@apple.com>
1198 Reviewed by Oliver Hunt.
1200 Let's just have one way to get the system page size, bokay?
1201 https://bugs.webkit.org/show_bug.cgi?id=61384
1203 * CMakeListsEfl.txt:
1204 * CMakeListsWinCE.txt:
1205 * GNUmakefile.list.am:
1206 * JavaScriptCore.exp:
1207 * JavaScriptCore.gypi:
1208 * JavaScriptCore.pro:
1209 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: MarkStack[Platform].cpp
1210 is gone completely now, since it only existed to provide a duplicate way
1211 to access the system page size.
1213 * heap/MarkStack.cpp:
1214 (JSC::MarkStack::reset):
1216 (JSC::::MarkStackArray):
1217 (JSC::::shrinkAllocation): Use WTF::pageSize.
1219 * heap/MarkStackPosix.cpp:
1220 * heap/MarkStackSymbian.cpp:
1221 * heap/MarkStackWin.cpp: Removed now-empty files.
1223 * jit/ExecutableAllocator.cpp:
1224 (JSC::ExecutableAllocator::reprotectRegion):
1225 * jit/ExecutableAllocator.h:
1226 (JSC::ExecutableAllocator::ExecutableAllocator):
1227 (JSC::ExecutablePool::ExecutablePool):
1228 (JSC::ExecutablePool::poolAllocate):
1229 * jit/ExecutableAllocatorFixedVMPool.cpp: Use WTF::pageSize.
1231 * wscript: Removed now-empty files.
1233 * wtf/PageBlock.cpp:
1234 (WTF::systemPageSize): Integrated questionable Symbian page size rule
1235 from ExecutableAllocator, because that seems like what the original
1236 author should have done.
1238 2011-05-24 Oliver Hunt <oliver@apple.com>
1240 Reviewed by Gavin Barraclough.
1242 Interpreter crashes with gc validation enabled due to failure to mark initial cache structure
1243 https://bugs.webkit.org/show_bug.cgi?id=61385
1245 The interpreter uses the structure slot of get_by_id and put_by_id to hold
1246 the initial structure it encountered so that it can identify whether a
1247 given access is stable.
1249 When marking though we only visit the slot when we've decided to cache, and
1250 so this value could die. This was "safe" as the value was only used for a
1251 pointer compare, but it was incorrect. We now just mark the slot like we
1252 should have been doing already.
1254 * bytecode/CodeBlock.cpp:
1255 (JSC::CodeBlock::visitStructures):
1257 2011-05-24 Adam Roben <aroben@apple.com>
1261 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed now-inline functions.
1263 2011-05-24 Geoffrey Garen <ggaren@apple.com>
1265 Windows build fix: update the #if OS(WINDOWS) section to match my last patch.
1268 (JSC::::shrinkAllocation):
1270 2011-05-24 Geoffrey Garen <ggaren@apple.com>
1272 Rubber-stamped by Oliver Hunt.
1274 Split out function definitions and class definitions from class
1275 declarations in MarkStack.h, for readability.
1278 (JSC::MarkStack::MarkStack):
1279 (JSC::MarkStack::~MarkStack):
1280 (JSC::MarkStack::addOpaqueRoot):
1281 (JSC::MarkStack::containsOpaqueRoot):
1282 (JSC::MarkStack::opaqueRootCount):
1283 (JSC::MarkSet::MarkSet):
1284 (JSC::MarkStack::allocateStack):
1285 (JSC::MarkStack::releaseStack):
1286 (JSC::MarkStack::pageSize):
1287 (JSC::::MarkStackArray):
1288 (JSC::::~MarkStackArray):
1291 (JSC::::removeLast):
1295 (JSC::::shrinkAllocation):
1297 2011-05-24 Oliver Hunt <oliver@apple.com>
1299 Reviewed by Geoffrey Garen.
1301 Avoid creating unnecessary identifiers and strings in the syntax checker
1302 https://bugs.webkit.org/show_bug.cgi?id=61378
1304 Selectively tell the lexer that there are some places it does not need to
1305 do the real work of creating Identifiers for IDENT and STRING tokens.
1307 Make parseString and parseIdentifier templatized on whether they should
1308 do real work, or merely validate the tokens.
1310 SunSpider --parse-only reports ~5-8% win depending on hardware.
1312 * parser/ASTBuilder.h:
1313 (JSC::ASTBuilder::createDotAccess):
1314 * parser/JSParser.cpp:
1315 (JSC::JSParser::next):
1316 (JSC::JSParser::consume):
1317 (JSC::JSParser::parseVarDeclarationList):
1318 (JSC::JSParser::parseConstDeclarationList):
1319 (JSC::JSParser::parseExpression):
1320 (JSC::JSParser::parseAssignmentExpression):
1321 (JSC::JSParser::parseConditionalExpression):
1322 (JSC::JSParser::parseBinaryExpression):
1323 (JSC::JSParser::parseProperty):
1324 (JSC::JSParser::parseObjectLiteral):
1325 (JSC::JSParser::parseArrayLiteral):
1326 (JSC::JSParser::parseArguments):
1327 (JSC::JSParser::parseMemberExpression):
1329 (JSC::Lexer::parseIdentifier):
1330 (JSC::Lexer::parseString):
1333 * parser/SyntaxChecker.h:
1334 (JSC::SyntaxChecker::createDotAccess):
1335 (JSC::SyntaxChecker::createProperty):
1337 2011-05-23 Michael Saboff <msaboff@apple.com>
1339 Reviewed by Mark Rowe.
1341 Safari often freezes when clicking "Return free memory" in Caches dialog
1342 https://bugs.webkit.org/show_bug.cgi?id=61325
1344 There are two fixes and improvement in instrumentation code used to find
1345 one of the problems.
1346 Changed ReleaseFreeList() to set the "decommitted" bit when releasing
1347 pages to the system and moving Spans from the normal list to the returned
1349 Added a "not making forward progress" check to TCMalloc_PageHeap::scavenge
1350 to eliminate an infinite loop if we can't meet the pagesToRelease target.
1351 Added a check for the decommitted bit being set properly in
1352 TCMalloc_PageHeap::CheckList.
1354 * wtf/FastMalloc.cpp:
1355 (WTF::TCMalloc_PageHeap::scavenge):
1356 (WTF::TCMalloc_PageHeap::Check):
1357 (WTF::TCMalloc_PageHeap::CheckList):
1358 (WTF::ReleaseFreeList):
1360 2011-05-23 Gavin Barraclough <barraclough@apple.com>
1362 Reviewed by Geoff Garen.
1364 https://bugs.webkit.org/show_bug.cgi?id=61306
1366 The begin characters optimization currently has issues (#61129),
1367 and does not appear to still be a performance win. The prudent
1368 next step seems to be to disable while we ascertain whether this
1369 is still a useful performance optimization.
1371 * yarr/YarrInterpreter.cpp:
1372 (JSC::Yarr::Interpreter::matchDisjunction):
1373 (JSC::Yarr::Interpreter::interpret):
1374 * yarr/YarrInterpreter.h:
1375 (JSC::Yarr::BytecodePattern::BytecodePattern):
1376 * yarr/YarrPattern.cpp:
1377 (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
1378 (JSC::Yarr::YarrPattern::compile):
1379 (JSC::Yarr::YarrPattern::YarrPattern):
1380 * yarr/YarrPattern.h:
1381 (JSC::Yarr::YarrPattern::reset):
1383 2011-05-23 Matthew Delaney <mdelaney@apple.com>
1385 Reviewed by Simon Fraser.
1387 Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
1388 https://bugs.webkit.org/show_bug.cgi?id=58216
1392 (clampToPositiveInteger):
1394 2011-05-23 Ruben <chromium@hybridsource.org>
1396 Reviewed by Tony Chang.
1398 Chromium gyp patch to use new POSIX defines toolkit_uses_gtk and os_posix
1399 https://bugs.webkit.org/show_bug.cgi?id=61219
1401 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1403 2011-05-23 Thouraya ANDOLSI <thouraya.andolsi@st.com>
1405 Reviewed by Gavin Barraclough.
1407 [SH4] AssemblerLabel does not name a type
1408 https://bugs.webkit.org/show_bug.cgi?id=59927
1410 SH4Assembler.h file shoold be included before AbstractMacroAssembler.h.
1412 * assembler/MacroAssemblerSH4.h:
1414 2011-05-23 Ryuan Choi <ryuan.choi@samsung.com>
1416 Rubber stamped by Eric Seidel.
1418 [CMAKE] Refactoring wtf related code.
1419 https://bugs.webkit.org/show_bug.cgi?id=60146
1421 Move wtf-files to Source/JavaScriptCore/wtf/CMakeLists.txt.
1424 * CMakeListsEfl.txt:
1425 * wtf/CMakeLists.txt:
1426 * wtf/CMakeListsEfl.txt:
1428 2011-05-22 Adam Barth <abarth@webkit.org>
1430 Enable strict PassOwnPtr for everyone. I expect this patch will need
1431 some followups to make the GTK and EFL bots green again.
1435 2011-05-20 Oliver Hunt <oliver@apple.com>
1437 Reviewed by Gavin Barraclough.
1439 Reduce size of inline cache path of get_by_id on ARMv7
1440 https://bugs.webkit.org/show_bug.cgi?id=61221
1442 This reduces the code size of get_by_id by 20 bytes
1444 * assembler/ARMv7Assembler.h:
1445 (JSC::ARMv7Assembler::ldrCompact):
1446 (JSC::ARMv7Assembler::repatchCompact):
1447 (JSC::ARMv7Assembler::setUInt7ForLoad):
1448 * assembler/MacroAssemblerARMv7.h:
1449 (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
1452 2011-05-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
1454 Reviewed by Oliver Hunt.
1456 Zombies should "live" forever
1457 https://bugs.webkit.org/show_bug.cgi?id=61170
1459 Reusing zombie cells could still hide garbage
1460 collected cell related bugs.
1462 * JavaScriptCore.pro:
1463 * heap/MarkedBlock.cpp:
1464 (JSC::MarkedBlock::clearMarks):
1465 * heap/MarkedBlock.h:
1466 * heap/MarkedSpace.cpp:
1467 (JSC::MarkedSpace::destroy):
1469 (JSC::JSCell::JSValue::isZombie):
1470 * runtime/JSZombie.h:
1471 (JSC::JSZombie::~JSZombie):
1472 * runtime/WriteBarrier.h:
1473 (JSC::WriteBarrierBase::setWithoutWriteBarrier):
1475 2011-05-20 Brady Eidson <beidson@apple.com>
1477 Reviewed by Sam Weinig.
1479 <rdar://problem/9472883> and https://bugs.webkit.org/show_bug.cgi?id=61203
1480 Horrendous bug in callOnMainThreadAndWait
1482 * wtf/MainThread.cpp:
1483 (WTF::dispatchFunctionsFromMainThread): Before signaling the background thread with the
1484 syncFlag condition, reacquire the mutex first.
1486 2011-05-20 Oliver Hunt <oliver@apple.com>
1488 Reviewed by Sam Weinig.
1490 Remove unnecessary double->int conversion at the end of op_div
1491 https://bugs.webkit.org/show_bug.cgi?id=61198
1493 We don't attempt this conversion on 64bit, removing it actually speeds
1494 up sunspider and v8 slightly, and it reduces code size.
1496 * jit/JITArithmetic32_64.cpp:
1497 (JSC::JIT::emit_op_div):
1499 2011-05-19 Evan Martin <evan@chromium.org>
1501 Reviewed by Tony Chang.
1503 [chromium] remove <(library) variable
1504 https://bugs.webkit.org/show_bug.cgi?id=61158
1506 This was for a build experiment; we can just use the correct value now.
1508 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1510 2011-05-20 Oliver Hunt <oliver@apple.com>
1512 Reviewed by Sam Weinig.
1514 Interpreter uses wrong bytecode offset for determining exception handler
1515 https://bugs.webkit.org/show_bug.cgi?id=61191
1517 The bytecode offset given for the returnPC from the JIT is
1518 actually the offset for the start of the instruction triggering
1519 the call, whereas in the interpreter it is the actual return
1520 VPC. This means if the next instruction following a call was
1521 in an exception region we would incorrectly redirect to its
1522 handler. Long term we want to completely redo how exceptions
1523 are handled anyway so the simplest and lowest risk fix here is
1524 to simply subtract one from the return vPC so that we have an
1525 offset in the triggering instruction.
1527 It turns out this is caught by a couple of tests already.
1529 * interpreter/Interpreter.cpp:
1530 (JSC::Interpreter::unwindCallFrame):
1532 2011-05-20 Xan Lopez <xlopez@igalia.com>
1534 Reviewed by Oliver Hunt.
1536 JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
1537 https://bugs.webkit.org/show_bug.cgi?id=42756
1539 Use the MAP_NORESERVE flag for mmap on Linux to skip the kernel
1540 check of the available memory. This should give us an
1541 overcommit-like behavior in most systems, which is what we want.
1543 * wtf/OSAllocatorPosix.cpp:
1544 (WTF::OSAllocator::reserveAndCommit): pass MAP_NORSERVE to mmap.
1546 2011-05-19 Gabor Loki <loki@webkit.org>
1548 Fix ARM build after r86919
1550 * assembler/ARMAssembler.h:
1551 (JSC::ARMAssembler::nop):
1553 2011-05-19 Oliver Hunt <oliver@apple.com>
1555 Reviewed by Gavin Barraclough.
1557 Randomise code starting location a little
1558 https://bugs.webkit.org/show_bug.cgi?id=61161
1560 Add a nop() function to the Assemblers so that we
1561 can randomise code offsets slightly at no real cost.
1563 * assembler/ARMAssembler.h:
1564 (JSC::ARMAssembler::nop):
1565 * assembler/ARMv7Assembler.h:
1566 (JSC::ARMv7Assembler::nop):
1567 * assembler/MacroAssemblerARM.h:
1568 (JSC::MacroAssemblerARM::nop):
1569 * assembler/MacroAssemblerARMv7.h:
1570 (JSC::MacroAssemblerARMv7::nop):
1571 * assembler/MacroAssemblerMIPS.h:
1572 (JSC::MacroAssemblerMIPS::nop):
1573 * assembler/MacroAssemblerSH4.h:
1574 (JSC::MacroAssemblerSH4::nop):
1575 * assembler/MacroAssemblerX86Common.h:
1576 (JSC::MacroAssemblerX86Common::nop):
1577 * assembler/X86Assembler.h:
1578 (JSC::X86Assembler::nop):
1581 (JSC::JIT::privateCompile):
1583 * runtime/WeakRandom.h:
1584 (JSC::WeakRandom::getUint32):
1586 2011-05-19 Oliver Hunt <oliver@apple.com>
1590 * wtf/OSAllocatorWin.cpp:
1591 (WTF::OSAllocator::reserveUncommitted):
1592 (WTF::OSAllocator::reserveAndCommit):
1594 2011-05-19 Oliver Hunt <oliver@apple.com>
1596 Reviewed by Gavin Barraclough.
1598 Add guard pages to each end of the memory region used by the fixedvm allocator
1599 https://bugs.webkit.org/show_bug.cgi?id=61150
1601 Add mechanism to notify the OSAllocator that pages at either end of an
1602 allocation should be considered guard pages. Update PageReservation,
1603 PageAllocation, etc to handle this.
1605 * JavaScriptCore.exp:
1606 * jit/ExecutableAllocatorFixedVMPool.cpp:
1607 (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
1608 * wtf/OSAllocator.h:
1609 * wtf/OSAllocatorPosix.cpp:
1610 (WTF::OSAllocator::reserveUncommitted):
1611 (WTF::OSAllocator::reserveAndCommit):
1612 * wtf/PageAllocation.h:
1613 (WTF::PageAllocation::PageAllocation):
1614 * wtf/PageAllocationAligned.h:
1615 (WTF::PageAllocationAligned::PageAllocationAligned):
1617 (WTF::PageBlock::PageBlock):
1618 * wtf/PageReservation.h:
1619 (WTF::PageReservation::reserve):
1620 (WTF::PageReservation::reserveWithGuardPages):
1621 Add a new function to make a reservation that will add guard
1622 pages to the ends of an allocation.
1623 (WTF::PageReservation::PageReservation):
1625 2011-05-19 Oliver Hunt <oliver@apple.com>
1627 Reviewed by Geoffrey Garen.
1629 Make Executables release their JIT code as soon as they become dead
1630 https://bugs.webkit.org/show_bug.cgi?id=61134
1632 Add an ability to clear an Executable's jit code without requiring
1633 it to be destroyed, and then call that from a finalizer.
1639 (JSC::JITCode::clear):
1640 * runtime/Executable.cpp:
1641 (JSC::ExecutableFinalizer::finalize):
1642 (JSC::ExecutableBase::executableFinalizer):
1643 * runtime/Executable.h:
1644 (JSC::ExecutableBase::ExecutableBase):
1645 (JSC::ExecutableBase::clearExecutableCode):
1647 2011-05-19 Adam Roben <aroben@apple.com>
1649 Remove a redundant and broken data export
1651 Data can't be exported from JavaScriptCore.dll by listing it in the .def file. The
1652 JS_EXPORTDATA macro must be used instead. (In this case it was already being used, leading
1653 to a linker warning about multiple definitions.)
1655 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSGlobalData::s_info.
1657 2011-05-18 Oliver Hunt <oliver@apple.com>
1659 Reviewed by Gavin Barraclough.
1661 Some tests crashing in JSC::MarkStack::validateValue beneath ScriptController::clearWindowShell on SnowLeopard Intel Release (WebKit2 Tests)
1662 https://bugs.webkit.org/show_bug.cgi?id=61064
1664 Switch NonFinalObject to using WriteBarrier<> rather than WriteBarrierBase<>
1665 for its inline storage. This resolves the problem of GC occurring before
1666 a subclass has initialised its anonymous storage.
1668 * runtime/JSObject.h:
1670 2011-05-18 Adam Barth <abarth@webkit.org>
1672 Reviewed by Sam Weinig.
1675 https://bugs.webkit.org/show_bug.cgi?id=61084
1677 It's been a year and we've failed to complete this project. It's time
1678 to throw in the towel.
1680 * JavaScriptCore.xcodeproj/project.pbxproj:
1682 * wtf/url/api: Removed.
1683 * wtf/url/api/ParsedURL.cpp: Removed.
1684 * wtf/url/api/ParsedURL.h: Removed.
1685 * wtf/url/api/URLString.h: Removed.
1686 * wtf/url/src: Removed.
1687 * wtf/url/src/RawURLBuffer.h: Removed.
1688 * wtf/url/src/URLBuffer.h: Removed.
1689 * wtf/url/src/URLCharacterTypes.cpp: Removed.
1690 * wtf/url/src/URLCharacterTypes.h: Removed.
1691 * wtf/url/src/URLComponent.h: Removed.
1692 * wtf/url/src/URLEscape.cpp: Removed.
1693 * wtf/url/src/URLEscape.h: Removed.
1694 * wtf/url/src/URLParser.h: Removed.
1695 * wtf/url/src/URLQueryCanonicalizer.h: Removed.
1696 * wtf/url/src/URLSegments.cpp: Removed.
1697 * wtf/url/src/URLSegments.h: Removed.
1698 * wtf/url/wtfurl.gyp: Removed.
1700 2011-05-18 Oliver Hunt <oliver@apple.com>
1702 Reviewed by Sam Weinig.
1704 JSGlobalObject and some others do GC allocation during initialization, which can cause heap corruption
1705 https://bugs.webkit.org/show_bug.cgi?id=61090
1707 Remove the Structure-free JSGlobalObject constructor and instead always
1708 pass the structure into the JSGlobalObject constructor.
1709 Stop DebuggerActivation creating a new structure every time, and simply
1710 use a single shared structure held by the GlobalData.
1712 * API/JSContextRef.cpp:
1713 * debugger/DebuggerActivation.cpp:
1714 (JSC::DebuggerActivation::DebuggerActivation):
1716 (GlobalObject::GlobalObject):
1719 * runtime/JSGlobalData.cpp:
1720 (JSC::JSGlobalData::JSGlobalData):
1721 (JSC::JSGlobalData::clearBuiltinStructures):
1722 * runtime/JSGlobalData.h:
1723 * runtime/JSGlobalObject.h:
1725 2011-05-18 Oliver Hunt <oliver@apple.com>
1727 Reviewed by Adam Roben.
1729 Disable gc validation in release builds
1730 https://bugs.webkit.org/show_bug.cgi?id=60680
1732 Add back the NDEBUG check
1736 2011-05-17 Geoffrey Garen <ggaren@apple.com>
1738 Rolled out attempts to fix EFL build because they're not enough -- the
1739 build script needs to be fixed.
1741 * runtime/BooleanPrototype.cpp:
1742 * runtime/DateConstructor.cpp:
1743 * runtime/ErrorPrototype.cpp:
1745 2011-05-17 Geoffrey Garen <ggaren@apple.com>
1747 More attempts to work around the EFL build system being borken.
1749 * runtime/DateConstructor.cpp:
1750 * runtime/ErrorPrototype.cpp:
1752 2011-05-17 Geoffrey Garen <ggaren@apple.com>
1754 Try to fix the EFL build.
1756 * runtime/BooleanPrototype.cpp:
1758 2011-05-16 Geoffrey Garen <ggaren@apple.com>
1760 Rolling back in r86653 with build fixed.
1762 Reviewed by Gavin Barraclough and Oliver Hunt.
1764 Global object initialization is expensive
1765 https://bugs.webkit.org/show_bug.cgi?id=60933
1767 Changed a bunch of globals to allocate their properties lazily, and changed
1768 the global object to allocate a bunch of its globals lazily.
1770 This reduces the footprint of a global object from 287 objects with 58
1771 functions for 24K to 173 objects with 20 functions for 15K.
1773 Large patch, but it's all mechanical.
1775 * DerivedSources.make:
1776 * JavaScriptCore.exp: Build!
1778 * create_hash_table: Added a special case for fromCharCode, since it uses
1779 a custom "thunk generator".
1782 (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
1783 overcount objects that were owned through more than one mechanism because
1784 it was getting in the way of counting the results for this patch.
1786 * interpreter/CallFrame.h:
1787 (JSC::ExecState::arrayConstructorTable):
1788 (JSC::ExecState::arrayPrototypeTable):
1789 (JSC::ExecState::booleanPrototypeTable):
1790 (JSC::ExecState::dateConstructorTable):
1791 (JSC::ExecState::errorPrototypeTable):
1792 (JSC::ExecState::globalObjectTable):
1793 (JSC::ExecState::numberConstructorTable):
1794 (JSC::ExecState::numberPrototypeTable):
1795 (JSC::ExecState::objectPrototypeTable):
1796 (JSC::ExecState::regExpPrototypeTable):
1797 (JSC::ExecState::stringConstructorTable): Added new tables.
1799 * runtime/ArrayConstructor.cpp:
1800 (JSC::ArrayConstructor::ArrayConstructor):
1801 (JSC::ArrayConstructor::getOwnPropertySlot):
1802 (JSC::ArrayConstructor::getOwnPropertyDescriptor):
1803 * runtime/ArrayConstructor.h:
1804 (JSC::ArrayConstructor::createStructure):
1805 * runtime/ArrayPrototype.cpp:
1806 (JSC::ArrayPrototype::getOwnPropertySlot):
1807 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
1808 * runtime/ArrayPrototype.h:
1809 * runtime/BooleanPrototype.cpp:
1810 (JSC::BooleanPrototype::BooleanPrototype):
1811 (JSC::BooleanPrototype::getOwnPropertySlot):
1812 (JSC::BooleanPrototype::getOwnPropertyDescriptor):
1813 * runtime/BooleanPrototype.h:
1814 (JSC::BooleanPrototype::createStructure):
1815 * runtime/DateConstructor.cpp:
1816 (JSC::DateConstructor::DateConstructor):
1817 (JSC::DateConstructor::getOwnPropertySlot):
1818 (JSC::DateConstructor::getOwnPropertyDescriptor):
1819 * runtime/DateConstructor.h:
1820 (JSC::DateConstructor::createStructure):
1821 * runtime/ErrorPrototype.cpp:
1822 (JSC::ErrorPrototype::ErrorPrototype):
1823 (JSC::ErrorPrototype::getOwnPropertySlot):
1824 (JSC::ErrorPrototype::getOwnPropertyDescriptor):
1825 * runtime/ErrorPrototype.h:
1826 (JSC::ErrorPrototype::createStructure): Standardized these objects
1827 to use static tables for function properties.
1829 * runtime/JSGlobalData.cpp:
1830 (JSC::JSGlobalData::JSGlobalData):
1831 (JSC::JSGlobalData::~JSGlobalData):
1832 * runtime/JSGlobalData.h: Added new tables.
1834 * runtime/JSGlobalObject.cpp:
1835 (JSC::JSGlobalObject::reset):
1836 (JSC::JSGlobalObject::addStaticGlobals):
1837 (JSC::JSGlobalObject::getOwnPropertySlot):
1838 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
1839 * runtime/JSGlobalObject.h:
1840 * runtime/JSGlobalObjectFunctions.cpp:
1841 * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
1842 static table for its global functions. This required uninlining some
1843 things to avoid a circular header dependency. However, those things
1844 probably shouldn't have been inlined in the first place.
1846 Even more global object properties can be made lazy, but that requires
1847 more in-depth changes.
1849 * runtime/MathObject.cpp:
1850 * runtime/NumberConstructor.cpp:
1851 (JSC::NumberConstructor::getOwnPropertySlot):
1852 (JSC::NumberConstructor::getOwnPropertyDescriptor):
1853 * runtime/NumberPrototype.cpp:
1854 (JSC::NumberPrototype::NumberPrototype):
1855 (JSC::NumberPrototype::getOwnPropertySlot):
1856 (JSC::NumberPrototype::getOwnPropertyDescriptor):
1857 * runtime/NumberPrototype.h:
1858 (JSC::NumberPrototype::createStructure):
1859 * runtime/ObjectPrototype.cpp:
1860 (JSC::ObjectPrototype::ObjectPrototype):
1861 (JSC::ObjectPrototype::put):
1862 (JSC::ObjectPrototype::getOwnPropertySlot):
1863 (JSC::ObjectPrototype::getOwnPropertyDescriptor):
1864 * runtime/ObjectPrototype.h:
1865 (JSC::ObjectPrototype::createStructure):
1866 * runtime/RegExpPrototype.cpp:
1867 (JSC::RegExpPrototype::RegExpPrototype):
1868 (JSC::RegExpPrototype::getOwnPropertySlot):
1869 (JSC::RegExpPrototype::getOwnPropertyDescriptor):
1870 * runtime/RegExpPrototype.h:
1871 (JSC::RegExpPrototype::createStructure):
1872 * runtime/StringConstructor.cpp:
1873 (JSC::StringConstructor::StringConstructor):
1874 (JSC::StringConstructor::getOwnPropertySlot):
1875 (JSC::StringConstructor::getOwnPropertyDescriptor):
1876 * runtime/StringConstructor.h:
1877 (JSC::StringConstructor::createStructure): Standardized these objects
1878 to use static tables for function properties.
1880 2011-05-17 Sam Weinig <sam@webkit.org>
1882 Reviewed by Oliver Hunt.
1884 JSGlobalContextRelease should not trigger a synchronous garbage collection
1885 https://bugs.webkit.org/show_bug.cgi?id=60990
1887 * API/JSContextRef.cpp:
1888 Change synchronous call to collectAllGarbage to a call to trigger the
1891 2011-05-16 Oliver Hunt <oliver@apple.com>
1893 Reviewed by Gavin Barraclough.
1895 Reduce code size for inline cache
1896 https://bugs.webkit.org/show_bug.cgi?id=60942
1898 This patch introduces the concept of a "compact" address that
1899 allows individual architectures to control the maximum offset
1900 used for the inline path of get_by_id. This reduces the code
1901 size of get_by_id by 3 bytes on x86 and x86_64 and slightly
1902 improves performance on v8 tests.
1904 * assembler/ARMAssembler.h:
1905 (JSC::ARMAssembler::repatchCompact):
1906 * assembler/ARMv7Assembler.h:
1907 (JSC::ARMv7Assembler::repatchCompact):
1908 * assembler/AbstractMacroAssembler.h:
1909 (JSC::AbstractMacroAssembler::DataLabelCompact::DataLabelCompact):
1910 (JSC::AbstractMacroAssembler::differenceBetween):
1911 (JSC::AbstractMacroAssembler::repatchCompact):
1912 * assembler/CodeLocation.h:
1913 (JSC::CodeLocationDataLabelCompact::CodeLocationDataLabelCompact):
1914 (JSC::CodeLocationCommon::dataLabelCompactAtOffset):
1915 * assembler/LinkBuffer.h:
1916 (JSC::LinkBuffer::locationOf):
1917 * assembler/MIPSAssembler.h:
1918 (JSC::MIPSAssembler::repatchCompact):
1919 * assembler/MacroAssembler.h:
1920 (JSC::MacroAssembler::loadPtrWithCompactAddressOffsetPatch):
1921 * assembler/MacroAssemblerARM.h:
1922 (JSC::MacroAssemblerARM::load32WithCompactAddressOffsetPatch):
1923 * assembler/MacroAssemblerARMv7.h:
1924 (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
1925 * assembler/MacroAssemblerMIPS.h:
1926 (JSC::MacroAssemblerMIPS::load32WithCompactAddressOffsetPatch):
1927 * assembler/MacroAssemblerSH4.h:
1928 (JSC::MacroAssemblerSH4::load32WithAddressOffsetPatch):
1929 * assembler/MacroAssemblerX86.h:
1930 (JSC::MacroAssemblerX86::repatchCompact):
1931 * assembler/MacroAssemblerX86Common.h:
1932 (JSC::MacroAssemblerX86Common::loadCompactWithAddressOffsetPatch):
1933 * assembler/MacroAssemblerX86_64.h:
1934 (JSC::MacroAssemblerX86_64::loadPtrWithCompactAddressOffsetPatch):
1935 * assembler/RepatchBuffer.h:
1936 (JSC::RepatchBuffer::repatch):
1937 * assembler/SH4Assembler.h:
1938 (JSC::SH4Assembler::repatchCompact):
1939 * assembler/X86Assembler.h:
1940 (JSC::X86Assembler::movl_mr_disp8):
1941 (JSC::X86Assembler::movq_mr_disp8):
1942 (JSC::X86Assembler::repatchCompact):
1943 (JSC::X86Assembler::setInt8):
1944 (JSC::X86Assembler::X86InstructionFormatter::oneByteOp_disp8):
1945 (JSC::X86Assembler::X86InstructionFormatter::oneByteOp64_disp8):
1946 (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
1948 * jit/JITPropertyAccess.cpp:
1949 (JSC::JIT::compileGetByIdHotPath):
1950 (JSC::JIT::emit_op_put_by_id):
1951 (JSC::JIT::patchGetByIdSelf):
1952 * jit/JITPropertyAccess32_64.cpp:
1953 (JSC::JIT::compileGetByIdHotPath):
1954 (JSC::JIT::emit_op_put_by_id):
1955 (JSC::JIT::patchGetByIdSelf):
1957 (JSC::JITThunks::tryCacheGetByID):
1959 2011-05-16 Sheriff Bot <webkit.review.bot@gmail.com>
1961 Unreviewed, rolling out r86653.
1962 http://trac.webkit.org/changeset/86653
1963 https://bugs.webkit.org/show_bug.cgi?id=60944
1965 "Caused regressions on Windows, OSX and EFL" (Requested by
1968 * DerivedSources.make:
1969 * DerivedSources.pro:
1971 * GNUmakefile.list.am:
1972 * JavaScriptCore.exp:
1973 * JavaScriptCore.gypi:
1974 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1975 * create_hash_table:
1977 (JSC::TypeCounter::operator()):
1978 * interpreter/CallFrame.h:
1979 (JSC::ExecState::arrayTable):
1980 (JSC::ExecState::numberTable):
1981 * runtime/ArrayConstructor.cpp:
1982 (JSC::ArrayConstructor::ArrayConstructor):
1983 * runtime/ArrayConstructor.h:
1984 * runtime/ArrayPrototype.cpp:
1985 (JSC::ArrayPrototype::getOwnPropertySlot):
1986 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
1987 * runtime/ArrayPrototype.h:
1988 * runtime/BooleanPrototype.cpp:
1989 (JSC::BooleanPrototype::BooleanPrototype):
1990 * runtime/BooleanPrototype.h:
1991 * runtime/DateConstructor.cpp:
1992 (JSC::DateConstructor::DateConstructor):
1993 * runtime/DateConstructor.h:
1994 * runtime/ErrorPrototype.cpp:
1995 (JSC::ErrorPrototype::ErrorPrototype):
1996 * runtime/ErrorPrototype.h:
1997 * runtime/JSGlobalData.cpp:
1998 (JSC::JSGlobalData::JSGlobalData):
1999 (JSC::JSGlobalData::~JSGlobalData):
2000 * runtime/JSGlobalData.h:
2001 * runtime/JSGlobalObject.cpp:
2002 (JSC::JSGlobalObject::reset):
2003 * runtime/JSGlobalObject.h:
2004 (JSC::JSGlobalObject::addStaticGlobals):
2005 (JSC::JSGlobalObject::getOwnPropertySlot):
2006 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2007 * runtime/JSGlobalObjectFunctions.cpp:
2008 (JSC::globalFuncJSCPrint):
2009 * runtime/JSGlobalObjectFunctions.h:
2010 * runtime/MathObject.cpp:
2011 * runtime/NumberConstructor.cpp:
2012 (JSC::NumberConstructor::getOwnPropertySlot):
2013 (JSC::NumberConstructor::getOwnPropertyDescriptor):
2014 * runtime/NumberPrototype.cpp:
2015 (JSC::NumberPrototype::NumberPrototype):
2016 * runtime/NumberPrototype.h:
2017 * runtime/ObjectPrototype.cpp:
2018 (JSC::ObjectPrototype::ObjectPrototype):
2019 (JSC::ObjectPrototype::put):
2020 (JSC::ObjectPrototype::getOwnPropertySlot):
2021 * runtime/ObjectPrototype.h:
2022 * runtime/RegExpPrototype.cpp:
2023 (JSC::RegExpPrototype::RegExpPrototype):
2024 * runtime/RegExpPrototype.h:
2025 * runtime/StringConstructor.cpp:
2026 (JSC::StringConstructor::StringConstructor):
2027 * runtime/StringConstructor.h:
2029 2011-05-16 Geoffrey Garen <ggaren@apple.com>
2031 Reviewed by Geoffrey Garen.
2033 Global object initialization is expensive
2034 https://bugs.webkit.org/show_bug.cgi?id=60933
2036 Changed a bunch of globals to allocate their properties lazily, and changed
2037 the global object to allocate a bunch of its globals lazily.
2039 This reduces the footprint of a global object from 287 objects with 58
2040 functions for 24K to 173 objects with 20 functions for 15K.
2042 Large patch, but it's all mechanical.
2044 * DerivedSources.make:
2045 * JavaScriptCore.exp: Build!
2047 * create_hash_table: Added a special case for fromCharCode, since it uses
2048 a custom "thunk generator".
2051 (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
2052 overcount objects that were owned through more than one mechanism because
2053 it was getting in the way of counting the results for this patch.
2055 * interpreter/CallFrame.h:
2056 (JSC::ExecState::arrayConstructorTable):
2057 (JSC::ExecState::arrayPrototypeTable):
2058 (JSC::ExecState::booleanPrototypeTable):
2059 (JSC::ExecState::dateConstructorTable):
2060 (JSC::ExecState::errorPrototypeTable):
2061 (JSC::ExecState::globalObjectTable):
2062 (JSC::ExecState::numberConstructorTable):
2063 (JSC::ExecState::numberPrototypeTable):
2064 (JSC::ExecState::objectPrototypeTable):
2065 (JSC::ExecState::regExpPrototypeTable):
2066 (JSC::ExecState::stringConstructorTable): Added new tables.
2068 * runtime/ArrayConstructor.cpp:
2069 (JSC::ArrayConstructor::ArrayConstructor):
2070 (JSC::ArrayConstructor::getOwnPropertySlot):
2071 (JSC::ArrayConstructor::getOwnPropertyDescriptor):
2072 * runtime/ArrayConstructor.h:
2073 (JSC::ArrayConstructor::createStructure):
2074 * runtime/ArrayPrototype.cpp:
2075 (JSC::ArrayPrototype::getOwnPropertySlot):
2076 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
2077 * runtime/ArrayPrototype.h:
2078 * runtime/BooleanPrototype.cpp:
2079 (JSC::BooleanPrototype::BooleanPrototype):
2080 (JSC::BooleanPrototype::getOwnPropertySlot):
2081 (JSC::BooleanPrototype::getOwnPropertyDescriptor):
2082 * runtime/BooleanPrototype.h:
2083 (JSC::BooleanPrototype::createStructure):
2084 * runtime/DateConstructor.cpp:
2085 (JSC::DateConstructor::DateConstructor):
2086 (JSC::DateConstructor::getOwnPropertySlot):
2087 (JSC::DateConstructor::getOwnPropertyDescriptor):
2088 * runtime/DateConstructor.h:
2089 (JSC::DateConstructor::createStructure):
2090 * runtime/ErrorPrototype.cpp:
2091 (JSC::ErrorPrototype::ErrorPrototype):
2092 (JSC::ErrorPrototype::getOwnPropertySlot):
2093 (JSC::ErrorPrototype::getOwnPropertyDescriptor):
2094 * runtime/ErrorPrototype.h:
2095 (JSC::ErrorPrototype::createStructure): Standardized these objects
2096 to use static tables for function properties.
2098 * runtime/JSGlobalData.cpp:
2099 (JSC::JSGlobalData::JSGlobalData):
2100 (JSC::JSGlobalData::~JSGlobalData):
2101 * runtime/JSGlobalData.h: Added new tables.
2103 * runtime/JSGlobalObject.cpp:
2104 (JSC::JSGlobalObject::reset):
2105 (JSC::JSGlobalObject::addStaticGlobals):
2106 (JSC::JSGlobalObject::getOwnPropertySlot):
2107 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2108 * runtime/JSGlobalObject.h:
2109 * runtime/JSGlobalObjectFunctions.cpp:
2110 * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
2111 static table for its global functions. This required uninlining some
2112 things to avoid a circular header dependency. However, those things
2113 probably shouldn't have been inlined in the first place.
2115 Even more global object properties can be made lazy, but that requires
2116 more in-depth changes.
2118 * runtime/MathObject.cpp:
2119 * runtime/NumberConstructor.cpp:
2120 (JSC::NumberConstructor::getOwnPropertySlot):
2121 (JSC::NumberConstructor::getOwnPropertyDescriptor):
2122 * runtime/NumberPrototype.cpp:
2123 (JSC::NumberPrototype::NumberPrototype):
2124 (JSC::NumberPrototype::getOwnPropertySlot):
2125 (JSC::NumberPrototype::getOwnPropertyDescriptor):
2126 * runtime/NumberPrototype.h:
2127 (JSC::NumberPrototype::createStructure):
2128 * runtime/ObjectPrototype.cpp:
2129 (JSC::ObjectPrototype::ObjectPrototype):
2130 (JSC::ObjectPrototype::put):
2131 (JSC::ObjectPrototype::getOwnPropertySlot):
2132 (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2133 * runtime/ObjectPrototype.h:
2134 (JSC::ObjectPrototype::createStructure):
2135 * runtime/RegExpPrototype.cpp:
2136 (JSC::RegExpPrototype::RegExpPrototype):
2137 (JSC::RegExpPrototype::getOwnPropertySlot):
2138 (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2139 * runtime/RegExpPrototype.h:
2140 (JSC::RegExpPrototype::createStructure):
2141 * runtime/StringConstructor.cpp:
2142 (JSC::StringConstructor::StringConstructor):
2143 (JSC::StringConstructor::getOwnPropertySlot):
2144 (JSC::StringConstructor::getOwnPropertyDescriptor):
2145 * runtime/StringConstructor.h:
2146 (JSC::StringConstructor::createStructure): Standardized these objects
2147 to use static tables for function properties.
2149 2011-05-16 David Kilzer <ddkilzer@apple.com>
2151 <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
2152 <rdar://problem/9446430>
2154 Reviewed by Mark Rowe.
2156 * Configurations/Base.xcconfig: Fixed typo.
2158 2011-05-16 Oliver Hunt <oliver@apple.com>
2160 Reviewed by Geoffrey Garen.
2162 JSWeakObjectMap finalisation may occur while gc is in inconsistent state
2163 https://bugs.webkit.org/show_bug.cgi?id=60908
2164 <rdar://problem/9409491>
2166 We need to ensure that we have called all the weak map finalizers while
2167 the global object (and hence global context) is still in a consistent
2168 state. The best way to achieve this is to simply use a weak handle and
2169 finalizer on the global object.
2171 * JavaScriptCore.exp:
2172 * runtime/JSGlobalObject.cpp:
2173 (JSC::JSGlobalObject::WeakMapFinalizer::finalize):
2174 * runtime/JSGlobalObject.h:
2175 (JSC::JSGlobalObject::registerWeakMap):
2177 2011-05-16 Siddharth Mathur <siddharth.mathur@nokia.com>
2179 Reviewed by Laszlo Gombos.
2181 [Qt][WK2][Symbian] Shared memory implementation for Symbian
2182 https://bugs.webkit.org/show_bug.cgi?id=55875
2184 * wtf/Platform.h: Exclude Symbian OS from USE(UNIX_DOMAIN_SOCKETS) users
2186 2011-05-16 Gavin Barraclough <barraclough@apple.com>
2188 Rubber stamped by Geoff Garen.
2190 https://bugs.webkit.org/show_bug.cgi?id=60866
2191 Evaluation order broken for empty alternatives in subpatterns
2193 Reverting https://bugs.webkit.org/show_bug.cgi?id=51395
2195 * yarr/YarrPattern.cpp:
2196 (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
2198 2011-05-15 Gavin Barraclough <barraclough@apple.com>
2200 Reviewed by Geoff Garen & Michael Saboff.
2202 https://bugs.webkit.org/show_bug.cgi?id=60860
2203 Simplify backtracking in YARR JIT
2205 YARR JIT currently performs a single pass of code generation over the pattern,
2206 with special handling to allow the code generation for some backtracking code
2207 out of line. We can simplify things by moving to a common mechanism whereby all
2208 forwards matching code is generated in one pass, and all backtracking code is
2209 generated in another. Backtracking code can be generated in reverse order, to
2210 optimized the common fall-through case.
2212 To make it easier to walk over the pattern, we can first convert to a more
2213 byte-code like format before JIT generating. In time we should unify this with
2214 the YARR interpreter to more closely unify the two.
2217 (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
2218 (JSC::Yarr::YarrGenerator::YarrOp::YarrOp):
2219 (JSC::Yarr::YarrGenerator::BacktrackingState::BacktrackingState):
2220 (JSC::Yarr::YarrGenerator::BacktrackingState::append):
2221 (JSC::Yarr::YarrGenerator::BacktrackingState::fallthrough):
2222 (JSC::Yarr::YarrGenerator::BacktrackingState::link):
2223 (JSC::Yarr::YarrGenerator::BacktrackingState::linkTo):
2224 (JSC::Yarr::YarrGenerator::BacktrackingState::takeBacktracksToJumpList):
2225 (JSC::Yarr::YarrGenerator::BacktrackingState::isEmpty):
2226 (JSC::Yarr::YarrGenerator::BacktrackingState::linkDataLabels):
2227 (JSC::Yarr::YarrGenerator::BacktrackingState::ReturnAddressRecord::ReturnAddressRecord):
2228 (JSC::Yarr::YarrGenerator::generateAssertionBOL):
2229 (JSC::Yarr::YarrGenerator::backtrackAssertionBOL):
2230 (JSC::Yarr::YarrGenerator::generateAssertionEOL):
2231 (JSC::Yarr::YarrGenerator::backtrackAssertionEOL):
2232 (JSC::Yarr::YarrGenerator::matchAssertionWordchar):
2233 (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
2234 (JSC::Yarr::YarrGenerator::backtrackAssertionWordBoundary):
2235 (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
2236 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterOnce):
2237 (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
2238 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterFixed):
2239 (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
2240 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterGreedy):
2241 (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
2242 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
2243 (JSC::Yarr::YarrGenerator::generateCharacterClassOnce):
2244 (JSC::Yarr::YarrGenerator::backtrackCharacterClassOnce):
2245 (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
2246 (JSC::Yarr::YarrGenerator::backtrackCharacterClassFixed):
2247 (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
2248 (JSC::Yarr::YarrGenerator::backtrackCharacterClassGreedy):
2249 (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
2250 (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):
2251 (JSC::Yarr::YarrGenerator::generateTerm):
2252 (JSC::Yarr::YarrGenerator::backtrackTerm):
2253 (JSC::Yarr::YarrGenerator::generate):
2254 (JSC::Yarr::YarrGenerator::backtrack):
2255 (JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
2256 (JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion):
2257 (JSC::Yarr::YarrGenerator::opCompileAlternative):
2258 (JSC::Yarr::YarrGenerator::opCompileBody):
2259 (JSC::Yarr::YarrGenerator::YarrGenerator):
2260 (JSC::Yarr::YarrGenerator::compile):
2262 2011-05-15 Adam Barth <abarth@webkit.org>
2264 Enable strict PassOwnPtr on Qt. (Build fixes to follow.)
2268 2011-05-15 Geoffrey Garen <ggaren@apple.com>
2270 Reviewed by Maciej Stachowiak.
2272 Partial fix for <rdar://problem/9417875> REGRESSION: SunSpider ~17% slower
2273 in browser than on command line
2275 This patch fixes a few issues in generated code that could unreasonably
2276 prolong object lifetimes.
2279 (JSC::Heap::collectAllGarbage): Throw away all function code before doing
2280 a major collection. We want to clear polymorphic caches, since they can
2281 keep alive large object graphs that have gone "stale". For the same reason,
2282 but to a lesser extent, we also want to clear linked functions and other
2285 This has the side-benefit of reducing memory footprint from run-once
2286 functions, and of allowing predictions and caches that have failed to
2289 Eventually, if compilation costs rise far enough, we may want a more
2290 limited strategy for de-specializing code without throwing it away
2291 completely, but this works for now, and it's the simplest solution.
2294 (JSC::JITThunks::hostFunctionStub):
2296 * runtime/JSFunction.cpp: Made the host function stub cache weak --
2297 otherwise it's effectively a memory leak that can seriously fragment the
2300 (JSC::JSFunction::JSFunction):
2301 (JSC::JSFunction::visitChildren): Cleared up some comments that confused
2302 me when working with this code.
2304 2011-05-13 Oliver Hunt <oliver@apple.com>
2306 Reviewed by Geoffrey Garen.
2308 Make GC validation more aggressive
2309 https://bugs.webkit.org/show_bug.cgi?id=60802
2311 This patch makes the checks performed under GC_VALIDATION
2312 much more aggressive, and adds the checks to more places
2313 in order to allow us to catch GC bugs much closer to the
2316 * JavaScriptCore.exp:
2317 * JavaScriptCore.xcodeproj/project.pbxproj:
2318 * debugger/DebuggerActivation.cpp:
2319 (JSC::DebuggerActivation::visitChildren):
2320 * heap/MarkedBlock.cpp:
2321 (JSC::MarkedBlock::MarkedBlock):
2322 * heap/MarkedSpace.cpp:
2323 * runtime/Arguments.cpp:
2324 (JSC::Arguments::visitChildren):
2325 * runtime/Executable.cpp:
2326 (JSC::EvalExecutable::visitChildren):
2327 (JSC::ProgramExecutable::visitChildren):
2328 (JSC::FunctionExecutable::visitChildren):
2329 * runtime/Executable.h:
2330 * runtime/GetterSetter.cpp:
2331 (JSC::GetterSetter::visitChildren):
2332 * runtime/GetterSetter.h:
2333 * runtime/JSAPIValueWrapper.h:
2334 (JSC::JSAPIValueWrapper::createStructure):
2335 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2336 * runtime/JSActivation.cpp:
2337 (JSC::JSActivation::visitChildren):
2338 * runtime/JSArray.cpp:
2339 (JSC::JSArray::visitChildren):
2340 * runtime/JSCell.cpp:
2341 (JSC::slowValidateCell):
2343 (JSC::JSCell::JSCell::unvalidatedStructure):
2344 (JSC::JSCell::JSCell::JSCell):
2345 * runtime/JSFunction.cpp:
2346 (JSC::JSFunction::visitChildren):
2347 * runtime/JSGlobalObject.cpp:
2348 (JSC::JSGlobalObject::visitChildren):
2349 (JSC::slowValidateCell):
2350 * runtime/JSONObject.h:
2351 * runtime/JSObject.cpp:
2352 (JSC::JSObject::visitChildren):
2353 * runtime/JSPropertyNameIterator.cpp:
2354 (JSC::JSPropertyNameIterator::visitChildren):
2355 * runtime/JSPropertyNameIterator.h:
2356 * runtime/JSStaticScopeObject.cpp:
2357 (JSC::JSStaticScopeObject::visitChildren):
2358 * runtime/JSString.h:
2359 (JSC::RopeBuilder::JSString):
2360 * runtime/JSWrapperObject.cpp:
2361 (JSC::JSWrapperObject::visitChildren):
2362 * runtime/NativeErrorConstructor.cpp:
2363 (JSC::NativeErrorConstructor::visitChildren):
2364 * runtime/PropertyMapHashTable.h:
2365 (JSC::PropertyMapEntry::PropertyMapEntry):
2366 * runtime/RegExpObject.cpp:
2367 (JSC::RegExpObject::visitChildren):
2368 * runtime/ScopeChain.cpp:
2369 (JSC::ScopeChainNode::visitChildren):
2370 * runtime/ScopeChain.h:
2371 (JSC::ScopeChainNode::ScopeChainNode):
2372 * runtime/Structure.cpp:
2373 (JSC::Structure::Structure):
2374 (JSC::Structure::addPropertyTransition):
2375 (JSC::Structure::visitChildren):
2376 * runtime/Structure.h:
2377 (JSC::JSCell::classInfo):
2378 * runtime/StructureChain.cpp:
2379 (JSC::StructureChain::visitChildren):
2380 * runtime/StructureChain.h:
2381 * runtime/WriteBarrier.h:
2382 (JSC::validateCell):
2384 (JSC::JSGlobalObject):
2385 (JSC::WriteBarrierBase::set):
2386 (JSC::WriteBarrierBase::setMayBeNull):
2387 (JSC::WriteBarrierBase::setEarlyValue):
2388 (JSC::WriteBarrierBase::get):
2389 (JSC::WriteBarrierBase::operator*):
2390 (JSC::WriteBarrierBase::operator->):
2391 (JSC::WriteBarrierBase::unvalidatedGet):
2392 (JSC::WriteBarrier::WriteBarrier):
2395 2011-05-13 Oliver Hunt <oliver@apple.com>
2397 Reviewed by Geoffrey Garen.
2399 Make GC validation more aggressive
2400 https://bugs.webkit.org/show_bug.cgi?id=60802
2402 This patch makes the checks performed under GC_VALIDATION
2403 much more aggressive, and adds the checks to more places
2404 in order to allow us to catch GC bugs much closer to the
2407 * JavaScriptCore.exp:
2408 * JavaScriptCore.xcodeproj/project.pbxproj:
2409 * debugger/DebuggerActivation.cpp:
2410 (JSC::DebuggerActivation::visitChildren):
2411 * heap/MarkedBlock.cpp:
2412 (JSC::MarkedBlock::MarkedBlock):
2413 * heap/MarkedSpace.cpp:
2414 * runtime/Arguments.cpp:
2415 (JSC::Arguments::visitChildren):
2416 * runtime/Executable.cpp:
2417 (JSC::EvalExecutable::visitChildren):
2418 (JSC::ProgramExecutable::visitChildren):
2419 (JSC::FunctionExecutable::visitChildren):
2420 * runtime/Executable.h:
2421 * runtime/GetterSetter.cpp:
2422 (JSC::GetterSetter::visitChildren):
2423 * runtime/GetterSetter.h:
2424 * runtime/JSAPIValueWrapper.h:
2425 (JSC::JSAPIValueWrapper::createStructure):
2426 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2427 * runtime/JSActivation.cpp:
2428 (JSC::JSActivation::visitChildren):
2429 * runtime/JSArray.cpp:
2430 (JSC::JSArray::visitChildren):
2431 * runtime/JSCell.cpp:
2432 (JSC::slowValidateCell):
2434 (JSC::JSCell::JSCell::unvalidatedStructure):
2435 (JSC::JSCell::JSCell::JSCell):
2436 * runtime/JSFunction.cpp:
2437 (JSC::JSFunction::visitChildren):
2438 * runtime/JSGlobalObject.cpp:
2439 (JSC::JSGlobalObject::visitChildren):
2440 (JSC::slowValidateCell):
2441 * runtime/JSONObject.h:
2442 * runtime/JSObject.cpp:
2443 (JSC::JSObject::visitChildren):
2444 * runtime/JSPropertyNameIterator.cpp:
2445 (JSC::JSPropertyNameIterator::visitChildren):
2446 * runtime/JSPropertyNameIterator.h:
2447 * runtime/JSStaticScopeObject.cpp:
2448 (JSC::JSStaticScopeObject::visitChildren):
2449 * runtime/JSString.h:
2450 (JSC::RopeBuilder::JSString):
2451 * runtime/JSWrapperObject.cpp:
2452 (JSC::JSWrapperObject::visitChildren):
2453 * runtime/NativeErrorConstructor.cpp:
2454 (JSC::NativeErrorConstructor::visitChildren):
2455 * runtime/PropertyMapHashTable.h:
2456 (JSC::PropertyMapEntry::PropertyMapEntry):
2457 * runtime/RegExpObject.cpp:
2458 (JSC::RegExpObject::visitChildren):
2459 * runtime/ScopeChain.cpp:
2460 (JSC::ScopeChainNode::visitChildren):
2461 * runtime/ScopeChain.h:
2462 (JSC::ScopeChainNode::ScopeChainNode):
2463 * runtime/Structure.cpp:
2464 (JSC::Structure::Structure):
2465 (JSC::Structure::addPropertyTransition):
2466 (JSC::Structure::visitChildren):
2467 * runtime/Structure.h:
2468 (JSC::JSCell::classInfo):
2469 * runtime/StructureChain.cpp:
2470 (JSC::StructureChain::visitChildren):
2471 * runtime/StructureChain.h:
2472 * runtime/WriteBarrier.h:
2473 (JSC::validateCell):
2475 (JSC::JSGlobalObject):
2476 (JSC::WriteBarrierBase::set):
2477 (JSC::WriteBarrierBase::setMayBeNull):
2478 (JSC::WriteBarrierBase::setEarlyValue):
2479 (JSC::WriteBarrierBase::get):
2480 (JSC::WriteBarrierBase::operator*):
2481 (JSC::WriteBarrierBase::operator->):
2482 (JSC::WriteBarrierBase::unvalidatedGet):
2483 (JSC::WriteBarrier::WriteBarrier):
2486 2011-05-14 Csaba Osztrogonác <ossy@webkit.org>
2488 Unreviewed, rolling out r86469 and r86471, because they made hundreds tests crash on Qt.
2490 Make GC validation more aggressive
2491 https://bugs.webkit.org/show_bug.cgi?id=60802
2493 * JavaScriptCore.exp:
2494 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2495 * JavaScriptCore.xcodeproj/project.pbxproj:
2496 * debugger/DebuggerActivation.cpp:
2497 (JSC::DebuggerActivation::visitChildren):
2498 * heap/MarkedBlock.cpp:
2499 (JSC::MarkedBlock::MarkedBlock):
2500 * heap/MarkedSpace.cpp:
2501 * runtime/Arguments.cpp:
2502 (JSC::Arguments::visitChildren):
2503 * runtime/Executable.cpp:
2504 (JSC::EvalExecutable::visitChildren):
2505 (JSC::ProgramExecutable::visitChildren):
2506 (JSC::FunctionExecutable::visitChildren):
2507 * runtime/Executable.h:
2508 (JSC::ProgramExecutable::createStructure):
2509 (JSC::FunctionExecutable::createStructure):
2510 * runtime/GetterSetter.cpp:
2511 (JSC::GetterSetter::visitChildren):
2512 * runtime/GetterSetter.h:
2513 (JSC::GetterSetter::createStructure):
2514 * runtime/JSAPIValueWrapper.h:
2515 (JSC::JSAPIValueWrapper::createStructure):
2516 * runtime/JSActivation.cpp:
2517 (JSC::JSActivation::visitChildren):
2518 * runtime/JSArray.cpp:
2519 (JSC::JSArray::visitChildren):
2520 * runtime/JSCell.cpp:
2522 (JSC::JSCell::JSCell::JSCell):
2523 * runtime/JSFunction.cpp:
2524 (JSC::JSFunction::visitChildren):
2525 * runtime/JSGlobalObject.cpp:
2526 (JSC::JSGlobalObject::visitChildren):
2527 * runtime/JSONObject.h:
2528 (JSC::JSONObject::createStructure):
2529 * runtime/JSObject.cpp:
2530 (JSC::JSObject::visitChildren):
2531 * runtime/JSPropertyNameIterator.cpp:
2532 (JSC::JSPropertyNameIterator::visitChildren):
2533 * runtime/JSPropertyNameIterator.h:
2534 * runtime/JSStaticScopeObject.cpp:
2535 (JSC::JSStaticScopeObject::visitChildren):
2536 * runtime/JSString.h:
2537 (JSC::RopeBuilder::createStructure):
2538 * runtime/JSWrapperObject.cpp:
2539 (JSC::JSWrapperObject::visitChildren):
2540 * runtime/NativeErrorConstructor.cpp:
2541 (JSC::NativeErrorConstructor::visitChildren):
2542 * runtime/PropertyMapHashTable.h:
2543 (JSC::PropertyMapEntry::PropertyMapEntry):
2544 * runtime/RegExpObject.cpp:
2545 (JSC::RegExpObject::visitChildren):
2546 * runtime/ScopeChain.cpp:
2547 (JSC::ScopeChainNode::visitChildren):
2548 * runtime/ScopeChain.h:
2549 (JSC::ScopeChainNode::ScopeChainNode):
2550 * runtime/Structure.cpp:
2551 (JSC::Structure::Structure):
2552 (JSC::Structure::addPropertyTransition):
2553 (JSC::Structure::visitChildren):
2554 * runtime/Structure.h:
2555 (JSC::Structure::createStructure):
2556 (JSC::JSCell::classInfo):
2557 * runtime/StructureChain.cpp:
2558 (JSC::StructureChain::visitChildren):
2559 * runtime/StructureChain.h:
2560 * runtime/WriteBarrier.h:
2561 (JSC::WriteBarrierBase::set):
2562 (JSC::WriteBarrierBase::get):
2563 (JSC::WriteBarrierBase::operator*):
2564 (JSC::WriteBarrierBase::operator->):
2565 (JSC::WriteBarrier::WriteBarrier):
2568 2011-05-13 Oliver Hunt <oliver@apple.com>
2570 Reviewed by Geoffrey Garen.
2572 Make GC validation more aggressive
2573 https://bugs.webkit.org/show_bug.cgi?id=60802
2575 This patch makes the checks performed under GC_VALIDATION
2576 much more aggressive, and adds the checks to more places
2577 in order to allow us to catch GC bugs much closer to the
2580 * JavaScriptCore.exp:
2581 * JavaScriptCore.xcodeproj/project.pbxproj:
2582 * debugger/DebuggerActivation.cpp:
2583 (JSC::DebuggerActivation::visitChildren):
2584 * heap/MarkedBlock.cpp:
2585 (JSC::MarkedBlock::MarkedBlock):
2586 * heap/MarkedSpace.cpp:
2587 * runtime/Arguments.cpp:
2588 (JSC::Arguments::visitChildren):
2589 * runtime/Executable.cpp:
2590 (JSC::EvalExecutable::visitChildren):
2591 (JSC::ProgramExecutable::visitChildren):
2592 (JSC::FunctionExecutable::visitChildren):
2593 * runtime/Executable.h:
2594 * runtime/GetterSetter.cpp:
2595 (JSC::GetterSetter::visitChildren):
2596 * runtime/GetterSetter.h:
2597 * runtime/JSAPIValueWrapper.h:
2598 (JSC::JSAPIValueWrapper::createStructure):
2599 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2600 * runtime/JSActivation.cpp:
2601 (JSC::JSActivation::visitChildren):
2602 * runtime/JSArray.cpp:
2603 (JSC::JSArray::visitChildren):
2604 * runtime/JSCell.cpp:
2605 (JSC::slowValidateCell):
2607 (JSC::JSCell::JSCell::unvalidatedStructure):
2608 (JSC::JSCell::JSCell::JSCell):
2609 * runtime/JSFunction.cpp:
2610 (JSC::JSFunction::visitChildren):
2611 * runtime/JSGlobalObject.cpp:
2612 (JSC::JSGlobalObject::visitChildren):
2613 (JSC::slowValidateCell):
2614 * runtime/JSONObject.h:
2615 * runtime/JSObject.cpp:
2616 (JSC::JSObject::visitChildren):
2617 * runtime/JSPropertyNameIterator.cpp:
2618 (JSC::JSPropertyNameIterator::visitChildren):
2619 * runtime/JSPropertyNameIterator.h:
2620 * runtime/JSStaticScopeObject.cpp:
2621 (JSC::JSStaticScopeObject::visitChildren):
2622 * runtime/JSString.h:
2623 (JSC::RopeBuilder::JSString):
2624 * runtime/JSWrapperObject.cpp:
2625 (JSC::JSWrapperObject::visitChildren):
2626 * runtime/NativeErrorConstructor.cpp:
2627 (JSC::NativeErrorConstructor::visitChildren):
2628 * runtime/PropertyMapHashTable.h:
2629 (JSC::PropertyMapEntry::PropertyMapEntry):
2630 * runtime/RegExpObject.cpp:
2631 (JSC::RegExpObject::visitChildren):
2632 * runtime/ScopeChain.cpp:
2633 (JSC::ScopeChainNode::visitChildren):
2634 * runtime/ScopeChain.h:
2635 (JSC::ScopeChainNode::ScopeChainNode):
2636 * runtime/Structure.cpp:
2637 (JSC::Structure::Structure):
2638 (JSC::Structure::addPropertyTransition):
2639 (JSC::Structure::visitChildren):
2640 * runtime/Structure.h:
2641 (JSC::JSCell::classInfo):
2642 * runtime/StructureChain.cpp:
2643 (JSC::StructureChain::visitChildren):
2644 * runtime/StructureChain.h:
2645 * runtime/WriteBarrier.h:
2646 (JSC::validateCell):
2648 (JSC::JSGlobalObject):
2649 (JSC::WriteBarrierBase::set):
2650 (JSC::WriteBarrierBase::setMayBeNull):
2651 (JSC::WriteBarrierBase::setEarlyValue):
2652 (JSC::WriteBarrierBase::get):
2653 (JSC::WriteBarrierBase::operator*):
2654 (JSC::WriteBarrierBase::operator->):
2655 (JSC::WriteBarrierBase::unvalidatedGet):
2656 (JSC::WriteBarrier::WriteBarrier):
2659 2011-05-01 Holger Hans Peter Freyther <holger@moiji-mobile.com>
2661 Reviewed by Steve Block.
2663 [android] OS(ANDROID) does not imply PLATFORM(ANDROID)
2664 https://bugs.webkit.org/show_bug.cgi?id=59888
2666 It is possible to build QtWebKit and others for OS(ANDROID). Let
2667 the buildsystem decide which platform is to be build.
2671 2011-05-12 Maciej Stachowiak <mjs@apple.com>
2673 Reviewed by Darin Adler.
2675 XMLDocumentParserLibxml2 should play nice with strict OwnPtrs
2676 https://bugs.webkit.org/show_bug.cgi?id=59394
2678 This portion of the change introduces a PassTraits template, which
2679 is used to enable takeFirst() to work for a Deque holding OwnPtrs,
2680 and optimize it for a Deque holding RefPtrs. In the future it can
2681 be deployed elsewhere to make our data structures work better with
2684 * GNUmakefile.list.am:
2685 * JavaScriptCore.gypi:
2686 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2687 * JavaScriptCore.xcodeproj/project.pbxproj:
2688 * wtf/CMakeLists.txt:
2691 * wtf/PassTraits.h: Added.
2692 (WTF::PassTraits::transfer):
2694 2011-05-12 Nikolas Zimmermann <nzimmermann@rim.com>
2698 Revert r86334, it broke the win build. WinCE build is fixed even without this patch. WinCairo remains broken atm, everything else works.
2700 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2702 2011-05-12 Nikolas Zimmermann <nzimmermann@rim.com>
2706 String operator+ reallocates unnecessarily when concatting > 2 strings
2707 https://bugs.webkit.org/show_bug.cgi?id=58420
2709 Try to fix WinCE/WinCairo linking by exporting three symbols, not sure whether it's correct though. Win worked just fine before.
2711 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2713 2011-05-12 Nikolas Zimmermann <nzimmermann@rim.com>
2715 Reviewed by Darin Adler.
2717 String operator+ reallocates unnecessarily when concatting > 2 strings
2718 https://bugs.webkit.org/show_bug.cgi?id=58420
2720 Provide a faster String append operator.
2721 Up until now, "String operator+(const String& a, const String& b)" copied String a into a temporary
2722 object, and used a.append(b), which reallocates a new buffer of aLength+bLength. When concatting
2723 N strings using operator+, this leads to N-1 reallocations.
2725 Replace this with a flexible operator+ implementation, that avoids these reallocations.
2726 When concatting a 'String' with any string type (char*, UChar, Vector<char>, String, AtomicString, etc..)
2727 a StringAppend<String, T> object is created, which holds the intermediate string objects, and delays
2728 creation of the final string, until operator String() is invoked.
2730 template<typename T>
2731 StringAppend<String, T> operator+(const String& string1, T string2)
2733 return StringAppend<String, T>(string1, string2);
2736 template<typename U, typename V, typename W>
2737 StringAppend<U, StringAppend<V, W> > operator+(U string1, const StringAppend<V, W>& string2)
2739 return StringAppend<U, StringAppend<V, W> >(string1, string2);
2742 When concatting three strings - "String a, b, c; String result = a + b + c;" following happens:
2743 first a StringAppend<String, String> object is created by operator+(const String& string1, String string2).
2744 Then operator+(String string1, const StringAppend<String, String>& string2) is invoked, which returns
2745 a StringAppend<String, StringAppend<String, String> > object.
2746 Then operator String() is invoked, which allocates a StringImpl object, once, large enough to hold the
2747 final string - it uses tryMakeString provided by StringConcatenate.h under the hoods, which guards us
2748 against too big string allocations, etc.
2750 Note that the second template, defines a recursive way to concat an arbitary number of strings
2751 into a single String with just one allocation.
2753 * GNUmakefile.list.am: Add StringOperators.h to build.
2754 * JavaScriptCore.exp: Export WTF::emptyString(). Remove no longer needed symbols.
2755 * JavaScriptCore.gypi: Add StringOperators.h to build.
2756 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
2757 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
2758 * wtf/text/AtomicString.h: Pull in StringConcatenate.h at the end of the file.
2759 * wtf/text/StringConcatenate.h: Conditionally include AtomicString.h to avoid a cyclic dependency. Pull in StringOperators.h at the end of the file.
2760 * wtf/text/StringOperators.h: Added. This is never meant to be included directly, including either WTFString.h or AtomicString.h automatically pulls in this file.
2761 (WTF::StringAppend::StringAppend):
2762 (WTF::StringAppend::operator String):
2763 (WTF::StringAppend::operator AtomicString):
2764 (WTF::StringAppend::writeTo):
2765 (WTF::StringAppend::length):
2767 * wtf/text/WTFString.cpp: Remove operator+ implementations that use String::append().
2768 (WTF::emptyString): Add new shared empty string free function.
2769 * wtf/text/WTFString.h: Replace operator+ implementations by StringAppend template solution. Pull in AtomicString.h at the end of the file.
2771 2011-05-12 Philippe Normand <pnormand@igalia.com>
2773 Unreviewed, GTK build fix.
2777 2011-05-12 Keith Kyzivat <keith.kyzivat@nokia.com>
2779 Reviewed by Csaba Osztrogonác.
2781 [Qt] Arm debug build failing on ARMAssembler::debugOffset()
2782 https://bugs.webkit.org/show_bug.cgi?id=60688
2784 Related to svn rev 85523
2786 * assembler/ARMAssembler.h:
2787 (JSC::ARMAssembler::debugOffset):
2789 2011-05-11 Igor Oliveira <igor.oliveira@openbossa.org>
2791 Reviewed by Eric Seidel.
2793 WebKit does not build with GCCE
2794 https://bugs.webkit.org/show_bug.cgi?id=60667
2796 Allow compile WebKit with GCCE
2801 2011-05-11 Adam Barth <abarth@webkit.org>
2803 Reviewed by Eric Seidel.
2805 Enable strict PassOwnPtr on Mac
2806 https://bugs.webkit.org/show_bug.cgi?id=60684
2808 This should build cleanly now.
2812 2011-05-11 Oliver Hunt <oliver@apple.com>
2814 Reviewed by Darin Adler.
2816 Protect JSC from WebCore executing JS during JS wrapper finalization
2817 https://bugs.webkit.org/show_bug.cgi?id=60672
2818 <rdar://problem/9350997>
2820 Detect when we're trying to execute JS during GC and prevent the
2821 execution from happening. We also assert that this isn't happening
2822 as it implies incorrect behaviour of an object's destructor.
2824 * JavaScriptCore.exp:
2827 (JSC::Heap::isBusy):
2828 * interpreter/Interpreter.cpp:
2829 (JSC::Interpreter::execute):
2830 (JSC::Interpreter::executeCall):
2831 (JSC::Interpreter::executeConstruct):
2832 * runtime/JSGlobalData.h:
2833 (JSC::JSGlobalData::isCollectorBusy):
2835 2011-05-11 Oliver Hunt <oliver@apple.com>
2837 Reviewed by Gavin Barraclough.
2839 Enable gc mark validation in temporarily in release builds
2840 https://bugs.webkit.org/show_bug.cgi?id=60678
2842 Make it easier to turn the gc mark validation on and off, and
2843 temporarily turn it on for all builds.
2845 * heap/MarkStack.cpp:
2847 (JSC::MarkStack::append):
2848 (JSC::MarkStack::internalAppend):
2849 * runtime/WriteBarrier.h:
2850 (JSC::MarkStack::appendValues):
2853 2011-05-11 Geoffrey Garen <ggaren@apple.com>
2855 Reviewed by Oliver Hunt.
2857 <rdar://problem/9331651> REGRESSION: RPRVT grows by 1MB / sec @ dvd2blu.com
2859 SunSpider reports no change.
2861 This bug was caused by changing Structure and Executable to being GC
2862 objects, and by a long-standing bug that would thrash the global object
2863 between dictionary and non-dictionary states.
2865 * runtime/BatchedTransitionOptimizer.h:
2866 (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): Don't
2867 eagerly transition to dictionary -- this can cause pathological dictionary
2868 churn, and it's not necessary, since objects know how to automatically
2869 transition to dictionary when necessary.
2871 * runtime/Executable.cpp:
2872 (JSC::EvalExecutable::compileInternal):
2873 (JSC::ProgramExecutable::compileInternal):
2874 (JSC::FunctionExecutable::compileForCallInternal):
2875 (JSC::FunctionExecutable::compileForConstructInternal): Be sure to report
2876 extra cost from compilation, because it can be quite high. This is especially
2877 important for program code, since DOM timers can repeatedly allocate
2878 program code without allocating any other objects.
2880 * runtime/JSObject.cpp:
2881 (JSC::JSObject::removeDirect): Don't transition to the uncacheable state
2882 if the thing we're trying to remove doesn't exist. This can happen during
2883 compilation, since the compiler needs to ensure that no pre-existing
2884 conflicting definitions exist for certain declarations.
2886 2011-05-11 Oliver Hunt <oliver@apple.com>
2888 Reviewed by Gavin Barraclough.
2890 Make mark stack validation functions do something useful in a release build
2891 https://bugs.webkit.org/show_bug.cgi?id=60645
2893 Turn ASSERTs into actual if(...) CRASH(); statements.
2895 * heap/MarkStack.cpp:
2896 (JSC::MarkStack::validateValue):
2898 2011-05-11 Xan Lopez <xlopez@igalia.com>
2900 Reviewed by Martin Robinson.
2902 Fix copy&paste error in comment.
2904 * jit/JITPropertyAccess.cpp:
2905 (JSC::JIT::stringGetByValStubGenerator): the value is stored in
2908 2011-05-11 Adam Roben <aroben@apple.com>
2910 WinCE build fixes for strict PassOwnPtr
2912 * wtf/unicode/CollatorDefault.cpp:
2913 (WTF::Collator::userDefault): Use adoptPtr.
2915 2011-05-11 Holger Hans Peter Freyther <holger@moiji-mobile.com>
2917 Unreviewed build fix.
2919 [MIPS] Fix compilation of the MIPS JIT
2921 Include the MIPSAssembler.h first to indirectly include
2922 AssemblerBuffer.h before the AbstractMacroAssembler.h. This
2923 order is used for the ARM and X86 MacroAssembler*.h
2925 * assembler/MacroAssemblerMIPS.h:
2927 2011-05-11 Adam Roben <aroben@apple.com>
2929 Turn on strict PassOwnPtr on Windows
2931 Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
2933 Reviewed by Adam Barth.
2937 2011-05-10 Stephanie Lewis <slewis@apple.com>
2941 Revert accidental JavaScriptCore change in http://trac.webkit.org/changeset/86130
2943 * Configurations/JavaScriptCore.xcconfig:
2945 2011-05-10 Adam Barth <abarth@webkit.org>
2947 Reviewed by David Levin.
2949 Enable strict PassOwnPtr on Chromium
2950 https://bugs.webkit.org/show_bug.cgi?id=60502
2952 Other platforms to follow.
2956 2011-05-10 Geoffrey Garen <ggaren@apple.com>
2958 Reviewed by Darin Adler.
2960 Fixed up some #include dependencies so the WriteBarrier class can actually call Heap::writeBarrier
2961 https://bugs.webkit.org/show_bug.cgi?id=60532
2963 * GNUmakefile.list.am:
2964 * JavaScriptCore.gypi:
2965 * JavaScriptCore.xcodeproj/project.pbxproj: Build!
2967 * heap/Handle.h: Moved HandleTypes to its own header because that's the
2968 WebKit style, and it was necessary to resolve a circular dependency
2969 between Handle.h and WriteBarrier.h.
2972 (JSC::Heap::writeBarrier): Added an inline no-op writeBarrier(), to
2973 verify that all the code is in the right place.
2975 * heap/MarkStack.h: Moved WriteBarrier operations to WriteBarrier.h to
2976 resolve a circular dependency.
2978 * runtime/ArgList.h:
2979 * runtime/JSCell.h: #include WriteBarrier.h since we don't get it for
2982 * runtime/PropertyMapHashTable.h:
2983 (JSC::PropertyTable::PropertyTable): Call the real writeBarrier()
2984 function, now that it exists.
2986 * runtime/SmallStrings.h: Removed a stray #include to resolve a circular
2989 * runtime/WriteBarrier.h:
2990 (JSC::WriteBarrierBase::set):
2991 (JSC::MarkStack::append):
2992 (JSC::MarkStack::appendValues): Updated to match the changes above.
2994 2011-05-10 Oliver Hunt <oliver@apple.com>
2998 * heap/MarkStack.cpp:
2999 (JSC::MarkStack::validateValue):
3001 2011-05-10 Oliver Hunt <oliver@apple.com>
3003 Reviewed by Gavin Barraclough.
3005 Add some aggressive GC validation to debug builds.
3006 https://bugs.webkit.org/show_bug.cgi?id=60601
3008 When assertions are enabled we now do some validity checking
3009 of objects being added to the mark stack.
3011 * bytecode/Instruction.h:
3012 (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::PolymorphicStubInfo):
3013 (JSC::PolymorphicAccessStructureList::visitAggregate):
3014 * heap/MarkStack.cpp:
3015 (JSC::MarkStack::validateSet):
3016 (JSC::MarkStack::validateValue):
3018 (JSC::MarkStack::appendValues):
3019 (JSC::MarkStack::append):
3020 (JSC::MarkStack::internalAppend):
3022 2011-05-09 Darin Adler <darin@apple.com>
3024 Reviewed by Oliver Hunt.
3026 http://bugs.webkit.org/show_bug.cgi?id=60509
3027 Wrong type used for return value from strlen
3029 * wtf/FastMalloc.cpp:
3030 (WTF::fastStrDup): Use size_t. Also don't bother checking for failure since
3031 fastMalloc won't return if it fails.
3033 2011-05-09 Adam Barth <abarth@webkit.org>
3035 Reviewed by Eric Seidel.
3037 CSP should block Function constructor
3038 https://bugs.webkit.org/show_bug.cgi?id=60240
3040 When eval is disabled, we need to block the use of the function
3041 constructor. However, the WebCore JSC bindings call the function
3042 constructor directly to create inline event listeners. To support that
3043 use, this patch adds an entrypoint that bypasses the check for whether
3046 * JavaScriptCore.exp:
3047 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3048 * runtime/FunctionConstructor.cpp:
3049 (JSC::constructFunction):
3050 (JSC::constructFunctionSkippingEvalEnabledCheck):
3051 * runtime/FunctionConstructor.h:
3053 2011-05-09 Adam Roben <aroben@apple.com>
3055 Automatically touch WebKit.idl whenever any other WebKit1 IDL file changes
3057 Fixes <http://webkit.org/b/60468> WebKit.idl needs to be manually touched whenever any other
3058 WebKit1 IDL file changes to avoid build errors
3060 Reviewed by Tim Hatcher.
3062 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3063 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
3064 Updated for script rename.
3066 * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Removed.
3067 * JavaScriptCore.vcproj/JavaScriptCore/work-around-vs-dependency-tracking-bugs.py: Renamed
3068 from react-to-vsprops-changes.py.
3069 (top level): Moved a constant here from main.
3070 (main): Moved most code from here to react_to_vsprops_changes. Added a call to the new
3071 react_to_webkit1_interface_changes function.
3072 (react_to_vsprops_changes): Moved code here from main. Updated to use the
3073 TOP_LEVEL_DIRECTORY global. Moved some code from here to mtime_of_newest_file_matching_globa
3074 and touch_if_older_than.
3075 (react_to_webkit1_interface_changes): Added. Touches WebKit.idl if any other WebKit1 IDL
3077 (mtime_of_newest_file_matching_glob): Added. Code came from main.
3078 (touch_if_older_than): Added. Code came from main.
3080 2011-05-08 Jessie Berlin <jberlin@apple.com>
3082 Reviewed by Dan Bernstein.
3084 Make JSRetainPtr work with JSGlobalContextRefs.
3085 https://bugs.webkit.org/show_bug.cgi?id=60452
3087 Add specialized functions for JSRetain and JSRelease when dealing with JSGlobalContextRefs.
3089 * API/JSRetainPtr.h:
3093 2011-05-07 Dawit Alemayehu <adawit@kde.org>
3095 Reviewed by Daniel Bates.
3097 Fix compile with GCC 4.6.0
3098 https://bugs.webkit.org/show_bug.cgi?id=60380
3100 Remove unused local variable from code.
3102 * runtime/StringPrototype.cpp:
3103 (JSC::stringProtoFuncMatch):
3105 2011-05-06 Alexis Menard <alexis.menard@openbossa.org>
3107 Unreviewed build fix with gcc 4.6.0 on linux and c++0x support.
3109 std::tr1::has_trivial_constructor is in <tr1/memory>.
3113 2011-05-05 Jay Civelli <jcivelli@chromium.org>
3115 Reviewed by Adam Barth.
3117 Added convenience methods to convert from a byte to hex ASCII digit
3118 characters and vice-versa.
3119 https://bugs.webkit.org/show_bug.cgi?id=59834
3122 (WTF::toASCIIHexValue):
3123 (WTF::lowerNibbleToASCIIHexDigit):
3124 (WTF::upperNibbleToASCIIHexDigit):
3126 2011-05-05 Alexis Menard <alexis.menard@openbossa.org>
3128 Reviewed by Benjamin Poulain.
3130 [Qt] Make QtWebKit build when using gcc 4.6.0
3131 https://bugs.webkit.org/show_bug.cgi?id=60265
3133 If QtWebKit is compiled with gcc 4.6.0 or later we don't want to deactivate
3134 the c++0x support because it works.
3136 * JavaScriptCore.pro:
3138 2011-05-04 Fridrich Strba <fridrich.strba@bluewin.ch>
3140 Reviewed by Geoffrey Garen.
3142 Port MachineStackMarker.cpp to Windows x64
3143 https://bugs.webkit.org/show_bug.cgi?id=60216
3145 * heap/MachineStackMarker.cpp:
3146 (JSC::getPlatformThreadRegisters): the CONTEXT struct is usable also
3148 (JSC::otherThreadStackPointer): return the Rsp register on Windows x64.
3150 2011-05-04 Fridrich Strba <fridrich.strba@bluewin.ch>
3152 Reviewed by Martin Robinson.
3154 Link libjavascriptcoregtk on Windows with winmm.dll
3155 https://bugs.webkit.org/show_bug.cgi?id=60215
3159 2011-05-04 Tao Bai <michaelbai@chromium.org>
3161 Reviewed by David Kilzer.
3163 Populate touch-icon url to FrameLoaderClient
3164 https://bugs.webkit.org/show_bug.cgi?id=59143
3166 * Configurations/FeatureDefines.xcconfig:
3168 2011-05-03 Geoffrey Garen <ggaren@apple.com>
3170 Reviewed by Darin Adler.
3172 <rdar://problem/9366557> Various crashes due to bad DFG codegen at canalplus.fr
3174 * dfg/DFGSpeculativeJIT.cpp:
3175 (JSC::DFG::SpeculativeJIT::checkArgumentTypes): Removed a stray line of
3176 code that accidentally survived the conversion to a switch statement,
3177 causing a lot of important code not to run most of the time.
3179 Since this is not a trivial finger-picking mistake, I will not call it a
3182 2011-05-04 Adam Roben <aroben@apple.com>
3184 Another attempted build fix
3187 (WTF::OwnPtr::operator==):
3188 (WTF::OwnPtr::operator!=):
3190 (WTF::PassOwnPtr::operator==):
3191 (WTF::PassOwnPtr::operator!=):
3192 Added a return statement. And made a tweak based on a suggestion from Anders Carlsson.
3194 2011-05-04 Adam Roben <aroben@apple.com>
3196 Try to fix Leopard, Qt, and probably others
3199 (WTF::OwnPtr::operator==):
3200 (WTF::OwnPtr::operator!=):
3202 (WTF::PassOwnPtr::operator==):
3203 (WTF::PassOwnPtr::operator!=):
3204 Try to get the compiler not to instantiate these function templates unnecessarily.
3206 2011-05-03 Adam Roben <aroben@apple.com>
3208 Disallow equality comparisons between [Pass]OwnPtrs
3210 If you have two OwnPtrs that are equal, you've already lost. (Unless you're doing something
3211 really sneaky, in which case you should stop!)
3213 Fixes <http://webkit.org/b/60053> Testing OwnPtrs for equality should cause a compiler error
3215 Reviewed by Anders Carlsson and Antti Koivisto.
3218 (WTF::OwnPtr::operator==):
3219 (WTF::OwnPtr::operator!=):
3221 (WTF::PassOwnPtr::operator==):
3222 (WTF::PassOwnPtr::operator!=):
3223 Added private equality operators that fail to compile when used. (When not used, the
3224 compiler will skip over them because they are function templates.)
3226 2011-05-04 Alexis Menard <alexis.menard@openbossa.org>
3228 Reviewed by Gavin Barraclough.
3230 JITArithmetic.cpp produces a warning on a unused variable.
3231 https://bugs.webkit.org/show_bug.cgi?id=60060
3233 Just properly use what we already have converted.
3235 * jit/JITArithmetic.cpp:
3236 (JSC::JIT::emitSlow_op_add):
3237 (JSC::JIT::emitSlow_op_mul):
3239 2011-05-04 Alexis Menard <alexis.menard@openbossa.org>
3241 Reviewed by Geoffrey Garen.
3243 JITPropertyAccess produces a unused but set variable warning in gcc 4.6.0.
3244 https://bugs.webkit.org/show_bug.cgi?id=60050
3246 This patch fix a compilation warning. The new warning scenario -Wunused-but-set-variable
3247 in gcc 4.6.0 is included in -Wall and therefore stops the compilation when warnings are treated
3248 as errors. The patch introduces a new macro ASSERT_JIT_OFFSET_UNUSED and ASSERT_WITH_MESSAGE_UNUSED
3249 which copy the idea of ASSERT_UNUSED.
3252 * jit/JITPropertyAccess.cpp:
3253 (JSC::JIT::emit_op_method_check):
3254 (JSC::JIT::compileGetByIdHotPath):
3255 (JSC::JIT::emit_op_put_by_id):
3257 (assertWithMessageUnused):
3259 2011-04-29 Jer Noble <jer.noble@apple.com>
3261 Reviewed by Eric Seidel.
3263 Implement FULLSCREEN_API on Windows, Part 4: Enable it
3264 https://bugs.webkit.org/show_bug.cgi?id=59798
3266 * wtf/Platform.h: Set ENABLE_FULLSCREEN_API on win.
3268 2011-05-03 Alexis Menard <alexis.menard@openbossa.org>
3270 Reviewed by Eric Seidel.
3272 Unused but set variable warning in MacroAssemberX86_64
3273 https://bugs.webkit.org/show_bug.cgi?id=59482
3275 * assembler/MacroAssemblerX86_64.h:
3276 (JSC::MacroAssemblerX86_64::call):
3277 (JSC::MacroAssemblerX86_64::tailRecursiveCall):
3278 (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
3280 2011-05-03 Oliver Hunt <oliver@apple.com>
3282 Reviewed by Geoffrey Garen.
3284 Make malloc validation useful
3285 https://bugs.webkit.org/show_bug.cgi?id=57502
3287 Reland this patch (rolled out in 82905) without
3288 turning it on by default.
3290 * JavaScriptCore.exp:
3291 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3292 * wtf/FastMalloc.cpp:
3293 (WTF::tryFastMalloc):
3295 (WTF::tryFastCalloc):
3298 (WTF::tryFastRealloc):
3300 (WTF::fastMallocSize):
3301 (WTF::TCMalloc_PageHeap::isScavengerSuspended):
3302 (WTF::TCMalloc_PageHeap::scheduleScavenger):
3303 (WTF::TCMalloc_PageHeap::suspendScavenger):
3304 (WTF::TCMalloc_PageHeap::signalScavenger):
3305 (WTF::TCMallocStats::malloc):
3306 (WTF::TCMallocStats::free):
3307 (WTF::TCMallocStats::fastCalloc):
3308 (WTF::TCMallocStats::tryFastCalloc):
3309 (WTF::TCMallocStats::calloc):
3310 (WTF::TCMallocStats::fastRealloc):
3311 (WTF::TCMallocStats::tryFastRealloc):
3312 (WTF::TCMallocStats::realloc):
3313 (WTF::TCMallocStats::fastMallocSize):
3315 (WTF::Internal::fastMallocValidationHeader):
3316 (WTF::Internal::fastMallocValidationSuffix):
3317 (WTF::Internal::fastMallocMatchValidationType):
3318 (WTF::Internal::setFastMallocMatchValidationType):
3319 (WTF::fastMallocMatchValidateFree):
3320 (WTF::fastMallocValidate):
3322 2011-05-03 Xan Lopez <xlopez@igalia.com>
3324 Reviewed by Anders Carlsson.
3326 Compile error with GCC 4.6.0, tries to assign unsigned& to bitfield
3327 https://bugs.webkit.org/show_bug.cgi?id=59261
3329 Use unary '+' to force proper type detection in template arguments
3330 with GCC 4.6.0. See bug report for more details.
3332 * runtime/Structure.cpp:
3333 (JSC::StructureTransitionTable::remove): Use '+' to force precise type detection.
3334 (JSC::StructureTransitionTable::add): ditto.
3335 * runtime/Structure.h:
3336 (JSC::StructureTransitionTable::keyForWeakGCMapFinalizer): ditto.
3338 2011-05-03 Jessie Berlin <jberlin@apple.com>
3340 Rubber-stamped by Adam Roben.
3342 Revert r85550 and r85575.
3344 Variables cannot be exported via the .def file. Instead, they should be annotated with
3347 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3348 * runtime/Structure.cpp:
3349 (JSC::Structure::materializePropertyMap):
3350 * runtime/Structure.h:
3351 (JSC::Structure::typeInfo):
3352 (JSC::Structure::previousID):
3353 (JSC::Structure::propertyStorageCapacity):
3354 (JSC::Structure::propertyStorageSize):
3355 (JSC::Structure::get):
3356 (JSC::Structure::materializePropertyMapIfNecessary):
3358 2011-05-02 Adam Roben <aroben@apple.com>
3360 Allow implicit conversion from nullptr_t to PassOwnPtr
3362 This makes it a lot easier to write code that just wants a null PassOwnPtr, especially in
3363 strict PassOwnPtr mode.
3365 Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
3366 doesn't work, but should
3368 Reviewed by Adam Barth.
3371 (WTF::PassOwnPtr::PassOwnPtr): Added a non-explicit constructor that takes a nullptr_t.
3373 * wtf/MessageQueue.h:
3374 (WTF::::waitForMessageFilteredWithTimeout):
3375 (WTF::::tryGetMessage):
3376 Use the new implicit conversion.
3378 2011-05-02 Jessie Berlin <jberlin@apple.com>
3380 Rubber-stamped by Oliver Hunt.
3382 Remove an assertion that Windows was hitting on launch.
3384 * runtime/Structure.cpp:
3385 (JSC::Structure::materializePropertyMap):
3386 * runtime/Structure.h:
3387 (JSC::Structure::typeInfo):
3388 (JSC::Structure::previousID):
3389 (JSC::Structure::propertyStorageCapacity):
3390 (JSC::Structure::propertyStorageSize):
3391 (JSC::Structure::get):
3392 (JSC::Structure::materializePropertyMapIfNecessary):
3394 2011-05-02 Mark Rowe <mrowe@apple.com>
3396 Reviewed by Geoff Garen.
3398 <rdar://problem/9371948> JavaScriptCore should build with GCC 4.2
3400 * Configurations/CompilerVersion.xcconfig:
3402 2011-05-02 Gavin Barraclough <barraclough@apple.com>
3406 * assembler/AbstractMacroAssembler.h:
3407 (JSC::AbstractMacroAssembler::Jump::link):
3408 (JSC::AbstractMacroAssembler::Jump::linkTo):
3410 2011-05-02 Oliver Hunt <oliver@apple.com>
3414 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3416 2011-05-02 Michael Saboff <msaboff@apple.com>
3418 Reviewed by Geoffrey Garen.
3420 crash in JSC::RegExp::match
3421 https://bugs.webkit.org/show_bug.cgi?id=58922
3423 Cleared chained backtrack data label when linking label even if that
3424 label doesn't chain itself. This is needed so that subsequent
3425 backtrack data labels point to the next outer paren and not within
3429 (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
3431 2011-05-02 Geoffrey Garen <ggaren@apple.com>
3433 Reviewed by Oliver Hunt.
3435 Tiny bit of heap cleanup.
3437 * heap/MarkedBlock.h:
3438 (JSC::MarkedBlock::contains): Tightened up an assertion and a comment.
3440 * heap/MarkedSpace.h:
3441 (JSC::MarkedSpace::globalData):
3442 (JSC::MarkedSpace::highWaterMark):
3443 (JSC::MarkedSpace::setHighWaterMark): Moved inlines out of the class
3444 definition, for better clarity.
3446 2011-05-02 Oliver Hunt <oliver@apple.com>
3448 Reviewed by Gavin Barraclough.
3450 Correct marking of interpreter data in mixed mode builds
3451 https://bugs.webkit.org/show_bug.cgi?id=59962
3453 We had a few places in mixed mode builds where we would not
3454 track data used by the interpreter for marking. This patch
3455 corrects the problem and adds a number of assertions to catch
3456 live Structures being collected.
3458 * JavaScriptCore.exp:
3459 * assembler/ARMv7Assembler.h:
3460 (JSC::ARMv7Assembler::ARMInstructionFormatter::debugOffset):
3461 * bytecode/CodeBlock.cpp:
3462 (JSC::CodeBlock::dump):
3463 * bytecode/CodeBlock.h:
3464 (JSC::CodeBlock::addPropertyAccessInstruction):
3465 (JSC::CodeBlock::addGlobalResolveInstruction):
3466 (JSC::CodeBlock::addStructureStubInfo):
3467 (JSC::CodeBlock::addGlobalResolveInfo):
3468 * bytecompiler/BytecodeGenerator.cpp:
3469 (JSC::BytecodeGenerator::emitResolve):
3470 (JSC::BytecodeGenerator::emitResolveWithBase):
3471 (JSC::BytecodeGenerator::emitGetById):
3472 (JSC::BytecodeGenerator::emitPutById):
3473 (JSC::BytecodeGenerator::emitDirectPutById):
3474 * runtime/Structure.cpp:
3475 (JSC::Structure::materializePropertyMap):
3476 * runtime/Structure.h:
3477 (JSC::Structure::typeInfo):
3478 (JSC::Structure::previousID):
3479 (JSC::Structure::propertyStorageCapacity):
3480 (JSC::Structure::propertyStorageSize):
3481 (JSC::Structure::get):
3482 (JSC::Structure::materializePropertyMapIfNecessary):
3484 2011-05-02 Xan Lopez <xlopez@igalia.com>
3486 Reviewed by Alexey Proskuryakov.