ChangeLog 758 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
2013-08-22  Mark Hahnenberg  <mhahnenberg@apple.com>

        JSObject and JSArray code shouldn't have to tiptoe around garbage collection
        https://bugs.webkit.org/show_bug.cgi?id=120179

        Reviewed by Geoffrey Garen.

        There are many places in the code for JSObject and JSArray where they are manipulating their 
        Butterfly/Structure, e.g. after expanding their out-of-line backing storage via allocating. Within 
        these places there are certain "critical sections" where a GC would be disastrous. Gen GC looks 
        like it will make this dance even more intricate. To make everybody's lives easier we should use 
        the DeferGC mechanism in these functions to make these GC critical sections both obvious in the 
        code and trivially safe. Deferring collections will usually only last marginally longer, thus we 
        should not incur any additional overhead.

        * heap/Heap.h:
        * runtime/JSArray.cpp:
        (JSC::JSArray::unshiftCountSlowCase):
        * runtime/JSObject.cpp:
        (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists):
        (JSC::JSObject::createInitialUndecided):
        (JSC::JSObject::createInitialInt32):
        (JSC::JSObject::createInitialDouble):
        (JSC::JSObject::createInitialContiguous):
        (JSC::JSObject::createArrayStorage):
        (JSC::JSObject::convertUndecidedToArrayStorage):
        (JSC::JSObject::convertInt32ToArrayStorage):
        (JSC::JSObject::convertDoubleToArrayStorage):
        (JSC::JSObject::convertContiguousToArrayStorage):
        (JSC::JSObject::increaseVectorLength):
        (JSC::JSObject::ensureLengthSlow):
        * runtime/JSObject.h:
        (JSC::JSObject::putDirectInternal):
        (JSC::JSObject::setStructureAndReallocateStorageIfNecessary):
        (JSC::JSObject::putDirectWithoutTransition):

37
38
39
40
41
42
43
44
45
46
2013-08-22  Filip Pizlo  <fpizlo@apple.com>

        Update LLVM binary drops and scripts to the latest version from SVN
        https://bugs.webkit.org/show_bug.cgi?id=120184

        Reviewed by Mark Hahnenberg.

        * dfg/DFGPlan.cpp:
        (JSC::DFG::Plan::compileInThreadImpl):

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
2013-08-22  Gavin Barraclough  <barraclough@apple.com>

        Don't leak registers for redeclared variables
        https://bugs.webkit.org/show_bug.cgi?id=120174

        Reviewed by Geoff Garen.

        We currently always allocate registers for new global variables, but these are wasted when the variable is being redeclared.
        Only allocate new registers when necessary.

        No performance impact.

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):
        * runtime/Executable.cpp:
        (JSC::ProgramExecutable::initializeGlobalProperties):
            - Don't allocate the register here.
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::addGlobalVar):
            - Allocate the register here instead.

68
69
70
71
72
73
74
75
76
77
78
2013-08-22  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120128
        Remove putDirectVirtual

        Unreviewed, checked in commented out code. :-(

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):
            - delete commented out code

79
80
81
82
83
84
85
86
87
88
89
90
91
2013-08-22  Gavin Barraclough  <barraclough@apple.com>

        Error.stack should not be enumerable
        https://bugs.webkit.org/show_bug.cgi?id=120171

        Reviewed by Oliver Hunt.

        Breaks ECMA tests.

        * runtime/ErrorInstance.cpp:
        (JSC::ErrorInstance::finishCreation):
            - None -> DontEnum

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
2013-08-21  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120128
        Remove putDirectVirtual

        Reviewed by Sam Weinig.

        This could most generously be described as 'vestigial'.
        No performance impact.

        * API/JSObjectRef.cpp:
        (JSObjectSetProperty):
            - changed to use defineOwnProperty
        * debugger/DebuggerActivation.cpp:
        * debugger/DebuggerActivation.h:
            - remove putDirectVirtual
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):
            - changed to use defineOwnProperty
        * runtime/ClassInfo.h:
        * runtime/JSActivation.cpp:
        * runtime/JSActivation.h:
        * runtime/JSCell.cpp:
        * runtime/JSCell.h:
        * runtime/JSGlobalObject.cpp:
        * runtime/JSGlobalObject.h:
        * runtime/JSObject.cpp:
        * runtime/JSObject.h:
        * runtime/JSProxy.cpp:
        * runtime/JSProxy.h:
        * runtime/JSSymbolTableObject.cpp:
        * runtime/JSSymbolTableObject.h:
            - remove putDirectVirtual
        * runtime/PropertyDescriptor.h:
        (JSC::PropertyDescriptor::PropertyDescriptor):
            - added constructor for convenience

129
130
131
132
133
134
135
136
137
138
139
140
2013-08-22  Chris Curtis  <chris_curtis@apple.com>

        errorDescriptionForValue() should not assume error value is an Object
        https://bugs.webkit.org/show_bug.cgi?id=119812

        Reviewed by Geoffrey Garen.

        Added a check to make sure that the JSValue was an object before casting it as an object. Also, in case the parameterized JSValue
        has no type, the function now returns the empty string. 
        * runtime/ExceptionHelpers.cpp:
        (JSC::errorDescriptionForValue):

141
142
143
144
145
146
147
148
149
150
151
152
2013-08-22  Julien Brianceau  <jbrianceau@nds.com>

        Fix P_DFGOperation_EJS call for MIPS and ARM EABI.
        https://bugs.webkit.org/show_bug.cgi?id=120107

        Reviewed by Yong Li.

        EncodedJSValue parameters must be aligned to even registers for MIPS and ARM EABI.

        * dfg/DFGSpeculativeJIT.h:
        (JSC::DFG::SpeculativeJIT::callOperation):

153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
2013-08-21  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r154416.
        http://trac.webkit.org/changeset/154416
        https://bugs.webkit.org/show_bug.cgi?id=120147

        Broke Windows builds (Requested by rniwa on #webkit).

        * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make:
        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make:
        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh:
        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make:
        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh:
        * JavaScriptCore.vcxproj/build-generated-files.sh:

168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
2013-08-21  Gavin Barraclough  <barraclough@apple.com>

        Clarify var/const/function declaration
        https://bugs.webkit.org/show_bug.cgi?id=120144

        Reviewed by Sam Weinig.

        Add methods to JSGlobalObject to declare vars, consts, and functions.

        * runtime/Executable.cpp:
        (JSC::ProgramExecutable::initializeGlobalProperties):
        * runtime/Executable.h:
            - Moved declaration code to JSGlobalObject
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::addGlobalVar):
            - internal implementation of addVar, addConst, addFunction
        * runtime/JSGlobalObject.h:
        (JSC::JSGlobalObject::addVar):
        (JSC::JSGlobalObject::addConst):
        (JSC::JSGlobalObject::addFunction):
            - Added methods to declare vars, consts, and functions

190
191
192
193
194
195
196
197
198
199
200
201
2013-08-21  Yi Shen  <max.hong.shen@gmail.com>

        https://bugs.webkit.org/show_bug.cgi?id=119900
        Exception in global setter doesn't unwind correctly

        Reviewed by Geoffrey Garen.

        Call VM_THROW_EXCEPTION_AT_END in op_put_to_scope if the setter throws exception.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):

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
2013-08-21  Mark Hahnenberg  <mhahnenberg@apple.com>

        Rename/refactor setButterfly/setStructure
        https://bugs.webkit.org/show_bug.cgi?id=120138

        Reviewed by Geoffrey Garen.

        setButterfly becomes setStructureAndButterfly.

        Also removed the Butterfly* argument from setStructure and just implicitly
        used m_butterfly internally since that's what every single client of setStructure
        was doing already.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * runtime/JSObject.cpp:
        (JSC::JSObject::notifyPresenceOfIndexedAccessors):
        (JSC::JSObject::createInitialUndecided):
        (JSC::JSObject::createInitialInt32):
        (JSC::JSObject::createInitialDouble):
        (JSC::JSObject::createInitialContiguous):
        (JSC::JSObject::createArrayStorage):
        (JSC::JSObject::convertUndecidedToInt32):
        (JSC::JSObject::convertUndecidedToDouble):
        (JSC::JSObject::convertUndecidedToContiguous):
        (JSC::JSObject::convertUndecidedToArrayStorage):
        (JSC::JSObject::convertInt32ToDouble):
        (JSC::JSObject::convertInt32ToContiguous):
        (JSC::JSObject::convertInt32ToArrayStorage):
        (JSC::JSObject::genericConvertDoubleToContiguous):
        (JSC::JSObject::convertDoubleToArrayStorage):
        (JSC::JSObject::convertContiguousToArrayStorage):
        (JSC::JSObject::switchToSlowPutArrayStorage):
        (JSC::JSObject::setPrototype):
        (JSC::JSObject::putDirectAccessor):
        (JSC::JSObject::seal):
        (JSC::JSObject::freeze):
        (JSC::JSObject::preventExtensions):
        (JSC::JSObject::reifyStaticFunctionsForDelete):
        (JSC::JSObject::removeDirect):
        * runtime/JSObject.h:
        (JSC::JSObject::setStructureAndButterfly):
        (JSC::JSObject::setStructure):
        (JSC::JSObject::putDirectInternal):
        (JSC::JSObject::setStructureAndReallocateStorageIfNecessary):
        (JSC::JSObject::putDirectWithoutTransition):
        * runtime/Structure.cpp:
        (JSC::Structure::flattenDictionaryStructure):

251
252
253
254
255
256
257
258
259
260
2013-08-21  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120127
        Remove JSObject::propertyIsEnumerable

        Unreviewed typo fix

        * runtime/JSObject.h:
            - fix typo

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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
2013-08-21  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120139
        PropertyDescriptor argument to define methods should be const

        Rubber stamped by Sam Weinig.

        This should never be modified, and this way we can use rvalues.

        * debugger/DebuggerActivation.cpp:
        (JSC::DebuggerActivation::defineOwnProperty):
        * debugger/DebuggerActivation.h:
        * runtime/Arguments.cpp:
        (JSC::Arguments::defineOwnProperty):
        * runtime/Arguments.h:
        * runtime/ClassInfo.h:
        * runtime/JSArray.cpp:
        (JSC::JSArray::defineOwnProperty):
        * runtime/JSArray.h:
        * runtime/JSArrayBuffer.cpp:
        (JSC::JSArrayBuffer::defineOwnProperty):
        * runtime/JSArrayBuffer.h:
        * runtime/JSArrayBufferView.cpp:
        (JSC::JSArrayBufferView::defineOwnProperty):
        * runtime/JSArrayBufferView.h:
        * runtime/JSCell.cpp:
        (JSC::JSCell::defineOwnProperty):
        * runtime/JSCell.h:
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::defineOwnProperty):
        * runtime/JSFunction.h:
        * runtime/JSGenericTypedArrayView.h:
        * runtime/JSGenericTypedArrayViewInlines.h:
        (JSC::::defineOwnProperty):
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::defineOwnProperty):
        * runtime/JSGlobalObject.h:
        * runtime/JSObject.cpp:
        (JSC::JSObject::putIndexedDescriptor):
        (JSC::JSObject::defineOwnIndexedProperty):
        (JSC::putDescriptor):
        (JSC::JSObject::defineOwnNonIndexProperty):
        (JSC::JSObject::defineOwnProperty):
        * runtime/JSObject.h:
        * runtime/JSProxy.cpp:
        (JSC::JSProxy::defineOwnProperty):
        * runtime/JSProxy.h:
        * runtime/RegExpMatchesArray.h:
        (JSC::RegExpMatchesArray::defineOwnProperty):
        * runtime/RegExpObject.cpp:
        (JSC::RegExpObject::defineOwnProperty):
        * runtime/RegExpObject.h:
        * runtime/StringObject.cpp:
        (JSC::StringObject::defineOwnProperty):
        * runtime/StringObject.h:
            - make PropertyDescriptor const

318
319
320
321
322
323
324
325
326
327
328
329
2013-08-21  Filip Pizlo  <fpizlo@apple.com>

        REGRESSION: Crash under JITCompiler::link while loading Gmail
        https://bugs.webkit.org/show_bug.cgi?id=119872

        Reviewed by Mark Hahnenberg.
        
        Apparently, unsigned + signed = unsigned. Work around it with a cast.

        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::parseBlock):

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
2013-08-21  Alex Christensen  <achristensen@apple.com>

        <https://webkit.org/b/120137> Separating Win32 and Win64 builds.

        Reviewed by Brent Fulgham.

        * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make:
        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make:
        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make:
        Pass PlatformArchitecture as a command line parameter to bash scripts.
        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh:
        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh:
        * JavaScriptCore.vcxproj/build-generated-files.sh:
        Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).

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
2013-08-21  Filip Pizlo  <fpizlo@apple.com>

        Assertion failure in JSC::SlotVisitor::copyLater when marking JSDataView
        https://bugs.webkit.org/show_bug.cgi?id=120099

        Reviewed by Mark Hahnenberg.
        
        JSDataView should not store the ArrayBuffer* in the butterfly indexing header, since
        JSDataView may have ordinary JS indexed properties.

        * runtime/ClassInfo.h:
        * runtime/JSArrayBufferView.cpp:
        (JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
        (JSC::JSArrayBufferView::finishCreation):
        * runtime/JSArrayBufferView.h:
        (JSC::hasArrayBuffer):
        * runtime/JSArrayBufferViewInlines.h:
        (JSC::JSArrayBufferView::buffer):
        (JSC::JSArrayBufferView::neuter):
        (JSC::JSArrayBufferView::byteOffset):
        * runtime/JSCell.cpp:
        (JSC::JSCell::slowDownAndWasteMemory):
        * runtime/JSCell.h:
        * runtime/JSDataView.cpp:
        (JSC::JSDataView::JSDataView):
        (JSC::JSDataView::create):
        (JSC::JSDataView::slowDownAndWasteMemory):
        * runtime/JSDataView.h:
        (JSC::JSDataView::buffer):
        * runtime/JSGenericTypedArrayView.h:
        * runtime/JSGenericTypedArrayViewInlines.h:
        (JSC::::visitChildren):
        (JSC::::slowDownAndWasteMemory):

379
380
381
382
383
384
385
386
387
2013-08-21  Mark Hahnenberg  <mhahnenberg@apple.com>

        Remove incorrect ASSERT from CopyVisitor::visitItem

        Rubber stamped by Filip Pizlo.

        * heap/CopyVisitorInlines.h:
        (JSC::CopyVisitor::visitItem):

388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
2013-08-21  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120127
        Remove JSObject::propertyIsEnumerable

        Reviewed by Sam Weinig.

        This method is just a wart - it contains unnecessary const-casting, function call overhead, and LOC.

        * runtime/JSObject.cpp:
        * runtime/JSObject.h:
            - remove propertyIsEnumerable
        * runtime/ObjectPrototype.cpp:
        (JSC::objectProtoFuncPropertyIsEnumerable):
            - Move implementation here using getOwnPropertyDescriptor directly.

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
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
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
2013-08-20  Filip Pizlo  <fpizlo@apple.com>

        DFG should inline new typedArray()
        https://bugs.webkit.org/show_bug.cgi?id=120022

        Reviewed by Oliver Hunt.
        
        Adds inlining of typed array allocations in the DFG. Any operation of the
        form:
        
            new foo(blah)
        
        or:
        
            foo(blah)
        
        where 'foo' is a typed array constructor and 'blah' is exactly one argument,
        is turned into the NewTypedArray intrinsic. Later, of child1 (i.e. 'blah')
        is predicted integer, we generate inline code for an allocation. Otherwise
        it turns into a call to an operation that behaves like the constructor would
        if it was passed one argument (i.e. it may wrap a buffer or it may create a
        copy or another array, or it may allocate an array of that length).

        * bytecode/SpeculatedType.cpp:
        (JSC::speculationFromTypedArrayType):
        (JSC::speculationFromClassInfo):
        * bytecode/SpeculatedType.h:
        * dfg/DFGAbstractInterpreterInlines.h:
        (JSC::DFG::::executeEffects):
        * dfg/DFGBackwardsPropagationPhase.cpp:
        (JSC::DFG::BackwardsPropagationPhase::propagate):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::handleTypedArrayConstructor):
        (JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
        * dfg/DFGCCallHelpers.h:
        (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::putStructureStoreElimination):
        * dfg/DFGClobberize.h:
        (JSC::DFG::clobberize):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        * dfg/DFGGraph.cpp:
        (JSC::DFG::Graph::dump):
        * dfg/DFGNode.h:
        (JSC::DFG::Node::hasTypedArrayType):
        (JSC::DFG::Node::typedArrayType):
        * dfg/DFGNodeType.h:
        * dfg/DFGOperations.cpp:
        (JSC::DFG::newTypedArrayWithSize):
        (JSC::DFG::newTypedArrayWithOneArgument):
        * dfg/DFGOperations.h:
        (JSC::DFG::operationNewTypedArrayWithSizeForType):
        (JSC::DFG::operationNewTypedArrayWithOneArgumentForType):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        * dfg/DFGSafeToExecute.h:
        (JSC::DFG::safeToExecute):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileNewTypedArray):
        * dfg/DFGSpeculativeJIT.h:
        (JSC::DFG::SpeculativeJIT::callOperation):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_new_object):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::emit_op_new_object):
        * runtime/JSArray.h:
        (JSC::JSArray::allocationSize):
        * runtime/JSArrayBufferView.h:
        (JSC::JSArrayBufferView::allocationSize):
        * runtime/JSGenericTypedArrayViewConstructorInlines.h:
        (JSC::constructGenericTypedArrayView):
        * runtime/JSObject.h:
        (JSC::JSFinalObject::allocationSize):
        * runtime/TypedArrayType.cpp:
        (JSC::constructorClassInfoForType):
        * runtime/TypedArrayType.h:
        (JSC::indexToTypedArrayType):

