ChangeLog 990 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2010-05-20  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Removed some reliance on callFame[CodeBlock] by storing CodeBlock in a
        local variable in the Interpreter.
        https://bugs.webkit.org/show_bug.cgi?id=39447

        Small speedup on SunSpider in Interpreter mode.

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jsc.cpp:
        * wtf/Platform.h:

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
2010-05-19  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Oliver Hunt.

        Bug 39408 - Unify JIT/interpreter return behaviour.

        Presently the JIT and the interpreter have differing implementations in how
        they handle storing the result of a function call back to the register file.
        In both cases the op_call ( / _eval / _varargs / op_construct) opcode has an
        operand indicating the VM register in which the result should be stored.
        The JIT plants code after the call to store the result, so the value will be
        stored as soon as the callee has returned.  In the interpreter the call
        passes the return value register id into the callee via the callee callframe,
        and the callee is responsible for writing the result back into its callers
        register file after it has restored the parents callframe pointer, but before
        returning.

        Instead, move the task of writing the call result to the register file into a
        new opcode (op_call_put_result), and after returning the callee should leave
        the return value in a canonical location.  In the case of the interpreter,
        this canonical location is a local variable in privateExecute
        (functionReturnValue), in the case of the JIT this is the normal return value
        registers (regT0, or regT1:regT0 in JSVALUE32_64).  op_call_put_result stores
        the result from the canonical location to the registerfile.

        In addition to unifying JIT & interpreter behaviour this change allows us to
        remove a slot from the callframe, omit the write of the result where the
        return value from the call is not used, and provides a 2% speedup on sunspider
        in the interpreter.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        * bytecode/Opcode.h:
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::emitCall):
        (JSC::BytecodeGenerator::emitCallVarargs):
        (JSC::BytecodeGenerator::emitConstruct):
        * bytecompiler/BytecodeGenerator.h:
        (JSC::BytecodeGenerator::finalDestinationOrIgnored):
        * bytecompiler/NodesCodegen.cpp:
        (JSC::NewExprNode::emitBytecode):
        (JSC::FunctionCallValueNode::emitBytecode):
        (JSC::FunctionCallResolveNode::emitBytecode):
        (JSC::FunctionCallBracketNode::emitBytecode):
        (JSC::FunctionCallDotNode::emitBytecode):
        (JSC::CallFunctionCallDotNode::emitBytecode):
        (JSC::ApplyFunctionCallDotNode::emitBytecode):
        * interpreter/CallFrame.h:
        (JSC::ExecState::init):
        (JSC::ExecState::noCaller):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::dumpRegisters):
        (JSC::Interpreter::throwException):
        (JSC::Interpreter::privateExecute):
        * interpreter/RegisterFile.h:
        (JSC::RegisterFile::):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        * jit/JIT.h:
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCallSetupArgs):
        (JSC::JIT::compileOpConstructSetupArgs):
        (JSC::JIT::emit_op_call_put_result):
        (JSC::JIT::compileOpCallVarargs):
        (JSC::JIT::compileOpCallVarargsSlowCase):
        (JSC::JIT::compileOpCall):
        (JSC::JIT::compileOpCallSlowCase):
        (JSC::JIT::compileOpCallVarargsSetupArgs):

85
86
87
88
89
90
91
92
93
94
95
2010-05-20  Steve Block  <steveblock@google.com>

        Reviewed by Jeremy Orlow.

        Provide bindings for DeviceOrientation
        https://bugs.webkit.org/show_bug.cgi?id=39210

        Adds ENABLE_DEVICE_ORIENTATION to XCode project file, always disabled.

        * Configurations/FeatureDefines.xcconfig:

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
2010-05-19  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Geoff Garen.

        Errk! rename op_constructor_ret as requested in review of Bug 39399.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        * bytecode/Opcode.h:
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::emitReturn):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        * jit/JIT.h:
        * jit/JITCall.cpp:
        (JSC::JIT::emit_op_ret_object_or_this):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_ret_object_or_this):

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
2010-05-19  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Geoff Garen.

        Bug 39399 - Move responsibility for verifying constructors return objects from the caller to the callee.
        
        This is a necessary step to move object creation from caller to callee.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        * bytecode/Opcode.h:
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::BytecodeGenerator):
        (JSC::BytecodeGenerator::emitReturn):
        (JSC::BytecodeGenerator::emitConstruct):
        * bytecompiler/BytecodeGenerator.h:
        (JSC::BytecodeGenerator::isConstructor):
        * bytecompiler/NodesCodegen.cpp:
        (JSC::FunctionBodyNode::emitBytecode):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompileSlowCases):
        * jit/JIT.h:
        * jit/JITCall.cpp:
        (JSC::JIT::emit_op_constructor_ret):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_constructor_ret):

barraclough@apple.com's avatar
barraclough@apple.com committed
147
148
149
150
151
152
153
154
2010-05-19  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by NOBODY (build fix).

        Fix windows build II.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

barraclough@apple.com's avatar
barraclough@apple.com committed
155
156
157
158
159
160
161
162
2010-05-19  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by NOBODY (build fix).

        Fix windows build.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
2010-05-19  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Oliver Hunt.

        Bug 39393 - JSFunction need not be a subclass of InternalFunction.

        re-landing r59800.

        * JavaScriptCore.exp:
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::retrieveCaller):
        (JSC::Interpreter::findFunctionCallFrame):
        * interpreter/Interpreter.h:
        * profiler/Profiler.cpp:
        (JSC::Profiler::createCallIdentifier):
        * runtime/FunctionPrototype.cpp:
        (JSC::functionProtoFuncToString):
        * runtime/JSFunction.cpp:
        (JSC::):
        (JSC::JSFunction::JSFunction):
        (JSC::JSFunction::name):
        (JSC::JSFunction::displayName):
        (JSC::JSFunction::calculatedDisplayName):
        * runtime/JSFunction.h:
        * runtime/JSObject.cpp:
        (JSC::JSObject::putDirectFunction):
        (JSC::JSObject::putDirectFunctionWithoutTransition):
        * runtime/JSObject.h:
        * runtime/Lookup.cpp:
        (JSC::setUpStaticFunctionSlot):

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
2010-05-19  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by NOBODY (build fix).

        Reverting r59800, this b0rked stuff.

        * JavaScriptCore.exp:
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::retrieveCaller):
        (JSC::Interpreter::findFunctionCallFrame):
        * interpreter/Interpreter.h:
        * profiler/Profiler.cpp:
        (JSC::Profiler::createCallIdentifier):
        * runtime/FunctionPrototype.cpp:
        (JSC::functionProtoFuncToString):
        * runtime/JSFunction.cpp:
        (JSC::):
        (JSC::JSFunction::JSFunction):
        * runtime/JSFunction.h:
        * runtime/JSObject.cpp:
        * runtime/JSObject.h:
        * runtime/Lookup.cpp:
        (JSC::setUpStaticFunctionSlot):

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
2010-05-19  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Oliver Hunt.

        Bug 39393 - JSFunction need not be a subclass of InternalFunction.

        This may prevent us from introducing a more useful parent class to
        JSFunction, e.g. a JSObject that holds an executable, which could
        also reference an eval or program executable.

        * JavaScriptCore.exp:
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::retrieveCaller):
        (JSC::Interpreter::findFunctionCallFrame):
        * interpreter/Interpreter.h:
        * profiler/Profiler.cpp:
        (JSC::Profiler::createCallIdentifier):
        * runtime/FunctionPrototype.cpp:
        (JSC::functionProtoFuncToString):
        * runtime/JSFunction.cpp:
        (JSC::):
        (JSC::JSFunction::JSFunction):
        (JSC::JSFunction::name):
        (JSC::JSFunction::displayName):
        (JSC::JSFunction::calculatedDisplayName):
        * runtime/JSFunction.h:
        * runtime/JSObject.cpp:
        (JSC::JSObject::putDirectFunction):
        (JSC::JSObject::putDirectFunctionWithoutTransition):
        * runtime/JSObject.h:
        * runtime/Lookup.cpp:
        (JSC::setUpStaticFunctionSlot):

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
2010-05-19  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoffrey Garen.

        emitJumpIfNotJSCell should special case constant immediate values
        https://bugs.webkit.org/show_bug.cgi?id=39392
        <rdar://problem/8001324>

        Make emitJumpSlowCaseIfNotJSCell special case constant immediate
        values, in addition to the immediate JSCell optimisation.

        Also add assertions to make sure no one else produces code that
        attempts to load constants from the register file.

        * jit/JITInlineMethods.h:
        (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
        * jit/JSInterfaceJIT.h:
        (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
        (JSC::JSInterfaceJIT::emitLoadInt32):
        (JSC::JSInterfaceJIT::tagFor):
        (JSC::JSInterfaceJIT::payloadFor):
        (JSC::JSInterfaceJIT::emitLoadDouble):
        (JSC::JSInterfaceJIT::addressFor):
        * jit/ThunkGenerators.cpp:

276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
2010-05-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Slight refactoring to CodeBlock bytecode access
        https://bugs.webkit.org/show_bug.cgi?id=39384

        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::bytecodeOffset):
        * interpreter/CallFrame.h:
        (JSC::ExecState::returnPC):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::unwindCallFrame):
        (JSC::Interpreter::retrieveLastCaller): Moved bytecode access into a
        CodeBlock helper function. Changed CallFrame to accurately represent
        how the returnPC is stored in JIT vs Interpreter.

293
294
295
296
297
298
299
300
301
302
303
304
305
306
2010-05-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Don't build the Interpreter into JIT builds.
        https://bugs.webkit.org/show_bug.cgi?id=39373

        SunSpider says no change.

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * interpreter/Interpreter.h:
        * wtf/Platform.h:

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
2010-05-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Gavin Barraclough.
        
        Standardized naming: "bytecode offset" wins; "bytecode index" loses.
        
        Also renamed getBytecodeOffset to bytecodeOffset, to match the WebKit
        naming style.

        * bytecode/CodeBlock.h:
        (JSC::CallReturnOffsetToBytecodeOffset::CallReturnOffsetToBytecodeOffset):
        (JSC::getCallReturnOffset):
        (JSC::CodeBlock::bytecodeOffset):
        (JSC::CodeBlock::callReturnIndexVector):
        * interpreter/Interpreter.cpp:
        (JSC::bytecodeOffsetForPC):
        * jit/JIT.cpp:
        (JSC::JIT::JIT):
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompileLinkPass):
        (JSC::JIT::privateCompileSlowCases):
        (JSC::JIT::privateCompile):
        * jit/JIT.h:
        (JSC::CallRecord::CallRecord):
        (JSC::JumpTable::JumpTable):
        (JSC::SwitchRecord::SwitchRecord):
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCallVarargsSlowCase):
        (JSC::JIT::compileOpCall):
        * jit/JITInlineMethods.h:
        (JSC::JIT::emitNakedCall):
        (JSC::JIT::addSlowCase):
        (JSC::JIT::addJump):
        (JSC::JIT::emitJumpSlowToHot):
        (JSC::JIT::isLabeled):
        (JSC::JIT::map):
        (JSC::JIT::unmap):
        (JSC::JIT::isMapped):
        (JSC::JIT::getMappedPayload):
        (JSC::JIT::getMappedTag):
        (JSC::JIT::emitGetVirtualRegister):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_switch_imm):
        (JSC::JIT::emit_op_switch_char):
        (JSC::JIT::emit_op_switch_string):
        (JSC::JIT::emit_op_new_error):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::emit_op_mov):
        (JSC::JIT::emit_op_get_global_var):
        (JSC::JIT::emit_op_put_global_var):
        (JSC::JIT::emit_op_get_scoped_var):
        (JSC::JIT::emit_op_put_scoped_var):
        (JSC::JIT::emit_op_to_primitive):
        (JSC::JIT::emit_op_resolve_global):
        (JSC::JIT::emit_op_to_jsnumber):
        (JSC::JIT::emit_op_catch):
        (JSC::JIT::emit_op_switch_imm):
        (JSC::JIT::emit_op_switch_char):
        (JSC::JIT::emit_op_switch_string):
        (JSC::JIT::emit_op_new_error):
        (JSC::JIT::emit_op_convert_this):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::emit_op_method_check):
        (JSC::JIT::emitSlow_op_method_check):
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::emit_op_method_check):
        (JSC::JIT::emitSlow_op_method_check):
        (JSC::JIT::emit_op_get_by_val):
        (JSC::JIT::emit_op_get_by_id):
        (JSC::JIT::emit_op_get_by_pname):
        * jit/JITStubCall.h:
        (JSC::JITStubCall::call):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):

382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
2010-05-19  Peter Varga  <pvarga@inf.u-szeged.hu>

        Reviewed by Darin Adler.

        The backtrackParenthesesOnceEnd function should store the start position
        of the subpattern's non-greedy match at the place of the subpattern's
        start index in the output array instead of the place of the
        subpattern's end index.
        Add layout test for checking of non-greedy matching of subpattern in
        regular expressions.
        https://bugs.webkit.org/show_bug.cgi?id=39289

        * yarr/RegexInterpreter.cpp:
        (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):

