4bf0bb3d9347c853f6f1a3c0e6f616a32175e706
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         Unreviewed. Fix the GTK+ build.
4
5         * GNUmakefile.am: Add javascriptcore_cflags variable.
6
7 2011-06-04  Kevin Ollivier  <kevino@theolliviers.com>
8
9         [wx] Unreviewed build fix. Restore the PPC build and allow users to specify architectures
10         to build on Mac.
11
12         * wtf/Platform.h:
13
14 2011-06-04  Gustavo Noronha Silva  <gns@gnome.org>
15
16         Unreviewed, MIPS build fix.
17
18         WebKitGTK+ tarball fails to build on MIPS.
19         https://buildd.debian.org/status/fetch.php?pkg=webkitgtk%2B&arch=mips&ver=1.4.0-1&stamp=1304786691
20
21         * GNUmakefile.list.am: Add missing MIPS-related file to the list
22         of files that are added to the tarball on make dist, and fix
23         sorting.
24
25 2011-06-04  Sam Weinig  <sam@webkit.org>
26
27         Reviewed by Darin Adler.
28
29         Fix formatting of the output generated by KeywordLookupGenerator.py
30         https://bugs.webkit.org/show_bug.cgi?id=62083
31
32         - Uses correct year for copyright.
33         - Puts ending brace on same line as "else if"
34         - Puts starting brace of function on its own line.
35         - Adds some tasteful whitespace.
36         - Adds comments to make clear that scopes are ending
37         - Make macros actually split on two lines.
38
39         * KeywordLookupGenerator.py:
40
41 2011-06-04  Adam Barth  <abarth@webkit.org>
42
43         Reviewed by Eric Seidel.
44
45         KeywordLookupGenerator.py spams stdout in Chromium Linux build
46         https://bugs.webkit.org/show_bug.cgi?id=62087
47
48         This action does not appear to be needed.
49
50         * JavaScriptCore.gyp/JavaScriptCore.gyp:
51
52 2011-06-03  Oliver Hunt  <oliver@apple.com>
53
54         Reviewed by Maciej Stachowiak.
55
56         Lexer needs to provide Identifier for reserved words
57         https://bugs.webkit.org/show_bug.cgi?id=62086
58
59         Alas it is necessary to provide an Identifier reference for keywords
60         so that we can do the right thing when they're used in object literals.
61         We now keep Identifiers for all reserved words in the CommonIdentifiers
62         structure so that we can access them without a hash lookup.
63
64         * KeywordLookupGenerator.py:
65         * parser/Lexer.cpp:
66         (JSC::Lexer::parseIdentifier):
67         * parser/Lexer.h:
68         * runtime/CommonIdentifiers.cpp:
69         (JSC::CommonIdentifiers::CommonIdentifiers):
70         * runtime/CommonIdentifiers.h:
71
72 2011-06-03  Gavin Barraclough  <barraclough@apple.com>
73
74         Reviewed by Sam Weinig.
75
76         Add debug code to break on speculation failures.
77
78         * dfg/DFGJITCompiler.cpp:
79         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
80         (JSC::DFG::JITCompiler::compileFunction):
81         * dfg/DFGNode.h:
82
83 2011-06-03  Gavin Barraclough  <barraclough@apple.com>
84
85         Reviewed by Sam Weinig.
86
87         https://bugs.webkit.org/show_bug.cgi?id=62082
88         DFG JIT - bug passing arguments that need swap
89
90         This is really just a typo.
91         When setting up the arguments for a call out to a C operation, we'll
92         fail to swap arguments where this is necessary. For example, in the
93         case of 2 arg calls, where the first argument is in %rdx & the second
94         is in %rsi we should swap (exec will be passed in %rdi), but we don't.
95
96         This can also affect function calls passing three arguments.
97
98         * dfg/DFGJITCodeGenerator.h:
99         (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
100             - Call swap with the correct arguments.
101
102 2011-06-03  Oliver Hunt  <oliver@apple.com>
103
104         Reviewed by Gavin Barraclough.
105
106         Force inlining of some hot lexer functions
107         https://bugs.webkit.org/show_bug.cgi?id=62079
108
109         Fix more GCC stupidity
110
111         * parser/Lexer.h:
112         (JSC::Lexer::isWhiteSpace):
113         (JSC::Lexer::isLineTerminator):
114
115 2011-06-03  Oliver Hunt  <oliver@apple.com>
116
117         Reviewed by Gavin Barraclough.
118
119         GCC not inlining some functions that it really should be
120         https://bugs.webkit.org/show_bug.cgi?id=62075
121
122         Add ALWAYS_INLINE to a number of parsing and lexing functions
123         that should always be inlined.  This gets us ~1.4% on my ad hoc
124         parser test.
125
126         * KeywordLookupGenerator.py:
127         * parser/JSParser.cpp:
128         (JSC::JSParser::next):
129         (JSC::JSParser::nextTokenIsColon):
130         (JSC::JSParser::consume):
131         (JSC::JSParser::match):
132         (JSC::JSParser::tokenStart):
133         (JSC::JSParser::tokenLine):
134         (JSC::JSParser::tokenEnd):
135         * parser/Lexer.cpp:
136         (JSC::isIdentPart):
137
138 2011-06-03  Oliver Hunt  <oliver@apple.com>
139
140         Whoops, fix last minute bug.
141
142         * parser/Lexer.cpp:
143         (JSC::Lexer::parseIdentifier):
144
145 2011-06-03  Martin Robinson  <mrobinson@igalia.com>
146
147         Try to fix the GTK+ build.
148
149         * GNUmakefile.am: Clean up some spaces that should be tabs.
150         * GNUmakefile.list.am: Add KeywordLookup.h to the source list
151         and clean up some spaces that should be tabs.
152
153 2011-06-03  Oliver Hunt  <oliver@apple.com>
154
155         Reviewed by Geoffrey Garen.
156
157         Improve keyword lookup
158         https://bugs.webkit.org/show_bug.cgi?id=61913
159
160         Rather than doing multiple hash lookups as we currently
161         do when trying to identify keywords we now use an 
162         automatically generated decision tree (essentially it's
163         a hard coded patricia trie).  We still use the regular
164         lookup table for the last few characters of an input as
165         this allows us to completely skip all bounds checks.
166
167         * CMakeLists.txt:
168         * DerivedSources.make:
169         * DerivedSources.pro:
170         * GNUmakefile.am:
171         * JavaScriptCore.gyp/JavaScriptCore.gyp:
172         * JavaScriptCore.xcodeproj/project.pbxproj:
173         * KeywordLookupGenerator.py: Added.
174         * make-generated-sources.sh:
175         * parser/Lexer.cpp:
176         (JSC::Lexer::internalShift):
177         (JSC::Lexer::shift):
178         (JSC::Lexer::parseIdentifier):
179         * parser/Lexer.h:
180
181 2011-06-03  Siddharth Mathur  <siddharth.mathur@nokia.com>
182
183         Reviewed by Benjamin Poulain.
184
185         [Qt] Build flag for experimental ICU library support
186         https://bugs.webkit.org/show_bug.cgi?id=60786
187
188         Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental 
189         ICU powered Unicode support. 
190
191         * JavaScriptCore.pri: Support for use_system_icu CONFIG flag.
192         * wtf/unicode/qt4/UnicodeQt4.h: Guard an include file with USE(ICU_UNICODE). 
193
194 2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>
195
196         Reviewed by Benjamin Poulain.
197
198         [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
199         https://bugs.webkit.org/show_bug.cgi?id=61957
200
201         When building inside the Qt source tree, qmake always append the mkspecs
202         defines after ours. We have to workaround and make sure that we append 
203         our flags after the qmake variable used inside Qt. This workaround was provided 
204         by our qmake folks. We need to append in both case because qmake behave differently
205         when called with -spec or via SUBDIR+=. This patch unbreak r87950 on Mac for Qt port.
206
207         * JavaScriptCore.pro:
208
209 2011-06-02  Jay Civelli  <jcivelli@chromium.org>
210
211         Reviewed by Adam Barth.
212
213         Added a method to generate RFC 2822 compliant date strings.
214         https://bugs.webkit.org/show_bug.cgi?id=7169
215
216         * wtf/DateMath.cpp:
217         (WTF::twoDigitStringFromNumber):
218         (WTF::makeRFC2822DateString):
219         * wtf/DateMath.h:
220
221 2011-06-02  Alexis Menard  <alexis.menard@openbossa.org>
222
223         Reviewed by Andreas Kling.
224
225         [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
226         https://bugs.webkit.org/show_bug.cgi?id=61957
227
228         When building inside the Qt source tree, qmake always append the mkspecs
229         defines after ours. We have to workaround and make sure that we append  
230         our flags after the qmake variable used inside Qt. This workaround was provided
231         by our qmake folks.
232
233         * JavaScriptCore.pro:
234
235 2011-06-01  Oliver Hunt  <oliver@apple.com>
236
237         Reviewed by Geoffrey Garen.
238
239         Add single character lookup cache to IdentifierArena
240         https://bugs.webkit.org/show_bug.cgi?id=61879
241
242         Add a simple lookup cache for single ascii character
243         identifiers.  Produces around a 2% improvement in parse
244         time for my adhoc parser test.
245
246         * parser/ParserArena.h:
247         (JSC::IdentifierArena::IdentifierArena):
248         (JSC::IdentifierArena::clear):
249         (JSC::IdentifierArena::makeIdentifier):
250
251 2011-05-31  Oliver Hunt  <oliver@apple.com>
252
253         Reviewed by Geoffrey Garen.
254
255         Freezing a function and its prototype causes browser to crash.
256         https://bugs.webkit.org/show_bug.cgi?id=61758
257
258         Make JSObject::preventExtensions virtual so that we can override it
259         and instantiate all lazy
260
261         * JavaScriptCore.exp:
262         * runtime/JSFunction.cpp:
263         (JSC::createPrototypeProperty):
264         (JSC::JSFunction::preventExtensions):
265         (JSC::JSFunction::getOwnPropertySlot):
266         * runtime/JSFunction.h:
267         * runtime/JSObject.h:
268         * runtime/JSObject.cpp:
269         (JSC::JSObject::seal):
270         (JSC::JSObject::seal):
271
272 2011-06-01  Sheriff Bot  <webkit.review.bot@gmail.com>
273
274         Unreviewed, rolling out r87788.
275         http://trac.webkit.org/changeset/87788
276         https://bugs.webkit.org/show_bug.cgi?id=61856
277
278         breaks windows chromium canary (Requested by jknotten on
279         #webkit).
280
281         * wtf/DateMath.cpp:
282         (WTF::timeClip):
283         * wtf/DateMath.h:
284
285 2011-06-01  Jay Civelli  <jcivelli@chromium.org>
286
287         Reviewed by Adam Barth.
288
289         Added a method to generate RFC 2822 compliant date strings.
290         https://bugs.webkit.org/show_bug.cgi?id=7169
291
292         * wtf/DateMath.cpp:
293         (WTF::twoDigitStringFromNumber):
294         (WTF::makeRFC2822DateString):
295         * wtf/DateMath.h:
296
297 2011-05-31  Yong Li  <yoli@rim.com>
298
299         Reviewed by Eric Seidel.
300
301         https://bugs.webkit.org/show_bug.cgi?id=54807
302         We have been assuming plain bitfields (like "int a : 31") are always signed integers.
303         However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain
304         bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned.
305         http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html
306         Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers,
307         always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good
308         rule we should have in order to make our code independent from compilers and compiler flags.
309
310         No new test added because this change is not known to fix any issue.
311
312         * bytecode/StructureStubInfo.h:
313
314 2011-05-30  Hojong Han  <hojong.han@samsung.com>
315
316         Reviewed by Geoffrey Garen.
317
318         [JSC] malfunction during arithmetic condition check with negative number (-2147483648)
319         https://bugs.webkit.org/show_bug.cgi?id=61416
320
321         * assembler/MacroAssemblerARM.h:
322         (JSC::MacroAssemblerARM::branch32):
323         * tests/mozilla/ecma/Expressions/11.12-1.js:
324         (getTestCases):
325
326 2011-05-29  Geoffrey Garen  <ggaren@apple.com>
327
328         Reviewed by Sam Weinig.
329
330         Some heap refactoring
331         https://bugs.webkit.org/show_bug.cgi?id=61704
332         
333         SunSpider says no change.
334
335         * JavaScriptCore.exp: Export!
336
337         * heap/Heap.cpp: COLLECT_ON_EVERY_ALLOCATION can actually do so now.
338
339         (JSC::Heap::Heap): Changed Heap sub-objects to point to the heap.
340
341         (JSC::Heap::allocate): Changed inline allocation code to only select the
342         size class, since this can be optimized out at compile time -- everything
343         else is now inlined into this out-of-line function.
344         
345         No need to duplicate ASSERTs made in our caller.
346
347         * heap/Heap.h:
348         (JSC::Heap::heap):
349         (JSC::Heap::isMarked):
350         (JSC::Heap::testAndSetMarked):
351         (JSC::Heap::testAndClearMarked):
352         (JSC::Heap::setMarked): Call directly into MarkedBlock instead of adding
353         a layer of indirection through MarkedSpace.
354
355         (JSC::Heap::allocate): See above.
356
357         * heap/MarkedBlock.cpp:
358         (JSC::MarkedBlock::create):
359         (JSC::MarkedBlock::MarkedBlock):
360         * heap/MarkedBlock.h: Changed Heap sub-objects to point to the heap.
361
362         * heap/MarkedSpace.cpp:
363         (JSC::MarkedSpace::MarkedSpace):
364         (JSC::MarkedSpace::allocateBlock):
365         * heap/MarkedSpace.h:
366         (JSC::MarkedSpace::allocate): Updated to match changes above.
367
368 2011-05-28  David Kilzer  <ddkilzer@apple.com>
369
370         BUILD FIX when building only the interpreter
371
372         Fixes the following compiler warning:
373
374             JavaScriptCore/runtime/JSGlobalData.cpp:462:6: error: no previous prototype for function 'releaseExecutableMemory' [-Werror,-Wmissing-prototypes,3]
375              void releaseExecutableMemory(JSGlobalData& globalData)
376                   ^
377
378         * jit/ExecutableAllocator.h: Moved declaration of
379         JSC::releaseExecutableMemory().
380
381 2011-05-28  David Kilzer  <ddkilzer@apple.com>
382
383         BUILD FIX after r87527 with ENABLE(BRANCH_COMPACTION)
384
385         * assembler/LinkBuffer.h:
386         (JSC::LinkBuffer::linkCode): Added missing argument.
387
388 2011-05-27  Geoffrey Garen  <ggaren@apple.com>
389
390         Reviewed by Oliver Hunt.
391
392         JS API is too aggressive about throwing exceptions for NULL get or set operations
393         https://bugs.webkit.org/show_bug.cgi?id=61678
394
395         * API/JSCallbackObject.h: Changed our staticValueGetter to a regular
396         function that returns a JSValue, so it can fail and still forward to
397         normal property lookup.
398
399         * API/JSCallbackObjectFunctions.h:
400         (JSC::::getOwnPropertySlot): Don't throw an exception when failing to
401         access a static property -- just forward the access. This allows objects
402         to observe get/set operations but still let the JS object manage lifetime.
403
404         (JSC::::put): Ditto.
405
406         (JSC::::getStaticValue): Same as JSCallbackObject.h.
407
408         * API/tests/testapi.c:
409         (MyObject_set_nullGetForwardSet):
410         * API/tests/testapi.js: Updated tests to reflect slightly less strict
411         behavior, which matches headerdoc claims.
412
413 2011-05-27  Geoffrey Garen  <ggaren@apple.com>
414
415         Reviewed by Oliver Hunt.
416
417         Property caching is too aggressive for API objects
418         https://bugs.webkit.org/show_bug.cgi?id=61677
419
420         * API/JSCallbackObject.h: Opt in to ProhibitsPropertyCaching, since our
421         callback APIs allow the client to change its mind about our propertis at
422         any time.
423
424         * API/tests/testapi.c:
425         (PropertyCatchalls_getProperty):
426         (PropertyCatchalls_setProperty):
427         (PropertyCatchalls_getPropertyNames):
428         (PropertyCatchalls_class):
429         (main):
430         * API/tests/testapi.js: Some tests for dynamic API objects.
431
432         * interpreter/Interpreter.cpp:
433         (JSC::Interpreter::tryCachePutByID):
434         (JSC::Interpreter::tryCacheGetByID):
435         * jit/JITStubs.cpp:
436         (JSC::JITThunks::tryCachePutByID):
437         (JSC::JITThunks::tryCacheGetByID):
438         (JSC::DEFINE_STUB_FUNCTION): Opt out of property caching if the client
439         requires it.
440
441         * runtime/JSTypeInfo.h:
442         (JSC::TypeInfo::TypeInfo):
443         (JSC::TypeInfo::isFinal):
444         (JSC::TypeInfo::prohibitsPropertyCaching):
445         (JSC::TypeInfo::flags): Added a flag to track opting out of property
446         caching. Fixed an "&&" vs "&" typo that was previously harmless, but
447         is now harmful since m_flags2 can have more than one bit set.
448
449 2011-05-27  Stephanie Lewis  <slewis@apple.com>
450
451         Unreviewed.
452
453         Fix a typo in the order_file flag.
454
455         * Configurations/Base.xcconfig:
456
457 2011-05-27  Patrick Gansterer  <paroga@webkit.org>
458
459         Unreviewed. Build fix for !ENABLE(ASSEMBLER) after r87527.
460
461         * runtime/JSGlobalData.cpp:
462         (JSGlobalData::JSGlobalData):
463
464 2011-05-27  Oliver Hunt  <oliver@apple.com>
465
466         Reviewed by Geoffrey Garen.
467
468         Add a few validity assertions to JSCallbackObject
469         https://bugs.webkit.org/show_bug.cgi?id=61659
470
471         * API/JSCallbackObject.h:
472         (JSC::JSCallbackObject::visitChildren):
473
474 2011-05-27  Oliver Hunt  <oliver@apple.com>
475
476         Build fix
477
478         * runtime/RegExpCache.cpp:
479         (JSC::RegExpCache::invalidateCode):
480
481 2011-05-27  Oliver Hunt  <oliver@apple.com>
482
483         Reviewed by Geoffrey Garen.
484
485         Try to release unused executable memory when the FixedVMPool allocator is under pressure
486         https://bugs.webkit.org/show_bug.cgi?id=61651
487
488         Rather than crashing when full the FixedVMPool allocator now returns a null
489         allocation.  We replace the code that used to CRASH() on null allocations
490         with logic that asks the provided globalData to release any executable memory
491         that it can.  Currently this just means throwing away all regexp code, but
492         in future we'll try to be more aggressive.
493
494         * assembler/ARMAssembler.cpp:
495         (JSC::ARMAssembler::executableCopy):
496         * assembler/ARMAssembler.h:
497         * assembler/AssemblerBuffer.h:
498         (JSC::AssemblerBuffer::executableCopy):
499         * assembler/AssemblerBufferWithConstantPool.h:
500         * assembler/LinkBuffer.h:
501         (JSC::LinkBuffer::LinkBuffer):
502         (JSC::LinkBuffer::linkCode):
503         * assembler/MIPSAssembler.h:
504         (JSC::MIPSAssembler::executableCopy):
505         * assembler/SH4Assembler.h:
506         (JSC::SH4Assembler::executableCopy):
507         * assembler/X86Assembler.h:
508         (JSC::X86Assembler::executableCopy):
509         (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
510         * dfg/DFGJITCompiler.cpp:
511         (JSC::DFG::JITCompiler::compileFunction):
512         * jit/ExecutableAllocator.h:
513         (JSC::ExecutablePool::create):
514         (JSC::ExecutablePool::alloc):
515         (JSC::ExecutableAllocator::ExecutableAllocator):
516         (JSC::ExecutableAllocator::poolForSize):
517         (JSC::ExecutablePool::ExecutablePool):
518         (JSC::ExecutablePool::poolAllocate):
519         * jit/ExecutableAllocatorFixedVMPool.cpp:
520         (JSC::FixedVMPoolAllocator::alloc):
521         * jit/JIT.cpp:
522         (JSC::JIT::privateCompile):
523         * jit/JITOpcodes.cpp:
524         (JSC::JIT::privateCompileCTIMachineTrampolines):
525         * jit/JITOpcodes32_64.cpp:
526         (JSC::JIT::privateCompileCTIMachineTrampolines):
527         (JSC::JIT::privateCompileCTINativeCall):
528         * jit/JITPropertyAccess.cpp:
529         (JSC::JIT::stringGetByValStubGenerator):
530         (JSC::JIT::privateCompilePutByIdTransition):
531         (JSC::JIT::privateCompilePatchGetArrayLength):
532         (JSC::JIT::privateCompileGetByIdProto):
533         (JSC::JIT::privateCompileGetByIdSelfList):
534         (JSC::JIT::privateCompileGetByIdProtoList):
535         (JSC::JIT::privateCompileGetByIdChainList):
536         (JSC::JIT::privateCompileGetByIdChain):
537         * jit/JITPropertyAccess32_64.cpp:
538         (JSC::JIT::stringGetByValStubGenerator):
539         (JSC::JIT::privateCompilePutByIdTransition):
540         (JSC::JIT::privateCompilePatchGetArrayLength):
541         (JSC::JIT::privateCompileGetByIdProto):
542         (JSC::JIT::privateCompileGetByIdSelfList):
543         (JSC::JIT::privateCompileGetByIdProtoList):
544         (JSC::JIT::privateCompileGetByIdChainList):
545         (JSC::JIT::privateCompileGetByIdChain):
546         * jit/SpecializedThunkJIT.h:
547         (JSC::SpecializedThunkJIT::finalize):
548         * jit/ThunkGenerators.cpp:
549         (JSC::charCodeAtThunkGenerator):
550         (JSC::charAtThunkGenerator):
551         (JSC::fromCharCodeThunkGenerator):
552         (JSC::sqrtThunkGenerator):
553         (JSC::powThunkGenerator):
554         * runtime/JSGlobalData.cpp:
555         (JSC::JSGlobalData::JSGlobalData):
556         (JSC::JSGlobalData::releaseExecutableMemory):
557         (JSC::releaseExecutableMemory):
558         * runtime/JSGlobalData.h:
559         * runtime/RegExpCache.cpp:
560         (JSC::RegExpCache::invalidateCode):
561         * runtime/RegExpCache.h:
562         * yarr/YarrJIT.cpp:
563         (JSC::Yarr::YarrGenerator::compile):
564
565 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
566
567         Reviewed by Oliver Hunt.
568
569         Optimized ConservativeSet to avoid double-visiting objects
570         https://bugs.webkit.org/show_bug.cgi?id=61592
571         
572         SunSpider thinks this might be a 1% speedup
573
574         * heap/ConservativeRoots.h:
575         (JSC::ConservativeRoots::add): Use testAndClearMarked to avoid double-visiting
576         an object.
577
578         * heap/Heap.h:
579         (JSC::Heap::isMarked):
580         (JSC::Heap::testAndSetMarked):
581         (JSC::Heap::testAndClearMarked):
582         (JSC::Heap::setMarked): Added testAndClearMarked. Changed argument type
583         to void*, since clients want to ask questions about arbitrary pointers
584         into the heap, even when they aren't known to be JSCells.
585
586         * heap/MarkedBlock.h:
587         (JSC::MarkedBlock::testAndClearMarked):
588         * heap/MarkedSpace.h:
589         (JSC::MarkedSpace::isMarked):
590         (JSC::MarkedSpace::testAndSetMarked):
591         (JSC::MarkedSpace::testAndClearMarked):
592         (JSC::MarkedSpace::setMarked):
593         (JSC::MarkedSpace::contains): Ditto.
594
595         * wtf/Bitmap.h:
596         (WTF::::testAndClear): New function for ConservativeRoots's inverted
597         marking pass.
598
599 2011-05-27  Stephanie Lewis  <slewis@apple.com>
600
601         Rubber Stamped by Adam Roben.
602
603         Update Order Files.  Use -order_file flag since it can order more of the binary.
604
605         * Configurations/Base.xcconfig:
606         * JavaScriptCore.order:
607
608 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
609
610         Reviewed by Oliver Hunt.
611
612         Renamed heapRootMarker to heapRootVisitor to match its class name
613         https://bugs.webkit.org/show_bug.cgi?id=61584
614
615         * heap/Heap.cpp:
616         (JSC::Heap::markProtectedObjects):
617         (JSC::Heap::markTempSortVectors):
618         (JSC::Heap::markRoots):
619
620 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
621
622         Reviewed by Oliver Hunt.
623
624         Removed some interdependency between Heap and SmallStrings by simplifying
625         the SmallStrings lifetime model
626         https://bugs.webkit.org/show_bug.cgi?id=61579
627         
628         SunSpider reports no change.
629         
630         Using Weak<T> could accomplish this too, but we're not sure it will give
631         us the performance we need. This is a first step, and it accomplishes
632         most of the value of using Weak<T>.
633
634         * heap/Heap.cpp:
635         (JSC::Heap::destroy):
636         (JSC::Heap::markRoots):
637         (JSC::Heap::reset): Finalize small strings just like other weak handles.
638
639         * runtime/SmallStrings.cpp:
640         (JSC::finalize):
641         (JSC::SmallStrings::finalizeSmallStrings):
642         * runtime/SmallStrings.h: Make all small strings trivially weak, instead
643         of having an "all for one, one for all" memory model.
644
645 2011-05-26  Oliver Hunt  <oliver@apple.com>
646
647         Reviewed by Geoffrey Garen.
648
649         Make RegExpCache a weak map
650         https://bugs.webkit.org/show_bug.cgi?id=61554
651
652         Switch to a weak map for the regexp cache, and hide that
653         behaviour behind RegExp::create.
654
655         When a RegExp is compiled it attempts to add itself to
656         the "strong" cache.  This cache is a simple round-robin
657         buffer as was the old strong cache.  Happily this can
658         be smaller than the old strong cache as RegExps are only
659         added when they're compiled so it is under less pressure
660         to evict.
661
662         * bytecompiler/NodesCodegen.cpp:
663         (JSC::RegExpNode::emitBytecode):
664         * runtime/RegExp.cpp:
665         (JSC::RegExp::RegExp):
666         (JSC::RegExp::create):
667         (JSC::RegExp::match):
668         * runtime/RegExp.h:
669         (JSC::RegExp::gcShouldInvalidateCode):
670         (JSC::RegExp::hasCode):
671         (JSC::RegExp::key):
672         * runtime/RegExpCache.cpp:
673         (JSC::RegExpCache::lookupOrCreate):
674         (JSC::RegExpCache::RegExpCache):
675         (JSC::RegExpCache::isReachableFromOpaqueRoots):
676         (JSC::RegExpCache::finalize):
677         * runtime/RegExpCache.h:
678         * runtime/RegExpConstructor.cpp:
679         (JSC::constructRegExp):
680         * runtime/RegExpPrototype.cpp:
681         (JSC::regExpProtoFuncCompile):
682         * runtime/StringPrototype.cpp:
683         (JSC::stringProtoFuncMatch):
684         (JSC::stringProtoFuncSearch):
685
686 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
687
688         Reviewed by Oliver Hunt.
689
690         Moved Heap-related functions out of JSCell.h and into respective header files
691         https://bugs.webkit.org/show_bug.cgi?id=61567
692
693         * heap/Heap.h:
694         (JSC::Heap::allocate):
695         (JSC::Heap::heap):
696         * heap/MarkedBlock.h:
697         (JSC::MarkedBlock::allocate):
698         * heap/MarkedSpace.h:
699         (JSC::MarkedSpace::sizeClassFor):
700         (JSC::MarkedSpace::allocate):
701         * runtime/JSCell.h:
702         (JSC::JSCell::destructor):
703
704 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
705
706         Try to fix Windows build.
707
708         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
709
710 2011-05-26  Ryosuke Niwa  <rniwa@webkit.org>
711
712         Reviewed by Eric Seidel.
713
714         [debug feature] WTFString should have show() method
715         https://bugs.webkit.org/show_bug.cgi?id=61149
716
717         Added String::show and AtomicString::show in NDEBUG.
718
719         * wtf/text/AtomicString.cpp:
720         (WTF::AtomicString::show):
721         * wtf/text/AtomicString.h:
722         * wtf/text/WTFString.cpp:
723         (String::show):
724         * wtf/text/WTFString.h:
725
726 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
727
728         Reviewed by Geoffrey Garen.
729
730         Factored out some Heap ASSERTs
731         https://bugs.webkit.org/show_bug.cgi?id=61565
732
733         * JavaScriptCore.exp:
734         * heap/Heap.cpp:
735         (JSC::isValidSharedInstanceThreadState):
736         (JSC::isValidThreadState):
737         (JSC::Heap::markRoots):
738         (JSC::Heap::isValidAllocation):
739         * heap/Heap.h:
740         * runtime/JSCell.h:
741         (JSC::JSCell::Heap::allocate):
742
743 2011-05-26  Gavin Barraclough  <barraclough@apple.com>
744
745         Reviewed by Geoff Garen.
746
747         https://bugs.webkit.org/show_bug.cgi?id=61508
748         DFG JIT - Add support for get by id self caching.
749
750         Change the call out to be an unexpected call (using silent spill/fill functions),
751         add a structure check & compact load to the JIT code, and add repatching mechanisms.
752         Since DFGOperations may want to be be implemented in asm, make these symbols be extern
753         "C". Add an asm wrapper to pass the return address to the optimizing get-by-id operation,
754         so that it can look up its StructureStubInfo.
755
756         * JavaScriptCore.xcodeproj/project.pbxproj:
757             - Added new files.
758         * bytecode/StructureStubInfo.h:
759             - Added 'unset' entries to union.
760         * dfg/DFGJITCodeGenerator.h:
761         (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheck):
762             - Return the call, we need this to populate the StructureStubInfo.
763         * dfg/DFGJITCompiler.cpp:
764         (JSC::DFG::JITCompiler::compileFunction):
765             - Populate the CodebBlock's StructureStubInfo Vector.
766         * dfg/DFGJITCompiler.h:
767         (JSC::DFG::JITCompiler::appendCallWithExceptionCheck):
768             - Return the call, we need this to populate the StructureStubInfo.
769         (JSC::DFG::JITCompiler::addPropertyAccess):
770         (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
771             - Add structures to record property access info during compilation.
772         * dfg/DFGOperations.cpp:
773             - Made all external methods extern "C".
774         (JSC::DFG::operationPutByValInternal):
775             - Moved outside of the extern "C" block.
776         * dfg/DFGOperations.h:
777             - Made all external methods extern "C".
778         * dfg/DFGRepatch.cpp: Added.
779         (JSC::DFG::dfgRepatchCall):
780             - repatch a call to link to a new callee function.
781         (JSC::DFG::dfgRepatchGetByIdSelf):
782             - Modify the JIT code to optimize self accesses.
783         (JSC::DFG::tryCacheGetByID):
784             - Internal implementation of dfgRepatchGetByID (factor out failing cases).
785         (JSC::DFG::dfgRepatchGetByID):
786             - Used to optimize 'operationGetByIdOptimize' - repatches to 'operationGetById', and tries to optimize self accesses!
787         * dfg/DFGRepatch.h: Added.
788             - Expose dfgRepatchGetByID.
789         * dfg/DFGSpeculativeJIT.cpp:
790         (JSC::DFG::SpeculativeJIT::compile):
791             - Changed implementation of GetById ops.
792
793 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
794
795         Rolled back in http://trac.webkit.org/changeset/87408 with Windows build fixed.
796
797         * heap/MarkedBlock.cpp:
798         (JSC::MarkedBlock::MarkedBlock):
799         * heap/MarkedBlock.h:
800         * wtf/DoublyLinkedList.h:
801         (WTF::::DoublyLinkedListNode):
802         (WTF::::setPrev):
803         (WTF::::setNext):
804         (WTF::::prev):
805         (WTF::::next):
806         (WTF::::DoublyLinkedList):
807         (WTF::::isEmpty):
808         (WTF::::size):
809         (WTF::::clear):
810         (WTF::::head):
811         (WTF::::append):
812         (WTF::::remove):
813         (WTF::::removeHead):
814
815 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
816
817         Rolled out http://trac.webkit.org/changeset/87408 because it broke the
818         Windows build.
819
820         * heap/MarkedBlock.cpp:
821         (JSC::MarkedBlock::MarkedBlock):
822         * heap/MarkedBlock.h:
823         (JSC::MarkedBlock::setPrev):
824         (JSC::MarkedBlock::setNext):
825         (JSC::MarkedBlock::prev):
826         (JSC::MarkedBlock::next):
827         * wtf/DoublyLinkedList.h:
828         (WTF::::DoublyLinkedList):
829         (WTF::::isEmpty):
830         (WTF::::head):
831         (WTF::::append):
832         (WTF::::remove):
833
834 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
835
836         Reviewed by Oliver Hunt.
837
838         Provide a real owner when copying a property table, for the sake of
839         write barriers.
840         https://bugs.webkit.org/show_bug.cgi?id=61547
841         
842         No test because we can't enable the writeBarrier() ASSERT just yet.
843
844         * runtime/Structure.cpp:
845         (JSC::Structure::addPropertyTransition):
846
847 2011-05-26  Adam Roben  <aroben@apple.com>
848
849         Windows build fix after r87346
850
851         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Fixed up exports to match
852         reality.
853
854 2011-05-26  Patrick Gansterer  <paroga@webkit.org>
855
856         Reviewed by Adam Barth.
857
858         ASSERT(isMainThread()) when using single threaded jsc executable
859         https://bugs.webkit.org/show_bug.cgi?id=60846
860
861         Remove the ASSERT since we do not have the concept of MainThread in JSC.
862
863         * wtf/CryptographicallyRandomNumber.cpp:
864         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
865         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
866
867 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
868
869         Reviewed by Sam Weinig.
870
871         https://bugs.webkit.org/show_bug.cgi?id=61506
872
873         Move the silent spill/fill methods in the DFG JIT to the JITCodeGenerator
874         so that they are available to the SpeculativeJIT.
875
876         * dfg/DFGJITCodeGenerator.h:
877         (JSC::DFG::JITCodeGenerator::silentSpillGPR):
878         (JSC::DFG::JITCodeGenerator::silentSpillFPR):
879         (JSC::DFG::JITCodeGenerator::silentFillGPR):
880         (JSC::DFG::JITCodeGenerator::silentFillFPR):
881         (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
882         (JSC::DFG::JITCodeGenerator::silentFillAllRegisters):
883         * dfg/DFGNonSpeculativeJIT.h:
884
885 2011-05-25  Ryosuke Niwa  <rniwa@webkit.org>
886
887         An attempt to revive Windows bots.
888
889         * runtime/RegExp.cpp:
890         * runtime/RegExp.h:
891
892 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
893
894         Reviewed by Sam Weinig.
895
896         Bug 61503 - Move population of CodeBlock::m_structureStubInfos into JIT
897
898         This data structure, used at runtime by the JIT, is currently unnecessarily populated
899         with default entries during byte compilation.
900
901         Aside from meaning that there is JIT specific code in the bytecompiler, this also ties
902         us to one entry per corresponding bytecode op, which may be undesirable. Instead,
903         populate this array from the JIT.
904
905         The type StructureStubInfo has two unused states, one for gets & one for puts. Unify
906         these, so that the class can have a default constructor (and to simply switch statements
907         in code walking over the table).
908
909         This change has ramification for the DFG JIT, in that the DFG JIT used this datastructure
910         to check for functions containing property access. Instead do so in the DFGByteCodeParser.
911
912         * bytecode/CodeBlock.cpp:
913         (JSC::printStructureStubInfo):
914         * bytecode/CodeBlock.h:
915         (JSC::CodeBlock::setNumberOfStructureStubInfos):
916         (JSC::CodeBlock::numberOfStructureStubInfos):
917         * bytecode/StructureStubInfo.cpp:
918         (JSC::StructureStubInfo::deref):
919         (JSC::StructureStubInfo::visitAggregate):
920         * bytecode/StructureStubInfo.h:
921         (JSC::StructureStubInfo::StructureStubInfo):
922         * bytecompiler/BytecodeGenerator.cpp:
923         (JSC::BytecodeGenerator::emitGetById):
924         (JSC::BytecodeGenerator::emitPutById):
925         (JSC::BytecodeGenerator::emitDirectPutById):
926         * dfg/DFGByteCodeParser.cpp:
927         (JSC::DFG::ByteCodeParser::parseBlock):
928         * jit/JIT.cpp:
929         (JSC::JIT::JIT):
930         (JSC::JIT::privateCompileMainPass):
931         (JSC::JIT::privateCompileSlowCases):
932         (JSC::JIT::privateCompile):
933         * jit/JIT.h:
934         * jit/JITPropertyAccess.cpp:
935         (JSC::JIT::emit_op_get_by_id):
936         (JSC::JIT::emit_op_put_by_id):
937         (JSC::JIT::emit_op_method_check):
938         (JSC::JIT::compileGetByIdHotPath):
939         (JSC::JIT::compileGetByIdSlowCase):
940         (JSC::JIT::emitSlow_op_put_by_id):
941         * jit/JITPropertyAccess32_64.cpp:
942         (JSC::JIT::emit_op_get_by_id):
943         (JSC::JIT::emitSlow_op_get_by_id):
944         (JSC::JIT::emit_op_put_by_id):
945         (JSC::JIT::emitSlow_op_put_by_id):
946         (JSC::JIT::emit_op_method_check):
947         (JSC::JIT::compileGetByIdHotPath):
948         (JSC::JIT::compileGetByIdSlowCase):
949         * runtime/Executable.cpp:
950         (JSC::tryDFGCompile):
951
952 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
953
954         Reviewed by Sam Weinig.
955
956         Bug 61501 - Unify AbstractMacroAssembler::differenceBetween methods.
957
958         * assembler/AbstractMacroAssembler.h:
959         (JSC::AbstractMacroAssembler::Call::Call):
960         (JSC::AbstractMacroAssembler::Call::fromTailJump):
961         (JSC::AbstractMacroAssembler::Jump::Jump):
962         (JSC::AbstractMacroAssembler::Jump::link):
963         (JSC::AbstractMacroAssembler::Jump::linkTo):
964         (JSC::AbstractMacroAssembler::Jump::isSet):
965         (JSC::AbstractMacroAssembler::differenceBetween):
966         (JSC::AbstractMacroAssembler::linkJump):
967         (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
968         * assembler/LinkBuffer.h:
969         (JSC::LinkBuffer::link):
970         (JSC::LinkBuffer::locationOf):
971         (JSC::LinkBuffer::locationOfNearCall):
972         (JSC::LinkBuffer::returnAddressOffset):
973         * assembler/MacroAssemblerARM.h:
974         (JSC::MacroAssemblerARM::linkCall):
975         * assembler/MacroAssemblerARMv7.h:
976         (JSC::MacroAssemblerARMv7::linkCall):
977         * assembler/MacroAssemblerMIPS.h:
978         (JSC::MacroAssemblerMIPS::linkCall):
979         * assembler/MacroAssemblerSH4.cpp:
980         (JSC::MacroAssemblerSH4::linkCall):
981         * assembler/MacroAssemblerX86.h:
982         (JSC::MacroAssemblerX86::linkCall):
983         * assembler/MacroAssemblerX86_64.h:
984         (JSC::MacroAssemblerX86_64::linkCall):
985
986 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
987
988         Reviewed by Sam Weinig.
989
990         https://bugs.webkit.org/show_bug.cgi?id=61500
991         Add JSObject::offsetOfPropertyStorage
992
993         * jit/JITPropertyAccess.cpp:
994         (JSC::JIT::compileGetDirectOffset):
995         (JSC::JIT::compileGetByIdHotPath):
996         (JSC::JIT::emit_op_put_by_id):
997         (JSC::JIT::compilePutDirectOffset):
998         * jit/JITPropertyAccess32_64.cpp:
999         (JSC::JIT::compileGetByIdHotPath):
1000         (JSC::JIT::emit_op_put_by_id):
1001         (JSC::JIT::compilePutDirectOffset):
1002         (JSC::JIT::compileGetDirectOffset):
1003         * runtime/JSObject.h:
1004         (JSC::JSObject::offsetOfPropertyStorage):
1005
1006 2011-05-25  Oliver Hunt  <oliver@apple.com>
1007
1008         Reviewed by Geoffrey Garen.
1009
1010         Make RegExp GC allocated
1011         https://bugs.webkit.org/show_bug.cgi?id=61490
1012
1013         Make RegExp GC allocated.  Basically mechanical change to replace
1014         most use of [Pass]RefPtr<RegExp> with RegExp* or WriteBarrier<RegExp>
1015         where actual ownership happens.
1016
1017         Made the RegExpCache use Strong<> references currently to avoid any
1018         changes in behaviour.
1019
1020         * JavaScriptCore.exp:
1021         * bytecode/CodeBlock.cpp:
1022         (JSC::CodeBlock::visitAggregate):
1023         * bytecode/CodeBlock.h:
1024         (JSC::CodeBlock::addRegExp):
1025         * bytecompiler/BytecodeGenerator.cpp:
1026         (JSC::BytecodeGenerator::addRegExp):
1027         (JSC::BytecodeGenerator::emitNewRegExp):
1028         * bytecompiler/BytecodeGenerator.h:
1029         * runtime/JSCell.h:
1030         * runtime/JSGlobalData.cpp:
1031         (JSC::JSGlobalData::JSGlobalData):
1032         (JSC::JSGlobalData::clearBuiltinStructures):
1033         (JSC::JSGlobalData::addRegExpToTrace):
1034         * runtime/JSGlobalData.h:
1035         * runtime/JSGlobalObject.cpp:
1036         (JSC::JSGlobalObject::reset):
1037         * runtime/RegExp.cpp:
1038         (JSC::RegExp::RegExp):
1039         (JSC::RegExp::create):
1040         (JSC::RegExp::invalidateCode):
1041         * runtime/RegExp.h:
1042         (JSC::RegExp::createStructure):
1043         * runtime/RegExpCache.cpp:
1044         (JSC::RegExpCache::lookupOrCreate):
1045         (JSC::RegExpCache::create):
1046         * runtime/RegExpCache.h:
1047         * runtime/RegExpConstructor.cpp:
1048         (JSC::constructRegExp):
1049         * runtime/RegExpObject.cpp:
1050         (JSC::RegExpObject::RegExpObject):
1051         (JSC::RegExpObject::visitChildren):
1052         * runtime/RegExpObject.h:
1053         (JSC::RegExpObject::setRegExp):
1054         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
1055         * runtime/RegExpPrototype.cpp:
1056         (JSC::RegExpPrototype::RegExpPrototype):
1057         (JSC::regExpProtoFuncCompile):
1058         * runtime/RegExpPrototype.h:
1059         * runtime/StringPrototype.cpp:
1060         (JSC::stringProtoFuncMatch):
1061         (JSC::stringProtoFuncSearch):
1062
1063 2011-05-25  Oliver Hunt  <oliver@apple.com>
1064
1065         Reviewed by Geoffrey Garen.
1066
1067         Generate regexp code lazily
1068         https://bugs.webkit.org/show_bug.cgi?id=61476
1069
1070         RegExp construction now simply validates the RegExp, it does
1071         not perform actual codegen.
1072
1073         * runtime/RegExp.cpp:
1074         (JSC::RegExp::RegExp):
1075         (JSC::RegExp::recompile):
1076         (JSC::RegExp::compile):
1077         (JSC::RegExp::match):
1078         * runtime/RegExp.h:
1079         (JSC::RegExp::recompileIfNecessary):
1080         * runtime/RegExpConstructor.h:
1081         (JSC::RegExpConstructor::performMatch):
1082         * runtime/RegExpObject.cpp:
1083         (JSC::RegExpObject::match):
1084         * runtime/StringPrototype.cpp:
1085         (JSC::stringProtoFuncReplace):
1086         (JSC::stringProtoFuncMatch):
1087         (JSC::stringProtoFuncSearch):
1088         (JSC::stringProtoFuncSplit):
1089
1090 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1091
1092         Reviewed by Geoffrey Garen.
1093
1094         Removed MarkSetProperties because it was unused
1095         https://bugs.webkit.org/show_bug.cgi?id=61418
1096
1097         * heap/MarkStack.h:
1098         (JSC::MarkSet::MarkSet):
1099         (JSC::MarkStack::append):
1100         * runtime/JSActivation.cpp:
1101         (JSC::JSActivation::visitChildren):
1102         * runtime/JSArray.h:
1103         (JSC::JSArray::visitChildrenDirect):
1104         * runtime/JSPropertyNameIterator.cpp:
1105         (JSC::JSPropertyNameIterator::visitChildren):
1106         * runtime/WriteBarrier.h:
1107         (JSC::MarkStack::appendValues):
1108
1109 2011-05-25  Oliver Hunt  <oliver@apple.com>
1110
1111         Reviewed by Geoffrey Garen.
1112
1113         Make allocations with guard pages ensure that the allocation succeeded
1114         https://bugs.webkit.org/show_bug.cgi?id=61453
1115
1116         Add null checks, and make PageBlock's operator bool() use
1117         the realbase, rather than the start of usable memory.
1118
1119         * wtf/OSAllocatorPosix.cpp:
1120         (WTF::OSAllocator::reserveAndCommit):
1121         * wtf/PageBlock.h:
1122         (WTF::PageBlock::operator bool):
1123         (WTF::PageBlock::PageBlock):
1124
1125 2011-04-10  Kevin Ollivier  <kevino@theolliviers.com>
1126
1127         Reviewed by Eric Seidel.
1128
1129         Add JS_EXPORT_PRIVATE macro for exported methods in bytecompiler headers.
1130         
1131         https://bugs.webkit.org/show_bug.cgi?id=27551
1132
1133         * bytecompiler/BytecodeGenerator.h:
1134
1135 2011-05-24  Keishi Hattori  <keishi@webkit.org>
1136
1137         Reviewed by Kent Tamura.
1138
1139         Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
1140         https://bugs.webkit.org/show_bug.cgi?id=61273
1141
1142         * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
1143
1144 2011-05-24  Kevin Ollivier  <kevino@theolliviers.com>
1145
1146         Reviewed by Eric Seidel.
1147
1148         Add export macros to WTFString.h.
1149         
1150         https://bugs.webkit.org/show_bug.cgi?id=27551
1151
1152         * wtf/text/WTFString.h:
1153         (WTF::String::String):
1154         (WTF::String::findIgnoringCase):
1155         (WTF::String::isHashTableDeletedValue):
1156
1157 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1158
1159         Maybe fix the Mac build now?
1160
1161         * JavaScriptCore.xcodeproj/project.pbxproj:
1162
1163 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1164
1165         Maybe fix the Mac build?
1166         
1167         * JavaScriptCore.xcodeproj/project.pbxproj:
1168
1169 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1170
1171         Reviewed by Oliver Hunt.
1172
1173         Split HeapRootVisitor into its own class
1174         https://bugs.webkit.org/show_bug.cgi?id=61399
1175
1176         * GNUmakefile.list.am:
1177         * JavaScriptCore.gypi:
1178         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1179         * JavaScriptCore.xcodeproj/project.pbxproj:
1180         * heap/HandleHeap.cpp:
1181         * heap/HandleStack.cpp:
1182         * heap/Heap.cpp:
1183         * heap/HeapRootVisitor.h: Copied from Source/JavaScriptCore/heap/MarkStack.h.
1184         * heap/MarkStack.h:
1185         * runtime/ArgList.cpp:
1186         * runtime/SmallStrings.cpp:
1187
1188 2011-05-24  Jay Civelli  <jcivelli@chromium.org>
1189
1190         Rubberstamped by David Kilzer.
1191
1192         Updated some files that I forgot in my previous MHTML CL.
1193
1194         * Configurations/FeatureDefines.xcconfig:
1195
1196 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1197
1198         Fix the Mac build: Yes, please do remove these files, svn.
1199
1200         * JavaScriptCore.xcodeproj/project.pbxproj:
1201
1202 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1203
1204         Reviewed by Oliver Hunt.
1205
1206         Let's just have one way to get the system page size, bokay?
1207         https://bugs.webkit.org/show_bug.cgi?id=61384
1208
1209         * CMakeListsEfl.txt:
1210         * CMakeListsWinCE.txt:
1211         * GNUmakefile.list.am:
1212         * JavaScriptCore.exp:
1213         * JavaScriptCore.gypi:
1214         * JavaScriptCore.pro:
1215         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: MarkStack[Platform].cpp
1216         is gone completely now, since it only existed to provide a duplicate way
1217         to access the system page size.
1218
1219         * heap/MarkStack.cpp:
1220         (JSC::MarkStack::reset):
1221         * heap/MarkStack.h:
1222         (JSC::::MarkStackArray):
1223         (JSC::::shrinkAllocation): Use WTF::pageSize.
1224
1225         * heap/MarkStackPosix.cpp:
1226         * heap/MarkStackSymbian.cpp:
1227         * heap/MarkStackWin.cpp: Removed now-empty files.
1228
1229         * jit/ExecutableAllocator.cpp:
1230         (JSC::ExecutableAllocator::reprotectRegion):
1231         * jit/ExecutableAllocator.h:
1232         (JSC::ExecutableAllocator::ExecutableAllocator):
1233         (JSC::ExecutablePool::ExecutablePool):
1234         (JSC::ExecutablePool::poolAllocate):
1235         * jit/ExecutableAllocatorFixedVMPool.cpp: Use WTF::pageSize.
1236
1237         * wscript: Removed now-empty files.
1238
1239         * wtf/PageBlock.cpp:
1240         (WTF::systemPageSize): Integrated questionable Symbian page size rule
1241         from ExecutableAllocator, because that seems like what the original
1242         author should have done.
1243
1244 2011-05-24  Oliver Hunt  <oliver@apple.com>
1245
1246         Reviewed by Gavin Barraclough.
1247
1248         Interpreter crashes with gc validation enabled due to failure to mark initial cache structure
1249         https://bugs.webkit.org/show_bug.cgi?id=61385
1250
1251         The interpreter uses the structure slot of get_by_id and put_by_id to hold
1252         the initial structure it encountered so that it can identify whether a
1253         given access is stable.
1254
1255         When marking though we only visit the slot when we've decided to cache, and
1256         so this value could die.  This was "safe" as the value was only used for a
1257         pointer compare, but it was incorrect.  We now just mark the slot like we
1258         should have been doing already.
1259
1260         * bytecode/CodeBlock.cpp:
1261         (JSC::CodeBlock::visitStructures):
1262
1263 2011-05-24  Adam Roben  <aroben@apple.com>
1264
1265         Windows build fix
1266
1267         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed now-inline functions.
1268
1269 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1270
1271         Windows build fix: update the #if OS(WINDOWS) section to match my last patch.
1272
1273         * heap/MarkStack.h:
1274         (JSC::::shrinkAllocation):
1275
1276 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1277
1278         Rubber-stamped by Oliver Hunt.
1279
1280         Split out function definitions and class definitions from class
1281         declarations in MarkStack.h, for readability.
1282
1283         * heap/MarkStack.h:
1284         (JSC::MarkStack::MarkStack):
1285         (JSC::MarkStack::~MarkStack):
1286         (JSC::MarkStack::addOpaqueRoot):
1287         (JSC::MarkStack::containsOpaqueRoot):
1288         (JSC::MarkStack::opaqueRootCount):
1289         (JSC::MarkSet::MarkSet):
1290         (JSC::MarkStack::allocateStack):
1291         (JSC::MarkStack::releaseStack):
1292         (JSC::MarkStack::pageSize):
1293         (JSC::::MarkStackArray):
1294         (JSC::::~MarkStackArray):
1295         (JSC::::expand):
1296         (JSC::::append):
1297         (JSC::::removeLast):
1298         (JSC::::last):
1299         (JSC::::isEmpty):
1300         (JSC::::size):
1301         (JSC::::shrinkAllocation):
1302
1303 2011-05-24  Oliver Hunt  <oliver@apple.com>
1304
1305         Reviewed by Geoffrey Garen.
1306
1307         Avoid creating unnecessary identifiers and strings in the syntax checker
1308         https://bugs.webkit.org/show_bug.cgi?id=61378
1309
1310         Selectively tell the lexer that there are some places it does not need to
1311         do the real work of creating Identifiers for IDENT and STRING tokens.
1312
1313         Make parseString and parseIdentifier templatized on whether they should
1314         do real work, or merely validate the tokens.
1315
1316         SunSpider --parse-only reports ~5-8% win depending on hardware.
1317
1318         * parser/ASTBuilder.h:
1319         (JSC::ASTBuilder::createDotAccess):
1320         * parser/JSParser.cpp:
1321         (JSC::JSParser::next):
1322         (JSC::JSParser::consume):
1323         (JSC::JSParser::parseVarDeclarationList):
1324         (JSC::JSParser::parseConstDeclarationList):
1325         (JSC::JSParser::parseExpression):
1326         (JSC::JSParser::parseAssignmentExpression):
1327         (JSC::JSParser::parseConditionalExpression):
1328         (JSC::JSParser::parseBinaryExpression):
1329         (JSC::JSParser::parseProperty):
1330         (JSC::JSParser::parseObjectLiteral):
1331         (JSC::JSParser::parseArrayLiteral):
1332         (JSC::JSParser::parseArguments):
1333         (JSC::JSParser::parseMemberExpression):
1334         * parser/Lexer.cpp:
1335         (JSC::Lexer::parseIdentifier):
1336         (JSC::Lexer::parseString):
1337         (JSC::Lexer::lex):
1338         * parser/Lexer.h:
1339         * parser/SyntaxChecker.h:
1340         (JSC::SyntaxChecker::createDotAccess):
1341         (JSC::SyntaxChecker::createProperty):
1342
1343 2011-05-23  Michael Saboff  <msaboff@apple.com>
1344
1345         Reviewed by Mark Rowe.
1346
1347         Safari often freezes when clicking "Return free memory" in Caches dialog
1348         https://bugs.webkit.org/show_bug.cgi?id=61325
1349
1350         There are two fixes and improvement in instrumentation code used to find 
1351         one of the problems.
1352         Changed ReleaseFreeList() to set the "decommitted" bit when releasing
1353         pages to the system and moving Spans from the normal list to the returned 
1354         list.
1355         Added a "not making forward progress" check to TCMalloc_PageHeap::scavenge
1356         to eliminate an infinite loop if we can't meet the pagesToRelease target.
1357         Added a check for the decommitted bit being set properly in 
1358         TCMalloc_PageHeap::CheckList.
1359
1360         * wtf/FastMalloc.cpp:
1361         (WTF::TCMalloc_PageHeap::scavenge):
1362         (WTF::TCMalloc_PageHeap::Check):
1363         (WTF::TCMalloc_PageHeap::CheckList):
1364         (WTF::ReleaseFreeList):
1365
1366 2011-05-23  Gavin Barraclough  <barraclough@apple.com>
1367
1368         Reviewed by Geoff Garen.
1369
1370         https://bugs.webkit.org/show_bug.cgi?id=61306
1371
1372         The begin characters optimization currently has issues (#61129),
1373         and does not appear to still be a performance win. The prudent
1374         next step seems to be to disable while we ascertain whether this
1375         is still a useful performance optimization.
1376
1377         * yarr/YarrInterpreter.cpp:
1378         (JSC::Yarr::Interpreter::matchDisjunction):
1379         (JSC::Yarr::Interpreter::interpret):
1380         * yarr/YarrInterpreter.h:
1381         (JSC::Yarr::BytecodePattern::BytecodePattern):
1382         * yarr/YarrPattern.cpp:
1383         (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
1384         (JSC::Yarr::YarrPattern::compile):
1385         (JSC::Yarr::YarrPattern::YarrPattern):
1386         * yarr/YarrPattern.h:
1387         (JSC::Yarr::YarrPattern::reset):
1388
1389 2011-05-23  Matthew Delaney  <mdelaney@apple.com>
1390
1391         Reviewed by Simon Fraser.
1392
1393         Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
1394         https://bugs.webkit.org/show_bug.cgi?id=58216
1395
1396         * wtf/MathExtras.h:
1397         (clampToInteger):
1398         (clampToPositiveInteger):
1399
1400 2011-05-23  Ruben  <chromium@hybridsource.org>
1401
1402         Reviewed by Tony Chang.
1403
1404         Chromium gyp patch to use new POSIX defines toolkit_uses_gtk and os_posix
1405         https://bugs.webkit.org/show_bug.cgi?id=61219
1406
1407         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1408
1409 2011-05-23  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
1410
1411         Reviewed by Gavin Barraclough.
1412
1413         [SH4] AssemblerLabel does not name a type
1414         https://bugs.webkit.org/show_bug.cgi?id=59927
1415
1416         SH4Assembler.h file shoold be included before AbstractMacroAssembler.h.
1417
1418         * assembler/MacroAssemblerSH4.h:
1419
1420 2011-05-23  Ryuan Choi  <ryuan.choi@samsung.com>
1421
1422         Rubber stamped by Eric Seidel.
1423
1424         [CMAKE] Refactoring wtf related code.
1425         https://bugs.webkit.org/show_bug.cgi?id=60146
1426
1427         Move wtf-files to Source/JavaScriptCore/wtf/CMakeLists.txt.
1428
1429         * CMakeLists.txt:
1430         * CMakeListsEfl.txt:
1431         * wtf/CMakeLists.txt:
1432         * wtf/CMakeListsEfl.txt:
1433
1434 2011-05-22  Adam Barth  <abarth@webkit.org>
1435
1436         Enable strict PassOwnPtr for everyone.  I expect this patch will need
1437         some followups to make the GTK and EFL bots green again.
1438
1439         * wtf/PassOwnPtr.h:
1440
1441 2011-05-20  Oliver Hunt  <oliver@apple.com>
1442
1443         Reviewed by Gavin Barraclough.
1444
1445         Reduce size of inline cache path of get_by_id on ARMv7
1446         https://bugs.webkit.org/show_bug.cgi?id=61221
1447
1448         This reduces the code size of get_by_id by 20 bytes
1449
1450         * assembler/ARMv7Assembler.h:
1451         (JSC::ARMv7Assembler::ldrCompact):
1452         (JSC::ARMv7Assembler::repatchCompact):
1453         (JSC::ARMv7Assembler::setUInt7ForLoad):
1454         * assembler/MacroAssemblerARMv7.h:
1455         (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
1456         * jit/JIT.h:
1457
1458 2011-05-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
1459
1460         Reviewed by Oliver Hunt.
1461
1462         Zombies should "live" forever
1463         https://bugs.webkit.org/show_bug.cgi?id=61170
1464
1465         Reusing zombie cells could still hide garbage
1466         collected cell related bugs.
1467
1468         * JavaScriptCore.pro:
1469         * heap/MarkedBlock.cpp:
1470         (JSC::MarkedBlock::clearMarks):
1471         * heap/MarkedBlock.h:
1472         * heap/MarkedSpace.cpp:
1473         (JSC::MarkedSpace::destroy):
1474         * runtime/JSCell.h:
1475         (JSC::JSCell::JSValue::isZombie):
1476         * runtime/JSZombie.h:
1477         (JSC::JSZombie::~JSZombie):
1478         * runtime/WriteBarrier.h:
1479         (JSC::WriteBarrierBase::setWithoutWriteBarrier):
1480
1481 2011-05-20  Brady Eidson  <beidson@apple.com>
1482
1483         Reviewed by Sam Weinig.
1484
1485         <rdar://problem/9472883> and https://bugs.webkit.org/show_bug.cgi?id=61203
1486         Horrendous bug in callOnMainThreadAndWait
1487
1488         * wtf/MainThread.cpp:
1489         (WTF::dispatchFunctionsFromMainThread): Before signaling the background thread with the
1490           syncFlag condition, reacquire the mutex first.
1491
1492 2011-05-20  Oliver Hunt  <oliver@apple.com>
1493
1494         Reviewed by Sam Weinig.
1495
1496         Remove unnecessary double->int conversion at the end of op_div
1497         https://bugs.webkit.org/show_bug.cgi?id=61198
1498
1499         We don't attempt this conversion on 64bit, removing it actually speeds
1500         up sunspider and v8 slightly, and it reduces code size.
1501
1502         * jit/JITArithmetic32_64.cpp:
1503         (JSC::JIT::emit_op_div):
1504
1505 2011-05-19  Evan Martin  <evan@chromium.org>
1506
1507         Reviewed by Tony Chang.
1508
1509         [chromium] remove <(library) variable
1510         https://bugs.webkit.org/show_bug.cgi?id=61158
1511
1512         This was for a build experiment; we can just use the correct value now.
1513
1514         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1515
1516 2011-05-20  Oliver Hunt  <oliver@apple.com>
1517
1518         Reviewed by Sam Weinig.
1519
1520         Interpreter uses wrong bytecode offset for determining exception handler
1521         https://bugs.webkit.org/show_bug.cgi?id=61191
1522
1523         The bytecode offset given for the returnPC from the JIT is
1524         actually the offset for the start of the instruction triggering
1525         the call, whereas in the interpreter it is the actual return
1526         VPC.  This means if the next instruction following a call was
1527         in an exception region we would incorrectly redirect to its
1528         handler.  Long term we want to completely redo how exceptions
1529         are handled anyway so the simplest and lowest risk fix here is
1530         to simply subtract one from the return vPC so that we have an
1531         offset in the triggering instruction.
1532
1533         It turns out this is caught by a couple of tests already.
1534
1535         * interpreter/Interpreter.cpp:
1536         (JSC::Interpreter::unwindCallFrame):
1537
1538 2011-05-20  Xan Lopez  <xlopez@igalia.com>
1539
1540         Reviewed by Oliver Hunt.
1541
1542         JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
1543         https://bugs.webkit.org/show_bug.cgi?id=42756
1544
1545         Use the MAP_NORESERVE flag for mmap on Linux to skip the kernel
1546         check of the available memory. This should give us an
1547         overcommit-like behavior in most systems, which is what we want.
1548
1549         * wtf/OSAllocatorPosix.cpp:
1550         (WTF::OSAllocator::reserveAndCommit): pass MAP_NORSERVE to mmap.
1551
1552 2011-05-19  Gabor Loki  <loki@webkit.org>
1553
1554         Fix ARM build after r86919
1555
1556         * assembler/ARMAssembler.h:
1557         (JSC::ARMAssembler::nop):
1558
1559 2011-05-19  Oliver Hunt  <oliver@apple.com>
1560
1561         Reviewed by Gavin Barraclough.
1562
1563         Randomise code starting location a little
1564         https://bugs.webkit.org/show_bug.cgi?id=61161
1565
1566         Add a nop() function to the Assemblers so that we
1567         can randomise code offsets slightly at no real cost.
1568
1569         * assembler/ARMAssembler.h:
1570         (JSC::ARMAssembler::nop):
1571         * assembler/ARMv7Assembler.h:
1572         (JSC::ARMv7Assembler::nop):
1573         * assembler/MacroAssemblerARM.h:
1574         (JSC::MacroAssemblerARM::nop):
1575         * assembler/MacroAssemblerARMv7.h:
1576         (JSC::MacroAssemblerARMv7::nop):
1577         * assembler/MacroAssemblerMIPS.h:
1578         (JSC::MacroAssemblerMIPS::nop):
1579         * assembler/MacroAssemblerSH4.h:
1580         (JSC::MacroAssemblerSH4::nop):
1581         * assembler/MacroAssemblerX86Common.h:
1582         (JSC::MacroAssemblerX86Common::nop):
1583         * assembler/X86Assembler.h:
1584         (JSC::X86Assembler::nop):
1585         * jit/JIT.cpp:
1586         (JSC::JIT::JIT):
1587         (JSC::JIT::privateCompile):
1588         * jit/JIT.h:
1589         * runtime/WeakRandom.h:
1590         (JSC::WeakRandom::getUint32):
1591
1592 2011-05-19  Oliver Hunt  <oliver@apple.com>
1593
1594         Fix windows build.
1595
1596         * wtf/OSAllocatorWin.cpp:
1597         (WTF::OSAllocator::reserveUncommitted):
1598         (WTF::OSAllocator::reserveAndCommit):
1599
1600 2011-05-19  Oliver Hunt  <oliver@apple.com>
1601
1602         Reviewed by Gavin Barraclough.
1603
1604         Add guard pages to each end of the memory region used by the fixedvm allocator
1605         https://bugs.webkit.org/show_bug.cgi?id=61150
1606
1607         Add mechanism to notify the OSAllocator that pages at either end of an
1608         allocation should be considered guard pages.  Update PageReservation,
1609         PageAllocation, etc to handle this.
1610
1611         * JavaScriptCore.exp:
1612         * jit/ExecutableAllocatorFixedVMPool.cpp:
1613         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
1614         * wtf/OSAllocator.h:
1615         * wtf/OSAllocatorPosix.cpp:
1616         (WTF::OSAllocator::reserveUncommitted):
1617         (WTF::OSAllocator::reserveAndCommit):
1618         * wtf/PageAllocation.h:
1619         (WTF::PageAllocation::PageAllocation):
1620         * wtf/PageAllocationAligned.h:
1621         (WTF::PageAllocationAligned::PageAllocationAligned):
1622         * wtf/PageBlock.h:
1623         (WTF::PageBlock::PageBlock):
1624         * wtf/PageReservation.h:
1625         (WTF::PageReservation::reserve):
1626         (WTF::PageReservation::reserveWithGuardPages):
1627             Add a new function to make a reservation that will add guard
1628             pages to the ends of an allocation.
1629         (WTF::PageReservation::PageReservation):
1630
1631 2011-05-19  Oliver Hunt  <oliver@apple.com>
1632
1633         Reviewed by Geoffrey Garen.
1634
1635         Make Executables release their JIT code as soon as they become dead
1636         https://bugs.webkit.org/show_bug.cgi?id=61134
1637
1638         Add an ability to clear an Executable's jit code without requiring
1639         it to be destroyed, and then call that from a finalizer.
1640
1641         * heap/Weak.h:
1642         (JSC::Weak::Weak):
1643         (JSC::Weak::leak):
1644         * jit/JITCode.h:
1645         (JSC::JITCode::clear):
1646         * runtime/Executable.cpp:
1647         (JSC::ExecutableFinalizer::finalize):
1648         (JSC::ExecutableBase::executableFinalizer):
1649         * runtime/Executable.h:
1650         (JSC::ExecutableBase::ExecutableBase):
1651         (JSC::ExecutableBase::clearExecutableCode):
1652
1653 2011-05-19  Adam Roben  <aroben@apple.com>
1654
1655         Remove a redundant and broken data export
1656
1657         Data can't be exported from JavaScriptCore.dll by listing it in the .def file. The
1658         JS_EXPORTDATA macro must be used instead. (In this case it was already being used, leading
1659         to a linker warning about multiple definitions.)
1660
1661         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSGlobalData::s_info.
1662
1663 2011-05-18  Oliver Hunt  <oliver@apple.com>
1664
1665         Reviewed by Gavin Barraclough.
1666
1667         Some tests crashing in JSC::MarkStack::validateValue beneath ScriptController::clearWindowShell on SnowLeopard Intel Release (WebKit2 Tests)
1668         https://bugs.webkit.org/show_bug.cgi?id=61064
1669
1670         Switch NonFinalObject to using WriteBarrier<> rather than WriteBarrierBase<>
1671         for its inline storage.  This resolves the problem of GC occurring before
1672         a subclass has initialised its anonymous storage.
1673
1674         * runtime/JSObject.h:
1675
1676 2011-05-18  Adam Barth  <abarth@webkit.org>
1677
1678         Reviewed by Sam Weinig.
1679
1680         Delete WTFURL
1681         https://bugs.webkit.org/show_bug.cgi?id=61084
1682
1683         It's been a year and we've failed to complete this project.  It's time
1684         to throw in the towel.
1685
1686         * JavaScriptCore.xcodeproj/project.pbxproj:
1687         * wtf/url: Removed.
1688         * wtf/url/api: Removed.
1689         * wtf/url/api/ParsedURL.cpp: Removed.
1690         * wtf/url/api/ParsedURL.h: Removed.
1691         * wtf/url/api/URLString.h: Removed.
1692         * wtf/url/src: Removed.
1693         * wtf/url/src/RawURLBuffer.h: Removed.
1694         * wtf/url/src/URLBuffer.h: Removed.
1695         * wtf/url/src/URLCharacterTypes.cpp: Removed.
1696         * wtf/url/src/URLCharacterTypes.h: Removed.
1697         * wtf/url/src/URLComponent.h: Removed.
1698         * wtf/url/src/URLEscape.cpp: Removed.
1699         * wtf/url/src/URLEscape.h: Removed.
1700         * wtf/url/src/URLParser.h: Removed.
1701         * wtf/url/src/URLQueryCanonicalizer.h: Removed.
1702         * wtf/url/src/URLSegments.cpp: Removed.
1703         * wtf/url/src/URLSegments.h: Removed.
1704         * wtf/url/wtfurl.gyp: Removed.
1705
1706 2011-05-18  Oliver Hunt  <oliver@apple.com>
1707
1708         Reviewed by Sam Weinig.
1709
1710         JSGlobalObject and some others do GC allocation during initialization, which can cause heap corruption
1711         https://bugs.webkit.org/show_bug.cgi?id=61090
1712
1713         Remove the Structure-free JSGlobalObject constructor and instead always
1714         pass the structure into the JSGlobalObject constructor.
1715         Stop DebuggerActivation creating a new structure every time, and simply
1716         use a single shared structure held by the GlobalData.
1717
1718         * API/JSContextRef.cpp:
1719         * debugger/DebuggerActivation.cpp:
1720         (JSC::DebuggerActivation::DebuggerActivation):
1721         * jsc.cpp:
1722         (GlobalObject::GlobalObject):
1723         (functionRun):
1724         (jscmain):
1725         * runtime/JSGlobalData.cpp:
1726         (JSC::JSGlobalData::JSGlobalData):
1727         (JSC::JSGlobalData::clearBuiltinStructures):
1728         * runtime/JSGlobalData.h:
1729         * runtime/JSGlobalObject.h:
1730
1731 2011-05-18  Oliver Hunt  <oliver@apple.com>
1732
1733         Reviewed by Adam Roben.
1734
1735         Disable gc validation in release builds
1736         https://bugs.webkit.org/show_bug.cgi?id=60680
1737
1738         Add back the NDEBUG check
1739
1740         * wtf/Platform.h:
1741
1742 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
1743
1744         Rolled out attempts to fix EFL build because they're not enough -- the
1745         build script needs to be fixed.
1746
1747         * runtime/BooleanPrototype.cpp:
1748         * runtime/DateConstructor.cpp:
1749         * runtime/ErrorPrototype.cpp:
1750
1751 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
1752
1753         More attempts to work around the EFL build system being borken.
1754
1755         * runtime/DateConstructor.cpp:
1756         * runtime/ErrorPrototype.cpp:
1757
1758 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
1759
1760         Try to fix the EFL build.
1761
1762         * runtime/BooleanPrototype.cpp:
1763
1764 2011-05-16  Geoffrey Garen  <ggaren@apple.com>
1765
1766         Rolling back in r86653 with build fixed.
1767
1768         Reviewed by Gavin Barraclough and Oliver Hunt.
1769
1770         Global object initialization is expensive
1771         https://bugs.webkit.org/show_bug.cgi?id=60933
1772         
1773         Changed a bunch of globals to allocate their properties lazily, and changed
1774         the global object to allocate a bunch of its globals lazily.
1775         
1776         This reduces the footprint of a global object from 287 objects with 58
1777         functions for 24K to 173 objects with 20 functions for 15K.
1778
1779         Large patch, but it's all mechanical.
1780
1781         * DerivedSources.make:
1782         * JavaScriptCore.exp: Build!
1783
1784         * create_hash_table: Added a special case for fromCharCode, since it uses
1785         a custom "thunk generator".
1786
1787         * heap/Heap.cpp:
1788         (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
1789         overcount objects that were owned through more than one mechanism because
1790         it was getting in the way of counting the results for this patch.
1791
1792         * interpreter/CallFrame.h:
1793         (JSC::ExecState::arrayConstructorTable):
1794         (JSC::ExecState::arrayPrototypeTable):
1795         (JSC::ExecState::booleanPrototypeTable):
1796         (JSC::ExecState::dateConstructorTable):
1797         (JSC::ExecState::errorPrototypeTable):
1798         (JSC::ExecState::globalObjectTable):
1799         (JSC::ExecState::numberConstructorTable):
1800         (JSC::ExecState::numberPrototypeTable):
1801         (JSC::ExecState::objectPrototypeTable):
1802         (JSC::ExecState::regExpPrototypeTable):
1803         (JSC::ExecState::stringConstructorTable): Added new tables.
1804
1805         * runtime/ArrayConstructor.cpp:
1806         (JSC::ArrayConstructor::ArrayConstructor):
1807         (JSC::ArrayConstructor::getOwnPropertySlot):
1808         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
1809         * runtime/ArrayConstructor.h:
1810         (JSC::ArrayConstructor::createStructure):
1811         * runtime/ArrayPrototype.cpp:
1812         (JSC::ArrayPrototype::getOwnPropertySlot):
1813         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
1814         * runtime/ArrayPrototype.h:
1815         * runtime/BooleanPrototype.cpp:
1816         (JSC::BooleanPrototype::BooleanPrototype):
1817         (JSC::BooleanPrototype::getOwnPropertySlot):
1818         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
1819         * runtime/BooleanPrototype.h:
1820         (JSC::BooleanPrototype::createStructure):
1821         * runtime/DateConstructor.cpp:
1822         (JSC::DateConstructor::DateConstructor):
1823         (JSC::DateConstructor::getOwnPropertySlot):
1824         (JSC::DateConstructor::getOwnPropertyDescriptor):
1825         * runtime/DateConstructor.h:
1826         (JSC::DateConstructor::createStructure):
1827         * runtime/ErrorPrototype.cpp:
1828         (JSC::ErrorPrototype::ErrorPrototype):
1829         (JSC::ErrorPrototype::getOwnPropertySlot):
1830         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
1831         * runtime/ErrorPrototype.h:
1832         (JSC::ErrorPrototype::createStructure): Standardized these objects
1833         to use static tables for function properties.
1834
1835         * runtime/JSGlobalData.cpp:
1836         (JSC::JSGlobalData::JSGlobalData):
1837         (JSC::JSGlobalData::~JSGlobalData):
1838         * runtime/JSGlobalData.h: Added new tables.
1839
1840         * runtime/JSGlobalObject.cpp:
1841         (JSC::JSGlobalObject::reset):
1842         (JSC::JSGlobalObject::addStaticGlobals):
1843         (JSC::JSGlobalObject::getOwnPropertySlot):
1844         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
1845         * runtime/JSGlobalObject.h:
1846         * runtime/JSGlobalObjectFunctions.cpp:
1847         * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
1848         static table for its global functions. This required uninlining some
1849         things to avoid a circular header dependency. However, those things
1850         probably shouldn't have been inlined in the first place.
1851         
1852         Even more global object properties can be made lazy, but that requires
1853         more in-depth changes.
1854
1855         * runtime/MathObject.cpp:
1856         * runtime/NumberConstructor.cpp:
1857         (JSC::NumberConstructor::getOwnPropertySlot):
1858         (JSC::NumberConstructor::getOwnPropertyDescriptor):
1859         * runtime/NumberPrototype.cpp:
1860         (JSC::NumberPrototype::NumberPrototype):
1861         (JSC::NumberPrototype::getOwnPropertySlot):
1862         (JSC::NumberPrototype::getOwnPropertyDescriptor):
1863         * runtime/NumberPrototype.h:
1864         (JSC::NumberPrototype::createStructure):
1865         * runtime/ObjectPrototype.cpp:
1866         (JSC::ObjectPrototype::ObjectPrototype):
1867         (JSC::ObjectPrototype::put):
1868         (JSC::ObjectPrototype::getOwnPropertySlot):
1869         (JSC::ObjectPrototype::getOwnPropertyDescriptor):
1870         * runtime/ObjectPrototype.h:
1871         (JSC::ObjectPrototype::createStructure):
1872         * runtime/RegExpPrototype.cpp:
1873         (JSC::RegExpPrototype::RegExpPrototype):
1874         (JSC::RegExpPrototype::getOwnPropertySlot):
1875         (JSC::RegExpPrototype::getOwnPropertyDescriptor):
1876         * runtime/RegExpPrototype.h:
1877         (JSC::RegExpPrototype::createStructure):
1878         * runtime/StringConstructor.cpp:
1879         (JSC::StringConstructor::StringConstructor):
1880         (JSC::StringConstructor::getOwnPropertySlot):
1881         (JSC::StringConstructor::getOwnPropertyDescriptor):
1882         * runtime/StringConstructor.h:
1883         (JSC::StringConstructor::createStructure): Standardized these objects
1884         to use static tables for function properties.
1885
1886 2011-05-17  Sam Weinig  <sam@webkit.org>
1887
1888         Reviewed by Oliver Hunt.
1889
1890         JSGlobalContextRelease should not trigger a synchronous garbage collection
1891         https://bugs.webkit.org/show_bug.cgi?id=60990
1892
1893         * API/JSContextRef.cpp:
1894         Change synchronous call to collectAllGarbage to a call to trigger the
1895         activityCallback.
1896
1897 2011-05-16  Oliver Hunt  <oliver@apple.com>
1898
1899         Reviewed by Gavin Barraclough.
1900
1901         Reduce code size for inline cache
1902         https://bugs.webkit.org/show_bug.cgi?id=60942
1903
1904         This patch introduces the concept of a "compact" address that
1905         allows individual architectures to control the maximum offset
1906         used for the inline path of get_by_id.  This reduces the code
1907         size of get_by_id by 3 bytes on x86 and x86_64 and slightly
1908         improves performance on v8 tests.
1909
1910         * assembler/ARMAssembler.h:
1911         (JSC::ARMAssembler::repatchCompact):
1912         * assembler/ARMv7Assembler.h:
1913         (JSC::ARMv7Assembler::repatchCompact):
1914         * assembler/AbstractMacroAssembler.h:
1915         (JSC::AbstractMacroAssembler::DataLabelCompact::DataLabelCompact):
1916         (JSC::AbstractMacroAssembler::differenceBetween):
1917         (JSC::AbstractMacroAssembler::repatchCompact):
1918         * assembler/CodeLocation.h:
1919         (JSC::CodeLocationDataLabelCompact::CodeLocationDataLabelCompact):
1920         (JSC::CodeLocationCommon::dataLabelCompactAtOffset):
1921         * assembler/LinkBuffer.h:
1922         (JSC::LinkBuffer::locationOf):
1923         * assembler/MIPSAssembler.h:
1924         (JSC::MIPSAssembler::repatchCompact):
1925         * assembler/MacroAssembler.h:
1926         (JSC::MacroAssembler::loadPtrWithCompactAddressOffsetPatch):
1927         * assembler/MacroAssemblerARM.h:
1928         (JSC::MacroAssemblerARM::load32WithCompactAddressOffsetPatch):
1929         * assembler/MacroAssemblerARMv7.h:
1930         (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
1931         * assembler/MacroAssemblerMIPS.h:
1932         (JSC::MacroAssemblerMIPS::load32WithCompactAddressOffsetPatch):
1933         * assembler/MacroAssemblerSH4.h:
1934         (JSC::MacroAssemblerSH4::load32WithAddressOffsetPatch):
1935         * assembler/MacroAssemblerX86.h:
1936         (JSC::MacroAssemblerX86::repatchCompact):
1937         * assembler/MacroAssemblerX86Common.h:
1938         (JSC::MacroAssemblerX86Common::loadCompactWithAddressOffsetPatch):
1939         * assembler/MacroAssemblerX86_64.h:
1940         (JSC::MacroAssemblerX86_64::loadPtrWithCompactAddressOffsetPatch):
1941         * assembler/RepatchBuffer.h:
1942         (JSC::RepatchBuffer::repatch):
1943         * assembler/SH4Assembler.h:
1944         (JSC::SH4Assembler::repatchCompact):
1945         * assembler/X86Assembler.h:
1946         (JSC::X86Assembler::movl_mr_disp8):
1947         (JSC::X86Assembler::movq_mr_disp8):
1948         (JSC::X86Assembler::repatchCompact):
1949         (JSC::X86Assembler::setInt8):
1950         (JSC::X86Assembler::X86InstructionFormatter::oneByteOp_disp8):
1951         (JSC::X86Assembler::X86InstructionFormatter::oneByteOp64_disp8):
1952         (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
1953         * jit/JIT.h:
1954         * jit/JITPropertyAccess.cpp:
1955         (JSC::JIT::compileGetByIdHotPath):
1956         (JSC::JIT::emit_op_put_by_id):
1957         (JSC::JIT::patchGetByIdSelf):
1958         * jit/JITPropertyAccess32_64.cpp:
1959         (JSC::JIT::compileGetByIdHotPath):
1960         (JSC::JIT::emit_op_put_by_id):
1961         (JSC::JIT::patchGetByIdSelf):
1962         * jit/JITStubs.cpp:
1963         (JSC::JITThunks::tryCacheGetByID):
1964
1965 2011-05-16  Sheriff Bot  <webkit.review.bot@gmail.com>
1966
1967         Unreviewed, rolling out r86653.
1968         http://trac.webkit.org/changeset/86653
1969         https://bugs.webkit.org/show_bug.cgi?id=60944
1970
1971         "Caused regressions on Windows, OSX and EFL" (Requested by
1972         yutak on #webkit).
1973
1974         * DerivedSources.make:
1975         * DerivedSources.pro:
1976         * GNUmakefile.am:
1977         * GNUmakefile.list.am:
1978         * JavaScriptCore.exp:
1979         * JavaScriptCore.gypi:
1980         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1981         * create_hash_table:
1982         * heap/Heap.cpp:
1983         (JSC::TypeCounter::operator()):
1984         * interpreter/CallFrame.h:
1985         (JSC::ExecState::arrayTable):
1986         (JSC::ExecState::numberTable):
1987         * runtime/ArrayConstructor.cpp:
1988         (JSC::ArrayConstructor::ArrayConstructor):
1989         * runtime/ArrayConstructor.h:
1990         * runtime/ArrayPrototype.cpp:
1991         (JSC::ArrayPrototype::getOwnPropertySlot):
1992         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
1993         * runtime/ArrayPrototype.h:
1994         * runtime/BooleanPrototype.cpp:
1995         (JSC::BooleanPrototype::BooleanPrototype):
1996         * runtime/BooleanPrototype.h:
1997         * runtime/DateConstructor.cpp:
1998         (JSC::DateConstructor::DateConstructor):
1999         * runtime/DateConstructor.h:
2000         * runtime/ErrorPrototype.cpp:
2001         (JSC::ErrorPrototype::ErrorPrototype):
2002         * runtime/ErrorPrototype.h:
2003         * runtime/JSGlobalData.cpp:
2004         (JSC::JSGlobalData::JSGlobalData):
2005         (JSC::JSGlobalData::~JSGlobalData):
2006         * runtime/JSGlobalData.h:
2007         * runtime/JSGlobalObject.cpp:
2008         (JSC::JSGlobalObject::reset):
2009         * runtime/JSGlobalObject.h:
2010         (JSC::JSGlobalObject::addStaticGlobals):
2011         (JSC::JSGlobalObject::getOwnPropertySlot):
2012         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2013         * runtime/JSGlobalObjectFunctions.cpp:
2014         (JSC::globalFuncJSCPrint):
2015         * runtime/JSGlobalObjectFunctions.h:
2016         * runtime/MathObject.cpp:
2017         * runtime/NumberConstructor.cpp:
2018         (JSC::NumberConstructor::getOwnPropertySlot):
2019         (JSC::NumberConstructor::getOwnPropertyDescriptor):
2020         * runtime/NumberPrototype.cpp:
2021         (JSC::NumberPrototype::NumberPrototype):
2022         * runtime/NumberPrototype.h:
2023         * runtime/ObjectPrototype.cpp:
2024         (JSC::ObjectPrototype::ObjectPrototype):
2025         (JSC::ObjectPrototype::put):
2026         (JSC::ObjectPrototype::getOwnPropertySlot):
2027         * runtime/ObjectPrototype.h:
2028         * runtime/RegExpPrototype.cpp:
2029         (JSC::RegExpPrototype::RegExpPrototype):
2030         * runtime/RegExpPrototype.h:
2031         * runtime/StringConstructor.cpp:
2032         (JSC::StringConstructor::StringConstructor):
2033         * runtime/StringConstructor.h:
2034
2035 2011-05-16  Geoffrey Garen  <ggaren@apple.com>
2036
2037         Reviewed by Geoffrey Garen.
2038
2039         Global object initialization is expensive
2040         https://bugs.webkit.org/show_bug.cgi?id=60933
2041         
2042         Changed a bunch of globals to allocate their properties lazily, and changed
2043         the global object to allocate a bunch of its globals lazily.
2044         
2045         This reduces the footprint of a global object from 287 objects with 58
2046         functions for 24K to 173 objects with 20 functions for 15K.
2047
2048         Large patch, but it's all mechanical.
2049
2050         * DerivedSources.make:
2051         * JavaScriptCore.exp: Build!
2052
2053         * create_hash_table: Added a special case for fromCharCode, since it uses
2054         a custom "thunk generator".
2055
2056         * heap/Heap.cpp:
2057         (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
2058         overcount objects that were owned through more than one mechanism because
2059         it was getting in the way of counting the results for this patch.
2060
2061         * interpreter/CallFrame.h:
2062         (JSC::ExecState::arrayConstructorTable):
2063         (JSC::ExecState::arrayPrototypeTable):
2064         (JSC::ExecState::booleanPrototypeTable):
2065         (JSC::ExecState::dateConstructorTable):
2066         (JSC::ExecState::errorPrototypeTable):
2067         (JSC::ExecState::globalObjectTable):
2068         (JSC::ExecState::numberConstructorTable):
2069         (JSC::ExecState::numberPrototypeTable):
2070         (JSC::ExecState::objectPrototypeTable):
2071         (JSC::ExecState::regExpPrototypeTable):
2072         (JSC::ExecState::stringConstructorTable): Added new tables.
2073
2074         * runtime/ArrayConstructor.cpp:
2075         (JSC::ArrayConstructor::ArrayConstructor):
2076         (JSC::ArrayConstructor::getOwnPropertySlot):
2077         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
2078         * runtime/ArrayConstructor.h:
2079         (JSC::ArrayConstructor::createStructure):
2080         * runtime/ArrayPrototype.cpp:
2081         (JSC::ArrayPrototype::getOwnPropertySlot):
2082         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
2083         * runtime/ArrayPrototype.h:
2084         * runtime/BooleanPrototype.cpp:
2085         (JSC::BooleanPrototype::BooleanPrototype):
2086         (JSC::BooleanPrototype::getOwnPropertySlot):
2087         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
2088         * runtime/BooleanPrototype.h:
2089         (JSC::BooleanPrototype::createStructure):
2090         * runtime/DateConstructor.cpp:
2091         (JSC::DateConstructor::DateConstructor):
2092         (JSC::DateConstructor::getOwnPropertySlot):
2093         (JSC::DateConstructor::getOwnPropertyDescriptor):
2094         * runtime/DateConstructor.h:
2095         (JSC::DateConstructor::createStructure):
2096         * runtime/ErrorPrototype.cpp:
2097         (JSC::ErrorPrototype::ErrorPrototype):
2098         (JSC::ErrorPrototype::getOwnPropertySlot):
2099         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
2100         * runtime/ErrorPrototype.h:
2101         (JSC::ErrorPrototype::createStructure): Standardized these objects
2102         to use static tables for function properties.
2103
2104         * runtime/JSGlobalData.cpp:
2105         (JSC::JSGlobalData::JSGlobalData):
2106         (JSC::JSGlobalData::~JSGlobalData):
2107         * runtime/JSGlobalData.h: Added new tables.
2108
2109         * runtime/JSGlobalObject.cpp:
2110         (JSC::JSGlobalObject::reset):
2111         (JSC::JSGlobalObject::addStaticGlobals):
2112         (JSC::JSGlobalObject::getOwnPropertySlot):
2113         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2114         * runtime/JSGlobalObject.h:
2115         * runtime/JSGlobalObjectFunctions.cpp:
2116         * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
2117         static table for its global functions. This required uninlining some
2118         things to avoid a circular header dependency. However, those things
2119         probably shouldn't have been inlined in the first place.
2120         
2121         Even more global object properties can be made lazy, but that requires
2122         more in-depth changes.
2123
2124         * runtime/MathObject.cpp:
2125         * runtime/NumberConstructor.cpp:
2126         (JSC::NumberConstructor::getOwnPropertySlot):
2127         (JSC::NumberConstructor::getOwnPropertyDescriptor):
2128         * runtime/NumberPrototype.cpp:
2129         (JSC::NumberPrototype::NumberPrototype):
2130         (JSC::NumberPrototype::getOwnPropertySlot):
2131         (JSC::NumberPrototype::getOwnPropertyDescriptor):
2132         * runtime/NumberPrototype.h:
2133         (JSC::NumberPrototype::createStructure):
2134         * runtime/ObjectPrototype.cpp:
2135         (JSC::ObjectPrototype::ObjectPrototype):
2136         (JSC::ObjectPrototype::put):
2137         (JSC::ObjectPrototype::getOwnPropertySlot):
2138         (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2139         * runtime/ObjectPrototype.h:
2140         (JSC::ObjectPrototype::createStructure):
2141         * runtime/RegExpPrototype.cpp:
2142         (JSC::RegExpPrototype::RegExpPrototype):
2143         (JSC::RegExpPrototype::getOwnPropertySlot):
2144         (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2145         * runtime/RegExpPrototype.h:
2146         (JSC::RegExpPrototype::createStructure):
2147         * runtime/StringConstructor.cpp:
2148         (JSC::StringConstructor::StringConstructor):
2149         (JSC::StringConstructor::getOwnPropertySlot):
2150         (JSC::StringConstructor::getOwnPropertyDescriptor):
2151         * runtime/StringConstructor.h:
2152         (JSC::StringConstructor::createStructure): Standardized these objects
2153         to use static tables for function properties.
2154
2155 2011-05-16  David Kilzer  <ddkilzer@apple.com>
2156
2157         <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
2158         <rdar://problem/9446430>
2159
2160         Reviewed by Mark Rowe.
2161
2162         * Configurations/Base.xcconfig: Fixed typo.
2163
2164 2011-05-16  Oliver Hunt  <oliver@apple.com>
2165
2166         Reviewed by Geoffrey Garen.
2167
2168         JSWeakObjectMap finalisation may occur while gc is in inconsistent state
2169         https://bugs.webkit.org/show_bug.cgi?id=60908
2170         <rdar://problem/9409491>
2171
2172         We need to ensure that we have called all the weak map finalizers while
2173         the global object (and hence global context) is still in a consistent
2174         state.  The best way to achieve this is to simply use a weak handle and
2175         finalizer on the global object.
2176
2177         * JavaScriptCore.exp:
2178         * runtime/JSGlobalObject.cpp:
2179         (JSC::JSGlobalObject::WeakMapFinalizer::finalize):
2180         * runtime/JSGlobalObject.h:
2181         (JSC::JSGlobalObject::registerWeakMap):
2182
2183 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
2184
2185         Reviewed by Laszlo Gombos.
2186
2187         [Qt][WK2][Symbian] Shared memory implementation for Symbian
2188         https://bugs.webkit.org/show_bug.cgi?id=55875
2189
2190         * wtf/Platform.h: Exclude Symbian OS from USE(UNIX_DOMAIN_SOCKETS) users
2191
2192 2011-05-16  Gavin Barraclough  <barraclough@apple.com>
2193
2194         Rubber stamped by Geoff Garen.
2195
2196         https://bugs.webkit.org/show_bug.cgi?id=60866
2197         Evaluation order broken for empty alternatives in subpatterns
2198
2199         Reverting https://bugs.webkit.org/show_bug.cgi?id=51395
2200
2201         * yarr/YarrPattern.cpp:
2202         (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
2203
2204 2011-05-15  Gavin Barraclough  <barraclough@apple.com>
2205
2206         Reviewed by Geoff Garen & Michael Saboff.
2207
2208         https://bugs.webkit.org/show_bug.cgi?id=60860
2209         Simplify backtracking in YARR JIT
2210
2211         YARR JIT currently performs a single pass of code generation over the pattern,
2212         with special handling to allow the code generation for some backtracking code
2213         out of line. We can simplify things by moving to a common mechanism whereby all
2214         forwards matching code is generated in one pass, and all backtracking code is
2215         generated in another. Backtracking code can be generated in reverse order, to
2216         optimized the common fall-through case.
2217
2218         To make it easier to walk over the pattern, we can first convert to a more
2219         byte-code like format before JIT generating. In time we should unify this with
2220         the YARR interpreter to more closely unify the two.
2221
2222         * yarr/YarrJIT.cpp:
2223         (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
2224         (JSC::Yarr::YarrGenerator::YarrOp::YarrOp):
2225         (JSC::Yarr::YarrGenerator::BacktrackingState::BacktrackingState):
2226         (JSC::Yarr::YarrGenerator::BacktrackingState::append):
2227         (JSC::Yarr::YarrGenerator::BacktrackingState::fallthrough):
2228         (JSC::Yarr::YarrGenerator::BacktrackingState::link):
2229         (JSC::Yarr::YarrGenerator::BacktrackingState::linkTo):
2230         (JSC::Yarr::YarrGenerator::BacktrackingState::takeBacktracksToJumpList):
2231         (JSC::Yarr::YarrGenerator::BacktrackingState::isEmpty):
2232         (JSC::Yarr::YarrGenerator::BacktrackingState::linkDataLabels):
2233         (JSC::Yarr::YarrGenerator::BacktrackingState::ReturnAddressRecord::ReturnAddressRecord):
2234         (JSC::Yarr::YarrGenerator::generateAssertionBOL):
2235         (JSC::Yarr::YarrGenerator::backtrackAssertionBOL):
2236         (JSC::Yarr::YarrGenerator::generateAssertionEOL):
2237         (JSC::Yarr::YarrGenerator::backtrackAssertionEOL):
2238         (JSC::Yarr::YarrGenerator::matchAssertionWordchar):
2239         (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
2240         (JSC::Yarr::YarrGenerator::backtrackAssertionWordBoundary):
2241         (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
2242         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterOnce):
2243         (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
2244         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterFixed):
2245         (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
2246         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterGreedy):
2247         (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
2248         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
2249         (JSC::Yarr::YarrGenerator::generateCharacterClassOnce):
2250         (JSC::Yarr::YarrGenerator::backtrackCharacterClassOnce):
2251         (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
2252         (JSC::Yarr::YarrGenerator::backtrackCharacterClassFixed):
2253         (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
2254         (JSC::Yarr::YarrGenerator::backtrackCharacterClassGreedy):
2255         (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
2256         (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):
2257         (JSC::Yarr::YarrGenerator::generateTerm):
2258         (JSC::Yarr::YarrGenerator::backtrackTerm):
2259         (JSC::Yarr::YarrGenerator::generate):
2260         (JSC::Yarr::YarrGenerator::backtrack):
2261         (JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
2262         (JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion):
2263         (JSC::Yarr::YarrGenerator::opCompileAlternative):
2264         (JSC::Yarr::YarrGenerator::opCompileBody):
2265         (JSC::Yarr::YarrGenerator::YarrGenerator):
2266         (JSC::Yarr::YarrGenerator::compile):
2267
2268 2011-05-15  Adam Barth  <abarth@webkit.org>
2269
2270         Enable strict PassOwnPtr on Qt.  (Build fixes to follow.)
2271
2272         * wtf/PassOwnPtr.h:
2273
2274 2011-05-15  Geoffrey Garen  <ggaren@apple.com>
2275
2276         Reviewed by Maciej Stachowiak.
2277
2278         Partial fix for <rdar://problem/9417875> REGRESSION: SunSpider ~17% slower
2279         in browser than on command line
2280         
2281         This patch fixes a few issues in generated code that could unreasonably
2282         prolong object lifetimes.
2283
2284         * heap/Heap.cpp:
2285         (JSC::Heap::collectAllGarbage): Throw away all function code before doing
2286         a major collection. We want to clear polymorphic caches, since they can
2287         keep alive large object graphs that have gone "stale". For the same reason,
2288         but to a lesser extent, we also want to clear linked functions and other
2289         one-off caches.
2290
2291         This has the side-benefit of reducing memory footprint from run-once
2292         functions, and of allowing predictions and caches that have failed to
2293         re-specialize.
2294
2295         Eventually, if compilation costs rise far enough, we may want a more
2296         limited strategy for de-specializing code without throwing it away
2297         completely, but this works for now, and it's the simplest solution.
2298
2299         * jit/JITStubs.cpp:
2300         (JSC::JITThunks::hostFunctionStub):
2301         * jit/JITStubs.h:
2302         * runtime/JSFunction.cpp: Made the host function stub cache weak --
2303         otherwise it's effectively a memory leak that can seriously fragment the
2304         GC and JIT heaps.
2305
2306         (JSC::JSFunction::JSFunction):
2307         (JSC::JSFunction::visitChildren): Cleared up some comments that confused
2308         me when working with this code.
2309
2310 2011-05-13  Oliver Hunt  <oliver@apple.com>
2311
2312         Reviewed by Geoffrey Garen.
2313
2314         Make GC validation more aggressive
2315         https://bugs.webkit.org/show_bug.cgi?id=60802
2316
2317         This patch makes the checks performed under GC_VALIDATION
2318         much more aggressive, and adds the checks to more places
2319         in order to allow us to catch GC bugs much closer to the
2320         point of failure.
2321
2322         * JavaScriptCore.exp:
2323         * JavaScriptCore.xcodeproj/project.pbxproj:
2324         * debugger/DebuggerActivation.cpp:
2325         (JSC::DebuggerActivation::visitChildren):
2326         * heap/MarkedBlock.cpp:
2327         (JSC::MarkedBlock::MarkedBlock):
2328         * heap/MarkedSpace.cpp:
2329         * runtime/Arguments.cpp:
2330         (JSC::Arguments::visitChildren):
2331         * runtime/Executable.cpp:
2332         (JSC::EvalExecutable::visitChildren):
2333         (JSC::ProgramExecutable::visitChildren):
2334         (JSC::FunctionExecutable::visitChildren):
2335         * runtime/Executable.h:
2336         * runtime/GetterSetter.cpp:
2337         (JSC::GetterSetter::visitChildren):
2338         * runtime/GetterSetter.h:
2339         * runtime/JSAPIValueWrapper.h:
2340         (JSC::JSAPIValueWrapper::createStructure):
2341         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2342         * runtime/JSActivation.cpp:
2343         (JSC::JSActivation::visitChildren):
2344         * runtime/JSArray.cpp:
2345         (JSC::JSArray::visitChildren):
2346         * runtime/JSCell.cpp:
2347         (JSC::slowValidateCell):
2348         * runtime/JSCell.h:
2349         (JSC::JSCell::JSCell::unvalidatedStructure):
2350         (JSC::JSCell::JSCell::JSCell):
2351         * runtime/JSFunction.cpp:
2352         (JSC::JSFunction::visitChildren):
2353         * runtime/JSGlobalObject.cpp:
2354         (JSC::JSGlobalObject::visitChildren):
2355         (JSC::slowValidateCell):
2356         * runtime/JSONObject.h:
2357         * runtime/JSObject.cpp:
2358         (JSC::JSObject::visitChildren):
2359         * runtime/JSPropertyNameIterator.cpp:
2360         (JSC::JSPropertyNameIterator::visitChildren):
2361         * runtime/JSPropertyNameIterator.h:
2362         * runtime/JSStaticScopeObject.cpp:
2363         (JSC::JSStaticScopeObject::visitChildren):
2364         * runtime/JSString.h:
2365         (JSC::RopeBuilder::JSString):
2366         * runtime/JSWrapperObject.cpp:
2367         (JSC::JSWrapperObject::visitChildren):
2368         * runtime/NativeErrorConstructor.cpp:
2369         (JSC::NativeErrorConstructor::visitChildren):
2370         * runtime/PropertyMapHashTable.h:
2371         (JSC::PropertyMapEntry::PropertyMapEntry):
2372         * runtime/RegExpObject.cpp:
2373         (JSC::RegExpObject::visitChildren):
2374         * runtime/ScopeChain.cpp:
2375         (JSC::ScopeChainNode::visitChildren):
2376         * runtime/ScopeChain.h:
2377         (JSC::ScopeChainNode::ScopeChainNode):
2378         * runtime/Structure.cpp:
2379         (JSC::Structure::Structure):
2380         (JSC::Structure::addPropertyTransition):
2381         (JSC::Structure::visitChildren):
2382         * runtime/Structure.h:
2383         (JSC::JSCell::classInfo):
2384         * runtime/StructureChain.cpp:
2385         (JSC::StructureChain::visitChildren):
2386         * runtime/StructureChain.h:
2387         * runtime/WriteBarrier.h:
2388         (JSC::validateCell):
2389         (JSC::JSCell):
2390         (JSC::JSGlobalObject):
2391         (JSC::WriteBarrierBase::set):
2392         (JSC::WriteBarrierBase::setMayBeNull):
2393         (JSC::WriteBarrierBase::setEarlyValue):
2394         (JSC::WriteBarrierBase::get):
2395         (JSC::WriteBarrierBase::operator*):
2396         (JSC::WriteBarrierBase::operator->):
2397         (JSC::WriteBarrierBase::unvalidatedGet):
2398         (JSC::WriteBarrier::WriteBarrier):
2399         * wtf/Assertions.h:
2400
2401 2011-05-13  Oliver Hunt  <oliver@apple.com>
2402
2403         Reviewed by Geoffrey Garen.
2404
2405         Make GC validation more aggressive
2406         https://bugs.webkit.org/show_bug.cgi?id=60802
2407
2408         This patch makes the checks performed under GC_VALIDATION
2409         much more aggressive, and adds the checks to more places
2410         in order to allow us to catch GC bugs much closer to the
2411         point of failure.
2412
2413         * JavaScriptCore.exp:
2414         * JavaScriptCore.xcodeproj/project.pbxproj:
2415         * debugger/DebuggerActivation.cpp:
2416         (JSC::DebuggerActivation::visitChildren):
2417         * heap/MarkedBlock.cpp:
2418         (JSC::MarkedBlock::MarkedBlock):
2419         * heap/MarkedSpace.cpp:
2420         * runtime/Arguments.cpp:
2421         (JSC::Arguments::visitChildren):
2422         * runtime/Executable.cpp:
2423         (JSC::EvalExecutable::visitChildren):
2424         (JSC::ProgramExecutable::visitChildren):
2425         (JSC::FunctionExecutable::visitChildren):
2426         * runtime/Executable.h:
2427         * runtime/GetterSetter.cpp:
2428         (JSC::GetterSetter::visitChildren):
2429         * runtime/GetterSetter.h:
2430         * runtime/JSAPIValueWrapper.h:
2431         (JSC::JSAPIValueWrapper::createStructure):
2432         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2433         * runtime/JSActivation.cpp:
2434         (JSC::JSActivation::visitChildren):
2435         * runtime/JSArray.cpp:
2436         (JSC::JSArray::visitChildren):
2437         * runtime/JSCell.cpp:
2438         (JSC::slowValidateCell):
2439         * runtime/JSCell.h:
2440         (JSC::JSCell::JSCell::unvalidatedStructure):
2441         (JSC::JSCell::JSCell::JSCell):
2442         * runtime/JSFunction.cpp:
2443         (JSC::JSFunction::visitChildren):
2444         * runtime/JSGlobalObject.cpp:
2445         (JSC::JSGlobalObject::visitChildren):
2446         (JSC::slowValidateCell):
2447         * runtime/JSONObject.h:
2448         * runtime/JSObject.cpp:
2449         (JSC::JSObject::visitChildren):
2450         * runtime/JSPropertyNameIterator.cpp:
2451         (JSC::JSPropertyNameIterator::visitChildren):
2452         * runtime/JSPropertyNameIterator.h:
2453         * runtime/JSStaticScopeObject.cpp:
2454         (JSC::JSStaticScopeObject::visitChildren):
2455         * runtime/JSString.h:
2456         (JSC::RopeBuilder::JSString):
2457         * runtime/JSWrapperObject.cpp:
2458         (JSC::JSWrapperObject::visitChildren):
2459         * runtime/NativeErrorConstructor.cpp:
2460         (JSC::NativeErrorConstructor::visitChildren):
2461         * runtime/PropertyMapHashTable.h:
2462         (JSC::PropertyMapEntry::PropertyMapEntry):
2463         * runtime/RegExpObject.cpp:
2464         (JSC::RegExpObject::visitChildren):
2465         * runtime/ScopeChain.cpp:
2466         (JSC::ScopeChainNode::visitChildren):
2467         * runtime/ScopeChain.h:
2468         (JSC::ScopeChainNode::ScopeChainNode):
2469         * runtime/Structure.cpp:
2470         (JSC::Structure::Structure):
2471         (JSC::Structure::addPropertyTransition):
2472         (JSC::Structure::visitChildren):
2473         * runtime/Structure.h:
2474         (JSC::JSCell::classInfo):
2475         * runtime/StructureChain.cpp:
2476         (JSC::StructureChain::visitChildren):
2477         * runtime/StructureChain.h:
2478         * runtime/WriteBarrier.h:
2479         (JSC::validateCell):
2480         (JSC::JSCell):
2481         (JSC::JSGlobalObject):
2482         (JSC::WriteBarrierBase::set):
2483         (JSC::WriteBarrierBase::setMayBeNull):
2484         (JSC::WriteBarrierBase::setEarlyValue):
2485         (JSC::WriteBarrierBase::get):
2486         (JSC::WriteBarrierBase::operator*):
2487         (JSC::WriteBarrierBase::operator->):
2488         (JSC::WriteBarrierBase::unvalidatedGet):
2489         (JSC::WriteBarrier::WriteBarrier):
2490         * wtf/Assertions.h:
2491
2492 2011-05-14  Csaba Osztrogonác  <ossy@webkit.org>
2493
2494         Unreviewed, rolling out r86469 and r86471, because they made hundreds tests crash on Qt.
2495
2496         Make GC validation more aggressive
2497         https://bugs.webkit.org/show_bug.cgi?id=60802
2498
2499         * JavaScriptCore.exp:
2500         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2501         * JavaScriptCore.xcodeproj/project.pbxproj:
2502         * debugger/DebuggerActivation.cpp:
2503         (JSC::DebuggerActivation::visitChildren):
2504         * heap/MarkedBlock.cpp:
2505         (JSC::MarkedBlock::MarkedBlock):
2506         * heap/MarkedSpace.cpp:
2507         * runtime/Arguments.cpp:
2508         (JSC::Arguments::visitChildren):
2509         * runtime/Executable.cpp:
2510         (JSC::EvalExecutable::visitChildren):
2511         (JSC::ProgramExecutable::visitChildren):
2512         (JSC::FunctionExecutable::visitChildren):
2513         * runtime/Executable.h:
2514         (JSC::ProgramExecutable::createStructure):
2515         (JSC::FunctionExecutable::createStructure):
2516         * runtime/GetterSetter.cpp:
2517         (JSC::GetterSetter::visitChildren):
2518         * runtime/GetterSetter.h:
2519         (JSC::GetterSetter::createStructure):
2520         * runtime/JSAPIValueWrapper.h:
2521         (JSC::JSAPIValueWrapper::createStructure):
2522         * runtime/JSActivation.cpp:
2523         (JSC::JSActivation::visitChildren):
2524         * runtime/JSArray.cpp:
2525         (JSC::JSArray::visitChildren):
2526         * runtime/JSCell.cpp:
2527         * runtime/JSCell.h:
2528         (JSC::JSCell::JSCell::JSCell):
2529         * runtime/JSFunction.cpp:
2530         (JSC::JSFunction::visitChildren):
2531         * runtime/JSGlobalObject.cpp:
2532         (JSC::JSGlobalObject::visitChildren):
2533         * runtime/JSONObject.h:
2534         (JSC::JSONObject::createStructure):
2535         * runtime/JSObject.cpp:
2536         (JSC::JSObject::visitChildren):
2537         * runtime/JSPropertyNameIterator.cpp:
2538         (JSC::JSPropertyNameIterator::visitChildren):
2539         * runtime/JSPropertyNameIterator.h:
2540         * runtime/JSStaticScopeObject.cpp:
2541         (JSC::JSStaticScopeObject::visitChildren):
2542         * runtime/JSString.h:
2543         (JSC::RopeBuilder::createStructure):
2544         * runtime/JSWrapperObject.cpp:
2545         (JSC::JSWrapperObject::visitChildren):
2546         * runtime/NativeErrorConstructor.cpp:
2547         (JSC::NativeErrorConstructor::visitChildren):
2548         * runtime/PropertyMapHashTable.h:
2549         (JSC::PropertyMapEntry::PropertyMapEntry):
2550         * runtime/RegExpObject.cpp:
2551         (JSC::RegExpObject::visitChildren):
2552         * runtime/ScopeChain.cpp:
2553         (JSC::ScopeChainNode::visitChildren):
2554         * runtime/ScopeChain.h:
2555         (JSC::ScopeChainNode::ScopeChainNode):
2556         * runtime/Structure.cpp:
2557         (JSC::Structure::Structure):
2558         (JSC::Structure::addPropertyTransition):
2559         (JSC::Structure::visitChildren):
2560         * runtime/Structure.h:
2561         (JSC::Structure::createStructure):
2562         (JSC::JSCell::classInfo):
2563         * runtime/StructureChain.cpp:
2564         (JSC::StructureChain::visitChildren):
2565         * runtime/StructureChain.h:
2566         * runtime/WriteBarrier.h:
2567         (JSC::WriteBarrierBase::set):
2568         (JSC::WriteBarrierBase::get):
2569         (JSC::WriteBarrierBase::operator*):
2570         (JSC::WriteBarrierBase::operator->):
2571         (JSC::WriteBarrier::WriteBarrier):
2572         * wtf/Assertions.h:
2573
2574 2011-05-13  Oliver Hunt  <oliver@apple.com>
2575
2576         Reviewed by Geoffrey Garen.
2577
2578         Make GC validation more aggressive
2579         https://bugs.webkit.org/show_bug.cgi?id=60802
2580
2581         This patch makes the checks performed under GC_VALIDATION
2582         much more aggressive, and adds the checks to more places
2583         in order to allow us to catch GC bugs much closer to the
2584         point of failure.
2585
2586         * JavaScriptCore.exp:
2587         * JavaScriptCore.xcodeproj/project.pbxproj:
2588         * debugger/DebuggerActivation.cpp:
2589         (JSC::DebuggerActivation::visitChildren):
2590         * heap/MarkedBlock.cpp:
2591         (JSC::MarkedBlock::MarkedBlock):
2592         * heap/MarkedSpace.cpp:
2593         * runtime/Arguments.cpp:
2594         (JSC::Arguments::visitChildren):
2595         * runtime/Executable.cpp:
2596         (JSC::EvalExecutable::visitChildren):
2597         (JSC::ProgramExecutable::visitChildren):
2598         (JSC::FunctionExecutable::visitChildren):
2599         * runtime/Executable.h:
2600         * runtime/GetterSetter.cpp:
2601         (JSC::GetterSetter::visitChildren):
2602         * runtime/GetterSetter.h:
2603         * runtime/JSAPIValueWrapper.h:
2604         (JSC::JSAPIValueWrapper::createStructure):
2605         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2606         * runtime/JSActivation.cpp:
2607         (JSC::JSActivation::visitChildren):
2608         * runtime/JSArray.cpp:
2609         (JSC::JSArray::visitChildren):
2610         * runtime/JSCell.cpp:
2611         (JSC::slowValidateCell):
2612         * runtime/JSCell.h:
2613         (JSC::JSCell::JSCell::unvalidatedStructure):
2614         (JSC::JSCell::JSCell::JSCell):
2615         * runtime/JSFunction.cpp:
2616         (JSC::JSFunction::visitChildren):
2617         * runtime/JSGlobalObject.cpp:
2618         (JSC::JSGlobalObject::visitChildren):
2619         (JSC::slowValidateCell):
2620         * runtime/JSONObject.h:
2621         * runtime/JSObject.cpp:
2622         (JSC::JSObject::visitChildren):
2623         * runtime/JSPropertyNameIterator.cpp:
2624         (JSC::JSPropertyNameIterator::visitChildren):
2625         * runtime/JSPropertyNameIterator.h:
2626         * runtime/JSStaticScopeObject.cpp:
2627         (JSC::JSStaticScopeObject::visitChildren):
2628         * runtime/JSString.h:
2629         (JSC::RopeBuilder::JSString):
2630         * runtime/JSWrapperObject.cpp:
2631         (JSC::JSWrapperObject::visitChildren):
2632         * runtime/NativeErrorConstructor.cpp:
2633         (JSC::NativeErrorConstructor::visitChildren):
2634         * runtime/PropertyMapHashTable.h:
2635         (JSC::PropertyMapEntry::PropertyMapEntry):
2636         * runtime/RegExpObject.cpp:
2637         (JSC::RegExpObject::visitChildren):
2638         * runtime/ScopeChain.cpp:
2639         (JSC::ScopeChainNode::visitChildren):
2640         * runtime/ScopeChain.h:
2641         (JSC::ScopeChainNode::ScopeChainNode):
2642         * runtime/Structure.cpp:
2643         (JSC::Structure::Structure):
2644         (JSC::Structure::addPropertyTransition):
2645         (JSC::Structure::visitChildren):
2646         * runtime/Structure.h:
2647         (JSC::JSCell::classInfo):
2648         * runtime/StructureChain.cpp:
2649         (JSC::StructureChain::visitChildren):
2650         * runtime/StructureChain.h:
2651         * runtime/WriteBarrier.h:
2652         (JSC::validateCell):
2653         (JSC::JSCell):
2654         (JSC::JSGlobalObject):
2655         (JSC::WriteBarrierBase::set):
2656         (JSC::WriteBarrierBase::setMayBeNull):
2657         (JSC::WriteBarrierBase::setEarlyValue):
2658         (JSC::WriteBarrierBase::get):
2659         (JSC::WriteBarrierBase::operator*):
2660         (JSC::WriteBarrierBase::operator->):
2661         (JSC::WriteBarrierBase::unvalidatedGet):
2662         (JSC::WriteBarrier::WriteBarrier):
2663         * wtf/Assertions.h:
2664
2665 2011-05-01  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
2666
2667         Reviewed by Steve Block.
2668
2669         [android] OS(ANDROID) does not imply PLATFORM(ANDROID)
2670         https://bugs.webkit.org/show_bug.cgi?id=59888
2671
2672         It is possible to build QtWebKit and others for OS(ANDROID). Let
2673         the buildsystem decide which platform is to be build.
2674
2675         * wtf/Platform.h:
2676
2677 2011-05-12  Maciej Stachowiak  <mjs@apple.com>
2678
2679         Reviewed by Darin Adler.
2680
2681         XMLDocumentParserLibxml2 should play nice with strict OwnPtrs
2682         https://bugs.webkit.org/show_bug.cgi?id=59394
2683
2684         This portion of the change introduces a PassTraits template, which
2685         is used to enable takeFirst() to work for a Deque holding OwnPtrs,
2686         and optimize it for a Deque holding RefPtrs. In the future it can
2687         be deployed elsewhere to make our data structures work better with
2688         our smart pointers.
2689
2690         * GNUmakefile.list.am:
2691         * JavaScriptCore.gypi:
2692         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2693         * JavaScriptCore.xcodeproj/project.pbxproj:
2694         * wtf/CMakeLists.txt:
2695         * wtf/Deque.h:
2696         (WTF::::takeFirst):
2697         * wtf/PassTraits.h: Added.
2698         (WTF::PassTraits::transfer):
2699
2700 2011-05-12  Nikolas Zimmermann  <nzimmermann@rim.com>
2701
2702         Not reviewed.
2703
2704         Revert r86334, it broke the win build. WinCE build is fixed even without this patch. WinCairo remains broken atm, everything else works.
2705
2706         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2707
2708 2011-05-12  Nikolas Zimmermann  <nzimmermann@rim.com>
2709
2710         Not reviewed.
2711
2712         String operator+ reallocates unnecessarily when concatting > 2 strings
2713         https://bugs.webkit.org/show_bug.cgi?id=58420
2714
2715         Try to fix WinCE/WinCairo linking by exporting three symbols, not sure whether it's correct though. Win worked just fine before.
2716
2717         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2718
2719 2011-05-12  Nikolas Zimmermann  <nzimmermann@rim.com>
2720
2721         Reviewed by Darin Adler.
2722
2723         String operator+ reallocates unnecessarily when concatting > 2 strings
2724         https://bugs.webkit.org/show_bug.cgi?id=58420
2725
2726         Provide a faster String append operator.
2727         Up until now, "String operator+(const String& a, const String& b)" copied String a into a temporary
2728         object, and used a.append(b), which reallocates a new buffer of aLength+bLength. When concatting
2729         N strings using operator+, this leads to N-1 reallocations.
2730
2731         Replace this with a flexible operator+ implementation, that avoids these reallocations.
2732         When concatting a 'String' with any string type (char*, UChar, Vector<char>, String, AtomicString, etc..)
2733         a StringAppend<String, T> object is created, which holds the intermediate string objects, and delays
2734         creation of the final string, until operator String() is invoked.
2735
2736         template<typename T>
2737         StringAppend<String, T> operator+(const String& string1, T string2)
2738         {
2739             return StringAppend<String, T>(string1, string2);
2740         }
2741
2742         template<typename U, typename V, typename W>
2743         StringAppend<U, StringAppend<V, W> > operator+(U string1, const StringAppend<V, W>& string2)
2744         {
2745             return StringAppend<U, StringAppend<V, W> >(string1, string2);
2746         }
2747
2748         When concatting three strings - "String a, b, c; String result = a + b + c;" following happens:
2749         first a StringAppend<String, String> object is created by operator+(const String& string1, String string2).
2750         Then operator+(String string1, const StringAppend<String, String>& string2) is invoked, which returns
2751         a StringAppend<String, StringAppend<String, String> > object.
2752         Then operator String() is invoked, which allocates a StringImpl object, once, large enough to hold the
2753         final string - it uses tryMakeString provided by StringConcatenate.h under the hoods, which guards us
2754         against too big string allocations, etc.
2755
2756         Note that the second template, defines a recursive way to concat an arbitary number of strings
2757         into a single String with just one allocation.
2758
2759         * GNUmakefile.list.am: Add StringOperators.h to build.
2760         * JavaScriptCore.exp: Export WTF::emptyString(). Remove no longer needed symbols.
2761         * JavaScriptCore.gypi: Add StringOperators.h to build.
2762         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
2763         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
2764         * wtf/text/AtomicString.h: Pull in StringConcatenate.h at the end of the file.
2765         * wtf/text/StringConcatenate.h: Conditionally include AtomicString.h to avoid a cyclic dependency. Pull in StringOperators.h at the end of the file.
2766         * 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.
2767         (WTF::StringAppend::StringAppend):
2768         (WTF::StringAppend::operator String):
2769         (WTF::StringAppend::operator AtomicString):
2770         (WTF::StringAppend::writeTo):
2771         (WTF::StringAppend::length):
2772         (WTF::operator+):
2773         * wtf/text/WTFString.cpp: Remove operator+ implementations that use String::append(). 
2774         (WTF::emptyString): Add new shared empty string free function.
2775         * wtf/text/WTFString.h: Replace operator+ implementations by StringAppend template solution. Pull in AtomicString.h at the end of the file.
2776
2777 2011-05-12  Philippe Normand  <pnormand@igalia.com>
2778
2779         Unreviewed, GTK build fix.
2780
2781         * wtf/Platform.h:
2782
2783 2011-05-12  Keith Kyzivat  <keith.kyzivat@nokia.com>
2784
2785         Reviewed by Csaba Osztrogonác.
2786
2787         [Qt] Arm debug build failing on ARMAssembler::debugOffset()
2788         https://bugs.webkit.org/show_bug.cgi?id=60688
2789
2790         Related to svn rev 85523
2791
2792         * assembler/ARMAssembler.h:
2793         (JSC::ARMAssembler::debugOffset):
2794
2795 2011-05-11  Igor Oliveira  <igor.oliveira@openbossa.org>
2796
2797         Reviewed by Eric Seidel.
2798
2799         WebKit does not build with GCCE
2800         https://bugs.webkit.org/show_bug.cgi?id=60667
2801
2802         Allow compile WebKit with GCCE
2803
2804         * wtf/Alignment.h:
2805         * wtf/Platform.h:
2806
2807 2011-05-11  Adam Barth  <abarth@webkit.org>
2808
2809         Reviewed by Eric Seidel.
2810
2811         Enable strict PassOwnPtr on Mac
2812         https://bugs.webkit.org/show_bug.cgi?id=60684
2813
2814         This should build cleanly now.
2815
2816         * wtf/PassOwnPtr.h:
2817
2818 2011-05-11  Oliver Hunt  <oliver@apple.com>
2819
2820         Reviewed by Darin Adler.
2821
2822         Protect JSC from WebCore executing JS during JS wrapper finalization
2823         https://bugs.webkit.org/show_bug.cgi?id=60672
2824         <rdar://problem/9350997>
2825
2826         Detect when we're trying to execute JS during GC and prevent the
2827         execution from happening.  We also assert that this isn't happening
2828         as it implies incorrect behaviour of an object's destructor.
2829
2830         * JavaScriptCore.exp:
2831         * heap/Heap.cpp:
2832         * heap/Heap.h:
2833         (JSC::Heap::isBusy):
2834         * interpreter/Interpreter.cpp:
2835         (JSC::Interpreter::execute):
2836         (JSC::Interpreter::executeCall):
2837         (JSC::Interpreter::executeConstruct):
2838         * runtime/JSGlobalData.h:
2839         (JSC::JSGlobalData::isCollectorBusy):
2840
2841 2011-05-11  Oliver Hunt  <oliver@apple.com>
2842
2843         Reviewed by Gavin Barraclough.
2844
2845         Enable gc mark validation in temporarily in release builds
2846         https://bugs.webkit.org/show_bug.cgi?id=60678
2847
2848         Make it easier to turn the gc mark validation on and off, and
2849         temporarily turn it on for all builds.
2850
2851         * heap/MarkStack.cpp:
2852         * heap/MarkStack.h:
2853         (JSC::MarkStack::append):
2854         (JSC::MarkStack::internalAppend):
2855         * runtime/WriteBarrier.h:
2856         (JSC::MarkStack::appendValues):
2857         * wtf/Platform.h:
2858
2859 2011-05-11  Geoffrey Garen  <ggaren@apple.com>
2860
2861         Reviewed by Oliver Hunt.
2862
2863         <rdar://problem/9331651> REGRESSION: RPRVT grows by 1MB / sec @ dvd2blu.com
2864         
2865         SunSpider reports no change.
2866
2867         This bug was caused by changing Structure and Executable to being GC
2868         objects, and by a long-standing bug that would thrash the global object
2869         between dictionary and non-dictionary states.
2870
2871         * runtime/BatchedTransitionOptimizer.h:
2872         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): Don't
2873         eagerly transition to dictionary -- this can cause pathological dictionary
2874         churn, and it's not necessary, since objects know how to automatically
2875         transition to dictionary when necessary.
2876
2877         * runtime/Executable.cpp:
2878         (JSC::EvalExecutable::compileInternal):
2879         (JSC::ProgramExecutable::compileInternal):
2880         (JSC::FunctionExecutable::compileForCallInternal):
2881         (JSC::FunctionExecutable::compileForConstructInternal): Be sure to report
2882         extra cost from compilation, because it can be quite high. This is especially
2883         important for program code, since DOM timers can repeatedly allocate
2884         program code without allocating any other objects.
2885
2886         * runtime/JSObject.cpp:
2887         (JSC::JSObject::removeDirect): Don't transition to the uncacheable state
2888         if the thing we're trying to remove doesn't exist. This can happen during
2889         compilation, since the compiler needs to ensure that no pre-existing
2890         conflicting definitions exist for certain declarations.
2891
2892 2011-05-11  Oliver Hunt  <oliver@apple.com>
2893
2894         Reviewed by Gavin Barraclough.
2895
2896         Make mark stack validation functions do something useful in a release build
2897         https://bugs.webkit.org/show_bug.cgi?id=60645
2898
2899         Turn ASSERTs into actual if(...) CRASH(); statements.
2900
2901         * heap/MarkStack.cpp:
2902         (JSC::MarkStack::validateValue):
2903
2904 2011-05-11  Xan Lopez  <xlopez@igalia.com>
2905
2906         Reviewed by Martin Robinson.
2907
2908         Fix copy&paste error in comment.
2909
2910         * jit/JITPropertyAccess.cpp:
2911         (JSC::JIT::stringGetByValStubGenerator): the value is stored in
2912         regT2, not regT1.
2913
2914 2011-05-11  Adam Roben  <aroben@apple.com>
2915
2916         WinCE build fixes for strict PassOwnPtr
2917
2918         * wtf/unicode/CollatorDefault.cpp:
2919         (WTF::Collator::userDefault): Use adoptPtr.
2920
2921 2011-05-11  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
2922
2923         Unreviewed build fix.
2924
2925         [MIPS] Fix compilation of the MIPS JIT
2926
2927         Include the MIPSAssembler.h first to indirectly include
2928         AssemblerBuffer.h before the AbstractMacroAssembler.h. This
2929         order is used for the ARM and X86 MacroAssembler*.h
2930
2931         * assembler/MacroAssemblerMIPS.h:
2932
2933 2011-05-11  Adam Roben  <aroben@apple.com>
2934
2935         Turn on strict PassOwnPtr on Windows
2936
2937         Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
2938
2939         Reviewed by Adam Barth.
2940
2941         * wtf/PassOwnPtr.h:
2942
2943 2011-05-10  Stephanie Lewis  <slewis@apple.com>
2944
2945         Unreviewed.
2946
2947         Revert accidental JavaScriptCore change in http://trac.webkit.org/changeset/86130
2948
2949         * Configurations/JavaScriptCore.xcconfig:
2950
2951 2011-05-10  Adam Barth  <abarth@webkit.org>
2952
2953         Reviewed by David Levin.
2954
2955         Enable strict PassOwnPtr on Chromium
2956         https://bugs.webkit.org/show_bug.cgi?id=60502
2957
2958         Other platforms to follow.
2959
2960         * wtf/PassOwnPtr.h:
2961
2962 2011-05-10  Geoffrey Garen  <ggaren@apple.com>
2963
2964         Reviewed by Darin Adler.
2965
2966         Fixed up some #include dependencies so the WriteBarrier class can actually call Heap::writeBarrier
2967         https://bugs.webkit.org/show_bug.cgi?id=60532
2968
2969         * GNUmakefile.list.am:
2970         * JavaScriptCore.gypi:
2971         * JavaScriptCore.xcodeproj/project.pbxproj: Build!
2972
2973         * heap/Handle.h: Moved HandleTypes to its own header because that's the
2974         WebKit style, and it was necessary to resolve a circular dependency
2975         between Handle.h and WriteBarrier.h.
2976
2977         * heap/Heap.h:
2978         (JSC::Heap::writeBarrier): Added an inline no-op writeBarrier(), to
2979         verify that all the code is in the right place.
2980
2981         * heap/MarkStack.h: Moved WriteBarrier operations to WriteBarrier.h to
2982         resolve a circular dependency.
2983
2984         * runtime/ArgList.h:
2985         * runtime/JSCell.h: #include WriteBarrier.h since we don't get it for
2986         free anymore.
2987
2988         * runtime/PropertyMapHashTable.h:
2989         (JSC::PropertyTable::PropertyTable): Call the real writeBarrier()
2990         function, now that it exists.
2991
2992         * runtime/SmallStrings.h: Removed a stray #include to resolve a circular
2993         dependency.
2994
2995         * runtime/WriteBarrier.h:
2996         (JSC::WriteBarrierBase::set):
2997         (JSC::MarkStack::append):
2998         (JSC::MarkStack::appendValues): Updated to match the changes above.
2999
3000 2011-05-10  Oliver Hunt  <oliver@apple.com>
3001
3002         Build fix.
3003
3004         * heap/MarkStack.cpp:
3005         (JSC::MarkStack::validateValue):
3006
3007 2011-05-10  Oliver Hunt  <oliver@apple.com>
3008
3009         Reviewed by Gavin Barraclough.
3010
3011         Add some aggressive GC validation to debug builds.
3012         https://bugs.webkit.org/show_bug.cgi?id=60601
3013
3014         When assertions are enabled we now do some validity checking
3015         of objects being added to the mark stack.
3016
3017         * bytecode/Instruction.h:
3018         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::PolymorphicStubInfo):
3019         (JSC::PolymorphicAccessStructureList::visitAggregate):
3020         * heap/MarkStack.cpp:
3021         (JSC::MarkStack::validateSet):
3022         (JSC::MarkStack::validateValue):
3023         * heap/MarkStack.h:
3024         (JSC::MarkStack::appendValues):
3025         (JSC::MarkStack::append):
3026         (JSC::MarkStack::internalAppend):
3027
3028 2011-05-09  Darin Adler  <darin@apple.com>
3029
3030         Reviewed by Oliver Hunt.
3031
3032         http://bugs.webkit.org/show_bug.cgi?id=60509
3033         Wrong type used for return value from strlen
3034
3035         * wtf/FastMalloc.cpp:
3036         (WTF::fastStrDup): Use size_t. Also don't bother checking for failure since
3037         fastMalloc won't return if it fails.
3038
3039 2011-05-09  Adam Barth  <abarth@webkit.org>
3040
3041         Reviewed by Eric Seidel.
3042
3043         CSP should block Function constructor
3044         https://bugs.webkit.org/show_bug.cgi?id=60240
3045
3046         When eval is disabled, we need to block the use of the function
3047         constructor.  However, the WebCore JSC bindings call the function
3048         constructor directly to create inline event listeners.  To support that
3049         use, this patch adds an entrypoint that bypasses the check for whether
3050         eval is enabled.
3051
3052         * JavaScriptCore.exp:
3053         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3054         * runtime/FunctionConstructor.cpp:
3055         (JSC::constructFunction):
3056         (JSC::constructFunctionSkippingEvalEnabledCheck):
3057         * runtime/FunctionConstructor.h:
3058
3059 2011-05-09  Adam Roben  <aroben@apple.com>
3060
3061         Automatically touch WebKit.idl whenever any other WebKit1 IDL file changes
3062
3063         Fixes <http://webkit.org/b/60468> WebKit.idl needs to be manually touched whenever any other
3064         WebKit1 IDL file changes to avoid build errors
3065
3066         Reviewed by Tim Hatcher.
3067
3068         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3069         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
3070         Updated for script rename.
3071
3072         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Removed.
3073         * JavaScriptCore.vcproj/JavaScriptCore/work-around-vs-dependency-tracking-bugs.py: Renamed
3074         from react-to-vsprops-changes.py.
3075         (top level): Moved a constant here from main.
3076         (main): Moved most code from here to react_to_vsprops_changes. Added a call to the new
3077         react_to_webkit1_interface_changes function.
3078         (react_to_vsprops_changes): Moved code here from main. Updated to use the
3079         TOP_LEVEL_DIRECTORY global. Moved some code from here to mtime_of_newest_file_matching_globa
3080         and touch_if_older_than.
3081         (react_to_webkit1_interface_changes): Added. Touches WebKit.idl if any other WebKit1 IDL
3082         file has changed.
3083         (mtime_of_newest_file_matching_glob): Added. Code came from main.
3084         (touch_if_older_than): Added. Code came from main.
3085
3086 2011-05-08  Jessie Berlin  <jberlin@apple.com>
3087
3088         Reviewed by Dan Bernstein.
3089
3090         Make JSRetainPtr work with JSGlobalContextRefs.
3091         https://bugs.webkit.org/show_bug.cgi?id=60452
3092
3093         Add specialized functions for JSRetain and JSRelease when dealing with JSGlobalContextRefs.
3094
3095         * API/JSRetainPtr.h:
3096         (JSRetain):
3097         (JSRelease):
3098
3099 2011-05-07  Dawit Alemayehu  <adawit@kde.org>
3100
3101         Reviewed by Daniel Bates.
3102
3103         Fix compile with GCC 4.6.0
3104         https://bugs.webkit.org/show_bug.cgi?id=60380
3105
3106         Remove unused local variable from code.
3107
3108         * runtime/StringPrototype.cpp:
3109         (JSC::stringProtoFuncMatch):
3110
3111 2011-05-06  Alexis Menard  <alexis.menard@openbossa.org>
3112
3113         Unreviewed build fix with gcc 4.6.0 on linux and c++0x support.
3114
3115         std::tr1::has_trivial_constructor is in <tr1/memory>.
3116
3117         * wtf/TypeTraits.h:
3118
3119 2011-05-05  Jay Civelli  <jcivelli@chromium.org>
3120
3121         Reviewed by Adam Barth.
3122
3123         Added convenience methods to convert from a byte to hex ASCII digit
3124         characters and vice-versa.
3125         https://bugs.webkit.org/show_bug.cgi?id=59834
3126
3127         * wtf/ASCIICType.h:
3128         (WTF::toASCIIHexValue):
3129         (WTF::lowerNibbleToASCIIHexDigit):
3130         (WTF::upperNibbleToASCIIHexDigit):
3131
3132 2011-05-05  Alexis Menard  <alexis.menard@openbossa.org>
3133
3134         Reviewed by Benjamin Poulain.
3135
3136         [Qt] Make QtWebKit build when using gcc 4.6.0
3137         https://bugs.webkit.org/show_bug.cgi?id=60265
3138
3139         If QtWebKit is compiled with gcc 4.6.0 or later we don't want to deactivate
3140         the c++0x support because it works.
3141
3142         * JavaScriptCore.pro:
3143
3144 2011-05-04  Fridrich Strba  <fridrich.strba@bluewin.ch>
3145
3146         Reviewed by Geoffrey Garen.
3147
3148         Port MachineStackMarker.cpp to Windows x64
3149         https://bugs.webkit.org/show_bug.cgi?id=60216
3150
3151         * heap/MachineStackMarker.cpp:
3152         (JSC::getPlatformThreadRegisters): the CONTEXT struct is usable also
3153         on 64-bit Windows.
3154         (JSC::otherThreadStackPointer): return the Rsp register on Windows x64.
3155
3156 2011-05-04  Fridrich Strba  <fridrich.strba@bluewin.ch>
3157
3158         Reviewed by Martin Robinson.
3159
3160         Link libjavascriptcoregtk on Windows with winmm.dll
3161         https://bugs.webkit.org/show_bug.cgi?id=60215
3162
3163         * GNUmakefile.am:
3164
3165 2011-05-04  Tao Bai  <michaelbai@chromium.org>
3166
3167         Reviewed by David Kilzer.
3168
3169         Populate touch-icon url to FrameLoaderClient
3170         https://bugs.webkit.org/show_bug.cgi?id=59143
3171
3172         * Configurations/FeatureDefines.xcconfig:
3173
3174 2011-05-03  Geoffrey Garen  <ggaren@apple.com>
3175
3176         Reviewed by Darin Adler.
3177
3178         <rdar://problem/9366557> Various crashes due to bad DFG codegen at canalplus.fr
3179
3180         * dfg/DFGSpeculativeJIT.cpp:
3181         (JSC::DFG::SpeculativeJIT::checkArgumentTypes): Removed a stray line of
3182         code that accidentally survived the conversion to a switch statement,
3183         causing a lot of important code not to run most of the time.
3184
3185         Since this is not a trivial finger-picking mistake, I will not call it a
3186         typo.
3187
3188 2011-05-04  Adam Roben  <aroben@apple.com>
3189
3190         Another attempted build fix
3191
3192         * wtf/OwnPtr.h:
3193         (WTF::OwnPtr::operator==):
3194         (WTF::OwnPtr::operator!=):
3195         * wtf/PassOwnPtr.h:
3196         (WTF::PassOwnPtr::operator==):
3197         (WTF::PassOwnPtr::operator!=):
3198         Added a return statement. And made a tweak based on a suggestion from Anders Carlsson.
3199
3200 2011-05-04  Adam Roben  <aroben@apple.com>
3201
3202         Try to fix Leopard, Qt, and probably others
3203
3204         * wtf/OwnPtr.h:
3205         (WTF::OwnPtr::operator==):
3206         (WTF::OwnPtr::operator!=):
3207         * wtf/PassOwnPtr.h:
3208         (WTF::PassOwnPtr::operator==):
3209         (WTF::PassOwnPtr::operator!=):
3210         Try to get the compiler not to instantiate these function templates unnecessarily.
3211
3212 2011-05-03  Adam Roben  <aroben@apple.com>
3213
3214         Disallow equality comparisons between [Pass]OwnPtrs
3215
3216         If you have two OwnPtrs that are equal, you've already lost. (Unless you're doing something
3217         really sneaky, in which case you should stop!)
3218
3219         Fixes <http://webkit.org/b/60053> Testing OwnPtrs for equality should cause a compiler error
3220
3221         Reviewed by Anders Carlsson and Antti Koivisto.
3222
3223         * wtf/OwnPtr.h:
3224         (WTF::OwnPtr::operator==):
3225         (WTF::OwnPtr::operator!=):
3226         * wtf/PassOwnPtr.h:
3227         (WTF::PassOwnPtr::operator==):
3228         (WTF::PassOwnPtr::operator!=):
3229         Added private equality operators that fail to compile when used. (When not used, the
3230         compiler will skip over them because they are function templates.)
3231
3232 2011-05-04  Alexis Menard  <alexis.menard@openbossa.org>
3233
3234         Reviewed by Gavin Barraclough.
3235
3236         JITArithmetic.cpp produces a warning on a unused variable.
3237         https://bugs.webkit.org/show_bug.cgi?id=60060
3238
3239         Just properly use what we already have converted.
3240
3241         * jit/JITArithmetic.cpp:
3242         (JSC::JIT::emitSlow_op_add):
3243         (JSC::JIT::emitSlow_op_mul):
3244
3245 2011-05-04  Alexis Menard  <alexis.menard@openbossa.org>
3246
3247         Reviewed by Geoffrey Garen.
3248
3249         JITPropertyAccess produces a unused but set variable warning in gcc 4.6.0.
3250         https://bugs.webkit.org/show_bug.cgi?id=60050
3251
3252         This patch fix a compilation warning. The new warning scenario -Wunused-but-set-variable
3253         in gcc 4.6.0 is included in -Wall and therefore stops the compilation when warnings are treated
3254         as errors. The patch introduces a new macro ASSERT_JIT_OFFSET_UNUSED and ASSERT_WITH_MESSAGE_UNUSED
3255         which copy the idea of ASSERT_UNUSED.
3256
3257         * jit/JIT.h:
3258         * jit/JITPropertyAccess.cpp:
3259         (JSC::JIT::emit_op_method_check):
3260         (JSC::JIT::compileGetByIdHotPath):
3261         (JSC::JIT::emit_op_put_by_id):
3262         * wtf/Assertions.h:
3263         (assertWithMessageUnused):
3264
3265 2011-04-29  Jer Noble  <jer.noble@apple.com>
3266
3267         Reviewed by Eric Seidel.
3268
3269         Implement FULLSCREEN_API on Windows, Part 4: Enable it
3270         https://bugs.webkit.org/show_bug.cgi?id=59798
3271
3272         * wtf/Platform.h: Set ENABLE_FULLSCREEN_API on win.
3273
3274 2011-05-03  Alexis Menard  <alexis.menard@openbossa.org>
3275
3276         Reviewed by Eric Seidel.
3277
3278         Unused but set variable warning in MacroAssemberX86_64
3279         https://bugs.webkit.org/show_bug.cgi?id=59482
3280
3281         * assembler/MacroAssemblerX86_64.h:
3282         (JSC::MacroAssemblerX86_64::call):
3283         (JSC::MacroAssemblerX86_64::tailRecursiveCall):
3284         (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
3285
3286 2011-05-03  Oliver Hunt  <oliver@apple.com>
3287
3288         Reviewed by Geoffrey Garen.
3289
3290         Make malloc validation useful
3291         https://bugs.webkit.org/show_bug.cgi?id=57502
3292
3293         Reland this patch (rolled out in 82905) without
3294         turning it on by default.
3295
3296         * JavaScriptCore.exp:
3297         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3298         * wtf/FastMalloc.cpp:
3299         (WTF::tryFastMalloc):
3300         (WTF::fastMalloc):
3301         (WTF::tryFastCalloc):
3302         (WTF::fastCalloc):
3303         (WTF::fastFree):
3304         (WTF::tryFastRealloc):
3305         (WTF::fastRealloc):
3306         (WTF::fastMallocSize):
3307         (WTF::TCMalloc_PageHeap::isScavengerSuspended):
3308         (WTF::TCMalloc_PageHeap::scheduleScavenger):
3309         (WTF::TCMalloc_PageHeap::suspendScavenger):
3310         (WTF::TCMalloc_PageHeap::signalScavenger):
3311         (WTF::TCMallocStats::malloc):
3312         (WTF::TCMallocStats::free):
3313         (WTF::TCMallocStats::fastCalloc):
3314         (WTF::TCMallocStats::tryFastCalloc):
3315         (WTF::TCMallocStats::calloc):
3316         (WTF::TCMallocStats::fastRealloc):
3317         (WTF::TCMallocStats::tryFastRealloc):
3318         (WTF::TCMallocStats::realloc):
3319         (WTF::TCMallocStats::fastMallocSize):
3320         * wtf/FastMalloc.h:
3321         (WTF::Internal::fastMallocValidationHeader):
3322         (WTF::Internal::fastMallocValidationSuffix):
3323         (WTF::Internal::fastMallocMatchValidationType):
3324         (WTF::Internal::setFastMallocMatchValidationType):
3325         (WTF::fastMallocMatchValidateFree):
3326         (WTF::fastMallocValidate):
3327
3328 2011-05-03  Xan Lopez  <xlopez@igalia.com>
3329
3330         Reviewed by Anders Carlsson.
3331
3332         Compile error with GCC 4.6.0, tries to assign unsigned& to bitfield
3333         https://bugs.webkit.org/show_bug.cgi?id=59261
3334
3335         Use unary '+' to force proper type detection in template arguments
3336         with GCC 4.6.0. See bug report for more details.
3337
3338         * runtime/Structure.cpp:
3339         (JSC::StructureTransitionTable::remove): Use '+' to force precise type detection.
3340         (JSC::StructureTransitionTable::add): ditto.
3341         * runtime/Structure.h:
3342         (JSC::StructureTransitionTable::keyForWeakGCMapFinalizer): ditto.
3343
3344 2011-05-03  Jessie Berlin  <jberlin@apple.com>
3345
3346         Rubber-stamped by Adam Roben.
3347
3348         Revert r85550 and r85575.
3349
3350         Variables cannot be exported via the .def file. Instead, they should be annotated with
3351         JS_EXPORTDATA.
3352
3353         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3354         * runtime/Structure.cpp:
3355         (JSC::Structure::materializePropertyMap):
3356         * runtime/Structure.h:
3357         (JSC::Structure::typeInfo):
3358         (JSC::Structure::previousID):
3359         (JSC::Structure::propertyStorageCapacity):
3360         (JSC::Structure::propertyStorageSize):
3361         (JSC::Structure::get):
3362         (JSC::Structure::materializePropertyMapIfNecessary):
3363
3364 2011-05-02  Adam Roben  <aroben@apple.com>
3365
3366         Allow implicit conversion from nullptr_t to PassOwnPtr
3367
3368         This makes it a lot easier to write code that just wants a null PassOwnPtr, especially in
3369         strict PassOwnPtr mode.
3370
3371         Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
3372         doesn't work, but should
3373
3374         Reviewed by Adam Barth.
3375
3376         * wtf/PassOwnPtr.h:
3377         (WTF::PassOwnPtr::PassOwnPtr): Added a non-explicit constructor that takes a nullptr_t.
3378
3379         * wtf/MessageQueue.h:
3380         (WTF::::waitForMessageFilteredWithTimeout):
3381         (WTF::::tryGetMessage):
3382         Use the new implicit conversion.
3383
3384 2011-05-02  Jessie Berlin  <jberlin@apple.com>
3385
3386         Rubber-stamped by Oliver Hunt.
3387
3388         Remove an assertion that Windows was hitting on launch.
3389
3390         * runtime/Structure.cpp:
3391         (JSC::Structure::materializePropertyMap):
3392         * runtime/Structure.h:
3393         (JSC::Structure::typeInfo):
3394         (JSC::Structure::previousID):
3395         (JSC::Structure::propertyStorageCapacity):
3396         (JSC::Structure::propertyStorageSize):
3397         (JSC::Structure::get):
3398         (JSC::Structure::materializePropertyMapIfNecessary):
3399
3400 2011-05-02  Mark Rowe  <mrowe@apple.com>
3401
3402         Reviewed by Geoff Garen.
3403
3404         <rdar://problem/9371948> JavaScriptCore should build with GCC 4.2
3405
3406         * Configurations/CompilerVersion.xcconfig:
3407
3408 2011-05-02  Gavin Barraclough  <barraclough@apple.com>
3409
3410         ARMv7 build fix.
3411
3412         * assembler/AbstractMacroAssembler.h:
3413         (JSC::AbstractMacroAssembler::Jump::link):
3414         (JSC::AbstractMacroAssembler::Jump::linkTo):
3415
3416 2011-05-02  Oliver Hunt  <oliver@apple.com>
3417
3418         Windows build fix.
3419
3420         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3421
3422 2011-05-02  Michael Saboff  <msaboff@apple.com>
3423
3424         Reviewed by Geoffrey Garen.
3425
3426         crash in JSC::RegExp::match
3427         https://bugs.webkit.org/show_bug.cgi?id=58922
3428
3429         Cleared chained backtrack data label when linking label even if that 
3430         label doesn't chain itself.  This is needed so that subsequent 
3431         backtrack data labels point to the next outer paren and not within 
3432         the current paren.
3433
3434         * yarr/YarrJIT.cpp:
3435         (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
3436
3437 2011-05-02  Geoffrey Garen  <ggaren@apple.com>
3438
3439         Reviewed by Oliver Hunt.
3440
3441         Tiny bit of heap cleanup.
3442
3443         * heap/MarkedBlock.h:
3444         (JSC::MarkedBlock::contains): Tightened up an assertion and a comment.
3445
3446         * heap/MarkedSpace.h:
3447         (JSC::MarkedSpace::globalData):
3448         (JSC::MarkedSpace::highWaterMark):
3449         (JSC::MarkedSpace::setHighWaterMark): Moved inlines out of the class
3450         definition, for better clarity.
3451
3452 2011-05-02  Oliver Hunt  <oliver@apple.com>
3453
3454         Reviewed by Gavin Barraclough.
3455
3456         Correct marking of interpreter data in mixed mode builds
3457         https://bugs.webkit.org/show_bug.cgi?id=59962
3458
3459         We had a few places in mixed mode builds where we would not
3460         track data used by the interpreter for marking.  This patch
3461         corrects the problem and adds a number of assertions to catch
3462         live Structures being collected.
3463
3464         * JavaScriptCore.exp:
3465         * assembler/ARMv7Assembler.h:
3466         (JSC::ARMv7Assembler::ARMInstructionFormatter::debugOffset):
3467         * bytecode/CodeBlock.cpp:
3468         (JSC::CodeBlock::dump):
3469         * bytecode/CodeBlock.h:
3470         (JSC::CodeBlock::addPropertyAccessInstruction):
3471         (JSC::CodeBlock::addGlobalResolveInstruction):
3472         (JSC::CodeBlock::addStructureStubInfo):
3473         (JSC::CodeBlock::addGlobalResolveInfo):
3474         * bytecompiler/BytecodeGenerator.cpp:
3475         (JSC::BytecodeGenerator::emitResolve):
3476         (JSC::BytecodeGenerator::emitResolveWithBase):
3477         (JSC::BytecodeGenerator::emitGetById):
3478         (JSC::BytecodeGenerator::emitPutById):
3479         (JSC::BytecodeGenerator::emitDirectPutById):
3480         * runtime/Structure.cpp:
3481         (JSC::Structure::materializePropertyMap):
3482         * runtime/Structure.h:
3483         (JSC::Structure::typeInfo):
3484         (JSC::Structure::previousID):
3485         (JSC::Structure::propertyStorageCapacity):
3486         (JSC::Structure::propertyStorageSize):
3487         (JSC::Structure::get):
3488         (JSC::Structure::materializePropertyMapIfNecessary):
3489
3490 2011-05-02  Xan Lopez  <xlopez@igalia.com>
3491
3492         Reviewed by Alexey Proskuryakov.
3493
3494         Use native NullPtr when using GCC 4.6.0 and C++0x
3495         https://bugs.webkit.org/show_bug.cgi?id=59252
3496
3497         GCC 4.6.0 has nullptr support, use it when possible.
3498
3499         * wtf/NullPtr.cpp: include config.h to pull in Platform.h before
3500         NullPtr.h, since we need the GCC_VERSION_AT_LEAST definition.
3501         * wtf/NullPtr.h: check for GCC >= 4.6.0 and C++0x in order to
3502         use native nullptr.
3503
3504 2011-05-02  Gavin Barraclough  <barraclough@apple.com>
3505
3506         Reviewed by Oliver Hunt.
3507
3508         https://bugs.webkit.org/show_bug.cgi?id=59950
3509         Clean up AssemblerBuffer to use a Vector internally.
3510
3511         AssemblerBuffer handles reallocing a byte array itself - stop that.
3512
3513         * assembler/ARMAssembler.cpp:
3514         (JSC::ARMAssembler::executableCopy):
3515         * assembler/AssemblerBuffer.h:
3516         (JSC::AssemblerLabel::AssemblerLabel):
3517         (JSC::AssemblerLabel::labelAtOffset):
3518         (JSC::AssemblerBuffer::AssemblerBuffer):
3519         (JSC::AssemblerBuffer::~AssemblerBuffer):
3520         (JSC::AssemblerBuffer::isAvailable):
3521         (JSC::AssemblerBuffer::ensureSpace):
3522         (JSC::AssemblerBuffer::isAligned):
3523         (JSC::AssemblerBuffer::putIntegral):
3524         (JSC::AssemblerBuffer::putIntegralUnchecked):
3525         (JSC::AssemblerBuffer::putByteUnchecked):
3526         (JSC::AssemblerBuffer::putByte):
3527         (JSC::AssemblerBuffer::putShortUnchecked):
3528         (JSC::AssemblerBuffer::putShort):
3529         (JSC::AssemblerBuffer::putIntUnchecked):
3530         (JSC::AssemblerBuffer::putInt):
3531         (JSC::AssemblerBuffer::putInt64Unchecked):
3532         (JSC::AssemblerBuffer::putInt64):
3533         (JSC::AssemblerBuffer::codeSize):
3534         (JSC::AssemblerBuffer::label):
3535         (JSC::AssemblerBuffer::executableCopy):
3536         (JSC::AssemblerBuffer::rewindToLabel):
3537         (JSC::AssemblerBuffer::debugOffset):
3538         (JSC::AssemblerBuffer::append):
3539         (JSC::AssemblerBuffer::grow):
3540         * assembler/AssemblerBufferWithConstantPool.h:
3541         * assembler/MacroAssemblerX86_64.h:
3542         (JSC::MacroAssemblerX86_64::linkCall):
3543         * assembler/X86Assembler.h:
3544         (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
3545
3546 2011-05-02  Jeff Miller  <jeffm@apple.com>
3547
3548         Reviewed by Alexy Proskuryakov.
3549
3550         Avoid potential buffer overflow in WTFLog() and WTFLogVerbose()
3551         https://bugs.webkit.org/show_bug.cgi?id=59949
3552
3553         * wtf/Assertions.cpp: Check for 0 or empty format string in WTFLog() and WTFLogVerbose().
3554
3555 2011-05-02  Adam Barth  <abarth@webkit.org>
3556
3557         Reviewed by Alexey Proskuryakov.
3558
3559         StringImpl::endsWith has some insane code
3560         https://bugs.webkit.org/show_bug.cgi?id=59900
3561
3562         * wtf/text/StringImpl.cpp:
3563         (WTF::StringImpl::endsWith):
3564             - m_data shadows a member variable of the same name.
3565
3566 2011-05-02  Gabor Loki  <loki@webkit.org>
3567
3568         Buildfix for ARM after r85448
3569
3570         * assembler/ARMAssembler.h:
3571         (JSC::ARMAssembler::loadBranchTarget):
3572
3573 2011-05-01  Oliver Hunt  <oliver@apple.com>
3574
3575         Reviewed by Gavin Barraclough.
3576
3577         Strict-mode only reserved words not reserved
3578         https://bugs.webkit.org/show_bug.cgi?id=55342
3579
3580         Fix line number tracking when we rollback the lexer.
3581
3582         * parser/JSParser.cpp:
3583         (JSC::JSParser::parseSourceElements):
3584
3585 2011-05-01  Oliver Hunt  <oliver@apple.com>
3586
3587         Reviewed by Gavin Barraclough.
3588
3589         ES5 Strict mode does not allow getter and setter for same propId
3590         https://bugs.webkit.org/show_bug.cgi?id=57295
3591
3592         Simplify and correct the logic for strict mode object literals.
3593
3594         * parser/JSParser.cpp:
3595         (JSC::JSParser::parseStrictObjectLiteral):
3596
3597 2011-05-01  Oliver Hunt  <oliver@apple.com>
3598
3599         Reviewed by Gavin Barraclough.
3600
3601         Assigning to function identifier under strict should throw
3602         https://bugs.webkit.org/show_bug.cgi?id=59289
3603
3604         Add logic to StaticScopeObject to ensure we don't silently consume
3605         writes to constant properties.
3606
3607         * runtime/JSStaticScopeObject.cpp:
3608         (JSC::JSStaticScopeObject::put):
3609
3610 2011-05-01  Gavin Barraclough  <barraclough@apple.com>
3611
3612         Reviewed by Sam Weinig.
3613
3614         https://bugs.webkit.org/show_bug.cgi?id=59903
3615         Use AssemblerLabel throughout Assembler classes, AssemblerBuffer
3616
3617         Creating a lable() into the AssemblerBuffer should return an AssemblerLabel,
3618         not an unsigned int.
3619
3620         * assembler/ARMAssembler.cpp:
3621         (JSC::ARMAssembler::executableCopy):
3622         * assembler/ARMAssembler.h:
3623         (JSC::ARMAssembler::blx):
3624         (JSC::ARMAssembler::label):
3625         (JSC::ARMAssembler::loadBranchTarget):
3626         * assembler/ARMv7Assembler.h:
3627         (JSC::ARMv7Assembler::b):
3628         (JSC::ARMv7Assembler::blx):
3629         (JSC::ARMv7Assembler::bx):
3630         (JSC::ARMv7Assembler::label):
3631         (JSC::ARMv7Assembler::ARMInstructionFormatter::label):
3632         * assembler/AssemblerBuffer.h:
3633         (JSC::AssemblerBuffer::label):
3634         * assembler/AssemblerBufferWithConstantPool.h:
3635         * assembler/MIPSAssembler.h:
3636         (JSC::MIPSAssembler::label):
3637         (JSC::MIPSAssembler::relocateJumps):
3638         * assembler/SH4Assembler.h:
3639         (JSC::SH4Assembler::loadConstant):
3640         (JSC::SH4Assembler::loadConstantUnReusable):
3641         (JSC::SH4Assembler::call):
3642         (JSC::SH4Assembler::jmp):
3643         (JSC::SH4Assembler::jne):
3644         (JSC::SH4Assembler::je):
3645         (JSC::SH4Assembler::label):
3646         (JSC::SH4Assembler::oneShortOp):
3647         * assembler/X86Assembler.h:
3648         (JSC::X86Assembler::call):
3649         (JSC::X86Assembler::jmp_r):
3650         (JSC::X86Assembler::label):
3651         (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
3652         (JSC::X86Assembler::X86InstructionFormatter::label):
3653
3654 2011-05-01  Adam Barth  <abarth@webkit.org>
3655
3656         Reviewed by David Levin.
3657
3658         Enable strict mode for OwnPtr and PassOwnPtr
3659         https://bugs.webkit.org/show_bug.cgi?id=59428
3660
3661         * wtf/OwnPtr.h:
3662
3663 2011-05-01  Patrick Gansterer  <paroga@webkit.org>
3664
3665         Reviewed by Adam Barth.
3666
3667         Enable strict OwnPtr for PLATFORM(WIN)
3668         https://bugs.webkit.org/show_bug.cgi?id=59881
3669
3670         * wtf/OwnPtr.h:
3671
3672 2011-05-01  Gavin Barraclough  <barraclough@apple.com>
3673
3674         Reviewed by Sam Weinig.
3675
3676         https://bugs.webkit.org/show_bug.cgi?id=59896
3677         Remove JmpSrc/JmpDst types.
3678
3679         The JmpSrc/JmpDst classes predate the MacroAssembler interface. Having these
3680         object be per-assembler in unhelpful, causes unnecessary code duplication,
3681         and prevents the AssemblerBuffer from providing a richer type for labels.
3682         The limited semantic meaning that they did convey is undermined by the manner
3683         in which their meanings have been overloaded (use of JmpSrc for Call, JmpDst
3684         for data labels).
3685
3686         Jumps on ARMv7 have had additional information added to the object via the
3687         ARMv7 JmpSrc. This data should probably be in the instruction stream. This
3688         patch does not fix the problem, and moves the data (ifdefed) to
3689         AbstractMacroAssembler::Jump (which is effectively where it was before!).
3690         This at least closes the hole such that no further data may be added to JmpSrc,
3691         but this is unfortunate, and should be cleaned up.
3692
3693         * assembler/ARMAssembler.h:
3694         (JSC::ARMAssembler::blx):
3695         (JSC::ARMAssembler::label):
3696         (JSC::ARMAssembler::align):
3697         (JSC::ARMAssembler::loadBranchTarget):
3698         (JSC::ARMAssembler::jmp):
3699         (JSC::ARMAssembler::linkPointer):
3700         (JSC::ARMAssembler::linkJump):
3701         (JSC::ARMAssembler::linkCall):
3702         (JSC::ARMAssembler::getRelocatedAddress):
3703         (JSC::ARMAssembler::getDifferenceBetweenLabels):
3704         (JSC::ARMAssembler::getCallReturnOffset):
3705         * assembler/ARMv7Assembler.h:
3706         (JSC::ARMv7Assembler::b):
3707         (JSC::ARMv7Assembler::blx):
3708         (JSC::ARMv7Assembler::bx):
3709         (JSC::ARMv7Assembler::label):
3710         (JSC::ARMv7Assembler::align):
3711         (JSC::ARMv7Assembler::getRelocatedAddress):
3712         (JSC::ARMv7Assembler::getDifferenceBetweenLabels):
3713         (JSC::ARMv7Assembler::getCallReturnOffset):
3714         (JSC::ARMv7Assembler::linkJump):
3715         (JSC::ARMv7Assembler::linkCall):
3716         (JSC::ARMv7Assembler::linkPointer):
3717         * assembler/AbstractMacroAssembler.h:
3718         (JSC::AbstractMacroAssembler::Label::isSet):
3719         (JSC::AbstractMacroAssembler::Call::Call):
3720         (JSC::AbstractMacroAssembler::Jump::Jump):
3721         (JSC::AbstractMacroAssembler::Jump::link):
3722         (JSC::AbstractMacroAssembler::Jump::linkTo):
3723         (JSC::AbstractMacroAssembler::linkPointer):
3724         (JSC::AbstractMacroAssembler::getLinkerAddress):
3725         * assembler/AssemblerBuffer.h:
3726         (JSC::AssemblerLabel::AssemblerLabel):
3727         (JSC::AssemblerLabel::isSet):
3728         * assembler/LinkBuffer.h:
3729         (JSC::LinkBuffer::patch):
3730         * assembler/MIPSAssembler.h:
3731         (JSC::MIPSAssembler::label):
3732         (JSC::MIPSAssembler::align):
3733         (JSC::MIPSAssembler::getRelocatedAddress):
3734         (JSC::MIPSAssembler::getDifferenceBetweenLabels):
3735         (JSC::MIPSAssembler::getCallReturnOffset):
3736         (JSC::MIPSAssembler::linkJump):
3737         (JSC::MIPSAssembler::linkCall):
3738         (JSC::MIPSAssembler::linkPointer):
3739         * assembler/MacroAssemblerARMv7.h:
3740         (JSC::MacroAssemblerARMv7::branchDouble):
3741         (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
3742         (JSC::MacroAssemblerARMv7::jump):
3743         (JSC::MacroAssemblerARMv7::nearCall):
3744         (JSC::MacroAssemblerARMv7::call):
3745         (JSC::MacroAssemblerARMv7::ret):
3746         (JSC::MacroAssemblerARMv7::tailRecursiveCall):
3747         (JSC::MacroAssemblerARMv7::makeBranch):
3748         * assembler/MacroAssemblerMIPS.h:
3749         (JSC::MacroAssemblerMIPS::nearCall):
3750         (JSC::MacroAssemblerMIPS::call):
3751         (JSC::MacroAssemblerMIPS::tailRecursiveCall):
3752         (JSC::MacroAssemblerMIPS::branchTrue):
3753         (JSC::MacroAssemblerMIPS::branchFalse):
3754         (JSC::MacroAssemblerMIPS::branchEqual):
3755         (JSC::MacroAssemblerMIPS::branchNotEqual):
3756         * assembler/SH4Assembler.h:
3757         (JSC::SH4Assembler::call):
3758         (JSC::SH4Assembler::jmp):
3759         (JSC::SH4Assembler::jne):
3760         (JSC::SH4Assembler::je):
3761         (JSC::SH4Assembler::label):
3762         (JSC::SH4Assembler::align):
3763         (JSC::SH4Assembler::linkJump):
3764         (JSC::SH4Assembler::linkCall):
3765         (JSC::SH4Assembler::linkPointer):
3766         (JSC::SH4Assembler::getCallReturnOffset):
3767         (JSC::SH4Assembler::getRelocatedAddress):
3768         (JSC::SH4Assembler::getDifferenceBetweenLabels):
3769         (JSC::SH4Assembler::patchPointer):
3770         * assembler/X86Assembler.h:
3771         (JSC::X86Assembler::call):
3772         (JSC::X86Assembler::jmp):
3773         (JSC::X86Assembler::jmp_r):
3774         (JSC::X86Assembler::jne):
3775         (JSC::X86Assembler::jnz):
3776         (JSC::X86Assembler::je):
3777         (JSC::X86Assembler::jz):
3778         (JSC::X86Assembler::jl):
3779         (JSC::X86Assembler::jb):
3780         (JSC::X86Assembler::jle):
3781         (JSC::X86Assembler::jbe):
3782         (JSC::X86Assembler::jge):
3783         (JSC::X86Assembler::jg):
3784         (JSC::X86Assembler::ja):
3785         (JSC::X86Assembler::jae):
3786         (JSC::X86Assembler::jo):
3787         (JSC::X86Assembler::jp):
3788         (JSC::X86Assembler::js):
3789         (JSC::X86Assembler::jCC):
3790         (JSC::X86Assembler::label):
3791         (JSC::X86Assembler::labelFor):
3792         (JSC::X86Assembler::align):
3793         (JSC::X86Assembler::linkJump):
3794         (JSC::X86Assembler::linkCall):
3795         (JSC::X86Assembler::linkPointer):
3796         (JSC::X86Assembler::getCallReturnOffset):
3797         (JSC::X86Assembler::getRelocatedAddress):
3798         (JSC::X86Assembler::getDifferenceBetweenLabels):
3799         (JSC::X86Assembler::rewindToLabel):
3800         (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
3801         (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
3802         * jit/JIT.cpp:
3803         (JSC::JIT::privateCompileMainPass):
3804         * jit/JIT.h:
3805         * jit/JITInlineMethods.h:
3806         (JSC::JIT::atJumpTarget):
3807         (JSC::JIT::emitGetVirtualRegister):
3808         * jit/JITOpcodes.cpp:
3809         (JSC::JIT::emit_op_jmp):
3810         (JSC::JIT::emit_op_jfalse):
3811         (JSC::JIT::emit_op_jeq_null):
3812         (JSC::JIT::emit_op_jneq_null):
3813         (JSC::JIT::emit_op_jneq_ptr):
3814         (JSC::JIT::emit_op_jsr):
3815         (JSC::JIT::emit_op_jtrue):
3816         (JSC::JIT::emit_op_jmp_scopes):
3817
3818 2011-05-01  Chao-ying Fu  <fu@mips.com>
3819
3820         Reviewed by Eric Seidel.
3821
3822         Fix MIPS build due to the split of "Condition" enum
3823         https://bugs.webkit.org/show_bug.cgi?id=59407
3824
3825         * assembler/MIPSAssembler.h:
3826         (JSC::MIPSAssembler::debugOffset):
3827         * assembler/MacroAssemblerMIPS.h:
3828         (JSC::MacroAssemblerMIPS::branch32):
3829         (JSC::MacroAssemblerMIPS::compare32):
3830
3831 2011-04-30  Adam Barth  <abarth@webkit.org>
3832
3833         Reviewed by Adam Barth.
3834
3835         Enable strict OwnPtr for GTK
3836         https://bugs.webkit.org/show_bug.cgi?id=59861
3837
3838         * wtf/OwnPtr.h:
3839
3840 2011-04-30  Gavin Barraclough  <barraclough@apple.com>
3841
3842         ARMv7 build fix.
3843
3844         * assembler/AssemblerBufferWithConstantPool.h:
3845
3846 2011-04-30  Gavin Barraclough  <barraclough@apple.com>
3847
3848         Reviewed by Oliver Hunt.
3849
3850         Bug 59869 - AssemblerBuffer cleanup - disambiguate size()
3851
3852         The method size() is called on the AssemblerBuffer both to acquire
3853         the complete size of the code, and to get a position to use as a
3854         label into the code. Instead, add an explicit 'label' method.
3855
3856         * assembler/ARMAssembler.cpp:
3857         (JSC::ARMAssembler::executableCopy):
3858         * assembler/ARMAssembler.h:
3859         (JSC::ARMAssembler::blx):
3860         (JSC::ARMAssembler::codeSize):
3861         (JSC::ARMAssembler::label):
3862         (JSC::ARMAssembler::loadBranchTarget):
3863         * assembler/ARMv7Assembler.h:
3864         (JSC::ARMv7Assembler::b):
3865         (JSC::ARMv7Assembler::blx):
3866         (JSC::ARMv7Assembler::bx):
3867         (JSC::ARMv7Assembler::label):
3868         (JSC::ARMv7Assembler::codeSize):
3869         (JSC::ARMv7Assembler::ARMInstructionFormatter::codeSize):
3870         (JSC::ARMv7Assembler::ARMInstructionFormatter::data):
3871         * assembler/AbstractMacroAssembler.h:
3872         * assembler/AssemblerBuffer.h:
3873         (JSC::AssemblerBuffer::codeSize):
3874         (JSC::AssemblerBuffer::label):
3875         * assembler/AssemblerBufferWithConstantPool.h:
3876         * assembler/LinkBuffer.h:
3877         (JSC::LinkBuffer::LinkBuffer):
3878         (JSC::LinkBuffer::linkCode):
3879         * assembler/MIPSAssembler.h:
3880         (JSC::MIPSAssembler::newJmpSrc):
3881         (JSC::MIPSAssembler::appendJump):
3882         (JSC::MIPSAssembler::label):
3883         (JSC::MIPSAssembler::codeSize):
3884         (JSC::MIPSAssembler::relocateJumps):
3885         * assembler/SH4Assembler.h:
3886         (JSC::SH4Assembler::loadConstant):
3887         (JSC::SH4Assembler::loadConstantUnReusable):
3888         (JSC::SH4Assembler::call):
3889         (JSC::SH4Assembler::jmp):
3890         (JSC::SH4Assembler::jne):
3891         (JSC::SH4Assembler::je):
3892         (JSC::SH4Assembler::label):
3893         (JSC::SH4Assembler::executableCopy):
3894         (JSC::SH4Assembler::oneShortOp):
3895         (JSC::SH4Assembler::codeSize):
3896         * assembler/X86Assembler.h:
3897         (JSC::X86Assembler::call):
3898         (JSC::X86Assembler::jmp_r):
3899         (JSC::X86Assembler::codeSize):
3900         (JSC::X86Assembler::label):
3901         (JSC::X86Assembler::executableCopy):
3902         (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
3903         (JSC::X86Assembler::X86InstructionFormatter::codeSize):
3904         (JSC::X86Assembler::X86InstructionFormatter::label):
3905         (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
3906         * dfg/DFGJITCompiler.cpp:
3907         (JSC::DFG::JITCompiler::compileFunction):
3908         * jit/JIT.cpp:
3909         (JSC::JIT::privateCompile):
3910         * jit/JITOpcodes.cpp:
3911         (JSC::JIT::privateCompileCTIMachineTrampolines):
3912         * jit/JITOpcodes32_64.cpp:
3913         (JSC::JIT::privateCompileCTIMachineTrampolines):
3914         * yarr/YarrJIT.cpp:
3915         (JSC::Yarr::YarrGenerator::compile):
3916
3917 2011-04-29  Adam Barth  <abarth@webkit.org>
3918
3919         Attempt to fix the Windows build.
3920
3921         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3922
3923 2011-04-29  Adam Barth  <abarth@webkit.org>
3924
3925         Reviewed by Eric Seidel.
3926
3927         CSP script-src should block eval
3928         https://bugs.webkit.org/show_bug.cgi?id=59850
3929
3930         ggaren recommend a different approach to this patch, essentially
3931         installing a new function for function-eval and changing the AST
3932         representation of operator-eval to call function-eval.  However, I'm
3933         not sure that approach is workable because the ASTBuilder doesn't know
3934         about global objects, and there is added complication due to the cache.
3935
3936         This approach is more dynamic, adding a branch in EvalExecutable to
3937         detect whether eval is current disabled in the lexical scope.  The spec
3938         is slightly unclear about whether we should return undefined or throw
3939         an exception.  I've asked Brandon to clarify the spec, but throwing an
3940         exception seems natural.
3941
3942         * JavaScriptCore.exp:
3943         * runtime/Executable.cpp:
3944         (JSC::EvalExecutable::compileInternal):
3945         * runtime/JSGlobalObject.cpp:
3946         (JSC::JSGlobalObject::disableEval):
3947         * runtime/JSGlobalObject.h:
3948         (JSC::JSGlobalObject::JSGlobalObject):
3949         (JSC::JSGlobalObject::isEvalEnabled):
3950
3951 2011-04-29  Gavin Barraclough  <barraclough@apple.com>
3952
3953         Reviewed by Oliver Hunt.
3954
3955         https://bugs.webkit.org/show_bug.cgi?id=59847
3956         Remove linkOffset from LinkBuffer
3957
3958         This is redundant since removal of recompilation for exception info.
3959
3960         * assembler/LinkBuffer.h:
3961         (JSC::LinkBuffer::LinkBuffer):
3962         (JSC::LinkBuffer::linkCode):
3963         * dfg/DFGJITCompiler.cpp:
3964         (JSC::DFG::JITCompiler::compileFunction):
3965         * jit/JIT.cpp:
3966         (JSC::JIT::JIT):
3967         (JSC::JIT::privateCompile):
3968         * jit/JIT.h:
3969         (JSC::JIT::compile):
3970         (JSC::JIT::compileCTIMachineTrampolines):
3971         (JSC::JIT::compileCTINativeCall):
3972         * jit/JITOpcodes.cpp:
3973         (JSC::JIT::privateCompileCTIMachineTrampolines):
3974         * jit/JITOpcodes32_64.cpp:
3975         (JSC::JIT::privateCompileCTIMachineTrampolines):
3976         (JSC::JIT::privateCompileCTINativeCall):
3977         * jit/JITPropertyAccess.cpp:
3978         (JSC::JIT::stringGetByValStubGenerator):
3979         (JSC::JIT::privateCompilePutByIdTransition):
3980         (JSC::JIT::privateCompilePatchGetArrayLength):
3981         (JSC::JIT::privateCompileGetByIdProto):
3982         (JSC::JIT::privateCompileGetByIdSelfList):
3983         (JSC::JIT::privateCompileGetByIdProtoList):
3984         (JSC::JIT::privateCompileGetByIdChainList):
3985         (JSC::JIT::privateCompileGetByIdChain):
3986         * jit/JITPropertyAccess32_64.cpp:
3987         (JSC::JIT::stringGetByValStubGenerator):
3988         (JSC::JIT::privateCompilePutByIdTransition):
3989         (JSC::JIT::privateCompilePatchGetArrayLength):
3990         (JSC::JIT::privateCompileGetByIdProto):
3991         (JSC::JIT::privateCompileGetByIdSelfList):
3992         (JSC::JIT::privateCompileGetByIdProtoList):
3993         (JSC::JIT::privateCompileGetByIdChainList):
3994         (JSC::JIT::privateCompileGetByIdChain):
3995         * jit/SpecializedThunkJIT.h:
3996         (JSC::SpecializedThunkJIT::finalize):
3997         * yarr/YarrJIT.cpp:
3998         (JSC::Yarr::YarrGenerator::compile):
3999
4000 2011-04-29  Gavin Barraclough  <barraclough@apple.com>
4001
4002         Reviewed by Oliver Hunt & Geoff Garen.
4003
4004         https://bugs.webkit.org/show_bug.cgi?id=59221
4005         [RegexFuzz] Regression blocking testing
4006
4007         Okay, so the bug here is that when, in the case of a TypeParentheticalAssertion
4008         node, emitDisjunction recursively calls to itself to emit the nested disjunction
4009         the value of parenthesesInputCountAlreadyChecked is bogus (doesn't take into
4010         account the uncheck that has just taken place).
4011
4012         Also, the special handling given to countToCheck in the case of parenthetical
4013         assertions is nonsense, delete it, along with the isParentheticalAssertion argument.
4014
4015         * yarr/YarrInterpreter.cpp:
4016         (JSC::Yarr::ByteCompiler::emitDisjunction):
4017
4018 2011-04-29  Csaba Osztrogonác  <ossy@webkit.org>
4019
4020         Reviewed by Adam Barth.
4021
4022         Enable strict OwnPtr for Qt
4023         https://bugs.webkit.org/show_bug.cgi?id=59667
4024
4025         * wtf/OwnPtr.h:
4026
4027 2011-04-29  Dean Jackson  <dino@apple.com>
4028
4029         Reviewed by Simon Fraser.
4030
4031         Add ENABLE macro for WebKitAnimation
4032         https://bugs.webkit.org/show_bug.cgi?id=59729
4033
4034         Add new feature to toggle WebKit Animation API.
4035
4036         * Configurations/FeatureDefines.xcconfig:
4037
4038 2011-04-28  Sam Weinig  <sam@webkit.org>
4039
4040         Reviewed by Mark Rowe.
4041
4042         Install testapi.js along side testapi
4043         https://bugs.webkit.org/show_bug.cgi?id=59773
4044
4045         * JavaScriptCore.xcodeproj/project.pbxproj:
4046         Add new build phase to copy testapi.js to install path of testapi
4047         on install.
4048
4049 2011-04-28  David Levin  <levin@chromium.org>
4050
4051         Reviewed by Adam Barth.
4052
4053         Remove IMAGE_RESIZER related code.
4054         https://bugs.webkit.org/show_bug.cgi?id=59735
4055
4056         * Configurations/FeatureDefines.xcconfig:
4057
4058 2011-04-28  Gavin Barraclough  <barraclough@apple.com>
4059
4060         Reviewed by Oliver Hunt.
4061
4062         https://bugs.webkit.org/show_bug.cgi?id=59763
4063         DFG JIT - Unify FPRReg & FPRegisterID
4064
4065         (Following on from GPRReg/RegisterID unification).
4066
4067         * dfg/DFGFPRInfo.h:
4068         (JSC::DFG::FPRInfo::toRegister):
4069         (JSC::DFG::FPRInfo::debugName):
4070         * dfg/DFGGPRInfo.h:
4071         * dfg/DFGJITCodeGenerator.cpp:
4072         (JSC::DFG::JITCodeGenerator::fillDouble):
4073         (JSC::DFG::JITCodeGenerator::checkConsistency):
4074         * dfg/DFGJITCodeGenerator.h:
4075         (JSC::DFG::JITCodeGenerator::boxDouble):
4076         (JSC::DFG::JITCodeGenerator::unboxDouble):
4077         (JSC::DFG::JITCodeGenerator::flushRegisters):
4078         (JSC::DFG::JITCodeGenerator::isFlushed):
4079         (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
4080         (JSC::DFG::JITCodeGenerator::setupStubArguments):
4081         (JSC::DFG::JITCodeGenerator::callOperation):
4082         (JSC::DFG::GPRResult::lockedResult):
4083         (JSC::DFG::FPRResult::lockedResult):
4084         * dfg/DFGJITCompiler.cpp:
4085         (JSC::DFG::JITCompiler::fillNumericToDouble):
4086         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
4087         (JSC::DFG::JITCompiler::compileFunction):
4088         * dfg/DFGJITCompiler.h:
4089         * dfg/DFGNode.h: