ChangeLog 286 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
2013-05-02  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: Structure transition table keys don't have to ref their StringImpl's
        https://bugs.webkit.org/show_bug.cgi?id=115525

        Reviewed by Geoffrey Garen.
        
        The structure transition table basically maps string to structure. The string is
        always also stored, and ref'd, in the structure in Structure::m_nameInPrevious.
        m_nameInPrevious is never mutated, and never cleared. The string cannot die unless
        the structure dies. If the structure dies, then that entry in the transition map
        becomes a zombie anyway and we will detect this separately.
        
        So, we don't need to use RefPtr<StringImpl>. We can just use StringImpl*.
        
        This also fixes a goof where we were getting the StringImpl's hash rather than
        using a pointer hash. Not only is the latter faster, but it prevents my change
        from leading to crashes: with my change we can have zombie keys, not just zombie
        values. They will exist only until the next map mutation, which will clear them.
        Lookups will work fine because the lookup routine will reject zombies. But it
        does mean that the HashMap will have to deal with dangling StringImpl*'s; all it
        takes to make this work is to ensure that the HashMap itself never dereferences
        them. Using a pointer hash rather than StringImpl::existingHash() accomplishes
        this.
        
        This also ensures that we don't accidentally call ref() or deref() from the
        compilation thread, if the compilation thread inspects the transition table.
        
        And no, we wouldn't have been able to use the HashMap<RefPtr<...>, ...>
        specialization, because the transition table is actually
        HashMap<pair<RefPtr<StringImpl>, unsigned>, ...>: hence that specialization
        doesn't kick in. We could have written a new specialization or something, but
        that seemed like a lot of work given that we don't need the table to be ref'ing
        the strings anyways.

        * runtime/Structure.cpp:
        (JSC::StructureTransitionTable::add):
        * runtime/StructureTransitionTable.h:
        (StructureTransitionTable):
        (Hash):
        (JSC::StructureTransitionTable::Hash::hash):

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
2013-05-01  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: Structure::addPropertyTransitionToExistingStructure should be thread-safe
        https://bugs.webkit.org/show_bug.cgi?id=115468

        Reviewed by Geoffrey Garen.
        
        This makes the main thread modify the transition table while holding a lock. Note
        that the GC might modify its weak pointers without locking, but the GC will lock out
        the compilation thread anyway. The map will then only reshape in response to add()
        and set(), which happen while holding a lock.
        
        This allows the compilation thread to now query transition tables safely, provided it
        holds a lock when doing so.
        
        Also changed LLVM asm printer initialization to just initialize the X86 one. It makes
        sense for us to just initialize the asm printer(s) that we actually use; you could
        imagine us being linked to a system LLVM that has cross-compilation support; there is
        no point in the WebKit or JSC process doing work to initialize all of those targets.
        That part was rubber stamped by Mark Hahnenberg.
        
        * bytecode/PutByIdStatus.cpp:
        (JSC::PutByIdStatus::computeFor):
        * runtime/InitializeThreading.cpp:
        (JSC::initializeThreadingOnce):
        * runtime/Structure.cpp:
        (JSC::Structure::addPropertyTransitionToExistingStructureImpl):
        (JSC::Structure::addPropertyTransitionToExistingStructure):
        (JSC):
        (JSC::Structure::addPropertyTransitionToExistingStructureConcurrently):
        (JSC::Structure::addPropertyTransition):
        (JSC::Structure::nonPropertyTransition):
        * runtime/Structure.h:
        (Structure):

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
2013-04-30  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: Structure::getConcurrently() may be called from for uncacheable dictionaries, and this is safe
        https://bugs.webkit.org/show_bug.cgi?id=115464

        Reviewed by Oliver Hunt and Geoffrey Garen.
        
        This can happen for example transitively from JSObject::put(). getCurrently() does
        work for uncacheable dictionaries; it just has the obvious race that right after it
        returns, the result it returned may no longer be right. This isn't an issue if it was
        called on the main thread, and may not be an issue in some other situations.
        
        So, we should just remove the assertion, since the only thing it buys us is crashes.

        * runtime/Structure.cpp:
        (JSC::Structure::getConcurrently):

95
96
97
98
99
100
101
102
2013-04-30  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: Don't link gtest into JavaScriptCore

        Rubber stamped by Mark Rowe.

        * Configurations/JavaScriptCore.xcconfig:

103
104
105
106
107
108
109
110
111
112
2013-04-29  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: String::utf8() should also be available as StringImpl::utf8() so that you don't have to ref() a StringImpl just to get its utf8()
        https://bugs.webkit.org/show_bug.cgi?id=115393

        Reviewed by Geoffrey Garen.

        * runtime/JSGlobalObjectFunctions.cpp:
        (JSC::encode):

113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
2013-07-16  Oliver Hunt <oliver@apple.com>

        Merge dfgFourthTier r149301

    2013-04-28  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: ASSERT that commonly used not-thread-safe methods in the runtime are not being called during compilation
        https://bugs.webkit.org/show_bug.cgi?id=115297

        Reviewed by Geoffrey Garen.
        
        Put in assertions that we're not doing bad things in compilation threads. Also
        factored compilation into compile+link so that even though we don't yet have
        concurrent compilation, we can be explicit about which parts of DFG work are
        meant to be concurrent, and which aren't.
        
        Also fix a handful of bugs found by these assertions.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/ResolveGlobalStatus.cpp:
        (JSC::computeForStructure):
        * bytecode/Watchpoint.cpp:
        (JSC::WatchpointSet::add):
        (JSC::InlineWatchpointSet::inflateSlow):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        * dfg/DFGJITCompiler.cpp:
        (JSC::DFG::JITCompiler::~JITCompiler):
        (DFG):
        (JSC::DFG::JITCompiler::compileBody):
        (JSC::DFG::JITCompiler::compile):
        (JSC::DFG::JITCompiler::link):
        (JSC::DFG::JITCompiler::compileFunction):
        (JSC::DFG::JITCompiler::linkFunction):
        * dfg/DFGJITCompiler.h:
        (JITCompiler):
        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * ftl/FTLCompile.h:
        (FTL):
        * ftl/FTLLink.cpp: Added.
        (FTL):
        (JSC::FTL::compileEntry):
        (JSC::FTL::link):
        * ftl/FTLLink.h: Added.
        (FTL):
        * ftl/FTLState.cpp:
        (JSC::FTL::State::State):
        * ftl/FTLState.h:
        (FTL):
        (State):
        * runtime/Structure.cpp:
        (JSC::Structure::get):
        (JSC::Structure::prototypeChainMayInterceptStoreTo):
        * runtime/Structure.h:
        (JSC::Structure::materializePropertyMapIfNecessary):
        * runtime/StructureInlines.h:
        (JSC::Structure::get):

172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
2013-04-27  Filip Pizlo  <fpizlo@apple.com>

        FTL should support double variables
        https://bugs.webkit.org/show_bug.cgi?id=113624

        Reviewed by Geoffrey Garen.
        
        Made all of the operations that the FTL already supports, also support doubles.
        OSR exit already basically had everything it needed, so no changes there. This
        mostly just glues together bits of DFG IR to LLVM IR, in a straight-forward way.

        * ftl/FTLAbbreviations.h:
        (FTL):
        (JSC::FTL::doubleType):
        (JSC::FTL::constReal):
        (JSC::FTL::buildPhi):
        (JSC::FTL::addIncoming):
        (JSC::FTL::buildFAdd):
        (JSC::FTL::buildFSub):
        (JSC::FTL::buildFMul):
        (JSC::FTL::buildFNeg):
        (JSC::FTL::buildSIToFP):
        (JSC::FTL::buildUIToFP):
        (JSC::FTL::buildBitCast):
        (JSC::FTL::buildFCmp):
        * ftl/FTLCapabilities.cpp:
        (JSC::FTL::canCompile):
        * ftl/FTLCommonValues.cpp:
        (JSC::FTL::CommonValues::CommonValues):
        * ftl/FTLCommonValues.h:
        (CommonValues):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::lower):
        (JSC::FTL::LowerDFGToLLVM::compileGetLocal):
        (JSC::FTL::LowerDFGToLLVM::compileSetLocal):
        (JSC::FTL::LowerDFGToLLVM::compileAdd):
        (JSC::FTL::LowerDFGToLLVM::compileArithSub):
        (JSC::FTL::LowerDFGToLLVM::compileArithMul):
        (JSC::FTL::LowerDFGToLLVM::compileArithNegate):
        (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber):
        (JSC::FTL::LowerDFGToLLVM::compileGetByVal):
        (JSC::FTL::LowerDFGToLLVM::compileCompareEq):
        (JSC::FTL::LowerDFGToLLVM::compileCompareLess):
        (JSC::FTL::LowerDFGToLLVM::lowDouble):
        (LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::lowJSValue):
        (JSC::FTL::LowerDFGToLLVM::isCellOrMisc):
        (JSC::FTL::LowerDFGToLLVM::unboxDouble):
        (JSC::FTL::LowerDFGToLLVM::boxDouble):
        (JSC::FTL::LowerDFGToLLVM::speculate):
        (JSC::FTL::LowerDFGToLLVM::speculateNumber):
        (JSC::FTL::LowerDFGToLLVM::speculateRealNumber):
        (JSC::FTL::LowerDFGToLLVM::appendOSRExit):
        (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode):
        * ftl/FTLOutput.h:
        (JSC::FTL::Output::constDouble):
        (Output):
        (JSC::FTL::Output::phi):
        (JSC::FTL::Output::doubleAdd):
        (JSC::FTL::Output::doubleSub):
        (JSC::FTL::Output::doubleMul):
        (JSC::FTL::Output::doubleNeg):
        (JSC::FTL::Output::intToFP):
        (JSC::FTL::Output::intToDouble):
        (JSC::FTL::Output::unsignedToFP):
        (JSC::FTL::Output::unsignedToDouble):
        (JSC::FTL::Output::bitCast):
        (JSC::FTL::Output::loadDouble):
        (JSC::FTL::Output::storeDouble):
        (JSC::FTL::Output::doubleEqual):
        (JSC::FTL::Output::doubleNotEqualOrUnordered):
        (JSC::FTL::Output::doubleLessThan):
        (JSC::FTL::Output::doubleLessThanOrEqual):
        (JSC::FTL::Output::doubleGreaterThan):
        (JSC::FTL::Output::doubleGreaterThanOrEqual):
        (JSC::FTL::Output::doubleEqualOrUnordered):
        (JSC::FTL::Output::doubleNotEqual):
        (JSC::FTL::Output::doubleLessThanOrUnordered):
        (JSC::FTL::Output::doubleLessThanOrEqualOrUnordered):
        (JSC::FTL::Output::doubleGreaterThanOrUnordered):
        (JSC::FTL::Output::doubleGreaterThanOrEqualOrUnordered):
        (JSC::FTL::Output::testIsZero64):

256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
2013-04-27  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: SymbolTable should be thread-safe
        https://bugs.webkit.org/show_bug.cgi?id=115301

        Reviewed by Geoffrey Garen.
        
        Makes SymbolTable thread-safe. Relies on SymbolTableEntry already being immutable,
        other than the WatchpointSet; but the WatchpointSet already has a righteous
        concurrency protocol. So, this patch just protects the SymbolTable's HashMap.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::nameForRegister):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::addVar):
        * runtime/Executable.cpp:
        (JSC::ProgramExecutable::addGlobalVar):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::getOwnNonIndexPropertyNames):
        (JSC::JSActivation::symbolTablePutWithAttributes):
        * runtime/JSSymbolTableObject.cpp:
        (JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):
        * runtime/JSSymbolTableObject.h:
        (JSC::symbolTableGet):
        (JSC::symbolTablePut):
        (JSC::symbolTablePutWithAttributes):
        * runtime/SymbolTable.cpp:
        (JSC::SymbolTable::SymbolTable):
        (JSC::SymbolTable::~SymbolTable):
        * runtime/SymbolTable.h:
        (JSC::SymbolTable::find):
        (JSC::SymbolTable::get):
        (JSC::SymbolTable::inlineGet):
        (JSC::SymbolTable::begin):
        (JSC::SymbolTable::end):
        (JSC::SymbolTable::size):
        (JSC::SymbolTable::add):
        (JSC::SymbolTable::set):
        (JSC::SymbolTable::contains):

296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
2013-04-26  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: WatchpointSet should make racy uses easier to reason about
        https://bugs.webkit.org/show_bug.cgi?id=115299

        Reviewed by Anders Carlsson.
        
        The compiler often does things like:

        1c) Observe something that would imply that a WatchpointSet ought to be invalid

        2c) Check that it is invalid

        The main thread often does things like:

        1m) Fire the watchpoint set

        2m) Do some other thing that would cause the compiler to assume that the WatchpointSet
        ought to be invalid

        An example is structure transitions, where (1c) is the compiler noticing that a
        put_by_id inline cache is in a transition state, with the source structure being S;
        (2c) is the compiler asserting that S's watchpoint set is invalid; (1m) is the main
        thread firing S's watchpoint set before it does the first transition away from S; and
        (2m) is the main thread caching the put_by_id transition away from S.

        This is totally fine, except that (1c) and (2c), and (1m) and (2m) could be reordered.
        Probably, in most cases, this ought to do enough things that the main thread probably
        already has some fencing. But the compiler thread definitely doesn't have fencing. In
        any case, we should play it safe and just have additional fencing in all of the
        relevant places.

        We already have some idioms to put load-load and store-store fences in the right
        places. But this change just makes WatchpointSet take care of this for us, thus
        reducing the chances of us getting this wrong.

        * bytecode/Watchpoint.cpp:
        (JSC::WatchpointSet::notifyWriteSlow):
        * bytecode/Watchpoint.h:
        (WatchpointSet):
        (JSC::WatchpointSet::isStillValid):
        (JSC::WatchpointSet::hasBeenInvalidated):
        (JSC::InlineWatchpointSet::hasBeenInvalidated):
        (JSC::InlineWatchpointSet::notifyWrite):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGDesiredWatchpoints.h:
        (JSC::DFG::GenericDesiredWatchpoints::shouldAssumeMixedState):