487
488
489
490
491
492
493
494
2013-08-21  Julien Brianceau  <jbrianceau@nds.com>

        <https://webkit.org/b/120106> Fix V_DFGOperation_EJPP signature in DFG.

        Reviewed by Geoffrey Garen.

        * dfg/DFGOperations.h:

495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
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
2013-08-20  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120093
        Remove getOwnPropertyDescriptor trap

        Reviewed by Geoff Garen.

        All implementations of this method are now called via the method table, and equivalent in behaviour.
        Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject.

        * API/JSCallbackObject.h:
        * API/JSCallbackObjectFunctions.h:
        * debugger/DebuggerActivation.cpp:
        * debugger/DebuggerActivation.h:
        * runtime/Arguments.cpp:
        * runtime/Arguments.h:
        * runtime/ArrayConstructor.cpp:
        * runtime/ArrayConstructor.h:
        * runtime/ArrayPrototype.cpp:
        * runtime/ArrayPrototype.h:
        * runtime/BooleanPrototype.cpp:
        * runtime/BooleanPrototype.h:
            - remove getOwnPropertyDescriptor
        * runtime/ClassInfo.h:
            - remove getOwnPropertyDescriptor from MethodTable
        * runtime/DateConstructor.cpp:
        * runtime/DateConstructor.h:
        * runtime/DatePrototype.cpp:
        * runtime/DatePrototype.h:
        * runtime/ErrorPrototype.cpp:
        * runtime/ErrorPrototype.h:
        * runtime/JSActivation.cpp:
        * runtime/JSActivation.h:
        * runtime/JSArray.cpp:
        * runtime/JSArray.h:
        * runtime/JSArrayBuffer.cpp:
        * runtime/JSArrayBuffer.h:
        * runtime/JSArrayBufferView.cpp:
        * runtime/JSArrayBufferView.h:
        * runtime/JSCell.cpp:
        * runtime/JSCell.h:
        * runtime/JSDataView.cpp:
        * runtime/JSDataView.h:
        * runtime/JSDataViewPrototype.cpp:
        * runtime/JSDataViewPrototype.h:
        * runtime/JSFunction.cpp:
        * runtime/JSFunction.h:
        * runtime/JSGenericTypedArrayView.h:
        * runtime/JSGenericTypedArrayViewInlines.h:
        * runtime/JSGlobalObject.cpp:
        * runtime/JSGlobalObject.h:
        * runtime/JSNotAnObject.cpp:
        * runtime/JSNotAnObject.h:
        * runtime/JSONObject.cpp:
        * runtime/JSONObject.h:
            - remove getOwnPropertyDescriptor
        * runtime/JSObject.cpp:
        (JSC::JSObject::propertyIsEnumerable):
            - switch to call new getOwnPropertyDescriptor member function
        (JSC::JSObject::getOwnPropertyDescriptor):
            - new, based on imlementation from GET_OWN_PROPERTY_DESCRIPTOR_IMPL
        (JSC::JSObject::defineOwnNonIndexProperty):
            - switch to call new getOwnPropertyDescriptor member function
        * runtime/JSObject.h:
        * runtime/JSProxy.cpp:
        * runtime/JSProxy.h:
        * runtime/NamePrototype.cpp:
        * runtime/NamePrototype.h:
        * runtime/NumberConstructor.cpp:
        * runtime/NumberConstructor.h:
        * runtime/NumberPrototype.cpp:
        * runtime/NumberPrototype.h:
            - remove getOwnPropertyDescriptor
        * runtime/ObjectConstructor.cpp:
        (JSC::objectConstructorGetOwnPropertyDescriptor):
        (JSC::objectConstructorSeal):
        (JSC::objectConstructorFreeze):
        (JSC::objectConstructorIsSealed):
        (JSC::objectConstructorIsFrozen):
            - switch to call new getOwnPropertyDescriptor member function
        * runtime/ObjectConstructor.h:
            - remove getOwnPropertyDescriptor
        * runtime/PropertyDescriptor.h:
            - remove GET_OWN_PROPERTY_DESCRIPTOR_IMPL
        * runtime/RegExpConstructor.cpp:
        * runtime/RegExpConstructor.h:
        * runtime/RegExpMatchesArray.cpp:
        * runtime/RegExpMatchesArray.h:
        * runtime/RegExpObject.cpp:
        * runtime/RegExpObject.h:
        * runtime/RegExpPrototype.cpp:
        * runtime/RegExpPrototype.h:
        * runtime/StringConstructor.cpp:
        * runtime/StringConstructor.h:
        * runtime/StringObject.cpp:
        * runtime/StringObject.h:
            - remove getOwnPropertyDescriptor

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-08-20  Mark Hahnenberg  <mhahnenberg@apple.com>

        <https://webkit.org/b/120079> Flattening a dictionary can cause CopiedSpace corruption

        Reviewed by Oliver Hunt.

        When we flatten an object in dictionary mode, we compact its properties. If the object 
        had out-of-line storage in the form of a Butterfly prior to this compaction, and after 
        compaction its properties fit inline, the object's Structure "forgets" that the object 
        has a non-zero Butterfly pointer. During GC, we check the Butterfly and reportLiveBytes 
        with bytes = 0, which causes all sorts of badness in CopiedSpace.

        Instead, after we flatten a dictionary, if properties fit inline we should clear the 
        Butterfly pointer so that the GC doesn't get confused later.

        This patch does this clearing, and it also adds JSObject::checkStructure, which overrides
        JSCell::checkStructure to add an ASSERT that makes sure that the Structure being assigned
        agrees with the whether or not the object has a Butterfly. Also added an ASSERT to check
        that the number of bytes reported to SlotVisitor::copyLater is non-zero.

        * heap/SlotVisitorInlines.h:
        (JSC::SlotVisitor::copyLater):
        * runtime/JSObject.cpp:
        (JSC::JSObject::notifyPresenceOfIndexedAccessors):
        (JSC::JSObject::convertUndecidedToInt32):
        (JSC::JSObject::convertUndecidedToDouble):
        (JSC::JSObject::convertUndecidedToContiguous):
        (JSC::JSObject::convertInt32ToDouble):
        (JSC::JSObject::convertInt32ToContiguous):
        (JSC::JSObject::genericConvertDoubleToContiguous):
        (JSC::JSObject::switchToSlowPutArrayStorage):
        (JSC::JSObject::setPrototype):
        (JSC::JSObject::putDirectAccessor):
        (JSC::JSObject::seal):
        (JSC::JSObject::freeze):
        (JSC::JSObject::preventExtensions):
        (JSC::JSObject::reifyStaticFunctionsForDelete):
        (JSC::JSObject::removeDirect):
        * runtime/JSObject.h:
        (JSC::JSObject::setButterfly):
        (JSC::JSObject::putDirectInternal):
        (JSC::JSObject::setStructure):
        (JSC::JSObject::setStructureAndReallocateStorageIfNecessary):
        * runtime/Structure.cpp:
        (JSC::Structure::flattenDictionaryStructure):

639
640
641
642
643
644
645
646
647
648
2013-08-20  Alex Christensen  <achristensen@apple.com>

        Compile fix for Win64 after r154156.

        Rubber stamped by Oliver Hunt.

        * jit/JITStubsMSVC64.asm:
        Renamed ctiVMThrowTrampolineSlowpath to ctiVMHandleException and
        cti_vm_throw_slowpath to cti_vm_handle_exception.

649
650
651
652
653
654
655
656
657
658
659
660
661
662
2013-08-20  Alex Christensen  <achristensen@apple.com>

        <https://webkit.org/b/120076> More work towards a Win64 build

        Reviewed by Brent Fulgham.

        * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make:
        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make:
        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make:
        * JavaScriptCore.vcxproj/copy-files.cmd:
        * JavaScriptCore.vcxproj/jsc/jscCommon.props:
        * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props:
        Use PlatformArchitecture macro instead of bin32, lib32, and obj32.

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
2013-08-20  Mark Hahnenberg  <mhahnenberg@apple.com>

        <https://webkit.org/b/119919> Concurrent JIT crashes in various fast/js/dfg-* tests while the main thread is setting innerHTML

        Reviewed by Geoffrey Garen.

        More fixes for WriteBarrier deferral during concurrent JIT-ing. This patch makes the use of DesiredWriteBarriers class and the 
        initializeLazyWriteBarrierFor* wrapper functions more sane. 

        Refactored DesiredWriteBarrier to require an owner, a type, a CodeBlock, and an index. The type indicates how to use the CodeBlock
        and index when triggering the WriteBarrier at the end of compilation. 

        The client code of initializeLazy* is now responsible for creating the WriteBarrier that will be initialized as well as passing
        in the relevant index to be used at the end of compilation. Things were kind of muddled before in that one function did a 
        little extra work that really shouldn't have been its responsibility.

        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::addConstant):
        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
        * dfg/DFGDesiredWriteBarriers.cpp:
        (JSC::DFG::DesiredWriteBarrier::DesiredWriteBarrier):
        (JSC::DFG::DesiredWriteBarrier::trigger):
        * dfg/DFGDesiredWriteBarriers.h:
        (JSC::DFG::DesiredWriteBarriers::add):
        (JSC::DFG::initializeLazyWriteBarrierForInlineCallFrameExecutable):
        (JSC::DFG::initializeLazyWriteBarrierForInlineCallFrameCallee):
        (JSC::DFG::initializeLazyWriteBarrierForConstant):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::truncateConstantToInt32):
        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::constantRegisterForConstant):

695
696
697
698
699
700
701
702
703
704
705
2013-08-20  Michael Saboff  <msaboff@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120075
        REGRESSION (r128400): BBC4 website not displaying pictures

        Reviewed by Oliver Hunt.

        * runtime/RegExpMatchesArray.h:
        (JSC::RegExpMatchesArray::createStructure): Changed the array IndexingType to be ArrayWithSlowPutArrayStorage
        so that the match results will be reified before any other modification to the results array.

706
707
708
709
710
711
712
713
714
715
716
717
718
719
2013-08-19  Filip Pizlo  <fpizlo@apple.com>

        Incorrect behavior on emscripten-compiled cube2hash
        https://bugs.webkit.org/show_bug.cgi?id=120033

        Reviewed by Mark Hahnenberg.
        
        If PutClosureVar is may-aliased to another PutClosureVar or GetClosureVar
        then we should bail attempts to CSE.

        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::scopedVarLoadElimination):
        (JSC::DFG::CSEPhase::scopedVarStoreElimination):

720
721
722
723
724
725
726
727
728
729
730
731
732
2013-08-20  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120073
        Remove use of GOPD from JSFunction::defineProperty

        Reviewed by Oliver Hunt.

        Call getOwnPropertySlot to check for existing properties instead.

        * runtime/JSFunction.cpp:
        (JSC::JSFunction::defineOwnProperty):
            - getOwnPropertyDescriptor -> getOwnPropertySlot

733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
2013-08-20  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120067
        Remove getPropertyDescriptor

        Reviewed by Oliver Hunt.

        This is used by lookupGetter/lookupSetter - this can easily bee replaced by getPropertySlot.
        Since we'll be getting the GetterSetter from the slot in the setter case, rename isGetter() to isAccessor().

        * runtime/JSObject.cpp:
        * runtime/JSObject.h:
            - remove getPropertyDescriptor
        * runtime/ObjectPrototype.cpp:
        (JSC::objectProtoFuncLookupGetter):
        (JSC::objectProtoFuncLookupSetter):
            - replace call to getPropertyDescriptor with getPropertySlot
        * runtime/PropertyDescriptor.h:
        * runtime/PropertySlot.h:
        (JSC::PropertySlot::isAccessor):
        (JSC::PropertySlot::isCacheableGetter):
        (JSC::PropertySlot::getterSetter):
            - rename isGetter() to isAccessor()

757
758
759
760
761
762
763
764
765
766
767
2013-08-20  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120054
        Remove some dead code following getOwnPropertyDescriptor cleanup

        Reviewed by Oliver Hunt.

        * runtime/Lookup.h:
        (JSC::getStaticFunctionSlot):
            - remove getStaticPropertyDescriptor, getStaticFunctionDescriptor, getStaticValueDescriptor.

768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
2013-08-20  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120052
        Remove custom getOwnPropertyDescriptor for JSProxy

        Reviewed by Geoff Garen.

        GET_OWN_PROPERTY_DESCRIPTOR_IMPL runs afoul with JSProxy due to the workaround for JSDOMWindow's broken behavior.
        Because the window object incorrectly searches the prototype chain in getOwnPropertySlot we check that the base
        object matches, but in the case of JSProxy we can end up comparing the window object to the window shell & falsely
        assuming this is a prototype property. Add toThis conversion to correctly identify proxied own access. I've kept
        the original slotBase check as a fast case, and also so that direct access on JSDOMWindow still works.

        * runtime/JSProxy.cpp:
            - Remove custom getOwnPropertyDescriptor implementation.
        * runtime/PropertyDescriptor.h:
            - Modify own property access check to perform toThis conversion.

786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
2013-08-20  Alex Christensen  <achristensen@apple.com>

        Use PlatformArchitecture to distinguish between 32-bit and 64-bit builds on Windows.
        https://bugs.webkit.org/show_bug.cgi?id=119512

        Reviewed by Brent Fulgham.

        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
        * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props:
        Replaced obj32, bin32, and lib32 with macros for 64-bit build.

802
803
804
805
806
807
808
809
810
811
812
813
814
2013-08-20  Julien Brianceau  <jbrianceau@nds.com>

        <https://webkit.org/b/120062> Missing ensureSpace call in sh4 baseline JIT.

        Reviewed by Allan Sandfeld Jensen.

        branchPtrWithPatch() of baseline JIT must ensure that space is available for its
        instructions and two constants now DFG is enabled for sh4 architecture.
        These missing ensureSpace calls lead to random crashes.

        * assembler/MacroAssemblerSH4.h:
        (JSC::MacroAssemblerSH4::branchPtrWithPatch):

815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
2013-08-19  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120034
        Remove custom getOwnPropertyDescriptor for global objects

        Reviewed by Geoff Garen.

        Fix attributes of JSC SynbolTableObject entries, ensure that cross frame access is safe, and suppress prototype chain walk.

        * runtime/JSGlobalObject.cpp:
            - Remove custom getOwnPropertyDescriptor implementation.
        * runtime/JSSymbolTableObject.h:
        (JSC::symbolTableGet):
            - The symbol table does not store the DontDelete attribute, we should be adding it back in.
        * runtime/PropertyDescriptor.h:
            - JSDOMWindow walks the prototype chain on own access. This is bad, but for now workaround for the getOwnPropertyDescriptor case.
        * runtime/PropertySlot.h:
        (JSC::PropertySlot::setUndefined):
            - This is used by WebCore when blocking access to properties on cross-frame access.
              Mark blocked properties as read-only, non-configurable to prevent defineProperty.

836
837
838
839
840
841
842
843
844
845
846
847
848
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
2013-08-17  Filip Pizlo  <fpizlo@apple.com>

        DFG should inline typedArray.byteOffset
        https://bugs.webkit.org/show_bug.cgi?id=119962

        Reviewed by Oliver Hunt.
        
        This adds a new node, GetTypedArrayByteOffset, which inlines
        typedArray.byteOffset.
        
        Also, I improved a bunch of the clobbering logic related to typed arrays
        and clobbering in general. For example, PutByOffset/PutStructure are not
        clobber-world so they can be handled by most default cases in CSE. Also,
        It's better to use the 'Class_field' notation for typed arrays now that
        they no longer involve magical descriptor thingies.

        * bytecode/SpeculatedType.h:
        * dfg/DFGAbstractHeap.h:
        * dfg/DFGAbstractInterpreterInlines.h:
        (JSC::DFG::::executeEffects):
        * dfg/DFGArrayMode.h:
        (JSC::DFG::neverNeedsStorage):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::getByValLoadElimination):
        (JSC::DFG::CSEPhase::getByOffsetLoadElimination):
        (JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):
        (JSC::DFG::CSEPhase::checkArrayElimination):
        (JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination):
        (JSC::DFG::CSEPhase::getTypedArrayByteOffsetLoadElimination):
        (JSC::DFG::CSEPhase::performNodeCSE):
        * dfg/DFGClobberize.h:
        (JSC::DFG::clobberize):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        (JSC::DFG::FixupPhase::attemptToMakeGetTypedArrayByteLength):
        (JSC::DFG::FixupPhase::convertToGetArrayLength):
        (JSC::DFG::FixupPhase::attemptToMakeGetTypedArrayByteOffset):
        * dfg/DFGNodeType.h:
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        * dfg/DFGSafeToExecute.h:
        (JSC::DFG::safeToExecute):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
        * dfg/DFGSpeculativeJIT.h:
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGTypeCheckHoistingPhase.cpp:
        (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
        * runtime/ArrayBuffer.h:
        (JSC::ArrayBuffer::offsetOfData):
        * runtime/Butterfly.h:
        (JSC::Butterfly::offsetOfArrayBuffer):
        * runtime/IndexingHeader.h:
        (JSC::IndexingHeader::offsetOfArrayBuffer):

894
895
896
897
898
899
900
901
902
2013-08-18  Filip Pizlo  <fpizlo@apple.com>

        <https://webkit.org/b/119994> DFG new Array() inlining could get confused about global objects

        Reviewed by Geoffrey Garen.

        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::handleConstantInternalFunction):

903
904
905
906
907
2013-08-18  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=119995
        Start removing custom implementations of getOwnPropertyDescriptor

908
        Reviewed by Oliver Hunt.
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

        This can now typically implemented in terms of getOwnPropertySlot.
        Add a macro to PropertyDescriptor to define an implementation of GOPD in terms of GOPS.
        Switch over most classes in JSC & the WebCore bindings generator to use this.

        * API/JSCallbackObjectFunctions.h:
        * debugger/DebuggerActivation.cpp:
        * runtime/Arguments.cpp:
        * runtime/ArrayConstructor.cpp:
        * runtime/ArrayPrototype.cpp:
        * runtime/BooleanPrototype.cpp:
        * runtime/DateConstructor.cpp:
        * runtime/DatePrototype.cpp:
        * runtime/ErrorPrototype.cpp:
        * runtime/JSActivation.cpp:
        * runtime/JSArray.cpp:
        * runtime/JSArrayBuffer.cpp:
        * runtime/JSArrayBufferView.cpp:
        * runtime/JSCell.cpp:
        * runtime/JSDataView.cpp:
        * runtime/JSDataViewPrototype.cpp:
        * runtime/JSFunction.cpp:
        * runtime/JSGenericTypedArrayViewInlines.h:
        * runtime/JSNotAnObject.cpp:
        * runtime/JSONObject.cpp:
        * runtime/JSObject.cpp:
        * runtime/NamePrototype.cpp:
        * runtime/NumberConstructor.cpp:
        * runtime/NumberPrototype.cpp:
        * runtime/ObjectConstructor.cpp:
            - Implement getOwnPropertySlot in terms of GET_OWN_PROPERTY_DESCRIPTOR_IMPL.
        * runtime/PropertyDescriptor.h:
            - Added GET_OWN_PROPERTY_DESCRIPTOR_IMPL macro.
        * runtime/PropertySlot.h:
        (JSC::PropertySlot::isValue):
        (JSC::PropertySlot::isGetter):
        (JSC::PropertySlot::isCustom):
        (JSC::PropertySlot::isCacheableValue):
        (JSC::PropertySlot::isCacheableGetter):
        (JSC::PropertySlot::isCacheableCustom):
        (JSC::PropertySlot::attributes):
        (JSC::PropertySlot::getterSetter):
            - Add accessors necessary to convert PropertySlot to descriptor.
        * runtime/RegExpConstructor.cpp:
        * runtime/RegExpMatchesArray.cpp:
        * runtime/RegExpMatchesArray.h:
        * runtime/RegExpObject.cpp:
        * runtime/RegExpPrototype.cpp:
        * runtime/StringConstructor.cpp:
        * runtime/StringObject.cpp:
            - Implement getOwnPropertySlot in terms of GET_OWN_PROPERTY_DESCRIPTOR_IMPL.

961
962
963
964
965
966
967
968
969
970
971
2013-08-19  Michael Saboff  <msaboff@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120015 DFG 32Bit: Crash loading "Classic" site @ translate.google.com

        Reviewed by Sam Weinig.

        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::fillSpeculateCell): Added checks for spillFormat being
        DataFormatInteger or DataFormatDouble similar to what is in the 64 bit code and in
        all versions of fillSpeculateBoolean().

972
973
974
975
976
977
978
979
980
981
982
983
2013-08-19  Michael Saboff  <msaboff@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=120020 Change Set 154207 causes wrong register to be used for 32 bit tests

        Reviewed by Benjamin Poulain.

        Change branshTest32 to only use the byte for 8 bit test on the lower 4 registers.
        Registers 4 through 7 as byte regisers are ah, ch, dh and bh instead of sp, bp, si and di.

        * assembler/MacroAssemblerX86Common.h:
        (JSC::MacroAssemblerX86Common::branchTest32):

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
2013-08-16  Oliver Hunt  <oliver@apple.com>

        <https://webkit.org/b/119860> Crash during exception unwinding

        Reviewed by Filip Pizlo.

        Add an "Unreachable" NodeType, and then rearrange op_throw and op_throw_reference_error
        to plant Throw or ThrowReferenceError followed by a flush and then the Unreachable node.

        We need this so that Throw and ThrowReferenceError no longer need to be treated as
        terminals and the subsequent flush keeps the activation (and other registers) live.

        * dfg/DFGAbstractInterpreterInlines.h:
        (JSC::DFG::::executeEffects):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGClobberize.h:
        (JSC::DFG::clobberize):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        * dfg/DFGNode.h:
        (JSC::DFG::Node::isTerminal):
        * dfg/DFGNodeType.h:
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        * dfg/DFGSafeToExecute.h:
        (JSC::DFG::safeToExecute):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):

1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
2013-08-19  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>

        <https://webkit.org/b/120008> [GTK][ARM] javascriptcore compilation is broken

        Reviewed by Oliver Hunt.

        Guard the compilation of these files only if DFG_JIT is enabled.

        * dfg/DFGDesiredTransitions.cpp:
        * dfg/DFGDesiredTransitions.h:
        * dfg/DFGDesiredWeakReferences.cpp:
        * dfg/DFGDesiredWeakReferences.h:
        * dfg/DFGDesiredWriteBarriers.cpp:
        * dfg/DFGDesiredWriteBarriers.h:

1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
2013-08-17  Filip Pizlo  <fpizlo@apple.com>

        REGRESSION(r154218): DFG::FixupPhase no longer turns GetById's child1 into CellUse
        https://bugs.webkit.org/show_bug.cgi?id=119961

        Reviewed by Mark Hahnenberg.

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

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
2013-08-18  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=119972
        Add attributes field to PropertySlot

        Reviewed by Geoff Garen.

        For all JSC types, this makes getOwnPropertyDescriptor redundant.
        There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour.
        (Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally).

        No performance impact.

        * runtime/PropertySlot.h:
        (JSC::PropertySlot::setValue):
        (JSC::PropertySlot::setCustom):
        (JSC::PropertySlot::setCacheableCustom):
        (JSC::PropertySlot::setCustomIndex):
        (JSC::PropertySlot::setGetterSlot):
        (JSC::PropertySlot::setCacheableGetterSlot):
            - These mathods now all require 'attributes'.
        * runtime/JSObject.h:
        (JSC::JSObject::getDirect):
        (JSC::JSObject::getDirectOffset):
        (JSC::JSObject::inlineGetOwnPropertySlot):
            - Added variants of getDirect, getDirectOffset that return the attributes.
        * API/JSCallbackObjectFunctions.h:
        (JSC::::getOwnPropertySlot):
        * runtime/Arguments.cpp:
        (JSC::Arguments::getOwnPropertySlotByIndex):
        (JSC::Arguments::getOwnPropertySlot):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::symbolTableGet):
        (JSC::JSActivation::getOwnPropertySlot):
        * runtime/JSArray.cpp:
        (JSC::JSArray::getOwnPropertySlot):
        * runtime/JSArrayBuffer.cpp:
        (JSC::JSArrayBuffer::getOwnPropertySlot):
        * runtime/JSArrayBufferView.cpp:
        (JSC::JSArrayBufferView::getOwnPropertySlot):
        * runtime/JSDataView.cpp:
        (JSC::JSDataView::getOwnPropertySlot):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::getOwnPropertySlot):
        * runtime/JSGenericTypedArrayViewInlines.h:
        (JSC::::getOwnPropertySlot):
        (JSC::::getOwnPropertySlotByIndex):
        * runtime/JSObject.cpp:
        (JSC::JSObject::getOwnPropertySlotByIndex):
        (JSC::JSObject::fillGetterPropertySlot):
        * runtime/JSString.h:
        (JSC::JSString::getStringPropertySlot):
        * runtime/JSSymbolTableObject.h:
        (JSC::symbolTableGet):
        * runtime/Lookup.cpp:
        (JSC::setUpStaticFunctionSlot):
        * runtime/Lookup.h:
        (JSC::getStaticPropertySlot):
        (JSC::getStaticPropertyDescriptor):
        (JSC::getStaticValueSlot):
        (JSC::getStaticValueDescriptor):
        * runtime/RegExpObject.cpp:
        (JSC::RegExpObject::getOwnPropertySlot):
        * runtime/SparseArrayValueMap.cpp:
        (JSC::SparseArrayEntry::get):
            - Pass attributes to PropertySlot::set* methods.

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
2013-08-17  Mark Hahnenberg  <mhahnenberg@apple.com>

        <https://webkit.org/b/119919> Concurrent JIT crashes in various fast/js/dfg-* tests while the main thread is setting innerHTML

        Reviewed by Filip Pizlo.

        Added a new mode for DesiredWriteBarrier that allows it to track a position in a 
        Vector of WriteBarriers rather than the specific address. The fact that we were 
        arbitrarily storing into a Vector's backing store for constants at the end of 
        compilation after the Vector could have resized was causing crashes.

        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::constants):
        (JSC::CodeBlock::addConstantLazily):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::addConstant):
        * dfg/DFGDesiredWriteBarriers.cpp:
        (JSC::DFG::DesiredWriteBarrier::DesiredWriteBarrier):
        (JSC::DFG::DesiredWriteBarrier::trigger):
        (JSC::DFG::initializeLazyWriteBarrierForConstant):
        * dfg/DFGDesiredWriteBarriers.h:
        (JSC::DFG::DesiredWriteBarriers::add):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::truncateConstantToInt32):
        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::constantRegisterForConstant):

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
2013-08-16  Filip Pizlo  <fpizlo@apple.com>

        DFG should optimize typedArray.byteLength
        https://bugs.webkit.org/show_bug.cgi?id=119909

        Reviewed by Oliver Hunt.
        
        This adds typedArray.byteLength inlining to the DFG, and does so without changing
        the IR: byteLength is turned into GetArrayLength followed by BitLShift. This is
        legal since the byteLength of a typed array cannot exceed
        numeric_limits<int32_t>::max().

        * bytecode/SpeculatedType.cpp:
        (JSC::typedArrayTypeFromSpeculation):
        * bytecode/SpeculatedType.h:
        * dfg/DFGArrayMode.cpp:
        (JSC::DFG::toArrayType):
        * dfg/DFGArrayMode.h:
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        (JSC::DFG::FixupPhase::attemptToMakeGetArrayLength):
        (JSC::DFG::FixupPhase::attemptToMakeGetByteLength):
        (JSC::DFG::FixupPhase::convertToGetArrayLength):
        (JSC::DFG::FixupPhase::prependGetArrayLength):
        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::constantRegisterForConstant):
        (JSC::DFG::Graph::convertToConstant):
        * runtime/TypedArrayType.h:
        (JSC::logElementSize):
        (JSC::elementSize):

1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
2013-08-16  Filip Pizlo  <fpizlo@apple.com>

        DFG optimizes out strict mode arguments tear off
        https://bugs.webkit.org/show_bug.cgi?id=119504

        Reviewed by Mark Hahnenberg and Oliver Hunt.
        
        Don't do the optimization for strict mode.

        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        (JSC::DFG::ArgumentsSimplificationPhase::pruneObviousArgumentCreations):

1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
2013-08-16  Benjamin Poulain  <benjamin@webkit.org>

        [JSC] x86: improve code generation for xxxTest32
        https://bugs.webkit.org/show_bug.cgi?id=119876

        Reviewed by Geoffrey Garen.

        Try to use testb whenever possible when testing for an immediate value.

        When the input is an address and an offset, we can tweak the mask
        and offset to be able to generate testb for any byte of the mask.

        When the input is a register, we can use testb if we are only interested
        in testing the low bits.

        * assembler/MacroAssemblerX86Common.h:
        (JSC::MacroAssemblerX86Common::branchTest32):
        (JSC::MacroAssemblerX86Common::test32):
        (JSC::MacroAssemblerX86Common::generateTest32):

1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
2013-08-16  Mark Lam  <mark.lam@apple.com>

        <https://bugs.webkit.org/show_bug.cgi?id=119913> Baseline JIT gives erroneous
        error message that an object is not a constructor though it expects a function

        Reviewed by Michael Saboff.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):

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
2013-08-16  Filip Pizlo  <fpizlo@apple.com>

        Object properties added using dot syntax (o.f = ...) from code that isn't in eval should be less likely to cause an object to become a dictionary
        https://bugs.webkit.org/show_bug.cgi?id=119897

        Reviewed by Oliver Hunt.
        
        6-10x speed-up on microbenchmarks that create large static objects. 40-65% speed-up
        on Octane/gbemu. 3% overall speed-up on Octane. No slow-downs anywhere; our ability
        to turn objects into dictionaries when you're storing using bracket syntax or using
        eval is still in place.

        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::putByIdContext):
        * dfg/DFGOperations.cpp:
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * runtime/JSObject.h:
        (JSC::JSObject::putDirectInternal):
        * runtime/PutPropertySlot.h:
        (JSC::PutPropertySlot::PutPropertySlot):
        (JSC::PutPropertySlot::context):
        * runtime/Structure.cpp:
        (JSC::Structure::addPropertyTransition):
        * runtime/Structure.h:

1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
2013-08-16  Balazs Kilvady  <kilvadyb@homejinni.com>

        <https://webkit.org/b/119742> REGRESSION(FTL): Fix register usage in mips implementation of ctiVMHandleException

        Reviewed by Allan Sandfeld Jensen.

        ctiVMHandleException must jump/return using register ra (r31).

        * jit/JITStubsMIPS.h:

1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
2013-08-16  Julien Brianceau  <jbrianceau@nds.com>

        <https://webkit.org/b/119879> Fix sh4 build after r154156.

        Reviewed by Allan Sandfeld Jensen.

        Fix typo in JITStubsSH4.h file.

        * jit/JITStubsSH4.h:

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
2013-08-15  Mark Hahnenberg  <mhahnenberg@apple.com>

        <https://webkit.org/b/119833> Concurrent compilation thread should not trigger WriteBarriers

        Reviewed by Oliver Hunt.

        The concurrent compilation thread should interact minimally with the Heap, including not 
        triggering WriteBarriers. This is a prerequisite for generational GC.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::addOrFindConstant):
        (JSC::CodeBlock::findConstant):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::addConstantLazily):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::getJSConstantForValue):
        (JSC::DFG::ByteCodeParser::constantUndefined):
        (JSC::DFG::ByteCodeParser::constantNull):
        (JSC::DFG::ByteCodeParser::one):
        (JSC::DFG::ByteCodeParser::constantNaN):
        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
        * dfg/DFGCommonData.cpp:
        (JSC::DFG::CommonData::notifyCompilingStructureTransition):
        * dfg/DFGCommonData.h:
        * dfg/DFGDesiredTransitions.cpp: Added.
        (JSC::DFG::DesiredTransition::DesiredTransition):
        (JSC::DFG::DesiredTransition::reallyAdd):
        (JSC::DFG::DesiredTransitions::DesiredTransitions):
        (JSC::DFG::DesiredTransitions::~DesiredTransitions):
        (JSC::DFG::DesiredTransitions::addLazily):
        (JSC::DFG::DesiredTransitions::reallyAdd):
        * dfg/DFGDesiredTransitions.h: Added.
        * dfg/DFGDesiredWeakReferences.cpp: Added.
        (JSC::DFG::DesiredWeakReferences::DesiredWeakReferences):
        (JSC::DFG::DesiredWeakReferences::~DesiredWeakReferences):
        (JSC::DFG::DesiredWeakReferences::addLazily):
        (JSC::DFG::DesiredWeakReferences::reallyAdd):
        * dfg/DFGDesiredWeakReferences.h: Added.
        * dfg/DFGDesiredWriteBarriers.cpp: Added.
        (JSC::DFG::DesiredWriteBarrier::DesiredWriteBarrier):
        (JSC::DFG::DesiredWriteBarrier::trigger):
        (JSC::DFG::DesiredWriteBarriers::DesiredWriteBarriers):
        (JSC::DFG::DesiredWriteBarriers::~DesiredWriteBarriers):
        (JSC::DFG::DesiredWriteBarriers::addImpl):
        (JSC::DFG::DesiredWriteBarriers::trigger):
        * dfg/DFGDesiredWriteBarriers.h: Added.
        (JSC::DFG::DesiredWriteBarriers::add):
        (JSC::DFG::initializeLazyWriteBarrier):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::truncateConstantToInt32):
        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::convertToConstant):
        * dfg/DFGJITCompiler.h:
        (JSC::DFG::JITCompiler::addWeakReference):
        * dfg/DFGPlan.cpp:
        (JSC::DFG::Plan::Plan):
        (JSC::DFG::Plan::reallyAdd):
        * dfg/DFGPlan.h:
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * runtime/WriteBarrier.h:
        (JSC::WriteBarrierBase::set):
        (JSC::WriteBarrier::WriteBarrier):

