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