Reviewed by Andreas Kling.
[webkit:qtwebkit.git] / Source / JavaScriptCore / ChangeLog
1 2011-07-13  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>
2
3         Reviewed by Andreas Kling.
4
5         Broken build on QNX
6         https://bugs.webkit.org/show_bug.cgi?id=63717
7
8         QNX doesn't support pthread's SA_RESTART (required by
9         JSC_MULTIPLE_THREADS), JIT is broken at runtime and there a
10         few minor compilation errors here and there.
11
12         Original patch by Ritt Konstantin <ritt.ks@gmail.com>, also
13         tested by him on QNX v6.5 (x86)
14
15         * wtf/DateMath.cpp: fix usage of abs/labs
16         * wtf/Platform.h: Disable JIT and JSC_MULTIPLE_THREADS
17         * wtf/StackBounds.cpp: Add a couple of missing includes (and sort them)
18
19 2011-07-09  Thouraya Andolsi  <thouraya.andolsi@st.com>
20
21         Fix unaligned userspace access for SH4 platforms. 
22         https://bugs.webkit.org/show_bug.cgi?id=62993
23
24         * wtf/Platform.h:
25
26 2011-05-23  Matthew Delaney  <mdelaney@apple.com>
27
28         Reviewed by Simon Fraser.
29
30         Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
31         https://bugs.webkit.org/show_bug.cgi?id=58216
32
33         * wtf/MathExtras.h:
34         (clampToInteger):
35         (clampToPositiveInteger):
36
37 2011-06-20  Oliver Hunt  <oliver@apple.com>
38
39         Reviewed by Darin Adler.
40
41         REGRESSION (r79060): Searching for a flight at united.com fails
42         https://bugs.webkit.org/show_bug.cgi?id=63003
43
44         This original change also broke Twitter, and we attempted to refine the fix to 
45         address that problem (http://trac.webkit.org/changeset/80542), but since it still breaks United,
46         we need to revert the change until we understand the problem better.
47
48         * wtf/DateMath.cpp:
49         (WTF::parseDateFromNullTerminatedCharacters):
50
51 2011-06-09  Gavin Barraclough  <barraclough@apple.com>
52
53         Reviewed by Geoff Garen.
54
55         Bug 62405 - Fix integer overflow in Array.prototype.push
56
57         Fix geoff's review comments re static_cast.
58
59         * runtime/ArrayPrototype.cpp:
60         (JSC::arrayProtoFuncPush):
61
62 2011-06-09  Gavin Barraclough  <barraclough@apple.com>
63
64         Reviewed by Oliver Hunt.
65
66         Bug 62405 - Fix integer overflow in Array.prototype.push
67
68         There are three integer overflows here, leading to safe (not a security risk)
69         but incorrect (non-spec-compliant) behaviour.
70
71         Two overflows occur when calculating the new length after pushing (one in the
72         fast version of push in JSArray, one in the generic version in ArrayPrototype).
73         The other occurs calculating indices to write to when multiple items are pushed.
74
75         These errors result in three test-262 failures.
76
77         * runtime/ArrayPrototype.cpp:
78         (JSC::arrayProtoFuncPush):
79         * runtime/JSArray.cpp:
80         (JSC::JSArray::put):
81         (JSC::JSArray::push):
82
83 2011-06-08  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>
84
85         Reviewed by Andreas Kling.
86
87         Webkit on SPARC Solaris has wrong endian
88         https://bugs.webkit.org/show_bug.cgi?id=29407
89
90         Bug 57256 fixed one crash on misaligned reads on sparc/solaris, but
91         there are more ocurrences of the same code pattern in webkit.
92
93         This patch includes the check on these other parts of the code.
94
95         This is a speculative fix, I don't have a sparc machine to test and
96         don't know which kind of test would trigger a crash (but it's quite
97         obvious that it's the same code duplicated in different files).
98
99         * runtime/UString.h:
100         (JSC::UStringHash::equal):
101         * wtf/text/StringHash.h:
102         (WTF::StringHash::equal):
103
104 2011-06-08  Yael Aharon  <yael.aharon@nokia.com>
105
106         Reviewed by Andreas Kling.
107
108         [Qt] Build fix for building QtWebKit inside of Qt.
109         https://bugs.webkit.org/show_bug.cgi?id=62280
110
111         Remove CONFIG=staticlib, because it causes the configure script to add -ljavascriptcore
112         into QtWebKit.prl.
113
114         No new tests, as this is just a build fix.
115
116         * JavaScriptCore.pri:
117
118 2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>
119
120         Reviewed by Benjamin Poulain.
121
122         [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
123         https://bugs.webkit.org/show_bug.cgi?id=61957
124
125         When building inside the Qt source tree, qmake always append the mkspecs
126         defines after ours. We have to workaround and make sure that we append 
127         our flags after the qmake variable used inside Qt. This workaround was provided 
128         by our qmake folks. We need to append in both case because qmake behave differently
129         when called with -spec or via SUBDIR+=. This patch unbreak r87950 on Mac for Qt port.
130
131         * JavaScriptCore.pro:
132
133 2011-06-02  Alexis Menard  <alexis.menard@openbossa.org>
134
135         Reviewed by Andreas Kling.
136
137         [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
138         https://bugs.webkit.org/show_bug.cgi?id=61957
139
140         When building inside the Qt source tree, qmake always append the mkspecs
141         defines after ours. We have to workaround and make sure that we append  
142         our flags after the qmake variable used inside Qt. This workaround was provided
143         by our qmake folks.
144
145         * JavaScriptCore.pro:
146
147 2011-05-31  Oliver Hunt  <oliver@apple.com>
148
149         Reviewed by Geoffrey Garen.
150
151         Freezing a function and its prototype causes browser to crash.
152         https://bugs.webkit.org/show_bug.cgi?id=61758
153
154         Make JSObject::preventExtensions virtual so that we can override it
155         and instantiate all lazy
156
157         * JavaScriptCore.exp:
158         * runtime/JSFunction.cpp:
159         (JSC::createPrototypeProperty):
160         (JSC::JSFunction::preventExtensions):
161         (JSC::JSFunction::getOwnPropertySlot):
162         * runtime/JSFunction.h:
163         * runtime/JSObject.h:
164         * runtime/JSObject.cpp:
165         (JSC::JSObject::seal):
166         (JSC::JSObject::seal):
167
168 2011-05-12  Maciej Stachowiak  <mjs@apple.com>
169
170         Reviewed by Darin Adler.
171
172         XMLDocumentParserLibxml2 should play nice with strict OwnPtrs
173         https://bugs.webkit.org/show_bug.cgi?id=59394
174
175         This portion of the change introduces a PassTraits template, which
176         is used to enable takeFirst() to work for a Deque holding OwnPtrs,
177         and optimize it for a Deque holding RefPtrs. In the future it can
178         be deployed elsewhere to make our data structures work better with
179         our smart pointers.
180
181         * GNUmakefile.list.am:
182         * JavaScriptCore.gypi:
183         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
184         * JavaScriptCore.xcodeproj/project.pbxproj:
185         * wtf/CMakeLists.txt:
186         * wtf/Deque.h:
187         (WTF::::takeFirst):
188         * wtf/PassTraits.h: Added.
189         (WTF::PassTraits::transfer):
190
191 2011-05-26  Patrick Gansterer  <paroga@webkit.org>
192
193         Reviewed by Adam Barth.
194
195         ASSERT(isMainThread()) when using single threaded jsc executable
196         https://bugs.webkit.org/show_bug.cgi?id=60846
197
198         Remove the ASSERT since we do not have the concept of MainThread in JSC.
199
200         * wtf/CryptographicallyRandomNumber.cpp:
201         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
202         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
203
204 2011-05-20  Brady Eidson  <beidson@apple.com>
205
206         Reviewed by Sam Weinig.
207
208         <rdar://problem/9472883> and https://bugs.webkit.org/show_bug.cgi?id=61203
209         Horrendous bug in callOnMainThreadAndWait
210
211         * wtf/MainThread.cpp:
212         (WTF::dispatchFunctionsFromMainThread): Before signaling the background thread with the
213           syncFlag condition, reacquire the mutex first.
214
215 2011-05-20  Xan Lopez  <xlopez@igalia.com>
216
217         Reviewed by Oliver Hunt.
218
219         JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
220         https://bugs.webkit.org/show_bug.cgi?id=42756
221
222         Use the MAP_NORESERVE flag for mmap on Linux to skip the kernel
223         check of the available memory. This should give us an
224         overcommit-like behavior in most systems, which is what we want.
225
226         * wtf/OSAllocatorPosix.cpp:
227         (WTF::OSAllocator::reserveAndCommit): pass MAP_NORSERVE to mmap.
228
229 2011-05-11  Igor Oliveira  <igor.oliveira@openbossa.org>
230
231         Reviewed by Eric Seidel.
232
233         WebKit does not build with GCCE
234         https://bugs.webkit.org/show_bug.cgi?id=60667
235
236         Allow compile WebKit with GCCE
237
238         * wtf/Alignment.h:
239         * wtf/Platform.h:
240
241 2011-05-18  Oliver Hunt  <oliver@apple.com>
242
243         Reviewed by Sam Weinig.
244
245         JSGlobalObject and some others do GC allocation during initialization, which can cause heap corruption
246         https://bugs.webkit.org/show_bug.cgi?id=61090
247
248         Remove the Structure-free JSGlobalObject constructor and instead always
249         pass the structure into the JSGlobalObject constructor.
250         Stop DebuggerActivation creating a new structure every time, and simply
251         use a single shared structure held by the GlobalData.
252
253         * API/JSContextRef.cpp:
254         * debugger/DebuggerActivation.cpp:
255         (JSC::DebuggerActivation::DebuggerActivation):
256         * jsc.cpp:
257         (GlobalObject::GlobalObject):
258         (functionRun):
259         (jscmain):
260         * runtime/JSGlobalData.cpp:
261         (JSC::JSGlobalData::JSGlobalData):
262         (JSC::JSGlobalData::clearBuiltinStructures):
263         * runtime/JSGlobalData.h:
264         * runtime/JSGlobalObject.h:
265
266 2011-05-15  Geoffrey Garen  <ggaren@apple.com>
267
268         Reviewed by Maciej Stachowiak.
269
270         Partial fix for <rdar://problem/9417875> REGRESSION: SunSpider ~17% slower
271         in browser than on command line
272         
273         This patch fixes a few issues in generated code that could unreasonably
274         prolong object lifetimes.
275
276         * heap/Heap.cpp:
277         (JSC::Heap::collectAllGarbage): Throw away all function code before doing
278         a major collection. We want to clear polymorphic caches, since they can
279         keep alive large object graphs that have gone "stale". For the same reason,
280         but to a lesser extent, we also want to clear linked functions and other
281         one-off caches.
282
283         This has the side-benefit of reducing memory footprint from run-once
284         functions, and of allowing predictions and caches that have failed to
285         re-specialize.
286
287         Eventually, if compilation costs rise far enough, we may want a more
288         limited strategy for de-specializing code without throwing it away
289         completely, but this works for now, and it's the simplest solution.
290
291         * jit/JITStubs.cpp:
292         (JSC::JITThunks::hostFunctionStub):
293         * jit/JITStubs.h:
294         * runtime/JSFunction.cpp: Made the host function stub cache weak --
295         otherwise it's effectively a memory leak that can seriously fragment the
296         GC and JIT heaps.
297
298         (JSC::JSFunction::JSFunction):
299         (JSC::JSFunction::visitChildren): Cleared up some comments that confused
300         me when working with this code.
301
302 2011-05-07  Dawit Alemayehu  <adawit@kde.org>
303
304         Reviewed by Daniel Bates.
305
306         Fix compile with GCC 4.6.0
307         https://bugs.webkit.org/show_bug.cgi?id=60380
308
309         Remove unused local variable from code.
310
311         * runtime/StringPrototype.cpp:
312         (JSC::stringProtoFuncMatch):
313
314 2011-05-12  Keith Kyzivat  <keith.kyzivat@nokia.com>
315
316         Reviewed by Csaba Osztrogonác.
317
318         [Qt] Arm debug build failing on ARMAssembler::debugOffset()
319         https://bugs.webkit.org/show_bug.cgi?id=60688
320
321         Related to svn rev 85523
322
323         * assembler/ARMAssembler.h:
324         (JSC::ARMAssembler::debugOffset):
325
326 2011-05-11  Geoffrey Garen  <ggaren@apple.com>
327
328         Reviewed by Oliver Hunt.
329
330         <rdar://problem/9331651> REGRESSION: RPRVT grows by 1MB / sec @ dvd2blu.com
331         
332         SunSpider reports no change.
333
334         This bug was caused by changing Structure and Executable to being GC
335         objects, and by a long-standing bug that would thrash the global object
336         between dictionary and non-dictionary states.
337
338         * runtime/BatchedTransitionOptimizer.h:
339         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): Don't
340         eagerly transition to dictionary -- this can cause pathological dictionary
341         churn, and it's not necessary, since objects know how to automatically
342         transition to dictionary when necessary.
343
344         * runtime/Executable.cpp:
345         (JSC::EvalExecutable::compileInternal):
346         (JSC::ProgramExecutable::compileInternal):
347         (JSC::FunctionExecutable::compileForCallInternal):
348         (JSC::FunctionExecutable::compileForConstructInternal): Be sure to report
349         extra cost from compilation, because it can be quite high. This is especially
350         important for program code, since DOM timers can repeatedly allocate
351         program code without allocating any other objects.
352
353         * runtime/JSObject.cpp:
354         (JSC::JSObject::removeDirect): Don't transition to the uncacheable state
355         if the thing we're trying to remove doesn't exist. This can happen during
356         compilation, since the compiler needs to ensure that no pre-existing
357         conflicting definitions exist for certain declarations.
358
359 2011-05-11  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
360
361         Unreviewed build fix.
362
363         [MIPS] Fix compilation of the MIPS JIT
364
365         Include the MIPSAssembler.h first to indirectly include
366         AssemblerBuffer.h before the AbstractMacroAssembler.h. This
367         order is used for the ARM and X86 MacroAssembler*.h
368
369         * assembler/MacroAssemblerMIPS.h:
370
371 2011-05-09  Darin Adler  <darin@apple.com>
372
373         Reviewed by Oliver Hunt.
374
375         http://bugs.webkit.org/show_bug.cgi?id=60509
376         Wrong type used for return value from strlen
377
378         * wtf/FastMalloc.cpp:
379         (WTF::fastStrDup): Use size_t. Also don't bother checking for failure since
380         fastMalloc won't return if it fails.
381
382 2011-05-05  Alexis Menard  <alexis.menard@openbossa.org>
383
384         Reviewed by Benjamin Poulain.
385
386         [Qt] Make QtWebKit build when using gcc 4.6.0
387         https://bugs.webkit.org/show_bug.cgi?id=60265
388
389         If QtWebKit is compiled with gcc 4.6.0 or later we don't want to deactivate
390         the c++0x support because it works.
391
392         * JavaScriptCore.pro:
393
394 2011-05-04  Fridrich Strba  <fridrich.strba@bluewin.ch>
395
396         Reviewed by Geoffrey Garen.
397
398         Port MachineStackMarker.cpp to Windows x64
399         https://bugs.webkit.org/show_bug.cgi?id=60216
400
401         * heap/MachineStackMarker.cpp:
402         (JSC::getPlatformThreadRegisters): the CONTEXT struct is usable also
403         on 64-bit Windows.
404         (JSC::otherThreadStackPointer): return the Rsp register on Windows x64.
405
406 2011-05-04  Fridrich Strba  <fridrich.strba@bluewin.ch>
407
408         Reviewed by Martin Robinson.
409
410         Link libjavascriptcoregtk on Windows with winmm.dll
411         https://bugs.webkit.org/show_bug.cgi?id=60215
412
413         * GNUmakefile.am:
414
415 2011-05-04  Tao Bai  <michaelbai@chromium.org>
416
417         Reviewed by David Kilzer.
418
419         Populate touch-icon url to FrameLoaderClient
420         https://bugs.webkit.org/show_bug.cgi?id=59143
421
422         * Configurations/FeatureDefines.xcconfig:
423
424 2011-05-03  Geoffrey Garen  <ggaren@apple.com>
425
426         Reviewed by Darin Adler.
427
428         <rdar://problem/9366557> Various crashes due to bad DFG codegen at canalplus.fr
429
430         * dfg/DFGSpeculativeJIT.cpp:
431         (JSC::DFG::SpeculativeJIT::checkArgumentTypes): Removed a stray line of
432         code that accidentally survived the conversion to a switch statement,
433         causing a lot of important code not to run most of the time.
434
435         Since this is not a trivial finger-picking mistake, I will not call it a
436         typo.
437
438 2011-05-04  Adam Roben  <aroben@apple.com>
439
440         Another attempted build fix
441
442         * wtf/OwnPtr.h:
443         (WTF::OwnPtr::operator==):
444         (WTF::OwnPtr::operator!=):
445         * wtf/PassOwnPtr.h:
446         (WTF::PassOwnPtr::operator==):
447         (WTF::PassOwnPtr::operator!=):
448         Added a return statement. And made a tweak based on a suggestion from Anders Carlsson.
449
450 2011-05-04  Adam Roben  <aroben@apple.com>
451
452         Try to fix Leopard, Qt, and probably others
453
454         * wtf/OwnPtr.h:
455         (WTF::OwnPtr::operator==):
456         (WTF::OwnPtr::operator!=):
457         * wtf/PassOwnPtr.h:
458         (WTF::PassOwnPtr::operator==):
459         (WTF::PassOwnPtr::operator!=):
460         Try to get the compiler not to instantiate these function templates unnecessarily.
461
462 2011-05-03  Adam Roben  <aroben@apple.com>
463
464         Disallow equality comparisons between [Pass]OwnPtrs
465
466         If you have two OwnPtrs that are equal, you've already lost. (Unless you're doing something
467         really sneaky, in which case you should stop!)
468
469         Fixes <http://webkit.org/b/60053> Testing OwnPtrs for equality should cause a compiler error
470
471         Reviewed by Anders Carlsson and Antti Koivisto.
472
473         * wtf/OwnPtr.h:
474         (WTF::OwnPtr::operator==):
475         (WTF::OwnPtr::operator!=):
476         * wtf/PassOwnPtr.h:
477         (WTF::PassOwnPtr::operator==):
478         (WTF::PassOwnPtr::operator!=):
479         Added private equality operators that fail to compile when used. (When not used, the
480         compiler will skip over them because they are function templates.)
481
482 2011-05-04  Alexis Menard  <alexis.menard@openbossa.org>
483
484         Reviewed by Gavin Barraclough.
485
486         JITArithmetic.cpp produces a warning on a unused variable.
487         https://bugs.webkit.org/show_bug.cgi?id=60060
488
489         Just properly use what we already have converted.
490
491         * jit/JITArithmetic.cpp:
492         (JSC::JIT::emitSlow_op_add):
493         (JSC::JIT::emitSlow_op_mul):
494
495 2011-05-04  Alexis Menard  <alexis.menard@openbossa.org>
496
497         Reviewed by Geoffrey Garen.
498
499         JITPropertyAccess produces a unused but set variable warning in gcc 4.6.0.
500         https://bugs.webkit.org/show_bug.cgi?id=60050
501
502         This patch fix a compilation warning. The new warning scenario -Wunused-but-set-variable
503         in gcc 4.6.0 is included in -Wall and therefore stops the compilation when warnings are treated
504         as errors. The patch introduces a new macro ASSERT_JIT_OFFSET_UNUSED and ASSERT_WITH_MESSAGE_UNUSED
505         which copy the idea of ASSERT_UNUSED.
506
507         * jit/JIT.h:
508         * jit/JITPropertyAccess.cpp:
509         (JSC::JIT::emit_op_method_check):
510         (JSC::JIT::compileGetByIdHotPath):
511         (JSC::JIT::emit_op_put_by_id):
512         * wtf/Assertions.h:
513         (assertWithMessageUnused):
514
515 2011-04-29  Jer Noble  <jer.noble@apple.com>
516
517         Reviewed by Eric Seidel.
518
519         Implement FULLSCREEN_API on Windows, Part 4: Enable it
520         https://bugs.webkit.org/show_bug.cgi?id=59798
521
522         * wtf/Platform.h: Set ENABLE_FULLSCREEN_API on win.
523
524 2011-05-03  Alexis Menard  <alexis.menard@openbossa.org>
525
526         Reviewed by Eric Seidel.
527
528         Unused but set variable warning in MacroAssemberX86_64
529         https://bugs.webkit.org/show_bug.cgi?id=59482
530
531         * assembler/MacroAssemblerX86_64.h:
532         (JSC::MacroAssemblerX86_64::call):
533         (JSC::MacroAssemblerX86_64::tailRecursiveCall):
534         (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
535
536 2011-05-03  Oliver Hunt  <oliver@apple.com>
537
538         Reviewed by Geoffrey Garen.
539
540         Make malloc validation useful
541         https://bugs.webkit.org/show_bug.cgi?id=57502
542
543         Reland this patch (rolled out in 82905) without
544         turning it on by default.
545
546         * JavaScriptCore.exp:
547         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
548         * wtf/FastMalloc.cpp:
549         (WTF::tryFastMalloc):
550         (WTF::fastMalloc):
551         (WTF::tryFastCalloc):
552         (WTF::fastCalloc):
553         (WTF::fastFree):
554         (WTF::tryFastRealloc):
555         (WTF::fastRealloc):
556         (WTF::fastMallocSize):
557         (WTF::TCMalloc_PageHeap::isScavengerSuspended):
558         (WTF::TCMalloc_PageHeap::scheduleScavenger):
559         (WTF::TCMalloc_PageHeap::suspendScavenger):
560         (WTF::TCMalloc_PageHeap::signalScavenger):
561         (WTF::TCMallocStats::malloc):
562         (WTF::TCMallocStats::free):
563         (WTF::TCMallocStats::fastCalloc):
564         (WTF::TCMallocStats::tryFastCalloc):
565         (WTF::TCMallocStats::calloc):
566         (WTF::TCMallocStats::fastRealloc):
567         (WTF::TCMallocStats::tryFastRealloc):
568         (WTF::TCMallocStats::realloc):
569         (WTF::TCMallocStats::fastMallocSize):
570         * wtf/FastMalloc.h:
571         (WTF::Internal::fastMallocValidationHeader):
572         (WTF::Internal::fastMallocValidationSuffix):
573         (WTF::Internal::fastMallocMatchValidationType):
574         (WTF::Internal::setFastMallocMatchValidationType):
575         (WTF::fastMallocMatchValidateFree):
576         (WTF::fastMallocValidate):
577
578 2011-05-03  Xan Lopez  <xlopez@igalia.com>
579
580         Reviewed by Anders Carlsson.
581
582         Compile error with GCC 4.6.0, tries to assign unsigned& to bitfield
583         https://bugs.webkit.org/show_bug.cgi?id=59261
584
585         Use unary '+' to force proper type detection in template arguments
586         with GCC 4.6.0. See bug report for more details.
587
588         * runtime/Structure.cpp:
589         (JSC::StructureTransitionTable::remove): Use '+' to force precise type detection.
590         (JSC::StructureTransitionTable::add): ditto.
591         * runtime/Structure.h:
592         (JSC::StructureTransitionTable::keyForWeakGCMapFinalizer): ditto.
593
594 2011-05-03  Jessie Berlin  <jberlin@apple.com>
595
596         Rubber-stamped by Adam Roben.
597
598         Revert r85550 and r85575.
599
600         Variables cannot be exported via the .def file. Instead, they should be annotated with
601         JS_EXPORTDATA.
602
603         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
604         * runtime/Structure.cpp:
605         (JSC::Structure::materializePropertyMap):
606         * runtime/Structure.h:
607         (JSC::Structure::typeInfo):
608         (JSC::Structure::previousID):
609         (JSC::Structure::propertyStorageCapacity):
610         (JSC::Structure::propertyStorageSize):
611         (JSC::Structure::get):
612         (JSC::Structure::materializePropertyMapIfNecessary):
613
614 2011-05-02  Adam Roben  <aroben@apple.com>
615
616         Allow implicit conversion from nullptr_t to PassOwnPtr
617
618         This makes it a lot easier to write code that just wants a null PassOwnPtr, especially in
619         strict PassOwnPtr mode.
620
621         Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
622         doesn't work, but should
623
624         Reviewed by Adam Barth.
625
626         * wtf/PassOwnPtr.h:
627         (WTF::PassOwnPtr::PassOwnPtr): Added a non-explicit constructor that takes a nullptr_t.
628
629         * wtf/MessageQueue.h:
630         (WTF::::waitForMessageFilteredWithTimeout):
631         (WTF::::tryGetMessage):
632         Use the new implicit conversion.
633
634 2011-05-02  Jessie Berlin  <jberlin@apple.com>
635
636         Rubber-stamped by Oliver Hunt.
637
638         Remove an assertion that Windows was hitting on launch.
639
640         * runtime/Structure.cpp:
641         (JSC::Structure::materializePropertyMap):
642         * runtime/Structure.h:
643         (JSC::Structure::typeInfo):
644         (JSC::Structure::previousID):
645         (JSC::Structure::propertyStorageCapacity):
646         (JSC::Structure::propertyStorageSize):
647         (JSC::Structure::get):
648         (JSC::Structure::materializePropertyMapIfNecessary):
649
650 2011-05-02  Mark Rowe  <mrowe@apple.com>
651
652         Reviewed by Geoff Garen.
653
654         <rdar://problem/9371948> JavaScriptCore should build with GCC 4.2
655
656         * Configurations/CompilerVersion.xcconfig:
657
658 2011-05-02  Gavin Barraclough  <barraclough@apple.com>
659
660         ARMv7 build fix.
661
662         * assembler/AbstractMacroAssembler.h:
663         (JSC::AbstractMacroAssembler::Jump::link):
664         (JSC::AbstractMacroAssembler::Jump::linkTo):
665
666 2011-05-02  Oliver Hunt  <oliver@apple.com>
667
668         Windows build fix.
669
670         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
671
672 2011-05-02  Michael Saboff  <msaboff@apple.com>
673
674         Reviewed by Geoffrey Garen.
675
676         crash in JSC::RegExp::match
677         https://bugs.webkit.org/show_bug.cgi?id=58922
678
679         Cleared chained backtrack data label when linking label even if that 
680         label doesn't chain itself.  This is needed so that subsequent 
681         backtrack data labels point to the next outer paren and not within 
682         the current paren.
683
684         * yarr/YarrJIT.cpp:
685         (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
686
687 2011-05-02  Geoffrey Garen  <ggaren@apple.com>
688
689         Reviewed by Oliver Hunt.
690
691         Tiny bit of heap cleanup.
692
693         * heap/MarkedBlock.h:
694         (JSC::MarkedBlock::contains): Tightened up an assertion and a comment.
695
696         * heap/MarkedSpace.h:
697         (JSC::MarkedSpace::globalData):
698         (JSC::MarkedSpace::highWaterMark):
699         (JSC::MarkedSpace::setHighWaterMark): Moved inlines out of the class
700         definition, for better clarity.
701
702 2011-05-02  Oliver Hunt  <oliver@apple.com>
703
704         Reviewed by Gavin Barraclough.
705
706         Correct marking of interpreter data in mixed mode builds
707         https://bugs.webkit.org/show_bug.cgi?id=59962
708
709         We had a few places in mixed mode builds where we would not
710         track data used by the interpreter for marking.  This patch
711         corrects the problem and adds a number of assertions to catch
712         live Structures being collected.
713
714         * JavaScriptCore.exp:
715         * assembler/ARMv7Assembler.h:
716         (JSC::ARMv7Assembler::ARMInstructionFormatter::debugOffset):
717         * bytecode/CodeBlock.cpp:
718         (JSC::CodeBlock::dump):
719         * bytecode/CodeBlock.h:
720         (JSC::CodeBlock::addPropertyAccessInstruction):
721         (JSC::CodeBlock::addGlobalResolveInstruction):
722         (JSC::CodeBlock::addStructureStubInfo):
723         (JSC::CodeBlock::addGlobalResolveInfo):
724         * bytecompiler/BytecodeGenerator.cpp:
725         (JSC::BytecodeGenerator::emitResolve):
726         (JSC::BytecodeGenerator::emitResolveWithBase):
727         (JSC::BytecodeGenerator::emitGetById):
728         (JSC::BytecodeGenerator::emitPutById):
729         (JSC::BytecodeGenerator::emitDirectPutById):
730         * runtime/Structure.cpp:
731         (JSC::Structure::materializePropertyMap):
732         * runtime/Structure.h:
733         (JSC::Structure::typeInfo):
734         (JSC::Structure::previousID):
735         (JSC::Structure::propertyStorageCapacity):
736         (JSC::Structure::propertyStorageSize):
737         (JSC::Structure::get):
738         (JSC::Structure::materializePropertyMapIfNecessary):
739
740 2011-05-02  Xan Lopez  <xlopez@igalia.com>
741
742         Reviewed by Alexey Proskuryakov.
743
744         Use native NullPtr when using GCC 4.6.0 and C++0x
745         https://bugs.webkit.org/show_bug.cgi?id=59252
746
747         GCC 4.6.0 has nullptr support, use it when possible.
748
749         * wtf/NullPtr.cpp: include config.h to pull in Platform.h before
750         NullPtr.h, since we need the GCC_VERSION_AT_LEAST definition.
751         * wtf/NullPtr.h: check for GCC >= 4.6.0 and C++0x in order to
752         use native nullptr.
753
754 2011-05-02  Gavin Barraclough  <barraclough@apple.com>
755
756         Reviewed by Oliver Hunt.
757
758         https://bugs.webkit.org/show_bug.cgi?id=59950
759         Clean up AssemblerBuffer to use a Vector internally.
760
761         AssemblerBuffer handles reallocing a byte array itself - stop that.
762
763         * assembler/ARMAssembler.cpp:
764         (JSC::ARMAssembler::executableCopy):
765         * assembler/AssemblerBuffer.h:
766         (JSC::AssemblerLabel::AssemblerLabel):
767         (JSC::AssemblerLabel::labelAtOffset):
768         (JSC::AssemblerBuffer::AssemblerBuffer):
769         (JSC::AssemblerBuffer::~AssemblerBuffer):
770         (JSC::AssemblerBuffer::isAvailable):
771         (JSC::AssemblerBuffer::ensureSpace):
772         (JSC::AssemblerBuffer::isAligned):
773         (JSC::AssemblerBuffer::putIntegral):
774         (JSC::AssemblerBuffer::putIntegralUnchecked):
775         (JSC::AssemblerBuffer::putByteUnchecked):
776         (JSC::AssemblerBuffer::putByte):
777         (JSC::AssemblerBuffer::putShortUnchecked):
778         (JSC::AssemblerBuffer::putShort):
779         (JSC::AssemblerBuffer::putIntUnchecked):
780         (JSC::AssemblerBuffer::putInt):
781         (JSC::AssemblerBuffer::putInt64Unchecked):
782         (JSC::AssemblerBuffer::putInt64):
783         (JSC::AssemblerBuffer::codeSize):
784         (JSC::AssemblerBuffer::label):
785         (JSC::AssemblerBuffer::executableCopy):
786         (JSC::AssemblerBuffer::rewindToLabel):
787         (JSC::AssemblerBuffer::debugOffset):
788         (JSC::AssemblerBuffer::append):
789         (JSC::AssemblerBuffer::grow):
790         * assembler/AssemblerBufferWithConstantPool.h:
791         * assembler/MacroAssemblerX86_64.h:
792         (JSC::MacroAssemblerX86_64::linkCall):
793         * assembler/X86Assembler.h:
794         (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
795
796 2011-05-02  Jeff Miller  <jeffm@apple.com>
797
798         Reviewed by Alexy Proskuryakov.
799
800         Avoid potential buffer overflow in WTFLog() and WTFLogVerbose()
801         https://bugs.webkit.org/show_bug.cgi?id=59949
802
803         * wtf/Assertions.cpp: Check for 0 or empty format string in WTFLog() and WTFLogVerbose().
804
805 2011-05-02  Adam Barth  <abarth@webkit.org>
806
807         Reviewed by Alexey Proskuryakov.
808
809         StringImpl::endsWith has some insane code
810         https://bugs.webkit.org/show_bug.cgi?id=59900
811
812         * wtf/text/StringImpl.cpp:
813         (WTF::StringImpl::endsWith):
814             - m_data shadows a member variable of the same name.
815
816 2011-05-02  Gabor Loki  <loki@webkit.org>
817
818         Buildfix for ARM after r85448
819
820         * assembler/ARMAssembler.h:
821         (JSC::ARMAssembler::loadBranchTarget):
822
823 2011-05-01  Oliver Hunt  <oliver@apple.com>
824
825         Reviewed by Gavin Barraclough.
826
827         Strict-mode only reserved words not reserved
828         https://bugs.webkit.org/show_bug.cgi?id=55342
829
830         Fix line number tracking when we rollback the lexer.
831
832         * parser/JSParser.cpp:
833         (JSC::JSParser::parseSourceElements):
834
835 2011-05-01  Oliver Hunt  <oliver@apple.com>
836
837         Reviewed by Gavin Barraclough.
838
839         ES5 Strict mode does not allow getter and setter for same propId
840         https://bugs.webkit.org/show_bug.cgi?id=57295
841
842         Simplify and correct the logic for strict mode object literals.
843
844         * parser/JSParser.cpp:
845         (JSC::JSParser::parseStrictObjectLiteral):
846
847 2011-05-01  Oliver Hunt  <oliver@apple.com>
848
849         Reviewed by Gavin Barraclough.
850
851         Assigning to function identifier under strict should throw
852         https://bugs.webkit.org/show_bug.cgi?id=59289
853
854         Add logic to StaticScopeObject to ensure we don't silently consume
855         writes to constant properties.
856
857         * runtime/JSStaticScopeObject.cpp:
858         (JSC::JSStaticScopeObject::put):
859
860 2011-05-01  Gavin Barraclough  <barraclough@apple.com>
861
862         Reviewed by Sam Weinig.
863
864         https://bugs.webkit.org/show_bug.cgi?id=59903
865         Use AssemblerLabel throughout Assembler classes, AssemblerBuffer
866
867         Creating a lable() into the AssemblerBuffer should return an AssemblerLabel,
868         not an unsigned int.
869
870         * assembler/ARMAssembler.cpp:
871         (JSC::ARMAssembler::executableCopy):
872         * assembler/ARMAssembler.h:
873         (JSC::ARMAssembler::blx):
874         (JSC::ARMAssembler::label):
875         (JSC::ARMAssembler::loadBranchTarget):
876         * assembler/ARMv7Assembler.h:
877         (JSC::ARMv7Assembler::b):
878         (JSC::ARMv7Assembler::blx):
879         (JSC::ARMv7Assembler::bx):
880         (JSC::ARMv7Assembler::label):
881         (JSC::ARMv7Assembler::ARMInstructionFormatter::label):
882         * assembler/AssemblerBuffer.h:
883         (JSC::AssemblerBuffer::label):
884         * assembler/AssemblerBufferWithConstantPool.h:
885         * assembler/MIPSAssembler.h:
886         (JSC::MIPSAssembler::label):
887         (JSC::MIPSAssembler::relocateJumps):
888         * assembler/SH4Assembler.h:
889         (JSC::SH4Assembler::loadConstant):
890         (JSC::SH4Assembler::loadConstantUnReusable):
891         (JSC::SH4Assembler::call):
892         (JSC::SH4Assembler::jmp):
893         (JSC::SH4Assembler::jne):
894         (JSC::SH4Assembler::je):
895         (JSC::SH4Assembler::label):
896         (JSC::SH4Assembler::oneShortOp):
897         * assembler/X86Assembler.h:
898         (JSC::X86Assembler::call):
899         (JSC::X86Assembler::jmp_r):
900         (JSC::X86Assembler::label):
901         (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
902         (JSC::X86Assembler::X86InstructionFormatter::label):
903
904 2011-05-01  Adam Barth  <abarth@webkit.org>
905
906         Reviewed by David Levin.
907
908         Enable strict mode for OwnPtr and PassOwnPtr
909         https://bugs.webkit.org/show_bug.cgi?id=59428
910
911         * wtf/OwnPtr.h:
912
913 2011-05-01  Patrick Gansterer  <paroga@webkit.org>
914
915         Reviewed by Adam Barth.
916
917         Enable strict OwnPtr for PLATFORM(WIN)
918         https://bugs.webkit.org/show_bug.cgi?id=59881
919
920         * wtf/OwnPtr.h:
921
922 2011-05-01  Gavin Barraclough  <barraclough@apple.com>
923
924         Reviewed by Sam Weinig.
925
926         https://bugs.webkit.org/show_bug.cgi?id=59896
927         Remove JmpSrc/JmpDst types.
928
929         The JmpSrc/JmpDst classes predate the MacroAssembler interface. Having these
930         object be per-assembler in unhelpful, causes unnecessary code duplication,
931         and prevents the AssemblerBuffer from providing a richer type for labels.
932         The limited semantic meaning that they did convey is undermined by the manner
933         in which their meanings have been overloaded (use of JmpSrc for Call, JmpDst
934         for data labels).
935
936         Jumps on ARMv7 have had additional information added to the object via the
937         ARMv7 JmpSrc. This data should probably be in the instruction stream. This
938         patch does not fix the problem, and moves the data (ifdefed) to
939         AbstractMacroAssembler::Jump (which is effectively where it was before!).
940         This at least closes the hole such that no further data may be added to JmpSrc,
941         but this is unfortunate, and should be cleaned up.
942
943         * assembler/ARMAssembler.h:
944         (JSC::ARMAssembler::blx):
945         (JSC::ARMAssembler::label):
946         (JSC::ARMAssembler::align):
947         (JSC::ARMAssembler::loadBranchTarget):
948         (JSC::ARMAssembler::jmp):
949         (JSC::ARMAssembler::linkPointer):
950         (JSC::ARMAssembler::linkJump):
951         (JSC::ARMAssembler::linkCall):
952         (JSC::ARMAssembler::getRelocatedAddress):
953         (JSC::ARMAssembler::getDifferenceBetweenLabels):
954         (JSC::ARMAssembler::getCallReturnOffset):
955         * assembler/ARMv7Assembler.h:
956         (JSC::ARMv7Assembler::b):
957         (JSC::ARMv7Assembler::blx):
958         (JSC::ARMv7Assembler::bx):
959         (JSC::ARMv7Assembler::label):
960         (JSC::ARMv7Assembler::align):
961         (JSC::ARMv7Assembler::getRelocatedAddress):
962         (JSC::ARMv7Assembler::getDifferenceBetweenLabels):
963         (JSC::ARMv7Assembler::getCallReturnOffset):
964         (JSC::ARMv7Assembler::linkJump):
965         (JSC::ARMv7Assembler::linkCall):
966         (JSC::ARMv7Assembler::linkPointer):
967         * assembler/AbstractMacroAssembler.h:
968         (JSC::AbstractMacroAssembler::Label::isSet):
969         (JSC::AbstractMacroAssembler::Call::Call):
970         (JSC::AbstractMacroAssembler::Jump::Jump):
971         (JSC::AbstractMacroAssembler::Jump::link):
972         (JSC::AbstractMacroAssembler::Jump::linkTo):
973         (JSC::AbstractMacroAssembler::linkPointer):
974         (JSC::AbstractMacroAssembler::getLinkerAddress):
975         * assembler/AssemblerBuffer.h:
976         (JSC::AssemblerLabel::AssemblerLabel):
977         (JSC::AssemblerLabel::isSet):
978         * assembler/LinkBuffer.h:
979         (JSC::LinkBuffer::patch):
980         * assembler/MIPSAssembler.h:
981         (JSC::MIPSAssembler::label):
982         (JSC::MIPSAssembler::align):
983         (JSC::MIPSAssembler::getRelocatedAddress):
984         (JSC::MIPSAssembler::getDifferenceBetweenLabels):
985         (JSC::MIPSAssembler::getCallReturnOffset):
986         (JSC::MIPSAssembler::linkJump):
987         (JSC::MIPSAssembler::linkCall):
988         (JSC::MIPSAssembler::linkPointer):
989         * assembler/MacroAssemblerARMv7.h:
990         (JSC::MacroAssemblerARMv7::branchDouble):
991         (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
992         (JSC::MacroAssemblerARMv7::jump):
993         (JSC::MacroAssemblerARMv7::nearCall):
994         (JSC::MacroAssemblerARMv7::call):
995         (JSC::MacroAssemblerARMv7::ret):
996         (JSC::MacroAssemblerARMv7::tailRecursiveCall):
997         (JSC::MacroAssemblerARMv7::makeBranch):
998         * assembler/MacroAssemblerMIPS.h:
999         (JSC::MacroAssemblerMIPS::nearCall):
1000         (JSC::MacroAssemblerMIPS::call):
1001         (JSC::MacroAssemblerMIPS::tailRecursiveCall):
1002         (JSC::MacroAssemblerMIPS::branchTrue):
1003         (JSC::MacroAssemblerMIPS::branchFalse):
1004         (JSC::MacroAssemblerMIPS::branchEqual):
1005         (JSC::MacroAssemblerMIPS::branchNotEqual):
1006         * assembler/SH4Assembler.h:
1007         (JSC::SH4Assembler::call):
1008         (JSC::SH4Assembler::jmp):
1009         (JSC::SH4Assembler::jne):
1010         (JSC::SH4Assembler::je):
1011         (JSC::SH4Assembler::label):
1012         (JSC::SH4Assembler::align):
1013         (JSC::SH4Assembler::linkJump):
1014         (JSC::SH4Assembler::linkCall):
1015         (JSC::SH4Assembler::linkPointer):
1016         (JSC::SH4Assembler::getCallReturnOffset):
1017         (JSC::SH4Assembler::getRelocatedAddress):
1018         (JSC::SH4Assembler::getDifferenceBetweenLabels):
1019         (JSC::SH4Assembler::patchPointer):
1020         * assembler/X86Assembler.h:
1021         (JSC::X86Assembler::call):
1022         (JSC::X86Assembler::jmp):
1023         (JSC::X86Assembler::jmp_r):
1024         (JSC::X86Assembler::jne):
1025         (JSC::X86Assembler::jnz):
1026         (JSC::X86Assembler::je):
1027         (JSC::X86Assembler::jz):
1028         (JSC::X86Assembler::jl):
1029         (JSC::X86Assembler::jb):
1030         (JSC::X86Assembler::jle):
1031         (JSC::X86Assembler::jbe):
1032         (JSC::X86Assembler::jge):
1033         (JSC::X86Assembler::jg):
1034         (JSC::X86Assembler::ja):
1035         (JSC::X86Assembler::jae):
1036         (JSC::X86Assembler::jo):
1037         (JSC::X86Assembler::jp):
1038         (JSC::X86Assembler::js):
1039         (JSC::X86Assembler::jCC):
1040         (JSC::X86Assembler::label):
1041         (JSC::X86Assembler::labelFor):
1042         (JSC::X86Assembler::align):
1043         (JSC::X86Assembler::linkJump):
1044         (JSC::X86Assembler::linkCall):
1045         (JSC::X86Assembler::linkPointer):
1046         (JSC::X86Assembler::getCallReturnOffset):
1047         (JSC::X86Assembler::getRelocatedAddress):
1048         (JSC::X86Assembler::getDifferenceBetweenLabels):
1049         (JSC::X86Assembler::rewindToLabel):
1050         (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
1051         (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
1052         * jit/JIT.cpp:
1053         (JSC::JIT::privateCompileMainPass):
1054         * jit/JIT.h:
1055         * jit/JITInlineMethods.h:
1056         (JSC::JIT::atJumpTarget):
1057         (JSC::JIT::emitGetVirtualRegister):
1058         * jit/JITOpcodes.cpp:
1059         (JSC::JIT::emit_op_jmp):
1060         (JSC::JIT::emit_op_jfalse):
1061         (JSC::JIT::emit_op_jeq_null):
1062         (JSC::JIT::emit_op_jneq_null):
1063         (JSC::JIT::emit_op_jneq_ptr):
1064         (JSC::JIT::emit_op_jsr):
1065         (JSC::JIT::emit_op_jtrue):
1066         (JSC::JIT::emit_op_jmp_scopes):
1067
1068 2011-05-01  Chao-ying Fu  <fu@mips.com>
1069
1070         Reviewed by Eric Seidel.
1071
1072         Fix MIPS build due to the split of "Condition" enum
1073         https://bugs.webkit.org/show_bug.cgi?id=59407
1074
1075         * assembler/MIPSAssembler.h:
1076         (JSC::MIPSAssembler::debugOffset):
1077         * assembler/MacroAssemblerMIPS.h:
1078         (JSC::MacroAssemblerMIPS::branch32):
1079         (JSC::MacroAssemblerMIPS::compare32):
1080
1081 2011-04-30  Adam Barth  <abarth@webkit.org>
1082
1083         Reviewed by Adam Barth.
1084
1085         Enable strict OwnPtr for GTK
1086         https://bugs.webkit.org/show_bug.cgi?id=59861
1087
1088         * wtf/OwnPtr.h:
1089
1090 2011-04-30  Gavin Barraclough  <barraclough@apple.com>
1091
1092         ARMv7 build fix.
1093
1094         * assembler/AssemblerBufferWithConstantPool.h:
1095
1096 2011-04-30  Gavin Barraclough  <barraclough@apple.com>
1097
1098         Reviewed by Oliver Hunt.
1099
1100         Bug 59869 - AssemblerBuffer cleanup - disambiguate size()
1101
1102         The method size() is called on the AssemblerBuffer both to acquire
1103         the complete size of the code, and to get a position to use as a
1104         label into the code. Instead, add an explicit 'label' method.
1105
1106         * assembler/ARMAssembler.cpp:
1107         (JSC::ARMAssembler::executableCopy):
1108         * assembler/ARMAssembler.h:
1109         (JSC::ARMAssembler::blx):
1110         (JSC::ARMAssembler::codeSize):
1111         (JSC::ARMAssembler::label):
1112         (JSC::ARMAssembler::loadBranchTarget):
1113         * assembler/ARMv7Assembler.h:
1114         (JSC::ARMv7Assembler::b):
1115         (JSC::ARMv7Assembler::blx):
1116         (JSC::ARMv7Assembler::bx):
1117         (JSC::ARMv7Assembler::label):
1118         (JSC::ARMv7Assembler::codeSize):
1119         (JSC::ARMv7Assembler::ARMInstructionFormatter::codeSize):
1120         (JSC::ARMv7Assembler::ARMInstructionFormatter::data):
1121         * assembler/AbstractMacroAssembler.h:
1122         * assembler/AssemblerBuffer.h:
1123         (JSC::AssemblerBuffer::codeSize):
1124         (JSC::AssemblerBuffer::label):
1125         * assembler/AssemblerBufferWithConstantPool.h:
1126         * assembler/LinkBuffer.h:
1127         (JSC::LinkBuffer::LinkBuffer):
1128         (JSC::LinkBuffer::linkCode):
1129         * assembler/MIPSAssembler.h:
1130         (JSC::MIPSAssembler::newJmpSrc):
1131         (JSC::MIPSAssembler::appendJump):
1132         (JSC::MIPSAssembler::label):
1133         (JSC::MIPSAssembler::codeSize):
1134         (JSC::MIPSAssembler::relocateJumps):
1135         * assembler/SH4Assembler.h:
1136         (JSC::SH4Assembler::loadConstant):
1137         (JSC::SH4Assembler::loadConstantUnReusable):
1138         (JSC::SH4Assembler::call):
1139         (JSC::SH4Assembler::jmp):
1140         (JSC::SH4Assembler::jne):
1141         (JSC::SH4Assembler::je):
1142         (JSC::SH4Assembler::label):
1143         (JSC::SH4Assembler::executableCopy):
1144         (JSC::SH4Assembler::oneShortOp):
1145         (JSC::SH4Assembler::codeSize):
1146         * assembler/X86Assembler.h:
1147         (JSC::X86Assembler::call):
1148         (JSC::X86Assembler::jmp_r):
1149         (JSC::X86Assembler::codeSize):
1150         (JSC::X86Assembler::label):
1151         (JSC::X86Assembler::executableCopy):
1152         (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
1153         (JSC::X86Assembler::X86InstructionFormatter::codeSize):
1154         (JSC::X86Assembler::X86InstructionFormatter::label):
1155         (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
1156         * dfg/DFGJITCompiler.cpp:
1157         (JSC::DFG::JITCompiler::compileFunction):
1158         * jit/JIT.cpp:
1159         (JSC::JIT::privateCompile):
1160         * jit/JITOpcodes.cpp:
1161         (JSC::JIT::privateCompileCTIMachineTrampolines):
1162         * jit/JITOpcodes32_64.cpp:
1163         (JSC::JIT::privateCompileCTIMachineTrampolines):
1164         * yarr/YarrJIT.cpp:
1165         (JSC::Yarr::YarrGenerator::compile):
1166
1167 2011-04-29  Adam Barth  <abarth@webkit.org>
1168
1169         Attempt to fix the Windows build.
1170
1171         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1172
1173 2011-04-29  Adam Barth  <abarth@webkit.org>
1174
1175         Reviewed by Eric Seidel.
1176
1177         CSP script-src should block eval
1178         https://bugs.webkit.org/show_bug.cgi?id=59850
1179
1180         ggaren recommend a different approach to this patch, essentially
1181         installing a new function for function-eval and changing the AST
1182         representation of operator-eval to call function-eval.  However, I'm
1183         not sure that approach is workable because the ASTBuilder doesn't know
1184         about global objects, and there is added complication due to the cache.
1185
1186         This approach is more dynamic, adding a branch in EvalExecutable to
1187         detect whether eval is current disabled in the lexical scope.  The spec
1188         is slightly unclear about whether we should return undefined or throw
1189         an exception.  I've asked Brandon to clarify the spec, but throwing an
1190         exception seems natural.
1191
1192         * JavaScriptCore.exp:
1193         * runtime/Executable.cpp:
1194         (JSC::EvalExecutable::compileInternal):
1195         * runtime/JSGlobalObject.cpp:
1196         (JSC::JSGlobalObject::disableEval):
1197         * runtime/JSGlobalObject.h:
1198         (JSC::JSGlobalObject::JSGlobalObject):
1199         (JSC::JSGlobalObject::isEvalEnabled):
1200
1201 2011-04-29  Gavin Barraclough  <barraclough@apple.com>
1202
1203         Reviewed by Oliver Hunt.
1204
1205         https://bugs.webkit.org/show_bug.cgi?id=59847
1206         Remove linkOffset from LinkBuffer
1207
1208         This is redundant since removal of recompilation for exception info.
1209
1210         * assembler/LinkBuffer.h:
1211         (JSC::LinkBuffer::LinkBuffer):
1212         (JSC::LinkBuffer::linkCode):
1213         * dfg/DFGJITCompiler.cpp:
1214         (JSC::DFG::JITCompiler::compileFunction):
1215         * jit/JIT.cpp:
1216         (JSC::JIT::JIT):
1217         (JSC::JIT::privateCompile):
1218         * jit/JIT.h:
1219         (JSC::JIT::compile):
1220         (JSC::JIT::compileCTIMachineTrampolines):
1221         (JSC::JIT::compileCTINativeCall):
1222         * jit/JITOpcodes.cpp:
1223         (JSC::JIT::privateCompileCTIMachineTrampolines):
1224         * jit/JITOpcodes32_64.cpp:
1225         (JSC::JIT::privateCompileCTIMachineTrampolines):
1226         (JSC::JIT::privateCompileCTINativeCall):
1227         * jit/JITPropertyAccess.cpp:
1228         (JSC::JIT::stringGetByValStubGenerator):
1229         (JSC::JIT::privateCompilePutByIdTransition):
1230         (JSC::JIT::privateCompilePatchGetArrayLength):
1231         (JSC::JIT::privateCompileGetByIdProto):
1232         (JSC::JIT::privateCompileGetByIdSelfList):
1233         (JSC::JIT::privateCompileGetByIdProtoList):
1234         (JSC::JIT::privateCompileGetByIdChainList):
1235         (JSC::JIT::privateCompileGetByIdChain):
1236         * jit/JITPropertyAccess32_64.cpp:
1237         (JSC::JIT::stringGetByValStubGenerator):
1238         (JSC::JIT::privateCompilePutByIdTransition):
1239         (JSC::JIT::privateCompilePatchGetArrayLength):
1240         (JSC::JIT::privateCompileGetByIdProto):
1241         (JSC::JIT::privateCompileGetByIdSelfList):
1242         (JSC::JIT::privateCompileGetByIdProtoList):
1243         (JSC::JIT::privateCompileGetByIdChainList):
1244         (JSC::JIT::privateCompileGetByIdChain):
1245         * jit/SpecializedThunkJIT.h:
1246         (JSC::SpecializedThunkJIT::finalize):
1247         * yarr/YarrJIT.cpp:
1248         (JSC::Yarr::YarrGenerator::compile):
1249
1250 2011-04-29  Gavin Barraclough  <barraclough@apple.com>
1251
1252         Reviewed by Oliver Hunt & Geoff Garen.
1253
1254         https://bugs.webkit.org/show_bug.cgi?id=59221
1255         [RegexFuzz] Regression blocking testing
1256
1257         Okay, so the bug here is that when, in the case of a TypeParentheticalAssertion
1258         node, emitDisjunction recursively calls to itself to emit the nested disjunction
1259         the value of parenthesesInputCountAlreadyChecked is bogus (doesn't take into
1260         account the uncheck that has just taken place).
1261
1262         Also, the special handling given to countToCheck in the case of parenthetical
1263         assertions is nonsense, delete it, along with the isParentheticalAssertion argument.
1264
1265         * yarr/YarrInterpreter.cpp:
1266         (JSC::Yarr::ByteCompiler::emitDisjunction):
1267
1268 2011-04-29  Csaba Osztrogonác  <ossy@webkit.org>
1269
1270         Reviewed by Adam Barth.
1271
1272         Enable strict OwnPtr for Qt
1273         https://bugs.webkit.org/show_bug.cgi?id=59667
1274
1275         * wtf/OwnPtr.h:
1276
1277 2011-04-29  Dean Jackson  <dino@apple.com>
1278
1279         Reviewed by Simon Fraser.
1280
1281         Add ENABLE macro for WebKitAnimation
1282         https://bugs.webkit.org/show_bug.cgi?id=59729
1283
1284         Add new feature to toggle WebKit Animation API.
1285
1286         * Configurations/FeatureDefines.xcconfig:
1287
1288 2011-04-28  Sam Weinig  <sam@webkit.org>
1289
1290         Reviewed by Mark Rowe.
1291
1292         Install testapi.js along side testapi
1293         https://bugs.webkit.org/show_bug.cgi?id=59773
1294
1295         * JavaScriptCore.xcodeproj/project.pbxproj:
1296         Add new build phase to copy testapi.js to install path of testapi
1297         on install.
1298
1299 2011-04-28  David Levin  <levin@chromium.org>
1300
1301         Reviewed by Adam Barth.
1302
1303         Remove IMAGE_RESIZER related code.
1304         https://bugs.webkit.org/show_bug.cgi?id=59735
1305
1306         * Configurations/FeatureDefines.xcconfig:
1307
1308 2011-04-28  Gavin Barraclough  <barraclough@apple.com>
1309
1310         Reviewed by Oliver Hunt.
1311
1312         https://bugs.webkit.org/show_bug.cgi?id=59763
1313         DFG JIT - Unify FPRReg & FPRegisterID
1314
1315         (Following on from GPRReg/RegisterID unification).
1316
1317         * dfg/DFGFPRInfo.h:
1318         (JSC::DFG::FPRInfo::toRegister):
1319         (JSC::DFG::FPRInfo::debugName):
1320         * dfg/DFGGPRInfo.h:
1321         * dfg/DFGJITCodeGenerator.cpp:
1322         (JSC::DFG::JITCodeGenerator::fillDouble):
1323         (JSC::DFG::JITCodeGenerator::checkConsistency):
1324         * dfg/DFGJITCodeGenerator.h:
1325         (JSC::DFG::JITCodeGenerator::boxDouble):
1326         (JSC::DFG::JITCodeGenerator::unboxDouble):
1327         (JSC::DFG::JITCodeGenerator::flushRegisters):
1328         (JSC::DFG::JITCodeGenerator::isFlushed):
1329         (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
1330         (JSC::DFG::JITCodeGenerator::setupStubArguments):
1331         (JSC::DFG::JITCodeGenerator::callOperation):
1332         (JSC::DFG::GPRResult::lockedResult):
1333         (JSC::DFG::FPRResult::lockedResult):
1334         * dfg/DFGJITCompiler.cpp:
1335         (JSC::DFG::JITCompiler::fillNumericToDouble):
1336         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
1337         (JSC::DFG::JITCompiler::compileFunction):
1338         * dfg/DFGJITCompiler.h:
1339         * dfg/DFGNode.h:
1340         * dfg/DFGNonSpeculativeJIT.cpp:
1341         (JSC::DFG::EntryLocation::EntryLocation):
1342         (JSC::DFG::NonSpeculativeJIT::valueToNumber):
1343         (JSC::DFG::NonSpeculativeJIT::valueToInt32):
1344         (JSC::DFG::NonSpeculativeJIT::numberToInt32):
1345         (JSC::DFG::NonSpeculativeJIT::compile):
1346         * dfg/DFGNonSpeculativeJIT.h:
1347         (JSC::DFG::NonSpeculativeJIT::silentSpillAllRegisters):
1348         (JSC::DFG::NonSpeculativeJIT::silentFillAllRegisters):
1349         * dfg/DFGRegisterBank.h:
1350         (JSC::DFG::RegisterBank::iterator::regID):
1351         (JSC::DFG::RegisterBank::iterator::debugName):
1352         * dfg/DFGSpeculativeJIT.cpp:
1353         (JSC::DFG::SpeculationCheck::SpeculationCheck):
1354         (JSC::DFG::SpeculativeJIT::compile):
1355         * dfg/DFGSpeculativeJIT.h:
1356
1357 2011-04-28  David Kilzer  <ddkilzer@apple.com>
1358
1359         Revert "<http://webkit.org/b/59705> WTF::postTimer() leaks a CFRunLoopTimerRef every time it's called"
1360
1361         This reverts commit r85195.  It was crashing DumpRenderTree on Lion.
1362
1363         * wtf/mac/MainThreadMac.mm:
1364         (WTF::postTimer):
1365
1366 2011-04-28  Adam Barth  <abarth@webkit.org>
1367
1368         Reviewed by Eric Seidel.
1369
1370         Remove WML
1371         https://bugs.webkit.org/show_bug.cgi?id=59678
1372
1373         Remove the WML configuration option from the Mac build system.
1374
1375         * Configurations/FeatureDefines.xcconfig:
1376
1377 2011-04-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1378
1379         Unreviewed, rolling out r85233 and r85235.
1380         http://trac.webkit.org/changeset/85233
1381         http://trac.webkit.org/changeset/85235
1382         https://bugs.webkit.org/show_bug.cgi?id=59754
1383
1384         Causes issues with jsc. (Requested by dave_levin on #webkit).
1385
1386         * GNUmakefile.list.am:
1387         * JavaScriptCore.gypi:
1388         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1389         * JavaScriptCore.xcodeproj/project.pbxproj:
1390         * jit/ExecutableAllocator.h:
1391         (JSC::ExecutablePool::ExecutablePool):
1392         * parser/SourceProvider.h:
1393         (JSC::SourceProvider::SourceProvider):
1394         * runtime/RegExp.cpp:
1395         (JSC::RegExp::RegExp):
1396         * wtf/CMakeLists.txt:
1397         * wtf/RefCounted.h:
1398         (WTF::RefCountedBase::ref):
1399         (WTF::RefCountedBase::hasOneRef):
1400         (WTF::RefCountedBase::refCount):
1401         (WTF::RefCountedBase::derefBase):
1402         * wtf/SizeLimits.cpp:
1403         * wtf/ThreadRestrictionVerifier.h: Removed.
1404         * wtf/text/CString.h:
1405         (WTF::CStringBuffer::CStringBuffer):
1406
1407 2011-04-28  Gavin Barraclough  <barraclough@apple.com>
1408
1409         Reviewed by Oliver Hunt.
1410
1411         Bug 59740 - DFG JIT - Unify GPRReg & RegisterID
1412
1413         Currently we use a mix of enum values throughout the DFG JIT to  represent
1414         gpr registers - the RegisterID provided by the MacroAssembler, and the
1415         GPRReg enum giving the sequential register set over which the RegisterBank
1416         allocates. Unify the two.
1417
1418         Patch to unify FPRReg in a similar fashion will follow.
1419
1420         * JavaScriptCore.xcodeproj/project.pbxproj:
1421         * dfg/DFGFPRInfo.h: Added.
1422         (JSC::DFG::next):
1423         (JSC::DFG::FPRBankInfo::toRegister):
1424         (JSC::DFG::FPRBankInfo::toIndex):
1425         * dfg/DFGGPRInfo.h: Added.
1426         (JSC::DFG::GPRInfo::toRegister):
1427         (JSC::DFG::GPRInfo::toIndex):
1428         (JSC::DFG::GPRInfo::debugName):
1429         * dfg/DFGJITCodeGenerator.cpp:
1430         (JSC::DFG::JITCodeGenerator::fillInteger):
1431         (JSC::DFG::JITCodeGenerator::fillDouble):
1432         (JSC::DFG::JITCodeGenerator::fillJSValue):
1433         (JSC::DFG::JITCodeGenerator::dump):
1434         (JSC::DFG::JITCodeGenerator::checkConsistency):
1435         (JSC::DFG::GPRTemporary::GPRTemporary):
1436         (JSC::DFG::FPRTemporary::FPRTemporary):
1437         * dfg/DFGJITCodeGenerator.h:
1438         (JSC::DFG::JITCodeGenerator::boxDouble):
1439         (JSC::DFG::JITCodeGenerator::unboxDouble):
1440         (JSC::DFG::JITCodeGenerator::spill):
1441         (JSC::DFG::JITCodeGenerator::flushRegisters):
1442         (JSC::DFG::JITCodeGenerator::isFlushed):
1443         (JSC::DFG::JITCodeGenerator::bitOp):
1444         (JSC::DFG::JITCodeGenerator::shiftOp):
1445         (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
1446         (JSC::DFG::JITCodeGenerator::setupStubArguments):
1447         (JSC::DFG::JITCodeGenerator::callOperation):
1448         (JSC::DFG::IntegerOperand::gpr):
1449         (JSC::DFG::DoubleOperand::gpr):
1450         (JSC::DFG::GPRTemporary::gpr):
1451         (JSC::DFG::FPRTemporary::gpr):
1452         (JSC::DFG::GPRResult::lockedResult):
1453         * dfg/DFGJITCompiler.cpp:
1454         (JSC::DFG::JITCompiler::fillNumericToDouble):
1455         (JSC::DFG::JITCompiler::fillInt32ToInteger):
1456         (JSC::DFG::JITCompiler::fillToJS):
1457         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
1458         (JSC::DFG::JITCompiler::compileFunction):
1459         (JSC::DFG::JITCompiler::jitAssertIsInt32):
1460         (JSC::DFG::JITCompiler::jitAssertIsJSInt32):
1461         (JSC::DFG::JITCompiler::jitAssertIsJSNumber):
1462         (JSC::DFG::JITCompiler::jitAssertIsJSDouble):
1463         * dfg/DFGJITCompiler.h:
1464         (JSC::DFG::JITCompiler::preserveReturnAddressAfterCall):
1465         (JSC::DFG::JITCompiler::restoreReturnAddressBeforeReturn):
1466         (JSC::DFG::JITCompiler::emitGetFromCallFrameHeaderPtr):
1467         (JSC::DFG::JITCompiler::emitPutToCallFrameHeader):
1468         (JSC::DFG::JITCompiler::emitPutImmediateToCallFrameHeader):
1469         (JSC::DFG::JITCompiler::addressForGlobalVar):
1470         (JSC::DFG::JITCompiler::addressFor):
1471         (JSC::DFG::JITCompiler::tagFor):
1472         (JSC::DFG::JITCompiler::payloadFor):
1473         * dfg/DFGNonSpeculativeJIT.cpp:
1474         (JSC::DFG::EntryLocation::EntryLocation):
1475         (JSC::DFG::NonSpeculativeJIT::valueToNumber):
1476         (JSC::DFG::NonSpeculativeJIT::valueToInt32):
1477         (JSC::DFG::NonSpeculativeJIT::numberToInt32):
1478         (JSC::DFG::NonSpeculativeJIT::compile):
1479         * dfg/DFGNonSpeculativeJIT.h:
1480         (JSC::DFG::NonSpeculativeJIT::silentSpillGPR):
1481         (JSC::DFG::NonSpeculativeJIT::silentSpillFPR):
1482         (JSC::DFG::NonSpeculativeJIT::silentFillGPR):
1483         (JSC::DFG::NonSpeculativeJIT::silentFillFPR):
1484         (JSC::DFG::NonSpeculativeJIT::silentSpillAllRegisters):
1485         (JSC::DFG::NonSpeculativeJIT::silentFillAllRegisters):
1486         * dfg/DFGRegisterBank.h:
1487         (JSC::DFG::RegisterBank::allocate):
1488         (JSC::DFG::RegisterBank::retain):
1489         (JSC::DFG::RegisterBank::release):
1490         (JSC::DFG::RegisterBank::lock):
1491         (JSC::DFG::RegisterBank::unlock):
1492         (JSC::DFG::RegisterBank::isLocked):
1493         (JSC::DFG::RegisterBank::name):
1494         (JSC::DFG::RegisterBank::iterator::name):
1495         (JSC::DFG::RegisterBank::iterator::isLocked):
1496         (JSC::DFG::RegisterBank::iterator::release):
1497         (JSC::DFG::RegisterBank::iterator::gpr):
1498         (JSC::DFG::RegisterBank::iterator::debugName):
1499         (JSC::DFG::RegisterBank::iterator::operator++):
1500         (JSC::DFG::RegisterBank::iterator::operator!=):
1501         (JSC::DFG::RegisterBank::iterator::index):
1502         (JSC::DFG::RegisterBank::iterator::iterator):
1503         (JSC::DFG::RegisterBank::begin):
1504         (JSC::DFG::RegisterBank::end):
1505         (JSC::DFG::RegisterBank::isLockedAtIndex):
1506         (JSC::DFG::RegisterBank::nameAtIndex):
1507         (JSC::DFG::RegisterBank::releaseAtIndex):
1508         (JSC::DFG::RegisterBank::allocateInternal):
1509         (JSC::DFG::RegisterBank::MapEntry::MapEntry):
1510         * dfg/DFGScoreBoard.h:
1511         (JSC::DFG::ScoreBoard::~ScoreBoard):
1512         * dfg/DFGSpeculativeJIT.cpp:
1513         (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
1514         (JSC::DFG::SpeculationCheck::SpeculationCheck):
1515         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
1516         (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
1517         (JSC::DFG::SpeculativeJIT::compile):
1518         (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
1519         (JSC::DFG::SpeculativeJIT::initializeVariableTypes):
1520         * dfg/DFGSpeculativeJIT.h:
1521         (JSC::DFG::SpeculateIntegerOperand::gpr):
1522
1523 2011-04-28  Oliver Hunt  <oliver@apple.com>
1524
1525         Reviewed by Gavin Barraclough.
1526
1527         Remove evil addressOfStructure() function
1528         https://bugs.webkit.org/show_bug.cgi?id=59739
1529
1530         Remove the addressOfStructure function from JSCell, and update
1531         callsites to use the same logic as testPrototype()
1532
1533         * jit/JITPropertyAccess.cpp:
1534         (JSC::JIT::privateCompileGetByIdProto):
1535         (JSC::JIT::privateCompileGetByIdProtoList):
1536         * jit/JITPropertyAccess32_64.cpp:
1537         (JSC::JIT::privateCompileGetByIdProto):
1538         (JSC::JIT::privateCompileGetByIdProtoList):
1539         * runtime/JSCell.h:
1540
1541 2011-04-28  Oliver Hunt  <oliver@apple.com>
1542
1543         Reviewed by Gavin Barraclough.
1544
1545         Clean up testPrototype()
1546         https://bugs.webkit.org/show_bug.cgi?id=59734
1547
1548         Remove direct pointer to the inside of a GC object and just do
1549         the indirect load manually.  Doesn't effect sunspider but does
1550         clean up the code quite a bit, and simplifies the handling of
1551         GC values.
1552
1553         * jit/JITPropertyAccess.cpp:
1554         (JSC::JIT::testPrototype):
1555
1556 2011-04-28  David Levin  <levin@chromium.org>
1557
1558         Build fix.
1559
1560         * wtf/RefCounted.h: Fix inverted ifdef.
1561
1562 2011-04-07  David Levin  <levin@chromium.org>
1563
1564         Reviewed by Darin Adler.
1565
1566         Add asserts to RefCounted to make sure ref/deref happens on the right thread.
1567         https://bugs.webkit.org/show_bug.cgi?id=31639
1568
1569         * GNUmakefile.list.am: Added new files to the build.
1570         * JavaScriptCore.gypi: Ditto.
1571         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
1572         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
1573         * jit/ExecutableAllocator.h:
1574         (JSC::ExecutablePool::ExecutablePool): Turned off checks for this
1575         due to not being able to figure out what was guarding it (bug 58091).
1576         * parser/SourceProvider.h:
1577         (JSC::SourceProvider::SourceProvider): Ditto.
1578         * runtime/RegExp.cpp:
1579         (JSC::RegExp::RegExp): Ditto.
1580         * wtf/CMakeLists.txt: Added new files to the build.
1581         * wtf/ThreadRestrictionVerifier.h: Added.
1582         Everything is done in the header to avoid the issue with exports
1583         that are only useful in debug but still needing to export them.
1584         * wtf/RefCounted.h:
1585         (WTF::RefCountedBase::ref): Added checks using the non thread safe verifier.
1586         and filed bug 58171 about making it stricter.
1587         (WTF::RefCountedBase::hasOneRef): Ditto.
1588         (WTF::RefCountedBase::refCount): Ditto.
1589         (WTF::RefCountedBase::setMutexForVerifier): Expose a way to change the checks to be based
1590         on a mutex. This is in the header to avoid adding more exports from JavaScriptCore.
1591         (WTF::RefCountedBase::deprecatedTurnOffVerifier): Temporary way to turn off verification.
1592         Filed bug 58174 to remove this method.
1593         (WTF::RefCountedBase::derefBase):
1594         * wtf/SizeLimits.cpp: Adjusted the debug size check for RefCounted.
1595         * wtf/text/CString.h:
1596         (WTF::CStringBuffer::CStringBuffer): Turned off checks for this while a fix is being
1597         done in Chromium's test_shell (bug 58093).
1598
1599 2011-04-28  Xan Lopez  <xlopez@igalia.com>
1600
1601         Unreviewed attempt to fix the build.
1602
1603         * GNUmakefile.am: add -lpthread.
1604
1605 2011-04-28  Oliver Hunt  <oliver@apple.com>
1606
1607         Reviewed by Gavin Barraclough.
1608
1609         Only need a single implementation of testPrototype
1610         https://bugs.webkit.org/show_bug.cgi?id=59724
1611
1612         Remove excess copy of identical testPrototype() code
1613
1614         * jit/JITPropertyAccess.cpp:
1615         (JSC::JIT::testPrototype):
1616         * jit/JITPropertyAccess32_64.cpp:
1617
1618 2011-04-28  Xan Lopez  <xlopez@igalia.com>
1619
1620         Reviewed by Martin Robinson.
1621
1622         [Gtk] Split JSC and WebCore builds
1623         https://bugs.webkit.org/show_bug.cgi?id=19428
1624
1625         Build JavaScriptCore as a libtool shared library instead of a
1626         private convenience library.
1627
1628         * GNUmakefile.am: define new jsc library and adapt to new name for
1629         javascriptcore target.
1630         * GNUmakefile.list.am: ditto.
1631
1632 2011-04-28  David Kilzer  <ddkilzer@apple.com>
1633
1634         <http://webkit.org/b/59705> WTF::postTimer() leaks a CFRunLoopTimerRef every time it's called
1635
1636         Reviewed by Simon Fraser.
1637
1638         * wtf/mac/MainThreadMac.mm:
1639         (WTF::postTimer): Use RetainPtr to plug the leak.
1640
1641 2011-04-27  Sam Weinig  <sam@webkit.org>
1642
1643         Reviewed by David Kilzer.
1644
1645         Add way to install testapi in production builds
1646         https://bugs.webkit.org/show_bug.cgi?id=59674
1647
1648         * Configurations/TestAPI.xcconfig: Copied from Configurations/JavaScriptCore.xcconfig.
1649         Add configuration file for TestAPI. In addition to name, we now specify an install path
1650         and allow SKIP_INSTALL to be overridden by setting FORCE_TOOL_INSTALL.
1651
1652         * JavaScriptCore.xcodeproj/project.pbxproj:
1653         Remove in-project build settings and add missing configuration files. Added missing CompilerVersion.xcconfig
1654         file.
1655
1656 2011-04-27  Adam Barth  <abarth@webkit.org>
1657
1658         Reviewed by David Levin.
1659
1660         Enable strict OwnPtrs for Chromium
1661         https://bugs.webkit.org/show_bug.cgi?id=59666
1662
1663         * wtf/OwnPtr.h:
1664
1665 2011-04-27  Oliver Hunt  <oliver@apple.com>
1666
1667         Reviewed by Geoffrey Garen.
1668
1669         Add ability to remove keys from weakmap API
1670         https://bugs.webkit.org/show_bug.cgi?id=59645
1671
1672         Add JSWeakObjectMapRemove API
1673
1674         * API/JSWeakObjectMapRefPrivate.cpp:
1675         * API/JSWeakObjectMapRefPrivate.h:
1676         * JavaScriptCore.exp:
1677
1678 2011-04-27  Adam Barth  <abarth@webkit.org>
1679
1680         Reviewed by David Levin.
1681
1682         Enable strict mode for OwnPtr
1683         https://bugs.webkit.org/show_bug.cgi?id=59428
1684
1685         This patch enables strict mode for OwnPtr on PLATFORM(MAC) only.
1686
1687         * wtf/OwnPtr.h:
1688
1689 2011-04-27  Steve Block  <steveblock@google.com>
1690
1691         Reviewed by David Levin.
1692
1693         Remove Android build system
1694         https://bugs.webkit.org/show_bug.cgi?id=48111
1695
1696         This is to avoid the maintenance burden until the Android port is
1697         fully upstreamed.
1698
1699         * Android.mk: Removed.
1700         * Android.v8.wtf.mk: Removed.
1701
1702 2011-04-27  Mark Rowe  <mrowe@apple.com>
1703
1704         Fix 32-bit build after r85036.
1705
1706         * wtf/Platform.h: USE(PLUGIN_HOST_PROCESS) is only true for 64-bit.
1707
1708 2011-04-27  Csaba Osztrogonác  <ossy@webkit.org>
1709
1710         Unreviewed buildfix after r85036.
1711
1712         Readd non-dead code.
1713
1714         * wtf/OSAllocatorPosix.cpp:
1715         (WTF::OSAllocator::reserveAndCommit):
1716
1717 2011-04-27  Adam Barth  <abarth@webkit.org>
1718
1719         Reviewed by Kenneth Russell.
1720
1721         OwnPtr assignment operator should be private
1722         https://bugs.webkit.org/show_bug.cgi?id=59487
1723
1724         Unfortunately we can't remove the copy constructor because of some
1725         detail about gcc.  (The issue is documented in a comment already.)
1726
1727         * wtf/OwnPtr.h:
1728
1729 2011-04-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1730
1731         Unreviewed, rolling out r84977.
1732         http://trac.webkit.org/changeset/84977
1733         https://bugs.webkit.org/show_bug.cgi?id=59568
1734
1735         caused crashes on the SL WK2 bots (Requested by jessieberlin
1736         on #webkit).
1737
1738         * assembler/MacroAssemblerX86_64.h:
1739         (JSC::MacroAssemblerX86_64::call):
1740         (JSC::MacroAssemblerX86_64::tailRecursiveCall):
1741         (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
1742
1743 2011-04-26  Kevin Ollivier  <kevino@theolliviers.com>
1744
1745         Rubberstamped by Eric Seidel.
1746
1747         Enable waf to be used to build other ports
1748         https://bugs.webkit.org/show_bug.cgi?id=58213
1749
1750         * wscript:
1751
1752 2011-04-26  Sam Weinig  <sam@webkit.org>
1753
1754         Reviewed by David Hyatt.
1755
1756         Remove Datagrid from the tree
1757         https://bugs.webkit.org/show_bug.cgi?id=59543
1758
1759         * Configurations/FeatureDefines.xcconfig:
1760         Remove feature.
1761
1762 2011-04-26  Adrienne Walker  <enne@google.com>
1763
1764         Reviewed by Geoffrey Garen.
1765
1766         Fix incorrect use of OwnPtr<T*> in GCActivityCallback
1767         https://bugs.webkit.org/show_bug.cgi?id=59559
1768
1769         * runtime/GCActivityCallback.h:
1770
1771 2011-04-26  Xan Lopez  <xlopez@igalia.com>
1772
1773         Reviewed by Daniel Bates.
1774
1775         Unused but set variable warning in MacroAssembelX86_64
1776         https://bugs.webkit.org/show_bug.cgi?id=59482
1777
1778         * assembler/MacroAssemblerX86_64.h:
1779         (JSC::MacroAssemblerX86_64::call): do not declare the label
1780         variable if we are not going to use it.
1781         (JSC::MacroAssemblerX86_64::tailRecursiveCall): ditto.
1782         (JSC::MacroAssemblerX86_64::makeTailRecursiveCall): ditto.
1783
1784 2011-04-26  Dan Bernstein  <mitz@apple.com>
1785
1786         Reviewed by Mark Rowe.
1787
1788         Choose the compiler based on the Xcode version for Snow Leopard debug builds.
1789
1790         * Configurations/Base.xcconfig:
1791         * Configurations/CompilerVersion.xcconfig: Added.
1792
1793 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
1794
1795         Reviewed by Oliver Hunt.
1796
1797         Nixed special finalizer handling for WebCore strings
1798         https://bugs.webkit.org/show_bug.cgi?id=59425
1799         
1800         SunSpider reports no change.
1801         
1802         Not needed anymore, since weak handles have finalizers.
1803
1804         * runtime/JSString.cpp:
1805         (JSC::JSString::resolveRope):
1806         (JSC::JSString::resolveRopeSlowCase):
1807         (JSC::JSString::outOfMemory):
1808         (JSC::JSString::substringFromRope):
1809         (JSC::JSString::replaceCharacter): Updated for removal of union.
1810
1811         * runtime/JSString.h:
1812         (JSC::RopeBuilder::JSString):
1813         (JSC::RopeBuilder::~JSString):
1814         (JSC::RopeBuilder::appendStringInConstruct):
1815         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): No need for
1816         union or special constructor anymore.
1817
1818 2011-04-26  Gabor Loki  <loki@webkit.org>
1819
1820         Reviewed by Csaba Osztrogonác.
1821
1822         Speeding up SVG filters with multicore (SMP) support
1823         https://bugs.webkit.org/show_bug.cgi?id=43903
1824
1825         Some SVG filters execute a huge number of pixel manipulations, which
1826         cannot be sped up by graphics accelerators, since their algorithm is
1827         too complex. Using the power of Symmetric Multi Processing (SMP) we
1828         can split up a task to smaller (data independent) tasks, which can be
1829         executed independently.
1830
1831         The ParallelJobs framework provides a simple way for distributed
1832         programming. The framework is based on WebKit's threading infrastructure,
1833         Open Multi-Processing's (OpenMP) API, and libdispatch API.
1834
1835         * GNUmakefile.list.am:
1836         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1837         * JavaScriptCore.xcodeproj/project.pbxproj:
1838         * wtf/CMakeLists.txt:
1839         * wtf/ParallelJobs.h: Added.
1840         (WTF::ParallelJobs::ParallelJobs):
1841         (WTF::ParallelJobs::numberOfJobs):
1842         (WTF::ParallelJobs::parameterForJob):
1843         (WTF::ParallelJobs::executeJobs):
1844         * wtf/ParallelJobsGeneric.cpp: Added.
1845         (WTF::ParallelEnvironment::ThreadPrivate::tryLockFor):
1846         (WTF::ParallelEnvironment::ThreadPrivate::executeJob):
1847         (WTF::ParallelEnvironment::ThreadPrivate::waitForFinish):
1848         (WTF::ParallelEnvironment::ThreadPrivate::workerThread):
1849         * wtf/ParallelJobsGeneric.h: Added.
1850         (WTF::ParallelEnvironment::ParallelEnvironment):
1851         (WTF::ParallelEnvironment::numberOfJobs):
1852         (WTF::ParallelEnvironment::parameterForJob):
1853         (WTF::ParallelEnvironment::executeJobs):
1854         (WTF::ParallelEnvironment::ThreadPrivate::ThreadPrivate):
1855         (WTF::ParallelEnvironment::ThreadPrivate::create):
1856         * wtf/ParallelJobsLibdispatch.h: Added.
1857         (WTF::ParallelEnvironment::ParallelEnvironment):
1858         (WTF::ParallelEnvironment::numberOfJobs):
1859         (WTF::ParallelEnvironment::parameterForJob):
1860         (WTF::ParallelEnvironment::executeJobs):
1861         * wtf/ParallelJobsOpenMP.h: Added.
1862         (WTF::ParallelEnvironment::ParallelEnvironment):
1863         (WTF::ParallelEnvironment::numberOfJobs):
1864         (WTF::ParallelEnvironment::parameterForJob):
1865         (WTF::ParallelEnvironment::executeJobs):
1866         * wtf/Platform.h:
1867         * wtf/wtf.pri:
1868
1869 2011-04-26  Mihai Parparita  <mihaip@chromium.org>
1870
1871         Reviewed by Adam Barth.
1872
1873         Turn off make built-in implicit rules for derived sources makefile
1874         https://bugs.webkit.org/show_bug.cgi?id=59418
1875         
1876         We don't use any of make's built-in implicit rules, turning them off
1877         speeds up parsing of the makefile.
1878
1879         * JavaScriptCore.xcodeproj/project.pbxproj:
1880         * gyp/generate-derived-sources.sh:
1881
1882 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
1883
1884         Reviewed by Oliver Hunt.
1885
1886         Custom prototypes on DOM objects don't persist after garbage collection
1887         https://bugs.webkit.org/show_bug.cgi?id=59412
1888         
1889         SunSpider reports no change.
1890         
1891         The hasCustomProperties() check didn't check for a custom prototype.
1892
1893         * runtime/JSObject.h:
1894         (JSC::JSObject::hasCustomProperties): Changed to delegate to Structure
1895         because it is the "truth" about an object's pedigree.
1896
1897         * runtime/Structure.cpp:
1898         (JSC::Structure::Structure):
1899         * runtime/Structure.h:
1900         (JSC::Structure::didTransition): Track whether a Structure has ever
1901         transitioned for any reason. If so, we have to assume that the object
1902         holding it is custom in some way.
1903
1904 2011-04-25  Gavin Barraclough  <barraclough@apple.com>
1905
1906         Reviewed by Geoff Garen.
1907
1908         https://bugs.webkit.org/show_bug.cgi?id=59405
1909         DFG JIT - add type speculation for integer & array types, for vars & args.
1910
1911         If a var or argument is used as the base for a GetByVal or PutByVal access
1912         we are speculating that it is of type Array (we only generate code on the
1913         speculative path to perform array accesses). By typing the var or args slot
1914         as Array, and checking on entry to the function (in the case of args), and
1915         each time the local is written to, we can avoid a type check at each point
1916         the array is accessed. This will typically hoist type checks out of loops.
1917
1918         Similarly, any local that is incremented or decremented, or is the input or
1919         output or a bitwise operator, is likely to be an integer. By typing the
1920         local as int32 we can avoid speculation checks on access, and tagging when
1921         writing to the slot. All accesses can become 32bit instead of 64.
1922
1923         * dfg/DFGByteCodeParser.cpp:
1924         (JSC::DFG::ByteCodeParser::set):
1925         (JSC::DFG::ByteCodeParser::predictArray):
1926         (JSC::DFG::ByteCodeParser::predictInt32):
1927         (JSC::DFG::ByteCodeParser::parseBlock):
1928         * dfg/DFGGraph.h:
1929         (JSC::DFG::PredictionSlot::PredictionSlot):
1930         (JSC::DFG::Graph::Graph):
1931         (JSC::DFG::Graph::predict):
1932         (JSC::DFG::Graph::getPrediction):
1933         * dfg/DFGJITCompiler.cpp:
1934         (JSC::DFG::JITCompiler::compileFunction):
1935         * dfg/DFGJITCompiler.h:
1936         (JSC::DFG::JITCompiler::tagFor):
1937         (JSC::DFG::JITCompiler::payloadFor):
1938         * dfg/DFGNode.h:
1939         * dfg/DFGNonSpeculativeJIT.cpp:
1940         (JSC::DFG::NonSpeculativeJIT::compile):
1941         * dfg/DFGSpeculativeJIT.cpp:
1942         (JSC::DFG::SpeculativeJIT::compile):
1943         (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
1944         (JSC::DFG::SpeculativeJIT::initializeVariableTypes):
1945         * dfg/DFGSpeculativeJIT.h:
1946         * runtime/Executable.cpp:
1947         (JSC::tryDFGCompile):
1948
1949 2011-04-25  David Levin  <levin@chromium.org>
1950
1951         Reviewed by James Robinson.
1952
1953         Fix OwnPtr strict mode violation in MessageQueue.h
1954         https://bugs.webkit.org/show_bug.cgi?id=59400
1955
1956         * wtf/MessageQueue.h:
1957         (WTF::::waitForMessage):
1958         (WTF::::waitForMessageFilteredWithTimeout):
1959         (WTF::::tryGetMessage):
1960
1961 2011-04-25  Adam Barth  <abarth@webkit.org>
1962
1963         Reviewed by Darin Adler.
1964
1965         JavaScriptCore should play nice strict OwnPtrs
1966         https://bugs.webkit.org/show_bug.cgi?id=59401
1967
1968         * dfg/DFGByteCodeParser.cpp:
1969         (JSC::DFG::ByteCodeParser::parse):
1970         * heap/Heap.cpp:
1971         (JSC::TypeCounter::TypeCounter):
1972         * jit/JITStubs.cpp:
1973         (JSC::JITThunks::JITThunks):
1974         * parser/JSParser.cpp:
1975         (JSC::JSParser::Scope::Scope):
1976         * yarr/YarrJIT.cpp:
1977         (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
1978
1979 2011-04-25  Mark Rowe  <mrowe@apple.com>
1980
1981         Build fix.
1982
1983         * wtf/ListHashSet.h:
1984
1985 2011-04-25  Gavin Barraclough  <barraclough@apple.com>
1986
1987         Reviewed by Oliver Hunt.
1988
1989         Bug 59370 - DFG JIT - fix leak of BlocksBlocks
1990         (put the blocks immediately into an OwnPtr).
1991
1992         * dfg/DFGByteCodeParser.cpp:
1993         (JSC::DFG::ByteCodeParser::parse):
1994
1995 2011-04-25  James Robinson  <jamesr@chromium.org>
1996
1997         Reviewed by David Levin.
1998
1999         Fix strict OwnPtr violations in ListHashSet and RenderLayerCompositor
2000         https://bugs.webkit.org/show_bug.cgi?id=59353
2001
2002         * wtf/ListHashSet.h:
2003         (WTF::::ListHashSet):
2004
2005 2011-04-25  David Levin  <levin@chromium.org>
2006
2007         Reviewed by Adam Barth.
2008
2009         Fix PassOwnPtr issues in Structure and JSGlobalData.cpp
2010         https://bugs.webkit.org/show_bug.cgi?id=59347
2011
2012         * runtime/JSGlobalData.cpp:
2013         (JSC::JSGlobalData::JSGlobalData):
2014         * runtime/Structure.cpp:
2015         (JSC::Structure::copyPropertyTable):
2016         (JSC::Structure::createPropertyMap):
2017         * runtime/Structure.h:
2018
2019 2011-04-25  Oliver Hunt  <oliver@apple.com>
2020
2021         Reviewed by Geoffrey Garen.
2022
2023         Make ClassInfo required when creating a Structure
2024         https://bugs.webkit.org/show_bug.cgi?id=59340
2025
2026         Add ClassInfo to all those types which currently don't
2027         have it, and add an assertion to Structure::create to
2028         ensure that the provided classInfo is not null.
2029
2030         * runtime/Executable.h:
2031         (JSC::EvalExecutable::createStructure):
2032         (JSC::ProgramExecutable::createStructure):
2033         (JSC::FunctionExecutable::createStructure):
2034         * runtime/GetterSetter.cpp:
2035         * runtime/GetterSetter.h:
2036         (JSC::GetterSetter::createStructure):
2037         * runtime/JSAPIValueWrapper.cpp:
2038         * runtime/JSAPIValueWrapper.h:
2039         (JSC::JSAPIValueWrapper::createStructure):
2040         * runtime/JSCell.cpp:
2041         * runtime/JSCell.h:
2042         * runtime/JSString.cpp:
2043         * runtime/JSString.h:
2044         (JSC::RopeBuilder::createStructure):
2045         * runtime/Structure.h:
2046         (JSC::Structure::create):
2047         (JSC::JSCell::createDummyStructure):
2048
2049 2011-04-25  David Levin  <levin@chromium.org>
2050
2051         Reviewed by Adam Barth.
2052
2053         PropertyMapHashTable.h should use adoptPtr instead of implicit conversions to PassRefPtr.
2054         https://bugs.webkit.org/show_bug.cgi?id=59342
2055
2056         This patch is to prepare for the strict OwnPtr hack-a-thon.
2057
2058         * runtime/PropertyMapHashTable.h:
2059         (JSC::PropertyTable::copy):
2060
2061 2011-04-25  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
2062
2063         Reviewed by Gavin Barraclough.
2064
2065         Rationalize MacroAssembler branch methods
2066         https://bugs.webkit.org/show_bug.cgi?id=58950
2067
2068         split out the 'Condition' enum into 'RelationalCondition' and 'ResultCondition' 
2069         and apply related changes (only for SH4 platforms).
2070
2071         * assembler/MacroAssemblerSH4.cpp:
2072         * assembler/MacroAssemblerSH4.h:
2073         (JSC::MacroAssemblerSH4::compare32):
2074         (JSC::MacroAssemblerSH4::branch32WithUnalignedHalfWords):
2075         (JSC::MacroAssemblerSH4::branchDouble):
2076         (JSC::MacroAssemblerSH4::branch32):
2077         (JSC::MacroAssemblerSH4::branchTest8):
2078         (JSC::MacroAssemblerSH4::branch8):
2079         (JSC::MacroAssemblerSH4::branchTruncateDoubleToInt32):
2080         (JSC::MacroAssemblerSH4::test8):
2081         (JSC::MacroAssemblerSH4::branch16):
2082         (JSC::MacroAssemblerSH4::branchTest32):
2083         (JSC::MacroAssemblerSH4::branchAdd32):
2084         (JSC::MacroAssemblerSH4::branchMul32):
2085         (JSC::MacroAssemblerSH4::branchSub32):
2086         (JSC::MacroAssemblerSH4::branchOr32):
2087         (JSC::MacroAssemblerSH4::branchConvertDoubleToInt32):
2088         (JSC::MacroAssemblerSH4::branchPtrWithPatch):
2089         (JSC::MacroAssemblerSH4::SH4Condition):
2090         * assembler/SH4Assembler.h:
2091         (JSC::SH4Assembler::cmpEqImmR0):
2092
2093 2011-04-25  Adam Barth  <abarth@webkit.org>
2094
2095         Reviewed by Eric Seidel.
2096
2097         PropertyMapHashTable should work with strict OwnPtr
2098         https://bugs.webkit.org/show_bug.cgi?id=59337
2099
2100         This patch is in preparation for the strict OwnPtr hack-a-thon.
2101
2102         * runtime/PropertyMapHashTable.h:
2103         (JSC::PropertyTable::PropertyTable):
2104         (JSC::PropertyTable::addDeletedOffset):
2105
2106 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
2107
2108         Reviewed by Sam Weinig.
2109
2110         Nixed MarkStack::deprecatedAppend, since it has no clients left.
2111
2112         * heap/MarkStack.h:
2113
2114 2011-04-23  Gavin Barraclough  <barraclough@apple.com>
2115
2116         Reviewed by Oliver Hunt.
2117
2118         Bug 59287 - DFG JIT - Handle temporaries as vars, allowing support for ?:
2119
2120         SetLocals to temporaries will only be generated if they are used within other
2121         blocks, due to the SSA based DCE.
2122
2123         * dfg/DFGByteCodeParser.cpp:
2124         (JSC::DFG::ByteCodeParser::ByteCodeParser):
2125         (JSC::DFG::ByteCodeParser::get):
2126         (JSC::DFG::ByteCodeParser::set):
2127         (JSC::DFG::ByteCodeParser::getLocal):
2128         (JSC::DFG::ByteCodeParser::setLocal):
2129         (JSC::DFG::ByteCodeParser::parseBlock):
2130         (JSC::DFG::ByteCodeParser::processPhiStack):
2131         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
2132         (JSC::DFG::ByteCodeParser::parse):
2133         * dfg/DFGGraph.h:
2134         (JSC::DFG::BasicBlock::BasicBlock):
2135
2136 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
2137
2138         Reviewed by Sam Weinig & Geoff Garen.
2139
2140         Bug 59266 - DFG JIT - Add SSA style DCE
2141
2142         This works by making GetLocal nodes reference SetLocal nodes from prior blocks,
2143         via intermediate Phi nodes. Whenever we add a GetLocal to the graph, also add a
2144         matching child Phi, and add the Phi to a work queue to add references to prior
2145         definitions once we have the full CFG & can determine predecessors. This process
2146         is iterative, inserting new phis into predecessors as necessary.
2147
2148         * dfg/DFGByteCodeParser.cpp:
2149         (JSC::DFG::ByteCodeParser::getVariable):
2150         (JSC::DFG::ByteCodeParser::setVariable):
2151         (JSC::DFG::ByteCodeParser::getArgument):
2152         (JSC::DFG::ByteCodeParser::setArgument):
2153         (JSC::DFG::ByteCodeParser::parseBlock):
2154         (JSC::DFG::ByteCodeParser::processWorkQueue):
2155         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
2156         (JSC::DFG::ByteCodeParser::parse):
2157         * dfg/DFGGraph.cpp:
2158         (JSC::DFG::Graph::dump):
2159         (JSC::DFG::Graph::refChildren):
2160         * dfg/DFGGraph.h:
2161         (JSC::DFG::Graph::ref):
2162         * dfg/DFGNode.h:
2163         (JSC::DFG::Node::ref):
2164         * dfg/DFGNonSpeculativeJIT.cpp:
2165         (JSC::DFG::NonSpeculativeJIT::compile):
2166         * dfg/DFGScoreBoard.h:
2167         (JSC::DFG::ScoreBoard::~ScoreBoard):
2168         (JSC::DFG::ScoreBoard::dump):
2169         * dfg/DFGSpeculativeJIT.cpp:
2170         (JSC::DFG::SpeculativeJIT::compile):
2171
2172 2011-04-22  Vitaly Repeshko  <vitalyr@chromium.org>
2173
2174         Reviewed by Adam Barth.
2175
2176         Add missing default constructors for HashMap iterator specializations.
2177         https://bugs.webkit.org/show_bug.cgi?id=59250
2178
2179         * wtf/HashIterators.h:
2180         * wtf/HashTable.h:
2181         (WTF::HashTableConstIterator::HashTableConstIterator): Added cast
2182         to help compiler find the function template.
2183
2184 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
2185
2186         Reviewed by Sam Weinig.
2187
2188         Bug 59262 - DFG JIT - reduce size of VariableRecord
2189
2190         We never need both the get & set node, only the most recent
2191         (which is always a set, if both exist).
2192
2193         * dfg/DFGByteCodeParser.cpp:
2194         (JSC::DFG::ByteCodeParser::getVariable):
2195         (JSC::DFG::ByteCodeParser::setVariable):
2196         (JSC::DFG::ByteCodeParser::getArgument):
2197         (JSC::DFG::ByteCodeParser::setArgument):
2198         (JSC::DFG::ByteCodeParser::parseBlock):
2199         * dfg/DFGGraph.h:
2200         (JSC::DFG::VariableRecord::VariableRecord):
2201
2202 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
2203
2204         Reviewed by Geoffrey Garen.
2205
2206         Bug 59254 - DFG JIT - retain VariableRecords for args/var in all basic blocks,
2207         such that this information is available for DCE.  Also, since this enlarges the
2208         size of BasicBlock, make Graph hold a vector of pointers to basic blocks, not a
2209         vector of blocks.
2210
2211         * dfg/DFGByteCodeParser.cpp:
2212         (JSC::DFG::ByteCodeParser::ByteCodeParser):
2213         (JSC::DFG::ByteCodeParser::get):
2214         (JSC::DFG::ByteCodeParser::set):
2215         (JSC::DFG::ByteCodeParser::getVariable):
2216         (JSC::DFG::ByteCodeParser::setVariable):
2217         (JSC::DFG::ByteCodeParser::getArgument):
2218         (JSC::DFG::ByteCodeParser::setArgument):
2219         (JSC::DFG::ByteCodeParser::parseBlock):
2220         (JSC::DFG::ByteCodeParser::setupPredecessors):
2221         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
2222         (JSC::DFG::ByteCodeParser::parse):
2223         * dfg/DFGGraph.cpp:
2224         (JSC::DFG::Graph::dump):
2225         * dfg/DFGGraph.h:
2226         (JSC::DFG::VariableRecord::VariableRecord):
2227         (JSC::DFG::BasicBlock::BasicBlock):
2228         (JSC::DFG::BasicBlock::getBytecodeBegin):
2229         (JSC::DFG::Graph::blockIndexForBytecodeOffset):
2230         (JSC::DFG::Graph::blockForBytecodeOffset):
2231         * dfg/DFGNonSpeculativeJIT.cpp:
2232         (JSC::DFG::NonSpeculativeJIT::compile):
2233         * dfg/DFGSpeculativeJIT.cpp:
2234         (JSC::DFG::SpeculativeJIT::compile):
2235         * dfg/DFGSpeculativeJIT.h:
2236         (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
2237
2238 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
2239
2240         Errk, build fix.
2241
2242         * dfg/DFGSpeculativeJIT.cpp:
2243         (JSC::DFG::SpeculativeJIT::compile):
2244
2245 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
2246
2247         Reviewed by Sam Weinig.
2248
2249         Quick cleanup to SpeculativeJIT/NonSpeculativeJIT compile loop,
2250         move out the call to checkConsistency().
2251
2252         * dfg/DFGNonSpeculativeJIT.cpp:
2253         (JSC::DFG::NonSpeculativeJIT::compile):
2254         * dfg/DFGSpeculativeJIT.cpp:
2255         (JSC::DFG::SpeculativeJIT::compile):
2256         * dfg/DFGSpeculativeJIT.h:
2257         (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
2258         (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
2259
2260 2011-04-21  Vitaly Repeshko  <vitalyr@chromium.org>
2261
2262         Reviewed by Adam Barth.
2263
2264         Provide default constructors for HashMap iterators.
2265         https://bugs.webkit.org/show_bug.cgi?id=59151
2266
2267         These will be used to implement an iterator over EventTarget's
2268         listeners.
2269
2270         * wtf/HashTable.h:
2271         (WTF::HashTableConstIteratorAdapter::HashTableConstIteratorAdapter):
2272         (WTF::HashTableIteratorAdapter::HashTableIteratorAdapter):
2273
2274 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
2275
2276         Reviewed by Geoff Garen.
2277
2278         Bug 59232 - DFG JIT - Add predecessor links to BasicBlocks
2279
2280         These will be necessary for DCE support.
2281         Also factor allocateVirtualRegisters out into its own method.
2282
2283         * dfg/DFGByteCodeParser.cpp:
2284         (JSC::DFG::ByteCodeParser::setupPredecessors):
2285         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
2286         (JSC::DFG::ByteCodeParser::parse):
2287         * dfg/DFGGraph.h:
2288         (JSC::DFG::Graph::blockForBytecodeOffset):
2289         * dfg/DFGNode.h:
2290         (JSC::DFG::Node::isTerminal):
2291
2292 2011-04-22  Oliver Hunt  <oliver@apple.com>
2293
2294         Reviewed by Geoffrey Garen.
2295
2296         Object.create creates uncachable objects
2297         https://bugs.webkit.org/show_bug.cgi?id=59164
2298
2299         Use the prototype object's inheritorID, as we
2300         should always have done
2301
2302         * runtime/JSGlobalObject.cpp:
2303         (JSC::JSGlobalObject::reset):
2304         (JSC::JSGlobalObject::visitChildren):
2305         * runtime/JSGlobalObject.h:
2306         (JSC::JSGlobalObject::nullPrototypeObjectStructure):
2307         * runtime/ObjectConstructor.cpp:
2308         (JSC::objectConstructorCreate):
2309
2310 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
2311
2312         Reviewed by Sam Weinig.
2313
2314         Bug 59222 - DFG JIT - don't allocate virtual registers to nodes with no result
2315
2316         We currently allocate virtual registers to nodes which have no result - these are
2317         clearly unused, and may result in us allocating a larger than necessary stack frame.
2318
2319         Encapsulate Node::virtualRegister such that we can ASSERT this is only called on
2320         nodes that have results, and improve the quality of output from the consistency check.
2321
2322         * dfg/DFGByteCodeParser.cpp:
2323         (JSC::DFG::ByteCodeParser::parse):
2324         * dfg/DFGGraph.cpp:
2325         (JSC::DFG::Graph::dump):
2326         * dfg/DFGGraph.h:
2327         (JSC::DFG::Graph::ref):
2328         (JSC::DFG::Graph::deref):
2329         * dfg/DFGJITCodeGenerator.cpp:
2330         (JSC::DFG::JITCodeGenerator::fillInteger):
2331         (JSC::DFG::JITCodeGenerator::fillDouble):
2332         (JSC::DFG::JITCodeGenerator::fillJSValue):
2333         (JSC::DFG::JITCodeGenerator::dump):
2334         (JSC::DFG::JITCodeGenerator::checkConsistency):
2335         * dfg/DFGJITCodeGenerator.h:
2336         (JSC::DFG::JITCodeGenerator::canReuse):
2337         (JSC::DFG::JITCodeGenerator::isFilled):
2338         (JSC::DFG::JITCodeGenerator::isFilledDouble):
2339         (JSC::DFG::JITCodeGenerator::use):
2340         (JSC::DFG::JITCodeGenerator::integerResult):
2341         (JSC::DFG::JITCodeGenerator::noResult):
2342         (JSC::DFG::JITCodeGenerator::cellResult):
2343         (JSC::DFG::JITCodeGenerator::jsValueResult):
2344         (JSC::DFG::JITCodeGenerator::doubleResult):
2345         (JSC::DFG::JITCodeGenerator::initConstantInfo):
2346         * dfg/DFGJITCompiler.cpp:
2347         (JSC::DFG::JITCompiler::fillNumericToDouble):
2348         (JSC::DFG::JITCompiler::fillInt32ToInteger):
2349         (JSC::DFG::JITCompiler::fillToJS):
2350         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
2351         * dfg/DFGNode.h:
2352         (JSC::DFG::Node::Node):
2353         (JSC::DFG::Node::hasResult):
2354         (JSC::DFG::Node::virtualRegister):
2355         (JSC::DFG::Node::setVirtualRegister):
2356         (JSC::DFG::Node::refCount):
2357         (JSC::DFG::Node::ref):
2358         (JSC::DFG::Node::deref):
2359         (JSC::DFG::Node::adjustedRefCount):
2360         * dfg/DFGNonSpeculativeJIT.cpp:
2361         (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
2362         (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
2363         (JSC::DFG::NonSpeculativeJIT::compile):
2364         * dfg/DFGScoreBoard.h:
2365         (JSC::DFG::ScoreBoard::use):
2366         * dfg/DFGSpeculativeJIT.cpp:
2367         (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
2368         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
2369         (JSC::DFG::SpeculativeJIT::compile):
2370
2371 2011-04-22  Sam Weinig  <sam@webkit.org>
2372
2373         Reviewed by Gavin Barraclough and Oliver Hunt.
2374
2375         Arrays should participate in global object forwarding fun
2376         https://bugs.webkit.org/show_bug.cgi?id=59215
2377
2378         * runtime/JSGlobalObject.h:
2379         (JSC::constructEmptyArray):
2380         (JSC::constructArray):
2381         Add variants of constructArray that take a global object.
2382
2383 2011-04-22  Sheriff Bot  <webkit.review.bot@gmail.com>
2384
2385         Unreviewed, rolling out r84650 and r84654.
2386         http://trac.webkit.org/changeset/84650
2387         http://trac.webkit.org/changeset/84654
2388         https://bugs.webkit.org/show_bug.cgi?id=59218
2389
2390         Broke Windows build (Requested by bweinstein on #webkit).
2391
2392         * API/JSCallbackObjectFunctions.h:
2393         (JSC::::init):
2394         * JavaScriptCore.exp:
2395         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2396         * heap/Handle.h:
2397         (JSC::HandleBase::operator!):
2398         (JSC::HandleBase::operator UnspecifiedBoolType*):
2399         (JSC::HandleTypes::getFromSlot):
2400         * heap/HandleHeap.cpp:
2401         (JSC::HandleHeap::markStrongHandles):
2402         (JSC::HandleHeap::markWeakHandles):
2403         (JSC::HandleHeap::finalizeWeakHandles):
2404         (JSC::HandleHeap::writeBarrier):
2405         (JSC::HandleHeap::protectedGlobalObjectCount):
2406         (JSC::HandleHeap::isValidWeakNode):
2407         * heap/HandleHeap.h:
2408         (JSC::HandleHeap::copyWeak):
2409         (JSC::HandleHeap::makeWeak):
2410         (JSC::HandleHeap::Node::slot):
2411         * heap/HandleStack.cpp:
2412         (JSC::HandleStack::mark):
2413         (JSC::HandleStack::grow):
2414         * heap/HandleStack.h:
2415         (JSC::HandleStack::zapTo):
2416         (JSC::HandleStack::push):
2417         * heap/Heap.cpp:
2418         (JSC::HandleHeap::protectedObjectTypeCounts):
2419         * heap/Local.h:
2420         (JSC::::set):
2421         * heap/Strong.h:
2422         (JSC::Strong::set):
2423         * heap/Weak.h:
2424         (JSC::Weak::set):
2425         * runtime/StructureTransitionTable.h:
2426         (JSC::StructureTransitionTable::singleTransition):
2427         (JSC::StructureTransitionTable::setSingleTransition):
2428         * runtime/WeakGCMap.h:
2429         (JSC::WeakGCMap::add):
2430         (JSC::WeakGCMap::set):
2431         * runtime/WriteBarrier.h:
2432
2433 2011-04-22  Brian Weinstein  <bweinstein@apple.com>
2434
2435         Part of Windows build fix from r84650.
2436
2437         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2438
2439 2011-04-22  Oliver Hunt  <oliver@apple.com>
2440
2441         Reviewed by Geoffrey Garen.
2442
2443         Make it harder to use HandleSlot incorrectly
2444         https://bugs.webkit.org/show_bug.cgi?id=59205
2445
2446         Just add a little type fudging to make it harder to
2447         incorrectly assign through a HandleSlot.
2448
2449         * API/JSCallbackObjectFunctions.h:
2450         (JSC::::init):
2451         * JavaScriptCore.exp:
2452         * heap/Handle.h:
2453         (JSC::HandleBase::operator!):
2454         (JSC::HandleBase::operator UnspecifiedBoolType*):
2455         (JSC::HandleTypes::getFromSlot):
2456         * heap/HandleHeap.cpp:
2457         (JSC::HandleHeap::markStrongHandles):
2458         (JSC::HandleHeap::markWeakHandles):
2459         (JSC::HandleHeap::finalizeWeakHandles):
2460         (JSC::HandleHeap::writeBarrier):
2461         (JSC::HandleHeap::protectedGlobalObjectCount):
2462         (JSC::HandleHeap::isValidWeakNode):
2463         * heap/HandleHeap.h:
2464         (JSC::HandleHeap::copyWeak):
2465         (JSC::HandleHeap::makeWeak):
2466         (JSC::HandleHeap::Node::slot):
2467         * heap/HandleStack.cpp:
2468         (JSC::HandleStack::mark):
2469         (JSC::HandleStack::grow):
2470         * heap/HandleStack.h:
2471         (JSC::HandleStack::zapTo):
2472         (JSC::HandleStack::push):
2473         * heap/Heap.cpp:
2474         (JSC::HandleHeap::protectedObjectTypeCounts):
2475         * heap/Local.h:
2476         (JSC::::set):
2477         * heap/Strong.h:
2478         (JSC::Strong::set):
2479         * heap/Weak.h:
2480         (JSC::Weak::set):
2481         * runtime/StructureTransitionTable.h:
2482         (JSC::StructureTransitionTable::singleTransition):
2483         (JSC::StructureTransitionTable::setSingleTransition):
2484         * runtime/WeakGCMap.h:
2485         (JSC::WeakGCMap::add):
2486         (JSC::WeakGCMap::set):
2487         * runtime/WriteBarrier.h:
2488         (JSC::OpaqueJSValue::toJSValue):
2489         (JSC::OpaqueJSValue::toJSValueRef):
2490         (JSC::OpaqueJSValue::fromJSValue):
2491
2492 2011-04-22  Patrick Gansterer  <paroga@webkit.org>
2493
2494         Unreviewed. Build fix for ENABLE(INTERPRETER) after r84556.
2495
2496         * bytecode/CodeBlock.cpp:
2497         (JSC::CodeBlock::visitAggregate):
2498
2499 2011-04-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2500
2501         Unreviewed, rolling out r84583.
2502         http://trac.webkit.org/changeset/84583
2503         https://bugs.webkit.org/show_bug.cgi?id=59173
2504
2505         "broke
2506         http://trac.webkit.org/export/84593/trunk/LayoutTests/fast/js
2507         /Object-create.html" (Requested by ggaren on #webkit).
2508
2509         * runtime/ObjectConstructor.cpp:
2510         (JSC::objectConstructorCreate):
2511
2512 2011-04-21  Maciej Stachowiak  <mjs@apple.com>
2513
2514         Reviewed by Adam Roben.
2515
2516         Add a feature define to allow <details> and <summary> to be disabled
2517         https://bugs.webkit.org/show_bug.cgi?id=59118
2518         <rdar://problem/9257045>
2519
2520         * Configurations/FeatureDefines.xcconfig:
2521
2522 2011-04-21  Oliver Hunt  <oliver@apple.com>
2523
2524         Reviewed by Geoffrey Garen.
2525
2526         Object.create creates uncachable objects
2527         https://bugs.webkit.org/show_bug.cgi?id=59164
2528
2529         Use the prototype object's inheritorID, as we
2530         should always have done
2531
2532         * runtime/ObjectConstructor.cpp:
2533         (JSC::objectConstructorCreate):
2534
2535 2011-04-21  Oliver Hunt  <oliver@apple.com>
2536
2537         Reviewed by Geoffrey Garen.
2538
2539         Start moving to a general visitor pattern for GC traversal
2540         https://bugs.webkit.org/show_bug.cgi?id=59141
2541
2542         This is just a rename:
2543             markChildren -> visitChildren
2544             markAggregate -> visitAggregate
2545             markStack -> visitor
2546             MarkStack -> typedef'd to SlotVisitor
2547
2548         * API/JSCallbackObject.h:
2549         (JSC::JSCallbackObjectData::visitChildren):
2550         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
2551         (JSC::JSCallbackObject::visitChildren):
2552         * JavaScriptCore.exp:
2553         * bytecode/CodeBlock.cpp:
2554         (JSC::CodeBlock::visitStructures):
2555         (JSC::EvalCodeCache::visitAggregate):
2556         (JSC::CodeBlock::visitAggregate):
2557         * bytecode/CodeBlock.h:
2558         * bytecode/EvalCodeCache.h:
2559         * bytecode/Instruction.h:
2560         (JSC::PolymorphicAccessStructureList::visitAggregate):
2561         * bytecode/StructureStubInfo.cpp:
2562         (JSC::StructureStubInfo::visitAggregate):
2563         * bytecode/StructureStubInfo.h:
2564         * debugger/DebuggerActivation.cpp:
2565         (JSC::DebuggerActivation::visitChildren):
2566         * debugger/DebuggerActivation.h:
2567         * heap/HandleHeap.cpp:
2568         (JSC::WeakHandleOwner::isReachableFromOpaqueRoots):
2569         (JSC::HandleHeap::markStrongHandles):
2570         (JSC::HandleHeap::markWeakHandles):
2571         * heap/HandleHeap.h:
2572         * heap/HandleStack.cpp:
2573         (JSC::HandleStack::mark):
2574         * heap/HandleStack.h:
2575         * heap/Heap.cpp:
2576         (JSC::Heap::markProtectedObjects):
2577         (JSC::Heap::markTempSortVectors):
2578         (JSC::Heap::markRoots):
2579         * heap/Heap.h:
2580         * heap/MarkStack.cpp:
2581         (JSC::MarkStack::visitChildren):
2582         (JSC::MarkStack::drain):
2583         * heap/MarkStack.h:
2584         (JSC::HeapRootVisitor::HeapRootVisitor):
2585         (JSC::HeapRootVisitor::mark):
2586         (JSC::HeapRootVisitor::visitor):
2587         * heap/MarkedSpace.h:
2588         * runtime/ArgList.cpp:
2589         (JSC::MarkedArgumentBuffer::markLists):
2590         * runtime/ArgList.h:
2591         * runtime/Arguments.cpp:
2592         (JSC::Arguments::visitChildren):
2593         * runtime/Arguments.h:
2594         * runtime/Executable.cpp:
2595         (JSC::EvalExecutable::visitChildren):
2596         (JSC::ProgramExecutable::visitChildren):
2597         (JSC::FunctionExecutable::visitChildren):
2598         * runtime/Executable.h:
2599         * runtime/GetterSetter.cpp:
2600         (JSC::GetterSetter::visitChildren):
2601         * runtime/GetterSetter.h:
2602         (JSC::GetterSetter::createStructure):
2603         * runtime/JSAPIValueWrapper.h:
2604         (JSC::JSAPIValueWrapper::createStructure):
2605         * runtime/JSActivation.cpp:
2606         (JSC::JSActivation::visitChildren):
2607         * runtime/JSActivation.h:
2608         * runtime/JSArray.cpp:
2609         (JSC::JSArray::visitChildren):
2610         * runtime/JSArray.h:
2611         (JSC::JSArray::visitDirect):
2612         * runtime/JSCell.h:
2613         (JSC::JSCell::JSCell::visitChildren):
2614         * runtime/JSFunction.cpp:
2615         (JSC::JSFunction::visitChildren):
2616         * runtime/JSFunction.h:
2617         * runtime/JSGlobalObject.cpp:
2618         (JSC::visitIfNeeded):
2619         (JSC::JSGlobalObject::visitChildren):
2620         * runtime/JSGlobalObject.h:
2621         * runtime/JSONObject.cpp:
2622         * runtime/JSObject.cpp:
2623         (JSC::JSObject::visitChildren):
2624         * runtime/JSObject.h:
2625         (JSC::JSObject::visitDirect):
2626         * runtime/JSPropertyNameIterator.cpp:
2627         (JSC::JSPropertyNameIterator::visitChildren):
2628         * runtime/JSPropertyNameIterator.h:
2629         (JSC::JSPropertyNameIterator::createStructure):
2630         * runtime/JSStaticScopeObject.cpp:
2631         (JSC::JSStaticScopeObject::visitChildren):
2632         * runtime/JSStaticScopeObject.h:
2633         * runtime/JSTypeInfo.h:
2634         (JSC::TypeInfo::TypeInfo):
2635         (JSC::TypeInfo::overridesVisitChildren):
2636         * runtime/JSWrapperObject.cpp:
2637         (JSC::JSWrapperObject::visitChildren):
2638         * runtime/JSWrapperObject.h:
2639         * runtime/JSZombie.h:
2640         (JSC::JSZombie::visitChildren):
2641         * runtime/NativeErrorConstructor.cpp:
2642         (JSC::NativeErrorConstructor::visitChildren):
2643         * runtime/NativeErrorConstructor.h:
2644         * runtime/RegExpObject.cpp:
2645         (JSC::RegExpObject::visitChildren):
2646         * runtime/RegExpObject.h:
2647         * runtime/ScopeChain.cpp:
2648         (JSC::ScopeChainNode::visitChildren):
2649         * runtime/ScopeChain.h:
2650         * runtime/SmallStrings.cpp:
2651         (JSC::SmallStrings::visitChildren):
2652         * runtime/SmallStrings.h:
2653         * runtime/Structure.cpp:
2654         (JSC::Structure::Structure):
2655         (JSC::Structure::visitChildren):
2656         * runtime/Structure.h:
2657         * runtime/StructureChain.cpp:
2658         (JSC::StructureChain::visitChildren):
2659         * runtime/StructureChain.h:
2660         (JSC::StructureChain::createStructure):
2661
2662 2011-04-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2663
2664         Unreviewed, rolling out r84548.
2665         http://trac.webkit.org/changeset/84548
2666         https://bugs.webkit.org/show_bug.cgi?id=59144
2667
2668         Broke chromium-win build (Requested by aklein on #webkit).
2669
2670         * wtf/Platform.h:
2671
2672 2011-04-21  Adam Klein  <adamk@chromium.org>
2673
2674         Reviewed by David Levin.
2675
2676         [fileapi] Worker File API calls that create Blobs fail in debug builds due to random number generator thread assertion
2677         https://bugs.webkit.org/show_bug.cgi?id=55728
2678
2679         Enable WTF_MULTIPLE_THREADS for Chromium.
2680
2681         * wtf/Platform.h:
2682
2683 2011-04-20  Michael Saboff  <msaboff@apple.com>
2684
2685         Reviewed by Geoff Garen.
2686
2687         JSString::resolveRope inefficient for common 2 fiber case
2688         https://bugs.webkit.org/show_bug.cgi?id=58994
2689
2690         Split JSString::resolveRope into three routines.
2691         resolveRope allocates the new buffer and handles the 1 or 2
2692         fiber case with single level fibers.
2693         resolveRopeSlowCase handles the general case.
2694         outOfMemory handles the rare out of memory exception case.
2695
2696         * runtime/JSString.cpp:
2697         (JSC::JSString::resolveRope):
2698         (JSC::JSString::resolveRopeSlowCase):
2699         (JSC::JSString::outOfMemory):
2700         * runtime/JSString.h:
2701
2702 2011-04-20  Adam Klein  <adamk@chromium.org>
2703
2704         Reviewed by David Levin.
2705
2706         Rename all uses of JSC_MULTIPLE_THREADS under wtf/... to WTF_MULTIPLE_THREADS
2707         https://bugs.webkit.org/show_bug.cgi?id=59040
2708
2709         This will be used to fix https://bugs.webkit.org/show_bug.cgi?id=55728
2710         by enabling WTF_MULTIPLE_THREADS for Chromium.
2711
2712         * wtf/CryptographicallyRandomNumber.cpp:
2713         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
2714         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
2715         * wtf/FastMalloc.cpp:
2716         * wtf/Platform.h:
2717         Enable WTF_MULTIPLE_THREADS whenever JSC_MULTIPLE_THREADS is enabled.
2718         * wtf/RandomNumber.cpp:
2719         (WTF::randomNumber):
2720         * wtf/RefCountedLeakCounter.cpp:
2721         (WTF::RefCountedLeakCounter::increment):
2722         (WTF::RefCountedLeakCounter::decrement):
2723         * wtf/dtoa.cpp:
2724         (WTF::pow5mult):
2725
2726 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2727
2728         Rubber stamped by Geoff Garen
2729
2730         Bug 59069 - DFG JIT - register allocate r8, r9, r10
2731
2732         * dfg/DFGJITCompiler.h:
2733         (JSC::DFG::JITCompiler::gprToRegisterID):
2734
2735 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2736
2737         Build fix - revert accidental change.
2738
2739         * wtf/Platform.h:
2740
2741 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2742
2743         Reviewed by Sam Weinig.
2744
2745         Add SAMPLING_FLAGS tool to DFG JIT.
2746
2747         * bytecode/SamplingTool.h:
2748         (JSC::SamplingFlags::addressOfFlags):
2749         * dfg/DFGJITCompiler.cpp:
2750         (JSC::DFG::JITCompiler::setSamplingFlag):
2751         (JSC::DFG::JITCompiler::clearSamplingFlag):
2752         * dfg/DFGJITCompiler.h:
2753         * jit/JITInlineMethods.h:
2754         (JSC::JIT::setSamplingFlag):
2755         (JSC::JIT::clearSamplingFlag):
2756         * wtf/Platform.h:
2757
2758 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2759
2760         Reviewed by Oliver Hunt.
2761
2762         Bug 59022 - DFG JIT - Optimize branch-on-relational-compare
2763
2764         If a relational compare (< or <=) is immediately followed by a branch,
2765         we can combine the two, avoiding generation of a boolean into a register.
2766
2767         * assembler/MacroAssemblerX86Common.h:
2768         (JSC::MacroAssemblerX86Common::branch32):
2769         (JSC::MacroAssemblerX86Common::invert):
2770         (JSC::MacroAssemblerX86Common::commute):
2771         * dfg/DFGNode.h:
2772         (JSC::DFG::Node::adjustedRefCount):
2773         * dfg/DFGSpeculativeJIT.cpp:
2774         (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
2775         (JSC::DFG::SpeculativeJIT::compile):
2776         * dfg/DFGSpeculativeJIT.h:
2777         (JSC::DFG::SpeculativeJIT::isJSConstantWithInt32Value):
2778         (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
2779
2780 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2781
2782         ARMv7 build fix II.
2783
2784         * jit/JITOpcodes32_64.cpp:
2785         (JSC::JIT::softModulo):
2786
2787 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2788
2789         ARMv7 build fix.
2790
2791         * assembler/MacroAssemblerARM.h:
2792         (JSC::MacroAssemblerARM::test8):
2793
2794 2011-04-19  Gavin Barraclough  <barraclough@apple.com>
2795
2796         Reviewed by Oliver Hunt.
2797
2798         Rationalize MacroAssembler branch methods
2799         https://bugs.webkit.org/show_bug.cgi?id=58950
2800
2801         The MacroAssembler currently exposes x86's weird behaviour that the 'setcc'
2802         instruction only sets the low 8 bits of a register. Stop that.
2803
2804         Having done so, to clarify remove the 'set32' prefix from test & compare
2805         instructions - these methods all now set a full 32/64 bit register (Ptr size).
2806         The size in the function name should indicate the amount of data being compared.
2807
2808         Also split out the 'Condition' enum into 'RelationalCondition' and
2809         'ResultCondition'. The former is used in binary comparison, the latter is a unary
2810         condition check on the result of an operation.
2811
2812         * JavaScriptCore.xcodeproj/project.pbxproj:
2813         * assembler/MacroAssembler.h:
2814         (JSC::MacroAssembler::branchPtr):
2815         (JSC::MacroAssembler::branch32):
2816         (JSC::MacroAssembler::branch16):
2817         (JSC::MacroAssembler::branchTestPtr):
2818         (JSC::MacroAssembler::comparePtr):
2819         (JSC::MacroAssembler::branchAddPtr):
2820         (JSC::MacroAssembler::branchSubPtr):
2821         (JSC::MacroAssembler::branchTest8):
2822         * assembler/MacroAssemblerARM.h:
2823         (JSC::MacroAssemblerARM::branch8):
2824         (JSC::MacroAssemblerARM::branch32):
2825         (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
2826         (JSC::MacroAssemblerARM::branch16):
2827         (JSC::MacroAssemblerARM::branchTest8):
2828         (JSC::MacroAssemblerARM::branchTest32):
2829         (JSC::MacroAssemblerARM::branchAdd32):
2830         (JSC::MacroAssemblerARM::branchMul32):
2831         (JSC::MacroAssemblerARM::branchSub32):
2832         (JSC::MacroAssemblerARM::branchNeg32):
2833         (JSC::MacroAssemblerARM::branchOr32):
2834         (JSC::MacroAssemblerARM::compare32):
2835         (JSC::MacroAssemblerARM::test32):
2836         (JSC::MacroAssemblerARM::test8):
2837         (JSC::MacroAssemblerARM::branchPtrWithPatch):
2838         (JSC::MacroAssemblerARM::ARMCondition):
2839         * assembler/MacroAssemblerARMv7.h:
2840         (JSC::MacroAssemblerARMv7::branch32):
2841         (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
2842         (JSC::MacroAssemblerARMv7::branch16):
2843         (JSC::MacroAssemblerARMv7::branch8):
2844         (JSC::MacroAssemblerARMv7::branchTest32):
2845         (JSC::MacroAssemblerARMv7::branchTest8):
2846         (JSC::MacroAssemblerARMv7::branchAdd32):
2847         (JSC::MacroAssemblerARMv7::branchMul32):
2848         (JSC::MacroAssemblerARMv7::branchOr32):
2849         (JSC::MacroAssemblerARMv7::branchSub32):
2850         (JSC::MacroAssemblerARMv7::compare32):
2851         (JSC::MacroAssemblerARMv7::test32):
2852         (JSC::MacroAssemblerARMv7::test8):
2853         (JSC::MacroAssemblerARMv7::branchPtrWithPatch):
2854         (JSC::MacroAssemblerARMv7::makeBranch):
2855         (JSC::MacroAssemblerARMv7::armV7Condition):
2856         * assembler/MacroAssemblerMIPS.h:
2857         (JSC::MacroAssemblerMIPS::branch8):
2858         (JSC::MacroAssemblerMIPS::branch32):
2859         (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
2860         (JSC::MacroAssemblerMIPS::branch16):
2861         (JSC::MacroAssemblerMIPS::branchTest32):
2862         (JSC::MacroAssemblerMIPS::branchTest8):
2863         (JSC::MacroAssemblerMIPS::branchAdd32):
2864         (JSC::MacroAssemblerMIPS::branchMul32):
2865         (JSC::MacroAssemblerMIPS::branchSub32):
2866         (JSC::MacroAssemblerMIPS::branchOr32):
2867         (JSC::MacroAssemblerMIPS::compare32):
2868         (JSC::MacroAssemblerMIPS::test8):
2869         (JSC::MacroAssemblerMIPS::test32):
2870         (JSC::MacroAssemblerMIPS::branchPtrWithPatch):
2871         * assembler/MacroAssemblerX86.h:
2872         (JSC::MacroAssemblerX86::branch32):
2873         (JSC::MacroAssemblerX86::branchPtrWithPatch):
2874         * assembler/MacroAssemblerX86Common.h:
2875         (JSC::MacroAssemblerX86Common::branch8):
2876         (JSC::MacroAssemblerX86Common::branch32):
2877         (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
2878         (JSC::MacroAssemblerX86Common::branch16):
2879         (JSC::MacroAssemblerX86Common::branchTest32):
2880         (JSC::MacroAssemblerX86Common::branchTest8):
2881         (JSC::MacroAssemblerX86Common::branchAdd32):
2882         (JSC::MacroAssemblerX86Common::branchMul32):
2883         (JSC::MacroAssemblerX86Common::branchSub32):
2884         (JSC::MacroAssemblerX86Common::branchNeg32):
2885         (JSC::MacroAssemblerX86Common::branchOr32):
2886         (JSC::MacroAssemblerX86Common::compare32):
2887         (JSC::MacroAssemblerX86Common::test8):
2888         (JSC::MacroAssemblerX86Common::test32):
2889         (JSC::MacroAssemblerX86Common::x86Condition):
2890         * assembler/MacroAssemblerX86_64.h:
2891         (JSC::MacroAssemblerX86_64::comparePtr):
2892         (JSC::MacroAssemblerX86_64::branchPtr):
2893         (JSC::MacroAssemblerX86_64::branchTestPtr):
2894         (JSC::MacroAssemblerX86_64::branchAddPtr):
2895         (JSC::MacroAssemblerX86_64::branchSubPtr):
2896         (JSC::MacroAssemblerX86_64::branchPtrWithPatch):
2897         (JSC::MacroAssemblerX86_64::branchTest8):
2898         * dfg/DFGSpeculativeJIT.cpp:
2899         (JSC::DFG::SpeculativeJIT::compile):
2900         * jit/JITOpcodes.cpp:
2901         (JSC::JIT::emit_op_eq):
2902         (JSC::JIT::emit_op_neq):
2903         (JSC::JIT::compileOpStrictEq):
2904         (JSC::JIT::emit_op_eq_null):
2905         (JSC::JIT::emit_op_neq_null):
2906         * jit/JITOpcodes32_64.cpp:
2907         (JSC::JIT::emit_op_eq):
2908         (JSC::JIT::emit_op_neq):
2909         (JSC::JIT::compileOpStrictEq):
2910         (JSC::JIT::emit_op_eq_null):
2911         (JSC::JIT::emit_op_neq_null):
2912
2913 2011-04-20  Balazs Kelemen  <kbalazs@webkit.org>
2914
2915         Reviewed by Csaba Osztrogonác.
2916
2917         [Qt] Cleanup includepath adjustment for generated files
2918         https://bugs.webkit.org/show_bug.cgi?id=58869
2919
2920         * JavaScriptCore.pri:  Add the directory of generated files to the include
2921         path with absolute path to make it valid in the final build step.
2922
2923 2011-04-19  Oliver Hunt  <oliver@apple.com>
2924
2925         Reviewed by Gavin Barraclough.
2926
2927         Remove unneeded deprecated methods from MarkStack
2928         https://bugs.webkit.org/show_bug.cgi?id=58853
2929
2930         Remove deprecated methods
2931
2932         * heap/MarkStack.h:
2933
2934 2011-04-19  Mark Rowe  <mrowe@apple.com>
2935
2936         Things work best when the Xcode project refers to the file at a path that exists.
2937
2938         * JavaScriptCore.xcodeproj/project.pbxproj:
2939
2940 2011-04-19  Renata Hodovan  <reni@webkit.org>
2941
2942         Reviewed by Eric Seidel.
2943
2944         Move the alignment related macros in Vector.h to new Alignment.h.
2945         https://bugs.webkit.org/show_bug.cgi?id=56000
2946
2947         * JavaScriptCore.gypi:
2948         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2949         * JavaScriptCore.xcodeproj/project.pbxproj:
2950         * wtf/Alignment.h: Added.
2951         * wtf/CMakeLists.txt:
2952         * wtf/Vector.h:
2953
2954 2011-04-19  Oliver Hunt  <oliver@apple.com>
2955
2956         Reviewed by Gavin Barraclough.
2957
2958         Remove DeprecatedPtr
2959         https://bugs.webkit.org/show_bug.cgi?id=58718
2960
2961         Remove the class an all functions that still exist to support it.
2962
2963         * heap/MarkStack.h:
2964         (JSC::MarkStack::append):
2965         * runtime/JSValue.h:
2966         * runtime/WriteBarrier.h:
2967
2968 2011-04-19  Jungshik Shin  <jshin@chromium.org>
2969
2970         Reviewed by David Levin
2971
2972         Add U+FEFF (Zero width no-break space) to CharacterNames.h.
2973         It's added to the list of characters to treat as zero-width
2974         in WebCore.
2975
2976         https://bugs.webkit.org/show_bug.cgi?id=48860
2977
2978         * wtf/unicode/CharacterNames.h:
2979
2980 2011-04-19  Csaba Osztrogonác  <ossy@webkit.org>
2981
2982         [Qt] REGRESSION(84176): http/tests/xmlhttprequest/event-listener-gc.html fails
2983         https://bugs.webkit.org/show_bug.cgi?id=58871
2984
2985         Unreviewed, rolling out r84176, r84178, r84186, r84212 and r84231.
2986         http://trac.webkit.org/changeset/84176 (original patch)
2987         http://trac.webkit.org/changeset/84178 (original patch - part 2)
2988         http://trac.webkit.org/changeset/84186 (build fix)
2989         http://trac.webkit.org/changeset/84212
2990         http://trac.webkit.org/changeset/84231 (skip failing test)
2991
2992         original bugs:
2993          - https://bugs.webkit.org/show_bug.cgi?id=58718
2994          - https://bugs.webkit.org/show_bug.cgi?id=58853
2995
2996         * heap/MarkStack.h:
2997         (JSC::MarkStack::deprecatedAppendValues):
2998         (JSC::MarkStack::append):
2999         (JSC::MarkStack::deprecatedAppend):
3000         * runtime/JSValue.h:
3001         * runtime/WriteBarrier.h:
3002         (JSC::DeprecatedPtr::DeprecatedPtr):
3003         (JSC::DeprecatedPtr::get):
3004         (JSC::DeprecatedPtr::operator*):
3005         (JSC::DeprecatedPtr::operator->):
3006         (JSC::DeprecatedPtr::slot):
3007         (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
3008         (JSC::DeprecatedPtr::operator!):
3009         (JSC::operator==):
3010
3011 2011-04-18  Oliver Hunt  <oliver@apple.com>
3012
3013         Reviewed by Gavin Barraclough.
3014
3015         Remove unneeded deprecated methods from MarkStack
3016         https://bugs.webkit.org/show_bug.cgi?id=58853
3017
3018         Remove deprecated methods
3019
3020         * heap/MarkStack.h:
3021
3022 2011-04-18  Oliver Hunt  <oliver@apple.com>
3023
3024         Reviewed by Adam Roben.
3025
3026         Off by one initialising repeat callframe
3027         https://bugs.webkit.org/show_bug.cgi?id=58838
3028         <rdar://problem/8756810>
3029
3030         If the end of a callframe made for a repeat call landed on
3031         a page boundary the following page may not have been committed
3032         which means that the off by one could lead to a crash.  However
3033         it could only happen in this case and only on windows which is
3034         why it was so hard to repro.  Alas given the steps needed to
3035         reproduce are such that it's not really possible to make a
3036         testcase.
3037
3038         This fix makes the code a little less squirrely by not trying
3039         to avoid the unnecessary initialisation of |this|.
3040
3041         * interpreter/Interpreter.cpp:
3042         (JSC::Interpreter::prepareForRepeatCall):
3043
3044 2011-04-18  Gavin Barraclough  <barraclough@apple.com>
3045
3046         Reviewed by Geoff Garen.
3047
3048         Bug 58829 - DFG JIT - Optimize add/sub immediate, multiply.
3049
3050         Add code generation for add/subtract instruction with immediate operands
3051         (where a child is a constant), and don't bail to non-speculative if an
3052         integer multiple results in a +0 result (only if it should be generating -0).
3053
3054         * dfg/DFGSpeculativeJIT.cpp:
3055         (JSC::DFG::SpeculativeJIT::compile):
3056         * dfg/DFGSpeculativeJIT.h:
3057         (JSC::DFG::SpeculativeJIT::isDoubleConstantWithInt32Value):
3058
3059 2011-04-18  Gavin Barraclough  <barraclough@apple.com>
3060
3061         Reviewed by Geoff Garen.
3062
3063         Bug 58817 - DFG JIT - if speculative compilation fails, throw away code.
3064
3065         If we detect a logical conflict, throw away generated code,
3066         and only compile through the NonSpeculativeJIT.
3067
3068         * assembler/AbstractMacroAssembler.h:
3069         (JSC::AbstractMacroAssembler::rewindToLabel):
3070         * assembler/AssemblerBuffer.h:
3071         (JSC::AssemblerBuffer::rewindToOffset):
3072         * assembler/MacroAssemblerX86Common.h:
3073         (JSC::MacroAssemblerX86Common::branchAdd32):
3074         (JSC::MacroAssemblerX86Common::branchSub32):
3075         * assembler/X86Assembler.h:
3076         (JSC::X86Assembler::rewindToLabel):
3077         (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
3078         * dfg/DFGJITCompiler.cpp:
3079         (JSC::DFG::JITCompiler::linkSpeculationChecks):
3080         (JSC::DFG::JITCompiler::compileFunction):
3081         * dfg/DFGNode.h:
3082         * dfg/DFGNonSpeculativeJIT.cpp:
3083         (JSC::DFG::NonSpeculativeJIT::compile):
3084         * dfg/DFGSpeculativeJIT.cpp:
3085         (JSC::DFG::SpeculativeJIT::compile):
3086         * dfg/DFGSpeculativeJIT.h:
3087         (JSC::DFG::SpeculationCheckIndexIterator::SpeculationCheckIndexIterator):
3088
3089 2011-04-18  Oliver Hunt  <oliver@apple.com>
3090
3091         Reviewed by Gavin Barraclough.
3092
3093         Remove DeprecatedPtr
3094         https://bugs.webkit.org/show_bug.cgi?id=58718
3095
3096         As simple as it sounds.
3097
3098         * runtime/JSValue.h:
3099         * runtime/WriteBarrier.h:
3100
3101 2011-04-17  Cameron Zwarich  <zwarich@apple.com>
3102
3103         Reviewed by Dan Bernstein.
3104
3105         JSC no longer builds with Clang due to -Woverloaded-virtual warning
3106         https://bugs.webkit.org/show_bug.cgi?id=58760
3107
3108         Rename Structure's specificValue overload of put to putSpecificValue to avoid
3109         Clang's warning for overloading a virtual function.
3110
3111         * runtime/Structure.cpp:
3112         (JSC::Structure::addPropertyTransition):
3113         (JSC::Structure::addPropertyWithoutTransition):
3114         (JSC::Structure::putSpecificValue):
3115         * runtime/Structure.h:
3116
3117 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
3118
3119         Reviewed by Adam Barth.
3120
3121         Remove WTF_PLATFORM_SGL
3122         https://bugs.webkit.org/show_bug.cgi?id=58743
3123
3124         WTF_PLATFORM_SGL and PLATFORM(SGL) are not used in the code anywhere.
3125
3126         * wtf/Platform.h:
3127
3128 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
3129
3130         Reviewed by Adam Barth.
3131
3132         Rename PLATFORM(CA) to USE(CA)
3133         https://bugs.webkit.org/show_bug.cgi?id=58742
3134
3135         * wtf/Platform.h:
3136
3137 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
3138
3139         Reviewed by Adam Barth.
3140
3141         Rename PLATFORM(CG) to USE(CG)
3142         https://bugs.webkit.org/show_bug.cgi?id=58729
3143
3144         * wtf/Platform.h:
3145
3146 2011-04-16  Patrick Gansterer  <paroga@webkit.org>
3147
3148         Reviewed by Eric Seidel.
3149
3150         Rename PLATFORM(CAIRO) to USE(CAIRO)
3151         https://bugs.webkit.org/show_bug.cgi?id=55192
3152
3153         * wtf/Platform.h:
3154         * wtf/gobject/GTypedefs.h:
3155
3156 2011-04-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3157
3158         Unreviewed, rolling out r84067.
3159         http://trac.webkit.org/changeset/84067