1324
1325
1326
1327
1328
1329
2013-08-15  Benjamin Poulain  <benjamin@webkit.org>

        Fix x86 32bits build after r154158

        * assembler/X86Assembler.h: Add missing #ifdef for the x86_64 instructions.

1330
1331
1332
1333
1334
1335
1336
2013-08-15  Ryosuke Niwa  <rniwa@webkit.org>

        Build fix attempt after r154156.

        * jit/JITStubs.cpp:
        (JSC::cti_vm_handle_exception): encode!

1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
2013-08-15  Benjamin Poulain  <benjamin@webkit.org>

        [JSC] x86: Use inc and dec when possible
        https://bugs.webkit.org/show_bug.cgi?id=119831

        Reviewed by Geoffrey Garen.

        When incrementing or decrementing by an immediate of 1, use the insctructions
        inc and dec instead of add and sub.
        The instructions have good timing and their encoding is smaller.

        * assembler/MacroAssemblerX86Common.h:
        (JSC::MacroAssemblerX86_64::add32):
        (JSC::MacroAssemblerX86_64::sub32):
        * assembler/MacroAssemblerX86_64.h:
        (JSC::MacroAssemblerX86_64::add64):
        (JSC::MacroAssemblerX86_64::sub64):
        * assembler/X86Assembler.h:
        (JSC::X86Assembler::dec_r):
        (JSC::X86Assembler::decq_r):
        (JSC::X86Assembler::inc_r):
        (JSC::X86Assembler::incq_r):

1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
2013-08-15  Filip Pizlo  <fpizlo@apple.com>

        Sometimes, the DFG uses a GetById for typed array length accesses despite profiling data that indicates that it's a typed array length access
        https://bugs.webkit.org/show_bug.cgi?id=119874

        Reviewed by Oliver Hunt and Mark Hahnenberg.
        
        It was a confusion between heuristics in DFG::ArrayMode that are assuming that
        you'll use ForceExit if array profiles are empty, the JIT creating empty profiles
        sometimes for typed array length accesses, and the FixupPhase assuming that a
        ForceExit ArrayMode means that it should continue using a generic GetById.

        This fixes the confusion.

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

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
2013-08-15  Mark Lam  <mark.lam@apple.com>

        Fix crash when performing activation tearoff.
        https://bugs.webkit.org/show_bug.cgi?id=119848

        Reviewed by Oliver Hunt.

        The activation tearoff crash was due to a bug in the baseline JIT.
        If we have a scenario where the a baseline JIT frame calls a LLINT
        frame, an exception may be thrown while in the LLINT.

        Interpreter::throwException() which handles the exception will unwind
        all frames until it finds a catcher or sees a host frame. When we
        return from the LLINT to the baseline JIT code, the baseline JIT code
        errorneously sets topCallFrame to the value in its call frame register,
        and starts unwinding the stack frames that have already been unwound.

        The fix is:
        1. Rename ctiVMThrowTrampolineSlowpath to ctiVMHandleException.
           This is a more accurate description of what this runtime function
           is supposed to do i.e. it handles the exception which include doing
           nothing (if there are no more frames to unwind).
        2. Fix up topCallFrame values so that the HostCallFrameFlag is never
           set on it.
        3. Reloading the call frame register from topCallFrame when we're
           returning from a callee and detect exception handling in progress.

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::unwindCallFrame):
        - Ensure that topCallFrame is not set with the HostCallFrameFlag.
        (JSC::Interpreter::getStackTrace):
        * interpreter/Interpreter.h:
        (JSC::TopCallFrameSetter::TopCallFrameSetter):
        (JSC::TopCallFrameSetter::~TopCallFrameSetter):
        (JSC::NativeCallFrameTracer::NativeCallFrameTracer):
        - Ensure that topCallFrame is not set with the HostCallFrameFlag.
        * jit/JIT.h:
        * jit/JITExceptions.cpp:
        (JSC::uncaughtExceptionHandler):
        - Convenience function to get the handler for uncaught exceptions.
        * jit/JITExceptions.h:
        * jit/JITInlines.h:
        (JSC::JIT::reloadCallFrameFromTopCallFrame):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::privateCompileCTINativeCall):
        - Rename ctiVMThrowTrampolineSlowpath to ctiVMHandleException.
        * jit/JITStubs.cpp:
        (JSC::throwExceptionFromOpCall):
        - Ensure that topCallFrame is not set with the HostCallFrameFlag.
        (JSC::cti_vm_handle_exception):
        - Check for the case when there are no more frames to unwind.
        * jit/JITStubs.h:
        * jit/JITStubsARM.h:
        * jit/JITStubsARMv7.h:
        * jit/JITStubsMIPS.h:
        * jit/JITStubsSH4.h:
        * jit/JITStubsX86.h:
        * jit/JITStubsX86_64.h:
        - Rename ctiVMThrowTrampolineSlowpath to ctiVMHandleException.
        * jit/SlowPathCall.h:
        (JSC::JITSlowPathCall::call):
        - reload cfr from topcallFrame when handling an exception.
        - Rename ctiVMThrowTrampolineSlowpath to ctiVMHandleException.
        * jit/ThunkGenerators.cpp:
        (JSC::nativeForGenerator):
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        - reload cfr from topcallFrame when handling an exception.
        * runtime/VM.cpp:
        (JSC::VM::VM):
        - Ensure that topCallFrame is not set with the HostCallFrameFlag.

1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
2013-08-15  Filip Pizlo  <fpizlo@apple.com>

        Remove some code duplication.
        
        Rubber stamped by Mark Hahnenberg.

        * runtime/JSDataViewPrototype.cpp:
        (JSC::getData):
        (JSC::setData):

1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
2013-08-15  Julien Brianceau  <jbrianceau@nds.com>

        [DFG] isDouble() and isNumerical() should return true with KnownNumberUse UseKind.
        https://bugs.webkit.org/show_bug.cgi?id=119794

        Reviewed by Filip Pizlo.

        This patch fixes ASSERTs failures in debug builds for sh4 and mips architecture.

        * dfg/DFGUseKind.h:
        (JSC::DFG::isNumerical):
        (JSC::DFG::isDouble):

1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
2013-08-15  Filip Pizlo  <fpizlo@apple.com>

        http://trac.webkit.org/changeset/154120 accidentally changed DFGCapabilities to read the resolve type from operand 4, not 3; it should be 3.

        Rubber stamped by Oliver Hunt.
        
        This was causing some test crashes for me.

        * dfg/DFGCapabilities.cpp:
        (JSC::DFG::capabilityLevel):

1483
1484
1485
1486
1487
1488
2013-08-15  Brent Fulgham  <bfulgham@apple.com>

        [Windows] Clear up improper export declaration.

        * runtime/ArrayBufferView.h:

1489
1490
1491
1492
1493
1494
1495
1496
2013-08-15  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, remove some unnecessary periods from exceptions.

        * runtime/JSDataViewPrototype.cpp:
        (JSC::getData):
        (JSC::setData):

