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