ChangeLog 617 KB
Newer Older
1
2
3
4
5
6
2012-08-31  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, attempt to fix Windows.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
2012-08-31  Filip Pizlo  <fpizlo@apple.com>

        JSArray::putDirectIndex should by default behave like JSObject::putDirect
        https://bugs.webkit.org/show_bug.cgi?id=95630

        Reviewed by Gavin Barraclough.

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * jsc.cpp:
        (GlobalObject::finishCreation):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * runtime/JSArray.cpp:
        (JSC::SparseArrayValueMap::putDirect):
        (JSC::JSArray::defineOwnNumericProperty):
        (JSC::JSArray::putDirectIndexBeyondVectorLength):
        * runtime/JSArray.h:
        (SparseArrayValueMap):
        (JSArray):
        (JSC::JSArray::putDirectIndex):
        * runtime/JSONObject.cpp:
        (JSC::Walker::walk):
        * runtime/RegExpMatchesArray.cpp:
        (JSC::RegExpMatchesArray::reifyAllProperties):
        (JSC::RegExpMatchesArray::reifyMatchProperty):
        * runtime/StringPrototype.cpp:
        (JSC::splitStringByOneCharacterImpl):
        (JSC::stringProtoFuncSplit):

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
2012-08-31  Geoffrey Garen  <ggaren@apple.com>

        Rolled back in a piece of <http://trac.webkit.org/changeset/127293>.

            Shrink activation objects by half
            https://bugs.webkit.org/show_bug.cgi?id=95591

            Reviewed by Sam Weinig.

        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        * runtime/JSGlobalData.h:
        (JSGlobalData):
        * runtime/JSNameScope.h:
        (JSC::JSNameScope::JSNameScope):
        * runtime/JSWithScope.h:
        (JSC::JSWithScope::JSWithScope):
        * runtime/StrictEvalActivation.cpp:
        (JSC::StrictEvalActivation::StrictEvalActivation):

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
2012-08-31  Geoffrey Garen  <ggaren@apple.com>

        Rolled back in a piece of <http://trac.webkit.org/changeset/127293>.

            Shrink activation objects by half
            https://bugs.webkit.org/show_bug.cgi?id=95591

            Reviewed by Sam Weinig.

        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_resolve_global_dynamic):
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::JSActivation):
        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        * runtime/JSGlobalData.h:
        (JSGlobalData):
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::reset):
        (JSC::JSGlobalObject::visitChildren):
        * runtime/JSGlobalObject.h:
        (JSGlobalObject):
        (JSC::JSGlobalObject::withScopeStructure):
        (JSC::JSGlobalObject::strictEvalActivationStructure):
        (JSC::JSGlobalObject::activationStructure):
        (JSC::JSGlobalObject::nameScopeStructure):

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
2012-08-31  Mark Hahnenberg  <mhahnenberg@apple.com>

        Remove use of ClassInfo in SpeculativeJIT::emitBranch
        https://bugs.webkit.org/show_bug.cgi?id=95623

        Reviewed by Filip Pizlo.

        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGSpeculativeJIT.h:
        (SpeculativeJIT):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::emitNonStringCellOrOtherBranch):
        (JSC::DFG::SpeculativeJIT::emitBranch):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::emitNonStringCellOrOtherBranch):
        (JSC::DFG::SpeculativeJIT::emitBranch):

108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
2012-08-31  Geoffrey Garen  <ggaren@apple.com>

        Rolled back in a piece of <http://trac.webkit.org/changeset/127293>.

            Shrink activation objects by half
            https://bugs.webkit.org/show_bug.cgi?id=95591

            Reviewed by Sam Weinig.

        * heap/MarkedBlock.cpp:
        (JSC::MarkedBlock::MarkedBlock):
        * heap/MarkedBlock.h:
        (MarkedBlock):
        (JSC::MarkedBlock::globalData):
        (JSC):
        * heap/WeakSet.cpp:
        (JSC::WeakSet::addAllocator):
        * heap/WeakSet.h:
        (WeakSet):
        (JSC::WeakSet::WeakSet):
        (JSC::WeakSet::globalData):
        * runtime/JSGlobalData.h:
        (JSC::WeakSet::heap):
        (JSC):

133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
2012-08-31  Mark Lam  <mark.lam@apple.com>

        Refactor LLInt and supporting code in preparation for the C Loop backend.
        https://bugs.webkit.org/show_bug.cgi?id=95531.

        Reviewed by Filip Pizlo.

        * bytecode/GetByIdStatus.cpp:
        (JSC::GetByIdStatus::computeFromLLInt):
        * bytecode/PutByIdStatus.cpp:
        (JSC::PutByIdStatus::computeFromLLInt):
        * jit/JITExceptions.cpp:
        (JSC::genericThrow): Use ExecutableBase::catchRoutineFor() to fetch
            fetch the catch routine for a thrown exception.  This will allow
            us to redefine that for the C loop later, and still keep this
            code readable.
        * llint/LLIntOfflineAsmConfig.h: Moved ASM macros to
            LowLevelInterpreter.cpp which is the only place they are used. This
            will make it more convenient to redefine them for the C loop later.
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::setUpCall): Use ExecutableBase's hostCodeEntry()
            jsCodeEntryFor(), and jsCodeWithArityCheckEntryFor() for computing
            the entry points to functions being called.
        * llint/LLIntSlowPaths.h:
        (SlowPathReturnType):
        (JSC::LLInt::encodeResult):
        (LLInt):
        (JSC::LLInt::decodeResult): Added.  Needed by LLInt C Loop later.
        * llint/LowLevelInterpreter.asm:
        * llint/LowLevelInterpreter.cpp:
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * offlineasm/asm.rb: Disambiguate between opcodes and other labels.
        * offlineasm/config.rb:
        * runtime/Executable.h:
        (JSC::ExecutableBase::hostCodeEntryFor): Added.
        (ExecutableBase):
        (JSC::ExecutableBase::jsCodeEntryFor): Added.
        (JSC::ExecutableBase::jsCodeWithArityCheckEntryFor): Added.
        (JSC::ExecutableBase::catchRoutineFor): Added.
        * runtime/JSValueInlineMethods.h:
        (JSC):

176
177
178
179
180
181
182
183
184
185
186
2012-08-31  Tony Chang  <tony@chromium.org>

        Remove ENABLE_CSS3_FLEXBOX compile time flag
        https://bugs.webkit.org/show_bug.cgi?id=95382

        Reviewed by Ojan Vafai.

        Everyone is already enabling this by default and the spec has stablized.

        * Configurations/FeatureDefines.xcconfig:

ggaren@apple.com's avatar
ggaren@apple.com committed
187
188
189
190
191
192
193
194
195
196
197
198
2012-08-31  Geoffrey Garen  <ggaren@apple.com>

        Not reviewed.

        Rolled out http://trac.webkit.org/changeset/127293 because it broke
        inspector tests on Windows.

            Shrink activation objects by half
            https://bugs.webkit.org/show_bug.cgi?id=95591

            Reviewed by Sam Weinig.

199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
2012-08-31  Geoffrey Garen  <ggaren@apple.com>

        Shrink activation objects by half
        https://bugs.webkit.org/show_bug.cgi?id=95591

        Reviewed by Sam Weinig.

        Removed the global object, global data, and global this pointers from
        JSScope, and changed an int to a bitfield. This gets the JSActivation
        class down to 64 bytes, which in practice cuts it in half by getting it
        out of the 128 byte size class.

        Now, it's one extra indirection to get these pointers. These pointers
        aren't accessed by JIT code, so I thought there would be no cost to the
        extra indirection. However, some C++-heavy SunSpider tests regressed a
        bit in an early version of the patch, which added even more indirection.
        This suggests that calls to exec->globalData() and/or exec->lexicalGlobalObject()
        are common and probably duplicated in lots of places, and could stand
        further optimization in C++.

        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute): Test against the specific activation
        for our global object, since there's no VM-shared activation structure
        anymore. This is guaranteed to have the same success rate as the old test
        because activation scope is fixed at compile time.

        * heap/MarkedBlock.cpp:
        (JSC::MarkedBlock::MarkedBlock):
        * heap/MarkedBlock.h:
        (JSC::MarkedBlock::globalData):
        * heap/WeakSet.cpp:
        (JSC::WeakSet::addAllocator):
        * heap/WeakSet.h:
        (WeakSet):
        (JSC::WeakSet::WeakSet):
        (JSC::WeakSet::globalData): Store a JSGlobalData* instead of a Heap*
        because JSGlobalData->Heap is just a constant fold in the addressing
        mode, while Heap->JSGlobalData is an extra pointer dereference. (These
        objects should eventually just merge.)

        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_resolve_global_dynamic): See DFGAbstractState.cpp.

        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm: Load the activation structure from
        the code block instead of the global data because the structure is not
        VM-shared anymore. (See DFGAbstractState.cpp.)

        * runtime/JSActivation.cpp:
        (JSC::JSActivation::JSActivation):
        * runtime/JSActivation.h:
        (JSActivation): This is the point of the patch: Remove the data.

        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        * runtime/JSGlobalData.h:
        (JSGlobalData): No longer VM-shared. (See DFGAbstractState.cpp.)

        (JSC::WeakSet::heap): (See WeakSet.h.)

        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::JSGlobalObject):
        (JSC::JSGlobalObject::setGlobalThis):
        (JSC::JSGlobalObject::reset):
        (JSC::JSGlobalObject::visitChildren):
        * runtime/JSGlobalObject.h:
        (JSGlobalObject):
        (JSC::JSGlobalObject::withScopeStructure):
        (JSC::JSGlobalObject::strictEvalActivationStructure):
        (JSC::JSGlobalObject::activationStructure):
        (JSC::JSGlobalObject::nameScopeStructure):
        (JSC::JSScope::globalThis):
        (JSC::JSGlobalObject::globalThis): Data that used to be in the JSScope
        class goes here now, so it's not duplicated across all activations.

        * runtime/JSNameScope.h:
        (JSC::JSNameScope::JSNameScope):
        * runtime/JSScope.cpp:
        (JSC::JSScope::visitChildren): This is the point of the patch: Remove the data.

        * runtime/JSScope.h:
        (JSScope):
        (JSC::JSScope::JSScope):
        (JSC::JSScope::globalObject):
        (JSC::JSScope::globalData):
        * runtime/JSSegmentedVariableObject.h:
        (JSC::JSSegmentedVariableObject::JSSegmentedVariableObject):
        * runtime/JSSymbolTableObject.h:
        (JSC::JSSymbolTableObject::JSSymbolTableObject):
        * runtime/JSVariableObject.h:
        (JSC::JSVariableObject::JSVariableObject):
        * runtime/JSWithScope.h:
        (JSC::JSWithScope::JSWithScope):
        * runtime/StrictEvalActivation.cpp:
        (JSC::StrictEvalActivation::StrictEvalActivation): Simplified now that
        we don't need to pass so much data to JSScope.

296
297
298
299
300
301
2012-08-31  Patrick Gansterer  <paroga@webkit.org>

        Build fix for WinCE after r127191.

        * bytecode/JumpTable.h:

302
303
304
305
306
307
308
309
310
311
312
313
2012-08-30  Filip Pizlo  <fpizlo@apple.com>

        ASSERTION FAILURE in JSC::JSGlobalData::float32ArrayDescriptor when running fast/js/dfg-float64array.html
        https://bugs.webkit.org/show_bug.cgi?id=95398

        Reviewed by Mark Hahnenberg.

        Trying to get the build failure to be a bit more informative.

        * runtime/JSGlobalData.h:
        (JSGlobalData):

314
315
316
317
318
319
320
321
2012-08-30  Geoffrey Garen  <ggaren@apple.com>

        Try to fix the Qt build: add some #includes that, for some reason, only the Qt linker requires.

        * runtime/BooleanObject.cpp:
        * runtime/ErrorInstance.cpp:
        * runtime/NameInstance.cpp:

322
323
324
325
326
327
328
2012-08-30  Geoffrey Garen  <ggaren@apple.com>

        Fix the Qt build: Removed a now-dead variable.

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

329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
2012-08-30  Benjamin Poulain  <bpoulain@apple.com>

        Ambiguous operator[]  after r127191 on some compiler
        https://bugs.webkit.org/show_bug.cgi?id=95509

        Reviewed by Simon Fraser.

        On some compilers, the operator[] conflicts with the Obj-C++ operators. This attempts to solve
        the issue.

        * runtime/JSString.h:
        (JSC::jsSingleCharacterSubstring):
        (JSC::jsString):
        (JSC::jsSubstring8):
        (JSC::jsSubstring):
        (JSC::jsOwnedString):

346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
2012-08-30  Geoffrey Garen  <ggaren@apple.com>

        Try to fix the Qt build: Remove the inline keyword at the declaration
        site. 

        The Qt compiler seems to be confused, complaining about these functions
        not being defined in a translation unit, even though no generated code
        in the unit calls these functions. Maybe removing the keyword at the
        declaration site will change its mind.

        This shouldn't change the inlining decision at all: the definition is
        still inline.

        * interpreter/CallFrame.h:
        (ExecState):

362
363
364
365
366
367
2012-08-30  Geoffrey Garen  <ggaren@apple.com>

        Undo Qt build fix guess, since it breaks other builds.

        * runtime/JSArray.h:

368
369
370
371
372
373
374
375
2012-08-30  Geoffrey Garen  <ggaren@apple.com>

        Try to fix the Qt build: add an #include to JSArray.h, since
        it's included by some of the files Qt complains about, and
        some of is functions call the functions Qt complains about.

        * runtime/JSArray.h:

376
377
378
379
380
381
2012-08-30  Geoffrey Garen  <ggaren@apple.com>

        Second step toward fixing the Windows build: Add new symbols.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

382
383
384
385
386
387
2012-08-30  Geoffrey Garen  <ggaren@apple.com>

        Try to fix the Qt build: add an #include.

        * bytecode/GetByIdStatus.cpp:

388
389
390
391
392
393
2012-08-30  Geoffrey Garen  <ggaren@apple.com>

        First step toward fixing the Windows build: Remove old symbols.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