1497
1498
1499
1500
1501
1502
1503
2013-08-15  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, fix 32-bit build.

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

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
2013-08-14  Filip Pizlo  <fpizlo@apple.com>

        Typed arrays should be rewritten
        https://bugs.webkit.org/show_bug.cgi?id=119064

        Reviewed by Oliver Hunt.
        
        Typed arrays were previously deficient in several major ways:
        
        - They were defined separately in WebCore and in the jsc shell. The two
          implementations were different, and the jsc shell one was basically wrong.
          The WebCore one was quite awful, also.
        
        - Typed arrays were not visible to the JIT except through some weird hooks.
          For example, the JIT could not ask "what is the Structure that this typed
          array would have if I just allocated it from this global object". Also,
          it was difficult to wire any of the typed array intrinsics, because most
          of the functionality wasn't visible anywhere in JSC.
        
        - Typed array allocation was brain-dead. Allocating a typed array involved
          two JS objects, two GC weak handles, and three malloc allocations.
        
        - Neutering. It involved keeping tabs on all native views but not the view
          wrappers, even though the native views can autoneuter just by asking the
          buffer if it was neutered anytime you touch them; while the JS view
          wrappers are the ones that you really want to reach out to.
        
        - Common case-ing. Most typed arrays have one buffer and one view, and
          usually nobody touches the buffer. Yet we created all of that stuff
          anyway, using data structures optimized for the case where you had a lot
          of views.
        
        - Semantic goofs. Typed arrays should, in the future, behave like ES
          features rather than DOM features, for example when it comes to exceptions.
          Firefox already does this and I agree with them.
        
        This patch cleanses our codebase of these sins:
        
        - Typed arrays are almost entirely defined in JSC. Only the lifecycle
          management of native references to buffers is left to WebCore.
        
        - Allocating a typed array requires either two GC allocations (a cell and a
          copied storage vector) or one GC allocation, a malloc allocation, and a
          weak handle (a cell and a malloc'd storage vector, plus a finalizer for the
          latter). The latter is only used for oversize arrays. Remember that before
          it was 7 allocations no matter what.
        
        - Typed arrays require just 4 words of overhead: Structure*, Butterfly*,
          mode/length, void* vector. Before it was a lot more than that - remember,
          there were five additional objects that did absolutely nothing for anybody.
        
        - Native views aren't tracked by the buffer, or by the wrappers. They are
          transient. In the future we'll probably switch to not even having them be
          malloc'd.
        
        - Native array buffers have an efficient way of tracking all of their JS view
          wrappers, both for neutering, and for lifecycle management. The GC
          special-cases native array buffers. This saves a bunch of grief; for example
          it means that a JS view wrapper can refer to its buffer via the butterfly,
          which would be dead by the time we went to finalize.
        
        - Typed array semantics now match Firefox, which also happens to be where the
          standards are going. The discussion on webkit-dev seemed to confirm that
          Chrome is also heading in this direction. This includes making
          Uint8ClampedArray not a subtype of Uint8Array, and getting rid of
          ArrayBufferView as a JS-visible construct.
        
        This is up to a 10x speed-up on programs that allocate a lot of typed arrays.
        It's a 1% speed-up on Octane. It also opens up a bunch of possibilities for
        further typed array optimizations in the JSC JITs, including inlining typed
        array allocation, inlining more of the accessors, reducing the cost of type
        checks, etc.
        
        An additional property of this patch is that typed arrays are mostly
        implemented using templates. This deduplicates a bunch of code, but does mean
        that we need some hacks for exporting s_info's of template classes. See
        JSGenericTypedArrayView.h and JSTypedArrays.cpp. Those hacks are fairly
        low-impact compared to code duplication.
        
        Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.

        * CMakeLists.txt:
        * DerivedSources.make:
        * GNUmakefile.list.am:
        * JSCTypedArrayStubs.h: Removed.
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * bytecode/ByValInfo.h:
        (JSC::hasOptimizableIndexingForClassInfo):
        (JSC::jitArrayModeForClassInfo):
        (JSC::typedArrayTypeForJITArrayMode):
        * bytecode/SpeculatedType.cpp:
        (JSC::speculationFromClassInfo):
        * dfg/DFGArrayMode.cpp:
        (JSC::DFG::toTypedArrayType):
        * dfg/DFGArrayMode.h:
        (JSC::DFG::ArrayMode::typedArrayType):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::checkArray):
        (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
        (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
        (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
        (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
        (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
        (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
        * dfg/DFGSpeculativeJIT.h:
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * heap/CopyToken.h:
        * heap/DeferGC.h:
        (JSC::DeferGCForAWhile::DeferGCForAWhile):
        (JSC::DeferGCForAWhile::~DeferGCForAWhile):
        * heap/GCIncomingRefCounted.h: Added.
        (JSC::GCIncomingRefCounted::GCIncomingRefCounted):
        (JSC::GCIncomingRefCounted::~GCIncomingRefCounted):
        (JSC::GCIncomingRefCounted::numberOfIncomingReferences):
        (JSC::GCIncomingRefCounted::incomingReferenceAt):
        (JSC::GCIncomingRefCounted::singletonFlag):
        (JSC::GCIncomingRefCounted::hasVectorOfCells):
        (JSC::GCIncomingRefCounted::hasAnyIncoming):
        (JSC::GCIncomingRefCounted::hasSingleton):
        (JSC::GCIncomingRefCounted::singleton):
        (JSC::GCIncomingRefCounted::vectorOfCells):
        * heap/GCIncomingRefCountedInlines.h: Added.
        (JSC::::addIncomingReference):
        (JSC::::filterIncomingReferences):
        * heap/GCIncomingRefCountedSet.h: Added.
        (JSC::GCIncomingRefCountedSet::size):
        * heap/GCIncomingRefCountedSetInlines.h: Added.
        (JSC::::GCIncomingRefCountedSet):
        (JSC::::~GCIncomingRefCountedSet):
        (JSC::::addReference):
        (JSC::::sweep):
        (JSC::::removeAll):
        (JSC::::removeDead):
        * heap/Heap.cpp:
        (JSC::Heap::addReference):
        (JSC::Heap::extraSize):
        (JSC::Heap::size):
        (JSC::Heap::capacity):
        (JSC::Heap::collect):
        (JSC::Heap::decrementDeferralDepth):
        (JSC::Heap::decrementDeferralDepthAndGCIfNeeded):
        * heap/Heap.h:
        * interpreter/CallFrame.h:
        (JSC::ExecState::dataViewTable):
        * jit/JIT.h:
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::privateCompileGetByVal):
        (JSC::JIT::privateCompilePutByVal):
        (JSC::JIT::emitIntTypedArrayGetByVal):
        (JSC::JIT::emitFloatTypedArrayGetByVal):
        (JSC::JIT::emitIntTypedArrayPutByVal):
        (JSC::JIT::emitFloatTypedArrayPutByVal):
        * jsc.cpp:
        (GlobalObject::finishCreation):
        * runtime/ArrayBuffer.cpp:
        (JSC::ArrayBuffer::transfer):
        * runtime/ArrayBuffer.h:
        (JSC::ArrayBuffer::createAdopted):
        (JSC::ArrayBuffer::ArrayBuffer):
        (JSC::ArrayBuffer::gcSizeEstimateInBytes):
        (JSC::ArrayBuffer::pin):
        (JSC::ArrayBuffer::unpin):
        (JSC::ArrayBufferContents::tryAllocate):
        * runtime/ArrayBufferView.cpp:
        (JSC::ArrayBufferView::ArrayBufferView):
        (JSC::ArrayBufferView::~ArrayBufferView):
        (JSC::ArrayBufferView::setNeuterable):
        * runtime/ArrayBufferView.h:
        (JSC::ArrayBufferView::isNeutered):
        (JSC::ArrayBufferView::buffer):
        (JSC::ArrayBufferView::baseAddress):
        (JSC::ArrayBufferView::byteOffset):
        (JSC::ArrayBufferView::verifySubRange):
        (JSC::ArrayBufferView::clampOffsetAndNumElements):
        (JSC::ArrayBufferView::calculateOffsetAndLength):
        * runtime/ClassInfo.h:
        * runtime/CommonIdentifiers.h:
        * runtime/DataView.cpp: Added.
        (JSC::DataView::DataView):
        (JSC::DataView::create):
        (JSC::DataView::wrap):
        * runtime/DataView.h: Added.
        (JSC::DataView::byteLength):
        (JSC::DataView::getType):
        (JSC::DataView::get):
        (JSC::DataView::set):
        * runtime/Float32Array.h:
        * runtime/Float64Array.h:
        * runtime/GenericTypedArrayView.h: Added.
        (JSC::GenericTypedArrayView::data):
        (JSC::GenericTypedArrayView::set):
        (JSC::GenericTypedArrayView::setRange):
        (JSC::GenericTypedArrayView::zeroRange):
        (JSC::GenericTypedArrayView::zeroFill):
        (JSC::GenericTypedArrayView::length):
        (JSC::GenericTypedArrayView::byteLength):
        (JSC::GenericTypedArrayView::item):
        (JSC::GenericTypedArrayView::checkInboundData):
        (JSC::GenericTypedArrayView::getType):
        * runtime/GenericTypedArrayViewInlines.h: Added.
        (JSC::::GenericTypedArrayView):
        (JSC::::create):
        (JSC::::createUninitialized):
        (JSC::::subarray):
        (JSC::::wrap):
        * runtime/IndexingHeader.h:
        (JSC::IndexingHeader::arrayBuffer):
        (JSC::IndexingHeader::setArrayBuffer):
        * runtime/Int16Array.h:
        * runtime/Int32Array.h:
        * runtime/Int8Array.h:
        * runtime/JSArrayBuffer.cpp: Added.
        (JSC::JSArrayBuffer::JSArrayBuffer):
        (JSC::JSArrayBuffer::finishCreation):
        (JSC::JSArrayBuffer::create):
        (JSC::JSArrayBuffer::createStructure):
        (JSC::JSArrayBuffer::getOwnPropertySlot):
        (JSC::JSArrayBuffer::getOwnPropertyDescriptor):
        (JSC::JSArrayBuffer::put):
        (JSC::JSArrayBuffer::defineOwnProperty):
        (JSC::JSArrayBuffer::deleteProperty):
        (JSC::JSArrayBuffer::getOwnNonIndexPropertyNames):
        * runtime/JSArrayBuffer.h: Added.
        (JSC::JSArrayBuffer::impl):
        (JSC::toArrayBuffer):
        * runtime/JSArrayBufferConstructor.cpp: Added.
        (JSC::JSArrayBufferConstructor::JSArrayBufferConstructor):
        (JSC::JSArrayBufferConstructor::finishCreation):
        (JSC::JSArrayBufferConstructor::create):
        (JSC::JSArrayBufferConstructor::createStructure):
        (JSC::constructArrayBuffer):
        (JSC::JSArrayBufferConstructor::getConstructData):
        (JSC::JSArrayBufferConstructor::getCallData):
        * runtime/JSArrayBufferConstructor.h: Added.
        * runtime/JSArrayBufferPrototype.cpp: Added.
        (JSC::arrayBufferProtoFuncSlice):
        (JSC::JSArrayBufferPrototype::JSArrayBufferPrototype):
        (JSC::JSArrayBufferPrototype::finishCreation):
        (JSC::JSArrayBufferPrototype::create):
        (JSC::JSArrayBufferPrototype::createStructure):
        * runtime/JSArrayBufferPrototype.h: Added.
        * runtime/JSArrayBufferView.cpp: Added.
        (JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
        (JSC::JSArrayBufferView::JSArrayBufferView):
        (JSC::JSArrayBufferView::finishCreation):
        (JSC::JSArrayBufferView::getOwnPropertySlot):
        (JSC::JSArrayBufferView::getOwnPropertyDescriptor):
        (JSC::JSArrayBufferView::put):
        (JSC::JSArrayBufferView::defineOwnProperty):
        (JSC::JSArrayBufferView::deleteProperty):
        (JSC::JSArrayBufferView::getOwnNonIndexPropertyNames):
        (JSC::JSArrayBufferView::finalize):
        * runtime/JSArrayBufferView.h: Added.
        (JSC::JSArrayBufferView::sizeOf):
        (JSC::JSArrayBufferView::ConstructionContext::operator!):
        (JSC::JSArrayBufferView::ConstructionContext::structure):
        (JSC::JSArrayBufferView::ConstructionContext::vector):
        (JSC::JSArrayBufferView::ConstructionContext::length):
        (JSC::JSArrayBufferView::ConstructionContext::mode):
        (JSC::JSArrayBufferView::ConstructionContext::butterfly):
        (JSC::JSArrayBufferView::mode):
        (JSC::JSArrayBufferView::vector):
        (JSC::JSArrayBufferView::length):
        (JSC::JSArrayBufferView::offsetOfVector):
        (JSC::JSArrayBufferView::offsetOfLength):
        (JSC::JSArrayBufferView::offsetOfMode):
        * runtime/JSArrayBufferViewInlines.h: Added.
        (JSC::JSArrayBufferView::slowDownAndWasteMemoryIfNecessary):
        (JSC::JSArrayBufferView::buffer):
        (JSC::JSArrayBufferView::impl):
        (JSC::JSArrayBufferView::neuter):
        (JSC::JSArrayBufferView::byteOffset):
        * runtime/JSCell.cpp:
        (JSC::JSCell::slowDownAndWasteMemory):
        (JSC::JSCell::getTypedArrayImpl):
        * runtime/JSCell.h:
        * runtime/JSDataView.cpp: Added.
        (JSC::JSDataView::JSDataView):
        (JSC::JSDataView::create):
        (JSC::JSDataView::createUninitialized):
        (JSC::JSDataView::set):
        (JSC::JSDataView::typedImpl):
        (JSC::JSDataView::getOwnPropertySlot):
        (JSC::JSDataView::getOwnPropertyDescriptor):
        (JSC::JSDataView::slowDownAndWasteMemory):
        (JSC::JSDataView::getTypedArrayImpl):
        (JSC::JSDataView::createStructure):
        * runtime/JSDataView.h: Added.
        * runtime/JSDataViewPrototype.cpp: Added.
        (JSC::JSDataViewPrototype::JSDataViewPrototype):
        (JSC::JSDataViewPrototype::create):
        (JSC::JSDataViewPrototype::createStructure):
        (JSC::JSDataViewPrototype::getOwnPropertySlot):
        (JSC::JSDataViewPrototype::getOwnPropertyDescriptor):
        (JSC::getData):
        (JSC::setData):
        (JSC::dataViewProtoFuncGetInt8):
        (JSC::dataViewProtoFuncGetInt16):
        (JSC::dataViewProtoFuncGetInt32):
        (JSC::dataViewProtoFuncGetUint8):
        (JSC::dataViewProtoFuncGetUint16):
        (JSC::dataViewProtoFuncGetUint32):
        (JSC::dataViewProtoFuncGetFloat32):
        (JSC::dataViewProtoFuncGetFloat64):
        (JSC::dataViewProtoFuncSetInt8):
        (JSC::dataViewProtoFuncSetInt16):
        (JSC::dataViewProtoFuncSetInt32):
        (JSC::dataViewProtoFuncSetUint8):
        (JSC::dataViewProtoFuncSetUint16):
        (JSC::dataViewProtoFuncSetUint32):
        (JSC::dataViewProtoFuncSetFloat32):
        (JSC::dataViewProtoFuncSetFloat64):
        * runtime/JSDataViewPrototype.h: Added.
        * runtime/JSFloat32Array.h: Added.
        * runtime/JSFloat64Array.h: Added.
        * runtime/JSGenericTypedArrayView.h: Added.
        (JSC::JSGenericTypedArrayView::byteLength):
        (JSC::JSGenericTypedArrayView::byteSize):
        (JSC::JSGenericTypedArrayView::typedVector):
        (JSC::JSGenericTypedArrayView::canGetIndexQuickly):
        (JSC::JSGenericTypedArrayView::canSetIndexQuickly):
        (JSC::JSGenericTypedArrayView::getIndexQuicklyAsNativeValue):
        (JSC::JSGenericTypedArrayView::getIndexQuicklyAsDouble):
        (JSC::JSGenericTypedArrayView::getIndexQuickly):
        (JSC::JSGenericTypedArrayView::setIndexQuicklyToNativeValue):
        (JSC::JSGenericTypedArrayView::setIndexQuicklyToDouble):
        (JSC::JSGenericTypedArrayView::setIndexQuickly):
        (JSC::JSGenericTypedArrayView::canAccessRangeQuickly):
        (JSC::JSGenericTypedArrayView::typedImpl):
        (JSC::JSGenericTypedArrayView::createStructure):
        (JSC::JSGenericTypedArrayView::info):
        (JSC::toNativeTypedView):
        * runtime/JSGenericTypedArrayViewConstructor.h: Added.
        * runtime/JSGenericTypedArrayViewConstructorInlines.h: Added.
        (JSC::::JSGenericTypedArrayViewConstructor):
        (JSC::::finishCreation):
        (JSC::::create):
        (JSC::::createStructure):
        (JSC::constructGenericTypedArrayView):
        (JSC::::getConstructData):
        (JSC::::getCallData):
        * runtime/JSGenericTypedArrayViewInlines.h: Added.
        (JSC::::JSGenericTypedArrayView):
        (JSC::::create):
        (JSC::::createUninitialized):
        (JSC::::validateRange):
        (JSC::::setWithSpecificType):
        (JSC::::set):
        (JSC::::getOwnPropertySlot):
        (JSC::::getOwnPropertyDescriptor):
        (JSC::::put):
        (JSC::::defineOwnProperty):
        (JSC::::deleteProperty):
        (JSC::::getOwnPropertySlotByIndex):
        (JSC::::putByIndex):
        (JSC::::deletePropertyByIndex):
        (JSC::::getOwnNonIndexPropertyNames):
        (JSC::::getOwnPropertyNames):
        (JSC::::visitChildren):
        (JSC::::copyBackingStore):
        (JSC::::slowDownAndWasteMemory):
        (JSC::::getTypedArrayImpl):
        * runtime/JSGenericTypedArrayViewPrototype.h: Added.
        * runtime/JSGenericTypedArrayViewPrototypeInlines.h: Added.
        (JSC::genericTypedArrayViewProtoFuncSet):
        (JSC::genericTypedArrayViewProtoFuncSubarray):
        (JSC::::JSGenericTypedArrayViewPrototype):
        (JSC::::finishCreation):
        (JSC::::create):
        (JSC::::createStructure):
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::reset):
        (JSC::JSGlobalObject::visitChildren):
        * runtime/JSGlobalObject.h:
        (JSC::JSGlobalObject::arrayBufferPrototype):
        (JSC::JSGlobalObject::arrayBufferStructure):
        (JSC::JSGlobalObject::typedArrayStructure):
        * runtime/JSInt16Array.h: Added.
        * runtime/JSInt32Array.h: Added.
        * runtime/JSInt8Array.h: Added.
        * runtime/JSTypedArrayConstructors.cpp: Added.
        * runtime/JSTypedArrayConstructors.h: Added.
        * runtime/JSTypedArrayPrototypes.cpp: Added.
        * runtime/JSTypedArrayPrototypes.h: Added.
        * runtime/JSTypedArrays.cpp: Added.
        * runtime/JSTypedArrays.h: Added.
        * runtime/JSUint16Array.h: Added.
        * runtime/JSUint32Array.h: Added.
        * runtime/JSUint8Array.h: Added.
        * runtime/JSUint8ClampedArray.h: Added.
        * runtime/Operations.h:
        * runtime/Options.h:
        * runtime/SimpleTypedArrayController.cpp: Added.
        (JSC::SimpleTypedArrayController::SimpleTypedArrayController):
        (JSC::SimpleTypedArrayController::~SimpleTypedArrayController):
        (JSC::SimpleTypedArrayController::toJS):
        * runtime/SimpleTypedArrayController.h: Added.
        * runtime/Structure.h:
        (JSC::Structure::couldHaveIndexingHeader):
        * runtime/StructureInlines.h:
        (JSC::Structure::hasIndexingHeader):
        * runtime/TypedArrayAdaptors.h: Added.
        (JSC::IntegralTypedArrayAdaptor::toNative):
        (JSC::IntegralTypedArrayAdaptor::toJSValue):
        (JSC::IntegralTypedArrayAdaptor::toDouble):
        (JSC::FloatTypedArrayAdaptor::toNative):
        (JSC::FloatTypedArrayAdaptor::toJSValue):
        (JSC::FloatTypedArrayAdaptor::toDouble):
        (JSC::Uint8ClampedAdaptor::toNative):
        (JSC::Uint8ClampedAdaptor::toJSValue):
        (JSC::Uint8ClampedAdaptor::toDouble):
        (JSC::Uint8ClampedAdaptor::clamp):
        * runtime/TypedArrayController.cpp: Added.
        (JSC::TypedArrayController::TypedArrayController):
        (JSC::TypedArrayController::~TypedArrayController):
        * runtime/TypedArrayController.h: Added.
        * runtime/TypedArrayDescriptor.h: Removed.
        * runtime/TypedArrayInlines.h: Added.
        * runtime/TypedArrayType.cpp: Added.
        (JSC::classInfoForType):
        (WTF::printInternal):
        * runtime/TypedArrayType.h: Added.
        (JSC::toIndex):
        (JSC::isTypedView):
        (JSC::elementSize):
        (JSC::isInt):
        (JSC::isFloat):
        (JSC::isSigned):
        (JSC::isClamped):
        * runtime/TypedArrays.h: Added.
        * runtime/Uint16Array.h:
        * runtime/Uint32Array.h:
        * runtime/Uint8Array.h:
        * runtime/Uint8ClampedArray.h:
        * runtime/VM.cpp:
        (JSC::VM::VM):
        (JSC::VM::~VM):
        * runtime/VM.h:

1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
2013-08-15  Oliver Hunt  <oliver@apple.com>

        <https://webkit.org/b/119830> Assigning to a readonly global results in DFG byte code parse failure

        Reviewed by Filip Pizlo.

        Make sure dfgCapabilities doesn't report a Dynamic put as
        being compilable when we don't actually support it.  

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dumpBytecode):
        * dfg/DFGCapabilities.cpp:
        (JSC::DFG::capabilityLevel):

1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
2013-08-15  Brent Fulgham  <bfulgham@apple.com>

        [Windows] Incorrect DLL Linkage for JSC ArrayBuffer and ArrayBufferView
        https://bugs.webkit.org/show_bug.cgi?id=119847

        Reviewed by Oliver Hunt.

        * runtime/ArrayBuffer.h: Switch from WTF_EXPORT_PRIVATE to JS_EXPORT_PRIVATE
        * runtime/ArrayBufferView.h: Ditto.

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
2013-08-15  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=119843
        PropertySlot::setValue is ambiguous

        Reviewed by Geoff Garen.

        There are three different versions of PropertySlot::setValue, one for cacheable properties, and two that are used interchangeably and inconsistently.
        The problematic variants are the ones that just take a value, and one that takes a value and also the object containing the property.
        Unify on always providing the object, and remove the version that just takes a value.
        This always works except for JSString, where we optimize out the object (logically we should be instantiating a temporary StringObject on every property access).
        Provide a version of setValue that takes a JSString as the owner of the property.
        We won't store this, but it makes it clear that this interface should only be used from JSString.

        * API/JSCallbackObjectFunctions.h:
        (JSC::::getOwnPropertySlot):
        * JSCTypedArrayStubs.h:
        * runtime/Arguments.cpp:
        (JSC::Arguments::getOwnPropertySlotByIndex):
        (JSC::Arguments::getOwnPropertySlot):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::symbolTableGet):
        (JSC::JSActivation::getOwnPropertySlot):
        * runtime/JSArray.cpp:
        (JSC::JSArray::getOwnPropertySlot):
        * runtime/JSObject.cpp:
        (JSC::JSObject::getOwnPropertySlotByIndex):
        * runtime/JSString.h:
        (JSC::JSString::getStringPropertySlot):
        * runtime/JSSymbolTableObject.h:
        (JSC::symbolTableGet):
        * runtime/SparseArrayValueMap.cpp:
        (JSC::SparseArrayEntry::get):
            - Pass object containing property to PropertySlot::setValue
        * runtime/PropertySlot.h:
        (JSC::PropertySlot::setValue):
            - Logically, the base of a string property access is a temporary StringObject, but we optimize that away.
        (JSC::PropertySlot::setUndefined):
            - removed setValue(JSValue), added setValue(JSString*, JSValue)

oliver@apple.com's avatar
oliver@apple.com committed
2012
2013
2014
2015
2016
2017
2018
2019
2020
2013-08-15  Oliver Hunt  <oliver@apple.com>

        Remove bogus assertion.

        RS=Filip Pizlo

        * dfg/DFGAbstractInterpreterInlines.h:
        (JSC::DFG::::executeEffects):

2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2013-08-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>

        REGRESSION(r148790) Made 7 tests fail on x86 32bit
        https://bugs.webkit.org/show_bug.cgi?id=114913

        Reviewed by Filip Pizlo.

        The X87 register was not freed before some calls. Instead
        of inserting resetX87Registers to the last call sites,
        the two X87 registers are now freed in every call.

        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * offlineasm/instructions.rb:
        * offlineasm/x86.rb:

msaboff@apple.com's avatar
msaboff@apple.com committed
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2013-08-14  Michael Saboff  <msaboff@apple.com>

        Fixed jit on Win64.
        https://bugs.webkit.org/show_bug.cgi?id=119601

        Reviewed by Oliver Hunt.

        * jit/JITStubsMSVC64.asm: Added ctiVMThrowTrampolineSlowpath implementation.
        * jit/JSInterfaceJIT.h: Added thirdArgumentRegister.
        * jit/SlowPathCall.h:
        (JSC::JITSlowPathCall::call): Added correct calling convention for Win64.

2049
2050
2051
2052
2053
2054
2055
2056
2057
2013-08-14  Alex Christensen  <achristensen@apple.com>

        Compile fix for Win64 with jit disabled.
        https://bugs.webkit.org/show_bug.cgi?id=119804

        Reviewed by Michael Saboff.

        * offlineasm/cloop.rb: Added std:: before isnan.

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
2013-08-14  Julien Brianceau  <jbrianceau@nds.com>

        DFG_JIT implementation for sh4 architecture.
        https://bugs.webkit.org/show_bug.cgi?id=119737

        Reviewed by Oliver Hunt.

        * assembler/MacroAssemblerSH4.h:
        (JSC::MacroAssemblerSH4::invert):
        (JSC::MacroAssemblerSH4::add32):
        (JSC::MacroAssemblerSH4::and32):
        (JSC::MacroAssemblerSH4::lshift32):
        (JSC::MacroAssemblerSH4::mul32):
        (JSC::MacroAssemblerSH4::or32):
        (JSC::MacroAssemblerSH4::rshift32):
        (JSC::MacroAssemblerSH4::sub32):
        (JSC::MacroAssemblerSH4::xor32):
        (JSC::MacroAssemblerSH4::store32):
        (JSC::MacroAssemblerSH4::swapDouble):
        (JSC::MacroAssemblerSH4::storeDouble):
        (JSC::MacroAssemblerSH4::subDouble):
        (JSC::MacroAssemblerSH4::mulDouble):
        (JSC::MacroAssemblerSH4::divDouble):
        (JSC::MacroAssemblerSH4::negateDouble):
        (JSC::MacroAssemblerSH4::zeroExtend32ToPtr):
        (JSC::MacroAssemblerSH4::branchTruncateDoubleToUint32):
        (JSC::MacroAssemblerSH4::truncateDoubleToUint32):
        (JSC::MacroAssemblerSH4::swap):
        (JSC::MacroAssemblerSH4::jump):
        (JSC::MacroAssemblerSH4::branchNeg32):
        (JSC::MacroAssemblerSH4::branchAdd32):
        (JSC::MacroAssemblerSH4::branchMul32):
        (JSC::MacroAssemblerSH4::urshift32):
        * assembler/SH4Assembler.h:
        (JSC::SH4Assembler::SH4Assembler):
        (JSC::SH4Assembler::labelForWatchpoint):
        (JSC::SH4Assembler::label):
        (JSC::SH4Assembler::debugOffset):
        * dfg/DFGAssemblyHelpers.h:
        (JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall):
        (JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn):
        (JSC::DFG::AssemblyHelpers::debugCall):
        * dfg/DFGCCallHelpers.h:
        (JSC::DFG::CCallHelpers::setupArguments):
        (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
        * dfg/DFGFPRInfo.h:
        (JSC::DFG::FPRInfo::toRegister):
        (JSC::DFG::FPRInfo::toIndex):
        (JSC::DFG::FPRInfo::debugName):
        * dfg/DFGGPRInfo.h:
        (JSC::DFG::GPRInfo::toRegister):
        (JSC::DFG::GPRInfo::toIndex):
        (JSC::DFG::GPRInfo::debugName):
        * dfg/DFGOperations.cpp:
        * dfg/DFGSpeculativeJIT.h:
        (JSC::DFG::SpeculativeJIT::callOperation):
        * jit/JITStubs.h:
        * jit/JITStubsSH4.h:

fpizlo@apple.com's avatar
fpizlo@apple.com committed
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2013-08-13  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, fix build.

        * API/JSValue.mm:
        (isDate):
        (isArray):
        * API/JSWrapperMap.mm:
        (tryUnwrapObjcObject):
        * API/ObjCCallbackFunction.mm:
        (tryUnwrapBlock):

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
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
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
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
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
2013-08-13  Filip Pizlo  <fpizlo@apple.com>

        Foo::s_info should be Foo::info(), so that you can change how the s_info is actually linked
        https://bugs.webkit.org/show_bug.cgi?id=119770

        Reviewed by Mark Hahnenberg.

        * API/JSCallbackConstructor.cpp:
        (JSC::JSCallbackConstructor::finishCreation):
        * API/JSCallbackConstructor.h:
        (JSC::JSCallbackConstructor::createStructure):
        * API/JSCallbackFunction.cpp:
        (JSC::JSCallbackFunction::finishCreation):
        * API/JSCallbackFunction.h:
        (JSC::JSCallbackFunction::createStructure):
        * API/JSCallbackObject.cpp:
        (JSC::::createStructure):
        * API/JSCallbackObject.h:
        (JSC::JSCallbackObject::visitChildren):
        * API/JSCallbackObjectFunctions.h:
        (JSC::::asCallbackObject):
        (JSC::::finishCreation):
        * API/JSObjectRef.cpp:
        (JSObjectGetPrivate):
        (JSObjectSetPrivate):
        (JSObjectGetPrivateProperty):
        (JSObjectSetPrivateProperty):
        (JSObjectDeletePrivateProperty):
        * API/JSValueRef.cpp:
        (JSValueIsObjectOfClass):
        * API/JSWeakObjectMapRefPrivate.cpp:
        * API/ObjCCallbackFunction.h:
        (JSC::ObjCCallbackFunction::createStructure):
        * JSCTypedArrayStubs.h:
        * bytecode/CallLinkStatus.cpp:
        (JSC::CallLinkStatus::CallLinkStatus):
        (JSC::CallLinkStatus::function):
        (JSC::CallLinkStatus::internalFunction):
        * bytecode/CodeBlock.h:
        (JSC::baselineCodeBlockForInlineCallFrame):
        * bytecode/SpeculatedType.cpp:
        (JSC::speculationFromClassInfo):
        * bytecode/UnlinkedCodeBlock.cpp:
        (JSC::UnlinkedFunctionExecutable::visitChildren):
        (JSC::UnlinkedCodeBlock::visitChildren):
        (JSC::UnlinkedProgramCodeBlock::visitChildren):
        * bytecode/UnlinkedCodeBlock.h:
        (JSC::UnlinkedFunctionExecutable::createStructure):
        (JSC::UnlinkedProgramCodeBlock::createStructure):
        (JSC::UnlinkedEvalCodeBlock::createStructure):
        (JSC::UnlinkedFunctionCodeBlock::createStructure):
        * debugger/Debugger.cpp:
        * debugger/DebuggerActivation.cpp:
        (JSC::DebuggerActivation::visitChildren):
        * debugger/DebuggerActivation.h:
        (JSC::DebuggerActivation::createStructure):
        * debugger/DebuggerCallFrame.cpp:
        (JSC::DebuggerCallFrame::functionName):
        * dfg/DFGAbstractInterpreterInlines.h:
        (JSC::DFG::::executeEffects):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::isStringPrototypeMethodSane):
        (JSC::DFG::FixupPhase::canOptimizeStringObjectAccess):
        * dfg/DFGGraph.cpp:
        (JSC::DFG::Graph::dump):
        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::isInternalFunctionConstant):
        * dfg/DFGOperations.cpp:
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::checkArray):
        (JSC::DFG::SpeculativeJIT::compileNewStringObject):
        * dfg/DFGThunks.cpp:
        (JSC::DFG::virtualForThunkGenerator):
        * interpreter/Interpreter.cpp:
        (JSC::loadVarargs):
        * jsc.cpp:
        (GlobalObject::createStructure):
        * profiler/LegacyProfiler.cpp:
        (JSC::LegacyProfiler::createCallIdentifier):
        * runtime/Arguments.cpp:
        (JSC::Arguments::visitChildren):
        * runtime/Arguments.h:
        (JSC::Arguments::createStructure):
        (JSC::asArguments):
        (JSC::Arguments::finishCreation):
        * runtime/ArrayConstructor.cpp:
        (JSC::arrayConstructorIsArray):
        * runtime/ArrayConstructor.h:
        (JSC::ArrayConstructor::createStructure):
        * runtime/ArrayPrototype.cpp:
        (JSC::ArrayPrototype::finishCreation):
        (JSC::arrayProtoFuncConcat):
        (JSC::attemptFastSort):
        * runtime/ArrayPrototype.h:
        (JSC::ArrayPrototype::createStructure):
        * runtime/BooleanConstructor.h:
        (JSC::BooleanConstructor::createStructure):
        * runtime/BooleanObject.cpp:
        (JSC::BooleanObject::finishCreation):
        * runtime/BooleanObject.h:
        (JSC::BooleanObject::createStructure):
        (JSC::asBooleanObject):
        * runtime/BooleanPrototype.cpp:
        (JSC::BooleanPrototype::finishCreation):
        (JSC::booleanProtoFuncToString):
        (JSC::booleanProtoFuncValueOf):
        * runtime/BooleanPrototype.h:
        (JSC::BooleanPrototype::createStructure):
        * runtime/DateConstructor.cpp:
        (JSC::constructDate):
        * runtime/DateConstructor.h:
        (JSC::DateConstructor::createStructure):
        * runtime/DateInstance.cpp:
        (JSC::DateInstance::finishCreation):
        * runtime/DateInstance.h:
        (JSC::DateInstance::createStructure):
        (JSC::asDateInstance):
        * runtime/DatePrototype.cpp:
        (JSC::formateDateInstance):
        (JSC::DatePrototype::finishCreation):
        (JSC::dateProtoFuncToISOString):
        (JSC::dateProtoFuncToLocaleString):
        (JSC::dateProtoFuncToLocaleDateString):
        (JSC::dateProtoFuncToLocaleTimeString):
        (JSC::dateProtoFuncGetTime):
        (JSC::dateProtoFuncGetFullYear):
        (JSC::dateProtoFuncGetUTCFullYear):
        (JSC::dateProtoFuncGetMonth):
        (JSC::dateProtoFuncGetUTCMonth):
        (JSC::dateProtoFuncGetDate):
        (JSC::dateProtoFuncGetUTCDate):
        (JSC::dateProtoFuncGetDay):
        (JSC::dateProtoFuncGetUTCDay):
        (JSC::dateProtoFuncGetHours):
        (JSC::dateProtoFuncGetUTCHours):
        (JSC::dateProtoFuncGetMinutes):
        (JSC::dateProtoFuncGetUTCMinutes):
        (JSC::dateProtoFuncGetSeconds):
        (JSC::dateProtoFuncGetUTCSeconds):
        (JSC::dateProtoFuncGetMilliSeconds):
        (JSC::dateProtoFuncGetUTCMilliseconds):
        (JSC::dateProtoFuncGetTimezoneOffset):
        (JSC::dateProtoFuncSetTime):
        (JSC::setNewValueFromTimeArgs):
        (JSC::setNewValueFromDateArgs):
        (JSC::dateProtoFuncSetYear):
        (JSC::dateProtoFuncGetYear):
        * runtime/DatePrototype.h:
        (JSC::DatePrototype::createStructure):
        * runtime/Error.h:
        (JSC::StrictModeTypeErrorFunction::createStructure):
        * runtime/ErrorConstructor.h:
        (JSC::ErrorConstructor::createStructure):
        * runtime/ErrorInstance.cpp:
        (JSC::ErrorInstance::finishCreation):
        * runtime/ErrorInstance.h:
        (JSC::ErrorInstance::createStructure):
        * runtime/ErrorPrototype.cpp:
        (JSC::ErrorPrototype::finishCreation):
        * runtime/ErrorPrototype.h:
        (JSC::ErrorPrototype::createStructure):
        * runtime/ExceptionHelpers.cpp:
        (JSC::isTerminatedExecutionException):
        * runtime/ExceptionHelpers.h:
        (JSC::TerminatedExecutionError::createStructure):
        * runtime/Executable.cpp:
        (JSC::EvalExecutable::visitChildren):
        (JSC::ProgramExecutable::visitChildren):
        (JSC::FunctionExecutable::visitChildren):
        (JSC::ExecutableBase::hashFor):
        * runtime/Executable.h:
        (JSC::ExecutableBase::createStructure):
        (JSC::NativeExecutable::createStructure):
        (JSC::EvalExecutable::createStructure):
        (JSC::ProgramExecutable::createStructure):
        (JSC::FunctionExecutable::compileFor):
        (JSC::FunctionExecutable::compileOptimizedFor):
        (JSC::FunctionExecutable::createStructure):
        * runtime/FunctionConstructor.h:
        (JSC::FunctionConstructor::createStructure):
        * runtime/FunctionPrototype.cpp:
        (JSC::functionProtoFuncToString):
        (JSC::functionProtoFuncApply):
        (JSC::functionProtoFuncBind):
        * runtime/FunctionPrototype.h:
        (JSC::FunctionPrototype::createStructure):
        * runtime/GetterSetter.cpp:
        (JSC::GetterSetter::visitChildren):
        * runtime/GetterSetter.h:
        (JSC::GetterSetter::createStructure):
        * runtime/InternalFunction.cpp:
        (JSC::InternalFunction::finishCreation):
        * runtime/InternalFunction.h:
        (JSC::InternalFunction::createStructure):
        (JSC::asInternalFunction):
        * runtime/JSAPIValueWrapper.h:
        (JSC::JSAPIValueWrapper::createStructure):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::visitChildren):
        (JSC::JSActivation::argumentsGetter):
        * runtime/JSActivation.h:
        (JSC::JSActivation::createStructure):
        (JSC::asActivation):
        * runtime/JSArray.h:
        (JSC::JSArray::createStructure):
        (JSC::asArray):
        (JSC::isJSArray):
        * runtime/JSBoundFunction.cpp:
        (JSC::JSBoundFunction::finishCreation):
        (JSC::JSBoundFunction::visitChildren):
        * runtime/JSBoundFunction.h:
        (JSC::JSBoundFunction::createStructure):
        * runtime/JSCJSValue.cpp:
        (JSC::JSValue::dumpInContext):
        * runtime/JSCJSValueInlines.h:
        (JSC::JSValue::isFunction):
        * runtime/JSCell.h:
        (JSC::jsCast):
        (JSC::jsDynamicCast):
        * runtime/JSCellInlines.h:
        (JSC::allocateCell):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::finishCreation):
        (JSC::JSFunction::visitChildren):
        (JSC::skipOverBoundFunctions):
        (JSC::JSFunction::callerGetter):
        * runtime/JSFunction.h:
        (JSC::JSFunction::createStructure):
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::visitChildren):
        (JSC::slowValidateCell):
        * runtime/JSGlobalObject.h:
        (JSC::JSGlobalObject::createStructure):
        * runtime/JSNameScope.cpp:
        (JSC::JSNameScope::visitChildren):
        * runtime/JSNameScope.h:
        (JSC::JSNameScope::createStructure):
        * runtime/JSNotAnObject.h:
        (JSC::JSNotAnObject::createStructure):
        * runtime/JSONObject.cpp:
        (JSC::JSONObject::finishCreation):
        (JSC::unwrapBoxedPrimitive):
        (JSC::Stringifier::Stringifier):
        (JSC::Stringifier::appendStringifiedValue):
        (JSC::Stringifier::Holder::Holder):
        (JSC::Walker::walk):
        (JSC::JSONProtoFuncStringify):
        * runtime/JSONObject.h:
        (JSC::JSONObject::createStructure):
        * runtime/JSObject.cpp:
        (JSC::getCallableObjectSlow):
        (JSC::JSObject::visitChildren):
        (JSC::JSObject::copyBackingStore):
        (JSC::JSFinalObject::visitChildren):
        (JSC::JSObject::ensureInt32Slow):
        (JSC::JSObject::ensureDoubleSlow):
        (JSC::JSObject::ensureContiguousSlow):
        (JSC::JSObject::ensureArrayStorageSlow):
        * runtime/JSObject.h:
        (JSC::JSObject::finishCreation):
        (JSC::JSObject::createStructure):
        (JSC::JSNonFinalObject::createStructure):
        (JSC::JSFinalObject::createStructure):
        (JSC::isJSFinalObject):
        * runtime/JSPropertyNameIterator.cpp:
        (JSC::JSPropertyNameIterator::visitChildren):
        * runtime/JSPropertyNameIterator.h:
        (JSC::JSPropertyNameIterator::createStructure):
        * runtime/JSProxy.cpp:
        (JSC::JSProxy::visitChildren):
        * runtime/JSProxy.h:
        (JSC::JSProxy::createStructure):
        * runtime/JSScope.cpp:
        (JSC::JSScope::visitChildren):
        * runtime/JSSegmentedVariableObject.cpp:
        (JSC::JSSegmentedVariableObject::visitChildren):
        * runtime/JSString.h:
        (JSC::JSString::createStructure):
        (JSC::isJSString):
        * runtime/JSSymbolTableObject.cpp:
        (JSC::JSSymbolTableObject::visitChildren):
        * runtime/JSVariableObject.h:
        * runtime/JSWithScope.cpp:
        (JSC::JSWithScope::visitChildren):
        * runtime/JSWithScope.h:
        (JSC::JSWithScope::createStructure):
        * runtime/JSWrapperObject.cpp:
        (JSC::JSWrapperObject::visitChildren):
        * runtime/JSWrapperObject.h:
        (JSC::JSWrapperObject::createStructure):
        * runtime/MathObject.cpp:
        (JSC::MathObject::finishCreation):
        * runtime/MathObject.h:
        (JSC::MathObject::createStructure):
        * runtime/NameConstructor.h:
        (JSC::NameConstructor::createStructure):
        * runtime/NameInstance.h:
        (JSC::NameInstance::createStructure):
        (JSC::NameInstance::finishCreation):
        * runtime/NamePrototype.cpp:
        (JSC::NamePrototype::finishCreation):
        (JSC::privateNameProtoFuncToString):
        * runtime/NamePrototype.h:
        (JSC::NamePrototype::createStructure):
        * runtime/NativeErrorConstructor.cpp:
        (JSC::NativeErrorConstructor::visitChildren):
        * runtime/NativeErrorConstructor.h:
        (JSC::NativeErrorConstructor::createStructure):
        (JSC::NativeErrorConstructor::finishCreation):
        * runtime/NumberConstructor.cpp:
        (JSC::NumberConstructor::finishCreation):
        * runtime/NumberConstructor.h:
        (JSC::NumberConstructor::createStructure):
        * runtime/NumberObject.cpp:
        (JSC::NumberObject::finishCreation):
        * runtime/NumberObject.h:
        (JSC::NumberObject::createStructure):
        * runtime/NumberPrototype.cpp:
        (JSC::NumberPrototype::finishCreation):
        * runtime/NumberPrototype.h:
        (JSC::NumberPrototype::createStructure):
        * runtime/ObjectConstructor.h:
        (JSC::ObjectConstructor::createStructure):
        * runtime/ObjectPrototype.cpp:
        (JSC::ObjectPrototype::finishCreation):
        * runtime/ObjectPrototype.h:
        (JSC::ObjectPrototype::createStructure):
        * runtime/PropertyMapHashTable.h:
        (JSC::PropertyTable::createStructure):
        * runtime/PropertyTable.cpp:
        (JSC::PropertyTable::visitChildren):
        * runtime/RegExp.h:
        (JSC::RegExp::createStructure):
        * runtime/RegExpConstructor.cpp:
        (JSC::RegExpConstructor::finishCreation):
        (JSC::RegExpConstructor::visitChildren):
        (JSC::constructRegExp):
        * runtime/RegExpConstructor.h:
        (JSC::RegExpConstructor::createStructure):
        (JSC::asRegExpConstructor):
        * runtime/RegExpMatchesArray.cpp:
        (JSC::RegExpMatchesArray::visitChildren):
        * runtime/RegExpMatchesArray.h:
        (JSC::RegExpMatchesArray::createStructure):
        * runtime/RegExpObject.cpp:
        (JSC::RegExpObject::finishCreation):
        (JSC::RegExpObject::visitChildren):
        * runtime/RegExpObject.h:
        (JSC::RegExpObject::createStructure):
        (JSC::asRegExpObject):
        * runtime/RegExpPrototype.cpp:
        (JSC::regExpProtoFuncTest):
        (JSC::regExpProtoFuncExec):
        (JSC::regExpProtoFuncCompile):
        (JSC::regExpProtoFuncToString):
        * runtime/RegExpPrototype.h:
        (JSC::RegExpPrototype::createStructure):
        * runtime/SparseArrayValueMap.cpp:
        (JSC::SparseArrayValueMap::createStructure):
        * runtime/SparseArrayValueMap.h:
        * runtime/StrictEvalActivation.h:
        (JSC::StrictEvalActivation::createStructure):
        * runtime/StringConstructor.h:
        (JSC::StringConstructor::createStructure):
        * runtime/StringObject.cpp:
        (JSC::StringObject::finishCreation):
        * runtime/StringObject.h:
        (JSC::StringObject::createStructure):
        (JSC::asStringObject):
        * runtime/StringPrototype.cpp:
        (JSC::StringPrototype::finishCreation):
        (JSC::stringProtoFuncReplace):
        (JSC::stringProtoFuncToString):
        (JSC::stringProtoFuncMatch):
        (JSC::stringProtoFuncSearch):
        (JSC::stringProtoFuncSplit):
        * runtime/StringPrototype.h:
        (JSC::StringPrototype::createStructure):
        * runtime/Structure.cpp:
        (JSC::Structure::Structure):
        (JSC::Structure::materializePropertyMap):
        (JSC::Structure::get):
        (JSC::Structure::visitChildren):
        * runtime/Structure.h:
        (JSC::Structure::typeInfo):
        (JSC::Structure::previousID):
        (JSC::Structure::outOfLineSize):
        (JSC::Structure::totalStorageCapacity):
        (JSC::Structure::materializePropertyMapIfNecessary):
        (JSC::Structure::materializePropertyMapIfNecessaryForPinning):
        * runtime/StructureChain.cpp:
        (JSC::StructureChain::visitChildren):
        * runtime/StructureChain.h:
        (JSC::StructureChain::createStructure):
        * runtime/StructureInlines.h:
        (JSC::Structure::get):
        * runtime/StructureRareData.cpp:
        (JSC::StructureRareData::createStructure):
        (JSC::StructureRareData::visitChildren):
        * runtime/StructureRareData.h:
        * runtime/SymbolTable.h:
        (JSC::SharedSymbolTable::createStructure):
        * runtime/VM.cpp:
        (JSC::VM::VM):
        (JSC::StackPreservingRecompiler::operator()):
        (JSC::VM::releaseExecutableMemory):
        * runtime/WriteBarrier.h:
        (JSC::validateCell):
        * testRegExp.cpp:
        (GlobalObject::createStructure):

2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2013-08-13  Arunprasad Rajkumar  <arurajku@cisco.com>

        [WTF] [JSC] Replace currentTime() with monotonicallyIncreasingTime() in all possible places
        https://bugs.webkit.org/show_bug.cgi?id=119762

        Reviewed by Geoffrey Garen.

        * heap/Heap.cpp:
        (JSC::Heap::Heap):
        (JSC::Heap::markRoots):
        (JSC::Heap::collect):
        * jsc.cpp:
        (StopWatch::start):
        (StopWatch::stop):
        * testRegExp.cpp:
        (StopWatch::start):
        (StopWatch::stop):

2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2013-08-13  Julien Brianceau  <jbrianceau@nds.com>

        [sh4] Prepare LLINT for DFG_JIT implementation.
        https://bugs.webkit.org/show_bug.cgi?id=119755

        Reviewed by Oliver Hunt.

        * LLIntOffsetsExtractor.pro: Add sh4.rb dependency.
        * offlineasm/sh4.rb:
            - Handle storeb opcode.
            - Make relative jumps when possible using braf opcode.
            - Update bmulio implementation to be consistent with baseline JIT.
            - Remove useless code from leap opcode.
            - Fix incorrect comment.

2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2013-08-13  Julien Brianceau  <jbrianceau@nds.com>

        [sh4] Prepare baseline JIT for DFG_JIT implementation.
        https://bugs.webkit.org/show_bug.cgi?id=119758

        Reviewed by Oliver Hunt.

        * assembler/MacroAssemblerSH4.h:
            - Introduce a loadEffectiveAddress function to avoid code duplication.
            - Add ASSERTs and clean code.
        * assembler/SH4Assembler.h:
            - Prepare DFG_JIT implementation.
            - Add ASSERTs.
        * jit/JITStubs.cpp:
            - Add SH4 specific call for assertions.
        * jit/JITStubs.h:
            - Cosmetic change.
        * jit/JITStubsSH4.h:
            - Use constants to be more flexible with sh4 JIT stack frame.
        * jit/JSInterfaceJIT.h:
            - Cosmetic change.