345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
2013-07-16  Oliver Hunt <oliver@apple.com>

        Merge dfgFourthTier r149233

    2013-04-26  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: CFA should defend against results seeming inconsistent due to a watchpoint firing during compilation
        https://bugs.webkit.org/show_bug.cgi?id=115083

        Reviewed by Geoffrey Garen.
        
        This ruggedizes our racyness with respect to watchpoints. We want to be able to assert,
        in some places, that a watchpoint-based optimization has only occurred if the
        watchpoint set was still valid. But currently we *can* soundly do watchpoint-based
        optimizations even for invalid watchpoints, so long as we recorded in the IR that we
        had done so; this will then lead to the code being insta-jettisoned after compilation
        completes. Obviously, we don't want this to happen often - but we do want to allow it
        precisely in the case of watchpoint races.
        
        This adds the ability to assert that we hadn't over-watchpointed ourselves, with and
        exemption for races.

        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::executeEffects):
        * dfg/DFGAbstractValue.cpp:
        (JSC::DFG::AbstractValue::setFuturePossibleStructure):
        (JSC::DFG::AbstractValue::filterFuturePossibleStructure):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::addStructureTransitionCheck):
        (JSC::DFG::ByteCodeParser::parseResolveOperations):
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGConstantFoldingPhase.cpp:
        (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck):
        * dfg/DFGDesiredWatchpoints.h:
        (GenericDesiredWatchpoints):
        (JSC::DFG::GenericDesiredWatchpoints::isStillValid):
        (JSC::DFG::GenericDesiredWatchpoints::shouldAssumeMixedState):
        (JSC::DFG::GenericDesiredWatchpoints::isValidOrMixed):
        (JSC::DFG::DesiredWatchpoints::isStillValid):
        (JSC::DFG::DesiredWatchpoints::shouldAssumeMixedState):
        (JSC::DFG::DesiredWatchpoints::isValidOrMixed):
        (DesiredWatchpoints):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::canOptimizeStringObjectAccess):
        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::masqueradesAsUndefinedWatchpointIsStillValid):
        (Graph):
        * dfg/DFGJITCompiler.cpp:
        (JSC::DFG::JITCompiler::link):
        (JSC::DFG::JITCompiler::compile):
        (JSC::DFG::JITCompiler::compileFunction):
        * dfg/DFGJITCompiler.h:
        (JSC::DFG::JITCompiler::addLazily):
        (JITCompiler):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
        * dfg/DFGSpeculativeJIT.h:
        (SpeculativeJIT):
        (JSC::DFG::SpeculativeJIT::masqueradesAsUndefinedWatchpointIsStillValid):
        (JSC::DFG::SpeculativeJIT::speculationWatchpointForMasqueradesAsUndefined):
        (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
        (JSC::DFG::SpeculativeJIT::compileObjectEquality):
        (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
        (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
        (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
        (JSC::DFG::SpeculativeJIT::compileObjectEquality):
        (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
        (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
        (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
        (JSC::DFG::SpeculativeJIT::compile):
        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * ftl/FTLState.h:
        (State):

429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
2013-04-23  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: AbstractValue methods that deal with watchpoints should have access to Graph, so that in debug mode, Graph can track the history of watchpoint states and detect races
        https://bugs.webkit.org/show_bug.cgi?id=115084

        Reviewed by Geoffrey Garen.
        
        The idea is that as part of https://bugs.webkit.org/show_bug.cgi?id=115083, I'll have
        Graph record the initial state of a watchpoint at the time that we decide to take
        advantage of it; then I will use this to disable any watchpoint-related assertions
        in debug mode. Note that this "watchpoint cache" will only be maintained in debug
        mode, so there will be no release performance implications. But to do this, I need to
        ensure that all of the places that reason about watchpoints have access to Graph.
        For example, I'll want AbstractValue::setFuturePossibleStructure to record the state
        of the watchpoint in Graph so that subsequent assertions can check if the watchpoint's
        state had changed since that decision was made.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::initialize):
        (JSC::DFG::AbstractState::executeEffects):
        (JSC::DFG::AbstractState::mergeStateAtTail):
        * dfg/DFGAbstractState.h:
        (JSC::DFG::AbstractState::trySetConstant):
        * dfg/DFGAbstractValue.cpp: Added.
        (DFG):
        (JSC::DFG::AbstractValue::setMostSpecific):
        (JSC::DFG::AbstractValue::set):
        (JSC::DFG::AbstractValue::filter):
        (JSC::DFG::AbstractValue::setFuturePossibleStructure):
        (JSC::DFG::AbstractValue::filterFuturePossibleStructure):
        (JSC::DFG::AbstractValue::dump):
        * dfg/DFGAbstractValue.h:
        (DFG):
        (AbstractValue):
        (JSC::DFG::AbstractValue::setType):
        (JSC::DFG::AbstractValue::filterByValue):

467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
2013-07-16  Oliver Hunt <oliver@apple.com>

        Merge dfgFourthTier r148936

    2013-04-22  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: Create an equivalent of Structure::get() that can work from a compilation thread
        https://bugs.webkit.org/show_bug.cgi?id=114987

        Reviewed by Geoffrey Garen.
        
        This completes the work started by r148570. That patch made it possible to do
        Structure::get() without modifying Structure. This patch takes this further, and
        makes this thread-safe (for non-uncacheable-dictionaries) via
        Structure::getConcurrently(). This method not only doesn't modify Structure, but
        also ensures that any concurrent attempts to add to, remove from, or steal the
        table from that structure doesn't mess up the result of the call. The call may
        return invalidOffset even if a property is *just* about to be added, but it will
        never do the reverse: if it returns a property then you can be sure that the
        structure really does have that property and always will have it.

        * bytecode/GetByIdStatus.cpp:
        (JSC::GetByIdStatus::computeFromLLInt):
        (JSC::GetByIdStatus::computeForChain):
        (JSC::GetByIdStatus::computeFor):
        * bytecode/PutByIdStatus.cpp:
        (JSC::PutByIdStatus::computeFromLLInt):
        (JSC::PutByIdStatus::computeFor):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::isStringPrototypeMethodSane):
        * runtime/PropertyMapHashTable.h:
        (PropertyTable):
        (JSC::PropertyTable::findConcurrently):
        (JSC):
        (JSC::PropertyTable::add):
        (JSC::PropertyTable::remove):
        (JSC::PropertyTable::reinsert):
        (JSC::PropertyTable::rehash):
        * runtime/PropertyTable.cpp:
        (JSC::PropertyTable::PropertyTable):
        * runtime/Structure.cpp:
        (JSC::Structure::findStructuresAndMapForMaterialization):
        (JSC::Structure::getConcurrently):
        * runtime/Structure.h:
        (Structure):
        * runtime/StructureInlines.h:
        (JSC::Structure::getConcurrently):

515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
2013-07-16  Oliver Hunt <oliver@apple.com>

        Merge dfgFourthTier r148850

    2013-04-21  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: WebKit's build system should relink JavaScriptCore if LLVM's libraries changed but its headers didn't
        https://bugs.webkit.org/show_bug.cgi?id=114926

        Reviewed by Geoffrey Garen.
        
        Use a phony file that includes a phony header to force JavaScriptCore to be relinked
        if necessary. The external LLVM-importing scripts will touch the header if the libraries
        are known to have changed.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * ftl/WebKitLLVMLibraryAnchor.cpp: Added.

533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
2013-07-16  Oliver Hunt <oliver@apple.com>

        Merge dfgFourthTier r148836

    2013-04-21  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: It should be possible to query WatchpointSets, and add Watchpoints, even if the compiler is running in another thread
        https://bugs.webkit.org/show_bug.cgi?id=114909

        Reviewed by Oliver Hunt.
        
        The idea here is that a concurrent compiler will use watchpoint sets as follows:
        
        During concurrent compilation: It will create Watchpoints, and query WatchpointSets only
        for the purpose of profiling. That is, it will use decide whether it is profitable to
        compile the code "as if" the watchpoint sets are valid.
        
        During synchronous linking: By "linking" I don't necessarily mean the LinkBuffer stuff,
        but just the very bitter end of compilation where we make the JIT code callable. This
        can happen after LinkBuffer stuff. Anyway, this will have to happen synchronously, and
        at that point we can (a) check that all WatchpointSets that we assumed were valid are
        still valid and (b) if they are then we add the watchpoints to those sets. If any of the
        sets are invalid, we give up on this compilation and try again later.
        
        The querying of WatchpointSets is engineered to say that the set is still valid if it
        is so *right now*, but this is done in a racy way and so it may say so spuriously: we
        may, with hopefully low probability, have a set that says it is valid even though it was
        just invalidated. The goal is only to ensure that (i) a set never claims to be invalid
        if it is actually valid, (ii) a set doesn't claim to be valid if it was invalidated
        before compilation even began, and (iii) querying the validity of a set doesn't cause us
        to crash.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/Watchpoint.cpp:
        (JSC::InlineWatchpointSet::inflateSlow):
        * bytecode/Watchpoint.h:
        (WatchpointSet):
        (InlineWatchpointSet):
        (JSC::InlineWatchpointSet::hasBeenInvalidated):
        (JSC::InlineWatchpointSet::isThin):
        (JSC::InlineWatchpointSet::isFat):
        (JSC::InlineWatchpointSet::fat):
        * dfg/DFGDesiredWatchpoints.cpp: Added.
        (DFG):
        (JSC::DFG::DesiredWatchpoints::DesiredWatchpoints):
        (JSC::DFG::DesiredWatchpoints::~DesiredWatchpoints):
        (JSC::DFG::DesiredWatchpoints::addLazily):
        (JSC::DFG::DesiredWatchpoints::reallyAdd):
        (JSC::DFG::DesiredWatchpoints::areStillValid):
        * dfg/DFGDesiredWatchpoints.h: Added.
        (DFG):
        (JSC::DFG::WatchpointForGenericWatchpointSet::WatchpointForGenericWatchpointSet):
        (WatchpointForGenericWatchpointSet):
        (GenericDesiredWatchpoints):
        (JSC::DFG::GenericDesiredWatchpoints::GenericDesiredWatchpoints):
        (JSC::DFG::GenericDesiredWatchpoints::addLazily):
        (JSC::DFG::GenericDesiredWatchpoints::reallyAdd):
        (JSC::DFG::GenericDesiredWatchpoints::areStillValid):
        (DesiredWatchpoints):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        * dfg/DFGJITCompiler.cpp:
        (JSC::DFG::JITCompiler::link):
        (JSC::DFG::JITCompiler::compile):
        (JSC::DFG::JITCompiler::compileFunction):
        * dfg/DFGJITCompiler.h:
        (JSC::DFG::JITCompiler::addLazily):
        (JITCompiler):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
        (JSC::DFG::SpeculativeJIT::compileObjectEquality):
        (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
        (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
        (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
        (JSC::DFG::SpeculativeJIT::compileObjectEquality):
        (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
        (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
        (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
        (JSC::DFG::SpeculativeJIT::compile):
        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * ftl/FTLCompile.h:
        (FTL):
        * ftl/FTLState.h:
        (State):
        * runtime/JSFunction.h:
        (JSFunction):
        (JSC::JSFunction::allocationProfileWatchpointSet):
        * runtime/Structure.h:
        (Structure):
        (JSC::Structure::transitionWatchpointSet):

2013-07-16  Oliver Hunt <oliver@apple.com>

        Merge dfgFourthTier r148804

    2013-04-20  Filip Pizlo  <fpizlo@apple.com>
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791

        fourthTier: value profiles and array profiles should be thread-safe enough to be accessible in a concurrent compilation thread
        https://bugs.webkit.org/show_bug.cgi?id=114906

        Reviewed by Oliver Hunt.
        
        This introduces thread safety to value profiles, array profiles, and
        array allocation profiles.
        
        We already have three separate operations that happen on profiles:
        (1) writing, which the JIT, LLInt, and OSR exit do; (2) updating,
        which happens during GC, from OSR entry slow-paths, and in the DFG;
        and (3) reading, which happens in the DFG. For example, the JIT/LLInt
        and OSR exit write to ValueProfile::m_buckets, which gets synthesized
        into ValueProfile::m_prediction (and other fields) during update, and
        the latter gets read by the DFG. Note that (2) must also happen in
        the DFG since only the DFG knows which code blocks it will inline,
        and those blocks' profiles may not have otherwise been updated via
        any other mechanism.
        
        I refer to these three operations as writing, updating, and reading.
        
        Consequently, both profile updating and profile reading may happen
        asynchronously, if the JIT is asynchronous.
        
        The locking protocol for profiles works as follows:
        
        - Writing does not require locking, but is only allowed on the main
          thread. We require that these fields can be stored atomically by
          the profiling code, even without locks. For value profiles, this
          only works on 64-bit platforms, currently. For array profiles,
          which consist of multiple separate fields, this means that an
          asynchronous update of the profile may see slight inconsistencies
          (like a structure that doesn't quite match the array modes bits),
          but these should be harmless: at worst, the DFG will specialize
          too much and we'll have OSR exits.
        
        - Updating a value profile requires holding a lock, but must assume
          that the fields written by the profiling code in JIT/LLInt may
          be written to without locking.
        
        - Reading a value profile requires holding a lock.
        
        The one major exception to these rules is the ArrayAllocationProfile,
        which requires no locking. We do this because it's used so often and
        in places where we don't necessarily have access to the owning
        CodeBlock, so if we did want it to be locked it would have to have
        its own lock. Also, I believe that it is sound to just make this
        profile racy and not worry about locking at all. All that was needed
        were some changes to ensure that we explicitly read some raced-over
        fields only once.

        Two additional interesting things in this change:
        
        - To make it easy to see which profile methods require locking, they
          take a const CodeBlockLocker& as an argument. I saw this idiom for
          identifying which methods require which locks to be held being used
          in LLVM, and I quite like it.
        
        - Lazy operand value profiles, which are created lazily and at any
          time, require the CodeBlockLock to be held when they are being
          created. Writes to them are lockless and main-thread-only, but as
          with other profiles, updates and reads require locking.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/ArrayAllocationProfile.cpp:
        (JSC::ArrayAllocationProfile::updateIndexingType):
        * bytecode/ArrayAllocationProfile.h:
        (JSC::ArrayAllocationProfile::selectIndexingType):
        * bytecode/ArrayProfile.cpp:
        (JSC::ArrayProfile::computeUpdatedPrediction):
        (JSC::ArrayProfile::briefDescription):
        * bytecode/ArrayProfile.h:
        (ArrayProfile):
        (JSC::ArrayProfile::expectedStructure):
        (JSC::ArrayProfile::structureIsPolymorphic):
        (JSC::ArrayProfile::hasDefiniteStructure):
        (JSC::ArrayProfile::observedArrayModes):
        (JSC::ArrayProfile::mayInterceptIndexedAccesses):
        (JSC::ArrayProfile::mayStoreToHole):
        (JSC::ArrayProfile::outOfBounds):
        (JSC::ArrayProfile::usesOriginalArrayStructures):
        * bytecode/CallLinkStatus.cpp:
        (JSC::CallLinkStatus::computeFor):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dumpValueProfiling):
        (JSC::CodeBlock::dumpArrayProfiling):
        (JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
        (JSC::CodeBlock::updateAllArrayPredictions):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::valueProfilePredictionForBytecodeOffset):
        (JSC::CodeBlock::updateAllPredictionsAndCheckIfShouldOptimizeNow):
        (CodeBlock):
        * bytecode/CodeBlockLock.h: Added.
        (JSC):
        * bytecode/GetByIdStatus.cpp:
        (JSC::GetByIdStatus::computeFor):
        * bytecode/LazyOperandValueProfile.cpp:
        (JSC::CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions):
        (JSC::CompressedLazyOperandValueProfileHolder::add):
        (JSC::LazyOperandValueProfileParser::LazyOperandValueProfileParser):
        (JSC::LazyOperandValueProfileParser::~LazyOperandValueProfileParser):
        (JSC):
        (JSC::LazyOperandValueProfileParser::initialize):
        (JSC::LazyOperandValueProfileParser::prediction):
        * bytecode/LazyOperandValueProfile.h:
        (CompressedLazyOperandValueProfileHolder):
        (LazyOperandValueProfileParser):
        * bytecode/MethodOfGettingAValueProfile.cpp:
        (JSC::MethodOfGettingAValueProfile::getSpecFailBucket):
        * bytecode/PutByIdStatus.cpp:
        (JSC::PutByIdStatus::computeFor):
        * bytecode/ResolveGlobalStatus.cpp:
        (JSC::ResolveGlobalStatus::computeFor):
        * bytecode/ValueProfile.h:
        (JSC::ValueProfileBase::briefDescription):
        (ValueProfileBase):
        (JSC::ValueProfileBase::computeUpdatedPrediction):
        * dfg/DFGArrayMode.cpp:
        (JSC::DFG::ArrayMode::fromObserved):
        * dfg/DFGArrayMode.h:
        (ArrayMode):
        (JSC::DFG::ArrayMode::withProfile):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
        (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
        (JSC::DFG::ByteCodeParser::getArrayMode):
        (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks):
        (JSC::DFG::ByteCodeParser::parseResolveOperations):
        (JSC::DFG::ByteCodeParser::parseBlock):
        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        * dfg/DFGOSRExitPreparation.cpp:
        (JSC::DFG::prepareCodeOriginForOSRExit):
        * dfg/DFGPredictionInjectionPhase.cpp:
        (JSC::DFG::PredictionInjectionPhase::run):
        * jit/JITInlines.h:
        (JSC::JIT::chooseArrayMode):
        * jit/JITStubs.cpp:
        (JSC::tryCachePutByID):
        (JSC::tryCacheGetByID):
        (JSC::DEFINE_STUB_FUNCTION):
        (JSC::lazyLinkFor):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        (JSC::LLInt::setUpCall):
        * profiler/ProfilerBytecodeSequence.cpp:
        (JSC::Profiler::BytecodeSequence::BytecodeSequence):
        * runtime/JSScope.cpp:
        (JSC::JSScope::resolveContainingScopeInternal):
        (JSC::JSScope::resolvePut):

792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
2013-04-17  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: all inline caches should thread-safe enough to allow a concurrent compilation thread to read them safely
        https://bugs.webkit.org/show_bug.cgi?id=114762

        Reviewed by Mark Hahnenberg.
        
        For most inline caches this is easy: the inline cache has a clean temporal
        separation between doing the requested action (which may take an unbounded
        amount of time, may recurse, and may do arbitrary things) and recording the
        relevant information in the cache. So, we just put locks around the
        recording bit. That part is always O(1) and does not recurse. The lock we
        use is per-CodeBlock to achieve a good balance between locking granularity
        and low space overhead. So a concurrent compilation thread will only block
        if an inline cache ping-pongs in the code block being compiled (or inlined)
        and never when other inline caches do things.
        
        For resolve operations, it's a bit tricky. The global resolve bit works
        like any other IC in that it has the clean temporal separation. But the
        operations vector itself doesn't have this separation, since we will be
        filling it in tandem with actions that may take a long time. This patch
        gets around this by having a m_ready bit in the ResolveOperations and
        PutToBaseOperation. This is set while holding the CodeBlock's lock. If the
        DFG observes the m_ready bit not set (while holding the lock) then it
        conservatively assumes that the resolve hasn't happened yet and just
        plants a ForceOSRExit.

        * bytecode/CallLinkStatus.cpp:
        (JSC::CallLinkStatus::computeFor):
        * bytecode/CodeBlock.h:
        (CodeBlock):
        * bytecode/GetByIdStatus.cpp:
        (JSC::GetByIdStatus::computeFor):
        * bytecode/PutByIdStatus.cpp:
        (JSC::PutByIdStatus::computeFor):
        * bytecode/ResolveGlobalStatus.cpp:
        (JSC::ResolveGlobalStatus::computeFor):
        * bytecode/ResolveOperation.h:
        (JSC::ResolveOperations::ResolveOperations):
        (ResolveOperations):
        (JSC::PutToBaseOperation::PutToBaseOperation):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::parseResolveOperations):
        (JSC::DFG::ByteCodeParser::parseBlock):
        * jit/JITStubs.cpp:
        (JSC::tryCachePutByID):
        (JSC::tryCacheGetByID):
        (JSC::DEFINE_STUB_FUNCTION):
        (JSC::lazyLinkFor):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        (JSC::LLInt::setUpCall):
        * runtime/JSScope.cpp:
        (JSC::JSScope::resolveContainingScopeInternal):
        (JSC::JSScope::resolveContainingScope):
        (JSC::JSScope::resolvePut):

849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2013-04-16  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: DFG should be able to query Structure without modifying it
        https://bugs.webkit.org/show_bug.cgi?id=114708

        Reviewed by Oliver Hunt.
        
        This is work towards allowing the DFG, and FTL, to run on a separate thread.
        The idea is that the most evil thing that the DFG does that has thread-safety
        issues is fiddling with Structures by calling Structure::get(). This can lead
        to rematerialization of property tables, which is definitely not thread-safe
        due to how StringImpl works. So, this patch completely side-steps the problem
        by creating a new version of Structure::get, called
        Structure::getWithoutMaterializing, which may choose to do an O(n) search if
        necessary to avoid materialization. I believe this should be fine - the DFG
        does't call into these code path often enough for this to matter, and most of
        the time, the Structure that we call this on will already have a property
        table because some inline cache would have already called ::get() on that
        Structure.
        
        Also cleaned up the materialization logic: we can stop the search as soon as
        we find any Structure with a property table rather than searching all the way
        for a pinned one.

        * bytecode/GetByIdStatus.cpp:
        (JSC::GetByIdStatus::computeFor):
        * bytecode/PutByIdStatus.cpp:
        (JSC::PutByIdStatus::computeFromLLInt):
        (JSC::PutByIdStatus::computeFor):
        * runtime/Structure.cpp:
        (JSC::Structure::findStructuresAndMapForMaterialization):
        (JSC::Structure::materializePropertyMap):
        (JSC::Structure::getWithoutMaterializing):
        (JSC):
        * runtime/Structure.h:
        (Structure):
        * runtime/StructureInlines.h:
        (JSC::Structure::getWithoutMaterializing):
        (JSC):

2013-04-13  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: Fix release build.

        * dfg/DFGOSRExitCompilerCommon.cpp:
        * ftl/FTLExitValue.cpp:
        * ftl/FTLOSRExitCompiler.cpp:

2013-04-13  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL should have OSR exit
        https://bugs.webkit.org/show_bug.cgi?id=113623

        Reviewed by Oliver Hunt.
        
        This implements OSR exit, and hilariously, it actually works. The idea is to have
        LLVM call a no-return function on the off-ramp, passing it everything we know about
        bytecode state that isn't already flushed to the call frame. Our own JIT takes care
        of the rest.
        
        We can now run all of SunSpider, V8, and Kraken with the FTL enabled.
        
        The details are described in FTLOSRExit.h.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * assembler/AbstractMacroAssembler.h:
        (Address):
        (JSC::AbstractMacroAssembler::Address::withOffset):
        * assembler/LinkBuffer.h:
        (JSC::LinkBuffer::offsetOf):
        (LinkBuffer):
        * assembler/MacroAssemblerX86Common.h:
        * assembler/RepatchBuffer.h:
        (JSC::RepatchBuffer::RepatchBuffer):
        (JSC::RepatchBuffer::~RepatchBuffer):
        (RepatchBuffer):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::tallyFrequentExitSites):
        * bytecode/Operands.h:
        (Operands):
        (JSC):
        (JSC::::dump):
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::initialize):
        * dfg/DFGGPRInfo.h:
        (DFG):
        (GPRInfo):
        * dfg/DFGMinifiedNode.h:
        (JSC::DFG::belongsInMinifiedGraph):
        * dfg/DFGNodeType.h:
        (JSC::DFG::needsOSRBackwardRewiring):
        (DFG):
        (JSC::DFG::needsOSRForwardRewiring):
        * dfg/DFGOSRExit.cpp:
        (JSC::DFG::OSRExit::OSRExit):
        (DFG):
        (JSC::DFG::OSRExit::convertToForward):
        * dfg/DFGOSRExit.h:
        (OSRExit):
        * dfg/DFGOSRExitBase.cpp: Added.
        (DFG):
        (JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSiteSlow):
        (JSC::DFG::OSRExitBase::doSearchForForwardConversion):
        * dfg/DFGOSRExitBase.h: Added.
        (DFG):
        (JSC::DFG::OSRExitBase::OSRExitBase):
        (OSRExitBase):
        (JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSite):
        * dfg/DFGOSRExitCompiler.cpp:
        * dfg/DFGOSRExitCompiler64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOSRExitCompilerCommon.cpp:
        (JSC::DFG::handleExitCounts):
        (JSC::DFG::reifyInlinedCallFrames):
        (JSC::DFG::adjustAndJumpToTarget):
        * dfg/DFGOSRExitCompilerCommon.h:
        (DFG):
        * dfg/DFGOSRExitPreparation.cpp: Added.
        (DFG):
        (JSC::DFG::prepareCodeOriginForOSRExit):
        * dfg/DFGOSRExitPreparation.h: Added.
        (DFG):
        * dfg/DFGOperations.cpp:
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
        * dfg/DFGValueSource.h:
        (JSC::DFG::ValueSource::forSpeculation):
        * dfg/DFGVariableEventStream.cpp:
        (JSC::DFG::VariableEventStream::reconstruct):
        * ftl/FTLAbbreviations.h:
        (JSC::FTL::functionType):
        (FTL):
        (JSC::FTL::typeOf):
        (JSC::FTL::appendBasicBlock):
        (JSC::FTL::insertBasicBlock):
        (JSC::FTL::buildCall):
        (JSC::FTL::setTailCall):
        * ftl/FTLCArgumentGetter.cpp: Added.
        (FTL):
        (JSC::FTL::CArgumentGetter::loadNextAndBox):
        * ftl/FTLCArgumentGetter.h: Added.
        (FTL):
        (JSC::FTL::isArgumentRegister):
        (CArgumentGetter):
        (JSC::FTL::CArgumentGetter::CArgumentGetter):
        (JSC::FTL::CArgumentGetter::loadNext8):
        (JSC::FTL::CArgumentGetter::loadNext32):
        (JSC::FTL::CArgumentGetter::loadNext64):
        (JSC::FTL::CArgumentGetter::loadNextPtr):
        (JSC::FTL::CArgumentGetter::loadNextDouble):
        (JSC::FTL::CArgumentGetter::nextAddress):
        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * ftl/FTLExitArgument.cpp: Added.
        (FTL):
        (JSC::FTL::ExitArgument::dump):
        * ftl/FTLExitArgument.h: Added.
        (FTL):
        (ExitArgumentRepresentation):
        (ExitArgument):
        (JSC::FTL::ExitArgument::ExitArgument):
        (JSC::FTL::ExitArgument::operator!):
        (JSC::FTL::ExitArgument::format):
        (JSC::FTL::ExitArgument::argument):
        (JSC::FTL::ExitArgument::withFormat):
        (JSC::FTL::ExitArgument::representation):
        * ftl/FTLExitArgumentForOperand.cpp: Added.
        (FTL):
        (JSC::FTL::ExitArgumentForOperand::dump):
        * ftl/FTLExitArgumentForOperand.h: Added.
        (FTL):
        (ExitArgumentForOperand):
        (JSC::FTL::ExitArgumentForOperand::ExitArgumentForOperand):
        (JSC::FTL::ExitArgumentForOperand::operator!):
        (JSC::FTL::ExitArgumentForOperand::exitArgument):
        (JSC::FTL::ExitArgumentForOperand::operand):
        (JSC::FTL::lesserArgumentIndex):
        * ftl/FTLExitArgumentList.h: Added.
        (FTL):
        * ftl/FTLExitThunkGenerator.cpp: Added.
        (FTL):
        (JSC::FTL::ExitThunkGenerator::ExitThunkGenerator):
        (JSC::FTL::ExitThunkGenerator::~ExitThunkGenerator):
        (JSC::FTL::ExitThunkGenerator::emitThunk):
        * ftl/FTLExitThunkGenerator.h: Added.
        (FTL):
        (ExitThunkGenerator):
        (JSC::FTL::ExitThunkGenerator::didThings):
        * ftl/FTLExitValue.cpp: Added.
        (FTL):
        (JSC::FTL::ExitValue::dump):
        * ftl/FTLExitValue.h: Added.
        (FTL):
        (ExitValue):
        (JSC::FTL::ExitValue::ExitValue):
        (JSC::FTL::ExitValue::operator!):
        (JSC::FTL::ExitValue::dead):
        (JSC::FTL::ExitValue::inJSStack):
        (JSC::FTL::ExitValue::inJSStackAsInt32):
        (JSC::FTL::ExitValue::inJSStackAsDouble):
        (JSC::FTL::ExitValue::constant):
        (JSC::FTL::ExitValue::exitArgument):
        (JSC::FTL::ExitValue::kind):
        (JSC::FTL::ExitValue::isDead):
        (JSC::FTL::ExitValue::isInJSStackSomehow):
        (JSC::FTL::ExitValue::isConstant):
        (JSC::FTL::ExitValue::isArgument):
        * ftl/FTLFormattedValue.h:
        (FTL):
        (JSC::FTL::noValue):
        (JSC::FTL::int32Value):
        (JSC::FTL::uInt32Value):
        (JSC::FTL::booleanValue):
        (JSC::FTL::jsValueValue):
        (JSC::FTL::doubleValue):
        * ftl/FTLJITCode.cpp:
        (JSC::FTL::JITCode::initializeExitThunks):
        (FTL):
        (JSC::FTL::JITCode::exitThunks):
        * ftl/FTLJITCode.h:
        (JITCode):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (FTL):
        (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::lower):
        (JSC::FTL::LowerDFGToLLVM::transferAndCheckArguments):
        (JSC::FTL::LowerDFGToLLVM::compileBlock):
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileGetLocal):
        (JSC::FTL::LowerDFGToLLVM::compileSetLocal):
        (LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::compileMovHint):
        (JSC::FTL::LowerDFGToLLVM::compileZombieHint):
        (JSC::FTL::LowerDFGToLLVM::compileMovHintAndCheck):
        (JSC::FTL::LowerDFGToLLVM::compileAdd):
        (JSC::FTL::LowerDFGToLLVM::compileArithSub):
        (JSC::FTL::LowerDFGToLLVM::compileArithMul):
        (JSC::FTL::LowerDFGToLLVM::compileArithNegate):
        (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber):
        (JSC::FTL::LowerDFGToLLVM::compileCheckStructure):
        (JSC::FTL::LowerDFGToLLVM::compileGetByVal):
        (JSC::FTL::LowerDFGToLLVM::speculateBackward):
        (JSC::FTL::LowerDFGToLLVM::speculateForward):
        (JSC::FTL::LowerDFGToLLVM::speculate):
        (JSC::FTL::LowerDFGToLLVM::terminate):
        (JSC::FTL::LowerDFGToLLVM::backwardTypeCheck):
        (JSC::FTL::LowerDFGToLLVM::forwardTypeCheck):
        (JSC::FTL::LowerDFGToLLVM::typeCheck):
        (JSC::FTL::LowerDFGToLLVM::appendTypeCheck):
        (JSC::FTL::LowerDFGToLLVM::lowInt32):
        (JSC::FTL::LowerDFGToLLVM::lowCell):
        (JSC::FTL::LowerDFGToLLVM::lowBoolean):
        (JSC::FTL::LowerDFGToLLVM::speculateObject):
        (JSC::FTL::LowerDFGToLLVM::isLive):
        (JSC::FTL::LowerDFGToLLVM::use):
        (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock):
        (JSC::FTL::LowerDFGToLLVM::appendOSRExit):
        (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode):
        (JSC::FTL::LowerDFGToLLVM::tryToSetConstantExitArgument):
        (JSC::FTL::LowerDFGToLLVM::addExitArgument):
        (JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks):
        (JSC::FTL::LowerDFGToLLVM::observeMovHint):
        * ftl/FTLOSRExit.cpp: Added.
        (FTL):
        (JSC::FTL::OSRExit::OSRExit):
        (JSC::FTL::OSRExit::codeLocationForRepatch):
        (JSC::FTL::OSRExit::convertToForward):
        * ftl/FTLOSRExit.h: Added.
        (FTL):
        (OSRExit):
        * ftl/FTLOSRExitCompilationInfo.h: Added.
        (FTL):
        (JSC::FTL::OSRExitCompilationInfo::OSRExitCompilationInfo):
        (OSRExitCompilationInfo):
        * ftl/FTLOSRExitCompiler.cpp: Added.
        (FTL):
        (JSC::FTL::compileStub):
        (JSC::FTL::compileFTLOSRExit):
        * ftl/FTLOSRExitCompiler.h: Added.
        (FTL):
        * ftl/FTLOutput.h:
        (JSC::FTL::Output::newBlock):
        (JSC::FTL::Output::intToPtr):
        (JSC::FTL::Output::load):
        (JSC::FTL::Output::store):
        (Output):
        (JSC::FTL::Output::call):
        (JSC::FTL::Output::convertToTailCall):
        (FTL):
        * ftl/FTLState.h:
        (State):
        * ftl/FTLThunks.cpp: Added.
        (FTL):
        (JSC::FTL::osrExitGenerationThunkGenerator):
        * ftl/FTLThunks.h: Added.
        (JSC):
        (FTL):
        * ftl/FTLValueFormat.cpp: Added.
        (WTF):
        (WTF::printInternal):
        * ftl/FTLValueFormat.h: Added.
        (FTL):
        (WTF):
        * ftl/FTLValueSource.cpp: Added.
        (FTL):
        (JSC::FTL::ValueSource::dump):
        * ftl/FTLValueSource.h: Added.
        (FTL):
        (ValueSource):
        (JSC::FTL::ValueSource::ValueSource):
        (JSC::FTL::ValueSource::kind):
        (JSC::FTL::ValueSource::operator!):
        (JSC::FTL::ValueSource::node):

2013-04-12  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: switch to using MCJIT and disable frame pointer elimination
        https://bugs.webkit.org/show_bug.cgi?id=114542

        Reviewed by Oliver Hunt and Michael Saboff.

        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * runtime/InitializeThreading.cpp:
        (JSC::initializeThreadingOnce):

2013-04-09  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: DFG should provide utilities for common OSR exit tasks
        https://bugs.webkit.org/show_bug.cgi?id=114306

        Reviewed by Mark Hahnenberg.
        
        Just abstract out some things that the FTL will want to use as well.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        * dfg/DFGOSRExitCompiler.cpp:
        * dfg/DFGOSRExitCompiler.h:
        (OSRExitCompiler):
        * dfg/DFGOSRExitCompiler32_64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOSRExitCompiler64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOSRExitCompilerCommon.cpp: Added.
        (DFG):
        (JSC::DFG::handleExitCounts):
        (JSC::DFG::reifyInlinedCallFrames):
        (JSC::DFG::adjustAndJumpToTarget):
        * dfg/DFGOSRExitCompilerCommon.h: Added.
        (DFG):

2013-04-09  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: DFG should better abstract floating point arguments
        https://bugs.webkit.org/show_bug.cgi?id=114300

        Reviewed by Mark Hahnenberg.

        * dfg/DFGFPRInfo.h:
        (FPRInfo):
        (JSC::DFG::FPRInfo::toArgumentRegister):

2013-04-05  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: DFG should better abstract arguments
        https://bugs.webkit.org/show_bug.cgi?id=114073

        Reviewed by Mark Hahnenberg.

        * dfg/DFGGPRInfo.h:
        (GPRInfo):
        (JSC::DFG::GPRInfo::toArgumentRegister):

2013-04-03  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: put DFG data into a DFG::JITCode, and put common DFG and FTL data into something accessible from both DFG::JITCode and FTL::JITCode
        https://bugs.webkit.org/show_bug.cgi?id=113905

        Reviewed by Geoffrey Garen.
        
        This removes one pointer from CodeBlock.
        
        It also gives us a framework for having JITType-specific data in CodeBlock, by
        putting it into the appropriate JITCode class (either DFG::JITCode or
        FTL::JITCode). And it allows us to have DFG and FTL share some common data,
        via DFG::CommonData, which is stored in both DFG::JITCode and FTL::JITCode and
        always accessible via JITCode::dfgCommon().

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * bytecode/CodeBlock.cpp:
        (JSC):
        (JSC::CodeBlock::dumpBytecode):
        (JSC::CodeBlock::visitAggregate):
        (JSC::CodeBlock::performTracingFixpointIteration):
        (JSC::CodeBlock::finalizeUnconditionally):
        (JSC::CodeBlock::stronglyVisitWeakReferences):
        (JSC::CodeBlock::shrinkToFit):
        (JSC::CodeBlock::tallyFrequentExitSites):
        * bytecode/CodeBlock.h:
        (CodeBlock):
        (JSC::CodeBlock::setJITCode):
        (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan):
        (JSC::DFGCodeBlocks::mark):
        * dfg/DFGAssemblyHelpers.h:
        * dfg/DFGCommonData.cpp: Added.
        (DFG):
        (JSC::DFG::CommonData::notifyCompilingStructureTransition):
        (JSC::DFG::CommonData::shrinkToFit):
        * dfg/DFGCommonData.h: Added.
        (JSC):
        (DFG):
        (JSC::DFG::WeakReferenceTransition::WeakReferenceTransition):
        (WeakReferenceTransition):
        (CommonData):
        (JSC::DFG::CommonData::CommonData):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        (JSC::DFG::tryCompile):
        (JSC::DFG::tryCompileFunction):
        * dfg/DFGDriver.h:
        (DFG):
        (JSC::DFG::tryCompile):
        (JSC::DFG::tryCompileFunction):
        * dfg/DFGGraph.h:
        (Graph):
        * dfg/DFGJITCode.cpp: Added.
        (DFG):
        (JSC::DFG::JITCode::JITCode):
        (JSC::DFG::JITCode::~JITCode):
        (JSC::DFG::JITCode::dfgCommon):
        (JSC::DFG::JITCode::dfg):
        (JSC::DFG::JITCode::shrinkToFit):
        * dfg/DFGJITCode.h: Added.
        (DFG):
        (JITCode):
        (JSC::DFG::JITCode::appendOSREntryData):
        (JSC::DFG::JITCode::osrEntryDataForBytecodeIndex):
        (JSC::DFG::JITCode::appendOSRExit):
        (JSC::DFG::JITCode::lastOSRExit):
        (JSC::DFG::JITCode::appendSpeculationRecovery):
        (JSC::DFG::JITCode::appendWatchpoint):
        * dfg/DFGJITCompiler.cpp:
        (JSC::DFG::JITCompiler::JITCompiler):
        (JSC::DFG::JITCompiler::linkOSRExits):
        (JSC::DFG::JITCompiler::link):
        (JSC::DFG::JITCompiler::compile):
        (JSC::DFG::JITCompiler::compileFunction):
        * dfg/DFGJITCompiler.h:
        (JITCompiler):
        (JSC::DFG::JITCompiler::addWeakReference):
        (JSC::DFG::JITCompiler::noticeOSREntry):
        (JSC::DFG::JITCompiler::jitCode):
        * dfg/DFGOSREntry.cpp:
        (JSC::DFG::prepareOSREntry):
        * dfg/DFGOSRExit.h:
        (OSRExit):
        * dfg/DFGOSRExitCompiler.cpp:
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
        (JSC::DFG::SpeculativeJIT::backwardSpeculationCheck):
        (JSC::DFG::SpeculativeJIT::speculationWatchpoint):
        (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGVariableEventStream.cpp:
        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * ftl/FTLJITCode.cpp:
        (JSC::FTL::JITCode::JITCode):
        (JSC::FTL::JITCode::~JITCode):
        (FTL):
        (JSC::FTL::JITCode::initializeCode):
        (JSC::FTL::JITCode::addressForCall):
        (JSC::FTL::JITCode::executableAddressAtOffset):
        (JSC::FTL::JITCode::dataAddressAtOffset):
        (JSC::FTL::JITCode::offsetOf):
        (JSC::FTL::JITCode::size):
        (JSC::FTL::JITCode::contains):
        (JSC::FTL::JITCode::ftl):
        (JSC::FTL::JITCode::dfgCommon):
        * ftl/FTLJITCode.h:
        (JITCode):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileStructureTransitionWatchpoint):
        (JSC::FTL::LowerDFGToLLVM::compilePutStructure):
        (JSC::FTL::LowerDFGToLLVM::compilePhantomPutStructure):
        (JSC::FTL::LowerDFGToLLVM::addWeakReference):
        (LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::weakPointer):
        * ftl/FTLState.cpp:
        (FTL):
        (JSC::FTL::State::State):
        (JSC::FTL::State::dumpState):
        * ftl/FTLState.h:
        (State):
        * heap/DFGCodeBlocks.cpp:
        (JSC::DFGCodeBlocks::~DFGCodeBlocks):
        (JSC::DFGCodeBlocks::jettison):
        (JSC::DFGCodeBlocks::clearMarks):
        (JSC::DFGCodeBlocks::deleteUnmarkedJettisonedCodeBlocks):
        (JSC::DFGCodeBlocks::traceMarkedCodeBlocks):
        * jit/JITCode.cpp:
        (JSC::JITCode::dfgCommon):
        (JSC):
        (JSC::JITCode::dfg):
        (JSC::JITCode::ftl):
        (JSC::DirectJITCode::DirectJITCode):
        (JSC::DirectJITCode::initializeCodeRef):
        (JSC::DirectJITCode::addressForCall):
        (JSC::DirectJITCode::executableAddressAtOffset):
        (JSC::DirectJITCode::dataAddressAtOffset):
        (JSC::DirectJITCode::offsetOf):
        (JSC::DirectJITCode::size):
        (JSC::DirectJITCode::contains):
        * jit/JITCode.h:
        (DFG):
        (FTL):
        (JSC):
        (JITCode):
        (DirectJITCode):

2013-04-03  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: Include LLVM headers with surrounding #pragmas instead of using my #define
        https://bugs.webkit.org/show_bug.cgi?id=113921

        Reviewed by Oliver Hunt.
        
        The LLVM community wants us to continue including all of LLVM's C++ headers. Change
        to using #pragma's to disable warnings that they cannot handle.

        * ftl/FTLLLVMHeaders.h:

2013-04-03  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: Everyone should know about the FTL
        https://bugs.webkit.org/show_bug.cgi?id=113897

        Reviewed by Mark Hahnenberg.
        
        In order to get OSR exit to work right, we need the distinction between DFG and
        FTL to be clear even after compilation finishes, since they will have subtly
        different OSR stories and likely use different data structures.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::resetStubInternal):
        (JSC::ProgramCodeBlock::compileOptimized):
        (JSC::EvalCodeBlock::compileOptimized):
        (JSC::FunctionCodeBlock::compileOptimized):
        (JSC::CodeBlock::adjustedExitCountThreshold):
        (JSC::CodeBlock::tallyFrequentExitSites):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::setJITCode):
        (JSC::CodeBlock::hasOptimizedReplacement):
        (JSC::ExecState::isInlineCallFrame):
        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * ftl/FTLJITCode.cpp:
        (JSC::FTL::JITCode::JITCode):
        * ftl/FTLState.cpp:
        (JSC::FTL::State::dumpState):
        * heap/DFGCodeBlocks.cpp:
        (JSC::DFGCodeBlocks::jettison):
        * interpreter/Interpreter.cpp:
        (JSC::getLineNumberForCallFrame):
        (JSC::getCallerInfo):
        * jit/JITCode.cpp:
        (WTF::printInternal):
        * jit/JITCode.h:
        (JSC::JITCode::topTierJIT):
        (JSC::JITCode::nextTierJIT):
        (JITCode):
        (JSC::JITCode::isJIT):
        (JSC::JITCode::isLowerTier):
        (JSC::JITCode::isHigherTier):
        (JSC::JITCode::isLowerOrSameTier):
        (JSC::JITCode::isHigherOrSameTier):
        (JSC::JITCode::isOptimizingJIT):
        * jit/JITDriver.h:
        (JSC::jitCompileIfAppropriate):
        (JSC::jitCompileFunctionIfAppropriate):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * runtime/Executable.cpp:
        (JSC::EvalExecutable::compileOptimized):
        (JSC::samplingDescription):
        (JSC::ProgramExecutable::compileOptimized):
        (JSC::FunctionExecutable::compileOptimizedForCall):
        (JSC::FunctionExecutable::compileOptimizedForConstruct):

2013-04-03  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: DFG should abstract out how it does forward exits, and that code should be simplified
        https://bugs.webkit.org/show_bug.cgi?id=113894

        Reviewed by Mark Hahnenberg.
        
        1) We previously had two different ways of convertingToForward, one path for
           where we had a ValueRecovery for the current node and one where we didn't.
           But the paths were doing exactly the same thing except that if you have a
           ValueRecovery, you also find the last applicable mov hint and do some
           extra things. This patch combines the two paths and bases both of them on
           the previous no-ValueRecovery path, which was simpler to begin with.
        
        2) This moves the logic into DFG::OSRExit, which further simplifies the code
           and makes the logic available to the FTL.

        * dfg/DFGOSRExit.cpp:
        (JSC::DFG::OSRExit::convertToForward):
        (DFG):
        * dfg/DFGOSRExit.h:
        (DFG):
        (OSRExit):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):

2013-04-02  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL should have the equivalent of a ValueRecovery
        https://bugs.webkit.org/show_bug.cgi?id=113819

        Reviewed by Mark Hahnenberg.
        
        This adds a way of saying that we have a value, we don't want to say what
        node the value came from, but we know specifics of how the value is
        formatted. This is the LLVM equivalent of DFG's ValueRecovery.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * ftl/FTLFormattedValue.h: Added.
        (FTL):
        (FormattedValue):
        (JSC::FTL::FormattedValue::FormattedValue):
        (JSC::FTL::FormattedValue::operator!):
        (JSC::FTL::FormattedValue::format):
        (JSC::FTL::FormattedValue::value):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber):
        (JSC::FTL::LowerDFGToLLVM::speculateForward):
        (JSC::FTL::LowerDFGToLLVM::weakPointer):

2013-04-02  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL should use the right abstract heap for Int32 array accesses
        https://bugs.webkit.org/show_bug.cgi?id=113759

        Reviewed by Mark Hahnenberg.

        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileGetByVal):

2013-04-02  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL should support fast property stores
        https://bugs.webkit.org/show_bug.cgi?id=113757

        Reviewed by Oliver Hunt.
        
        Simplified the task of handling property transitions and reduced amount of code
        duplication between the JITs.
        
        Added PutByOffset, PutStructure, PhantomPutStructure, WeakJSConstant, and a
        stub form of StructureTransitionWatchpoint to the FTL.
        
        Also simplified the creation of pointer constants, and fixed a bug in
        speculateObject().

        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::notifyCompilingStructureTransition):
        (Graph):
        * dfg/DFGJITCompiler.h:
        (JITCompiler):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * ftl/FTLCapabilities.cpp:
        (JSC::FTL::canCompile):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::lower):
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileWeakJSConstant):
        (LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::compileStructureTransitionWatchpoint):
        (JSC::FTL::LowerDFGToLLVM::compilePutStructure):
        (JSC::FTL::LowerDFGToLLVM::compilePhantomPutStructure):
        (JSC::FTL::LowerDFGToLLVM::compilePutByOffset):
        (JSC::FTL::LowerDFGToLLVM::speculateObject):
        (JSC::FTL::LowerDFGToLLVM::weakPointer):
        * ftl/FTLOutput.h:
        (Output):
        (JSC::FTL::Output::constIntPtr):
        (JSC::FTL::Output::absolute):

2013-04-01  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL should support some more integer arithmetic ops (negate, xor, urshift)
        https://bugs.webkit.org/show_bug.cgi?id=113740

        Reviewed by Geoffrey Garen.

        * ftl/FTLAbbreviations.h:
        (JSC::FTL::buildNeg):
        (JSC::FTL::buildLShr):
        * ftl/FTLCapabilities.cpp:
        (JSC::FTL::canCompile):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileArithNegate):
        (LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::compileBitXor):
        (JSC::FTL::LowerDFGToLLVM::compileBitURShift):
        (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber):
        * ftl/FTLOutput.h:
        (JSC::FTL::Output::neg):
        (JSC::FTL::Output::lShr):

2013-04-01  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL should support GetGlobalVar/PutGlobalVar
        https://bugs.webkit.org/show_bug.cgi?id=113728

        Reviewed by Gavin Barraclough.
        
        Removed the macro magic for the globals absolute abstract heap, since for anything
        with absolute addresses we can just share a common absolute abstract heap. It
        would only be a problem if we for example were emitting an access to a global but
        not using an absolute address, and then wanted to say that this access was
        constrained to global variables. I don't believe we do that, and I don't believe we
        ever will.
        
        Then added Output::absolute(), a convenient way of building a typed pointer for an
        absolute address.
        
        Then added GetGlobalVar/PutGlobalVar.

        * ftl/FTLAbstractHeapRepository.cpp:
        (JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):
        * ftl/FTLAbstractHeapRepository.h:
        (FTL):
        (AbstractHeapRepository):
        * ftl/FTLCapabilities.cpp:
        (JSC::FTL::canCompile):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileGetGlobalVar):
        (LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::compilePutGlobalVar):
        * ftl/FTLOutput.h:
        (JSC::FTL::Output::absolute):
        (Output):

2013-03-31  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL should support ArithSub
        https://bugs.webkit.org/show_bug.cgi?id=113675

        Reviewed by Oliver Hunt.
        
        This does the obvious bit of implementing ArithSub, but it also takes this
        as an opportunity to clean up how intrinsics and common values (common types
        and constants) are handled. Previously they were all lumped together in
        FTL::Output. Now, in an effort to split up the files and make FTL::Output
        less big, I created a thing called FTL::CommonValues which just tracks the
        common values, and a thing called FTL::IntrinsicRepository which just tracks
        intrinsics. These and FTL::Output are all related to each other in a linear
        hierarchy. Moreover, IntrinsicRepository uses macro-fu to make it easy to
        declare new intrinsics in the future.
        
        I also out-of-lined some things and made .cpp files for each of these classes.
        Initialize I wasn't going to do this but then I realized that FTL::Output is
        already included in multiple places. Probably it's better if some of its guts
        are not inline, and it's also good to now have .cpp "landing pads" if we ever
        want to add more things to that class.
        
        Note that a lot of how these things are designed has to do with the fact
        that pretty soon here I'll have to switch us from using the LLVM global
        context to using a context that we create. When that happens, anyone who
        creates anything will have to know the context; that's why FTL::CommonValues
        already knows the module but doesn't use it - in the future it will have to
        do things with it.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * ftl/FTLAbbreviations.h:
        (JSC::FTL::buildSub):
        * ftl/FTLAbstractHeapRepository.cpp:
        (JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):
        * ftl/FTLCapabilities.cpp:
        (JSC::FTL::canCompile):
        * ftl/FTLCommonValues.cpp: Added.
        (FTL):
        (JSC::FTL::CommonValues::CommonValues):
        * ftl/FTLCommonValues.h: Added.
        (FTL):
        (CommonValues):
        (JSC::FTL::CommonValues::initialize):
        * ftl/FTLIntrinsicRepository.cpp: Added.
        (FTL):
        (JSC::FTL::IntrinsicRepository::IntrinsicRepository):
        * ftl/FTLIntrinsicRepository.h: Added.
        (FTL):
        (IntrinsicRepository):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileArithSub):
        (LowerDFGToLLVM):
        * ftl/FTLOutput.cpp: Added.
        (FTL):
        (JSC::FTL::Output::Output):
        (JSC::FTL::Output::~Output):
        * ftl/FTLOutput.h:
        (Output):
        (JSC::FTL::Output::initialize):
        (JSC::FTL::Output::sub):
        (JSC::FTL::Output::addWithOverflow32):
        (JSC::FTL::Output::subWithOverflow32):
        (JSC::FTL::Output::mulWithOverflow32):