2012-08-30  Geoffrey Garen  <ggaren@apple.com>

        Use one object instead of two for closures, eliminating ScopeChainNode
        https://bugs.webkit.org/show_bug.cgi?id=95501

        Reviewed by Filip Pizlo.

        This patch removes ScopeChainNode, and moves all the data and related
        functions that used to be in ScopeChainNode into JSScope.

        Most of this patch is mechanical changes to use a JSScope* where we used
        to use a ScopeChainNode*. I've only specifically commented about items
        that were non-mechanical.

        * runtime/Completion.cpp:
        (JSC::evaluate):
        * runtime/Completion.h: Don't require an explicit scope chain argument
        when evaluating code. Clients never wanted anything other than the
        global scope, and other arbitrary scopes probably wouldn't work
        correctly, anyway.

        * runtime/JSScope.cpp:
        * runtime/JSScope.h:
        (JSC::JSScope::JSScope): JSScope now requires the data we used to pass to
        ScopeChainNode, so it can link itself into the scope chain correctly.

        * runtime/JSWithScope.h:
        (JSC::JSWithScope::create):
        (JSC::JSWithScope::JSWithScope): JSWithScope gets an extra constructor
        for specifically supplying your own scope chain. The DOM needs this
        interface for setting up the scope chain for certain event handlers.
        Other clients always just push the JSWithScope to the head of the current
        scope chain.

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
487
488
2012-08-30  Mark Lam  <mark.lam@apple.com>

        Render unto #ifdef's that which belong to them.
        https://bugs.webkit.org/show_bug.cgi?id=95482.

        Reviewed by Filip Pizlo.

        Refining / disambiguating between #ifdefs and adding some. For
        example, ENABLE(JIT) is conflated with ENABLE(LLINT) in some places.
        Also, we need to add ENABLE(COMPUTED_GOTO_OPCODES) to indicate that we
        want interpreted opcodes to use COMPUTED GOTOs apart from ENABLE(LLINT)
        and ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER). Also cleaned up #ifdefs
        in certain places which were previously incorrect.

        * bytecode/CodeBlock.cpp:
        (JSC):
        (JSC::CodeBlock::bytecodeOffset):
        * bytecode/CodeBlock.h:
        (CodeBlock):
        * bytecode/Opcode.h:
        (JSC::padOpcodeName):
        * config.h:
        * dfg/DFGOperations.cpp:
        * interpreter/AbstractPC.cpp:
        (JSC::AbstractPC::AbstractPC):
        * interpreter/CallFrame.h:
        (ExecState):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::~Interpreter):
        (JSC::Interpreter::initialize):
        (JSC::Interpreter::isOpcode):
        (JSC::Interpreter::unwindCallFrame):
        (JSC::getLineNumberForCallFrame):
        (JSC::getCallerInfo):
        (JSC::Interpreter::execute):
        (JSC::Interpreter::executeCall):
        (JSC::Interpreter::executeConstruct):
        (JSC::Interpreter::privateExecute):
        * interpreter/Interpreter.h:
        (JSC::Interpreter::getOpcode):
        (JSC::Interpreter::getOpcodeID):
        (Interpreter):
        * jit/HostCallReturnValue.h:
        * jit/JITCode.h:
        (JITCode):
        * jit/JITExceptions.cpp:
        * jit/JITExceptions.h:
        * jit/JSInterfaceJIT.h:
        * llint/LLIntData.h:
        (JSC::LLInt::getOpcode):
        * llint/LLIntEntrypoints.cpp:
        (JSC::LLInt::getFunctionEntrypoint):
        (JSC::LLInt::getEvalEntrypoint):
        (JSC::LLInt::getProgramEntrypoint):
        * llint/LLIntOffsetsExtractor.cpp:
        (JSC::LLIntOffsetsExtractor::dummy):
        * llint/LLIntSlowPaths.cpp:
        (LLInt):
        * runtime/JSGlobalData.cpp:
        (JSC):

489
490
491
492
493
494
495
496
497
498
499
2012-08-30  JungJik Lee  <jungjik.lee@samsung.com>

        [EFL][WK2] Add WebMemorySampler feature.
        https://bugs.webkit.org/show_bug.cgi?id=91214

        Reviewed by Kenneth Rohde Christiansen.

        WebMemorySampler collects Javascript stack and JIT memory usage in globalMemoryStatistics.

        * PlatformEfl.cmake:

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
2012-08-30  Benjamin Poulain  <bpoulain@apple.com>

        Replace JSC::UString by WTF::String
        https://bugs.webkit.org/show_bug.cgi?id=95271

        Reviewed by Geoffrey Garen.

        Having JSC::UString and WTF::String increase the complexity of working on WebKit, and
        add useless conversions in the bindings. It also cause some code bloat.

        The performance advantages of UString have been ported over in previous patches. This patch
        is the last step: getting rid of UString.

        In addition to the simplified code, this also reduce the binary size by 15kb on x86_64.

        * API/OpaqueJSString.cpp:
        (OpaqueJSString::ustring):
        * runtime/Identifier.h:
        (JSC::Identifier::ustring):
        To avoid changing everything at once, the function named ustring() were kept as is. They
        will be renamed in a follow up patch.

        * runtime/JSString.h:
        (JSC::JSString::string):
        (JSC::JSValue::toWTFString):
        (JSC::inlineJSValueNotStringtoString):
        (JSC::JSValue::toWTFStringInline):
        Since JSValue::toString() already exist (and return the JSString), the direct accessor is renamed
        to ::toWTFString(). We may change ::string() to ::jsString() and ::toWTFString() to ::toString()
        in the future.

        * runtime/StringPrototype.cpp:
        (JSC::substituteBackreferencesSlow): Replace the use of UString::getCharacters<>() by String::getCharactersWithUpconvert<>().

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

        Remove uses of ClassInfo in StrictEq and CompareEq in the DFG
        https://bugs.webkit.org/show_bug.cgi?id=93401

        Reviewed by Filip Pizlo.

        Another incremental step in removing the dependence on ClassInfo pointers in object headers.

        * bytecode/SpeculatedType.h:
        (JSC::isCellOrOtherSpeculation):
        (JSC):
        * dfg/DFGAbstractState.cpp: Updated the CFA to reflect the changes to the backend.
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGNode.h:
        (Node):
        (JSC::DFG::Node::shouldSpeculateString): Added this new function since it was conspicuously absent.
        (JSC::DFG::Node::shouldSpeculateNonStringCellOrOther): Also add this function for use in the CFA.
        * dfg/DFGSpeculativeJIT.cpp: Refactored how we handle CompareEq and CompareStrictEq in the DFG. We now just 
        check for Strings by comparing the object's Structure to the global Structure for strings. We only 
        check for MasqueradesAsUndefined if the watchpoint has fired. These changes allow us to remove our 
        uses of the ClassInfo pointer for compiling these nodes.
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
        (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
        (JSC::DFG::SpeculativeJIT::compare):
        (JSC::DFG::SpeculativeJIT::compileStrictEq):
        * dfg/DFGSpeculativeJIT.h:
        (SpeculativeJIT):
        * dfg/DFGSpeculativeJIT32_64.cpp: Same changes for 32 bit as for 64 bit.
        (JSC::DFG::SpeculativeJIT::compileObjectEquality):
        (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compileObjectEquality):
        (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):

571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
2012-08-30  Yong Li  <yoli@rim.com>

        [BlackBerry] Implement IncrementalSweeper for PLATFORM(BLACKBERRY)
        https://bugs.webkit.org/show_bug.cgi?id=95469

        Reviewed by Rob Buis.

        RIM PR# 200595.
        Share most code with USE(CF) and implement timer-related methods
        for PLATFORM(BLACKBERRY).

        * heap/IncrementalSweeper.cpp:
        (JSC):
        (JSC::IncrementalSweeper::IncrementalSweeper):
        (JSC::IncrementalSweeper::create):
        (JSC::IncrementalSweeper::scheduleTimer):
        (JSC::IncrementalSweeper::cancelTimer):
        (JSC::IncrementalSweeper::doSweep):
        * heap/IncrementalSweeper.h:
        (IncrementalSweeper):

592
593
594
595
596
597
598
599
600
601
2012-08-30  Mark Lam  <mark.lam@apple.com>

        Fix broken classic intrpreter build.
        https://bugs.webkit.org/show_bug.cgi?id=95484.

        Reviewed by Filip Pizlo.

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

602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
2012-08-30  Byungwoo Lee  <bw80.lee@samsung.com>

        Build warning : -Wsign-compare on DFGByteCodeParser.cpp.
        https://bugs.webkit.org/show_bug.cgi?id=95418

        Reviewed by Filip Pizlo.

        There is a build warning '-Wsign-compare' on
        findArgumentPositionForLocal() in DFGByteCodeParser.cpp.

        For removing this warning, casting statement is added explicitly.

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

618
619
620
621
622
623
624
625
626
627
628
629
2012-08-30  Yong Li  <yoli@rim.com>

        [BlackBerry] Set timer client on platform timer used in HeapTimer
        https://bugs.webkit.org/show_bug.cgi?id=95464

        Reviewed by Rob Buis.

        Otherwise the timer won't work.

        * heap/HeapTimer.cpp:
        (JSC::HeapTimer::HeapTimer):

630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
2012-08-30  Julien BRIANCEAU   <jbrianceau@nds.com>

        [sh4] Add missing implementation for JavaScriptCore JIT
        https://bugs.webkit.org/show_bug.cgi?id=95452

        Reviewed by Oliver Hunt.

        * assembler/MacroAssemblerSH4.h:
        (JSC::MacroAssemblerSH4::isCompactPtrAlignedAddressOffset):
        (MacroAssemblerSH4):
        (JSC::MacroAssemblerSH4::add32):
        (JSC::MacroAssemblerSH4::convertibleLoadPtr):
        * assembler/SH4Assembler.h:
        (JSC::SH4Assembler::labelIgnoringWatchpoints):
        (SH4Assembler):
        (JSC::SH4Assembler::replaceWithLoad):
        (JSC::SH4Assembler::replaceWithAddressComputation):

648
649
650
651
652
653
654
655
656
657
658
659
660
661
2012-08-30  Charles Wei  <charles.wei@torchmobile.com.cn>

        [BlackBerry] Eliminate build warnings
        https://bugs.webkit.org/show_bug.cgi?id=95338

        Reviewed by Filip Pizlo.

        static_cast to the same type to eliminate the build time warnings.

        * assembler/AssemblerBufferWithConstantPool.h:
        (JSC::AssemblerBufferWithConstantPool::flushWithoutBarrier):
        * assembler/MacroAssemblerARM.h:
        (JSC::MacroAssemblerARM::branch32):

662
663
664
665
666
667
668
669
670
671
672
2012-08-29  Mark Hahnenberg  <mhahnenberg@apple.com>

        Remove use of ClassInfo from compileGetByValOnArguments and compileGetArgumentsLength
        https://bugs.webkit.org/show_bug.cgi?id=95131

        Reviewed by Filip Pizlo.

        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments): We don't need this speculation check. We can replace it 
        with an assert to guarantee this.

673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
2012-08-29  Mark Lam  <mark.lam@apple.com>

        Refactoring LLInt::Data.
        https://bugs.webkit.org/show_bug.cgi?id=95316.

        Reviewed by Geoff Garen.

        This change allows its opcodeMap to be easily queried from any function
        without needing to go through a GlobalData object.  It also introduces
        the LLInt::getCodePtr() methods that will be used by the LLInt C loop
        later to redefine how llint symbols (opcodes and trampoline glue
        labels) get resolved.

        * assembler/MacroAssemblerCodeRef.h:
        (MacroAssemblerCodePtr):
        (JSC::MacroAssemblerCodePtr::createLLIntCodePtr):
        (MacroAssemblerCodeRef):
        (JSC::MacroAssemblerCodeRef::createLLIntCodeRef):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::adjustPCIfAtCallSite):
        (JSC::CodeBlock::bytecodeOffset):
        * bytecode/Opcode.h:
            Remove the 'const' to simplify things and avoid having to do
            additional casts and #ifdefs in many places.
        * bytecode/ResolveGlobalStatus.cpp:
        (JSC::computeForLLInt):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::generate):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::initialize):
        * interpreter/Interpreter.h:
        (Interpreter):
        * jit/JITExceptions.cpp:
        (JSC::genericThrow):
        * llint/LLIntData.cpp:
        (LLInt):
        (JSC::LLInt::initialize):
        * llint/LLIntData.h:
        (JSC):
        (LLInt):
        (Data):
        (JSC::LLInt::exceptionInstructions):
        (JSC::LLInt::opcodeMap):
        (JSC::LLInt::getOpcode):
        (JSC::LLInt::getCodePtr):
        (JSC::LLInt::Data::performAssertions):
        * llint/LLIntExceptions.cpp:
        (JSC::LLInt::returnToThrowForThrownException):
        (JSC::LLInt::returnToThrow):
        (JSC::LLInt::callToThrow):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        (JSC::LLInt::handleHostCall):
        * runtime/InitializeThreading.cpp:
        (JSC::initializeThreadingOnce): Initialize the singleton LLInt data.
        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        * runtime/JSGlobalData.h:
        (JSGlobalData): Removed the now unneeded LLInt::Data instance in
            JSGlobalData.
        * runtime/JSValue.h:
        (JSValue):

736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
2012-08-29  Gavin Barraclough  <barraclough@apple.com>

        PutById uses DataLabel32, not DataLabelCompact
        https://bugs.webkit.org/show_bug.cgi?id=95245

        Reviewed by Geoff Garen.

        JIT::resetPatchPutById calls the the wrong thing on x86-64 – this is moot right now,
        since they currently both do the same thing, but if we were to ever make compact mean
        8-bit this could be a real problem. Also, relying on the object still being in eax
        on entry to the transition stub isn't very robust - added nonArgGPR1 to at least make
        this explicit.

        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::emitSlow_op_put_by_id):
            - copy regT0 to nonArgGPR1
        (JSC::JIT::privateCompilePutByIdTransition):
            - DataLabelCompact -> DataLabel32
        (JSC::JIT::resetPatchPutById):
            - reload regT0 from nonArgGPR1
        * jit/JSInterfaceJIT.h:
        (JSInterfaceJIT):
            - added nonArgGPR1

760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
2012-08-28  Yong Li  <yoli@rim.com>

        ExecutableAllocator should be destructed after Heap
        https://bugs.webkit.org/show_bug.cgi?id=95244

        Reviewed by Rob Buis.

        RIM PR# 199364.
        Make ExecutableAllocator the first member in JSGlobalData.
        Existing Web Worker tests can show the issue.

        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        * runtime/JSGlobalData.h:
        (JSGlobalData):

776
777
778
779
780
781
2012-08-29  Geoffrey Garen  <ggaren@apple.com>

        Try to fix the Windows build.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export!