397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
2010-05-18  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Geoff Garen.

        Bug 39343 - Dynamically generate a native call thunk per NativeFunction
        
        https://bugs.webkit.org/show_bug.cgi?id=39252 regressed performance on i386,
        by adding an extra indirection to making a native call.  By introducing per-
        NativeFunction thunks we can hard code the function pointer into the thunk
        so that it need not be loaded from the callee.

        * jit/JIT.h:
        (JSC::JIT::compileCTINativeCall):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::privateCompileCTINativeCall):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::privateCompileCTINativeCall):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::emitSlow_op_get_by_val):
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::emitSlow_op_get_by_val):
        * jit/JITStubs.cpp:
        (JSC::JITThunks::ctiStub):
        (JSC::JITThunks::hostFunctionStub):
        * jit/JITStubs.h:
        * jit/SpecializedThunkJIT.h:
        (JSC::SpecializedThunkJIT::finalize):
        * jit/ThunkGenerators.cpp:
        (JSC::charCodeAtThunkGenerator):
        (JSC::charAtThunkGenerator):
        (JSC::fromCharCodeThunkGenerator):
        (JSC::sqrtThunkGenerator):
        (JSC::powThunkGenerator):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::JSFunction):
        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::getHostFunction):
        * runtime/JSGlobalData.h:
        (JSC::JSGlobalData::getCTIStub):
        * runtime/Lookup.cpp:
        (JSC::setUpStaticFunctionSlot):
        * runtime/StringConstructor.cpp:
        (JSC::StringConstructor::StringConstructor):
        * wtf/Platform.h:

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
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
2010-05-18  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Simplified handling of 'arguments' -- 1.2% SunSpider speedup
        https://bugs.webkit.org/show_bug.cgi?id=39200
        
        Removed the reserved OptionalCalleeArguments slot from the CallFrame.
        Now, slots for 'arguments' are allocated and initialized only by
        functions that might need them.
        
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump): Updated for new bytecode operands.

        (JSC::CodeBlock::CodeBlock):
        * bytecode/CodeBlock.h:
        (JSC::unmodifiedArgumentsRegister): Added a helper function for mapping
        from the arguments register to its unmodified counterpart.

        (JSC::CodeBlock::setArgumentsRegister):
        (JSC::CodeBlock::argumentsRegister):
        (JSC::CodeBlock::usesArguments):  Changed from a "usesArguments" bool to
        an optional int index representing the arguments register.

        * bytecode/Opcode.h: Updated for new bytecode operands.

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::addVar): Factored out a helper function for
        allocating an anonymous var.

        (JSC::BytecodeGenerator::BytecodeGenerator): Merged / simplified some
        arguments vs activation logic, and added code to allocate the arguments
        registers when needed.

        (JSC::BytecodeGenerator::createArgumentsIfNecessary): Updated for new bytecode operands.

        (JSC::BytecodeGenerator::emitCallEval): No need to create the arguments
        object before calling eval; the activation object will lazily create the
        arguments object if eval resolves it.

        (JSC::BytecodeGenerator::emitReturn): Updated for new bytecode operands.

        (JSC::BytecodeGenerator::emitPushScope):
        (JSC::BytecodeGenerator::emitPushNewScope): Ditto emitCallEval.

        * bytecompiler/BytecodeGenerator.h:
        (JSC::BytecodeGenerator::addVar): Factored out a helper function for
        allocating an anonymous var.

        (JSC::BytecodeGenerator::registerFor): No more need for special handling
        of the arguments registers; they're allocated just like normal registers
        now.

        * interpreter/CallFrame.h:
        (JSC::ExecState::callerFrame):
        (JSC::ExecState::init):
        * interpreter/CallFrameClosure.h:
        (JSC::CallFrameClosure::resetCallFrame): Nixed optionalCalleeArguments.

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::dumpRegisters):
        (JSC::Interpreter::unwindCallFrame):
        (JSC::Interpreter::privateExecute):
        (JSC::Interpreter::retrieveArguments): Opcodes accessing 'arguments' now
        take operands specifying registers, just like all other opcodes.
        JSActivation::copyRegisters is no longer responsible for tearing off the
        arguments object; instead, the VM is responsible for both.

        Also, a behavior change: Each access to f.arguments creates a new object,
        unless f itself uses 'arguments'. This matches Chrome, and is necessary
        for the optimization. f.arguments is a nonstandard, deprecated feature,
        so high fidelity to a given implementation is not necessarily a goal.
        Also, as illustrated by the new test case, the identity of f.arguments
        has been broken since 2008, except in the case where f itself accesses
        f.arguments -- but nobody seemed to notice. So, hopefully this change won't
        break the web.
        
        * interpreter/Register.h: Nixed the special arguments accessor. It's no
        longer needed.

        * interpreter/RegisterFile.h:
        (JSC::RegisterFile::):
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCallInitializeCallFrame):
        (JSC::JIT::compileOpCall):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_tear_off_activation):
        (JSC::JIT::emit_op_tear_off_arguments):
        (JSC::JIT::emit_op_create_arguments):
        (JSC::JIT::emit_op_init_arguments):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::emit_op_tear_off_activation):
        (JSC::JIT::emit_op_tear_off_arguments):
        (JSC::JIT::emit_op_create_arguments):
        (JSC::JIT::emit_op_init_arguments): The actual optimization: Removed
        OptionalCalleeArguments from the callframe slot. Now, it doesn't need
        to be initialized for most calls.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * jit/JITStubs.h:
        (JSC::): Updated stubs to support arbitrary 'arguments' registers,
        instead of hard-coding something in the call frame.

        * runtime/Arguments.h:
        (JSC::JSActivation::copyRegisters): Removed some obfuscatory abstraction.

        * runtime/Executable.h:
        (JSC::FunctionExecutable::generatedByteCode): Added a helper for accessing
        the 'arguments' register. In a future patch, that kind of data should
        probably move out of CodeBlock and into Executable.

        * runtime/JSActivation.cpp:
        (JSC::JSActivation::getOwnPropertySlot):
        (JSC::JSActivation::argumentsGetter):
        * runtime/JSActivation.h: Simplified / fixed access to 'arguments' via
        the activation object. It now implements the same behavior implemented
        by optimized variable access in the VM. This simplifies some other
        things, too -- like eval code generation.

562
563
564
565
566
567
2010-05-18  Sam Weinig  <sam@webkit.org>

        Try to fix the windows build.

        * API/JSStringRefBSTR.cpp:

568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
2010-05-18  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add an inlineCapacity template parameter to ListHashSet and use it to shrink the positioned object list hash set.
        https://bugs.webkit.org/show_bug.cgi?id=39304
        <rdar://problem/7998366>

        Add an inlineCapacity template parameter to ListHashSet.

        * wtf/ListHashSet.h:
        (WTF::::ListHashSet):
        (WTF::::operator):
        (WTF::::swap):
        (WTF::::~ListHashSet):
        (WTF::::size):
        (WTF::::capacity):
        (WTF::::isEmpty):
        (WTF::::begin):
        (WTF::::end):
        (WTF::::find):
        (WTF::::contains):
        (WTF::::add):
        (WTF::::insertBefore):
        (WTF::::remove):
        (WTF::::clear):
        (WTF::::unlinkAndDelete):
        (WTF::::appendNode):
        (WTF::::insertNodeBefore):
        (WTF::::deleteAllNodes):
        (WTF::::makeIterator):
        (WTF::::makeConstIterator):
        (WTF::deleteAllValues):

602
603
604
605
606
607
608
609
610
611
612
613
614
615
2010-05-18  Gabor Loki  <loki@webkit.org>

        Reviewed by Darin Adler.

        Fix the interpreter after r59637
        https://bugs.webkit.org/show_bug.cgi?id=39287

        * runtime/Executable.h:
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::JSFunction):
        (JSC::JSFunction::getCallData):
        * runtime/JSGlobalData.cpp:
        * runtime/JSGlobalData.h:

616
617
618
619
620
621
622
623
2010-05-17  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Geoff Garen.

        Oops, meant ebx not eax there.  Fix Qt (and probably Win too).

        * jit/JITOpcodes32_64.cpp:

624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
2010-05-17  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Geoff Garen.

        Bug 39252 - Move host/native JSFunction's NativeFunction onto NativeExecutable.

        Currently host functions reuse JSFunction's ScopeChain as storage for their
        NativeFunction (the C function pointer to the host function implementation).
        Instead, move this onto NativeExecutable.  This will allow host functions to
        have a scopechain (which will be implemented as a separate patch).

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * jit/JIT.h:
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCallInitializeCallFrame):
        (JSC::JIT::compileOpCall):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JITOpcodes32_64.cpp:
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::stringGetByValStubGenerator):
        (JSC::JIT::emitSlow_op_get_by_val):
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::stringGetByValStubGenerator):
        (JSC::JIT::emitSlow_op_get_by_val):
        * jit/JITStubs.cpp:
        (JSC::JITThunks::specializedThunk):
        * jit/JITStubs.h:
        (JSC::JITThunks::ctiNativeCall):
        * jit/SpecializedThunkJIT.h:
        (JSC::SpecializedThunkJIT::finalize):
        * jit/ThunkGenerators.cpp:
        (JSC::charCodeAtThunkGenerator):
        (JSC::charAtThunkGenerator):
        (JSC::fromCharCodeThunkGenerator):
        (JSC::sqrtThunkGenerator):
        (JSC::powThunkGenerator):
        * jit/ThunkGenerators.h:
        * runtime/Executable.h:
        (JSC::NativeExecutable::create):
        (JSC::NativeExecutable::function):
        (JSC::NativeExecutable::NativeExecutable):
        (JSC::JSFunction::nativeFunction):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::JSFunction):
        (JSC::JSFunction::~JSFunction):
        (JSC::JSFunction::markChildren):
        (JSC::JSFunction::getCallData):
        (JSC::JSFunction::call):
        (JSC::JSFunction::getOwnPropertySlot):
        (JSC::JSFunction::getConstructData):
        (JSC::JSFunction::construct):
        * runtime/JSFunction.h:
        (JSC::JSFunction::scope):
        * runtime/JSGlobalData.h:
        (JSC::JSGlobalData::getThunk):
        * runtime/Lookup.cpp:
        (JSC::setUpStaticFunctionSlot):
        * runtime/StringConstructor.cpp:
        (JSC::StringConstructor::StringConstructor):

685
686
687
688
689
690
691
692
693
694
695
696
2010-05-17  Patrick Gansterer  <paroga@paroga.com>

        Reviewed by Laszlo Gombos.

        [Qt] Remove WinCE endian dedection.
        https://bugs.webkit.org/show_bug.cgi?id=38511

        Windows CE supports little-endian format only.
        Correct dedection was added in r57804.

        * wtf/Platform.h:

697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
2010-05-16  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Darin Adler.

        Reduce the size of FunctionExecutable
        https://bugs.webkit.org/show_bug.cgi?id=39180
        
        Change m_numVariables from a size_t to 31 bits in a bitfield,
        packed with another bit for m_forceUsesArguments (which in turn
        get packed with the base class).
        
        Reduces the size of FunctionExecutable from 160 to 152 bytes.

        * runtime/Executable.h:
        (JSC::FunctionExecutable::variableCount):
        (JSC::FunctionExecutable::FunctionExecutable):

714
715
716
717
718
719
720
721
722
723
724
725
726
2010-05-15  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej Stachowiak.

        Incorrect codegen for slowcase of < in 64-bit
        https://bugs.webkit.org/show_bug.cgi?id=39151

        Call the correct stud for the slowcases of the < operator.

        * jit/JITArithmetic.cpp:
        (JSC::JIT::emitSlow_op_jnless):
        (JSC::JIT::emitSlow_op_jless):

727
728
729
730
731
732
733
734
735
2010-05-15  Leo Yang  <leo.yang@torchmobile.com.cn>

        Reviewed by Darin Adler.

        Fix bug https://bugs.webkit.org/show_bug.cgi?id=38890

        * runtime/DatePrototype.cpp:
        (JSC::formatLocaleDate):

736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
2010-05-15  Leandro Pereira  <leandro@profusion.mobi>

        Reviewed by Adam Treat.

        [EFL] Add build system for the EFL port.
        http://webkit.org/b/37945

        * CMakeLists.txt: Added.
        * CMakeListsEfl.txt: Added.
        * config.h: Add conditional to look for cmakeconfig.h.
        * jsc/CMakeLists.txt: Added.
        * jsc/CMakeListsEfl.txt: Added.
        * wtf/CMakeLists.txt: Added.
        * wtf/CMakeListsEfl.txt: Added.

751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
2010-05-15  Chao-ying Fu  <fu@mips.com>

        Reviewed by Oliver Hunt.

        Update MIPS JIT for unsigned right shift, Math.sqrt, load16
        https://bugs.webkit.org/show_bug.cgi?id=38412

        Fixed MIPS build failure.

        * assembler/MIPSAssembler.h:
        (JSC::MIPSAssembler::srl):
        (JSC::MIPSAssembler::srlv):
        (JSC::MIPSAssembler::sqrtd):
        * assembler/MacroAssemblerMIPS.h:
        (JSC::MacroAssemblerMIPS::urshift32):
        (JSC::MacroAssemblerMIPS::sqrtDouble):
        (JSC::MacroAssemblerMIPS::load16):
        (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
        * jit/JSInterfaceJIT.h:

771
772
773
774
775
776
777
778
779
780
781
782
783
2010-05-15  Ilya Tikhonovsky  <loislo@chromium.org>

        Reviewed by Geoffrey Garen.

        WebInspector: JSC Should provide heap size info for Timeline panel.
        https://bugs.webkit.org/show_bug.cgi?id=38420

        * JavaScriptCore.exp:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * runtime/Collector.cpp:
        (JSC::Heap::size):
        * runtime/Collector.h:

784
785
786
787
788
789
790
791
792
2010-05-15  Dave Tapuska  <dtapuska@rim.com>

        Reviewed by Darin Adler.

        Add a new define for we need strict arena alignment. ARMv5 with
        double word instructions set this value.

        * wtf/Platform.h:

slewis@apple.com's avatar
slewis@apple.com committed
793
794
795
796
797
798
799
800
2010-05-14  Stephanie Lewis  <slewis@apple.com>

        Rubber-stamped by Mark Rowe.

        Update order files.

        * JavaScriptCore.order:

801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
2010-05-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        Implementation of QtScript API that provide method to convert a value to an object.

        [Qt] QtScript is missing toObject API
        https://bugs.webkit.org/show_bug.cgi?id=36594

        * qt/api/qscriptengine.cpp:
        (QScriptEngine::toObject):
        * qt/api/qscriptengine.h:
        * qt/api/qscriptvalue.cpp:
        (QScriptValue::toObject):
        * qt/api/qscriptvalue.h:
        * qt/api/qscriptvalue_p.h:
        (QScriptValuePrivate::toObject):
        * qt/tests/qscriptengine/tst_qscriptengine.cpp:
        (tst_QScriptEngine::toObject):
        (tst_QScriptEngine::toObjectTwoEngines):
        * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
        (tst_QScriptValue::toObjectSimple):
        * qt/tests/qscriptvalue/tst_qscriptvalue.h:

825
826
827
828
829
830
831
832
833
834
835
836
837
2010-05-14  Chao-ying Fu  <fu@mips.com>

        Reviewed by Oliver Hunt.

        String Indexing Failure on JSVALUE32 targets
        https://bugs.webkit.org/show_bug.cgi?id=39034

        Remove zero-extend/shift-right code on regT1, because we already have
        it in emit_op_get_by_val().

        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::stringGetByValStubGenerator):