2013-03-31  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL doesn't need virtual register allocation
        https://bugs.webkit.org/show_bug.cgi?id=113679

        Reviewed by Mark Hahnenberg.

        * dfg/DFGDriver.cpp:
        (JSC::DFG::dumpAndVerifyGraph):
        (DFG):
        (JSC::DFG::compile):

2013-03-31  Filip Pizlo  <fpizlo@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=113656
        Fix Sam's nits.

        Unreviewed.

        * ftl/FTLAbstractHeap.cpp:
        (JSC::FTL::IndexedAbstractHeap::initialize):
        * ftl/FTLAbstractHeap.h:
        (IndexedAbstractHeap):
        (AbsoluteAbstractHeap):
        * ftl/FTLAbstractHeapRepository.h:
        (AbstractHeapRepository):

2013-03-31  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL JIT should support GetByVal on Int32 arrays
        https://bugs.webkit.org/show_bug.cgi?id=113668

        Reviewed by Sam Weinig.
        
        It actually already supported this, but needed to be told that it did.
        
        Also adds an option to enable LICM (loop-invariant code motion, i.e.
        http://llvm.org/docs/Passes.html#licm-loop-invariant-code-motion). LICM
        isn't doing me any good right now, but I guess I'll have to play with
        it more. And this adds the ability to tweak the LLVM optimization level
        from the command-line.

        * ftl/FTLCapabilities.cpp:
        (JSC::FTL::canCompile):
        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileGetByVal):
        * runtime/Options.h:
        (JSC):

2013-03-31  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL JIT should supply TBAA meta-data to LLVM
        https://bugs.webkit.org/show_bug.cgi?id=113656

        Reviewed by Oliver Hunt.
        
        This adds support for performing strong typing on the LLVM IR that the FTL
        generates, by using TBAA meta-data. This will permit LLVM to do aggressive
        GVN, load elimination, and LICM optimization even if it sees pointer store
        side-effects. The goal is to precisely model all loads and stores we emit,
        except for the super crazy ones (GetById that can go all-out polymorphic,
        or for example a Call where we know nothing).
        
        This is accomplished by introducing the notion of an AbstractHeap
        typesystem. An AbstractHeap is a subset of all possible memory locations
        that we might store to. For example, JSCell::m_structure and
        JSObject::m_butterfly are two disjoint AbstractHeaps because we know that
        a store to one cannot clobber the other. AbstractHeaps follow a
        single-inheritance hierarchy. There is the root heap, which corresponds to
        any possible memory location accessible to the JS engine, and then there
        are heaps for all internal object fields, a heap for each global object,
        and so on.
        
        There are three other tidbits here that make this somewhat more interesting.
        We have a notion of an AbstractHeap-with-offset, called AbstractField.
        JSCell::m_structure is actually an AbstractField. This allows us to say
        things like m_out.loadPtr(base, m_heaps.JSCell_structure); this both
        gives you the offset of JSCell::m_structure and ascribes TBAA meta-data for
        the JSCell::m_structure heap to the generated load instrction.
        
        Another fun tidbit is the notion of Indexed, Numbered, and Absolute abstract
        heaps. An indexed abstract heap corresponds to a set of locations that you
        might access by index from some base. Virtual registers are a great example.
        Though I call them just "variables" in the FTL. When we access a virtual
        register, we know that we aren't interfering with accesses to
        Structure-managed named properties, or with JSCell::m_structure, or with
        other such disjoint heaps. But we also know that if we access a variable at
        offset X and then another variable at offset Y and we know that X and Y are
        unequal, then these two accesses are on disjoint subheaps of the variables
        heap. This works out naturally for interference between, say, scoped variable
        access and local variable access: if you access scoped variable r5 and then
        access a local variable r5, these might interfere - and they will get the
        same abstract subheap of the variables heap. IndexedAbstractHeaps
        conveniently remember the size of the elements and will give you an
        AbstractField (i.e. heap-with-offset) if you give it an index. This is great
        for conveniently writing code that accesses contiguous arrays of well-typed
        things. This allows you to literally do things like
        m_out.load64(callFrameRegister, m_heaps.variables[operand]) and the right
        thing will happen. You can also get the heap variables.atAnyIndex(), if
        you're doing an access with an unknown index.
        
        Numbered and Absolute abstract heaps are related except that they don't
        assume that the value used to get the abstract subheap corresponds to any
        meaningful offset from any base. Numbered heaps, like the properties heap
        (for named properties tracked by Structure), are "numbered" (not indexed)
        by the propertyNumber. So you can emit a GetByOffset by separately
        computing the offset and the propertyNumber (both values are stored in the
        StorageAccessData), and passing the offset directly to Output::address()
        and passing m_heaps.properties[propertyNumber] as the field. Absolute heaps
        are similar, but are keyed on absolute address. This is appropriate for
        global variables, and possibly other things.
        
        Finally, FTL::Output understands the notion of a pointer-with-TBAA-data,
        and calls it a TypedPointer. TypedPointer is a tuple of a LLVMValueRef
        referencing an intptr value and a pointer to an AbstractHeap. All load()
        and store() operations now take a TypedPointer, and will perform the access
        by casting the intptr to a pointer of the right type and then ascribing the
        TBAA meta-data from the AbstractHeap.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * ftl/FTLAbbreviations.h:
        (JSC::FTL::mdKindID):
        (JSC::FTL::mdString):
        (JSC::FTL::mdNode):
        (FTL):
        (JSC::FTL::setMetadata):
        * ftl/FTLAbstractHeap.cpp: Added.
        (FTL):
        (JSC::FTL::AbstractHeap::tbaaMetadataSlow):
        (JSC::FTL::AbstractHeap::decorateInstruction):
        (JSC::FTL::IndexedAbstractHeap::IndexedAbstractHeap):
        (JSC::FTL::IndexedAbstractHeap::~IndexedAbstractHeap):
        (JSC::FTL::IndexedAbstractHeap::baseIndex):
        (JSC::FTL::IndexedAbstractHeap::atSlow):
        (JSC::FTL::IndexedAbstractHeap::initialize):
        (JSC::FTL::NumberedAbstractHeap::NumberedAbstractHeap):
        (JSC::FTL::NumberedAbstractHeap::~NumberedAbstractHeap):
        (JSC::FTL::AbsoluteAbstractHeap::AbsoluteAbstractHeap):
        (JSC::FTL::AbsoluteAbstractHeap::~AbsoluteAbstractHeap):
        * ftl/FTLAbstractHeap.h: Added.
        (FTL):
        (AbstractHeap):
        (JSC::FTL::AbstractHeap::AbstractHeap):
        (JSC::FTL::AbstractHeap::isInitialized):
        (JSC::FTL::AbstractHeap::initialize):
        (JSC::FTL::AbstractHeap::parent):
        (JSC::FTL::AbstractHeap::heapName):
        (JSC::FTL::AbstractHeap::tbaaMetadata):
        (AbstractField):
        (JSC::FTL::AbstractField::AbstractField):
        (JSC::FTL::AbstractField::initialize):
        (JSC::FTL::AbstractField::offset):
        (IndexedAbstractHeap):
        (JSC::FTL::IndexedAbstractHeap::atAnyIndex):
        (JSC::FTL::IndexedAbstractHeap::at):
        (JSC::FTL::IndexedAbstractHeap::operator[]):
        (JSC::FTL::IndexedAbstractHeap::returnInitialized):
        (JSC::FTL::IndexedAbstractHeap::MyHashTraits::constructDeletedValue):
        (JSC::FTL::IndexedAbstractHeap::MyHashTraits::isDeletedValue):
        (NumberedAbstractHeap):
        (JSC::FTL::NumberedAbstractHeap::atAnyNumber):
        (JSC::FTL::NumberedAbstractHeap::at):
        (JSC::FTL::NumberedAbstractHeap::operator[]):
        (AbsoluteAbstractHeap):
        (JSC::FTL::AbsoluteAbstractHeap::atAnyAddress):
        (JSC::FTL::AbsoluteAbstractHeap::at):
        (JSC::FTL::AbsoluteAbstractHeap::operator[]):
        * ftl/FTLAbstractHeapRepository.cpp: Added.
        (FTL):
        (JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):
        (JSC::FTL::AbstractHeapRepository::~AbstractHeapRepository):
        * ftl/FTLAbstractHeapRepository.h: Added.
        (FTL):
        (AbstractHeapRepository):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::lower):
        (JSC::FTL::LowerDFGToLLVM::compileCheckStructure):
        (JSC::FTL::LowerDFGToLLVM::compileGetButterfly):
        (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength):
        (JSC::FTL::LowerDFGToLLVM::compileGetByVal):
        (JSC::FTL::LowerDFGToLLVM::compileGetByOffset):
        (JSC::FTL::LowerDFGToLLVM::speculateObject):
        (JSC::FTL::LowerDFGToLLVM::addressFor):
        (JSC::FTL::LowerDFGToLLVM::payloadFor):
        (JSC::FTL::LowerDFGToLLVM::tagFor):
        (LowerDFGToLLVM):
        * ftl/FTLOutput.h:
        (FTL):
        (JSC::FTL::Output::Output):
        (JSC::FTL::Output::initialize):
        (JSC::FTL::Output::set):
        (JSC::FTL::Output::load):
        (JSC::FTL::Output::store):
        (Output):
        (JSC::FTL::Output::load32):
        (JSC::FTL::Output::load64):
        (JSC::FTL::Output::loadPtr):
        (JSC::FTL::Output::store32):
        (JSC::FTL::Output::store64):
        (JSC::FTL::Output::storePtr):
        (JSC::FTL::Output::addPtr):
        (JSC::FTL::Output::address):
        (JSC::FTL::Output::baseIndex):
        * ftl/FTLTypedPointer.h: Added.
        (FTL):
        (TypedPointer):
        (JSC::FTL::TypedPointer::TypedPointer):
        (JSC::FTL::TypedPointer::operator!):
        (JSC::FTL::TypedPointer::heap):
        (JSC::FTL::TypedPointer::value):
        * runtime/Options.h:
        (JSC):

2013-03-30  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL JIT should be able to compile the Array.prototype.findGraphNode function in Kraken/ai-astar
        https://bugs.webkit.org/show_bug.cgi?id=113646

        Reviewed by Oliver Hunt.
        
        This adds enough FTL support to compile Array.prototype.findGraphNode. This isn't
        a speed-up, yet, because findGraphNode tends to be aggressively inlined by the DFG,
        and the FTL can't yet compile the things into which it was inlined. In future
        patches we will get to a point where we can compile the callers, and then we'll be
        able to see what the performance effects are.
        
        But the interesting thing is that it isn't a slow-down, either. This implies that
        even if we FTL compile a CodeBlock that we shouldn't have (the fact that we
        compiling things that end up being inlined is dumb, and the fact that the current
        FTL tiering strategy launches LLVM for those things is even dumber), we still run
        at OK performance.

        * ftl/FTLCapabilities.cpp:
        (JSC::FTL::canCompile):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::transferAndCheckArguments):
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileCheckStructure):
        (LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::compileGetButterfly):
        (JSC::FTL::LowerDFGToLLVM::compileGetArrayLength):
        (JSC::FTL::LowerDFGToLLVM::compileGetByVal):
        (JSC::FTL::LowerDFGToLLVM::compileGetByOffset):
        (JSC::FTL::LowerDFGToLLVM::compileCompareEq):
        (JSC::FTL::LowerDFGToLLVM::lowInt32):
        (JSC::FTL::LowerDFGToLLVM::lowCell):
        (JSC::FTL::LowerDFGToLLVM::lowObject):
        (JSC::FTL::LowerDFGToLLVM::lowBoolean):
        (JSC::FTL::LowerDFGToLLVM::lowJSValue):
        (JSC::FTL::LowerDFGToLLVM::lowStorage):
        (JSC::FTL::LowerDFGToLLVM::isNotInt32):
        (JSC::FTL::LowerDFGToLLVM::isNotCell):
        (JSC::FTL::LowerDFGToLLVM::isNotBoolean):
        (JSC::FTL::LowerDFGToLLVM::speculate):
        (JSC::FTL::LowerDFGToLLVM::speculateCell):
        (JSC::FTL::LowerDFGToLLVM::speculateObject):
        (JSC::FTL::LowerDFGToLLVM::accountedPointer):
        (JSC::FTL::LowerDFGToLLVM::weakPointer):
        * ftl/FTLOutput.h:
        (JSC::FTL::Output::Output):
        (JSC::FTL::Output::insertNewBlocksBefore):
        (JSC::FTL::Output::appendTo):
        (Output):
        (JSC::FTL::Output::baseIndex):

2013-03-29  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL JIT should be able to compile the Marsaglia random number generator
        https://bugs.webkit.org/show_bug.cgi?id=113635

        Reviewed by Oliver Hunt.
        
        Just adding missing functionality.
        
        Also "fixed" OSR exit to use a call to abort() in addition to using Unreachable
        since the latter doesn't actually mean trap - quite the opposite, it tells LLVM
        that the code can never be reached.
        
        The Marsaglia function runs ~60% faster with FTL, than DFG. Not a terrible start.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * ftl/FTLAbbreviations.h:
        (FTL):
        (JSC::FTL::voidType):
        (JSC::FTL::structType):
        (JSC::FTL::functionType):
        (JSC::FTL::addFunction):
        (JSC::FTL::setLinkage):
        (JSC::FTL::setFunctionCallingConv):
        (JSC::FTL::addExternFunction):
        (JSC::FTL::constIntToPtr):
        (JSC::FTL::constBitCast):
        (JSC::FTL::buildMul):
        (JSC::FTL::buildOr):
        (JSC::FTL::buildShl):
        (JSC::FTL::buildAShr):
        (JSC::FTL::buildCall):
        (JSC::FTL::buildExtractValue):
        (JSC::FTL::dumpModule):
        (JSC::FTL::verifyModule):
        * ftl/FTLCapabilities.cpp:
        (JSC::FTL::canCompile):
        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::lower):
        (JSC::FTL::LowerDFGToLLVM::compileBlock):
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileAdd):
        (LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::compileArithMul):
        (JSC::FTL::LowerDFGToLLVM::compileBitAnd):
        (JSC::FTL::LowerDFGToLLVM::compileBitOr):
        (JSC::FTL::LowerDFGToLLVM::compileBitRShift):
        (JSC::FTL::LowerDFGToLLVM::compileBitLShift):
        (JSC::FTL::LowerDFGToLLVM::compileCompareLess):
        (JSC::FTL::LowerDFGToLLVM::compileBranch):
        (JSC::FTL::LowerDFGToLLVM::speculateBackward):
        (JSC::FTL::LowerDFGToLLVM::lowBoolean):
        * ftl/FTLOutput.h:
        (JSC::FTL::Output::Output):
        (JSC::FTL::Output::initialize):
        (JSC::FTL::Output::appendTo):
        (Output):
        (JSC::FTL::Output::mul):
        (JSC::FTL::Output::bitOr):
        (JSC::FTL::Output::shl):
        (JSC::FTL::Output::aShr):
        (JSC::FTL::Output::addWithOverflow32):
        (JSC::FTL::Output::mulWithOverflow32):
        (JSC::FTL::Output::extractValue):
        (JSC::FTL::Output::call):
        (JSC::FTL::Output::addWithOverflow32Function):
        (JSC::FTL::Output::mulWithOverflow32Function):
        * ftl/FTLState.cpp: Added.
        (FTL):
        (JSC::FTL::State::dumpState):
        * ftl/FTLState.h:
        (State):

2013-03-29  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, release mode build fix.

        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::lowInt32):
        (JSC::FTL::LowerDFGToLLVM::lowCell):
        (JSC::FTL::LowerDFGToLLVM::lowBoolean):
        (JSC::FTL::LowerDFGToLLVM::lowJSValue):

2013-03-29  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: Change DO_NOT_INCLUDE_LLVM_CPP_HEADERS to LLVM_DO_NOT_INCLUDE_CPP_HEADERS
        https://bugs.webkit.org/show_bug.cgi?id=113634

        Reviewed by Dan Bernstein.

        * ftl/FTLLLVMHeaders.h:

2013-03-29  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL JIT should be able run some simple function
        https://bugs.webkit.org/show_bug.cgi?id=113481

        Reviewed by Geoffrey Garen.
        
        I forgot to make a couple of the requested review changes, so I'm making
        them now!

        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * ftl/FTLJITCode.h:

2013-03-29  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: FTL JIT should be able run some simple function
        https://bugs.webkit.org/show_bug.cgi?id=113481

        Reviewed by Geoffrey Garen.
        
        This is the initial version of the FTL JIT (Fourth Tier LLVM JIT).
        It includes a lowering from the DFG IR to LLVM IR (FTL::lowerDFGToLLVM)
        and a "backend" step that invokes the LLVM and wraps the resulting
        function in a thunk (FTL::compile).
        
        All LLVM IR building functions are wrapped up into a nicer FTL API.
        First they're wrapped in an abbreviated API (FTLAbbreviations.h) and
        then again into an object-oriented IR builder (FTLOutput.h).
        
        This runs things. I don't know how fast it runs things. And I don't
        make any claims of stability. The FTL is runtime-disabled by default;
        you will enable it by doing --useExperimentalFTL=true. Probably if you
        do this, you will run slower, because of the heavy thunking we do, the
        fact that we don't have anything resembling a sensible tiering story,
        and because we only compile ridiculously tiny functions.
            
        Finally, this still requires a custom set of LLVM headers to build.
        I am working on getting that up-streamed to LLVM, and separately I'll
        make sure that we have a build checked into this branch.

        * Configurations/JavaScriptCore.xcconfig:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/Operands.h:
        (Operands):
        (JSC::Operands::Operands):
        * dfg/DFGAbstractState.h:
        (JSC::DFG::AbstractState::needsTypeCheck):
        (AbstractState):
        (JSC::DFG::AbstractState::filterEdgeByUse):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
        * dfg/DFGSpeculativeJIT.h:
        (JSC::DFG::SpeculativeJIT::needsTypeCheck):
        (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand):
        (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
        (DFG):
        * dfg/DFGUseKind.h:
        (JSC::DFG::shouldNotHaveTypeCheck):
        (DFG):
        (JSC::DFG::mayHaveTypeCheck):
        (JSC::DFG::isDouble):
        (JSC::DFG::isCell):
        * ftl: Added.
        * ftl/FTLAbbreviations.h: Added.
        (FTL):
        (JSC::FTL::int1Type):
        (JSC::FTL::int32Type):
        (JSC::FTL::int64Type):
        (JSC::FTL::intPtrType):
        (JSC::FTL::pointerType):
        (JSC::FTL::getParam):
        (JSC::FTL::constInt):
        (JSC::FTL::appendBasicBlock):
        (JSC::FTL::insertBasicBlock):
        (JSC::FTL::buildAlloca):
        (JSC::FTL::buildAdd):
        (JSC::FTL::buildAnd):
        (JSC::FTL::buildXor):
        (JSC::FTL::buildLoad):
        (JSC::FTL::buildStore):
        (JSC::FTL::buildZExt):
        (JSC::FTL::buildIntCast):
        (JSC::FTL::buildIntToPtr):
        (JSC::FTL::buildPtrToInt):
        (JSC::FTL::buildICmp):
        (JSC::FTL::buildSelect):
        (JSC::FTL::buildBr):
        (JSC::FTL::buildCondBr):
        (JSC::FTL::buildRet):
        (JSC::FTL::buildUnreachable):
        * ftl/FTLCapabilities.cpp: Added.
        (FTL):
        (JSC::FTL::canCompile):
        * ftl/FTLCapabilities.h: Added.
        (FTL):
        * ftl/FTLCompile.cpp: Added.
        (FTL):
        (JSC::FTL::compileEntry):
        (JSC::FTL::compile):
        * ftl/FTLCompile.h: Added.
        (FTL):
        * ftl/FTLJITCode.cpp: Added.
        (FTL):
        (JSC::FTL::JITCode::JITCode):
        (JSC::FTL::JITCode::~JITCode):
        (JSC::FTL::JITCode::addressForCall):
        (JSC::FTL::JITCode::executableAddressAtOffset):
        (JSC::FTL::JITCode::dataAddressAtOffset):
        (JSC::FTL::JITCode::offsetOf):
        (JSC::FTL::JITCode::size):
        (JSC::FTL::JITCode::contains):
        * ftl/FTLJITCode.h: Added.
        (FTL):
        (JITCode):
        * ftl/FTLLLVMHeaders.h: Added.
        * ftl/FTLLowerDFGToLLVM.cpp: Added.
        (FTL):
        (LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM):
        (JSC::FTL::LowerDFGToLLVM::lower):
        (JSC::FTL::LowerDFGToLLVM::addFlushedLocalOpRoots):
        (JSC::FTL::LowerDFGToLLVM::closeOverFlushedLocalOps):
        (JSC::FTL::LowerDFGToLLVM::addFlushedLocalOp):
        (JSC::FTL::LowerDFGToLLVM::addFlushedLocalEdge):
        (JSC::FTL::LowerDFGToLLVM::transferAndCheckArguments):
        (JSC::FTL::LowerDFGToLLVM::compileBlock):
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileJSConstant):
        (JSC::FTL::LowerDFGToLLVM::compileGetLocal):
        (JSC::FTL::LowerDFGToLLVM::compileSetLocal):
        (JSC::FTL::LowerDFGToLLVM::compileMovHintAndCheck):
        (JSC::FTL::LowerDFGToLLVM::compilePhantom):
        (JSC::FTL::LowerDFGToLLVM::compileReturn):
        (JSC::FTL::LowerDFGToLLVM::speculateBackward):
        (JSC::FTL::LowerDFGToLLVM::speculateForward):
        (JSC::FTL::LowerDFGToLLVM::speculate):
        (JSC::FTL::LowerDFGToLLVM::terminate):
        (JSC::FTL::LowerDFGToLLVM::backwardTypeCheck):
        (JSC::FTL::LowerDFGToLLVM::forwardTypeCheck):
        (JSC::FTL::LowerDFGToLLVM::typeCheck):
        (JSC::FTL::LowerDFGToLLVM::lowInt32):
        (JSC::FTL::LowerDFGToLLVM::lowCell):
        (JSC::FTL::LowerDFGToLLVM::lowBoolean):
        (JSC::FTL::LowerDFGToLLVM::lowJSValue):
        (JSC::FTL::LowerDFGToLLVM::checkNotInt32):
        (JSC::FTL::LowerDFGToLLVM::unboxInt32):
        (JSC::FTL::LowerDFGToLLVM::boxInt32):
        (JSC::FTL::LowerDFGToLLVM::checkNotCell):
        (JSC::FTL::LowerDFGToLLVM::checkNotBoolean):
        (JSC::FTL::LowerDFGToLLVM::unboxBoolean):
        (JSC::FTL::LowerDFGToLLVM::boxBoolean):
        (JSC::FTL::LowerDFGToLLVM::speculateInt32):
        (JSC::FTL::LowerDFGToLLVM::addressFor):
        (JSC::FTL::LowerDFGToLLVM::payloadFor):
        (JSC::FTL::LowerDFGToLLVM::tagFor):
        (JSC::FTL::LowerDFGToLLVM::globalData):
        (JSC::FTL::LowerDFGToLLVM::codeBlock):
        (JSC::FTL::lowerDFGToLLVM):
        * ftl/FTLLowerDFGToLLVM.h: Added.
        (FTL):
        * ftl/FTLOutput.h: Added.
        (FTL):
        (Output):
        (JSC::FTL::Output::Output):
        (JSC::FTL::Output::~Output):
        (JSC::FTL::Output::initialize):
        (JSC::FTL::Output::appendTo):
        (JSC::FTL::Output::newBlock):
        (JSC::FTL::Output::param):
        (JSC::FTL::Output::constBool):
        (JSC::FTL::Output::constInt32):
        (JSC::FTL::Output::constIntPtr):
        (JSC::FTL::Output::constInt64):
        (JSC::FTL::Output::add):
        (JSC::FTL::Output::bitAnd):
        (JSC::FTL::Output::bitXor):
        (JSC::FTL::Output::zeroExt):
        (JSC::FTL::Output::intCast):
        (JSC::FTL::Output::castToInt32):
        (JSC::FTL::Output::get):
        (JSC::FTL::Output::set):
        (JSC::FTL::Output::load):
        (JSC::FTL::Output::store):
        (JSC::FTL::Output::load32):
        (JSC::FTL::Output::load64):
        (JSC::FTL::Output::loadPtr):
        (JSC::FTL::Output::store32):
        (JSC::FTL::Output::store64):
        (JSC::FTL::Output::storePtr):
        (JSC::FTL::Output::equal):
        (JSC::FTL::Output::notEqual):
        (JSC::FTL::Output::above):
        (JSC::FTL::Output::aboveOrEqual):
        (JSC::FTL::Output::below):
        (JSC::FTL::Output::belowOrEqual):
        (JSC::FTL::Output::greaterThan):
        (JSC::FTL::Output::greaterThanOrEqual):
        (JSC::FTL::Output::lessThan):
        (JSC::FTL::Output::lessThanOrEqual):
        (JSC::FTL::Output::isZero64):
        (JSC::FTL::Output::notZero64):
        (JSC::FTL::Output::testNonZero64):
        (JSC::FTL::Output::select):
        (JSC::FTL::Output::jump):
        (JSC::FTL::Output::branch):
        (JSC::FTL::Output::ret):
        (JSC::FTL::Output::unreachable):
        * ftl/FTLState.h: Added.
        (FTL):
        (State):
        (JSC::FTL::State::State):
        * runtime/InitializeThreading.cpp:
        (JSC::initializeThreadingOnce):
        * runtime/Options.h:
        (JSC):

2013-03-27  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: JITCode should abstract exactly how the JIT code is structured and where it was allocated
        https://bugs.webkit.org/show_bug.cgi?id=113437

        Reviewed by Mark Hahnenberg.
        
        JITCode is now a virtual base class, which will allow different JITs to have radically
        different memory allocation and management conventions in the future. It will also
        make it easier to store JIT-specific meta-data in CodeBlock just by putting it into
        an appropriate JITCode subclass.
        
        For now there is one subclass, DirectJITCode, which just behaves like JITCode used to
        behave.

        * assembler/RepatchBuffer.h:
        (JSC::RepatchBuffer::RepatchBuffer):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::resetStubInternal):
        (JSC::CodeBlock::bytecodeOffset):
        (JSC::CodeBlock::codeOriginForReturn):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::setJITCode):
        (JSC::CodeBlock::getJITCode):
        (JSC::CodeBlock::getJITType):
        (CodeBlock):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        (JSC::DFG::tryCompile):
        (JSC::DFG::tryCompileFunction):
        * dfg/DFGDriver.h:
        (DFG):
        (JSC::DFG::tryCompile):
        (JSC::DFG::tryCompileFunction):
        * dfg/DFGJITCompiler.cpp:
        (JSC::DFG::JITCompiler::compile):
        (JSC::DFG::JITCompiler::compileFunction):
        * dfg/DFGJITCompiler.h:
        (JITCompiler):
        * dfg/DFGOSREntry.cpp:
        (JSC::DFG::prepareOSREntry):
        * dfg/DFGOSRExit.cpp:
        (JSC::DFG::OSRExit::codeLocationForRepatch):
        * dfg/DFGOSRExitCompiler32_64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOSRExitCompiler64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOperations.cpp:
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):
        (JSC::Interpreter::executeCall):
        (JSC::Interpreter::executeConstruct):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompile):
        * jit/JIT.h:
        (JSC::JIT::compile):
        (JIT):
        * jit/JITCode.cpp:
        (JSC):
        (JSC::JITCode::JITCode):
        (JSC::JITCode::~JITCode):
        (JSC::JITCode::execute):
        (JSC::JITCode::hostFunction):
        (JSC::DirectJITCode::DirectJITCode):
        (JSC::DirectJITCode::~DirectJITCode):
        (JSC::DirectJITCode::addressForCall):
        (JSC::DirectJITCode::executableAddressAtOffset):
        (JSC::DirectJITCode::dataAddressAtOffset):
        (JSC::DirectJITCode::offsetOf):
        (JSC::DirectJITCode::size):
        (JSC::DirectJITCode::contains):
        * jit/JITCode.h:
        (JSC):
        (JITCode):
        (JSC::JITCode::bottomTierJIT):
        (JSC::JITCode::topTierJIT):
        (JSC::JITCode::nextTierJIT):
        (JSC::JITCode::isOptimizingJIT):
        (JSC::JITCode::isBaselineCode):
        (JSC::JITCode::jitType):
        (JSC::JITCode::jitTypeFor):
        (JSC::JITCode::executableAddress):
        (JSC::JITCode::start):
        (JSC::JITCode::end):
        (DirectJITCode):
        * jit/JITDriver.h:
        (JSC::jitCompileIfAppropriate):
        (JSC::jitCompileFunctionIfAppropriate):
        * jit/JITStubs.cpp:
        (JSC::lazyLinkFor):
        (JSC::DEFINE_STUB_FUNCTION):
        * jit/ThunkGenerators.cpp:
        (JSC::virtualForGenerator):
        * llint/LLIntEntrypoints.cpp:
        (JSC::LLInt::getFunctionEntrypoint):
        (JSC::LLInt::getEvalEntrypoint):
        (JSC::LLInt::getProgramEntrypoint):
        * llint/LLIntEntrypoints.h:
        (JSC):
        (LLInt):
        (JSC::LLInt::getEntrypoint):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::jitCompileAndSetHeuristics):
        (JSC::LLInt::entryOSR):
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * runtime/Executable.cpp:
        (JSC::EvalExecutable::compileInternal):
        (JSC::ProgramExecutable::compileInternal):
        (JSC::FunctionExecutable::compileForCallInternal):
        (JSC::FunctionExecutable::compileForConstructInternal):
        * runtime/Executable.h:
        (JSC::ExecutableBase::generatedJITCodeForCall):
        (JSC::ExecutableBase::generatedJITCodeForConstruct):
        (JSC::ExecutableBase::generatedJITCodeFor):
        (ExecutableBase):
        (JSC::ExecutableBase::hostCodeEntryFor):
        (JSC::ExecutableBase::jsCodeEntryFor):
        (JSC::ExecutableBase::jsCodeWithArityCheckEntryFor):
        (JSC::NativeExecutable::create):
        (JSC::NativeExecutable::finishCreation):
        (JSC::EvalExecutable::generatedJITCode):
        (JSC::ProgramExecutable::generatedJITCode):
        * runtime/ExecutionHarness.h:
        (JSC::prepareForExecution):
        (JSC::prepareFunctionForExecution):

2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2013-07-16  Oliver Hunt  <oliver@apple.com>

        Merged dfgFourthTier r148570

    2013-04-16  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: DFG should be able to query Structure without modifying it
        https://bugs.webkit.org/show_bug.cgi?id=114708

        Reviewed by Oliver Hunt.
        
        This is work towards allowing the DFG, and FTL, to run on a separate thread.
        The idea is that the most evil thing that the DFG does that has thread-safety
        issues is fiddling with Structures by calling Structure::get(). This can lead
        to rematerialization of property tables, which is definitely not thread-safe
        due to how StringImpl works. So, this patch completely side-steps the problem
        by creating a new version of Structure::get, called
        Structure::getWithoutMaterializing, which may choose to do an O(n) search if
        necessary to avoid materialization. I believe this should be fine - the DFG
        does't call into these code path often enough for this to matter, and most of
        the time, the Structure that we call this on will already have a property
        table because some inline cache would have already called ::get() on that
        Structure.
        
        Also cleaned up the materialization logic: we can stop the search as soon as
        we find any Structure with a property table rather than searching all the way
        for a pinned one.

        * bytecode/GetByIdStatus.cpp:
        (JSC::GetByIdStatus::computeFor):
        * bytecode/PutByIdStatus.cpp:
        (JSC::PutByIdStatus::computeFromLLInt):
        (JSC::PutByIdStatus::computeFor):
        * runtime/Structure.cpp:
        (JSC::Structure::findStructuresAndMapForMaterialization):
        (JSC::Structure::materializePropertyMap):
        (JSC::Structure::getWithoutMaterializing):
        (JSC):
        * runtime/Structure.h:
        (Structure):
        * runtime/StructureInlines.h:
        (JSC::Structure::getWithoutMaterializing):
        (JSC):