782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
2012-08-28  Geoffrey Garen  <ggaren@apple.com>

        Introduced JSWithScope, making all scope objects subclasses of JSScope
        https://bugs.webkit.org/show_bug.cgi?id=95295

        Reviewed by Filip Pizlo.

        This is a step toward removing ScopeChainNode. With a uniform representation
        for objects in the scope chain, we can move data from ScopeChainNode
        into JSScope.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri: Build!

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL): Use an explicit JSWithScope object
        for 'with' statements. Since 'with' can put any object in the scope
        chain, we'll need an adapter object to hold the data ScopeChainNode
        currently holds.

        (JSGlobalData): Support for JSWithScope.

        * runtime/JSScope.cpp:
        (JSC::JSScope::objectAtScope):
        * runtime/JSScope.h: Check for and unwrap JSWithScope.

        * runtime/JSType.h: Support for JSWithScope.

        * runtime/StrictEvalActivation.cpp:
        (JSC::StrictEvalActivation::StrictEvalActivation):
        * runtime/StrictEvalActivation.h:
        (StrictEvalActivation): Inherit from JSScope, to make the scope chain uniform.

        * runtime/JSWithScope.cpp: Added.
        (JSC::JSWithScope::visitChildren):
        * runtime/JSWithScope.h: Added.
        (JSWithScope):
        (JSC::JSWithScope::create):
        (JSC::JSWithScope::object):
        (JSC::JSWithScope::createStructure):
        (JSC::JSWithScope::JSWithScope): New adapter object. Since this object
        is never exposed to scripts, it doesn't need any meaningful implementation
        of property access or other callbacks.

833
834
835
836
837
838
839
2012-08-29  Patrick Gansterer  <paroga@webkit.org>

        Unreviewed. Build fix for !ENABLE(JIT) after r126962.

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

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
894
895
896
897
898
2012-08-28  Geoffrey Garen  <ggaren@apple.com>

        Added JSScope::objectInScope(), and refactored callers to use it
        https://bugs.webkit.org/show_bug.cgi?id=95281

        Reviewed by Gavin Barraclough.

        This is a step toward removing ScopeChainNode. We need a layer of
        indirection so that 'with' scopes can proxy for an object.
        JSScope::objectInScope() will be that layer.

        * bytecode/EvalCodeCache.h:
        (JSC::EvalCodeCache::tryGet):
        (JSC::EvalCodeCache::getSlow):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::resolve):
        (JSC::BytecodeGenerator::resolveConstDecl): . vs ->

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::unwindCallFrame):
        (JSC::Interpreter::execute):
        * runtime/JSScope.cpp:
        (JSC::JSScope::resolve):
        (JSC::JSScope::resolveSkip):
        (JSC::JSScope::resolveGlobalDynamic):
        (JSC::JSScope::resolveBase):
        (JSC::JSScope::resolveWithBase):
        (JSC::JSScope::resolveWithThis): Added JSScope::objectAtScope() calls.

        * runtime/JSScope.h:
        (JSScope):
        (JSC::JSScope::objectAtScope):
        (JSC):
        (ScopeChainIterator):
        (JSC::ScopeChainIterator::ScopeChainIterator):
        (JSC::ScopeChainIterator::get):
        (JSC::ScopeChainIterator::operator->):
        (JSC::ScopeChainIterator::operator++):
        (JSC::ScopeChainIterator::operator==):
        (JSC::ScopeChainIterator::operator!=):
        (JSC::ScopeChainNode::begin):
        (JSC::ScopeChainNode::end): I moved ScopeChainIterator to this file
        to resolve a circular #include problem. Eventually, I'll probably rename
        it to JSScope::iterator, so I think it belongs here.

        * runtime/ScopeChain.cpp:
        (JSC::ScopeChainNode::print):
        (JSC::ScopeChainNode::localDepth): . vs ->

        * runtime/ScopeChain.h:
        (ScopeChainNode): I made the 'object' data member private because it's
        no longer safe to access -- you need to call JSScope::objectAtScope()
        instead.

        The JITs need to be friends because of the private declaration.

        Subtly, JIT/LLInt code is correct without any changes because JIT/LLInt
        code never compiles direct access to a with scope.

899
900
901
902
903
904
905
906
907
908
909
910
911
2012-08-28  Mark Lam  <mark.lam@apple.com>

        Adding support for adding LLInt opcode extensions.  This will be needed
        by the LLInt C loop interpreter later.
        https://bugs.webkit.org/show_bug.cgi?id=95277.

        Reviewed by Geoffrey Garen.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/Opcode.h:
        * llint/LLIntOpcode.h: Added.
        * llint/LowLevelInterpreter.h:

912
913
914
915
916
917
918
919
2012-08-28  Gavin Barraclough  <barraclough@apple.com>

        Rolled out r126928, this broke stuff :'-(

        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::privateCompilePutByIdTransition):
        (JSC::JIT::resetPatchPutById):

920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
2012-08-28  Gavin Barraclough  <barraclough@apple.com>

        PutById uses DataLabel32, not DataLabelCompact
        https://bugs.webkit.org/show_bug.cgi?id=95245

        Reviewed by Geoff Garen.

        JIT::resetPatchPutById calls the the wrong thing on x86-64 – this is moot right now,
        since they currently both do the same thing, but if we were to ever make compact mean
        8-bit this could be a real problem. Also, don't rely on the object still being in eax
        on entry to the transition stub – this isn't very robust.

        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::privateCompilePutByIdTransition):
            - DataLabelCompact -> DataLabel32
        (JSC::JIT::resetPatchPutById):
            - reload regT0 from the stack

938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
2012-08-28  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r126914.
        http://trac.webkit.org/changeset/126914
        https://bugs.webkit.org/show_bug.cgi?id=95239

        it breaks everything and fixes nothing (Requested by pizlo on
        #webkit).

        * API/JSCallbackObject.h:
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
        * API/JSCallbackObjectFunctions.h:
        (JSC::::getOwnPropertyNames):
        * API/JSClassRef.cpp:
        (OpaqueJSClass::~OpaqueJSClass):
        (OpaqueJSClassContextData::OpaqueJSClassContextData):
        (OpaqueJSClass::contextData):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        (JSC::EvalCodeCache::visitAggregate):
        (JSC::CodeBlock::nameForRegister):
        * bytecode/JumpTable.h:
        (JSC::StringJumpTable::offsetForValue):
        (JSC::StringJumpTable::ctiForValue):
        * bytecode/LazyOperandValueProfile.cpp:
        (JSC::LazyOperandValueProfileParser::getIfPresent):
        * bytecode/SamplingTool.cpp:
        (JSC::SamplingTool::dump):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::addVar):
        (JSC::BytecodeGenerator::addGlobalVar):
        (JSC::BytecodeGenerator::addConstant):
        (JSC::BytecodeGenerator::addConstantValue):
        (JSC::BytecodeGenerator::emitLoad):
        (JSC::BytecodeGenerator::addStringConstant):
        (JSC::BytecodeGenerator::emitLazyNewFunction):
        * bytecompiler/NodesCodegen.cpp:
        (JSC::PropertyListNode::emitBytecode):
        * debugger/Debugger.cpp:
        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse):
        (JSC::DFG::ArgumentsSimplificationPhase::observeProperArgumentsUse):
        (JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize):
        (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild):
        * dfg/DFGAssemblyHelpers.cpp:
        (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
        * dfg/DFGByteCodeCache.h:
        (JSC::DFG::ByteCodeCache::~ByteCodeCache):
        (JSC::DFG::ByteCodeCache::get):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::cellConstant):
        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):
        (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck):
        (JSC::DFG::StructureCheckHoistingPhase::noticeClobber):
        * heap/Heap.cpp:
        (JSC::Heap::markProtectedObjects):
        * heap/Heap.h:
        (JSC::Heap::forEachProtectedCell):
        * heap/JITStubRoutineSet.cpp:
        (JSC::JITStubRoutineSet::markSlow):
        (JSC::JITStubRoutineSet::deleteUnmarkedJettisonedStubRoutines):
        * heap/MarkStack.cpp:
        (JSC::MarkStack::internalAppend):
        * heap/Weak.h:
        (JSC::weakRemove):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompile):
        * jit/JITStubs.cpp:
        (JSC::JITThunks::ctiStub):
        * parser/Parser.cpp:
        (JSC::::parseStrictObjectLiteral):
        * profiler/Profile.cpp:
        (JSC::functionNameCountPairComparator):
        (JSC::Profile::debugPrintDataSampleStyle):
        * runtime/Identifier.cpp:
        (JSC::Identifier::add):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::getOwnPropertyNames):
        (JSC::JSActivation::symbolTablePutWithAttributes):
        * runtime/JSArray.cpp:
        (JSC::SparseArrayValueMap::put):
        (JSC::SparseArrayValueMap::putDirect):
        (JSC::SparseArrayValueMap::visitChildren):
        (JSC::JSArray::enterDictionaryMode):
        (JSC::JSArray::defineOwnNumericProperty):
        (JSC::JSArray::getOwnPropertySlotByIndex):
        (JSC::JSArray::getOwnPropertyDescriptor):
        (JSC::JSArray::putByIndexBeyondVectorLength):
        (JSC::JSArray::putDirectIndexBeyondVectorLength):
        (JSC::JSArray::deletePropertyByIndex):
        (JSC::JSArray::getOwnPropertyNames):
        (JSC::JSArray::setLength):
        (JSC::JSArray::sort):
        (JSC::JSArray::compactForSorting):
        (JSC::JSArray::checkConsistency):
        * runtime/JSSymbolTableObject.cpp:
        (JSC::JSSymbolTableObject::getOwnPropertyNames):
        * runtime/JSSymbolTableObject.h:
        (JSC::symbolTableGet):
        (JSC::symbolTablePut):
        (JSC::symbolTablePutWithAttributes):
        * runtime/RegExpCache.cpp:
        (JSC::RegExpCache::invalidateCode):
        * runtime/WeakGCMap.h:
        (JSC::WeakGCMap::clear):
        (JSC::WeakGCMap::set):
        * tools/ProfileTreeNode.h:
        (JSC::ProfileTreeNode::sampleChild):
        (JSC::ProfileTreeNode::childCount):
        (JSC::ProfileTreeNode::dumpInternal):
        (JSC::ProfileTreeNode::compareEntries):

1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
2012-08-28  Filip Pizlo  <fpizlo@apple.com>

        LLInt should not rely on ordering of global labels
        https://bugs.webkit.org/show_bug.cgi?id=95221

        Reviewed by Oliver Hunt.

        * llint/LowLevelInterpreter.asm:
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:

1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
2012-08-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>

        Rename first/second to key/value in HashMap iterators
        https://bugs.webkit.org/show_bug.cgi?id=82784

        Reviewed by Eric Seidel.

        * API/JSCallbackObject.h:
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
        * API/JSCallbackObjectFunctions.h:
        (JSC::::getOwnPropertyNames):
        * API/JSClassRef.cpp:
        (OpaqueJSClass::~OpaqueJSClass):
        (OpaqueJSClassContextData::OpaqueJSClassContextData):
        (OpaqueJSClass::contextData):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        (JSC::EvalCodeCache::visitAggregate):
        (JSC::CodeBlock::nameForRegister):
        * bytecode/JumpTable.h:
        (JSC::StringJumpTable::offsetForValue):
        (JSC::StringJumpTable::ctiForValue):
        * bytecode/LazyOperandValueProfile.cpp:
        (JSC::LazyOperandValueProfileParser::getIfPresent):
        * bytecode/SamplingTool.cpp:
        (JSC::SamplingTool::dump):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::addVar):
        (JSC::BytecodeGenerator::addGlobalVar):
        (JSC::BytecodeGenerator::addConstant):
        (JSC::BytecodeGenerator::addConstantValue):
        (JSC::BytecodeGenerator::emitLoad):
        (JSC::BytecodeGenerator::addStringConstant):
        (JSC::BytecodeGenerator::emitLazyNewFunction):
        * bytecompiler/NodesCodegen.cpp:
        (JSC::PropertyListNode::emitBytecode):
        * debugger/Debugger.cpp:
        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse):
        (JSC::DFG::ArgumentsSimplificationPhase::observeProperArgumentsUse):
        (JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize):
        (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild):
        * dfg/DFGAssemblyHelpers.cpp:
        (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
        * dfg/DFGByteCodeCache.h:
        (JSC::DFG::ByteCodeCache::~ByteCodeCache):
        (JSC::DFG::ByteCodeCache::get):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::cellConstant):
        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):
        (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck):
        (JSC::DFG::StructureCheckHoistingPhase::noticeClobber):
        * heap/Heap.cpp:
        (JSC::Heap::markProtectedObjects):
        * heap/Heap.h:
        (JSC::Heap::forEachProtectedCell):
        * heap/JITStubRoutineSet.cpp:
        (JSC::JITStubRoutineSet::markSlow):
        (JSC::JITStubRoutineSet::deleteUnmarkedJettisonedStubRoutines):
        * heap/MarkStack.cpp:
        (JSC::MarkStack::internalAppend):
        * heap/Weak.h:
        (JSC::weakRemove):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompile):
        * jit/JITStubs.cpp:
        (JSC::JITThunks::ctiStub):
        * parser/Parser.cpp:
        (JSC::::parseStrictObjectLiteral):
        * profiler/Profile.cpp:
        (JSC::functionNameCountPairComparator):
        (JSC::Profile::debugPrintDataSampleStyle):
        * runtime/Identifier.cpp:
        (JSC::Identifier::add):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::getOwnPropertyNames):
        (JSC::JSActivation::symbolTablePutWithAttributes):
        * runtime/JSArray.cpp:
        (JSC::SparseArrayValueMap::put):
        (JSC::SparseArrayValueMap::putDirect):
        (JSC::SparseArrayValueMap::visitChildren):
        (JSC::JSArray::enterDictionaryMode):
        (JSC::JSArray::defineOwnNumericProperty):
        (JSC::JSArray::getOwnPropertySlotByIndex):
        (JSC::JSArray::getOwnPropertyDescriptor):
        (JSC::JSArray::putByIndexBeyondVectorLength):
        (JSC::JSArray::putDirectIndexBeyondVectorLength):
        (JSC::JSArray::deletePropertyByIndex):
        (JSC::JSArray::getOwnPropertyNames):
        (JSC::JSArray::setLength):
        (JSC::JSArray::sort):
        (JSC::JSArray::compactForSorting):
        (JSC::JSArray::checkConsistency):
        * runtime/JSSymbolTableObject.cpp:
        (JSC::JSSymbolTableObject::getOwnPropertyNames):
        * runtime/JSSymbolTableObject.h:
        (JSC::symbolTableGet):
        (JSC::symbolTablePut):
        (JSC::symbolTablePutWithAttributes):
        * runtime/RegExpCache.cpp:
        (JSC::RegExpCache::invalidateCode):
        * runtime/WeakGCMap.h:
        (JSC::WeakGCMap::clear):
        (JSC::WeakGCMap::set):
        * tools/ProfileTreeNode.h:
        (JSC::ProfileTreeNode::sampleChild):
        (JSC::ProfileTreeNode::childCount):
        (JSC::ProfileTreeNode::dumpInternal):
        (JSC::ProfileTreeNode::compareEntries):

1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
2012-08-28  Geoffrey Garen  <ggaren@apple.com>

        GCC warning in JSActivation is causing Mac EWS errors
        https://bugs.webkit.org/show_bug.cgi?id=95103

        Reviewed by Sam Weinig.

        Try to fix a strict aliasing violation by using bitwise_cast. The
        union in the cast should signal to the compiler that aliasing between
        types is happening.

        * runtime/JSActivation.cpp:
        (JSC::JSActivation::visitChildren):

1195
1196
1197
1198
2012-08-28  Geoffrey Garen  <ggaren@apple.com>

        Build fix: svn add two files I forgot in my last patch.

1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
2012-08-27  Geoffrey Garen  <ggaren@apple.com>

        Refactored and consolidated variable resolution functions
        https://bugs.webkit.org/show_bug.cgi?id=95166

        Reviewed by Filip Pizlo.

        This patch does a few things:

        (1) Introduces a new class, JSScope, which is the base class for all
        objects that represent a scope in the scope chain.

        (2) Refactors and consolidates duplicate implementations of variable
        resolution into the JSScope class.

        (3) Renames JSStaticScopeObject to JSNameScope because, as distinct from
        something like a 'let' scope, JSStaticScopeObject only has storage for a
        single name.

        These changes makes logical sense to me as-is. I will also use them in an
        upcoming optimization.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri: Build!

        * bytecode/CodeBlock.cpp:
        (JSC): Build fix for LLInt-only builds.

        * bytecode/GlobalResolveInfo.h:
        (GlobalResolveInfo): Use PropertyOffset to be consistent with other parts
        of the engine.

        * bytecompiler/NodesCodegen.cpp:
        * dfg/DFGOperations.cpp: Use the shared code in JSScope instead of rolling
        our own.

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):
        (JSC::Interpreter::createExceptionScope):
        (JSC::Interpreter::privateExecute):
        * interpreter/Interpreter.h: Use the shared code in JSScope instead of rolling
        our own.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION): Use the shared code in JSScope instead of rolling
        our own.

        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        (LLInt): Use the shared code in JSScope instead of rolling our own. Note
        that one of these slow paths calls the wrong helper function. I left it
        that way to avoid a behavior change in a refactoring patch.

        * parser/Nodes.cpp: Updated for rename.

        * runtime/CommonSlowPaths.h:
        (CommonSlowPaths): Removed resolve slow paths because were duplicative.

        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        * runtime/JSGlobalData.h:
        (JSGlobalData): Updated for renames.

        * runtime/JSNameScope.cpp: Copied from Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp.
        (JSC):
        (JSC::JSNameScope::visitChildren):
        (JSC::JSNameScope::toThisObject):
        (JSC::JSNameScope::put):
        (JSC::JSNameScope::getOwnPropertySlot):
        * runtime/JSNameScope.h: Copied from Source/JavaScriptCore/runtime/JSStaticScopeObject.h.
        (JSC):
        (JSC::JSNameScope::create):
        (JSC::JSNameScope::createStructure):
        (JSNameScope):
        (JSC::JSNameScope::JSNameScope):
        (JSC::JSNameScope::isDynamicScope): Used do-webcore-rename script here.
        It is fabulous!

        * runtime/JSObject.h:
        (JSObject):
        (JSC::JSObject::isNameScopeObject): More rename.

        * runtime/JSScope.cpp: Added.
        (JSC):
        (JSC::JSScope::isDynamicScope):
        (JSC::JSScope::resolve):
        (JSC::JSScope::resolveSkip):
        (JSC::JSScope::resolveGlobal):
        (JSC::JSScope::resolveGlobalDynamic):
        (JSC::JSScope::resolveBase):
        (JSC::JSScope::resolveWithBase):
        (JSC::JSScope::resolveWithThis):
        * runtime/JSScope.h: Added.
        (JSC):
        (JSScope):
        (JSC::JSScope::JSScope): All the code here is a port from the
        Interpreter.cpp implementations of this functionality.

        * runtime/JSStaticScopeObject.cpp: Removed.
        * runtime/JSStaticScopeObject.h: Removed.

        * runtime/JSSymbolTableObject.cpp:
        (JSC):
        * runtime/JSSymbolTableObject.h:
        (JSSymbolTableObject):
        * runtime/JSType.h: Updated for rename.

        * runtime/Operations.h:
        (JSC::resolveBase): Removed because it was duplicative.

1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
2012-08-28  Alban Browaeys <prahal@yahoo.com>

        [GTK] LLint build fails with -g -02
        https://bugs.webkit.org/show_bug.cgi?id=90098

        Reviewed by Filip Pizlo.

        Avoid duplicate offsets for llint, discarding them.

        * offlineasm/offsets.rb:

1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
2012-08-27  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r126836.
        http://trac.webkit.org/changeset/126836
        https://bugs.webkit.org/show_bug.cgi?id=95163

        Broke all Apple ports, EFL, and Qt. (Requested by tkent on
        #webkit).

        * API/JSCallbackObject.h:
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
        * API/JSCallbackObjectFunctions.h:
        (JSC::::getOwnPropertyNames):
        * API/JSClassRef.cpp:
        (OpaqueJSClass::~OpaqueJSClass):
        (OpaqueJSClassContextData::OpaqueJSClassContextData):
        (OpaqueJSClass::contextData):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        (JSC::EvalCodeCache::visitAggregate):
        (JSC::CodeBlock::nameForRegister):
        * bytecode/JumpTable.h:
        (JSC::StringJumpTable::offsetForValue):
        (JSC::StringJumpTable::ctiForValue):
        * bytecode/LazyOperandValueProfile.cpp:
        (JSC::LazyOperandValueProfileParser::getIfPresent):
        * bytecode/SamplingTool.cpp:
        (JSC::SamplingTool::dump):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::addVar):
        (JSC::BytecodeGenerator::addGlobalVar):
        (JSC::BytecodeGenerator::addConstant):
        (JSC::BytecodeGenerator::addConstantValue):
        (JSC::BytecodeGenerator::emitLoad):
        (JSC::BytecodeGenerator::addStringConstant):
        (JSC::BytecodeGenerator::emitLazyNewFunction):
        * bytecompiler/NodesCodegen.cpp:
        (JSC::PropertyListNode::emitBytecode):
        * debugger/Debugger.cpp:
        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse):
        (JSC::DFG::ArgumentsSimplificationPhase::observeProperArgumentsUse):
        (JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize):
        (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild):
        * dfg/DFGAssemblyHelpers.cpp:
        (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
        * dfg/DFGByteCodeCache.h:
        (JSC::DFG::ByteCodeCache::~ByteCodeCache):
        (JSC::DFG::ByteCodeCache::get):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::cellConstant):
        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):
        (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck):
        (JSC::DFG::StructureCheckHoistingPhase::noticeClobber):
        * heap/Heap.cpp:
        (JSC::Heap::markProtectedObjects):
        * heap/Heap.h:
        (JSC::Heap::forEachProtectedCell):
        * heap/JITStubRoutineSet.cpp:
        (JSC::JITStubRoutineSet::markSlow):
        (JSC::JITStubRoutineSet::deleteUnmarkedJettisonedStubRoutines):
        * heap/MarkStack.cpp:
        (JSC::MarkStack::internalAppend):
        * heap/Weak.h:
        (JSC::weakRemove):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompile):
        * jit/JITStubs.cpp:
        (JSC::JITThunks::ctiStub):
        * parser/Parser.cpp:
        (JSC::::parseStrictObjectLiteral):
        * profiler/Profile.cpp:
        (JSC::functionNameCountPairComparator):
        (JSC::Profile::debugPrintDataSampleStyle):
        * runtime/Identifier.cpp:
        (JSC::Identifier::add):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::getOwnPropertyNames):
        (JSC::JSActivation::symbolTablePutWithAttributes):
        * runtime/JSArray.cpp:
        (JSC::SparseArrayValueMap::put):
        (JSC::SparseArrayValueMap::putDirect):
        (JSC::SparseArrayValueMap::visitChildren):
        (JSC::JSArray::enterDictionaryMode):
        (JSC::JSArray::defineOwnNumericProperty):
        (JSC::JSArray::getOwnPropertySlotByIndex):
        (JSC::JSArray::getOwnPropertyDescriptor):
        (JSC::JSArray::putByIndexBeyondVectorLength):
        (JSC::JSArray::putDirectIndexBeyondVectorLength):
        (JSC::JSArray::deletePropertyByIndex):
        (JSC::JSArray::getOwnPropertyNames):
        (JSC::JSArray::setLength):
        (JSC::JSArray::sort):
        (JSC::JSArray::compactForSorting):
        (JSC::JSArray::checkConsistency):
        * runtime/JSSymbolTableObject.cpp:
        (JSC::JSSymbolTableObject::getOwnPropertyNames):
        * runtime/JSSymbolTableObject.h:
        (JSC::symbolTableGet):
        (JSC::symbolTablePut):
        (JSC::symbolTablePutWithAttributes):
        * runtime/RegExpCache.cpp:
        (JSC::RegExpCache::invalidateCode):
        * runtime/WeakGCMap.h:
        (JSC::WeakGCMap::clear):
        (JSC::WeakGCMap::set):
        * tools/ProfileTreeNode.h:
        (JSC::ProfileTreeNode::sampleChild):
        (JSC::ProfileTreeNode::childCount):
        (JSC::ProfileTreeNode::dumpInternal):
        (JSC::ProfileTreeNode::compareEntries):

1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
2012-08-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>

        Rename first/second to key/value in HashMap iterators
        https://bugs.webkit.org/show_bug.cgi?id=82784

        Reviewed by Eric Seidel.

        * API/JSCallbackObject.h:
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
        * API/JSCallbackObjectFunctions.h:
        (JSC::::getOwnPropertyNames):
        * API/JSClassRef.cpp:
        (OpaqueJSClass::~OpaqueJSClass):
        (OpaqueJSClassContextData::OpaqueJSClassContextData):
        (OpaqueJSClass::contextData):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        (JSC::EvalCodeCache::visitAggregate):
        (JSC::CodeBlock::nameForRegister):
        * bytecode/JumpTable.h:
        (JSC::StringJumpTable::offsetForValue):
        (JSC::StringJumpTable::ctiForValue):
        * bytecode/LazyOperandValueProfile.cpp:
        (JSC::LazyOperandValueProfileParser::getIfPresent):
        * bytecode/SamplingTool.cpp:
        (JSC::SamplingTool::dump):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::addVar):
        (JSC::BytecodeGenerator::addGlobalVar):
        (JSC::BytecodeGenerator::addConstant):
        (JSC::BytecodeGenerator::addConstantValue):
        (JSC::BytecodeGenerator::emitLoad):
        (JSC::BytecodeGenerator::addStringConstant):
        (JSC::BytecodeGenerator::emitLazyNewFunction):
        * bytecompiler/NodesCodegen.cpp:
        (JSC::PropertyListNode::emitBytecode):
        * debugger/Debugger.cpp:
        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse):
        (JSC::DFG::ArgumentsSimplificationPhase::observeProperArgumentsUse):
        (JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize):
        (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild):
        * dfg/DFGAssemblyHelpers.cpp:
        (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
        * dfg/DFGByteCodeCache.h:
        (JSC::DFG::ByteCodeCache::~ByteCodeCache):
        (JSC::DFG::ByteCodeCache::get):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::cellConstant):
        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):
        (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck):
        (JSC::DFG::StructureCheckHoistingPhase::noticeClobber):
        * heap/Heap.cpp:
        (JSC::Heap::markProtectedObjects):
        * heap/Heap.h:
        (JSC::Heap::forEachProtectedCell):
        * heap/JITStubRoutineSet.cpp:
        (JSC::JITStubRoutineSet::markSlow):
        (JSC::JITStubRoutineSet::deleteUnmarkedJettisonedStubRoutines):
        * heap/MarkStack.cpp:
        (JSC::MarkStack::internalAppend):
        * heap/Weak.h:
        (JSC::weakRemove):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompile):
        * jit/JITStubs.cpp:
        (JSC::JITThunks::ctiStub):
        * parser/Parser.cpp:
        (JSC::::parseStrictObjectLiteral):
        * profiler/Profile.cpp:
        (JSC::functionNameCountPairComparator):
        (JSC::Profile::debugPrintDataSampleStyle):
        * runtime/Identifier.cpp:
        (JSC::Identifier::add):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::getOwnPropertyNames):
        (JSC::JSActivation::symbolTablePutWithAttributes):
        * runtime/JSArray.cpp:
        (JSC::SparseArrayValueMap::put):
        (JSC::SparseArrayValueMap::putDirect):
        (JSC::SparseArrayValueMap::visitChildren):
        (JSC::JSArray::enterDictionaryMode):
        (JSC::JSArray::defineOwnNumericProperty):
        (JSC::JSArray::getOwnPropertySlotByIndex):
        (JSC::JSArray::getOwnPropertyDescriptor):
        (JSC::JSArray::putByIndexBeyondVectorLength):
        (JSC::JSArray::putDirectIndexBeyondVectorLength):
        (JSC::JSArray::deletePropertyByIndex):
        (JSC::JSArray::getOwnPropertyNames):
        (JSC::JSArray::setLength):
        (JSC::JSArray::sort):
        (JSC::JSArray::compactForSorting):
        (JSC::JSArray::checkConsistency):
        * runtime/JSSymbolTableObject.cpp:
        (JSC::JSSymbolTableObject::getOwnPropertyNames):
        * runtime/JSSymbolTableObject.h:
        (JSC::symbolTableGet):
        (JSC::symbolTablePut):
        (JSC::symbolTablePutWithAttributes):
        * runtime/RegExpCache.cpp:
        (JSC::RegExpCache::invalidateCode):
        * runtime/WeakGCMap.h:
        (JSC::WeakGCMap::clear):
        (JSC::WeakGCMap::set):
        * tools/ProfileTreeNode.h:
        (JSC::ProfileTreeNode::sampleChild):
        (JSC::ProfileTreeNode::childCount):
        (JSC::ProfileTreeNode::dumpInternal):
        (JSC::ProfileTreeNode::compareEntries):

1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
2012-08-27  Filip Pizlo  <fpizlo@apple.com>

        Structure check hoisting should abstain if the OSR entry's must-handle value for the respective variable has a different structure
        https://bugs.webkit.org/show_bug.cgi?id=95141
        <rdar://problem/12170401>

        Reviewed by Mark Hahnenberg.

        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):

1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
2012-08-27  Mark Hahnenberg  <mhahnenberg@apple.com>

        Remove use of ClassInfo from SpeculativeJIT::compileGetByValOnArguments
        https://bugs.webkit.org/show_bug.cgi?id=95131

        Reviewed by Filip Pizlo.

        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments): We don't need this speculation check. We can replace it 
        with an assert to guarantee this.

1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
2012-08-27  Oliver Hunt  <oliver@apple.com>

        Remove opcode definition autogen for now
        https://bugs.webkit.org/show_bug.cgi?id=95148

        Reviewed by Mark Hahnenberg.

        This isn't worth doing at the moment.

        * DerivedSources.make:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/Opcode.h:
        (JSC):
        (JSC::padOpcodeName):
        * bytecode/OpcodeDefinitions.h: Removed.
        * bytecode/opcodes: Removed.
        * opcode_definition_generator.py: Removed.
        * opcode_generator.py: Removed.
        * opcode_parser.py: Removed.

1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
2012-08-27  Mark Hahnenberg  <mhahnenberg@apple.com>

        Remove uses of TypedArray ClassInfo from SpeculativeJIT::checkArgumentTypes
        https://bugs.webkit.org/show_bug.cgi?id=95112

        Reviewed by Filip Pizlo.

        Removing these checks since we no longer need them.

        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::initialize):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::checkArgumentTypes):

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
2012-08-27  Benjamin Poulain  <benjamin@webkit.org>

        Add ECMAScript Number to String conversion to WTF::String
        https://bugs.webkit.org/show_bug.cgi?id=95016

        Reviewed by Geoffrey Garen.

        Rename UString::number(double) to UString::numberToStringECMAScript(double) to
        differenciate it from the fixed-width conversion performed by String::number().

        * parser/ParserArena.h:
        (JSC::IdentifierArena::makeNumericIdentifier):
        * runtime/JSONObject.cpp:
        (JSC::Stringifier::appendStringifiedValue):
        * runtime/NumberPrototype.cpp:
        (JSC::numberProtoFuncToExponential):
        (JSC::numberProtoFuncToFixed):
        (JSC::numberProtoFuncToPrecision):
        (JSC::numberProtoFuncToString):
        * runtime/NumericStrings.h:
        (JSC::NumericStrings::add):
        * runtime/UString.cpp:
        (JSC::UString::numberToStringECMAScript):
        * runtime/UString.h:
        (UString):

1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
2012-08-27  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>

        Rename RegisterProtocolHandler API to NavigatorContentUtils
        https://bugs.webkit.org/show_bug.cgi?id=94920

        Reviewed by Adam Barth.

        ENABLE_REGISTER_PROTOCOL_HANDLER is renamed to ENABLE_NAVIGATOR_CONTENT_UTILS.

        * Configurations/FeatureDefines.xcconfig:

1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
2012-08-26  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, fix for builds without VALUE_PROFILING. I had forgotten that shouldEmitProfiling()
        is designed to return true if DFG_JIT is disabled. I should be using canBeOptimized() instead.

        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCall):
        * jit/JITCall32_64.cpp:
        (JSC::JIT::compileOpCall):

1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
2012-08-26  Geoffrey Garen  <ggaren@apple.com>

        Don't allocate space for arguments and call frame if arguments aren't captured
        https://bugs.webkit.org/show_bug.cgi?id=95024

        Reviewed by Phil Pizlo.

        27% on v8-real-earley.

        * runtime/JSActivation.h:
        (JSC::JSActivation::registerOffset): The offset is zero if we're skipping
        the arguments and call frame because "offset" means space reserved for
        those things.

        (JSC::JSActivation::tearOff): Don't copy the scope chain and callee. We
        don't need them for anything, and we're no longer guaranteed to have
        space for them.

1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
2012-08-26  Geoffrey Garen  <ggaren@apple.com>

        Removed the NULL checks from visitChildren functions
        https://bugs.webkit.org/show_bug.cgi?id=95021

        Reviewed by Oliver Hunt.

        As of http://trac.webkit.org/changeset/126624, all values are NULL-checked
        during GC, so explicit NULL checks aren't needed anymore.

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
2011-08-26  Geoffrey Garen  <ggaren@apple.com>

        Removed a JSC-specific hack from the web inspector
        https://bugs.webkit.org/show_bug.cgi?id=95033

        Reviewed by Filip Pizlo.

        Added support for what the web inspector really wanted instead.

        * runtime/JSActivation.cpp:
        (JSC::JSActivation::symbolTableGet):
        (JSC::JSActivation::symbolTablePut): Added some explanation for these
        checks, which were non-obvious to me.

        (JSC::JSActivation::getOwnPropertySlot): It's impossible to access the
        arguments property of an activation after it's been torn off, since the
        only way to tear off an activation is to instantiate a new function,
        which has its own arguments property in scope. However, the inspector
        get special access to activations, and may try to perform this access,
        so we need a special guard to maintain coherence and avoid crashing in
        case the activation optimized out the arguments property.

        * runtime/JSActivation.cpp:
        (JSC::JSActivation::symbolTableGet):
        (JSC::JSActivation::symbolTablePut):
        (JSC::JSActivation::getOwnPropertyNames):
        (JSC::JSActivation::getOwnPropertyDescriptor): Provide getOwnPropertyNames
        and getOwnPropertyDescriptor implementations, to meet the web inspector's
        needs. (User code can never call these.)

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

        Finally inlining should correctly track the catch context
        https://bugs.webkit.org/show_bug.cgi?id=94986
        <rdar://problem/11753784>

        Reviewed by Sam Weinig.

        This fixes two behaviors:
        
        1) Throwing from a finally block. Previously, we would seem to reenter the finally
           block - though only once.
        
        2) Executing a finally block from some nested context, for example due to a
           'continue', 'break', or 'return' in the try. This would execute the finally
           block in the context of of the try block, which could lead to either scope depth
           mismatches or reexecutions of the finally block on throw, similarly to (1) but
           for different reasons.

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC):
        (JSC::BytecodeGenerator::pushFinallyContext):
        (JSC::BytecodeGenerator::emitComplexJumpScopes):
        (JSC::BytecodeGenerator::pushTry):
        (JSC::BytecodeGenerator::popTryAndEmitCatch):
        * bytecompiler/BytecodeGenerator.h:
        (FinallyContext):
        (TryData):
        (JSC):
        (TryContext):
        (TryRange):
        (BytecodeGenerator):
        * bytecompiler/NodesCodegen.cpp:
        (JSC::TryNode::emitBytecode):

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

        Array type checks and storage accesses should be uniformly represented and available to CSE
        https://bugs.webkit.org/show_bug.cgi?id=95013

        Reviewed by Oliver Hunt.

        This uniformly breaks up all array accesses into up to three parts:
        
        1) The type check, using a newly introduced CheckArray node, in addition to possibly
           a CheckStructure node. We were already inserting the CheckStructure prior to this
           patch. The CheckArray node will be automatically eliminated if the thing it was
           checking for had already been checked for, either intentionally (a CheckStructure
           inserted based on the array profile of this access) or accidentally (some checks,
           typically a CheckStructure, inserted for some unrelated operations). The
           CheckArray node may not be inserted if the array type is non-specific (Generic or
           ForceExit).
        
        2) The storage load using GetIndexedPropertyStorage. Previously, this only worked for
           GetByVal. Now it works for all array accesses. The storage load may not be
           inserted if the mode of array access does not permit CSE of storage loads (like
           non-specific modes or Arguments).
        
        3) The access itself: one of GetByVal, PutByVal, PutByValAlias, ArrayPush, ArrayPop,
           GetArrayLength, StringCharAt, or StringCharCodeAt.
        
        This means that the type check can be subjected to CSE even if the CFA isn't smart
        enough to reason about it (yet!). It also means that the storage load can always be
        subjected to CSE; previously CSE on storage load only worked for array loads and not
        other forms of access. Finally, it removes the bizarre behavior that
        GetIndexedPropertyStorage previously had: previously, it was responsible for the type
        check in some cases, but not others; this made reasoning about the CFA really
        confusing.
        
        This change also disables late refinement of array mode, since I decided that
        supporting that feature is both confusing and likely unprofitable. The array modes are
        now locked in in the first fixup run after prediction propagation. Of course,
        refinements from Generic to something else would not have been a problem; we could
        reenable those if we thought we really needed to.

        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        * dfg/DFGArrayMode.cpp:
        (JSC::DFG::fromStructure):
        (DFG):
        (JSC::DFG::refineArrayMode):
        * dfg/DFGArrayMode.h:
        (DFG):
        (JSC::DFG::modeIsJSArray):
        (JSC::DFG::lengthNeedsStorage):
        (JSC::DFG::modeIsSpecific):
        (JSC::DFG::modeSupportsLength):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::ByteCodeParser):
        (JSC::DFG::ByteCodeParser::getArrayMode):
        (ByteCodeParser):
        (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks):
        (JSC::DFG::ByteCodeParser::handleIntrinsic):
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGCFGSimplificationPhase.cpp:
        (JSC::DFG::CFGSimplificationPhase::mergeBlocks):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::CSEPhase):
        (JSC::DFG::CSEPhase::checkStructureElimination):
        (CSEPhase):
        (JSC::DFG::CSEPhase::checkArrayElimination):
        (JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination):
        (JSC::DFG::CSEPhase::performNodeCSE):
        (JSC::DFG::performCSE):
        * dfg/DFGCSEPhase.h:
        (DFG):
        * dfg/DFGCommon.h:
        * dfg/DFGConstantFoldingPhase.cpp:
        (JSC::DFG::ConstantFoldingPhase::foldConstants):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        (JSC::DFG::FixupPhase::checkArray):
        (FixupPhase):
        (JSC::DFG::FixupPhase::blessArrayOperation):
        * dfg/DFGGraph.cpp:
        (JSC::DFG::Graph::Graph):
        (DFG):
        (JSC::DFG::Graph::dump):
        (JSC::DFG::Graph::collectGarbage):
        * dfg/DFGGraph.h:
        (Graph):
        (JSC::DFG::Graph::vote):
        (JSC::DFG::Graph::substitute):
        * dfg/DFGNode.h:
        (JSC::DFG::Node::hasArrayMode):
        (JSC::DFG::Node::setArrayMode):
        * dfg/DFGNodeType.h:
        (DFG):
        * dfg/DFGOperations.cpp:
        * dfg/DFGPhase.h:
        (DFG):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        (JSC::DFG::PredictionPropagationPhase::mergeDefaultFlags):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::checkArray):
        (JSC::DFG::SpeculativeJIT::useChildren):
        (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
        (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
        (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
        (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
        * dfg/DFGSpeculativeJIT.h:
        (SpeculativeJIT):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):

1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
2012-08-26  Filip Pizlo  <fpizlo@apple.com>

        DFGGraph.h has a bogus comment about the nature of StorageAccessData
        https://bugs.webkit.org/show_bug.cgi?id=95035

        Reviewed by Oliver Hunt.

        The comment is both wrong (storage access instructions don't reference CheckStructure)
        and highly redundant: of course it's the case that two structures may have the same
        identifier. Our interference analyses currently don't care about this and make the
        conservative assumptions when necessary (same identifier, same object -> must be same
        property; same identifier, may be same object -> may be the same property). Better to
        remove the bogus comment since the code that operates over this data structure is
        fairly self-explanatory already.

        * dfg/DFGGraph.h:
        (StorageAccessData):

1888
1889
1890
1891
1892
1893
1894
2012-08-25  Geoffrey Garen  <ggaren@apple.com>

        Try a little harder to fix the Linux build.

        * runtime/JSActivation.cpp:
        * runtime/JSActivation.h:

1895
1896
1897
1898
1899
1900
2012-08-25  Geoffrey Garen  <ggaren@apple.com>

        Try to fix the Linux build.

        * runtime/JSActivation.cpp:

1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2012-08-25  Geoffrey Garen  <ggaren@apple.com>

        Don't use malloc / destructors for activation objects
        https://bugs.webkit.org/show_bug.cgi?id=94897

        Reviewed by Oliver Hunt.

        65% faster on v8-real-earley.

        Lots of boilerplate here, but the jist is this:

        (1) Use CopiedSpace instead of malloc to allocate the activation's
        backing store.

        (2) Use MarkedSpace instead of ref-counting to allocate the symbol table.

        (3) ==> No more destructor.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::CodeBlock):
        (JSC::CodeBlock::stronglyVisitStrongReferences):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::symbolTable):
        (CodeBlock):
        (JSC::GlobalCodeBlock::GlobalCodeBlock):
        (JSC::FunctionCodeBlock::FunctionCodeBlock):
        (FunctionCodeBlock): SymbolTable is a GC object now, so it gets a write
        barrier and visit calls instead of ref-counting. I changed all CodeBlocks
        to use shared symbol tables because the distinction between shared and
        unshared hurt my head.

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::resolve):
        (JSC::BytecodeGenerator::resolveConstDecl):
        (JSC::BytecodeGenerator::emitPutStaticVar):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile): Sometimes, a period just wants
        to be an arrow. And then C++ is there to accommodate.

        * jit/JITDriver.h:
        (JSC::jitCompileFunctionIfAppropriate):
        * runtime/Arguments.h:
        (ArgumentsData):
        (JSC::Arguments::setRegisters):
        (Arguments):
        (JSC::Arguments::argument):
        (JSC::Arguments::finishCreation):
        * runtime/Executable.cpp:
        (JSC::FunctionExecutable::FunctionExecutable):
        (JSC::ProgramExecutable::compileInternal):
        (JSC::FunctionExecutable::compileForCallInternal):
        (JSC::FunctionExecutable::compileForConstructInternal):
        (JSC::FunctionExecutable::visitChildren):
        * runtime/Executable.h:
        (JSC::FunctionExecutable::symbolTable):
        (FunctionExecutable):
        * runtime/ExecutionHarness.h:
        (JSC::prepareFunctionForExecution): I changed from WriteBarrier to
        WriteBarrierBase so activations could reuse StorageBarrier and PropertyStorage.

        * runtime/JSActivation.cpp:
        (JSC::JSActivation::JSActivation):
        (JSC::JSActivation::finishCreation): Allocate the symbol table here,
        after we're fully constructed, to avoid GC during initialization.

        (JSC::JSActivation::visitChildren):
        (JSC::JSActivation::symbolTableGet):
        (JSC::JSActivation::symbolTablePut):
        (JSC::JSActivation::getOwnPropertyNames):
        (JSC::JSActivation::symbolTablePutWithAttributes):
        * runtime/JSActivation.h:
        (JSC::JSActivation::create):
        (JSActivation):
        (JSC::JSActivation::registerOffset):
        (JSC):
        (JSC::JSActivation::registerArraySize):
        (JSC::JSActivation::registerArraySizeInBytes):
        (JSC::JSActivation::tearOff): Tear-off zero-initializes all uncopied
        registers. This makes it safe to copyAndAppend the full buffer in
        visitChildren, without any extra checks.

        * runtime/JSCell.h:
        (JSCell): Moved a shared default set of flags into this base class, so
        I could use it in a few places.

        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        * runtime/JSGlobalData.h:
        (JSGlobalData): New structure for symbol tables.

        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::JSGlobalObject):
        (JSC::JSGlobalObject::addStaticGlobals):
        * runtime/JSGlobalObject.h:
        (JSGlobalObject):
        (JSC::JSGlobalObject::symbolTableHasProperty): We don't need an inline
        symbol table -- JSSymbolTableObject will GC allocate one for us.

        * runtime/JSObject.h:
        (JSObject):
        * runtime/JSSegmentedVariableObject.h:
        (JSC::JSSegmentedVariableObject::JSSegmentedVariableObject):
        * runtime/JSStaticScopeObject.cpp:
        (JSC):
        (JSC::JSStaticScopeObject::visitChildren): NULL check our register store
        because finishCreation allocates an object now, so we may get marked
        before we've assigned to our register store.

        * runtime/JSStaticScopeObject.h:
        (JSC::JSStaticScopeObject::finishCreation):
        (JSC::JSStaticScopeObject::JSStaticScopeObject):
        (JSStaticScopeObject): No more destructor for this object, either, since
        it no longer embeds a hash table.

        * runtime/JSSymbolTableObject.cpp:
        (JSC::JSSymbolTableObject::visitChildren):
        (JSC::JSSymbolTableObject::deleteProperty):
        (JSC::JSSymbolTableObject::getOwnPropertyNames):
        * runtime/JSSymbolTableObject.h:
        (JSC::JSSymbolTableObject::symbolTable):
        (JSSymbolTableObject):
        (JSC::JSSymbolTableObject::JSSymbolTableObject):
        (JSC::JSSymbolTableObject::finishCreation):
        (JSC::symbolTableGet):
        (JSC::symbolTablePut):
        (JSC::symbolTablePutWithAttributes): SymbolTableObject allocates a symbol
        table automatically if one isn't provided. (Activations provide their
        own, which they get from compiled code.)

        * runtime/JSVariableObject.cpp:
        (JSC):
        * runtime/JSVariableObject.h:
        (JSC::JSVariableObject::registerAt):
        (JSC::JSVariableObject::addressOfRegisters):
        (JSVariableObject):
        (JSC::JSVariableObject::JSVariableObject):
        (JSC::JSVariableObject::finishCreation): Removed a bunch of obsolete code.
        Activations manage their registers directly now.

        * runtime/StorageBarrier.h:
        (StorageBarrier):
        (JSC::StorageBarrier::operator!):

        * runtime/SymbolTable.cpp:
        (JSC):
        (JSC::SharedSymbolTable::destroy):
        * runtime/SymbolTable.h:
        (JSC::SharedSymbolTable::create):
        (SharedSymbolTable):
        (JSC::SharedSymbolTable::createStructure):
        (JSC::SharedSymbolTable::SharedSymbolTable): Boilerplat code to
        make shared symbol table GC-allocated.

2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2012-08-25  Filip Pizlo  <fpizlo@apple.com>

        op_call should have ArrayProfiling for the benefit of array intrinsics
        https://bugs.webkit.org/show_bug.cgi?id=95014

        Reviewed by Sam Weinig.

        This is a performance-neutral change that just adds the profiling but does not
        use it, yet. If in the future we wanted to make this kind of profiling cheaper
        we could move it into specialized thunks for the relevant array intrinsics, but
        I figure that if this much simpler change gives us what we need without any
        discernable performance penalty then that's for the best.

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::emitCall):
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCall):
        * jit/JITCall32_64.cpp:
        (JSC::JIT::compileOpCall):
        * llint/LowLevelInterpreter.asm:
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:

2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2012-08-25  Filip Pizlo  <fpizlo@apple.com>

        The redundant phi elimination phase is not used and should be removed
        https://bugs.webkit.org/show_bug.cgi?id=95006

        Reviewed by Dan Bernstein.

        Just removing dead code.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * dfg/DFGDriver.cpp:
        * dfg/DFGRedundantPhiEliminationPhase.cpp: Removed.
        * dfg/DFGRedundantPhiEliminationPhase.h: Removed.

2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2012-08-24  Benjamin Poulain  <bpoulain@apple.com>

        Unify Number to StringImpl conversion
        https://bugs.webkit.org/show_bug.cgi?id=94879

        Reviewed by Geoffrey Garen.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * runtime/UString.cpp:
        * runtime/UString.h:
        (JSC::UString::number):
        Update UString to directly use the common NumberToString implementation.

2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2012-08-24  Oliver Hunt  <oliver@apple.com>

        Always null check cells before marking
        https://bugs.webkit.org/show_bug.cgi?id=94968

        Reviewed by Geoffrey Garen.

        Originally we tried to minimise null checks by only null checking values
        that we knew could be null, however given that we can't ever guarantee
        when a GC will happen, we're better off just always assuming that a null
        check will be necessary.  This results in a much less fragile code base
        as we can add GC allocations to object initialisers without having to
        subsequently worry about whether the object we are initialising will need
        to add a bunch of null checks in its visitChildren implementation.

        * heap/MarkStack.cpp:
        (JSC::MarkStack::internalAppend):
        * heap/MarkStackInlineMethods.h:
        (JSC::MarkStack::append):
        (JSC::MarkStack::appendUnbarrieredPointer):
        * runtime/Structure.h:
        (JSC::MarkStack::internalAppend):

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

        Autogenerate Opcode definitions
        https://bugs.webkit.org/show_bug.cgi?id=94840

        Reviewed by Gavin Barraclough.

        Start the process of autogenerating the code emission for the bytecode.
        We'll just start with automatic generation of the list of Opcodes as that
        requires the actual definition of the opcodes, and the logic for parsing
        them.

        Due to some rather annoying dependency cycles, this initial version has
        the OpcodeDefinitions.h file checked into the tree, although with some
        work I hope to be able to fix that.

        * DerivedSources.make:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/Opcode.h:
          Include OpcodeDefinitions.h as our definitive source of info
          about the opcodes.
        * bytecode/OpcodeDefinitions.h: Added.
          Autogenerated file
        * bytecode/opcodes: Added.
          The new opcode definition file
        * opcode_definition_generator.py: Added.
        (generateOpcodeDefinition):
        (generate):
          Module that generates the content for OpcodeDefinitions.h
        * opcode_generator.py: Added.
        (printUsage):
        (main):
          Driver script
        * opcode_parser.py: Added.
          Simple parser for the opcode definitions.

2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2011-08-23  Geoffrey Garen  <ggaren@apple.com>

        Unreviewed, rolling out r126505.
        http://trac.webkit.org/changeset/126505
        https://bugs.webkit.org/show_bug.cgi?id=94840

        Caused testapi to crash on launch

        * DerivedSources.make:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/Opcode.h:
        (JSC):
        (JSC::padOpcodeName):
        * bytecode/OpcodeDefinitions.h: Removed.
        * bytecode/opcodes: Removed.
        * opcode_definition_generator.py: Removed.
        * opcode_generator.py: Removed.
        * opcode_parser.py: Removed.

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

        Autogenerate Opcode definitions
        https://bugs.webkit.org/show_bug.cgi?id=94840

        Reviewed by Gavin Barraclough.

        Start the process of autogenerating the code emission for the bytecode.
        We'll just start with automatic generation of the list of Opcodes as that
        requires the actual definition of the opcodes, and the logic for parsing
        them.

        Due to some rather annoying dependency cycles, this initial version has
        the OpcodeDefinitions.h file checked into the tree, although with some
        work I hope to be able to fix that.

        * DerivedSources.make:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/Opcode.h:
          Include OpcodeDefinitions.h as our definitive source of info
          about the opcodes.
        * bytecode/OpcodeDefinitions.h: Added.
          Autogenerated file
        * bytecode/opcodes: Added.
          The new opcode definition file
        * opcode_definition_generator.py: Added.
        (generateOpcodeDefinition):
        (generate):
          Module that generates the content for OpcodeDefinitions.h
        * opcode_generator.py: Added.
        (printUsage):
        (main):
          Driver script
        * opcode_parser.py: Added.
          Simple parser for the opcode definitions.

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

        Change behavior of MasqueradesAsUndefined to better accommodate DFG changes
        https://bugs.webkit.org/show_bug.cgi?id=93884

        Reviewed by Filip Pizlo.

        With some upcoming changes to the DFG to remove uses of ClassInfo, we will be changing the behavior of  
        MasqueradesAsUndefined. In order to make this change consistent across all of our execution engines,  
        we will make this change to MasqueradesAsUndefined as a separate patch. After this patch, MasqueradesAsUndefined  
        objects will only masquerade as undefined in their original context (i.e. their original JSGlobalObject).  
        For example, if an object that masquerades as undefined in frame A is passed to frame B, it will not  
        masquerade as undefined within frame B, but it will continue to masquerade in frame A. 

        There are two primary changes that are taking place here. One is to thread the ExecState* through  
        JSValue::toBoolean and JSCell::toBoolean so that JSCell::toBoolean can check the object's  
        JSGlobalObject to compare it to the lexical JSGlobalObject of the currently running code. If the two  
        are distinct, then the object cannot MasqueradeAsUndefined. 

        The other change is to perform this comparison of JSGlobalObjects everywhere where the MasqueradesAsUndefined 
        flag in the Structure is checked. For C++ code, this check has been factored into its own function in  
        Structure::masqueradesAsUndefined. We only perform this check in the DFG if the current JSGlobalObject has  
        had a MasqueradesAsUndefined object allocated within its context. This conditional compilation is managed  
        through the use of a WatchpointSet in each JSGlobalObject and alternate create() functions for JS DOM wrappers 
        that are MasqueradesAsUndefined.

        * API/JSValueRef.cpp:
        (JSValueToBoolean):
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * bytecode/Watchpoint.h:
        (WatchpointSet):
        * debugger/DebuggerCallFrame.h:
        (JSC::DebuggerCallFrame::callFrame):
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGCFGSimplificationPhase.cpp:
        (JSC::DFG::CFGSimplificationPhase::run):
        * dfg/DFGOperations.cpp:
        * dfg/DFGOperations.h:
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
        (JSC::DFG::SpeculativeJIT::compile):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_is_undefined):
        (JSC::JIT::emit_op_jeq_null):
        (JSC::JIT::emit_op_jneq_null):
        (JSC::JIT::emit_op_eq_null):
        (JSC::JIT::emit_op_neq_null):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::emit_op_is_undefined):
        (JSC::JIT::emit_op_jeq_null):
        (JSC::JIT::emit_op_jneq_null):
        (JSC::JIT::emit_op_eq_null):
        (JSC::JIT::emit_op_neq_null):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncFilter):
        (JSC::arrayProtoFuncEvery):
        (JSC::arrayProtoFuncSome):
        * runtime/BooleanConstructor.cpp:
        (JSC::constructBoolean):
        (JSC::callBooleanConstructor):
        * runtime/JSCell.h:
        (JSCell):
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::JSGlobalObject):
        * runtime/JSGlobalObject.h:
        (JSGlobalObject):
        (JSC::JSGlobalObject::masqueradesAsUndefinedWatchpoint):
        * runtime/JSString.h:
        (JSC::JSCell::toBoolean):
        (JSC::JSValue::toBoolean):
        * runtime/JSValue.h:
        * runtime/ObjectConstructor.cpp:
        (JSC::toPropertyDescriptor):
        * runtime/Operations.cpp:
        (JSC::jsTypeStringForValue):
        (JSC::jsIsObjectType):
        * runtime/Operations.h:
        (JSC):
        (JSC::JSValue::equalSlowCaseInline):
        * runtime/RegExpConstructor.cpp:
        (JSC::setRegExpConstructorMultiline):
        * runtime/RegExpPrototype.cpp:
        (JSC::regExpProtoFuncToString):
        * runtime/Structure.h:
        (Structure):
        (JSC::Structure::globalObjectOffset):
        (JSC::Structure::masqueradesAsUndefined):
        (JSC):

2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2012-08-23  Mark Rowe  <mrowe@apple.com>

        Make JavaScriptCore build with the latest version of clang.

        Reviewed by Dan Bernstein.

        * heap/MachineStackMarker.cpp:
        (JSC::MachineThreads::MachineThreads): The m_heap member is only used within
        assertions, so guard its initialization with !ASSERT_DISABLED.
        * heap/MachineStackMarker.h:
        (MachineThreads): Ditto for its declaration.
        * jit/JITStubCall.h:
        (JSC::JITStubCall::JITStubCall): The m_returnType member is only used within
        assertions or if we're using JSVALUE32_64, so guard its uses with the appropriate
        #if.
        (JITStubCall): Ditto.

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
2012-08-23  Christophe Dumez  <christophe.dumez@intel.com>

        Serialization of JavaScript values does not appear to respect new HTML5 Structured Clone semantics
        https://bugs.webkit.org/show_bug.cgi?id=65292

        Reviewed by Oliver Hunt.

        Add function to construct a StringObject from a JSValue.
        Similar functions already exist for NumberObject and
        BooleanObject for example.

        Export several symbols so address linking errors in
        WebCore.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * runtime/BooleanObject.h:
        (BooleanObject):
        * runtime/NumberObject.h:
        (NumberObject):
        (JSC):
        * runtime/StringObject.cpp:
        (JSC::constructString):
        (JSC):
        * runtime/StringObject.h:
        (JSC):

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

        Array accesses should remember what kind of array they are predicted to access
        https://bugs.webkit.org/show_bug.cgi?id=94448

        Reviewed by Gavin Barraclough.

        Introduced the notion of DFG::Array::Mode, stored in node.arrayMode(), which allows nodes
        to remember how they decided to access arrays. This permits the bytecode parser to "lock in"
        the mode of access if it has profiling at its disposal, and it also allows the prediction
        propagator to do a fixup of the array mode later in the optimization fixpoint.
        
        This patch adds a healthy amount of new capability (specifically the ability of the parser
        to lock in an array mode regardless of type predictions) and it also blows away a lot of
        messy code.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        * dfg/DFGArrayMode.cpp: Added.
        (DFG):
        (JSC::DFG::fromObserved):
        (JSC::DFG::refineArrayMode):
        (JSC::DFG::modeAlreadyChecked):
        (JSC::DFG::modeToString):
        * dfg/DFGArrayMode.h: Added.
        (DFG):
        (JSC::DFG::canCSEStorage):
        (JSC::DFG::modeForPut):
        (JSC::DFG::modesCompatibleForStorageLoad):
        (JSC::DFG::modeSupportsLength):
        * dfg/DFGByteCodeParser.cpp:
        (ByteCodeParser):
        (JSC::DFG::ByteCodeParser::getArrayModeWithoutOSRExit):
        (JSC::DFG::ByteCodeParser::getArrayMode):
        (JSC::DFG::ByteCodeParser::handleIntrinsic):
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::getByValLoadElimination):
        (JSC::DFG::CSEPhase::checkStructureLoadElimination):
        (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
        (JSC::DFG::CSEPhase::getByOffsetLoadElimination):
        (JSC::DFG::CSEPhase::putByOffsetStoreElimination):
        (JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):
        (JSC::DFG::CSEPhase::performNodeCSE):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        * dfg/DFGGraph.cpp:
        (JSC::DFG::Graph::dump):
        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::byValIsPure):
        (JSC::DFG::Graph::clobbersWorld):
        * dfg/DFGNode.h:
        (JSC::DFG::Node::hasArrayMode):
        (Node):
        (JSC::DFG::Node::arrayMode):
        (JSC::DFG::Node::setArrayMode):
        * dfg/DFGNodeType.h:
        (DFG):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::typedArrayDescriptor):
        (DFG):
        (JSC::DFG::SpeculativeJIT::speculateArray):
        (JSC::DFG::SpeculativeJIT::compileGetByValOnString):
        (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:
        (SpeculativeJIT):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):

2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2012-08-22  Geoffrey Garen  <ggaren@apple.com>

        ThreadRestrictionVerifier should be opt-in, not opt-out
        https://bugs.webkit.org/show_bug.cgi?id=94761

        Reviewed by Mark Hahnenberg.

        Removed explicit calls to disable the verifier, since it's off by default now.

        * parser/SourceProvider.h:
        (JSC::SourceProvider::SourceProvider):
        (SourceProvider):
        * runtime/SymbolTable.h:
        (JSC::SharedSymbolTable::SharedSymbolTable):

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

        Separate MarkStackThreadSharedData from MarkStack
        https://bugs.webkit.org/show_bug.cgi?id=94294

        Reviewed by Filip Pizlo.

        MarkStackThreadSharedData is soon going to have data to allow for a parallel copying 
        mode too, so to separate our concerns we should split it out into its own set of files 
        and rename it to GCThreadSharedData. For now this is purely a cosmetic refactoring.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * heap/GCThreadSharedData.cpp: Added.
        (JSC):
        (JSC::GCThreadSharedData::resetChildren):
        (JSC::GCThreadSharedData::childVisitCount):
        (JSC::GCThreadSharedData::markingThreadMain):
        (JSC::GCThreadSharedData::markingThreadStartFunc):
        (JSC::GCThreadSharedData::GCThreadSharedData):
        (JSC::GCThreadSharedData::~GCThreadSharedData):
        (JSC::GCThreadSharedData::reset):
        * heap/GCThreadSharedData.h: Added.
        (JSC):
        (GCThreadSharedData):
        * heap/Heap.h:
        (Heap):
        * heap/ListableHandler.h:
        (ListableHandler):
        * heap/MarkStack.cpp:
        (JSC::MarkStack::MarkStack):
        (JSC::MarkStack::~MarkStack):
        * heap/MarkStack.h:
        (JSC):
        (MarkStack):
        (JSC::MarkStack::sharedData):
        * heap/MarkStackInlineMethods.h: Added.
        (JSC):
        (JSC::MarkStack::append):
        (JSC::MarkStack::appendUnbarrieredPointer):
        (JSC::MarkStack::appendUnbarrieredValue):
        (JSC::MarkStack::internalAppend):
        (JSC::MarkStack::addWeakReferenceHarvester):
        (JSC::MarkStack::addUnconditionalFinalizer):
        (JSC::MarkStack::addOpaqueRoot):
        (JSC::MarkStack::containsOpaqueRoot):
        (JSC::MarkStack::opaqueRootCount):
        * heap/SlotVisitor.h:
        (JSC):
        (SlotVisitor):
        (JSC::SlotVisitor::SlotVisitor):

2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2012-08-22  Gabor Ballabas  <gaborb@inf.u-szeged.hu>

        Fix JSC build when DFG-JIT is disabled
        https://bugs.webkit.org/show_bug.cgi?id=94694

        Reviewed by Csaba Osztrogonác.

        Adding an appropriate guard for fixing the build.

        * bytecode/ResolveGlobalStatus.cpp:
        (JSC):

2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2012-08-21  Mark Lam  <mark.lam@apple.com>

        Introducing the VMInspector for VM debugging use.
        https://bugs.webkit.org/show_bug.cgi?id=94613.

        Reviewed by Filip Pizlo.

        Adding some utility functions for debugging the VM. This code is
        presently #ifdef'd out by default.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * interpreter/CallFrame.h:
        (ExecState):
        * interpreter/VMInspector.cpp: Added.
        (JSC):
        (JSC::VMInspector::getTypeName):
        (JSC::VMInspector::dumpFrame0):
        (JSC::VMInspector::dumpFrame):
        (JSC::VMInspector::countFrames):
        * interpreter/VMInspector.h: Added.
        (JSC):
        (VMInspector):

2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2012-08-21  Filip Pizlo  <fpizlo@apple.com>

        A patchable GetById right after a watchpoint should have the appropriate nop padding
        https://bugs.webkit.org/show_bug.cgi?id=94635

        Reviewed by Mark Hahnenberg.

        * assembler/AbstractMacroAssembler.h:
        (JSC::AbstractMacroAssembler::padBeforePatch):
        (AbstractMacroAssembler):
        * assembler/MacroAssemblerARMv7.h:
        (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
        (JSC::MacroAssemblerARMv7::moveWithPatch):
        (JSC::MacroAssemblerARMv7::patchableJump):
        * assembler/MacroAssemblerX86.h:
        (JSC::MacroAssemblerX86::moveWithPatch):
        (JSC::MacroAssemblerX86::branchPtrWithPatch):
        (JSC::MacroAssemblerX86::storePtrWithPatch):
        * assembler/MacroAssemblerX86Common.h:
        (JSC::MacroAssemblerX86Common::load32WithAddressOffsetPatch):
        (JSC::MacroAssemblerX86Common::load32WithCompactAddressOffsetPatch):
        (JSC::MacroAssemblerX86Common::loadCompactWithAddressOffsetPatch):
        (JSC::MacroAssemblerX86Common::store32WithAddressOffsetPatch):
        * assembler/MacroAssemblerX86_64.h:
        (JSC::MacroAssemblerX86_64::loadPtrWithAddressOffsetPatch):
        (JSC::MacroAssemblerX86_64::loadPtrWithCompactAddressOffsetPatch):
        (JSC::MacroAssemblerX86_64::storePtrWithAddressOffsetPatch):
        (JSC::MacroAssemblerX86_64::moveWithPatch):
        * jit/JumpReplacementWatchpoint.cpp:
        (JSC::JumpReplacementWatchpoint::fireInternal):

2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2012-08-20  Mark Lam  <mark.lam@apple.com>

        Fix broken non-JIT build.
        https://bugs.webkit.org/show_bug.cgi?id=94564.

        Reviewed by Filip Pizlo.

        Added some UNUSED_PARAM() macros to make the compiler happy.

        * runtime/Executable.cpp:
        (JSC::EvalExecutable::compileInternal):
        (JSC::ProgramExecutable::compileInternal):
        (JSC::FunctionExecutable::compileForCallInternal):
        (JSC::FunctionExecutable::compileForConstructInternal):

2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2012-08-20  Mark Lam  <mark.lam@apple.com>

        Fixed erroneous line number for LLint frame when throwing exceptions.
        https://bugs.webkit.org/show_bug.cgi?id=94051.

        Reviewed by Filip Pizlo.

        For LLInt frames, before throwing an exception, adjust the PC from the
        return PC back to the call PC if we are indeed at a call site.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::adjustPCIfAtCallSite):
        (JSC):
        (JSC::CodeBlock::bytecodeOffset):
        * bytecode/CodeBlock.h:
        (CodeBlock):
        * llint/LLIntExceptions.cpp:
        (JSC::LLInt::fixupPCforExceptionIfNeeded):
        (LLInt):
        (JSC::LLInt::interpreterThrowInCaller):
        (JSC::LLInt::returnToThrow):
        (JSC::LLInt::callToThrow):

2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2012-08-20  Filip Pizlo  <fpizlo@apple.com>

        fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object.html on 32-bit
        https://bugs.webkit.org/show_bug.cgi?id=94538

        Reviewed by Mark Hahnenberg.

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

2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2012-08-20  Filip Pizlo  <fpizlo@apple.com>

        fast/js/dfg-compare-final-object-to-final-object-or-other-when-both-proven-final-object.html crashes on 32-bit
        https://bugs.webkit.org/show_bug.cgi?id=94026

        Reviewed by Mark Hahnenberg.

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

2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2012-08-19  Filip Pizlo  <fpizlo@apple.com>

        The relationship between abstract values and structure transition watchpoints should be rationalized
        https://bugs.webkit.org/show_bug.cgi?id=94205

        Reviewed by Geoffrey Garen.

        This patch does a number of things related to the handling of the abstract values
        arrising from values with structures known to be watchpointable:
        
        - This rationalizes the relationship between the structure that we know an object
          to have *right now* based on having executed a check against that structure, and
          the structure that we know the object could have *in the future* based on a type
          check executed in the past over a structure that was watchpointable.
        
        - We use the above to assert that structure transition watchpoints are being used
          soundly.
        
        - We use the above to strength reduce CheckStructure into StructureTransitionWatchpoint
          whenever possible.
        
        - This rationalizes the handling of CFA over constants that appeared in the bytecode.
          If at compile-time the constant has a watchpointable structure, then we can prove
          what structures it may have in the future. The analysis uses this to both assert
          that structure transition watchpoints are being used correctly, and to find
          opportunities for using them more aggressively.
        
        The net effect of all of these changes is that OSR entry should work more smoothly.
        It may also be a slight win due to strength reductions, though most of those strength
        reductions would have already been done by the parser and the structure check hoister.

        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::beginBasicBlock):
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGAbstractValue.h:
        (DFG):
        (JSC::DFG::AbstractValue::clear):
        (JSC::DFG::AbstractValue::isClear):
        (JSC::DFG::AbstractValue::makeTop):
        (JSC::DFG::AbstractValue::clobberStructures):
        (JSC::DFG::AbstractValue::isTop):
        (JSC::DFG::AbstractValue::setFuturePossibleStructure):
        (AbstractValue):
        (JSC::DFG::AbstractValue::filterFuturePossibleStructure):
        (JSC::DFG::AbstractValue::setMostSpecific):
        (JSC::DFG::AbstractValue::set):
        (JSC::DFG::AbstractValue::operator==):
        (JSC::DFG::AbstractValue::merge):
        (JSC::DFG::AbstractValue::filter):
        (JSC::DFG::AbstractValue::filterValueByType):
        (JSC::DFG::AbstractValue::validateType):
        (JSC::DFG::AbstractValue::validate):
        (JSC::DFG::AbstractValue::checkConsistency):
        (JSC::DFG::AbstractValue::dump):
        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::checkStructureLoadElimination):
        (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
        (JSC::DFG::CSEPhase::performNodeCSE):
        * dfg/DFGConstantFoldingPhase.cpp:
        (JSC::DFG::ConstantFoldingPhase::foldConstants):
        * dfg/DFGNode.h:
        (JSC::DFG::Node::convertToStructureTransitionWatchpoint):
        (Node):
        (JSC::DFG::Node::hasStructure):
        * dfg/DFGNodeType.h:
        (DFG):
        * dfg/DFGOSREntry.cpp:
        (JSC::DFG::prepareOSREntry):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
        (JSC::DFG::SpeculativeJIT::forwardSpeculationWatchpoint):
        (DFG):
        (JSC::DFG::SpeculativeJIT::speculationWatchpointWithConditionalDirection):
        (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
        (JSC::DFG::SpeculativeJIT::speculateArray):
        * dfg/DFGSpeculativeJIT.h:
        (SpeculativeJIT):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGStructureAbstractValue.h: Added.
        (DFG):
        (StructureAbstractValue):
        (JSC::DFG::StructureAbstractValue::StructureAbstractValue):
        (JSC::DFG::StructureAbstractValue::clear):
        (JSC::DFG::StructureAbstractValue::makeTop):
        (JSC::DFG::StructureAbstractValue::top):
        (JSC::DFG::StructureAbstractValue::add):
        (JSC::DFG::StructureAbstractValue::addAll):
        (JSC::DFG::StructureAbstractValue::contains):
        (JSC::DFG::StructureAbstractValue::isSubsetOf):
        (JSC::DFG::StructureAbstractValue::doesNotContainAnyOtherThan):
        (JSC::DFG::StructureAbstractValue::isSupersetOf):
        (JSC::DFG::StructureAbstractValue::filter):
        (JSC::DFG::StructureAbstractValue::isClear):
        (JSC::DFG::StructureAbstractValue::isTop):
        (JSC::DFG::StructureAbstractValue::isClearOrTop):
        (JSC::DFG::StructureAbstractValue::isNeitherClearNorTop):
        (JSC::DFG::StructureAbstractValue::size):
        (JSC::DFG::StructureAbstractValue::at):
        (JSC::DFG::StructureAbstractValue::operator[]):
        (JSC::DFG::StructureAbstractValue::last):
        (JSC::DFG::StructureAbstractValue::speculationFromStructures):
        (JSC::DFG::StructureAbstractValue::hasSingleton):
        (JSC::DFG::StructureAbstractValue::singleton):
        (JSC::DFG::StructureAbstractValue::operator==):
        (JSC::DFG::StructureAbstractValue::dump):
        (JSC::DFG::StructureAbstractValue::topValue):
        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):

2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2012-08-17  Filip Pizlo  <fpizlo@apple.com>

        The current state of the call frame should be taken into account in the DFG for both predictions and proofs
        https://bugs.webkit.org/show_bug.cgi?id=94412

        Reviewed by Geoffrey Garen.

        This ensures that no matter how smart the DFG gets, it'll always know through
        which entrypoint OSR will try to enter, and with which values it will attempt
        to do so. For prologue OSR, this has no effect other than adding the current
        arguments to the argument predictions. For loop OSR, this makes our treatment
        of the loop slightly more conservative - just conservative enough to ensure
        that OSR succeeds.

        * bytecode/CodeBlock.cpp:
        (JSC::ProgramCodeBlock::compileOptimized):
        (JSC::EvalCodeBlock::compileOptimized):
        (JSC::FunctionCodeBlock::compileOptimized):
        * bytecode/CodeBlock.h:
        (CodeBlock):
        (ProgramCodeBlock):
        (EvalCodeBlock):
        (FunctionCodeBlock):
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::initialize):
        * dfg/DFGAbstractValue.h:
        (JSC::DFG::AbstractValue::setMostSpecific):
        (AbstractValue):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::fixVariableAccessPredictions):
        (JSC::DFG::ByteCodeParser::parse):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        (JSC::DFG::tryCompile):
        (JSC::DFG::tryCompileFunction):
        * dfg/DFGDriver.h:
        (DFG):
        (JSC::DFG::tryCompile):
        (JSC::DFG::tryCompileFunction):
        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::Graph):
        (Graph):
        * jit/JITDriver.h:
        (JSC::jitCompileIfAppropriate):
        (JSC::jitCompileFunctionIfAppropriate):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * runtime/Executable.cpp:
        (JSC::EvalExecutable::compileOptimized):
        (JSC::EvalExecutable::compileInternal):
        (JSC::ProgramExecutable::compileOptimized):
        (JSC::ProgramExecutable::compileInternal):
        (JSC::FunctionExecutable::compileOptimizedForCall):
        (JSC::FunctionExecutable::compileOptimizedForConstruct):
        (JSC::FunctionExecutable::compileForCallInternal):
        (JSC::FunctionExecutable::compileForConstructInternal):
        * runtime/Executable.h:
        (EvalExecutable):
        (ProgramExecutable):
        (FunctionExecutable):
        (JSC::FunctionExecutable::compileOptimizedFor):
        * runtime/ExecutionHarness.h:
        (JSC::prepareForExecution):
        (JSC::prepareFunctionForExecution):

2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2012-08-17  Filip Pizlo  <fpizlo@apple.com>

        DFG CSE should be more honest about when it changed the IR
        https://bugs.webkit.org/show_bug.cgi?id=94408

        Reviewed by Geoffrey Garen.

        The CSE phase now always returns true if it changed the IR.

        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::setReplacement):
        (JSC::DFG::CSEPhase::eliminate):
        (JSC::DFG::CSEPhase::performNodeCSE):

2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2012-08-17  Filip Pizlo  <fpizlo@apple.com>

        DFG is still too pessimistic about what constitutes a side-effect on array accesses
        https://bugs.webkit.org/show_bug.cgi?id=94309

        Reviewed by Geoffrey Garen.

        This change means that even if structure transition watchpoints are not used for
        hoisting of clobbered structure checks, we still retain good performance on the
        benchmarks we care about. That's important, since butterflies will likely make
        most array structures not watchpointable.

        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):

2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2012-08-17  Milian Wolff  <milian.wolff@kdab.com>

        [Qt] QNX build fails due to ctype usage in system headers
        https://bugs.webkit.org/show_bug.cgi?id=93849

        Reviewed by Simon Hausmann.

        Move the check for whether DisallowCType should be active or not
        to the DisallowCType.h header. This way, we can update the list
        of platforms or OSes which do not work with this header in a
        central place. All users can now safely include the header
        and do not need to place custom guards around it.

        * config.h:

2883
2884
2885
2886
2887
2888
2889
2890
2891
2012-08-16  Simon Hausmann  <simon.hausmann@nokia.com>

        [Qt] Replace use of internal Weak smart pointer with JSWeakObjectMap
        https://bugs.webkit.org/show_bug.cgi?id=93872

        Reviewed by Kenneth Rohde Christiansen.

        * Target.pri: Add missing JSWeakObjectMap file to build.

2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2012-08-16  Filip Pizlo  <fpizlo@apple.com>

        Structure check hoisting should be less expensive
        https://bugs.webkit.org/show_bug.cgi?id=94201

        Reviewed by Mark Hahnenberg.

        This appears like a broad win on short-running programs.

        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::performNodeCSE):
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::compareAndSwap):
        (Graph):
        (JSC::DFG::Graph::substitute):
        (JSC::DFG::Graph::substituteGetLocal):
        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):

2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2012-08-16  Filip Pizlo  <fpizlo@apple.com>

        All op_resolve_global instructions should end up in the list of global resolve instructions
        https://bugs.webkit.org/show_bug.cgi?id=94247
        <rdar://problem/12103500>

        Reviewed by Mark Hahnenberg.

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::emitResolveWithBase):

2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2012-08-15  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>

        [css3-text] Add CSS3 Text decoration compile flag
        https://bugs.webkit.org/show_bug.cgi?id=93863

        Reviewed by Julien Chaffraix.

        This patch handles the compile flag implementation, which will come disabled by
        default, thus not exposing the CSS3 text decoration features to the web, unless
        when explicitly enabling it with "--css3-text-decoration" build parameter.

        * Configurations/FeatureDefines.xcconfig:

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
2012-08-15  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r125687.
        http://trac.webkit.org/changeset/125687
        https://bugs.webkit.org/show_bug.cgi?id=94147

        It broke the whole world (Requested by Ossy_night on #webkit).

        * API/JSValueRef.cpp:
        (JSValueToBoolean):
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * bytecode/Watchpoint.h:
        (WatchpointSet):
        * debugger/DebuggerCallFrame.h:
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGCFGSimplificationPhase.cpp:
        (JSC::DFG::CFGSimplificationPhase::run):
        * dfg/DFGOperations.cpp:
        * dfg/DFGOperations.h:
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
        (JSC::DFG::SpeculativeJIT::compile):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_is_undefined):
        (JSC::JIT::emit_op_jeq_null):
        (JSC::JIT::emit_op_jneq_null):
        (JSC::JIT::emit_op_eq_null):
        (JSC::JIT::emit_op_neq_null):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::emit_op_is_undefined):
        (JSC::JIT::emit_op_jeq_null):
        (JSC::JIT::emit_op_jneq_null):
        (JSC::JIT::emit_op_eq_null):
        (JSC::JIT::emit_op_neq_null):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncFilter):
        (JSC::arrayProtoFuncEvery):
        (JSC::arrayProtoFuncSome):
        * runtime/BooleanConstructor.cpp:
        (JSC::constructBoolean):
        (JSC::callBooleanConstructor):
        * runtime/JSCell.h:
        (JSCell):
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::JSGlobalObject):
        * runtime/JSGlobalObject.h:
        (JSGlobalObject):
        * runtime/JSString.h:
        (JSC::JSCell::toBoolean):
        (JSC::JSValue::toBoolean):
        * runtime/JSValue.h:
        * runtime/ObjectConstructor.cpp:
        (JSC::toPropertyDescriptor):
        * runtime/Operations.cpp:
        (JSC::jsTypeStringForValue):
        (JSC::jsIsObjectType):
        * runtime/Operations.h:
        (JSC):
        (JSC::JSValue::equalSlowCaseInline):
        * runtime/RegExpConstructor.cpp:
        (JSC::setRegExpConstructorMultiline):
        * runtime/RegExpPrototype.cpp:
        (JSC::regExpProtoFuncToString):
        * runtime/Structure.h:

3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
2012-08-15  Gabor Ballabas  <gaborb@inf.u-szeged.hu>

        Buildfix after r125541
        https://bugs.webkit.org/show_bug.cgi?id=94097

        Reviewed by Filip Pizlo.

        r125541 has broken the traditional ARM port build of JSC.

        * assembler/MacroAssemblerARM.h:
        (JSC::MacroAssemblerARM::neg32):
        (JSC::MacroAssemblerARM::xor32):

3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
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
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
2012-08-14  Mark Hahnenberg  <mhahnenberg@apple.com>

        Change behavior of MasqueradesAsUndefined to better accommodate DFG changes
        https://bugs.webkit.org/show_bug.cgi?id=93884

        Reviewed by Geoffrey Garen.

        With some upcoming changes to the DFG to remove uses of ClassInfo, we will be changing the behavior of 
        MasqueradesAsUndefined. In order to make this change consistent across all of our execution engines, 
        we will make this change to MasqueradesAsUndefined as a separate patch. After this patch, MasqueradesAsUndefined 
        objects will only masquerade as undefined in their original context (i.e. their original JSGlobalObject). 
        For example, if an object that masquerades as undefined in frame A is passed to frame B, it will not 
        masquerade as undefined within frame B, but it will continue to masquerade in frame A.

        There are two primary changes that are taking place here. One is to thread the ExecState* through 
        JSValue::toBoolean and JSCell::toBoolean so that JSCell::toBoolean can check the object's 
        JSGlobalObject to compare it to the lexical JSGlobalObject of the currently running code. If the two 
        are distinct, then the object cannot MasqueradeAsUndefined.

        The other change is to perform this comparison of JSGlobalObjects everywhere where the MasqueradesAsUndefined
        flag in the Structure is checked. For C++ code, this check has been factored into its own function in 
        Structure::masqueradesAsUndefined. We only perform this check in the DFG if the current JSGlobalObject has 
        had a MasqueradesAsUndefined object allocated within its context. This conditional compilation is managed 
        through the use of a WatchpointSet in each JSGlobalObject and alternate create() functions for JS DOM wrappers
        that are MasqueradesAsUndefined.

        * API/JSValueRef.cpp:
        (JSValueToBoolean):
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * bytecode/Watchpoint.h:
        (WatchpointSet):
        * debugger/DebuggerCallFrame.h:
        (JSC::DebuggerCallFrame::callFrame):
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGCFGSimplificationPhase.cpp:
        (JSC::DFG::CFGSimplificationPhase::run):
        * dfg/DFGOperations.cpp:
        * dfg/DFGOperations.h:
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
        (JSC::DFG::SpeculativeJIT::compile):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_is_undefined):
        (JSC::JIT::emit_op_jeq_null):
        (JSC::JIT::emit_op_jneq_null):
        (JSC::JIT::emit_op_eq_null):
        (JSC::JIT::emit_op_neq_null):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::emit_op_is_undefined):
        (JSC::JIT::emit_op_jeq_null):
        (JSC::JIT::emit_op_jneq_null):
        (JSC::JIT::emit_op_eq_null):
        (JSC::JIT::emit_op_neq_null):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncFilter):
        (JSC::arrayProtoFuncEvery):
        (JSC::arrayProtoFuncSome):
        * runtime/BooleanConstructor.cpp:
        (JSC::constructBoolean):
        (JSC::callBooleanConstructor):
        * runtime/JSCell.h:
        (JSCell):
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::JSGlobalObject):
        * runtime/JSGlobalObject.h:
        (JSGlobalObject):
        (JSC::JSGlobalObject::masqueradesAsUndefinedWatchpoint):
        * runtime/JSString.h:
        (JSC::JSCell::toBoolean):
        (JSC::JSValue::toBoolean):
        * runtime/JSValue.h:
        * runtime/ObjectConstructor.cpp:
        (JSC::toPropertyDescriptor):
        * runtime/Operations.cpp:
        (JSC::jsTypeStringForValue):
        (JSC::jsIsObjectType):
        * runtime/Operations.h:
        (JSC):
        (JSC::JSValue::equalSlowCaseInline):
        * runtime/RegExpConstructor.cpp:
        (JSC::setRegExpConstructorMultiline):
        * runtime/RegExpPrototype.cpp:
        (JSC::regExpProtoFuncToString):
        * runtime/Structure.h:
        (Structure):
        (JSC::Structure::globalObjectOffset):
        (JSC::Structure::masqueradesAsUndefined):
        (JSC):

3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
2012-08-14  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, build fix for !ENABLE(DFG_JIT)

        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::emit_op_get_by_val):
        (JSC::JIT::emit_op_put_by_val):
        (JSC::JIT::privateCompilePatchGetArrayLength):
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::emit_op_get_by_val):
        (JSC::JIT::emit_op_put_by_val):
        (JSC::JIT::privateCompilePatchGetArrayLength):
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:

3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
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
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
2012-08-13  Filip Pizlo  <fpizlo@apple.com>

        Array checks should use the structure, not the class info
        https://bugs.webkit.org/show_bug.cgi?id=93150

        Reviewed by Mark Hahnenberg.

        This changes all array checks used in array accesses (get, put, get length,
        push, pop) to use the structure, not the class info. Additionally, these
        checks in the LLInt and baseline JIT record the structure in an ArrayProfile,
        so that the DFG can know exactly what structure to check for.
        
        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * bytecode/ArrayProfile.cpp: Added.
        (JSC):
        (JSC::ArrayProfile::computeUpdatedPrediction):
        * bytecode/ArrayProfile.h: Added.
        (JSC):
        (JSC::arrayModeFromStructure):
        (ArrayProfile):
        (JSC::ArrayProfile::ArrayProfile):
        (JSC::ArrayProfile::bytecodeOffset):
        (JSC::ArrayProfile::addressOfLastSeenStructure):
        (JSC::ArrayProfile::observeStructure):
        (JSC::ArrayProfile::expectedStructure):
        (JSC::ArrayProfile::structureIsPolymorphic):
        (JSC::ArrayProfile::hasDefiniteStructure):
        (JSC::ArrayProfile::observedArrayModes):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        (JSC::CodeBlock::getArrayProfile):
        (JSC):
        (JSC::CodeBlock::getOrAddArrayProfile):
        (JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::executionEntryCount):
        (JSC::CodeBlock::numberOfArrayProfiles):
        (JSC::CodeBlock::arrayProfiles):
        (JSC::CodeBlock::addArrayProfile):
        (CodeBlock):
        * bytecode/Instruction.h:
        (JSC):
        (JSC::Instruction::Instruction):
        * bytecode/Opcode.h:
        (JSC):
        (JSC::padOpcodeName):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::emitGetArgumentByVal):
        (JSC::BytecodeGenerator::emitGetByVal):
        (JSC::BytecodeGenerator::emitPutByVal):
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::initialize):
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGAbstractValue.h:
        (JSC::DFG::StructureAbstractValue::hasSingleton):
        (StructureAbstractValue):
        (JSC::DFG::StructureAbstractValue::singleton):
        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::speculateArray):
        (DFG):
        (JSC::DFG::SpeculativeJIT::compile):
        (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
        (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
        * dfg/DFGSpeculativeJIT.h:
        (SpeculativeJIT):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGStructureCheckHoistingPhase.cpp:
        (JSC::DFG::StructureCheckHoistingPhase::run):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::emit_op_get_by_val):
        (JSC::JIT::emit_op_put_by_val):
        (JSC::JIT::privateCompilePatchGetArrayLength):
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::emit_op_get_by_val):
        (JSC::JIT::emit_op_put_by_val):
        (JSC::JIT::privateCompilePatchGetArrayLength):
        * llint/LLIntOffsetsExtractor.cpp:
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * runtime/Structure.h:
        (Structure):
        (JSC::Structure::classInfoOffset):

3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266