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