838
839
840
841
842
843
844
845
846
847
848
849
2010-05-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>

        Reviewed by Alexey Proskuryakov.

        Fix a VS2010 assert in std::copy
        https://bugs.webkit.org/show_bug.cgi?id=38630

        The assert complains that the output iterator is null.

        * wtf/Vector.h:
        (WTF::::operator):

850
851
852
853
854
855
856
857
858
859
2010-05-13  Maciej Stachowiak  <mjs@apple.com>

        No review, attempted build fix.

        Try to fix Tiger build with some gratuitous initialization of
        seemingly uninitialized variables.

        * wtf/text/StringImpl.h:
        (WebCore::StringImpl::tryCreateUninitialized):

860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
2010-05-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Mark Rowe.

        Various JavaScript string optimizations
        https://bugs.webkit.org/show_bug.cgi?id=39051

        Approximately 1% SunSpider speedup.
        
        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncJoin): Remove branches from the hot code path
        by moving the first pass outside the loop, and duplicating the hot loop
        to extract the loop-invariant branch.
        * runtime/RegExp.cpp:
        (JSC::RegExp::match): resize ovector to 0 instead of clearing to avoid
        thrash in case of large matches.
        * runtime/RegExpConstructor.h:
        (JSC::RegExpConstructor::performMatch): Mark ALWAYS_INLINE to make the
        compiler respect our authority.
        * runtime/StringPrototype.cpp:
        (JSC::jsSpliceSubstringsWithSeparators): Inline.
        (JSC::stringProtoFuncSubstring): Rewrite boundary condition checks to
        reduce the number of floating point comparisons and branches.

884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
2010-05-12  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Oliver Hunt.

        https://bugs.webkit.org/show_bug.cgi?id=39039
        Provide support for separate bytecode/JIT code translations for call/construct usage
        This will allow us to produce code generated specifically for use as a constructor, not for general function use.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::CodeBlock):
        (JSC::CodeBlock::unlinkCallers):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::getBytecodeIndex):
        (JSC::CodeBlock::getJITCode):
        (JSC::CodeBlock::executablePool):
        (JSC::GlobalCodeBlock::GlobalCodeBlock):
        (JSC::FunctionCodeBlock::FunctionCodeBlock):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::executeCall):
        (JSC::Interpreter::executeConstruct):
        (JSC::Interpreter::prepareForRepeatCall):
        (JSC::Interpreter::execute):
        (JSC::Interpreter::privateExecute):
        * interpreter/Interpreter.h:
        * jit/JIT.cpp:
        (JSC::JIT::unlinkCallOrConstruct):
        (JSC::JIT::linkConstruct):
        * jit/JIT.h:
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCall):
        (JSC::JIT::compileOpCallSlowCase):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::emitSlow_op_get_by_val):
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::emitSlow_op_get_by_val):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * jit/JITStubs.h:
        (JSC::JITThunks::ctiVirtualConstructLink):
        (JSC::JITThunks::ctiVirtualConstruct):
        (JSC::):
        * jit/SpecializedThunkJIT.h:
        (JSC::SpecializedThunkJIT::finalize):
        * runtime/Arguments.h:
        (JSC::JSActivation::copyRegisters):
        * runtime/ArrayPrototype.cpp:
        (JSC::isNumericCompareFunction):
        * runtime/Executable.cpp:
        (JSC::FunctionExecutable::~FunctionExecutable):
        (JSC::FunctionExecutable::compileForCall):
        (JSC::FunctionExecutable::compileForConstruct):
        (JSC::EvalExecutable::generateJITCode):
        (JSC::ProgramExecutable::generateJITCode):
        (JSC::FunctionExecutable::generateJITCodeForCall):
        (JSC::FunctionExecutable::generateJITCodeForConstruct):
        (JSC::FunctionExecutable::markAggregate):
        (JSC::FunctionExecutable::reparseExceptionInfo):
        (JSC::EvalExecutable::reparseExceptionInfo):
        (JSC::FunctionExecutable::recompile):
        * runtime/Executable.h:
        (JSC::ExecutableBase::ExecutableBase):
        (JSC::ExecutableBase::isHostFunction):
        (JSC::ExecutableBase::generatedJITCodeForCall):
        (JSC::ExecutableBase::generatedJITCodeForConstruct):
        (JSC::NativeExecutable::NativeExecutable):
        (JSC::EvalExecutable::jitCode):
        (JSC::ProgramExecutable::jitCode):
        (JSC::FunctionExecutable::bytecodeForCall):
        (JSC::FunctionExecutable::isGeneratedForCall):
        (JSC::FunctionExecutable::generatedBytecodeForCall):
        (JSC::FunctionExecutable::bytecodeForConstruct):
        (JSC::FunctionExecutable::isGeneratedForConstruct):
        (JSC::FunctionExecutable::generatedBytecodeForConstruct):
        (JSC::FunctionExecutable::symbolTable):
        (JSC::FunctionExecutable::FunctionExecutable):
        (JSC::FunctionExecutable::jitCodeForCall):
        (JSC::FunctionExecutable::jitCodeForConstruct):
        * runtime/JSActivation.h:
        (JSC::JSActivation::JSActivationData::JSActivationData):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::~JSFunction):
        (JSC::JSFunction::call):
        (JSC::JSFunction::construct):
        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::numericCompareFunction):

oliver@apple.com's avatar
oliver@apple.com committed
974
975
976
977
978
979
980
981
982
2010-05-12  Oliver Hunt  <oliver@apple.com>

        build fix

        <rdar://problem/7977960> REGRESSION (r59282): Tiger PPC build broken

        * runtime/UString.h:
        (JSC::tryMakeString):

983
984
985
986
987
988
989
990
991
992
993
994
995
2010-05-12  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        <rdar://7969718> Incorrect 32-bit codegen for op_jnlesseq
        https://bugs.webkit.org/show_bug.cgi?id=39038

        Correct the use of incorrect comparison operators.

        * jit/JITArithmetic32_64.cpp:
        (JSC::JIT::emit_op_jlesseq):
        (JSC::JIT::emitBinaryDoubleOp):

996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
2010-05-12  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>

        Reviewed by Eric Seidel.

        JavaScriptCore: fix build when some optimizations are disabled
        https://bugs.webkit.org/show_bug.cgi?id=38800

        Remove outdated UNUSED_PARAMs when using JIT but with
        ENABLE_JIT_OPTIMIZE_CALL and ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
        disabled.

        * jit/JITOpcodes.cpp:
        * jit/JITOpcodes32_64.cpp:

1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
2010-05-12  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Work around GCC stupidity by either explicitly inlining or by
        using ALWAYS_INLINE

        * runtime/StringPrototype.cpp:
        (JSC::stringProtoFuncReplace):
        * runtime/UString.h:
        (JSC::UString::~UString):
        * wtf/RefPtr.h:
        (WTF::RefPtr::RefPtr):
        (WTF::RefPtr::~RefPtr):
        * wtf/text/StringImpl.h:
        (WebCore::StringImpl::create):
        (WebCore::StringImpl::tryCreateUninitialized):

1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
2010-05-12  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Detect debug mode consistently
        https://bugs.webkit.org/show_bug.cgi?id=38863

        * JavaScriptCore.pri:
        * JavaScriptCore.pro:
        * jsc.pro:
        * qt/api/QtScript.pro:

1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
2010-05-12  Peter Varga  <pvarga@inf.u-szeged.hu>

        Reviewed by Gavin Barraclough.

        Remove a direct jump in generatePatternCharacterGreedy() and
        generatePatternCharacterClassGreedy() functions if quantityCount of the term
        is unlimited.
        https://bugs.webkit.org/show_bug.cgi?id=38898

        * yarr/RegexJIT.cpp:
        (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
        (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):

1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
2010-05-11  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Gavin Barraclough.

        Slight simplification to the calling convention: read RegisterFile::end()
        from an absolute address, instead of from a pointer to the RegisterFile
        on the stack.
        
        SunSpider reports no change.
        
        This should free us to remove the RegisterFile argument from the stack.

        * jit/JIT.cpp:
        (JSC::JIT::privateCompile):

1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
2010-05-11  Brian Weinstein  <bweinstein@apple.com>

        Possible Gtk build fix - use ALWAYS_INLINE on functions that were inlined.

        * wtf/text/AtomicString.h:
        (WebCore::AtomicString::add): Use ALWAYS_INLINE.
        * wtf/text/WTFString.h:
        (WebCore::String::length): Ditto.
        (WebCore::String::isEmpty): Ditto.

1078
1079
1080
1081
1082
1083
1084
1085
2010-05-11  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add a compile time assert that sizeof(String) == sizeof(AtomicString).

        * wtf/text/AtomicString.cpp:

1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
2010-05-11  Anders Carlsson  <andersca@apple.com>

        Reviewed by Mark Rowe.

        https://bugs.webkit.org/show_bug.cgi?id=38961
        Move some member variables around to reduce class sizes.
        
        Make AtomicString no longer inherit from FastAllocBase.

        Since AtomicString's first (and only) member variable, a RefPtr, also inherits from FastAllocBase this
        was causing the size of AtomicString to contain sizeof(void*) bytes of padding.

        * wtf/text/AtomicString.h:

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
2010-05-11  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Maciej Stachowiak.
        Patch by Gavin Barraclough.
        
        Rest of REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF.
        https://bugs.webkit.org/show_bug.cgi?id=38930
        <rdar://problem/7937188>
        
        Inline string functions that are commonly used in WTFString, CString, and AtomicString.

        * JavaScriptCore.exp: Remove exports of inline functions.
        * wtf/text/AtomicString.cpp:
        (WebCore::AtomicString::addSlowCase): Rename add to addSlowCase, and inline the fast path
            of add.
        * wtf/text/AtomicString.h:
        (WebCore::AtomicString::add): Inline the fast path of add.
        * wtf/text/CString.cpp: Inline implementation of data and length in the header.
        * wtf/text/CString.h:
        (WTF::CString::data): Inline implementation of data.
        (WTF::CString::length): Inline implementation of length.
        * wtf/text/WTFString.cpp: Remove implementations of functions to be inlined.
        * wtf/text/WTFString.h:
        (WebCore::String::String): Inline implementation.
        (WebCore::String::length): Ditto.
        (WebCore::String::characters): Ditto.
        (WebCore::String::operator[]): Ditto.
        (WebCore::String::isEmpty): Ditto.

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
2010-05-11  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Steve Falkenburg and Jon Honeycutt.
        Patch by Gavin Barraclough.
        
        REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF.
        https://bugs.webkit.org/show_bug.cgi?id=38930
        <rdar://problem/7937188>
        
        When the String classes were moved from WebCore to WTF, it meant that on Windows, all operations
        on Strings in WebCore had to cross a DLL boundary (from WebKit.dll to JavaScript.dll).
        
        We fix this by refactoring some of the WTF string code, so the code in AtomicString, StringImpl, and
        WTFString can be built by both WebCore and WTF, and we don't need to talk across a DLL to do operations
        on Strings.

        * GNUmakefile.am: Add new file to build system.
        * JavaScriptCore.gypi: Ditto.
        * JavaScriptCore.pro: Ditto.
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove string exports, because these are now
            handled in WebCore.
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove the post-build step that was added
            here (the post build step is in JavaScriptCoreCommon.vsprops).
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Copy the three cpp files that need to be compiled
            by WebCore into the WebKitOutputDir directory.
        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add the StringStatics file.
        * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add the three WTF string cpp files to this project.
        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Remove the need to link against WTF.lib (since jsc links against JavaScriptCore).
        * JavaScriptCore.xcodeproj/project.pbxproj: Add the StringStatics file.
        * wtf/text/AtomicString.cpp: Moved code to StringStatics.
        * wtf/text/StringImpl.cpp: Ditto.
        * wtf/text/StringStatics.cpp: Added. Move functions in WTF Strings that define static variables to here, so 
            the rest of the files can be compiled in WebCore.
        (WebCore::StringImpl::empty): Moved from StringImpl.cpp to here.
        (WebCore::AtomicString::init): Moved from AtomicString.cpp to here.

1165
1166
1167
1168
1169
1170
1171
1172
2010-05-11  Alice Liu  <alice.liu@apple.com>

        Rubber-stamped by Gavin Barraclough.

        Fix build error when enabling debugging block in WebKit win painting code

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

mrowe@apple.com's avatar
mrowe@apple.com committed
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
2010-05-11  Mark Rowe  <mrowe@apple.com>

        Fix the world.

        In r59162 a change was made to WebCore's FeatureDefines.xcconfig that enabled FILE_READER and FILE_WRITER.
        The author and reviewer of that patch ignored the carefully-worded warning at the top of that file asking
        that changes to the file be kept in sync across JavaScriptCore, WebCore and WebKit, as well as being kept
        in sync with build-webkit.  This led to WebCore and WebKit having different views of Document's vtable
        and results in crashes in Safari shortly after launch when virtual function calls resulted in the wrong
        function in WebCore being called.

        We fix this by bringing the FeatureDefines.xcconfig files in to sync.  Based on the ChangeLog message and
        other changes in r59162 it appears that enabling FILE_WRITER was unintentional so that particular change
        has been reverted.

        * Configurations/FeatureDefines.xcconfig:

1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
2010-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r59171.
        http://trac.webkit.org/changeset/59171
        https://bugs.webkit.org/show_bug.cgi?id=38933

        "Broke the world" (Requested by bweinstein on #webkit).

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * wtf/text/AtomicString.cpp:
        (WebCore::AtomicString::init):
        * wtf/text/StringImpl.cpp:
        (WebCore::StringImpl::empty):
        * wtf/text/StringStatics.cpp: Removed.

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
2010-05-11  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Steve Falkenburg.
        Patch by Gavin Barraclough.
        
        REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF.
        https://bugs.webkit.org/show_bug.cgi?id=38930
        <rdar://problem/7937188>
        
        When the String classes were moved from WebCore to WTF, it meant that on Windows, all operations
        on Strings in WebCore had to cross a DLL boundary (from WebKit.dll to JavaScript.dll).
        
        We fix this by refactoring some of the WTF string code, so the code in AtomicString, StringImpl, and
        WTFString can be built by both WebCore and WTF, and we don't need to talk across a DLL to do operations
        on Strings.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove string exports, because these are now
            handled in WebCore.
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove the post-build step that was added
            here (the post build step is in JavaScriptCoreCommon.vsprops).
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Copy the three cpp files that need to be compiled
            by WebCore into the WebKitOutputDir directory.
        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add the StringStatics file.
        * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add the three WTF string cpp files to this project.
        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Remove the need to link against WTF.lib (since jsc links against JavaScriptCore).
        * JavaScriptCore.xcodeproj/project.pbxproj: Add the StringStatics file.
        * wtf/text/AtomicString.cpp: Moved code to StringStatics.
        * wtf/text/StringImpl.cpp: Ditto.
        * wtf/text/StringStatics.cpp: Added. Move functions in WTF Strings that define static variables to here, so 
            the rest of the files can be compiled in WebCore.
        (WebCore::StringImpl::empty): Moved from StringImpl.cpp to here.
        (WebCore::AtomicString::init): Moved from AtomicString.cpp to here.

1244
1245
1246
1247
1248
1249
1250
1251
1252
2010-05-11  Geoffrey Garen  <ggaren@apple.com>

        Fixed test failures seen on SnowLeopard buildbot.

        * runtime/JSString.cpp:
        (JSC::JSString::replaceCharacter): Don't use size_t and wtf::notFound.
        Instead, use the individual types and notFound values of the string APIs
        we're using, since they're not necessarily the same in 64bit.

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
2010-05-11  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt and Darin Adler.

        Start using ropes in String.prototype.replace.
        
        1%-1.5% speedup on SunSpider.

        * runtime/JSString.cpp:
        (JSC::JSString::resolveRope): Updated for RopeImpl refactoring.

        (JSC::JSString::replaceCharacter): Added a replaceCharacter function, which creates
        a rope for the resulting replacement.

        * runtime/JSString.h: A few changes here:
        (JSC::):
        (JSC::RopeBuilder::RopeIterator::RopeIterator):
        (JSC::RopeBuilder::RopeIterator::operator++):
        (JSC::RopeBuilder::RopeIterator::operator*):
        (JSC::RopeBuilder::RopeIterator::operator!=):
        (JSC::RopeBuilder::RopeIterator::WorkItem::WorkItem):
        (JSC::RopeBuilder::RopeIterator::WorkItem::operator!=):
        (JSC::RopeBuilder::RopeIterator::skipRopes): Created a RopeIterator abstraction.
        We use this to do a substring find without having to resolve the rope.
        (We could use this iterator when resolving ropes, too, but resolving
        ropes backwards is usually more efficient.)

        (JSC::RopeBuilder::JSString): Added constructors for 2 & 3 UStrings.

        (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
        (JSC::RopeBuilder::size): Updated for RopeImpl refactoring.

        * runtime/Operations.h: Updated for RopeImpl refactoring.
        (JSC::jsString): Added jsString functions for 2 & 3 UStrings.

        * runtime/RopeImpl.cpp:
        (JSC::RopeImpl::derefFibersNonRecursive):
        * runtime/RopeImpl.h:
        (JSC::RopeImpl::initializeFiber):
        (JSC::RopeImpl::size):
        (JSC::RopeImpl::fibers):
        (JSC::RopeImpl::deref):
        (JSC::RopeImpl::RopeImpl): A little refactoring to make this patch easier:
        Moved statics to the top of the class; put multi-statement functions on
        multiple lines; renamed "fiberCount" to "size" to match other collections;
        changed the "fibers" accessor to return the fibers buffer, instead of an
        item in the buffer, to make iteration easier.

        * runtime/StringPrototype.cpp:
        (JSC::stringProtoFuncReplace): Don't resolve a rope unless we need to. Do
        use our new replaceCharacter function if possible. Do use a rope to
        represent splicing three strings together.

1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
2010-05-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Darin Adler.

        [Qt] Disable JIT support for mingw-w64
        https://bugs.webkit.org/show_bug.cgi?id=38747

        Disale JIT for mingw-w64 as it is reportedly
        unstable.

        Thanks for Vanboxem Rruben for the investigation.

        * wtf/Platform.h:

1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
2010-05-09  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Eric Seidel.

        JavaScriptCore/wtf/MD5.h: checksum should take a reference to output.
        https://bugs.webkit.org/show_bug.cgi?id=38723

        * JavaScriptCore.exp:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * wtf/MD5.cpp:
        (WTF::expectMD5):
          Fix for checksum change.
        (WTF::MD5::checksum):
          Take a reference to output, instead of returning the result by value, to reduce coping for performance.
        * wtf/MD5.h:

1336
2010-05-09  Oliver Hunt  <oliver@apple.com>
1337

1338
        Build fix.
1339

1340
        Fix accidental repeat addition of emit_op_new_regexp
1341

1342
        * jit/JITOpcodes.cpp:
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
2010-05-09  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        REGRESSION(r57955): RegExp literals should not actually be cached, so r57955 should be rolled out.
        https://bugs.webkit.org/show_bug.cgi?id=38828
        <rdar://problem/7961634>

        Rollout r57955

        * bytecode/CodeBlock.cpp:
        (JSC::regexpToSourceString):
        (JSC::regexpName):
        (JSC::CodeBlock::dump):
        (JSC::CodeBlock::shrinkToFit):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::addRegExp):
        (JSC::CodeBlock::regexp):
        * bytecode/Opcode.h:
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::addRegExp):
        (JSC::BytecodeGenerator::emitNewRegExp):
        * bytecompiler/BytecodeGenerator.h:
        * bytecompiler/NodesCodegen.cpp:
        (JSC::RegExpNode::emitBytecode):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        * jit/JIT.h:
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_new_regexp):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * jit/JITStubs.h:
        (JSC::):

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
2010-05-09  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        Reserve a large-ish initial capacity for Lexer::m_buffer16.
        
        SunSpider says 0.3% faster.
        
        m_buffer16 is used when parsing complex strings -- for example, strings
        with escape sequences in them. These kinds of strings can be really long,
        and we want to avoid repeatedly copying as we grow m_buffer16.
        
        The net memory cost is quite low, since it's proporitional to source
        code we already have in memory, and we throw away m_buffer16 right when
        we're done parsing.

        * parser/Lexer.cpp:
        (JSC::Lexer::Lexer): No need to reserve initial capacity in our constructor,
        since setCode will be called before we're asked to lex anything.
        (JSC::Lexer::setCode): Reserve enough space to lex half the source code
        as a complex string without having to copy.
        (JSC::Lexer::clear): No need to reserve initial capacity here either,
        since setCode will be called before we're asked to lex anything.

2010-05-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Eric Seidel.

        [Qt] Remove YARR configuration rules from Qt make system
        https://bugs.webkit.org/show_bug.cgi?id=38819

        Setting YARR based on JIT seeting is now in Platform.h 
        for all ports. This patch essentially reverses r49238.

        * JavaScriptCore.pri:

1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
2010-05-09  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej Stachowiak.

        Improve string indexing performance
        https://bugs.webkit.org/show_bug.cgi?id=38814

        Add an assembly stub to do indexed loads from strings much
        more cheaply than the current stub dispatch logic.  We can
        do this because we are able to make guarantees about the
        register contents when entering the stub so the call overhead
        is negligible.

        * jit/JIT.h:
        * jit/JITInlineMethods.h:
        * jit/JITOpcodes.cpp:
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::stringGetByValStubGenerator):
        (JSC::JIT::emitSlow_op_get_by_val):
           Moved from JITOpcodes.cpp to keep the slowcase next to
           the normal case codegen as we do for everything else.
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::stringGetByValStubGenerator):
        (JSC::JIT::emitSlow_op_get_by_val):
        * jit/JSInterfaceJIT.h:
        (JSC::JSInterfaceJIT::emitFastArithImmToInt):

1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
2010-05-09  Maciej Stachowiak  <mjs@apple.com>

        Fixed version of: "Optimized o[s] where o is a cell and s is a string"
        https://bugs.webkit.org/show_bug.cgi?id=38815
        
        Fixed the previous patch for this from Geoff Garen.
        
        The two problems were a missing exception check and a PropertySlot
        initialized improperly, leading to crashes and failures in the case
        of getters accessed with bracket syntax.

    Previous patch:

        Optimized o[s] where o is a cell and s is a string, removing some old
        code that wasn't really tuned for the JIT.
        
        SunSpider says 0.8% faster.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * runtime/JSCell.h:

1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
2010-05-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Unreviewed, build fix.

        Fix missing terminating ' character warning

        The warning has been only seen on the Gtk buildbots.

        * wtf/Platform.h:

1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
2010-05-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Gavin Barraclough.

        Refactor YARR and YARR_JIT default rules in Platform.h
        https://bugs.webkit.org/show_bug.cgi?id=38727

        Turn on YARR and YARR JIT by default of JIT is enabled.
        Ports can overrule this default decisions as they wish.

        * wtf/Platform.h:

1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
2010-05-08  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Split JSVALUE32_64 code out of JITOpcodes.cpp and into JITOpcodes32_64.cpp
        https://bugs.webkit.org/show_bug.cgi?id=38808

        * GNUmakefile.am:
        * JavaScriptCore.gypi:
        * JavaScriptCore.pro:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * jit/JITOpcodes.cpp:
        * jit/JITOpcodes32_64.cpp: Added.
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        (JSC::JIT::emit_op_mov):
        (JSC::JIT::emit_op_end):
        (JSC::JIT::emit_op_jmp):
        (JSC::JIT::emit_op_loop_if_lesseq):
        (JSC::JIT::emitSlow_op_loop_if_lesseq):
        (JSC::JIT::emit_op_new_object):
        (JSC::JIT::emit_op_instanceof):
        (JSC::JIT::emitSlow_op_instanceof):
        (JSC::JIT::emit_op_new_func):
        (JSC::JIT::emit_op_get_global_var):
        (JSC::JIT::emit_op_put_global_var):
        (JSC::JIT::emit_op_get_scoped_var):
        (JSC::JIT::emit_op_put_scoped_var):
        (JSC::JIT::emit_op_tear_off_activation):
        (JSC::JIT::emit_op_tear_off_arguments):
        (JSC::JIT::emit_op_new_array):
        (JSC::JIT::emit_op_resolve):
        (JSC::JIT::emit_op_to_primitive):
        (JSC::JIT::emitSlow_op_to_primitive):
        (JSC::JIT::emit_op_strcat):
        (JSC::JIT::emit_op_resolve_base):
        (JSC::JIT::emit_op_resolve_skip):
        (JSC::JIT::emit_op_resolve_global):
        (JSC::JIT::emitSlow_op_resolve_global):
        (JSC::JIT::emit_op_not):
        (JSC::JIT::emitSlow_op_not):
        (JSC::JIT::emit_op_jfalse):
        (JSC::JIT::emitSlow_op_jfalse):
        (JSC::JIT::emit_op_jtrue):
        (JSC::JIT::emitSlow_op_jtrue):
        (JSC::JIT::emit_op_jeq_null):
        (JSC::JIT::emit_op_jneq_null):
        (JSC::JIT::emit_op_jneq_ptr):
        (JSC::JIT::emit_op_jsr):
        (JSC::JIT::emit_op_sret):
        (JSC::JIT::emit_op_eq):
        (JSC::JIT::emitSlow_op_eq):
        (JSC::JIT::emit_op_neq):
        (JSC::JIT::emitSlow_op_neq):
        (JSC::JIT::compileOpStrictEq):
        (JSC::JIT::emit_op_stricteq):
        (JSC::JIT::emitSlow_op_stricteq):
        (JSC::JIT::emit_op_nstricteq):
        (JSC::JIT::emitSlow_op_nstricteq):
        (JSC::JIT::emit_op_eq_null):
        (JSC::JIT::emit_op_neq_null):
        (JSC::JIT::emit_op_resolve_with_base):
        (JSC::JIT::emit_op_new_func_exp):
        (JSC::JIT::emit_op_throw):
        (JSC::JIT::emit_op_get_pnames):
        (JSC::JIT::emit_op_next_pname):
        (JSC::JIT::emit_op_push_scope):
        (JSC::JIT::emit_op_pop_scope):
        (JSC::JIT::emit_op_to_jsnumber):
        (JSC::JIT::emitSlow_op_to_jsnumber):
        (JSC::JIT::emit_op_push_new_scope):
        (JSC::JIT::emit_op_catch):
        (JSC::JIT::emit_op_jmp_scopes):
        (JSC::JIT::emit_op_switch_imm):
        (JSC::JIT::emit_op_switch_char):
        (JSC::JIT::emit_op_switch_string):
        (JSC::JIT::emit_op_new_error):
        (JSC::JIT::emit_op_debug):
        (JSC::JIT::emit_op_enter):
        (JSC::JIT::emit_op_enter_with_activation):
        (JSC::JIT::emit_op_create_arguments):
        (JSC::JIT::emit_op_init_arguments):
        (JSC::JIT::emit_op_convert_this):
        (JSC::JIT::emitSlow_op_convert_this):
        (JSC::JIT::emit_op_profile_will_call):
        (JSC::JIT::emit_op_profile_did_call):

1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
2010-05-08  Gabor Loki  <loki@webkit.org>

        Reviewed by Gavin Barraclough.

        Fix halfword loads on ARM
        https://bugs.webkit.org/show_bug.cgi?id=38741

        The BaseIndex and ImplicitAddress are contain 32bit wide offset, but
        the load16 functions were working with 8 bit data (encoded in the
        instruction). If the offset cannot be encoded in an instruction, it
        should be stored in a temporary register.

        * assembler/ARMAssembler.h:
        (JSC::ARMAssembler::getOffsetForHalfwordDataTransfer):
        * assembler/MacroAssemblerARM.h:
        (JSC::MacroAssemblerARM::load16):

1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
2010-05-08  Gabor Loki  <loki@webkit.org>

        Reviewed by Gavin Barraclough.

        Fix spanning branch instruction on Cortex-A8 with Thumb-2 JIT
        https://bugs.webkit.org/show_bug.cgi?id=38280

        If the 32-bit Thumb-2 branch instruction spans two 4KiB regions and
        the target of the branch falls within the first region it is
        possible for the processor to incorrectly determine the branch
        instruction, and it is also possible in some cases for the processor
        to enter a deadlock state.

        * assembler/ARMv7Assembler.h:
        (JSC::ARMv7Assembler::linkJumpAbsolute):

1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
2010-05-08  Adam Barth  <abarth@webkit.org>

        Reviewed by Darin Fisher.

        [WTFURL] Add a buffer for managing the output of the canonicalizer
        https://bugs.webkit.org/show_bug.cgi?id=38671

        The canonicalizer produces a stream of canonicalized characters, which
        we will store in a URLBuffer.  URLBuffer is quite similar to Vector,
        but serves as an abstraction to isolate us from the underlying
        character storage.  In the case of WebKit, we'll probably implement a
        subclass of URLBuffer with Vector.  In Chromium, the backing store is a
        std::string, which avoids an unnecessary memcpy that would be caused by
        using Vector instead.

        * wtf/url/src/URLBuffer.h: Added.
        (WTF::URLBuffer::URLBuffer):
        (WTF::URLBuffer::~URLBuffer):
        (WTF::URLBuffer::at):
        (WTF::URLBuffer::set):
        (WTF::URLBuffer::capacity):
        (WTF::URLBuffer::length):
        (WTF::URLBuffer::data):
        (WTF::URLBuffer::setLength):
        (WTF::URLBuffer::append):
        (WTF::URLBuffer::grow):

1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
2010-05-08  Eric Seidel  <eric@webkit.org>

        Unreviewed, just reverting commit.

        REGRESSION(59000): r59000 contained all sorts of changes it should not have, needs revert.
        https://bugs.webkit.org/show_bug.cgi?id=38798

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::emitResolve):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_resolve_global):

1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
2010-05-04  Jer Noble  <jer.noble@apple.com>

        Reviewed by Maciej Stachowiak

        Safari pegs CPU and drops tons of frames using HTML5 Vimeo player
        <https://bugs.webkit.org/show_bug.cgi?id=34005>
        <rdar://problem/7569713>
        
        Added cancelCallOnMainThread.  callOnMainThread should always now be paired
        with cancelCallOnMainThread in situations where the refcon passed to callOnMainThread
        may be dealloced before the main thread function can be dispatched.  
        
        * wtf/MainThread.cpp:
        (WTF::FunctionWithContext::operator == ): Supports the FunctionWithContextFinder predicate functor.
        (WTF::FunctionWithContextFinder::FunctionWithContextFinder):  Predicate functor for use with Dequeue::findIf
        (WTF::FunctionWithContextFinder::operator()):
        (WTF::cancelCallOnMainThread):
        * wtf/MainThread.h:

oliver@apple.com's avatar
oliver@apple.com committed
1666
1667
1668
1669
1670
1671
2010-05-07  Oliver Hunt  <oliver@apple.com>

        Windows build fix.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
2010-05-07  Eric Seidel  <eric@webkit.org>

        Unreviewed, rolling out r58990.
        http://trac.webkit.org/changeset/58990

        Broke 4 tests on Snow Leopard and Qt.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * runtime/JSCell.h:

2010-05-07  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Optimize access to the global object from a function that uses eval
        https://bugs.webkit.org/show_bug.cgi?id=38644

        Fix bug where cross scope access to a global var (vs. property) would
        be allowed without checking for intervening dynamic scopes.

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

2010-05-07  Oliver Hunt  <oliver@apple.com>

        32-bit buildfix.

        Macro expansion I stab at thee!

        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_resolve_global):

2010-05-07  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Optimized o[s] where o is a cell and s is a string, removing some old
        code that wasn't really tuned for the JIT.
        
        SunSpider says 0.8% faster.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * runtime/JSCell.h:

oliver@apple.com's avatar
oliver@apple.com committed
1718
1719
1720
1721
1722
1723
2010-05-07  Oliver Hunt  <oliver@apple.com>

        Windows build fix.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
2010-05-07  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoffrey Garen.

        Optimize access to the global object from a function that uses eval
        https://bugs.webkit.org/show_bug.cgi?id=38644

        Add op_resolve_global_dynamic, a variant of op_resolve_global that
        checks each node in the scope chain for dynamically inserted properties
        and falls back to the normal resolve logic in that case.

        * JavaScriptCore.exp:
        * bytecode/CodeBlock.cpp:
        (JSC::isGlobalResolve):
        (JSC::CodeBlock::printStructures):
        (JSC::CodeBlock::dump):
        (JSC::CodeBlock::derefStructures):
        * bytecode/Opcode.h:
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::findScopedProperty):
           Now take an additional reference parameter to used to indicate that
           there were nodes that may gain dynamic properties
        (JSC::BytecodeGenerator::emitResolve):
        (JSC::BytecodeGenerator::emitResolveBase):
        (JSC::BytecodeGenerator::emitResolveWithBase):
           deal with additional argument to findScopedProperty
        * bytecompiler/BytecodeGenerator.h:
        * bytecompiler/NodesCodegen.cpp:
        (JSC::FunctionCallResolveNode::emitBytecode):
        (JSC::PostfixResolveNode::emitBytecode):
        (JSC::PrefixResolveNode::emitBytecode):
        (JSC::ReadModifyResolveNode::emitBytecode):
        (JSC::AssignResolveNode::emitBytecode):
           These functions use findScopedProperty directly in order to
           optimise lookup.  They cannot trivially handle any degree of
           dynamism in the lookup so we just give up in such case.
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::resolveGlobalDynamic):
        (JSC::Interpreter::execute):
        (JSC::Interpreter::privateExecute):
        * interpreter/Interpreter.h:
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompileSlowCases):
        * jit/JIT.h:
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_resolve_global):
        (JSC::JIT::emit_op_resolve_global_dynamic):
        (JSC::JIT::emitSlow_op_resolve_global):
        (JSC::JIT::emitSlow_op_resolve_global_dynamic):
           Happily resolve_global_dynamic can share the slow case!
        * jit/JITStubs.h:
        (JSC::):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::isDynamicScope):
        * runtime/JSActivation.h:
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::isDynamicScope):
        * runtime/JSGlobalObject.h:
        * runtime/JSStaticScopeObject.cpp:
        (JSC::JSStaticScopeObject::isDynamicScope):
        * runtime/JSStaticScopeObject.h:
        * runtime/JSVariableObject.h:

1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
2010-05-07  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Gavin Barraclough.

        Fixed Sputnik failure seen on buildbot.

        * runtime/NumberPrototype.cpp:
        (JSC::numberProtoFuncToString): Cast to unsigned before checking magnitude,
        to efficiently exclude negative numbers, which require two characters
        instead of one.

1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
2010-05-07  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Alexey Proskuryakov.
        
        Slightly more effective way to guarantee a compile-time constant, at
        least on gcc.

        * runtime/NumberPrototype.cpp:
        (JSC::numberProtoFuncToString): Use pointer notation instead of array
        notation, so the compiler treats the string and its contents as constant.

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
2010-05-07  Adam Barth  <abarth@webkit.org>

        Reviewed by Alexey Proskuryakov.

        [WTFURL] Add core URL parser
        https://bugs.webkit.org/show_bug.cgi?id=38572

        This patch adds the core of the URL parser.  The URL parser uses a
        templated notion of a code unit to support different string types.
        Later we'll add some non-templated APIs with concrete types that
        clients can use more conveniently.

        The URLParser has a couple calls to ASSERT(), which I've commented out
        for now.  I'm not 100% sure how to handle the dependency issues there
        yet, so I've punted on the issue for now.

        Also, there are a number of methods that are declared public in this
        patch that are only used by the canonicalizer.  My plan is to make
        those private or protected and make the canonicalizer a friend of the
        parser.  The details will be in a later patch.

        * wtf/url/src/URLComponent.h:
        (WTF::URLComponent::fromRange):
        (WTF::URLComponent::isNonEmpty):
        (WTF::URLComponent::isEmptyOrInvalid):
        * wtf/url/src/URLParser.h: Added.
        (WTF::URLParser::):
        (WTF::URLParser::isPossibleAuthorityTerminator):
        (WTF::URLParser::parseAuthority):
        (WTF::URLParser::extractScheme):
        (WTF::URLParser::parseAfterScheme):
        (WTF::URLParser::parseStandardURL):
        (WTF::URLParser::parsePath):
        (WTF::URLParser::parsePathURL):
        (WTF::URLParser::parseMailtoURL):
        (WTF::URLParser::parsePort):
        (WTF::URLParser::extractFileName):
        (WTF::URLParser::extractQueryKeyValue):
        (WTF::URLParser::isURLSlash):
        (WTF::URLParser::shouldTrimFromURL):
        (WTF::URLParser::trimURL):
        (WTF::URLParser::consecutiveSlashes):
        (WTF::URLParser::isPortDigit):
        (WTF::URLParser::nextAuthorityTerminator):
        (WTF::URLParser::parseUserInfo):
        (WTF::URLParser::parseServerInfo):

1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
2010-05-07  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        Added a fast path for number-to-character conversion via
        Number.prototype.toString base 36.
        
        0.7% speedup on SunSpider.

        * runtime/NumberPrototype.cpp:
        (JSC::numberProtoFuncToString): Made radix interpretation a little more
        efficient by keeping it in int space. Turned "const char" into
        "static const char" just in case. Added a fast path for base 36
        conversion of something that will turn into a character.

1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
2010-05-07  Adam Barth  <abarth@webkit.org>

        Reviewed by Darin Fisher.

        [WTFURL] Add a malloc-backed URLBuffer
        https://bugs.webkit.org/show_bug.cgi?id=38694

        This patch adds a URLBuffer that uses new/delete to manage the backing
        store for the buffer.

        * wtf/url/src/RawURLBuffer.h: Added.
        (WTF::RawURLBuffer::RawURLBuffer):
        (WTF::RawURLBuffer::~RawURLBuffer):
        (WTF::RawURLBuffer::resize):

1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
2010-05-06  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Alexey Proskuryakov.

        JavaScriptCore/wtf/RandomNumber.h should provide using WTF::*
        https://bugs.webkit.org/show_bug.cgi?id=38719

        * wtf/RandomNumber.h:
          Add using directives.

1897
1898
1899
1900
1901
1902
1903
1904
1905
2010-05-06  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Enable YARR_JIT for X86 Mac for QtWebKit
        https://bugs.webkit.org/show_bug.cgi?id=38668

        * wtf/Platform.h:

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
2010-05-06  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Geoff Garen.

        Bug 38714 - Add result caching for Math.sin

        Math.sin is frequently called with the same operand, caching the result should
        improve performance.  CachedTranscendentalFunction adds a generic mechanism to
        cache results for pure functions with the signature "double func(double)", and
        where NaN maps to NaN.

        CachedTranscendentalFunction uses a very simple hash function designed to be
        fast to execute since we cannot cache the result, and trivial to JIT generate,
        should we wish to do so.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * runtime/CachedTranscendentalFunction.h: Added.
        (JSC::CachedTranscendentalFunction::CachedTranscendentalFunction):
        (JSC::CachedTranscendentalFunction::~CachedTranscendentalFunction):
        (JSC::CachedTranscendentalFunction::operator()):
        (JSC::CachedTranscendentalFunction::initialize):
        (JSC::CachedTranscendentalFunction::hash):
        * runtime/JSGlobalData.h:
        * runtime/MathObject.cpp:
        (JSC::mathProtoFuncSin):
        * wtf/Platform.h:

ggaren@apple.com's avatar
ggaren@apple.com committed
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
2010-05-06  Geoffrey Garen  <ggaren@apple.com>

        Windows build fix.

        * bytecode/SamplingTool.cpp:
        (JSC::SamplingFlags::sample): Use a cast, so Windows will be happy when
        this code is enabled.
        * wtf/Platform.h: Reverted last change to this file, which seems to have
        been accidental.

1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
2010-05-06  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Oliver Hunt.

        Add compile switch to make debugger keyword plant breakpoint instructions.

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::emitDebugHook):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_debug):
        * wtf/Platform.h:

oliver@apple.com's avatar
oliver@apple.com committed
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
2010-05-06  Oliver Hunt  <oliver@apple.com>

        Build fix

        Fix ARM builds

        * assembler/MacroAssemblerARM.h:
        (JSC::MacroAssemblerARM::load16):
        * assembler/MacroAssemblerARMv7.h:
        (JSC::MacroAssemblerARMv7::load16):

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
2010-05-06  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoffrey Garen.

        Improve performance of single character string compares
        https://bugs.webkit.org/show_bug.cgi?id=38659

        Add logic to the jit to identify comparisons to single character string literals
        and then just perform the comparison inline, rather than ignoring the evidence
        and attempting to perform an integer comparison.

        Multiple changes required -- add jnlesseq opcode, add helper function to identify
        single character string constants, add a helper to load single character strings.
        Then add the 32_64 and normal codepaths to the JIT.

        * assembler/MacroAssemblerX86Common.h:
        (JSC::MacroAssemblerX86Common::load16):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        * bytecode/Opcode.h:
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::emitJumpIfTrue):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompileSlowCases):
        * jit/JIT.h:
        * jit/JITArithmetic.cpp:
        (JSC::JIT::emit_op_jnless):
        (JSC::JIT::emitSlow_op_jnless):
        (JSC::JIT::emit_op_jless):
        (JSC::JIT::emitSlow_op_jless):
        (JSC::JIT::emit_op_jlesseq):
        (JSC::JIT::emit_op_jnlesseq):
        (JSC::JIT::emitSlow_op_jlesseq):
        (JSC::JIT::emitSlow_op_jnlesseq):
        * jit/JITArithmetic32_64.cpp:
        (JSC::JIT::emit_op_jnless):
        (JSC::JIT::emitSlow_op_jnless):
        (JSC::JIT::emit_op_jless):
        (JSC::JIT::emitSlow_op_jless):
        (JSC::JIT::emit_op_jlesseq):
        (JSC::JIT::emit_op_jnlesseq):
        (JSC::JIT::emitSlow_op_jlesseq):
        (JSC::JIT::emitSlow_op_jnlesseq):
        (JSC::JIT::emitBinaryDoubleOp):
        * jit/JITInlineMethods.h:
        (JSC::JIT::emitLoadCharacterString):
        (JSC::JIT::isOperandConstantImmediateChar):
        * jit/JSInterfaceJIT.h:
        (JSC::ThunkHelpers::stringImplDataOffset):
        (JSC::ThunkHelpers::jsStringLengthOffset):
        (JSC::ThunkHelpers::jsStringValueOffset):
         Moved from ThunkGenerators to make it possible to share.
        * jit/ThunkGenerators.cpp:

2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2010-05-06  Martin Robinson  <mrobinson@webkit.org>

        Reviewed by Gustavo Noronha Silva.

        [GTK] Enable DOM clipboard and drag-and-drop access
        https://bugs.webkit.org/show_bug.cgi?id=30623

        Convert dragging portion of drag-and-drop to use DataObjectGtk.

        * wtf/gobject/GRefPtr.h: Add forward declarations for GObject functions.

2034
2035
2036
2037
2038
2039
2040
2041
2042
2010-05-06  Steve Block  <steveblock@google.com>

        Reviewed by Eric Seidel.

        MAC_JAVA_BRIDGE should be renamed JAVA_BRIDGE
        https://bugs.webkit.org/show_bug.cgi?id=38544

        * wtf/Platform.h:

2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2010-05-06  Adam Barth  <abarth@webkit.org>

        Reviewed by Maciej Stachowiak.

        [WTFURL] Add a class to represent the segments of a URL
        https://bugs.webkit.org/show_bug.cgi?id=38566

        When paired with a string, this class represents a parsed URL.

        * wtf/url/src/URLSegments.cpp: Added.
        (WTF::URLSegments::length):
        (WTF::URLSegments::charactersBefore):
        * wtf/url/src/URLSegments.h: Added.
        (WTF::URLSegments::):
        (WTF::URLSegments::URLSegments):
        * wtf/url/wtfurl.gyp:

2060
2061
2062
2063
2064
2065
2066
2067
2068
2010-05-05  Tony Gentilcore  <tonyg@chromium.org>

        Reviewed by Adam Barth.

        Adding comment with link to RefPtr documentation.
        https://bugs.webkit.org/show_bug.cgi?id=38601

        * wtf/RefPtr.h:

2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2010-05-05  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Darin Adler.

        Bug 38604 - workers-gc2 crashing on Qt

        This appears to be due to a couple of issues.
        (1) When the atomic string table is deleted it does not clear the 'inTable' bit
        on AtomicStrings - it implicitly assumes that all AtomicStrings have already
        been deleted at this point (otherwise they will crash in their destructor when
        they try to remove themselves from the atomic string table).
        (2) We don't fix the ordering in which WTF::WTFThreadData and
        WebCore::ThreadGlobalData are destructed.

        We should make sure that ThreadGlobalData is cleaned up before worker threads
        terminate and WTF::WTFThreadData is destroyed, and we should clear the inTable
        bit of members on atomic string table destruction.

        WTF changes (fix issue 1, above) - ensure inTable property is cleared when the
        atomic string table is destroyed (also, rename InTable to IsAtomic, to make it
        clear which table we are refering to!)

        * wtf/text/AtomicString.cpp:
        (WebCore::AtomicStringTable::destroy):
        (WebCore::CStringTranslator::translate):
        (WebCore::UCharBufferTranslator::translate):
        (WebCore::HashAndCharactersTranslator::translate):
        (WebCore::AtomicString::add):
        * wtf/text/StringImpl.cpp:
        (WebCore::StringImpl::~StringImpl):
        * wtf/text/StringImpl.h:
        (WebCore::StringImpl::isAtomic):
        (WebCore::StringImpl::setIsAtomic):
        * wtf/text/StringImplBase.h:

2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2010-05-05  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoffrey Garen.

        Make Array.join specialised for actual arrays
        https://bugs.webkit.org/show_bug.cgi?id=38592

        Bring Array.join in line with the other array methods by specialising for
        this === an array.

        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncJoin):

2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2010-05-04  Yongjun Zhang  <yongjun_zhang@apple.com>

        Reviewed by Darin Adler.

        WebKit crashes at DebuggerCallFrame::functionName() if m_callFrame is the top global callframe.
        https://bugs.webkit.org/show_bug.cgi?id=38535

        Don't call asFunction if callee is not a FunctionType to prevent assertion failure
        in JSCell::isObject().

        * debugger/DebuggerCallFrame.cpp:
        (JSC::DebuggerCallFrame::functionName):
        (JSC::DebuggerCallFrame::calculatedFunctionName):

2131
2132
2133
2134
2135
2136
2010-05-04  Steve Falkenburg  <sfalken@apple.com>

        Remove redundant exports to fix Windows build warnings.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2010-05-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>

        Reviewed by Holger Freyther.

        Fix a memory leak inside the QScriptValue.

        QSciptValuePrivate::toString should release all temporary variables.

        [Qt] QScriptValue::toString have a memory leak.
        https://bugs.webkit.org/show_bug.cgi?id=38112

        * qt/api/qscriptvalue_p.h:
        (QScriptValuePrivate::toString):

2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2010-05-04  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        Reviewed by Darin Adler.

        Does not work on SPARC because of alignment issues
        https://bugs.webkit.org/show_bug.cgi?id=38455

        Use AllocAlignmentInteger instead of void* on pageheap_memory to
        avoid crashing at runtime in some architectures. Investigated by
        Mike Hommey <mh@glandium.org>, change suggested by Darin Adler.

        * wtf/FastMalloc.cpp:

2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2010-05-04  Adam Barth  <abarth@webkit.org>

        Reviewed by Maciej Stachowiak.

        Add first WTFURL file
        https://bugs.webkit.org/show_bug.cgi?id=38470

        This class represents a component of a URL, such as the scheme or path.
        Essentially, the class is an index into a string buffer.

        * wtf/url: Added.
            - There was some discussion about where to put the URL library.
              There are a number of reasonable options, but putting the library
              in the WTF directory seems like a reasonable alternative.  This
              location will make more sense once WTF is moved out of
              JavaScriptCore and into a top-level directory.
        * wtf/url/src: Added.
            - I've added this extra directory to the usual structure because we
              eventually want a "public" folder that defines the public
              interface to this library that clients outside of svn.webkit.org
              can rely upon, much like the various subfolders of the WebKit
              directory often define a public API.
        * wtf/url/src/URLComponent.h: Added.
            - I've added this somewhat trivial class to get the ball rolling.
        (WTF::URLComponent::URLComponent):
        (WTF::URLComponent::isValid):
        (WTF::URLComponent::isNonempty):
        (WTF::URLComponent::reset):
        (WTF::URLComponent::operator==):
        (WTF::URLComponent::begin):
        (WTF::URLComponent::setBegin):
        (WTF::URLComponent::length):
        (WTF::URLComponent::setLength):
        (WTF::URLComponent::end):
        * wtf/url/wtfurl.gyp: Added.
            - WTFURL will be an independently buildable library, hence the
              beginnings of a wtfurl.gyp file.

2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2010-05-03  Stephanie Lewis  <slewis@apple.com>

        Reviewed by Geoff Garen.

        https://bugs.webkit.org/show_bug.cgi?id=38368
        <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 
        (return memory quicker).
        Instead of returning everything but the smallest spans spread out 
        the spans kept over several size lists.

        * wtf/FastMalloc.cpp:
        (WTF::TCMalloc_PageHeap::scavenge):

2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2010-05-03  James Robinson  <jamesr@chromium.org>

        Reviewed by Eric Seidel.

        Clean up a few compiler warnings
        https://bugs.webkit.org/show_bug.cgi?id=38073

        * wtf/text/StringImpl.cpp:
        (WebCore::StringImpl::ascii):

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
2010-05-03  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by NOBODY (reverting previous commit).

        Rolling out r58114 - this introduced memory leaks of
        AtomicStrings then workers terminated.

        * GNUmakefile.am:
        * JavaScriptCore.gypi:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * jit/ThunkGenerators.cpp:
        (JSC::ThunkHelpers::stringImplDataOffset):
        * runtime/Identifier.cpp:
        (JSC::IdentifierTable::~IdentifierTable):
        (JSC::IdentifierTable::add):
        (JSC::IdentifierCStringTranslator::hash):
        (JSC::IdentifierCStringTranslator::equal):
        (JSC::IdentifierCStringTranslator::translate):
        (JSC::Identifier::add):
        (JSC::IdentifierUCharBufferTranslator::hash):
        (JSC::IdentifierUCharBufferTranslator::equal):
        (JSC::IdentifierUCharBufferTranslator::translate):
        (JSC::Identifier::addSlowCase):
        * runtime/Identifier.h:
        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        (JSC::JSGlobalData::~JSGlobalData):
        * runtime/JSGlobalData.h:
        * wtf/WTFThreadData.cpp:
        (WTF::WTFThreadData::WTFThreadData):
        (WTF::WTFThreadData::~WTFThreadData):
        * wtf/WTFThreadData.h:
        (JSC::IdentifierTable::remove):
        (JSC::IdentifierTable::literalTable):
        (WTF::WTFThreadData::atomicStringTable):
        * wtf/text/AtomicString.cpp:
        (WebCore::AtomicStringTable::create):
        (WebCore::AtomicStringTable::table):
        (WebCore::AtomicStringTable::destroy):
        (WebCore::stringTable):
        (WebCore::CStringTranslator::hash):
        (WebCore::CStringTranslator::equal):
        (WebCore::CStringTranslator::translate):
        (WebCore::operator==):
        (WebCore::AtomicString::add):
        (WebCore::equal):
        (WebCore::UCharBufferTranslator::hash):
        (WebCore::UCharBufferTranslator::equal):
        (WebCore::UCharBufferTranslator::translate):
        (WebCore::HashAndCharactersTranslator::hash):
        (WebCore::HashAndCharactersTranslator::equal):
        (WebCore::HashAndCharactersTranslator::translate):
        (WebCore::AtomicString::find):
        (WebCore::AtomicString::remove):
        * wtf/text/AtomicStringTable.h: Removed.
        * wtf/text/StringImpl.cpp:
        (WebCore::StringImpl::~StringImpl):
        * wtf/text/StringImpl.h:
        (WebCore::StringImpl::inTable):
        (WebCore::StringImpl::setInTable):
        (WebCore::equal):
        * wtf/text/StringImplBase.h:
        (WTF::StringImplBase::StringImplBase):

2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2010-05-03  Kevin Watters  <kevinwatters@gmail.com>

        Reviewed by Kevin Ollivier.

        [wx] Implement scheduleDispatchFunctionsOnMainThread for wx port.
        https://bugs.webkit.org/show_bug.cgi?id=38480

        * wtf/wx/MainThreadWx.cpp:
        (wxCallAfter::wxCallAfter):
        (wxCallAfter::OnCallback):
        (WTF::scheduleDispatchFunctionsOnMainThread):