2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2013-08-13  Oliver Hunt  <oliver@apple.com>

        Harden executeConstruct against incorrect return types from host functions
        https://bugs.webkit.org/show_bug.cgi?id=119757

        Reviewed by Mark Hahnenberg.

        Add logic to guard against bogus return types.  There doesn't seem to be any
        class in webkit that does this wrong, but the typed array stubs in debug JSC
        do exhibit this bad behaviour.

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

2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2013-08-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>

        [Qt] Fix C++11 build with gcc 4.4 and 4.5
        https://bugs.webkit.org/show_bug.cgi?id=119736

        Reviewed by Anders Carlsson.

        Don't force C++11 mode off anymore.

        * Target.pri:

2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2013-08-12  Oliver Hunt  <oliver@apple.com>

        Remove CodeBlock's notion of adding identifiers entirely
        https://bugs.webkit.org/show_bug.cgi?id=119708

        Reviewed by Geoffrey Garen.

        Remove addAdditionalIdentifier entirely, including the bogus assertion.
        Move the addition of identifiers to DFGPlan::reallyAdd

        * bytecode/CodeBlock.h:
        * dfg/DFGDesiredIdentifiers.cpp:
        (JSC::DFG::DesiredIdentifiers::reallyAdd):
        * dfg/DFGDesiredIdentifiers.h:
        * dfg/DFGPlan.cpp:
        (JSC::DFG::Plan::reallyAdd):
        (JSC::DFG::Plan::finalize):
        * dfg/DFGPlan.h:

oliver@apple.com's avatar
oliver@apple.com committed
2642
2643
2644
2645
2646
2647
2013-08-12  Oliver Hunt  <oliver@apple.com>

        Build fix

        * runtime/JSCell.h:

2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2013-08-12  Oliver Hunt  <oliver@apple.com>

        Move additionalIdentifiers into DFGCommonData as only the optimising JITs use them
        https://bugs.webkit.org/show_bug.cgi?id=119705

        Reviewed by Geoffrey Garen.

        Relatively trivial refactoring

        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::numberOfAdditionalIdentifiers):
        (JSC::CodeBlock::addAdditionalIdentifier):
        (JSC::CodeBlock::identifier):
        (JSC::CodeBlock::numberOfIdentifiers):
        * dfg/DFGCommonData.h:

2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
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
2013-08-12  Oliver Hunt  <oliver@apple.com>

        Stop making unnecessary copy of CodeBlock Identifier Vector
        https://bugs.webkit.org/show_bug.cgi?id=119702

        Reviewed by Michael Saboff.

        Make CodeBlock simply use a separate Vector for additional Identifiers
        and use the UnlinkedCodeBlock for the initial set of identifiers.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::printGetByIdOp):
        (JSC::dumpStructure):
        (JSC::dumpChain):
        (JSC::CodeBlock::printGetByIdCacheStatus):
        (JSC::CodeBlock::printPutByIdOp):
        (JSC::CodeBlock::dumpBytecode):
        (JSC::CodeBlock::CodeBlock):
        (JSC::CodeBlock::shrinkToFit):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::numberOfIdentifiers):
        (JSC::CodeBlock::numberOfAdditionalIdentifiers):
        (JSC::CodeBlock::addAdditionalIdentifier):
        (JSC::CodeBlock::identifier):
        * dfg/DFGDesiredIdentifiers.cpp:
        (JSC::DFG::DesiredIdentifiers::reallyAdd):
        * jit/JIT.h:
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emitSlow_op_get_arguments_length):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::emit_op_get_by_id):
        (JSC::JIT::compileGetByIdHotPath):
        (JSC::JIT::emitSlow_op_get_by_id):
        (JSC::JIT::compileGetByIdSlowCase):
        (JSC::JIT::emitSlow_op_put_by_id):
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::emit_op_get_by_id):
        (JSC::JIT::compileGetByIdHotPath):
        (JSC::JIT::compileGetByIdSlowCase):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):

2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2013-08-08  Mark Lam  <mark.lam@apple.com>

        Restoring use of StackIterator instead of Interpreter::getStacktrace().
        https://bugs.webkit.org/show_bug.cgi?id=119575.

        Reviewed by Oliver Hunt.

        * interpreter/Interpreter.h:
        - Made getStackTrace() private.
        * interpreter/StackIterator.cpp:
        (JSC::StackIterator::StackIterator):
        (JSC::StackIterator::numberOfFrames):
        - Computes the number of frames by iterating through the whole stack
          from the starting frame. The iterator will save its current frame
          position before counting the frames, and then restoring it after
          the counting.
        (JSC::StackIterator::gotoFrameAtIndex):
        (JSC::StackIterator::gotoNextFrame):
        (JSC::StackIterator::resetIterator):
        - Points the iterator to the starting frame.
        * interpreter/StackIteratorPrivate.h:

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
2013-08-08  Mark Lam  <mark.lam@apple.com>

        Moved ErrorConstructor and NativeErrorConstructor helper functions into
        the Interpreter class.
        https://bugs.webkit.org/show_bug.cgi?id=119576.

        Reviewed by Oliver Hunt.

        This change is needed to prepare for making Interpreter::getStackTrace()
        private. It does not change the behavior of the code, only the lexical
        scoping.

        * interpreter/Interpreter.h:
        - Added helper functions for ErrorConstructor and NativeErrorConstructor.
        * runtime/ErrorConstructor.cpp:
        (JSC::Interpreter::constructWithErrorConstructor):
        (JSC::ErrorConstructor::getConstructData):
        (JSC::Interpreter::callErrorConstructor):
        (JSC::ErrorConstructor::getCallData):
        - Don't want ErrorConstructor to call Interpreter::getStackTrace()
          directly. So, we moved the helper functions into the Interpreter
          class.
        * runtime/NativeErrorConstructor.cpp:
        (JSC::Interpreter::constructWithNativeErrorConstructor):
        (JSC::NativeErrorConstructor::getConstructData):
        (JSC::Interpreter::callNativeErrorConstructor):
        (JSC::NativeErrorConstructor::getCallData):
        - Don't want NativeErrorConstructor to call Interpreter::getStackTrace()
          directly. So, we moved the helper functions into the Interpreter
          class.

2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2013-08-07  Mark Hahnenberg  <mhahnenberg@apple.com>

        32-bit code gen for TypeOf doesn't properly update the AbstractInterpreter state
        https://bugs.webkit.org/show_bug.cgi?id=119555

        Reviewed by Geoffrey Garen.

        It uses a speculationCheck where it should be using a DFG_TYPE_CHECK like the 64-bit backend does.
        This was causing crashes on maps.google.com in 32-bit debug builds.

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

2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2013-08-06  Michael Saboff  <msaboff@apple.com>

        REGRESSION(FTL merge): Assertion fail on 32 bit with enabled DFG JIT
        https://bugs.webkit.org/show_bug.cgi?id=119405

        Reviewed by Geoffrey Garen.

        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileGetByValOnString): For X86 32 bit, construct an indexed address
        ourselves to save a register and then load from it.

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
2013-08-06  Filip Pizlo  <fpizlo@apple.com>

        DFG FixupPhase should insert Int32ToDouble nodes for number uses in NewArray, and SpeculativeJIT 64-bit should not try to coerce integer constants to double constants
        https://bugs.webkit.org/show_bug.cgi?id=119528

        Reviewed by Geoffrey Garen.

        Either of the two fixes would solve the crash I saw. Basically, for best performance, we want the DFG register allocator to track double uses and non-double
        uses of a node separately, and we accomplish this by inserting Int32ToDouble nodes in the FixupPhase. But even if FixupPhase fails to do this, we still want
        the DFG register allocator to do the right thing: if it encounters a double use of an integer, it should perform a conversion and preserve the original
        format of the value (namely, that it was an integer). For constants, the best format to preserve is None, so that future integer uses rematerialize the int
        from scratch. This only affects the 64-bit backend; the 32-bit backend was already doing the right thing.

        This also fixes some more debug dumping code, and adds some stronger assertions for integer arrays.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::finalizeUnconditionally):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        * dfg/DFGGraph.cpp:
        (JSC::DFG::Graph::dump):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
        * runtime/JSObject.h:
        (JSC::JSObject::getIndexQuickly):
        (JSC::JSObject::tryGetIndexQuickly):

2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2013-08-08  Stephanie Lewis  <slewis@apple.com>

        <rdar://problem/14680524> REGRESSION(153806): Crash @ yahoo.com when WebKit is built with a .order file

        Unreviewed.

        Ensure llint symbols are in source order.

        * JavaScriptCore.order:

2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2013-08-06  Mark Lam  <mark.lam@apple.com>

        Assertion failure in emitExpressionInfo when reloading with Web Inspector open.
        https://bugs.webkit.org/show_bug.cgi?id=119532.

        Reviewed by Oliver Hunt.

        * parser/Parser.cpp:
        (JSC::::Parser):
        - Just need to initialize the Parser's JSTokenLocation's initial line and
          startOffset as well during Parser construction.

2836
2837
2838
2839
2840
2841
2842
2843
2844
2013-08-06  Stephanie Lewis  <slewis@apple.com>

        Update Order Files for Safari
        <rdar://problem/14517392>

        Unreviewed.

        * JavaScriptCore.order:

2845
2846
2847
2848
2849
2850
2851
2852
2853
2013-08-04  Sam Weinig  <sam@webkit.org>

        Remove support for HTML5 MicroData
        https://bugs.webkit.org/show_bug.cgi?id=119480

        Reviewed by Anders Carlsson.

        * Configurations/FeatureDefines.xcconfig:

2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2013-08-05  Oliver Hunt  <oliver@apple.com>

        Delay Arguments creation in strict mode
        https://bugs.webkit.org/show_bug.cgi?id=119505

        Reviewed by Geoffrey Garen.

        Make use of the write tracking performed by the parser to
        allow us to know if we're modifying the parameters to a function.
        Then use that information to make strict mode function opt out
        of eager arguments creation.

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::BytecodeGenerator):
        (JSC::BytecodeGenerator::createArgumentsIfNecessary):
        (JSC::BytecodeGenerator::emitReturn):
        * bytecompiler/BytecodeGenerator.h:
        (JSC::BytecodeGenerator::shouldTearOffArgumentsEagerly):
        * parser/Nodes.h:
        (JSC::ScopeNode::modifiesParameter):
        * parser/Parser.cpp:
        (JSC::::parseInner):
        * parser/Parser.h:
        (JSC::Scope::declareParameter):
        (JSC::Scope::getCapturedVariables):
        (JSC::Parser::declareWrite):
        * parser/ParserModes.h:

2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2013-08-06  Patrick Gansterer  <paroga@webkit.org>

        Remove useless code from COMPILER(RVCT) JITStubs
        https://bugs.webkit.org/show_bug.cgi?id=119521

        Reviewed by Geoffrey Garen.

        * jit/JITStubsARMv7.h:
        (JSC::ctiVMThrowTrampoline): "ldr r6, [sp, #PRESERVED_R6_OFFSET]" was called twice.
        (JSC::ctiOpThrowNotCaught): Ditto.

2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2013-07-23  David Farler  <dfarler@apple.com>

        Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
        https://bugs.webkit.org/show_bug.cgi?id=117762

        Reviewed by Mark Rowe.

        * Configurations/DebugRelease.xcconfig:
        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
        * Configurations/JavaScriptCore.xcconfig:
        Add ASAN_OTHER_LDFLAGS.
        * Configurations/ToolExecutable.xcconfig:
        Don't use ASAN for build tools.

2907
2908
2909
2910
2911
2912
2013-08-06  Patrick Gansterer  <paroga@webkit.org>

        Build fix for ARM MSVC after r153222 and r153648.

        * jit/JITStubsARM.h: Added ctiVMThrowTrampolineSlowpath.

2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2013-08-06  Patrick Gansterer  <paroga@webkit.org>

        Build fix for ARM MSVC after r150109.

        Read the stub template from a header files instead of the JITStubs.cpp.

        * CMakeLists.txt:
        * DerivedSources.pri:
        * create_jit_stubs:

2923
2924
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
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
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
3046
3047
3048
3049
3050
2013-08-05  Oliver Hunt  <oliver@apple.com>

        Move TypedArray implementation into JSC
        https://bugs.webkit.org/show_bug.cgi?id=119489

        Reviewed by Filip Pizlo.

        Move TypedArray implementation into JSC in advance of re-implementation

        * GNUmakefile.list.am:
        * JSCTypedArrayStubs.h:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * runtime/ArrayBuffer.cpp: Renamed from Source/WTF/wtf/ArrayBuffer.cpp.
        (JSC::ArrayBuffer::transfer):
        (JSC::ArrayBuffer::addView):
        (JSC::ArrayBuffer::removeView):
        * runtime/ArrayBuffer.h: Renamed from Source/WTF/wtf/ArrayBuffer.h.
        (JSC::ArrayBufferContents::ArrayBufferContents):
        (JSC::ArrayBufferContents::data):
        (JSC::ArrayBufferContents::sizeInBytes):
        (JSC::ArrayBufferContents::transfer):
        (JSC::ArrayBufferContents::copyTo):
        (JSC::ArrayBuffer::isNeutered):
        (JSC::ArrayBuffer::~ArrayBuffer):
        (JSC::ArrayBuffer::clampValue):
        (JSC::ArrayBuffer::create):
        (JSC::ArrayBuffer::createUninitialized):
        (JSC::ArrayBuffer::ArrayBuffer):
        (JSC::ArrayBuffer::data):
        (JSC::ArrayBuffer::byteLength):
        (JSC::ArrayBuffer::slice):
        (JSC::ArrayBuffer::sliceImpl):
        (JSC::ArrayBuffer::clampIndex):
        (JSC::ArrayBufferContents::tryAllocate):
        (JSC::ArrayBufferContents::~ArrayBufferContents):
        * runtime/ArrayBufferView.cpp: Renamed from Source/WTF/wtf/ArrayBufferView.cpp.
        (JSC::ArrayBufferView::ArrayBufferView):
        (JSC::ArrayBufferView::~ArrayBufferView):
        (JSC::ArrayBufferView::neuter):
        * runtime/ArrayBufferView.h: Renamed from Source/WTF/wtf/ArrayBufferView.h.
        (JSC::ArrayBufferView::buffer):
        (JSC::ArrayBufferView::baseAddress):
        (JSC::ArrayBufferView::byteOffset):
        (JSC::ArrayBufferView::setNeuterable):
        (JSC::ArrayBufferView::isNeuterable):
        (JSC::ArrayBufferView::verifySubRange):
        (JSC::ArrayBufferView::clampOffsetAndNumElements):
        (JSC::ArrayBufferView::setImpl):
        (JSC::ArrayBufferView::setRangeImpl):
        (JSC::ArrayBufferView::zeroRangeImpl):
        (JSC::ArrayBufferView::calculateOffsetAndLength):
        * runtime/Float32Array.h: Renamed from Source/WTF/wtf/Float32Array.h.
        (JSC::Float32Array::set):
        (JSC::Float32Array::getType):
        (JSC::Float32Array::create):
        (JSC::Float32Array::createUninitialized):
        (JSC::Float32Array::Float32Array):
        (JSC::Float32Array::subarray):
        * runtime/Float64Array.h: Renamed from Source/WTF/wtf/Float64Array.h.
        (JSC::Float64Array::set):
        (JSC::Float64Array::getType):
        (JSC::Float64Array::create):
        (JSC::Float64Array::createUninitialized):
        (JSC::Float64Array::Float64Array):
        (JSC::Float64Array::subarray):
        * runtime/Int16Array.h: Renamed from Source/WTF/wtf/Int16Array.h.
        (JSC::Int16Array::getType):
        (JSC::Int16Array::create):
        (JSC::Int16Array::createUninitialized):
        (JSC::Int16Array::Int16Array):
        (JSC::Int16Array::subarray):
        * runtime/Int32Array.h: Renamed from Source/WTF/wtf/Int32Array.h.
        (JSC::Int32Array::getType):
        (JSC::Int32Array::create):
        (JSC::Int32Array::createUninitialized):
        (JSC::Int32Array::Int32Array):
        (JSC::Int32Array::subarray):
        * runtime/Int8Array.h: Renamed from Source/WTF/wtf/Int8Array.h.
        (JSC::Int8Array::getType):
        (JSC::Int8Array::create):
        (JSC::Int8Array::createUninitialized):
        (JSC::Int8Array::Int8Array):
        (JSC::Int8Array::subarray):
        * runtime/IntegralTypedArrayBase.h: Renamed from Source/WTF/wtf/IntegralTypedArrayBase.h.
        (JSC::IntegralTypedArrayBase::set):
        (JSC::IntegralTypedArrayBase::IntegralTypedArrayBase):
        * runtime/TypedArrayBase.h: Renamed from Source/WTF/wtf/TypedArrayBase.h.
        (JSC::TypedArrayBase::data):
        (JSC::TypedArrayBase::set):
        (JSC::TypedArrayBase::setRange):
        (JSC::TypedArrayBase::zeroRange):
        (JSC::TypedArrayBase::length):
        (JSC::TypedArrayBase::byteLength):
        (JSC::TypedArrayBase::item):
        (JSC::TypedArrayBase::checkInboundData):
        (JSC::TypedArrayBase::TypedArrayBase):
        (JSC::TypedArrayBase::create):
        (JSC::TypedArrayBase::createUninitialized):
        (JSC::TypedArrayBase::subarrayImpl):
        (JSC::TypedArrayBase::neuter):
        * runtime/Uint16Array.h: Renamed from Source/WTF/wtf/Uint16Array.h.
        (JSC::Uint16Array::getType):
        (JSC::Uint16Array::create):
        (JSC::Uint16Array::createUninitialized):
        (JSC::Uint16Array::Uint16Array):
        (JSC::Uint16Array::subarray):
        * runtime/Uint32Array.h: Renamed from Source/WTF/wtf/Uint32Array.h.
        (JSC::Uint32Array::getType):
        (JSC::Uint32Array::create):
        (JSC::Uint32Array::createUninitialized):
        (JSC::Uint32Array::Uint32Array):
        (JSC::Uint32Array::subarray):
        * runtime/Uint8Array.h: Renamed from Source/WTF/wtf/Uint8Array.h.
        (JSC::Uint8Array::getType):
        (JSC::Uint8Array::create):
        (JSC::Uint8Array::createUninitialized):
        (JSC::Uint8Array::Uint8Array):
        (JSC::Uint8Array::subarray):
        * runtime/Uint8ClampedArray.h: Renamed from Source/WTF/wtf/Uint8ClampedArray.h.
        (JSC::Uint8ClampedArray::getType):
        (JSC::Uint8ClampedArray::create):
        (JSC::Uint8ClampedArray::createUninitialized):
        (JSC::Uint8ClampedArray::zeroFill):
        (JSC::Uint8ClampedArray::set):
        (JSC::Uint8ClampedArray::Uint8ClampedArray):
        (JSC::Uint8ClampedArray::subarray):
        * runtime/VM.h:

3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
2013-08-03  Filip Pizlo  <fpizlo@apple.com>

        Copied space should be able to handle more than one copied backing store per JSCell
        https://bugs.webkit.org/show_bug.cgi?id=119471

        Reviewed by Mark Hahnenberg.
        
        This allows a cell to call copyLater() multiple times for multiple different
        backing stores, and then have copyBackingStore() called exactly once for each
        of those. A token tells it which backing store to copy. All backing stores
        must be named using the CopyToken, an enumeration which currently cannot
        exceed eight entries.
        
        When copyBackingStore() is called, it's up to the callee to (a) use the token
        to decide what to copy and (b) call its base class's copyBackingStore() in
        case the base class had something that needed copying. The only exception is
        that JSCell never asks anything to be copied, and so if your base is JSCell
        then you don't have to do anything.

        * GNUmakefile.list.am:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * heap/CopiedBlock.h:
        * heap/CopiedBlockInlines.h:
        (JSC::CopiedBlock::reportLiveBytes):
        * heap/CopyToken.h: Added.
        * heap/CopyVisitor.cpp:
        (JSC::CopyVisitor::copyFromShared):
        * heap/CopyVisitor.h:
        * heap/CopyVisitorInlines.h:
        (JSC::CopyVisitor::visitItem):
        * heap/CopyWorkList.h:
        (JSC::CopyWorklistItem::CopyWorklistItem):
        (JSC::CopyWorklistItem::cell):
        (JSC::CopyWorklistItem::token):
        (JSC::CopyWorkListSegment::get):
        (JSC::CopyWorkListSegment::append):
        (JSC::CopyWorkListSegment::data):
        (JSC::CopyWorkListIterator::get):
        (JSC::CopyWorkListIterator::operator*):
        (JSC::CopyWorkListIterator::operator->):
        (JSC::CopyWorkList::append):
        * heap/SlotVisitor.h:
        * heap/SlotVisitorInlines.h:
        (JSC::SlotVisitor::copyLater):
        * runtime/ClassInfo.h:
        * runtime/JSCell.cpp:
        (JSC::JSCell::copyBackingStore):
        * runtime/JSCell.h:
        * runtime/JSObject.cpp:
        (JSC::JSObject::visitButterfly):
        (JSC::JSObject::copyBackingStore):
        * runtime/JSObject.h:

3105
3106
3107
3108
3109
3110
3111
3112
3113
2013-08-05  Zan Dobersek  <zdobersek@igalia.com>

        [Automake] Define ENABLE_JIT through the Autoconf header
        https://bugs.webkit.org/show_bug.cgi?id=119445

        Reviewed by Martin Robinson.

        * GNUmakefile.am: Remove JSC_CPPFLAGS from the cpp flags for the JSC library.

3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
2013-08-03  Filip Pizlo  <fpizlo@apple.com>

        hasIndexingHeader() ought really to be a property of an object and its structure, not just its structure
        https://bugs.webkit.org/show_bug.cgi?id=119470

        Reviewed by Oliver Hunt.
        
        Structure can still tell you if the object "could" (in the conservative sense)
        have an indexing header; that's used by the compiler.
        
        Most of the time if you want to know if there's an indexing header, you ask the
        JSObject.
        
        In some cases, the JSObject wants to know if it would have an indexing header if
        it had a different structure; then it uses Structure::hasIndexingHeader(JSCell*).

        * dfg/DFGRepatch.cpp:
        (JSC::DFG::tryCachePutByID):
        (JSC::DFG::tryBuildPutByIdList):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
        (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
        * runtime/ButterflyInlines.h:
        (JSC::Butterfly::create):
        (JSC::Butterfly::growPropertyStorage):
        (JSC::Butterfly::growArrayRight):
        (JSC::Butterfly::resizeArray):
        * runtime/JSObject.cpp:
        (JSC::JSObject::copyButterfly):
        (JSC::JSObject::visitButterfly):
        * runtime/JSObject.h:
        (JSC::JSObject::hasIndexingHeader):
        (JSC::JSObject::setButterfly):
        * runtime/Structure.h:
        (JSC::Structure::couldHaveIndexingHeader):
        (JSC::Structure::hasIndexingHeader):

3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
2013-08-02  Chris Curtis  <chris_curtis@apple.com>

        Give the error object's stack property accessor attributes.
        https://bugs.webkit.org/show_bug.cgi?id=119404

        Reviewed by Geoffrey Garen.
        
        Changed the attributes of error object's stack property to allow developers to write
        and delete the stack property. This will match the functionality of Chrome. Firefox  
        allows developers to write the error's stack, but not delete it. 

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::addStackTraceIfNecessary):
        * runtime/ErrorInstance.cpp:
        (JSC::ErrorInstance::finishCreation):

3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
2013-08-02  Oliver Hunt  <oliver@apple.com>

        Incorrect type speculation reported by ToPrimitive
        https://bugs.webkit.org/show_bug.cgi?id=119458

        Reviewed by Mark Hahnenberg.

        Make sure that we report the correct type possibilities for the output
        from ToPrimitive

        * dfg/DFGAbstractInterpreterInlines.h:
        (JSC::DFG::::executeEffects):

3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
2013-08-02  Gavin Barraclough  <barraclough@apple.com>

        Remove no-arguments constructor to PropertySlot
        https://bugs.webkit.org/show_bug.cgi?id=119460

        Reviewed by Geoff Garen.

        This constructor was unsafe if getValue is subsequently called,
        and the property is a getter. Simplest to just remove it.

        * runtime/Arguments.cpp:
        (JSC::Arguments::defineOwnProperty):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::getOwnPropertyDescriptor):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::getOwnPropertyDescriptor):
        (JSC::JSFunction::getOwnNonIndexPropertyNames):
        (JSC::JSFunction::put):
        (JSC::JSFunction::defineOwnProperty):
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::defineOwnProperty):
        * runtime/JSGlobalObject.h:
        (JSC::JSGlobalObject::hasOwnPropertyForWrite):
        * runtime/JSNameScope.cpp:
        (JSC::JSNameScope::put):
        * runtime/JSONObject.cpp:
        (JSC::Stringifier::Holder::appendNextProperty):
        (JSC::Walker::walk):
        * runtime/JSObject.cpp:
        (JSC::JSObject::hasProperty):
        (JSC::JSObject::hasOwnProperty):
        (JSC::JSObject::reifyS