126db9a4ab451536b9803238286bf078e67c0af5
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-04-12  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
2
3         Reviewed by Eric Seidel.
4
5         [Qt] Enable JIT build for SH4 platforms.
6         https://bugs.webkit.org/show_bug.cgi?id=58317
7         enable JIT build for QT backend  for SH4 platforms.
8
9         * JavaScriptCore.pro:
10         * wtf/Platform.h:
11
12 2011-04-11  Ben Taylor  <bentaylor.solx86@gmail.com>
13
14         Reviewed by Alexey Proskuryakov.
15
16         https://bugs.webkit.org/show_bug.cgi?id=58289
17
18         Fix compilation on Solaris/Studio 12 C++ in wtf/FastMalloc.cpp,
19         WTF::TCMalloc_PageHeap::runScavengerThread(void*) expected to return a value.
20
21         * wtf/FastMalloc.cpp:
22         (WTF::TCMalloc_PageHeap::runScavengerThread):
23
24 2011-04-11  Mark Rowe  <mrowe@apple.com>
25
26         Fix the build.
27
28         * JavaScriptCore.xcodeproj/project.pbxproj: Headers used outside of JavaScriptCore need to be marked as private.
29
30 2011-04-11  Anna Cavender  <annacc@chromium.org>
31
32         Reviewed by Eric Carlson.
33
34         Setup ENABLE(TRACK) feature define
35         https://bugs.webkit.org/show_bug.cgi?id=53556
36
37
38         * Configurations/FeatureDefines.xcconfig:
39
40 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
41
42         Try to fix a few builds.
43         
44         Updated a few more build configurations for file moves.
45
46         * CMakeListsWinCE.txt:
47
48 2011-04-11  Gavin Barraclough  <barraclough@apple.com>
49
50         Reviewed by Sam Weinig.
51
52         Bug 58263 - Use EncodedValueDescriptor on both JSVALUE32_64, JSVALUE64
53
54         The JSJITInterface already uses EncodedValueDescriptor to access the tag/payload
55         separately on JSVALUE64, even though EncodedValueDescriptor is not used in
56         JSVALUE64's implementation of JSValue. Remove the separate definition for m_ptr
57         on X86_64. Using the union allows us to remove a layer of makeImmediate()/
58         immedaiteValue() methods.
59
60         * dfg/DFGNonSpeculativeJIT.cpp:
61         (JSC::DFG::NonSpeculativeJIT::compile):
62         * dfg/DFGSpeculativeJIT.cpp:
63         (JSC::DFG::SpeculativeJIT::compile):
64         * jit/JITInlineMethods.h:
65         (JSC::JIT::emitTagAsBoolImmediate):
66         * jit/JITOpcodes.cpp:
67         (JSC::JIT::emit_op_not):
68         (JSC::JIT::emit_op_jeq_null):
69         (JSC::JIT::emit_op_jneq_null):
70         (JSC::JIT::emit_op_get_pnames):
71         (JSC::JIT::emit_op_eq_null):
72         (JSC::JIT::emit_op_neq_null):
73         (JSC::JIT::emitSlow_op_not):
74         * runtime/JSCell.h:
75         * runtime/JSValue.h:
76         * runtime/JSValueInlineMethods.h:
77         (JSC::JSValue::encode):
78         (JSC::JSValue::decode):
79         (JSC::JSValue::operator==):
80         (JSC::JSValue::operator!=):
81         (JSC::JSValue::JSValue):
82         (JSC::JSValue::operator bool):
83         (JSC::JSValue::asInt32):
84         (JSC::JSValue::isUndefinedOrNull):
85         (JSC::JSValue::isBoolean):
86         (JSC::JSValue::isCell):
87         (JSC::JSValue::isInt32):
88         (JSC::JSValue::asDouble):
89         (JSC::JSValue::isNumber):
90         (JSC::JSValue::asCell):
91
92 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
93
94         Try to fix a few builds.
95         
96         Updated a few more build configurations for file moves.
97
98         * CMakeListsEfl.txt:
99         * wscript:
100
101 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
102
103         Build fix: Updated a file name.
104
105         * CMakeLists.txt:
106
107 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
108
109         Rubber-stamped by Sam Weinig.
110         
111         Moved remaining heap implementation files to the heap folder.
112
113         * Android.mk:
114         * CMakeLists.txt:
115         * GNUmakefile.list.am:
116         * JavaScriptCore.gypi:
117         * JavaScriptCore.pro:
118         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
119         * JavaScriptCore.xcodeproj/project.pbxproj:
120         * heap/ConservativeRoots.cpp: Copied from runtime/ConservativeSet.cpp.
121         * heap/ConservativeRoots.h: Copied from runtime/ConservativeSet.h.
122         * heap/Handle.h:
123         * heap/Heap.cpp:
124         * heap/MachineStackMarker.cpp: Copied from runtime/MachineStackMarker.cpp.
125         * heap/MachineStackMarker.h: Copied from runtime/MachineStackMarker.h.
126         * heap/MarkStack.cpp: Copied from runtime/MarkStack.cpp.
127         * heap/MarkStack.h: Copied from runtime/MarkStack.h.
128         * heap/MarkStackPosix.cpp: Copied from runtime/MarkStackPosix.cpp.
129         * heap/MarkStackSymbian.cpp: Copied from runtime/MarkStackSymbian.cpp.
130         * heap/MarkStackWin.cpp: Copied from runtime/MarkStackWin.cpp.
131         * heap/MarkedBlock.cpp: Copied from runtime/MarkedBlock.cpp.
132         * heap/MarkedBlock.h: Copied from runtime/MarkedBlock.h.
133         * heap/MarkedSpace.cpp: Copied from runtime/MarkedSpace.cpp.
134         * heap/MarkedSpace.h: Copied from runtime/MarkedSpace.h.
135         * interpreter/RegisterFile.cpp:
136         * runtime/ConservativeSet.cpp: Removed.
137         * runtime/ConservativeSet.h: Removed.
138         * runtime/MachineStackMarker.cpp: Removed.
139         * runtime/MachineStackMarker.h: Removed.
140         * runtime/MarkStack.cpp: Removed.
141         * runtime/MarkStack.h: Removed.
142         * runtime/MarkStackPosix.cpp: Removed.
143         * runtime/MarkStackSymbian.cpp: Removed.
144         * runtime/MarkStackWin.cpp: Removed.
145         * runtime/MarkedBlock.cpp: Removed.
146         * runtime/MarkedBlock.h: Removed.
147         * runtime/MarkedSpace.cpp: Removed.
148         * runtime/MarkedSpace.h: Removed.
149
150 2011-04-11  Gavin Barraclough  <barraclough@apple.com>
151
152         Windows build fix.
153
154         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
155
156 2011-04-09  Gavin Barraclough  <barraclough@apple.com>
157
158         Reviewed by Sam Weinig.
159
160         Bug 58198 - Clean up JSValue implementation for JSVALUE64
161
162         Remove JSNumberCell, JSImmediate, unify some methods between JSVALUE32_64/JSVALUE64
163
164         JSNumberCell.h largely just contained the constructors for JSValue on JSVALUE64,
165         which should not have been here.  JSImmediate mostly contained uncalled methods,
166         along with the internal implementation of the JSValue constructors split unnecessarily
167         across a number of layers of function calls. These could largely be merged back
168         together. Many methods and constructors from JSVALUE32_64 and JSVALUE64 can by unified.
169
170         The .cpp files were empty.
171
172         Moving all these methods into JSValue.h seems to be a repro measurable regression, so
173         I have kept these methods in a separate JSValueInlineMethods.h. Adding the 64-bit tag
174         values as static const members of JSValue also measures as a repro regression, so I
175         have made these #defines.
176
177         * Android.mk:
178         * CMakeLists.txt:
179         * GNUmakefile.list.am:
180         * JavaScriptCore.exp:
181         * JavaScriptCore.gypi:
182         * JavaScriptCore.pro:
183         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
184         * JavaScriptCore.xcodeproj/project.pbxproj:
185             - Removed JSImmediate.h, JSNumberCell.h.
186         * bytecompiler/BytecodeGenerator.cpp:
187         (JSC::BytecodeGenerator::emitLoad):
188             - Removed class JSImmediate.
189         * dfg/DFGNonSpeculativeJIT.cpp:
190         (JSC::DFG::NonSpeculativeJIT::compile):
191             - Removed class JSImmediate.
192         * dfg/DFGSpeculativeJIT.cpp:
193         (JSC::DFG::SpeculativeJIT::compile):
194             - Removed class JSImmediate.
195         * jit/JITArithmetic.cpp:
196         (JSC::JIT::compileBinaryArithOpSlowCase):
197             - Removed class JSImmediate.
198         * jit/JITInlineMethods.h:
199         (JSC::JIT::emitJumpIfJSCell):
200         (JSC::JIT::emitJumpIfNotJSCell):
201         (JSC::JIT::emitJumpIfImmediateInteger):
202         (JSC::JIT::emitJumpIfNotImmediateInteger):
203         (JSC::JIT::emitFastArithDeTagImmediate):
204         (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
205         (JSC::JIT::emitFastArithReTagImmediate):
206         (JSC::JIT::emitTagAsBoolImmediate):
207             - Removed class JSImmediate.
208         * jit/JITOpcodes.cpp:
209         (JSC::JIT::emit_op_not):
210         (JSC::JIT::emit_op_jeq_null):
211         (JSC::JIT::emit_op_jneq_null):
212         (JSC::JIT::emit_op_get_pnames):
213         (JSC::JIT::emit_op_eq_null):
214         (JSC::JIT::emit_op_neq_null):
215         (JSC::JIT::emitSlow_op_not):
216             - Removed class JSImmediate.
217         * jit/JSInterfaceJIT.h:
218             - Removed class JSImmediate.
219         * runtime/JSCell.h:
220             - Removed JSImmediate.h, JSNumberCell.h.
221         * runtime/JSImmediate.cpp: Removed.
222         * runtime/JSImmediate.h: Removed.
223         * runtime/JSNumberCell.cpp: Removed.
224         * runtime/JSNumberCell.h: Removed.
225             - Removed.
226         * runtime/JSObject.h:
227             - Removed JSImmediate.h, JSNumberCell.h.
228         * runtime/JSString.h:
229             - Removed JSImmediate.h, JSNumberCell.h.
230         * runtime/JSValue.h:
231             - Added tags for JSVALUE64, moved out some JSVALUE32_64 methods, unified with JSVALUE64.
232         * runtime/JSValueInlineMethods.h: Added.
233         (JSC::JSValue::toInt32):
234         (JSC::JSValue::toUInt32):
235         (JSC::JSValue::isUInt32):
236         (JSC::JSValue::asUInt32):
237         (JSC::JSValue::uncheckedGetNumber):
238         (JSC::JSValue::toJSNumber):
239         (JSC::jsNaN):
240         (JSC::JSValue::getNumber):
241         (JSC::JSValue::getBoolean):
242         (JSC::JSValue::JSValue):
243         (JSC::JSValue::encode):
244         (JSC::JSValue::decode):
245         (JSC::JSValue::operator bool):
246         (JSC::JSValue::operator==):
247         (JSC::JSValue::operator!=):
248         (JSC::JSValue::isUndefined):
249         (JSC::JSValue::isNull):
250         (JSC::JSValue::isUndefinedOrNull):
251         (JSC::JSValue::isCell):
252         (JSC::JSValue::isInt32):
253         (JSC::JSValue::isDouble):
254         (JSC::JSValue::isTrue):
255         (JSC::JSValue::isFalse):
256         (JSC::JSValue::tag):
257         (JSC::JSValue::payload):
258         (JSC::JSValue::asInt32):
259         (JSC::JSValue::asDouble):
260         (JSC::JSValue::asCell):
261         (JSC::JSValue::isNumber):
262         (JSC::JSValue::isBoolean):
263         (JSC::JSValue::makeImmediate):
264         (JSC::JSValue::immediateValue):
265         (JSC::reinterpretDoubleToIntptr):
266         (JSC::reinterpretIntptrToDouble):
267             - Methods moved here from JSImmediate.h/JSNumberCell.h/JSValue.h.
268         * runtime/Operations.h:
269             - Removed JSImmediate.h, JSNumberCell.h.
270         * wtf/StdLibExtras.h:
271             - Export bitwise_cast.
272
273 2011-04-11  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
274
275         Reviewed by Oliver Hunt.
276
277         SH4 JIT SUPPORT.
278         https://bugs.webkit.org/show_bug.cgi?id=44329
279
280         Add JIT remaining part for SH4 platforms.
281
282         * assembler/MacroAssemblerSH4.h:
283         * jit/JIT.h:
284         * jit/JITInlineMethods.h:
285         * jit/JITOpcodes32_64.cpp:
286         * jit/JITPropertyAccess32_64.cpp:
287         * jit/JITStubs.cpp:
288         * jit/JITStubs.h:
289         * jit/JSInterfaceJIT.h:
290
291 2011-04-10  Geoffrey Garen  <ggaren@apple.com>
292
293         Rubber-stamped by Beth Dakin.
294
295         Moved Heap.h and Heap.cpp to the heap folder, because anything less 
296         would be uncivilized.
297
298         * Android.mk:
299         * CMakeLists.txt:
300         * GNUmakefile.list.am:
301         * JavaScriptCore.gypi:
302         * JavaScriptCore.pro:
303         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
304         * JavaScriptCore.xcodeproj/project.pbxproj:
305         * heap/Heap.cpp: Copied from JavaScriptCore/runtime/Heap.cpp.
306         * heap/Heap.h: Copied from JavaScriptCore/runtime/Heap.h.
307         * runtime/Heap.cpp: Removed.
308         * runtime/Heap.h: Removed.
309
310 2011-04-10  Patrick Gansterer  <paroga@webkit.org>
311
312         Reviewed by Darin Adler.
313
314         Remove duplicated code from AtomicString::fromUTF8()
315         https://bugs.webkit.org/show_bug.cgi?id=53711
316
317         * JavaScriptCore.exp:
318         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
319         * wtf/text/AtomicString.cpp:
320         (WTF::AtomicString::fromUTF8Internal):
321         * wtf/text/AtomicString.h:
322         (WTF::AtomicString::fromUTF8):
323         * wtf/unicode/UTF8.cpp:
324         (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
325         * wtf/unicode/UTF8.h:
326
327 2011-04-10  Maciej Stachowiak  <mjs@apple.com>
328
329         Not reviewed.
330
331         Fix build (at least on Lion) by adding some newish header files to
332         PrivateHeaders.
333
334         * JavaScriptCore.xcodeproj/project.pbxproj:
335
336 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
337
338         Not reviewed.
339
340         Try recommitting some things svn left out of its last commit.
341
342         * heap/Handle.h:
343         (JSC::HandleBase::operator!):
344         (JSC::HandleBase::HandleBase):
345         (JSC::HandleBase::slot):
346         (JSC::HandleBase::setSlot):
347         (JSC::Handle::Handle):
348         * heap/HandleHeap.cpp:
349         (JSC::HandleHeap::markWeakHandles):
350         (JSC::HandleHeap::finalizeWeakHandles):
351         (JSC::HandleHeap::isValidWeakNode):
352         * heap/HandleHeap.h:
353         (JSC::HandleHeap::globalData):
354
355 2011-04-08  Geoffrey Garen  <ggaren@apple.com>
356
357         Reviewed by Oliver Hunt.
358
359         A few heap-related renames and file moves.
360         
361         WeakGCPtr<T> => Weak<T>
362         Global<T> => Strong<T>
363         collector/ => heap/
364         collector/* => heap/*
365         runtime/WeakGCPtr.h => heap/Weak.h
366         
367         (Eventually, even more files should move into the heap directory. Like
368         Heap.h and Heap.cpp, for example.)
369
370         * API/JSClassRef.h:
371         * CMakeLists.txt:
372         * GNUmakefile.am:
373         * GNUmakefile.list.am:
374         * JavaScriptCore.gypi:
375         * JavaScriptCore.pri:
376         * JavaScriptCore.pro:
377         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
378         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
379         * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
380         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
381         * JavaScriptCore.xcodeproj/project.pbxproj:
382         * bytecode/SamplingTool.h:
383         * bytecompiler/BytecodeGenerator.h:
384         * collector: Removed.
385         * collector/handles: Removed.
386         * collector/handles/Global.h: Removed.
387         * collector/handles/Handle.h: Removed.
388         * collector/handles/HandleHeap.cpp: Removed.
389         * collector/handles/HandleHeap.h: Removed.
390         * collector/handles/HandleStack.cpp: Removed.
391         * collector/handles/HandleStack.h: Removed.
392         * collector/handles/Local.h: Removed.
393         * collector/handles/LocalScope.h: Removed.
394         * heap: Copied from collector.
395         * heap/Handle.h: Copied from collector/handles/Handle.h.
396         * heap/HandleHeap.cpp: Copied from collector/handles/HandleHeap.cpp.
397         * heap/HandleHeap.h: Copied from collector/handles/HandleHeap.h.
398         * heap/HandleStack.cpp: Copied from collector/handles/HandleStack.cpp.
399         * heap/HandleStack.h: Copied from collector/handles/HandleStack.h.
400         * heap/Local.h: Copied from collector/handles/Local.h.
401         * heap/LocalScope.h: Copied from collector/handles/LocalScope.h.
402         * heap/Strong.h: Copied from collector/handles/Global.h.
403         (JSC::Strong::Strong):
404         (JSC::Strong::~Strong):
405         (JSC::Strong::operator=):
406         * heap/Weak.h: Copied from runtime/WeakGCPtr.h.
407         (JSC::Weak::Weak):
408         (JSC::Weak::~Weak):
409         * heap/handles: Removed.
410         * interpreter/RegisterFile.h:
411         * jit/JITStubs.cpp:
412         (JSC::JITThunks::hostFunctionStub):
413         * jit/JITStubs.h:
414         * runtime/Structure.h:
415         * runtime/WeakGCPtr.h: Removed.
416
417 2011-04-08  Alpha Lam  <hclam@chromium.org>
418
419         Unreviewed, rolling out r83335.
420         http://trac.webkit.org/changeset/83335
421         https://bugs.webkit.org/show_bug.cgi?id=53556
422
423         GTK and QT bots are broken
424
425         * Configurations/FeatureDefines.xcconfig:
426
427 2011-04-08  Gavin Barraclough  <barraclough@apple.com>
428
429         Ooops, typo, build fix.
430
431         * dfg/DFGByteCodeParser.cpp:
432         (JSC::DFG::ByteCodeParser::parse):
433
434 2011-04-08  Gavin Barraclough  <barraclough@apple.com>
435
436         Reviewed by Oliver Hunt.
437
438         Bug 58154 - Add support for comparison operators to the DFG JIT.
439
440         Add support for <, <=, ==, ===, and also !.  Add support for all corresponding
441         bytecode ops, including the not- and -null forms.  Initially add functionally
442         correct support, we'll revisit the performance.
443
444         * dfg/DFGByteCodeParser.cpp:
445         (JSC::DFG::ByteCodeParser::ByteCodeParser):
446         (JSC::DFG::ByteCodeParser::constantNull):
447         (JSC::DFG::ByteCodeParser::parse):
448             - Add support for parsing of bytecode opcodes, 
449         * dfg/DFGJITCodeGenerator.h:
450         (JSC::DFG::JITCodeGenerator::callOperation):
451             - Add new operation call types, return bool values.
452         * dfg/DFGNode.h:
453             - Add new node types.
454         * dfg/DFGNonSpeculativeJIT.cpp:
455         (JSC::DFG::NonSpeculativeJIT::compile):
456             - Add code generation for new nodes.
457         * dfg/DFGOperations.cpp:
458         (JSC::DFG::operationCompareLess):
459         (JSC::DFG::operationCompareLessEq):
460         (JSC::DFG::operationCompareEq):
461         (JSC::DFG::operationCompareStrictEq):
462         (JSC::DFG::dfgConvertJSValueToBoolean):
463         * dfg/DFGOperations.h:
464             - Add operation callbacks to implement new ops.
465         * dfg/DFGSpeculativeJIT.cpp:
466         (JSC::DFG::SpeculativeJIT::compile):
467             - Add code generation for new nodes.
468         * jit/JITOpcodes.cpp:
469         (JSC::JIT::privateCompileCTIMachineTrampolines):
470             - Switched to a simpler <0 check, rather than relying on an internal value in JSImmediate.
471         * jit/JITPropertyAccess.cpp:
472         (JSC::JIT::privateCompilePatchGetArrayLength):
473             - Switched to a simpler <0 check, rather than relying on an internal value in JSImmediate.
474         * runtime/JSImmediate.h:
475             - Make tag values public, rather than relying on a friend - this matches JSVALUE32_64.
476
477 2011-04-07  Anna Cavender  <annacc@chromium.org>
478
479         Reviewed by Eric Carlson.
480
481         Setup ENABLE(TRACK) feature define
482         https://bugs.webkit.org/show_bug.cgi?id=53556
483
484
485         * Configurations/FeatureDefines.xcconfig:
486
487 2011-04-07  Balazs Kelemen  <kbalazs@webkit.org>
488
489         Reviewed by Kenneth Rohde Christiansen.
490
491         [WK2][Qt][GTK] Introduce common use flag for the shared UNIX domain socket IPC implementation
492         https://bugs.webkit.org/show_bug.cgi?id=58030
493
494         * wtf/Platform.h: Introduce USE(UNIX_DOMAIN_SOCKETS) for WebKit2.
495
496 2011-04-08  Adam Roben  <aroben@apple.com>
497
498         Clean build fix
499
500         * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: Don't try to delete directories that
501         don't exist. Also switched from del /s to rmdir /s, which has the benefit of deleting the
502         directory itself in addition to the files it contains.
503
504 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
505
506         Reviewed by Maciej Stachowiak.
507
508         Some Handle<T> cleanup
509         https://bugs.webkit.org/show_bug.cgi?id=58109
510
511         * bytecode/SamplingTool.h: Sorted alphabetically because that's the
512         WebKit style. Added a Global.h #include that was previously missing
513         but harmless.
514
515         * collector/handles/Global.h:
516         (JSC::Global::Global): Added a null constructor. No need for a special
517         tag, and the tag is incompatible with some data structures.
518         
519         (JSC::Global::isHashTableDeletedValue):
520         (JSC::Global::~Global):
521         (JSC::Global::set):
522         (JSC::Global::operator=):
523         (JSC::Global::clear):
524         (JSC::Global::hashTableDeletedValue): Reordered constructors to be near
525         each other.
526
527         (JSC::Global::setWithWriteBarrier): Renamed internalSet to
528         setWithWriteBarrier for clarity, and funneled more code into using set
529         and setWithWriteBarrier to reduce duplication.
530
531         * collector/handles/Handle.h:
532         (JSC::HandleBase::operator!):
533         (JSC::HandleBase::HandleBase): Removed isEmpty(), since we already have
534         boolean and ! operators.
535
536         (JSC::HandleBase::slot):
537         (JSC::HandleBase::setSlot):
538         (JSC::Handle::Handle): Added general support for null Handles. This was
539         previously outlawed by ASSERTs, but our code has grown to support and
540         rely on null Handles.
541         
542         * collector/handles/HandleHeap.cpp:
543         (JSC::HandleHeap::markWeakHandles):
544         (JSC::HandleHeap::finalizeWeakHandles):
545         (JSC::HandleHeap::isValidWeakNode): Migrated from isValidWeakHandle,
546         and beefed this up a bit.
547
548         * collector/handles/HandleHeap.h:
549         (JSC::HandleHeap::globalData): Added accessor, used by some new set functions.
550
551         * collector/handles/Local.h: Moved hash traits to the bottom of the file,
552         since this file is about the Local class, not the traits.
553
554         (JSC::::Local): Updated for removal of invalidate().
555
556         (JSC::::operator): Deployed "using" to avoid a lot of this->
557         template funny business.
558
559         (JSC::::setWithSlotCheck): Renamed from internalSet, more specific now.
560
561         * interpreter/RegisterFile.h:
562         (JSC::RegisterFile::RegisterFile): Updated to use null constructor.
563
564         * jit/JITStubs.cpp:
565         (JSC::JITThunks::hostFunctionStub):
566
567         * runtime/JSPropertyNameIterator.h:
568         (JSC::Structure::setEnumerationCache):
569         * runtime/Structure.h: Removed clearEnumerationCache
570         because it was an unused holdover from when the enumeration cache was
571         not a handle.
572
573         * runtime/WeakGCMap.h:
574         (JSC::WeakGCMap::set): Finish initializing our handle before putting it
575         in the table. This seemed more logical, and at one point was required
576         to avoid triggering an ASSERT.
577
578         * runtime/WeakGCPtr.h: Inherit from Handle instead of rolling our own
579         handle-like behavior, to avoid duplication.
580
581         (JSC::WeakGCPtr::WeakGCPtr):
582         (JSC::WeakGCPtr::~WeakGCPtr):
583         (JSC::WeakGCPtr::get):
584         (JSC::WeakGCPtr::clear):
585         (JSC::WeakGCPtr::set):
586         (JSC::WeakGCPtr::setWithWriteBarrier): Removed duplicate code and
587         standardized on Handle idioms.
588
589 2011-04-07  Adam Barth  <abarth@webkit.org>
590
591         Reviewed by Martin Robinson.
592
593         Refactor Gtk build system to separate list of files
594         https://bugs.webkit.org/show_bug.cgi?id=58090
595
596         This is the first step towards generating part of the GTK build system
597         using GYP.  In the first iteration, our plan is to just generate the
598         list of files.  This patch is the first step, which is to separate out
599         the part of JavaScriptCore build system that we intend to generate from
600         the rest of the build system.
601
602         * GNUmakefile.am:
603         * GNUmakefile.list.am: Added.
604
605 2011-04-07  Zoltan Herczeg  <zherczeg@webkit.org>
606
607         Reviewed by Gavin Barraclough.
608
609         Mapping booleans the same way as integers
610         https://bugs.webkit.org/show_bug.cgi?id=56913
611
612         Instead of having a seperate tag field for booleans,
613         the logical values are stored in the payload field
614         (for JSValue32_64 representation).
615
616         1.007x speedup on SunSpider.
617
618         * jit/JIT.h:
619         * jit/JITInlineMethods.h:
620         (JSC::JIT::emitStoreBool):
621         * jit/JITOpcodes32_64.cpp:
622         (JSC::JIT::emit_op_instanceof):
623         (JSC::JIT::emit_op_not):
624         (JSC::JIT::emit_op_jfalse):
625         (JSC::JIT::emitSlow_op_jfalse):
626         (JSC::JIT::emit_op_jtrue):
627         (JSC::JIT::emitSlow_op_jtrue):
628         (JSC::JIT::emit_op_jeq_null):
629         (JSC::JIT::emit_op_jneq_null):
630         (JSC::JIT::emit_op_eq):
631         (JSC::JIT::emitSlow_op_eq):
632         (JSC::JIT::emit_op_neq):
633         (JSC::JIT::emitSlow_op_neq):
634         (JSC::JIT::compileOpStrictEq):
635         (JSC::JIT::emit_op_eq_null):
636         (JSC::JIT::emit_op_neq_null):
637         * jit/JSInterfaceJIT.h:
638         * runtime/JSValue.h:
639         (JSC::JSValue::JSValue):
640         (JSC::JSValue::isTrue):
641         (JSC::JSValue::isFalse):
642         (JSC::JSValue::getBoolean):
643
644 2011-04-07  Eric Seidel  <eric@webkit.org>
645
646         Reviewed by Adam Barth.
647
648         Add stub support for generating Gtk build system from gyp
649         https://bugs.webkit.org/show_bug.cgi?id=58086
650
651         This does not produce a buildable JavaScriptCore, but it
652         does allow running gyp/configure --port=gtk and having
653         it generate a gtk.Makefile which we can use for testing
654         the rest of the plumbing.
655
656         * gyp/gtk.gyp: Added.
657
658 2011-04-07  Andrew Scherkus  <scherkus@chromium.org>
659
660         Revert ENABLE_TRACK patch due to compile failures.
661
662         * Configurations/FeatureDefines.xcconfig:
663
664 2011-04-07  Adam Barth  <abarth@webkit.org>
665
666         Fix whitespace in GNUmakefile.am.
667
668         * GNUmakefile.am:
669
670 2011-04-07  Gavin Barraclough  <barraclough@apple.com>
671
672         Fix a couple of typos in comments that Darin spotted.
673
674         * jit/JITOpcodes.cpp:
675         (JSC::JIT::emit_op_not):
676         * runtime/JSImmediate.h:
677
678 2011-04-06  Gavin Barraclough  <barraclough@apple.com>
679
680         Reviewed by Geoff Garen.
681         Bug 58057 - Store boolean payload in low bit of JSImmediate
682
683         And remove some uncalled functions from JSImmediate.h
684
685         * jit/JITInlineMethods.h:
686         (JSC::JIT::emitTagAsBoolImmediate):
687         * jit/JITOpcodes.cpp:
688         (JSC::JIT::emit_op_not):
689         * runtime/JSImmediate.h:
690         (JSC::JSImmediate::makeInt):
691         (JSC::JSImmediate::makeBool):
692         (JSC::JSImmediate::intValue):
693         (JSC::JSImmediate::boolValue):
694         (JSC::JSImmediate::asInt32):
695         (JSC::JSImmediate::toDouble):
696         (JSC::JSValue::asInt32):
697         (JSC::JSValue::isUInt32):
698         (JSC::JSValue::asUInt32):
699
700 2011-04-07  Liang Qi  <liang.qi@nokia.com>
701
702         Reviewed by Laszlo Gombos.
703
704         [Qt][Symbian] Enable webkit build with GCCE on Symbian.
705         https://bugs.webkit.org/show_bug.cgi?id=57841
706
707         * wtf/MathExtras.h: GCCE compiler doesn't support those std static functions.
708
709 2011-04-06  Dai Mikurube  <dmikurube@chromium.org>
710
711         Reviewed by David Levin.
712
713         Add QUOTA build flag for unified quota API
714         https://bugs.webkit.org/show_bug.cgi?id=57918
715
716         * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
717
718 2011-04-06  Kevin Ollivier  <kevino@theolliviers.com>
719         
720         Reviewed by Darin Adler.
721         
722         Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
723         
724         https://bugs.webkit.org/show_bug.cgi?id=27551
725
726         * config.h:
727
728 2011-04-06  Oliver Hunt  <oliver@apple.com>
729
730         Reviewed by Gavin Barraclough.
731
732         Stop JSObject::isUsingInlineStorage() from using the structure
733         https://bugs.webkit.org/show_bug.cgi?id=57986
734
735         Make the isUsingInlineStorage() implementation just look at
736         whether the property storage is inside the object.
737
738         * runtime/JSObject.h:
739         (JSC::JSObject::isUsingInlineStorage):
740         (JSC::JSObject::JSObject):
741
742 2011-04-06  Gavin Barraclough  <barraclough@apple.com>
743
744         Rubber stamped by Geoff Garen.
745
746         Update comments documenting JSVALUE64/JSVALUE32_64 JSValue representations.
747
748         * runtime/JSImmediate.h:
749         * runtime/JSValue.h:
750
751 2011-04-06  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
752
753         cmake: Fix build for ARMv7
754
755         * CMakeLists.txt: add missing file.
756
757 2011-04-06  Liang Qi  <liang.qi@nokia.com>
758
759         Reviewed by Benjamin Poulain.
760
761         Correct a include file name.
762         https://bugs.webkit.org/show_bug.cgi?id=57839
763
764         * wtf/PageAllocatorSymbian.h: It should be case sensitive. This fix 
765         builds on Unix hosts.
766
767 2011-04-06  Adam Roben  <aroben@apple.com>
768
769         Build fix after r83056
770
771         * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: Added property svn:executable.
772
773 2011-04-06  Adam Roben  <aroben@apple.com>
774
775         Move JavaScriptCoreGenerated's file-copying logic out to a new script
776
777         Hopefully this will make it easier to modify this logic in the future. I also made the
778         script much quieter than the old logic, since it didn't seem helpful to see long lists of
779         filenames during the copying phase.
780
781         If we like this new style, we could copy it for our other projects.
782
783         Fixes <http://webkit.org/b/57950> JavaScriptCoreGenerated's file-copying logic is hard to
784         modify and noisy
785
786         Reviewed by Steve Falkenburg.
787
788         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Moved logic to copy
789         files from here...
790         * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: ...to here. (Added.)
791
792         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Added copy-files.cmd
793         for convenience.
794
795 2011-04-05  Geoffrey Garen  <ggaren@apple.com>
796
797         Try to fix the Windows build.
798
799         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Who likes export files? I do!
800
801 2011-04-05  Geoffrey Garen  <ggaren@apple.com>
802
803         Reviewed by Oliver Hunt.
804
805         Introduced the concept of opaque roots, in preparation for marking the DOM with them
806         https://bugs.webkit.org/show_bug.cgi?id=57903
807
808         * JavaScriptCore.exp: Who likes export files? I do!
809
810         * collector/handles/HandleHeap.cpp:
811         (JSC::isValidWeakHandle): Factored out a helper function for ASSERTs.
812
813         (JSC::WeakHandleOwner::~WeakHandleOwner): Moved from header to avoid
814         weak linkage problems.
815
816         (JSC::WeakHandleOwner::isReachableFromOpaqueRoots): New callback.
817         Currently unused.
818
819         (JSC::WeakHandleOwner::finalize): Switched from pure virtual to a
820         default empty implementation, since not all clients necessarily want
821         or need non-trivial finalizers.
822
823         (JSC::HandleHeap::markWeakHandles): Split updateWeakHandles into two
824         passes. The first pass marks all reachable weak handles. The second pass
825         finalizes all unreachable weak handles. This must be two passes because
826         we don't know the set of finalizable weak handles until we're done
827         marking all weak handles.
828
829         (JSC::HandleHeap::finalizeWeakHandles): Use new helper function.
830
831         * collector/handles/HandleHeap.h: Ditto.
832
833         * runtime/Heap.cpp: 
834         (JSC::Heap::destroy):
835         (JSC::Heap::markRoots):
836         (JSC::Heap::reset): Split out handle marking from handle finalization.
837
838         * runtime/MarkStack.cpp:
839         (JSC::MarkStack::reset):
840         * runtime/MarkStack.h:
841         (JSC::MarkStack::addOpaqueRoot):
842         (JSC::MarkStack::containsOpaqueRoot):
843         (JSC::MarkStack::opaqueRootCount):
844         (JSC::HeapRootMarker::markStack): New helper functions for managing the
845         set of opaque roots.
846
847         * runtime/WeakGCMap.h:
848         (JSC::WeakGCMap::finalize): Renamed to match parent class declaration.
849
850 2011-04-05  Balazs Kelemen  <kbalazs@webkit.org>
851
852         Reviewed by Darin Adler.
853
854         Build fix for YarrParser.h
855         https://bugs.webkit.org/show_bug.cgi?id=57822
856
857         * yarr/YarrParser.h:
858         (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
859
860 2011-04-05  Steve Falkenburg  <sfalken@apple.com>
861
862         Follow-up Windows build fix.
863         Don't skip react-to-vsprops-changes.py for all production builds,
864         only those initiated via JavaScriptCore.make.
865
866         * JavaScriptCore.vcproj/JavaScriptCore.make:
867         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
868
869 2011-04-05  Oliver Hunt  <oliver@apple.com>
870
871         Reviewed by Darin Adler.
872
873         REGRESSION (r82849): 85,000+ JSC-related leaks seen on SnowLeopard Intel Leaks
874         https://bugs.webkit.org/show_bug.cgi?id=57857
875
876         Whoops, accidentally removed a deref().
877
878         * bytecode/StructureStubInfo.cpp:
879         (JSC::StructureStubInfo::deref):
880
881 2011-04-05  Steve Falkenburg  <sfalken@apple.com>
882
883         Windows build fix.
884
885         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add per-configuration vsprops files.
886         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Removed inheritance from common.vsprops.
887         Set production environment variable before calling make.
888         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebug.vsprops: Added.
889         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugAll.vsprops: Added.
890         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugCairoCFLite.vsprops: Added.
891         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedProduction.vsprops: Added.
892         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedRelease.vsprops: Added.
893         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleaseCairoCFLite.vsprops: Added.
894         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleasePGO.vsprops: Added.
895
896 2011-04-05  Oliver Hunt  <oliver@apple.com>
897
898         Reviewed by Gavin Barraclough.
899
900         Make caches window show more info about non-jsobject GC values
901         https://bugs.webkit.org/show_bug.cgi?id=57874
902
903         Add ClassInfo to the various internal JS types that currently
904         don't have any, and make the text for caches window show the
905         classname for non-JSObject instances.
906
907         * runtime/Executable.cpp:
908         * runtime/Executable.h:
909         (JSC::ExecutableBase::createStructure):
910         (JSC::NativeExecutable::createStructure):
911         (JSC::NativeExecutable::NativeExecutable):
912         (JSC::EvalExecutable::createStructure):
913         (JSC::ProgramExecutable::createStructure):
914         (JSC::FunctionExecutable::createStructure):
915         * runtime/Heap.cpp:
916         (JSC::TypeCounter::typeName):
917         * runtime/JSGlobalData.cpp:
918         (JSC::JSGlobalData::JSGlobalData):
919         * runtime/JSGlobalData.h:
920         * runtime/ScopeChain.cpp:
921         * runtime/ScopeChain.h:
922         (JSC::ScopeChainNode::createStructure):
923         * runtime/StructureChain.cpp:
924         * runtime/StructureChain.h:
925         (JSC::StructureChain::createStructure):
926
927 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
928
929         Reviewed by Andreas Kling.
930
931         Cleanup StringConcatenate
932         https://bugs.webkit.org/show_bug.cgi?id=57836
933
934         Don't use PassRefPtr in local variables, properly store in RefPtrs and release on return.
935         Add a makeString() variant taking 9 arguments, needed by a follow-up patch.
936
937         * wtf/text/StringConcatenate.h:
938         (WTF::tryMakeString):
939         (WTF::makeString):
940
941 2011-04-04  Sheriff Bot  <webkit.review.bot@gmail.com>
942
943         Unreviewed, rolling out r82876.
944         http://trac.webkit.org/changeset/82876
945         https://bugs.webkit.org/show_bug.cgi?id=57816
946
947         Caused a lot of test crashes (Requested by tkent on #webkit).
948
949         * JavaScriptCore.exp:
950         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
951         * wtf/FastMalloc.cpp:
952         (WTF::tryFastMalloc):
953         (WTF::fastMalloc):
954         (WTF::tryFastCalloc):
955         (WTF::fastCalloc):
956         (WTF::fastFree):
957         (WTF::tryFastRealloc):
958         (WTF::fastRealloc):
959         (WTF::fastMallocSize):
960         (WTF::TCMalloc_PageHeap::isScavengerSuspended):
961         (WTF::TCMalloc_PageHeap::scheduleScavenger):
962         (WTF::TCMalloc_PageHeap::suspendScavenger):
963         (WTF::TCMalloc_PageHeap::signalScavenger):
964         (WTF::TCMallocStats::malloc):
965         (WTF::TCMallocStats::free):
966         (WTF::TCMallocStats::fastCalloc):
967         (WTF::TCMallocStats::tryFastCalloc):
968         (WTF::TCMallocStats::calloc):
969         (WTF::TCMallocStats::fastRealloc):
970         (WTF::TCMallocStats::tryFastRealloc):
971         (WTF::TCMallocStats::realloc):
972         (WTF::TCMallocStats::fastMallocSize):
973         * wtf/FastMalloc.h:
974         (WTF::Internal::fastMallocMatchValidationType):
975         (WTF::Internal::fastMallocMatchValidationValue):
976         (WTF::Internal::setFastMallocMatchValidationType):
977         (WTF::fastMallocMatchValidateFree):
978         * wtf/Platform.h:
979
980 2011-04-04  Oliver Hunt  <oliver@apple.com>
981
982         Reviewed by Antti Koivisto.
983
984         Stop JSCell.h from including Structure.h
985         https://bugs.webkit.org/show_bug.cgi?id=57809
986
987         * runtime/GetterSetter.h:
988         * runtime/JSAPIValueWrapper.h:
989         * runtime/JSCell.h:
990         (JSC::JSCell::JSValue::toThisObject):
991         * runtime/JSString.h:
992         * runtime/ScopeChain.h:
993         * runtime/Structure.h:
994         (JSC::JSCell::isObject):
995         (JSC::JSCell::isString):
996         (JSC::JSCell::classInfo):
997         (JSC::JSCell::createDummyStructure):
998         (JSC::JSValue::needsThisConversion):
999         (JSC::MarkStack::internalAppend):
1000         * runtime/StructureChain.h:
1001
1002 2011-04-04  Oliver Hunt  <oliver@apple.com>
1003
1004         Fix clang build.
1005
1006         * wtf/FastMalloc.cpp:
1007         (WTF::fastMalloc):
1008         (WTF::fastCalloc):
1009         (WTF::fastRealloc):
1010
1011 2011-04-04  Oliver Hunt  <oliver@apple.com>
1012
1013         Remove accidental change to Platform.h
1014
1015         * wtf/Platform.h:
1016
1017 2011-04-04  Geoffrey Garen  <ggaren@apple.com>
1018
1019         Reviewed by Oliver Hunt.
1020
1021         Fixed a weak-handle-related leak in RegisterFile
1022         https://bugs.webkit.org/show_bug.cgi?id=57793
1023
1024         * interpreter/RegisterFile.cpp: Nixed leaky GlobalObjectNotifier.
1025         * interpreter/RegisterFile.h:
1026         (JSC::RegisterFile::GlobalObjectOwner::finalize):
1027         (JSC::RegisterFile::RegisterFile): Replaced GlobalObjectNotifier with
1028         a per-RegisterFile weak handle owner, which does not leak.
1029
1030         * runtime/WeakGCPtr.h:
1031         (JSC::WeakGCPtr::set): Allow set() to take a context argument, since
1032         RegisterFile now needs this. (Seems like it was an accidental omission
1033         all along.)
1034
1035 2011-04-04  Oliver Hunt  <oliver@apple.com>
1036
1037         Reviewed by Geoffrey Garen.
1038
1039         Make malloc validation useful
1040         https://bugs.webkit.org/show_bug.cgi?id=57502
1041
1042         This patch changes FAST_MALLOC_MATCH_VALIDATION with a general
1043         corruption check that tags the beginning and end of all allocations
1044         to check for write overflows and overwrites the contents of
1045         memory on free in order to (hopefully) show up use-after-free issues
1046         sooner.
1047
1048         We also turn it on by default for debug builds.
1049
1050         * JavaScriptCore.exp:
1051         * wtf/FastMalloc.cpp:
1052         (WTF::tryFastMalloc):
1053         (WTF::fastMalloc):
1054         (WTF::tryFastCalloc):
1055         (WTF::fastCalloc):
1056         (WTF::fastFree):
1057         (WTF::tryFastRealloc):
1058         (WTF::fastRealloc):
1059         (WTF::TCMalloc_PageHeap::isScavengerSuspended):
1060         (WTF::TCMalloc_PageHeap::scheduleScavenger):
1061         (WTF::TCMalloc_PageHeap::suspendScavenger):
1062         (WTF::TCMalloc_PageHeap::signalScavenger):
1063         (WTF::TCMallocStats::malloc):
1064         (WTF::TCMallocStats::free):
1065         (WTF::TCMallocStats::fastCalloc):
1066         (WTF::TCMallocStats::tryFastCalloc):
1067         (WTF::TCMallocStats::calloc):
1068         (WTF::TCMallocStats::fastRealloc):
1069         (WTF::TCMallocStats::tryFastRealloc):
1070         (WTF::TCMallocStats::realloc):
1071         * wtf/FastMalloc.h:
1072         (WTF::Internal::fastMallocValidationHeader):
1073         (WTF::Internal::fastMallocValidationSuffix):
1074         (WTF::Internal::fastMallocMatchValidationType):
1075         (WTF::Internal::setFastMallocMatchValidationType):
1076         (WTF::fastMallocMatchValidateFree):
1077         (WTF::fastMallocValidate):
1078         * wtf/Platform.h:
1079
1080 2011-04-04  Geoffrey Garen  <ggaren@apple.com>
1081
1082         Reviewed by Oliver Hunt.
1083
1084         Renamed clearWeakPointers => updateWeakHandles and removed misleading comment
1085         https://bugs.webkit.org/show_bug.cgi?id=57790
1086
1087         * collector/handles/HandleHeap.cpp:
1088         (JSC::HandleHeap::updateWeakHandles): Updated for rename.
1089
1090         * collector/handles/HandleHeap.h: Removed comment claiming that this
1091         function should only be called during teardown, because it's actually
1092         called after every GC pass.
1093
1094         * runtime/Heap.cpp:
1095         (JSC::Heap::destroy):
1096         (JSC::Heap::markRoots): Updated for rename.
1097
1098 2011-04-04  Geoffrey Garen  <ggaren@apple.com>
1099
1100         Reviewed by Oliver Hunt.
1101
1102         Standardized handling of handles for immediate values
1103         https://bugs.webkit.org/show_bug.cgi?id=57788
1104
1105         * collector/handles/HandleHeap.cpp:
1106         (JSC::HandleHeap::clearWeakPointers): Don't check for null or non-cell
1107         values here, because our write barrier guarantees that such values are
1108         not in the weak list.
1109
1110         (JSC::HandleHeap::writeBarrier): Standardized on checking for null before
1111         checking for cell, and on using early return instead of if/else.
1112
1113         * collector/handles/HandleHeap.h:
1114         (JSC::HandleHeap::deallocate):
1115         (JSC::HandleHeap::makeWeak): Ditto.
1116
1117 2011-04-04  Geoffrey Garen  <ggaren@apple.com>
1118
1119         Not reviewed.
1120
1121         Removed a redundant variable from HandleHeap
1122         https://bugs.webkit.org/show_bug.cgi?id=57786
1123         
1124         Forgot to commit the file that actually removes the data member!
1125         
1126         * collector/handles/HandleHeap.h:
1127
1128 2011-04-04  Geoffrey Garen  <ggaren@apple.com>
1129
1130         Reviewed by Oliver Hunt.
1131
1132         Removed a redundant variable from HandleHeap
1133         https://bugs.webkit.org/show_bug.cgi?id=57786
1134         
1135         We don't need a specific variable to indicate that we're in the middle
1136         of the finalization phase, since m_nextToFinalize already does this.
1137
1138         * collector/handles/HandleHeap.cpp:
1139         (JSC::HandleHeap::HandleHeap):
1140         (JSC::HandleHeap::clearWeakPointers):
1141         (JSC::HandleHeap::writeBarrier):
1142
1143 2011-04-04  Geoffrey Garen  <ggaren@apple.com>
1144
1145         Reviewed by Oliver Hunt.
1146
1147         Renamed Finalizer => WeakHandleOwner (in preparation for adding a reachability callback)
1148         https://bugs.webkit.org/show_bug.cgi?id=57775
1149         
1150         Also renamed noFinalizer => emptyWeakOwner, since this is really an
1151         optimization for a weak owner with empty callbacks.
1152
1153         * collector/handles/HandleHeap.cpp:
1154         (JSC::HandleHeap::clearWeakPointers): Updated for renames. Removed
1155         redundant initialization of m_nextToFinalize. Moved deletion check inside
1156         weak owner check, since the weak owner can't delete the node if there is
1157         no weak owner!
1158
1159         * collector/handles/HandleHeap.h:
1160         (JSC::WeakHandleOwner::~WeakHandleOwner):
1161         (JSC::HandleHeap::makeWeak): Updated for renames.
1162
1163         (JSC::HandleHeap::hasWeakOwner): Changed getFinalizer to hasWeakOwner,
1164         to clarify this function's role in assertions.
1165
1166         (JSC::HandleHeap::Node::Node):
1167         (JSC::HandleHeap::Node::makeWeak):
1168         (JSC::HandleHeap::Node::isWeak):
1169         (JSC::HandleHeap::Node::weakOwner):
1170         (JSC::HandleHeap::Node::weakOwnerContext):
1171         (JSC::HandleHeap::Node::emptyWeakOwner):
1172         * interpreter/RegisterFile.cpp:
1173         (JSC::RegisterFile::globalObjectCollectedNotifier):
1174         * interpreter/RegisterFile.h:
1175         * runtime/WeakGCMap.h:
1176         * runtime/WeakGCPtr.h:
1177         (JSC::WeakGCPtr::WeakGCPtr):
1178         (JSC::WeakGCPtr::set): Updated for renames.
1179
1180 2011-04-04  Oliver Hunt  <oliver@apple.com>
1181
1182         Fix WinCE build.
1183
1184         * bytecode/Instruction.h:
1185         * interpreter/Interpreter.cpp:
1186         (JSC::Interpreter::tryCachePutByID):
1187         (JSC::Interpreter::tryCacheGetByID):
1188
1189 2011-04-04  Adam Roben  <aroben@apple.com>
1190
1191         Delete mt.dep files when doing a clean build due to .vsprops file changes
1192
1193         Apparently this is yet another file that Visual Studio can't figure out it needs to rebuild.
1194
1195         Fixes <http://webkit.org/b/57777> r82850 failed to build on Windows Debug (Build)
1196
1197         Reviewed by Brian Weinstein.
1198
1199         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
1200         (main): Added dep to the list of extensions we look for when choosing files to delete.
1201
1202 2011-04-01  Oliver Hunt  <oliver@apple.com>
1203
1204         Reviewed by Geoffrey Garen.
1205
1206         Make StructureChain GC allocated
1207         https://bugs.webkit.org/show_bug.cgi?id=56695
1208
1209         Make StructureChain GC allocated, and make the various owners
1210         mark it correctly.
1211
1212         * JavaScriptCore.exp:
1213         * bytecode/CodeBlock.cpp:
1214         (JSC::CodeBlock::dump):
1215         (JSC::CodeBlock::derefStructures):
1216         (JSC::CodeBlock::refStructures):
1217         (JSC::CodeBlock::markAggregate):
1218         * bytecode/Instruction.h:
1219         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
1220         (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
1221         (JSC::PolymorphicAccessStructureList::derefStructures):
1222         (JSC::PolymorphicAccessStructureList::markAggregate):
1223         (JSC::Instruction::Instruction):
1224         * bytecode/StructureStubInfo.cpp:
1225         (JSC::StructureStubInfo::deref):
1226         (JSC::StructureStubInfo::markAggregate):
1227         * bytecode/StructureStubInfo.h:
1228         (JSC::StructureStubInfo::initGetByIdChain):
1229         (JSC::StructureStubInfo::initPutByIdTransition):
1230         * bytecompiler/BytecodeGenerator.cpp:
1231         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
1232         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
1233         * collector/handles/Handle.h:
1234         (JSC::HandleConverter::operator->):
1235         (JSC::HandleConverter::operator*):
1236         * interpreter/Interpreter.cpp:
1237         (JSC::Interpreter::privateExecute):
1238         * jit/JITOpcodes.cpp:
1239         (JSC::JIT::emit_op_jneq_ptr):
1240         * jit/JITOpcodes32_64.cpp:
1241         (JSC::JIT::emit_op_jneq_ptr):
1242         * jit/JITPropertyAccess.cpp:
1243         (JSC::JIT::privateCompileGetByIdChainList):
1244         * jit/JITPropertyAccess32_64.cpp:
1245         (JSC::JIT::privateCompileGetByIdChainList):
1246         * jit/JITStubs.cpp:
1247         (JSC::JITThunks::tryCachePutByID):
1248         (JSC::JITThunks::tryCacheGetByID):
1249         (JSC::getPolymorphicAccessStructureListSlot):
1250         (JSC::DEFINE_STUB_FUNCTION):
1251         * runtime/JSCell.h:
1252         * runtime/JSGlobalData.cpp:
1253         (JSC::JSGlobalData::JSGlobalData):
1254         * runtime/JSGlobalData.h:
1255         * runtime/JSGlobalObject.cpp:
1256         (JSC::markIfNeeded):
1257         * runtime/JSGlobalObject.h:
1258         (JSC::Structure::prototypeChain):
1259         * runtime/JSObject.h:
1260         (JSC::JSObject::putDirectInternal):
1261         (JSC::JSObject::markChildrenDirect):
1262         * runtime/JSPropertyNameIterator.cpp:
1263         (JSC::JSPropertyNameIterator::create):
1264         (JSC::JSPropertyNameIterator::get):
1265         (JSC::JSPropertyNameIterator::markChildren):
1266         * runtime/JSPropertyNameIterator.h:
1267         (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
1268         * runtime/JSZombie.cpp:
1269         (JSC::JSZombie::leakedZombieStructure):
1270         * runtime/JSZombie.h:
1271         * runtime/MarkStack.h:
1272         (JSC::MarkStack::append):
1273         * runtime/MarkedBlock.cpp:
1274         (JSC::MarkedBlock::sweep):
1275         * runtime/Structure.cpp:
1276         (JSC::Structure::addPropertyTransition):
1277         * runtime/Structure.h:
1278         (JSC::Structure::markAggregate):
1279         * runtime/StructureChain.cpp:
1280         (JSC::StructureChain::StructureChain):
1281         (JSC::StructureChain::~StructureChain):
1282         (JSC::StructureChain::markChildren):
1283         * runtime/StructureChain.h:
1284         (JSC::StructureChain::create):
1285         (JSC::StructureChain::createStructure):
1286         * runtime/WriteBarrier.h:
1287         (JSC::WriteBarrierBase::get):
1288         (JSC::WriteBarrierBase::operator*):
1289         (JSC::WriteBarrierBase::operator->):
1290
1291 2011-04-01  Geoffrey Garen  <ggaren@apple.com>
1292
1293         Reviewed by Oliver Hunt.
1294
1295         Removed some complexity from HandleHeap
1296         https://bugs.webkit.org/show_bug.cgi?id=57650
1297         
1298         Eliminated pointer-tagging flags.
1299         
1300         Tied being weak to having a finalizer (or at least a finalizer sentinel).
1301
1302         * collector/handles/HandleHeap.cpp:
1303         (JSC::HandleHeap::clearWeakPointers): Removed the special self-destroying
1304         flag. It was unused. If we bring it back, we'll probably use a shared
1305         autodeallocating finalizer instead.
1306
1307         * collector/handles/HandleHeap.h:
1308         (JSC::HandleHeap::makeWeak): makeWeak and adding a finalizer are now
1309         a single, atomic operation -- this makes the relationship between
1310         finalizers and weak pointers clearer, and impossible to get wrong.
1311
1312         (JSC::HandleHeap::Node::Node):
1313         (JSC::HandleHeap::Node::handleHeap): No more flags.
1314
1315         (JSC::HandleHeap::Node::makeWeak):
1316         (JSC::HandleHeap::Node::isWeak): Ditto above. We use a special sentienl
1317         value in the finalizer slot to indicate that a handle is weak but doesn't
1318         require an external function call for finalization.
1319
1320 2011-04-01  Geoffrey Garen  <ggaren@apple.com>
1321
1322         Reviewed by Oliver Hunt.
1323
1324         Removed WeakGCMap::deprecatedRemove because it was deprecated and unused
1325         https://bugs.webkit.org/show_bug.cgi?id=57648
1326
1327         * runtime/WeakGCMap.h:
1328
1329 2011-04-01  Adam Roben  <aroben@apple.com>
1330
1331         Maintain the invariant that Lexer::m_current is set to -1 when at the end of the code buffer
1332
1333         Covered by existing tests.
1334
1335         Fixes <http://webkit.org/b/56699>.
1336
1337         Reviewed by Oliver Hunt.
1338
1339         * parser/Lexer.h:
1340         (JSC::Lexer::setOffset): Copied code from Lexer::shift to update m_current, because
1341         supposedly the idiom that function uses is fast.
1342
1343 2011-03-31  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
1344
1345         Reviewed by Oliver Hunt.
1346
1347         SH4 JIT SUPPORT.
1348         https://bugs.webkit.org/show_bug.cgi?id=44329
1349
1350         Add YARR support for SH4 platforms (disabled by default).
1351
1352         * GNUmakefile.am:
1353         * assembler/MacroAssembler.h:
1354         * assembler/MacroAssemblerSH4.cpp: Added.
1355         * assembler/MacroAssemblerSH4.h: Added.
1356         * assembler/SH4Assembler.h: Added.
1357         * yarr/YarrJIT.cpp:
1358
1359 2011-03-30  Adam Roben  <aroben@apple.com>
1360
1361         Clean build fix
1362
1363         * JavaScriptCore.vcproj/JavaScriptCore.sln: Serialized project dependencies so projects
1364         don't try to build in parallel (which doesn't mesh with our buildfailed mechanism).
1365
1366 2011-03-30  Oliver Hunt  <oliver@apple.com>
1367
1368         Rollout r82500
1369
1370         * bytecode/CodeBlock.cpp:
1371         (JSC::CodeBlock::dump):
1372         (JSC::CodeBlock::derefStructures):
1373         (JSC::CodeBlock::refStructures):
1374         (JSC::CodeBlock::markAggregate):
1375         * bytecode/Instruction.h:
1376         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
1377         (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
1378         (JSC::PolymorphicAccessStructureList::derefStructures):
1379         (JSC::Instruction::Instruction):
1380         * bytecode/StructureStubInfo.cpp:
1381         (JSC::StructureStubInfo::deref):
1382         * bytecode/StructureStubInfo.h:
1383         (JSC::StructureStubInfo::initGetByIdChain):
1384         (JSC::StructureStubInfo::initPutByIdTransition):
1385         * bytecompiler/BytecodeGenerator.cpp:
1386         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
1387         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
1388         * interpreter/Interpreter.cpp:
1389         (JSC::Interpreter::privateExecute):
1390         * jit/JITOpcodes.cpp:
1391         (JSC::JIT::emit_op_jneq_ptr):
1392         * jit/JITOpcodes32_64.cpp:
1393         (JSC::JIT::emit_op_jneq_ptr):
1394         * jit/JITPropertyAccess.cpp:
1395         (JSC::JIT::privateCompileGetByIdChainList):
1396         * jit/JITPropertyAccess32_64.cpp:
1397         (JSC::JIT::privateCompileGetByIdChainList):
1398         * jit/JITStubs.cpp:
1399         (JSC::getPolymorphicAccessStructureListSlot):
1400         (JSC::DEFINE_STUB_FUNCTION):
1401         * runtime/JSCell.h:
1402         * runtime/JSGlobalData.cpp:
1403         (JSC::JSGlobalData::JSGlobalData):
1404         * runtime/JSGlobalData.h:
1405         * runtime/JSGlobalObject.cpp:
1406         (JSC::markIfNeeded):
1407         * runtime/JSGlobalObject.h:
1408         (JSC::Structure::prototypeChain):
1409         * runtime/JSObject.h:
1410         (JSC::JSObject::markChildrenDirect):
1411         * runtime/JSPropertyNameIterator.cpp:
1412         (JSC::JSPropertyNameIterator::create):
1413         (JSC::JSPropertyNameIterator::get):
1414         (JSC::JSPropertyNameIterator::markChildren):
1415         * runtime/JSPropertyNameIterator.h:
1416         (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
1417         * runtime/MarkStack.h:
1418         (JSC::MarkStack::append):
1419         * runtime/Structure.h:
1420         * runtime/StructureChain.cpp:
1421         (JSC::StructureChain::StructureChain):
1422         * runtime/StructureChain.h:
1423         (JSC::StructureChain::create):
1424
1425 2011-03-29  Matthew Delaney  <mdelaney@apple.com>
1426
1427         Reviewed by Simon Fraser.
1428
1429         Use the Accelerate vImage vectorized (un)premultiplyImageData functions for ImageBufferCG
1430
1431         https://bugs.webkit.org/show_bug.cgi?id=53134
1432
1433         * wtf/Platform.h: Added in WTF flag for using the Accelerate framework
1434
1435 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
1436
1437         Reviewed by Adam Roben.
1438
1439         Share most vsprops between Release and Production builds in releaseproduction.vsprops
1440         https://bugs.webkit.org/show_bug.cgi?id=57508
1441
1442         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops:
1443         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops:
1444         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops:
1445         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops:
1446         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops:
1447         * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops:
1448         * JavaScriptCore.vcproj/WTF/WTFRelease.vsprops:
1449         * JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops:
1450         * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops:
1451         * JavaScriptCore.vcproj/jsc/jscProduction.vsprops:
1452         * JavaScriptCore.vcproj/jsc/jscRelease.vsprops:
1453         * JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops:
1454         * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops:
1455         * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops:
1456         * JavaScriptCore.vcproj/testapi/testapiRelease.vsprops:
1457         * JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops:
1458
1459 2011-03-30  Mark Rowe  <mrowe@apple.com>
1460
1461         Reviewed by Adam Roben.
1462
1463         Explicitly prevent testapi and minidom from being installed rather than relying
1464         on Xcode's current behavior of not installing if INSTALL_PATH is not explicitly
1465         set at the target level.
1466
1467         <rdar://problem/9206357>
1468
1469         * JavaScriptCore.xcodeproj/project.pbxproj:
1470
1471 2011-03-30  Timur Iskhodzhanov  <timurrrr@google.com>
1472
1473         Reviewed by Alexey Proskuryakov.
1474
1475         Add some dynamic annotations to JavaScriptCore/wtf
1476         https://bugs.webkit.org/show_bug.cgi?id=53747
1477
1478         By using these annotations we can improve the precision of finding
1479         WebKit errors using dynamic analysis tools like ThreadSanitizer and Valgrind.
1480         These annotations don't affect the compiled binaries unless USE(DYNAMIC_ANNOTATIONS) is "1".
1481
1482         These files don't add new functionality, so don't need extra tests.
1483
1484         * GNUmakefile.am:
1485         * JavaScriptCore.gypi:
1486         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1487         * JavaScriptCore.xcodeproj/project.pbxproj:
1488         * wtf/CMakeLists.txt:
1489         * wtf/DynamicAnnotations.cpp: Added.
1490         (WTFAnnotateBenignRaceSized):
1491         (WTFAnnotateHappensBefore):
1492         (WTFAnnotateHappensAfter):
1493         * wtf/DynamicAnnotations.h: Added.
1494         * wtf/ThreadSafeRefCounted.h:
1495         (WTF::ThreadSafeRefCountedBase::derefBase):
1496         * wtf/text/StringStatics.cpp:
1497         (WTF::StringImpl::empty):
1498
1499 2011-03-30  Oliver Hunt  <oliver@apple.com>
1500
1501         Reviewed by Geoffrey Garen.
1502
1503         Make StructureChain GC allocated
1504         https://bugs.webkit.org/show_bug.cgi?id=56695
1505
1506         Make StructureChain GC allocated, and make the various owners
1507         mark it correctly.
1508
1509         * bytecode/CodeBlock.cpp:
1510         (JSC::CodeBlock::dump):
1511         (JSC::CodeBlock::derefStructures):
1512         (JSC::CodeBlock::refStructures):
1513         (JSC::CodeBlock::markAggregate):
1514         * bytecode/Instruction.h:
1515         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
1516         (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
1517         (JSC::PolymorphicAccessStructureList::derefStructures):
1518         (JSC::PolymorphicAccessStructureList::markAggregate):
1519         (JSC::Instruction::Instruction):
1520         * bytecode/StructureStubInfo.cpp:
1521         (JSC::StructureStubInfo::deref):
1522         (JSC::StructureStubInfo::markAggregate):
1523         * bytecode/StructureStubInfo.h:
1524         (JSC::StructureStubInfo::initGetByIdChain):
1525         (JSC::StructureStubInfo::initPutByIdTransition):
1526         * bytecompiler/BytecodeGenerator.cpp:
1527         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
1528         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
1529         * interpreter/Interpreter.cpp:
1530         (JSC::Interpreter::privateExecute):
1531         * jit/JITOpcodes.cpp:
1532         (JSC::JIT::emit_op_jneq_ptr):
1533         * jit/JITOpcodes32_64.cpp:
1534         (JSC::JIT::emit_op_jneq_ptr):
1535         * jit/JITPropertyAccess.cpp:
1536         (JSC::JIT::privateCompileGetByIdChainList):
1537         * jit/JITPropertyAccess32_64.cpp:
1538         (JSC::JIT::privateCompileGetByIdChainList):
1539         * jit/JITStubs.cpp:
1540         (JSC::getPolymorphicAccessStructureListSlot):
1541         (JSC::DEFINE_STUB_FUNCTION):
1542         * runtime/JSCell.h:
1543         * runtime/JSGlobalData.cpp:
1544         (JSC::JSGlobalData::JSGlobalData):
1545         * runtime/JSGlobalData.h:
1546         * runtime/JSGlobalObject.cpp:
1547         (JSC::markIfNeeded):
1548         * runtime/JSGlobalObject.h:
1549         (JSC::Structure::prototypeChain):
1550         * runtime/JSObject.h:
1551         (JSC::JSObject::markChildrenDirect):
1552         * runtime/JSPropertyNameIterator.cpp:
1553         (JSC::JSPropertyNameIterator::create):
1554         (JSC::JSPropertyNameIterator::get):
1555         (JSC::JSPropertyNameIterator::markChildren):
1556         * runtime/JSPropertyNameIterator.h:
1557         (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
1558         * runtime/MarkStack.h:
1559         (JSC::MarkStack::append):
1560         * runtime/Structure.h:
1561         (JSC::Structure::cachedPrototypeChainSlot):
1562         * runtime/StructureChain.cpp:
1563         (JSC::StructureChain::StructureChain):
1564         * runtime/StructureChain.h:
1565         (JSC::StructureChain::create):
1566         (JSC::StructureChain::createStructure):
1567
1568 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
1569
1570         Reviewed by Adam Roben.
1571
1572         Update Windows production build logic for new production configurations
1573         https://bugs.webkit.org/show_bug.cgi?id=57494
1574
1575         * JavaScriptCore.vcproj/JavaScriptCore.make:
1576         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops:
1577         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops:
1578         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops:
1579         * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops:
1580         * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops:
1581         * JavaScriptCore.vcproj/jsc/jscProduction.vsprops:
1582         * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops:
1583         * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops:
1584
1585 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
1586
1587         Reviewed by Adam Roben.
1588
1589         Rename Windows configuration Release_LTCG to Production for clarity
1590         https://bugs.webkit.org/show_bug.cgi?id=57465
1591
1592         * JavaScriptCore.vcproj/JavaScriptCore.sln:
1593         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1594         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
1595         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops.
1596         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops: Removed.
1597         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
1598         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1599         * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops.
1600         * JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops: Removed.
1601         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1602         * JavaScriptCore.vcproj/jsc/jscProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops.
1603         * JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops: Removed.
1604         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1605         * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops.
1606         * JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops: Removed.
1607
1608 2011-03-30  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
1609
1610         Reviewed by Maciej Stachowiak.
1611
1612         Add the NEXT_OPCODE() macro to the DFG-JIT parser
1613         https://bugs.webkit.org/show_bug.cgi?id=57322
1614
1615         In JavaScriptCore we use macros to jump to the next opcode
1616         (both in interpreter and JIT). This macro is added to the
1617         DFG-JIT parser as well.
1618
1619         * dfg/DFGByteCodeParser.cpp:
1620         (JSC::DFG::ByteCodeParser::parse):
1621
1622 2011-03-29  Geoffrey Garen  <ggaren@apple.com>
1623
1624         Reviewed by Darin Adler.
1625
1626         ~25% regression on v8-splay in the SunSpider harness
1627         https://bugs.webkit.org/show_bug.cgi?id=56128
1628         
1629         I'm not sure if this is the root cause of the regression Stephanie
1630         measured, but it seems to get us back to previous v8-splay times.
1631         
1632         SunSpider reports no change. v8-splay says 41% faster.
1633
1634         * runtime/Heap.cpp:
1635         (JSC::Heap::reset): Make marking proportional to 1X the size of the heap,
1636         not .5X the size of the heap. When the heap is large, this makes a big
1637         difference. (Our old heap growth policy matched this. You can see by
1638         looking at resizeBlocks in revisions prior to r77699.)
1639
1640 2011-03-29  Steve Falkenburg  <sfalken@apple.com>
1641
1642         Reviewed by Darin Adler.
1643
1644         Use per-configuration vsprops in JavaScriptCore to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
1645         https://bugs.webkit.org/show_bug.cgi?id=57350
1646         
1647         Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from
1648         InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within
1649         the IDE. To avoid this, add a separate vsprops file for each project configuration that
1650         contains the required inherited property sheets.
1651
1652         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1653         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops: Added.
1654         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops: Added.
1655         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops: Added.
1656         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops: Added.
1657         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops: Added.
1658         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops: Added.
1659         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops: Added.
1660         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops: Added.
1661         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1662         * JavaScriptCore.vcproj/WTF/WTFDebug.vsprops: Added.
1663         * JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops: Added.
1664         * JavaScriptCore.vcproj/WTF/WTFDebugCairoCFLite.vsprops: Added.
1665         * JavaScriptCore.vcproj/WTF/WTFRelease.vsprops: Added.
1666         * JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops: Added.
1667         * JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops: Added.
1668         * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops: Added.
1669         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1670         * JavaScriptCore.vcproj/jsc/jscDebug.vsprops: Added.
1671         * JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops: Added.
1672         * JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops: Added.
1673         * JavaScriptCore.vcproj/jsc/jscRelease.vsprops: Added.
1674         * JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops: Added.
1675         * JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops: Added.
1676         * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops: Added.
1677         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1678         * JavaScriptCore.vcproj/testapi/testapiDebug.vsprops: Added.
1679         * JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops: Added.
1680         * JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops: Added.
1681         * JavaScriptCore.vcproj/testapi/testapiRelease.vsprops: Added.
1682         * JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops: Added.
1683         * JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops: Added.
1684
1685 2011-03-29  Oliver Hunt  <oliver@apple.com>
1686
1687         Reviewed by Eric Seidel.
1688
1689         REGRESSION(r82173): Causes assertion and test failures in run-javascriptcore-tests on Windows (Requested by aroben on #webkit).
1690         https://bugs.webkit.org/show_bug.cgi?id=57333
1691
1692         constructDate now takes the global object explicitly as it may be called
1693         by functions other than the constructor itself.
1694
1695         * API/JSObjectRef.cpp:
1696         (JSObjectMakeDate):
1697         * runtime/DateConstructor.cpp:
1698         (JSC::constructDate):
1699         (JSC::constructWithDateConstructor):
1700         * runtime/DateConstructor.h:
1701
1702 2011-03-29  Ben Taylor  <bentaylor.solx86@gmail.com>
1703
1704         Reviewed by Benjamin Poulain.
1705
1706         https://bugs.webkit.org/show_bug.cgi?id=41953
1707
1708         Fix compile error on Solaris 10/Sun Studio 12 CC emanating from MathExtras.h
1709
1710         * wtf/MathExtras.h:
1711
1712 2011-03-29  Ben Taylor  <bentaylor.solx86@gmail.com>
1713
1714         Reviewed by Darin Adler.
1715
1716         https://bugs.webkit.org/show_bug.cgi?id=57231
1717         Add conditional for SUNCC supporting alignment macros
1718
1719         Compile fix for Solaris 10/Sun Studio 12 CC
1720
1721         * wtf/Vector.h:
1722
1723 2011-03-29  Ben Taylor  <bentaylor.solx86@gmail.com>
1724
1725         Reviewed by Darin Adler.
1726
1727         https://bugs.webkit.org/show_bug.cgi?id=57256
1728
1729         Fix crash on misaligned reads on Solaris 10/Sparc
1730
1731         * wtf/text/AtomicString.cpp:
1732         (WTF::equal):
1733
1734 2011-03-28  Oliver Hunt  <oliver@apple.com>
1735
1736         Reviewed by Geoffrey Garen.
1737
1738         instanceof Array test fails when using iframes
1739         https://bugs.webkit.org/show_bug.cgi?id=17250
1740
1741         This is a problem with all built in constructors, the use of
1742         lexicalGlobalObject rather than the constructors own 
1743         global object reference means that a builtin will always use
1744         the prototype from the lexical global object rather than that
1745         of the constructors origin.
1746
1747         * API/JSObjectRef.cpp:
1748         (JSObjectMakeFunction):
1749         (JSObjectMakeRegExp):
1750         * JavaScriptCore.exp:
1751         * runtime/ArrayConstructor.cpp:
1752         (JSC::constructArrayWithSizeQuirk):
1753         * runtime/BooleanConstructor.cpp:
1754         (JSC::constructBoolean):
1755         (JSC::constructBooleanFromImmediateBoolean):
1756         * runtime/BooleanConstructor.h:
1757         * runtime/DateConstructor.cpp:
1758         (JSC::constructDate):
1759         * runtime/DateInstance.cpp:
1760         * runtime/DateInstance.h:
1761         * runtime/ErrorConstructor.cpp:
1762         (JSC::constructWithErrorConstructor):
1763         (JSC::callErrorConstructor):
1764         * runtime/FunctionConstructor.cpp:
1765         (JSC::constructWithFunctionConstructor):
1766         (JSC::callFunctionConstructor):
1767         (JSC::constructFunction):
1768         * runtime/FunctionConstructor.h:
1769         * runtime/JSCell.cpp:
1770         (JSC::JSCell::getOwnPropertySlot):
1771         (JSC::JSCell::put):
1772         (JSC::JSCell::deleteProperty):
1773         (JSC::JSCell::toThisObject):
1774         (JSC::JSCell::toObject):
1775         * runtime/JSCell.h:
1776         (JSC::JSCell::JSValue::toObject):
1777         * runtime/JSNotAnObject.cpp:
1778         (JSC::JSNotAnObject::toObject):
1779         * runtime/JSNotAnObject.h:
1780         * runtime/JSObject.cpp:
1781         (JSC::JSObject::toObject):
1782         * runtime/JSObject.h:
1783         * runtime/JSString.cpp:
1784         (JSC::StringObject::create):
1785         (JSC::JSString::toObject):
1786         (JSC::JSString::toThisObject):
1787         * runtime/JSString.h:
1788         * runtime/JSValue.cpp:
1789         (JSC::JSValue::toObjectSlowCase):
1790         (JSC::JSValue::toThisObjectSlowCase):
1791         (JSC::JSValue::synthesizeObject):
1792         * runtime/JSValue.h:
1793         * runtime/NumberConstructor.cpp:
1794         (JSC::constructWithNumberConstructor):
1795         * runtime/NumberObject.cpp:
1796         (JSC::constructNumber):
1797         * runtime/NumberObject.h:
1798         * runtime/ObjectConstructor.cpp:
1799         (JSC::constructObject):
1800         (JSC::constructWithObjectConstructor):
1801         (JSC::callObjectConstructor):
1802         * runtime/RegExpConstructor.cpp:
1803         (JSC::constructRegExp):
1804         (JSC::constructWithRegExpConstructor):
1805         (JSC::callRegExpConstructor):
1806         * runtime/RegExpConstructor.h:
1807         * runtime/StringConstructor.cpp:
1808         (JSC::constructWithStringConstructor):
1809         * runtime/StringObject.h:
1810
1811 2011-03-28  Geoffrey Garen  <ggaren@apple.com>
1812
1813         Reviewed by Oliver Hunt.
1814
1815         REGRESSION [r78794-r79249] Allocation of memory is slow when number of active objects is large
1816         https://bugs.webkit.org/show_bug.cgi?id=56823
1817         
1818         Partial fix for most of the problem. (TOT still shows a regression, though.)
1819
1820         * runtime/Heap.cpp:
1821         (JSC::Heap::reportExtraMemoryCostSlowCase): Use highWaterMark(), instead of
1822         capacity(), since capacity() is O(n) relative to the size of the heap.
1823
1824         In limited circumstances, capacity() is also worse than highWaterMark()
1825         for measuring extra cost relative to heap size, since capacity() only
1826         measures the *current* capacity of the heap, but the heap will grow if
1827         necessary to attain highWaterMark().
1828
1829 2011-03-28  Oliver Hunt  <oliver@apple.com>
1830
1831         REGRESSION(r82130): It made all tests crash (Requested by Ossy on #webkit).
1832         https://bugs.webkit.org/show_bug.cgi?id=57251
1833
1834         Build fix, had remnant of another patch in r82130
1835
1836         * jit/JITPropertyAccess.cpp:
1837         (JSC::JIT::privateCompileGetByIdChainList):
1838
1839 2011-03-27  Oliver Hunt  <oliver@apple.com>
1840
1841         Reviewed by Maciej Stachowiak.
1842
1843         Add additional immediate types to allow us to distinguish the source of a JIT immediate
1844         https://bugs.webkit.org/show_bug.cgi?id=57190
1845
1846         Allow us to distinguish whether a JIT immediate is a value that we
1847         control (TrustedImm32 and TrustedImmPtr) vs. ones that can be controlled
1848         or influenced by code we are compiling.  Currently we do nothing with this
1849         information -- this change is large and mechanical but would obscure any
1850         logic changes that we would have made.
1851
1852         * assembler/AbstractMacroAssembler.h:
1853         (JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):
1854         (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
1855         (JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32):
1856         (JSC::AbstractMacroAssembler::Imm32::Imm32):
1857         * assembler/MacroAssembler.h:
1858         (JSC::MacroAssembler::pop):
1859         (JSC::MacroAssembler::poke):
1860         (JSC::MacroAssembler::branchPtr):
1861         (JSC::MacroAssembler::branch32):
1862         (JSC::MacroAssembler::addPtr):
1863         (JSC::MacroAssembler::andPtr):
1864         (JSC::MacroAssembler::orPtr):
1865         (JSC::MacroAssembler::subPtr):
1866         (JSC::MacroAssembler::xorPtr):
1867         (JSC::MacroAssembler::setPtr):
1868         (JSC::MacroAssembler::storePtr):
1869         (JSC::MacroAssembler::branchTestPtr):
1870         (JSC::MacroAssembler::branchSubPtr):
1871         (JSC::MacroAssembler::branchTest8):
1872         * assembler/MacroAssemblerARM.h:
1873         (JSC::MacroAssemblerARM::add32):
1874         (JSC::MacroAssemblerARM::and32):
1875         (JSC::MacroAssemblerARM::lshift32):
1876         (JSC::MacroAssemblerARM::mul32):
1877         (JSC::MacroAssemblerARM::or32):
1878         (JSC::MacroAssemblerARM::rshift32):
1879         (JSC::MacroAssemblerARM::urshift32):
1880         (JSC::MacroAssemblerARM::sub32):
1881         (JSC::MacroAssemblerARM::xor32):
1882         (JSC::MacroAssemblerARM::store32):
1883         (JSC::MacroAssemblerARM::push):
1884         (JSC::MacroAssemblerARM::move):
1885         (JSC::MacroAssemblerARM::branch8):
1886         (JSC::MacroAssemblerARM::branch32):
1887         (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
1888         (JSC::MacroAssemblerARM::branch16):
1889         (JSC::MacroAssemblerARM::branchTest8):
1890         (JSC::MacroAssemblerARM::branchTest32):
1891         (JSC::MacroAssemblerARM::branchAdd32):
1892         (JSC::MacroAssemblerARM::branchMul32):
1893         (JSC::MacroAssemblerARM::branchSub32):
1894         (JSC::MacroAssemblerARM::set32Compare32):
1895         (JSC::MacroAssemblerARM::set8Compare32):
1896         (JSC::MacroAssemblerARM::set32Test32):
1897         (JSC::MacroAssemblerARM::set32Test8):
1898         (JSC::MacroAssemblerARM::moveWithPatch):
1899         (JSC::MacroAssemblerARM::branchPtrWithPatch):
1900         (JSC::MacroAssemblerARM::storePtrWithPatch):
1901         * assembler/MacroAssemblerARMv7.h:
1902         (JSC::MacroAssemblerARMv7::add32):
1903         (JSC::MacroAssemblerARMv7::and32):
1904         (JSC::MacroAssemblerARMv7::lshift32):
1905         (JSC::MacroAssemblerARMv7::mul32):
1906         (JSC::MacroAssemblerARMv7::or32):
1907         (JSC::MacroAssemblerARMv7::rshift32):
1908         (JSC::MacroAssemblerARMv7::urshift32):
1909         (JSC::MacroAssemblerARMv7::sub32):
1910         (JSC::MacroAssemblerARMv7::xor32):
1911         (JSC::MacroAssemblerARMv7::load32):
1912         (JSC::MacroAssemblerARMv7::load32WithAddressOffsetPatch):
1913         (JSC::MacroAssemblerARMv7::load16):
1914         (JSC::MacroAssemblerARMv7::store32WithAddressOffsetPatch):
1915         (JSC::MacroAssemblerARMv7::store32):
1916         (JSC::MacroAssemblerARMv7::loadDouble):
1917         (JSC::MacroAssemblerARMv7::storeDouble):
1918         (JSC::MacroAssemblerARMv7::push):
1919         (JSC::MacroAssemblerARMv7::move):
1920         (JSC::MacroAssemblerARMv7::compare32):
1921         (JSC::MacroAssemblerARMv7::test32):
1922         (JSC::MacroAssemblerARMv7::branch32):
1923         (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
1924         (JSC::MacroAssemblerARMv7::branch16):
1925         (JSC::MacroAssemblerARMv7::branch8):
1926         (JSC::MacroAssemblerARMv7::branchTest32):
1927         (JSC::MacroAssemblerARMv7::branchTest8):
1928         (JSC::MacroAssemblerARMv7::branchAdd32):
1929         (JSC::MacroAssemblerARMv7::branchMul32):
1930         (JSC::MacroAssemblerARMv7::branchSub32):
1931         (JSC::MacroAssemblerARMv7::nearCall):
1932         (JSC::MacroAssemblerARMv7::call):
1933         (JSC::MacroAssemblerARMv7::set32Compare32):
1934         (JSC::MacroAssemblerARMv7::set8Compare32):
1935         (JSC::MacroAssemblerARMv7::set32Test32):
1936         (JSC::MacroAssemblerARMv7::set32Test8):
1937         (JSC::MacroAssemblerARMv7::moveWithPatch):
1938         (JSC::MacroAssemblerARMv7::branchPtrWithPatch):
1939         (JSC::MacroAssemblerARMv7::storePtrWithPatch):
1940         (JSC::MacroAssemblerARMv7::tailRecursiveCall):
1941         (JSC::MacroAssemblerARMv7::makeJump):
1942         (JSC::MacroAssemblerARMv7::makeBranch):
1943         (JSC::MacroAssemblerARMv7::setupArmAddress):
1944         (JSC::MacroAssemblerARMv7::makeBaseIndexBase):
1945         (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
1946         * assembler/MacroAssemblerMIPS.h:
1947         (JSC::MacroAssemblerMIPS::add32):
1948         (JSC::MacroAssemblerMIPS::and32):
1949         (JSC::MacroAssemblerMIPS::lshift32):
1950         (JSC::MacroAssemblerMIPS::mul32):
1951         (JSC::MacroAssemblerMIPS::or32):
1952         (JSC::MacroAssemblerMIPS::rshift32):
1953         (JSC::MacroAssemblerMIPS::urshift32):
1954         (JSC::MacroAssemblerMIPS::sub32):
1955         (JSC::MacroAssemblerMIPS::xor32):
1956         (JSC::MacroAssemblerMIPS::load32):
1957         (JSC::MacroAssemblerMIPS::load32WithAddressOffsetPatch):
1958         (JSC::MacroAssemblerMIPS::store32WithAddressOffsetPatch):
1959         (JSC::MacroAssemblerMIPS::store32):
1960         (JSC::MacroAssemblerMIPS::push):
1961         (JSC::MacroAssemblerMIPS::move):
1962         (JSC::MacroAssemblerMIPS::branch8):
1963         (JSC::MacroAssemblerMIPS::branch32):
1964         (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
1965         (JSC::MacroAssemblerMIPS::branch16):
1966         (JSC::MacroAssemblerMIPS::branchTest32):
1967         (JSC::MacroAssemblerMIPS::branchTest8):
1968         (JSC::MacroAssemblerMIPS::branchAdd32):
1969         (JSC::MacroAssemblerMIPS::branchMul32):
1970         (JSC::MacroAssemblerMIPS::branchSub32):
1971         (JSC::MacroAssemblerMIPS::set8Compare32):
1972         (JSC::MacroAssemblerMIPS::set32Compare32):
1973         (JSC::MacroAssemblerMIPS::set32Test8):
1974         (JSC::MacroAssemblerMIPS::set32Test32):
1975         (JSC::MacroAssemblerMIPS::moveWithPatch):
1976         (JSC::MacroAssemblerMIPS::branchPtrWithPatch):
1977         (JSC::MacroAssemblerMIPS::storePtrWithPatch):
1978         (JSC::MacroAssemblerMIPS::tailRecursiveCall):
1979         (JSC::MacroAssemblerMIPS::loadDouble):
1980         (JSC::MacroAssemblerMIPS::storeDouble):
1981         (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32):
1982         * assembler/MacroAssemblerX86.h:
1983         (JSC::MacroAssemblerX86::add32):
1984         (JSC::MacroAssemblerX86::addWithCarry32):
1985         (JSC::MacroAssemblerX86::and32):
1986         (JSC::MacroAssemblerX86::or32):
1987         (JSC::MacroAssemblerX86::sub32):
1988         (JSC::MacroAssemblerX86::store32):
1989         (JSC::MacroAssemblerX86::branch32):
1990         (JSC::MacroAssemblerX86::moveWithPatch):
1991         (JSC::MacroAssemblerX86::branchPtrWithPatch):
1992         (JSC::MacroAssemblerX86::storePtrWithPatch):
1993         * assembler/MacroAssemblerX86Common.h:
1994         (JSC::MacroAssemblerX86Common::add32):
1995         (JSC::MacroAssemblerX86Common::and32):
1996         (JSC::MacroAssemblerX86Common::lshift32):
1997         (JSC::MacroAssemblerX86Common::mul32):
1998         (JSC::MacroAssemblerX86Common::or32):
1999         (JSC::MacroAssemblerX86Common::rshift32):
2000         (JSC::MacroAssemblerX86Common::urshift32):
2001         (JSC::MacroAssemblerX86Common::sub32):
2002         (JSC::MacroAssemblerX86Common::xor32):
2003         (JSC::MacroAssemblerX86Common::store32):
2004         (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32):
2005         (JSC::MacroAssemblerX86Common::push):
2006         (JSC::MacroAssemblerX86Common::move):
2007         (JSC::MacroAssemblerX86Common::branch8):
2008         (JSC::MacroAssemblerX86Common::branch32):
2009         (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
2010         (JSC::MacroAssemblerX86Common::branch16):
2011         (JSC::MacroAssemblerX86Common::branchTest32):
2012         (JSC::MacroAssemblerX86Common::branchTest8):
2013         (JSC::MacroAssemblerX86Common::branchAdd32):
2014         (JSC::MacroAssemblerX86Common::branchMul32):
2015         (JSC::MacroAssemblerX86Common::branchSub32):
2016         (JSC::MacroAssemblerX86Common::set8Compare32):
2017         (JSC::MacroAssemblerX86Common::set32Compare32):
2018         (JSC::MacroAssemblerX86Common::set32Test8):
2019         (JSC::MacroAssemblerX86Common::set32Test32):
2020         * assembler/MacroAssemblerX86_64.h:
2021         (JSC::MacroAssemblerX86_64::add32):
2022         (JSC::MacroAssemblerX86_64::and32):
2023         (JSC::MacroAssemblerX86_64::or32):
2024         (JSC::MacroAssemblerX86_64::sub32):
2025         (JSC::MacroAssemblerX86_64::loadDouble):
2026         (JSC::MacroAssemblerX86_64::addDouble):
2027         (JSC::MacroAssemblerX86_64::convertInt32ToDouble):
2028         (JSC::MacroAssemblerX86_64::store32):
2029         (JSC::MacroAssemblerX86_64::call):
2030         (JSC::MacroAssemblerX86_64::tailRecursiveCall):
2031         (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
2032         (JSC::MacroAssemblerX86_64::addPtr):
2033         (JSC::MacroAssemblerX86_64::andPtr):
2034         (JSC::MacroAssemblerX86_64::orPtr):
2035         (JSC::MacroAssemblerX86_64::subPtr):
2036         (JSC::MacroAssemblerX86_64::xorPtr):
2037         (JSC::MacroAssemblerX86_64::storePtr):
2038         (JSC::MacroAssemblerX86_64::setPtr):
2039         (JSC::MacroAssemblerX86_64::branchPtr):
2040         (JSC::MacroAssemblerX86_64::branchTestPtr):
2041         (JSC::MacroAssemblerX86_64::branchSubPtr):
2042         (JSC::MacroAssemblerX86_64::moveWithPatch):
2043         (JSC::MacroAssemblerX86_64::branchPtrWithPatch):
2044         (JSC::MacroAssemblerX86_64::storePtrWithPatch):
2045         (JSC::MacroAssemblerX86_64::branchTest8):
2046         * dfg/DFGJITCodeGenerator.h:
2047         (JSC::DFG::JITCodeGenerator::callOperation):
2048         * dfg/DFGJITCompiler.cpp:
2049         (JSC::DFG::JITCompiler::jitAssertIsInt32):
2050         (JSC::DFG::JITCompiler::emitCount):
2051         * dfg/DFGJITCompiler.h:
2052         (JSC::DFG::JITCompiler::emitPutImmediateToCallFrameHeader):
2053         * dfg/DFGNonSpeculativeJIT.cpp:
2054         (JSC::DFG::NonSpeculativeJIT::compile):
2055         * dfg/DFGSpeculativeJIT.cpp:
2056         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
2057         (JSC::DFG::SpeculativeJIT::compile):
2058         * jit/JIT.cpp:
2059         (JSC::JIT::emitTimeoutCheck):
2060         (JSC::JIT::privateCompile):
2061         * jit/JIT.h:
2062         * jit/JITArithmetic.cpp:
2063         (JSC::JIT::emit_op_urshift):
2064         (JSC::JIT::emitSlow_op_urshift):
2065         (JSC::JIT::emit_op_post_inc):
2066         (JSC::JIT::emit_op_post_dec):
2067         (JSC::JIT::emit_op_pre_inc):
2068         (JSC::JIT::emit_op_pre_dec):
2069         (JSC::JIT::emit_op_mod):
2070         * jit/JITArithmetic32_64.cpp:
2071         (JSC::JIT::emit_op_negate):
2072         (JSC::JIT::emit_op_jnless):
2073         (JSC::JIT::emit_op_jless):
2074         (JSC::JIT::emit_op_jlesseq):
2075         (JSC::JIT::emit_op_lshift):
2076         (JSC::JIT::emitRightShift):
2077         (JSC::JIT::emitRightShiftSlowCase):
2078         (JSC::JIT::emit_op_bitand):
2079         (JSC::JIT::emit_op_bitor):
2080         (JSC::JIT::emit_op_bitxor):
2081         (JSC::JIT::emit_op_bitnot):
2082         (JSC::JIT::emit_op_post_inc):
2083         (JSC::JIT::emit_op_post_dec):
2084         (JSC::JIT::emitSlow_op_post_dec):
2085         (JSC::JIT::emit_op_pre_inc):
2086         (JSC::JIT::emit_op_pre_dec):
2087         (JSC::JIT::emit_op_add):
2088         (JSC::JIT::emitAdd32Constant):
2089         (JSC::JIT::emit_op_sub):
2090         (JSC::JIT::emitSub32Constant):
2091         (JSC::JIT::emitBinaryDoubleOp):
2092         (JSC::JIT::emit_op_mul):
2093         (JSC::JIT::emitSlow_op_mul):
2094         (JSC::JIT::emit_op_div):
2095         (JSC::JIT::emit_op_mod):
2096         * jit/JITCall.cpp:
2097         (JSC::JIT::compileOpCallVarargs):
2098         (JSC::JIT::compileOpCall):
2099         (JSC::JIT::compileOpCallSlowCase):
2100         * jit/JITCall32_64.cpp:
2101         (JSC::JIT::compileOpCallVarargs):
2102         (JSC::JIT::emit_op_ret_object_or_this):
2103         (JSC::JIT::compileOpCall):
2104         (JSC::JIT::compileOpCallSlowCase):
2105         * jit/JITInlineMethods.h:
2106         (JSC::JIT::emitPutCellToCallFrameHeader):
2107         (JSC::JIT::emitPutIntToCallFrameHeader):
2108         (JSC::JIT::emitPutImmediateToCallFrameHeader):
2109         (JSC::JIT::emitLoadCharacterString):
2110         (JSC::JIT::restoreArgumentReferenceForTrampoline):
2111         (JSC::JIT::checkStructure):
2112         (JSC::JIT::setSamplingFlag):
2113         (JSC::JIT::clearSamplingFlag):
2114         (JSC::JIT::emitCount):
2115         (JSC::JIT::sampleInstruction):
2116         (JSC::JIT::sampleCodeBlock):
2117         (JSC::JIT::emitStoreInt32):
2118         (JSC::JIT::emitStoreCell):
2119         (JSC::JIT::emitStoreBool):
2120         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
2121         (JSC::JIT::emitInitRegister):
2122         (JSC::JIT::emitJumpIfJSCell):
2123         (JSC::JIT::emitJumpIfNotJSCell):
2124         (JSC::JIT::emitJumpIfImmediateInteger):
2125         (JSC::JIT::emitJumpIfNotImmediateInteger):
2126         (JSC::JIT::emitFastArithDeTagImmediate):
2127         (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
2128         (JSC::JIT::emitFastArithReTagImmediate):
2129         (JSC::JIT::emitTagAsBoolImmediate):
2130         * jit/JITOpcodes.cpp:
2131         (JSC::JIT::privateCompileCTIMachineTrampolines):
2132         (JSC::JIT::privateCompileCTINativeCall):
2133         (JSC::JIT::emit_op_check_has_instance):
2134         (JSC::JIT::emit_op_instanceof):
2135         (JSC::JIT::emit_op_ret_object_or_this):
2136         (JSC::JIT::emit_op_resolve):
2137         (JSC::JIT::emit_op_to_primitive):
2138         (JSC::JIT::emit_op_resolve_base):
2139         (JSC::JIT::emit_op_ensure_property_exists):
2140         (JSC::JIT::emit_op_resolve_skip):
2141         (JSC::JIT::emit_op_resolve_global):
2142         (JSC::JIT::emitSlow_op_resolve_global):
2143         (JSC::JIT::emit_op_not):
2144         (JSC::JIT::emit_op_jfalse):
2145         (JSC::JIT::emit_op_jeq_null):
2146         (JSC::JIT::emit_op_jneq_null):
2147         (JSC::JIT::emit_op_jneq_ptr):
2148         (JSC::JIT::emit_op_jsr):
2149         (JSC::JIT::emit_op_resolve_with_base):
2150         (JSC::JIT::emit_op_new_func_exp):
2151         (JSC::JIT::emit_op_jtrue):
2152         (JSC::JIT::emit_op_get_pnames):
2153         (JSC::JIT::emit_op_next_pname):
2154         (JSC::JIT::emit_op_to_jsnumber):
2155         (JSC::JIT::emit_op_push_new_scope):
2156         (JSC::JIT::emit_op_catch):
2157         (JSC::JIT::emit_op_eq_null):
2158         (JSC::JIT::emit_op_neq_null):
2159         (JSC::JIT::emit_op_init_lazy_reg):
2160         (JSC::JIT::emit_op_convert_this):
2161         (JSC::JIT::emit_op_convert_this_strict):
2162         (JSC::JIT::emitSlow_op_not):
2163         (JSC::JIT::emitSlow_op_neq):
2164         (JSC::JIT::emit_op_get_arguments_length):
2165         (JSC::JIT::emitSlow_op_get_arguments_length):
2166         (JSC::JIT::emit_op_get_argument_by_val):
2167         (JSC::JIT::emitSlow_op_resolve_global_dynamic):
2168         (JSC::JIT::emit_op_new_regexp):
2169         (JSC::JIT::emit_op_load_varargs):
2170         (JSC::JIT::emitSlow_op_load_varargs):
2171         (JSC::JIT::emit_op_new_func):
2172         * jit/JITOpcodes32_64.cpp:
2173         (JSC::JIT::privateCompileCTIMachineTrampolines):
2174         (JSC::JIT::privateCompileCTINativeCall):
2175         (JSC::JIT::emit_op_loop_if_lesseq):
2176         (JSC::JIT::emit_op_check_has_instance):
2177         (JSC::JIT::emit_op_instanceof):
2178         (JSC::JIT::emit_op_get_scoped_var):
2179         (JSC::JIT::emit_op_put_scoped_var):
2180         (JSC::JIT::emit_op_tear_off_activation):
2181         (JSC::JIT::emit_op_tear_off_arguments):
2182         (JSC::JIT::emit_op_resolve):
2183         (JSC::JIT::emit_op_to_primitive):
2184         (JSC::JIT::emit_op_resolve_base):
2185         (JSC::JIT::emit_op_ensure_property_exists):
2186         (JSC::JIT::emit_op_resolve_skip):
2187         (JSC::JIT::emit_op_resolve_global):
2188         (JSC::JIT::emitSlow_op_resolve_global):
2189         (JSC::JIT::emit_op_not):
2190         (JSC::JIT::emit_op_jfalse):
2191         (JSC::JIT::emit_op_jtrue):
2192         (JSC::JIT::emit_op_jeq_null):
2193         (JSC::JIT::emit_op_jneq_null):
2194         (JSC::JIT::emit_op_jneq_ptr):
2195         (JSC::JIT::emit_op_jsr):
2196         (JSC::JIT::emit_op_eq):
2197         (JSC::JIT::emitSlow_op_eq):
2198         (JSC::JIT::emit_op_neq):
2199         (JSC::JIT::emitSlow_op_neq):
2200         (JSC::JIT::compileOpStrictEq):
2201         (JSC::JIT::emit_op_eq_null):
2202         (JSC::JIT::emit_op_neq_null):
2203         (JSC::JIT::emit_op_resolve_with_base):
2204         (JSC::JIT::emit_op_new_func_exp):
2205         (JSC::JIT::emit_op_get_pnames):
2206         (JSC::JIT::emit_op_next_pname):
2207         (JSC::JIT::emit_op_to_jsnumber):
2208         (JSC::JIT::emit_op_push_new_scope):
2209         (JSC::JIT::emit_op_catch):
2210         (JSC::JIT::emit_op_create_activation):
2211         (JSC::JIT::emit_op_create_arguments):
2212         (JSC::JIT::emit_op_convert_this):
2213         (JSC::JIT::emit_op_convert_this_strict):
2214         (JSC::JIT::emit_op_get_arguments_length):
2215         (JSC::JIT::emitSlow_op_get_arguments_length):
2216         (JSC::JIT::emit_op_get_argument_by_val):
2217         (JSC::JIT::softModulo):
2218         * jit/JITPropertyAccess.cpp:
2219         (JSC::JIT::stringGetByValStubGenerator):
2220         (JSC::JIT::emit_op_get_by_val):
2221         (JSC::JIT::emitSlow_op_get_by_val):
2222         (JSC::JIT::emit_op_get_by_pname):
2223         (JSC::JIT::emit_op_put_by_val):
2224         (JSC::JIT::emit_op_put_by_index):
2225         (JSC::JIT::emit_op_put_getter):
2226         (JSC::JIT::emit_op_put_setter):
2227         (JSC::JIT::emit_op_del_by_id):
2228         (JSC::JIT::emit_op_get_by_id):
2229         (JSC::JIT::emit_op_put_by_id):
2230         (JSC::JIT::emit_op_method_check):
2231         (JSC::JIT::compileGetByIdHotPath):
2232         (JSC::JIT::compileGetByIdSlowCase):
2233         (JSC::JIT::emitSlow_op_put_by_id):
2234         (JSC::JIT::testPrototype):
2235         (JSC::JIT::privateCompilePutByIdTransition):
2236         (JSC::JIT::privateCompilePatchGetArrayLength):
2237         (JSC::JIT::privateCompileGetByIdProto):
2238         (JSC::JIT::privateCompileGetByIdSelfList):
2239         (JSC::JIT::privateCompileGetByIdProtoList):
2240         (JSC::JIT::privateCompileGetByIdChainList):
2241         (JSC::JIT::privateCompileGetByIdChain):
2242         * jit/JITPropertyAccess32_64.cpp:
2243         (JSC::JIT::emit_op_put_getter):
2244         (JSC::JIT::emit_op_put_setter):
2245         (JSC::JIT::emit_op_del_by_id):
2246         (JSC::JIT::emit_op_get_by_id):
2247         (JSC::JIT::emit_op_put_by_id):
2248         (JSC::JIT::emit_op_method_check):
2249         (JSC::JIT::stringGetByValStubGenerator):
2250         (JSC::JIT::emit_op_get_by_val):
2251         (JSC::JIT::emitSlow_op_get_by_val):
2252         (JSC::JIT::emit_op_put_by_val):
2253         (JSC::JIT::compileGetByIdHotPath):
2254         (JSC::JIT::compileGetByIdSlowCase):
2255         (JSC::JIT::emitSlow_op_put_by_id):
2256         (JSC::JIT::testPrototype):
2257         (JSC::JIT::privateCompilePutByIdTransition):
2258         (JSC::JIT::privateCompilePatchGetArrayLength):
2259         (JSC::JIT::privateCompileGetByIdProto):
2260         (JSC::JIT::privateCompileGetByIdSelfList):
2261         (JSC::JIT::privateCompileGetByIdProtoList):
2262         (JSC::JIT::privateCompileGetByIdChainList):
2263         (JSC::JIT::privateCompileGetByIdChain):
2264         (JSC::JIT::emit_op_get_by_pname):
2265         * jit/JITStubCall.h:
2266         (JSC::JITStubCall::addArgument):
2267         * jit/JITStubs.cpp:
2268         (JSC::getPolymorphicAccessStructureListSlot):
2269         (JSC::DEFINE_STUB_FUNCTION):
2270         * jit/JSInterfaceJIT.h:
2271         (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
2272         (JSC::JSInterfaceJIT::emitLoadInt32):
2273         (JSC::JSInterfaceJIT::emitLoadDouble):
2274         * jit/SpecializedThunkJIT.h:
2275         (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
2276         (JSC::SpecializedThunkJIT::loadJSStringArgument):
2277         (JSC::SpecializedThunkJIT::tagReturnAsInt32):
2278         (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
2279         * jit/ThunkGenerators.cpp:
2280         (JSC::charToString):
2281         (JSC::powThunkGenerator):
2282         * yarr/YarrJIT.cpp:
2283         (JSC::Yarr::YarrGenerator::matchCharacterClass):
2284         (JSC::Yarr::YarrGenerator::storeToFrame):
2285         (JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
2286         (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
2287         (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
2288         (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
2289         (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
2290         (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
2291         (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
2292         (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
2293         (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
2294         (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
2295         (JSC::Yarr::YarrGenerator::generateDisjunction):
2296
2297 2011-03-28  Andras Becsi  <abecsi@webkit.org>
2298
2299         Reviewed by Csaba Osztrogonác.
2300
2301         [Qt] Fix the linking of jsc with MinGW after r81963.
2302
2303         * jsc.pro: add -l and remove the lib suffix.
2304
2305 2011-03-27  Ben Taylor  <bentaylor.solx86@gmail.com>
2306
2307         Reviewed by Alexey Proskuryakov.
2308
2309         https://bugs.webkit.org/show_bug.cgi?id=57170  Fix last elements
2310         in an enum to remove a trailing comma. Sun Studio 12 CC errors out.
2311
2312         Compile fix only, no actual code change.
2313
2314         * wtf/MessageQueue.h:
2315
2316 2011-03-25  Oliver Hunt  <oliver@apple.com>
2317
2318         Reviewed by Darin Adler.
2319
2320         Allow defineOwnProperty to work on DOMObjects
2321         https://bugs.webkit.org/show_bug.cgi?id=57129
2322
2323         Fix a couple of places where we uses getter()/setter() rather
2324         than [gs]etterPresent().
2325
2326         * runtime/JSObject.cpp:
2327         (JSC::JSObject::defineOwnProperty):
2328
2329 2011-03-25  Geoffrey Garen  <ggaren@apple.com>
2330
2331         Reviewed by Oliver Hunt.
2332
2333         Crash when paused at a breakpoint caused by inaccurate Activation records.
2334         https://bugs.webkit.org/show_bug.cgi?id=57120
2335
2336         * runtime/JSActivation.cpp:
2337         (JSC::JSActivation::symbolTableGet):
2338         (JSC::JSActivation::symbolTablePut):
2339         (JSC::JSActivation::getOwnPropertyNames):
2340         (JSC::JSActivation::symbolTablePutWithAttributes):
2341
2342 2011-03-24  Geoffrey Garen  <ggaren@apple.com>
2343
2344         Reviewed by Oliver Hunt.
2345
2346         Crash in debugger beneath MarkStack::drain @ me.com, ibm.com
2347         https://bugs.webkit.org/show_bug.cgi?id=57080
2348         <rdar://problem/8525907>
2349
2350         The crash was caused by changes in the executable after recompilation.
2351
2352         The fix is for the activation to copy the data it needs instead of
2353         relying on the data in the executable.
2354         
2355         SunSpider and v8 report no change.
2356
2357         * runtime/Arguments.h:
2358         (JSC::JSActivation::copyRegisters): Use our own data members instead of
2359         reading data out of the executable.
2360
2361         * runtime/JSActivation.cpp:
2362         (JSC::JSActivation::JSActivation): Initialize our data members.
2363
2364         (JSC::JSActivation::markChildren):
2365         (JSC::JSActivation::symbolTableGet):
2366         (JSC::JSActivation::symbolTablePut):
2367         (JSC::JSActivation::getOwnPropertyNames):
2368         (JSC::JSActivation::symbolTablePutWithAttributes):
2369         (JSC::JSActivation::isDynamicScope):
2370         (JSC::JSActivation::argumentsGetter): Use our own data members instead of
2371         reading data out of the executable.
2372
2373         * runtime/JSActivation.h: Added new data members to track data previously
2374         tracked by the executable. Since I've removed the executable pointer,
2375         on a 64bit system, I've only made activations bigger by an int.
2376
2377 2011-03-25  David Kilzer  <ddkilzer@apple.com>
2378
2379         Remove duplicate entry from JavaScriptCore.exp
2380
2381         JSC::createStackOverflowError(JSC::ExecState*) was originally
2382         exported in r60057, then duplicated in r60392.
2383
2384         * JavaScriptCore.exp: Removed duplicate entry.
2385
2386 2011-03-25  Jarred Nicholls  <jarred@sencha.com>
2387
2388         Reviewed by Ariya Hidayat.
2389
2390         [Qt] MSVC Build Error - need to link advapi32.lib for jsc.exe
2391         https://bugs.webkit.org/show_bug.cgi?id=56098
2392
2393         Need to link advapi32.lib for jsc.exe since wtf/OSRandomSource.cpp uses the Win32 Crypto API
2394
2395         * jsc.pro:
2396
2397 2011-03-24  Nikolas Zimmermann  <nzimmermann@rim.com>
2398
2399         Reviewed by Darin Adler.
2400
2401         Introduce WTF HexNumber.h
2402         https://bugs.webkit.org/show_bug.cgi?id=56099
2403
2404         Introduce a set of functions that ease converting from a bye or a number to a hex string,
2405         replacing several of these conversions and String::format("%x") usages all over WebCore.
2406
2407         * GNUmakefile.am: Add HexNumber.h to build.
2408         * JavaScriptCore.exp: Export StringBuilder::reserveCapacity.
2409         * JavaScriptCore.gypi: Add HexNumber.h to build.
2410         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export StringBuilder::reserveCapacity.
2411         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add HexNumber.h to build.
2412         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
2413         * wtf/CMakeLists.txt: Ditto.
2414         * wtf/HexNumber.h: Added.
2415         (WTF::Internal::hexDigitsForMode): Internal helper.
2416         (WTF::appendByteAsHex): Free function, that appends a byte as hex string into a destination.
2417         (WTF::placeByteAsHex): Ditto, but places the result using *foo++ = '..' or foo[index++] = '..'
2418         (WTF::appendUnsignedAsHex): Free function, that appends a number as hex string into a destination.
2419
2420 2011-03-24  Geoffrey Garen  <ggaren@apple.com>
2421
2422         Windows build fix take 2: Add new symobl.
2423         
2424         (I should have used the EWS bots for this!)
2425
2426         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2427
2428 2011-03-24  Geoffrey Garen  <ggaren@apple.com>
2429
2430         Windows build fix take 1: Removed old symobl.
2431
2432         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2433
2434 2011-03-24  Geoffrey Garen  <ggaren@apple.com>
2435
2436         Reviewed by Oliver Hunt.
2437
2438         Ensure that all compilation takes place within a dynamic global object scope
2439         https://bugs.webkit.org/show_bug.cgi?id=57054
2440         <rdar://problem/9083011>        
2441
2442         Otherwise, entry to the global object scope might throw away the code
2443         we just compiled, causing a crash.
2444
2445         * JavaScriptCore.exp: Updated for signature change.
2446
2447         * debugger/Debugger.cpp:
2448         (JSC::evaluateInGlobalCallFrame):
2449         * debugger/DebuggerCallFrame.cpp:
2450         (JSC::DebuggerCallFrame::evaluate): Removed explicit compilation calls
2451         here because (a) they took place outside a dynamic global object scope
2452         and (b) they were redundant.
2453
2454         * interpreter/CachedCall.h:
2455         (JSC::CachedCall::CachedCall): Updated for signature change.
2456
2457         * interpreter/Interpreter.cpp:
2458         (JSC::Interpreter::execute):
2459         (JSC::Interpreter::executeCall):
2460         (JSC::Interpreter::executeConstruct): Declare our dynamic global object
2461         scope earlier, to ensure that compilation takes place within it.
2462
2463         * runtime/Completion.cpp:
2464         (JSC::evaluate): Removed explicit compilation calls here because (a)
2465         they took place outside a dynamic global object scope and (b) they were
2466         redundant.
2467
2468         * runtime/Executable.h:
2469         (JSC::EvalExecutable::compile):
2470         (JSC::ProgramExecutable::compile):
2471         (JSC::FunctionExecutable::compileForCall):
2472         (JSC::FunctionExecutable::compileForConstruct): Added an ASSERT to
2473         verify our new invariant that all compilation takes place within a
2474         dynamic global object scope.
2475
2476         * runtime/JSGlobalObject.cpp:
2477         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
2478         * runtime/JSGlobalObject.h: Changed the signature of DynamicGlobalObjectScope
2479         to require a JSGlobalData instead of an ExecState* since it is often
2480         easier to provide the former, and the latter was not necessary.
2481
2482 2011-03-24  Oliver Hunt  <oliver@apple.com>
2483
2484         Reviewed by Geoffrey Garen.
2485
2486         REGRESSION (r79987-r80210): Crash in JSWeakObjectMapClear
2487         https://bugs.webkit.org/show_bug.cgi?id=55671
2488
2489         This is no longer necessary, and it seems that with the new weakmap
2490         model it's simply unsafe, so this reduces it to a no-op. 
2491
2492         * API/JSWeakObjectMapRefPrivate.cpp:
2493
2494 2011-03-24  Ben Taylor  <bentaylor.solx86@gmail.com>
2495
2496         Reviewed by Darin Adler.
2497
2498         https://bugs.webkit.org/show_bug.cgi?id=20302
2499         Correct implementation of signbit on Solaris
2500
2501         * wtf/MathExtras.h:
2502         (signbit):
2503
2504 2011-03-23  Mark Rowe  <mrowe@apple.com>
2505
2506         Reviewed by Darin Adler.
2507
2508         <rdar://problem/7959320> Threads that use APIs above the BSD layer must be registered with the Obj-C GC.
2509
2510         * wtf/ThreadingPthreads.cpp:
2511         (WTF::initializeCurrentThreadInternal):
2512
2513 2011-03-23  Mark Rowe  <mrowe@apple.com>
2514
2515         Stop setting OTHER_OPTIONS in JavaScriptCore's Makefile.
2516
2517         It's not necessary to pass "-target All" as xcodebuild always builds the
2518         first target in the project unless otherwise specified. The presence of
2519         that option also breaks "make clean" since that results in both the
2520         -target and -alltargets options being passed to xcodebuild.
2521
2522         * Makefile:
2523
2524 2011-03-23  Pavel Feldman  <pfeldman@chromium.org>
2525
2526         Not reviewed: bring back Vector::contains that was removed as a part of roll back.
2527
2528         * wtf/Vector.h:
2529         (WTF::::contains):
2530
2531 2011-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2532
2533         Unreviewed, rolling out r81686.
2534         http://trac.webkit.org/changeset/81686
2535         https://bugs.webkit.org/show_bug.cgi?id=56914
2536
2537         Breaks webkit_tests in Chromium again. (Requested by pfeldman
2538         on #webkit).
2539
2540         * wtf/Vector.h:
2541
2542 2011-03-23  Adam Barth  <abarth@webkit.org>
2543
2544         Reviewed by Eric Seidel.
2545
2546         JavaScriptCore GYP build should work on a case-sensitive file system
2547         https://bugs.webkit.org/show_bug.cgi?id=56911
2548
2549         The issue is that there are two UString.h headers, one named UString.h
2550         and one named ustring.h.  This patch excludes ustring.h from the header
2551         map to avoid confusion.  While I was editing this part of the GYP file,
2552         I cleaned up the exclude rules to be more modern.
2553
2554         * gyp/JavaScriptCore.gyp:
2555
2556 2011-03-22  Geoffrey Garen  <ggaren@apple.com>
2557
2558         Reviewed by Maciej Stachowiak.
2559
2560         REGRESSION (r78382): No scripts appear in the Web Inspector's Scripts
2561         panel on Windows, and many inspector regression tests are failing
2562         https://bugs.webkit.org/show_bug.cgi?id=54490
2563         
2564         The bug was caused by two different classes using the same name (Recompiler).
2565
2566         * debugger/Debugger.cpp:
2567         * runtime/JSGlobalData.cpp:
2568         (WTF::Recompiler::operator()): Put Recompiler in an anonymous namespace,
2569         so our two recompilers' inline functions don't stomp each other at
2570         link time.
2571
2572 2011-03-22  Sam Weinig  <sam@webkit.org>
2573
2574         Reviewed by Mark Rowe.
2575
2576         Remove USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER.
2577         <rdar://problem/8944718> 
2578
2579         * DerivedSources.make:
2580         Remove generation of USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER.
2581
2582 2011-03-22  Gabor Loki  <loki@webkit.org>
2583
2584         Reviewed by Csaba Osztrogonác.
2585
2586         [Qt] Add DFG module to build system (disabled by default).
2587         https://bugs.webkit.org/show_bug.cgi?id=56845
2588
2589         * JavaScriptCore.pri:
2590         * JavaScriptCore.pro:
2591
2592 2011-03-22  Eric Seidel  <eric@webkit.org>
2593
2594         Reviewed by Adam Barth.
2595
2596         Add support to build-webkit for building with gyp-generated project files
2597         https://bugs.webkit.org/show_bug.cgi?id=56877
2598
2599         Found a couple missing Private headers while trying to make WebCore build.
2600
2601         * JavaScriptCore.gypi:
2602
2603 2011-03-22  Eric Seidel  <eric@webkit.org>
2604
2605         Reviewed by Adam Barth.
2606
2607         Make it possible to build JavaScriptCore and WebCore gyp builds outside of Source
2608         https://bugs.webkit.org/show_bug.cgi?id=56867
2609
2610         This should make it possible to build the gyp-generated JavaScriptCore.xcodeproj
2611         from a JavaScriptCore directory outside of Source.
2612
2613         * gyp/JavaScriptCore.gyp:
2614         * gyp/run-if-exists.sh: Added.
2615         * gyp/update-info-plist.sh: Added.
2616
2617 2011-03-22  Eric Seidel  <eric@webkit.org>
2618
2619         Reviewed by Adam Barth.
2620
2621         Add Profiling Configuration to JavaScriptCore gyp build
2622         https://bugs.webkit.org/show_bug.cgi?id=56862
2623
2624         It appears this is identical to Release, but I suspect
2625         there is someone/thing who uses the Profiling target
2626         so we're adding it for completeness.
2627
2628         * gyp/JavaScriptCore.gyp:
2629
2630 2011-03-22  Adam Barth  <abarth@webkit.org>
2631
2632         Reviewed by Eric Seidel.
2633
2634         Remove os_win32_files variable from the GYP build
2635         https://bugs.webkit.org/show_bug.cgi?id=56804
2636
2637         Now that our understanding of GYP is sufficiently advanced, we don't
2638         need os_win32_files any more.  (Turns out Eric was right, as he always
2639         is.)
2640
2641         * JavaScriptCore.gypi:
2642
2643 2011-03-22  Adam Barth  <abarth@webkit.org>
2644
2645         Reviewed by Eric Seidel.
2646
2647         GYP build of JavaScriptCore should be able to link from an empty WebKitBuild directory
2648         https://bugs.webkit.org/show_bug.cgi?id=56803
2649
2650         Previously, we thought we should generate the derived source files in
2651         the shared intermediate build products directory, but there are
2652         assumptions built into other parts of the Mac build system that the
2653         derived source files will be generated in a particular subdirectory of
2654         the build products directory.
2655
2656         This patch is a partial revert of the change that moved the derived
2657         source files to the shared intermediate directory.  After this patch,
2658         the GYP build can build JavaScriptCore without help from the main
2659         normal build system.
2660
2661         * JavaScriptCore.gypi:
2662         * gyp/JavaScriptCore.gyp:
2663         * gyp/generate-derived-sources.sh:
2664         * gyp/generate-dtrace-header.sh:
2665
2666 2011-03-22  Jay Civelli  <jcivelli@chromium.org>
2667
2668         Reviewed by David Levin.
2669
2670         Adding a contains method to Vector.
2671         https://bugs.webkit.org/show_bug.cgi?id=55859
2672
2673         * wtf/Vector.h:
2674         (WTF::Vector::contains):
2675
2676 2011-03-22  Gabor Loki  <loki@webkit.org>
2677
2678         Reviewed by Alexey Proskuryakov.
2679
2680         Fix a bunch of typos in DFG.
2681         https://bugs.webkit.org/show_bug.cgi?id=56813
2682
2683         * dfg/DFGByteCodeParser.cpp:
2684         (JSC::DFG::parse):
2685         * dfg/DFGGenerationInfo.h:
2686         (JSC::DFG::GenerationInfo::setSpilled):
2687         * dfg/DFGGraph.cpp:
2688         (JSC::DFG::Graph::dump):
2689         * dfg/DFGGraph.h:
2690         * dfg/DFGJITCodeGenerator.h:
2691         (JSC::DFG::JITCodeGenerator::setupStubArguments):
2692         * dfg/DFGJITCompiler.cpp:
2693         (JSC::DFG::JITCompiler::compileFunction):
2694         * dfg/DFGJITCompiler.h:
2695         * dfg/DFGNode.h:
2696         * dfg/DFGNonSpeculativeJIT.h:
2697         * dfg/DFGOperations.h:
2698         * dfg/DFGRegisterBank.h:
2699         (JSC::DFG::RegisterBank::allocate):
2700         * dfg/DFGScoreBoard.h:
2701         (JSC::DFG::ScoreBoard::~ScoreBoard):
2702         (JSC::DFG::ScoreBoard::allocate):
2703         * dfg/DFGSpeculativeJIT.cpp:
2704         (JSC::DFG::SpeculativeJIT::compile):
2705         * dfg/DFGSpeculativeJIT.h:
2706
2707 2011-03-22  Adam Barth  <abarth@webkit.org>
2708
2709         Reviewed by Eric Seidel.
2710
2711         Production configuration in GYP isn&apos;t set up correctly
2712         https://bugs.webkit.org/show_bug.cgi?id=56786
2713
2714         Update JavaScriptCore.gyp with information mined from
2715         JavaScriptCore.xcodeproj.
2716
2717         * JavaScriptCore.gypi:
2718         * gyp/JavaScriptCore.gyp:
2719
2720 2011-03-22  Kent Tamura  <tkent@chromium.org>
2721
2722         Reviewed by Eric Seidel.
2723
2724         REGRESSION(r80096): Number type input unexpectedly rounds fractional values
2725         https://bugs.webkit.org/show_bug.cgi?id=56367
2726
2727         Introduce clampToInteger(unsigned).
2728         
2729         * wtf/MathExtras.h:
2730         (clampToInteger): Added.
2731
2732 2011-03-21  Adam Barth  <abarth@webkit.org>
2733
2734         Reviewed by Eric Seidel.
2735
2736         GYP build should not have include paths that point within the source tree
2737         https://bugs.webkit.org/show_bug.cgi?id=56788
2738
2739         Turns out we don't need these include paths anymore now that we have
2740         header maps working properly.
2741
2742         * gyp/JavaScriptCore.gyp:
2743             - Also, remove jsc.cpp from the excluded list because it's not part
2744               of the jsc_files variable instead of the javascriptcore_files
2745               variable.
2746
2747 2011-03-21  Adam Barth  <abarth@webkit.org>
2748
2749         Reviewed by Eric Seidel.
2750
2751         Solve the Assertions.cpp / -Wno-missing-format-attribute mystery
2752         https://bugs.webkit.org/show_bug.cgi?id=56780
2753
2754         The reason we couldn't resolve this warning in the GYP build was that
2755         the normal build disables this warning specifically for this file.
2756         This patch takes the same approach as the previous patch to
2757         WebCoreObjCExtras.mm in that it uses a pragma to suppress the warning
2758         (rather than a build system configuration).
2759
2760         * JavaScriptCore.xcodeproj/project.pbxproj:
2761             - Remove the special-case for this file.
2762         * gyp/JavaScriptCore.gyp:
2763             - Remove the work-around for this issue.
2764         * wtf/Assertions.cpp:
2765             - Add a pragma disabling this warning for this file.
2766
2767 2011-03-21  Adam Barth  <abarth@webkit.org>
2768
2769         Reviewed by Dimitri Glazkov.
2770
2771         WebCore GYP build shouldn't crash on startup
2772         https://bugs.webkit.org/show_bug.cgi?id=56776
2773
2774         Debug builds shouldn't define NDEBUG.  This same logic exists in the
2775         project.pbxproj file.
2776
2777         * gyp/JavaScriptCore.gyp:
2778
2779 2011-03-21  Robert Kroeger  <rjkroege@chromium.org>
2780
2781         Reviewed by Antonio Gomes.
2782
2783         Flag to enable/disable a GestureReocognizer framework
2784
2785         https://bugs.webkit.org/show_bug.cgi?id=49345
2786
2787         * wtf/Platform.h:
2788
2789 2011-03-21  Adam Barth  <abarth@webkit.org>
2790
2791         Reviewed by Dimitri Glazkov.
2792
2793         Add new files to JavaScriptCore.gypi
2794         https://bugs.webkit.org/show_bug.cgi?id=56766
2795
2796         * JavaScriptCore.gypi:
2797
2798 2011-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2799
2800         Unreviewed, rolling out r81377.
2801         http://trac.webkit.org/changeset/81377
2802         https://bugs.webkit.org/show_bug.cgi?id=56765
2803
2804         WebPageSerializerTest.MultipleFrames is broken (Requested by
2805         simonjam on #webkit).
2806
2807         * wtf/Vector.h:
2808
2809 2011-03-21  Gabor Loki  <loki@webkit.org>
2810
2811         Reviewed by Csaba Osztrogonác.
2812
2813         Extend constant pool to be able to store 16 bit instructions with a constant
2814         https://bugs.webkit.org/show_bug.cgi?id=46796
2815
2816         The putShortWithConstantInt function inserts a 16 bit instruction which
2817         refers a 32 bits constant or literal. This is a vital function for those
2818         target which loads a PC relative value with a 16 bit instruction (like
2819         Thumb-2 instruction set and SH4 architecture).
2820
2821         * assembler/AssemblerBuffer.h:
2822         (JSC::AssemblerBuffer::putIntegral):
2823         (JSC::AssemblerBuffer::putIntegralUnchecked):
2824         * assembler/AssemblerBufferWithConstantPool.h:
2825
2826 2011-03-21  Philippe Normand  <pnormand@igalia.com>
2827
2828         Unreviewed, GTK distcheck build fix.
2829
2830         * GNUmakefile.am:
2831
2832 2011-03-20  Bill Budge  <bbudge@chromium.org>
2833
2834         Reviewed by Adam Barth.
2835
2836         Rename ThreadSafeShared to ThreadSafeRefCounted
2837         https://bugs.webkit.org/show_bug.cgi?id=56714
2838
2839         No new tests. Exposes no new functionality.
2840
2841         * API/JSClassRef.h:
2842         * API/OpaqueJSString.h:
2843         * GNUmakefile.am:
2844         * JavaScriptCore.gypi:
2845         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2846         * JavaScriptCore.xcodeproj/project.pbxproj:
2847         * wtf/Atomics.h:
2848         * wtf/CMakeLists.txt:
2849         * wtf/CrossThreadRefCounted.h:
2850         (WTF::CrossThreadRefCounted::CrossThreadRefCounted):
2851         (WTF::::crossThreadCopy):
2852         * wtf/ThreadSafeRefCounted.h: Copied from wtf/ThreadSafeShared.h.
2853         (WTF::ThreadSafeRefCountedBase::ThreadSafeRefCountedBase):
2854         (WTF::ThreadSafeRefCountedBase::ref):
2855         (WTF::ThreadSafeRefCountedBase::refCount):
2856         (WTF::ThreadSafeRefCountedBase::derefBase):
2857         (WTF::ThreadSafeRefCounted::ThreadSafeRefCounted):
2858         * wtf/ThreadSafeShared.h: Removed.
2859         * wtf/Threading.h:
2860
2861 2011-03-19  Patrick Gansterer  <paroga@webkit.org>
2862
2863         Reviewed by Darin Adler.
2864
2865         Remove StringImpl::computeHash()
2866         https://bugs.webkit.org/show_bug.cgi?id=49894
2867
2868         Replace remainig StringImpl::computeHash with StringImpl::computeHashStringHasher.
2869
2870         * wtf/text/AtomicString.cpp:
2871         (WTF::CStringTranslator::hash):
2872         (WTF::UCharBufferTranslator::hash):
2873         (WTF::HashAndCharactersTranslator::hash):
2874         * wtf/text/StringImpl.h:
2875         (WTF::StringImpl::setHash):
2876         (WTF::StringImpl::hash):
2877
2878 2011-03-19  Patrick Gansterer  <paroga@webkit.org>
2879
2880         Reviewed by Darin Adler.
2881
2882         Rename WTF::StringHasher methods
2883         https://bugs.webkit.org/show_bug.cgi?id=53532
2884
2885         Rename createHash to computeHash and createBlobHash to hashMemory.
2886         Also add a using WTF::StringHasher in the header file.
2887
2888         * profiler/CallIdentifier.h:
2889         (JSC::CallIdentifier::Hash::hash):
2890         * runtime/Identifier.cpp:
2891         (JSC::IdentifierCStringTranslator::hash):
2892         (JSC::IdentifierUCharBufferTranslator::hash):
2893         * wtf/StringHasher.h:
2894         (WTF::StringHasher::computeHash):
2895         (WTF::StringHasher::hashMemory):
2896         * wtf/text/StringHash.h:
2897         (WTF::CaseFoldingHash::hash):
2898         * wtf/text/StringImpl.h:
2899         (WTF::StringImpl::computeHash):
2900         * wtf/unicode/UTF8.cpp:
2901         (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
2902
2903 2011-03-18  Geoffrey Garen  <ggaren@apple.com>
2904
2905         Reviewed by Oliver Hunt.
2906
2907         [GTK] JSC crashes in 32bit Release bots after r80743
2908         https://bugs.webkit.org/show_bug.cgi?id=56180
2909         
2910         The crash was caused by referencing GC memory from a GC destructor. This
2911         is not safe because destruction time / order is not guaranteed.
2912
2913         * profiler/ProfileGenerator.cpp:
2914         (JSC::ProfileGenerator::create):
2915         (JSC::ProfileGenerator::ProfileGenerator):
2916         (JSC::ProfileGenerator::willExecute):
2917         (JSC::ProfileGenerator::didExecute):
2918         * profiler/ProfileGenerator.h:
2919         (JSC::ProfileGenerator::origin): Made ExecState* the first argument,
2920         to match the rest of this class and JSC.
2921         
2922         Use a JSGlobalObject* instead of an ExecState* with an indirect reference
2923         to a JSGlobalObject* to track our origin. This is simpler and more
2924         efficient, and it removes the destruction order dependency that was causing
2925         our crash.
2926
2927         * profiler/Profiler.cpp:
2928         (JSC::Profiler::startProfiling): Updated for change to JSGlobalObject*.
2929         (JSC::Profiler::stopProfiling): New function for stopping all profiles
2930         for a given global object. This is more straight-forward than multiplexing
2931         through the old function.
2932
2933         (JSC::dispatchFunctionToProfiles): Updated for change to JSGlobalObject*.
2934         * profiler/Profiler.h: Ditto.
2935
2936         * runtime/JSGlobalObject.cpp:
2937         (JSC::JSGlobalObject::~JSGlobalObject): Ditto.
2938
2939 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
2940
2941         Reviewed by Oliver Hunt.
2942
2943         1 Structure leaked beneath JSGlobalData::storeVPtrs()
2944         https://bugs.webkit.org/show_bug.cgi?id=56595
2945
2946         * runtime/Executable.cpp:
2947         (JSC::EvalExecutable::EvalExecutable):
2948         (JSC::ProgramExecutable::ProgramExecutable):
2949         (JSC::FunctionExecutable::FunctionExecutable):
2950         * runtime/Executable.h:
2951         (JSC::ExecutableBase::ExecutableBase):
2952         (JSC::NativeExecutable::NativeExecutable):
2953         (JSC::VPtrHackExecutable::VPtrHackExecutable):
2954         (JSC::ScriptExecutable::ScriptExecutable): Use a raw pointer instead of
2955         PassRefPtr, like JSString does, since JSGlobalData owns the singleton
2956         exectuable structure.
2957
2958 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
2959
2960         Reviewed by Mark Rowe.
2961
2962         Fixed some string leaks seen on the buildbot
2963         https://bugs.webkit.org/show_bug.cgi?id=56619
2964
2965         * runtime/PropertyMapHashTable.h:
2966         (JSC::PropertyTable::~PropertyTable): DEref!
2967
2968 2011-03-17  Oliver Hunt  <oliver@apple.com>
2969
2970         Reviewed by Geoffrey Garen.
2971
2972         Crash in  JSC::MarkStack::drain Under Stress
2973         https://bugs.webkit.org/show_bug.cgi?id=56470
2974
2975         We perform a number of gc allocations while when
2976         we are setting up new globals in a piece of global
2977         code.  We do this by adding new properties to the
2978         symbol table, and then expanding the storage to fit
2979         at the end.
2980
2981         If a GC happens during this time we will report an
2982         incorrect size for the global object's symbol table
2983         storage.
2984
2985         This patch corrects this by growing the storage size
2986         before we starting adding entries to the symbol table.
2987
2988         * bytecompiler/BytecodeGenerator.cpp:
2989         (JSC::BytecodeGenerator::BytecodeGenerator):
2990         * runtime/JSGlobalObject.cpp:
2991         (JSC::JSGlobalObject::resizeRegisters):
2992
2993 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
2994
2995         Reviewed by Oliver Hunt.
2996
2997         1 Structure leaked beneath JSGlobalData::storeVPtrs()
2998         https://bugs.webkit.org/show_bug.cgi?id=56595
2999
3000         * runtime/JSGlobalData.cpp:
3001         (JSC::JSGlobalData::storeVPtrs): Take local ownership of the Structure
3002         we're using, since the Executable is not designed to own the Structure.
3003
3004 2011-03-17  Gavin Barraclough  <barraclough@apple.com>
3005
3006         Rubber Stamped by Sam Weinig.
3007
3008         Add missing register-register branchTest8 to MacroAssemblerX86Common/X86Assembler.
3009
3010         * assembler/MacroAssemblerX86Common.h:
3011         (JSC::MacroAssemblerX86Common::branchTest8):
3012         * assembler/X86Assembler.h:
3013         (JSC::X86Assembler::testb_rr):
3014
3015 2011-03-17  Gavin Barraclough  <barraclough@apple.com>
3016
3017         Reviewed by Sam Weinig.
3018
3019         Bug 56603 - DFG JIT related cleanup
3020         Move node generation out to separate function, move binarySearch algorithm out
3021         to StdLibExtras, fix Graph::dump() to print comma between non-node children,
3022         even if there are no node children.
3023
3024         * bytecode/CodeBlock.h:
3025         (JSC::getCallReturnOffset):
3026         (JSC::CodeBlock::getStubInfo):
3027         (JSC::CodeBlock::getCallLinkInfo):
3028         (JSC::CodeBlock::getMethodCallLinkInfo):
3029         (JSC::CodeBlock::bytecodeOffset):
3030             - Move binaryChop to binarySearch in StdLibExtras
3031         * dfg/DFGByteCodeParser.cpp:
3032         (JSC::DFG::ByteCodeParser::ByteCodeParser):
3033         (JSC::DFG::ByteCodeParser::parse):
3034         (JSC::DFG::parse):
3035             - Make m_noArithmetic a member, initialize m_currentIndex in the constructor.
3036         * dfg/DFGByteCodeParser.h:
3037             - Change parse() to not take a start index (always 0).
3038         * dfg/DFGGraph.cpp:
3039         (JSC::DFG::Graph::dump):
3040             - Fix Graph::dump() to print comma between non-node children, even if there are no node children.
3041         * dfg/DFGJITCodeGenerator.h:
3042         (JSC::DFG::JITCodeGenerator::JITCodeGenerator):
3043             - Initialize m_compileIndex in constructor.
3044         * dfg/DFGNonSpeculativeJIT.cpp:
3045         (JSC::DFG::NonSpeculativeJIT::compile):
3046         * dfg/DFGNonSpeculativeJIT.h:
3047             - Spilt out compilation of individual node.
3048         * dfg/DFGOperations.cpp:
3049         (JSC::DFG::operationConvertThis):
3050         * dfg/DFGOperations.h:
3051             - Cleanup parameter name.
3052         * dfg/DFGSpeculativeJIT.cpp:
3053         (JSC::DFG::SpeculativeJIT::compile):
3054         * dfg/DFGSpeculativeJIT.h:
3055             - Spilt out compilation of individual node.
3056         * runtime/Executable.cpp:
3057         (JSC::tryDFGCompile):
3058             - Change parse() to not take a start index (always 0).
3059         * wtf/StdLibExtras.h:
3060         (WTF::binarySearch):
3061             - Move binaryChop to binarySearch in StdLibExtras
3062
3063 2011-03-17  Anders Carlsson  <andersca@apple.com>
3064
3065         Reviewed by Geoffrey Garen.
3066
3067         Fix clang build.
3068
3069         * runtime/JSGlobalData.cpp:
3070         (JSC::JSGlobalData::storeVPtrs):
3071
3072 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
3073
3074         Reviewed by Darin Adler.
3075
3076         1 Structure leaked beneath JSGlobalData::storeVPtrs()
3077         https://bugs.webkit.org/show_bug.cgi?id=56595
3078
3079         * JavaScriptCore.xcodeproj/project.pbxproj:
3080         * runtime/JSGlobalData.cpp:
3081         (JSC::JSGlobalData::storeVPtrs): Now that we have an executable, we need
3082         to explicitly run its destructor.
3083
3084 2011-03-17  Jeff Miller  <jeffm@apple.com>
3085
3086         Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
3087         
3088         *.mode*
3089         *.pbxuser
3090         *.perspective*
3091         project.xcworkspace
3092         xcuserdata
3093
3094         * JavaScriptCore.xcodeproj: Modified property svn:ignore.
3095
3096 2011-03-17  Gavin Barraclough  <barraclough@apple.com>
3097
3098         Reverting r81197, breaks JIT + INTERPRETER build.
3099
3100         * bytecode/CodeBlock.cpp:
3101         (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
3102         (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
3103         * bytecode/CodeBlock.h:
3104         (JSC::CodeBlock::addPropertyAccessInstruction):
3105         (JSC::CodeBlock::addGlobalResolveInstruction):
3106         (JSC::CodeBlock::addStructureStubInfo):
3107         * bytecode/Opcode.h:
3108         * bytecode/StructureStubInfo.h:
3109         * bytecompiler/BytecodeGenerator.cpp:
3110         (JSC::BytecodeGenerator::emitResolve):
3111         (JSC::BytecodeGenerator::emitResolveWithBase):
3112         (JSC::BytecodeGenerator::emitGetById):
3113         (JSC::BytecodeGenerator::emitPutById):
3114         (JSC::BytecodeGenerator::emitDirectPutById):
3115         (JSC::BytecodeGenerator::emitCall):
3116         (JSC::BytecodeGenerator::emitConstruct):
3117         (JSC::BytecodeGenerator::emitCatch):
3118
3119 2011-03-17  Ben Taylor  <bentaylor.solx86@gmail.com>
3120
3121         Reviewed by Alexey Proskuryakov.
3122
3123         Add a COMPILER(SUNCC) define for Sun Studio 12. 
3124         https://bugs.webkit.org/show_bug.cgi?56444
3125         derived from patch 1 of 16 originally from https://bugs.webkit.org/show_bug.cgi?id=24932
3126
3127         * wtf/Platform.h:
3128
3129 2011-03-17  Jay Civelli  <jcivelli@chromium.org>
3130
3131         Reviewed by David Levin.
3132
3133         Adding a contains method to Vector.
3134         https://bugs.webkit.org/show_bug.cgi?id=55859
3135
3136         * wtf/Vector.h:
3137         (WTF::::operator):
3138         (WTF::::contains):
3139
3140 2011-03-17  Patrick Gansterer  <paroga@webkit.org>
3141
3142         Fix the interpreter build.
3143
3144         * interpreter/Interpreter.cpp:
3145         (JSC::Interpreter::privateExecute): Added globalData to inheritorID().
3146
3147 2011-03-16  Sam Weinig  <sam@webkit.org>
3148
3149         Fix the interpreter build.
3150
3151         * interpreter/Interpreter.cpp:
3152         (JSC::Interpreter::resolve):
3153         (JSC::Interpreter::resolveSkip):
3154         (JSC::Interpreter::resolveGlobal):
3155         (JSC::Interpreter::resolveGlobalDynamic):
3156         (JSC::Interpreter::resolveBaseAndProperty):
3157         (JSC::Interpreter::privateExecute):
3158         Remove .get()s.
3159
3160 2011-03-16  Adam Barth  <abarth@webkit.org>
3161
3162         Reviewed by James Robinson.
3163
3164         Remove USE(BUILTIN_UTF8_CODEC)
3165         https://bugs.webkit.org/show_bug.cgi?id=56508
3166
3167         We added this recently when we were unsure about the stability of the
3168         built-in UTF-8 codec.  However, the codec seems to be stable, so we
3169         don't need the macro.
3170
3171         * wtf/Platform.h:
3172
3173 2011-03-16  Daniel Bates  <dbates@rim.com>
3174
3175         Reviewed by Darin Adler.
3176
3177         Make JIT build for ARM Thumb-2 with RVCT
3178         https://bugs.webkit.org/show_bug.cgi?id=56440
3179
3180         Derived from a patch by Dave Tapuska.
3181
3182         Also, modify the RVCT stub template to indicate that it preserves 8 byte stack alignment.
3183
3184         * jit/JITStubs.cpp:
3185
3186 2011-03-16  Chao-ying Fu  <fu@mips.com>
3187
3188         Reviewed by Darin Adler.
3189
3190         Fix MIPS build with const *void
3191         https://bugs.webkit.org/show_bug.cgi?id=56513
3192
3193         * assembler/MacroAssemblerMIPS.h:
3194         (JSC::MacroAssemblerMIPS::load32):
3195         (JSC::MacroAssemblerMIPS::store32):
3196
3197 2011-03-16  Oliver Hunt  <oliver@apple.com>
3198
3199         Reviewed by Darin Adler.
3200
3201         Remove unnecessary caller tracking shenanigans from CodeBlock
3202         https://bugs.webkit.org/show_bug.cgi?id=56483
3203
3204         This removes some leftover cruft from when we made CodeBlock
3205         mark its callees.  Removing it gives us a 0.7% progression,
3206         reducing the overall regression to ~1.3%.
3207
3208         * bytecode/CodeBlock.cpp:
3209         (JSC::CodeBlock::shrinkToFit):
3210         * bytecode/CodeBlock.h:
3211         (JSC::CallLinkInfo::CallLinkInfo):
3212         * jit/JIT.cpp:
3213         (JSC::JIT::linkCall):
3214         (JSC::JIT::linkConstruct):
3215
3216 2011-03-15  Oliver Hunt  <oliver@apple.com>
3217
3218         Reviewed by Geoffrey Garen.
3219
3220         Make Structure creation require a JSGlobalData
3221         https://bugs.webkit.org/show_bug.cgi?id=56438
3222
3223         Mechanical change to make Structure::create require JSGlobalData&, and
3224         require all users to provide the globalData.
3225
3226         * API/JSCallbackConstructor.h:
3227         (JSC::JSCallbackConstructor::createStructure):
3228         * API/JSCallbackFunction.h:
3229         (JSC::JSCallbackFunction::createStructure):
3230         * API/JSCallbackObject.h:
3231         (JSC::JSCallbackObject::createStructure):
3232         * API/JSContextRef.cpp:
3233         * JavaScriptCore.exp:
3234         * debugger/DebuggerActivation.cpp:
3235         (JSC::DebuggerActivation::DebuggerActivation):
3236         * debugger/DebuggerActivation.h:
3237         (JSC::DebuggerActivation::createStructure):
3238         * jit/JITStubs.cpp:
3239         (JSC::DEFINE_STUB_FUNCTION):
3240         * jsc.cpp:
3241         (GlobalObject::GlobalObject):
3242         (functionRun):
3243         (jscmain):
3244         * runtime/Arguments.h:
3245         (JSC::Arguments::createStructure):
3246         * runtime/ArrayPrototype.h:
3247         (JSC::ArrayPrototype::createStructure):
3248         * runtime/BooleanObject.h:
3249         (JSC::BooleanObject::createStructure):
3250         * runtime/DateInstance.h:
3251         (JSC::DateInstance::createStructure):
3252         * runtime/DatePrototype.h:
3253         (JSC::DatePrototype::createStructure):
3254         * runtime/ErrorInstance.h:
3255         (JSC::ErrorInstance::createStructure):
3256         * runtime/Executable.h:
3257         (JSC::ExecutableBase::createStructure):
3258         (JSC::EvalExecutable::createStructure):
3259         (JSC::ProgramExecutable::createStructure):
3260         (JSC::FunctionExecutable::createStructure):
3261         * runtime/FunctionPrototype.h:
3262         (JSC::FunctionPrototype::createStructure):
3263         * runtime/GetterSetter.h:
3264         (JSC::GetterSetter::createStructure):
3265         * runtime/InternalFunction.h:
3266         (JSC::InternalFunction::createStructure):
3267         * runtime/JSAPIValueWrapper.h:
3268         (JSC::JSAPIValueWrapper::createStructure):
3269         * runtime/JSActivation.h:
3270         (JSC::JSActivation::createStructure):
3271         * runtime/JSArray.cpp:
3272         (JSC::JSArray::JSArray):
3273         * runtime/JSArray.h:
3274         (JSC::JSArray::createStructure):
3275         * runtime/JSByteArray.cpp:
3276         (JSC::JSByteArray::createStructure):
3277         * runtime/JSByteArray.h:
3278         (JSC::JSByteArray::JSByteArray):
3279         * runtime/JSCell.h:
3280         (JSC::JSCell::JSCell::createDummyStructure):
3281         * runtime/JSFunction.h:
3282         (JSC::JSFunction::createStructure):
3283         * runtime/JSGlobalData.cpp:
3284         (JSC::JSGlobalData::storeVPtrs):
3285         (JSC::JSGlobalData::JSGlobalData):
3286         * runtime/JSGlobalObject.cpp:
3287         (JSC::JSGlobalObject::reset):
3288         * runtime/JSGlobalObject.h:
3289         (JSC::JSGlobalObject::JSGlobalObject):
3290         (JSC::JSGlobalObject::createStructure):
3291         * runtime/JSNotAnObject.h:
3292         (JSC::JSNotAnObject::createStructure):
3293         * runtime/JSONObject.h:
3294         (JSC::JSONObject::createStructure):
3295         * runtime/JSObject.cpp:
3296         (JSC::JSObject::createInheritorID):
3297         * runtime/JSObject.h:
3298         (JSC::JSObject::createStructure):
3299         (JSC::JSNonFinalObject::createStructure):
3300         (JSC::JSFinalObject::createStructure):
3301         (JSC::createEmptyObjectStructure):
3302         (JSC::JSObject::inheritorID):
3303         * runtime/JSObjectWithGlobalObject.h:
3304         (JSC::JSObjectWithGlobalObject::createStructure):
3305         * runtime/JSPropertyNameIterator.h:
3306         (JSC::JSPropertyNameIterator::createStructure):
3307         * runtime/JSStaticScopeObject.h:
3308         (JSC::JSStaticScopeObject::createStructure):
3309         * runtime/JSString.h:
3310         (JSC::RopeBuilder::createStructure):
3311         * runtime/JSVariableObject.h:
3312         (JSC::JSVariableObject::createStructure):
3313         * runtime/JSWrapperObject.h:
3314         (JSC::JSWrapperObject::createStructure):
3315         * runtime/JSZombie.h:
3316         (JSC::JSZombie::createStructure):
3317         * runtime/MathObject.h:
3318         (JSC::MathObject::createStructure):
3319         * runtime/NativeErrorConstructor.cpp:
3320         (JSC::NativeErrorConstructor::NativeErrorConstructor):
3321         * runtime/NativeErrorConstructor.h:
3322         (JSC::NativeErrorConstructor::createStructure):
3323         * runtime/NumberConstructor.h:
3324         (JSC::NumberConstructor::createStructure):
3325         * runtime/NumberObject.h:
3326         (JSC::NumberObject::createStructure):
3327         * runtime/ObjectConstructor.h:
3328         (JSC::ObjectConstructor::createStructure):
3329         * runtime/RegExpConstructor.h:
3330         (JSC::RegExpConstructor::createStructure):
3331         * runtime/RegExpObject.h:
3332         (JSC::RegExpObject::createStructure):
3333         * runtime/ScopeChain.h:
3334         (JSC::ScopeChainNode::createStructure):
3335         * runtime/StringObject.h:
3336         (JSC::StringObject::createStructure):
3337         * runtime/StringObjectThatMasqueradesAsUndefined.h:
3338         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
3339         * runtime/StringPrototype.h:
3340         (JSC::StringPrototype::createStructure):
3341         * runtime/Structure.h:
3342         (JSC::Structure::create):
3343
3344 2011-03-16  Geoffrey Garen  <ggaren@apple.com>
3345
3346         Reviewed by Oliver Hunt.
3347
3348         Some conservative root gathering cleanup
3349         https://bugs.webkit.org/show_bug.cgi?id=56447
3350         
3351         SunSpider says 0.5% - 1.8% faster.
3352
3353         * interpreter/RegisterFile.cpp:
3354         (JSC::RegisterFile::gatherConservativeRoots):
3355         * interpreter/RegisterFile.h: New helper function for doing the
3356         conservative gathering of the register file. It's still conservative,
3357         since the register file may contain uninitialized values, but it's
3358         moving-safe, because it only visits values tagged as pointers, so there's
3359         no risk of mistaking an integer for a pointer and accidentally changing it.
3360
3361         * runtime/ConservativeSet.cpp:
3362         (JSC::ConservativeRoots::add):
3363         * runtime/ConservativeSet.h: Added a single-value add function, used above.
3364
3365         * runtime/Heap.cpp:
3366         (JSC::Heap::markRoots): Separated machine stack conservative roots from
3367         register file conservative roots because machine stack roots must be
3368         pinned, but register file roots need not be pinned.
3369         
3370         Adopted new interface for passing the current stack extent to the machine
3371         stack root gathering routine. This allows us to exclude marking-related
3372         data structures on the stack, and thus avoid double-marking the set of
3373         machine roots.
3374
3375         * runtime/MachineStackMarker.cpp:
3376         (JSC::MachineThreads::gatherFromCurrentThread):
3377         (JSC::MachineThreads::gatherConservativeRoots):
3378         * runtime/MachineStackMarker.h: Added new interface, described above.
3379
3380         * runtime/MarkedBlock.h:
3381         (JSC::MarkedBlock::firstAtom):
3382         * wtf/StdLibExtras.h:
3383         (WTF::roundUpToMultipleOf): Moved roundUpToMultipleOf so it could be used
3384         by MachineStacks.
3385
3386 2011-03-16  Geoffrey Garen  <ggaren@apple.com>
3387
3388         Reviewed by Oliver Hunt.
3389
3390         A little bit of MarkStack cleanup
3391         https://bugs.webkit.org/show_bug.cgi?id=56443
3392         
3393         Moved MarkStack functions into MarkStack.h/.cpp.
3394         
3395         SunSpider reports no change.
3396
3397         * runtime/JSArray.h:
3398         * runtime/JSCell.h: Moved from here...
3399         * runtime/MarkStack.cpp:
3400         (JSC::MarkStack::markChildren):
3401         (JSC::MarkStack::drain): ...to here. Also, no need to inline drain. It's
3402         a huge function, and not called many times.
3403
3404         * runtime/MarkStack.h:
3405         (JSC::MarkStack::~MarkStack): Moved near constructor, per style guide.
3406         (JSC::MarkStack::append):
3407         (JSC::MarkStack::deprecatedAppend):
3408         (JSC::MarkStack::internalAppend): Moved to here.
3409
3410 2011-03-15  Geoffrey Garen  <ggaren@apple.com>
3411
3412         Reviewed by Oliver Hunt.
3413
3414         Removed another deprecatedAppend
3415         https://bugs.webkit.org/show_bug.cgi?id=56429
3416
3417         * collector/handles/HandleHeap.cpp:
3418         (JSC::HandleHeap::markStrongHandles):
3419         * collector/handles/HandleHeap.h: Use HeapRootMarker, since handles are
3420         marked directly by the Heap.
3421
3422         * runtime/Heap.cpp:
3423         (JSC::Heap::markRoots): Ditto.
3424
3425 2011-03-15  Geoffrey Garen  <ggaren@apple.com>
3426
3427         Reviewed by Oliver Hunt.
3428
3429         Removed some more deprecated / unsafe append
3430         https://bugs.webkit.org/show_bug.cgi?id=56428
3431
3432         * collector/handles/HandleStack.cpp:
3433         (JSC::HandleStack::mark):
3434         * collector/handles/HandleStack.h: Mark the handle stack using a HeapRoot
3435         marker, since it's a heap root.
3436         
3437         * runtime/ArgList.cpp:
3438         (JSC::MarkedArgumentBuffer::markLists):
3439         (JSC::MarkedArgumentBuffer::slowAppend):
3440         * runtime/ArgList.h: Ditto.
3441
3442         * runtime/Heap.cpp:
3443         (JSC::Heap::markRoots): Added a mark call for marking the handle stack.
3444         It seems like Oliver forgot this in his last patch. (!)
3445
3446         * runtime/MarkStack.h: Removed appendSlots, since it would allow an
3447         object to embed JSValues directly instead of using WriteBarrier.
3448
3449         (JSC::MarkStack::append): Added a private append for a list of values.
3450
3451         (JSC::HeapRootMarker::mark): Access to the above.
3452
3453 2011-03-15  Geoffrey Garen  <ggaren@apple.com>
3454
3455         Reviewed by Oliver Hunt.
3456
3457         Removed a few more deprecatedAppends, and removed HeapRoot<T>
3458         https://bugs.webkit.org/show_bug.cgi?id=56422
3459         
3460         Added HeapRootMarker, a privileged class for marking direct heap roots
3461         that are iterated during each garbage collection. This is easier to use
3462         and more reliable than HeapRoot<T>, so I've removed HeapRoot<T>.
3463
3464         * debugger/Debugger.cpp:
3465         (JSC::evaluateInGlobalCallFrame):
3466         * debugger/DebuggerCallFrame.cpp:
3467         (JSC::DebuggerCallFrame::evaluate):
3468         * interpreter/CallFrame.h:
3469         (JSC::ExecState::exception):
3470         * jit/JITStubs.cpp:
3471         (JSC::DEFINE_STUB_FUNCTION):
3472         * runtime/Completion.cpp:
3473         (JSC::evaluate): exception is no longer a HeapRoot<T>, so no need to
3474         call .get() on it.
3475
3476         * runtime/Heap.cpp:
3477         (JSC::Heap::markProtectedObjects):
3478         (JSC::Heap::markTempSortVectors):
3479         (JSC::Heap::markRoots):
3480         * runtime/Heap.h: Updated to use HeapRootMarker.
3481
3482         * runtime/JSCell.h:
3483         (JSC::JSCell::MarkStack::append): Added private functions for
3484         HeapRootMarker to use.
3485
3486         * runtime/JSGlobalData.h: exception is no longer a HeapRoot<T>.
3487
3488         * runtime/MarkStack.h:
3489         (JSC::HeapRootMarker::HeapRootMarker):
3490         (JSC::HeapRootMarker::mark): Added private functions for
3491         HeapRootMarker to use.
3492
3493         * runtime/SmallStrings.cpp:
3494         (JSC::SmallStrings::markChildren): Updated to use HeapRootMarker.
3495
3496         * runtime/SmallStrings.h:
3497         (JSC::SmallStrings::emptyString):
3498         (JSC::SmallStrings::singleCharacterString):
3499         (JSC::SmallStrings::singleCharacterStrings): Updated to use HeapRootMarker.
3500
3501         * runtime/WriteBarrier.h: Removed HeapRoot<T>.
3502
3503 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
3504
3505         Reviewed by Oliver Hunt.
3506
3507         Made the global object moving-GC-safe
3508         https://bugs.webkit.org/show_bug.cgi?id=56348
3509         
3510         SunSpider reports no change.
3511
3512         * runtime/JSGlobalObject.cpp:
3513         (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
3514         suggested we do not need to visit all our references during GC, since
3515         that is not true in a moving GC.
3516
3517         Re-sorted data members by type, removed one duplicate, and added back
3518         the one missing mark I found.
3519
3520         * runtime/JSGlobalObject.h: Re-sorted data members by type.
3521
3522 2011-03-15  Oliver Hunt  <oliver@apple.com>
3523
3524         Reviewed by Geoffrey Garen.
3525
3526         Introduce Local<T> to allow us to start moving to precise marking of locals
3527         https://bugs.webkit.org/show_bug.cgi?id=56394
3528
3529         Introduce a new handle type, Local<T> and a scoping mechanism
3530         LocalScope to allow us to start moving towards precise marking
3531         of temporaries and local variables.
3532
3533         We also start to use the new Local<> type in the JSON stringifier
3534         so that we can have some coverage of their behaviour in the initial
3535         checkin.
3536
3537         * GNUmakefile.am:
3538         * JavaScriptCore.gypi:
3539         * JavaScriptCore.pro:
3540         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3541         * JavaScriptCore.xcodeproj/project.pbxproj:
3542         * collector/handles/Handle.h:
3543         (JSC::::asObject):
3544         * collector/handles/HandleStack.cpp: Added.
3545         (JSC::HandleStack::HandleStack):
3546         (JSC::HandleStack::mark):
3547         (JSC::HandleStack::grow):
3548         * collector/handles/HandleStack.h: Added.
3549         (JSC::HandleStack::enterScope):
3550         (JSC::HandleStack::zapTo):
3551         (JSC::HandleStack::leaveScope):
3552         (JSC::HandleStack::push):
3553         * collector/handles/Local.h: Added.
3554         (JSC::Local::internalSet):
3555         (JSC::::Local):
3556         (JSC::::operator):
3557         (JSC::LocalStack::LocalStack):
3558         (JSC::LocalStack::peek):
3559         (JSC::LocalStack::pop):
3560         (JSC::LocalStack::push):
3561         (JSC::LocalStack::isEmpty):
3562         (JSC::LocalStack::size):
3563         * collector/handles/LocalScope.h: Added.
3564         (JSC::LocalScope::LocalScope):
3565         (JSC::LocalScope::~LocalScope):
3566         (JSC::LocalScope::release):
3567         * runtime/Heap.cpp:
3568         (JSC::Heap::markRoots):
3569         * runtime/Heap.h:
3570         (JSC::Heap::allocateLocalHandle):
3571         (JSC::Heap::handleStack):
3572         * runtime/JSCell.h:
3573         (JSC::JSCell::::getString):
3574         * runtime/JSGlobalData.cpp:
3575         (JSC::JSGlobalData::JSGlobalData):
3576         * runtime/JSGlobalData.h:
3577         (JSC::JSGlobalData::allocateLocalHandle):
3578         * runtime/JSONObject.cpp:
3579         (JSC::Stringifier::Stringifier):
3580         (JSC::Stringifier::stringify):
3581         (JSC::Stringifier::appendStringifiedValue):
3582         (JSC::Stringifier::Holder::Holder):
3583         (JSC::Walker::Walker):
3584         (JSC::Walker::walk):
3585         (JSC::JSONProtoFuncParse):
3586         (JSC::JSONProtoFuncStringify):
3587         (JSC::JSONStringify):
3588         * runtime/JSONObject.h:
3589         * runtime/MarkStack.h:
3590         (JSC::MarkStack::appendValues):
3591         (JSC::MarkStack::appendSlots):
3592
3593 2011-03-15  Gavin Barraclough  <barraclough@apple.com>
3594
3595         Rubber Stamped by Sam Weinig.
3596
3597         Bug 56420 - Remove ENABLE(JIT) code from ByteCompiler
3598         Some methods have unnecessary differences in name/arguments for interpreter/JIT.
3599
3600         * bytecode/CodeBlock.cpp:
3601         * bytecode/CodeBlock.h:
3602         (JSC::HandlerInfo::HandlerInfo):
3603         (JSC::CodeBlock::addPropertyAccessInfo):
3604         (JSC::CodeBlock::addGlobalResolveInfo):
3605         (JSC::CodeBlock::addCallLinkInfo):
3606         (JSC::CodeBlock::globalResolveInfo):
3607         * bytecode/Opcode.h:
3608         * bytecode/StructureStubInfo.h:
3609         * bytecompiler/BytecodeGenerator.cpp:
3610         (JSC::BytecodeGenerator::emitResolve):
3611         (JSC::BytecodeGenerator::emitResolveWithBase):
3612         (JSC::BytecodeGenerator::emitGetById):
3613         (JSC::BytecodeGenerator::emitPutById):
3614         (JSC::BytecodeGenerator::emitDirectPutById):
3615         (JSC::BytecodeGenerator::emitCall):
3616         (JSC::BytecodeGenerator::emitConstruct):
3617         (JSC::BytecodeGenerator::emitCatch):
3618
3619 2011-03-15  Gavin Barraclough  <barraclough@apple.com>
3620
3621         Reviewed by Sam Weinig.
3622
3623         Fix broken assert in new code.
3624
3625         * dfg/DFGAliasTracker.h:
3626         (JSC::DFG::AliasTracker::recordPutByVal):
3627             - recordPutByVal is called for both PutByVal & PutByValAlias.
3628
3629 2011-03-15  Gavin Barraclough  <barraclough@apple.com>
3630
3631         Rubber stamped by Sam Weinig.
3632
3633         Removed redundant code from BytecodeGenerator.
3634
3635         * bytecompiler/BytecodeGenerator.cpp:
3636         * bytecompiler/BytecodeGenerator.h:
3637             - delete uncalled code missed when reparsing was removed.
3638
3639 2011-03-15  Kevin Ollivier  <kevino@theolliviers.com>
3640
3641         Reviewed by Darin Adler.
3642
3643         Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
3644         info into the headers rather than in export symbol definition files, but disable it on 
3645         all platforms initially so we can deal with port build issues one port at a time.
3646         
3647         https://bugs.webkit.org/show_bug.cgi?id=27551
3648
3649         * API/JSBase.h:
3650         * config.h:
3651         * wtf/Assertions.h:
3652         * wtf/ExportMacros.h: Added.
3653         * wtf/Platform.h:
3654
3655 2011-03-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3656
3657         Unreviewed build fix.
3658
3659         Buildfix when JIT is not enabled after r81079
3660         https://bugs.webkit.org/show_bug.cgi?id=56361
3661
3662         * runtime/Executable.cpp:
3663
3664 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
3665
3666         Reviewed by Oliver Hunt.
3667
3668         Made the global object moving-GC-safe
3669         https://bugs.webkit.org/show_bug.cgi?id=56348
3670         
3671         SunSpider reports no change.
3672
3673         * runtime/JSGlobalObject.cpp:
3674         (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
3675         suggested we do not need to visit all our references during GC, since
3676         that is not true in a moving GC.
3677
3678         Re-sorted data members by type, removed one duplicate, and added back
3679         the one missing mark I found.
3680
3681         * runtime/JSGlobalObject.h: Re-sorted data members by type.
3682
3683 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
3684
3685         Reviewed by Oliver Hunt.
3686
3687         Made JSWrapperObject and subclasses moving-GC-safe
3688         https://bugs.webkit.org/show_bug.cgi?id=56346
3689         
3690         SunSpider reports no change.
3691
3692         * runtime/BooleanObject.cpp:
3693         (JSC::BooleanObject::BooleanObject):
3694         * runtime/DateInstance.cpp:
3695         (JSC::DateInstance::DateInstance): No more need for JSGlobalData, since
3696         we don't initialize the wrapped value in our constructor.
3697
3698         * runtime/DateInstance.h: Don't set the OverridesMarkChildren flag because
3699         we do not in fact override markChildren.
3700
3701         * runtime/DatePrototype.h: Declare an anonymous slot, since wrapper object
3702         no longer does so for us. Also added an ASSERT to catch a latent bug,
3703         where DatePrototype stomped on its base class's anonymous slot. Hard-coded
3704         anonymous slots are a plague on our code. This doesn't cause any problems
3705         in our existing code since the base class never reads the anonymous slot
3706         it declares, but it caused crashes when I tried to start using the slot
3707         in an initial version of this patch.
3708
3709         * runtime/JSWrapperObject.h:
3710         (JSC::JSWrapperObject::JSWrapperObject):
3711         (JSC::JSWrapperObject::internalValue):
3712         (JSC::JSWrapperObject::setInternalValue): Resolved a problem where
3713         our internal value was stored in two places: an anonymous slot, and a
3714         data member which was not always visited during GC. Now, we only use the
3715         data member, and we always visit it. (Instead of relying on certain
3716         subclasses to set the OverridesMarkChildren bit, we set it ourselves.)
3717
3718         * runtime/NumberObject.cpp:
3719         (JSC::NumberObject::NumberObject): No more need for JSGlobalData, since
3720         we don't initialize the wrapped value in our constructor.
3721
3722         * runtime/NumberObject.h: Removed meaningless declaration.
3723
3724         * runtime/StringObject.cpp:
3725         (JSC::StringObject::StringObject): No more need for JSGlobalData, since
3726         we don't initialize the wrapped value in our constructor.
3727
3728         * runtime/StringObject.h: Don't set the OverridesMarkChildren flag because
3729         we do not in fact override markChildren.
3730
3731         * runtime/StringPrototype.h: Declare an anonymous slot, since wrapper object
3732         no longer does so for us. Also added an ASSERT to catch a latent bug,
3733         where DatePrototype stomped on its base class's anonymous slot. Hard-coded
3734         anonymous slots are a plague on our code.
3735
3736 2011-03-14  Michael Saboff  <msaboff@apple.com>
3737
3738         Reviewed by Gavin Barraclough.
3739
3740         Look-ahead assertions with back references don’t work as expected
3741         https://bugs.webkit.org/show_bug.cgi?id=56082
3742
3743         Changed parentheses assertion processing to temporarily back out the 
3744         number of known characters after the assertion while processing the 
3745         assertion.  This was done so that assertions don't fail due to 
3746         checking the number of required characters as additional to the 
3747         rest of the express since assertions don't "consume" input.
3748         Added a byte code to uncheck characters to support the change.
3749
3750         * yarr/YarrInterpreter.cpp:
3751         (JSC::Yarr::Interpreter::matchDisjunction):
3752         (JSC::Yarr::ByteCompiler::uncheckInput):
3753         (JSC::Yarr::ByteCompiler::emitDisjunction):
3754         * yarr/YarrInterpreter.h:
3755         (JSC::Yarr::ByteTerm::UncheckInput):
3756
3757 2011-03-14  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
3758
3759         Reviewed by Laszlo Gombos.
3760
3761         [Qt] Warning that round/roundf functions are already defined when compiled with RVCT 4 on symbian.
3762         https://bugs.webkit.org/show_bug.cgi?id=56133
3763
3764         Add condition to not compile webkit internal math round functions on RVCT compiler versions 
3765         from 3.0.0 because they are already defined in compiler math library.
3766
3767         * wtf/MathExtras.h:
3768
3769 2011-03-14  Gavin Barraclough  <barraclough@apple.com>
3770
3771         Reviewed by Geoffrey Garen & Oliver Hunt.
3772
3773         Bug 56284 - Add a dataflow intermediate representation for use in JIT generation.
3774
3775         The JSC JIT presently generates code directly from the bytecode used by the interpreter.
3776         This is not an optimal intermediate representation for JIT code generation, since it does
3777         not capture liveness information of values, and provides little opportunity to perform
3778         any static analysis for even primitive types. The JIT currently generates two code paths,
3779         a fast path handling common cases, and a slower path handling less common operand types.
3780         However the slow path jumps back into the fast path, meaning that information arising
3781         from the earlier type checks cannot be propagated to later operations.
3782
3783         This patch adds:
3784             * a dataflow intermediate representation capable of describing a single basic block
3785               of operations,
3786             * a mechanism to convert a simple, single-block bytecode functions to the new IR,
3787             * and a JIT code generator capable of generating code from this representation.
3788
3789         The JIT generates two code paths, with the slower path not reentering the fast path
3790         mid-block, allowing speculative optimizations to be made on the hot path, with type
3791         information arising from these speculative decisions able to be propagated through the
3792         dataflow. Code generation of both speculative and non-speculative paths exploits the type
3793         and liveness information represented in the dataflow graph to attempt to avoid redundant
3794         boxing and type-checking of values, and to remove unnecessary spills of temporary values
3795         to the RegisterFile.
3796
3797         The dataflow JIT currently can only support a subset of bytecode operations, limited to
3798         arithmetic, bit-ops, and basic property access. Functions that cannot be compiled by the
3799         dataflow JIT will be run using the existing JIT. The coverage of the dataflow JIT will be
3800         expanded to include, control-flow, function calls, and then the long-tail of remaining
3801         bytecode instructions. The JIT presently only support JSVALUE64, and as a consequence of
3802         this only supports x86-64.
3803
3804         The status of the dataflow JIT is currently work-in-progress. Limitations of the present
3805         JIT code generation may cause performance regressions, particularly:
3806             * the policy to only generate arithmetic code on the speculative path using integer
3807               instructions, never using floating point.
3808             * the policy to only generate arithmetic code on the non-speculative path using
3809               floating point instructions, never using integer.
3810             * always generating JSValue adds on the non-speculative path as a call out to a
3811               C-function, never handling this in JIT code.
3812             * always assuming by-Value property accesses on the speculative path to be array
3813               accesses.
3814             * generating all by-Value property accesses from the non-speculative path as a call
3815               out to a C-function.
3816             * generating all by-Indentifer property accesses as a call out to a C-function.
3817         Due to these regressions, the code is landed in a state where it is disabled in most
3818         cases by the ENABLE_DFG_JIT_RESTRICTIONS guard in Platform.h. As these regressions are
3819         addressed, the JIT will be allowed to trigger in more cases.
3820
3821         * JavaScriptCore.xcodeproj/project.pbxproj:
3822             - Added new files to Xcode project.
3823         * dfg: Added.
3824             - Added directory for new code.
3825         * dfg/DFGByteCodeParser.cpp: Added.
3826         * dfg/DFGByteCodeParser.h: Added.
3827             - Contruct a DFG::Graph representation from a bytecode CodeBlock.
3828         * dfg/DFGGenerationInfo.h: Added.
3829             - Track type & register information for VirtualRegisters during JIT code generation.
3830         * dfg/DFGGraph.cpp: Added.
3831         * dfg/DFGGraph.h: Added.
3832             - Dataflow graph intermediate representation for code generation.
3833         * dfg/DFGJITCodeGenerator.cpp: Added.
3834         * dfg/DFGJITCodeGenerator.h: Added.
3835             - Base class for SpeculativeJIT & NonSpeculativeJIT to share common functionality.
3836         * dfg/DFGJITCompiler.cpp: Added.
3837         * dfg/DFGJITCompiler.h: Added.
3838             - Class responsible for driving code generation of speculativeJIT & non-speculative
3839               code paths from the dataflow graph.
3840         * dfg/DFGNonSpeculativeJIT.cpp: Added.
3841         * dfg/DFGNonSpeculativeJIT.h: Added.
3842             - Used to generate the non-speculative code path, this make no assumptions
3843               about operand types.
3844         * dfg/DFGOperations.cpp: Added.
3845         * dfg/DFGOperations.h: Added.
3846             - Helper functions called from the JIT generated code.
3847         * dfg/DFGRegisterBank.h: Added.
3848             - Used to track contents of physical registers during JIT code generation.
3849         * dfg/DFGSpeculativeJIT.cpp: Added.
3850         * dfg/DFGSpeculativeJIT.h: Added.
3851             - Used to generate the speculative code path, this make assumptions about
3852               operand types to enable optimization.
3853         * runtime/Executable.cpp:
3854             - Add code to attempt to use the DFG JIT to compile a function, with fallback
3855               to the existing JIT.
3856         * wtf/Platform.h:
3857             - Added compile guards to enable the DFG JIT.
3858
3859 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
3860
3861         Reviewed by Oliver Hunt.
3862
3863         Removed more cases of DeprecatedPtr (exception, SmallStrings)
3864         https://bugs.webkit.org/show_bug.cgi?id=56332
3865
3866         * runtime/Identifier.cpp:
3867         (JSC::Identifier::add):
3868         (JSC::Identifier::addSlowCase): Use a variable instead of a hard-coded
3869         constant, to make this code less brittle.
3870
3871         * runtime/JSGlobalData.h: Use HeapRoot instead of DeprecatedPtr because
3872         this reference is owned and managed directly by the heap.
3873
3874         * runtime/JSString.cpp:
3875         (JSC::JSString::substringFromRope):
3876         * runtime/JSString.h:
3877         (JSC::jsSingleCharacterString):
3878         (JSC::jsSingleCharacterSubstring):
3879         (JSC::jsString):
3880         (JSC::jsStringWithFinalizer):
3881         (JSC::jsSubstring):
3882         (JSC::jsOwnedString): Use a variable instead of a hard-coded
3883         constant, to make this code less brittle.
3884
3885         * runtime/SmallStrings.cpp:
3886         (JSC::SmallStringsStorage::rep):
3887         (JSC::SmallStringsStorage::SmallStringsStorage):
3888         (JSC::SmallStrings::SmallStrings):
3889         (JSC::SmallStrings::markChildren):
3890         (JSC::SmallStrings::clear):
3891         (JSC::SmallStrings::count): Use a variable instead of a hard-coded
3892         constant, to make this code less brittle.
3893
3894         * runtime/SmallStrings.h:
3895         (JSC::SmallStrings::singleCharacterString): Use HeapRoot instead of
3896         DeprecatedPtr because these references are owned and managed directly by
3897         the heap.
3898         
3899         Stop using FixedArray because we only want a very limited set
3900         of classes to be able to use HeapRoot. (Replaced with manual ASSERTs.)
3901
3902         * runtime/WriteBarrier.h:
3903         (JSC::operator==):
3904         (JSC::WriteBarrier::WriteBarrier):
3905         (JSC::HeapRoot::HeapRoot):
3906         (JSC::HeapRoot::operator=): Added HeapRoot, which is allowed to set
3907         without write barrier because we assume all HeapRoots are scanned during
3908         all GC passes.
3909
3910 2011-03-14  Brian Weinstein  <bweinstein@apple.com>
3911
3912         Reviewed by Adam Roben and Gavin Barraclough.
3913
3914         FileSystemWin.cpp needs listDirectory() implementation
3915         https://bugs.webkit.org/show_bug.cgi?id=56331
3916         <rdar://problem/9126635>
3917         
3918         Give StringConcatenate the ability to deal with const UChar*'s as a String type to append.
3919
3920         * wtf/text/StringConcatenate.h:
3921
3922 2011-03-14  Mark Rowe  <mrowe@apple.com>
3923
3924         Reviewed by Oliver Hunt.
3925
3926         <http://webkit.org/b/56304> REGRESSION(r80892): 100,000+ leaks seen on the build bot
3927
3928         * API/JSClassRef.cpp:
3929         (OpaqueJSClass::OpaqueJSClass): Don't leak any existing entry for the given name if
3930         the class definition contains duplicates. This also removes what look to be leaks
3931         of the StringImpl instances that are used as keys: the HashMap key type is a RefPtr
3932         which retains / releases the instances at the appropriate time, so explicitly calling
3933         ref is not necessary.
3934
3935 2011-03-14  Oliver Hunt  <oliver@apple.com>
3936
3937         Fix windows build
3938
3939         * jit/JSInterfaceJIT.h:
3940         (JSC::JSInterfaceJIT::emitLoadInt32):
3941         (JSC::JSInterfaceJIT::tagFor):
3942         (JSC::JSInterfaceJIT::payloadFor):
3943         (JSC::JSInterfaceJIT::intPayloadFor):
3944         (JSC::JSInterfaceJIT::intTagFor):
3945         (JSC::JSInterfaceJIT::addressFor):
3946
3947 2011-03-11  Oliver Hunt  <oliver@apple.com>
3948
3949         Reviewed by Gavin Barraclough.
3950
3951         Ensure all values are correctly tagged in the registerfile
3952         https://bugs.webkit.org/show_bug.cgi?id=56214
3953
3954         This patch makes sure that all JSCell pointers written to
3955         the registerfile are correctly tagged as JSCells, and replaces
3956         raw int usage with the immediate representation.
3957
3958         For performance, register pressure, and general saneness reasons
3959         I've added abstractions for reading and writing the tag
3960         and payload of integer registers directly for the JSVALUE64
3961         encoding.
3962
3963         * interpreter/Register.h:
3964         (JSC::Register::withInt):
3965         (JSC::Register::withCallee):
3966         (JSC::Register::operator=):
3967         (JSC::Register::i):
3968         (JSC::Register::activation):
3969         (JSC::Register::function):
3970         (JSC::Register::propertyNameIterator):
3971         (JSC::Register::scopeChain):
3972         * jit/JIT.h:
3973         * jit/JITCall.cpp:
3974         (JSC::JIT::compileOpCallInitializeCallFrame):
3975         (JSC::JIT::compileOpCallVarargs):
3976         (JSC::JIT::compileOpCall):
3977         * jit/JITCall32_64.cpp:
3978         (JSC::JIT::compileOpCallInitializeCallFrame):
3979         (JSC::JIT::compileOpCallVarargs):
3980         (JSC::JIT::compileOpCall):
3981         (JSC::JIT::compileOpCallSlowCase):
3982         * jit/JITInlineMethods.h:
3983         (JSC::JIT::emitPutToCallFrameHeader):
3984         (JSC::JIT::emitPutCellToCallFrameHeader):
3985         (JSC::JIT::emitPutIntToCallFrameHeader):
3986         * jit/JITOpcodes.cpp:
3987         (JSC::JIT::privateCompileCTINativeCall):
3988         (JSC::JIT::emit_op_get_pnames):
3989         (JSC::JIT::emit_op_next_pname):
3990         (JSC::JIT::emit_op_load_varargs):
3991         (JSC::JIT::emitSlow_op_load_varargs):
3992         * jit/JITOpcodes32_64.cpp:
3993         (JSC::JIT::privateCompileCTINativeCall):
3994         (JSC::JIT::emit_op_get_pnames):
3995         (JSC::JIT::emit_op_next_pname):
3996         * jit/JSInterfaceJIT.h:
3997         (JSC::JSInterfaceJIT::intPayloadFor):
3998         (JSC::JSInterfaceJIT::intTagFor):
3999         * jit/SpecializedThunkJIT.h:
4000         (JSC::SpecializedThunkJIT::returnJSValue):
4001         (JSC::SpecializedThunkJIT::returnDouble):
4002         (JSC::SpecializedThunkJIT::returnInt32):
4003         (JSC::SpecializedThunkJIT::returnJSCell):
4004
4005 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
4006
4007         Reviewed by Sam Weinig.
4008
4009         A few Heap-related renames (sans file moves, which should come next)
4010         https://bugs.webkit.org/show_bug.cgi?id=56283
4011         
4012         ConservativeSet => ConservativeRoots. "Set" was misleading, since items
4013         are not uniqued. Also, "Roots" is more specific about what's in the set.
4014         
4015         MachineStackMarker => MachineThreads. "Threads" is more descriptive of
4016         the fact that this class maintains a set of all threads using JSC.
4017         "Stack" was misleading, since this class traverses stacks and registers.
4018         "Mark" was misleading, since this class doesn't mark anything anymore.
4019         
4020         registerThread => addCurrentThread. "Current" is more specific.
4021         unregisterThread => removeCurrentThread. "Current" is more specific.
4022         
4023         "currentThreadRegistrar" => threadSpecific. The only point of this data
4024         structure is to register a thread-specific destructor with a pointer to
4025         this.
4026         
4027         "mark...Conservatively" => "gather". "Mark" is not true, since these
4028         functions don't mark anything. "Conservatively" is redundant, since they
4029         take "ConservativeRoots" as an argument.
4030
4031         * API/APIShims.h:
4032         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
4033         * JavaScriptCore.exp:
4034         * runtime/ConservativeSet.cpp:
4035         (JSC::ConservativeRoots::grow):
4036         (JSC::ConservativeRoots::add):
4037         * runtime/ConservativeSet.h:
4038         (JSC::ConservativeRoots::ConservativeRoots):
4039         (JSC::ConservativeRoots::~ConservativeRoots):
4040         (JSC::ConservativeRoots::size):
4041         (JSC::ConservativeRoots::roots):
4042         * runtime/Heap.cpp: