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