2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2013-07-15  Oliver Hunt  <oliver@apple.com>

        Merged dfgFourthTier r148047

    2013-04-09  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: DFG should provide utilities for common OSR exit tasks
        https://bugs.webkit.org/show_bug.cgi?id=114306

        Reviewed by Mark Hahnenberg.
        
        Just abstract out some things that the FTL will want to use as well.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        * dfg/DFGOSRExitCompiler.cpp:
        * dfg/DFGOSRExitCompiler.h:
        (OSRExitCompiler):
        * dfg/DFGOSRExitCompiler32_64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOSRExitCompiler64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOSRExitCompilerCommon.cpp: Added.
        (DFG):
        (JSC::DFG::handleExitCounts):
        (JSC::DFG::reifyInlinedCallFrames):
        (JSC::DFG::adjustAndJumpToTarget):
        * dfg/DFGOSRExitCompilerCommon.h: Added.
        (DFG):

2013-07-15  Oliver Hunt  <oliver@apple.com>

        Merged dfgFourthTier r148037

    2013-04-09  Filip Pizlo  <fpizlo@apple.com>
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477

        fourthTier: DFG should better abstract floating point arguments
        https://bugs.webkit.org/show_bug.cgi?id=114300

        Reviewed by Mark Hahnenberg.

        * dfg/DFGFPRInfo.h:
        (FPRInfo):
        (JSC::DFG::FPRInfo::toArgumentRegister):

2478
2479
2480
2481
2482
2013-07-15  Oliver Hunt  <oliver@apple.com>

        Merged dfgFourthTier r147821

    2013-04-05  Filip Pizlo  <fpizlo@apple.com>
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492

        fourthTier: DFG should better abstract arguments
        https://bugs.webkit.org/show_bug.cgi?id=114073

        Reviewed by Mark Hahnenberg.

        * dfg/DFGGPRInfo.h:
        (GPRInfo):
        (JSC::DFG::GPRInfo::toArgumentRegister):

2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2013-07-15  Oliver Hunt  <oliver@apple.com>

        Merged dfgFourthTier r147609

    2013-04-03  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: put DFG data into a DFG::JITCode, and put common DFG and FTL data into something accessible from both DFG::JITCode and FTL::JITCode
        https://bugs.webkit.org/show_bug.cgi?id=113905

        Reviewed by Geoffrey Garen.
        
        This removes one pointer from CodeBlock.
        
        It also gives us a framework for having JITType-specific data in CodeBlock, by
        putting it into the appropriate JITCode class (either DFG::JITCode or
        FTL::JITCode). And it allows us to have DFG and FTL share some common data,
        via DFG::CommonData, which is stored in both DFG::JITCode and FTL::JITCode and
        always accessible via JITCode::dfgCommon().

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * bytecode/CodeBlock.cpp:
        (JSC):
        (JSC::CodeBlock::dumpBytecode):
        (JSC::CodeBlock::visitAggregate):
        (JSC::CodeBlock::performTracingFixpointIteration):
        (JSC::CodeBlock::finalizeUnconditionally):
        (JSC::CodeBlock::stronglyVisitWeakReferences):
        (JSC::CodeBlock::shrinkToFit):
        (JSC::CodeBlock::tallyFrequentExitSites):
        * bytecode/CodeBlock.h:
        (CodeBlock):
        (JSC::CodeBlock::setJITCode):
        (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan):
        (JSC::DFGCodeBlocks::mark):
        * dfg/DFGAssemblyHelpers.h:
        * dfg/DFGCommonData.cpp: Added.
        (DFG):
        (JSC::DFG::CommonData::notifyCompilingStructureTransition):
        (JSC::DFG::CommonData::shrinkToFit):
        * dfg/DFGCommonData.h: Added.
        (JSC):
        (DFG):
        (JSC::DFG::WeakReferenceTransition::WeakReferenceTransition):
        (WeakReferenceTransition):
        (CommonData):
        (JSC::DFG::CommonData::CommonData):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        (JSC::DFG::tryCompile):
        (JSC::DFG::tryCompileFunction):
        * dfg/DFGDriver.h:
        (DFG):
        (JSC::DFG::tryCompile):
        (JSC::DFG::tryCompileFunction):
        * dfg/DFGGraph.h:
        (Graph):
        * dfg/DFGJITCode.cpp: Added.
        (DFG):
        (JSC::DFG::JITCode::JITCode):
        (JSC::DFG::JITCode::~JITCode):
        (JSC::DFG::JITCode::dfgCommon):
        (JSC::DFG::JITCode::dfg):
        (JSC::DFG::JITCode::shrinkToFit):
        * dfg/DFGJITCode.h: Added.
        (DFG):
        (JITCode):
        (JSC::DFG::JITCode::appendOSREntryData):
        (JSC::DFG::JITCode::osrEntryDataForBytecodeIndex):
        (JSC::DFG::JITCode::appendOSRExit):
        (JSC::DFG::JITCode::lastOSRExit):
        (JSC::DFG::JITCode::appendSpeculationRecovery):
        (JSC::DFG::JITCode::appendWatchpoint):
        * dfg/DFGJITCompiler.cpp:
        (JSC::DFG::JITCompiler::JITCompiler):
        (JSC::DFG::JITCompiler::linkOSRExits):
        (JSC::DFG::JITCompiler::link):
        (JSC::DFG::JITCompiler::compile):
        (JSC::DFG::JITCompiler::compileFunction):
        * dfg/DFGJITCompiler.h:
        (JITCompiler):
        (JSC::DFG::JITCompiler::addWeakReference):
        (JSC::DFG::JITCompiler::noticeOSREntry):
        (JSC::DFG::JITCompiler::jitCode):
        * dfg/DFGOSREntry.cpp:
        (JSC::DFG::prepareOSREntry):
        * dfg/DFGOSRExit.h:
        (OSRExit):
        * dfg/DFGOSRExitCompiler.cpp:
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
        (JSC::DFG::SpeculativeJIT::backwardSpeculationCheck):
        (JSC::DFG::SpeculativeJIT::speculationWatchpoint):
        (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGVariableEventStream.cpp:
        * heap/DFGCodeBlocks.cpp:
        (JSC::DFGCodeBlocks::~DFGCodeBlocks):
        (JSC::DFGCodeBlocks::jettison):
        (JSC::DFGCodeBlocks::clearMarks):
        (JSC::DFGCodeBlocks::deleteUnmarkedJettisonedCodeBlocks):
        (JSC::DFGCodeBlocks::traceMarkedCodeBlocks):
        * jit/JITCode.cpp:
        (JSC::JITCode::dfgCommon):
        (JSC):
        (JSC::JITCode::dfg):
        (JSC::JITCode::ftl):
        (JSC::DirectJITCode::DirectJITCode):
        (JSC::DirectJITCode::initializeCodeRef):
        (JSC::DirectJITCode::addressForCall):
        (JSC::DirectJITCode::executableAddressAtOffset):
        (JSC::DirectJITCode::dataAddressAtOffset):
        (JSC::DirectJITCode::offsetOf):
        (JSC::DirectJITCode::size):
        (JSC::DirectJITCode::contains):
        * jit/JITCode.h:
        (DFG):
        (FTL):
        (JSC):
        (JITCode):
        (DirectJITCode):

2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2013-07-15  Oliver Hunt  <oliver@apple.com>

        Merge dfgFourthTier r147587

    2013-04-03  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: Everyone should know about the FTL
        https://bugs.webkit.org/show_bug.cgi?id=113897

        Reviewed by Mark Hahnenberg.
        
        In order to get OSR exit to work right, we need the distinction between DFG and
        FTL to be clear even after compilation finishes, since they will have subtly
        different OSR stories and likely use different data structures.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::resetStubInternal):
        (JSC::ProgramCodeBlock::compileOptimized):
        (JSC::EvalCodeBlock::compileOptimized):
        (JSC::FunctionCodeBlock::compileOptimized):
        (JSC::CodeBlock::adjustedExitCountThreshold):
        (JSC::CodeBlock::tallyFrequentExitSites):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::setJITCode):
        (JSC::CodeBlock::hasOptimizedReplacement):
        (JSC::ExecState::isInlineCallFrame):
        * ftl/FTLCompile.cpp:
        (JSC::FTL::compile):
        * ftl/FTLJITCode.cpp:
        (JSC::FTL::JITCode::JITCode):
        * ftl/FTLState.cpp:
        (JSC::FTL::State::dumpState):
        * heap/DFGCodeBlocks.cpp:
        (JSC::DFGCodeBlocks::jettison):
        * interpreter/Interpreter.cpp:
        (JSC::getLineNumberForCallFrame):
        (JSC::getCallerInfo):
        * jit/JITCode.cpp:
        (WTF::printInternal):
        * jit/JITCode.h:
        (JSC::JITCode::topTierJIT):
        (JSC::JITCode::nextTierJIT):
        (JITCode):
        (JSC::JITCode::isJIT):
        (JSC::JITCode::isLowerTier):
        (JSC::JITCode::isHigherTier):
        (JSC::JITCode::isLowerOrSameTier):
        (JSC::JITCode::isHigherOrSameTier):
        (JSC::JITCode::isOptimizingJIT):
        * jit/JITDriver.h:
        (JSC::jitCompileIfAppropriate):
        (JSC::jitCompileFunctionIfAppropriate):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * runtime/Executable.cpp:
        (JSC::EvalExecutable::compileOptimized):
        (JSC::samplingDescription):
        (JSC::ProgramExecutable::compileOptimized):
        (JSC::FunctionExecutable::compileOptimizedForCall):
        (JSC::FunctionExecutable::compileOptimizedForConstruct):

2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2013-04-03  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: DFG should abstract out how it does forward exits, and that code should be simplified
        https://bugs.webkit.org/show_bug.cgi?id=113894

        Reviewed by Mark Hahnenberg.
        
        1) We previously had two different ways of convertingToForward, one path for
           where we had a ValueRecovery for the current node and one where we didn't.
           But the paths were doing exactly the same thing except that if you have a
           ValueRecovery, you also find the last applicable mov hint and do some
           extra things. This patch combines the two paths and bases both of them on
           the previous no-ValueRecovery path, which was simpler to begin with.
        
        2) This moves the logic into DFG::OSRExit, which further simplifies the code
           and makes the logic available to the FTL.

        * dfg/DFGOSRExit.cpp:
        (JSC::DFG::OSRExit::convertToForward):
        (DFG):
        * dfg/DFGOSRExit.h:
        (DFG):
        (OSRExit):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):

2013-07-15  Oliver Hunt  <oliver@apple.com>

        Merge dfgFourthTier r147582

2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2013-07-15  Oliver Hunt  <oliver@apple.com>

        Merge dfgFourthTier r147014

    2013-03-27  Filip Pizlo  <fpizlo@apple.com>

        fourthTier: JITCode should abstract exactly how the JIT code is structured and where it was allocated
        https://bugs.webkit.org/show_bug.cgi?id=113437

        Reviewed by Mark Hahnenberg.
        
        JITCode is now a virtual base class, which will allow different JITs to have radically
        different memory allocation and management conventions in the future. It will also
        make it easier to store JIT-specific meta-data in CodeBlock just by putting it into
        an appropriate JITCode subclass.
        
        For now there is one subclass, DirectJITCode, which just behaves like JITCode used to
        behave.

        * assembler/RepatchBuffer.h:
        (JSC::RepatchBuffer::RepatchBuffer):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::resetStubInternal):
        (JSC::CodeBlock::bytecodeOffset):
        (JSC::CodeBlock::codeOriginForReturn):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::setJITCode):
        (JSC::CodeBlock::getJITCode):
        (JSC::CodeBlock::getJITType):
        (CodeBlock):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        (JSC::DFG::tryCompile):
        (JSC::DFG::tryCompileFunction):
        * dfg/DFGDriver.h:
        (DFG):
        (JSC::DFG::tryCompile):
        (JSC::DFG::tryCompileFunction):
        * dfg/DFGJITCompiler.cpp:
        (JSC::DFG::JITCompiler::compile):
        (JSC::DFG::JITCompiler::compileFunction):
        * dfg/DFGJITCompiler.h:
        (JITCompiler):
        * dfg/DFGOSREntry.cpp:
        (JSC::DFG::prepareOSREntry):
        * dfg/DFGOSRExit.cpp:
        (JSC::DFG::OSRExit::codeLocationForRepatch):
        * dfg/DFGOSRExitCompiler32_64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOSRExitCompiler64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOperations.cpp:
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):
        (JSC::Interpreter::executeCall):
        (JSC::Interpreter::executeConstruct):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompile):
        * jit/JIT.h:
        (JSC::JIT::compile):
        (JIT):
        * jit/JITCode.cpp:
        (JSC):
        (JSC::JITCode::JITCode):
        (JSC::JITCode::~JITCode):
        (JSC::JITCode::execute):
        (JSC::JITCode::hostFunction):
        (JSC::DirectJITCode::DirectJITCode):
        (JSC::DirectJITCode::~DirectJITCode):
        (JSC::DirectJITCode::addressForCall):
        (JSC::DirectJITCode::executableAddressAtOffset):
        (JSC::DirectJITCode::dataAddressAtOffset):
        (JSC::DirectJITCode::offsetOf):
        (JSC::DirectJITCode::size):
        (JSC::DirectJITCode::contains):
        * jit/JITCode.h:
        (JSC):
        (JITCode):
        (JSC::JITCode::bottomTierJIT):
        (JSC::JITCode::topTierJIT):
        (JSC::JITCode::nextTierJIT):
        (JSC::JITCode::isOptimizingJIT):
        (JSC::JITCode::isBaselineCode):
        (JSC::JITCode::jitType):
        (JSC::JITCode::jitTypeFor):
        (JSC::JITCode::executableAddress):
        (JSC::JITCode::start):
        (JSC::JITCode::end):
        (DirectJITCode):
        * jit/JITDriver.h:
        (JSC::jitCompileIfAppropriate):
        (JSC::jitCompileFunctionIfAppropriate):
        * jit/JITStubs.cpp:
        (JSC::lazyLinkFor):
        (JSC::DEFINE_STUB_FUNCTION):
        * jit/ThunkGenerators.cpp:
        (JSC::virtualForGenerator):
        * llint/LLIntEntrypoints.cpp:
        (JSC::LLInt::getFunctionEntrypoint):
        (JSC::LLInt::getEvalEntrypoint):
        (JSC::LLInt::getProgramEntrypoint):
        * llint/LLIntEntrypoints.h:
        (JSC):
        (LLInt):
        (JSC::LLInt::getEntrypoint):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::jitCompileAndSetHeuristics):
        (JSC::LLInt::entryOSR):
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * runtime/Executable.cpp:
        (JSC::EvalExecutable::compileInternal):
        (JSC::ProgramExecutable::compileInternal):
        (JSC::FunctionExecutable::compileForCallInternal):
        (JSC::FunctionExecutable::compileForConstructInternal):
        * runtime/Executable.h:
        (JSC::ExecutableBase::generatedJITCodeForCall):
        (JSC::ExecutableBase::generatedJITCodeForConstruct):
        (JSC::ExecutableBase::generatedJITCodeFor):
        (ExecutableBase):
        (JSC::ExecutableBase::hostCodeEntryFor):
        (JSC::ExecutableBase::jsCodeEntryFor):
        (JSC::ExecutableBase::jsCodeWithArityCheckEntryFor):
        (JSC::NativeExecutable::create):
        (JSC::NativeExecutable::finishCreation):
        (JSC::EvalExecutable::generatedJITCode):
        (JSC::ProgramExecutable::generatedJITCode):
        * runtime/ExecutionHarness.h:
        (JSC::prepareForExecution):
        (JSC::prepareFunctionForExecution):

