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