2010-10-22 Adam Barth <abarth@webkit.org>
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2010-10-22  Adam Barth  <abarth@webkit.org>
2
3         Unreviewed, rolling out r70290.
4         http://trac.webkit.org/changeset/70290
5         https://bugs.webkit.org/show_bug.cgi?id=48111
6
7         Undelete Android build files.
8
9         * Android.mk: Added.
10
11 2010-10-22  Zoltan Herczeg  <zherczeg@webkit.org>
12
13         Reviewed by Csaba Osztrogonác.
14
15         JSC interpreter regressions after r69940
16         https://bugs.webkit.org/show_bug.cgi?id=47839
17
18         Wrong "if": It should test whether the result exists,
19         and not the opposite. It is an interpreter bug, hence
20         the bots does not capture it.
21
22         * interpreter/Interpreter.cpp:
23         (JSC::Interpreter::resolveBase):
24
25 2010-10-21  Adam Barth  <abarth@webkit.org>
26
27         Reviewed by David Levin.
28
29         Remove Android build system
30         https://bugs.webkit.org/show_bug.cgi?id=48111
31
32         * Android.mk: Removed.
33
34 2010-10-21  Kwang Yul Seo  <skyul@company100.net>
35
36         Reviewed by Kent Tamura.
37
38         [BREWMP] Add a String constructor which takes AECHAR*
39         https://bugs.webkit.org/show_bug.cgi?id=45043
40
41         Add String(const AECHAR*) constructor for convenience.
42
43         * wtf/text/WTFString.h:
44
45 2010-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
46
47         Reviewed by Martin Robinson.
48
49         [GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk
50         https://bugs.webkit.org/show_bug.cgi?id=47896
51
52         * wtf/gobject/GTypedefs.h:
53
54 2010-10-21  Adam Barth  <abarth@webkit.org>
55
56         Unreviewed, rolling out r70174.
57         http://trac.webkit.org/changeset/70174
58         https://bugs.webkit.org/show_bug.cgi?id=41948
59
60         This patch reverts a change that causes
61         http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash.
62
63         * interpreter/Interpreter.cpp:
64         (JSC::Interpreter::throwException):
65
66 2010-10-20  Simon Fraser  <simon.fraser@apple.com>
67
68         Fix the EFL build.
69
70         * wtf/CMakeLists.txt:
71
72 2010-10-20  Simon Fraser  <simon.fraser@apple.com>
73
74         Fix Windows build: export needed symbols.
75
76         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
77
78 2010-10-19  Simon Fraser  <simon.fraser@apple.com>
79
80         Reviewed by Gavin Barraclough.
81
82         https://bugs.webkit.org/show_bug.cgi?id=47851
83         
84         Add methods to DecimalNumber to return the buffer length
85         required for decimal and exponential output.
86         
87         Make some of the DecimalNumber code non-inline (no
88         effect on Sunspider), adding DecimalNumber.cpp to various
89         build systems.
90         
91         Make some DecimalNumber methods 'const'.
92
93         * Android.mk:
94         * Android.v8.wtf.mk:
95         * GNUmakefile.am:
96         * JavaScriptCore.exp:
97         * JavaScriptCore.gypi:
98         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
99         * JavaScriptCore.xcodeproj/project.pbxproj:
100         * runtime/NumberPrototype.cpp:
101         (JSC::numberProtoFuncToExponential):
102         (JSC::numberProtoFuncToFixed):
103         (JSC::numberProtoFuncToPrecision):
104         * wtf/DecimalNumber.cpp: Added.
105         (WTF::DecimalNumber::bufferLengthForStringDecimal):
106         (WTF::DecimalNumber::bufferLengthForStringExponential):
107         (WTF::DecimalNumber::toStringDecimal):
108         (WTF::DecimalNumber::toStringExponential):
109         * wtf/DecimalNumber.h:
110         (WTF::DecimalNumber::sign):
111         (WTF::DecimalNumber::exponent):
112         (WTF::DecimalNumber::significand):
113         (WTF::DecimalNumber::precision):
114         * wtf/dtoa.cpp:
115         (WTF::dtoa):
116         * wtf/dtoa.h:
117         * wtf/wtf.pri:
118
119 2010-10-20  Sheriff Bot  <webkit.review.bot@gmail.com>
120
121         Unreviewed, rolling out r70165.
122         http://trac.webkit.org/changeset/70165
123         https://bugs.webkit.org/show_bug.cgi?id=48007
124
125         It broke tests on Qt bot (Requested by Ossy on #webkit).
126
127         * GNUmakefile.am:
128         * JavaScriptCore.gypi:
129         * JavaScriptCore.xcodeproj/project.pbxproj:
130         * wtf/text/TextPosition.h: Removed.
131
132 2010-10-20  Brian Weinstein  <bweinstein@apple.com>
133
134         Reviewed by Adam Roben.
135
136         Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build
137         step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed.
138
139         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
140         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
141
142 2010-10-20  Dumitru Daniliuc  <dumi@chromium.org>
143
144         Unreviewed, fixing the Win build.
145
146         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
147
148 2010-10-20  Geoffrey Garen  <ggaren@apple.com>
149
150         Reviewed by Darin Adler.
151         
152         https://bugs.webkit.org/show_bug.cgi?id=41948
153         REGRESSION(r60392): Registerfile can be unwound too far following an exception
154
155         * interpreter/Interpreter.cpp:
156         (JSC::Interpreter::throwException): Walk the stack to calculate the high
157         water mark currently in use. It's not safe to assume that the current
158         CallFrame's high water mark is the highest high water mark because
159         calls do not always set up at the end of a CallFrame. A large caller
160         CallFrame can encompass a small callee CallFrame.
161
162 2010-10-20  Peter Rybin  <peter.rybin@gmail.com>
163
164         Reviewed by Adam Barth.
165
166         HTML parser should provide script column position within HTML document to JavaScript engine
167         https://bugs.webkit.org/show_bug.cgi?id=45271
168
169         Adds TextPosition* classes -- a structure that stores line/column/generation
170         level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
171         wrappers that emphasize whether int number is used as zero-based or
172         one-based.
173
174         * GNUmakefile.am:
175         * JavaScriptCore.gypi:
176         * JavaScriptCore.xcodeproj/project.pbxproj:
177         * wtf/text/TextPosition.h: Added.
178         (WTF::TextPosition::TextPosition):
179         (WTF::TextPosition::minimumPosition):
180         (WTF::TextPosition::belowRangePosition):
181         (WTF::ZeroBasedNumber::fromZeroBasedInt):
182         (WTF::ZeroBasedNumber::ZeroBasedNumber):
183         (WTF::ZeroBasedNumber::zeroBasedInt):
184         (WTF::ZeroBasedNumber::base):
185         (WTF::ZeroBasedNumber::belowBase):
186         (WTF::OneBasedNumber::fromOneBasedInt):
187         (WTF::OneBasedNumber::OneBasedNumber):
188         (WTF::OneBasedNumber::oneBasedInt):
189         (WTF::OneBasedNumber::convertAsZeroBasedInt):
190         (WTF::OneBasedNumber::convertToZeroBased):
191         (WTF::OneBasedNumber::base):
192         (WTF::OneBasedNumber::belowBase):
193         (WTF::toZeroBasedTextPosition):
194         (WTF::toOneBasedTextPosition):
195         (WTF::ZeroBasedNumber::convertToOneBased):
196
197 2010-10-19  Kwang Yul Seo  <skyul@company100.net>
198
199         Reviewed by David Kilzer.
200
201         [BREWMP] Turn off JIT for simulator build
202         https://bugs.webkit.org/show_bug.cgi?id=47937
203
204         We don't need to test x86 JIT.
205
206         * wtf/Platform.h:
207
208 2010-10-19  Oliver Hunt  <oliver@apple.com>
209
210         Reviewed by Geoffrey Garen.
211
212         Remove support for JSVALUE32 from JSC
213         https://bugs.webkit.org/show_bug.cgi?id=47948
214
215         Remove all the code for supporting JSVALUE32 from JSC.
216
217         * jit/JIT.cpp:
218         (JSC::JIT::privateCompileMainPass):
219         (JSC::JIT::privateCompileSlowCases):
220         * jit/JIT.h:
221         * jit/JITArithmetic.cpp:
222         (JSC::JIT::emit_op_lshift):
223         (JSC::JIT::emitSlow_op_lshift):
224         (JSC::JIT::emit_op_rshift):
225         (JSC::JIT::emitSlow_op_rshift):
226         (JSC::JIT::emit_op_urshift):
227         (JSC::JIT::emitSlow_op_urshift):
228         (JSC::JIT::emit_op_jnless):
229         (JSC::JIT::emitSlow_op_jnless):
230         (JSC::JIT::emit_op_jless):
231         (JSC::JIT::emitSlow_op_jless):
232         (JSC::JIT::emit_op_jlesseq):
233         (JSC::JIT::emitSlow_op_jlesseq):
234         (JSC::JIT::emit_op_bitand):
235         (JSC::JIT::emit_op_post_inc):
236         (JSC::JIT::emit_op_post_dec):
237         (JSC::JIT::emit_op_pre_inc):
238         (JSC::JIT::emit_op_pre_dec):
239         (JSC::JIT::emit_op_mod):
240         (JSC::JIT::emitSlow_op_mod):
241         * jit/JITCall.cpp:
242         * jit/JITInlineMethods.h:
243         (JSC::JIT::emitGetFromCallFrameHeaderPtr):
244         (JSC::JIT::emitGetFromCallFrameHeader32):
245         * jit/JITOpcodes.cpp:
246         (JSC::JIT::emit_op_loop_if_lesseq):
247         (JSC::JIT::emit_op_bitnot):
248         (JSC::JIT::emit_op_next_pname):
249         * jit/JITPropertyAccess.cpp:
250         (JSC::JIT::emit_op_get_by_val):
251         (JSC::JIT::emit_op_put_by_val):
252         * jit/JITStubs.h:
253         * jit/JSInterfaceJIT.h:
254         * jit/SpecializedThunkJIT.h:
255         (JSC::SpecializedThunkJIT::returnDouble):
256         (JSC::SpecializedThunkJIT::tagReturnAsInt32):
257         * jit/ThunkGenerators.cpp:
258         (JSC::sqrtThunkGenerator):
259         (JSC::powThunkGenerator):
260         * runtime/Collector.cpp:
261         (JSC::isPossibleCell):
262         (JSC::typeName):
263         * runtime/JSCell.h:
264         * runtime/JSGlobalData.cpp:
265         (JSC::JSGlobalData::JSGlobalData):
266         * runtime/JSGlobalData.h:
267         * runtime/JSGlobalObject.h:
268         (JSC::Structure::prototypeForLookup):
269         * runtime/JSImmediate.h:
270         (JSC::reinterpretIntptrToDouble):
271         (JSC::JSImmediate::isIntegerNumber):
272         (JSC::JSImmediate::isDouble):
273         (JSC::JSImmediate::areBothImmediateIntegerNumbers):
274         (JSC::JSImmediate::makeDouble):
275         (JSC::JSImmediate::doubleValue):
276         (JSC::JSImmediate::toBoolean):
277         (JSC::JSImmediate::fromNumberOutsideIntegerRange):
278         (JSC::JSImmediate::from):
279         (JSC::JSImmediate::toDouble):
280         (JSC::JSFastMath::rightShiftImmediateNumbers):
281         * runtime/JSNumberCell.cpp:
282         * runtime/JSNumberCell.h:
283         * runtime/JSObject.h:
284         (JSC::JSObject::JSObject):
285         * runtime/JSValue.h:
286         * runtime/NumberObject.h:
287         * wtf/Platform.h:
288
289 2010-10-19  Csaba Osztrogonác  <ossy@webkit.org>
290
291         Reviewed by Geoffrey Garen.
292
293         BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors
294         https://bugs.webkit.org/show_bug.cgi?id=47920
295
296         * bytecompiler/BytecodeGenerator.cpp:
297         (JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization.
298
299 2010-10-19  Kwang Yul Seo  <skyul@company100.net>
300
301         Reviewed by David Kilzer.
302
303         RVCT fails to compile DateMath.cpp due to overloaded function pow
304         https://bugs.webkit.org/show_bug.cgi?id=47844
305
306         Choose std::pow(double, double) among multiple overloaded pow functions
307         to fix build for RVCT.
308
309         * wtf/DateMath.cpp:
310         (WTF::parseES5DateFromNullTerminatedCharacters):
311
312 2010-10-19  Patrick Gansterer  <paroga@webkit.org>
313
314         Reviewed by David Kilzer.
315
316         Use UChar instead of wchar_t in UnicodeWinCE
317         https://bugs.webkit.org/show_bug.cgi?id=47904
318
319         Make UnicodeWinCE more portable, so we can use it for other ports too.
320
321         * wtf/unicode/wince/UnicodeWinCE.cpp:
322         (WTF::Unicode::toLower):
323         (WTF::Unicode::toUpper):
324         (WTF::Unicode::foldCase):
325         (WTF::Unicode::isPrintableChar):
326         (WTF::Unicode::isSpace):
327         (WTF::Unicode::isLetter):
328         (WTF::Unicode::isUpper):
329         (WTF::Unicode::isLower):
330         (WTF::Unicode::isDigit):
331         (WTF::Unicode::isPunct):
332         (WTF::Unicode::isAlphanumeric):
333         (WTF::Unicode::toTitleCase):
334         (WTF::Unicode::mirroredChar):
335         (WTF::Unicode::digitValue):
336         * wtf/unicode/wince/UnicodeWinCE.h:
337         (WTF::Unicode::isSeparatorSpace):
338         (WTF::Unicode::isHighSurrogate):
339         (WTF::Unicode::isLowSurrogate):
340         (WTF::Unicode::umemcasecmp):
341         (WTF::Unicode::surrogateToUcs4):
342
343 2010-10-19  Patrick Gansterer  <paroga@webkit.org>
344
345         Reviewed by Andreas Kling.
346
347         Fix style of UnicodeWinCE
348         https://bugs.webkit.org/show_bug.cgi?id=47818
349
350         * wtf/unicode/wince/UnicodeWinCE.cpp:
351         (WTF::Unicode::toLower):
352         (WTF::Unicode::toUpper):
353         * wtf/unicode/wince/UnicodeWinCE.h:
354
355 2010-10-18  Xan Lopez  <xlopez@igalia.com>
356
357         Reviewed by Martin Robinson.
358
359         * GNUmakefile.am: add missing file.
360
361 2010-10-18  Oliver Hunt  <oliver@apple.com>
362
363         Reviewed by Sam Weinig.
364
365         Strict mode: Functions created with the function constructor don't implement strict mode semantics
366         https://bugs.webkit.org/show_bug.cgi?id=47860
367
368         When creating the FunctionExecutable for a new function the function constructor
369         was always passing false for whether or not a function was strict, rather than
370         using the information from the freshly parsed function itself.
371
372         * runtime/Executable.cpp:
373         (JSC::FunctionExecutable::fromGlobalCode):
374
375 2010-10-18  Oliver Hunt  <oliver@apple.com>
376
377         Reviewed by Darin Adler.
378
379         Strict mode: |this| should be undefined if it is not explicitly provided
380         https://bugs.webkit.org/show_bug.cgi?id=47833
381
382         To make strict mode behave correctly we want to pass undefined instead of null
383         as the default this value.  This has no impact on behaviour outside of strict
384         mode as both values are replaced with the global object if necessary.
385
386         * bytecompiler/NodesCodegen.cpp:
387         (JSC::FunctionCallValueNode::emitBytecode):
388         (JSC::FunctionCallResolveNode::emitBytecode):
389         (JSC::CallFunctionCallDotNode::emitBytecode):
390         (JSC::ApplyFunctionCallDotNode::emitBytecode):
391
392
393 2010-10-18  Darin Adler  <darin@apple.com>
394
395         Reviewed by Anders Carlsson.
396
397         Make a nullptr that works with OwnPtr and RefPtr
398         https://bugs.webkit.org/show_bug.cgi?id=47756
399
400         * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h.
401
402         * wtf/NullPtr.h: Added.
403
404         * wtf/OwnArrayPtr.h: Add an overload of = taking nullptr.
405         * wtf/OwnPtr.h: Ditto.
406         * wtf/PassOwnArrayPtr.h: Ditto.
407         * wtf/PassOwnPtr.h: Ditto.
408         * wtf/PassRefPtr.h: Ditto.
409         * wtf/RefPtr.h: Ditto.
410         * wtf/RetainPtr.h: Ditto.
411
412 2010-10-18  Oliver Hunt  <oliver@apple.com>
413
414         Reviewed by Sam Weinig.
415
416         Strict mode: JIT doesn't check for |this| being an immediate before dereferencing
417         https://bugs.webkit.org/show_bug.cgi?id=47826
418
419         There's no guarantee that |this| will be a cell in a strict mode function, so
420         don't claim that it is.
421
422         * bytecode/CodeBlock.h:
423         (JSC::CodeBlock::isKnownNotImmediate):
424
425 2010-10-18  Zoltan Herczeg  <zherczeg@webkit.org>
426
427         Reviewed by Oliver Hunt.
428
429         if (0) throw "x" ; else { } throws parse error after r69906
430         https://bugs.webkit.org/show_bug.cgi?id=47807
431
432         r69906 introduced a bug: the semicolon is not parsed after a throw
433         expression anymore. Thus, the semicolon terminates the "if" parsing
434         in the example above, and the else token results a parse error.
435
436         * parser/JSParser.cpp:
437         (JSC::JSParser::parseThrowStatement):
438
439 2010-10-18  Peter Varga  <pvarga@inf.u-szeged.hu>
440
441         Reviewed by Andreas Kling.
442
443         Remove some unnecessary lines of code from Parser.cpp
444         https://bugs.webkit.org/show_bug.cgi?id=47816
445
446         * parser/Parser.cpp:
447
448 2010-10-18  Xan Lopez  <xlopez@igalia.com>
449
450         Reviewed by Csaba Osztrogonác.
451
452         Build broken with JIT disabled
453         https://bugs.webkit.org/show_bug.cgi?id=47801
454
455         This is a regression caused by r69940.
456
457         * interpreter/Interpreter.cpp:
458         (JSC::Interpreter::resolveBase):
459
460 2010-10-18  Zoltan Horvath  <zoltan@webkit.org>
461
462         Reviewed by Darin Adler.
463
464         Change FastAllocBase implementation into a macro
465         https://bugs.webkit.org/show_bug.cgi?id=42998
466
467         It was investigated in bug #33896 that inheriting classes from FastAllocBase 
468         can result in objects getting larger which leads to memory regressions. 
469         Using a macro instead of inheriting classes from FastAllocBase would solve the issue. 
470
471         * wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro
472
473 2010-10-17  Oliver Hunt  <oliver@apple.com>
474
475         Reviewed by Sam Weinig.
476
477         Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions
478         https://bugs.webkit.org/show_bug.cgi?id=47791
479
480         Simple fix, check for arguments in addition to eval.
481
482         * parser/JSParser.cpp:
483         (JSC::JSParser::parseUnaryExpression):
484
485 2010-10-17  Oliver Hunt  <oliver@apple.com>
486
487         Reviewed by Sam Weinig.
488
489         Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure
490         https://bugs.webkit.org/show_bug.cgi?id=47788
491
492         Fixing this required a couple of changes:
493          * resolve_base now has a flag to indicate whether it is being used for a put in strict mode.
494            this allows us to throw an exception when we're doing a completely generic resolve for
495            assignment, and that assignment would create a new global.
496          * There is a new opcode 'op_ensure_property_exists' that is used to determine whether
497            the property being assigned to already exists on the global object.  This currently
498            has no caching, but such caching could be added relatively trivially.  It is only used
499            in the case where we know that a property will be placed on the global object, and
500            we cannot verify that the property already exists.
501
502         In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather
503         than making op_resolve_base have an additional runtime branch.
504
505         There's also a new helper function to create the exception for the invalid assignment.
506
507         * bytecode/CodeBlock.cpp:
508         (JSC::CodeBlock::dump):
509         * bytecode/Opcode.h:
510         * bytecompiler/BytecodeGenerator.cpp:
511         (JSC::BytecodeGenerator::emitResolveBase):
512         (JSC::BytecodeGenerator::emitResolveBaseForPut):
513         * bytecompiler/BytecodeGenerator.h:
514         * bytecompiler/NodesCodegen.cpp:
515         (JSC::AssignResolveNode::emitBytecode):
516         (JSC::ForInNode::emitBytecode):
517         * interpreter/Interpreter.cpp:
518         (JSC::Interpreter::resolveBase):
519         (JSC::Interpreter::privateExecute):
520         * jit/JIT.cpp:
521         (JSC::JIT::privateCompileMainPass):
522         * jit/JIT.h:
523         * jit/JITOpcodes.cpp:
524         (JSC::JIT::emit_op_resolve_base):
525         (JSC::JIT::emit_op_ensure_property_exists):
526         * jit/JITOpcodes32_64.cpp:
527         (JSC::JIT::emit_op_resolve_base):
528         (JSC::JIT::emit_op_ensure_property_exists):
529         * jit/JITStubs.cpp:
530         (JSC::DEFINE_STUB_FUNCTION):
531         * jit/JITStubs.h:
532         * parser/JSParser.cpp:
533         (JSC::JSParser::parseProgram):
534         * runtime/ExceptionHelpers.cpp:
535         (JSC::createErrorForInvalidGlobalAssignment):
536         * runtime/ExceptionHelpers.h:
537         * runtime/Operations.h:
538         (JSC::resolveBase):
539
540 2010-10-17  Simon Fraser  <simon.fraser@apple.com>
541
542         First part of fix for Windows build failure. Will wait for the
543         next set of link errors to determine the mangled forms for dtoaRoundSF
544         and dtoaRoundDP.
545
546         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
547
548 2010-10-17  Simon Fraser  <simon.fraser@apple.com>
549
550         Reviewed by Nikolas Zimmermann.
551
552         Very large and small numbers fail to round-trip through CSS
553         https://bugs.webkit.org/show_bug.cgi?id=20674
554         
555         New exports required to use DecimalNumber in WebCore.
556
557         * JavaScriptCore.exp:
558         * JavaScriptCore.xcodeproj/project.pbxproj:
559
560 2010-10-16  Kyusun Kim  <maniagoon@company100.net>
561
562         Reviewed by Alexey Proskuryakov.
563
564         Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters()
565         https://bugs.webkit.org/show_bug.cgi?id=47758
566
567         * wtf/CurrentTime.h:
568         * wtf/DateMath.h:
569
570 2010-10-16  Patrick Gansterer  <paroga@webkit.org>
571
572         Reviewed by Adam Barth.
573
574         Rename StringHasherFunctions.h to StringHasher.h
575         https://bugs.webkit.org/show_bug.cgi?id=47200
576
577         Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name.
578
579         * GNUmakefile.am:
580         * JavaScriptCore.gypi:
581         * JavaScriptCore.xcodeproj/project.pbxproj:
582         * wtf/StringHashFunctions.h: Removed.
583         * wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h.
584         * wtf/text/StringHash.h:
585         * wtf/text/StringImpl.h:
586
587 2010-10-15  Oliver Hunt  <oliver@apple.com>
588
589         Reviewed by Sam Weinig.
590
591         Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline
592         https://bugs.webkit.org/show_bug.cgi?id=47762
593
594         The old YACC parser depended on the lexer for some classes of semicolon insertion.
595         The new parser handles ASI entirely on its own so when the lexer inserts a semicolon
596         on its own the net result is a spurious semicolon in the input stream.  This can result
597         in incorrect parsing in some cases:
598
599         if (0)
600             break
601         ;else {}
602
603         Would result in a parse failure as the output from the lexer is essentially
604
605         if (0)
606              break
607         ;;else
608
609         So the second semicolon is interpreted as a empty statement, which terminates the if,
610         making the else an error.
611
612
613         * parser/JSParser.cpp:
614         (JSC::JSParser::parseThrowStatement):
615           Parsing of throw statement was wrong, and only worked due to the weird behaviour
616           in the lexer
617         * parser/Lexer.cpp:
618         (JSC::Lexer::lex):
619           Remove bogus semicolon insertion from the newline handling
620
621 2010-10-15  Nikolas Zimmermann  <nzimmermann@rim.com>
622
623         Reviewed by Dirk Schulze.
624
625         Replace some String::format() usages by StringConcatenate in WebKit
626         https://bugs.webkit.org/show_bug.cgi?id=47714
627
628         * wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString().
629
630 2010-10-15  Ilya Tikhonovsky  <loislo@chromium.org>
631
632         Unreviewed build fix for Debug Leopard which is failng to compile after r69842.
633
634         * yarr/RegexInterpreter.cpp:
635         (JSC::Yarr::ByteCompiler::emitDisjunction):
636
637 2010-10-15  Peter Varga  <pvarga@inf.u-szeged.hu>
638
639         Reviewed by Gavin Barraclough.
640
641         The parenthetical assertion checking isn't working in some cases with YARR
642         Interpreter
643         https://bugs.webkit.org/show_bug.cgi?id=46893
644
645         Calculate the countToCheck value of a TypeParentheticalAssertion by
646         subtracting the number of characters which follows
647         a TypeParentheticalAssertion term with the number of characters which should
648         be matched by terms which are contained
649         in the TypeParentheticalAssertion term (minimumSize).
650
651         * yarr/RegexInterpreter.cpp:
652         (JSC::Yarr::ByteCompiler::emitDisjunction):
653
654 2010-10-14  Nathan Vander Wilt  <nate@andyet.net>
655
656         Reviewed by Darin Adler.
657
658         Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632
659
660         * runtime/DateConversion.cpp:
661         (JSC::parseDate):
662         * wtf/DateMath.cpp:
663         (WTF::ymdhmsToSeconds):
664         (WTF::parseES5DateFromNullTerminatedCharacters):
665         * wtf/DateMath.h:
666
667 2010-10-14  Nikolas Zimmermann  <nzimmermann@rim.com>
668
669         Reviewed by Gavin Barraclough.
670
671         Replace lots of String::format() usages by StringConcatenate
672         https://bugs.webkit.org/show_bug.cgi?id=47664
673
674         Add StringTypeAdapter<char> to accept single characters for makeString().
675
676         * wtf/text/StringConcatenate.h:
677         (WTF::makeString):
678
679 2010-10-14  David Goodwin  <david_goodwin@apple.com>
680
681         Reviewed by Darin Adler.
682
683         need way to measure size of JITed ARM code
684         https://bugs.webkit.org/show_bug.cgi?id=47121
685
686         * assembler/LinkBuffer.h:
687         (JSC::LinkBuffer::linkCode):
688         (JSC::LinkBuffer::dumpLinkStats):
689         (JSC::LinkBuffer::dumpCode):
690
691 2010-10-14  Peter Varga  <pvarga@inf.u-szeged.hu>
692
693         Reviewed by Gavin Barraclough.
694
695         The backreference checking isn't working in some cases with YARR Interpreter
696         https://bugs.webkit.org/show_bug.cgi?id=46904
697
698         The Interpreter::matchBackReference() function returns true without matching
699         when a backreference points to the same parentheses where it is.
700
701         * yarr/RegexInterpreter.cpp:
702         (JSC::Yarr::Interpreter::matchBackReference):
703
704 2010-10-14  No'am Rosenthal  <noam.rosenthal@nokia.com>
705
706         Reviewed by Andreas Kling.
707
708         [Qt] Text breaking is slow: enable ICU as an opt-in
709         https://bugs.webkit.org/show_bug.cgi?id=40332
710
711         Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
712         Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h
713
714         * JavaScriptCore.pri:
715         * wtf/unicode/qt4/UnicodeQt4.h:
716         (WTF::Unicode::toLower):
717         (WTF::Unicode::toUpper):
718         (WTF::Unicode::toTitleCase):
719         (WTF::Unicode::foldCase):
720         (WTF::Unicode::isPrintableChar):
721         (WTF::Unicode::isSeparatorSpace):
722         (WTF::Unicode::isPunct):
723         (WTF::Unicode::isLower):
724         (WTF::Unicode::mirroredChar):
725         (WTF::Unicode::combiningClass):
726         (WTF::Unicode::direction):
727         (WTF::Unicode::category):
728
729 2010-10-14  Anton Faern  <anton@bladehawke.com>
730
731         Reviewed by Csaba Osztrogonác.
732
733         https://bugs.webkit.org/show_bug.cgi?id=47658
734         NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO
735         change.  This means that OS(NETBSD) is also undefined.
736
737         * wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD
738
739 2010-10-13  David Goodwin  <david_goodwin@apple.com>
740
741         Reviewed by Oliver Hunt.
742
743         ARMv7 JIT should generated conditional branches when possible
744         https://bugs.webkit.org/show_bug.cgi?id=47384
745
746         Use different jump padding sizes for conditional and unconditional
747         jumps (12 bytes and 10 bytes respectively). This allows the JIT to
748         include the IT instruction as part of the conditional jump sequence
749         which in turn allows it to optimize away the IT using an ARMv7 
750         conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for
751         conditional branches when displacement is in range. Also use IT/B(T4)
752         for conditional branch when displacement does not fit in B(T3).
753
754         For unconditional jump, instruction selection options are:
755         B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection
756         options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX.
757
758         * assembler/ARMv7Assembler.cpp:
759         * assembler/ARMv7Assembler.h:
760         (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
761         (JSC::ARMv7Assembler::ifThenElse):
762         (JSC::ARMv7Assembler::jumpSizeDelta):
763         (JSC::ARMv7Assembler::canCompact):
764         (JSC::ARMv7Assembler::computeJumpType):
765         (JSC::ARMv7Assembler::link):
766         (JSC::ARMv7Assembler::canBeJumpT1):
767         (JSC::ARMv7Assembler::canBeJumpT3):
768         (JSC::ARMv7Assembler::canBeJumpT4):
769         (JSC::ARMv7Assembler::linkJumpT1):
770         (JSC::ARMv7Assembler::linkJumpT3):
771         (JSC::ARMv7Assembler::linkJumpT4):
772         (JSC::ARMv7Assembler::linkConditionalJumpT4):
773         (JSC::ARMv7Assembler::linkBX):
774         (JSC::ARMv7Assembler::linkConditionalBX):
775         (JSC::ARMv7Assembler::linkJumpAbsolute):
776         * assembler/LinkBuffer.h:
777         (JSC::LinkBuffer::linkCode):
778         * assembler/MacroAssemblerARMv7.h:
779         (JSC::MacroAssemblerARMv7::canCompact):
780         (JSC::MacroAssemblerARMv7::computeJumpType):
781         (JSC::MacroAssemblerARMv7::jumpSizeDelta):
782         (JSC::MacroAssemblerARMv7::jump):
783         (JSC::MacroAssemblerARMv7::nearCall):
784         (JSC::MacroAssemblerARMv7::call):
785         (JSC::MacroAssemblerARMv7::ret):
786         (JSC::MacroAssemblerARMv7::tailRecursiveCall):
787         (JSC::MacroAssemblerARMv7::makeJump):
788         (JSC::MacroAssemblerARMv7::makeBranch):
789
790 2010-10-13  Fridrich Strba  <fridrich.strba@bluewin.ch>
791
792         Reviewed by Darin Adler.
793
794         Don't depend on Windows on sched_yield and sched.h
795         https://bugs.webkit.org/show_bug.cgi?id=45543
796
797         sched.h is part of pthreads and sched_yield is implemented
798         in pthreads-win32 as Sleep(0). This patch avoids a gratuitous
799         dependency on pthreads-win32 in this file.
800
801         * wtf/TCSpinLock.h:
802         (TCMalloc_SlowLock):
803
804 2010-10-13  Kwang Yul Seo  <skyul@company100.net>
805
806         Reviewed by Kent Tamura.
807
808         [BREWMP] Port unicode
809         https://bugs.webkit.org/show_bug.cgi?id=45716
810
811         Brew MP port uses only the subset of ICU library to reduce the binary size.
812         Follow the WinCE's implementation.
813
814         * wtf/Platform.h:
815         * wtf/unicode/Unicode.h:
816         * wtf/unicode/brew/UnicodeBrew.cpp: Added.
817         (WTF::Unicode::toLower):
818         (WTF::Unicode::toUpper):
819         (WTF::Unicode::foldCase):
820         (WTF::Unicode::isPrintableChar):
821         (WTF::Unicode::isUpper):
822         (WTF::Unicode::isLower):
823         (WTF::Unicode::isDigit):
824         (WTF::Unicode::isPunct):
825         (WTF::Unicode::isAlphanumeric):
826         (WTF::Unicode::toTitleCase):
827         (WTF::Unicode::direction):
828         (WTF::Unicode::category):
829         (WTF::Unicode::decompositionType):
830         (WTF::Unicode::combiningClass):
831         (WTF::Unicode::mirroredChar):
832         (WTF::Unicode::digitValue):
833         (WTF::Unicode::isSpace):
834         (WTF::Unicode::isLetter):
835         * wtf/unicode/brew/UnicodeBrew.h: Added.
836         (WTF::Unicode::isArabicChar):
837         (WTF::Unicode::isSeparatorSpace):
838         (WTF::Unicode::hasLineBreakingPropertyComplexContext):
839         (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
840         (WTF::Unicode::umemcasecmp):
841
842 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
843
844         Windows build fix.
845
846         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
847
848 2010-10-13  Adam Barth  <abarth@webkit.org>
849
850         Reviewed by Maciej Stachowiak.
851
852         [WTFURL] Add URLQueryCanonicalizer
853         https://bugs.webkit.org/show_bug.cgi?id=45088
854
855         This class canonicalizes the query component of URLs.  The main tricky
856         bit there is the convertCharset function, which I've moved to a
857         templated dependency.  There'll likely be more about that in future
858         patches.
859
860         * JavaScriptCore.xcodeproj/project.pbxproj:
861         * wtf/url/src/URLEscape.cpp: Added.
862         * wtf/url/src/URLEscape.h: Added.
863         (WTF::appendEscapedCharacter):
864         * wtf/url/src/URLQueryCanonicalizer.h: Added.
865         (WTF::URLQueryCanonicalizer::canonicalize):
866         (WTF::URLQueryCanonicalizer::isAllASCII):
867         (WTF::URLQueryCanonicalizer::appendRaw8BitQueryString):
868         (WTF::URLQueryCanonicalizer::convertToQueryEncoding):
869
870 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
871
872         Reviewed by Oliver Hunt.
873
874         Bug 43987 - Downloading using XHR is much slower than before
875         Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector.
876         Fundamentally this should be the same (copies current contents to expand capacity,
877         rather than using a rope), but this approach allows the intermadiate state of the
878         String to be inspected in the buffer without copying to resolve.
879
880         * runtime/JSONObject.cpp:
881         (JSC::Stringifier::appendQuotedString):
882         (JSC::Stringifier::Holder::appendNextProperty):
883             Renamed StringBuilder::size() -> length() (to match other String types).
884
885         * runtime/UStringBuilder.h:
886         (JSC::UStringBuilder::append):
887         (JSC::UStringBuilder::toUString):
888             Update for changes in parent class, can just 'using' the append methods.
889
890         * wtf/text/StringBuilder.cpp: Added.
891         (WTF::StringBuilder::reifyString):
892         (WTF::StringBuilder::resize):
893         (WTF::StringBuilder::reserveCapacity):
894         (WTF::StringBuilder::allocateBuffer):
895         (WTF::StringBuilder::appendUninitialized):
896         (WTF::StringBuilder::append):
897         (WTF::StringBuilder::shrinkToFit):
898         * wtf/text/StringBuilder.h:
899         (WTF::StringBuilder::StringBuilder):
900         (WTF::StringBuilder::append):
901         (WTF::StringBuilder::toString):
902         (WTF::StringBuilder::toStringPreserveCapacity):
903         (WTF::StringBuilder::length):
904         (WTF::StringBuilder::isEmpty):
905         (WTF::StringBuilder::operator[]):
906         (WTF::StringBuilder::clear):
907             Class updated to use overcapacity in a StringImpl, rather than a Vector.
908
909         * Android.mk:
910         * Android.v8.wtf.mk:
911         * GNUmakefile.am:
912         * JavaScriptCore.exp:
913         * JavaScriptCore.gypi:
914         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
915         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
916         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
917         * JavaScriptCore.xcodeproj/project.pbxproj:
918         * wtf/CMakeLists.txt:
919         * wtf/wtf.pri:
920
921 2010-10-13  Adam Roben  <aroben@apple.com>
922
923         Export tryFastRealloc for WebKit2's benefit
924
925         Rubber-stamped by Anders Carlsson.
926
927         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
928         tryFastRealloc. Removed RegExpObject::info, which is now exported via
929         JS_EXPORTDATA.
930
931 2010-10-13  Adam Barth  <abarth@webkit.org>
932
933         Reviewed by Maciej Stachowiak.
934
935         [WTFURL] Add a mechanism for classifying types of characters
936         https://bugs.webkit.org/show_bug.cgi?id=45085
937
938         Various characters have different escaping rules depending on where
939         they are in URLs.  This patch adds a table containing that information.
940
941         * JavaScriptCore.xcodeproj/project.pbxproj:
942         * wtf/url/src/URLCharacterTypes.cpp: Added.
943         * wtf/url/src/URLCharacterTypes.h: Added.
944         (WTF::URLCharacterTypes::isQueryChar):
945         (WTF::URLCharacterTypes::isIPv4Char):
946         (WTF::URLCharacterTypes::isHexChar):
947         (WTF::URLCharacterTypes::isCharOfType):
948
949 2010-10-13  Xan Lopez  <xlopez@igalia.com>
950
951         Reviewed by Csaba Osztrogonác.
952
953         Missing parameters for bytecode dump of next_pname
954         https://bugs.webkit.org/show_bug.cgi?id=47590
955
956         * bytecode/CodeBlock.cpp:
957         (JSC::CodeBlock::dump): add missing parameters to the dump.
958
959 2010-10-13  Nikolas Zimmermann  <nzimmermann@rim.com>
960
961         Reviewed by Dirk Schulze.
962
963         Add wtf/text/StringConcatenate
964         https://bugs.webkit.org/show_bug.cgi?id=47584
965
966         Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too.
967         Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString.
968         Exactly the same design that has been followed while refactoring StringBuilder.
969
970         The UString variants can all be removed as soon as WTF::String & JSC::UString converge.
971
972         * GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h.
973         * JavaScriptCore.gypi: Ditto.
974         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
975         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
976         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
977         * bytecode/CodeBlock.cpp: s/makeString/makeUString/
978         (JSC::escapeQuotes):
979         (JSC::valueToSourceString):
980         (JSC::constantName):
981         (JSC::idName):
982         (JSC::CodeBlock::registerName):
983         (JSC::regexpToSourceString):
984         (JSC::regexpName):
985         * bytecompiler/NodesCodegen.cpp: Ditto.
986         (JSC::substitute):
987         * profiler/Profiler.cpp: Ditto.
988         (JSC::Profiler::createCallIdentifier):
989         * runtime/ExceptionHelpers.cpp: Ditto.
990         (JSC::createUndefinedVariableError):
991         (JSC::createErrorMessage):
992         (JSC::createInvalidParamError):
993         * runtime/FunctionConstructor.cpp: Ditto.
994         (JSC::constructFunction):
995         * runtime/FunctionPrototype.cpp: Ditto.
996         (JSC::insertSemicolonIfNeeded):
997         * runtime/JSONObject.cpp: Ditto.
998         (JSC::Stringifier::indent):
999         * runtime/JSStringBuilder.h:
1000         (JSC::jsMakeNontrivialString):
1001         * runtime/RegExpConstructor.cpp: Ditto.
1002         (JSC::constructRegExp):
1003         * runtime/RegExpObject.cpp: Ditto.
1004         (JSC::RegExpObject::match):
1005         * runtime/RegExpPrototype.cpp: Ditto.
1006         (JSC::regExpProtoFuncCompile):
1007         * runtime/StringConcatenate.h: Removed.
1008         * runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h
1009         (JSC::makeUString):
1010         * wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h.
1011         (WTF::makeString):
1012
1013 2010-10-12  Gavin Barraclough  <barraclough@apple.com>
1014
1015         Windows build fix.
1016
1017         * wtf/text/StringBuilder.h:
1018         (WTF::StringBuilder::length):
1019
1020 2010-10-12  Nikolas Zimmermann  <nzimmermann@rim.com>
1021
1022         Reviewed by Gavin Barraclough.
1023
1024         Unify JSC::StringBuilder & WebCore::StringBuilder
1025         https://bugs.webkit.org/show_bug.cgi?id=47538
1026
1027         Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String().
1028         Move the append(const JSC::UString&) method into runtime/UStringBuilder.h.
1029         UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality.
1030
1031         No new code, just move code around.
1032
1033         * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h.
1034         * JavaScriptCore.gypi: Ditto.
1035         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
1036         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
1037         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
1038         * runtime/Executable.cpp:
1039         (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString().
1040         * runtime/FunctionConstructor.cpp:
1041         (JSC::constructFunction): Ditto.
1042         * runtime/JSGlobalObjectFunctions.cpp:
1043         (JSC::globalFuncUnescape): Ditto.
1044         * runtime/JSONObject.cpp:
1045         (JSC::Stringifier::stringify): Ditto.
1046         (JSC::Stringifier::appendQuotedString): Ditto.
1047         (JSC::Stringifier::appendStringifiedValue): Ditto.
1048         (JSC::Stringifier::startNewLine): Ditto.
1049         (JSC::Stringifier::Holder::appendNextProperty): Ditto.
1050         * runtime/LiteralParser.cpp:
1051         (JSC::LiteralParser::Lexer::lexString): Ditto.
1052         * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include.
1053         * runtime/StringBuilder.h: Removed.
1054         * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods.
1055         (JSC::UStringBuilder::append): append(const JSC::UString&)
1056         (JSC::UStringBuilder::toUString):
1057         * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h
1058         (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere.
1059         (WTF::StringBuilder::isEmpty): Ditto (+ constify method). 
1060         (WTF::StringBuilder::reserveCapacity): Ditto.
1061         (WTF::StringBuilder::resize): Ditto.
1062         (WTF::StringBuilder::size): Ditto.
1063         (WTF::StringBuilder::operator[]): Ditto.
1064         (WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder.
1065
1066 2010-10-12  Michael Saboff  <msaboff@apple.com>
1067
1068         Reviewed by Oliver Hunt.
1069
1070         Cleaned up the processing of replacements after regular expression
1071         processing, especially the case where there wasn't a match.
1072         Changed to use empty strings instead of computing a zero length sub
1073         string.
1074         https://bugs.webkit.org/show_bug.cgi?id=47506
1075
1076         * runtime/StringPrototype.cpp:
1077         (JSC::jsSpliceSubstringsWithSeparators):
1078         (JSC::stringProtoFuncReplace):
1079
1080 2010-10-11  Patrick Gansterer  <paroga@webkit.org>
1081
1082         Unreviewed.
1083
1084         Clang build fix after r69472.
1085         https://bugs.webkit.org/show_bug.cgi?id=46523
1086
1087         * wtf/text/StringHash.h:
1088
1089 2010-10-11  Oliver Hunt  <oliver@apple.com>
1090
1091         Undo last minute change to 32bit build.
1092
1093         * jit/JITOpcodes32_64.cpp:
1094         (JSC::JIT::emit_op_convert_this_strict):
1095
1096 2010-10-11  Brian Weinstein  <bweinstein@apple.com>
1097
1098         Build fix for Windows. Add a necessary export from r69516.
1099
1100         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1101
1102 2010-10-11  Oliver Hunt  <oliver@apple.com>
1103
1104         Fix interpreter build -- was broken by incorrect merge.
1105
1106         * interpreter/Interpreter.cpp:
1107         (JSC::Interpreter::privateExecute):
1108
1109 2010-10-01  Oliver Hunt  <oliver@apple.com>
1110
1111         Reviewed by Gavin Barraclough.
1112
1113         [ES5] Implement strict mode
1114         https://bugs.webkit.org/show_bug.cgi?id=10701
1115
1116         Initial strict mode implementation.  This is the simplest
1117         implementation that could possibly work and adds (hopefully)
1118         all of the restrictions required by strict mode.  There are
1119         a number of inefficiencies, especially in the handling of
1120         arguments and eval as smart implementations would make this
1121         patch more complicated.  
1122
1123         The SyntaxChecker AST builder has become somewhat more complex
1124         as strict mode does require more parse tree information to
1125         validate the syntax.
1126
1127         Summary of major changes to the parser:
1128             * We track when we enter strict mode (this may come as a surprise)
1129             * Strict mode actually requires a degree of AST knowledge to validate
1130               so the SyntaxChecker now produces values that can be used to distinguish
1131               "node" types.
1132             * We now track variables that are written to.  We do this to
1133               statically identify writes to global properties that don't exist
1134               and abort at that point.  This should actually make it possible
1135               to optimise some other cases in the future but for now it's
1136               purely for validity checking.  Currently writes are only tracked
1137               in strict mode code.
1138             * Labels are now tracked as it is now a syntax error to jump to a label
1139               that does not exist (or to use break, continue, or return in a context
1140               where they would be invalid).
1141
1142         Runtime changes:
1143             * In order to get correct hanlding of the Arguments object all
1144               strict mode functions that reference arguments create and tearoff
1145               the arguments object on entry.  This is not strictly necessary
1146               but was the least work necessary to get the correct behaviour.
1147             * PutPropertySlot now tracks whether it is being used for a strict
1148               mode write, and if so Object::put will throw when a write can't be
1149               completed.
1150             * StrictEvalActivation was added as an "activation" object for strict
1151               mode eval (so that strict eval does not introduce new variables into
1152               the containing scope).
1153
1154         * CMakeLists.txt:
1155         * GNUmakefile.am:
1156         * JavaScriptCore.exp:
1157         * JavaScriptCore.pro:
1158         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1159         * JavaScriptCore.xcodeproj/project.pbxproj:
1160         * bytecode/CodeBlock.cpp:
1161         (JSC::CodeBlock::dump):
1162         (JSC::CodeBlock::CodeBlock):
1163         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
1164         * bytecode/CodeBlock.h:
1165         (JSC::CodeBlock::isStrictMode):
1166         * bytecode/EvalCodeCache.h:
1167         (JSC::EvalCodeCache::get):
1168         * bytecode/Opcode.h:
1169         * bytecompiler/BytecodeGenerator.cpp:
1170         (JSC::BytecodeGenerator::BytecodeGenerator):
1171         (JSC::BytecodeGenerator::createArgumentsIfNecessary):
1172         (JSC::BytecodeGenerator::emitReturn):
1173         * bytecompiler/BytecodeGenerator.h:
1174         (JSC::BytecodeGenerator::isStrictMode):
1175         (JSC::BytecodeGenerator::makeFunction):
1176         * debugger/Debugger.cpp:
1177         (JSC::evaluateInGlobalCallFrame):
1178         * debugger/DebuggerCallFrame.cpp:
1179         (JSC::DebuggerCallFrame::evaluate):
1180         * interpreter/Interpreter.cpp:
1181         (JSC::Interpreter::callEval):
1182         (JSC::Interpreter::unwindCallFrame):
1183         (JSC::Interpreter::execute):
1184         (JSC::Interpreter::privateExecute):
1185         * jit/JIT.cpp:
1186         (JSC::JIT::privateCompileMainPass):
1187         (JSC::JIT::privateCompileSlowCases):
1188         * jit/JIT.h:
1189         * jit/JITOpcodes.cpp:
1190         (JSC::JIT::emit_op_get_pnames):
1191         (JSC::JIT::emit_op_convert_this_strict):
1192         (JSC::JIT::emitSlow_op_convert_this_strict):
1193         * jit/JITOpcodes32_64.cpp:
1194         (JSC::JIT::emit_op_get_pnames):
1195         * jit/JITStubs.cpp:
1196         (JSC::DEFINE_STUB_FUNCTION):
1197         * jit/JITStubs.h:
1198         * parser/ASTBuilder.h:
1199         (JSC::ASTBuilder::createFunctionBody):
1200         (JSC::ASTBuilder::isResolve):
1201         * parser/JSParser.cpp:
1202         (JSC::JSParser::next):
1203         (JSC::JSParser::startLoop):
1204         (JSC::JSParser::endLoop):
1205         (JSC::JSParser::startSwitch):
1206         (JSC::JSParser::endSwitch):
1207         (JSC::JSParser::setStrictMode):
1208         (JSC::JSParser::strictMode):
1209         (JSC::JSParser::isValidStrictMode):
1210         (JSC::JSParser::declareParameter):
1211         (JSC::JSParser::breakIsValid):
1212         (JSC::JSParser::pushLabel):
1213         (JSC::JSParser::popLabel):
1214         (JSC::JSParser::hasLabel):
1215         (JSC::JSParser::DepthManager::DepthManager):
1216         (JSC::JSParser::DepthManager::~DepthManager):
1217         (JSC::JSParser::Scope::Scope):
1218         (JSC::JSParser::Scope::startSwitch):
1219         (JSC::JSParser::Scope::endSwitch):
1220         (JSC::JSParser::Scope::startLoop):
1221         (JSC::JSParser::Scope::endLoop):
1222         (JSC::JSParser::Scope::inLoop):
1223         (JSC::JSParser::Scope::breakIsValid):
1224         (JSC::JSParser::Scope::pushLabel):
1225         (JSC::JSParser::Scope::popLabel):
1226         (JSC::JSParser::Scope::hasLabel):
1227         (JSC::JSParser::Scope::isFunction):
1228         (JSC::JSParser::Scope::declareVariable):
1229         (JSC::JSParser::Scope::declareWrite):
1230         (JSC::JSParser::Scope::deleteProperty):
1231         (JSC::JSParser::Scope::declareParameter):
1232         (JSC::JSParser::Scope::setNeedsFullActivation):
1233         (JSC::JSParser::Scope::collectFreeVariables):
1234         (JSC::JSParser::Scope::getUncapturedWrittenVariables):
1235         (JSC::JSParser::Scope::getDeletedVariables):
1236         (JSC::JSParser::Scope::setStrictMode):
1237         (JSC::JSParser::Scope::strictMode):
1238         (JSC::JSParser::Scope::isValidStrictMode):
1239         (JSC::JSParser::pushScope):
1240         (JSC::JSParser::popScope):
1241         (JSC::JSParser::declareVariable):
1242         (JSC::JSParser::declareWrite):
1243         (JSC::JSParser::deleteProperty):
1244         (JSC::jsParse):
1245         (JSC::JSParser::JSParser):
1246         (JSC::JSParser::parseProgram):
1247         (JSC::JSParser::parseSourceElements):
1248         (JSC::JSParser::parseDoWhileStatement):
1249         (JSC::JSParser::parseWhileStatement):
1250         (JSC::JSParser::parseVarDeclarationList):
1251         (JSC::JSParser::parseConstDeclarationList):
1252         (JSC::JSParser::parseForStatement):
1253         (JSC::JSParser::parseBreakStatement):
1254         (JSC::JSParser::parseContinueStatement):
1255         (JSC::JSParser::parseReturnStatement):
1256         (JSC::JSParser::parseWithStatement):
1257         (JSC::JSParser::parseSwitchStatement):
1258         (JSC::JSParser::parseSwitchClauses):
1259         (JSC::JSParser::parseSwitchDefaultClause):
1260         (JSC::JSParser::parseTryStatement):
1261         (JSC::JSParser::parseBlockStatement):
1262         (JSC::JSParser::parseStatement):
1263         (JSC::JSParser::parseFormalParameters):
1264         (JSC::JSParser::parseFunctionBody):
1265         (JSC::JSParser::parseFunctionInfo):
1266         (JSC::JSParser::parseFunctionDeclaration):
1267         (JSC::JSParser::parseExpressionOrLabelStatement):
1268         (JSC::JSParser::parseIfStatement):
1269         (JSC::JSParser::parseExpression):
1270         (JSC::JSParser::parseAssignmentExpression):
1271         (JSC::JSParser::parseConditionalExpression):
1272         (JSC::JSParser::parseBinaryExpression):
1273         (JSC::JSParser::parseStrictObjectLiteral):
1274         (JSC::JSParser::parsePrimaryExpression):
1275         (JSC::JSParser::parseMemberExpression):
1276         (JSC::JSParser::parseUnaryExpression):
1277         * parser/JSParser.h:
1278         * parser/Lexer.cpp:
1279         (JSC::Lexer::parseString):
1280         (JSC::Lexer::lex):
1281         * parser/Lexer.h:
1282         (JSC::Lexer::isReparsing):
1283         * parser/Nodes.cpp:
1284         (JSC::ScopeNode::ScopeNode):
1285         (JSC::FunctionBodyNode::FunctionBodyNode):
1286         (JSC::FunctionBodyNode::create):
1287         * parser/Nodes.h:
1288         (JSC::ScopeNode::isStrictMode):
1289         * parser/Parser.cpp:
1290         (JSC::Parser::parse):
1291         * parser/Parser.h:
1292         (JSC::Parser::parse):
1293         * parser/SyntaxChecker.h:
1294         (JSC::SyntaxChecker::SyntaxChecker):
1295         (JSC::SyntaxChecker::makeFunctionCallNode):
1296         (JSC::SyntaxChecker::appendToComma):
1297         (JSC::SyntaxChecker::createCommaExpr):
1298         (JSC::SyntaxChecker::makeAssignNode):
1299         (JSC::SyntaxChecker::makePrefixNode):
1300         (JSC::SyntaxChecker::makePostfixNode):
1301         (JSC::SyntaxChecker::makeTypeOfNode):
1302         (JSC::SyntaxChecker::makeDeleteNode):
1303         (JSC::SyntaxChecker::makeNegateNode):
1304         (JSC::SyntaxChecker::makeBitwiseNotNode):
1305         (JSC::SyntaxChecker::createLogicalNot):
1306         (JSC::SyntaxChecker::createUnaryPlus):
1307         (JSC::SyntaxChecker::createVoid):
1308         (JSC::SyntaxChecker::thisExpr):
1309         (JSC::SyntaxChecker::createResolve):
1310         (JSC::SyntaxChecker::createObjectLiteral):
1311         (JSC::SyntaxChecker::createArray):
1312         (JSC::SyntaxChecker::createNumberExpr):
1313         (JSC::SyntaxChecker::createString):
1314         (JSC::SyntaxChecker::createBoolean):
1315         (JSC::SyntaxChecker::createNull):
1316         (JSC::SyntaxChecker::createBracketAccess):
1317         (JSC::SyntaxChecker::createDotAccess):
1318         (JSC::SyntaxChecker::createRegex):
1319         (JSC::SyntaxChecker::createNewExpr):
1320         (JSC::SyntaxChecker::createConditionalExpr):
1321         (JSC::SyntaxChecker::createAssignResolve):
1322         (JSC::SyntaxChecker::createFunctionExpr):
1323         (JSC::SyntaxChecker::createFunctionBody):
1324         (JSC::SyntaxChecker::appendBinaryExpressionInfo):
1325         (JSC::SyntaxChecker::operatorStackPop):
1326         * runtime/Arguments.cpp:
1327         (JSC::Arguments::createStrictModeCallerIfNecessary):
1328         (JSC::Arguments::createStrictModeCalleeIfNecessary):
1329         (JSC::Arguments::getOwnPropertySlot):
1330         (JSC::Arguments::getOwnPropertyDescriptor):
1331         (JSC::Arguments::put):
1332         (JSC::Arguments::deleteProperty):
1333         * runtime/Arguments.h:
1334         (JSC::Arguments::Arguments):
1335         * runtime/CommonIdentifiers.cpp:
1336         (JSC::CommonIdentifiers::CommonIdentifiers):
1337         * runtime/CommonIdentifiers.h:
1338         * runtime/Error.cpp:
1339         (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
1340         (JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
1341         (JSC::StrictModeTypeErrorFunction::getConstructData):
1342         (JSC::StrictModeTypeErrorFunction::callThrowTypeError):
1343         (JSC::StrictModeTypeErrorFunction::getCallData):
1344         (JSC::createTypeErrorFunction):
1345         * runtime/Error.h:
1346         * runtime/Executable.cpp:
1347         (JSC::EvalExecutable::EvalExecutable):
1348         (JSC::ProgramExecutable::ProgramExecutable):
1349         (JSC::FunctionExecutable::FunctionExecutable):
1350         (JSC::EvalExecutable::compileInternal):
1351         (JSC::ProgramExecutable::checkSyntax):
1352         (JSC::ProgramExecutable::compileInternal):
1353         (JSC::FunctionExecutable::compileForCallInternal):
1354         (JSC::FunctionExecutable::compileForConstructInternal):
1355         (JSC::FunctionExecutable::reparseExceptionInfo):
1356         (JSC::EvalExecutable::reparseExceptionInfo):
1357         (JSC::FunctionExecutable::fromGlobalCode):
1358         (JSC::ProgramExecutable::reparseExceptionInfo):
1359         * runtime/Executable.h:
1360         (JSC::ScriptExecutable::ScriptExecutable):
1361         (JSC::ScriptExecutable::isStrictMode):
1362         (JSC::EvalExecutable::create):
1363         (JSC::FunctionExecutable::create):
1364         * runtime/JSActivation.cpp:
1365         (JSC::JSActivation::toStrictThisObject):
1366         * runtime/JSActivation.h:
1367         * runtime/JSFunction.cpp:
1368         (JSC::createDescriptorForThrowingProperty):
1369         (JSC::JSFunction::getOwnPropertySlot):
1370         (JSC::JSFunction::getOwnPropertyDescriptor):
1371         (JSC::JSFunction::put):
1372         * runtime/JSGlobalData.cpp:
1373         (JSC::JSGlobalData::JSGlobalData):
1374         * runtime/JSGlobalData.h:
1375         * runtime/JSGlobalObject.cpp:
1376         (JSC::JSGlobalObject::reset):
1377         * runtime/JSGlobalObject.h:
1378         (JSC::JSGlobalObject::internalFunctionStructure):
1379         * runtime/JSGlobalObjectFunctions.cpp:
1380         (JSC::globalFuncEval):
1381         * runtime/JSObject.cpp:
1382         (JSC::JSObject::put):
1383         (JSC::JSObject::toStrictThisObject):
1384         (JSC::throwTypeError):
1385         * runtime/JSObject.h:
1386         (JSC::JSObject::isStrictModeFunction):
1387         (JSC::JSObject::putDirectInternal):
1388         (JSC::JSObject::putDirect):
1389         (JSC::JSValue::putDirect):
1390         (JSC::JSValue::toStrictThisObject):
1391         * runtime/JSStaticScopeObject.cpp:
1392         (JSC::JSStaticScopeObject::toStrictThisObject):
1393         * runtime/JSStaticScopeObject.h:
1394         * runtime/JSValue.h:
1395         * runtime/JSZombie.h:
1396         (JSC::JSZombie::toStrictThisObject):
1397         * runtime/PutPropertySlot.h:
1398         (JSC::PutPropertySlot::PutPropertySlot):
1399         (JSC::PutPropertySlot::isStrictMode):
1400         * runtime/StrictEvalActivation.cpp: Added.
1401         (JSC::StrictEvalActivation::StrictEvalActivation):
1402         (JSC::StrictEvalActivation::deleteProperty):
1403         (JSC::StrictEvalActivation::toThisObject):
1404         (JSC::StrictEvalActivation::toStrictThisObject):
1405         * runtime/StrictEvalActivation.h: Added.
1406
1407 2010-10-10  Patrick Gansterer  <paroga@webkit.org>
1408
1409         Unreviewed.
1410
1411         Windows build fix after r69472.
1412
1413         * wtf/text/StringHash.h:
1414         (WTF::CaseFoldingHash::hash):
1415
1416 2010-10-10  Patrick Gansterer  <paroga@webkit.org>
1417
1418         Reviewed by Adam Barth.
1419
1420         Use WTF::StringHasher in WTF::CaseFoldingHash
1421         https://bugs.webkit.org/show_bug.cgi?id=46523
1422
1423         * wtf/text/StringHash.h:
1424         (WTF::CaseFoldingHash::foldCase):
1425         (WTF::CaseFoldingHash::hash):
1426
1427 2010-10-09  Pratik Solanki  <psolanki@apple.com>
1428
1429         Reviewed by Xan Lopez.
1430
1431         https://bugs.webkit.org/show_bug.cgi?id=47445
1432         Remove unused function WTFThreadData::initializeIdentifierTable()
1433
1434         * wtf/WTFThreadData.h:
1435
1436 2010-10-08  Michael Saboff  <msaboff@apple.com>
1437
1438         Reviewed by Darin Adler.
1439
1440         Added check to start of subexpression being positive before using
1441         subexpression in replacement.
1442         https://bugs.webkit.org/show_bug.cgi?id=47324
1443
1444         * runtime/StringPrototype.cpp:
1445         (JSC::substituteBackreferencesSlow):
1446
1447 2010-10-08  Chris Evans  <cevans@google.com>
1448
1449         Reviewed by David Levin.
1450
1451         https://bugs.webkit.org/show_bug.cgi?id=47393
1452
1453         Use unsigned consistently to check for max StringImpl length.
1454         Add a few integer overflow checks.
1455         Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request.
1456
1457         * wtf/text/WTFString.cpp:
1458         * wtf/text/StringImpl.h:
1459         * wtf/text/StringImpl.cpp:
1460         Better use of size_t vs. unsigned; check for integer overflows.
1461
1462 2010-10-07  David Goodwin  <david_goodwin@apple.com>
1463
1464         Reviewed by Oliver Hunt.
1465
1466         ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount
1467         https://bugs.webkit.org/show_bug.cgi?id=47356
1468
1469         * assembler/ARMv7Assembler.h:
1470
1471 2010-10-06  Chris Evans  <cevans@google.com>
1472
1473         Reviewed by David Levin.
1474
1475         https://bugs.webkit.org/show_bug.cgi?id=47248
1476
1477         Use size_t consistently in CString, to prevent theoretical trouble
1478         with > 4GB strings on 64-bit platforms.
1479
1480         * wtf/text/CString.h:
1481         * wtf/text/CString.cpp:
1482         Use size_t for string lengths.
1483         * wtf/MD5.cpp:
1484         (WTF::expectMD5): use suitable format string + cast for size_t.
1485         * JavaScriptCore.exp:
1486         Update symbol name.
1487
1488 2010-10-06  Anders Carlsson  <andersca@apple.com>
1489
1490         Reviewed by Sam Weinig.
1491
1492         Start cleaning up Arguments.h
1493         https://bugs.webkit.org/show_bug.cgi?id=47304
1494
1495         * wtf/TypeTraits.h:
1496         * wtf/TypeTraits.cpp:
1497         Add RemoveReference type trait.
1498
1499 2010-10-06  Rafael Antognolli  <antognolli@profusion.mobi>
1500
1501         Unreviewed build fix.
1502
1503         [EFL] Build fix for glib support.
1504         https://bugs.webkit.org/show_bug.cgi?id=47221
1505
1506         If compiling with GLib support enabled, we also need to link wtf against
1507         glib library.
1508
1509         * wtf/CMakeListsEfl.txt:
1510
1511 2010-10-05  Kwang Yul Seo  <skyul@company100.net>
1512
1513         Reviewed by Gavin Barraclough.
1514
1515         [BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT
1516         https://bugs.webkit.org/show_bug.cgi?id=47117
1517
1518         Use IMemCache1 to flush data cache and invalidate instruction cache.
1519
1520         * jit/ExecutableAllocator.h:
1521         (JSC::ExecutableAllocator::cacheFlush):
1522
1523 2010-10-05  Leandro Pereira  <leandro@profusion.mobi>
1524
1525         Unreviewed. Build fix.
1526
1527         Moved "jsc" directory to "shell", so that the name does not clash with the
1528         JavaScriptCore shell in some build systems.
1529         http://webkit.org/b/47049
1530
1531         * CMakeLists.txt: Changed reference from "jsc" to "shell".
1532         * jsc: Removed.
1533         * jsc/CMakeLists.txt: Removed.
1534         * jsc/CMakeListsEfl.txt: Removed.
1535         * shell: Copied from JavaScriptCore/jsc.
1536
1537 2010-10-05  Kwang Yul Seo  <skyul@company100.net>
1538
1539         Reviewed by Kent Tamura.
1540
1541         [BREWMP] Use PlatformRefPtr in randomNumber
1542         https://bugs.webkit.org/show_bug.cgi?id=46989
1543
1544         Use PlatformRefPtr to free memory automatically.
1545
1546         * wtf/RandomNumber.cpp:
1547         (WTF::randomNumber):
1548
1549 2010-10-05  Oliver Hunt  <oliver@apple.com>
1550
1551         Reviewed by Darin Adler.
1552
1553         REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64)
1554         https://bugs.webkit.org/show_bug.cgi?id=46690
1555
1556         Use the correct register value when initialising the arguments
1557         object in the interpreter.  This is covered by existing tests.
1558
1559         * interpreter/Interpreter.cpp:
1560         (JSC::Interpreter::privateExecute):
1561
1562 2010-10-04  David Goodwin  <david_goodwin@apple.com>
1563
1564         Reviewed by Oliver Hunt.
1565
1566         ARMv7 JIT should take advantage of 2-byte branches to reduce code size
1567         https://bugs.webkit.org/show_bug.cgi?id=47007
1568
1569         * assembler/ARMv7Assembler.cpp:
1570         * assembler/ARMv7Assembler.h:
1571         (JSC::ARMv7Assembler::computeJumpType):
1572         (JSC::ARMv7Assembler::link):
1573         (JSC::ARMv7Assembler::canBeJumpT2):
1574         (JSC::ARMv7Assembler::canBeJumpT4):
1575         (JSC::ARMv7Assembler::linkBX):
1576         (JSC::ARMv7Assembler::linkJumpT4):
1577         (JSC::ARMv7Assembler::linkJumpT2):
1578         (JSC::ARMv7Assembler::linkJumpAbsolute):
1579
1580 2010-10-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1581
1582         Reviewed by Antonio Gomes.
1583
1584         [EFL] Use fast malloc for WebKit EFL
1585         https://bugs.webkit.org/show_bug.cgi?id=46691
1586
1587         Use fast malloc for WebKit EFL because the fast malloc is to allocate
1588         memory quickly.
1589
1590         * wtf/CMakeListsEfl.txt:
1591
1592 2010-10-04  Oliver Hunt  <oliver@apple.com>
1593
1594         Reviewed by Geoff Garen.
1595
1596         Lazily create activation objects
1597         https://bugs.webkit.org/show_bug.cgi?id=47107
1598
1599         Make it possible to lazily create the activation object
1600         for a function that needs one.  This allows us to reduce
1601         the overhead of entering a function that may require
1602         an activation in some cases, but not always.
1603
1604         This does make exception handling a little more complex as
1605         it's now necessary to verify that a callframes activation
1606         has been created, and create it if not, in all of the
1607         paths used in exception handling.
1608
1609         We also need to add logic to check for the existence of
1610         the activation in the scoped_var opcodes, as well as
1611         op_ret, op_ret_object_or_this and op_tearoff_activation
1612         so that we can avoid creating an activation unnecesarily
1613         on function exit. 
1614
1615         * bytecode/CodeBlock.cpp:
1616         (JSC::CodeBlock::dump):
1617         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
1618         (JSC::CodeBlock::createActivation):
1619         * bytecode/CodeBlock.h:
1620         (JSC::CodeBlock::setActivationRegister):
1621         (JSC::CodeBlock::activationRegister):
1622         * bytecode/Opcode.h:
1623         * bytecompiler/BytecodeGenerator.cpp:
1624         (JSC::BytecodeGenerator::BytecodeGenerator):
1625         (JSC::BytecodeGenerator::emitNewFunctionInternal):
1626         (JSC::BytecodeGenerator::emitNewFunctionExpression):
1627         (JSC::BytecodeGenerator::createActivationIfNecessary):
1628         * bytecompiler/BytecodeGenerator.h:
1629         * interpreter/Interpreter.cpp:
1630         (JSC::Interpreter::resolveSkip):
1631         (JSC::Interpreter::resolveGlobalDynamic):
1632         (JSC::Interpreter::resolveBase):
1633         (JSC::Interpreter::unwindCallFrame):
1634         (JSC::Interpreter::throwException):
1635         (JSC::Interpreter::privateExecute):
1636         * jit/JIT.cpp:
1637         (JSC::JIT::privateCompileMainPass):
1638         * jit/JIT.h:
1639         * jit/JITCall32_64.cpp:
1640         (JSC::JIT::emit_op_ret):
1641         (JSC::JIT::emit_op_ret_object_or_this):
1642         * jit/JITOpcodes.cpp:
1643         (JSC::JIT::emit_op_end):
1644         (JSC::JIT::emit_op_get_scoped_var):
1645         (JSC::JIT::emit_op_put_scoped_var):
1646         (JSC::JIT::emit_op_tear_off_activation):
1647         (JSC::JIT::emit_op_ret):
1648         (JSC::JIT::emit_op_ret_object_or_this):
1649         (JSC::JIT::emit_op_create_activation):
1650         (JSC::JIT::emit_op_resolve_global_dynamic):
1651         * jit/JITOpcodes32_64.cpp:
1652         (JSC::JIT::emit_op_get_scoped_var):
1653         (JSC::JIT::emit_op_put_scoped_var):
1654         (JSC::JIT::emit_op_tear_off_activation):
1655         (JSC::JIT::emit_op_create_activation):
1656         * jit/JITStubs.cpp:
1657         (JSC::DEFINE_STUB_FUNCTION):
1658
1659 2010-10-04  Adam Barth  <abarth@webkit.org>
1660
1661         Reviewed by Sam Weinig.
1662
1663         Remove ENABLE_SANDBOX
1664         https://bugs.webkit.org/show_bug.cgi?id=47032
1665
1666         * Configurations/FeatureDefines.xcconfig:
1667
1668 2010-10-01  Pratik Solanki  <psolanki@apple.com>
1669
1670         Reviewed by Geoffrey Garen.
1671         Specify ALWAYS_INLINE at function declaration not function definition
1672         https://bugs.webkit.org/show_bug.cgi?id=46960
1673
1674         For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well.
1675
1676         * bytecompiler/BytecodeGenerator.h:
1677         * wtf/FastMalloc.cpp:
1678
1679 2010-10-01  Kwang Yul Seo  <skyul@company100.net>
1680
1681         Unreviewed.
1682
1683         [BREWMP] Change Collector BLOCK_SIZE to 64KB
1684         https://bugs.webkit.org/show_bug.cgi?id=46436
1685
1686         Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices.
1687
1688         * runtime/Collector.h:
1689
1690 2010-10-01  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1691
1692         Reviewed by Andreas Kling.
1693
1694         [Qt] Stack overflow on symbian platform.
1695         https://bugs.webkit.org/show_bug.cgi?id=40598
1696         
1697         Move big allocation in arrayProtoFuncToString from stack to heap.
1698         JSC::arrayProtoFuncToString function can be called recursivly and
1699         1K allocation on stack cahse stack overflow.
1700         Can be useful for other platforms with limited stack size.
1701
1702         * runtime/ArrayPrototype.cpp:
1703         (JSC::arrayProtoFuncToString):
1704
1705 2010-09-30  Kwang Yul Seo  <skyul@company100.net>
1706
1707         Reviewed by Kent Tamura.
1708
1709         [BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr.
1710         https://bugs.webkit.org/show_bug.cgi?id=46373
1711
1712         A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef
1713         to wrap the instance in PlatformRefPtr.
1714
1715         * wtf/brew/ShellBrew.h:
1716         (WTF::createRefPtrInstance):
1717
1718 2010-09-30  Kwang Yul Seo  <skyul@company100.net>
1719
1720         Reviewed by Kent Tamura.
1721
1722         [BREWMP] Port PlatformRefPtr
1723         https://bugs.webkit.org/show_bug.cgi?id=46370
1724
1725         Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP.
1726
1727         * wtf/brew/RefPtrBrew.h: Added.
1728         (WTF::refPlatformPtr):
1729         (WTF::derefPlatformPtr):
1730
1731 2010-09-29  Sam Weinig  <sam@webkit.org>
1732
1733         Reviewed by Darin Adler.
1734
1735         Add additional checks to StringBuffer.
1736         <rdar://problem/7756381>
1737
1738         * wtf/text/StringBuffer.h:
1739         (WTF::StringBuffer::StringBuffer):
1740         (WTF::StringBuffer::resize):
1741
1742 2010-09-30  Chris Marrin  <cmarrin@apple.com>
1743
1744         Reviewed by Simon Fraser.
1745
1746         Make 2D accelerated canvas rendering build on Mac
1747         https://bugs.webkit.org/show_bug.cgi?id=46007
1748         
1749         Added ACCELERATED_2D_CANVAS to FeatureDefines
1750
1751         * Configurations/FeatureDefines.xcconfig:
1752
1753 2010-09-30  Kevin Ollivier  <kevino@theolliviers.com>
1754
1755         [wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from
1756         the copy so as not to alter global settings.
1757
1758         * wscript:
1759
1760 2010-09-30  Peter Varga  <pvarga@inf.u-szeged.hu>
1761
1762         Reviewed by Gavin Barraclough.
1763
1764         The case-insensitivity backreference checking isn't working with YARR
1765         Interpreter
1766         https://bugs.webkit.org/show_bug.cgi?id=46882
1767
1768         Add ignorecase checking to the Interpreter::tryConsumeBackReference() function.
1769
1770         * yarr/RegexInterpreter.cpp:
1771         (JSC::Yarr::Interpreter::tryConsumeBackReference):
1772
1773 2010-09-30  Kwang Yul Seo  <skyul@company100.net>
1774
1775         Reviewed by Andreas Kling.
1776
1777         [BREWMP] Leave initializeRandomNumberGenerator empty.
1778         https://bugs.webkit.org/show_bug.cgi?id=46851
1779
1780         On Brew MP, AEECLSID_RANDOM initializes itself.
1781
1782         * wtf/RandomNumberSeed.h:
1783         (WTF::initializeRandomNumberGenerator):
1784
1785 2010-09-30  Gabor Loki  <loki@webkit.org>
1786
1787         Reviewed by Csaba Osztrogonác.
1788
1789         Remove unnecessary cacheFlush calls from Thumb-2
1790         https://bugs.webkit.org/show_bug.cgi?id=46702
1791
1792         * assembler/ARMv7Assembler.h:
1793         (JSC::ARMv7Assembler::relinkCall):
1794         (JSC::ARMv7Assembler::repatchInt32):
1795         (JSC::ARMv7Assembler::repatchPointer):
1796
1797 2010-09-29  Patrick Gansterer  <paroga@webkit.org>
1798
1799         Unreviewed.
1800
1801         Next try to fix cygwin build.
1802
1803         * wtf/Assertions.cpp:
1804
1805 2010-09-29  Patrick Gansterer  <paroga@webkit.org>
1806
1807         Unreviewed.
1808
1809         Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN).
1810
1811         * wtf/Assertions.cpp:
1812
1813 2010-09-29  Patrick Gansterer  <paroga@webkit.org>
1814
1815         Unreviewed.
1816
1817         Build fix for cygwin.
1818
1819         * wtf/Assertions.cpp:
1820
1821 2010-09-29  Patrick Gansterer  <paroga@webkit.org>
1822
1823         Reviewed by Andreas Kling.
1824
1825         [WINCE] Buildfix for Assertions.cpp after r68511.
1826         https://bugs.webkit.org/show_bug.cgi?id=46807
1827
1828         Some, but not all WinCE environments have support for IsDebuggerPresent().
1829         Add HAVE(ISDEBUGGERPRESENT) to make this a build option.
1830         HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default.
1831
1832         * wtf/Assertions.cpp:
1833         * wtf/Platform.h:
1834
1835 2010-09-29  Peter Varga  <pvarga@inf.u-szeged.hu>
1836
1837         Reviewed by Csaba Osztrogonác.
1838
1839         JSC compile fails on 32bit platform when Regexp Tracing is enabled
1840         https://bugs.webkit.org/show_bug.cgi?id=46713
1841
1842         Fix the cast of pointer in regexp tracing to avoid the warning.
1843
1844         * runtime/RegExp.cpp:
1845         (JSC::RegExp::match):
1846
1847 2010-09-28  Anders Carlsson  <andersca@apple.com>
1848
1849         Reviewed by Sam Weinig.
1850
1851         Begin hooking up painting in the plug-in process
1852         https://bugs.webkit.org/show_bug.cgi?id=46766
1853
1854         * JavaScriptCore.exp:
1855         Add tryFastRealloc, used by WebKit2.
1856
1857 2010-09-28  Philippe Normand  <pnormand@igalia.com>
1858
1859         Reviewed by Martin Robinson.
1860
1861         Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT)
1862         https://bugs.webkit.org/show_bug.cgi?id=46721
1863
1864         Enable GOwnPtr/GRefPtr build only if glib support has been
1865         explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro.
1866
1867         * wtf/gobject/GOwnPtr.cpp:
1868         * wtf/gobject/GOwnPtr.h:
1869         * wtf/gobject/GRefPtr.cpp:
1870         * wtf/gobject/GRefPtr.h:
1871
1872 2010-09-28  İsmail Dönmez  <ismail@namtrac.org>
1873
1874         Reviewed by Andreas Kling.
1875
1876         Test for WINCE instead of WINCEBASIC, compiler always defines WINCE.
1877         Remove reference to unexisting path JavaScriptCore/os-wince.
1878
1879         * JavaScriptCore.pri:
1880         * wtf/Assertions.cpp:
1881
1882 2010-09-27  Michael Saboff  <msaboff@apple.com>
1883
1884         Reviewed by Geoffrey Garen.
1885
1886         Changed the initialization of JSArray objects to have space for 
1887         3 elements for the constructor that takes a ArgList argument.
1888         This improves v8-deltablue performance by about 2.8% by reducing 
1889         the number of realloc() calls.
1890         https://bugs.webkit.org/show_bug.cgi?id=46664
1891
1892         * runtime/JSArray.cpp:
1893         (JSC::JSArray::JSArray):
1894
1895 2010-09-27  Gavin Barraclough  <barraclough@apple.com>
1896
1897         Reviewed by Darin Adler.
1898
1899         Bug 46680 - Inlining string concatenation can regress interpreter performance
1900         <rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter
1901         Do not inline calls to string concatenation in the interpret loop.
1902
1903         * interpreter/Interpreter.cpp:
1904         (JSC::concatenateStrings):
1905         (JSC::Interpreter::privateExecute):
1906
1907 2010-09-27  Anders Carlsson  <andersca@apple.com>
1908
1909         Fix thinko.
1910
1911         * runtime/JSCell.h:
1912
1913 2010-09-27  Anders Carlsson  <andersca@apple.com>
1914
1915         Reviewed by Adam Roben.
1916
1917         Try to fix Windows build.
1918
1919         * runtime/JSCell.h:
1920         (JSC::MSVCBugWorkaround::MSVCBugWorkaround):
1921         (JSC::MSVCBugWorkaround::~MSVCBugWorkaround):
1922
1923 2010-09-27  Erik Arvidsson  <arv@chromium.org>
1924
1925         Reviewed by Darin Adler.
1926
1927         Add operator == for AtomicString and Vector<Uchar>
1928         https://bugs.webkit.org/show_bug.cgi?id=46509
1929
1930         * JavaScriptCore.exp:
1931         * wtf/text/AtomicString.cpp:
1932         (WTF::operator==):
1933         * wtf/text/AtomicString.h:
1934         (WTF::operator==):
1935         (WTF::operator!=):
1936
1937 2010-09-27  Anders Carlsson  <andersca@apple.com>
1938
1939         Try to fix the Windows build.
1940
1941         * wtf/Noncopyable.h:
1942
1943 2010-09-26  Anders Carlsson  <andersca@apple.com>
1944
1945         Reviewed by Alexey Proskuryakov and Adam Barth.
1946
1947         Add WTF_MAKE_NONCOPYABLE macro
1948         https://bugs.webkit.org/show_bug.cgi?id=46589
1949
1950         Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The
1951         reason for this is that the Itanium C++ ABI states that no empty classes of the same type
1952         can be laid out at the same offset in the class. This can result in objects getting larger
1953         which leads to memory regressions. (One example of this is the String class which grew by
1954         sizeof(void*) when both its base class and its first member variable inherited indirectly
1955         from FastAllocBase).
1956
1957         * wtf/Noncopyable.h:
1958         Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated.
1959         
1960         * runtime/JSCell.h:
1961         * wtf/RefCounted.h:
1962         Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE.
1963
1964 2010-09-27  Philippe Normand  <pnormand@igalia.com>
1965
1966         Reviewed by Martin Robinson.
1967
1968         [GTK] use ENABLE(GLIB_SUPPORT)
1969         https://bugs.webkit.org/show_bug.cgi?id=46630
1970
1971         * wtf/Platform.h: Include GTypedefs.h only if glib support
1972         is explicitly enabled.
1973
1974 2010-09-25  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
1975
1976         Reviewed by Adam Barth.
1977
1978         jsc: Document the strcat opcode.
1979         https://bugs.webkit.org/show_bug.cgi?id=46571
1980
1981         * interpreter/Interpreter.cpp:
1982         (JSC::Interpreter::privateExecute):
1983
1984 2010-09-21  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
1985
1986         Reviewed by Adam Barth.
1987
1988         make-bytecode-docs.pl: Add a comment to the generated HTML
1989         https://bugs.webkit.org/show_bug.cgi?id=46570
1990
1991         Generate an HTML Comment that this file was generated from
1992         Interpreter.cpp with the make-bytecode-docs.pl script.
1993
1994         * docs/make-bytecode-docs.pl:
1995
1996 2010-09-27  Patrick Gansterer  <paroga@webkit.org>
1997
1998         Reviewed by Adam Barth.
1999
2000         Remove WTF::stringHash functions
2001         https://bugs.webkit.org/show_bug.cgi?id=46520
2002
2003         Since r68289 the stringHash functions are only wrappers around StringHasher::createHash.
2004         So use StringHasher::createHash directly and remove stringHash.
2005
2006         * wtf/StringHashFunctions.h:
2007         * wtf/text/StringImpl.h:
2008         (WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly.
2009
2010 2010-09-26  Patrick Gansterer  <paroga@webkit.org>
2011
2012         Reviewed by Adam Barth.
2013
2014         Add WTF::StringHasher::createBlobHash
2015         https://bugs.webkit.org/show_bug.cgi?id=46514
2016
2017         Add this function for hashing FormElementKey and QualifiedNameComponents.
2018
2019         * wtf/StringHashFunctions.h:
2020         (WTF::StringHasher::createBlobHash):
2021
2022 2010-09-26  Patrick Gansterer  <paroga@webkit.org>
2023
2024         Reviewed by Adam Barth.
2025
2026         REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue)
2027         running websocket/tests/bad-sub-protocol-non-ascii.html
2028         https://bugs.webkit.org/show_bug.cgi?id=46553
2029
2030         Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong.
2031         Add an additional member variable to indicate if we have an pending character
2032         instead of only using an invalid character for this purpose.
2033
2034         * wtf/StringHashFunctions.h:
2035         (WTF::StringHasher::StringHasher):
2036         (WTF::StringHasher::addCharacters):
2037         (WTF::StringHasher::addCharacter):
2038         (WTF::StringHasher::hash):
2039
2040 2010-09-26  Mark Hahnenberg  <mhahnenb@gmail.com>
2041
2042         Reviewed by Oliver Hunt.
2043
2044         valueOf called in wrong order in atan2 and date constructors.
2045         https://bugs.webkit.org/show_bug.cgi?id=26978
2046
2047         Fixed the bug where the arguments to atan2 were being evaluated 
2048         out of order.
2049
2050         * runtime/MathObject.cpp:
2051         (JSC::mathProtoFuncATan2):
2052
2053 2010-09-26  Mark Hahnenberg  <mhahnenb@gmail.com>
2054
2055         Reviewed by Oliver Hunt.
2056
2057         valueOf called in wrong order in atan2 and date constructors.
2058         https://bugs.webkit.org/show_bug.cgi?id=26978
2059
2060         Fixed the issue where the parameters to the Date constructor
2061         were being evaluated to numbers more than once.
2062
2063         * runtime/DateConstructor.cpp:
2064         (JSC::constructDate):
2065         (JSC::dateUTC):
2066
2067 2010-09-25  Oliver Hunt  <oliver@apple.com>
2068
2069         Fix various builds
2070
2071         Relearning the lesson that last minute changes are bad.
2072
2073         * bytecode/CodeBlock.cpp:
2074         (JSC::CodeBlock::dump):
2075         * bytecompiler/BytecodeGenerator.cpp:
2076         (JSC::BytecodeGenerator::emitGetArgumentsLength):
2077         * jit/JITOpcodes.cpp:
2078         (JSC::JIT::emitSlow_op_get_argument_by_val):
2079
2080 2010-09-25  Oliver Hunt  <oliver@apple.com>
2081
2082         Reviewed by Cameron Zwarich.
2083
2084         Avoid constructing arguments object when accessing length and index properties
2085         https://bugs.webkit.org/show_bug.cgi?id=46572
2086
2087         Add opcodes to read argument length and properties, and then implement them.
2088         Much like other lazy opcodes these opcodes take a fast path when the arguments
2089         object has not been instantiated, and fall back on generic access mechanisms
2090         if they are acting on an instantiated object.
2091
2092         3% win on v8-earleyboyer, no change elsewhere.
2093
2094         * bytecode/CodeBlock.cpp:
2095         (JSC::CodeBlock::dump):
2096         * bytecode/Opcode.h:
2097         * bytecompiler/BytecodeGenerator.cpp:
2098         (JSC::BytecodeGenerator::emitGetArgumentsLength):
2099         (JSC::BytecodeGenerator::emitGetArgumentByVal):
2100         * bytecompiler/BytecodeGenerator.h:
2101         * bytecompiler/NodesCodegen.cpp:
2102         (JSC::BracketAccessorNode::emitBytecode):
2103         (JSC::DotAccessorNode::emitBytecode):
2104         * interpreter/Interpreter.cpp:
2105         (JSC::Interpreter::privateExecute):
2106         * jit/JIT.cpp:
2107         (JSC::JIT::privateCompileMainPass):
2108         (JSC::JIT::privateCompileSlowCases):
2109         * jit/JIT.h:
2110         * jit/JITOpcodes.cpp:
2111         (JSC::JIT::emit_op_get_arguments_length):
2112         (JSC::JIT::emitSlow_op_get_arguments_length):
2113         (JSC::JIT::emit_op_get_argument_by_val):
2114         (JSC::JIT::emitSlow_op_get_argument_by_val):
2115         * jit/JITOpcodes32_64.cpp:
2116         (JSC::JIT::emit_op_get_arguments_length):
2117         (JSC::JIT::emitSlow_op_get_arguments_length):
2118         (JSC::JIT::emit_op_get_argument_by_val):
2119         (JSC::JIT::emitSlow_op_get_argument_by_val):
2120
2121 2010-09-25  Patrick Gansterer  <paroga@webkit.org>
2122
2123         Unreviewed.
2124
2125         Fix typo in StringHasher class
2126         https://bugs.webkit.org/show_bug.cgi?id=45970
2127
2128         * wtf/StringHashFunctions.h:
2129         (WTF::StringHasher::createHash):
2130
2131 2010-09-24  Patrick Gansterer  <paroga@paroga.com>
2132
2133         Reviewed by Gavin Barraclough.
2134
2135         Add WTF::StringHasher
2136         https://bugs.webkit.org/show_bug.cgi?id=45970
2137
2138         StringHasher is a class for calculation stringHash out of character string.
2139         This class will unify the different usages of the same algorithm.
2140
2141         * wtf/StringHashFunctions.h:
2142         (WTF::StringHasher::StringHasher):
2143         (WTF::StringHasher::addCharacters):
2144         (WTF::StringHasher::addCharacter):
2145         (WTF::StringHasher::hash):
2146         (WTF::StringHasher::createHash):
2147         (WTF::StringHasher::defaultCoverter):
2148         (WTF::StringHasher::addCharactersToHash):
2149         (WTF::stringHash):
2150
2151 2010-09-24  Oliver Hunt  <oliver@apple.com>
2152
2153         Reviewed by Geoffrey Garen.
2154
2155         Variable declarations inside a catch scope don't get propogated to the parent scope
2156         https://bugs.webkit.org/show_bug.cgi?id=46501
2157
2158         Add logic to make variable declaration look for a scope for the
2159         new variable.  This allows us to create a scope (eg. for catch)
2160         and then seal it, so that additional variable declarations
2161         contained are propogated to the correct target.  Strangely this
2162         comes out as a performance win, but I think it's mostly cache
2163         effects.
2164
2165         * parser/JSParser.cpp:
2166         (JSC::JSParser::Scope::Scope):
2167         (JSC::JSParser::Scope::preventNewDecls):
2168         (JSC::JSParser::Scope::allowsNewDecls):
2169         (JSC::JSParser::declareVariable):
2170         (JSC::JSParser::parseVarDeclarationList):
2171         (JSC::JSParser::parseConstDeclarationList):
2172         (JSC::JSParser::parseTryStatement):
2173         (JSC::JSParser::parseFormalParameters):
2174         (JSC::JSParser::parseFunctionDeclaration):
2175
2176 2010-09-24  İsmail Dönmez  <ismail@namtrac.org>
2177
2178        Reviewed by Csaba Osztrogonác.
2179
2180        Add a Windows compatible inttypes.h header to fix WinCE build.
2181        https://bugs.webkit.org/show_bug.cgi?id=46463
2182
2183        * os-win32/inttypes.h: Added.
2184
2185 2010-09-24  Oliver Hunt  <oliver@apple.com>
2186
2187         Reviewed by Gavin Barraclough.
2188
2189         REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit).
2190         https://bugs.webkit.org/show_bug.cgi?id=46448
2191
2192         Roll this back in, with additional logic to prevent us from delaying construction
2193         of functions named "arguments"
2194
2195         * bytecode/CodeBlock.cpp:
2196         (JSC::CodeBlock::dump):
2197         * bytecode/Opcode.h:
2198         * bytecompiler/BytecodeGenerator.cpp:
2199         (JSC::BytecodeGenerator::BytecodeGenerator):
2200         (JSC::BytecodeGenerator::emitInitLazyRegister):
2201         (JSC::BytecodeGenerator::registerFor):
2202         (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
2203         (JSC::BytecodeGenerator::constRegisterFor):
2204         (JSC::BytecodeGenerator::emitNewFunction):
2205         (JSC::BytecodeGenerator::emitLazyNewFunction):
2206         (JSC::BytecodeGenerator::emitNewFunctionInternal):
2207         * bytecompiler/BytecodeGenerator.h:
2208         * interpreter/Interpreter.cpp:
2209         (JSC::Interpreter::privateExecute):
2210         * jit/JIT.cpp:
2211         (JSC::JIT::privateCompileMainPass):
2212         * jit/JIT.h:
2213         * jit/JITOpcodes.cpp:
2214         (JSC::JIT::emit_op_init_lazy_reg):
2215         (JSC::JIT::emit_op_new_func):
2216         * jit/JITOpcodes32_64.cpp:
2217         (JSC::JIT::emit_op_init_lazy_reg):
2218         * parser/Nodes.h:
2219         (JSC::ScopeNode::needsActivationForMoreThanVariables):
2220
2221 2010-09-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2222
2223         Unreviewed, rolling out r68223.
2224         http://trac.webkit.org/changeset/68223
2225         https://bugs.webkit.org/show_bug.cgi?id=46448
2226
2227         It broke 2-3 tests on bots (Requested by Ossy on #webkit).
2228
2229         * bytecode/CodeBlock.cpp:
2230         (JSC::CodeBlock::dump):
2231         * bytecode/Opcode.h:
2232         * bytecompiler/BytecodeGenerator.cpp:
2233         (JSC::BytecodeGenerator::BytecodeGenerator):
2234         (JSC::BytecodeGenerator::registerFor):
2235         (JSC::BytecodeGenerator::constRegisterFor):
2236         (JSC::BytecodeGenerator::emitNewFunction):
2237         * bytecompiler/BytecodeGenerator.h:
2238         * interpreter/Interpreter.cpp:
2239         (JSC::Interpreter::privateExecute):
2240         * jit/JIT.cpp:
2241         (JSC::JIT::privateCompileMainPass):
2242         * jit/JIT.h:
2243         * jit/JITOpcodes.cpp:
2244         (JSC::JIT::emit_op_new_func):
2245         (JSC::JIT::emit_op_init_arguments):
2246         * jit/JITOpcodes32_64.cpp:
2247         (JSC::JIT::emit_op_new_func):
2248         (JSC::JIT::emit_op_init_arguments):
2249         * parser/Nodes.h:
2250
2251 2010-09-23  Oliver Hunt  <oliver@apple.com>
2252
2253         Reviewed by Geoffrey Garen.
2254
2255         Delay construction of functions that aren't captured
2256         https://bugs.webkit.org/show_bug.cgi?id=46433
2257
2258         If a function isn't captured by an activation there's no
2259         way it can be accessed indirectly, so we can delay the
2260         construction until it's used (similar to what we do with
2261         arguments).  We rename the existing op_init_arguments to
2262         op_init_lazy_reg and removed its implicit handling of
2263         the anonymous argument register, and make op_new_function
2264         take a parameter to indicate whether it should null check
2265         the target slot before creating the function object.
2266
2267         * bytecode/CodeBlock.cpp:
2268         (JSC::CodeBlock::dump):
2269         * bytecode/Opcode.h:
2270         * bytecompiler/BytecodeGenerator.cpp:
2271         (JSC::BytecodeGenerator::BytecodeGenerator):
2272         (JSC::BytecodeGenerator::emitInitLazyRegister):
2273         (JSC::BytecodeGenerator::registerFor):
2274         (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
2275         (JSC::BytecodeGenerator::constRegisterFor):
2276         (JSC::BytecodeGenerator::emitNewFunction):
2277         (JSC::BytecodeGenerator::emitLazyNewFunction):
2278         (JSC::BytecodeGenerator::emitNewFunctionInternal):
2279         * bytecompiler/BytecodeGenerator.h:
2280         * interpreter/Interpreter.cpp:
2281         (JSC::Interpreter::privateExecute):
2282         * jit/JIT.cpp:
2283         (JSC::JIT::privateCompileMainPass):
2284         * jit/JIT.h:
2285         * jit/JITOpcodes.cpp:
2286         (JSC::JIT::emit_op_init_lazy_reg):
2287         (JSC::JIT::emit_op_new_func):
2288         * jit/JITOpcodes32_64.cpp:
2289         (JSC::JIT::emit_op_init_lazy_reg):
2290         * parser/Nodes.h:
2291         (JSC::ScopeNode::needsActivationForMoreThanVariables):
2292
2293 2010-09-23  David Kilzer  <ddkilzer@apple.com>
2294
2295         <rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2
2296         https://bugs.webkit.org/show_bug.cgi?id=46423
2297
2298         Reviewed by Oliver Hunt.
2299
2300         * interpreter/Interpreter.cpp:
2301         (JSC::Interpreter::privateExecute): Disable the gcc computed
2302         goto hacks added in r55564 when compiling with llvm-gcc-4.2.
2303
2304 2010-09-23  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
2305
2306         Reviewed by Darin Adler.
2307
2308         Fix usage of enum as if it was a define
2309         https://bugs.webkit.org/show_bug.cgi?id=46355
2310
2311         pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an
2312         enum.  Hence, it cannot be used by the preprocessor which always
2313         evaluates that condition as true. This was giving a warning when
2314         compiling with gcc and "-Wundef" flag.
2315
2316         The second path, when PTHREAD_MUTEX_DEFAULT is not the same of
2317         PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path
2318         and get rid of that #if.
2319
2320         * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to
2321         set mutex type to PTHREAD_MUTEX_NORMAL.
2322         (WTF::Mutex::Mutex):
2323
2324 2010-09-23  Michael Saboff  <msaboff@apple.com>
2325
2326         Reviewed by Geoffrey Garen.
2327
2328         Removed extraneous truncation of ovector on entry and error exit.
2329         Changed the initialization to -1 of vector to only initialize
2330         the start indecies, which is sufficient for the pattern/subpatterns.
2331         Changed the JIT code to not clear the end index for subpatterns
2332         as it isn't needed.  These changes are worth ~2.7% on v8-regexp.
2333         https://bugs.webkit.org/show_bug.cgi?id=46404
2334
2335         * runtime/RegExp.cpp:
2336         (JSC::RegExp::match):
2337         * yarr/RegexJIT.cpp:
2338         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2339
2340 2010-09-22  Oliver Hunt  <oliver@apple.com>
2341
2342         Reviewed by Geoff Garen.
2343
2344         Only copy captured variables into activation
2345         https://bugs.webkit.org/show_bug.cgi?id=46330
2346
2347         We now track free variable information which means that
2348         we no longer need to copy every variable defined in a
2349         function.  With this patch activations only retain those
2350         variables needed for correctness.  In order to interact
2351         safely with the inspector this means that JSActivation
2352         now provides its own lookup functions so it can avoid 
2353         trying to read or write to variables that have been
2354         optimised out.
2355
2356         * bytecode/CodeBlock.h:
2357         * bytecompiler/BytecodeGenerator.cpp:
2358         (JSC::BytecodeGenerator::BytecodeGenerator):
2359         * parser/Nodes.h:
2360         (JSC::ScopeNode::capturedVariableCount):
2361         (JSC::ScopeNode::captures):
2362         * runtime/Arguments.h:
2363         (JSC::JSActivation::copyRegisters):
2364         * runtime/Executable.cpp:
2365         (JSC::FunctionExecutable::FunctionExecutable):
2366         (JSC::FunctionExecutable::compileForCallInternal):
2367         (JSC::FunctionExecutable::compileForConstructInternal):
2368         * runtime/Executable.h:
2369         (JSC::FunctionExecutable::capturedVariableCount):
2370         * runtime/JSActivation.cpp:
2371         (JSC::JSActivation::markChildren):
2372         (JSC::JSActivation::symbolTableGet):
2373         (JSC::JSActivation::symbolTablePut):
2374         (JSC::JSActivation::getOwnPropertyNames):
2375         (JSC::JSActivation::symbolTablePutWithAttributes):
2376         * runtime/JSActivation.h:
2377
2378 2010-09-23  Ismail Donmez  <ismail@namtrac.org>
2379
2380         Reviewed by Andreas Kling.
2381
2382         Fix jsc.exe build for Windows CE
2383
2384         * jsc.pro: Add mmtimer.lib for Windows CE.
2385
2386 2010-09-23  Ismail Donmez  <ismail@namtrac.org>
2387
2388         Unreviewed.
2389
2390         JIT should be disabled on Windows CE. Broken in r64176.
2391
2392         * wtf/Platform.h:
2393
2394 2010-09-23  Peter Varga  <pvarga@inf.u-szeged.hu>
2395
2396         Reviewed by Gavin Barraclough.
2397
2398         Reduce the number of BOL checks in YARR Interpreter
2399         https://bugs.webkit.org/show_bug.cgi?id=46260
2400
2401         Extend the YARR Interpreter with an optimization which reduces the number of
2402         BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a
2403         "TypeAssertionBOL" byteTerm it will be checked just one time.
2404
2405         * yarr/RegexInterpreter.cpp:
2406         (JSC::Yarr::Interpreter::matchDisjunction):
2407         (JSC::Yarr::ByteCompiler::compile):
2408         (JSC::Yarr::ByteCompiler::regexBegin):
2409         (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
2410         (JSC::Yarr::ByteCompiler::emitDisjunction):
2411         * yarr/RegexInterpreter.h:
2412         (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
2413         (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
2414         (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
2415         (JSC::Yarr::ByteTerm::AlternativeBegin):
2416         (JSC::Yarr::ByteTerm::AlternativeDisjunction):
2417         (JSC::Yarr::ByteTerm::AlternativeEnd):
2418
2419 2010-09-22  Michael Saboff  <msaboff@apple.com>
2420
2421         Reviewed by Gavin Barraclough.
2422
2423         Fixed the cross over from alternatives executed once and
2424         those that loop.  This fixed the problem where the index
2425         was getting messed up for looping alternatives causing an
2426         infinite loop.
2427         https://bugs.webkit.org/show_bug.cgi?id=46189
2428
2429         * yarr/RegexJIT.cpp:
2430         (JSC::Yarr::RegexGenerator::generateDisjunction):
2431
2432 2010-09-22  Steve Falkenburg  <sfalken@apple.com>
2433
2434         Rubber stamped by Jon Honeycutt.
2435
2436         Allow jsc.exe to be run against unversioned ICU.
2437
2438         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
2439
2440 2010-09-22  Kwang Yul Seo  <skyul@company100.net>
2441
2442         Reviewed by Laszlo Gombos.
2443
2444         Use "typedef wchar_t JSChar" when compiled with RVCT
2445         https://bugs.webkit.org/show_bug.cgi?id=40651
2446
2447         Use wchar_t for JSChar and UChar when compiled with RVCT.
2448         Linux is the exception for this rule.
2449
2450         * API/JSStringRef.h:
2451         * wtf/unicode/qt4/UnicodeQt4.h:
2452
2453 2010-09-22  Oliver Hunt  <oliver@apple.com>
2454
2455         Reviewed by Gavin Barraclough.
2456
2457         [INTERPRETER] Two tests fail with SputnikError: #1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown
2458         https://bugs.webkit.org/show_bug.cgi?id=44245
2459
2460         Remove incorrect code from op_load_varargs in the interpreter.
2461
2462         * interpreter/Interpreter.cpp:
2463         (JSC::Interpreter::privateExecute):
2464
2465 2010-09-22  Oliver Hunt  <oliver@apple.com>
2466
2467         Reviewed by Gavin Barraclough.
2468
2469         [JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails
2470         https://bugs.webkit.org/show_bug.cgi?id=44246
2471
2472         JIT code generated for instanceof was not checking to ensure that the prototype property was
2473         an object, this patch ensures that it does.
2474
2475         * jit/JITOpcodes.cpp:
2476         (JSC::JIT::emit_op_instanceof):
2477         (JSC::JIT::emitSlow_op_instanceof):
2478         * jit/JITOpcodes32_64.cpp:
2479         (JSC::JIT::emit_op_instanceof):
2480         (JSC::JIT::emitSlow_op_instanceof):
2481
2482 2010-09-22  Patrick Gansterer  <paroga@webkit.org>
2483
2484         Reviewed by Darin Adler.
2485
2486         Inline UTF8SequenceLength
2487         https://bugs.webkit.org/show_bug.cgi?id=45589
2488
2489         * wtf/unicode/UTF8.cpp:
2490         (WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance.
2491
2492 2010-09-21  Oliver Hunt  <oliver@apple.com>
2493
2494         RS=Gavin Barraclough.
2495
2496         Fix codeblock dumping
2497
2498         * bytecode/CodeBlock.cpp:
2499         (JSC::CodeBlock::dump):
2500         * runtime/Executable.h:
2501         (JSC::ScriptExecutable::ScriptExecutable):
2502
2503 2010-09-21  Oliver Hunt  <oliver@apple.com>
2504
2505         Reviewed by Geoffrey Garen.
2506
2507         Speed up function.apply(..., arguments)
2508         https://bugs.webkit.org/show_bug.cgi?id=46207
2509
2510         Add code to do argument copying inline in the case
2511         where we're using Function.apply to forward our arguments
2512         directly.
2513
2514         * jit/JIT.cpp:
2515         (JSC::JIT::privateCompileSlowCases):
2516            Splitted op_load_varargs into fast and slow paths, so add the call
2517            to the slow path generator.
2518         * jit/JIT.h:
2519         * jit/JITCall32_64.cpp:
2520           Remove 32bit specific emit_op_load_varargs as the logic is the
2521           same for all value representations
2522         * jit/JITOpcodes.cpp:
2523         (JSC::JIT::emit_op_load_varargs):
2524           Copy arguments inline
2525         (JSC::JIT::emitSlow_op_load_varargs):
2526
2527 2010-09-21  Geoffrey Garen  <ggaren@apple.com>
2528
2529         Reviewed by Oliver Hunt.
2530
2531         <rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in
2532         interpreter due to 54724 and 54596
2533         
2534         Fixed a typo (using "UNLIKELY" instead of "LIKELY").
2535         
2536         * wtf/PassRefPtr.h:
2537         (WTF::refIfNotNull):
2538         (WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs
2539         hold real data. Also, in cases where they do not hold real data, the
2540         compiler usually sees a call to release() right before the call to the
2541         destructor, so it can probably optimize out the test completely.
2542
2543 2010-09-21  Fridrich Strba  <fridrich.strba@bluewin.ch>
2544
2545         Reviewed by Martin Robinson.
2546
2547         Build issues with Windows versions of the GTK+ port
2548         https://bugs.webkit.org/show_bug.cgi?id=45844
2549
2550         Link with winmm.dll when necessary and specify the executable extension
2551         explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@
2552         rule actually works.
2553
2554         Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses
2555         a section in ThreadSpecific.cpp
2556
2557         * GNUmakefile.am:
2558
2559 2010-09-21  Martin Robinson  <mrobinson@igalia.com>
2560
2561         Reviewed by Xan Lopez.
2562
2563         [GTK] 'make dist' should be fixed in preparation for the next release
2564         https://bugs.webkit.org/show_bug.cgi?id=46129
2565
2566         * GNUmakefile.am: Update the sources list to include missing headers.
2567
2568 2010-09-21  Dave Tapuska  <dtapuska@rim.com>
2569
2570         Reviewed by Csaba Osztrogonác.
2571
2572         https://bugs.webkit.org/show_bug.cgi?id=45673
2573
2574         r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be
2575         8 byte aligned. A non 8 byte divisible value for this will
2576         cause the sp to become non 8 byte aligned.
2577
2578         Verify and correct offset values that r65596 effected that
2579         weren't updated.
2580
2581         * jit/JITStubs.cpp:
2582         * jit/JITStubs.h:
2583
2584 2010-09-21  Xan Lopez  <xlopez@igalia.com>
2585
2586         Reviewed by Martin Robinson.
2587
2588         Fix Opcode stats compilation
2589         https://bugs.webkit.org/show_bug.cgi?id=46079
2590
2591         The FixedArray API had changed, and <stdio.h> was not included for
2592         printf.
2593
2594         * bytecode/Opcode.cpp:
2595         (JSC::OpcodeStats::~OpcodeStats):
2596
2597 2010-09-20  Michael Saboff  <msaboff@apple.com>
2598
2599         Reviewed by Gavin Barraclough.
2600
2601         Fixed detection of alternative smaller than the first alternative
2602         to only check looping alternatives.
2603         https://bugs.webkit.org/show_bug.cgi?id=46049
2604
2605         * yarr/RegexJIT.cpp:
2606         (JSC::Yarr::RegexGenerator::generateDisjunction):
2607
2608 2010-09-20  Peter Varga  <pvarga@inf.u-szeged.hu>
2609
2610         Reviewed by Geoffrey Garen.
2611
2612         REGRESSION(67790): jsc tests are failed with YARR interpreter
2613         https://bugs.webkit.org/show_bug.cgi?id=46083
2614
2615         Fix the initializing of the lastSubpatternId member of
2616         parentheses.
2617
2618         * yarr/RegexCompiler.cpp:
2619         (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
2620
2621 2010-09-20  Gavin Barraclough  <barraclough@apple.com>
2622
2623         Reviewed by Oliver Hunt.
2624
2625         Bug 46077 - ASSERT failure in YARR JIT
2626
2627         We will currently attempt to loop if there are multiple alternatives, they are all
2628         BOL predicated, and the last alternative is longer then the first - however if all
2629         alternatives are BOL predicated the head of loop label will not have been set, and
2630         we'll try to link a jump to an undefined label. Stop doing so.
2631
2632         * yarr/RegexJIT.cpp:
2633         (JSC::Yarr::RegexGenerator::generateDisjunction):
2634
2635 2010-09-20  Adam Roben  <aroben@apple.com>
2636
2637         Export RegExpObject::info from JavaScriptCore
2638
2639         This allows obj->inherits(&RegExpObject::info) to work correctly from
2640         outside JavaScriptCore.dll on Windows.
2641
2642         Fixes <http://webkit.org/b/46098>
2643         fast/loader/stateobjects/pushstate-object-types.html fails on Windows
2644
2645         Reviewed by John Sullivan.
2646
2647         * runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as
2648         we already have for some other classes whose info members have to be
2649         used from outside the DLL.
2650
2651 2010-09-19  Gavin Barraclough  <barraclough@apple.com>
2652
2653         Windows build fix pt 2.
2654
2655         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2656
2657 2010-09-19  Gavin Barraclough  <barraclough@apple.com>
2658
2659         Windows build fix pt 1.
2660
2661         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2662
2663 2010-09-19  Gavin Barraclough  <barraclough@apple.com>
2664
2665         Build fix - implicit double-to-int conversion invalid on 32-bit.
2666
2667         * runtime/DatePrototype.cpp:
2668         (JSC::fillStructuresUsingDateArgs):
2669         (JSC::dateProtoFuncSetYear):
2670
2671 2010-09-19  Gavin Barraclough  <barraclough@apple.com>
2672
2673         Reviewed by Oliver Hunt.
2674
2675         Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod.
2676
2677         These methods implement the same conversion (see discussion in the notes
2678         of sections of 9.5 and 9.6 of the spec), only differing in how the result
2679         is interpretted.
2680
2681         Date prototype is incorrectly using toInt32, and this is causing us to
2682         provide an output value indicating whether the input to ToInt32 was finite
2683         (the corresponding methods on Date are actually spec'ed to use ToInteger,
2684         not ToInt32).  This patch partially fixes this in order to remove this
2685         bogus output value, hoewever more work will be require to bring Date
2686         fully up to spec compliance (the constructor is still performing ToInt32
2687         conversions).
2688
2689         * JavaScriptCore.exp:
2690         * runtime/DatePrototype.cpp:
2691         (JSC::fillStructuresUsingTimeArgs):
2692         (JSC::fillStructuresUsingDateArgs):
2693         (JSC::dateProtoFuncSetYear):
2694         * runtime/JSValue.cpp:
2695         (JSC::toInt32):
2696         * runtime/JSValue.h:
2697         (JSC::toUInt32):
2698         (JSC::JSValue::toInt32):
2699         (JSC::JSValue::toUInt32):
2700
2701 2010-09-18  Darin Adler  <darin@apple.com>
2702
2703         First step in fixing Windows build.
2704
2705         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2706         Removed incorrect symbol. The build will probably still fail,
2707         but the failure will tell us what symbol to add.
2708
2709 2010-09-18  Michael Saboff  <msaboff@apple.com>
2710
2711         Reviewed by Gavin Barraclough.
2712
2713         Added code to unroll regular expressions containing ^.
2714         Alternatives that begin with ^ are tagged during parsing
2715         and rolled up in containing sub expression structs.
2716         After parsing, a regular expression flagged as containing
2717         a ^ (a.k.a. BOL) is processed further in optimizeBOL().
2718         A copy of the disjunction is made excluding alternatives that
2719         are rooted with BOL.  The original alternatives are flagged
2720         to only be executed once.  The copy of the other alternatives are
2721         added to the original expression.
2722         In the case that all original alternatives are flagged, there
2723         won't be any looping alternatives.
2724         The JIT generator will emit code accordingly, executing the
2725         original alternatives once and then looping over the
2726         alternatives that aren't anchored with a BOL (if any).
2727         https://bugs.webkit.org/show_bug.cgi?id=45787
2728
2729         * yarr/RegexCompiler.cpp:
2730         (JSC::Yarr::RegexPatternConstructor::assertionBOL):
2731         (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
2732         (JSC::Yarr::RegexPatternConstructor::copyDisjunction):
2733         (JSC::Yarr::RegexPatternConstructor::copyTerm):
2734         (JSC::Yarr::RegexPatternConstructor::optimizeBOL):
2735         (JSC::Yarr::compileRegex):
2736         * yarr/RegexJIT.cpp:
2737         (JSC::Yarr::RegexGenerator::generateDisjunction):
2738         * yarr/RegexPattern.h:
2739         (JSC::Yarr::PatternAlternative::PatternAlternative):
2740         (JSC::Yarr::PatternAlternative::setOnceThrough):
2741         (JSC::Yarr::PatternAlternative::onceThrough):
2742         (JSC::Yarr::PatternDisjunction::PatternDisjunction):
2743         (JSC::Yarr::RegexPattern::RegexPattern):
2744         (JSC::Yarr::RegexPattern::reset):
2745
2746 2010-09-18  Patrick Gansterer  <paroga@paroga.com>
2747
2748         Reviewed by Darin Adler.
2749
2750         Rename Wince files to WinCE
2751         https://bugs.webkit.org/show_bug.cgi?id=37287
2752
2753         * wtf/unicode/Unicode.h:
2754         * wtf/unicode/wince/UnicodeWinCE.cpp: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp.
2755         * wtf/unicode/wince/UnicodeWinCE.h: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.h.
2756         * wtf/unicode/wince/UnicodeWince.cpp: Removed.
2757         * wtf/unicode/wince/UnicodeWince.h: Removed.
2758         * wtf/wince/FastMallocWinCE.h: Copied from JavaScriptCore/wtf/wince/FastMallocWince.h.
2759         * wtf/wince/FastMallocWince.h: Removed.
2760
2761 2010-09-18  Ademar de Souza Reis Jr  <ademar.reis@openbossa.org>
2762
2763         Reviewed by Kenneth Rohde Christiansen.
2764
2765         Enable Platform Strategies on Qt
2766
2767         [Qt] Turn on PLATFORM_STRATEGIES
2768         https://bugs.webkit.org/show_bug.cgi?id=45831
2769
2770         * wtf/Platform.h: Enable Platform Strategies when building QtWebkit
2771
2772 2010-09-17  Oliver Hunt  <oliver@apple.com>
2773
2774         Reviewed by Gavin Barraclough.
2775
2776         Imprecise tracking of variable capture leads to overly pessimistic creation of activations
2777         https://bugs.webkit.org/show_bug.cgi?id=46020
2778
2779         The old logic for track free and captured variables would cause us
2780         to decide we needed an activation in every function along the scope
2781         chain between a variable capture and its declaration.  We now track
2782         captured variables precisely which requires a bit of additional work
2783
2784         The most substantial change is that the parsing routine needs to
2785         be passed the list of function parameters when reparsing a function
2786         as when reparsing we don't parse the function declaration itself only
2787         its body.
2788
2789         * JavaScriptCore.exp:
2790         * parser/JSParser.cpp:
2791         (JSC::JSParser::Scope::Scope):
2792         (JSC::JSParser::Scope::needsFullActivation):
2793            We need to distinguish between use of a feature that requires
2794            an activation and eval so we now get this additional flag.
2795         (JSC::JSParser::Scope::collectFreeVariables):
2796         (JSC::JSParser::Scope::getCapturedVariables):
2797            We can't simply return the list of "capturedVariables" now as
2798            is insufficiently precise, so we compute them instead.
2799         (JSC::JSParser::popScope):
2800         (JSC::jsParse):
2801         (JSC::JSParser::JSParser):
2802         (JSC::JSParser::parseProgram):
2803         (JSC::JSParser::parseWithStatement):
2804         (JSC::JSParser::parseTryStatement):
2805         (JSC::JSParser::parseFunctionInfo):
2806         (JSC::JSParser::parseFunctionDeclaration):
2807         (JSC::JSParser::parseProperty):
2808         (JSC::JSParser::parseMemberExpression):
2809         * parser/JSParser.h:
2810         * parser/Parser.cpp:
2811         (JSC::Parser::parse):
2812         * parser/Parser.h:
2813         (JSC::Parser::parse):
2814         * runtime/Executable.cpp:
2815         (JSC::EvalExecutable::compileInternal):
2816         (JSC::ProgramExecutable::checkSyntax):
2817         (JSC::ProgramExecutable::compileInternal):
2818         (JSC::FunctionExecutable::compileForCallInternal):
2819         (JSC::FunctionExecutable::compileForConstructInternal):
2820         (JSC::FunctionExecutable::reparseExceptionInfo):
2821         (JSC::EvalExecutable::reparseExceptionInfo):
2822         (JSC::FunctionExecutable::fromGlobalCode):
2823            Pass function parameters (if available) to the parser.
2824
2825 2010-09-17  Anders Carlsson  <andersca@apple.com>
2826
2827         Reviewed by Sam Weinig.
2828
2829         Add IsFloatingPoint and IsArithmetic type traits
2830         https://bugs.webkit.org/show_bug.cgi?id=46018
2831
2832         * wtf/TypeTraits.h:
2833         * wtf/TypeTraits.cpp:
2834
2835 2010-09-17  Martin Robinson  <mrobinson@igalia.com>
2836
2837         Reviewed by Oliver Hunt.
2838
2839         [GTK] FontPlatformDataFreeType should use smart pointers to hold its members
2840         https://bugs.webkit.org/show_bug.cgi?id=45917
2841
2842         Added support to PlatformRefPtr for handling HashTableDeletedValue.
2843
2844         * wtf/PlatformRefPtr.h:
2845         (WTF::PlatformRefPtr::PlatformRefPtr): Added a constructor that takes HashTableDeletedValue.
2846         (WTF::PlatformRefPtr::isHashTableDeletedValue): Added.
2847
2848 2010-09-16  Oliver Hunt  <oliver@apple.com>
2849
2850         Reviewed by Geoffrey Garen.
2851
2852         Crash due to timer triggered GC on one heap while another heap is active
2853         https://bugs.webkit.org/show_bug.cgi?id=45932
2854         <rdar://problem/8318446>
2855
2856         The GC timer may trigger for one heap while another heap is active.  This
2857         is safe, but requires us to ensure that we have temporarily associated the
2858         thread's identifierTable with the heap we're collecting on.  Otherwise we
2859         may end up with the identifier tables in an inconsistent state leading to
2860         an eventual crash.
2861
2862         * runtime/Collector.cpp:
2863         (JSC::Heap::allocate):
2864         (JSC::Heap::reset):
2865         (JSC::Heap::collectAllGarbage):
2866            Add assertions to ensure we have the correct identifierTable active
2867            while collecting.
2868         * runtime/GCActivityCallbackCF.cpp:
2869         (JSC::DefaultGCActivityCallbackPlatformData::trigger):
2870            Temporarily make the expected IdentifierTable active
2871         * wtf/WTFThreadData.h:
2872         (JSC::IdentifierTable::remove):
2873            Make it possible to see when IdentifierTable::remove has succeeded
2874         * wtf/text/StringImpl.cpp:
2875         (WTF::StringImpl::~StringImpl):
2876            CRASH if an StringImpl is an Identifier but isn't present in the
2877            active IdentifierTable.  If we get to this state something has
2878            gone wrong and we should just crash immediately.
2879
2880 2010-09-16  Martin Robinson  <mrobinson@igalia.com>
2881
2882         Reviewed by Xan Lopez.
2883
2884         [GTK] Implement dissolveDragImageToFraction
2885         https://bugs.webkit.org/show_bug.cgi?id=45826
2886
2887         * wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose.
2888
2889 2010-09-16  Eric Uhrhane  <ericu@chromium.org>
2890
2891         Reviewed by Jian Li.
2892
2893         Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM.
2894         https://bugs.webkit.org/show_bug.cgi?id=45798
2895
2896         * Configurations/FeatureDefines.xcconfig:
2897
2898 2010-09-15  Oliver Hunt  <oliver@apple.com>
2899
2900         Reviewed by Geoffrey Garen.
2901
2902         Use free variable analysis to improve activation performance
2903         https://bugs.webkit.org/show_bug.cgi?id=45837
2904
2905         Adds free and captured variable tracking to the JS parser.  This
2906         allows us to avoid construction of an activation object in some
2907         cases.  Future patches will make more use of this information to
2908         improve those cases where activations are still needed.
2909
2910         * parser/ASTBuilder.h:
2911         * parser/JSParser.cpp:
2912         (JSC::JSParser::Scope::Scope):
2913         (JSC::JSParser::Scope::declareVariable):
2914         (JSC::JSParser::Scope::useVariable):
2915         (JSC::JSParser::Scope::collectFreeVariables):
2916         (JSC::JSParser::Scope::capturedVariables):
2917         (JSC::JSParser::ScopeRef::ScopeRef):
2918         (JSC::JSParser::ScopeRef::operator->):
2919         (JSC::JSParser::ScopeRef::index):
2920         (JSC::JSParser::currentScope):
2921         (JSC::JSParser::pushScope):
2922         (JSC::JSParser::popScope):
2923         (JSC::JSParser::parseProgram):
2924         (JSC::JSParser::parseVarDeclarationList):
2925         (JSC::JSParser::parseConstDeclarationList):
2926         (JSC::JSParser::parseTryStatement):
2927         (JSC::JSParser::parseFormalParameters):
2928         (JSC::JSParser::parseFunctionInfo):
2929         (JSC::JSParser::parseFunctionDeclaration):
2930         (JSC::JSParser::parsePrimaryExpression):
2931         * parser/Nodes.cpp:
2932         (JSC::ScopeNodeData::ScopeNodeData):
2933         (JSC::ScopeNode::ScopeNode):
2934         (JSC::ProgramNode::ProgramNode):
2935         (JSC::ProgramNode::create):
2936         (JSC::EvalNode::EvalNode):
2937         (JSC::EvalNode::create):
2938         (JSC::FunctionBodyNode::FunctionBodyNode):
2939         (JSC::FunctionBodyNode::create):
2940         * parser/Nodes.h:
2941         (JSC::ScopeNode::needsActivation):
2942         (JSC::ScopeNode::hasCapturedVariables):
2943         * parser/Parser.cpp:
2944         (JSC::Parser::didFinishParsing):
2945         * parser/Parser.h:
2946         (JSC::Parser::parse):
2947         * parser/SyntaxChecker.h:
2948         * runtime/Executable.cpp:
2949         (JSC::EvalExecutable::compileInternal):
2950         (JSC::ProgramExecutable::compileInternal):
2951         (JSC::FunctionExecutable::compileForCallInternal):
2952         (JSC::FunctionExecutable::compileForConstructInternal):
2953         * runtime/Executable.h:
2954         (JSC::ScriptExecutable::needsActivation):
2955         (JSC::ScriptExecutable::recordParse):
2956
2957 2010-09-14  Hyung Song  <beergun@company100.net>
2958
2959         Reviewed by Kent Tamura.
2960
2961         [BREWMP] Add IMemGroup and IMemSpace to OwnPtr type.
2962         https://bugs.webkit.org/show_bug.cgi?id=44764
2963
2964         * wtf/OwnPtrCommon.h:
2965         * wtf/brew/OwnPtrBrew.cpp:
2966         (WTF::deleteOwnedPtr):
2967
2968 2010-09-14  Darin Adler  <darin@apple.com>
2969
2970         Reviewed by Geoffrey Garen.
2971
2972         Sort with non-numeric custom sort function fails on array with length but no values
2973         https://bugs.webkit.org/show_bug.cgi?id=45781
2974
2975         * runtime/JSArray.cpp:
2976         (JSC::JSArray::sort): Replaced early exit for an array of length zero to instead
2977         exit for any array without values, even if it has a non-0 length.
2978
2979 2010-09-14  Steve Falkenburg  <sfalken@apple.com>
2980
2981         Windows production build fix.
2982         Roll out r65143.
2983
2984         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2985
2986 2010-09-14  Kwang Yul Seo  <skyul@company100.net>
2987
2988         Reviewed by Darin Adler.
2989
2990         Share UnicodeMacrosFromICU.h
2991         https://bugs.webkit.org/show_bug.cgi?id=45710
2992
2993         glib, qt4 and wince use the same macros from ICU.
2994         Remove the code duplication and use the same header file.
2995
2996         * wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h.
2997         * wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed.
2998         * wtf/unicode/qt4/UnicodeQt4.h:
2999         * wtf/unicode/wince/UnicodeWince.h:
3000
3001 2010-09-13  Darin Adler  <darin@apple.com>
3002
3003         Reviewed by Adam Barth.
3004
3005         Preparation for eliminating deprecatedParseURL
3006         https://bugs.webkit.org/show_bug.cgi?id=45695
3007
3008         * wtf/text/WTFString.h: Added isAllSpecialCharacters, moved here from
3009         the HTML tree builder.
3010
3011 2010-09-13  Darin Fisher  <darin@chromium.org>
3012
3013         Reviewed by David Levin.
3014
3015         Add option to conditionally compile smooth scrolling support.
3016         https://bugs.webkit.org/show_bug.cgi?id=45689
3017
3018         ENABLE(SMOOTH_SCROLLING) is disabled by default for all platforms.
3019
3020         * wtf/Platform.h:
3021
3022 2010-09-13  Adam Roben  <aroben@apple.com>
3023
3024         Copy JavaScriptCore's generated sources to the right directory
3025
3026         * JavaScriptCore.vcproj/JavaScriptCore.make: Fixed typo.
3027
3028 2010-09-13  Kwang Yul Seo  <skyul@company100.net>
3029
3030         Reviewed by Kent Tamura.
3031
3032         [BREWMP] Don't call _msize
3033         https://bugs.webkit.org/show_bug.cgi?id=45556
3034
3035         Because Brew MP uses its own memory allocator, it is not correct to use
3036         _msize in fastMallocSize. Add !PLATFORM(BREWMP) guard.
3037
3038         * wtf/FastMalloc.cpp:
3039         (WTF::fastMallocSize):
3040
3041 2010-09-11  Simon Hausmann  <simon.hausmann@nokia.com>
3042
3043         Reviewed by Andreas Kling.
3044
3045         [Qt] V8 port: webcore project files changes
3046         https://bugs.webkit.org/show_bug.cgi?id=45141
3047
3048         * JavaScriptCore.pro: Moved wtf specific files to wtf.pri,
3049         so that they can also be used from WebCore.pro for v8 builds.
3050         * wtf/wtf.pri: Added.
3051
3052 2010-09-10  Fridrich Strba  <fridrich.strba@bluewin.ch>
3053
3054         Reviewed by Andreas Kling.
3055
3056         Add a define missing when building with glib unicode backend
3057         https://bugs.webkit.org/show_bug.cgi?id=45544
3058
3059         * wtf/unicode/glib/UnicodeMacrosFromICU.h:
3060
3061 2010-09-10  Stephanie Lewis  <slewis@apple.com>
3062
3063         Reviewed by Alexey Proskuryakov.
3064         
3065         Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know 
3066         about the JIT and other implementation details of JavaScriptCore.  Necessary 
3067         to fix PPC build.
3068         
3069         https://bugs.webkit.org/show_bug.cgi?id=45528
3070
3071         * JavaScriptCore.exp:
3072         * JavaScriptCore.xcodeproj/project.pbxproj:
3073         * runtime/MemoryStatistics.cpp: Added.
3074         (JSC::memoryStatistics):
3075         * runtime/MemoryStatistics.h: Added.
3076
3077 2010-09-09  Michael Saboff  <msaboff@apple.com>
3078
3079         Reviewed by Gavin Barraclough.
3080
3081         Added a regular expression tracing facility.  This tracing is connected
3082         to jsc.  Every compiled regular expression object is added to a list.
3083         When the process exits, each regular expression dumps its pattern,
3084         JIT address, number of times it was executed and the number of matches.
3085         This tracing is controlled by the macro ENABLE_REGEXP_TRACING in
3086         wtf/Platform.h.
3087         https://bugs.webkit.org/show_bug.cgi?id=45401
3088
3089         * JavaScriptCore.exp:
3090         * jsc.cpp:
3091         (runWithScripts):
3092         * runtime/JSGlobalData.cpp:
3093         (JSC::JSGlobalData::JSGlobalData):
3094         (JSC::JSGlobalData::~JSGlobalData):
3095         (JSC::JSGlobalData::addRegExpToTrace):
3096         (JSC::JSGlobalData::dumpRegExpTrace):
3097         * runtime/JSGlobalData.h:
3098         * runtime/RegExp.cpp:
3099         (JSC::RegExp::RegExp):
3100         (JSC::RegExp::create):
3101         (JSC::RegExp::match):
3102         * runtime/RegExp.h:
3103         * wtf/Platform.h:
3104         * yarr/RegexJIT.h:
3105         (JSC::Yarr::RegexCodeBlock::getAddr):
3106
3107 2010-09-09  John Therrell  <jtherrell@apple.com>
3108
3109         32-bit build fix.
3110
3111         * jit/ExecutableAllocator.cpp:
3112         (JSC::ExecutableAllocator::committedByteCount):
3113
3114 2010-09-09  John Therrell  <jtherrell@apple.com>
3115
3116         Reviewed by Alexey Proskuryakov.
3117
3118         Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes
3119         https://bugs.webkit.org/show_bug.cgi?id=45134
3120
3121         Added thread-safe committed byte counting and reporting functionality to RegisterFile and 
3122         ExecutableAllocator.
3123
3124         * JavaScriptCore.exp:
3125         Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes.
3126         
3127         * interpreter/RegisterFile.cpp:
3128         (JSC::registerFileStatisticsMutex):
3129         Added function which returns a static Mutex used for locking during read/write access to
3130         static committed byte count variable.
3131         (JSC::RegisterFile::~RegisterFile):
3132         Added call to addToStatistics since memory is decommitted here.
3133         (JSC::RegisterFile::releaseExcessCapacity):
3134         Added call to addToStatistics since memory is decommitted here.
3135         (JSC::RegisterFile::initializeThreading):
3136         Added function which calls registerFileStatisticsMutex().
3137         (JSC::RegisterFile::committedByteCount):
3138         Added function which returns the current committed byte count for RegisterFile.
3139         (JSC::RegisterFile::addToCommittedByteCount):
3140         Added function which updates committed byte count.
3141         
3142         * interpreter/RegisterFile.h:
3143         (JSC::RegisterFile::RegisterFile):
3144         Added call to addToStatistics since memory is committed here.
3145         (JSC::RegisterFile::grow):
3146         Added call to addToStatistics since memory is committed here.
3147         
3148         * jit/ExecutableAllocator.h:
3149         Added function prototype for public static function committedByteCount().
3150         
3151         * jit/ExecutableAllocatorFixedVMPool.cpp:
3152         (JSC::FixedVMPoolAllocator::release):
3153         Added call to addToStatistics since memory is decommitted here.
3154         (JSC::FixedVMPoolAllocator::reuse):
3155         Added call to addToStatistics since memory is committed here.
3156         (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
3157         Added function which updates committed byte count.
3158         (JSC::ExecutableAllocator::committedByteCount):
3159         Added function which returns the current committed byte count for ExecutableAllocator.
3160         
3161         * runtime/InitializeThreading.cpp:
3162         (JSC::initializeThreadingOnce):
3163         Added call to RegisterFile::initializeThreading.
3164
3165 2010-09-09  Mark Rowe  <mrowe@apple.com>
3166
3167         Reviewed by Oliver Hunt.
3168
3169         <http://webkit.org/b/45502> JSObjectSetPrivateProperty does not handle NULL values as it claims
3170
3171         * API/JSObjectRef.cpp:
3172         (JSObjectSetPrivateProperty): Don't call toJS if we have a NULL value as that will cause an assertion
3173         failure. Instead map NULL directly to the null JSValue.
3174         * API/tests/testapi.c:
3175         (main): Add test coverage for the NULL value case.
3176
3177 2010-09-09  Csaba Osztrogonác  <ossy@webkit.org>
3178
3179         Reviewed by Gavin Barraclough.
3180
3181         [Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler
3182         https://bugs.webkit.org/show_bug.cgi?id=29268
3183
3184         * wtf/Platform.h: Enable JSVALUE32_64 for Qt/Windows/MinGW, because it works now.
3185
3186 2010-09-08  Zoltan Herczeg  <zherczeg@webkit.org>
3187
3188         Reviewed by Darin Adler.
3189
3190         Removing doneSemicolon label in the lexer
3191         https://bugs.webkit.org/show_bug.cgi?id=45289
3192
3193         As a side effect of moving the multiline comment parsing
3194         to a separate function, an opportunity raised to simplify
3195         the single line comment parsing, and removing doneSemicolon
3196         label. Slight performance increase on --parse-only
3197         tests (from 32.8ms to 31.5ms)
3198
3199         * parser/Lexer.cpp:
3200         (JSC::Lexer::lex):
3201
3202 2010-09-08  Xan Lopez  <xlopez@igalia.com>
3203
3204         Reviewed by Alexey Proskuryakov.
3205
3206         Remove accessor for private member variable in JSParser
3207         https://bugs.webkit.org/show_bug.cgi?id=45378
3208
3209         m_token is private to JSParser, so it does not seem to be useful
3210         to have an accessor for it. On top of that, the file was both
3211         using the accessor and directly accessing the member variable,
3212         only one style should be used.
3213
3214 2010-09-08  Csaba Osztrogonác  <ossy@webkit.org>
3215
3216         Reviewed by Oliver Hunt.
3217
3218         [Qt] REGRESSION(63348): jsc is broken
3219         https://bugs.webkit.org/show_bug.cgi?id=42818
3220
3221         Need fastcall conventions on Qt/Win/MinGW.
3222         Based on patches of Gavin Barraclough: r63947 and r63948.
3223
3224         * jit/JITStubs.cpp:
3225         * jit/JITStubs.h:
3226
3227 2010-09-08  Robert Hogan  <robert@webkit.org>
3228
3229         Reviewed by Antonio Gomes.
3230
3231         Remove some unnecessary duplicate calls to string functions
3232
3233         https://bugs.webkit.org/show_bug.cgi?id=45314
3234
3235         * wtf/text/WTFString.cpp:
3236         (WTF::String::format):
3237
3238 2010-09-08  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3239
3240         Reviewed by Andreas Kling.
3241
3242         Re-Disable JIT for MSVC 64bit to fix the build on this compiler.
3243         https://bugs.webkit.org/show_bug.cgi?id=45382
3244
3245         It was enabled in the cleanup made in r64176, though it is still
3246         not implemented.
3247
3248         * wtf/Platform.h:
3249
3250 2010-09-08  Martin Robinson  <mrobinson@igalia.com>
3251
3252         Reviewed by Xan Lopez.
3253
3254         [GTK] Need a WebSocket implementation
3255         https://bugs.webkit.org/show_bug.cgi?id=45197
3256
3257         Add a GIO-based WebSocket implementation.
3258
3259         * wtf/gobject/GRefPtr.cpp: Added PlatformRefPtr support for GSource.
3260         (WTF::refPlatformPtr):
3261         (WTF::derefPlatformPtr):
3262         * wtf/gobject/GRefPtr.h: Added new template specialization declarations.
3263         * wtf/gobject/GTypedefs.h: Add some more GLib/GIO forward declarations.
3264
3265 2010-08-30  Maciej Stachowiak  <mjs@apple.com>
3266
3267         Reviewed by Darin Adler.
3268
3269         Handle MediaQueryExp memory management exclusively with smart pointers
3270         https://bugs.webkit.org/show_bug.cgi?id=44874
3271         
3272         Implemented a non-copying sort function to make it possible to sort a Vector
3273         of OwnPtrs (which cannot be copied). This is required for the above.
3274
3275         * wtf/NonCopyingSort.h: Added.
3276         (WTF::nonCopyingSort): It's secretly heapsort.
3277         (WTF::heapSort): heapsort implementation.
3278         (WTF::siftDown): Helper function for heapsort.
3279         (WTF::heapify): ditto
3280
3281         Adjust build systems.
3282         
3283         * GNUmakefile.am:
3284         * JavaScriptCore.gypi:
3285         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3286         * JavaScriptCore.xcodeproj/project.pbxproj:
3287
3288 2010-09-08  Zoltan Herczeg  <zherczeg@webkit.org>
3289
3290         Reviewed by Darin Adler.
3291
3292         Refactoring multiline comments in the lexer
3293         https://bugs.webkit.org/show_bug.cgi?id=45289
3294
3295         MultiLine comment parsing is moved to a separate function.
3296
3297         Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms)
3298         SunSpider reports no change (from 523.1ms to 521.2ms).
3299
3300         * parser/Lexer.cpp:
3301         (JSC::Lexer::parseMultilineComment):
3302         (JSC::Lexer::lex):
3303         * parser/Lexer.h:
3304
3305 2010-09-07  James Robinson  <jamesr@chromium.org>
3306
3307         Compile fix attempt for windows.
3308
3309         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3310
3311 2010-09-07  Mihai Parparita  <mihaip@chromium.org>
3312
3313         Reviewed by James Robinson.
3314
3315         Fix Windows build after r66936
3316         https://bugs.webkit.org/show_bug.cgi?id=45348
3317
3318         Add symbol names that were missing from r66936.
3319
3320         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3321
3322 2010-09-07  Mihai Parparita  <mihaip@chromium.org>
3323
3324         Reviewed by Oliver Hunt.
3325
3326         pushState and replaceState do not clone RegExp objects correctly
3327         https://bugs.webkit.org/show_bug.cgi?id=44718
3328         
3329         Move internal representation of JSC::RegExp (which depends on wether
3330         YARR and YARR_JIT is enabled) into RegExpRepresentation which can live
3331         in the implementation only. This makes it feasible to use RegExp in
3332         WebCore without bringing in all of YARR.
3333
3334         * JavaScriptCore.exp: Export RegExp and RegExpObject functions that are
3335         needed inside WebCore's JSC bindings.
3336         * runtime/RegExp.cpp:
3337         (JSC::RegExpRepresentation::~RegExpRepresentation):
3338         (JSC::RegExp::RegExp):
3339         (JSC::RegExp::~RegExp):
3340         (JSC::RegExp::compile):
3341         (JSC::RegExp::match):
3342         * runtime/RegExp.h:
3343
3344 2010-09-07  Anders Carlsson  <andersca@apple.com>
3345
3346         Reviewed by Darin Adler.
3347
3348         <rdar://problem/8381749> -Wcast-align warning emitted when building with clang
3349
3350         Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
3351
3352         * Configurations/Base.xcconfig:
3353
3354 2010-09-07  Zoltan Horvath  <zoltan@webkit.org>
3355
3356         Reviewed by Darin Adler.
3357
3358         REGRESSION(66741): Undefined pthread macros
3359         https://bugs.webkit.org/show_bug.cgi?id=45246
3360
3361         PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux, 
3362         but used in a statement. Add an additional check to test this.
3363
3364         * wtf/FastMalloc.cpp:
3365         (WTF::TCMalloc_PageHeap::initializeScavenger):
3366
3367 2010-09-06  Oliver Hunt  <oliver@apple.com>
3368
3369         Windows build fix
3370
3371 2010-09-05  Oliver Hunt  <oliver@apple.com>
3372
3373         Reviewed by Sam Weinig.
3374
3375         SerializedScriptValue needs to use a flat storage mechanism
3376         https://bugs.webkit.org/show_bug.cgi?id=45244
3377
3378         Export JSArray::put
3379
3380         * JavaScriptCore.exp:
3381
3382 2010-09-06  Chao-ying Fu  <fu@mips.com>
3383
3384         Reviewed by Oliver Hunt.
3385
3386         Support JSVALUE32_64 on MIPS
3387         https://bugs.webkit.org/show_bug.cgi?id=43999
3388
3389         Add missing functions to support JSVALUE32_64 on MIPS.
3390         Remove JSVALUE32 as the default for MIPS.
3391
3392         * assembler/MIPSAssembler.h:
3393         (JSC::MIPSAssembler::divd):
3394         (JSC::MIPSAssembler::mthc1):
3395         (JSC::MIPSAssembler::cvtwd):
3396         * assembler/MacroAssemblerMIPS.h:
3397         (JSC::MacroAssemblerMIPS::neg32):
3398         (JSC::MacroAssemblerMIPS::branchOr32):
3399         (JSC::MacroAssemblerMIPS::set8):
3400         (JSC::MacroAssemblerMIPS::loadDouble):
3401         (JSC::MacroAssemblerMIPS::divDouble):
3402         (JSC::MacroAssemblerMIPS::convertInt32ToDouble):
3403         (JSC::MacroAssemblerMIPS::branchDouble):
3404         (JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32):
3405         (JSC::MacroAssemblerMIPS::zeroDouble):
3406         * jit/JIT.h:
3407         * jit/JITOpcodes32_64.cpp:
3408         (JSC::JIT::privateCompileCTINativeCall):
3409         * jit/JITPropertyAccess32_64.cpp:
3410         (JSC::JIT::privateCompilePutByIdTransition):
3411         * jit/JITStubs.cpp:
3412         (JSC::JITThunks::JITThunks):
3413         * jit/JITStubs.h:
3414         * wtf/Platform.h:
3415
3416 2010-09-06  Robert Hogan  <robert@webkit.org>
3417
3418         Unreviewed, compile fix.
3419
3420         Fix compile failure in r66843
3421
3422         Revert to original patch in bugzilla. Leave bug open for
3423         discussion on potential removal of double utf8 conversion.
3424
3425         https://bugs.webkit.org/show_bug.cgi?id=45240
3426
3427         * wtf/text/WTFString.cpp:
3428         (WTF::String::format):
3429
3430 2010-09-06  Robert Hogan  <robert@webkit.org>
3431
3432         Reviewed by Andreas Kling.
3433
3434         [Qt] utf8 encoding of console() messages
3435
3436         Unskip:
3437         http/tests/security/xssAuditor/embed-tag-null-char.html
3438         http/tests/security/xssAuditor/object-embed-tag-null-char.html
3439
3440         Both tests failed because Qt's implementation of String::format()
3441         is casting a utf8 result to String, which assumes latin1 in
3442         its constructor. So instead of casting a QString to a String, use
3443         StringImpl::create() instead. Unfortunately, this involves a lot
3444         of extra casts but the end result is correct.
3445
3446         https://bugs.webkit.org/show_bug.cgi?id=45240
3447
3448         * wtf/text/WTFString.cpp:
3449         (WTF::String::format):
3450
3451 2010-09-03  Alexey Proskuryakov  <ap@apple.com>
3452
3453         Reviewed by Darin Adler.
3454
3455         https://bugs.webkit.org/show_bug.cgi?id=45135
3456         <rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data
3457
3458         * wtf/FastMalloc.cpp:
3459         (WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex
3460         regardless of platform default, so that we can assert that it's held (this is for platforms
3461         that don't have libdispatch).
3462         (WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look
3463         at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock
3464         is held.
3465         (WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before
3466         manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we
3467         can make unbalanced calls to dispatch_resume().
3468
3469 2010-09-03  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
3470
3471         Reviewed by Martin Robinson.
3472
3473         [EFL] Regression (66531) Build break with Glib Support
3474         https://bugs.webkit.org/show_bug.cgi?id=45011
3475
3476         Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory
3477         since when glib is enabled, EFL port needs it, too.
3478
3479         * CMakeListsEfl.txt: Include gobject directory to find new header
3480         file.
3481         * GNUmakefile.am: Ditto.
3482         * wtf/CMakeListsEfl.txt: Ditto.
3483         * wtf/Platform.h: Include header if port is EFL and glib support is
3484         enabled.
3485         * wtf/gtk/GtkTypedefs.h: Removed.
3486         * wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now
3487         guarded by PLATFORM(GTK).
3488
3489 2010-09-03  Csaba Osztrogonác  <ossy@webkit.org>
3490
3491         Reviewed by Simon Hausmann.
3492
3493         Fix warning in wtf/ByteArray.h
3494         https://bugs.webkit.org/show_bug.cgi?id=44672
3495
3496         * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
3497
3498 2010-09-02  Adam Barth  <abarth@webkit.org>
3499
3500         Reviewed by Eric Seidel.
3501
3502         Actually parse a URL from ParsedURL
3503         https://bugs.webkit.org/show_bug.cgi?id=45080
3504
3505         This patch only handles standard URLs.  At some point we'll need to
3506         distinguish between standard URLs and other kinds of URLs.
3507
3508         * wtf/url/api/ParsedURL.cpp:
3509         (WTF::ParsedURL::ParsedURL):
3510
3511 2010-09-02  Adam Barth  <abarth@webkit.org>
3512
3513         Reviewed by Eric Seidel.
3514
3515         Add ParsedURL and URLString to WTFURL API
3516         https://bugs.webkit.org/show_bug.cgi?id=45078
3517
3518         Currently there's no actual URL parsing going on, but this patch is a
3519         start to sketching out the API.
3520
3521         * JavaScriptCore.xcodeproj/project.pbxproj:
3522         * wtf/url/api/ParsedURL.cpp: Added.
3523         (WTF::ParsedURL::ParsedURL):
3524         (WTF::ParsedURL::scheme):
3525         (WTF::ParsedURL::username):
3526         (WTF::ParsedURL::password):
3527         (WTF::ParsedURL::host):
3528         (WTF::ParsedURL::port):
3529         (WTF::ParsedURL::path):
3530         (WTF::ParsedURL::query):
3531         (WTF::ParsedURL::fragment):
3532         (WTF::ParsedURL::segment):
3533         * wtf/url/api/ParsedURL.h: Added.
3534         (WTF::ParsedURL::spec):
3535         * wtf/url/api/URLString.h: Added.
3536         (WTF::URLString::URLString):
3537         (WTF::URLString::string):
3538
3539 2010-09-02  Adam Barth  <abarth@webkit.org>
3540
3541         Reviewed by Eric Seidel.
3542
3543         Add WTFURL to the JavaScriptCore build on Mac
3544         https://bugs.webkit.org/show_bug.cgi?id=45075
3545
3546         Building code is good.
3547
3548         * JavaScriptCore.xcodeproj/project.pbxproj:
3549
3550 2010-09-02  Alexey Proskuryakov  <ap@apple.com>
3551
3552         Reviewed by Oliver Hunt.
3553
3554         https://bugs.webkit.org/show_bug.cgi?id=43230
3555         <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser
3556
3557         One can't delete a ThreadSpecific object that has data in it. It's not even possible to
3558         enumerate data objects in all threads, much less destroy them from a thread that's destroying
3559         the ThreadSpecific.
3560
3561         * parser/JSParser.cpp:
3562         (JSC::JSParser::JSParser):
3563         * runtime/JSGlobalData.h: 
3564         * wtf/WTFThreadData.cpp:
3565         (WTF::WTFThreadData::WTFThreadData):
3566         * wtf/WTFThreadData.h:
3567         (WTF::WTFThreadData::approximatedStackStart):
3568         Moved stack guard tracking from JSGlobalData to WTFThreadData.
3569
3570         * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't
3571         ever face a situation where we'd want to delete a ThreadSpecific object.
3572
3573 2010-09-01  Gavin Barraclough  <barraclough@apple.com>
3574
3575         Rubber stamped by Oliver Hunt.
3576
3577         Ecma-262 15.11.1.1 states that if the argument is undefined then an
3578         Error object's message property should be set to the empty string.
3579
3580         * runtime/ErrorInstance.cpp:
3581         (JSC::ErrorInstance::ErrorInstance):
3582         (JSC::ErrorInstance::create):
3583         * runtime/ErrorInstance.h:
3584         * runtime/ErrorPrototype.cpp:
3585         (JSC::ErrorPrototype::ErrorPrototype):
3586
3587 2010-08-31  Darin Adler  <darin@apple.com>