2011-04-25 Geoffrey Garen <ggaren@apple.com>
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
2
3         Reviewed by Oliver Hunt.
4
5         Custom prototypes on DOM objects don't persist after garbage collection
6         https://bugs.webkit.org/show_bug.cgi?id=59412
7         
8         SunSpider reports no change.
9         
10         The hasCustomProperties() check didn't check for a custom prototype.
11
12         * runtime/JSObject.h:
13         (JSC::JSObject::hasCustomProperties): Changed to delegate to Structure
14         because it is the "truth" about an object's pedigree.
15
16         * runtime/Structure.cpp:
17         (JSC::Structure::Structure):
18         * runtime/Structure.h:
19         (JSC::Structure::didTransition): Track whether a Structure has ever
20         transitioned for any reason. If so, we have to assume that the object
21         holding it is custom in some way.
22
23 2011-04-25  Gavin Barraclough  <barraclough@apple.com>
24
25         Reviewed by Geoff Garen.
26
27         https://bugs.webkit.org/show_bug.cgi?id=59405
28         DFG JIT - add type speculation for integer & array types, for vars & args.
29
30         If a var or argument is used as the base for a GetByVal or PutByVal access
31         we are speculating that it is of type Array (we only generate code on the
32         speculative path to perform array accesses). By typing the var or args slot
33         as Array, and checking on entry to the function (in the case of args), and
34         each time the local is written to, we can avoid a type check at each point
35         the array is accessed. This will typically hoist type checks out of loops.
36
37         Similarly, any local that is incremented or decremented, or is the input or
38         output or a bitwise operator, is likely to be an integer. By typing the
39         local as int32 we can avoid speculation checks on access, and tagging when
40         writing to the slot. All accesses can become 32bit instead of 64.
41
42         * dfg/DFGByteCodeParser.cpp:
43         (JSC::DFG::ByteCodeParser::set):
44         (JSC::DFG::ByteCodeParser::predictArray):
45         (JSC::DFG::ByteCodeParser::predictInt32):
46         (JSC::DFG::ByteCodeParser::parseBlock):
47         * dfg/DFGGraph.h:
48         (JSC::DFG::PredictionSlot::PredictionSlot):
49         (JSC::DFG::Graph::Graph):
50         (JSC::DFG::Graph::predict):
51         (JSC::DFG::Graph::getPrediction):
52         * dfg/DFGJITCompiler.cpp:
53         (JSC::DFG::JITCompiler::compileFunction):
54         * dfg/DFGJITCompiler.h:
55         (JSC::DFG::JITCompiler::tagFor):
56         (JSC::DFG::JITCompiler::payloadFor):
57         * dfg/DFGNode.h:
58         * dfg/DFGNonSpeculativeJIT.cpp:
59         (JSC::DFG::NonSpeculativeJIT::compile):
60         * dfg/DFGSpeculativeJIT.cpp:
61         (JSC::DFG::SpeculativeJIT::compile):
62         (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
63         (JSC::DFG::SpeculativeJIT::initializeVariableTypes):
64         * dfg/DFGSpeculativeJIT.h:
65         * runtime/Executable.cpp:
66         (JSC::tryDFGCompile):
67
68 2011-04-25  David Levin  <levin@chromium.org>
69
70         Reviewed by James Robinson.
71
72         Fix OwnPtr strict mode violation in MessageQueue.h
73         https://bugs.webkit.org/show_bug.cgi?id=59400
74
75         * wtf/MessageQueue.h:
76         (WTF::::waitForMessage):
77         (WTF::::waitForMessageFilteredWithTimeout):
78         (WTF::::tryGetMessage):
79
80 2011-04-25  Adam Barth  <abarth@webkit.org>
81
82         Reviewed by Darin Adler.
83
84         JavaScriptCore should play nice strict OwnPtrs
85         https://bugs.webkit.org/show_bug.cgi?id=59401
86
87         * dfg/DFGByteCodeParser.cpp:
88         (JSC::DFG::ByteCodeParser::parse):
89         * heap/Heap.cpp:
90         (JSC::TypeCounter::TypeCounter):
91         * jit/JITStubs.cpp:
92         (JSC::JITThunks::JITThunks):
93         * parser/JSParser.cpp:
94         (JSC::JSParser::Scope::Scope):
95         * yarr/YarrJIT.cpp:
96         (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
97
98 2011-04-25  Mark Rowe  <mrowe@apple.com>
99
100         Build fix.
101
102         * wtf/ListHashSet.h:
103
104 2011-04-25  Gavin Barraclough  <barraclough@apple.com>
105
106         Reviewed by Oliver Hunt.
107
108         Bug 59370 - DFG JIT - fix leak of BlocksBlocks
109         (put the blocks immediately into an OwnPtr).
110
111         * dfg/DFGByteCodeParser.cpp:
112         (JSC::DFG::ByteCodeParser::parse):
113
114 2011-04-25  James Robinson  <jamesr@chromium.org>
115
116         Reviewed by David Levin.
117
118         Fix strict OwnPtr violations in ListHashSet and RenderLayerCompositor
119         https://bugs.webkit.org/show_bug.cgi?id=59353
120
121         * wtf/ListHashSet.h:
122         (WTF::::ListHashSet):
123
124 2011-04-25  David Levin  <levin@chromium.org>
125
126         Reviewed by Adam Barth.
127
128         Fix PassOwnPtr issues in Structure and JSGlobalData.cpp
129         https://bugs.webkit.org/show_bug.cgi?id=59347
130
131         * runtime/JSGlobalData.cpp:
132         (JSC::JSGlobalData::JSGlobalData):
133         * runtime/Structure.cpp:
134         (JSC::Structure::copyPropertyTable):
135         (JSC::Structure::createPropertyMap):
136         * runtime/Structure.h:
137
138 2011-04-25  Oliver Hunt  <oliver@apple.com>
139
140         Reviewed by Geoffrey Garen.
141
142         Make ClassInfo required when creating a Structure
143         https://bugs.webkit.org/show_bug.cgi?id=59340
144
145         Add ClassInfo to all those types which currently don't
146         have it, and add an assertion to Structure::create to
147         ensure that the provided classInfo is not null.
148
149         * runtime/Executable.h:
150         (JSC::EvalExecutable::createStructure):
151         (JSC::ProgramExecutable::createStructure):
152         (JSC::FunctionExecutable::createStructure):
153         * runtime/GetterSetter.cpp:
154         * runtime/GetterSetter.h:
155         (JSC::GetterSetter::createStructure):
156         * runtime/JSAPIValueWrapper.cpp:
157         * runtime/JSAPIValueWrapper.h:
158         (JSC::JSAPIValueWrapper::createStructure):
159         * runtime/JSCell.cpp:
160         * runtime/JSCell.h:
161         * runtime/JSString.cpp:
162         * runtime/JSString.h:
163         (JSC::RopeBuilder::createStructure):
164         * runtime/Structure.h:
165         (JSC::Structure::create):
166         (JSC::JSCell::createDummyStructure):
167
168 2011-04-25  David Levin  <levin@chromium.org>
169
170         Reviewed by Adam Barth.
171
172         PropertyMapHashTable.h should use adoptPtr instead of implicit conversions to PassRefPtr.
173         https://bugs.webkit.org/show_bug.cgi?id=59342
174
175         This patch is to prepare for the strict OwnPtr hack-a-thon.
176
177         * runtime/PropertyMapHashTable.h:
178         (JSC::PropertyTable::copy):
179
180 2011-04-25  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
181
182         Reviewed by Gavin Barraclough.
183
184         Rationalize MacroAssembler branch methods
185         https://bugs.webkit.org/show_bug.cgi?id=58950
186
187         split out the 'Condition' enum into 'RelationalCondition' and 'ResultCondition' 
188         and apply related changes (only for SH4 platforms).
189
190         * assembler/MacroAssemblerSH4.cpp:
191         * assembler/MacroAssemblerSH4.h:
192         (JSC::MacroAssemblerSH4::compare32):
193         (JSC::MacroAssemblerSH4::branch32WithUnalignedHalfWords):
194         (JSC::MacroAssemblerSH4::branchDouble):
195         (JSC::MacroAssemblerSH4::branch32):
196         (JSC::MacroAssemblerSH4::branchTest8):
197         (JSC::MacroAssemblerSH4::branch8):
198         (JSC::MacroAssemblerSH4::branchTruncateDoubleToInt32):
199         (JSC::MacroAssemblerSH4::test8):
200         (JSC::MacroAssemblerSH4::branch16):
201         (JSC::MacroAssemblerSH4::branchTest32):
202         (JSC::MacroAssemblerSH4::branchAdd32):
203         (JSC::MacroAssemblerSH4::branchMul32):
204         (JSC::MacroAssemblerSH4::branchSub32):
205         (JSC::MacroAssemblerSH4::branchOr32):
206         (JSC::MacroAssemblerSH4::branchConvertDoubleToInt32):
207         (JSC::MacroAssemblerSH4::branchPtrWithPatch):
208         (JSC::MacroAssemblerSH4::SH4Condition):
209         * assembler/SH4Assembler.h:
210         (JSC::SH4Assembler::cmpEqImmR0):
211
212 2011-04-25  Adam Barth  <abarth@webkit.org>
213
214         Reviewed by Eric Seidel.
215
216         PropertyMapHashTable should work with strict OwnPtr
217         https://bugs.webkit.org/show_bug.cgi?id=59337
218
219         This patch is in preparation for the strict OwnPtr hack-a-thon.
220
221         * runtime/PropertyMapHashTable.h:
222         (JSC::PropertyTable::PropertyTable):
223         (JSC::PropertyTable::addDeletedOffset):
224
225 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
226
227         Reviewed by Sam Weinig.
228
229         Nixed MarkStack::deprecatedAppend, since it has no clients left.
230
231         * heap/MarkStack.h:
232
233 2011-04-23  Gavin Barraclough  <barraclough@apple.com>
234
235         Reviewed by Oliver Hunt.
236
237         Bug 59287 - DFG JIT - Handle temporaries as vars, allowing support for ?:
238
239         SetLocals to temporaries will only be generated if they are used within other
240         blocks, due to the SSA based DCE.
241
242         * dfg/DFGByteCodeParser.cpp:
243         (JSC::DFG::ByteCodeParser::ByteCodeParser):
244         (JSC::DFG::ByteCodeParser::get):
245         (JSC::DFG::ByteCodeParser::set):
246         (JSC::DFG::ByteCodeParser::getLocal):
247         (JSC::DFG::ByteCodeParser::setLocal):
248         (JSC::DFG::ByteCodeParser::parseBlock):
249         (JSC::DFG::ByteCodeParser::processPhiStack):
250         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
251         (JSC::DFG::ByteCodeParser::parse):
252         * dfg/DFGGraph.h:
253         (JSC::DFG::BasicBlock::BasicBlock):
254
255 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
256
257         Reviewed by Sam Weinig & Geoff Garen.
258
259         Bug 59266 - DFG JIT - Add SSA style DCE
260
261         This works by making GetLocal nodes reference SetLocal nodes from prior blocks,
262         via intermediate Phi nodes. Whenever we add a GetLocal to the graph, also add a
263         matching child Phi, and add the Phi to a work queue to add references to prior
264         definitions once we have the full CFG & can determine predecessors. This process
265         is iterative, inserting new phis into predecessors as necessary.
266
267         * dfg/DFGByteCodeParser.cpp:
268         (JSC::DFG::ByteCodeParser::getVariable):
269         (JSC::DFG::ByteCodeParser::setVariable):
270         (JSC::DFG::ByteCodeParser::getArgument):
271         (JSC::DFG::ByteCodeParser::setArgument):
272         (JSC::DFG::ByteCodeParser::parseBlock):
273         (JSC::DFG::ByteCodeParser::processWorkQueue):
274         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
275         (JSC::DFG::ByteCodeParser::parse):
276         * dfg/DFGGraph.cpp:
277         (JSC::DFG::Graph::dump):
278         (JSC::DFG::Graph::refChildren):
279         * dfg/DFGGraph.h:
280         (JSC::DFG::Graph::ref):
281         * dfg/DFGNode.h:
282         (JSC::DFG::Node::ref):
283         * dfg/DFGNonSpeculativeJIT.cpp:
284         (JSC::DFG::NonSpeculativeJIT::compile):
285         * dfg/DFGScoreBoard.h:
286         (JSC::DFG::ScoreBoard::~ScoreBoard):
287         (JSC::DFG::ScoreBoard::dump):
288         * dfg/DFGSpeculativeJIT.cpp:
289         (JSC::DFG::SpeculativeJIT::compile):
290
291 2011-04-22  Vitaly Repeshko  <vitalyr@chromium.org>
292
293         Reviewed by Adam Barth.
294
295         Add missing default constructors for HashMap iterator specializations.
296         https://bugs.webkit.org/show_bug.cgi?id=59250
297
298         * wtf/HashIterators.h:
299         * wtf/HashTable.h:
300         (WTF::HashTableConstIterator::HashTableConstIterator): Added cast
301         to help compiler find the function template.
302
303 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
304
305         Reviewed by Sam Weinig.
306
307         Bug 59262 - DFG JIT - reduce size of VariableRecord
308
309         We never need both the get & set node, only the most recent
310         (which is always a set, if both exist).
311
312         * dfg/DFGByteCodeParser.cpp:
313         (JSC::DFG::ByteCodeParser::getVariable):
314         (JSC::DFG::ByteCodeParser::setVariable):
315         (JSC::DFG::ByteCodeParser::getArgument):
316         (JSC::DFG::ByteCodeParser::setArgument):
317         (JSC::DFG::ByteCodeParser::parseBlock):
318         * dfg/DFGGraph.h:
319         (JSC::DFG::VariableRecord::VariableRecord):
320
321 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
322
323         Reviewed by Geoffrey Garen.
324
325         Bug 59254 - DFG JIT - retain VariableRecords for args/var in all basic blocks,
326         such that this information is available for DCE.  Also, since this enlarges the
327         size of BasicBlock, make Graph hold a vector of pointers to basic blocks, not a
328         vector of blocks.
329
330         * dfg/DFGByteCodeParser.cpp:
331         (JSC::DFG::ByteCodeParser::ByteCodeParser):
332         (JSC::DFG::ByteCodeParser::get):
333         (JSC::DFG::ByteCodeParser::set):
334         (JSC::DFG::ByteCodeParser::getVariable):
335         (JSC::DFG::ByteCodeParser::setVariable):
336         (JSC::DFG::ByteCodeParser::getArgument):
337         (JSC::DFG::ByteCodeParser::setArgument):
338         (JSC::DFG::ByteCodeParser::parseBlock):
339         (JSC::DFG::ByteCodeParser::setupPredecessors):
340         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
341         (JSC::DFG::ByteCodeParser::parse):
342         * dfg/DFGGraph.cpp:
343         (JSC::DFG::Graph::dump):
344         * dfg/DFGGraph.h:
345         (JSC::DFG::VariableRecord::VariableRecord):
346         (JSC::DFG::BasicBlock::BasicBlock):
347         (JSC::DFG::BasicBlock::getBytecodeBegin):
348         (JSC::DFG::Graph::blockIndexForBytecodeOffset):
349         (JSC::DFG::Graph::blockForBytecodeOffset):
350         * dfg/DFGNonSpeculativeJIT.cpp:
351         (JSC::DFG::NonSpeculativeJIT::compile):
352         * dfg/DFGSpeculativeJIT.cpp:
353         (JSC::DFG::SpeculativeJIT::compile):
354         * dfg/DFGSpeculativeJIT.h:
355         (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
356
357 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
358
359         Errk, build fix.
360
361         * dfg/DFGSpeculativeJIT.cpp:
362         (JSC::DFG::SpeculativeJIT::compile):
363
364 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
365
366         Reviewed by Sam Weinig.
367
368         Quick cleanup to SpeculativeJIT/NonSpeculativeJIT compile loop,
369         move out the call to checkConsistency().
370
371         * dfg/DFGNonSpeculativeJIT.cpp:
372         (JSC::DFG::NonSpeculativeJIT::compile):
373         * dfg/DFGSpeculativeJIT.cpp:
374         (JSC::DFG::SpeculativeJIT::compile):
375         * dfg/DFGSpeculativeJIT.h:
376         (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
377         (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
378
379 2011-04-21  Vitaly Repeshko  <vitalyr@chromium.org>
380
381         Reviewed by Adam Barth.
382
383         Provide default constructors for HashMap iterators.
384         https://bugs.webkit.org/show_bug.cgi?id=59151
385
386         These will be used to implement an iterator over EventTarget's
387         listeners.
388
389         * wtf/HashTable.h:
390         (WTF::HashTableConstIteratorAdapter::HashTableConstIteratorAdapter):
391         (WTF::HashTableIteratorAdapter::HashTableIteratorAdapter):
392
393 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
394
395         Reviewed by Geoff Garen.
396
397         Bug 59232 - DFG JIT - Add predecessor links to BasicBlocks
398
399         These will be necessary for DCE support.
400         Also factor allocateVirtualRegisters out into its own method.
401
402         * dfg/DFGByteCodeParser.cpp:
403         (JSC::DFG::ByteCodeParser::setupPredecessors):
404         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
405         (JSC::DFG::ByteCodeParser::parse):
406         * dfg/DFGGraph.h:
407         (JSC::DFG::Graph::blockForBytecodeOffset):
408         * dfg/DFGNode.h:
409         (JSC::DFG::Node::isTerminal):
410
411 2011-04-22  Oliver Hunt  <oliver@apple.com>
412
413         Reviewed by Geoffrey Garen.
414
415         Object.create creates uncachable objects
416         https://bugs.webkit.org/show_bug.cgi?id=59164
417
418         Use the prototype object's inheritorID, as we
419         should always have done
420
421         * runtime/JSGlobalObject.cpp:
422         (JSC::JSGlobalObject::reset):
423         (JSC::JSGlobalObject::visitChildren):
424         * runtime/JSGlobalObject.h:
425         (JSC::JSGlobalObject::nullPrototypeObjectStructure):
426         * runtime/ObjectConstructor.cpp:
427         (JSC::objectConstructorCreate):
428
429 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
430
431         Reviewed by Sam Weinig.
432
433         Bug 59222 - DFG JIT - don't allocate virtual registers to nodes with no result
434
435         We currently allocate virtual registers to nodes which have no result - these are
436         clearly unused, and may result in us allocating a larger than necessary stack frame.
437
438         Encapsulate Node::virtualRegister such that we can ASSERT this is only called on
439         nodes that have results, and improve the quality of output from the consistency check.
440
441         * dfg/DFGByteCodeParser.cpp:
442         (JSC::DFG::ByteCodeParser::parse):
443         * dfg/DFGGraph.cpp:
444         (JSC::DFG::Graph::dump):
445         * dfg/DFGGraph.h:
446         (JSC::DFG::Graph::ref):
447         (JSC::DFG::Graph::deref):
448         * dfg/DFGJITCodeGenerator.cpp:
449         (JSC::DFG::JITCodeGenerator::fillInteger):
450         (JSC::DFG::JITCodeGenerator::fillDouble):
451         (JSC::DFG::JITCodeGenerator::fillJSValue):
452         (JSC::DFG::JITCodeGenerator::dump):
453         (JSC::DFG::JITCodeGenerator::checkConsistency):
454         * dfg/DFGJITCodeGenerator.h:
455         (JSC::DFG::JITCodeGenerator::canReuse):
456         (JSC::DFG::JITCodeGenerator::isFilled):
457         (JSC::DFG::JITCodeGenerator::isFilledDouble):
458         (JSC::DFG::JITCodeGenerator::use):
459         (JSC::DFG::JITCodeGenerator::integerResult):
460         (JSC::DFG::JITCodeGenerator::noResult):
461         (JSC::DFG::JITCodeGenerator::cellResult):
462         (JSC::DFG::JITCodeGenerator::jsValueResult):
463         (JSC::DFG::JITCodeGenerator::doubleResult):
464         (JSC::DFG::JITCodeGenerator::initConstantInfo):
465         * dfg/DFGJITCompiler.cpp:
466         (JSC::DFG::JITCompiler::fillNumericToDouble):
467         (JSC::DFG::JITCompiler::fillInt32ToInteger):
468         (JSC::DFG::JITCompiler::fillToJS):
469         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
470         * dfg/DFGNode.h:
471         (JSC::DFG::Node::Node):
472         (JSC::DFG::Node::hasResult):
473         (JSC::DFG::Node::virtualRegister):
474         (JSC::DFG::Node::setVirtualRegister):
475         (JSC::DFG::Node::refCount):
476         (JSC::DFG::Node::ref):
477         (JSC::DFG::Node::deref):
478         (JSC::DFG::Node::adjustedRefCount):
479         * dfg/DFGNonSpeculativeJIT.cpp:
480         (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
481         (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
482         (JSC::DFG::NonSpeculativeJIT::compile):
483         * dfg/DFGScoreBoard.h:
484         (JSC::DFG::ScoreBoard::use):
485         * dfg/DFGSpeculativeJIT.cpp:
486         (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
487         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
488         (JSC::DFG::SpeculativeJIT::compile):
489
490 2011-04-22  Sam Weinig  <sam@webkit.org>
491
492         Reviewed by Gavin Barraclough and Oliver Hunt.
493
494         Arrays should participate in global object forwarding fun
495         https://bugs.webkit.org/show_bug.cgi?id=59215
496
497         * runtime/JSGlobalObject.h:
498         (JSC::constructEmptyArray):
499         (JSC::constructArray):
500         Add variants of constructArray that take a global object.
501
502 2011-04-22  Sheriff Bot  <webkit.review.bot@gmail.com>
503
504         Unreviewed, rolling out r84650 and r84654.
505         http://trac.webkit.org/changeset/84650
506         http://trac.webkit.org/changeset/84654
507         https://bugs.webkit.org/show_bug.cgi?id=59218
508
509         Broke Windows build (Requested by bweinstein on #webkit).
510
511         * API/JSCallbackObjectFunctions.h:
512         (JSC::::init):
513         * JavaScriptCore.exp:
514         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
515         * heap/Handle.h:
516         (JSC::HandleBase::operator!):
517         (JSC::HandleBase::operator UnspecifiedBoolType*):
518         (JSC::HandleTypes::getFromSlot):
519         * heap/HandleHeap.cpp:
520         (JSC::HandleHeap::markStrongHandles):
521         (JSC::HandleHeap::markWeakHandles):
522         (JSC::HandleHeap::finalizeWeakHandles):
523         (JSC::HandleHeap::writeBarrier):
524         (JSC::HandleHeap::protectedGlobalObjectCount):
525         (JSC::HandleHeap::isValidWeakNode):
526         * heap/HandleHeap.h:
527         (JSC::HandleHeap::copyWeak):
528         (JSC::HandleHeap::makeWeak):
529         (JSC::HandleHeap::Node::slot):
530         * heap/HandleStack.cpp:
531         (JSC::HandleStack::mark):
532         (JSC::HandleStack::grow):
533         * heap/HandleStack.h:
534         (JSC::HandleStack::zapTo):
535         (JSC::HandleStack::push):
536         * heap/Heap.cpp:
537         (JSC::HandleHeap::protectedObjectTypeCounts):
538         * heap/Local.h:
539         (JSC::::set):
540         * heap/Strong.h:
541         (JSC::Strong::set):
542         * heap/Weak.h:
543         (JSC::Weak::set):
544         * runtime/StructureTransitionTable.h:
545         (JSC::StructureTransitionTable::singleTransition):
546         (JSC::StructureTransitionTable::setSingleTransition):
547         * runtime/WeakGCMap.h:
548         (JSC::WeakGCMap::add):
549         (JSC::WeakGCMap::set):
550         * runtime/WriteBarrier.h:
551
552 2011-04-22  Brian Weinstein  <bweinstein@apple.com>
553
554         Part of Windows build fix from r84650.
555
556         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
557
558 2011-04-22  Oliver Hunt  <oliver@apple.com>
559
560         Reviewed by Geoffrey Garen.
561
562         Make it harder to use HandleSlot incorrectly
563         https://bugs.webkit.org/show_bug.cgi?id=59205
564
565         Just add a little type fudging to make it harder to
566         incorrectly assign through a HandleSlot.
567
568         * API/JSCallbackObjectFunctions.h:
569         (JSC::::init):
570         * JavaScriptCore.exp:
571         * heap/Handle.h:
572         (JSC::HandleBase::operator!):
573         (JSC::HandleBase::operator UnspecifiedBoolType*):
574         (JSC::HandleTypes::getFromSlot):
575         * heap/HandleHeap.cpp:
576         (JSC::HandleHeap::markStrongHandles):
577         (JSC::HandleHeap::markWeakHandles):
578         (JSC::HandleHeap::finalizeWeakHandles):
579         (JSC::HandleHeap::writeBarrier):
580         (JSC::HandleHeap::protectedGlobalObjectCount):
581         (JSC::HandleHeap::isValidWeakNode):
582         * heap/HandleHeap.h:
583         (JSC::HandleHeap::copyWeak):
584         (JSC::HandleHeap::makeWeak):
585         (JSC::HandleHeap::Node::slot):
586         * heap/HandleStack.cpp:
587         (JSC::HandleStack::mark):
588         (JSC::HandleStack::grow):
589         * heap/HandleStack.h:
590         (JSC::HandleStack::zapTo):
591         (JSC::HandleStack::push):
592         * heap/Heap.cpp:
593         (JSC::HandleHeap::protectedObjectTypeCounts):
594         * heap/Local.h:
595         (JSC::::set):
596         * heap/Strong.h:
597         (JSC::Strong::set):
598         * heap/Weak.h:
599         (JSC::Weak::set):
600         * runtime/StructureTransitionTable.h:
601         (JSC::StructureTransitionTable::singleTransition):
602         (JSC::StructureTransitionTable::setSingleTransition):
603         * runtime/WeakGCMap.h:
604         (JSC::WeakGCMap::add):
605         (JSC::WeakGCMap::set):
606         * runtime/WriteBarrier.h:
607         (JSC::OpaqueJSValue::toJSValue):
608         (JSC::OpaqueJSValue::toJSValueRef):
609         (JSC::OpaqueJSValue::fromJSValue):
610
611 2011-04-22  Patrick Gansterer  <paroga@webkit.org>
612
613         Unreviewed. Build fix for ENABLE(INTERPRETER) after r84556.
614
615         * bytecode/CodeBlock.cpp:
616         (JSC::CodeBlock::visitAggregate):
617
618 2011-04-21  Sheriff Bot  <webkit.review.bot@gmail.com>
619
620         Unreviewed, rolling out r84583.
621         http://trac.webkit.org/changeset/84583
622         https://bugs.webkit.org/show_bug.cgi?id=59173
623
624         "broke
625         http://trac.webkit.org/export/84593/trunk/LayoutTests/fast/js
626         /Object-create.html" (Requested by ggaren on #webkit).
627
628         * runtime/ObjectConstructor.cpp:
629         (JSC::objectConstructorCreate):
630
631 2011-04-21  Maciej Stachowiak  <mjs@apple.com>
632
633         Reviewed by Adam Roben.
634
635         Add a feature define to allow <details> and <summary> to be disabled
636         https://bugs.webkit.org/show_bug.cgi?id=59118
637         <rdar://problem/9257045>
638
639         * Configurations/FeatureDefines.xcconfig:
640
641 2011-04-21  Oliver Hunt  <oliver@apple.com>
642
643         Reviewed by Geoffrey Garen.
644
645         Object.create creates uncachable objects
646         https://bugs.webkit.org/show_bug.cgi?id=59164
647
648         Use the prototype object's inheritorID, as we
649         should always have done
650
651         * runtime/ObjectConstructor.cpp:
652         (JSC::objectConstructorCreate):
653
654 2011-04-21  Oliver Hunt  <oliver@apple.com>
655
656         Reviewed by Geoffrey Garen.
657
658         Start moving to a general visitor pattern for GC traversal
659         https://bugs.webkit.org/show_bug.cgi?id=59141
660
661         This is just a rename:
662             markChildren -> visitChildren
663             markAggregate -> visitAggregate
664             markStack -> visitor
665             MarkStack -> typedef'd to SlotVisitor
666
667         * API/JSCallbackObject.h:
668         (JSC::JSCallbackObjectData::visitChildren):
669         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
670         (JSC::JSCallbackObject::visitChildren):
671         * JavaScriptCore.exp:
672         * bytecode/CodeBlock.cpp:
673         (JSC::CodeBlock::visitStructures):
674         (JSC::EvalCodeCache::visitAggregate):
675         (JSC::CodeBlock::visitAggregate):
676         * bytecode/CodeBlock.h:
677         * bytecode/EvalCodeCache.h:
678         * bytecode/Instruction.h:
679         (JSC::PolymorphicAccessStructureList::visitAggregate):
680         * bytecode/StructureStubInfo.cpp:
681         (JSC::StructureStubInfo::visitAggregate):
682         * bytecode/StructureStubInfo.h:
683         * debugger/DebuggerActivation.cpp:
684         (JSC::DebuggerActivation::visitChildren):
685         * debugger/DebuggerActivation.h:
686         * heap/HandleHeap.cpp:
687         (JSC::WeakHandleOwner::isReachableFromOpaqueRoots):
688         (JSC::HandleHeap::markStrongHandles):
689         (JSC::HandleHeap::markWeakHandles):
690         * heap/HandleHeap.h:
691         * heap/HandleStack.cpp:
692         (JSC::HandleStack::mark):
693         * heap/HandleStack.h:
694         * heap/Heap.cpp:
695         (JSC::Heap::markProtectedObjects):
696         (JSC::Heap::markTempSortVectors):
697         (JSC::Heap::markRoots):
698         * heap/Heap.h:
699         * heap/MarkStack.cpp:
700         (JSC::MarkStack::visitChildren):
701         (JSC::MarkStack::drain):
702         * heap/MarkStack.h:
703         (JSC::HeapRootVisitor::HeapRootVisitor):
704         (JSC::HeapRootVisitor::mark):
705         (JSC::HeapRootVisitor::visitor):
706         * heap/MarkedSpace.h:
707         * runtime/ArgList.cpp:
708         (JSC::MarkedArgumentBuffer::markLists):
709         * runtime/ArgList.h:
710         * runtime/Arguments.cpp:
711         (JSC::Arguments::visitChildren):
712         * runtime/Arguments.h:
713         * runtime/Executable.cpp:
714         (JSC::EvalExecutable::visitChildren):
715         (JSC::ProgramExecutable::visitChildren):
716         (JSC::FunctionExecutable::visitChildren):
717         * runtime/Executable.h:
718         * runtime/GetterSetter.cpp:
719         (JSC::GetterSetter::visitChildren):
720         * runtime/GetterSetter.h:
721         (JSC::GetterSetter::createStructure):
722         * runtime/JSAPIValueWrapper.h:
723         (JSC::JSAPIValueWrapper::createStructure):
724         * runtime/JSActivation.cpp:
725         (JSC::JSActivation::visitChildren):
726         * runtime/JSActivation.h:
727         * runtime/JSArray.cpp:
728         (JSC::JSArray::visitChildren):
729         * runtime/JSArray.h:
730         (JSC::JSArray::visitDirect):
731         * runtime/JSCell.h:
732         (JSC::JSCell::JSCell::visitChildren):
733         * runtime/JSFunction.cpp:
734         (JSC::JSFunction::visitChildren):
735         * runtime/JSFunction.h:
736         * runtime/JSGlobalObject.cpp:
737         (JSC::visitIfNeeded):
738         (JSC::JSGlobalObject::visitChildren):
739         * runtime/JSGlobalObject.h:
740         * runtime/JSONObject.cpp:
741         * runtime/JSObject.cpp:
742         (JSC::JSObject::visitChildren):
743         * runtime/JSObject.h:
744         (JSC::JSObject::visitDirect):
745         * runtime/JSPropertyNameIterator.cpp:
746         (JSC::JSPropertyNameIterator::visitChildren):
747         * runtime/JSPropertyNameIterator.h:
748         (JSC::JSPropertyNameIterator::createStructure):
749         * runtime/JSStaticScopeObject.cpp:
750         (JSC::JSStaticScopeObject::visitChildren):
751         * runtime/JSStaticScopeObject.h:
752         * runtime/JSTypeInfo.h:
753         (JSC::TypeInfo::TypeInfo):
754         (JSC::TypeInfo::overridesVisitChildren):
755         * runtime/JSWrapperObject.cpp:
756         (JSC::JSWrapperObject::visitChildren):
757         * runtime/JSWrapperObject.h:
758         * runtime/JSZombie.h:
759         (JSC::JSZombie::visitChildren):
760         * runtime/NativeErrorConstructor.cpp:
761         (JSC::NativeErrorConstructor::visitChildren):
762         * runtime/NativeErrorConstructor.h:
763         * runtime/RegExpObject.cpp:
764         (JSC::RegExpObject::visitChildren):
765         * runtime/RegExpObject.h:
766         * runtime/ScopeChain.cpp:
767         (JSC::ScopeChainNode::visitChildren):
768         * runtime/ScopeChain.h:
769         * runtime/SmallStrings.cpp:
770         (JSC::SmallStrings::visitChildren):
771         * runtime/SmallStrings.h:
772         * runtime/Structure.cpp:
773         (JSC::Structure::Structure):
774         (JSC::Structure::visitChildren):
775         * runtime/Structure.h:
776         * runtime/StructureChain.cpp:
777         (JSC::StructureChain::visitChildren):
778         * runtime/StructureChain.h:
779         (JSC::StructureChain::createStructure):
780
781 2011-04-21  Sheriff Bot  <webkit.review.bot@gmail.com>
782
783         Unreviewed, rolling out r84548.
784         http://trac.webkit.org/changeset/84548
785         https://bugs.webkit.org/show_bug.cgi?id=59144
786
787         Broke chromium-win build (Requested by aklein on #webkit).
788
789         * wtf/Platform.h:
790
791 2011-04-21  Adam Klein  <adamk@chromium.org>
792
793         Reviewed by David Levin.
794
795         [fileapi] Worker File API calls that create Blobs fail in debug builds due to random number generator thread assertion
796         https://bugs.webkit.org/show_bug.cgi?id=55728
797
798         Enable WTF_MULTIPLE_THREADS for Chromium.
799
800         * wtf/Platform.h:
801
802 2011-04-20  Michael Saboff  <msaboff@apple.com>
803
804         Reviewed by Geoff Garen.
805
806         JSString::resolveRope inefficient for common 2 fiber case
807         https://bugs.webkit.org/show_bug.cgi?id=58994
808
809         Split JSString::resolveRope into three routines.
810         resolveRope allocates the new buffer and handles the 1 or 2
811         fiber case with single level fibers.
812         resolveRopeSlowCase handles the general case.
813         outOfMemory handles the rare out of memory exception case.
814
815         * runtime/JSString.cpp:
816         (JSC::JSString::resolveRope):
817         (JSC::JSString::resolveRopeSlowCase):
818         (JSC::JSString::outOfMemory):
819         * runtime/JSString.h:
820
821 2011-04-20  Adam Klein  <adamk@chromium.org>
822
823         Reviewed by David Levin.
824
825         Rename all uses of JSC_MULTIPLE_THREADS under wtf/... to WTF_MULTIPLE_THREADS
826         https://bugs.webkit.org/show_bug.cgi?id=59040
827
828         This will be used to fix https://bugs.webkit.org/show_bug.cgi?id=55728
829         by enabling WTF_MULTIPLE_THREADS for Chromium.
830
831         * wtf/CryptographicallyRandomNumber.cpp:
832         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
833         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
834         * wtf/FastMalloc.cpp:
835         * wtf/Platform.h:
836         Enable WTF_MULTIPLE_THREADS whenever JSC_MULTIPLE_THREADS is enabled.
837         * wtf/RandomNumber.cpp:
838         (WTF::randomNumber):
839         * wtf/RefCountedLeakCounter.cpp:
840         (WTF::RefCountedLeakCounter::increment):
841         (WTF::RefCountedLeakCounter::decrement):
842         * wtf/dtoa.cpp:
843         (WTF::pow5mult):
844
845 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
846
847         Rubber stamped by Geoff Garen
848
849         Bug 59069 - DFG JIT - register allocate r8, r9, r10
850
851         * dfg/DFGJITCompiler.h:
852         (JSC::DFG::JITCompiler::gprToRegisterID):
853
854 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
855
856         Build fix - revert accidental change.
857
858         * wtf/Platform.h:
859
860 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
861
862         Reviewed by Sam Weinig.
863
864         Add SAMPLING_FLAGS tool to DFG JIT.
865
866         * bytecode/SamplingTool.h:
867         (JSC::SamplingFlags::addressOfFlags):
868         * dfg/DFGJITCompiler.cpp:
869         (JSC::DFG::JITCompiler::setSamplingFlag):
870         (JSC::DFG::JITCompiler::clearSamplingFlag):
871         * dfg/DFGJITCompiler.h:
872         * jit/JITInlineMethods.h:
873         (JSC::JIT::setSamplingFlag):
874         (JSC::JIT::clearSamplingFlag):
875         * wtf/Platform.h:
876
877 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
878
879         Reviewed by Oliver Hunt.
880
881         Bug 59022 - DFG JIT - Optimize branch-on-relational-compare
882
883         If a relational compare (< or <=) is immediately followed by a branch,
884         we can combine the two, avoiding generation of a boolean into a register.
885
886         * assembler/MacroAssemblerX86Common.h:
887         (JSC::MacroAssemblerX86Common::branch32):
888         (JSC::MacroAssemblerX86Common::invert):
889         (JSC::MacroAssemblerX86Common::commute):
890         * dfg/DFGNode.h:
891         (JSC::DFG::Node::adjustedRefCount):
892         * dfg/DFGSpeculativeJIT.cpp:
893         (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
894         (JSC::DFG::SpeculativeJIT::compile):
895         * dfg/DFGSpeculativeJIT.h:
896         (JSC::DFG::SpeculativeJIT::isJSConstantWithInt32Value):
897         (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
898
899 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
900
901         ARMv7 build fix II.
902
903         * jit/JITOpcodes32_64.cpp:
904         (JSC::JIT::softModulo):
905
906 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
907
908         ARMv7 build fix.
909
910         * assembler/MacroAssemblerARM.h:
911         (JSC::MacroAssemblerARM::test8):
912
913 2011-04-19  Gavin Barraclough  <barraclough@apple.com>
914
915         Reviewed by Oliver Hunt.
916
917         Rationalize MacroAssembler branch methods
918         https://bugs.webkit.org/show_bug.cgi?id=58950
919
920         The MacroAssembler currently exposes x86's weird behaviour that the 'setcc'
921         instruction only sets the low 8 bits of a register. Stop that.
922
923         Having done so, to clarify remove the 'set32' prefix from test & compare
924         instructions - these methods all now set a full 32/64 bit register (Ptr size).
925         The size in the function name should indicate the amount of data being compared.
926
927         Also split out the 'Condition' enum into 'RelationalCondition' and
928         'ResultCondition'. The former is used in binary comparison, the latter is a unary
929         condition check on the result of an operation.
930
931         * JavaScriptCore.xcodeproj/project.pbxproj:
932         * assembler/MacroAssembler.h:
933         (JSC::MacroAssembler::branchPtr):
934         (JSC::MacroAssembler::branch32):
935         (JSC::MacroAssembler::branch16):
936         (JSC::MacroAssembler::branchTestPtr):
937         (JSC::MacroAssembler::comparePtr):
938         (JSC::MacroAssembler::branchAddPtr):
939         (JSC::MacroAssembler::branchSubPtr):
940         (JSC::MacroAssembler::branchTest8):
941         * assembler/MacroAssemblerARM.h:
942         (JSC::MacroAssemblerARM::branch8):
943         (JSC::MacroAssemblerARM::branch32):
944         (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
945         (JSC::MacroAssemblerARM::branch16):
946         (JSC::MacroAssemblerARM::branchTest8):
947         (JSC::MacroAssemblerARM::branchTest32):
948         (JSC::MacroAssemblerARM::branchAdd32):
949         (JSC::MacroAssemblerARM::branchMul32):
950         (JSC::MacroAssemblerARM::branchSub32):
951         (JSC::MacroAssemblerARM::branchNeg32):
952         (JSC::MacroAssemblerARM::branchOr32):
953         (JSC::MacroAssemblerARM::compare32):
954         (JSC::MacroAssemblerARM::test32):
955         (JSC::MacroAssemblerARM::test8):
956         (JSC::MacroAssemblerARM::branchPtrWithPatch):
957         (JSC::MacroAssemblerARM::ARMCondition):
958         * assembler/MacroAssemblerARMv7.h:
959         (JSC::MacroAssemblerARMv7::branch32):
960         (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
961         (JSC::MacroAssemblerARMv7::branch16):
962         (JSC::MacroAssemblerARMv7::branch8):
963         (JSC::MacroAssemblerARMv7::branchTest32):
964         (JSC::MacroAssemblerARMv7::branchTest8):
965         (JSC::MacroAssemblerARMv7::branchAdd32):
966         (JSC::MacroAssemblerARMv7::branchMul32):
967         (JSC::MacroAssemblerARMv7::branchOr32):
968         (JSC::MacroAssemblerARMv7::branchSub32):
969         (JSC::MacroAssemblerARMv7::compare32):
970         (JSC::MacroAssemblerARMv7::test32):
971         (JSC::MacroAssemblerARMv7::test8):
972         (JSC::MacroAssemblerARMv7::branchPtrWithPatch):
973         (JSC::MacroAssemblerARMv7::makeBranch):
974         (JSC::MacroAssemblerARMv7::armV7Condition):
975         * assembler/MacroAssemblerMIPS.h:
976         (JSC::MacroAssemblerMIPS::branch8):
977         (JSC::MacroAssemblerMIPS::branch32):
978         (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
979         (JSC::MacroAssemblerMIPS::branch16):
980         (JSC::MacroAssemblerMIPS::branchTest32):
981         (JSC::MacroAssemblerMIPS::branchTest8):
982         (JSC::MacroAssemblerMIPS::branchAdd32):
983         (JSC::MacroAssemblerMIPS::branchMul32):
984         (JSC::MacroAssemblerMIPS::branchSub32):
985         (JSC::MacroAssemblerMIPS::branchOr32):
986         (JSC::MacroAssemblerMIPS::compare32):
987         (JSC::MacroAssemblerMIPS::test8):
988         (JSC::MacroAssemblerMIPS::test32):
989         (JSC::MacroAssemblerMIPS::branchPtrWithPatch):
990         * assembler/MacroAssemblerX86.h:
991         (JSC::MacroAssemblerX86::branch32):
992         (JSC::MacroAssemblerX86::branchPtrWithPatch):
993         * assembler/MacroAssemblerX86Common.h:
994         (JSC::MacroAssemblerX86Common::branch8):
995         (JSC::MacroAssemblerX86Common::branch32):
996         (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
997         (JSC::MacroAssemblerX86Common::branch16):
998         (JSC::MacroAssemblerX86Common::branchTest32):
999         (JSC::MacroAssemblerX86Common::branchTest8):
1000         (JSC::MacroAssemblerX86Common::branchAdd32):
1001         (JSC::MacroAssemblerX86Common::branchMul32):
1002         (JSC::MacroAssemblerX86Common::branchSub32):
1003         (JSC::MacroAssemblerX86Common::branchNeg32):
1004         (JSC::MacroAssemblerX86Common::branchOr32):
1005         (JSC::MacroAssemblerX86Common::compare32):
1006         (JSC::MacroAssemblerX86Common::test8):
1007         (JSC::MacroAssemblerX86Common::test32):
1008         (JSC::MacroAssemblerX86Common::x86Condition):
1009         * assembler/MacroAssemblerX86_64.h:
1010         (JSC::MacroAssemblerX86_64::comparePtr):
1011         (JSC::MacroAssemblerX86_64::branchPtr):
1012         (JSC::MacroAssemblerX86_64::branchTestPtr):
1013         (JSC::MacroAssemblerX86_64::branchAddPtr):
1014         (JSC::MacroAssemblerX86_64::branchSubPtr):
1015         (JSC::MacroAssemblerX86_64::branchPtrWithPatch):
1016         (JSC::MacroAssemblerX86_64::branchTest8):
1017         * dfg/DFGSpeculativeJIT.cpp:
1018         (JSC::DFG::SpeculativeJIT::compile):
1019         * jit/JITOpcodes.cpp:
1020         (JSC::JIT::emit_op_eq):
1021         (JSC::JIT::emit_op_neq):
1022         (JSC::JIT::compileOpStrictEq):
1023         (JSC::JIT::emit_op_eq_null):
1024         (JSC::JIT::emit_op_neq_null):
1025         * jit/JITOpcodes32_64.cpp:
1026         (JSC::JIT::emit_op_eq):
1027         (JSC::JIT::emit_op_neq):
1028         (JSC::JIT::compileOpStrictEq):
1029         (JSC::JIT::emit_op_eq_null):
1030         (JSC::JIT::emit_op_neq_null):
1031
1032 2011-04-20  Balazs Kelemen  <kbalazs@webkit.org>
1033
1034         Reviewed by Csaba Osztrogonác.
1035
1036         [Qt] Cleanup includepath adjustment for generated files
1037         https://bugs.webkit.org/show_bug.cgi?id=58869
1038
1039         * JavaScriptCore.pri:  Add the directory of generated files to the include
1040         path with absolute path to make it valid in the final build step.
1041
1042 2011-04-19  Oliver Hunt  <oliver@apple.com>
1043
1044         Reviewed by Gavin Barraclough.
1045
1046         Remove unneeded deprecated methods from MarkStack
1047         https://bugs.webkit.org/show_bug.cgi?id=58853
1048
1049         Remove deprecated methods
1050
1051         * heap/MarkStack.h:
1052
1053 2011-04-19  Mark Rowe  <mrowe@apple.com>
1054
1055         Things work best when the Xcode project refers to the file at a path that exists.
1056
1057         * JavaScriptCore.xcodeproj/project.pbxproj:
1058
1059 2011-04-19  Renata Hodovan  <reni@webkit.org>
1060
1061         Reviewed by Eric Seidel.
1062
1063         Move the alignment related macros in Vector.h to new Alignment.h.
1064         https://bugs.webkit.org/show_bug.cgi?id=56000
1065
1066         * JavaScriptCore.gypi:
1067         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1068         * JavaScriptCore.xcodeproj/project.pbxproj:
1069         * wtf/Alignment.h: Added.
1070         * wtf/CMakeLists.txt:
1071         * wtf/Vector.h:
1072
1073 2011-04-19  Oliver Hunt  <oliver@apple.com>
1074
1075         Reviewed by Gavin Barraclough.
1076
1077         Remove DeprecatedPtr
1078         https://bugs.webkit.org/show_bug.cgi?id=58718
1079
1080         Remove the class an all functions that still exist to support it.
1081
1082         * heap/MarkStack.h:
1083         (JSC::MarkStack::append):
1084         * runtime/JSValue.h:
1085         * runtime/WriteBarrier.h:
1086
1087 2011-04-19  Jungshik Shin  <jshin@chromium.org>
1088
1089         Reviewed by David Levin
1090
1091         Add U+FEFF (Zero width no-break space) to CharacterNames.h.
1092         It's added to the list of characters to treat as zero-width
1093         in WebCore.
1094
1095         https://bugs.webkit.org/show_bug.cgi?id=48860
1096
1097         * wtf/unicode/CharacterNames.h:
1098
1099 2011-04-19  Csaba Osztrogonác  <ossy@webkit.org>
1100
1101         [Qt] REGRESSION(84176): http/tests/xmlhttprequest/event-listener-gc.html fails
1102         https://bugs.webkit.org/show_bug.cgi?id=58871
1103
1104         Unreviewed, rolling out r84176, r84178, r84186, r84212 and r84231.
1105         http://trac.webkit.org/changeset/84176 (original patch)
1106         http://trac.webkit.org/changeset/84178 (original patch - part 2)
1107         http://trac.webkit.org/changeset/84186 (build fix)
1108         http://trac.webkit.org/changeset/84212
1109         http://trac.webkit.org/changeset/84231 (skip failing test)
1110
1111         original bugs:
1112          - https://bugs.webkit.org/show_bug.cgi?id=58718
1113          - https://bugs.webkit.org/show_bug.cgi?id=58853
1114
1115         * heap/MarkStack.h:
1116         (JSC::MarkStack::deprecatedAppendValues):
1117         (JSC::MarkStack::append):
1118         (JSC::MarkStack::deprecatedAppend):
1119         * runtime/JSValue.h:
1120         * runtime/WriteBarrier.h:
1121         (JSC::DeprecatedPtr::DeprecatedPtr):
1122         (JSC::DeprecatedPtr::get):
1123         (JSC::DeprecatedPtr::operator*):
1124         (JSC::DeprecatedPtr::operator->):
1125         (JSC::DeprecatedPtr::slot):
1126         (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
1127         (JSC::DeprecatedPtr::operator!):
1128         (JSC::operator==):
1129
1130 2011-04-18  Oliver Hunt  <oliver@apple.com>
1131
1132         Reviewed by Gavin Barraclough.
1133
1134         Remove unneeded deprecated methods from MarkStack
1135         https://bugs.webkit.org/show_bug.cgi?id=58853
1136
1137         Remove deprecated methods
1138
1139         * heap/MarkStack.h:
1140
1141 2011-04-18  Oliver Hunt  <oliver@apple.com>
1142
1143         Reviewed by Adam Roben.
1144
1145         Off by one initialising repeat callframe
1146         https://bugs.webkit.org/show_bug.cgi?id=58838
1147         <rdar://problem/8756810>
1148
1149         If the end of a callframe made for a repeat call landed on
1150         a page boundary the following page may not have been committed
1151         which means that the off by one could lead to a crash.  However
1152         it could only happen in this case and only on windows which is
1153         why it was so hard to repro.  Alas given the steps needed to
1154         reproduce are such that it's not really possible to make a
1155         testcase.
1156
1157         This fix makes the code a little less squirrely by not trying
1158         to avoid the unnecessary initialisation of |this|.
1159
1160         * interpreter/Interpreter.cpp:
1161         (JSC::Interpreter::prepareForRepeatCall):
1162
1163 2011-04-18  Gavin Barraclough  <barraclough@apple.com>
1164
1165         Reviewed by Geoff Garen.
1166
1167         Bug 58829 - DFG JIT - Optimize add/sub immediate, multiply.
1168
1169         Add code generation for add/subtract instruction with immediate operands
1170         (where a child is a constant), and don't bail to non-speculative if an
1171         integer multiple results in a +0 result (only if it should be generating -0).
1172
1173         * dfg/DFGSpeculativeJIT.cpp:
1174         (JSC::DFG::SpeculativeJIT::compile):
1175         * dfg/DFGSpeculativeJIT.h:
1176         (JSC::DFG::SpeculativeJIT::isDoubleConstantWithInt32Value):
1177
1178 2011-04-18  Gavin Barraclough  <barraclough@apple.com>
1179
1180         Reviewed by Geoff Garen.
1181
1182         Bug 58817 - DFG JIT - if speculative compilation fails, throw away code.
1183
1184         If we detect a logical conflict, throw away generated code,
1185         and only compile through the NonSpeculativeJIT.
1186
1187         * assembler/AbstractMacroAssembler.h:
1188         (JSC::AbstractMacroAssembler::rewindToLabel):
1189         * assembler/AssemblerBuffer.h:
1190         (JSC::AssemblerBuffer::rewindToOffset):
1191         * assembler/MacroAssemblerX86Common.h:
1192         (JSC::MacroAssemblerX86Common::branchAdd32):
1193         (JSC::MacroAssemblerX86Common::branchSub32):
1194         * assembler/X86Assembler.h:
1195         (JSC::X86Assembler::rewindToLabel):
1196         (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
1197         * dfg/DFGJITCompiler.cpp:
1198         (JSC::DFG::JITCompiler::linkSpeculationChecks):
1199         (JSC::DFG::JITCompiler::compileFunction):
1200         * dfg/DFGNode.h:
1201         * dfg/DFGNonSpeculativeJIT.cpp:
1202         (JSC::DFG::NonSpeculativeJIT::compile):
1203         * dfg/DFGSpeculativeJIT.cpp:
1204         (JSC::DFG::SpeculativeJIT::compile):
1205         * dfg/DFGSpeculativeJIT.h:
1206         (JSC::DFG::SpeculationCheckIndexIterator::SpeculationCheckIndexIterator):
1207
1208 2011-04-18  Oliver Hunt  <oliver@apple.com>
1209
1210         Reviewed by Gavin Barraclough.
1211
1212         Remove DeprecatedPtr
1213         https://bugs.webkit.org/show_bug.cgi?id=58718
1214
1215         As simple as it sounds.
1216
1217         * runtime/JSValue.h:
1218         * runtime/WriteBarrier.h:
1219
1220 2011-04-17  Cameron Zwarich  <zwarich@apple.com>
1221
1222         Reviewed by Dan Bernstein.
1223
1224         JSC no longer builds with Clang due to -Woverloaded-virtual warning
1225         https://bugs.webkit.org/show_bug.cgi?id=58760
1226
1227         Rename Structure's specificValue overload of put to putSpecificValue to avoid
1228         Clang's warning for overloading a virtual function.
1229
1230         * runtime/Structure.cpp:
1231         (JSC::Structure::addPropertyTransition):
1232         (JSC::Structure::addPropertyWithoutTransition):
1233         (JSC::Structure::putSpecificValue):
1234         * runtime/Structure.h:
1235
1236 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
1237
1238         Reviewed by Adam Barth.
1239
1240         Remove WTF_PLATFORM_SGL
1241         https://bugs.webkit.org/show_bug.cgi?id=58743
1242
1243         WTF_PLATFORM_SGL and PLATFORM(SGL) are not used in the code anywhere.
1244
1245         * wtf/Platform.h:
1246
1247 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
1248
1249         Reviewed by Adam Barth.
1250
1251         Rename PLATFORM(CA) to USE(CA)
1252         https://bugs.webkit.org/show_bug.cgi?id=58742
1253
1254         * wtf/Platform.h:
1255
1256 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
1257
1258         Reviewed by Adam Barth.
1259
1260         Rename PLATFORM(CG) to USE(CG)
1261         https://bugs.webkit.org/show_bug.cgi?id=58729
1262
1263         * wtf/Platform.h:
1264
1265 2011-04-16  Patrick Gansterer  <paroga@webkit.org>
1266
1267         Reviewed by Eric Seidel.
1268
1269         Rename PLATFORM(CAIRO) to USE(CAIRO)
1270         https://bugs.webkit.org/show_bug.cgi?id=55192
1271
1272         * wtf/Platform.h:
1273         * wtf/gobject/GTypedefs.h:
1274
1275 2011-04-15  Sheriff Bot  <webkit.review.bot@gmail.com>
1276
1277         Unreviewed, rolling out r84067.
1278         http://trac.webkit.org/changeset/84067
1279         https://bugs.webkit.org/show_bug.cgi?id=58724
1280
1281         qt build are failing. (Requested by loislo2 on #webkit).
1282
1283         * heap/MarkStack.h:
1284         (JSC::MarkStack::append):
1285         * runtime/JSValue.h:
1286         * runtime/WriteBarrier.h:
1287         (JSC::DeprecatedPtr::DeprecatedPtr):
1288         (JSC::DeprecatedPtr::get):
1289         (JSC::DeprecatedPtr::operator*):
1290         (JSC::DeprecatedPtr::operator->):
1291         (JSC::DeprecatedPtr::slot):
1292         (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
1293         (JSC::DeprecatedPtr::operator!):
1294         (JSC::operator==):
1295
1296 2011-04-15  Shishir Agrawal  <shishir@chromium.org>
1297
1298         Reviewed by James Robinson.
1299
1300         Add a flag to guard Page Visibility API changes.
1301         https://bugs.webkit.org/show_bug.cgi?id=58464
1302
1303         * Configurations/FeatureDefines.xcconfig:
1304
1305 2011-04-15  Gavin Barraclough  <barraclough@apple.com>
1306
1307         Errrk! - build fix from !x86-64.
1308
1309         * dfg/DFGNode.h:
1310
1311 2011-04-15  David Levin  <levin@chromium.org>
1312
1313         Revert of r83974.
1314
1315         JavaScriptCore shouldn't depend on ../ThirdParty/gtest/xcode/gtest.xcodeproj
1316         https://bugs.webkit.org/show_bug.cgi?id=58716
1317
1318         * JavaScriptCore.xcodeproj/project.pbxproj:
1319         * wtf/tests/RunAllWtfTests.cpp: Removed.
1320         * wtf/tests/StringTests.cpp: Removed.
1321
1322 2011-04-15  Oliver Hunt  <oliver@apple.com>
1323
1324         Reviewed by Gavin Barraclough.
1325
1326         Remove DeprecatedPtr
1327         https://bugs.webkit.org/show_bug.cgi?id=58718
1328
1329         As simple as it sounds.
1330
1331         * heap/MarkStack.h:
1332         (JSC::MarkStack::append):
1333         * runtime/JSValue.h:
1334         * runtime/WriteBarrier.h:
1335
1336 2011-04-15  Gavin Barraclough  <barraclough@apple.com>
1337
1338         Reviewed by Oliver Hunt.
1339
1340         Add a simple tool to gather statistics on whether functions
1341         are completed through the new or old JIT.
1342
1343         * dfg/DFGNode.h:
1344         * dfg/DFGNonSpeculativeJIT.cpp:
1345         (JSC::DFG::NonSpeculativeJIT::compile):
1346         * dfg/DFGSpeculativeJIT.cpp:
1347         (JSC::DFG::SpeculativeJIT::compile):
1348         * jit/JIT.cpp:
1349         (JSC::JIT::privateCompile):
1350
1351 2011-04-15  Oliver Hunt  <oliver@apple.com>
1352
1353         GC allocate Structure
1354         https://bugs.webkit.org/show_bug.cgi?id=58483
1355
1356         Rolling r83894 r83827 r83810 r83809 r83808 back in with
1357         a workaround for the gcc bug seen by the gtk bots
1358
1359         * API/JSCallbackConstructor.cpp:
1360         (JSC::JSCallbackConstructor::JSCallbackConstructor):
1361         * API/JSCallbackConstructor.h:
1362         (JSC::JSCallbackConstructor::createStructure):
1363         * API/JSCallbackFunction.h:
1364         (JSC::JSCallbackFunction::createStructure):
1365         * API/JSCallbackObject.h:
1366         (JSC::JSCallbackObject::createStructure):
1367         * API/JSCallbackObjectFunctions.h:
1368         (JSC::::JSCallbackObject):
1369         * API/JSContextRef.cpp:
1370         * JavaScriptCore.JSVALUE32_64only.exp:
1371         * JavaScriptCore.JSVALUE64only.exp:
1372         * JavaScriptCore.exp:
1373         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1374         * bytecode/CodeBlock.cpp:
1375         (JSC::CodeBlock::~CodeBlock):
1376         (JSC::CodeBlock::markStructures):
1377         (JSC::CodeBlock::markAggregate):
1378         * bytecode/CodeBlock.h:
1379         (JSC::MethodCallLinkInfo::setSeen):
1380         (JSC::GlobalResolveInfo::GlobalResolveInfo):
1381         * bytecode/Instruction.h:
1382         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
1383         (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
1384         (JSC::PolymorphicAccessStructureList::markAggregate):
1385         (JSC::Instruction::Instruction):
1386         * bytecode/StructureStubInfo.cpp:
1387         (JSC::StructureStubInfo::deref):
1388         (JSC::StructureStubInfo::markAggregate):
1389         * bytecode/StructureStubInfo.h:
1390         (JSC::StructureStubInfo::initGetByIdSelf):
1391         (JSC::StructureStubInfo::initGetByIdProto):
1392         (JSC::StructureStubInfo::initGetByIdChain):
1393         (JSC::StructureStubInfo::initPutByIdTransition):
1394         (JSC::StructureStubInfo::initPutByIdReplace):
1395         * debugger/DebuggerActivation.cpp:
1396         (JSC::DebuggerActivation::DebuggerActivation):
1397         * debugger/DebuggerActivation.h:
1398         (JSC::DebuggerActivation::createStructure):
1399         * heap/Handle.h:
1400         * heap/MarkStack.cpp:
1401         (JSC::MarkStack::markChildren):
1402         (JSC::MarkStack::drain):
1403         * heap/MarkedBlock.cpp:
1404         (JSC::MarkedBlock::MarkedBlock):
1405         (JSC::MarkedBlock::sweep):
1406         * heap/Strong.h:
1407         (JSC::Strong::Strong):
1408         (JSC::Strong::set):
1409         * interpreter/Interpreter.cpp:
1410         (JSC::Interpreter::resolveGlobal):
1411         (JSC::Interpreter::resolveGlobalDynamic):
1412         (JSC::Interpreter::tryCachePutByID):
1413         (JSC::Interpreter::uncachePutByID):
1414         (JSC::Interpreter::tryCacheGetByID):
1415         (JSC::Interpreter::uncacheGetByID):
1416         (JSC::Interpreter::privateExecute):
1417         * jit/JIT.h:
1418         * jit/JITPropertyAccess.cpp:
1419         (JSC::JIT::privateCompilePutByIdTransition):
1420         (JSC::JIT::patchMethodCallProto):
1421         (JSC::JIT::privateCompileGetByIdProto):
1422         (JSC::JIT::privateCompileGetByIdSelfList):
1423         (JSC::JIT::privateCompileGetByIdProtoList):
1424         (JSC::JIT::privateCompileGetByIdChainList):
1425         (JSC::JIT::privateCompileGetByIdChain):
1426         * jit/JITPropertyAccess32_64.cpp:
1427         (JSC::JIT::privateCompilePutByIdTransition):
1428         (JSC::JIT::patchMethodCallProto):
1429         (JSC::JIT::privateCompileGetByIdProto):
1430         (JSC::JIT::privateCompileGetByIdSelfList):
1431         (JSC::JIT::privateCompileGetByIdProtoList):
1432         (JSC::JIT::privateCompileGetByIdChainList):
1433         (JSC::JIT::privateCompileGetByIdChain):
1434         * jit/JITStubs.cpp:
1435         (JSC::JITThunks::tryCachePutByID):
1436         (JSC::JITThunks::tryCacheGetByID):
1437         (JSC::DEFINE_STUB_FUNCTION):
1438         (JSC::getPolymorphicAccessStructureListSlot):
1439         * jit/JSInterfaceJIT.h:
1440         (JSC::JSInterfaceJIT::storePtrWithWriteBarrier):
1441         * jsc.cpp:
1442         (cleanupGlobalData):
1443         * runtime/Arguments.h:
1444         (JSC::Arguments::createStructure):
1445         (JSC::Arguments::Arguments):
1446         (JSC::JSActivation::copyRegisters):
1447         * runtime/ArrayConstructor.cpp:
1448         (JSC::ArrayConstructor::ArrayConstructor):
1449         (JSC::constructArrayWithSizeQuirk):
1450         * runtime/ArrayConstructor.h:
1451         * runtime/ArrayPrototype.cpp:
1452         (JSC::ArrayPrototype::ArrayPrototype):
1453         (JSC::arrayProtoFuncSplice):
1454         * runtime/ArrayPrototype.h:
1455         (JSC::ArrayPrototype::createStructure):
1456         * runtime/BatchedTransitionOptimizer.h:
1457         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
1458         * runtime/BooleanConstructor.cpp:
1459         (JSC::BooleanConstructor::BooleanConstructor):
1460         * runtime/BooleanConstructor.h:
1461         * runtime/BooleanObject.cpp:
1462         (JSC::BooleanObject::BooleanObject):
1463         * runtime/BooleanObject.h:
1464         (JSC::BooleanObject::createStructure):
1465         * runtime/BooleanPrototype.cpp:
1466         (JSC::BooleanPrototype::BooleanPrototype):
1467         * runtime/BooleanPrototype.h:
1468         * runtime/DateConstructor.cpp:
1469         (JSC::DateConstructor::DateConstructor):
1470         * runtime/DateConstructor.h:
1471         * runtime/DateInstance.cpp:
1472         (JSC::DateInstance::DateInstance):
1473         * runtime/DateInstance.h:
1474         (JSC::DateInstance::createStructure):
1475         * runtime/DatePrototype.cpp:
1476         (JSC::DatePrototype::DatePrototype):
1477         * runtime/DatePrototype.h:
1478         (JSC::DatePrototype::createStructure):
1479         * runtime/Error.cpp:
1480         (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
1481         * runtime/ErrorConstructor.cpp:
1482         (JSC::ErrorConstructor::ErrorConstructor):
1483         * runtime/ErrorConstructor.h:
1484         * runtime/ErrorInstance.cpp:
1485         (JSC::ErrorInstance::ErrorInstance):
1486         (JSC::ErrorInstance::create):
1487         * runtime/ErrorInstance.h:
1488         (JSC::ErrorInstance::createStructure):
1489         * runtime/ErrorPrototype.cpp:
1490         (JSC::ErrorPrototype::ErrorPrototype):
1491         * runtime/ErrorPrototype.h:
1492         * runtime/ExceptionHelpers.cpp:
1493         (JSC::InterruptedExecutionError::InterruptedExecutionError):
1494         (JSC::TerminatedExecutionError::TerminatedExecutionError):
1495         * runtime/Executable.cpp:
1496         * runtime/Executable.h:
1497         (JSC::ExecutableBase::ExecutableBase):
1498         (JSC::ExecutableBase::createStructure):
1499         (JSC::NativeExecutable::createStructure):
1500         (JSC::NativeExecutable::NativeExecutable):
1501         (JSC::ScriptExecutable::ScriptExecutable):
1502         (JSC::EvalExecutable::createStructure):
1503         (JSC::ProgramExecutable::createStructure):
1504         (JSC::FunctionExecutable::createStructure):
1505         * runtime/FunctionConstructor.cpp:
1506         (JSC::FunctionConstructor::FunctionConstructor):
1507         * runtime/FunctionConstructor.h:
1508         * runtime/FunctionPrototype.cpp:
1509         (JSC::FunctionPrototype::FunctionPrototype):
1510         * runtime/FunctionPrototype.h:
1511         (JSC::FunctionPrototype::createStructure):
1512         * runtime/GetterSetter.h:
1513         (JSC::GetterSetter::GetterSetter):
1514         (JSC::GetterSetter::createStructure):
1515         * runtime/InitializeThreading.cpp:
1516         (JSC::initializeThreadingOnce):
1517         * runtime/InternalFunction.cpp:
1518         (JSC::InternalFunction::InternalFunction):
1519         * runtime/InternalFunction.h:
1520         (JSC::InternalFunction::createStructure):
1521         * runtime/JSAPIValueWrapper.h:
1522         (JSC::JSAPIValueWrapper::createStructure):
1523         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
1524         * runtime/JSActivation.cpp:
1525         (JSC::JSActivation::JSActivation):
1526         * runtime/JSActivation.h:
1527         (JSC::JSActivation::createStructure):
1528         * runtime/JSArray.cpp:
1529         (JSC::JSArray::JSArray):
1530         * runtime/JSArray.h:
1531         (JSC::JSArray::createStructure):
1532         * runtime/JSByteArray.cpp:
1533         (JSC::JSByteArray::JSByteArray):
1534         (JSC::JSByteArray::createStructure):
1535         * runtime/JSByteArray.h:
1536         (JSC::JSByteArray::JSByteArray):
1537         * runtime/JSCell.cpp:
1538         (JSC::isZombie):
1539         * runtime/JSCell.h:
1540         (JSC::JSCell::JSCell::JSCell):
1541         (JSC::JSCell::JSCell::addressOfStructure):
1542         (JSC::JSCell::JSCell::structure):
1543         (JSC::JSCell::JSCell::markChildren):
1544         (JSC::JSCell::JSValue::isZombie):
1545         * runtime/JSFunction.cpp:
1546         (JSC::JSFunction::JSFunction):
1547         * runtime/JSFunction.h:
1548         (JSC::JSFunction::createStructure):
1549         * runtime/JSGlobalData.cpp:
1550         (JSC::JSGlobalData::storeVPtrs):
1551         (JSC::JSGlobalData::JSGlobalData):
1552         (JSC::JSGlobalData::clearBuiltinStructures):
1553         (JSC::JSGlobalData::createLeaked):
1554         * runtime/JSGlobalData.h:
1555         (JSC::allocateGlobalHandle):
1556         * runtime/JSGlobalObject.cpp:
1557         (JSC::JSGlobalObject::reset):
1558         (JSC::JSGlobalObject::markChildren):
1559         (JSC::JSGlobalObject::copyGlobalsFrom):
1560         * runtime/JSGlobalObject.h:
1561         (JSC::JSGlobalObject::JSGlobalObject):
1562         (JSC::JSGlobalObject::createStructure):
1563         (JSC::Structure::prototypeChain):
1564         (JSC::Structure::isValid):
1565         (JSC::constructEmptyArray):
1566         * runtime/JSNotAnObject.h:
1567         (JSC::JSNotAnObject::JSNotAnObject):
1568         (JSC::JSNotAnObject::createStructure):
1569         * runtime/JSONObject.cpp:
1570         (JSC::JSONObject::JSONObject):
1571         * runtime/JSONObject.h:
1572         (JSC::JSONObject::createStructure):
1573         * runtime/JSObject.cpp:
1574         (JSC::JSObject::defineGetter):
1575         (JSC::JSObject::defineSetter):
1576         (JSC::JSObject::seal):
1577         (JSC::JSObject::freeze):
1578         (JSC::JSObject::preventExtensions):
1579         (JSC::JSObject::removeDirect):
1580         (JSC::JSObject::createInheritorID):
1581         * runtime/JSObject.h:
1582         (JSC::JSObject::createStructure):
1583         (JSC::JSObject::JSObject):
1584         (JSC::JSNonFinalObject::createStructure):
1585         (JSC::JSNonFinalObject::JSNonFinalObject):
1586         (JSC::JSFinalObject::create):
1587         (JSC::JSFinalObject::createStructure):
1588         (JSC::JSFinalObject::JSFinalObject):
1589         (JSC::constructEmptyObject):
1590         (JSC::createEmptyObjectStructure):
1591         (JSC::JSObject::~JSObject):
1592         (JSC::JSObject::setPrototype):
1593         (JSC::JSObject::setStructure):
1594         (JSC::JSObject::inheritorID):
1595         (JSC::JSObject::putDirectInternal):
1596         (JSC::JSObject::transitionTo):
1597         (JSC::JSObject::markChildrenDirect):
1598         * runtime/JSObjectWithGlobalObject.cpp:
1599         (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
1600         * runtime/JSObjectWithGlobalObject.h:
1601         (JSC::JSObjectWithGlobalObject::createStructure):
1602         (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
1603         * runtime/JSPropertyNameIterator.cpp:
1604         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
1605         (JSC::JSPropertyNameIterator::create):
1606         (JSC::JSPropertyNameIterator::get):
1607         * runtime/JSPropertyNameIterator.h:
1608         (JSC::JSPropertyNameIterator::createStructure):
1609         (JSC::JSPropertyNameIterator::setCachedStructure):
1610         (JSC::Structure::setEnumerationCache):
1611         * runtime/JSStaticScopeObject.h:
1612         (JSC::JSStaticScopeObject::JSStaticScopeObject):
1613         (JSC::JSStaticScopeObject::createStructure):
1614         * runtime/JSString.h:
1615         (JSC::RopeBuilder::JSString):
1616         (JSC::RopeBuilder::createStructure):
1617         * runtime/JSType.h:
1618         * runtime/JSTypeInfo.h:
1619         (JSC::TypeInfo::TypeInfo):
1620         * runtime/JSValue.h:
1621         * runtime/JSVariableObject.h:
1622         (JSC::JSVariableObject::createStructure):
1623         (JSC::JSVariableObject::JSVariableObject):
1624         (JSC::JSVariableObject::copyRegisterArray):
1625         * runtime/JSWrapperObject.h:
1626         (JSC::JSWrapperObject::createStructure):
1627         (JSC::JSWrapperObject::JSWrapperObject):
1628         * runtime/JSZombie.cpp:
1629         * runtime/JSZombie.h:
1630         (JSC::JSZombie::JSZombie):
1631         (JSC::JSZombie::createStructure):
1632         * runtime/MathObject.cpp:
1633         (JSC::MathObject::MathObject):
1634         * runtime/MathObject.h:
1635         (JSC::MathObject::createStructure):
1636         * runtime/NativeErrorConstructor.cpp:
1637         (JSC::NativeErrorConstructor::NativeErrorConstructor):
1638         (JSC::NativeErrorConstructor::markChildren):
1639         (JSC::constructWithNativeErrorConstructor):
1640         * runtime/NativeErrorConstructor.h:
1641         (JSC::NativeErrorConstructor::createStructure):
1642         * runtime/NativeErrorPrototype.cpp:
1643         (JSC::NativeErrorPrototype::NativeErrorPrototype):
1644         * runtime/NativeErrorPrototype.h:
1645         * runtime/NumberConstructor.cpp:
1646         (JSC::NumberConstructor::NumberConstructor):
1647         * runtime/NumberConstructor.h:
1648         (JSC::NumberConstructor::createStructure):
1649         * runtime/NumberObject.cpp:
1650         (JSC::NumberObject::NumberObject):
1651         * runtime/NumberObject.h:
1652         (JSC::NumberObject::createStructure):
1653         * runtime/NumberPrototype.cpp:
1654         (JSC::NumberPrototype::NumberPrototype):
1655         * runtime/NumberPrototype.h:
1656         * runtime/ObjectConstructor.cpp:
1657         (JSC::ObjectConstructor::ObjectConstructor):
1658         * runtime/ObjectConstructor.h:
1659         (JSC::ObjectConstructor::createStructure):
1660         * runtime/ObjectPrototype.cpp:
1661         (JSC::ObjectPrototype::ObjectPrototype):
1662         * runtime/ObjectPrototype.h:
1663         * runtime/PropertyMapHashTable.h:
1664         (JSC::PropertyTable::PropertyTable):
1665         * runtime/RegExpConstructor.cpp:
1666         (JSC::RegExpConstructor::RegExpConstructor):
1667         (JSC::RegExpMatchesArray::RegExpMatchesArray):
1668         * runtime/RegExpConstructor.h:
1669         (JSC::RegExpConstructor::createStructure):
1670         * runtime/RegExpObject.cpp:
1671         (JSC::RegExpObject::RegExpObject):
1672         * runtime/RegExpObject.h:
1673         (JSC::RegExpObject::createStructure):
1674         * runtime/RegExpPrototype.cpp:
1675         (JSC::RegExpPrototype::RegExpPrototype):
1676         * runtime/RegExpPrototype.h:
1677         * runtime/ScopeChain.h:
1678         (JSC::ScopeChainNode::ScopeChainNode):
1679         (JSC::ScopeChainNode::createStructure):
1680         * runtime/StrictEvalActivation.cpp:
1681         (JSC::StrictEvalActivation::StrictEvalActivation):
1682         * runtime/StringConstructor.cpp:
1683         (JSC::StringConstructor::StringConstructor):
1684         * runtime/StringConstructor.h:
1685         * runtime/StringObject.cpp:
1686         (JSC::StringObject::StringObject):
1687         * runtime/StringObject.h:
1688         (JSC::StringObject::createStructure):
1689         * runtime/StringObjectThatMasqueradesAsUndefined.h:
1690         (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
1691         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1692         * runtime/StringPrototype.cpp:
1693         (JSC::StringPrototype::StringPrototype):
1694         * runtime/StringPrototype.h:
1695         (JSC::StringPrototype::createStructure):
1696         * runtime/Structure.cpp:
1697         (JSC::StructureTransitionTable::remove):
1698         (JSC::StructureTransitionTable::add):
1699         (JSC::Structure::Structure):
1700         (JSC::Structure::~Structure):
1701         (JSC::Structure::materializePropertyMap):
1702         (JSC::Structure::addPropertyTransitionToExistingStructure):
1703         (JSC::Structure::addPropertyTransition):
1704         (JSC::Structure::removePropertyTransition):
1705         (JSC::Structure::changePrototypeTransition):
1706         (JSC::Structure::despecifyFunctionTransition):
1707         (JSC::Structure::getterSetterTransition):
1708         (JSC::Structure::toDictionaryTransition):
1709         (JSC::Structure::toCacheableDictionaryTransition):
1710         (JSC::Structure::toUncacheableDictionaryTransition):
1711         (JSC::Structure::sealTransition):
1712         (JSC::Structure::freezeTransition):
1713         (JSC::Structure::preventExtensionsTransition):
1714         (JSC::Structure::flattenDictionaryStructure):
1715         (JSC::Structure::copyPropertyTable):
1716         (JSC::Structure::put):
1717         (JSC::Structure::markChildren):
1718         * runtime/Structure.h:
1719         (JSC::Structure::create):
1720         (JSC::Structure::setPrototypeWithoutTransition):
1721         (JSC::Structure::createStructure):
1722         (JSC::JSCell::createDummyStructure):
1723         (JSC::StructureTransitionTable::keyForWeakGCMapFinalizer):
1724         * runtime/StructureChain.cpp:
1725         (JSC::StructureChain::StructureChain):
1726         (JSC::StructureChain::markChildren):
1727         * runtime/StructureChain.h:
1728         (JSC::StructureChain::create):
1729         (JSC::StructureChain::head):
1730         (JSC::StructureChain::createStructure):
1731         * runtime/StructureTransitionTable.h:
1732         (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::finalizerContextFor):
1733         (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::keyForFinalizer):
1734         (JSC::StructureTransitionTable::~StructureTransitionTable):
1735         (JSC::StructureTransitionTable::slot):
1736         (JSC::StructureTransitionTable::setMap):
1737         (JSC::StructureTransitionTable::singleTransition):
1738         (JSC::StructureTransitionTable::clearSingleTransition):
1739         (JSC::StructureTransitionTable::setSingleTransition):
1740         * runtime/WeakGCMap.h:
1741         (JSC::DefaultWeakGCMapFinalizerCallback::finalizerContextFor):
1742         (JSC::DefaultWeakGCMapFinalizerCallback::keyForFinalizer):
1743         (JSC::WeakGCMap::contains):
1744         (JSC::WeakGCMap::find):
1745         (JSC::WeakGCMap::remove):
1746         (JSC::WeakGCMap::add):
1747         (JSC::WeakGCMap::set):
1748         (JSC::WeakGCMap::finalize):
1749         * runtime/WriteBarrier.h:
1750         (JSC::writeBarrier):
1751         (JSC::WriteBarrierBase::set):
1752         (JSC::WriteBarrierBase::operator*):
1753         (JSC::WriteBarrierBase::operator->):
1754         (JSC::WriteBarrierBase::setWithoutWriteBarrier):
1755
1756 2011-04-15  Fridrich Strba  <fridrich.strba@bluewin.ch>
1757
1758         Reviewed by Gavin Barraclough.
1759
1760         Correctly prefix symbols. Since gcc 4.5.0, Windows x64 symbols
1761         are not prefixed by underscore anymore. This is consistent with
1762         what MSVC does.
1763         https://bugs.webkit.org/show_bug.cgi?id=58573
1764
1765         * jit/JITStubs.cpp:
1766
1767 2011-04-15  Gavin Barraclough  <barraclough@apple.com>
1768
1769         Reviewed by Geoff Garen.
1770
1771         Bug 58705 - DFG JIT Add support for flow control (branch, jump).
1772
1773         Add support for control flow by breaking the CodeBlock up into multiple
1774         basic blocks, generating code for each basic block in turn through the
1775         speculative JIT & then the non-speculative JIT.
1776
1777         * dfg/DFGByteCodeParser.cpp:
1778         (JSC::DFG::ByteCodeParser::setTemporary):
1779         (JSC::DFG::ByteCodeParser::addToGraph):
1780         (JSC::DFG::ByteCodeParser::parseBlock):
1781         (JSC::DFG::ByteCodeParser::parse):
1782         * dfg/DFGGraph.cpp:
1783         (JSC::DFG::Graph::dump):
1784         * dfg/DFGGraph.h:
1785         (JSC::DFG::BasicBlock::BasicBlock):
1786         (JSC::DFG::BasicBlock::getBytecodeOffset):
1787         (JSC::DFG::Graph::blockIndexForBytecodeOffset):
1788         * dfg/DFGJITCodeGenerator.h:
1789         (JSC::DFG::JITCodeGenerator::JITCodeGenerator):
1790         (JSC::DFG::JITCodeGenerator::addBranch):
1791         (JSC::DFG::JITCodeGenerator::linkBranches):
1792         (JSC::DFG::JITCodeGenerator::BranchRecord::BranchRecord):
1793         * dfg/DFGNode.h:
1794         (JSC::DFG::Node::Node):
1795         (JSC::DFG::Node::isJump):
1796         (JSC::DFG::Node::isBranch):
1797         (JSC::DFG::Node::takenBytecodeOffset):
1798         (JSC::DFG::Node::notTakenBytecodeOffset):
1799         * dfg/DFGNonSpeculativeJIT.cpp:
1800         (JSC::DFG::NonSpeculativeJIT::compile):
1801         * dfg/DFGNonSpeculativeJIT.h:
1802         * dfg/DFGSpeculativeJIT.cpp:
1803         (JSC::DFG::SpeculativeJIT::compile):
1804         * dfg/DFGSpeculativeJIT.h:
1805
1806 2011-04-15  Gavin Barraclough  <barraclough@apple.com>
1807
1808         Reviewed by Geoff Garen.
1809
1810         Bug 58701 - DFG JIT - add GetLocal/SetLocal nodes
1811
1812         Use these for both access to arguments & local variables, adds ability
1813         to set locals, such that values will persist between basic blocks.
1814
1815         * dfg/DFGByteCodeParser.cpp:
1816         (JSC::DFG::ByteCodeParser::ByteCodeParser):
1817         (JSC::DFG::ByteCodeParser::get):
1818         (JSC::DFG::ByteCodeParser::set):
1819         (JSC::DFG::ByteCodeParser::getVariable):
1820         (JSC::DFG::ByteCodeParser::setVariable):
1821         (JSC::DFG::ByteCodeParser::getArgument):
1822         (JSC::DFG::ByteCodeParser::setArgument):
1823         (JSC::DFG::ByteCodeParser::getThis):
1824         (JSC::DFG::ByteCodeParser::setThis):
1825         (JSC::DFG::ByteCodeParser::VariableRecord::VariableRecord):
1826         (JSC::DFG::ByteCodeParser::parseBlock):
1827         * dfg/DFGGraph.cpp:
1828         (JSC::DFG::Graph::dump):
1829         (JSC::DFG::Graph::derefChildren):
1830         * dfg/DFGGraph.h:
1831         (JSC::DFG::Graph::ref):
1832         (JSC::DFG::Graph::deref):
1833         * dfg/DFGNode.h:
1834         (JSC::DFG::Node::hasLocal):
1835         (JSC::DFG::Node::local):
1836         * dfg/DFGNonSpeculativeJIT.cpp:
1837         (JSC::DFG::NonSpeculativeJIT::compile):
1838         * dfg/DFGSpeculativeJIT.cpp:
1839         (JSC::DFG::SpeculativeJIT::compile):
1840
1841 2011-04-15  Gavin Barraclough  <barraclough@apple.com>
1842
1843         Reviewed by Sam Weinig.
1844
1845         Bug 58696 - DFG JIT split handling of vars/temporaries
1846
1847         Presently all callee registers are treated as having single block scope,
1848         since the DFG JIT can only compile single block functions. In order to
1849         expand the JIT to support control flow we will need to change to retaining
1850         locals (but not temporaries) across basic block boundaries.
1851
1852         * dfg/DFGByteCodeParser.cpp:
1853         (JSC::DFG::ByteCodeParser::ByteCodeParser):
1854         (JSC::DFG::ByteCodeParser::get):
1855         (JSC::DFG::ByteCodeParser::set):
1856         (JSC::DFG::ByteCodeParser::getVariable):
1857         (JSC::DFG::ByteCodeParser::setVariable):
1858         (JSC::DFG::ByteCodeParser::getTemporary):
1859         (JSC::DFG::ByteCodeParser::setTemporary):
1860         (JSC::DFG::ByteCodeParser::getArgument):
1861         (JSC::DFG::ByteCodeParser::getInt32Constant):
1862         (JSC::DFG::ByteCodeParser::getDoubleConstant):
1863         (JSC::DFG::ByteCodeParser::getJSConstant):
1864         (JSC::DFG::ByteCodeParser::constantUndefined):
1865         (JSC::DFG::ByteCodeParser::constantNull):
1866         (JSC::DFG::ByteCodeParser::one):
1867         (JSC::DFG::ByteCodeParser::parseBlock):
1868         (JSC::DFG::ByteCodeParser::parse):
1869         (JSC::DFG::parse):
1870         * dfg/DFGNode.h:
1871         * dfg/DFGScoreBoard.h:
1872         (JSC::DFG::ScoreBoard::ScoreBoard):
1873         (JSC::DFG::ScoreBoard::~ScoreBoard):
1874         (JSC::DFG::ScoreBoard::allocate):
1875         (JSC::DFG::ScoreBoard::use):
1876
1877 2011-04-15  Michael Saboff  <msaboff@apple.com>
1878
1879         Reviewed by Oliver Hunt.
1880
1881         globalObject moved to JSObjectWithGlobalObject.cpp inhibits inlining
1882         https://bugs.webkit.org/show_bug.cgi?id=58677
1883
1884         Moved JSObjectWithGlobalObject::globalObject() to 
1885         runtime/JSObjectWithGlobalObject.h to allow the compiler to inline
1886         it for a performance benefit.  An equivalent instance had been in
1887         a header file before r60057.
1888
1889         * JavaScriptCore.exp:
1890         * runtime/JSObjectWithGlobalObject.cpp:
1891         * runtime/JSObjectWithGlobalObject.h:
1892         (JSC::JSObjectWithGlobalObject::globalObject):
1893
1894 2011-04-14  Oliver Hunt  <oliver@apple.com>
1895
1896         Reviewed by Geoffrey Garen.
1897
1898         Make JSNodeFilterCondition handle its lifetime correctly
1899         https://bugs.webkit.org/show_bug.cgi?id=58622
1900
1901         Add export
1902
1903         * JavaScriptCore.exp:
1904
1905 2011-04-14  Alexey Proskuryakov  <ap@apple.com>
1906
1907         Reviewed by Dan Bernstein.
1908
1909         WebKit2: Password field input does not switch to ASCII-compatible source
1910         https://bugs.webkit.org/show_bug.cgi?id=58583
1911         <rdar://problem/9059651>
1912
1913         * wtf/Platform.h: Removed WTF_USE_CARBON_SECURE_INPUT_MODE. It's now only used by Chromium,
1914         and shouldn't be enabled on any other platforms, so there is no reason to make it
1915         configurable via Platform.h.
1916
1917 2011-04-15  Dmitry Lomov  <dslomov@google.com>
1918
1919         Reviewed by David Levin.
1920
1921         Add a sample test case for GTest framework
1922         https://bugs.webkit.org/show_bug.cgi?id=58509
1923
1924         Add an example of GTest testcase, complete with a runner, to JavaScriptCore.
1925
1926         * JavaScriptCore.xcodeproj/project.pbxproj:
1927         * wtf/tests/RunAllWtfTests.cpp: Added.
1928         (main):
1929         * wtf/tests/StringTests.cpp: Added.
1930
1931 2011-04-15  Anna Cavender  <annacc@chromium.org>
1932
1933         Reviewed by Eric Carlson.
1934
1935         Renaming TRACK feature define to VIDEO_TRACK
1936         https://bugs.webkit.org/show_bug.cgi?id=53556
1937
1938         * Configurations/FeatureDefines.xcconfig:
1939
1940 2011-04-14  Gavin Barraclough  <barraclough@apple.com>
1941
1942         Rubber stamped by Geoffrey Garen.
1943
1944         Hide DFG_JIT_RESTRICTIONS behind ARITHMETIC_OP() macro, and rename
1945         m_regressionGuard to m_parseFailed, such that it can be reused for
1946         other failure cases.
1947
1948         * dfg/DFGByteCodeParser.cpp:
1949         (JSC::DFG::ByteCodeParser::ByteCodeParser):
1950         (JSC::DFG::ByteCodeParser::parse):
1951
1952 2011-04-14  Gavin Barraclough  <barraclough@apple.com>
1953
1954         Reviewed by Geoffrey Garen.
1955
1956         Bug 58620 - DFG JIT - loading of arguments should not be lazy
1957
1958         This optimization is overly simplistic. It only works because we never
1959         write out definitions to arguments (since we currently only compile
1960         single block functions). Revert this for now, we may want to reintroduce
1961         something like this again in the future, but it will need to be aware
1962         how to schedule definitions to arguments versus lazy loads that have not
1963         yet been performed.
1964
1965         * dfg/DFGGenerationInfo.h:
1966         (JSC::DFG::GenerationInfo::needsSpill):
1967         * dfg/DFGGraph.cpp:
1968         (JSC::DFG::Graph::dump):
1969         * dfg/DFGGraph.h:
1970         * dfg/DFGJITCodeGenerator.cpp:
1971         (JSC::DFG::JITCodeGenerator::fillInteger):
1972         (JSC::DFG::JITCodeGenerator::fillDouble):
1973         (JSC::DFG::JITCodeGenerator::fillJSValue):
1974         * dfg/DFGJITCodeGenerator.h:
1975         (JSC::DFG::JITCodeGenerator::initConstantInfo):
1976         * dfg/DFGJITCompiler.cpp:
1977         (JSC::DFG::JITCompiler::fillNumericToDouble):
1978         (JSC::DFG::JITCompiler::fillInt32ToInteger):
1979         (JSC::DFG::JITCompiler::fillToJS):
1980         * dfg/DFGNonSpeculativeJIT.cpp:
1981         (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
1982         (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
1983         (JSC::DFG::NonSpeculativeJIT::compile):
1984         * dfg/DFGSpeculativeJIT.cpp:
1985         (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
1986         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
1987         (JSC::DFG::SpeculativeJIT::compile):
1988
1989 2011-04-14  Gavin Barraclough  <barraclough@apple.com>
1990
1991         Reviewed by Geoffrey Garen.
1992
1993         Bug 58600 - DFG JIT bugs in ValueToInt, PutByVal
1994
1995         The bug in PutByVal is that an operand is in JSValueOperand - when this
1996         locks an integer into a register it will always retag the value without
1997         checking if the register is already locked. This is a problem where the
1998         value being stored by a PutByVal is the same as the subscript.
1999         The subscript is locked into a register first, as a strict integer.
2000         Locking the value results in the subscript being modified.
2001
2002         The bug in ValueToInt related to the function of sillentFillAllRegisters.
2003         The problem is that this method will restore all register values from
2004         prior to the call, overwriting the result of the call out. Allow a
2005         register to be passed to specifically be excluded from being preserved.
2006
2007         * assembler/ARMAssembler.h:
2008         (JSC::ARMAssembler::debugOffset):
2009         * assembler/ARMv7Assembler.h:
2010         (JSC::ARMv7Assembler::ARMInstructionFormatter::debugOffset):
2011         * assembler/AbstractMacroAssembler.h:
2012         (JSC::AbstractMacroAssembler::debugOffset):
2013         * assembler/AssemblerBuffer.h:
2014         (JSC::AssemblerBuffer::debugOffset):
2015         * assembler/LinkBuffer.h:
2016         (JSC::LinkBuffer::debugAddress):
2017         * assembler/MIPSAssembler.h:
2018         (JSC::MIPSAssembler::debugOffset):
2019         * assembler/MacroAssemblerX86_64.h:
2020         (JSC::MacroAssemblerX86_64::orPtr):
2021         * assembler/X86Assembler.h:
2022         (JSC::X86Assembler::debugOffset):
2023         (JSC::X86Assembler::X86InstructionFormatter::debugOffset):
2024         * dfg/DFGByteCodeParser.cpp:
2025         (JSC::DFG::ByteCodeParser::parse):
2026         * dfg/DFGGenerationInfo.h:
2027         * dfg/DFGJITCodeGenerator.cpp:
2028         (JSC::DFG::JITCodeGenerator::fillJSValue):
2029         * dfg/DFGJITCodeGenerator.h:
2030         (JSC::DFG::JITCodeGenerator::isConstant):
2031         * dfg/DFGJITCompiler.cpp:
2032         (JSC::DFG::JITCompiler::compileFunction):
2033         * dfg/DFGJITCompiler.h:
2034         (JSC::DFG::JITCompiler::isConstant):
2035         * dfg/DFGNonSpeculativeJIT.cpp:
2036         (JSC::DFG::NonSpeculativeJIT::valueToNumber):
2037         (JSC::DFG::NonSpeculativeJIT::valueToInt32):
2038         (JSC::DFG::NonSpeculativeJIT::numberToInt32):
2039         (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
2040         (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
2041         (JSC::DFG::NonSpeculativeJIT::compile):
2042         * dfg/DFGNonSpeculativeJIT.h:
2043         (JSC::DFG::NonSpeculativeJIT::silentSpillGPR):
2044         (JSC::DFG::NonSpeculativeJIT::silentSpillFPR):
2045         (JSC::DFG::NonSpeculativeJIT::silentFillGPR):
2046         (JSC::DFG::NonSpeculativeJIT::silentFillFPR):
2047         (JSC::DFG::NonSpeculativeJIT::silentSpillAllRegisters):
2048         (JSC::DFG::NonSpeculativeJIT::silentFillAllRegisters):
2049         * dfg/DFGSpeculativeJIT.cpp:
2050         (JSC::DFG::SpeculativeJIT::compile):
2051
2052 2011-04-14  Geoffrey Garen  <ggaren@apple.com>
2053
2054         Reviewed by Oliver Hunt.
2055
2056         Drain the mark stack while marking weak handles, not after.
2057         https://bugs.webkit.org/show_bug.cgi?id=58574
2058
2059         Otherwise, items that would have caused more weak handle marking are
2060         processed after all weak handle marking has finished, and referenced
2061         weak handles get recycled.
2062
2063         * heap/HandleHeap.cpp:
2064         (JSC::HandleHeap::markWeakHandles): Removed looping from here, since we
2065         want Heap::markRoots to be responsible for draining the mark stack.
2066
2067         * heap/Heap.cpp:
2068         (JSC::Heap::markRoots): Moved looping to here, as explained above.
2069         
2070         For efficiency's sake, drain the mark stack before starting to mark weak
2071         handles. Otherwise, items drained while marking weak handles may force
2072         an extra trip through the weak handle list.
2073
2074         For correctness's sake, drain the mark stack each time through the weak
2075         handle list. Otherwise, opaque roots that would make weak handles reachable
2076         are not discovered until after weak handle marking is over.
2077
2078 2011-04-14  Oliver Hunt  <oliver@apple.com>
2079
2080         Reviewed by Geoffrey Garen.
2081
2082         Make protected object list in caches window reflect reality
2083         https://bugs.webkit.org/show_bug.cgi?id=58565
2084
2085         Make sure the heap includes objects protected by Strong handles
2086         in its list of protected objects.
2087
2088         * heap/HandleHeap.h:
2089         * heap/Heap.cpp:
2090         (JSC::HandleHeap::protectedObjectTypeCounts):
2091
2092 2011-04-14  Satish Sampath  <satish@chromium.org>
2093
2094         Reviewed by Anders Carlsson.
2095
2096         Don't emit RegExp tables for chromium where they are not used
2097         https://bugs.webkit.org/show_bug.cgi?id=58544
2098
2099         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2100         * create_regex_tables: Added the "--notables" command line argument.
2101
2102 2011-04-13  Geoffrey Garen  <ggaren@apple.com>
2103
2104         Try to fix ASSERTs seen on Windows bots.
2105
2106         * wtf/HashTable.h:
2107         (WTF::hashTableSwap): Force MSVC to use the right version of swap.
2108
2109 2011-04-13  Ryuan Choi  <ryuan.choi@samsung.com>
2110
2111         Reviewed by Kenneth Rohde Christiansen.
2112
2113         [CMAKE] Separate DerivedSources.
2114         https://bugs.webkit.org/show_bug.cgi?id=58427
2115
2116         * CMakeLists.txt: Change DERIVED_SOURCES_DIR to DERIVED_SOURCES_JAVASCRIPTCORE_DIR.
2117
2118 2011-04-13  Geoffrey Garen  <ggaren@apple.com>
2119
2120         Reviewed by Oliver Hunt.
2121
2122         Switched DOM wrappers to use HashMap of Weak<T> instead of WeakGCMap<T>
2123         https://bugs.webkit.org/show_bug.cgi?id=58482
2124         
2125         This will allow wrappers to make individual decisions about their lifetimes.
2126
2127         * heap/HandleHeap.h:
2128         (JSC::HandleHeap::copyWeak): New function for copying a weak handle.
2129         It's wasn't previously possible to perform this operation using HandleHeap
2130         API because the HandleHeap doesn't expose its underlying Node structure.
2131
2132         * heap/Local.h:
2133         (JSC::::set):
2134         * heap/Strong.h:
2135         (JSC::Strong::set): Added ASSERTs to verify that dead objects are not
2136         resurrected by placement into handles.
2137
2138         (JSC::swap): Added a swap helper, so use of Strong<T> inside a hash table
2139         is efficient.
2140
2141         * heap/Weak.h:
2142         (JSC::Weak::Weak): Fixed a bug where copying a weak pointer would not
2143         copy its weak callback and context.
2144
2145         (JSC::Weak::operator=): Added an assignment operator, since the default
2146         C++ assignment operator did the wrong thing.
2147
2148         (JSC::Weak::set): Added ASSERTs to verify that dead objects are not
2149         resurrected by placement into handles.
2150
2151         (JSC::swap): Added a swap helper, so use of Strong<T> inside a hash table
2152         is efficient, and can be done without copying, which is illegal during
2153         the handle finalization phase.
2154
2155 2011-04-13  Oliver Hunt  <oliver@apple.com>
2156
2157         Reviewed by Gavin Barraclough.
2158
2159         Make PropertyMapEntry use a WriteBarrier for specificValue
2160         https://bugs.webkit.org/show_bug.cgi?id=58407
2161
2162         Make PropertyMapEntry use a WriteBarrier for specificValue, and then
2163         propagate the required JSGlobalData through all the methods it ends
2164         up being needed.
2165
2166         * API/JSClassRef.cpp:
2167         (OpaqueJSClass::prototype):
2168         * API/JSContextRef.cpp:
2169         * API/JSObjectRef.cpp:
2170         (JSObjectMake):
2171         (JSObjectSetPrototype):
2172         * JavaScriptCore.exp:
2173         * bytecompiler/BytecodeGenerator.cpp:
2174         (JSC::BytecodeGenerator::BytecodeGenerator):
2175         * interpreter/Interpreter.cpp:
2176         (JSC::appendSourceToError):
2177         (JSC::Interpreter::tryCacheGetByID):
2178         (JSC::Interpreter::privateExecute):
2179         * jit/JITStubs.cpp:
2180         (JSC::JITThunks::tryCacheGetByID):
2181         (JSC::DEFINE_STUB_FUNCTION):
2182         * runtime/BatchedTransitionOptimizer.h:
2183         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
2184         * runtime/InternalFunction.cpp:
2185         (JSC::InternalFunction::name):
2186         (JSC::InternalFunction::displayName):
2187         * runtime/JSActivation.cpp:
2188         (JSC::JSActivation::getOwnPropertySlot):
2189         * runtime/JSFunction.cpp:
2190         (JSC::JSFunction::name):
2191         (JSC::JSFunction::displayName):
2192         (JSC::JSFunction::getOwnPropertySlot):
2193         * runtime/JSGlobalObject.cpp:
2194         (JSC::JSGlobalObject::putWithAttributes):
2195         (JSC::JSGlobalObject::reset):
2196         (JSC::JSGlobalObject::resetPrototype):
2197         * runtime/JSGlobalObject.h:
2198         * runtime/JSObject.cpp:
2199         (JSC::JSObject::put):
2200         (JSC::JSObject::deleteProperty):
2201         (JSC::JSObject::defineGetter):
2202         (JSC::JSObject::defineSetter):
2203         (JSC::JSObject::lookupGetter):
2204         (JSC::JSObject::lookupSetter):
2205         (JSC::JSObject::getPropertySpecificValue):
2206         (JSC::JSObject::getOwnPropertyNames):
2207         (JSC::JSObject::seal):
2208         (JSC::JSObject::freeze):
2209         (JSC::JSObject::preventExtensions):
2210         (JSC::JSObject::removeDirect):
2211         (JSC::JSObject::getOwnPropertyDescriptor):
2212         (JSC::JSObject::defineOwnProperty):
2213         * runtime/JSObject.h:
2214         (JSC::JSObject::getDirect):
2215         (JSC::JSObject::getDirectLocation):
2216         (JSC::JSObject::isSealed):
2217         (JSC::JSObject::isFrozen):
2218         (JSC::JSObject::setPrototypeWithCycleCheck):
2219         (JSC::JSObject::setPrototype):
2220         (JSC::JSObject::inlineGetOwnPropertySlot):
2221         (JSC::JSObject::putDirectInternal):
2222         (JSC::JSObject::putDirectWithoutTransition):
2223         (JSC::JSObject::putDirectFunctionWithoutTransition):
2224         * runtime/Lookup.cpp:
2225         (JSC::setUpStaticFunctionSlot):
2226         * runtime/ObjectConstructor.cpp:
2227         (JSC::objectConstructorCreate):
2228         (JSC::objectConstructorSeal):
2229         (JSC::objectConstructorFreeze):
2230         (JSC::objectConstructorPreventExtensions):
2231         (JSC::objectConstructorIsSealed):
2232         (JSC::objectConstructorIsFrozen):
2233         * runtime/Operations.h:
2234         (JSC::normalizePrototypeChain):
2235         * runtime/PropertyMapHashTable.h:
2236         (JSC::PropertyMapEntry::PropertyMapEntry):
2237         (JSC::PropertyTable::PropertyTable):
2238         (JSC::PropertyTable::copy):
2239         * runtime/Structure.cpp:
2240         (JSC::Structure::materializePropertyMap):
2241         (JSC::Structure::despecifyDictionaryFunction):
2242         (JSC::Structure::addPropertyTransition):
2243         (JSC::Structure::removePropertyTransition):
2244         (JSC::Structure::changePrototypeTransition):
2245         (JSC::Structure::despecifyFunctionTransition):
2246         (JSC::Structure::getterSetterTransition):
2247         (JSC::Structure::toDictionaryTransition):
2248         (JSC::Structure::toCacheableDictionaryTransition):
2249         (JSC::Structure::toUncacheableDictionaryTransition):
2250         (JSC::Structure::sealTransition):
2251         (JSC::Structure::freezeTransition):
2252         (JSC::Structure::preventExtensionsTransition):
2253         (JSC::Structure::isSealed):
2254         (JSC::Structure::isFrozen):
2255         (JSC::Structure::addPropertyWithoutTransition):
2256         (JSC::Structure::removePropertyWithoutTransition):
2257         (JSC::Structure::copyPropertyTable):
2258         (JSC::Structure::get):
2259         (JSC::Structure::despecifyFunction):
2260         (JSC::Structure::despecifyAllFunctions):
2261         (JSC::Structure::put):
2262         (JSC::Structure::getPropertyNames):
2263         * runtime/Structure.h:
2264         (JSC::Structure::get):
2265         (JSC::Structure::materializePropertyMapIfNecessary):
2266
2267 2011-04-13  Paul Knight  <pknight@apple.com>
2268
2269         Reviewed by Gavin Barraclough.
2270
2271         BACKTRACE() macro should check for Debug configuration in macro, not WTFReportBacktrace definition
2272         https://bugs.webkit.org/show_bug.cgi?id=58405
2273
2274         The BACKTRACE() macro requires JavaScriptCore be built with a Debug
2275         configuration in order for it to be enabled. Move the NDEBUG check to
2276         the header so it will be enabled when the calling framework or
2277         application is built with a Debug configuration, similar to how
2278         ASSERT() and friends work.
2279
2280         * wtf/Assertions.cpp:
2281         * wtf/Assertions.h:
2282
2283 2011-04-12  Ben Taylor  <bentaylor.solx86@gmail.com>
2284
2285         Reviewed by Alexey Proskuryakov.
2286
2287         https://bugs.webkit.org/show_bug.cgi?id=58131
2288
2289         Provide a workaround for an obscure Studio 12 compiler bug, which
2290         couldn't call src->~T() on a const T *src.
2291
2292         * wtf/Vector.h:
2293
2294 2011-04-12  Gavin Barraclough  <barraclough@apple.com>
2295
2296         Reviewed by Oliver Hunt.
2297
2298         https://bugs.webkit.org/show_bug.cgi?id=58395
2299         Exceptions thrown from property getters called from Array prototype functions can be missed
2300
2301         This is caught by an ASSERT in the top of Interpreter::executeCall.
2302         Check for exceptions after accessing properties that could be getters.
2303
2304         * runtime/ArrayPrototype.cpp:
2305         (JSC::arrayProtoFuncSort):
2306         (JSC::arrayProtoFuncFilter):
2307         (JSC::arrayProtoFuncMap):
2308         (JSC::arrayProtoFuncEvery):
2309         (JSC::arrayProtoFuncForEach):
2310         (JSC::arrayProtoFuncSome):
2311         (JSC::arrayProtoFuncReduce):
2312         (JSC::arrayProtoFuncReduceRight):
2313             - Add exception checks.
2314
2315 2011-04-12  Oliver Hunt  <oliver@apple.com>
2316
2317         Reviewed by Geoffrey Garen.
2318
2319         Make API callback objects use weak handles to run their finalizers
2320         https://bugs.webkit.org/show_bug.cgi?id=58389
2321
2322         Make the API object's private data struct act as a finalizer for
2323         an api object if the callback object has a API defined finalizer.
2324
2325         * API/JSCallbackObject.cpp:
2326         (JSC::JSCallbackObjectData::finalize):
2327         * API/JSCallbackObject.h:
2328         * API/JSCallbackObjectFunctions.h:
2329         (JSC::::init):
2330         * heap/Handle.h:
2331
2332 2011-04-12  Geoffrey Garen  <ggaren@apple.com>
2333
2334         Reviewed by Geoffrey Garen.
2335
2336         Cleaned up hash traits, and added hash traits for handles
2337         https://bugs.webkit.org/show_bug.cgi?id=58381
2338
2339         * heap/Handle.h:
2340         (JSC::HandleBase::swap):
2341         (JSC::Handle::Handle):
2342         (JSC::Handle::swap): Implemented swap, so we can rehash efficiently, and
2343         without creating new handles (which is not allowed during handle finalization).
2344
2345         * heap/Strong.h:
2346         (JSC::Strong::swap): Use new SimpleClassHashTraits to avoid duplication.
2347
2348         * heap/Weak.h:
2349         (JSC::Weak::isHashTableDeletedValue):
2350         (JSC::Weak::Weak):
2351         (JSC::Weak::swap):
2352         (JSC::Weak::hashTableDeletedValue): Ditto.
2353
2354         * wtf/HashTraits.h:
2355         (WTF::SimpleClassHashTraits::constructDeletedValue):
2356         (WTF::SimpleClassHashTraits::isDeletedValue): Added SimpleClassHashTraits,
2357         which are analogous to SimpleClassVectorTraits, since they are used in a
2358         bunch of places.
2359
2360         * wtf/RetainPtr.h: Use new SimpleClassHashTraits to avoid duplication.
2361
2362         * wtf/text/StringHash.h: Use new SimpleClassHashTraits to avoid duplication.
2363
2364 2011-04-12  Geoffrey Garen  <ggaren@apple.com>
2365
2366         Reviewed by Sam Weinig.
2367
2368         Cleaned up some Vector traits, and added missing Vector traits for handles
2369         https://bugs.webkit.org/show_bug.cgi?id=58372
2370
2371         * heap/Local.h: Inherit from SimpleClassVectorTraits to avoid duplication.
2372
2373         * heap/Strong.h: Ditto.
2374
2375         * heap/Weak.h: Ditto.
2376
2377         * parser/JSParser.cpp: Fixed a traits error. No test case because this
2378         particular trait is not currently exercised by the parser.
2379
2380         * runtime/UString.h: No need to override canInitializeWithMemset, since
2381         our base class sets it to true.
2382
2383         * wtf/VectorTraits.h: Inherit from VectorTraitsBase to avoid duplication.
2384
2385         * wtf/text/WTFString.h: No need to override canInitializeWithMemset, since
2386         our base class sets it to true.
2387
2388 2011-04-12  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
2389
2390         Reviewed by Eric Seidel.
2391
2392         [Qt] Enable JIT build for SH4 platforms.
2393         https://bugs.webkit.org/show_bug.cgi?id=58317
2394         enable JIT build for QT backend  for SH4 platforms.
2395
2396         * JavaScriptCore.pro:
2397         * wtf/Platform.h:
2398
2399 2011-04-11  Ben Taylor  <bentaylor.solx86@gmail.com>
2400
2401         Reviewed by Alexey Proskuryakov.
2402
2403         https://bugs.webkit.org/show_bug.cgi?id=58289
2404
2405         Fix compilation on Solaris/Studio 12 C++ in wtf/FastMalloc.cpp,
2406         WTF::TCMalloc_PageHeap::runScavengerThread(void*) expected to return a value.
2407
2408         * wtf/FastMalloc.cpp:
2409         (WTF::TCMalloc_PageHeap::runScavengerThread):
2410
2411 2011-04-11  Mark Rowe  <mrowe@apple.com>
2412
2413         Fix the build.
2414
2415         * JavaScriptCore.xcodeproj/project.pbxproj: Headers used outside of JavaScriptCore need to be marked as private.
2416
2417 2011-04-11  Anna Cavender  <annacc@chromium.org>
2418
2419         Reviewed by Eric Carlson.
2420
2421         Setup ENABLE(TRACK) feature define
2422         https://bugs.webkit.org/show_bug.cgi?id=53556
2423
2424
2425         * Configurations/FeatureDefines.xcconfig:
2426
2427 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
2428
2429         Try to fix a few builds.
2430         
2431         Updated a few more build configurations for file moves.
2432
2433         * CMakeListsWinCE.txt:
2434
2435 2011-04-11  Gavin Barraclough  <barraclough@apple.com>
2436
2437         Reviewed by Sam Weinig.
2438
2439         Bug 58263 - Use EncodedValueDescriptor on both JSVALUE32_64, JSVALUE64
2440
2441         The JSJITInterface already uses EncodedValueDescriptor to access the tag/payload
2442         separately on JSVALUE64, even though EncodedValueDescriptor is not used in
2443         JSVALUE64's implementation of JSValue. Remove the separate definition for m_ptr
2444         on X86_64. Using the union allows us to remove a layer of makeImmediate()/
2445         immedaiteValue() methods.
2446
2447         * dfg/DFGNonSpeculativeJIT.cpp:
2448         (JSC::DFG::NonSpeculativeJIT::compile):
2449         * dfg/DFGSpeculativeJIT.cpp:
2450         (JSC::DFG::SpeculativeJIT::compile):
2451         * jit/JITInlineMethods.h:
2452         (JSC::JIT::emitTagAsBoolImmediate):
2453         * jit/JITOpcodes.cpp:
2454         (JSC::JIT::emit_op_not):
2455         (JSC::JIT::emit_op_jeq_null):
2456         (JSC::JIT::emit_op_jneq_null):
2457         (JSC::JIT::emit_op_get_pnames):
2458         (JSC::JIT::emit_op_eq_null):
2459         (JSC::JIT::emit_op_neq_null):
2460         (JSC::JIT::emitSlow_op_not):
2461         * runtime/JSCell.h:
2462         * runtime/JSValue.h:
2463         * runtime/JSValueInlineMethods.h:
2464         (JSC::JSValue::encode):
2465         (JSC::JSValue::decode):
2466         (JSC::JSValue::operator==):
2467         (JSC::JSValue::operator!=):
2468         (JSC::JSValue::JSValue):
2469         (JSC::JSValue::operator bool):
2470         (JSC::JSValue::asInt32):
2471         (JSC::JSValue::isUndefinedOrNull):
2472         (JSC::JSValue::isBoolean):
2473         (JSC::JSValue::isCell):
2474         (JSC::JSValue::isInt32):
2475         (JSC::JSValue::asDouble):
2476         (JSC::JSValue::isNumber):
2477         (JSC::JSValue::asCell):
2478
2479 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
2480
2481         Try to fix a few builds.
2482         
2483         Updated a few more build configurations for file moves.
2484
2485         * CMakeListsEfl.txt:
2486         * wscript:
2487
2488 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
2489
2490         Build fix: Updated a file name.
2491
2492         * CMakeLists.txt:
2493
2494 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
2495
2496         Rubber-stamped by Sam Weinig.
2497         
2498         Moved remaining heap implementation files to the heap folder.
2499
2500         * Android.mk:
2501         * CMakeLists.txt:
2502         * GNUmakefile.list.am:
2503         * JavaScriptCore.gypi:
2504         * JavaScriptCore.pro:
2505         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2506         * JavaScriptCore.xcodeproj/project.pbxproj:
2507         * heap/ConservativeRoots.cpp: Copied from runtime/ConservativeSet.cpp.
2508         * heap/ConservativeRoots.h: Copied from runtime/ConservativeSet.h.
2509         * heap/Handle.h:
2510         * heap/Heap.cpp:
2511         * heap/MachineStackMarker.cpp: Copied from runtime/MachineStackMarker.cpp.
2512         * heap/MachineStackMarker.h: Copied from runtime/MachineStackMarker.h.
2513         * heap/MarkStack.cpp: Copied from runtime/MarkStack.cpp.
2514         * heap/MarkStack.h: Copied from runtime/MarkStack.h.
2515         * heap/MarkStackPosix.cpp: Copied from runtime/MarkStackPosix.cpp.
2516         * heap/MarkStackSymbian.cpp: Copied from runtime/MarkStackSymbian.cpp.
2517         * heap/MarkStackWin.cpp: Copied from runtime/MarkStackWin.cpp.
2518         * heap/MarkedBlock.cpp: Copied from runtime/MarkedBlock.cpp.
2519         * heap/MarkedBlock.h: Copied from runtime/MarkedBlock.h.
2520         * heap/MarkedSpace.cpp: Copied from runtime/MarkedSpace.cpp.
2521         * heap/MarkedSpace.h: Copied from runtime/MarkedSpace.h.
2522         * interpreter/RegisterFile.cpp:
2523         * runtime/ConservativeSet.cpp: Removed.
2524         * runtime/ConservativeSet.h: Removed.
2525         * runtime/MachineStackMarker.cpp: Removed.
2526         * runtime/MachineStackMarker.h: Removed.
2527         * runtime/MarkStack.cpp: Removed.
2528         * runtime/MarkStack.h: Removed.
2529         * runtime/MarkStackPosix.cpp: Removed.
2530         * runtime/MarkStackSymbian.cpp: Removed.
2531         * runtime/MarkStackWin.cpp: Removed.
2532         * runtime/MarkedBlock.cpp: Removed.
2533         * runtime/MarkedBlock.h: Removed.
2534         * runtime/MarkedSpace.cpp: Removed.
2535         * runtime/MarkedSpace.h: Removed.
2536
2537 2011-04-11  Gavin Barraclough  <barraclough@apple.com>
2538
2539         Windows build fix.
2540
2541         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2542
2543 2011-04-09  Gavin Barraclough  <barraclough@apple.com>
2544
2545         Reviewed by Sam Weinig.
2546
2547         Bug 58198 - Clean up JSValue implementation for JSVALUE64
2548
2549         Remove JSNumberCell, JSImmediate, unify some methods between JSVALUE32_64/JSVALUE64
2550
2551         JSNumberCell.h largely just contained the constructors for JSValue on JSVALUE64,
2552         which should not have been here.  JSImmediate mostly contained uncalled methods,
2553         along with the internal implementation of the JSValue constructors split unnecessarily
2554         across a number of layers of function calls. These could largely be merged back
2555         together. Many methods and constructors from JSVALUE32_64 and JSVALUE64 can by unified.
2556
2557         The .cpp files were empty.
2558
2559         Moving all these methods into JSValue.h seems to be a repro measurable regression, so
2560         I have kept these methods in a separate JSValueInlineMethods.h. Adding the 64-bit tag
2561         values as static const members of JSValue also measures as a repro regression, so I
2562         have made these #defines.
2563
2564         * Android.mk:
2565         * CMakeLists.txt:
2566         * GNUmakefile.list.am:
2567         * JavaScriptCore.exp:
2568         * JavaScriptCore.gypi:
2569         * JavaScriptCore.pro:
2570         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2571         * JavaScriptCore.xcodeproj/project.pbxproj:
2572             - Removed JSImmediate.h, JSNumberCell.h.
2573         * bytecompiler/BytecodeGenerator.cpp:
2574         (JSC::BytecodeGenerator::emitLoad):
2575             - Removed class JSImmediate.
2576         * dfg/DFGNonSpeculativeJIT.cpp:
2577         (JSC::DFG::NonSpeculativeJIT::compile):
2578             - Removed class JSImmediate.
2579         * dfg/DFGSpeculativeJIT.cpp:
2580         (JSC::DFG::SpeculativeJIT::compile):
2581             - Removed class JSImmediate.
2582         * jit/JITArithmetic.cpp:
2583         (JSC::JIT::compileBinaryArithOpSlowCase):
2584             - Removed class JSImmediate.
2585         * jit/JITInlineMethods.h:
2586         (JSC::JIT::emitJumpIfJSCell):
2587         (JSC::JIT::emitJumpIfNotJSCell):
2588         (JSC::JIT::emitJumpIfImmediateInteger):
2589         (JSC::JIT::emitJumpIfNotImmediateInteger):
2590         (JSC::JIT::emitFastArithDeTagImmediate):
2591         (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
2592         (JSC::JIT::emitFastArithReTagImmediate):
2593         (JSC::JIT::emitTagAsBoolImmediate):
2594             - Removed class JSImmediate.
2595         * jit/JITOpcodes.cpp:
2596         (JSC::JIT::emit_op_not):
2597         (JSC::JIT::emit_op_jeq_null):
2598         (JSC::JIT::emit_op_jneq_null):
2599         (JSC::JIT::emit_op_get_pnames):
2600         (JSC::JIT::emit_op_eq_null):
2601         (JSC::JIT::emit_op_neq_null):
2602         (JSC::JIT::emitSlow_op_not):
2603             - Removed class JSImmediate.
2604         * jit/JSInterfaceJIT.h:
2605             - Removed class JSImmediate.
2606         * runtime/JSCell.h:
2607             - Removed JSImmediate.h, JSNumberCell.h.
2608         * runtime/JSImmediate.cpp: Removed.
2609         * runtime/JSImmediate.h: Removed.
2610         * runtime/JSNumberCell.cpp: Removed.
2611         * runtime/JSNumberCell.h: Removed.
2612             - Removed.
2613         * runtime/JSObject.h:
2614             - Removed JSImmediate.h, JSNumberCell.h.
2615         * runtime/JSString.h:
2616             - Removed JSImmediate.h, JSNumberCell.h.
2617         * runtime/JSValue.h:
2618             - Added tags for JSVALUE64, moved out some JSVALUE32_64 methods, unified with JSVALUE64.
2619         * runtime/JSValueInlineMethods.h: Added.
2620         (JSC::JSValue::toInt32):
2621         (JSC::JSValue::toUInt32):
2622         (JSC::JSValue::isUInt32):
2623         (JSC::JSValue::asUInt32):
2624         (JSC::JSValue::uncheckedGetNumber):
2625         (JSC::JSValue::toJSNumber):
2626         (JSC::jsNaN):
2627         (JSC::JSValue::getNumber):
2628         (JSC::JSValue::getBoolean):
2629         (JSC::JSValue::JSValue):
2630         (JSC::JSValue::encode):
2631         (JSC::JSValue::decode):
2632         (JSC::JSValue::operator bool):
2633         (JSC::JSValue::operator==):
2634         (JSC::JSValue::operator!=):
2635         (JSC::JSValue::isUndefined):
2636         (JSC::JSValue::isNull):
2637         (JSC::JSValue::isUndefinedOrNull):
2638         (JSC::JSValue::isCell):
2639         (JSC::JSValue::isInt32):
2640         (JSC::JSValue::isDouble):
2641         (JSC::JSValue::isTrue):
2642         (JSC::JSValue::isFalse):
2643         (JSC::JSValue::tag):
2644         (JSC::JSValue::payload):
2645         (JSC::JSValue::asInt32):
2646         (JSC::JSValue::asDouble):
2647         (JSC::JSValue::asCell):
2648         (JSC::JSValue::isNumber):
2649         (JSC::JSValue::isBoolean):
2650         (JSC::JSValue::makeImmediate):
2651         (JSC::JSValue::immediateValue):
2652         (JSC::reinterpretDoubleToIntptr):
2653         (JSC::reinterpretIntptrToDouble):
2654             - Methods moved here from JSImmediate.h/JSNumberCell.h/JSValue.h.
2655         * runtime/Operations.h:
2656             - Removed JSImmediate.h, JSNumberCell.h.
2657         * wtf/StdLibExtras.h:
2658             - Export bitwise_cast.
2659
2660 2011-04-11  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
2661
2662         Reviewed by Oliver Hunt.
2663
2664         SH4 JIT SUPPORT.
2665         https://bugs.webkit.org/show_bug.cgi?id=44329
2666
2667         Add JIT remaining part for SH4 platforms.
2668
2669         * assembler/MacroAssemblerSH4.h:
2670         * jit/JIT.h:
2671         * jit/JITInlineMethods.h:
2672         * jit/JITOpcodes32_64.cpp:
2673         * jit/JITPropertyAccess32_64.cpp:
2674         * jit/JITStubs.cpp:
2675         * jit/JITStubs.h:
2676         * jit/JSInterfaceJIT.h:
2677
2678 2011-04-10  Geoffrey Garen  <ggaren@apple.com>
2679
2680         Rubber-stamped by Beth Dakin.
2681
2682         Moved Heap.h and Heap.cpp to the heap folder, because anything less 
2683         would be uncivilized.
2684
2685         * Android.mk:
2686         * CMakeLists.txt:
2687         * GNUmakefile.list.am:
2688         * JavaScriptCore.gypi:
2689         * JavaScriptCore.pro:
2690         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2691         * JavaScriptCore.xcodeproj/project.pbxproj:
2692         * heap/Heap.cpp: Copied from JavaScriptCore/runtime/Heap.cpp.
2693         * heap/Heap.h: Copied from JavaScriptCore/runtime/Heap.h.
2694         * runtime/Heap.cpp: Removed.
2695         * runtime/Heap.h: Removed.
2696
2697 2011-04-10  Patrick Gansterer  <paroga@webkit.org>
2698
2699         Reviewed by Darin Adler.
2700
2701         Remove duplicated code from AtomicString::fromUTF8()
2702         https://bugs.webkit.org/show_bug.cgi?id=53711
2703
2704         * JavaScriptCore.exp:
2705         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2706         * wtf/text/AtomicString.cpp:
2707         (WTF::AtomicString::fromUTF8Internal):
2708         * wtf/text/AtomicString.h:
2709         (WTF::AtomicString::fromUTF8):
2710         * wtf/unicode/UTF8.cpp:
2711         (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
2712         * wtf/unicode/UTF8.h:
2713
2714 2011-04-10  Maciej Stachowiak  <mjs@apple.com>
2715
2716         Not reviewed.
2717
2718         Fix build (at least on Lion) by adding some newish header files to
2719         PrivateHeaders.
2720
2721         * JavaScriptCore.xcodeproj/project.pbxproj:
2722
2723 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
2724
2725         Not reviewed.
2726
2727         Try recommitting some things svn left out of its last commit.
2728
2729         * heap/Handle.h:
2730         (JSC::HandleBase::operator!):
2731         (JSC::HandleBase::HandleBase):
2732         (JSC::HandleBase::slot):
2733         (JSC::HandleBase::setSlot):
2734         (JSC::Handle::Handle):
2735         * heap/HandleHeap.cpp:
2736         (JSC::HandleHeap::markWeakHandles):
2737         (JSC::HandleHeap::finalizeWeakHandles):
2738         (JSC::HandleHeap::isValidWeakNode):
2739         * heap/HandleHeap.h:
2740         (JSC::HandleHeap::globalData):
2741
2742 2011-04-08  Geoffrey Garen  <ggaren@apple.com>
2743
2744         Reviewed by Oliver Hunt.
2745
2746         A few heap-related renames and file moves.
2747         
2748         WeakGCPtr<T> => Weak<T>
2749         Global<T> => Strong<T>
2750         collector/ => heap/
2751         collector/* => heap/*
2752         runtime/WeakGCPtr.h => heap/Weak.h
2753         
2754         (Eventually, even more files should move into the heap directory. Like
2755         Heap.h and Heap.cpp, for example.)
2756
2757         * API/JSClassRef.h:
2758         * CMakeLists.txt:
2759         * GNUmakefile.am:
2760         * GNUmakefile.list.am:
2761         * JavaScriptCore.gypi:
2762         * JavaScriptCore.pri:
2763         * JavaScriptCore.pro:
2764         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2765         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
2766         * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
2767         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
2768         * JavaScriptCore.xcodeproj/project.pbxproj:
2769         * bytecode/SamplingTool.h:
2770         * bytecompiler/BytecodeGenerator.h:
2771         * collector: Removed.
2772         * collector/handles: Removed.
2773         * collector/handles/Global.h: Removed.
2774         * collector/handles/Handle.h: Removed.
2775         * collector/handles/HandleHeap.cpp: Removed.
2776         * collector/handles/HandleHeap.h: Removed.
2777         * collector/handles/HandleStack.cpp: Removed.
2778         * collector/handles/HandleStack.h: Removed.
2779         * collector/handles/Local.h: Removed.
2780         * collector/handles/LocalScope.h: Removed.
2781         * heap: Copied from collector.
2782         * heap/Handle.h: Copied from collector/handles/Handle.h.
2783         * heap/HandleHeap.cpp: Copied from collector/handles/HandleHeap.cpp.
2784         * heap/HandleHeap.h: Copied from collector/handles/HandleHeap.h.
2785         * heap/HandleStack.cpp: Copied from collector/handles/HandleStack.cpp.
2786         * heap/HandleStack.h: Copied from collector/handles/HandleStack.h.
2787         * heap/Local.h: Copied from collector/handles/Local.h.
2788         * heap/LocalScope.h: Copied from collector/handles/LocalScope.h.
2789         * heap/Strong.h: Copied from collector/handles/Global.h.
2790         (JSC::Strong::Strong):
2791         (JSC::Strong::~Strong):
2792         (JSC::Strong::operator=):
2793         * heap/Weak.h: Copied from runtime/WeakGCPtr.h.
2794         (JSC::Weak::Weak):
2795         (JSC::Weak::~Weak):
2796         * heap/handles: Removed.
2797         * interpreter/RegisterFile.h:
2798         * jit/JITStubs.cpp:
2799         (JSC::JITThunks::hostFunctionStub):
2800         * jit/JITStubs.h:
2801         * runtime/Structure.h:
2802         * runtime/WeakGCPtr.h: Removed.
2803
2804 2011-04-08  Alpha Lam  <hclam@chromium.org>
2805
2806         Unreviewed, rolling out r83335.
2807         http://trac.webkit.org/changeset/83335
2808         https://bugs.webkit.org/show_bug.cgi?id=53556
2809
2810         GTK and QT bots are broken
2811
2812         * Configurations/FeatureDefines.xcconfig:
2813
2814 2011-04-08  Gavin Barraclough  <barraclough@apple.com>
2815
2816         Ooops, typo, build fix.
2817
2818         * dfg/DFGByteCodeParser.cpp:
2819         (JSC::DFG::ByteCodeParser::parse):
2820
2821 2011-04-08  Gavin Barraclough  <barraclough@apple.com>
2822
2823         Reviewed by Oliver Hunt.
2824
2825         Bug 58154 - Add support for comparison operators to the DFG JIT.
2826
2827         Add support for <, <=, ==, ===, and also !.  Add support for all corresponding
2828         bytecode ops, including the not- and -null forms.  Initially add functionally
2829         correct support, we'll revisit the performance.
2830
2831         * dfg/DFGByteCodeParser.cpp:
2832         (JSC::DFG::ByteCodeParser::ByteCodeParser):
2833         (JSC::DFG::ByteCodeParser::constantNull):
2834         (JSC::DFG::ByteCodeParser::parse):
2835             - Add support for parsing of bytecode opcodes, 
2836         * dfg/DFGJITCodeGenerator.h:
2837         (JSC::DFG::JITCodeGenerator::callOperation):
2838             - Add new operation call types, return bool values.
2839         * dfg/DFGNode.h:
2840             - Add new node types.
2841         * dfg/DFGNonSpeculativeJIT.cpp:
2842         (JSC::DFG::NonSpeculativeJIT::compile):
2843             - Add code generation for new nodes.
2844         * dfg/DFGOperations.cpp:
2845         (JSC::DFG::operationCompareLess):
2846         (JSC::DFG::operationCompareLessEq):
2847         (JSC::DFG::operationCompareEq):
2848         (JSC::DFG::operationCompareStrictEq):
2849         (JSC::DFG::dfgConvertJSValueToBoolean):
2850         * dfg/DFGOperations.h:
2851             - Add operation callbacks to implement new ops.
2852         * dfg/DFGSpeculativeJIT.cpp:
2853         (JSC::DFG::SpeculativeJIT::compile):
2854             - Add code generation for new nodes.
2855         * jit/JITOpcodes.cpp:
2856         (JSC::JIT::privateCompileCTIMachineTrampolines):
2857             - Switched to a simpler <0 check, rather than relying on an internal value in JSImmediate.
2858         * jit/JITPropertyAccess.cpp:
2859         (JSC::JIT::privateCompilePatchGetArrayLength):
2860             - Switched to a simpler <0 check, rather than relying on an internal value in JSImmediate.
2861         * runtime/JSImmediate.h:
2862             - Make tag values public, rather than relying on a friend - this matches JSVALUE32_64.
2863
2864 2011-04-07  Anna Cavender  <annacc@chromium.org>
2865
2866         Reviewed by Eric Carlson.
2867
2868         Setup ENABLE(TRACK) feature define
2869         https://bugs.webkit.org/show_bug.cgi?id=53556
2870
2871
2872         * Configurations/FeatureDefines.xcconfig:
2873
2874 2011-04-07  Balazs Kelemen  <kbalazs@webkit.org>
2875
2876         Reviewed by Kenneth Rohde Christiansen.
2877
2878         [WK2][Qt][GTK] Introduce common use flag for the shared UNIX domain socket IPC implementation
2879         https://bugs.webkit.org/show_bug.cgi?id=58030
2880
2881         * wtf/Platform.h: Introduce USE(UNIX_DOMAIN_SOCKETS) for WebKit2.
2882
2883 2011-04-08  Adam Roben  <aroben@apple.com>
2884
2885         Clean build fix
2886
2887         * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: Don't try to delete directories that
2888         don't exist. Also switched from del /s to rmdir /s, which has the benefit of deleting the
2889         directory itself in addition to the files it contains.
2890
2891 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
2892
2893         Reviewed by Maciej Stachowiak.
2894
2895         Some Handle<T> cleanup
2896         https://bugs.webkit.org/show_bug.cgi?id=58109
2897
2898         * bytecode/SamplingTool.h: Sorted alphabetically because that's the
2899         WebKit style. Added a Global.h #include that was previously missing
2900         but harmless.
2901
2902         * collector/handles/Global.h:
2903         (JSC::Global::Global): Added a null constructor. No need for a special
2904         tag, and the tag is incompatible with some data structures.
2905         
2906         (JSC::Global::isHashTableDeletedValue):
2907         (JSC::Global::~Global):
2908         (JSC::Global::set):
2909         (JSC::Global::operator=):
2910         (JSC::Global::clear):
2911         (JSC::Global::hashTableDeletedValue): Reordered constructors to be near
2912         each other.
2913
2914         (JSC::Global::setWithWriteBarrier): Renamed internalSet to
2915         setWithWriteBarrier for clarity, and funneled more code into using set
2916         and setWithWriteBarrier to reduce duplication.
2917
2918         * collector/handles/Handle.h:
2919         (JSC::HandleBase::operator!):
2920         (JSC::HandleBase::HandleBase): Removed isEmpty(), since we already have
2921         boolean and ! operators.
2922
2923         (JSC::HandleBase::slot):
2924         (JSC::HandleBase::setSlot):
2925         (JSC::Handle::Handle): Added general support for null Handles. This was
2926         previously outlawed by ASSERTs, but our code has grown to support and
2927         rely on null Handles.
2928         
2929         * collector/handles/HandleHeap.cpp:
2930         (JSC::HandleHeap::markWeakHandles):
2931         (JSC::HandleHeap::finalizeWeakHandles):
2932         (JSC::HandleHeap::isValidWeakNode): Migrated from isValidWeakHandle,
2933         and beefed this up a bit.
2934
2935         * collector/handles/HandleHeap.h:
2936         (JSC::HandleHeap::globalData): Added accessor, used by some new set functions.
2937
2938         * collector/handles/Local.h: Moved hash traits to the bottom of the file,
2939         since this file is about the Local class, not the traits.
2940
2941         (JSC::::Local): Updated for removal of invalidate().
2942
2943         (JSC::::operator): Deployed "using" to avoid a lot of this->
2944         template funny business.
2945
2946         (JSC::::setWithSlotCheck): Renamed from internalSet, more specific now.
2947
2948         * interpreter/RegisterFile.h:
2949         (JSC::RegisterFile::RegisterFile): Updated to use null constructor.
2950
2951         * jit/JITStubs.cpp:
2952         (JSC::JITThunks::hostFunctionStub):
2953
2954         * runtime/JSPropertyNameIterator.h:
2955         (JSC::Structure::setEnumerationCache):
2956         * runtime/Structure.h: Removed clearEnumerationCache
2957         because it was an unused holdover from when the enumeration cache was
2958         not a handle.
2959
2960         * runtime/WeakGCMap.h:
2961         (JSC::WeakGCMap::set): Finish initializing our handle before putting it
2962         in the table. This seemed more logical, and at one point was required
2963         to avoid triggering an ASSERT.
2964
2965         * runtime/WeakGCPtr.h: Inherit from Handle instead of rolling our own
2966         handle-like behavior, to avoid duplication.
2967
2968         (JSC::WeakGCPtr::WeakGCPtr):
2969         (JSC::WeakGCPtr::~WeakGCPtr):
2970         (JSC::WeakGCPtr::get):
2971         (JSC::WeakGCPtr::clear):
2972         (JSC::WeakGCPtr::set):
2973         (JSC::WeakGCPtr::setWithWriteBarrier): Removed duplicate code and
2974         standardized on Handle idioms.
2975
2976 2011-04-07  Adam Barth  <abarth@webkit.org>
2977
2978         Reviewed by Martin Robinson.
2979
2980         Refactor Gtk build system to separate list of files
2981         https://bugs.webkit.org/show_bug.cgi?id=58090
2982
2983         This is the first step towards generating part of the GTK build system
2984         using GYP.  In the first iteration, our plan is to just generate the
2985         list of files.  This patch is the first step, which is to separate out
2986         the part of JavaScriptCore build system that we intend to generate from
2987         the rest of the build system.
2988
2989         * GNUmakefile.am:
2990         * GNUmakefile.list.am: Added.
2991
2992 2011-04-07  Zoltan Herczeg  <zherczeg@webkit.org>
2993
2994         Reviewed by Gavin Barraclough.
2995
2996         Mapping booleans the same way as integers
2997         https://bugs.webkit.org/show_bug.cgi?id=56913
2998
2999         Instead of having a seperate tag field for booleans,
3000         the logical values are stored in the payload field
3001         (for JSValue32_64 representation).
3002
3003         1.007x speedup on SunSpider.
3004
3005         * jit/JIT.h:
3006         * jit/JITInlineMethods.h:
3007         (JSC::JIT::emitStoreBool):
3008         * jit/JITOpcodes32_64.cpp:
3009         (JSC::JIT::emit_op_instanceof):
3010         (JSC::JIT::emit_op_not):
3011         (JSC::JIT::emit_op_jfalse):
3012         (JSC::JIT::emitSlow_op_jfalse):
3013         (JSC::JIT::emit_op_jtrue):
3014         (JSC::JIT::emitSlow_op_jtrue):
3015         (JSC::JIT::emit_op_jeq_null):
3016         (JSC::JIT::emit_op_jneq_null):
3017         (JSC::JIT::emit_op_eq):
3018         (JSC::JIT::emitSlow_op_eq):
3019         (JSC::JIT::emit_op_neq):
3020         (JSC::JIT::emitSlow_op_neq):
3021         (JSC::JIT::compileOpStrictEq):
3022         (JSC::JIT::emit_op_eq_null):
3023         (JSC::JIT::emit_op_neq_null):
3024         * jit/JSInterfaceJIT.h:
3025         * runtime/JSValue.h:
3026         (JSC::JSValue::JSValue):
3027         (JSC::JSValue::isTrue):
3028         (JSC::JSValue::isFalse):
3029         (JSC::JSValue::getBoolean):
3030
3031 2011-04-07  Eric Seidel  <eric@webkit.org>
3032
3033         Reviewed by Adam Barth.
3034
3035         Add stub support for generating Gtk build system from gyp
3036         https://bugs.webkit.org/show_bug.cgi?id=58086
3037
3038         This does not produce a buildable JavaScriptCore, but it
3039         does allow running gyp/configure --port=gtk and having
3040         it generate a gtk.Makefile which we can use for testing
3041         the rest of the plumbing.
3042
3043         * gyp/gtk.gyp: Added.
3044
3045 2011-04-07  Andrew Scherkus  <scherkus@chromium.org>
3046
3047         Revert ENABLE_TRACK patch due to compile failures.
3048
3049         * Configurations/FeatureDefines.xcconfig:
3050
3051 2011-04-07  Adam Barth  <abarth@webkit.org>
3052
3053         Fix whitespace in GNUmakefile.am.
3054
3055         * GNUmakefile.am:
3056
3057 2011-04-07  Gavin Barraclough  <barraclough@apple.com>
3058
3059         Fix a couple of typos in comments that Darin spotted.
3060
3061         * jit/JITOpcodes.cpp:
3062         (JSC::JIT::emit_op_not):
3063         * runtime/JSImmediate.h:
3064
3065 2011-04-06  Gavin Barraclough  <barraclough@apple.com>
3066
3067         Reviewed by Geoff Garen.
3068         Bug 58057 - Store boolean payload in low bit of JSImmediate
3069
3070         And remove some uncalled functions from JSImmediate.h
3071
3072         * jit/JITInlineMethods.h:
3073         (JSC::JIT::emitTagAsBoolImmediate):
3074         * jit/JITOpcodes.cpp:
3075         (JSC::JIT::emit_op_not):
3076         * runtime/JSImmediate.h:
3077         (JSC::JSImmediate::makeInt):
3078         (JSC::JSImmediate::makeBool):
3079         (JSC::JSImmediate::intValue):
3080         (JSC::JSImmediate::boolValue):
3081         (JSC::JSImmediate::asInt32):
3082         (JSC::JSImmediate::toDouble):
3083         (JSC::JSValue::asInt32):
3084         (JSC::JSValue::isUInt32):
3085         (JSC::JSValue::asUInt32):
3086
3087 2011-04-07  Liang Qi  <liang.qi@nokia.com>
3088
3089         Reviewed by Laszlo Gombos.
3090
3091         [Qt][Symbian] Enable webkit build with GCCE on Symbian.
3092         https://bugs.webkit.org/show_bug.cgi?id=57841
3093
3094         * wtf/MathExtras.h: GCCE compiler doesn't support those std static functions.
3095
3096 2011-04-06  Dai Mikurube  <dmikurube@chromium.org>
3097
3098         Reviewed by David Levin.
3099
3100         Add QUOTA build flag for unified quota API
3101         https://bugs.webkit.org/show_bug.cgi?id=57918
3102
3103         * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
3104
3105 2011-04-06  Kevin Ollivier  <kevino@theolliviers.com>
3106         
3107         Reviewed by Darin Adler.
3108         
3109         Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
3110         
3111         https://bugs.webkit.org/show_bug.cgi?id=27551
3112
3113         * config.h:
3114
3115 2011-04-06  Oliver Hunt  <oliver@apple.com>
3116
3117         Reviewed by Gavin Barraclough.
3118
3119         Stop JSObject::isUsingInlineStorage() from using the structure
3120         https://bugs.webkit.org/show_bug.cgi?id=57986
3121
3122         Make the isUsingInlineStorage() implementation just look at
3123         whether the property storage is inside the object.
3124
3125         * runtime/JSObject.h:
3126         (JSC::JSObject::isUsingInlineStorage):
3127         (JSC::JSObject::JSObject):
3128
3129 2011-04-06  Gavin Barraclough  <barraclough@apple.com>
3130
3131         Rubber stamped by Geoff Garen.
3132
3133         Update comments documenting JSVALUE64/JSVALUE32_64 JSValue representations.
3134
3135         * runtime/JSImmediate.h:
3136         * runtime/JSValue.h:
3137
3138 2011-04-06  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
3139
3140         cmake: Fix build for ARMv7
3141
3142         * CMakeLists.txt: add missing file.
3143
3144 2011-04-06  Liang Qi  <liang.qi@nokia.com>
3145
3146         Reviewed by Benjamin Poulain.
3147
3148         Correct a include file name.
3149         https://bugs.webkit.org/show_bug.cgi?id=57839
3150
3151         * wtf/PageAllocatorSymbian.h: It should be case sensitive. This fix 
3152         builds on Unix hosts.
3153
3154 2011-04-06  Adam Roben  <aroben@apple.com>
3155
3156         Build fix after r83056
3157
3158         * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: Added property svn:executable.
3159
3160 2011-04-06  Adam Roben  <aroben@apple.com>
3161
3162         Move JavaScriptCoreGenerated's file-copying logic out to a new script
3163
3164         Hopefully this will make it easier to modify this logic in the future. I also made the
3165         script much quieter than the old logic, since it didn't seem helpful to see long lists of
3166         filenames during the copying phase.
3167
3168         If we like this new style, we could copy it for our other projects.
3169
3170         Fixes <http://webkit.org/b/57950> JavaScriptCoreGenerated's file-copying logic is hard to
3171         modify and noisy
3172
3173         Reviewed by Steve Falkenburg.
3174
3175         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Moved logic to copy
3176         files from here...
3177         * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: ...to here. (Added.)
3178
3179         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Added copy-files.cmd
3180         for convenience.
3181
3182 2011-04-05  Geoffrey Garen  <ggaren@apple.com>
3183
3184         Try to fix the Windows build.
3185
3186         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Who likes export files? I do!
3187
3188 2011-04-05  Geoffrey Garen  <ggaren@apple.com>
3189
3190         Reviewed by Oliver Hunt.
3191
3192         Introduced the concept of opaque roots, in preparation for marking the DOM with them
3193         https://bugs.webkit.org/show_bug.cgi?id=57903
3194
3195         * JavaScriptCore.exp: Who likes export files? I do!
3196
3197         * collector/handles/HandleHeap.cpp:
3198         (JSC::isValidWeakHandle): Factored out a helper function for ASSERTs.
3199
3200         (JSC::WeakHandleOwner::~WeakHandleOwner): Moved from header to avoid
3201         weak linkage problems.
3202
3203         (JSC::WeakHandleOwner::isReachableFromOpaqueRoots): New callback.
3204         Currently unused.
3205
3206         (JSC::WeakHandleOwner::finalize): Switched from pure virtual to a
3207         default empty implementation, since not all clients necessarily want
3208         or need non-trivial finalizers.
3209
3210         (JSC::HandleHeap::markWeakHandles): Split updateWeakHandles into two
3211         passes. The first pass marks all reachable weak handles. The second pass
3212         finalizes all unreachable weak handles. This must be two passes because
3213         we don't know the set of finalizable weak handles until we're done
3214         marking all weak handles.
3215
3216         (JSC::HandleHeap::finalizeWeakHandles): Use new helper function.
3217
3218         * collector/handles/HandleHeap.h: Ditto.
3219
3220         * runtime/Heap.cpp: 
3221         (JSC::Heap::destroy):
3222         (JSC::Heap::markRoots):
3223         (JSC::Heap::reset): Split out handle marking from handle finalization.
3224
3225         * runtime/MarkStack.cpp:
3226         (JSC::MarkStack::reset):
3227         * runtime/MarkStack.h:
3228         (JSC::MarkStack::addOpaqueRoot):
3229         (JSC::MarkStack::containsOpaqueRoot):
3230         (JSC::MarkStack::opaqueRootCount):
3231         (JSC::HeapRootMarker::markStack): New helper functions for managing the
3232         set of opaque roots.
3233
3234         * runtime/WeakGCMap.h:
3235         (JSC::WeakGCMap::finalize): Renamed to match parent class declaration.
3236
3237 2011-04-05  Balazs Kelemen  <kbalazs@webkit.org>
3238
3239         Reviewed by Darin Adler.
3240
3241         Build fix for YarrParser.h
3242         https://bugs.webkit.org/show_bug.cgi?id=57822
3243
3244         * yarr/YarrParser.h:
3245         (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
3246
3247 2011-04-05  Steve Falkenburg  <sfalken@apple.com>
3248
3249         Follow-up Windows build fix.
3250         Don't skip react-to-vsprops-changes.py for all production builds,
3251         only those initiated via JavaScriptCore.make.
3252
3253         * JavaScriptCore.vcproj/JavaScriptCore.make:
3254         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3255
3256 2011-04-05  Oliver Hunt  <oliver@apple.com>
3257
3258         Reviewed by Darin Adler.
3259
3260         REGRESSION (r82849): 85,000+ JSC-related leaks seen on SnowLeopard Intel Leaks
3261         https://bugs.webkit.org/show_bug.cgi?id=57857
3262
3263         Whoops, accidentally removed a deref().
3264
3265         * bytecode/StructureStubInfo.cpp:
3266         (JSC::StructureStubInfo::deref):
3267
3268 2011-04-05  Steve Falkenburg  <sfalken@apple.com>
3269
3270         Windows build fix.
3271
3272         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add per-configuration vsprops files.
3273         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Removed inheritance from common.vsprops.
3274         Set production environment variable before calling make.
3275         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebug.vsprops: Added.
3276         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugAll.vsprops: Added.
3277         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugCairoCFLite.vsprops: Added.
3278         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedProduction.vsprops: Added.
3279         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedRelease.vsprops: Added.
3280         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleaseCairoCFLite.vsprops: Added.
3281         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleasePGO.vsprops: Added.
3282
3283 2011-04-05  Oliver Hunt  <oliver@apple.com>
3284
3285         Reviewed by Gavin Barraclough.
3286
3287         Make caches window show more info about non-jsobject GC values
3288         https://bugs.webkit.org/show_bug.cgi?id=57874
3289
3290         Add ClassInfo to the various internal JS types that currently
3291         don't have any, and make the text for caches window show the
3292         classname for non-JSObject instances.
3293
3294         * runtime/Executable.cpp:
3295         * runtime/Executable.h:
3296         (JSC::ExecutableBase::createStructure):
3297         (JSC::NativeExecutable::createStructure):
3298         (JSC::NativeExecutable::NativeExecutable):
3299         (JSC::EvalExecutable::createStructure):
3300         (JSC::ProgramExecutable::createStructure):
3301         (JSC::FunctionExecutable::createStructure):
3302         * runtime/Heap.cpp:
3303         (JSC::TypeCounter::typeName):
3304         * runtime/JSGlobalData.cpp:
3305         (JSC::JSGlobalData::JSGlobalData):
3306         * runtime/JSGlobalData.h:
3307         * runtime/ScopeChain.cpp:
3308         * runtime/ScopeChain.h:
3309         (JSC::ScopeChainNode::createStructure):
3310         * runtime/StructureChain.cpp:
3311         * runtime/StructureChain.h:
3312         (JSC::StructureChain::createStructure):
3313
3314 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
3315
3316         Reviewed by Andreas Kling.
3317
3318         Cleanup StringConcatenate
3319         https://bugs.webkit.org/show_bug.cgi?id=57836
3320
3321         Don't use PassRefPtr in local variables, properly store in RefPtrs and release on return.
3322         Add a makeString() variant taking 9 arguments, needed by a follow-up patch.
3323
3324         * wtf/text/StringConcatenate.h:
3325         (WTF::tryMakeString):
3326         (WTF::makeString):
3327
3328 2011-04-04  Sheriff Bot  <webkit.review.bot@gmail.com>
3329
3330         Unreviewed, rolling out r82876.
3331         http://trac.webkit.org/changeset/82876
3332         https://bugs.webkit.org/show_bug.cgi?id=57816
3333
3334         Caused a lot of test crashes (Requested by tkent on #webkit).
3335
3336         * JavaScriptCore.exp:
3337         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3338         * wtf/FastMalloc.cpp:
3339         (WTF::tryFastMalloc):
3340         (WTF::fastMalloc):
3341         (WTF::tryFastCalloc):
3342         (WTF::fastCalloc):
3343         (WTF::fastFree):
3344         (WTF::tryFastRealloc):
3345         (WTF::fastRealloc):
3346         (WTF::fastMallocSize):
3347         (WTF::TCMalloc_PageHeap::isScavengerSuspended):
3348         (WTF::TCMalloc_PageHeap::scheduleScavenger):
3349         (WTF::TCMalloc_PageHeap::suspendScavenger):
3350         (WTF::TCMalloc_PageHeap::signalScavenger):
3351         (WTF::TCMallocStats::malloc):
3352         (WTF::TCMallocStats::free):
3353         (WTF::TCMallocStats::fastCalloc):
3354         (WTF::TCMallocStats::tryFastCalloc):
3355         (WTF::TCMallocStats::calloc):
3356         (WTF::TCMallocStats::fastRealloc):
3357         (WTF::TCMallocStats::tryFastRealloc):
3358         (WTF::TCMallocStats::realloc):
3359         (WTF::TCMallocStats::fastMallocSize):
3360         * wtf/FastMalloc.h:
3361         (WTF::Internal::fastMallocMatchValidationType):
3362         (WTF::Internal::fastMallocMatchValidationValue):
3363         (WTF::Internal::setFastMallocMatchValidationType):
3364         (WTF::fastMallocMatchValidateFree):
3365         * wtf/Platform.h:
3366
3367 2011-04-04  Oliver Hunt  <oliver@apple.com>
3368
3369         Reviewed by Antti Koivisto.
3370
3371         Stop JSCell.h from including Structure.h
3372         https://bugs.webkit.org/show_bug.cgi?id=57809
3373
3374         * runtime/GetterSetter.h:
3375         * runtime/JSAPIValueWrapper.h:
3376         * runtime/JSCell.h:
3377         (JSC::JSCell::JSValue::toThisObject):
3378         * runtime/JSString.h:
3379         * runtime/ScopeChain.h:
3380         * runtime/Structure.h:
3381         (JSC::JSCell::isObject):
3382         (JSC::JSCell::isString):
3383         (JSC::JSCell::classInfo):
3384         (JSC::JSCell::createDummyStructure):
3385         (JSC::JSValue::needsThisConversion):
3386         (JSC::MarkStack::internalAppend):
3387         * runtime/StructureChain.h:
3388
3389 2011-04-04  Oliver Hunt  <oliver@apple.com>
3390
3391         Fix clang build.
3392
3393         * wtf/FastMalloc.cpp:
3394         (WTF::fastMalloc):
3395         (WTF::fastCalloc):
3396         (WTF::fastRealloc):
3397
3398 2011-04-04  Oliver Hunt  <oliver@apple.com>
3399
3400         Remove accidental change to Platform.h
3401
3402         * wtf/Platform.h:
3403
3404 2011-04-04  Geoffrey Garen  <ggaren@apple.com>
3405
3406         Reviewed by Oliver Hunt.
3407
3408         Fixed a weak-handle-related leak in RegisterFile
3409         https://bugs.webkit.org/show_bug.cgi?id=57793
3410
3411         * interpreter/RegisterFile.cpp: Nixed leaky GlobalObjectNotifier.
3412         * interpreter/RegisterFile.h:
3413         (JSC::RegisterFile::GlobalObjectOwner::finalize):
3414         (JSC::RegisterFile::RegisterFile): Replaced GlobalObjectNotifier with
3415         a per-RegisterFile weak handle owner, which does not leak.
3416
3417         * runtime/WeakGCPtr.h:
3418         (JSC::WeakGCPtr::set): Allow set() to take a context argument, since
3419         RegisterFile now needs this. (Seems like it was an accidental omission
3420         all along.)
3421
3422 2011-04-04  Oliver Hunt  <oliver@apple.com>
3423
3424         Reviewed by Geoffrey Garen.
3425
3426         Make malloc validation useful
3427         https://bugs.webkit.org/show_bug.cgi?id=57502
3428
3429         This patch changes FAST_MALLOC_MATCH_VALIDATION with a general
3430         corruption check that tags the beginning and end of all allocations
3431         to check for write overflows and overwrites the contents of
3432         memory on free in order to (hopefully) show up use-after-free issues
3433         sooner.
3434
3435         We also turn it on by default for debug builds.
3436
3437         * JavaScriptCore.exp:
3438         * wtf/FastMalloc.cpp:
3439         (WTF::tryFastMalloc):
3440         (WTF::fastMalloc):
3441         (WTF::tryFastCalloc):
3442         (WTF::fastCalloc):
3443         (WTF::fastFree):
3444         (WTF::tryFastRealloc):
3445         (WTF::fastRealloc):
3446         (WTF::TCMalloc_PageHeap::isScavengerSuspended):
3447         (WTF::TCMalloc_PageHeap::scheduleScavenger):
3448         (WTF::TCMalloc_PageHeap::suspendScavenger):
3449         (WTF::TCMalloc_PageHeap::signalScavenger):
3450         (WTF::TCMallocStats::malloc):
3451         (WTF::TCMallocStats::free):
3452         (WTF::TCMallocStats::fastCalloc):
3453         (WTF::TCMallocStats::tryFastCalloc):
3454         (WTF::TCMallocStats::calloc):
3455         (WTF::TCMallocStats::fastRealloc):
3456         (WTF::TCMallocStats::tryFastRealloc):
3457         (WTF::TCMallocStats::realloc):
3458         * wtf/FastMalloc.h:
3459         (WTF::Internal::fastMallocValidationHeader):
3460         (WTF::Internal::fastMallocValidationSuffix):
3461         (WTF::Internal::fastMallocMatchValidationType):
3462         (WTF::Internal::setFastMallocMatchValidationType):
3463         (WTF::fastMallocMatchValidateFree):
3464         (WTF::fastMallocValidate):
3465         * wtf/Platform.h:
3466
3467 2011-04-04  Geoffrey Garen  <ggaren@apple.com>
3468
3469         Reviewed by Oliver Hunt.
3470
3471         Renamed clearWeakPointers => updateWeakHandles and removed misleading comment
3472         https://bugs.webkit.org/show_bug.cgi?id=57790
3473
3474         * collector/handles/HandleHeap.cpp:
3475         (JSC::HandleHeap::updateWeakHandles): Updated for rename.
3476
3477         * collector/handles/HandleHeap.h: Removed comment claiming that this
3478         function should only be called during teardown, because it's actually
3479         called after every GC pass.
3480
3481         * runtime/Heap.cpp:
3482         (JSC::Heap::destroy):
3483         (JSC::Heap::markRoots): Updated for rename.
3484
3485 2011-04-04  Geoffrey Garen  <ggaren@apple.com>
3486
3487         Reviewed by Oliver Hunt.
3488
3489    &nbs