2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2013-07-24  Filip Pizlo  <fpizlo@apple.com>

        It should be possible to hijack IndexingHeader for things other than lengths
        https://bugs.webkit.org/show_bug.cgi?id=119065

        Reviewed by Mark Hahnenberg.
        
        Made the body of IndexingHeader be a union.
        
        Modified the offlineasm so that you can say IndexingHeader::u.lengths.publicLength.
        Previously those dots would cause parse errors. Now an identifier in offlineasm can
        have a dot anywhere except the first character.

        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * offlineasm/parser.rb:
        * runtime/IndexingHeader.h:
        (JSC::IndexingHeader::offsetOfPublicLength):
        (JSC::IndexingHeader::offsetOfVectorLength):
        (JSC::IndexingHeader::IndexingHeader):
        (JSC::IndexingHeader::vectorLength):
        (JSC::IndexingHeader::setVectorLength):
        (JSC::IndexingHeader::publicLength):
        (JSC::IndexingHeader::setPublicLength):

2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2013-07-24  Mark Hahnenberg  <mhahnenberg@apple.com>

        JIT::updateTopCallFrame doesn't update the CallFrame's bytecodeOffset if bytecodeOffset == 0
        https://bugs.webkit.org/show_bug.cgi?id=118923

        Reviewed by Filip Pizlo.

        This bug causes the CallFrame's bytecodeOffset to not be properly set when we 
        enter, e.g., cti_optimize from an op_enter.

        * jit/JITInlines.h:
        (JSC::JIT::updateTopCallFrame):

2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2013-07-23  Filip Pizlo  <fpizlo@apple.com>

        DFG string concatenation optimizations might emit speculative nodes after emitting nodes that kill the original inputs
        https://bugs.webkit.org/show_bug.cgi?id=119032

        Reviewed by Oliver Hunt.

        It just needs some Phantom action.

        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):

2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2013-07-10  Mark Lam  <mark.lam@apple.com>

        Need ExpressionRangeInfo before ResolveForPuts in strict mode.
        https://bugs.webkit.org/show_bug.cgi?id=118997.

        Reviewed by Oliver Hunt.

        If we add an assertion in UnlinkedCodeBlock::expressionRangeForBytecodeOffset()
        to ensure that we are able to find an ExpressionRangeInfo for any given bytecode
        offset, the following tests will fails:
            fast/js/basic-strict-mode.html
            fast/js/mozilla/strict/8.7.2.html
        With this fix, those tests will no longer fail.

        * bytecompiler/NodesCodegen.cpp:
        (JSC::AssignResolveNode::emitBytecode):
        (JSC::ForInNode::emitBytecode):
        - Emit expression info before calls to emitResolveBaseForPut() when in strict mode.

2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2013-07-23  Mark Lam  <mark.lam@apple.com>

        Added ExpressionRangeInfo for BinaryOpNodes that can throw exceptions
        due to type coersion.
        https://bugs.webkit.org/show_bug.cgi?id=116853.

        Reviewed by Geoffrey Garen.

        * bytecompiler/NodesCodegen.cpp:
        (JSC::BinaryOpNode::emitBytecode):
        - Added expression info for the strcat and the general binary op cases.
          I did not add expression info for the "compare with null" case because
          that comparison cannot trigger type coersion, and hence it won't throw
          any exceptions and doesn't need the expression info.

2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2013-07-23  Mark Lam  <mark.lam@apple.com>

        Removed unused sourceOffset from JSTokenLocation.
        https://bugs.webkit.org/show_bug.cgi?id=118996.

        Reviewed by Geoffrey Garen.

        This also removes the assertion reported in the bug because it is now
        moot, thereby resolving the assertion failure issue on Windows.

        * bytecompiler/NodesCodegen.cpp:
        (JSC::ArrayNode::toArgumentList):
        (JSC::ApplyFunctionCallDotNode::emitBytecode):
        * parser/Lexer.cpp:
        (JSC::::lex):
        * parser/Lexer.h:
        (JSC::::lexExpectIdentifier):
        * parser/Nodes.h:
        * parser/Parser.cpp:
        (JSC::::Parser):
        (JSC::::parseFunctionInfo):
        (JSC::::parseExpressionOrLabelStatement):
        (JSC::::parseMemberExpression):
        * parser/Parser.h:
        (JSC::::parse):
        * parser/ParserTokens.h:
        (JSC::JSTokenLocation::JSTokenLocation):

2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2013-07-22  Alex Christensen  <achristensen@apple.com>

        Added assembly files to Windows 64-bit builds.
        https://bugs.webkit.org/show_bug.cgi?id=118931

        Reviewed by Brent Fulgham.

        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Added JITStubsMSVC64.asm for x64 and enabled MASM.
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Added JITStubsMSVC64.asm.

2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2013-07-20  Brent Fulgham  <bfulgham@apple.com>

        [Windows] Remove unneeded custom stdint.h now that we build on VS2010.
        https://bugs.webkit.org/show_bug.cgi?id=118868.

        Reviewed by Anders Carlsson.

        * os-win32/stdint.h: Removed.
        * GNUmakefile.list.am: Removed reference to os-win32/stdint.h

2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2013-07-19  Alex Christensen  <achristensen@apple.com>

        Added x64 configuration to Visual Studio build.
        https://bugs.webkit.org/show_bug.cgi?id=118888

        Reviewed by Brent Fulgham.

        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
        * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
        * JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
        * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
        * JavaScriptCore.vcxproj/testapi/testapi.vcxproj:

2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
2013-07-18  Andreas Kling  <akling@apple.com>

        CodeBlock DFG entry list isn't getting shrunk-to-fit after linking.
        <http://webkit.org/b/118875>
        <rdar://problem/14488577>

        Reviewed by Geoffrey Garen.

        Move the CodeBlock::shrinkToFit() call out of JITCompiler::link() and to the call sites
        so SpeculativeJIT::linkOSREntries() can fill in CodeBlock::m_dfgData->osrEntry first.

        886 kB progression on <http://twitter.com/awesomekling>

        * dfg/DFGJITCompiler.cpp:
        (JSC::DFG::JITCompiler::link):
        (JSC::DFG::JITCompiler::compile):
        (JSC::DFG::JITCompiler::compileFunction):

3007
3008
2013-07-18  Chris Curtis  <chris_curtis@apple.com>

3009
        Fixed ASSERTION FAILED: callFrame == globalData->topCallFrame in JSC::Interpreter::addStackTraceIfNecessary
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
        https://bugs.webkit.org/show_bug.cgi?id=118498

        Reviewed by Geoffrey Garen.

        * jit/JITStubs.cpp:
        (throwExceptionFromOpCall):
        Created new throwExceptionFromOpCall that takes in a functor that contains
        a function pointer (to create the errorObject) instead of a JSValue. Inside
        of throwExceptionFromOpCall the topCallFrame is being rolled back in order
        to handle the error throw. By passing the function pointer in, we can defer
        the creation of the error object until after topCallFrame has been rolled 
        back. This allows the error object to be created with the appropriate top 
        frame.

        DEFINE_STUB_FUNCTION(void*, stack_check):
        DEFINE_STUB_FUNCTION(void*, op_call_arityCheck):
        DEFINE_STUB_FUNCTION(void*, op_construct_arityCheck):
        DEFINE_STUB_FUNCTION(EncodedJSValue, op_call_NotJSFunction):
        DEFINE_STUB_FUNCTION(EncodedJSValue, op_construct_NotJSConstruct):

        (JSC::ErrorFunctor::~ErrorFunctor):
        (JSC::ErrorWithExecFunctor::ErrorWithExecFunctor):
        (JSC::ErrorWithExecFunctor::operator()):
        (JSC::ErrorWithExecAndCalleeFunctor::ErrorWithExecAndCalleeFunctor):
        (JSC::ErrorWithExecAndCalleeFunctor::operator()):
        (JSC::ErrorWithExceptionFunctor::ErrorWithExceptionFunctor):
        (JSC::ErrorWithExceptionFunctor::operator()):
        (JSC::throwExceptionFromOpCall):

        In order to eliminate the need to duplicate code, an error functor was 
        created for the 3 different throwExceptionFromOpCall handles. 
        1. The exception needs to be created, and the function pointer takes 1 
            parameter(callFrame->callerFrame()).
        2. The exception needs to be created, and the function pointer takes 2 
            parameters (callFrame->callerFrame(), callFrame.calleeAsValue()).
        3. The exception is already created. In this case, At the time when 
3046
            the error functor is called, globalData.exception is returned. 
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063

        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * runtime/ExceptionHelpers.cpp:
        (JSC::errorDescriptionForValue):
        (JSC::createError):
        (JSC::createInvalidParameterError):
        (JSC::createNotAConstructorError):
        (JSC::createNotAFunctionError):
        (JSC::createNotAnObjectError):
        * runtime/ExceptionHelpers.h:

        The function toString() was being used to stringify an object for an exception
        message. If the user wrote a toString() for that object, then the system would 
        continue to evaluate that code. A new helper function was created to prevent 
        the system to continue execution and exception creation from that execution.

3064
3065
3066
3067
3068
3069
3070
3071
3072
2013-07-18  Filip Pizlo  <fpizlo@apple.com>

        LLInt get_argument_by_val for JSVALUE64 stores into the array profile when it meant to store into the value profile
        https://bugs.webkit.org/show_bug.cgi?id=118865

        Reviewed by Mark Hahnenberg.

        * llint/LowLevelInterpreter64.asm:

3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
2013-07-18  Andreas Kling  <akling@apple.com>

        CodeBlock::m_argumentValueProfiles wastes a lot of memory.
        <http://webkit.org/b/118852>
        <rdar://problem/14481659>

        Reviewed by Anders Carlsson.

        Use Vector::resizeToFit() for CodeBlock::m_argumentValueProfiles. We don't need any padding
        for growth, since we won't be appending to it anyway.

        921 KB progression on <http://twitter.com/awesomekling>

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::setNumParameters):

3089
3090
3091
3092
3093
3094
3095
3096
3097
2013-07-17  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, fix 32-bit after http://trac.webkit.org/changeset/152813

        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileNewFunctionNoCheck):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):

3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
2013-07-17  Geoffrey Garen  <ggaren@apple.com>

        API tests should test for JSStringCreateWithCFString with empty string
        https://bugs.webkit.org/show_bug.cgi?id=118819

        Reviewed by Mark Hahnenberg.

        * API/tests/testapi.c:
        (main): Test!

3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
2013-07-17  Filip Pizlo  <fpizlo@apple.com>

        DFG assumes that NewFunction will never pass its input through
        https://bugs.webkit.org/show_bug.cgi?id=118798

        Reviewed by Sam Weinig.
        
        Previously the DFG was assuming that NewFunction always returns a function. That's not
        the case. It may return whatever was passed to it, if it wasn't passed SpecEmpty.
        
        This fact needed to be wired through the compiler.

        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::executeEffects):
        * dfg/DFGAbstractValue.h:
        (JSC::DFG::AbstractValue::makeTop):
        * dfg/DFGGraph.cpp:
        (JSC::DFG::Graph::dump):
        * dfg/DFGOperations.cpp:
        * dfg/DFGOperations.h:
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        * dfg/DFGSpeculativeJIT.h:
        (JSC::DFG::SpeculativeJIT::callOperation):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):

3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
2013-07-17  Geoffrey Garen  <ggaren@apple.com>

        JSStringCreateWithCFString should not convert the empty string into the NULL string
        https://bugs.webkit.org/show_bug.cgi?id=118816

        Reviewed by Sam Weinig.

        * API/JSStringRef.cpp:
        (JSStringCreateWithUTF8CString): Removed an extraneous comment, which
        a previous version of the patch made incorrect.

        * API/JSStringRefCF.cpp:
        (JSStringCreateWithCFString): Don't convert the empty string into the
        null string.

3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
2013-07-17  Chris Curtis  <chris_curtis@apple.com>

        Naming convention on createInvalidParamError is incorrect.
        https://bugs.webkit.org/show_bug.cgi?id=118756

        Reviewed by Geoffrey Garen.
        
        Changed the naming of createInvalidParamError to createInvalidParameterError.
        This corrects the naming convention for the function listed in the WebKit code styling.

        * interpreter/Interpreter.cpp:
        (JSC::loadVarargs):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * runtime/CommonSlowPaths.h:
        (JSC::CommonSlowPaths::opIn):
        * runtime/ExceptionHelpers.cpp:
        (JSC::createInvalidParameterError):
        * runtime/ExceptionHelpers.h:
        * runtime/JSObject.cpp:
        (JSC::JSObject::hasInstance):

3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
2013-07-16  David Farler  <dfarler@apple.com>

        Typo in DFGInsertionSet.h header guard: "DFGInsectionSet_h" -> "DFGInsertionSet_h"
        https://bugs.webkit.org/show_bug.cgi?id=118753

        Reviewed by Geoffrey Garen.

        * dfg/DFGInsertionSet.h:
        "DFGInsectionSet_h" -> "DFGInsertionSet_h"

3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
2013-07-16  Filip Pizlo  <fpizlo@apple.com>

        MakeRope fixup shouldn't lead to an Identity without kids
        https://bugs.webkit.org/show_bug.cgi?id=118745

        Reviewed by Mark Hahnenberg.
        
        Make the empty string pruning part of fixupMakeRope() stop if it's on the last child.
        
        Make Node::convertToIdentity release-assert that it has exactly one kid.

        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupMakeRope):
        * dfg/DFGNode.h:
        (JSC::DFG::Node::convertToIdentity):

3202
3203
3204
3205
3206
3207
3208
3209
3210
2013-07-16  Mark Hahnenberg  <mhahnenberg@apple.com>

        Remove reference to JSValueStructSupport.h from JSExport.h
        https://bugs.webkit.org/show_bug.cgi?id=118746

        Reviewed by Filip Pizlo.

        * API/JSExport.h: No such header exists, so it doesn't make sense to reference it.

3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
2013-07-13  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r151978.
        http://trac.webkit.org/changeset/151978
        https://bugs.webkit.org/show_bug.cgi?id=118651

        Caused regressions at least 3 websites (Requested by rniwa on
        #webkit).

        * runtime/JSCJSValue.h:
        * runtime/JSString.h:

3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
2013-07-12  Chris Curtis    <chris_curtis@apple.com>

        Optimize addStrackTraceIfNecessary to be faster in the case when it's not necessary
        https://bugs.webkit.org/show_bug.cgi?id=118328

        Reviewed by Geoffrey Garen.

        Retrieving the stack is costly. We want to get it only once. By moving the check
        for the .stack property above the code to retrieve the stack, we ensure this. 

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::addStackTraceIfNecessary):

3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
2013-07-12  Brent Fulgham  <bfulgham@apple.com>

        [Windows] Build correction after r152573/r152577.
        https://bugs.webkit.org/show_bug.cgi?id=118610

        Reviewed by Oliver Hunt.

        * jit/JITThunks.cpp:
        (JSC::JITThunks::hostFunctionStub): Hand-feed MSVC++ the fact that we want the second
        argument of the make_pair to be a function pointer.

3247
3248
3249
3250
3251
3252
3253
3254
2013-07-11  Oliver Hunt  <oliver@apple.com>

        Attempt to fix the windows build.

        * jit/JITThunks.cpp:
        (JSC::JITThunks::hostFunctionStub):
        * jit/JITThunks.h:

3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
2013-07-10  Oliver Hunt  <oliver@apple.com>

        NativeExecutable cache needs to use both call and construct functions for key
        https://bugs.webkit.org/show_bug.cgi?id=118545

        Reviewed by Geoffrey Garen.

        Make the native executable cache make use a key pair so we don't decide to
        treat all subsequent functions as not being constructors.

        * jit/JITThunks.cpp:
        (JSC::JITThunks::hostFunctionStub):
        * jit/JITThunks.h:
        * runtime/JSBoundFunction.cpp:
        (JSC::JSBoundFunction::create):
        * runtime/JSCell.cpp:
        (JSC::JSCell::getCallData):
        (JSC::JSCell::getConstructData):

3274
3275
3276
3277
3278
3279
3280
3281
2013-07-09  Mark Lam  <mark.lam@apple.com>

        Gardening to unbreak builds on the Windows bot.

        Not reviewed.

        * parser/ParserTokens.h:

3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483