2302
2303
2304
2305
2306
2307
2308
2309
2310
2010-05-03  Kevin Watters  <kevinwatters@gmail.com>

        Reviewed by Kevin Ollivier.

        [wx] Build and use Mac's ComplexTextController to support complex text in wx.
        https://bugs.webkit.org/show_bug.cgi?id=38482

        * wtf/Platform.h:

2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2010-05-03  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej Stachowiak.

        Interpreter crashes due to incorrect refcounting of cached structures.
        https://bugs.webkit.org/show_bug.cgi?id=38491
        rdar://problem/7926160

        Make sure we ref/deref structures used for cached custom property getters

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::derefStructures):
        (JSC::CodeBlock::refStructures):

2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2010-05-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Eric Seidel.

        [Qt] Enable JIT for QtWebKit on Symbian
        https://bugs.webkit.org/show_bug.cgi?id=38339

        JIT on Symbian has been stable for quite some time, it
        is time to turn it on by default.

        * wtf/Platform.h:

2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2010-04-29  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Add codegen support for unsigned right shift
        https://bugs.webkit.org/show_bug.cgi?id=38375

        Expose unsigned right shift in the macro assembler, and make use of it
        from the jit.  Currently if the result is outside the range 0..2^31-1
        we simply fall back to the slow case, even in JSVALUE64 and JSVALUE32_64
        where technically we could still return an immediate value.

        * assembler/MacroAssemblerARM.h:
        (JSC::MacroAssemblerARM::urshift32):
        * assembler/MacroAssemblerARMv7.h:
        (JSC::MacroAssemblerARMv7::urshift32):
        * assembler/MacroAssemblerX86Common.h:
        (JSC::MacroAssemblerX86Common::urshift32):
        * assembler/X86Assembler.h:
        (JSC::X86Assembler::):
        (JSC::X86Assembler::shrl_i8r):
        (JSC::X86Assembler::shrl_CLr):
           Add unsigned right shift to the x86 assembler
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompileSlowCases):
           op_rshift no longer simply get thrown to a stub function
        * jit/JIT.h:
        * jit/JITArithmetic.cpp:
        (JSC::JIT::emit_op_urshift):
        (JSC::JIT::emitSlow_op_urshift):
          JSVALUE32 and JSVALUE64 implementation.  Only supports
          double lhs in JSVALUE64.
        * jit/JITArithmetic32_64.cpp:
        (JSC::JIT::emit_op_rshift):
        (JSC::JIT::emitSlow_op_rshift):
        (JSC::JIT::emit_op_urshift):
        (JSC::JIT::emitSlow_op_urshift):
          Refactor right shift code to have shared implementation between signed
          and unsigned versions.

2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2010-04-29  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Handle double on righthand side of a right shift
        https://bugs.webkit.org/show_bug.cgi?id=38363

        In 64-bit we support right shift of a double, and there's no
        reason not to in 32-bit either.  This is a 1.1% sunspider
        improvement in 32bit.

        Given high performance javascript code frequently makes
        use of bit operators to perform double->int conversion i'll
        follow this patch up with similar patches for bitwise 'and'
        and 'or'.

        * jit/JITArithmetic32_64.cpp:
        (JSC::JIT::emit_op_rshift):
        (JSC::JIT::emitSlow_op_rshift):

2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2010-04-29  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoff Garen.

        Hoist JSVALUE32_64 arithmetic implementations into a separate file.

        * GNUmakefile.am:
        * JavaScriptCore.gypi:
        * JavaScriptCore.pro:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * jit/JITArithmetic.cpp:
        (JSC::JIT::emitSlow_op_jnless):
        (JSC::JIT::emitSlow_op_jless):
        (JSC::JIT::emitSlow_op_jnlesseq):
        (JSC::JIT::emit_op_mod):
        (JSC::JIT::compileBinaryArithOpSlowCase):
        (JSC::JIT::emit_op_div):
        (JSC::JIT::compileBinaryArithOp):
        * jit/JITArithmetic32_64.cpp: Added.
        (JSC::JIT::emit_op_negate):
        (JSC::JIT::emitSlow_op_negate):
        (JSC::JIT::emit_op_jnless):
        (JSC::JIT::emitSlow_op_jnless):
        (JSC::JIT::emit_op_jless):
        (JSC::JIT::emitSlow_op_jless):
        (JSC::JIT::emit_op_jnlesseq):
        (JSC::JIT::emitSlow_op_jnlesseq):
        (JSC::JIT::emit_op_lshift):
        (JSC::JIT::emitSlow_op_lshift):
        (JSC::JIT::emit_op_rshift):
        (JSC::JIT::emitSlow_op_rshift):
        (JSC::JIT::emit_op_bitand):
        (JSC::JIT::emitSlow_op_bitand):
        (JSC::JIT::emit_op_bitor):
        (JSC::JIT::emitSlow_op_bitor):
        (JSC::JIT::emit_op_bitxor):
        (JSC::JIT::emitSlow_op_bitxor):
        (JSC::JIT::emit_op_bitnot):
        (JSC::JIT::emitSlow_op_bitnot):
        (JSC::JIT::emit_op_post_inc):
        (JSC::JIT::emitSlow_op_post_inc):
        (JSC::JIT::emit_op_post_dec):
        (JSC::JIT::emitSlow_op_post_dec):
        (JSC::JIT::emit_op_pre_inc):
        (JSC::JIT::emitSlow_op_pre_inc):
        (JSC::JIT::emit_op_pre_dec):
        (JSC::JIT::emitSlow_op_pre_dec):
        (JSC::JIT::emit_op_add):
        (JSC::JIT::emitAdd32Constant):
        (JSC::JIT::emitSlow_op_add):
        (JSC::JIT::emit_op_sub):
        (JSC::JIT::emitSub32Constant):
        (JSC::JIT::emitSlow_op_sub):
        (JSC::JIT::emitBinaryDoubleOp):
        (JSC::JIT::emit_op_mul):
        (JSC::JIT::emitSlow_op_mul):
        (JSC::JIT::emit_op_div):
        (JSC::JIT::emitSlow_op_div):
        (JSC::JIT::emit_op_mod):
        (JSC::JIT::emitSlow_op_mod):

