2010-05-09 Maciej Stachowiak <mjs@apple.com>
[WebKit.git] / JavaScriptCore / ChangeLog
1 2010-05-09  Maciej Stachowiak  <mjs@apple.com>
2
3         Fixed version of: "Optimized o[s] where o is a cell and s is a string"
4         https://bugs.webkit.org/show_bug.cgi?id=38815
5         
6         Fixed the previous patch for this from Geoff Garen.
7         
8         The two problems were a missing exception check and a PropertySlot
9         initialized improperly, leading to crashes and failures in the case
10         of getters accessed with bracket syntax.
11
12     Previous patch:
13
14         Optimized o[s] where o is a cell and s is a string, removing some old
15         code that wasn't really tuned for the JIT.
16         
17         SunSpider says 0.8% faster.
18
19         * jit/JITStubs.cpp:
20         (JSC::DEFINE_STUB_FUNCTION):
21         * runtime/JSCell.h:
22
23 2010-05-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
24
25         Unreviewed, build fix.
26
27         Fix missing terminating ' character warning
28
29         The warning has been only seen on the Gtk buildbots.
30
31         * wtf/Platform.h:
32
33 2010-05-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
34
35         Reviewed by Gavin Barraclough.
36
37         Refactor YARR and YARR_JIT default rules in Platform.h
38         https://bugs.webkit.org/show_bug.cgi?id=38727
39
40         Turn on YARR and YARR JIT by default of JIT is enabled.
41         Ports can overrule this default decisions as they wish.
42
43         * wtf/Platform.h:
44
45 2010-05-08  Oliver Hunt  <oliver@apple.com>
46
47         Reviewed by Gavin Barraclough.
48
49         Split JSVALUE32_64 code out of JITOpcodes.cpp and into JITOpcodes32_64.cpp
50         https://bugs.webkit.org/show_bug.cgi?id=38808
51
52         * GNUmakefile.am:
53         * JavaScriptCore.gypi:
54         * JavaScriptCore.pro:
55         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
56         * JavaScriptCore.xcodeproj/project.pbxproj:
57         * jit/JITOpcodes.cpp:
58         * jit/JITOpcodes32_64.cpp: Added.
59         (JSC::JIT::privateCompileCTIMachineTrampolines):
60         (JSC::JIT::emit_op_mov):
61         (JSC::JIT::emit_op_end):
62         (JSC::JIT::emit_op_jmp):
63         (JSC::JIT::emit_op_loop_if_lesseq):
64         (JSC::JIT::emitSlow_op_loop_if_lesseq):
65         (JSC::JIT::emit_op_new_object):
66         (JSC::JIT::emit_op_instanceof):
67         (JSC::JIT::emitSlow_op_instanceof):
68         (JSC::JIT::emit_op_new_func):
69         (JSC::JIT::emit_op_get_global_var):
70         (JSC::JIT::emit_op_put_global_var):
71         (JSC::JIT::emit_op_get_scoped_var):
72         (JSC::JIT::emit_op_put_scoped_var):
73         (JSC::JIT::emit_op_tear_off_activation):
74         (JSC::JIT::emit_op_tear_off_arguments):
75         (JSC::JIT::emit_op_new_array):
76         (JSC::JIT::emit_op_resolve):
77         (JSC::JIT::emit_op_to_primitive):
78         (JSC::JIT::emitSlow_op_to_primitive):
79         (JSC::JIT::emit_op_strcat):
80         (JSC::JIT::emit_op_resolve_base):
81         (JSC::JIT::emit_op_resolve_skip):
82         (JSC::JIT::emit_op_resolve_global):
83         (JSC::JIT::emitSlow_op_resolve_global):
84         (JSC::JIT::emit_op_not):
85         (JSC::JIT::emitSlow_op_not):
86         (JSC::JIT::emit_op_jfalse):
87         (JSC::JIT::emitSlow_op_jfalse):
88         (JSC::JIT::emit_op_jtrue):
89         (JSC::JIT::emitSlow_op_jtrue):
90         (JSC::JIT::emit_op_jeq_null):
91         (JSC::JIT::emit_op_jneq_null):
92         (JSC::JIT::emit_op_jneq_ptr):
93         (JSC::JIT::emit_op_jsr):
94         (JSC::JIT::emit_op_sret):
95         (JSC::JIT::emit_op_eq):
96         (JSC::JIT::emitSlow_op_eq):
97         (JSC::JIT::emit_op_neq):
98         (JSC::JIT::emitSlow_op_neq):
99         (JSC::JIT::compileOpStrictEq):
100         (JSC::JIT::emit_op_stricteq):
101         (JSC::JIT::emitSlow_op_stricteq):
102         (JSC::JIT::emit_op_nstricteq):
103         (JSC::JIT::emitSlow_op_nstricteq):
104         (JSC::JIT::emit_op_eq_null):
105         (JSC::JIT::emit_op_neq_null):
106         (JSC::JIT::emit_op_resolve_with_base):
107         (JSC::JIT::emit_op_new_func_exp):
108         (JSC::JIT::emit_op_throw):
109         (JSC::JIT::emit_op_get_pnames):
110         (JSC::JIT::emit_op_next_pname):
111         (JSC::JIT::emit_op_push_scope):
112         (JSC::JIT::emit_op_pop_scope):
113         (JSC::JIT::emit_op_to_jsnumber):
114         (JSC::JIT::emitSlow_op_to_jsnumber):
115         (JSC::JIT::emit_op_push_new_scope):
116         (JSC::JIT::emit_op_catch):
117         (JSC::JIT::emit_op_jmp_scopes):
118         (JSC::JIT::emit_op_switch_imm):
119         (JSC::JIT::emit_op_switch_char):
120         (JSC::JIT::emit_op_switch_string):
121         (JSC::JIT::emit_op_new_error):
122         (JSC::JIT::emit_op_debug):
123         (JSC::JIT::emit_op_enter):
124         (JSC::JIT::emit_op_enter_with_activation):
125         (JSC::JIT::emit_op_create_arguments):
126         (JSC::JIT::emit_op_init_arguments):
127         (JSC::JIT::emit_op_convert_this):
128         (JSC::JIT::emitSlow_op_convert_this):
129         (JSC::JIT::emit_op_profile_will_call):
130         (JSC::JIT::emit_op_profile_did_call):
131
132 2010-05-08  Gabor Loki  <loki@webkit.org>
133
134         Reviewed by Gavin Barraclough.
135
136         Fix halfword loads on ARM
137         https://bugs.webkit.org/show_bug.cgi?id=38741
138
139         The BaseIndex and ImplicitAddress are contain 32bit wide offset, but
140         the load16 functions were working with 8 bit data (encoded in the
141         instruction). If the offset cannot be encoded in an instruction, it
142         should be stored in a temporary register.
143
144         * assembler/ARMAssembler.h:
145         (JSC::ARMAssembler::getOffsetForHalfwordDataTransfer):
146         * assembler/MacroAssemblerARM.h:
147         (JSC::MacroAssemblerARM::load16):
148
149 2010-05-08  Gabor Loki  <loki@webkit.org>
150
151         Reviewed by Gavin Barraclough.
152
153         Fix spanning branch instruction on Cortex-A8 with Thumb-2 JIT
154         https://bugs.webkit.org/show_bug.cgi?id=38280
155
156         If the 32-bit Thumb-2 branch instruction spans two 4KiB regions and
157         the target of the branch falls within the first region it is
158         possible for the processor to incorrectly determine the branch
159         instruction, and it is also possible in some cases for the processor
160         to enter a deadlock state.
161
162         * assembler/ARMv7Assembler.h:
163         (JSC::ARMv7Assembler::linkJumpAbsolute):
164
165 2010-05-08  Adam Barth  <abarth@webkit.org>
166
167         Reviewed by Darin Fisher.
168
169         [WTFURL] Add a buffer for managing the output of the canonicalizer
170         https://bugs.webkit.org/show_bug.cgi?id=38671
171
172         The canonicalizer produces a stream of canonicalized characters, which
173         we will store in a URLBuffer.  URLBuffer is quite similar to Vector,
174         but serves as an abstraction to isolate us from the underlying
175         character storage.  In the case of WebKit, we'll probably implement a
176         subclass of URLBuffer with Vector.  In Chromium, the backing store is a
177         std::string, which avoids an unnecessary memcpy that would be caused by
178         using Vector instead.
179
180         * wtf/url/src/URLBuffer.h: Added.
181         (WTF::URLBuffer::URLBuffer):
182         (WTF::URLBuffer::~URLBuffer):
183         (WTF::URLBuffer::at):
184         (WTF::URLBuffer::set):
185         (WTF::URLBuffer::capacity):
186         (WTF::URLBuffer::length):
187         (WTF::URLBuffer::data):
188         (WTF::URLBuffer::setLength):
189         (WTF::URLBuffer::append):
190         (WTF::URLBuffer::grow):
191
192 2010-05-08  Eric Seidel  <eric@webkit.org>
193
194         Unreviewed, just reverting commit.
195
196         REGRESSION(59000): r59000 contained all sorts of changes it should not have, needs revert.
197         https://bugs.webkit.org/show_bug.cgi?id=38798
198
199         * bytecompiler/BytecodeGenerator.cpp:
200         (JSC::BytecodeGenerator::emitResolve):
201         * jit/JITOpcodes.cpp:
202         (JSC::JIT::emit_op_resolve_global):
203
204 2010-05-04  Jer Noble  <jer.noble@apple.com>
205
206         Reviewed by Maciej Stachowiak
207
208         Safari pegs CPU and drops tons of frames using HTML5 Vimeo player
209         <https://bugs.webkit.org/show_bug.cgi?id=34005>
210         <rdar://problem/7569713>
211         
212         Added cancelCallOnMainThread.  callOnMainThread should always now be paired
213         with cancelCallOnMainThread in situations where the refcon passed to callOnMainThread
214         may be dealloced before the main thread function can be dispatched.  
215         
216         * wtf/MainThread.cpp:
217         (WTF::FunctionWithContext::operator == ): Supports the FunctionWithContextFinder predicate functor.
218         (WTF::FunctionWithContextFinder::FunctionWithContextFinder):  Predicate functor for use with Dequeue::findIf
219         (WTF::FunctionWithContextFinder::operator()):
220         (WTF::cancelCallOnMainThread):
221         * wtf/MainThread.h:
222
223 2010-05-07  Oliver Hunt  <oliver@apple.com>
224
225         Windows build fix.
226
227         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
228
229 2010-05-07  Eric Seidel  <eric@webkit.org>
230
231         Unreviewed, rolling out r58990.
232         http://trac.webkit.org/changeset/58990
233
234         Broke 4 tests on Snow Leopard and Qt.
235
236         * jit/JITStubs.cpp:
237         (JSC::DEFINE_STUB_FUNCTION):
238         * runtime/JSCell.h:
239
240 2010-05-07  Oliver Hunt  <oliver@apple.com>
241
242         Reviewed by Gavin Barraclough.
243
244         Optimize access to the global object from a function that uses eval
245         https://bugs.webkit.org/show_bug.cgi?id=38644
246
247         Fix bug where cross scope access to a global var (vs. property) would
248         be allowed without checking for intervening dynamic scopes.
249
250         * bytecompiler/BytecodeGenerator.cpp:
251         (JSC::BytecodeGenerator::emitResolve):
252
253 2010-05-07  Oliver Hunt  <oliver@apple.com>
254
255         32-bit buildfix.
256
257         Macro expansion I stab at thee!
258
259         * jit/JITOpcodes.cpp:
260         (JSC::JIT::emit_op_resolve_global):
261
262 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
263
264         Reviewed by Darin Adler.
265
266         Optimized o[s] where o is a cell and s is a string, removing some old
267         code that wasn't really tuned for the JIT.
268         
269         SunSpider says 0.8% faster.
270
271         * jit/JITStubs.cpp:
272         (JSC::DEFINE_STUB_FUNCTION):
273         * runtime/JSCell.h:
274
275 2010-05-07  Oliver Hunt  <oliver@apple.com>
276
277         Windows build fix.
278
279         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
280
281 2010-05-07  Oliver Hunt  <oliver@apple.com>
282
283         Reviewed by Geoffrey Garen.
284
285         Optimize access to the global object from a function that uses eval
286         https://bugs.webkit.org/show_bug.cgi?id=38644
287
288         Add op_resolve_global_dynamic, a variant of op_resolve_global that
289         checks each node in the scope chain for dynamically inserted properties
290         and falls back to the normal resolve logic in that case.
291
292         * JavaScriptCore.exp:
293         * bytecode/CodeBlock.cpp:
294         (JSC::isGlobalResolve):
295         (JSC::CodeBlock::printStructures):
296         (JSC::CodeBlock::dump):
297         (JSC::CodeBlock::derefStructures):
298         * bytecode/Opcode.h:
299         * bytecompiler/BytecodeGenerator.cpp:
300         (JSC::BytecodeGenerator::findScopedProperty):
301            Now take an additional reference parameter to used to indicate that
302            there were nodes that may gain dynamic properties
303         (JSC::BytecodeGenerator::emitResolve):
304         (JSC::BytecodeGenerator::emitResolveBase):
305         (JSC::BytecodeGenerator::emitResolveWithBase):
306            deal with additional argument to findScopedProperty
307         * bytecompiler/BytecodeGenerator.h:
308         * bytecompiler/NodesCodegen.cpp:
309         (JSC::FunctionCallResolveNode::emitBytecode):
310         (JSC::PostfixResolveNode::emitBytecode):
311         (JSC::PrefixResolveNode::emitBytecode):
312         (JSC::ReadModifyResolveNode::emitBytecode):
313         (JSC::AssignResolveNode::emitBytecode):
314            These functions use findScopedProperty directly in order to
315            optimise lookup.  They cannot trivially handle any degree of
316            dynamism in the lookup so we just give up in such case.
317         * interpreter/Interpreter.cpp:
318         (JSC::Interpreter::resolveGlobalDynamic):
319         (JSC::Interpreter::execute):
320         (JSC::Interpreter::privateExecute):
321         * interpreter/Interpreter.h:
322         * jit/JIT.cpp:
323         (JSC::JIT::privateCompileMainPass):
324         (JSC::JIT::privateCompileSlowCases):
325         * jit/JIT.h:
326         * jit/JITOpcodes.cpp:
327         (JSC::JIT::emit_op_resolve_global):
328         (JSC::JIT::emit_op_resolve_global_dynamic):
329         (JSC::JIT::emitSlow_op_resolve_global):
330         (JSC::JIT::emitSlow_op_resolve_global_dynamic):
331            Happily resolve_global_dynamic can share the slow case!
332         * jit/JITStubs.h:
333         (JSC::):
334         * runtime/JSActivation.cpp:
335         (JSC::JSActivation::isDynamicScope):
336         * runtime/JSActivation.h:
337         * runtime/JSGlobalObject.cpp:
338         (JSC::JSGlobalObject::isDynamicScope):
339         * runtime/JSGlobalObject.h:
340         * runtime/JSStaticScopeObject.cpp:
341         (JSC::JSStaticScopeObject::isDynamicScope):
342         * runtime/JSStaticScopeObject.h:
343         * runtime/JSVariableObject.h:
344
345 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
346
347         Reviewed by Gavin Barraclough.
348
349         Fixed Sputnik failure seen on buildbot.
350
351         * runtime/NumberPrototype.cpp:
352         (JSC::numberProtoFuncToString): Cast to unsigned before checking magnitude,
353         to efficiently exclude negative numbers, which require two characters
354         instead of one.
355
356 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
357
358         Reviewed by Alexey Proskuryakov.
359         
360         Slightly more effective way to guarantee a compile-time constant, at
361         least on gcc.
362
363         * runtime/NumberPrototype.cpp:
364         (JSC::numberProtoFuncToString): Use pointer notation instead of array
365         notation, so the compiler treats the string and its contents as constant.
366
367 2010-05-07  Adam Barth  <abarth@webkit.org>
368
369         Reviewed by Alexey Proskuryakov.
370
371         [WTFURL] Add core URL parser
372         https://bugs.webkit.org/show_bug.cgi?id=38572
373
374         This patch adds the core of the URL parser.  The URL parser uses a
375         templated notion of a code unit to support different string types.
376         Later we'll add some non-templated APIs with concrete types that
377         clients can use more conveniently.
378
379         The URLParser has a couple calls to ASSERT(), which I've commented out
380         for now.  I'm not 100% sure how to handle the dependency issues there
381         yet, so I've punted on the issue for now.
382
383         Also, there are a number of methods that are declared public in this
384         patch that are only used by the canonicalizer.  My plan is to make
385         those private or protected and make the canonicalizer a friend of the
386         parser.  The details will be in a later patch.
387
388         * wtf/url/src/URLComponent.h:
389         (WTF::URLComponent::fromRange):
390         (WTF::URLComponent::isNonEmpty):
391         (WTF::URLComponent::isEmptyOrInvalid):
392         * wtf/url/src/URLParser.h: Added.
393         (WTF::URLParser::):
394         (WTF::URLParser::isPossibleAuthorityTerminator):
395         (WTF::URLParser::parseAuthority):
396         (WTF::URLParser::extractScheme):
397         (WTF::URLParser::parseAfterScheme):
398         (WTF::URLParser::parseStandardURL):
399         (WTF::URLParser::parsePath):
400         (WTF::URLParser::parsePathURL):
401         (WTF::URLParser::parseMailtoURL):
402         (WTF::URLParser::parsePort):
403         (WTF::URLParser::extractFileName):
404         (WTF::URLParser::extractQueryKeyValue):
405         (WTF::URLParser::isURLSlash):
406         (WTF::URLParser::shouldTrimFromURL):
407         (WTF::URLParser::trimURL):
408         (WTF::URLParser::consecutiveSlashes):
409         (WTF::URLParser::isPortDigit):
410         (WTF::URLParser::nextAuthorityTerminator):
411         (WTF::URLParser::parseUserInfo):
412         (WTF::URLParser::parseServerInfo):
413
414 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
415
416         Reviewed by Oliver Hunt.
417
418         Added a fast path for number-to-character conversion via
419         Number.prototype.toString base 36.
420         
421         0.7% speedup on SunSpider.
422
423         * runtime/NumberPrototype.cpp:
424         (JSC::numberProtoFuncToString): Made radix interpretation a little more
425         efficient by keeping it in int space. Turned "const char" into
426         "static const char" just in case. Added a fast path for base 36
427         conversion of something that will turn into a character.
428
429 2010-05-07  Adam Barth  <abarth@webkit.org>
430
431         Reviewed by Darin Fisher.
432
433         [WTFURL] Add a malloc-backed URLBuffer
434         https://bugs.webkit.org/show_bug.cgi?id=38694
435
436         This patch adds a URLBuffer that uses new/delete to manage the backing
437         store for the buffer.
438
439         * wtf/url/src/RawURLBuffer.h: Added.
440         (WTF::RawURLBuffer::RawURLBuffer):
441         (WTF::RawURLBuffer::~RawURLBuffer):
442         (WTF::RawURLBuffer::resize):
443
444 2010-05-06  Fumitoshi Ukai  <ukai@chromium.org>
445
446         Reviewed by Alexey Proskuryakov.
447
448         JavaScriptCore/wtf/RandomNumber.h should provide using WTF::*
449         https://bugs.webkit.org/show_bug.cgi?id=38719
450
451         * wtf/RandomNumber.h:
452           Add using directives.
453
454 2010-05-06  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
455
456         Reviewed by Kenneth Rohde Christiansen.
457
458         [Qt] Enable YARR_JIT for X86 Mac for QtWebKit
459         https://bugs.webkit.org/show_bug.cgi?id=38668
460
461         * wtf/Platform.h:
462
463 2010-05-06  Gavin Barraclough  <barraclough@apple.com>
464
465         Reviewed by Geoff Garen.
466
467         Bug 38714 - Add result caching for Math.sin
468
469         Math.sin is frequently called with the same operand, caching the result should
470         improve performance.  CachedTranscendentalFunction adds a generic mechanism to
471         cache results for pure functions with the signature "double func(double)", and
472         where NaN maps to NaN.
473
474         CachedTranscendentalFunction uses a very simple hash function designed to be
475         fast to execute since we cannot cache the result, and trivial to JIT generate,
476         should we wish to do so.
477
478         * JavaScriptCore.xcodeproj/project.pbxproj:
479         * runtime/CachedTranscendentalFunction.h: Added.
480         (JSC::CachedTranscendentalFunction::CachedTranscendentalFunction):
481         (JSC::CachedTranscendentalFunction::~CachedTranscendentalFunction):
482         (JSC::CachedTranscendentalFunction::operator()):
483         (JSC::CachedTranscendentalFunction::initialize):
484         (JSC::CachedTranscendentalFunction::hash):
485         * runtime/JSGlobalData.h:
486         * runtime/MathObject.cpp:
487         (JSC::mathProtoFuncSin):
488         * wtf/Platform.h:
489
490 2010-05-06  Geoffrey Garen  <ggaren@apple.com>
491
492         Windows build fix.
493
494         * bytecode/SamplingTool.cpp:
495         (JSC::SamplingFlags::sample): Use a cast, so Windows will be happy when
496         this code is enabled.
497         * wtf/Platform.h: Reverted last change to this file, which seems to have
498         been accidental.
499
500 2010-05-06  Gavin Barraclough  <barraclough@apple.com>
501
502         Reviewed by Oliver Hunt.
503
504         Add compile switch to make debugger keyword plant breakpoint instructions.
505
506         * bytecompiler/BytecodeGenerator.cpp:
507         (JSC::BytecodeGenerator::emitDebugHook):
508         * jit/JITOpcodes.cpp:
509         (JSC::JIT::emit_op_debug):
510         * wtf/Platform.h:
511
512 2010-05-06  Oliver Hunt  <oliver@apple.com>
513
514         Build fix
515
516         Fix ARM builds
517
518         * assembler/MacroAssemblerARM.h:
519         (JSC::MacroAssemblerARM::load16):
520         * assembler/MacroAssemblerARMv7.h:
521         (JSC::MacroAssemblerARMv7::load16):
522
523 2010-05-06  Oliver Hunt  <oliver@apple.com>
524
525         Reviewed by Geoffrey Garen.
526
527         Improve performance of single character string compares
528         https://bugs.webkit.org/show_bug.cgi?id=38659
529
530         Add logic to the jit to identify comparisons to single character string literals
531         and then just perform the comparison inline, rather than ignoring the evidence
532         and attempting to perform an integer comparison.
533
534         Multiple changes required -- add jnlesseq opcode, add helper function to identify
535         single character string constants, add a helper to load single character strings.
536         Then add the 32_64 and normal codepaths to the JIT.
537
538         * assembler/MacroAssemblerX86Common.h:
539         (JSC::MacroAssemblerX86Common::load16):
540         * bytecode/CodeBlock.cpp:
541         (JSC::CodeBlock::dump):
542         * bytecode/Opcode.h:
543         * bytecompiler/BytecodeGenerator.cpp:
544         (JSC::BytecodeGenerator::emitJumpIfTrue):
545         * interpreter/Interpreter.cpp:
546         (JSC::Interpreter::privateExecute):
547         * jit/JIT.cpp:
548         (JSC::JIT::privateCompileMainPass):
549         (JSC::JIT::privateCompileSlowCases):
550         * jit/JIT.h:
551         * jit/JITArithmetic.cpp:
552         (JSC::JIT::emit_op_jnless):
553         (JSC::JIT::emitSlow_op_jnless):
554         (JSC::JIT::emit_op_jless):
555         (JSC::JIT::emitSlow_op_jless):
556         (JSC::JIT::emit_op_jlesseq):
557         (JSC::JIT::emit_op_jnlesseq):
558         (JSC::JIT::emitSlow_op_jlesseq):
559         (JSC::JIT::emitSlow_op_jnlesseq):
560         * jit/JITArithmetic32_64.cpp:
561         (JSC::JIT::emit_op_jnless):
562         (JSC::JIT::emitSlow_op_jnless):
563         (JSC::JIT::emit_op_jless):
564         (JSC::JIT::emitSlow_op_jless):
565         (JSC::JIT::emit_op_jlesseq):
566         (JSC::JIT::emit_op_jnlesseq):
567         (JSC::JIT::emitSlow_op_jlesseq):
568         (JSC::JIT::emitSlow_op_jnlesseq):
569         (JSC::JIT::emitBinaryDoubleOp):
570         * jit/JITInlineMethods.h:
571         (JSC::JIT::emitLoadCharacterString):
572         (JSC::JIT::isOperandConstantImmediateChar):
573         * jit/JSInterfaceJIT.h:
574         (JSC::ThunkHelpers::stringImplDataOffset):
575         (JSC::ThunkHelpers::jsStringLengthOffset):
576         (JSC::ThunkHelpers::jsStringValueOffset):
577          Moved from ThunkGenerators to make it possible to share.
578         * jit/ThunkGenerators.cpp:
579
580 2010-05-06  Martin Robinson  <mrobinson@webkit.org>
581
582         Reviewed by Gustavo Noronha Silva.
583
584         [GTK] Enable DOM clipboard and drag-and-drop access
585         https://bugs.webkit.org/show_bug.cgi?id=30623
586
587         Convert dragging portion of drag-and-drop to use DataObjectGtk.
588
589         * wtf/gobject/GRefPtr.h: Add forward declarations for GObject functions.
590
591 2010-05-06  Steve Block  <steveblock@google.com>
592
593         Reviewed by Eric Seidel.
594
595         MAC_JAVA_BRIDGE should be renamed JAVA_BRIDGE
596         https://bugs.webkit.org/show_bug.cgi?id=38544
597
598         * wtf/Platform.h:
599
600 2010-05-06  Adam Barth  <abarth@webkit.org>
601
602         Reviewed by Maciej Stachowiak.
603
604         [WTFURL] Add a class to represent the segments of a URL
605         https://bugs.webkit.org/show_bug.cgi?id=38566
606
607         When paired with a string, this class represents a parsed URL.
608
609         * wtf/url/src/URLSegments.cpp: Added.
610         (WTF::URLSegments::length):
611         (WTF::URLSegments::charactersBefore):
612         * wtf/url/src/URLSegments.h: Added.
613         (WTF::URLSegments::):
614         (WTF::URLSegments::URLSegments):
615         * wtf/url/wtfurl.gyp:
616
617 2010-05-05  Tony Gentilcore  <tonyg@chromium.org>
618
619         Reviewed by Adam Barth.
620
621         Adding comment with link to RefPtr documentation.
622         https://bugs.webkit.org/show_bug.cgi?id=38601
623
624         * wtf/RefPtr.h:
625
626 2010-05-05  Gavin Barraclough  <barraclough@apple.com>
627
628         Reviewed by Darin Adler.
629
630         Bug 38604 - workers-gc2 crashing on Qt
631
632         This appears to be due to a couple of issues.
633         (1) When the atomic string table is deleted it does not clear the 'inTable' bit
634         on AtomicStrings - it implicitly assumes that all AtomicStrings have already
635         been deleted at this point (otherwise they will crash in their destructor when
636         they try to remove themselves from the atomic string table).
637         (2) We don't fix the ordering in which WTF::WTFThreadData and
638         WebCore::ThreadGlobalData are destructed.
639
640         We should make sure that ThreadGlobalData is cleaned up before worker threads
641         terminate and WTF::WTFThreadData is destroyed, and we should clear the inTable
642         bit of members on atomic string table destruction.
643
644         WTF changes (fix issue 1, above) - ensure inTable property is cleared when the
645         atomic string table is destroyed (also, rename InTable to IsAtomic, to make it
646         clear which table we are refering to!)
647
648         * wtf/text/AtomicString.cpp:
649         (WebCore::AtomicStringTable::destroy):
650         (WebCore::CStringTranslator::translate):
651         (WebCore::UCharBufferTranslator::translate):
652         (WebCore::HashAndCharactersTranslator::translate):
653         (WebCore::AtomicString::add):
654         * wtf/text/StringImpl.cpp:
655         (WebCore::StringImpl::~StringImpl):
656         * wtf/text/StringImpl.h:
657         (WebCore::StringImpl::isAtomic):
658         (WebCore::StringImpl::setIsAtomic):
659         * wtf/text/StringImplBase.h:
660
661 2010-05-05  Oliver Hunt  <oliver@apple.com>
662
663         Reviewed by Geoffrey Garen.
664
665         Make Array.join specialised for actual arrays
666         https://bugs.webkit.org/show_bug.cgi?id=38592
667
668         Bring Array.join in line with the other array methods by specialising for
669         this === an array.
670
671         * runtime/ArrayPrototype.cpp:
672         (JSC::arrayProtoFuncJoin):
673
674 2010-05-04  Yongjun Zhang  <yongjun_zhang@apple.com>
675
676         Reviewed by Darin Adler.
677
678         WebKit crashes at DebuggerCallFrame::functionName() if m_callFrame is the top global callframe.
679         https://bugs.webkit.org/show_bug.cgi?id=38535
680
681         Don't call asFunction if callee is not a FunctionType to prevent assertion failure
682         in JSCell::isObject().
683
684         * debugger/DebuggerCallFrame.cpp:
685         (JSC::DebuggerCallFrame::functionName):
686         (JSC::DebuggerCallFrame::calculatedFunctionName):
687
688 2010-05-04  Steve Falkenburg  <sfalken@apple.com>
689
690         Remove redundant exports to fix Windows build warnings.
691
692         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
693
694 2010-05-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
695
696         Reviewed by Holger Freyther.
697
698         Fix a memory leak inside the QScriptValue.
699
700         QSciptValuePrivate::toString should release all temporary variables.
701
702         [Qt] QScriptValue::toString have a memory leak.
703         https://bugs.webkit.org/show_bug.cgi?id=38112
704
705         * qt/api/qscriptvalue_p.h:
706         (QScriptValuePrivate::toString):
707
708 2010-05-04  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
709
710         Reviewed by Darin Adler.
711
712         Does not work on SPARC because of alignment issues
713         https://bugs.webkit.org/show_bug.cgi?id=38455
714
715         Use AllocAlignmentInteger instead of void* on pageheap_memory to
716         avoid crashing at runtime in some architectures. Investigated by
717         Mike Hommey <mh@glandium.org>, change suggested by Darin Adler.
718
719         * wtf/FastMalloc.cpp:
720
721 2010-05-04  Adam Barth  <abarth@webkit.org>
722
723         Reviewed by Maciej Stachowiak.
724
725         Add first WTFURL file
726         https://bugs.webkit.org/show_bug.cgi?id=38470
727
728         This class represents a component of a URL, such as the scheme or path.
729         Essentially, the class is an index into a string buffer.
730
731         * wtf/url: Added.
732             - There was some discussion about where to put the URL library.
733               There are a number of reasonable options, but putting the library
734               in the WTF directory seems like a reasonable alternative.  This
735               location will make more sense once WTF is moved out of
736               JavaScriptCore and into a top-level directory.
737         * wtf/url/src: Added.
738             - I've added this extra directory to the usual structure because we
739               eventually want a "public" folder that defines the public
740               interface to this library that clients outside of svn.webkit.org
741               can rely upon, much like the various subfolders of the WebKit
742               directory often define a public API.
743         * wtf/url/src/URLComponent.h: Added.
744             - I've added this somewhat trivial class to get the ball rolling.
745         (WTF::URLComponent::URLComponent):
746         (WTF::URLComponent::isValid):
747         (WTF::URLComponent::isNonempty):
748         (WTF::URLComponent::reset):
749         (WTF::URLComponent::operator==):
750         (WTF::URLComponent::begin):
751         (WTF::URLComponent::setBegin):
752         (WTF::URLComponent::length):
753         (WTF::URLComponent::setLength):
754         (WTF::URLComponent::end):
755         * wtf/url/wtfurl.gyp: Added.
756             - WTFURL will be an independently buildable library, hence the
757               beginnings of a wtfurl.gyp file.
758
759 2010-05-03  Stephanie Lewis  <slewis@apple.com>
760
761         Reviewed by Geoff Garen.
762
763         https://bugs.webkit.org/show_bug.cgi?id=38368
764         <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 
765         (return memory quicker).
766         Instead of returning everything but the smallest spans spread out 
767         the spans kept over several size lists.
768
769         * wtf/FastMalloc.cpp:
770         (WTF::TCMalloc_PageHeap::scavenge):
771
772 2010-05-03  James Robinson  <jamesr@chromium.org>
773
774         Reviewed by Eric Seidel.
775
776         Clean up a few compiler warnings
777         https://bugs.webkit.org/show_bug.cgi?id=38073
778
779         * wtf/text/StringImpl.cpp:
780         (WebCore::StringImpl::ascii):
781
782 2010-05-03  Gavin Barraclough  <barraclough@apple.com>
783
784         Reviewed by NOBODY (reverting previous commit).
785
786         Rolling out r58114 - this introduced memory leaks of
787         AtomicStrings then workers terminated.
788
789         * GNUmakefile.am:
790         * JavaScriptCore.gypi:
791         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
792         * JavaScriptCore.xcodeproj/project.pbxproj:
793         * jit/ThunkGenerators.cpp:
794         (JSC::ThunkHelpers::stringImplDataOffset):
795         * runtime/Identifier.cpp:
796         (JSC::IdentifierTable::~IdentifierTable):
797         (JSC::IdentifierTable::add):
798         (JSC::IdentifierCStringTranslator::hash):
799         (JSC::IdentifierCStringTranslator::equal):
800         (JSC::IdentifierCStringTranslator::translate):
801         (JSC::Identifier::add):
802         (JSC::IdentifierUCharBufferTranslator::hash):
803         (JSC::IdentifierUCharBufferTranslator::equal):
804         (JSC::IdentifierUCharBufferTranslator::translate):
805         (JSC::Identifier::addSlowCase):
806         * runtime/Identifier.h:
807         * runtime/JSGlobalData.cpp:
808         (JSC::JSGlobalData::JSGlobalData):
809         (JSC::JSGlobalData::~JSGlobalData):
810         * runtime/JSGlobalData.h:
811         * wtf/WTFThreadData.cpp:
812         (WTF::WTFThreadData::WTFThreadData):
813         (WTF::WTFThreadData::~WTFThreadData):
814         * wtf/WTFThreadData.h:
815         (JSC::IdentifierTable::remove):
816         (JSC::IdentifierTable::literalTable):
817         (WTF::WTFThreadData::atomicStringTable):
818         * wtf/text/AtomicString.cpp:
819         (WebCore::AtomicStringTable::create):
820         (WebCore::AtomicStringTable::table):
821         (WebCore::AtomicStringTable::destroy):
822         (WebCore::stringTable):
823         (WebCore::CStringTranslator::hash):
824         (WebCore::CStringTranslator::equal):
825         (WebCore::CStringTranslator::translate):
826         (WebCore::operator==):
827         (WebCore::AtomicString::add):
828         (WebCore::equal):
829         (WebCore::UCharBufferTranslator::hash):
830         (WebCore::UCharBufferTranslator::equal):
831         (WebCore::UCharBufferTranslator::translate):
832         (WebCore::HashAndCharactersTranslator::hash):
833         (WebCore::HashAndCharactersTranslator::equal):
834         (WebCore::HashAndCharactersTranslator::translate):
835         (WebCore::AtomicString::find):
836         (WebCore::AtomicString::remove):
837         * wtf/text/AtomicStringTable.h: Removed.
838         * wtf/text/StringImpl.cpp:
839         (WebCore::StringImpl::~StringImpl):
840         * wtf/text/StringImpl.h:
841         (WebCore::StringImpl::inTable):
842         (WebCore::StringImpl::setInTable):
843         (WebCore::equal):
844         * wtf/text/StringImplBase.h:
845         (WTF::StringImplBase::StringImplBase):
846
847 2010-05-03  Kevin Watters  <kevinwatters@gmail.com>
848
849         Reviewed by Kevin Ollivier.
850
851         [wx] Implement scheduleDispatchFunctionsOnMainThread for wx port.
852         https://bugs.webkit.org/show_bug.cgi?id=38480
853
854         * wtf/wx/MainThreadWx.cpp:
855         (wxCallAfter::wxCallAfter):
856         (wxCallAfter::OnCallback):
857         (WTF::scheduleDispatchFunctionsOnMainThread):
858
859 2010-05-03  Kevin Watters  <kevinwatters@gmail.com>
860
861         Reviewed by Kevin Ollivier.
862
863         [wx] Build and use Mac's ComplexTextController to support complex text in wx.
864         https://bugs.webkit.org/show_bug.cgi?id=38482
865
866         * wtf/Platform.h:
867
868 2010-05-03  Oliver Hunt  <oliver@apple.com>
869
870         Reviewed by Maciej Stachowiak.
871
872         Interpreter crashes due to incorrect refcounting of cached structures.
873         https://bugs.webkit.org/show_bug.cgi?id=38491
874         rdar://problem/7926160
875
876         Make sure we ref/deref structures used for cached custom property getters
877
878         * bytecode/CodeBlock.cpp:
879         (JSC::CodeBlock::derefStructures):
880         (JSC::CodeBlock::refStructures):
881
882 2010-05-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
883
884         Reviewed by Eric Seidel.
885
886         [Qt] Enable JIT for QtWebKit on Symbian
887         https://bugs.webkit.org/show_bug.cgi?id=38339
888
889         JIT on Symbian has been stable for quite some time, it
890         is time to turn it on by default.
891
892         * wtf/Platform.h:
893
894 2010-04-29  Oliver Hunt  <oliver@apple.com>
895
896         Reviewed by Gavin Barraclough.
897
898         Add codegen support for unsigned right shift
899         https://bugs.webkit.org/show_bug.cgi?id=38375
900
901         Expose unsigned right shift in the macro assembler, and make use of it
902         from the jit.  Currently if the result is outside the range 0..2^31-1
903         we simply fall back to the slow case, even in JSVALUE64 and JSVALUE32_64
904         where technically we could still return an immediate value.
905
906         * assembler/MacroAssemblerARM.h:
907         (JSC::MacroAssemblerARM::urshift32):
908         * assembler/MacroAssemblerARMv7.h:
909         (JSC::MacroAssemblerARMv7::urshift32):
910         * assembler/MacroAssemblerX86Common.h:
911         (JSC::MacroAssemblerX86Common::urshift32):
912         * assembler/X86Assembler.h:
913         (JSC::X86Assembler::):
914         (JSC::X86Assembler::shrl_i8r):
915         (JSC::X86Assembler::shrl_CLr):
916            Add unsigned right shift to the x86 assembler
917         * jit/JIT.cpp:
918         (JSC::JIT::privateCompileMainPass):
919         (JSC::JIT::privateCompileSlowCases):
920            op_rshift no longer simply get thrown to a stub function
921         * jit/JIT.h:
922         * jit/JITArithmetic.cpp:
923         (JSC::JIT::emit_op_urshift):
924         (JSC::JIT::emitSlow_op_urshift):
925           JSVALUE32 and JSVALUE64 implementation.  Only supports
926           double lhs in JSVALUE64.
927         * jit/JITArithmetic32_64.cpp:
928         (JSC::JIT::emit_op_rshift):
929         (JSC::JIT::emitSlow_op_rshift):
930         (JSC::JIT::emit_op_urshift):
931         (JSC::JIT::emitSlow_op_urshift):
932           Refactor right shift code to have shared implementation between signed
933           and unsigned versions.
934
935 2010-04-29  Oliver Hunt  <oliver@apple.com>
936
937         Reviewed by Gavin Barraclough.
938
939         Handle double on righthand side of a right shift
940         https://bugs.webkit.org/show_bug.cgi?id=38363
941
942         In 64-bit we support right shift of a double, and there's no
943         reason not to in 32-bit either.  This is a 1.1% sunspider
944         improvement in 32bit.
945
946         Given high performance javascript code frequently makes
947         use of bit operators to perform double->int conversion i'll
948         follow this patch up with similar patches for bitwise 'and'
949         and 'or'.
950
951         * jit/JITArithmetic32_64.cpp:
952         (JSC::JIT::emit_op_rshift):
953         (JSC::JIT::emitSlow_op_rshift):
954
955 2010-04-29  Oliver Hunt  <oliver@apple.com>
956
957         Reviewed by Geoff Garen.
958
959         Hoist JSVALUE32_64 arithmetic implementations into a separate file.
960
961         * GNUmakefile.am:
962         * JavaScriptCore.gypi:
963         * JavaScriptCore.pro:
964         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
965         * JavaScriptCore.xcodeproj/project.pbxproj:
966         * jit/JITArithmetic.cpp:
967         (JSC::JIT::emitSlow_op_jnless):
968         (JSC::JIT::emitSlow_op_jless):
969         (JSC::JIT::emitSlow_op_jnlesseq):
970         (JSC::JIT::emit_op_mod):
971         (JSC::JIT::compileBinaryArithOpSlowCase):
972         (JSC::JIT::emit_op_div):
973         (JSC::JIT::compileBinaryArithOp):
974         * jit/JITArithmetic32_64.cpp: Added.
975         (JSC::JIT::emit_op_negate):
976         (JSC::JIT::emitSlow_op_negate):
977         (JSC::JIT::emit_op_jnless):
978         (JSC::JIT::emitSlow_op_jnless):
979         (JSC::JIT::emit_op_jless):
980         (JSC::JIT::emitSlow_op_jless):
981         (JSC::JIT::emit_op_jnlesseq):
982         (JSC::JIT::emitSlow_op_jnlesseq):
983         (JSC::JIT::emit_op_lshift):
984         (JSC::JIT::emitSlow_op_lshift):
985         (JSC::JIT::emit_op_rshift):
986         (JSC::JIT::emitSlow_op_rshift):
987         (JSC::JIT::emit_op_bitand):
988         (JSC::JIT::emitSlow_op_bitand):
989         (JSC::JIT::emit_op_bitor):
990         (JSC::JIT::emitSlow_op_bitor):
991         (JSC::JIT::emit_op_bitxor):
992         (JSC::JIT::emitSlow_op_bitxor):
993         (JSC::JIT::emit_op_bitnot):
994         (JSC::JIT::emitSlow_op_bitnot):
995         (JSC::JIT::emit_op_post_inc):
996         (JSC::JIT::emitSlow_op_post_inc):
997         (JSC::JIT::emit_op_post_dec):
998         (JSC::JIT::emitSlow_op_post_dec):
999         (JSC::JIT::emit_op_pre_inc):
1000         (JSC::JIT::emitSlow_op_pre_inc):
1001         (JSC::JIT::emit_op_pre_dec):
1002         (JSC::JIT::emitSlow_op_pre_dec):
1003         (JSC::JIT::emit_op_add):
1004         (JSC::JIT::emitAdd32Constant):
1005         (JSC::JIT::emitSlow_op_add):
1006         (JSC::JIT::emit_op_sub):
1007         (JSC::JIT::emitSub32Constant):
1008         (JSC::JIT::emitSlow_op_sub):
1009         (JSC::JIT::emitBinaryDoubleOp):
1010         (JSC::JIT::emit_op_mul):
1011         (JSC::JIT::emitSlow_op_mul):
1012         (JSC::JIT::emit_op_div):
1013         (JSC::JIT::emitSlow_op_div):
1014         (JSC::JIT::emit_op_mod):
1015         (JSC::JIT::emitSlow_op_mod):
1016
1017 2010-04-29  Zoltan Herczeg  <zherczeg@webkit.org>
1018
1019         Reviewed by Oliver Hunt
1020
1021         Add sqrt() instruction support for ARM assembler (using VFP)
1022         https://bugs.webkit.org/show_bug.cgi?id=38312
1023
1024         * assembler/ARMAssembler.h:
1025         (JSC::ARMAssembler::):
1026         (JSC::ARMAssembler::fsqrtd_r):
1027         * assembler/MacroAssemblerARM.h:
1028         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
1029         (JSC::MacroAssemblerARM::sqrtDouble):
1030
1031 2010-04-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1032
1033         Reviewed by Simon Hausmann.
1034
1035         [Qt] Refactor qtscriptglobal.h
1036         https://bugs.webkit.org/show_bug.cgi?id=37953
1037
1038         Use the same pattern in qtscriptglobal.h as in 
1039         qwebkitglobal.h without checking for specific OSs.
1040
1041         * qt/api/qtscriptglobal.h:
1042
1043 2010-04-29  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1044
1045         Reviewed by Simon Hausmann.
1046
1047         Small cleanup.
1048
1049         QScriptValuePrivate constructor shouldn't take QScriptEngine pointer
1050         as a parameter, because it breaks a private / public separation rule.
1051         QScriptEnginePrivate::get(QScriptEngine*) should return
1052         a QScriptEnginePrivate pointer instead of a QScriptEnginePtr, it simplifies
1053         implementation.
1054
1055         [Qt] QScriptValuePrivate class needs some cleanup.
1056         https://bugs.webkit.org/show_bug.cgi?id=37729
1057
1058         * qt/api/qscriptengine_p.h:
1059         (QScriptEnginePrivate::get):
1060         * qt/api/qscriptvalue.cpp:
1061         (QScriptValue::QScriptValue):
1062         * qt/api/qscriptvalue_p.h:
1063         (QScriptValuePrivate::QScriptValuePrivate):
1064
1065 2010-04-29  Kwang Yul Seo  <skyul@company100.net>
1066
1067         Reviewed by Simon Hausmann.
1068
1069         [WINCE] Export g_stackBase with JS_EXPORTDATA
1070         https://bugs.webkit.org/show_bug.cgi?id=37437
1071
1072         Export g_stackBase with JS_EXPORTDATA as it is used by SharedTimerWince.cpp.
1073
1074         * runtime/Collector.cpp:
1075
1076 2010-04-28  Oliver Hunt  <oliver@apple.com>
1077
1078         Do an unordered compare so that we don't treat NaN incorrectly.
1079
1080         RS=Gavin Barraclough
1081
1082         * jit/ThunkGenerators.cpp:
1083         (JSC::powThunkGenerator):
1084
1085 2010-04-28  Oliver Hunt  <oliver@apple.com>
1086
1087         Reviewed by Gavin Barraclough.
1088
1089         Add fast paths for Math.pow and Math.sqrt
1090         https://bugs.webkit.org/show_bug.cgi?id=38294
1091
1092         Add specialized thunks for Math.pow and Math.sqrt.
1093         This requires adding a sqrtDouble function to the MacroAssembler
1094         and sqrtsd to the x86 assembler.
1095
1096         Math.pow is slightly more complicated, in that we have
1097         to implement exponentiation ourselves rather than relying
1098         on hardware support.  The inline exponentiation is restricted
1099         to positive integer exponents on a numeric base.  Exponentiation
1100         is finally performed through the "Exponentiation by Squaring"
1101         algorithm.
1102
1103         * assembler/AbstractMacroAssembler.h:
1104         (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
1105         * assembler/MacroAssemblerARM.h:
1106         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
1107         (JSC::MacroAssemblerARM::loadDouble):
1108         (JSC::MacroAssemblerARM::sqrtDouble):
1109         * assembler/MacroAssemblerARMv7.h:
1110         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
1111         (JSC::MacroAssemblerARMv7::sqrtDouble):
1112         * assembler/MacroAssemblerX86.h:
1113         (JSC::MacroAssemblerX86::loadDouble):
1114         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
1115         * assembler/MacroAssemblerX86Common.h:
1116         (JSC::MacroAssemblerX86Common::sqrtDouble):
1117         * assembler/MacroAssemblerX86_64.h:
1118         (JSC::MacroAssemblerX86_64::loadDouble):
1119         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
1120         * assembler/X86Assembler.h:
1121         (JSC::X86Assembler::):
1122         (JSC::X86Assembler::movsd_mr):
1123         (JSC::X86Assembler::sqrtsd_rr):
1124         (JSC::X86Assembler::X86InstructionFormatter::twoByteOp):
1125         (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
1126         * create_hash_table:
1127         * jit/JIT.h:
1128         * jit/JITInlineMethods.h:
1129         * jit/JITOpcodes.cpp:
1130         * jit/JITStubs.h:
1131         (JSC::JITThunks::ctiNativeCallThunk):
1132         * jit/JSInterfaceJIT.h:
1133         (JSC::JSInterfaceJIT::emitLoadDouble):
1134         (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber):
1135         (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber):
1136         (JSC::JSInterfaceJIT::emitLoadInt32):
1137         * jit/SpecializedThunkJIT.h:
1138         (JSC::SpecializedThunkJIT::loadDoubleArgument):
1139         (JSC::SpecializedThunkJIT::loadInt32Argument):
1140         (JSC::SpecializedThunkJIT::returnJSValue):
1141         (JSC::SpecializedThunkJIT::returnDouble):
1142         (JSC::SpecializedThunkJIT::finalize):
1143         * jit/ThunkGenerators.cpp:
1144         (JSC::sqrtThunkGenerator):
1145         (JSC::powThunkGenerator):
1146         * jit/ThunkGenerators.h:
1147         * runtime/Executable.h:
1148         (JSC::NativeExecutable::NativeExecutable):
1149         * runtime/JSFunction.cpp:
1150         (JSC::JSFunction::JSFunction):
1151
1152 2010-04-28  Mike Thole  <mthole@apple.com>
1153
1154         Reviewed by Mark Rowe.
1155
1156         Reenable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK now that an
1157         exports file for it has been added.
1158
1159         * wtf/Platform.h:
1160
1161 2010-04-28  Mike Thole  <mthole@apple.com>
1162
1163         Build fix, not reviewed.
1164
1165         * wtf/Platform.h:
1166         Disable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK until an exports file is created.
1167
1168 2010-04-28  Mike Thole  <mthole@apple.com>
1169
1170         Reviewed by David Kilzer.
1171
1172         Add canAuthenticateAgainstProtectionSpace() to frame loader so that a protection space 
1173         can be inspected before attempting to authenticate against it
1174         https://bugs.webkit.org/show_bug.cgi?id=38271
1175
1176         * wtf/Platform.h: Add WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK define.
1177
1178 2010-04-28  Darin Adler  <darin@apple.com>
1179
1180         Reviewed by Sam Weinig.
1181
1182         Don't use CFAbsoluteTimeGetCurrent on Mac OS X, since it's just a cover
1183         for gettimeofday anyway.
1184
1185         * wtf/CurrentTime.cpp:
1186         (WTF::currentTime): Remove the CF version of this. Change the "other POSIX"
1187         version to pass 0 for the time zone instead of ignoring a return value.
1188         Also get rid of unneeded type casts, since operations involving both
1189         integers and doubles are always evaluated as doubles in C without explicit
1190         type casting.
1191
1192 2010-04-28  Darin Fisher  <darin@chromium.org>
1193
1194         Reviewed by David Levin.
1195
1196         [Chromium] callOnMainThread should equate to MessageLoop::PostTask
1197         https://bugs.webkit.org/show_bug.cgi?id=38276
1198
1199         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1200         * wtf/MainThread.cpp:
1201         * wtf/chromium/ChromiumThreading.h:
1202         * wtf/chromium/MainThreadChromium.cpp:
1203         (WTF::initializeMainThread):
1204         (WTF::callOnMainThread):
1205         (WTF::callOnMainThreadAndWait):
1206         (WTF::setMainThreadCallbacksPaused):
1207         (WTF::isMainThread):
1208
1209 2010-04-28  Simon Hausmann  <simon.hausmann@nokia.com>, Kent Hansen <kent.hansen@nokia.com>
1210
1211         Reviewed by Darin Adler.
1212
1213         JSC's currentThreadStackBase is not reentrant on some platforms
1214         https://bugs.webkit.org/show_bug.cgi?id=37195
1215
1216         This function needs to be reentrant to avoid memory corruption on platforms where
1217         the implementation uses global variables.
1218
1219         This patch adds a mutex lock where necessary and makes the Symbian implementation
1220         reentrant.
1221
1222         * runtime/Collector.cpp:
1223         (JSC::currentThreadStackBaseMutex):
1224         (JSC::currentThreadStackBase):
1225
1226 2010-04-28  Thiago Macieira <thiago.macieira@nokia.com>
1227
1228         Reviewed by Simon Hausmann.
1229
1230         Fix compilation with gcc 3.4.
1231
1232         AtomicStringImpl.h:29: error: base `WebCore::StringImpl' with only
1233         non-default constructor in class without a constructor
1234
1235         * wtf/text/AtomicStringImpl.h:
1236         (WebCore::AtomicStringImpl::AtomicStringImpl): Provide a default constructor.
1237         * wtf/text/StringImpl.h: Allow AtomicStringImpl to call a StringImpl constructor through a friend declaration.
1238
1239 2010-04-27  Stephanie Lewis  <slewis@apple.com>
1240
1241         Fix Tiger build.
1242
1243         * wtf/FastMalloc.cpp:
1244         (WTF::TCMalloc_PageHeap::Carve):
1245
1246 2010-04-26  Stephanie Lewis  <slewis@apple.com>
1247
1248         Reviewed by Geoff Garen.
1249
1250         https://bugs.webkit.org/show_bug.cgi?id=38154 FastMalloc calls madvise too often.
1251         <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 (return memory quicker).  
1252         To save on madvise calls when recommitting memory recommit the entire span and then carve it
1253         instead of carving the span up and only committing the part that will be used immediately.
1254
1255         * wtf/FastMalloc.cpp:
1256         (WTF::TCMalloc_PageHeap::New):
1257         (WTF::TCMalloc_PageHeap::AllocLarge):
1258         (WTF::TCMalloc_PageHeap::Carve):
1259
1260 2010-04-26  Oliver Hunt  <oliver@apple.com>
1261
1262         Reviewed by Maciej Stachowiak.
1263
1264         Add specialized thunks for a char code related string functions
1265         https://bugs.webkit.org/show_bug.cgi?id=38177
1266
1267         This is a simple extension to my prior patch.  Basically hoist the
1268         existing character loading logic from the charCodeAt thunk and into
1269         a helper function, then add a helper to load strings from the small
1270         string cache.  This allows trivial implementations of fromCharCode
1271         and charAt. 
1272
1273         * create_hash_table:
1274         * jit/SpecializedThunkJIT.h:
1275         (JSC::SpecializedThunkJIT::returnJSCell):
1276         (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
1277         * jit/ThunkGenerators.cpp:
1278         (JSC::stringCharLoad):
1279         (JSC::charToString):
1280         (JSC::charCodeAtThunkGenerator):
1281         (JSC::charAtThunkGenerator):
1282         (JSC::fromCharCodeThunkGenerator):
1283         * jit/ThunkGenerators.h:
1284         * runtime/SmallStrings.h:
1285         (JSC::SmallStrings::singleCharacterStrings):
1286         * runtime/StringConstructor.cpp:
1287         (JSC::StringConstructor::StringConstructor):
1288
1289 2010-04-27  Thomas Zander <t.zander@nokia.com>
1290
1291         Reviewed by Simon Hausmann.
1292
1293         [Qt] Fix the build on Symbian on Linux using the Makefile based mkspec
1294
1295         * JavaScriptCore.pri: It is necessary to specify the library search path
1296         when linking against JavaScriptCore.
1297
1298 2010-04-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1299
1300         Reviewed by Simon Hausmann.
1301
1302         Compile fix for Visual Studio 2010
1303         https://bugs.webkit.org/show_bug.cgi?id=37867
1304
1305         Patch by Prasanth Ullattil <prasanth.ullattil@nokia.com>
1306
1307         * runtime/Structure.cpp:
1308         (JSC::Structure::transitionTableAdd):
1309         * wtf/MathExtras.h:
1310         * wtf/Platform.h:
1311
1312 2010-04-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1313
1314         Reviewed by Simon Hausmann.
1315
1316         Rename COMPILER(MSVC7) to COMPILER(MSVC7_OR_LOWER)
1317
1318         * config.h:
1319         (JSC::Structure::transitionTableAdd):
1320         * wtf/Assertions.h:
1321         * wtf/Atomics.h:
1322         * wtf/CurrentTime.h:
1323         (WTF::getLocalTime):
1324         * wtf/Platform.h:
1325         * wtf/StaticConstructors.h:
1326         * wtf/StringExtras.h:
1327         * wtf/Vector.h:
1328         (WTF::::append):
1329
1330 2010-04-15  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1331
1332         Reviewed by Tor Arne Vestbø.
1333
1334         [Qt] Fix Mac build break.
1335
1336         https://bugs.webkit.org/show_bug.cgi?id=37867
1337         - Make sure JavaScriptCore's debug_and_release config follows that
1338           of WebCore.
1339         - Use different name for JavaScriptCore target in debug and release
1340           since they might be written in the same path at the same time on
1341           parallel builds
1342         - Consolidate the DESTDIR determination logic in JavaScriptCore.pri
1343
1344         * JavaScriptCore.pri:
1345         * JavaScriptCore.pro:
1346
1347 2010-04-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1348
1349         Reviewed by Kenneth Rohde Christiansen.
1350
1351         [Qt] Make sure WebKit is not compiled using C++0x.
1352         https://bugs.webkit.org/show_bug.cgi?id=37867
1353
1354         As the rest of Qt compiles in the C++0x mode, people might start
1355         compiling it in this mode. WebKit don't support this yet.
1356
1357         Patch by Thiago Macieira <thiago.macieira@nokia.com>
1358
1359         * JavaScriptCore.pro:
1360
1361 2010-04-26  Oliver Hunt  <oliver@apple.com>
1362
1363         Fix windows
1364
1365         * jit/SpecializedThunkJIT.h:
1366         (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
1367
1368 2010-04-26  Oliver Hunt  <oliver@apple.com>
1369
1370         Reviewed by Gavin Barraclough.
1371
1372         Need to support more efficient dispatch of lightweight builtins
1373         https://bugs.webkit.org/show_bug.cgi?id=38155
1374
1375         The problem with calling lightweight builtins is that marshalling
1376         the call from the nitro calling convention to the system calling
1377         convention is very expensive relative to the cost of the actually
1378         evaluating the function.  To work around this problem this patch
1379         adds the ability to define a custom thunk for a builtin.
1380
1381         This allows us to use high performance custom implementations of
1382         the common and sensible versions of simple builtins.  This patch
1383         includes a simple (use of which is currently hardcoded) thunk for
1384         charCodeAt.
1385
1386         This adds a JSInterfaceJIT subclass called SpecializedThunkJIT
1387         that has helper functions to remove (or at least reduce) the need
1388         to have separate thunk implementations for each JSValue encoding.
1389
1390         * GNUmakefile.am:
1391         * JavaScriptCore.pro:
1392         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1393         * JavaScriptCore.xcodeproj/project.pbxproj:
1394           Many project file updates
1395
1396         * create_hash_table:
1397           Add thunk generation callbacks to the hash tables, currently
1398           we hardcode the script to only support charCodeAt
1399
1400         * jit/JITStubCall.h:
1401         * jit/JITStubs.cpp:
1402         (JSC::JITThunks::~JITThunks):
1403         (JSC::JITThunks::specializedThunk):
1404         * jit/JITStubs.h:
1405         * jit/SpecializedThunkJIT.h: Added.
1406         (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
1407         (JSC::SpecializedThunkJIT::loadCellArgument):
1408         (JSC::SpecializedThunkJIT::loadJSStringArgument):
1409         (JSC::SpecializedThunkJIT::loadInt32Argument):
1410         (JSC::SpecializedThunkJIT::appendFailure):
1411         (JSC::SpecializedThunkJIT::returnInt32):
1412         (JSC::SpecializedThunkJIT::finalize):
1413         (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
1414         (JSC::SpecializedThunkJIT::tagReturnAsInt32):
1415         * jit/ThunkGenerators.cpp: Added.
1416         (JSC::ThunkHelpers::stringImplDataOffset):
1417         (JSC::ThunkHelpers::jsStringLengthOffset):
1418         (JSC::ThunkHelpers::jsStringValueOffset):
1419         (JSC::charCodeAtThunkGenerator):
1420         * jit/ThunkGenerators.h: Added.
1421         * runtime/Executable.h:
1422         (JSC::NativeExecutable::NativeExecutable):
1423         * runtime/JSFunction.cpp:
1424         (JSC::JSFunction::JSFunction):
1425         * runtime/JSFunction.h:
1426         * runtime/JSGlobalData.h:
1427         (JSC::JSGlobalData::getThunk):
1428         * runtime/JSString.h:
1429         (JSC::):
1430         * runtime/JSValue.h:
1431           Protect some of the JSVALUE32 and JSVALUE32_64 only constants
1432           and function behind appropriate USE() guards to make it harder
1433           to use the wrong flags for the target build.
1434         * runtime/Lookup.cpp:
1435         (JSC::HashTable::createTable):
1436         (JSC::setUpStaticFunctionSlot):
1437         * runtime/Lookup.h:
1438         (JSC::HashEntry::initialize):
1439         (JSC::HashEntry::generator):
1440         (JSC::HashEntry::):
1441           Make the lookup tables use a specialized thunkGenerator
1442           if present
1443         * wtf/text/StringImpl.h:
1444
1445 2010-04-26  Oliver Hunt  <oliver@apple.com>
1446
1447         Build fix
1448
1449         * runtime/JSImmediate.h:
1450         * runtime/JSValue.h:
1451
1452 2010-04-26  Oliver Hunt  <oliver@apple.com>
1453
1454         Reviewed by Gavin Barraclough.
1455
1456         Factor some basic JS interface logic out of JIT and into a superclass
1457         https://bugs.webkit.org/show_bug.cgi?id=38163
1458
1459         Create JSInterfaceJIT to hold some common low level functions for
1460         interacting with the JS RegisterFile.  Doing this separately from
1461         https://bugs.webkit.org/show_bug.cgi?id=38155 to ease reviewing.
1462
1463         * JavaScriptCore.xcodeproj/project.pbxproj:
1464         * jit/JIT.h:
1465         * jit/JITInlineMethods.h:
1466         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
1467         * jit/JSInterfaceJIT.h: Added.
1468         (JSC::JSInterfaceJIT::emitLoadJSCell):
1469         (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
1470         (JSC::JSInterfaceJIT::emitLoadInt32):
1471         (JSC::JSInterfaceJIT::tagFor):
1472         (JSC::JSInterfaceJIT::payloadFor):
1473         (JSC::JSInterfaceJIT::addressFor):
1474
1475 2010-04-26  Sam Weinig  <sam@webkit.org>
1476
1477         Fix Tiger build.
1478
1479         * wtf/mac/MainThreadMac.mm:
1480         (WTF::isMainThread):
1481
1482 2010-04-26  Geoffrey Garen  <ggaren@apple.com>
1483
1484         Reviewed by Sam Weinig.
1485
1486         <rdar://problem/7766413>
1487         
1488         Fixed a crash seen when using the JavaScriptCore API with WebKit.
1489         
1490         No layout test because DumpRenderTree doesn't use the JavaScriptCore API
1491         in this way.
1492
1493         * interpreter/RegisterFile.cpp:
1494         (JSC::RegisterFile::setGlobalObject):
1495         (JSC::RegisterFile::clearGlobalObject):
1496         (JSC::RegisterFile::globalObject):
1497         * interpreter/RegisterFile.h:
1498         (JSC::RegisterFile::RegisterFile): Use WeakGCPtr for managing m_globalObject,
1499         since it's a weak pointer. (We never noticed this error before because,
1500         in WebKit, global objects always have a self-reference in a global variable,
1501         so marking the register file's global variables would keep m_globalObject
1502         alive. In the JavaScriptCore API, you can allocate a global object with
1503         no self-reference.)
1504
1505         * runtime/JSActivation.h: Removed unneeded #include.
1506
1507         * runtime/JSGlobalObject.cpp:
1508         (JSC::JSGlobalObject::~JSGlobalObject): Don't use ==, since a weak
1509         pointer is 0 when the object it points to runs its destructor.
1510
1511         * runtime/WeakGCPtr.h:
1512         (JSC::WeakGCPtr::clear): Changed to return a bool indicating whether the
1513         clear actually happened.
1514         (JSC::WeakGCPtr::assign): Changed to forbid assignment of 0 as a shorthand
1515         for calling clear(). A client should never clear by assigning 0, since
1516         clear() should be conditional on whether the object doing the clearing
1517         is still pointed to by the weak pointer. (Otherwise, a zombie object might
1518         clear a pointer to a new, valid object.)
1519
1520 2010-04-25  Sam Weinig  <sam@webkit.org>
1521
1522         Reviewed by Maciej Stachowiak.
1523
1524         Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
1525         Disentangle initializing the main thread from initializing threading
1526
1527         This is the first step in getting rid of the WEB_THREAD #define and
1528         paving the way to allowing mac both WebKit and WebKit2 to use the same
1529         WebCore.
1530
1531         * JavaScriptCore.exp: Export initializeMainThread and initializeMainThreadToProcessMainThread.
1532         * JavaScriptCore.xcodeproj/project.pbxproj: Sort files.
1533
1534         * wtf/MainThread.cpp:
1535         (WTF::mainThreadInitializationMutex):
1536         (WTF::mainThreadFunctionQueueMutex):
1537         (WTF::initializeMainThread):
1538         (WTF::deprecatedInitializeMainThread):
1539         * wtf/MainThread.h:
1540         Added Mac only initializeMainThreadToProcessMainThread which sets up callOnMainThread
1541         and isMainThead calls to assume that WebCore's main thread is also the
1542         process's main thread. Since it is possible that both initializeMainThread
1543         and initializeMainThreadToProcessMainThread could be called, the first one called
1544         wins (either will work).
1545
1546         * wtf/Threading.h: Moved to top of file.
1547
1548         * wtf/ThreadingPthreads.cpp:
1549         (WTF::initializeThreading): Remove call to initializeMainThread.
1550         * wtf/ThreadingWin.cpp:
1551         (WTF::initializeThreading): Ditto.
1552         * wtf/gtk/ThreadingGtk.cpp:
1553         (WTF::initializeThreading): Ditto.
1554
1555         * wtf/mac/MainThreadMac.mm:
1556         (WTF::initializeMainThreadPlatform):
1557         (WTF::initializeMainThreadToProcessMainThread):
1558         (WTF::scheduleDispatchFunctionsOnMainThread):
1559         (WTF::isMainThread):
1560         Add runtime switch between the old behavior of using the system's main
1561         thread and a stored pointer to the main thread. Tiger always uses the
1562         system's main thread.
1563
1564         * wtf/qt/ThreadingQt.cpp:
1565         (WTF::initializeThreading): Remove call to initializeMainThread.
1566         * wtf/win/MainThreadWin.cpp:
1567         (WTF::initializeMainThreadPlatform): Add call to initializeCurrentThreadInternal
1568         removed from initializeThreading.
1569
1570 2010-04-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1571
1572         Reviewed by Kenneth Rohde Christiansen.
1573
1574         Fix a memory leak in the QScriptString.
1575
1576         QScriptStringPrivate's constructor shouldn't call JSStringRetain as
1577         QScriptConverter implicitly pass a JSStringRef ownership.
1578
1579         [Qt] QScriptStringPrivate c'tor problem
1580         https://bugs.webkit.org/show_bug.cgi?id=38110
1581
1582         * qt/api/qscriptstring_p.h:
1583         (QScriptStringPrivate::QScriptStringPrivate):
1584
1585 2010-04-24  Darin Adler  <darin@apple.com>
1586
1587         Reviewed by Dan Bernstein.
1588
1589         REGRESSION (r56560): Crash in parseFloat if passed invalid UTF-16 data
1590         https://bugs.webkit.org/show_bug.cgi?id=38083
1591         rdar://problem/7901044
1592
1593         Tests: fast/js/ToNumber.html
1594                fast/js/parseFloat.html
1595
1596         * runtime/JSGlobalObjectFunctions.cpp:
1597         (JSC::parseInt): Added a FIXME comment about a problem I noticed.
1598         (JSC::parseFloat): Added a FIXME comment about a problem I noticed;
1599         covered by test cases in the test I added.
1600         * runtime/UString.cpp:
1601         (JSC::UString::toDouble): Added FIXME comments about two problems I
1602         noticed; covered by test cases in the tests I added. Added a return
1603         statement so we don't crash when illegal UTF-16 sequences are present.
1604
1605 2010-04-24  Anton Muhin  <antonm@chromium.org>
1606
1607         Reviewed by Darin Adler.
1608
1609         Allow to construct HashTraits<WebCore::QualifiedName>::constructDeletedValue
1610
1611         Former implementation attempted to use AtomicString(HashTableDeletedValue)
1612         however those values cannot be used that way: one cannot construct
1613         QualifiedNameImpl out of such AtomicString as we'll try to lookup this string
1614         in the table, for example.
1615         https://bugs.webkit.org/show_bug.cgi?id=37722
1616
1617         * wtf/RefPtr.h: expose hash table deleted value
1618
1619 2010-04-23  Sam Weinig  <sam@webkit.org>
1620
1621         Reviewed by David Levin.
1622
1623         Fix for https://bugs.webkit.org/show_bug.cgi?id=38060
1624         Split up Threading.h
1625
1626         Move bits for of Threading.h into 3 new files.
1627         - Atomics.h for atomic operations.
1628         - ThreadSafeShared.h for the ThreadSafeShared class.
1629         - ThreadingPrimitives.h for the primitives and platform types.
1630
1631         Basic threading operations (creation, etc.) remain in Threading.h.
1632
1633         * GNUmakefile.am:
1634         * JavaScriptCore.gypi:
1635         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1636         * JavaScriptCore.xcodeproj/project.pbxproj:
1637         * wtf/Atomics.h: Copied from wtf/Threading.h.
1638         * wtf/ThreadSafeShared.h: Copied from wtf/Threading.h.
1639         * wtf/Threading.h:
1640         * wtf/ThreadingPrimitives.h: Copied from wtf/Threading.h.
1641
1642 2010-04-23  Sam Weinig  <sam@webkit.org>
1643
1644         Fix Qt build.
1645
1646         * wtf/qt/MainThreadQt.cpp: #include <QThread>
1647
1648 2010-04-22  Sam Weinig  <sam@webkit.org>
1649
1650         Reviewed by Anders Carlsson.
1651
1652         Fix for https://bugs.webkit.org/show_bug.cgi?id=38022
1653         Move isMainThread predicate function to MainThread.h
1654
1655         * wtf/MainThread.cpp:
1656         (WTF::initializeMainThread):
1657         (WTF::isMainThread):
1658         * wtf/MainThread.h:
1659         * wtf/Threading.h:
1660         * wtf/ThreadingPthreads.cpp:
1661         (WTF::initializeThreading):
1662         * wtf/ThreadingWin.cpp:
1663         (WTF::initializeThreading):
1664         * wtf/gtk/ThreadingGtk.cpp:
1665         (WTF::initializeThreading):
1666         * wtf/mac/MainThreadMac.mm:
1667         (WTF::initializeMainThreadPlatform):
1668         (WTF::isMainThread):
1669         * wtf/qt/MainThreadQt.cpp:
1670         (WTF::isMainThread):
1671         * wtf/qt/ThreadingQt.cpp:
1672         (WTF::initializeThreading):
1673         * wtf/text/AtomicString.cpp:
1674
1675 2010-04-23  Gabor Rapcsanyi  <rgabor@inf.u-szeged.hu>
1676
1677         Reviewed by Laszlo Gombos.
1678
1679         Add RVCT support for Linux
1680
1681         Developed in cooperation with Gabor Loki.
1682
1683         * API/JSStringRef.h:
1684         * jit/ExecutableAllocator.h:
1685         * jit/ExecutableAllocatorPosix.cpp:
1686         (JSC::ExecutableAllocator::cacheFlush):
1687         * jit/JITStubs.cpp:
1688         * wtf/MathExtras.h:
1689         * wtf/unicode/qt4/UnicodeQt4.h:
1690
1691 2010-04-23  Patrick Gansterer  <paroga@paroga.com>
1692
1693         Reviewed by Laszlo Gombos.
1694
1695         [WIN] Move OwnPtrWin.cpp into platform specific folder.
1696         https://bugs.webkit.org/show_bug.cgi?id=38042
1697
1698         * JavaScriptCore.gypi:
1699         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1700         * wtf/OwnPtrWin.cpp: Removed.
1701         * wtf/win/OwnPtrWin.cpp: Copied from JavaScriptCore/wtf/OwnPtrWin.cpp.
1702
1703 2010-04-23  Patrick Gansterer  <paroga@paroga.com>
1704
1705         Reviewed by Laszlo Gombos.
1706
1707         [BREWMP] Move OwnPtrBrew.cpp into platform specific folder.
1708         https://bugs.webkit.org/show_bug.cgi?id=38042
1709
1710         * wtf/OwnPtrBrew.cpp: Removed.
1711         * wtf/brew/OwnPtrBrew.cpp: Copied from JavaScriptCore/wtf/OwnPtrBrew.cpp.
1712
1713 2010-04-22  Steve Block  <steveblock@google.com>
1714
1715         Reviewed by Adam Barth.
1716
1717         Update Android to use isfinite, isinf, isnan and signbit from namespace std.
1718         https://bugs.webkit.org/show_bug.cgi?id=37948
1719
1720         * wtf/MathExtras.h:
1721
1722 2010-04-22  Fumitoshi Ukai  <ukai@chromium.org>
1723
1724         Unreviewed build fix.
1725
1726         * wtf/MD5.cpp: fix include path of CString.h
1727
1728 2010-04-22  Fumitoshi Ukai  <ukai@chromium.org>
1729
1730         Reviewed by Adam Barth.
1731
1732         MD5 is required for WebSocket new protocol implementation
1733         https://bugs.webkit.org/show_bug.cgi?id=37913
1734
1735         * GNUmakefile.am:
1736         * JavaScriptCore.exp:
1737         * JavaScriptCore.gypi:
1738         * JavaScriptCore.pro:
1739         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1740         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1741         * JavaScriptCore.xcodeproj/project.pbxproj:
1742         * wtf/MD5.cpp: Added.
1743         * wtf/MD5.h: Added.
1744
1745 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
1746
1747         Reviewed by NOBODY (build fix).
1748         Errk, accidentally committed commenting out two ASSERTs! reverting.
1749
1750         * runtime/Collector.cpp:
1751         (JSC::Heap::protect):
1752         (JSC::Heap::unprotect):
1753
1754 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
1755
1756         Reviewed by Geoff Garen.
1757
1758         https://bugs.webkit.org/show_bug.cgi?id=38006
1759         Change lifetime of JSC::IdentifierTables used by WebCores to match AtomicStringTable
1760
1761         Presently JSC's IdentifierTables are owned by the JSGlobalData.  For
1762         JSGlobalData objects created via the API this should continue to be the case,
1763         but for the JSGlobalData objects used by WebCore (the main thread's common
1764         global data, and those for workers) use a IdentifierTable provided (and owned)
1765         by wtfThreadData.  This allow the lifetime of these IdentifierTable to match
1766         those of the corresponding AtomicStringTables.
1767
1768         * API/APIShims.h:
1769         (JSC::APIEntryShim::APIEntryShim):
1770         * API/JSContextRef.cpp:
1771         (JSContextGroupCreate):
1772         * runtime/Collector.cpp:
1773         (JSC::Heap::protect):
1774         (JSC::Heap::unprotect):
1775         (JSC::Heap::markRoots):
1776         * runtime/JSGlobalData.cpp:
1777         (JSC::JSGlobalData::JSGlobalData):
1778         (JSC::JSGlobalData::~JSGlobalData):
1779         (JSC::JSGlobalData::createContextGroup):
1780         (JSC::JSGlobalData::create):
1781         (JSC::JSGlobalData::sharedInstance):
1782         * runtime/JSGlobalData.h:
1783         (JSC::JSGlobalData::):
1784         (JSC::JSGlobalData::isSharedInstance):
1785         * runtime/JSLock.cpp:
1786         (JSC::JSLock::JSLock):
1787         (JSC::JSLock::lock):
1788         (JSC::JSLock::unlock):
1789         (JSC::JSLock::DropAllLocks::DropAllLocks):
1790         * wtf/WTFThreadData.cpp:
1791         (WTF::WTFThreadData::WTFThreadData):
1792         (WTF::WTFThreadData::~WTFThreadData):
1793
1794 2010-04-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1795
1796         Unreviewed, rolling out r58110.
1797         http://trac.webkit.org/changeset/58110
1798         https://bugs.webkit.org/show_bug.cgi?id=38007
1799
1800         Caused an internal compiler error on Qt (Requested by abarth
1801         on #webkit).
1802
1803         * wtf/MathExtras.h:
1804
1805 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
1806
1807         Reviewed by NOBODY (windows build fix).
1808
1809         * API/JSWeakObjectMapRefPrivate.cpp:
1810
1811 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
1812
1813         Reviewed by NOBODY (windows build fix).
1814
1815         * API/JSBase.cpp:
1816         * API/JSCallbackObject.cpp:
1817
1818 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
1819
1820         Reviewed by Geoff Garen.
1821
1822         https://bugs.webkit.org/show_bug.cgi?id=37978
1823         Unify JSC::IdentifierTable and WebCore::AtomicStringTable implementations.
1824
1825         These two classes both implement a HashSet of uniqued StringImpls, with
1826         translator classes to avoid unnecessary object creation. The only difference
1827         between the classes is which flag (isIdentifier or inTable) is set.
1828         Combine the two classes using a template predicated on which flag to use.
1829
1830         New class AtomicStringTable created, containing all the goodness from
1831         IdentifierTable & AtomicStringTable, expect for Identifier's literalTable,
1832         which has been moved onto JSGlobalData. Removed duplicate string translator
1833         classes. Renamed StringImpl's inTable flag to more explicit 'isAtomic',
1834         and set this on the empty string (which matches Identifier behaviour, and
1835         removes a redundant check for zero-length).
1836
1837         * GNUmakefile.am:
1838         * JavaScriptCore.gypi:
1839         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1840         * JavaScriptCore.xcodeproj/project.pbxproj:
1841         * runtime/Identifier.cpp:
1842         (JSC::createLiteralTable):
1843         (JSC::deleteLiteralTable):
1844         (JSC::Identifier::add):
1845         (JSC::Identifier::addSlowCase):
1846         * runtime/Identifier.h:
1847         * runtime/JSGlobalData.cpp:
1848         (JSC::JSGlobalData::JSGlobalData):
1849         (JSC::JSGlobalData::~JSGlobalData):
1850         * runtime/JSGlobalData.h:
1851         * wtf/WTFThreadData.cpp:
1852         (WTF::WTFThreadData::WTFThreadData):
1853         (WTF::WTFThreadData::~WTFThreadData):
1854         * wtf/WTFThreadData.h:
1855         (WTF::WTFThreadData::atomicStringTable):
1856         * wtf/text/AtomicString.cpp:
1857         (WebCore::table):
1858         (WebCore::operator==):
1859         (WebCore::AtomicString::add):
1860         (WebCore::AtomicString::find):
1861         (WebCore::AtomicString::remove):
1862         * wtf/text/AtomicStringTable.h: Added.
1863         (WTF::CStringTranslator::hash):
1864         (WTF::CStringTranslator::equal):
1865         (WTF::CStringTranslator::translate):
1866         (WTF::UCharBufferTranslator::hash):
1867         (WTF::UCharBufferTranslator::equal):
1868         (WTF::UCharBufferTranslator::translate):
1869         (WTF::HashAndCharactersTranslator::hash):
1870         (WTF::HashAndCharactersTranslator::equal):
1871         (WTF::HashAndCharactersTranslator::translate):
1872         (WTF::IdentifierOrAtomicStringTable::remove):
1873         (WTF::::~IdentifierOrAtomicStringTable):
1874         (WTF::::add):
1875         (WTF::::find):
1876         * wtf/text/StringImpl.cpp:
1877         (WebCore::StringImpl::~StringImpl):
1878         * wtf/text/StringImpl.h:
1879         (WebCore::StringImpl::isAtomic):
1880         (WebCore::StringImpl::setIsAtomic):
1881         (WebCore::equal):
1882         * wtf/text/StringImplBase.h:
1883         (WTF::StringImplBase::StringImplBase):
1884
1885 2010-04-22  Steve Block  <steveblock@google.com>
1886
1887         Reviewed by Adam Barth.
1888
1889         Update Android to use isfinite, isinf, isnan and signbit from namespace std.
1890         https://bugs.webkit.org/show_bug.cgi?id=37948
1891
1892         * wtf/MathExtras.h:
1893
1894 2010-04-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1895
1896         Reviewed by Kenneth Rohde Christiansen.
1897
1898         [Qt] Remove dependency of JSC to QtGui
1899         https://bugs.webkit.org/show_bug.cgi?id=37867
1900
1901         The patch also make sure that hal.h is in the include path on Symbian.
1902         The dependency to QtGui took care of that before.
1903
1904         Patch by Thiago Macieira <thiago.macieira@nokia.com>
1905              and Rohan McGovern <rohan.mcgovern@nokia.com>
1906
1907         * JavaScriptCore.pri:
1908         * JavaScriptCore.pro:
1909
1910 2010-04-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1911
1912         Reviewed by Tor Arne Vestbø.
1913
1914         [Qt] Corrects symbols visibility for JavaScriptCore.
1915
1916         https://bugs.webkit.org/show_bug.cgi?id=37867
1917
1918         * JavaScriptCore.pro:
1919
1920 2010-04-22  Gabor Loki  <loki@webkit.org>
1921
1922         Reviewed by Gavin Barraclough.
1923
1924         Use BLX and BX to keep happy the return stack predictor above ARMv4
1925         https://bugs.webkit.org/show_bug.cgi?id=37862
1926
1927         Inspired by Jacob Bramley's patch from JaegerMonkey
1928
1929         * assembler/ARMAssembler.cpp:
1930         (JSC::ARMAssembler::executableCopy):
1931         * assembler/ARMAssembler.h:
1932         (JSC::ARMAssembler::):
1933         (JSC::ARMAssembler::bx):
1934         (JSC::ARMAssembler::blx):
1935         (JSC::ARMAssembler::loadBranchTarget):
1936         (JSC::ARMAssembler::jmp):
1937         (JSC::ARMAssembler::getLdrImmAddress):
1938         * assembler/MacroAssemblerARM.h:
1939         (JSC::MacroAssemblerARM::jump):
1940         (JSC::MacroAssemblerARM::nearCall):
1941         (JSC::MacroAssemblerARM::call):
1942         (JSC::MacroAssemblerARM::ret):
1943         (JSC::MacroAssemblerARM::prepareCall):
1944         (JSC::MacroAssemblerARM::call32):
1945
1946 2010-04-21  Andy Estes  <aestes@apple.com>
1947
1948         Rubber stamped by Mark Rowe.
1949
1950         Export WTF::deleteOwnedPtr(HFONT).
1951
1952         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1953
1954 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
1955
1956         Rubber Stamped by Oliver Hunt.
1957
1958         Make SmallStrings store an array of RefPtr<StringImpl>,
1959         instead of a direct array of StringImpls.  This allows
1960         us to remove a friend (and a layering violation) from
1961         WTF::StringImpl, and makes it so that all StringImpls
1962         are individually heap allocated.
1963
1964         * runtime/SmallStrings.cpp:
1965         (JSC::SmallStringsStorage::rep):
1966         (JSC::SmallStringsStorage::SmallStringsStorage):
1967         * wtf/text/StringImpl.h:
1968
1969 2010-04-21  Sam Weinig  <sam@webkit.org>
1970
1971         Reviewed by Geoffrey Garen.
1972
1973         Fix for https://bugs.webkit.org/show_bug.cgi?id=37937
1974         Wean JavaScriptCore off calls to isMainThread()
1975
1976         - Replace use of isMainThread() for interpreter reentry checks
1977           with a stored value on the JSGlobalData.
1978         - Replace use of isMainThread() for useMainThread only check in the
1979           collector with a stored exclusive thread.
1980
1981         * API/JSContextRef.cpp:
1982         (JSContextGroupCreate):
1983         Always default to a small stack type for uses of the JSC API. It is
1984         unlikely that the interpreter reentry required on the web will be as
1985         important for other uses of JavaScriptCore. 
1986
1987         * JavaScriptCore.exp: 
1988         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1989         Update exports.
1990
1991         * interpreter/Interpreter.cpp:
1992         (JSC::Interpreter::execute):
1993         (JSC::Interpreter::prepareForRepeatCall):
1994         Use new stored JSGlobalData::maxReentryDepth instead of isMainThread().
1995
1996         * interpreter/Interpreter.h:
1997         Rename MaxMainThreadReentryDepth to MaxLargeThreadReentryDepth and 
1998         MaxSecondaryThreadReentryDepth to MaxSmallThreadReentryDepth.
1999
2000         * jsc.cpp:
2001         (main): Use the a large stack for jsc since it is always using the
2002         main thread.
2003         
2004         * runtime/ArrayPrototype.cpp:
2005         (JSC::arrayProtoFuncToString):
2006         (JSC::arrayProtoFuncToLocaleString):
2007         (JSC::arrayProtoFuncJoin):
2008         Use new stored JSGlobalData::maxReentryDepth instead of isMainThread().
2009
2010         * runtime/Collector.cpp:
2011         (JSC::Heap::registerThread):
2012         Use the concept of making JSC run on an exclusiveThread instead of
2013         forcing a mainThreadOnly assertion.
2014         
2015         * runtime/JSGlobalData.cpp:
2016         (JSC::JSGlobalData::JSGlobalData):
2017         (JSC::JSGlobalData::createNonDefault):
2018         (JSC::JSGlobalData::create):
2019         (JSC::JSGlobalData::createLeaked):
2020         (JSC::JSGlobalData::sharedInstance):
2021         * runtime/JSGlobalData.h:
2022         Add ThreadStackType argument to JSGlobalData constructors and set
2023         maxReentryDepth based on it.
2024
2025 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
2026
2027         Reviewed by NOBODY (windows build fix pt. 3).
2028
2029         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2030
2031 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
2032
2033         Reviewed by NOBODY (windows build fix pt. 2).
2034
2035         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2036
2037 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
2038
2039         Reviewed by NOBODY (Qt build fix).
2040
2041         * JavaScriptCore.gypi:
2042         * JavaScriptCore.pro:
2043         * wtf/qt/StringQt.cpp: Copied from WebCore/platform/text/qt/StringQt.cpp.
2044
2045 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
2046
2047         Reviewed by NOBODY (windows build fix).
2048
2049         * API/JSValueRef.cpp:
2050         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2051         * runtime/Identifier.cpp:
2052         (JSC::IdentifierTable::~IdentifierTable):
2053         (JSC::IdentifierTable::add):
2054         * runtime/Identifier.h:
2055         * wtf/WTFThreadData.h:
2056         (JSC::IdentifierTable::remove):
2057         (JSC::IdentifierTable::literalTable):
2058         * wtf/text/StringImpl.cpp:
2059         (WebCore::StringImpl::~StringImpl):
2060
2061 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2062
2063         Reviewed by Oliver Hunt, Darin Adler.
2064
2065         Bug 37906 - Remove JSC::UStringImpl; unify with StringImpl.
2066
2067         JSC::UStringImpl and WebCore::StringImpl (soon to be renamed to
2068         WTF::StringImpl) are almost identical.  Remove duplication of code by unifying
2069         the two, move missing features from UStringImpl into StringImpl & delete the
2070         class UStringImpl.
2071
2072         * API/JSClassRef.cpp:
2073         * API/JSContextRef.cpp:
2074         * GNUmakefile.am:
2075         * JavaScriptCore.exp:
2076         * JavaScriptCore.pro:
2077         * JavaScriptCore.xcodeproj/project.pbxproj:
2078         * bytecode/EvalCodeCache.h:
2079         * bytecode/JumpTable.cpp:
2080         * profiler/ProfileNode.cpp:
2081         * runtime/Identifier.cpp:
2082         (JSC::Identifier::add):
2083         * runtime/Identifier.h:
2084         (JSC::Identifier::equal):
2085         * runtime/UString.cpp:
2086         * runtime/UString.h:
2087         (WTF::):
2088         * runtime/UStringImpl.cpp: Removed.
2089         * runtime/UStringImpl.h:
2090         * wtf/text/StringHash.h:
2091         (WebCore::StringHash::equal):
2092         (WebCore::CaseFoldingHash::equal):
2093         * wtf/text/StringImpl.cpp:
2094         (WebCore::StringImpl::~StringImpl):
2095         (WebCore::StringImpl::empty):
2096         (WebCore::StringImpl::sharedBuffer):
2097         (WebCore::equal):
2098         * wtf/text/StringImpl.h:
2099         (WebCore::StringImpl::StringImpl):
2100         (WebCore::StringImpl::create):
2101         (WebCore::StringImpl::tryCreateUninitialized):
2102         (WebCore::StringImpl::cost):
2103         (WebCore::StringImpl::isIdentifier):
2104         (WebCore::StringImpl::setIsIdentifier):
2105         (WebCore::StringImpl::computeHash):
2106         (WebCore::StringImpl::copyChars):
2107         (WebCore::StringImpl::):
2108
2109 2010-04-21  Patrick Gansterer  <paroga@paroga.com>
2110
2111         Reviewed by Darin Adler.
2112
2113         Added missing #include "Lookup.h" in LUT source files.
2114         https://bugs.webkit.org/show_bug.cgi?id=37903
2115
2116         * runtime/ArrayPrototype.cpp:
2117         * runtime/DatePrototype.cpp:
2118         * runtime/JSONObject.cpp:
2119         * runtime/MathObject.cpp:
2120         * runtime/NumberConstructor.cpp:
2121         * runtime/RegExpConstructor.cpp:
2122         * runtime/RegExpObject.cpp:
2123         * runtime/StringPrototype.cpp:
2124
2125 2010-04-21  Gustavo Sverzut Barbieri  <barbieri@profusion.mobi>
2126
2127         Reviewed by Nikolas Zimmermann.
2128
2129         Add missing EFL JavaScriptCore file.
2130         http://webkit.org/b/37854
2131
2132         * wtf/efl: Added.
2133         * wtf/efl/MainThreadEfl.cpp: Added.
2134         (WTF::initializeMainThreadPlatform):
2135         (WTF::timeoutFired):
2136         (WTF::scheduleDispatchFunctionsOnMainThread):
2137
2138 2010-04-20  Xan Lopez  <xlopez@igalia.com>
2139
2140         Another attempt to fix the build.
2141
2142         * GNUmakefile.am:
2143
2144 2010-04-20  Oliver Hunt  <oliver@apple.com>
2145
2146         Reviewed by Maciej Stachowiak.
2147
2148         [ES5] RegExp literals are constants that should be persistent across multiple function calls.
2149         https://bugs.webkit.org/show_bug.cgi?id=37908
2150
2151         Dump the separate RegExp constant pool, and just use the standard JS constant pool
2152         in codeblock.  This allows us to drop op_new_regexp and all associated code as well.
2153
2154         * bytecode/CodeBlock.cpp:
2155         (JSC::CodeBlock::dump):
2156         (JSC::CodeBlock::shrinkToFit):
2157         * bytecode/CodeBlock.h:
2158         * bytecode/Opcode.h:
2159         * bytecompiler/BytecodeGenerator.cpp:
2160         (JSC::BytecodeGenerator::emitLoad):
2161         * bytecompiler/BytecodeGenerator.h:
2162         * bytecompiler/NodesCodegen.cpp:
2163         (JSC::RegExpNode::emitBytecode):
2164         * interpreter/Interpreter.cpp:
2165         (JSC::Interpreter::privateExecute):
2166         * jit/JIT.cpp:
2167         (JSC::JIT::privateCompileMainPass):
2168         * jit/JIT.h:
2169         * jit/JITOpcodes.cpp:
2170         * jit/JITStubs.cpp:
2171         * jit/JITStubs.h:
2172         (JSC::):
2173
2174 2010-04-20  Oliver Hunt  <oliver@apple.com>
2175
2176         Fix license on create_regex_tables
2177
2178         * create_regex_tables:
2179
2180 2010-04-20  Oliver Hunt  <oliver@apple.com>
2181
2182         Reviewed by NOBODY (Build fix).
2183
2184         Fix gtk
2185
2186         * GNUmakefile.am:
2187         * make-generated-sources.sh:
2188
2189 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2190
2191         Reviewed by Oliver Hunt.
2192
2193         Bug 37895 - Share common code from UStringImplBase with StringImpl
2194
2195         The implementation of StringImpl & UStringImpl is very similar.  Restructure
2196         StringImpl to match UStringImpl, moving the flags and length into a base class,
2197         so that this can be shared between both string types to increase code reuse.
2198
2199         * JavaScriptCore.xcodeproj/project.pbxproj:
2200         * runtime/RopeImpl.h:
2201         (JSC::RopeImpl::RopeImpl):
2202         * runtime/UStringImpl.h:
2203         (JSC::UStringImpl::UStringImpl):
2204         * wtf/text/StringImpl.h:
2205         (WebCore::StringImpl::StringImpl):
2206         (WebCore::StringImpl::characters):
2207         * wtf/text/StringImplBase.h: Copied from JavaScriptCore/runtime/UStringImpl.h.
2208         (WTF::StringImplBase::length):
2209         (WTF::StringImplBase::operator new):
2210         (WTF::StringImplBase::StringImplBase):
2211
2212 2010-04-20  Oliver Hunt  <oliver@apple.com>
2213
2214         Reviewed by Gavin Barraclough.
2215
2216         Autogenerate yarr character tables
2217         https://bugs.webkit.org/show_bug.cgi?id=37877
2218
2219         Use a python script to automatically generate character tables
2220         for the builtin YARR character classes.  This allows us to generate
2221         actual tables as well, by using these tables we can both increase
2222         performance of the check (for complex builtins) and reduce the actual
2223         code size.
2224
2225         4-8% win on string-unpack-code, but lots of noise on other tests so
2226         i'm only confident saying its a 1% win overall.
2227
2228         * DerivedSources.make:
2229         * JavaScriptCore.xcodeproj/project.pbxproj:
2230         * assembler/AbstractMacroAssembler.h:
2231         (JSC::AbstractMacroAssembler::ExtendedAddress::ExtendedAddress):
2232         * assembler/MacroAssembler.h:
2233         (JSC::MacroAssembler::branchTest8):
2234         * assembler/MacroAssemblerX86Common.h:
2235         (JSC::MacroAssemblerX86Common::branchTest8):
2236         * assembler/MacroAssemblerX86_64.h:
2237         (JSC::MacroAssemblerX86_64::branchTest8):
2238         * assembler/X86Assembler.h:
2239         (JSC::X86Assembler::cmpb_im):
2240         (JSC::X86Assembler::testb_im):
2241         * bytecode/SamplingTool.cpp:
2242         (JSC::SamplingTool::dump):
2243         * create_regex_tables: Added.
2244         * yarr/RegexCompiler.cpp:
2245         (JSC::Yarr::CharacterClassConstructor::charClass):
2246         * yarr/RegexJIT.cpp:
2247         (JSC::Yarr::RegexGenerator::matchCharacterClass):
2248         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
2249         (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
2250         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
2251         * yarr/RegexPattern.h:
2252         (JSC::Yarr::CharacterClassTable::create):
2253         (JSC::Yarr::CharacterClassTable::CharacterClassTable):
2254         (JSC::Yarr::CharacterClass::CharacterClass):
2255
2256 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2257
2258         Reviewed by NOBODY (speculative windows fix - missed a bit!).
2259
2260         * wtf/text/AtomicString.h:
2261
2262 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2263
2264         Reviewed by NOBODY (speculative windows fix).
2265
2266         * wtf/text/AtomicString.h:
2267
2268 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2269
2270         Reviewed by NOBODY (windows build fix).
2271
2272         Add missing .def file entries.
2273
2274         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2275
2276 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2277
2278         Reviewed by Geoff Garen.
2279
2280         Bug 37869 - Move URopeImpl to its own .h/.cpp
2281         
2282         Currently Ropes are implemented by the class URopeImpl, which is defined in
2283         UStringImpl.h, and then typedefed to the name JSString::Rope. Remove the
2284         typedef, and rename all uses of URopeImpl and JSString::Rope to just RopeImpl.
2285
2286         Move RopeImpl to its own header, and remove all remaining references to ropes
2287         from UStringImpl (rename UStringOrRopeImpl to UStringImplBase, rename or move
2288         the isRope & deref methods from UStringOrRopeImpl).
2289
2290         * JavaScriptCore.xcodeproj/project.pbxproj:
2291         * runtime/JSString.cpp:
2292         (JSC::JSString::resolveRope):
2293         * runtime/JSString.h:
2294         (JSC::):
2295         (JSC::RopeBuilder::JSString):
2296         (JSC::RopeBuilder::~JSString):
2297         (JSC::RopeBuilder::appendStringInConstruct):
2298         (JSC::RopeBuilder::JSStringFinalizerStruct::):
2299         * runtime/RopeImpl.cpp: Copied from JavaScriptCore/runtime/UStringImpl.cpp.
2300         (JSC::RopeImpl::derefFibersNonRecursive):
2301         (JSC::RopeImpl::destructNonRecursive):
2302         * runtime/RopeImpl.h: Copied from JavaScriptCore/runtime/UStringImpl.h.
2303         (JSC::RopeImpl::tryCreateUninitialized):
2304         (JSC::RopeImpl::isRope):
2305         (JSC::RopeImpl::deref):
2306         (JSC::RopeImpl::RopeImpl):
2307         * runtime/UStringImpl.cpp:
2308         * runtime/UStringImpl.h:
2309         (JSC::UStringImplBase::isInvalid):
2310         (JSC::UStringImplBase::ref):
2311         (JSC::UStringImplBase::UStringImplBase):
2312         (JSC::UStringImplBase::):
2313         (JSC::UStringImpl::UStringImpl):
2314
2315 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2316
2317         Reviewed by Geoff Garen.
2318
2319         Bug 37828 - Move WebCore's String classes to WTF
2320
2321         Move these classes up to WTF so they are available to all clients of WTF (in
2322         particular JSC).
2323
2324         As a first patch, making the most minimal change possible, since this patch
2325         could easily grow rather large since we'll have to change every class forward
2326         declaration ( e.g. every "namespace WebCore { class String; }" much change to
2327         "namespace WTF { class String; }").
2328
2329         Moving the files, but leaving the classes logically in the WebCore namespace -
2330         which is technically a layering violation - I'll come back and fix this up in a
2331         subsequent patch.
2332
2333         * Android.mk:
2334         * Android.v8.wtf.mk:
2335         * GNUmakefile.am:
2336         * JavaScriptCore.exp:
2337         * JavaScriptCore.gypi:
2338         * JavaScriptCore.pro:
2339         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2340         * JavaScriptCore.xcodeproj/project.pbxproj:
2341         * config.h:
2342         * wtf/StaticConstructors.h: Copied from WebCore/platform/StaticConstructors.h.
2343         * wtf/text/AtomicString.cpp: Copied from WebCore/platform/text/AtomicString.cpp.
2344         * wtf/text/AtomicString.h: Copied from WebCore/platform/text/AtomicString.h.
2345         * wtf/text/AtomicStringImpl.h: Copied from WebCore/platform/text/AtomicStringImpl.h.
2346         * wtf/text/StringBuffer.h: Copied from WebCore/platform/text/StringBuffer.h.
2347         * wtf/text/StringHash.h: Copied from WebCore/platform/text/StringHash.h.
2348         * wtf/text/StringImpl.cpp: Copied from WebCore/platform/text/StringImpl.cpp.
2349         * wtf/text/StringImpl.h: Copied from WebCore/platform/text/StringImpl.h.
2350         * wtf/text/WTFString.cpp: Copied from WebCore/platform/text/String.cpp.
2351         (WebCore::charactersToFloat):
2352         * wtf/text/WTFString.h: Copied from WebCore/platform/text/PlatformString.h.
2353
2354 2010-04-20  Csaba Osztrogonác  <ossy@webkit.org>
2355
2356         [Qt] Unreviewed speculative buildfix for WinCE after r57882
2357         https://bugs.webkit.org/show_bug.cgi?id=37701
2358
2359         * JavaScriptCore.pri: missing wince* case added.
2360
2361 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2362
2363         Reviewed by NOBODY (build fix).
2364         Speculative Chromium/Win build fix, attempt #2.
2365
2366         * config.h:
2367
2368 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2369
2370         Reviewed by NOBODY (build fix).
2371         Speculative Chromium/Win build fix.
2372
2373         * config.h: JS_EXPORTDATA should do nothing on !JSC builds.
2374
2375 2010-04-20  Csaba Osztrogonác  <ossy@webkit.org>
2376
2377         Reviewed by Simon Hausmann.
2378
2379         [Qt] Target(WebCore,jsc,...) must depends on static library of JavaScriptCore
2380         https://bugs.webkit.org/show_bug.cgi?id=37701
2381
2382         * JavaScriptCore.pri: dependency added.
2383
2384 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2385
2386         Rubber stamped by Maciej Stachowiak (relanding r57829).
2387         Added missing JS_EXPORTDATA
2388
2389         * API/APIShims.h:
2390         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
2391         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
2392         (JSC::APICallbackShim::APICallbackShim):
2393         (JSC::APICallbackShim::~APICallbackShim):
2394         * API/JSContextRef.cpp:
2395         * Android.mk:
2396         * Android.v8.wtf.mk:
2397         * GNUmakefile.am:
2398         * JavaScriptCore.exp:
2399         * JavaScriptCore.gypi:
2400         * JavaScriptCore.pro:
2401         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2402         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2403         * JavaScriptCore.xcodeproj/project.pbxproj:
2404         * runtime/Completion.cpp:
2405         (JSC::checkSyntax):
2406         (JSC::evaluate):
2407         * runtime/Identifier.cpp:
2408         (JSC::Identifier::remove):
2409         (JSC::Identifier::checkCurrentIdentifierTable):
2410         * runtime/Identifier.h:
2411         * runtime/InitializeThreading.cpp:
2412         (JSC::initializeThreadingOnce):
2413         * runtime/JSGlobalData.cpp:
2414         (JSC::JSGlobalData::create):
2415         * wtf/WTFThreadData.cpp: Copied from JavaScriptCore/wtf/WTFThreadData.cpp.
2416         * wtf/WTFThreadData.h: Copied from JavaScriptCore/wtf/WTFThreadData.h.
2417
2418 2010-04-19  Gavin Barraclough  <barraclough@apple.com>
2419
2420         Reviewed by NOBODY (rolling out r57829).
2421         This broke windows.
2422
2423         * API/APIShims.h:
2424         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
2425         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
2426         (JSC::APICallbackShim::APICallbackShim):
2427         (JSC::APICallbackShim::~APICallbackShim):
2428         * API/JSContextRef.cpp:
2429         * Android.mk:
2430         * Android.v8.wtf.mk:
2431         * GNUmakefile.am:
2432         * JavaScriptCore.exp:
2433         * JavaScriptCore.gypi:
2434         * JavaScriptCore.pro:
2435         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2436         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2437         * JavaScriptCore.xcodeproj/project.pbxproj:
2438         * runtime/Completion.cpp:
2439         (JSC::checkSyntax):
2440         (JSC::evaluate):
2441         * runtime/Identifier.cpp:
2442         (JSC::Identifier::remove):
2443         (JSC::Identifier::checkCurrentIdentifierTable):
2444         (JSC::createIdentifierTableSpecificCallback):
2445         (JSC::createIdentifierTableSpecific):
2446         * runtime/Identifier.h:
2447         (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData):
2448         (JSC::defaultIdentifierTable):
2449         (JSC::setDefaultIdentifierTable):
2450         (JSC::currentIdentifierTable):
2451         (JSC::setCurrentIdentifierTable):
2452         (JSC::resetCurrentIdentifierTable):
2453         * runtime/InitializeThreading.cpp:
2454         (JSC::initializeThreadingOnce):
2455         * runtime/JSGlobalData.cpp:
2456         (JSC::JSGlobalData::create):
2457         * wtf/WTFThreadData.cpp: Removed.
2458         * wtf/WTFThreadData.h: Removed.
2459
2460 2010-04-19  Douglas Gregor  <dgregor@apple.com>
2461
2462         Reviewed and landed by Anders Carlsson.
2463
2464         * runtime/UStringImpl.h:
2465         Fix class/struct declaration mismatches.
2466
2467 2010-04-19  Geoffrey Garen  <ggaren@apple.com>
2468
2469         Reviewed by Beth Dakin.
2470
2471         Checked in these tests I wrote becuase Balazs Kelemen wanted to use them.
2472
2473         * tests/perf: Added.
2474         * tests/perf/bench-allocate-nonretained.js: Added.
2475         * tests/perf/bench-allocate-retained.js: Added.
2476
2477 2010-04-19  Gavin Barraclough  <barraclough@apple.com>
2478
2479         Reviewed by NOBODY (windows build fix).
2480
2481         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2482
2483 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
2484
2485         Reviewed by Sam Weinig.
2486
2487         https://bugs.webkit.org/show_bug.cgi?id=37745
2488         Move string uniquing tables to (new) WTFThreadData class.
2489
2490         Remove AtomicString's dependency on ThreadGlobalData so that we can move
2491         WebCore's string classes up to WTF.
2492
2493         WTFThreadData.cpp/.h are based on ThreadGlobalData from WebCore.
2494         Moved JSC & WebCore's string uniquing tables to this class.
2495
2496         This patch introduces a temporary layering violation in providing forward
2497         declarations of classes from JSC and WTF; this will be resolved as we move
2498         more string code up to WTF.
2499
2500         * API/APIShims.h:
2501         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
2502         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
2503         (JSC::APICallbackShim::APICallbackShim):
2504         (JSC::APICallbackShim::~APICallbackShim):
2505         * API/JSContextRef.cpp:
2506         * JavaScriptCore.exp:
2507         * JavaScriptCore.xcodeproj/project.pbxproj:
2508         * runtime/Completion.cpp:
2509         (JSC::checkSyntax):
2510         (JSC::evaluate):
2511         * runtime/Identifier.cpp:
2512         (JSC::Identifier::remove):
2513         (JSC::Identifier::checkCurrentIdentifierTable):
2514         * runtime/Identifier.h:
2515         * runtime/InitializeThreading.cpp:
2516         (JSC::initializeThreadingOnce):
2517         * runtime/JSGlobalData.cpp:
2518         (JSC::JSGlobalData::create):
2519         * wtf/WTFThreadData.cpp: Copied from WebCore/platform/ThreadGlobalData.cpp.
2520         (WTF::WTFThreadData::WTFThreadData):
2521         (WTF::WTFThreadData::~WTFThreadData):
2522         * wtf/WTFThreadData.h: Copied from WebCore/platform/ThreadGlobalData.h.
2523         (WTF::WTFThreadData::atomicStringTable):
2524         (WTF::WTFThreadData::initializeIdentifierTable):
2525         (WTF::WTFThreadData::currentIdentifierTable):
2526         (WTF::WTFThreadData::setCurrentIdentifierTable):
2527         (WTF::WTFThreadData::resetCurrentIdentifierTable):
2528         (WTF::wtfThreadData):
2529
2530 2010-04-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2531
2532         Reviewed by Simon Hausmann.
2533
2534         [Qt] Build fix for WinCE.
2535
2536         Moved the include of the non-existing errno.h header file inside
2537         platform guard macros.
2538
2539         * jit/ExecutableAllocatorFixedVMPool.cpp:
2540
2541 2010-04-18  Kwang Yul Seo  <skyul@company100.net>
2542
2543         Reviewed by Laszlo Gombos.
2544
2545         [WINCE] Don't define WTF_CPU_MIDDLE_ENDIAN=1
2546         https://bugs.webkit.org/show_bug.cgi?id=37434
2547
2548         Windows CE supports little-endian format only, so don't define
2549         WTF_CPU_MIDDLE_ENDIAN=1.
2550
2551         * wtf/Platform.h:
2552
2553 2010-04-18  Simon Hausmann  <simon.hausmann@nokia.com>
2554
2555         Reviewed by Laszlo Gombos.
2556
2557         [Qt] Fix JavaScriptCore's include path for WinCE builds
2558
2559         https://bugs.webkit.org/show_bug.cgi?id=36751
2560
2561         * JavaScriptCore.pri:
2562
2563 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
2564
2565         Reviewed by nobody, build fix.
2566
2567 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
2568
2569         Reviewed by nobody, build fix.
2570
2571 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
2572
2573         Reviewed by Oliver Hunt.
2574
2575         Bug 37730 - Remove JSC::UString dependencies from WebCore::StringImpl
2576         (Following on from bug #37675).
2577
2578         Make the argument ordering for UStringImpl's constructor & create
2579         methods match, when passed a shared buffer.
2580
2581         * JavaScriptCore.exp:
2582         * runtime/UStringImpl.cpp:
2583         (JSC::UStringImpl::create):
2584         * runtime/UStringImpl.h:
2585
2586 2010-04-15  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2587
2588         Reviewed by Kenneth Rohde Christiansen.
2589
2590         Fix memory leak in QScriptEngine::evaluate().
2591
2592         QScriptEnginePrivate::evaluate should release temporary variables.
2593
2594         [Qt] QScriptEngine::evaluate has memory leak.
2595         https://bugs.webkit.org/show_bug.cgi?id=37596
2596
2597         * qt/api/qscriptengine_p.cpp:
2598         (QScriptEnginePrivate::evaluate):
2599         * qt/api/qscriptengine_p.h:
2600
2601 2010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2602
2603         Reviewed by Kenneth Rohde Christiansen.
2604
2605         Fix a memory leak in QScriptValue::inherits.
2606
2607         [Qt] QScriptValue::inherits has a memory leak.
2608         https://bugs.webkit.org/show_bug.cgi?id=37617
2609
2610         * qt/api/qscriptvalue_p.h:
2611         (QScriptValuePrivate::inherits):
2612
2613 2010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2614
2615         Reviewed by Kenneth Rohde Christiansen.
2616
2617         Fix a few memory leaks in QScriptEngine.
2618
2619         Syntax checking caused memory leak, not all temporary variables were released.
2620
2621         [Qt] Syntax checking  in the QtScript cause a memory leak.
2622         https://bugs.webkit.org/show_bug.cgi?id=37610
2623
2624         * qt/api/qscriptengine_p.cpp:
2625         (QScriptEnginePrivate::checkSyntax):
2626         * qt/api/qscriptsyntaxcheckresult.cpp:
2627         (QScriptSyntaxCheckResultPrivate::errorMessage):
2628         (QScriptSyntaxCheckResultPrivate::errorLineNumber):
2629
2630 2010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2631
2632         Reviewed by Kenneth Rohde Christiansen.
2633
2634         Fix memory leak inside QScriptEnginePrivate::makeJSValue.
2635
2636         QScriptEnginePrivate::makeJSValue should release temporary JSStringRef variable.
2637
2638         [Qt] tst_QScriptValue::toString has a memory leak.
2639         https://bugs.webkit.org/show_bug.cgi?id=37598
2640
2641         * qt/api/qscriptengine_p.h:
2642         (QScriptEnginePrivate::makeJSValue):
2643
2644 2010-04-14  Peter Varga  <pvarga@inf.u-szeged.hu>
2645
2646         Reviewed by Geoffrey Garen.
2647
2648         Move the YARR JIT fallback detection from RegexJIT.cpp to
2649         RegexCompiler.cpp.
2650
2651         https://bugs.webkit.org/show_bug.cgi?id=37571
2652
2653         * yarr/RegexCompiler.cpp:
2654         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
2655         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
2656         * yarr/RegexJIT.cpp:
2657         (JSC::Yarr::RegexGenerator::generateTerm):
2658         (JSC::Yarr::RegexGenerator::RegexGenerator):
2659         (JSC::Yarr::jitCompileRegex):
2660         * yarr/RegexJIT.h:
2661         (JSC::Yarr::RegexCodeBlock::operator!):
2662         * yarr/RegexPattern.h:
2663         (JSC::Yarr::RegexPattern::RegexPattern):
2664         (JSC::Yarr::RegexPattern::reset):
2665
2666 2010-04-14  Kent Hansen  <kent.hansen@nokia.com>
2667
2668         Reviewed by Maciej Stachowiak.
2669
2670         Mac OS X: Use deployment target to determine whether memory tagging should be enabled
2671         https://bugs.webkit.org/show_bug.cgi?id=34888
2672
2673         When building on (Snow) Leopard but targeting Tiger
2674         (TARGETING_TIGER defined, BUILDING_ON_TIGER not defined),
2675         WebKit would crash on Tiger because the tags passed to mmap
2676         caused those function calls to fail.
2677
2678         Conversely, when building on Tiger but targeting Leopard
2679         (BUILDING_ON_TIGER defined, TARGETING_LEOPARD defined), WebKit
2680         would crash on Leopard because the tags passed to vm_map and
2681         vm_allocate caused those function calls to fail.
2682
2683         Solution: Use TARGETING_TIGER rather than BUILDING_ON_TIGER to
2684         govern the tag definitions. Use the same tags for vm_map and
2685         vm_allocate regardless of target, since they work on
2686         both. Fall back to the mmap tags that work on Tiger (that is,
2687         "no tags") if targeting Tiger, since those tags also work on
2688         Leopard.
2689
2690         * wtf/VMTags.h:
2691
2692 2010-04-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2693
2694         Reviewed by nobody, build fix.
2695
2696         [Qt] Build fix for Mac when building with build-webkit --qt
2697
2698         Specifying no configuration on Mac builds WebCore both in debug
2699         and release. JavaScriptCore has to follow this rule as well.
2700
2701         * JavaScriptCore.pro:
2702
2703 2010-04-11  Mark Rowe  <mrowe@apple.com>
2704
2705         Reviewed by Sam Weinig.
2706
2707         <rdar://problem/7851332> Fix the build.
2708
2709         * wtf/FastMalloc.cpp:
2710         (WTF::TCMallocStats::): Initialize extra members of malloc_introspection_t to zero.
2711
2712 2010-04-09  Mikhail Naganov  <mnaganov@chromium.org>
2713
2714         Reviewed by Pavel Feldman.
2715
2716         Make CallIdentifier constructor to handle null urls.
2717
2718         https://bugs.webkit.org/show_bug.cgi?id=37341
2719
2720         * profiler/CallIdentifier.h:
2721         (JSC::CallIdentifier::CallIdentifier):
2722
2723 2010-04-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2724
2725         Reviewed by Simon Hausmann.
2726
2727         [Qt] Fix crashes with package builds in release
2728
2729         Add NDEBUG to the defines for package build in JavaScriptCore.pri,
2730         so that it's consistently used for JavaScriptCore, WebCore, jsc and all
2731         other tools using wtf, etc. data structures directly. Mixing NDEBUG with
2732         non-NDEBUG builds causes crashes due to differences in data structures when
2733         assertions/checks are enabled.
2734
2735         * JavaScriptCore.pri:
2736
2737 2010-04-09  Patrick Gansterer  <paroga@paroga.com>
2738
2739         Reviewed by Darin Adler.
2740
2741         Implement NO_RETURN for COMPILER(MSVC).
2742         https://bugs.webkit.org/show_bug.cgi?id=33056 
2743
2744         Added NO_RETURN_WITH_VALUE for functions with non-void return type.
2745
2746         * jsc.cpp:
2747         * wtf/AlwaysInline.h:
2748         * wtf/FastMalloc.cpp:
2749
2750 2010-04-08  Kwang Yul Seo  <skyul@company100.net>
2751
2752         Reviewed by Simon Hausmann.
2753
2754         [WINCE] Check if ARM or _ARM_ is defined
2755         https://bugs.webkit.org/show_bug.cgi?id=37200
2756
2757         MSVC defines ARM and _ARM_ for Windows CE ARM. Define WTF_CPU_ARM=1
2758         when either ARM or _ARM_ is defined.
2759
2760         * wtf/Platform.h:
2761
2762 2010-04-08  Csaba Osztrogonác  <ossy@webkit.org>
2763
2764         Reviewed Oliver Hunt.
2765
2766         [Qt]r57240 broke Qt build (might be a gcc bug)
2767         https://bugs.webkit.org/show_bug.cgi?id=37253
2768
2769         Workaround until fix. On PLATFORM(QT) use inline instead of ALWAYS_INLINE.
2770
2771         * wtf/PassRefPtr.h: Qt guards added.
2772
2773 2010-04-07  Oliver Hunt  <oliver@apple.com>
2774
2775         Reviewed by Anders Carlsson.
2776
2777         Vector<UString> makes many needless calls to UString::UString and UString::~UString
2778
2779         Add a VectorTrait<UString> specialisation to allow vector to simply memset/memcpy
2780         data around.  Only difference from the VectorTrait<RefPtr<T> > traits is the inability
2781         to use memset to initialize data.
2782
2783         * runtime/UString.h:
2784         (WTF::):
2785
2786 2010-04-07  Oliver Hunt  <oliver@apple.com>
2787
2788         Reviewed by Geoff Garen.
2789
2790         Beat gcc with a clue bat -- force inlining of refIfNotNull and derefIfNotNull
2791
2792         * wtf/PassRefPtr.h:
2793
2794 2010-04-07  Kwang Yul Seo  <skyul@company100.net>
2795
2796         Reviewed by Darin Adler.
2797
2798         Replace isprint with isASCIIPrintable
2799         https://bugs.webkit.org/show_bug.cgi?id=37223
2800
2801         WebKit does not use functions in <ctype.h> as they are dependent on the current
2802         locale. Use the equivalent functions in <wtf/ASCIICType.h>. isASCIIPrintable
2803         replaces isprint.
2804
2805         * pcre/pcre_exec.cpp:
2806         (pchars):
2807
2808 2010-04-07  Enrica Casucci  <enrica@apple.com>
2809
2810         Reviewed by Darin Adler.
2811
2812         https://bugs.webkit.org/show_bug.cgi?id=37219
2813         
2814         This change disables text caret for the iPhone platflorm.
2815         
2816         * wtf/Platform.h: Disabled text caret for iPhone.
2817
2818 2010-04-06  Adam Barth  <abarth@webkit.org>
2819
2820         Reviewed by Eric Seidel.
2821
2822         REGRESSION: Worker termination via JS timeout may cause worker tests like fast/workers/worker-terminate.html fail.
2823         https://bugs.webkit.org/show_bug.cgi?id=36646
2824
2825         Add a new exception type for forcibly terminating a JavaScript stack.
2826         The new exception functions similarly to the
2827         InterruptedExecutionException but is conceptually different because
2828         execution is terminated instead of just interrupted.
2829
2830         * GNUmakefile.am:
2831             - Added new Terminator.h file.
2832         * JavaScriptCore.gypi:
2833             - Added new Terminator.h file.
2834         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2835             - Added new Terminator.h file.
2836         * JavaScriptCore.xcodeproj/project.pbxproj:
2837             - Added new Terminator.h file.
2838         * interpreter/Interpreter.cpp:
2839         (JSC::Interpreter::throwException):
2840             - Fully unwind the stack for TerminatedExecutionException.
2841         (JSC::Interpreter::privateExecute):
2842             - Check if we've been terminated at the same time we check if we've
2843               timed out.
2844         * jit/JITStubs.cpp:
2845         (JSC::DEFINE_STUB_FUNCTION):
2846             - Check if we've been terminated at the same time we check if we've
2847               timed out.
2848         * runtime/Completion.cpp:
2849             - Some exceptions define special completion types so that calls can
2850               see why we terminated evaluation.
2851         (JSC::evaluate):
2852         * runtime/Completion.h:
2853             - Define a new completion type for termination.
2854         (JSC::):
2855         * runtime/ExceptionHelpers.cpp:
2856             - Define TerminatedExecutionException and refactor pseudo-RTTI
2857               virtual function to be more semantic.
2858         (JSC::InterruptedExecutionError::exceptionType):
2859         (JSC::TerminatedExecutionError::TerminatedExecutionError):
2860         (JSC::TerminatedExecutionError::exceptionType):
2861         (JSC::TerminatedExecutionError::toString):
2862         (JSC::createTerminatedExecutionException):
2863         * runtime/ExceptionHelpers.h:
2864             - Entry point for generating a TerminatedExecutionException.
2865         * runtime/JSGlobalData.cpp:
2866         (JSC::JSGlobalData::JSGlobalData):
2867             - Add a Terminator object that can be used to asynchronously
2868               terminate a JavaScript execution stack.
2869         * runtime/JSGlobalData.h:
2870         * runtime/JSObject.h:
2871         (JSC::JSObject::exceptionType):
2872             - Define that, by default, thrown objects have a normal exception
2873               type.
2874         * runtime/Terminator.h: Added.
2875             - Added a new controller object that can be used to terminate
2876               execution asynchronously.  This object is more or less a
2877               glorified bool.
2878         (JSC::Terminator::Terminator):
2879         (JSC::Terminator::termianteSoon):
2880         (JSC::Terminator::shouldTerminate):
2881
2882 2010-04-05  Oliver Hunt  <oliver@apple.com>
2883
2884         And another one.
2885
2886         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
2887
2888 2010-04-05  Oliver Hunt  <oliver@apple.com>
2889
2890         And another build fix.
2891
2892         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2893
2894 2010-04-05  Oliver Hunt  <oliver@apple.com>
2895
2896         Build fix
2897
2898         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2899
2900 2010-04-05  Oliver Hunt  <oliver@apple.com>
2901
2902         Reviewed by Gavin Barraclough.
2903
2904         Support weak maps in JSC
2905         https://bugs.webkit.org/show_bug.cgi?id=37132
2906
2907         Expose an API to allow creation of a map for storing
2908         weak JS references.
2909
2910         * API/JSWeakObjectMapRefInternal.h: Added.
2911         (OpaqueJSWeakObjectMap::create):
2912         (OpaqueJSWeakObjectMap::map):
2913         (OpaqueJSWeakObjectMap::~OpaqueJSWeakObjectMap):
2914         (OpaqueJSWeakObjectMap::OpaqueJSWeakObjectMap):
2915         * API/JSWeakObjectMapRefPrivate.cpp: Added.
2916         * API/JSWeakObjectMapRefPrivate.h: Added.
2917         * JavaScriptCore.exp:
2918         * JavaScriptCore.xcodeproj/project.pbxproj:
2919         * runtime/JSGlobalObject.h:
2920         (JSC::JSGlobalObject::registerWeakMap):
2921         (JSC::JSGlobalObject::deregisterWeakMap):
2922
2923 2010-04-05  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2924
2925         Reviewed by Kenneth Rohde Christiansen.
2926
2927         [Symbian] Consolidate Symbian WINSCW environment configuration
2928         https://bugs.webkit.org/show_bug.cgi?id=37100
2929
2930         Move the "undefinition" of WIN32 and _WIN32 from WebCore/config.h
2931         to JavaScriptCore/wtf/Platform.h as it is not specific to WebCore.
2932
2933         PLATFORM(WIN) and OS(WIN) no longer needs to be undefined as
2934         undefining WIN32 takes care of it.
2935
2936         * wtf/Platform.h:
2937
2938 2010-04-03  Gavin Barraclough  <barraclough@apple.com>
2939
2940         Reviewed by Oliver Hunt.
2941
2942         https://bugs.webkit.org/show_bug.cgi?id=37068
2943         Change UString to use a 0 rep for null strings instead of a null object.
2944
2945         No performance impact.
2946
2947         * JavaScriptCore.exp:
2948         * runtime/InternalFunction.cpp:
2949         (JSC::InternalFunction::InternalFunction):
2950         * runtime/JSString.h:
2951         (JSC::RopeBuilder::JSString):
2952         * runtime/UString.cpp:
2953         (JSC::initializeUString):
2954         * runtime/UString.h:
2955         (JSC::UString::UString):
2956         (JSC::UString::data):
2957         (JSC::UString::size):
2958         (JSC::UString::isNull):
2959         (JSC::UString::isEmpty):
2960         (JSC::UString::cost):
2961
2962 2010-04-03  Balazs Kelemen  <kb@inf.u-szeged.hu>
2963
2964         Reviewed by Oliver Hunt.
2965
2966         Fix uninitalised members in CallLinkInfo and BytecodeGenerator.
2967
2968         https://bugs.webkit.org/show_bug.cgi?id=36816
2969
2970         * bytecode/CodeBlock.cpp:
2971         (JSC::CodeBlock::CodeBlock):
2972         * bytecode/CodeBlock.h:
2973         (JSC::CallLinkInfo::CallLinkInfo):
2974
2975 2010-04-03  yael aharon  <yael.aharon@nokia.com>
2976
2977         Reviewed by Darin Adler.
2978
2979         Enable HTMLProgressElement for Safari on OSX
2980         https://bugs.webkit.org/show_bug.cgi?id=36961
2981
2982         * Configurations/FeatureDefines.xcconfig:
2983
2984 2010-04-02  Ruben Van Boxem  <vanboxem.ruben@gmail.com>
2985
2986         Reviewed by Eric Seidel.
2987
2988         Mingw-w64 fixes for JavaScriptCore
2989         https://bugs.webkit.org/show_bug.cgi?id=35607
2990
2991         * runtime/Collector.cpp: use the msvc code for mingw-w64 (but not mingw-w32)
2992         (JSC::Heap::allocateBlock):
2993         (JSC::Heap::freeBlockPtr):
2994         (JSC::currentThreadStackBase):
2995         (JSC::currentThreadStackBase):
2996         * wtf/Platform.h: added COMPILER(MINGW64) check to differentiate between mingw.org and mingw-w64 functions
2997
2998 2010-04-02  Geoffrey Garen  <ggaren@apple.com>
2999
3000         Build fix: updated the .def file.
3001
3002         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3003
3004 2010-04-02  Geoffrey Garen  <ggaren@apple.com>
3005
3006         Reviewed by Oliver Hunt.
3007
3008         Inlined toThisString and toThisJSString to avoid virtual function call overhead
3009         https://bugs.webkit.org/show_bug.cgi?id=37039
3010         
3011         Maybe a 1% speedup on iBench JS.
3012
3013         * JavaScriptCore.exp: New exports.
3014
3015         * runtime/JSCell.cpp:
3016         * runtime/JSCell.h:
3017         * runtime/JSNumberCell.cpp:
3018         * runtime/JSNumberCell.h:
3019         * runtime/JSString.cpp:
3020         * runtime/JSString.h:
3021         * runtime/JSValue.h:
3022         * runtime/JSZombie.h:
3023         (JSC::JSZombie::toThisObject): Nixed the old virtual-type implementation.
3024
3025         * runtime/JSObject.h:
3026         (JSC::JSValue::toThisString):
3027         (JSC::JSValue::toThisJSString): Added the inlined implementation.
3028
3029 2010-04-02  Jeremy Moskovich  <jeremy@chromium.org>
3030
3031         Reviewed by Geoffrey Garen.
3032
3033         Beef up documentation for ASSERT* and CRASH macros a bit.
3034
3035         https://bugs.webkit.org/show_bug.cgi?id=36527
3036
3037         * wtf/Assertions.h:
3038
3039 2010-04-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3040
3041         Unreviewed, minor build fix.
3042
3043         Change the order of the member initialisation list
3044         in constructor to match declaration order
3045
3046         * runtime/Collector.cpp:
3047         (JSC::Heap::Heap):
3048
3049 2010-04-01  Kinuko Yasuda  <kinuko@chromium.org>
3050
3051         Reviewed by Dmitry Titov.
3052
3053         Add FileThread for async file operation support in FileReader and FileWriter
3054         https://bugs.webkit.org/show_bug.cgi?id=36896
3055
3056         Add ENABLE_FILE_READER and ENABLE_FILE_WRITER flags.
3057
3058         * Configurations/FeatureDefines.xcconfig:
3059
3060 2010-03-31  Gavin Barraclough  <barraclough@apple.com>
3061
3062         Reviewed by NOBODY (windows build fix pt II).
3063
3064         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3065
3066 2010-03-31  Gavin Barraclough  <barraclough@apple.com>
3067
3068         Reviewed by NOBODY (windows build fix).
3069
3070         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3071
3072 2010-03-31  Gavin Barraclough  <barraclough@apple.com>
3073
3074         Reviewed by Geoff Garen.
3075
3076         Bug 36871 - Remove JSC::CString
3077         Use WTF::CString instead (which until recently was WebCore::CString).
3078
3079         * JavaScriptCore.exp:
3080         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3081         * runtime/UString.cpp:
3082         * runtime/UString.h:
3083
3084 2010-03-31  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3085
3086         Unreviewed, fix after r56842.
3087
3088         Add UNUSED_PARAM a to silence warning.
3089
3090         * jit/JITStubs.cpp:
3091         (JSC::DEFINE_STUB_FUNCTION):
3092
3093 2010-03-31  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3094
3095         Unreviewed, Symbian build fix.
3096
3097         Refactor JITStubs.cpp so that the list of STUB_FUNCTIONs
3098         are not dependent on the JSVALUE32_64 guard.
3099
3100         * jit/JITStubs.cpp: Place the JSVALUE32_64 guard inside 
3101         the body of cti_op_eq_strings.
3102         * jit/JITStubs.h: Remove JSVALUE32_64 guard from 
3103         cti_op_eq_strings stub.
3104
3105 2010-03-30  Gavin Barraclough  <barraclough@apple.com>
3106
3107         Reviewed by NOBODY (windows build fix).
3108
3109         Fixing b0rked version of JavaScriptCore.vcproj - added lines were truncated.
3110
3111         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3112
3113 2010-03-30  Gavin Barraclough  <barraclough@apple.com>
3114
3115         Rubber stamped by Sam Weinig.
3116
3117         https://bugs.webkit.org/show_bug.cgi?id=36866
3118         Move CString to WTF
3119
3120         * Android.mk:
3121         * GNUmakefile.am:
3122         * JavaScriptCore.exp:
3123         * JavaScriptCore.gypi:
3124         * JavaScriptCore.pro:
3125         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3126         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3127         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3128         * JavaScriptCore.xcodeproj/project.pbxproj:
3129         * wtf/text: Added.
3130         * wtf/text/CString.cpp: Copied from WebCore/platform/text/CString.cpp.
3131         * wtf/text/CString.h: Copied from WebCore/platform/text/CString.h.
3132         (WTF::CStringBuffer::data):
3133         (WTF::CStringBuffer::length):
3134         (WTF::CStringBuffer::create):
3135         (WTF::CStringBuffer::CStringBuffer):
3136         (WTF::CStringBuffer::mutableData):
3137         (WTF::CString::CString):
3138         (WTF::CString::isNull):
3139         (WTF::CString::buffer):
3140         (WTF::operator!=):
3141
3142 2010-03-30  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3143
3144         Reviewed by nobody, build break.
3145
3146         [Qt] Fix build break on Qt Mac.
3147
3148         DESTDIR path on Mac do not include the configuration path by default
3149         like on Windows. Have to force it.
3150
3151         * JavaScriptCore.pro:
3152
3153 2010-03-29  Alice Liu  <alice.liu@apple.com>
3154
3155         Reviewed by NOBODY (build fix).
3156
3157         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3158         add JSObjectRefPrivate.h
3159
3160 2010-03-29  Chao-ying Fu  <fu@mips.com>
3161
3162         Reviewed by Oliver Hunt.
3163
3164         MIPS JIT Supports
3165         https://bugs.webkit.org/show_bug.cgi?id=30144
3166
3167         The following changes enable MIPS JIT.
3168
3169         * assembler/MIPSAssembler.h:
3170         (JSC::MIPSAssembler::lbu):
3171         (JSC::MIPSAssembler::linkWithOffset):
3172         * assembler/MacroAssemblerMIPS.h:
3173         (JSC::MacroAssemblerMIPS::load8):
3174         (JSC::MacroAssemblerMIPS::branch8):
3175         (JSC::MacroAssemblerMIPS::branchTest8):
3176         (JSC::MacroAssemblerMIPS::setTest8):
3177         (JSC::MacroAssemblerMIPS::setTest32):
3178         * jit/JIT.h:
3179         * jit/JITInlineMethods.h:
3180         (JSC::JIT::preserveReturnAddressAfterCall):
3181         (JSC::JIT::restoreReturnAddressBeforeReturn):
3182         * jit/JITOpcodes.cpp:
3183         * jit/JITStubs.cpp:
3184         (JSC::JITThunks::JITThunks):
3185         * jit/JITStubs.h:
3186         (JSC::JITStackFrame::returnAddressSlot):
3187         * wtf/Platform.h:
3188
3189 2010-02-26  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3190
3191         Reviewed by Simon Fraser.
3192
3193         Add support for Widgets 1.0: View Mode Media Feature
3194         https://bugs.webkit.org/show_bug.cgi?id=35446
3195
3196         Add an enable flag for the Widgets (http://www.w3.org/TR/widgets-reqs/)
3197         and turn it on for Qt only.
3198
3199         * wtf/Platform.h:
3200
3201 2010-03-29  Patrick Gansterer  <paroga@paroga.com>
3202
3203         Reviewed by Darin Adler.
3204
3205         Corrected name of (u)int64_t compile time assert.
3206         https://bugs.webkit.org/show_bug.cgi?id=36739
3207
3208         int64_t_is_four_bytes -> int64_t_is_eight_bytes
3209
3210         * os-win32/stdint.h:
3211
3212 2010-03-29  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3213
3214         Reviewed by Simon Hausmann.
3215
3216         [Qt] Use the -l syntax for linking against JavaScriptCore on Windows.
3217         This allow qmake to extract dependencies correctly when generating VS
3218         solutions.
3219
3220         * JavaScriptCore.pri:
3221
3222 2010-03-29  Thomas Zander  <t.zander@nokia.com>
3223
3224         Reviewed by Simon Hausmann.
3225
3226         https://bugs.webkit.org/show_bug.cgi?id=36742
3227
3228         gcc for Symbian doesn't support gcc extensions like atomicity.h - disable
3229
3230         * wtf/Threading.h: also detect os symbian
3231
3232 2010-03-28  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3233
3234         Reviewed by Simon Hausmann.
3235
3236         [Qt] Remove the definition of WTF_CHANGES guards from the build system
3237         https://bugs.webkit.org/show_bug.cgi?id=31670
3238   
3239         * JavaScriptCore.pro: Remove the definition of WTF_CHANGES
3240         as it is already defined in config.h
3241
3242 2010-03-28  Kent Hansen  <kent.hansen@nokia.com>
3243
3244         Reviewed by Simon Hausmann.
3245
3246         [Qt] Add API for reporting additional memory cost of JavaScript objects
3247         https://bugs.webkit.org/show_bug.cgi?id=36650
3248
3249         * qt/api/qscriptengine.cpp:
3250         (QScriptEngine::reportAdditionalMemoryCost):
3251         * qt/api/qscriptengine.h:
3252         * qt/api/qscriptengine_p.h:
3253         (QScriptEnginePrivate::reportAdditionalMemoryCost):
3254         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
3255         (tst_QScriptEngine::reportAdditionalMemoryCost):
3256
3257 2010-03-28  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3258
3259         Reviewed by Simon Hausmann.
3260
3261         QScriptEngine API was enriched by globalObject() method
3262         which give an access to the global object.
3263
3264         [Qt] QScriptEngine doesn't give an access to global object
3265         https://bugs.webkit.org/show_bug.cgi?id=36603
3266
3267         * qt/api/qscriptengine.cpp:
3268         (QScriptEngine::globalObject):
3269         * qt/api/qscriptengine.h:
3270         * qt/api/qscriptengine_p.cpp:
3271         (QScriptEnginePrivate::globalObject):
3272         * qt/api/qscriptengine_p.h:
3273         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
3274         (tst_QScriptEngine::globalObject):
3275
3276 2010-03-26  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3277
3278         Reviewed by Simon Hausmann.
3279
3280         [Qt] Build JavaScriptCore as a static library.
3281         https://bugs.webkit.org/show_bug.cgi?id=36590
3282
3283         This patch takes what was left of the unused JavaScriptCore.pro
3284         and moved the compilation logic from JavaScriptCore.pri to
3285         JavaScriptCore.pro.
3286
3287         * JavaScriptCore.pri:
3288         * JavaScriptCore.pro:
3289         * jsc.pro:
3290         * qt/api/QtScript.pro:
3291
3292 2010-03-25  Gavin Barraclough  <barraclough@apple.com>
3293
3294         Reviewed by NOBODY (build fix).
3295
3296         * profiler/ProfileGenerator.cpp:
3297         (JSC::ProfileGenerator::willExecute):
3298         (JSC::ProfileGenerator::didExecute):
3299
3300 2010-03-25  Gavin Barraclough  <barraclough@apple.com>
3301
3302         Reviewed by Geoff Garen.
3303
3304         Bug 36611 - Cleanup JSC::CString
3305         Rename CString::c_str() -> CString::data(), CString::size() -> CString::length(),
3306         remove UString::getCString() (all uses are wrong, should use UString::UTF8String()).
3307
3308         * bytecode/CodeBlock.cpp:
3309         (JSC::CodeBlock::printUnaryOp):
3310         (JSC::CodeBlock::printBinaryOp):
3311         (JSC::CodeBlock::printConditionalJump):
3312         (JSC::CodeBlock::printGetByIdOp):
3313         (JSC::CodeBlock::printPutByIdOp):
3314         (JSC::printGlobalResolveInfo):
3315         (JSC::printStructureStubInfo):
3316         (JSC::CodeBlock::printStructure):
3317         (JSC::CodeBlock::printStructures):
3318         (JSC::CodeBlock::dump):
3319         * jsc.cpp:
3320         (functionPrint):
3321         (functionDebug):
3322         (runInteractive):
3323         (fillBufferWithContentsOfFile):
3324         * profiler/CallIdentifier.h:
3325         (JSC::CallIdentifier::c_str):
3326         * profiler/Profile.cpp:
3327         (JSC::Profile::debugPrintDataSampleStyle):
3328         * profiler/ProfileNode.cpp:
3329         (JSC::ProfileNode::debugPrintData):
3330         (JSC::ProfileNode::debugPrintDataSampleStyle):
3331         * runtime/DateConversion.cpp:
3332         (JSC::parseDate):
3333         * runtime/JSGlobalObjectFunctions.cpp:
3334         (JSC::encode):
3335         (JSC::globalFuncJSCPrint):
3336         * runtime/UString.cpp:
3337         (JSC::operator==):
3338         (JSC::UString::toDouble):
3339         * runtime/UString.h:
3340         (JSC::CString::length):
3341         (JSC::CString::data):
3342
3343 2010-03-25  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3344
3345         Reviewed by nobody, build fix.
3346
3347         [Qt] Build fix on MSVC. Reverts r55633 for stdint.h
3348
3349         This file gets included in generated moc files which don't
3350         include the prefix header.
3351
3352         * os-win32/stdint.h:
3353
3354 2010-03-24  Gavin Barraclough  <barraclough@apple.com>
3355
3356         Reviewed by NOBODY (windows build fix).
3357
3358 2010-03-24  Gavin Barraclough  <barraclough@apple.com>
3359
3360         Reviewed by Sam Weinig.
3361
3362         Switch String::latin1, String::utf8, String::fromUTF8 to
3363         use WTF's Unicode conversion methods rather than TextEncoder.
3364         These methods only perform simple conversion, and don't need
3365         really require TextEncoder's full capability (to look up arbitrary
3366         encodings by name), switching to only be dependent on WTF will
3367         make it easier if we chose to move WebCore::String to WTF.
3368
3369         * JavaScriptCore.exp:
3370
3371 2010-03-24  Alexey Proskuryakov  <ap@apple.com>
3372
3373         Reviewed by Geoff Garen.
3374
3375         * wtf/FastMalloc.h: Added a using directive for fastMallocSize, like we do for all public
3376         WTF symbols. Also sorted the list alphabetically.
3377
3378 2010-03-23  Gavin Barraclough  <barraclough@apple.com>
3379
3380         Reviewed by NOBODY (speculative windows build fix part II).
3381
3382 2010-03-23  Gavin Barraclough  <barraclough@apple.com>
3383
3384         Reviewed by NOBODY (speculative windows build fix).
3385
3386 2010-03-23  Gavin Barraclough  <barraclough@apple.com>
3387
3388         Reviewed by Oliver Hunt.
3389
3390         Bug 36519 - JSGlobalContextRelease is unnecessarily slow
3391
3392         Since [ http://trac.webkit.org/changeset/35917 ], calling
3393         JSGlobalContextRelease always triggers a GC heap collection
3394         (if not a full destroy). As per 35917's changelog "This is
3395         only really necessary when the (JSGlobalObject's) last
3396         reference is released, but there is no way to determine that,
3397         and no harm in collecting slightly more often."
3398         
3399         Well, we now know of cases of API clients who are harmed by
3400         the performance penalty of collecting too often, so it's time
3401         to add a way to determine whether a call to JSGlobalContextRelease
3402         is removing the last protect from it's global object.  If further
3403         protects are retaining the global object (likely from other
3404         JSGlobalContextRefs), then don't trigger a GC collection.
3405
3406         * API/JSContextRef.cpp:
3407         * runtime/Collector.cpp:
3408         (JSC::Heap::unprotect): return a boolean indicating that the value is now unprotected.
3409         * runtime/Collector.h:
3410         * wtf/HashCountedSet.h:
3411         (WTF::::remove): return a boolean indicating whether the value was removed from the set.
3412
3413 2010-03-23  Mark Rowe  <mrowe@apple.com>
3414
3415         Build fix.
3416
3417         * runtime/ArrayPrototype.cpp:
3418         (JSC::arrayProtoFuncSplice): Some versions of GCC emit a warning about the implicit 64- to 32-bit truncation
3419         that takes place here. An explicit cast is sufficient to silence it.
3420
3421 2010-03-23  Alexey Proskuryakov  <ap@apple.com>
3422
3423         Build fix.
3424
3425         * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): Fixed a typo - length doesn't
3426         need to be converted with toInteger().
3427
3428 2010-03-23  Alexey Proskuryakov  <ap@apple.com>
3429
3430         Reviewed by Geoff Garen.
3431
3432         https://bugs.webkit.org/show_bug.cgi?id=36511
3433         <rdar://problem/7753498> Safari freezes when using SPUTNIK JavaScript conformance check
3434
3435         Test: fast/js/sputnik-S15.4.4.12_A3_T3.html
3436
3437         * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): We were incorrectly computing
3438         the start offset, and iterated over (almost) all integers. Note that this can be fixed
3439         without using doubles, but the code would be much more complicated, and there is no important
3440         reason to stick to integers here.
3441
3442 2010-03-23  Kent Hansen  <kent.hansen@nokia.com>
3443
3444         Reviewed by Darin Adler.
3445
3446         Fix compilation on Itanium in 32-bit mode
3447         https://bugs.webkit.org/show_bug.cgi?id=36494
3448
3449         * wtf/Platform.h: Introduce CPU(IA64_32). Don't define
3450           WTF_USE_JSVALUE64 if the CPU is in 32-bit mode.
3451
3452 2010-03-23  Geoffrey Garen  <ggaren@apple.com>
3453
3454         Reviewed by Mark Rowe.
3455
3456         Interpreter fix for <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648)
3457         evaluates to -2147483648 on 32 bit (35842)
3458
3459         * interpreter/Interpreter.cpp:
3460         (JSC::Interpreter::privateExecute): Only take the fast negate path if
3461         a bit other than bit 31 is set. If none of bits 0-30 are set, then the
3462         value we're negating can only be 0 or -2147483648, and neither can be
3463         negated in int space.
3464
3465         * jit/JITArithmetic.cpp:
3466         (JSC::JIT::emit_op_negate):
3467         (JSC::JIT::emitSlow_op_negate): Updated the JIT implementation to match
3468         the interpreter, since it's slightly simpler.
3469
3470 2010-03-22  Siddharth Mathur  <siddharth.mathur@nokia.com>
3471
3472         Reviewed by Laszlo Gombos.
3473
3474         [Symbian] More efficient aligned memory allocation for JSC Collector
3475         https://bugs.webkit.org/show_bug.cgi?id=34350
3476
3477         * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage
3478
3479         * runtime/Collector.cpp: Reduced port-specific code and added private data member
3480         (JSC::Heap::Heap):
3481         (JSC::Heap::~Heap):
3482         (JSC::Heap::destroy):
3483         (JSC::Heap::allocateBlock):
3484         (JSC::Heap::freeBlockPtr):
3485
3486         * runtime/Collector.h: Added private data member
3487
3488         * wtf/symbian: Added.
3489         * wtf/symbian/BlockAllocatorSymbian.cpp: Added.
3490         (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate 
3491         aligned blocks more efficiently as required by Collector
3492         (WTF::AlignedBlockAllocator::alloc):
3493         (WTF::AlignedBlockAllocator::free):
3494         (WTF::AlignedBlockAllocator::destroy):
3495         (WTF::AlignedBlockAllocator::~AlignedBlockAllocator):
3496         * wtf/symbian/BlockAllocatorSymbian.h: Added.
3497
3498 2010-03-22  Geoffrey Garen  <ggaren@apple.com>
3499
3500         Reviewed by Sam Weinig.
3501
3502         Fixed <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648)
3503         evaluates to -2147483648 on 32 bit (35842)
3504         
3505         Two ways to fix the same bug:
3506         
3507         1. Check for overflow when negating, since negating the largest negative
3508         int causes overflow.
3509         
3510         2. Constant-fold even when negating a negative, since, like they say in
3511         high school, "math works."
3512
3513         * assembler/MacroAssemblerARM.h:
3514         (JSC::MacroAssemblerARM::branchNeg32):
3515         * assembler/MacroAssemblerX86Common.h:
3516         (JSC::MacroAssemblerX86Common::branchNeg32): Added a branching version
3517         of the negate operator.
3518
3519         * jit/JITArithmetic.cpp:
3520         (JSC::JIT::emit_op_negate): Use the branching version of the negate 
3521         operator to check for overflow.
3522
3523         (JSC::JIT::emitSlow_op_negate): Link the check for overflow to a slow case.
3524         (We could emit inline code for this, since we know what the result would
3525         be, but that's probably just a waste of generated code.)
3526
3527         * parser/Grammar.y: Constant fold even when negating a negative.
3528
3529 2010-03-22  David Kilzer  <ddkilzer@apple.com>
3530
3531         <http://webkit.org/b/36431> Clean up 'int' use in UString.cpp after r54789
3532
3533         Reviewed by Darin Adler.
3534
3535         * runtime/UString.cpp:
3536         (JSC::UString::from): Changed argument type from 'unsigned int'
3537         to 'unsigned' to match WebKit coding style.
3538         (JSC::UString::find): Changed static_cast<int>() to
3539         static_cast<unsigned>() now that this method returns unsigned.
3540         (JSC::UString::rfind): Ditto.
3541         * runtime/UString.h:
3542         (JSC::UString::from): Changed argument type from 'unsigned int'
3543         to 'unsigned' to match WebKit coding style.
3544
3545 2010-03-22  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3546
3547         Reviewed by Kenneth Rohde Christiansen.
3548
3549         Add support for syntax checking in the QtScript API.
3550
3551         New class was created; the QScriptSyntaxCheckResult which main
3552         responsibility is to provide results of the ECMA Script code
3553         syntax check. The class is not fully functional as the JSC C API
3554         doesn't expose an error column number, but it is a good start point
3555         for a future development.
3556
3557         [Qt] QtScript functionality should be extended by syntax checking.
3558         https://bugs.webkit.org/show_bug.cgi?id=36123
3559
3560         * qt/api/QtScript.pro:
3561         * qt/api/qscriptengine.cpp:
3562         (QScriptEngine::checkSyntax):
3563         * qt/api/qscriptengine.h:
3564         * qt/api/qscriptengine_p.cpp:
3565         (QScriptEnginePrivate::checkSyntax):
3566         * qt/api/qscriptengine_p.h:
3567         * qt/api/qscriptsyntaxcheckresult.cpp: Added.
3568         (QScriptSyntaxCheckResult::QScriptSyntaxCheckResult):
3569         (QScriptSyntaxCheckResult::~QScriptSyntaxCheckResult):
3570         (QScriptSyntaxCheckResult::operator=):
3571         (QScriptSyntaxCheckResult::state):
3572         (QScriptSyntaxCheckResult::errorLineNumber):
3573         (QScriptSyntaxCheckResult::errorColumnNumber):
3574         (QScriptSyntaxCheckResult::errorMessage):
3575         * qt/api/qscriptsyntaxcheckresult.h: Added.
3576         * qt/api/qscriptsyntaxcheckresult_p.cpp: Added.
3577         (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
3578         (QScriptSyntaxCheckResultPrivate::errorMessage):
3579         (QScriptSyntaxCheckResultPrivate::errorLineNumber):
3580         * qt/api/qscriptsyntaxcheckresult_p.h: Added.
3581         (QScriptSyntaxCheckResultPrivate::get):
3582         (QScriptSyntaxCheckResultPrivate::QScriptSyntaxCheckResultPrivate):
3583         (QScriptSyntaxCheckResultPrivate::state):
3584         (QScriptSyntaxCheckResultPrivate::errorColumnNumber):
3585         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
3586         (tst_QScriptEngine::checkSyntax_data):
3587         (tst_QScriptEngine::checkSyntax):
3588
3589 2010-03-21  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3590
3591         Reviewed by Simon Hausmann.
3592
3593         New class; QScriptProgram.
3594
3595         The class should be used to evaluate the same script multiple times
3596         more efficiently.
3597
3598         [Qt] QtScript should have QScriptProgram class
3599         https://bugs.webkit.org/show_bug.cgi?id=36008
3600
3601         * qt/api/QtScript.pro:
3602         * qt/api/qscriptengine.cpp:
3603         (QScriptEngine::evaluate):
3604         * qt/api/qscriptengine.h:
3605         * qt/api/qscriptengine_p.cpp:
3606         (QScriptEnginePrivate::evaluate):
3607         * qt/api/qscriptengine_p.h:
3608         (QScriptEnginePrivate::evaluate):
3609         * qt/api/qscriptprogram.cpp: Added.
3610         (QScriptProgram::QScriptProgram):
3611         (QScriptProgram::~QScriptProgram):
3612         (QScriptProgram::operator=):
3613         (QScriptProgram::isNull):
3614         (QScriptProgram::sourceCode):
3615         (QScriptProgram::fileName):
3616         (QScriptProgram::firstLineNumber):
3617         (QScriptProgram::operator==):
3618         (QScriptProgram::operator!=):
3619         * qt/api/qscriptprogram.h: Added.
3620         * qt/api/qscriptprogram_p.h: Added.
3621         (QScriptProgramPrivate::get):
3622         (QScriptProgramPrivate::QScriptProgramPrivate):
3623         (QScriptProgramPrivate::~QScriptProgramPrivate):
3624         (QScriptProgramPrivate::isNull):
3625         (QScriptProgramPrivate::sourceCode):
3626         (QScriptProgramPrivate::fileName):
3627         (QScriptProgramPrivate::firstLineNumber):
3628         (QScriptProgramPrivate::operator==):
3629         (QScriptProgramPrivate::operator!=):
3630         (QScriptProgramPrivate::program):
3631         (QScriptProgramPrivate::file):
3632         (QScriptProgramPrivate::line):
3633         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
3634         (tst_QScriptEngine::evaluateProgram):
3635
3636 2010-03-21  David Kilzer  <ddkilzer@apple.com>
3637
3638         Blind attempt #2 to fix the Windows build after r56314
3639
3640         * API/tests/testapi.c: Include JSObjectRefPrivate.h for the new
3641         methods instead of declaring them locally (and non-extern).
3642         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3643         Backed out previous change.
3644
3645 2010-03-21  David Kilzer  <ddkilzer@apple.com>
3646
3647         Blind attempt to fix the Windows build after r56314
3648
3649         Try to fix the following errors on the Windows buildbot:
3650
3651             Linking...
3652             testapi.obj : error LNK2001: unresolved external symbol "bool __cdecl JSObjectSetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *,struct OpaqueJSValue const *)" (?JSObjectSetPrivateProperty@@YA_NPBUOpaqueJSContext@@PAUOpaqueJSValue@@PAUOpaqueJSString@@PBU2@@Z)
3653             testapi.obj : error LNK2001: unresolved external symbol "struct OpaqueJSValue const * __cdecl JSObjectGetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *)" (?JSObjectGetPrivateProperty@@YAPBUOpaqueJSValue@@PBUOpaqueJSContext@@PAU1@PAUOpaqueJSString@@@Z)
3654             C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\bin\testapi.exe : fatal error LNK1120: 2 unresolved externals
3655
3656         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
3657         missing symbols to be exported.
3658
3659 2010-03-21  Oliver Hunt  <oliver@apple.com>
3660
3661         Reviewed by Maciej Stachowiak.
3662
3663         Documentation fix for previous patch.
3664