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