2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2010-04-29  Zoltan Herczeg  <zherczeg@webkit.org>

        Reviewed by Oliver Hunt

        Add sqrt() instruction support for ARM assembler (using VFP)
        https://bugs.webkit.org/show_bug.cgi?id=38312

        * assembler/ARMAssembler.h:
        (JSC::ARMAssembler::):
        (JSC::ARMAssembler::fsqrtd_r):
        * assembler/MacroAssemblerARM.h:
        (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
        (JSC::MacroAssemblerARM::sqrtDouble):

2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2010-04-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Simon Hausmann.

        [Qt] Refactor qtscriptglobal.h
        https://bugs.webkit.org/show_bug.cgi?id=37953

        Use the same pattern in qtscriptglobal.h as in 
        qwebkitglobal.h without checking for specific OSs.

        * qt/api/qtscriptglobal.h:

2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2010-04-29  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>

        Reviewed by Simon Hausmann.

        Small cleanup.

        QScriptValuePrivate constructor shouldn't take QScriptEngine pointer
        as a parameter, because it breaks a private / public separation rule.
        QScriptEnginePrivate::get(QScriptEngine*) should return
        a QScriptEnginePrivate pointer instead of a QScriptEnginePtr, it simplifies
        implementation.

        [Qt] QScriptValuePrivate class needs some cleanup.
        https://bugs.webkit.org/show_bug.cgi?id=37729

        * qt/api/qscriptengine_p.h:
        (QScriptEnginePrivate::get):
        * qt/api/qscriptvalue.cpp:
        (QScriptValue::QScriptValue):
        * qt/api/qscriptvalue_p.h:
        (QScriptValuePrivate::QScriptValuePrivate):

2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2010-04-29  Kwang Yul Seo  <skyul@company100.net>

        Reviewed by Simon Hausmann.

        [WINCE] Export g_stackBase with JS_EXPORTDATA
        https://bugs.webkit.org/show_bug.cgi?id=37437

        Export g_stackBase with JS_EXPORTDATA as it is used by SharedTimerWince.cpp.

        * runtime/Collector.cpp:

2519
2520
2521
2522
2523
2524
2525
2526
2527
2010-04-28  Oliver Hunt  <oliver@apple.com>

        Do an unordered compare so that we don't treat NaN incorrectly.

        RS=Gavin Barraclough

        * jit/ThunkGenerators.cpp:
        (JSC::powThunkGenerator):

2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2010-04-28  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Add fast paths for Math.pow and Math.sqrt
        https://bugs.webkit.org/show_bug.cgi?id=38294

        Add specialized thunks for Math.pow and Math.sqrt.
        This requires adding a sqrtDouble function to the MacroAssembler
        and sqrtsd to the x86 assembler.

        Math.pow is slightly more complicated, in that we have
        to implement exponentiation ourselves rather than relying
        on hardware support.  The inline exponentiation is restricted
        to positive integer exponents on a numeric base.  Exponentiation
        is finally performed through the "Exponentiation by Squaring"
        algorithm.

        * assembler/AbstractMacroAssembler.h:
        (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
        * assembler/MacroAssemblerARM.h:
        (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
        (JSC::MacroAssemblerARM::loadDouble):
        (JSC::MacroAssemblerARM::sqrtDouble):
        * assembler/MacroAssemblerARMv7.h:
        (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
        (JSC::MacroAssemblerARMv7::sqrtDouble):
        * assembler/MacroAssemblerX86.h:
        (JSC::MacroAssemblerX86::loadDouble):
        (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
        * assembler/MacroAssemblerX86Common.h:
        (JSC::MacroAssemblerX86Common::sqrtDouble):
        * assembler/MacroAssemblerX86_64.h:
        (JSC::MacroAssemblerX86_64::loadDouble):
        (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
        * assembler/X86Assembler.h:
        (JSC::X86Assembler::):
        (JSC::X86Assembler::movsd_mr):
        (JSC::X86Assembler::sqrtsd_rr):
        (JSC::X86Assembler::X86InstructionFormatter::twoByteOp):
        (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
        * create_hash_table:
        * jit/JIT.h:
        * jit/JITInlineMethods.h:
        * jit/JITOpcodes.cpp:
        * jit/JITStubs.h:
        (JSC::JITThunks::ctiNativeCallThunk):
        * jit/JSInterfaceJIT.h:
        (JSC::JSInterfaceJIT::emitLoadDouble):
        (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber):
        (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber):
        (JSC::JSInterfaceJIT::emitLoadInt32):
        * jit/SpecializedThunkJIT.h:
        (JSC::SpecializedThunkJIT::loadDoubleArgument):
        (JSC::SpecializedThunkJIT::loadInt32Argument):
        (JSC::SpecializedThunkJIT::returnJSValue):
        (JSC::SpecializedThunkJIT::returnDouble):
        (JSC::SpecializedThunkJIT::finalize):
        * jit/ThunkGenerators.cpp:
        (JSC::sqrtThunkGenerator):
        (JSC::powThunkGenerator):
        * jit/ThunkGenerators.h:
        * runtime/Executable.h:
        (JSC::NativeExecutable::NativeExecutable):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::JSFunction):

2595
2596
2597
2598
2599
2600
2601
2602
2603
2010-04-28  Mike Thole  <mthole@apple.com>

        Reviewed by Mark Rowe.

        Reenable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK now that an
        exports file for it has been added.

        * wtf/Platform.h:

mthole@apple.com's avatar
mthole@apple.com committed
2604
2605
2606
2607
2608
2609
2610
2010-04-28  Mike Thole  <mthole@apple.com>

        Build fix, not reviewed.

        * wtf/Platform.h:
        Disable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK until an exports file is created.

2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2010-04-28  Mike Thole  <mthole@apple.com>

        Reviewed by David Kilzer.

        Add canAuthenticateAgainstProtectionSpace() to frame loader so that a protection space 
        can be inspected before attempting to authenticate against it
        https://bugs.webkit.org/show_bug.cgi?id=38271

        * wtf/Platform.h: Add WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK define.

2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2010-04-28  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        Don't use CFAbsoluteTimeGetCurrent on Mac OS X, since it's just a cover
        for gettimeofday anyway.

        * wtf/CurrentTime.cpp:
        (WTF::currentTime): Remove the CF version of this. Change the "other POSIX"
        version to pass 0 for the time zone instead of ignoring a return value.
        Also get rid of unneeded type casts, since operations involving both
        integers and doubles are always evaluated as doubles in C without explicit
        type casting.

2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2010-04-28  Darin Fisher  <darin@chromium.org>

        Reviewed by David Levin.

        [Chromium] callOnMainThread should equate to MessageLoop::PostTask
        https://bugs.webkit.org/show_bug.cgi?id=38276

        * JavaScriptCore.gyp/JavaScriptCore.gyp:
        * wtf/MainThread.cpp:
        * wtf/chromium/ChromiumThreading.h:
        * wtf/chromium/MainThreadChromium.cpp:
        (WTF::initializeMainThread):
        (WTF::callOnMainThread):
        (WTF::callOnMainThreadAndWait):
        (WTF::setMainThreadCallbacksPaused):
        (WTF::isMainThread):

2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2010-04-28  Simon Hausmann  <simon.hausmann@nokia.com>, Kent Hansen <kent.hansen@nokia.com>

        Reviewed by Darin Adler.

        JSC's currentThreadStackBase is not reentrant on some platforms
        https://bugs.webkit.org/show_bug.cgi?id=37195

        This function needs to be reentrant to avoid memory corruption on platforms where
        the implementation uses global variables.

        This patch adds a mutex lock where necessary and makes the Symbian implementation
        reentrant.

        * runtime/Collector.cpp:
        (JSC::currentThreadStackBaseMutex):
        (JSC::currentThreadStackBase):

2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2010-04-28  Thiago Macieira <thiago.macieira@nokia.com>

        Reviewed by Simon Hausmann.

        Fix compilation with gcc 3.4.

        AtomicStringImpl.h:29: error: base `WebCore::StringImpl' with only
        non-default constructor in class without a constructor

        * wtf/text/AtomicStringImpl.h:
        (WebCore::AtomicStringImpl::AtomicStringImpl): Provide a default constructor.
        * wtf/text/StringImpl.h: Allow AtomicStringImpl to call a StringImpl constructor through a friend declaration.

slewis@apple.com's avatar
slewis@apple.com committed
2682
2683
2684
2685
2686
2687
2688
2010-04-27  Stephanie Lewis  <slewis@apple.com>

        Fix Tiger build.

        * wtf/FastMalloc.cpp:
        (WTF::TCMalloc_PageHeap::Carve):

2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2010-04-26  Stephanie Lewis  <slewis@apple.com>

        Reviewed by Geoff Garen.

        https://bugs.webkit.org/show_bug.cgi?id=38154 FastMalloc calls madvise too often.
        <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 (return memory quicker).  
        To save on madvise calls when recommitting memory recommit the entire span and then carve it
        instead of carving the span up and only committing the part that will be used immediately.

        * wtf/FastMalloc.cpp:
        (WTF::TCMalloc_PageHeap::New):
        (WTF::TCMalloc_PageHeap::AllocLarge):
        (WTF::TCMalloc_PageHeap::Carve):

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
2010-04-26  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej Stachowiak.

        Add specialized thunks for a char code related string functions
        https://bugs.webkit.org/show_bug.cgi?id=38177

        This is a simple extension to my prior patch.  Basically hoist the
        existing character loading logic from the charCodeAt thunk and into
        a helper function, then add a helper to load strings from the small
        string cache.  This allows trivial implementations of fromCharCode
        and charAt. 

        * create_hash_table:
        * jit/SpecializedThunkJIT.h:
        (JSC::SpecializedThunkJIT::returnJSCell):
        (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
        * jit/ThunkGenerators.cpp:
        (JSC::stringCharLoad):
        (JSC::charToString):
        (JSC::charCodeAtThunkGenerator):
        (JSC::charAtThunkGenerator):
        (JSC::fromCharCodeThunkGenerator):
        * jit/ThunkGenerators.h:
        * runtime/SmallStrings.h:
        (JSC::SmallStrings::singleCharacterStrings):
        * runtime/StringConstructor.cpp:
        (JSC::StringConstructor::StringConstructor):

2732
2733
2734
2735
2736
2737
2738
2739
2740
2010-04-27  Thomas Zander <t.zander@nokia.com>

        Reviewed by Simon Hausmann.

        [Qt] Fix the build on Symbian on Linux using the Makefile based mkspec

        * JavaScriptCore.pri: It is necessary to specify the library search path
        when linking against JavaScriptCore.

2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2010-04-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>

        Reviewed by Simon Hausmann.

        Compile fix for Visual Studio 2010
        https://bugs.webkit.org/show_bug.cgi?id=37867

        Patch by Prasanth Ullattil <prasanth.ullattil@nokia.com>

        * runtime/Structure.cpp:
        (JSC::Structure::transitionTableAdd):
        * wtf/MathExtras.h:
        * wtf/Platform.h:

2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2010-04-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>

        Reviewed by Simon Hausmann.

        Rename COMPILER(MSVC7) to COMPILER(MSVC7_OR_LOWER)

        * config.h:
        (JSC::Structure::transitionTableAdd):
        * wtf/Assertions.h:
        * wtf/Atomics.h:
        * wtf/CurrentTime.h:
        (WTF::getLocalTime):
        * wtf/Platform.h:
        * wtf/StaticConstructors.h:
        * wtf/StringExtras.h:
        * wtf/Vector.h:
        (WTF::::append):

2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2010-04-15  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>

        Reviewed by Tor Arne Vestbø.

        [Qt] Fix Mac build break.

        https://bugs.webkit.org/show_bug.cgi?id=37867
        - Make sure JavaScriptCore's debug_and_release config follows that
          of WebCore.
        - Use different name for JavaScriptCore target in debug and release
          since they might be written in the same path at the same time on
          parallel builds
        - Consolidate the DESTDIR determination logic in JavaScriptCore.pri

        * JavaScriptCore.pri:
        * JavaScriptCore.pro:

2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2010-04-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Make sure WebKit is not compiled using C++0x.
        https://bugs.webkit.org/show_bug.cgi?id=37867

        As the rest of Qt compiles in the C++0x mode, people might start
        compiling it in this mode. WebKit don't support this yet.

        Patch by Thiago Macieira <thiago.macieira@nokia.com>

        * JavaScriptCore.pro:

oliver@apple.com's avatar
oliver@apple.com committed
2804
2805
2806
2807
2808
2809
2810
2010-04-26  Oliver Hunt  <oliver@apple.com>

        Fix windows

        * jit/SpecializedThunkJIT.h:
        (JSC::SpecializedThunkJIT::argumentToVirtualRegister):

2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2010-04-26  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Need to support more efficient dispatch of lightweight builtins
        https://bugs.webkit.org/show_bug.cgi?id=38155

        The problem with calling lightweight builtins is that marshalling
        the call from the nitro calling convention to the system calling
        convention is very expensive relative to the cost of the actually
        evaluating the function.  To work around this problem this patch
        adds the ability to define a custom thunk for a builtin.

        This allows us to use high performance custom implementations of
        the common and sensible versions of simple builtins.  This patch
        includes a simple (use of which is currently hardcoded) thunk for
        charCodeAt.

        This adds a JSInterfaceJIT subclass called SpecializedThunkJIT
        that has helper functions to remove (or at least reduce) the need
        to have separate thunk implementations for each JSValue encoding.

        * GNUmakefile.am:
        * JavaScriptCore.pro:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
          Many project file updates

        * create_hash_table:
          Add thunk generation callbacks to the hash tables, currently
          we hardcode the script to only support charCodeAt

        * jit/JITStubCall.h:
        * jit/JITStubs.cpp:
        (JSC::JITThunks::~JITThunks):
        (JSC::JITThunks::specializedThunk):
        * jit/JITStubs.h:
        * jit/SpecializedThunkJIT.h: Added.
        (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
        (JSC::SpecializedThunkJIT::loadCellArgument):
        (JSC::SpecializedThunkJIT::loadJSStringArgument):
        (JSC::SpecializedThunkJIT::loadInt32Argument):
        (JSC::SpecializedThunkJIT::appendFailure):
        (JSC::SpecializedThunkJIT::returnInt32):
        (JSC::SpecializedThunkJIT::finalize):
        (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
        (JSC::SpecializedThunkJIT::tagReturnAsInt32):
        * jit/ThunkGenerators.cpp: Added.
        (JSC::ThunkHelpers::stringImplDataOffset):
        (JSC::ThunkHelpers::jsStringLengthOffset):
        (JSC::ThunkHelpers::jsStringValueOffset):
        (JSC::charCodeAtThunkGenerator):
        * jit/ThunkGenerators.h: Added.
        * runtime/Executable.h:
        (JSC::NativeExecutable::NativeExecutable):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::JSFunction):
        * runtime/JSFunction.h:
        * runtime/JSGlobalData.h:
        (JSC::JSGlobalData::getThunk):
        * runtime/JSString.h:
        (JSC::):
        * runtime/JSValue.h:
          Protect some of the JSVALUE32 and JSVALUE32_64 only constants
          and function behind appropriate USE() guards to make it harder
          to use the wrong flags for the target build.
        * runtime/Lookup.cpp:
        (JSC::HashTable::createTable):
        (JSC::setUpStaticFunctionSlot):
        * runtime/Lookup.h:
        (JSC::HashEntry::initialize):
        (JSC::HashEntry::generator):
        (JSC::HashEntry::):
          Make the lookup tables use a specialized thunkGenerator
          if present
        * wtf/text/StringImpl.h:

oliver@apple.com's avatar
oliver@apple.com committed
2888
2889
2890
2891
2892
2893
2894
2010-04-26  Oliver Hunt  <oliver@apple.com>

        Build fix

        * runtime/JSImmediate.h:
        * runtime/JSValue.h:

2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2010-04-26  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Factor some basic JS interface logic out of JIT and into a superclass
        https://bugs.webkit.org/show_bug.cgi?id=38163

        Create JSInterfaceJIT to hold some common low level functions for
        interacting with the JS RegisterFile.  Doing this separately from
        https://bugs.webkit.org/show_bug.cgi?id=38155 to ease reviewing.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * jit/JIT.h:
        * jit/JITInlineMethods.h:
        (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
        * jit/JSInterfaceJIT.h: Added.
        (JSC::JSInterfaceJIT::emitLoadJSCell):
        (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
        (JSC::JSInterfaceJIT::emitLoadInt32):
        (JSC::JSInterfaceJIT::tagFor):
        (JSC::JSInterfaceJIT::payloadFor):
        (JSC::JSInterfaceJIT::addressFor):

weinig@apple.com's avatar
weinig@apple.com committed
2918
2919
2920
2921
2922
2923
2924
2010-04-26  Sam Weinig  <sam@webkit.org>

        Fix Tiger build.

        * wtf/mac/MainThreadMac.mm:
        (WTF::isMainThread):

ggaren@apple.com's avatar
ggaren@apple.com committed
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2010-04-26  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        <rdar://problem/7766413>
        
        Fixed a crash seen when using the JavaScriptCore API with WebKit.
        
        No layout test because DumpRenderTree doesn't use the JavaScriptCore API
        in this way.

        * interpreter/RegisterFile.cpp:
        (JSC::RegisterFile::setGlobalObject):
        (JSC::RegisterFile::clearGlobalObject):
        (JSC::RegisterFile::globalObject):
        * interpreter/RegisterFile.h:
        (JSC::RegisterFile::RegisterFile): Use WeakGCPtr for managing m_globalObject,
        since it's a weak pointer. (We never noticed this error before because,
        in WebKit, global objects always have a self-reference in a global variable,
        so marking the register file's global variables would keep m_globalObject
        alive. In the JavaScriptCore API, you can allocate a global object with
        no self-reference.)

        * runtime/JSActivation.h: Removed unneeded #include.

        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::~JSGlobalObject): Don't use ==, since a weak
        pointer is 0 when the object it points to runs its destructor.

        * runtime/WeakGCPtr.h:
        (JSC::WeakGCPtr::clear): Changed to return a bool indicating whether the
        clear actually happened.
        (JSC::WeakGCPtr::assign): Changed to forbid assignment of 0 as a shorthand
        for calling clear(). A client should never clear by assigning 0, since
        clear() should be conditional on whether the object doing the clearing
        is still pointed to by the weak pointer. (Otherwise, a zombie object might
        clear a pointer to a new, valid object.)

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
2010-04-25  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej Stachowiak.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
        Disentangle initializing the main thread from initializing threading

        This is the first step in getting rid of the WEB_THREAD #define and
        paving the way to allowing mac both WebKit and WebKit2 to use the same
        WebCore.

        * JavaScriptCore.exp: Export initializeMainThread and initializeMainThreadToProcessMainThread.
        * JavaScriptCore.xcodeproj/project.pbxproj: Sort files.

        * wtf/MainThread.cpp:
        (WTF::mainThreadInitializationMutex):
        (WTF::mainThreadFunctionQueueMutex):
        (WTF::initializeMainThread):
        (WTF::deprecatedInitializeMainThread):
        * wtf/MainThread.h:
        Added Mac only initializeMainThreadToProcessMainThread which sets up callOnMainThread
        and isMainThead calls to assume that WebCore's main thread is also the
        process's main thread. Since it is possible that both initializeMainThread
        and initializeMainThreadToProcessMainThread could be called, the first one called
        wins (either will work).

        * wtf/Threading.h: Moved to top of file.

        * wtf/ThreadingPthreads.cpp:
        (WTF::initializeThreading): Remove call to initializeMainThread.
        * wtf/ThreadingWin.cpp:
        (WTF::initializeThreading): Ditto.
        * wtf/gtk/ThreadingGtk.cpp:
        (WTF::initializeThreading): Ditto.

        * wtf/mac/MainThreadMac.mm:
        (WTF::initializeMainThreadPlatform):
        (WTF::initializeMainThreadToProcessMainThread):
        (WTF::scheduleDispatchFunctionsOnMainThread):
        (WTF::isMainThread):
        Add runtime switch between the old behavior of using the system's main
        thread and a stored pointer to the main thread. Tiger always uses the
        system's main thread.

        * wtf/qt/ThreadingQt.cpp:
        (WTF::initializeThreading): Remove call to initializeMainThread.
        * wtf/win/MainThreadWin.cpp:
        (WTF::initializeMainThreadPlatform): Add call to initializeCurrentThreadInternal
        removed from initializeThreading.

3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
2010-04-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        Fix a memory leak in the QScriptString.

        QScriptStringPrivate's constructor shouldn't call JSStringRetain as
        QScriptConverter implicitly pass a JSStringRef ownership.

        [Qt] QScriptStringPrivate c'tor problem
        https://bugs.webkit.org/show_bug.cgi?id=38110

        * qt/api/qscriptstring_p.h:
        (QScriptStringPrivate::QScriptStringPrivate):

3028
3029
3030
3031
3032
3033
3034
3035