2010-08-30 Maciej Stachowiak <mjs@apple.com>
[WebKit.git] / JavaScriptCore / ChangeLog
1 2010-08-30  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by Darin Adler.
4
5         Handle MediaQueryExp memory management exclusively with smart pointers
6         https://bugs.webkit.org/show_bug.cgi?id=44874
7         
8         Implemented a non-copying sort function to make it possible to sort a Vector
9         of OwnPtrs (which cannot be copied). This is required for the above.
10
11         * wtf/NonCopyingSort.h: Added.
12         (WTF::nonCopyingSort): It's secretly heapsort.
13         (WTF::heapSort): heapsort implementation.
14         (WTF::siftDown): Helper function for heapsort.
15         (WTF::heapify): ditto
16
17         Adjust build systems.
18         
19         * GNUmakefile.am:
20         * JavaScriptCore.gypi:
21         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
22         * JavaScriptCore.xcodeproj/project.pbxproj:
23
24 2010-09-08  Zoltan Herczeg  <zherczeg@webkit.org>
25
26         Reviewed by Darin Adler.
27
28         Refactoring multiline comments in the lexer
29         https://bugs.webkit.org/show_bug.cgi?id=45289
30
31         MultiLine comment parsing is moved to a separate function.
32
33         Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms)
34         SunSpider reports no change (from 523.1ms to 521.2ms).
35
36         * parser/Lexer.cpp:
37         (JSC::Lexer::parseMultilineComment):
38         (JSC::Lexer::lex):
39         * parser/Lexer.h:
40
41 2010-09-07  James Robinson  <jamesr@chromium.org>
42
43         Compile fix attempt for windows.
44
45         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
46
47 2010-09-07  Mihai Parparita  <mihaip@chromium.org>
48
49         Reviewed by James Robinson.
50
51         Fix Windows build after r66936
52         https://bugs.webkit.org/show_bug.cgi?id=45348
53
54         Add symbol names that were missing from r66936.
55
56         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
57
58 2010-09-07  Mihai Parparita  <mihaip@chromium.org>
59
60         Reviewed by Oliver Hunt.
61
62         pushState and replaceState do not clone RegExp objects correctly
63         https://bugs.webkit.org/show_bug.cgi?id=44718
64         
65         Move internal representation of JSC::RegExp (which depends on wether
66         YARR and YARR_JIT is enabled) into RegExpRepresentation which can live
67         in the implementation only. This makes it feasible to use RegExp in
68         WebCore without bringing in all of YARR.
69
70         * JavaScriptCore.exp: Export RegExp and RegExpObject functions that are
71         needed inside WebCore's JSC bindings.
72         * runtime/RegExp.cpp:
73         (JSC::RegExpRepresentation::~RegExpRepresentation):
74         (JSC::RegExp::RegExp):
75         (JSC::RegExp::~RegExp):
76         (JSC::RegExp::compile):
77         (JSC::RegExp::match):
78         * runtime/RegExp.h:
79
80 2010-09-07  Anders Carlsson  <andersca@apple.com>
81
82         Reviewed by Darin Adler.
83
84         <rdar://problem/8381749> -Wcast-align warning emitted when building with clang
85
86         Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
87
88         * Configurations/Base.xcconfig:
89
90 2010-09-07  Zoltan Horvath  <zoltan@webkit.org>
91
92         Reviewed by Darin Adler.
93
94         REGRESSION(66741): Undefined pthread macros
95         https://bugs.webkit.org/show_bug.cgi?id=45246
96
97         PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux, 
98         but used in a statement. Add an additional check to test this.
99
100         * wtf/FastMalloc.cpp:
101         (WTF::TCMalloc_PageHeap::initializeScavenger):
102
103 2010-09-06  Oliver Hunt  <oliver@apple.com>
104
105         Windows build fix
106
107 2010-09-05  Oliver Hunt  <oliver@apple.com>
108
109         Reviewed by Sam Weinig.
110
111         SerializedScriptValue needs to use a flat storage mechanism
112         https://bugs.webkit.org/show_bug.cgi?id=45244
113
114         Export JSArray::put
115
116         * JavaScriptCore.exp:
117
118 2010-09-06  Chao-ying Fu  <fu@mips.com>
119
120         Reviewed by Oliver Hunt.
121
122         Support JSVALUE32_64 on MIPS
123         https://bugs.webkit.org/show_bug.cgi?id=43999
124
125         Add missing functions to support JSVALUE32_64 on MIPS.
126         Remove JSVALUE32 as the default for MIPS.
127
128         * assembler/MIPSAssembler.h:
129         (JSC::MIPSAssembler::divd):
130         (JSC::MIPSAssembler::mthc1):
131         (JSC::MIPSAssembler::cvtwd):
132         * assembler/MacroAssemblerMIPS.h:
133         (JSC::MacroAssemblerMIPS::neg32):
134         (JSC::MacroAssemblerMIPS::branchOr32):
135         (JSC::MacroAssemblerMIPS::set8):
136         (JSC::MacroAssemblerMIPS::loadDouble):
137         (JSC::MacroAssemblerMIPS::divDouble):
138         (JSC::MacroAssemblerMIPS::convertInt32ToDouble):
139         (JSC::MacroAssemblerMIPS::branchDouble):
140         (JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32):
141         (JSC::MacroAssemblerMIPS::zeroDouble):
142         * jit/JIT.h:
143         * jit/JITOpcodes32_64.cpp:
144         (JSC::JIT::privateCompileCTINativeCall):
145         * jit/JITPropertyAccess32_64.cpp:
146         (JSC::JIT::privateCompilePutByIdTransition):
147         * jit/JITStubs.cpp:
148         (JSC::JITThunks::JITThunks):
149         * jit/JITStubs.h:
150         * wtf/Platform.h:
151
152 2010-09-06  Robert Hogan  <robert@webkit.org>
153
154         Unreviewed, compile fix.
155
156         Fix compile failure in r66843
157
158         Revert to original patch in bugzilla. Leave bug open for
159         discussion on potential removal of double utf8 conversion.
160
161         https://bugs.webkit.org/show_bug.cgi?id=45240
162
163         * wtf/text/WTFString.cpp:
164         (WTF::String::format):
165
166 2010-09-06  Robert Hogan  <robert@webkit.org>
167
168         Reviewed by Andreas Kling.
169
170         [Qt] utf8 encoding of console() messages
171
172         Unskip:
173         http/tests/security/xssAuditor/embed-tag-null-char.html
174         http/tests/security/xssAuditor/object-embed-tag-null-char.html
175
176         Both tests failed because Qt's implementation of String::format()
177         is casting a utf8 result to String, which assumes latin1 in
178         its constructor. So instead of casting a QString to a String, use
179         StringImpl::create() instead. Unfortunately, this involves a lot
180         of extra casts but the end result is correct.
181
182         https://bugs.webkit.org/show_bug.cgi?id=45240
183
184         * wtf/text/WTFString.cpp:
185         (WTF::String::format):
186
187 2010-09-03  Alexey Proskuryakov  <ap@apple.com>
188
189         Reviewed by Darin Adler.
190
191         https://bugs.webkit.org/show_bug.cgi?id=45135
192         <rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data
193
194         * wtf/FastMalloc.cpp:
195         (WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex
196         regardless of platform default, so that we can assert that it's held (this is for platforms
197         that don't have libdispatch).
198         (WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look
199         at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock
200         is held.
201         (WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before
202         manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we
203         can make unbalanced calls to dispatch_resume().
204
205 2010-09-03  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
206
207         Reviewed by Martin Robinson.
208
209         [EFL] Regression (66531) Build break with Glib Support
210         https://bugs.webkit.org/show_bug.cgi?id=45011
211
212         Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory
213         since when glib is enabled, EFL port needs it, too.
214
215         * CMakeListsEfl.txt: Include gobject directory to find new header
216         file.
217         * GNUmakefile.am: Ditto.
218         * wtf/CMakeListsEfl.txt: Ditto.
219         * wtf/Platform.h: Include header if port is EFL and glib support is
220         enabled.
221         * wtf/gtk/GtkTypedefs.h: Removed.
222         * wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now
223         guarded by PLATFORM(GTK).
224
225 2010-09-03  Csaba Osztrogonác  <ossy@webkit.org>
226
227         Reviewed by Simon Hausmann.
228
229         Fix warning in wtf/ByteArray.h
230         https://bugs.webkit.org/show_bug.cgi?id=44672
231
232         * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
233
234 2010-09-02  Adam Barth  <abarth@webkit.org>
235
236         Reviewed by Eric Seidel.
237
238         Actually parse a URL from ParsedURL
239         https://bugs.webkit.org/show_bug.cgi?id=45080
240
241         This patch only handles standard URLs.  At some point we'll need to
242         distinguish between standard URLs and other kinds of URLs.
243
244         * wtf/url/api/ParsedURL.cpp:
245         (WTF::ParsedURL::ParsedURL):
246
247 2010-09-02  Adam Barth  <abarth@webkit.org>
248
249         Reviewed by Eric Seidel.
250
251         Add ParsedURL and URLString to WTFURL API
252         https://bugs.webkit.org/show_bug.cgi?id=45078
253
254         Currently there's no actual URL parsing going on, but this patch is a
255         start to sketching out the API.
256
257         * JavaScriptCore.xcodeproj/project.pbxproj:
258         * wtf/url/api/ParsedURL.cpp: Added.
259         (WTF::ParsedURL::ParsedURL):
260         (WTF::ParsedURL::scheme):
261         (WTF::ParsedURL::username):
262         (WTF::ParsedURL::password):
263         (WTF::ParsedURL::host):
264         (WTF::ParsedURL::port):
265         (WTF::ParsedURL::path):
266         (WTF::ParsedURL::query):
267         (WTF::ParsedURL::fragment):
268         (WTF::ParsedURL::segment):
269         * wtf/url/api/ParsedURL.h: Added.
270         (WTF::ParsedURL::spec):
271         * wtf/url/api/URLString.h: Added.
272         (WTF::URLString::URLString):
273         (WTF::URLString::string):
274
275 2010-09-02  Adam Barth  <abarth@webkit.org>
276
277         Reviewed by Eric Seidel.
278
279         Add WTFURL to the JavaScriptCore build on Mac
280         https://bugs.webkit.org/show_bug.cgi?id=45075
281
282         Building code is good.
283
284         * JavaScriptCore.xcodeproj/project.pbxproj:
285
286 2010-09-02  Alexey Proskuryakov  <ap@apple.com>
287
288         Reviewed by Oliver Hunt.
289
290         https://bugs.webkit.org/show_bug.cgi?id=43230
291         <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser
292
293         One can't delete a ThreadSpecific object that has data in it. It's not even possible to
294         enumerate data objects in all threads, much less destroy them from a thread that's destroying
295         the ThreadSpecific.
296
297         * parser/JSParser.cpp:
298         (JSC::JSParser::JSParser):
299         * runtime/JSGlobalData.h: 
300         * wtf/WTFThreadData.cpp:
301         (WTF::WTFThreadData::WTFThreadData):
302         * wtf/WTFThreadData.h:
303         (WTF::WTFThreadData::approximatedStackStart):
304         Moved stack guard tracking from JSGlobalData to WTFThreadData.
305
306         * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't
307         ever face a situation where we'd want to delete a ThreadSpecific object.
308
309 2010-09-01  Gavin Barraclough  <barraclough@apple.com>
310
311         Rubber stamped by Oliver Hunt.
312
313         Ecma-262 15.11.1.1 states that if the argument is undefined then an
314         Error object's message property should be set to the empty string.
315
316         * runtime/ErrorInstance.cpp:
317         (JSC::ErrorInstance::ErrorInstance):
318         (JSC::ErrorInstance::create):
319         * runtime/ErrorInstance.h:
320         * runtime/ErrorPrototype.cpp:
321         (JSC::ErrorPrototype::ErrorPrototype):
322
323 2010-08-31  Darin Adler  <darin@apple.com>
324
325         Reviewed by Anders Carlsson.
326
327         * wtf/FastMalloc.cpp:
328         (WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that
329         mixed types with code that uses size_t.
330
331         * wtf/TCPageMap.h: Removed names of unused arguments to avoid warning.
332
333 2010-08-31  Martin Robinson  <mrobinson@igalia.com>
334
335         Reviewed by Gustavo Noronha Silva.
336
337         [GTK] Isolate all GTK+ typedefs into one file
338         https://bugs.webkit.org/show_bug.cgi?id=44900
339
340         * GNUmakefile.am: Add GtkTypedefs.h to the source lists.
341         * wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build.
342         * wtf/ThreadingPrimitives.h: Remove GTK+ typedefs.
343         * wtf/gobject/GOwnPtr.h: Ditto.
344         * wtf/gobject/GRefPtr.h: Ditto.
345         * wtf/gtk/GtkTypedefs.h: Added.
346
347 2010-08-31  Martin Robinson  <mrobinson@igalia.com>
348
349         Reviewed by Gustavo Noronha Silva.
350
351         [GTK] Fix 'make dist' in preparation of the 1.3.3 release
352         https://bugs.webkit.org/show_bug.cgi?id=44978
353
354         * GNUmakefile.am: Adding missing headers to the sources list.
355
356 2010-08-31  Chao-ying Fu  <fu@mips.com>
357
358         Reviewed by Oliver Hunt.
359
360         Support emit_op_mod() for MIPS
361         https://bugs.webkit.org/show_bug.cgi?id=42855
362
363         This patch uses MIPS div instructions for op_mod to improve performance.
364
365         * assembler/MIPSAssembler.h:
366         (JSC::MIPSAssembler::div):
367         * jit/JITArithmetic.cpp:
368         (JSC::JIT::emit_op_mod):
369         (JSC::JIT::emitSlow_op_mod):
370
371 2010-08-31  Csaba Osztrogonác  <ossy@webkit.org>
372
373         Reviewed by Darin Adler.
374
375         Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED.
376         https://bugs.webkit.org/show_bug.cgi?id=44870
377
378         * wtf/Assertions.h:
379         * wtf/UnusedParam.h:
380
381 2010-08-31  Benjamin Poulain  <benjamin.poulain@nokia.com>
382
383         Reviewed by Kenneth Rohde Christiansen.
384
385         JSC TimeoutChecker::didTimeOut overflows on ARM
386         https://bugs.webkit.org/show_bug.cgi?id=38538
387
388         Make getCPUTime() return values relative to the first call.
389         The previous implementation relied on simply on currentTime(), which
390         return a time since epoch and not a time since the thread started. This
391         made the return value of getCPUTime() overflow on 32 bits.
392
393         * runtime/TimeoutChecker.cpp:
394         (JSC::getCPUTime):
395
396 2010-08-30  Mihai Parparita  <mihaip@chromium.org>
397
398         Reviewed by Adam Barth.
399
400         HISTORY_ALWAYS_ASYNC should be removed (history should always be async)
401         https://bugs.webkit.org/show_bug.cgi?id=44315
402
403         Remove ENABLE_HISTORY_ALWAYS_ASYNC #define.
404
405         * wtf/Platform.h: 
406
407 2010-08-30  Chris Rogers  <crogers@google.com>
408
409         Reviewed by Kenneth Russell.
410
411         Fix namespace for wtf/Complex.h and wtf/Vector3.h
412         https://bugs.webkit.org/show_bug.cgi?id=44892
413
414         * wtf/Complex.h:
415         * wtf/Vector3.h:
416
417 2010-08-30  Andy Estes  <aestes@apple.com>
418
419         Reviewed by Eric Carlson.
420
421         Strings returned by asciiDebug() should be NULL-terminated.
422         https://bugs.webkit.org/show_bug.cgi?id=44866
423
424         * wtf/text/WTFString.cpp:
425         (asciiDebug):
426
427 2010-08-30  Zoltan Herczeg  <zherczeg@webkit.org>
428
429         Reviewed by Darin Adler.
430
431         Refactor number parsing in the lexer
432         https://bugs.webkit.org/show_bug.cgi?id=44104
433
434         Number parsing was full of gotos, and needed a complete
435         redesign to remove them (Only one remained). Furthermore
436         integer arithmetic is empolyed for fast cases (= small
437         integer numbers).
438
439         * parser/Lexer.cpp:
440         (JSC::Lexer::parseHex):
441         (JSC::Lexer::parseOctal):
442         (JSC::Lexer::parseDecimal):
443         (JSC::Lexer::parseNumberAfterDecimalPoint):
444         (JSC::Lexer::parseNumberAfterExponentIndicator):
445         (JSC::Lexer::lex):
446         * parser/Lexer.h:
447
448 2010-08-29  Darin Adler  <darin@apple.com>
449
450         Fix Qt build.
451
452         * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP.
453         * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
454         * wtf/unicode/wince/UnicodeWince.h: Ditto.
455
456 2010-08-29  Kwang Yul Seo  <skyul@company100.net>
457
458         Reviewed by Kent Tamura.
459
460         [BREWMP] Port vprintf_stderr_common
461         https://bugs.webkit.org/show_bug.cgi?id=33568
462
463         Use BREW's DBGPRINTF to output debug messages.
464
465         * wtf/Assertions.cpp:
466
467 2010-08-28  Gavin Barraclough  <barraclough@apple.com>
468
469         Reviewed by Oliver Hunt.
470
471         Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values
472
473         We are in places casting doubles to unsigneds, and unsigneds to ints, without always check
474         that the result is within bounds. This is problematic in the case of double-to-unsigned
475         conversion because we should be saturating to array length.
476
477         Also, the error return value from Array.splice should be [], not undefined.
478
479         I don't see any security concerns here. These methods are spec'ed in such a way that they
480         can be applied to non Array objects, so in all cases the (potentially bogus) indices are
481         being passed to functions that will safely check accesses are within bounds.
482
483         * runtime/ArrayPrototype.cpp:
484         (JSC::argumentClampedIndexFromStartOrEnd):
485         (JSC::arrayProtoFuncJoin):
486         (JSC::arrayProtoFuncConcat):
487         (JSC::arrayProtoFuncReverse):
488         (JSC::arrayProtoFuncShift):
489         (JSC::arrayProtoFuncSlice):
490         (JSC::arrayProtoFuncSort):
491         (JSC::arrayProtoFuncSplice):
492         (JSC::arrayProtoFuncUnShift):
493         (JSC::arrayProtoFuncFilter):
494         (JSC::arrayProtoFuncMap):
495         (JSC::arrayProtoFuncEvery):
496         (JSC::arrayProtoFuncForEach):
497         (JSC::arrayProtoFuncSome):
498         (JSC::arrayProtoFuncReduce):
499         (JSC::arrayProtoFuncReduceRight):
500         (JSC::arrayProtoFuncIndexOf):
501         (JSC::arrayProtoFuncLastIndexOf):
502         * runtime/JSValue.h:
503         (JSC::JSValue::toUInt32):
504
505 2010-08-28  Pratik Solanki  <psolanki@apple.com>
506
507         Reviewed by Dan Bernstein.
508
509         Add an ENABLE define for purgeable memory support
510         https://bugs.webkit.org/show_bug.cgi?id=44777
511
512         * wtf/Platform.h:
513
514 2010-08-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
515
516         Reviewed by Kenneth Rohde Christiansen.
517
518         [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin
519         https://bugs.webkit.org/show_bug.cgi?id=43179
520
521         Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent
522         NPAPI Plugin Cache. The flag is enabled by default.
523
524         * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE
525
526 2010-07-27  Jer Noble  <jer.noble@apple.com>
527
528         Reviewed by Eric Carlson.
529
530         Add JavaScript API to allow a page to go fullscreen.
531         rdar://problem/6867795
532         https://bugs.webkit.org/show_bug.cgi?id=43099
533
534         * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS).
535
536 2010-08-27  Gavin Barraclough  <barraclough@apple.com>
537
538         Windows build fix pt 2.
539
540         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
541
542 2010-08-27  Gavin Barraclough  <barraclough@apple.com>
543
544         Windows build fix pt 1.
545
546         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
547
548 2010-08-27  Gavin Barraclough  <barraclough@apple.com>
549
550         Reviewed by Oliver Hunt.
551
552         Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate.
553
554         These methods should be using a version of dtoa that can generate results accurate
555         to the requested precision, whereas our version of dtoa is only currently able to
556         support producing results sufficiently accurate to distinguish the value from any
557         other IEEE-754 double precision number.
558
559         This change has no impact on benchmarks we track.
560
561         On microbenchmarks for these functions, this is a slight regression where a high
562         precision is requested (dtoa now need to iterate further to generate a a greater
563         number of digits), but with smaller precision values (hopefully more common) this
564         improves performance, since it reduced the accurate of result dtoa is required,
565         to produce, and removes the need to pre-round values before calling dtoa. 
566
567         * JavaScriptCore.exp:
568             doubleToStringInJavaScriptFormat renamed to numberToString
569
570         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
571             doubleToStringInJavaScriptFormat renamed to numberToString
572
573         * runtime/UString.cpp:
574         (JSC::UString::number):
575             doubleToStringInJavaScriptFormat renamed to numberToString
576
577         * wtf/DecimalNumber.h:
578         (WTF::DecimalNumber::DecimalNumber):
579         (WTF::DecimalNumber::toStringDecimal):
580         (WTF::DecimalNumber::toStringExponential):
581             Remove all pre-rounding of values, instead call dtoa correctly.
582
583         * wtf/dtoa.cpp:
584         (WTF::dtoa):
585         * wtf/dtoa.h:
586             Reenable support for rounding to specific-figures/decimal-places in dtoa.
587             Modify to remove unbiased rounding, provide ECMA required away-from-zero.
588             Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to
589             numberToString.
590
591 2010-08-27  Chao-ying Fu  <fu@mips.com>
592
593         Reviewed by Oliver Hunt.
594
595         Byte alignment issue on MIPS
596         https://bugs.webkit.org/show_bug.cgi?id=29415
597
598         MIPS accesses one byte at a time for now to avoid the help from the
599         kernel to fix unaligned accesses.
600
601         * wtf/text/AtomicString.cpp:
602         (WebCore::equal):
603         * wtf/text/StringHash.h:
604         (WebCore::StringHash::equal):
605
606 2010-08-27  Xan Lopez  <xlopez@igalia.com>
607
608         Reviewed by Tor Arne Vestbø.
609
610         Fix a couple of typos in comment.
611
612         * bytecode/CodeBlock.h:
613
614 2010-08-26  Gavin Barraclough  <barraclough@apple.com>
615
616         Windows build fix.
617
618         * wtf/dtoa.cpp:
619
620 2010-08-26  Gavin Barraclough  <baraclough@apple.com>
621
622         Reviewed by Sam Weinig.
623
624         Bug 44735 - Clean up dtoa.cpp
625         Remove unused & unmaintained code paths, reformat code to match
626         coding standard & use platform #defines from Platform.h directly.
627
628         * wtf/dtoa.cpp:
629         (WTF::storeInc):
630         (WTF::multadd):
631         (WTF::s2b):
632         (WTF::lo0bits):
633         (WTF::mult):
634         (WTF::pow5mult):
635         (WTF::lshift):
636         (WTF::diff):
637         (WTF::ulp):
638         (WTF::b2d):
639         (WTF::d2b):
640         (WTF::ratio):
641         (WTF::):
642         (WTF::strtod):
643         (WTF::quorem):
644         (WTF::dtoa):
645
646 2010-08-26  Gavin Barraclough  <barraclough@apple.com>
647
648         Rubber Stamped by Oliver Hunt.
649
650         Partially revert r65959. The toString changes regressed the v8 tests,
651         but keep the toFixed/toExponential/toPrecision changes.
652
653         * JavaScriptCore.exp:
654         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
655         * runtime/NumberPrototype.cpp:
656         * runtime/UString.cpp:
657         (JSC::UString::number):
658         * wtf/DecimalNumber.h:
659         * wtf/dtoa.cpp:
660         (WTF::append):
661         (WTF::doubleToStringInJavaScriptFormat):
662         * wtf/dtoa.h:
663         * wtf/text/WTFString.cpp:
664         * wtf/text/WTFString.h:
665
666 2010-08-26  James Robinson  <jamesr@chromium.org>
667
668         Reviewed by Darin Fisher.
669
670         [chromium] Remove the USE(GLES2_RENDERING) define and associated code
671         https://bugs.webkit.org/show_bug.cgi?id=43761
672
673         Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
674
675         * wtf/Platform.h:
676
677 2010-08-26  Gavin Barraclough  <barraclough@apple.com>
678
679         Rolling out r64608, this regressed performance.
680
681         * JavaScriptCore.xcodeproj/project.pbxproj:
682         * assembler/ARMAssembler.cpp:
683         (JSC::ARMAssembler::executableCopy):
684         * assembler/LinkBuffer.h:
685         (JSC::LinkBuffer::LinkBuffer):
686         (JSC::LinkBuffer::~LinkBuffer):
687         (JSC::LinkBuffer::performFinalization):
688         * assembler/MIPSAssembler.h:
689         (JSC::MIPSAssembler::executableCopy):
690         * assembler/X86Assembler.h:
691         (JSC::X86Assembler::executableCopy):
692         * bytecode/StructureStubInfo.h:
693         (JSC::StructureStubInfo::initGetByIdProto):
694         (JSC::StructureStubInfo::initGetByIdChain):
695         (JSC::StructureStubInfo::initGetByIdSelfList):
696         (JSC::StructureStubInfo::initGetByIdProtoList):
697         (JSC::StructureStubInfo::initPutByIdTransition):
698         * jit/ExecutableAllocator.cpp:
699         (JSC::ExecutablePool::systemAlloc):
700         * jit/ExecutableAllocator.h:
701         (JSC::ExecutablePool::create):
702         (JSC::ExecutableAllocator::ExecutableAllocator):
703         (JSC::ExecutableAllocator::poolForSize):
704         (JSC::ExecutablePool::ExecutablePool):
705         (JSC::ExecutablePool::poolAllocate):
706         * jit/ExecutableAllocatorFixedVMPool.cpp:
707         (JSC::FixedVMPoolAllocator::allocInternal):
708         * jit/JIT.cpp:
709         (JSC::JIT::privateCompile):
710         * jit/JIT.h:
711         (JSC::JIT::compileGetByIdProto):
712         (JSC::JIT::compileGetByIdSelfList):
713         (JSC::JIT::compileGetByIdProtoList):
714         (JSC::JIT::compileGetByIdChainList):
715         (JSC::JIT::compileGetByIdChain):
716         (JSC::JIT::compilePutByIdTransition):
717         (JSC::JIT::compilePatchGetArrayLength):
718         * jit/JITOpcodes.cpp:
719         (JSC::JIT::privateCompileCTIMachineTrampolines):
720         * jit/JITOpcodes32_64.cpp:
721         (JSC::JIT::privateCompileCTIMachineTrampolines):
722         (JSC::JIT::privateCompileCTINativeCall):
723         * jit/JITPropertyAccess.cpp:
724         (JSC::JIT::stringGetByValStubGenerator):
725         (JSC::JIT::privateCompilePutByIdTransition):
726         (JSC::JIT::privateCompilePatchGetArrayLength):
727         (JSC::JIT::privateCompileGetByIdProto):
728         (JSC::JIT::privateCompileGetByIdSelfList):
729         (JSC::JIT::privateCompileGetByIdProtoList):
730         (JSC::JIT::privateCompileGetByIdChainList):
731         (JSC::JIT::privateCompileGetByIdChain):
732         * jit/JITPropertyAccess32_64.cpp:
733         (JSC::JIT::stringGetByValStubGenerator):
734         (JSC::JIT::privateCompilePutByIdTransition):
735         (JSC::JIT::privateCompilePatchGetArrayLength):
736         (JSC::JIT::privateCompileGetByIdProto):
737         (JSC::JIT::privateCompileGetByIdSelfList):
738         (JSC::JIT::privateCompileGetByIdProtoList):
739         (JSC::JIT::privateCompileGetByIdChainList):
740         (JSC::JIT::privateCompileGetByIdChain):
741         * jit/JITStubs.cpp:
742         (JSC::JITThunks::tryCachePutByID):
743         (JSC::JITThunks::tryCacheGetByID):
744         (JSC::DEFINE_STUB_FUNCTION):
745         (JSC::getPolymorphicAccessStructureListSlot):
746         * jit/JITStubs.h:
747         * jit/SpecializedThunkJIT.h:
748         (JSC::SpecializedThunkJIT::finalize):
749         * runtime/ExceptionHelpers.cpp:
750         * runtime/ExceptionHelpers.h:
751         * runtime/Executable.cpp:
752         (JSC::EvalExecutable::compileInternal):
753         (JSC::ProgramExecutable::compileInternal):
754         (JSC::FunctionExecutable::compileForCallInternal):
755         (JSC::FunctionExecutable::compileForConstructInternal):
756         (JSC::FunctionExecutable::reparseExceptionInfo):
757         (JSC::EvalExecutable::reparseExceptionInfo):
758         * yarr/RegexJIT.cpp:
759         (JSC::Yarr::RegexGenerator::compile):
760
761 2010-08-26  Gavin Barraclough  <barraclough@apple.com>
762
763         Reviewed by Brady Eidson.
764
765         Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl.
766
767         * wtf/text/WTFString.cpp:
768         (asciiDebug):
769             Return a Vector<char> containing the contents of a string as ASCII.
770
771 2010-08-26  Sam Weinig  <sam@webkit.org>
772
773         Reviewed by Darin Adler.
774
775         Add PassOwnArrayPtr
776         https://bugs.webkit.org/show_bug.cgi?id=44627
777
778         * GNUmakefile.am:
779         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
780         * JavaScriptCore.xcodeproj/project.pbxproj:
781         Add the new files.
782
783         * wtf/Forward.h:
784         Forward declare PassOwnArrayPtr.
785         
786         * wtf/OwnArrayPtr.h:
787         Mimic the OwnPtr interface.
788
789         * wtf/OwnArrayPtrCommon.h: Added.
790         (WTF::deleteOwnedArrayPtr):
791         Move delete function here so it can be shared by OwnArrayPtr and
792         PassOwnArrayPtr.
793
794         * wtf/PassOwnArrayPtr.h: Added.
795         Mimic the PassOwnPtr interface.
796
797 2010-08-26  Oliver Hunt  <oliver@apple.com>
798
799         Reviewed by Gavin Barraclough.
800
801         [JSC] JavaScript parsing error when loading Equifax web page
802         https://bugs.webkit.org/show_bug.cgi?id=42900
803
804         '-->' is ostensibly only meant to occur when there is only
805         whitespace preceeding it on the line.  However firefox treats
806         multiline comments as a space character, so they are allowed.
807         One side effect of the firefox model is that any line terminators
808         inside the multiline comment are ignored, so
809
810             foo/*
811             */-->
812
813         is treated as
814
815             foo -->
816
817         and so '-->' will not be a comment in this case.  Happily this simply
818         means that to fix this issue all we need to do is stop updating
819         m_atLineStart when handling multiline comments.
820
821         * parser/Lexer.cpp:
822         (JSC::Lexer::lex):
823
824 2010-08-25  Oliver Hunt  <oliver@apple.com>
825
826         Reviewed by Geoffrey Garen.
827
828         Improve overflow handling in StringImpl::Replace
829         https://bugs.webkit.org/show_bug.cgi?id=42502
830         <rdar://problem/8203794>
831
832         Harden StringImpl::replace against overflow -- I can't see how this
833         could be abused, but it's better to be safe than sorry.
834
835         * wtf/text/StringImpl.cpp:
836         (WTF::StringImpl::replace):
837
838 2010-08-26  Martin Robinson  <mrobinson@igalia.com>
839
840         Reviewed by Xan Lopez.
841
842         [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
843         https://bugs.webkit.org/show_bug.cgi?id=44624
844
845         Clean up GNUmakefile.am.
846
847         * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
848         a couple include lines from the top-level GNUmakefile.am.
849
850 2010-08-25  Xan Lopez  <xlopez@igalia.com>
851
852         Reviewed by Kent Tamura.
853
854         Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used
855         https://bugs.webkit.org/show_bug.cgi?id=29259
856
857         Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang.
858
859         * wtf/dtoa.cpp:
860         (WTF::s2b):
861
862 2010-08-25  Kwang Yul Seo  <skyul@company100.net>
863
864         Reviewed by Kevin Ollivier.
865
866         [BREWMP] Add build system
867         https://bugs.webkit.org/show_bug.cgi?id=44645
868
869         Make waf script portable so that we can add more ports.
870
871         * wscript:
872
873 2010-08-25  Michael Saboff  <msaboff@apple.com>
874
875         Reviewed by Sam Weinig.
876
877         Remove the single entry regular expression cache introduced as part of
878         the fix for https://bugs.webkit.org/show_bug.cgi?id=41238.
879         The performance problem in Dromaeo that initiated that bug is no 
880         longer present. Dromaeo has been modified so that the regular
881         expression tests are somewhat random and don't benefit from a
882         single entry cache.
883
884         * runtime/RegExp.cpp:
885         (JSC::RegExp::RegExp):
886         (JSC::RegExp::match):
887         * runtime/RegExp.h:
888
889 2010-08-25  Martin Robinson  <mrobinson@igalia.com>
890
891         Reviewed by Gustavo Noronha Silva.
892
893         Cairo and EFL port shouldn't depend on glib.
894         https://bugs.webkit.org/show_bug.cgi?id=44354
895
896         Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in
897         GRefPtr.h.
898
899         * GNUmakefile.am: Add PlatformRefPtr.h to the source list.
900         * wtf/PlatformRefPtr.h: Migrated from GRefPtr.h.
901         (WTF::PlatformRefPtr::PlatformRefPtr): Ditto.
902         (WTF::PlatformRefPtr::~PlatformRefPtr): Ditto.
903         (WTF::PlatformRefPtr::clear): Ditto.
904         (WTF::PlatformRefPtr::get): Ditto.
905         (WTF::PlatformRefPtr::operator*): Ditto.
906         (WTF::PlatformRefPtr::operator->): Ditto.
907         (WTF::PlatformRefPtr::operator!): Ditto.
908         (WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto.
909         (WTF::PlatformRefPtr::hashTableDeletedValue): Ditto.
910         (WTF::::operator): Ditto.
911         (WTF::::swap): Ditto.
912         (WTF::swap): Ditto.
913         (WTF::operator==): Ditto.
914         (WTF::operator!=): Ditto.
915         (WTF::static_pointer_cast): Ditto.
916         (WTF::const_pointer_cast): Ditto.
917         (WTF::getPtr): Ditto.
918         (WTF::adoptPlatformRef): Ditto.
919         * wtf/gobject/GRefPtr.cpp: Changes to reflect new names.
920         (WTF::refPlatformPtr):
921         (WTF::derefPlatformPtr):
922         * wtf/gobject/GRefPtr.h: Ditto.
923         (WTF::refPlatformPtr):
924         (WTF::derefPlatformPtr):
925
926 2010-08-25  Xan Lopez  <xlopez@igalia.com>
927
928         Reviewed by Alexey Proskuryakov.
929
930         Remove dead code in JSGlobalObject
931         https://bugs.webkit.org/show_bug.cgi?id=44615
932
933         The recursion data member in the JSGlobalObject and its getter
934         plus inc/dec methods seems to be unused, remove them.
935
936         * runtime/JSGlobalObject.cpp:
937         (JSC::JSGlobalObject::init):
938         * runtime/JSGlobalObject.h:
939
940 2010-08-25  Michael Saboff  <msaboff@apple.com>
941
942         Reviewed by Geoffrey Garen.
943
944         Changed the initial and subsequent allocation of vector storage to
945         Array()s. The changes are to limit sparse arrays to 100000 entries
946         and fixed the sparse map to vector storage conversion to use the 
947         minimum amount of memory needed to store the current number of entries.
948         These changes address https://bugs.webkit.org/show_bug.cgi?id=43707
949
950         * runtime/JSArray.cpp:
951         (JSC::JSArray::putSlowCase):
952         (JSC::JSArray::getNewVectorLength):
953
954 2010-08-16  Gabor Loki  <loki@webkit.org>
955
956         Reviewed by Gavin Barraclough.
957
958         Avoid increasing required alignment of target type warning
959         https://bugs.webkit.org/show_bug.cgi?id=43963
960
961         Fix platform independent alignment warnings.
962
963         * wtf/ListHashSet.h:
964         (WTF::ListHashSetNodeAllocator::pool):
965
966 2010-08-19  Gabor Loki  <loki@webkit.org>
967
968         Reviewed by Gavin Barraclough.
969
970         Enable truncated floating point feature on ARM
971         https://bugs.webkit.org/show_bug.cgi?id=44233
972
973         Enable truncated floating point feature with the help of VCVTR.S32.F64
974         instruction. If VCVTR.S32.F64 can't fit the result into a 32-bit
975         integer/register, it saturates at INT_MAX or INT_MIN. Testing this
976         looks quicker than testing FPSCR for exception.
977
978         Inspired by Jacob Bramley's patch from JaegerMonkey
979
980         * assembler/ARMAssembler.h:
981         (JSC::ARMAssembler::):
982         (JSC::ARMAssembler::cmn_r):
983         (JSC::ARMAssembler::vcvtr_s32_f64_r):
984         * assembler/MacroAssemblerARM.h:
985         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
986         (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
987
988 2010-08-24  Gavin Barraclough  <barraclough@apple.com>
989
990         Windows build fix.
991
992         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
993
994 2010-08-24  Gavin Barraclough  <barraclough@apple.com>
995
996         Windows build fix.
997
998         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
999         * wtf/DecimalNumber.h:
1000         (WTF::DecimalNumber::intPow10):
1001         * wtf/dtoa.cpp:
1002         * wtf/dtoa.h:
1003
1004 2010-08-23  Gavin Barraclough  <barraclough@apple.com>
1005
1006         Reviewed by Oliver Hunt.
1007
1008         https://bugs.webkit.org/show_bug.cgi?id=44487
1009
1010         Number.toExponential/toFixed/toPrecision all contain a spaghetti of duplicated
1011         code & unnecessary complexity. Add a new DecimalNumber class to encapsulate
1012         double to string conversion, share the implementations of rounding &
1013         decimal-fraction/exponential formatting.
1014
1015         * JavaScriptCore.exp:
1016             Update exports.
1017
1018         * runtime/NumberPrototype.cpp:
1019         (JSC::toThisNumber):
1020         (JSC::getIntegerArgumentInRange):
1021             Helper methods used in implementing toExponential/toFixed/toString.
1022         (JSC::numberProtoFuncToExponential):
1023         (JSC::numberProtoFuncToFixed):
1024         (JSC::numberProtoFuncToPrecision):
1025             Reimplemented using new DecimalNumber class.
1026             
1027         * runtime/UString.cpp:
1028         (JSC::UString::number):
1029             Updated to call numberToString.
1030
1031         * wtf/DecimalNumber.h: Added.
1032         (WTF::):
1033         (WTF::DecimalNumber::DecimalNumber):
1034         (WTF::DecimalNumber::toStringDecimal):
1035         (WTF::DecimalNumber::toStringExponential):
1036         (WTF::DecimalNumber::sign):
1037         (WTF::DecimalNumber::exponent):
1038         (WTF::DecimalNumber::significand):
1039         (WTF::DecimalNumber::precision):
1040         (WTF::DecimalNumber::init):
1041         (WTF::DecimalNumber::isZero):
1042         (WTF::DecimalNumber::roundToPrecision):
1043             New class to perform double to string conversion.
1044             Has three constructors, which allow conversion with no rounding,
1045             rounding to significant-figures, or rounding to decimal-places,
1046             and two methods for formatting strings, either using decimal
1047             fraction or exponential encoding. Internal implementation uses
1048             pre-rounding of the values before calling dtoa rather than
1049             relying on dtoa to correctly round, which does not produce
1050             fully accurate results. Hopefully we can address this in the
1051             near future.
1052
1053         * wtf/dtoa.cpp:
1054         (WTF::intPow10):
1055         * wtf/dtoa.h:
1056             intPow10 is used internally by DecimalNumber.
1057             
1058         * wtf/text/WTFString.cpp:
1059         (WTF::copyToString):
1060         (WTF::nanOrInfToString):
1061             Used internally in numberToString for NaN/Infinity handling.
1062         (WTF::numberToString):
1063             Added new method to convert doubles to strings.
1064
1065         * wtf/text/WTFString.h:
1066             Added declaration for numberToString. This is here because
1067             we should switch over to using this for all double to string
1068             conversion in WebCore (see section 2.4.4.3 of the HTML5 spec).
1069
1070 2010-08-24  Oliver Hunt  <oliver@apple.com>
1071
1072         Reviewed by Geoff Garen.
1073
1074         Don't seed the JS random number generator from time()
1075         https://bugs.webkit.org/show_bug.cgi?id=41868
1076         <rdar://problem/8171025>
1077
1078         Switch to using the secure random number generator to
1079         seed the fast random generator, and make the generator
1080         be per global object.
1081
1082         * runtime/JSGlobalData.cpp:
1083         (JSC::JSGlobalData::JSGlobalData):
1084         * runtime/JSGlobalData.h:
1085         * runtime/JSGlobalObject.h:
1086         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
1087         (JSC::JSGlobalObject::weakRandomNumber):
1088         * runtime/MathObject.cpp:
1089         (JSC::mathProtoFuncRandom):
1090
1091 2010-08-24  Oliver Hunt  <oliver@apple.com>
1092
1093         Reviewed by Beth Dakin.
1094
1095         Make overflow guards in UString::utf8 explicit
1096         https://bugs.webkit.org/show_bug.cgi?id=44540
1097
1098         Add an explicit overflow check prior to allocating our buffer,
1099         rather than implicitly relying on the guard in convertUTF16ToUTF8.
1100
1101         * runtime/UString.cpp:
1102         (JSC::UString::utf8):
1103
1104 2010-08-24  Yael Aharon  <yael.aharon@nokia.com>
1105
1106         Reviewed by Simon Hausmann.
1107
1108         [Symbian] Fix commit/decommit of system memory using RChunk
1109
1110         Swap accidentially reversed start and m_base values for determining the
1111         offset within the RChunk.
1112
1113         * wtf/PageReservation.h:
1114         (WTF::PageReservation::systemCommit):
1115         (WTF::PageReservation::systemDecommit):
1116
1117 2010-08-23  Patrick Gansterer  <paroga@paroga.com>
1118
1119         Rubber-stamped by Gabor Loki.
1120
1121         [WINCE] Buildfix for GeneratedJITStubs after r64818
1122         https://bugs.webkit.org/show_bug.cgi?id=44469
1123
1124         Use " THUNK_RETURN_ADDRESS_OFFSET" instead of "#offset#".
1125
1126         * jit/JITStubs.cpp:
1127
1128 2010-08-23  Oliver Hunt  <oliver@apple.com>
1129
1130         Reviewed by Darin Adler.
1131
1132         [REGRESSION] Interpreter incorrectly excludes prototype chain when validating put_by_id_transition
1133         https://bugs.webkit.org/show_bug.cgi?id=44240
1134         <rdar://problem/8328995>
1135
1136         Fix an error I introduced when cleaning up the interpreter side of the logic
1137         to prevent setters being called in object initialisers.
1138
1139         * interpreter/Interpreter.cpp:
1140         (JSC::Interpreter::privateExecute):
1141
1142 2010-08-23  Michael Saboff  <msaboff@apple.com>
1143
1144         Reviewed by Oliver Hunt.
1145
1146         Fixed case where a single character search string in a string.replace()
1147         did not properly handle back reference replacement.  The fix is to 
1148         check for a '$' as part of the check to see if we can execute the
1149         single character replace optimization.
1150         https://bugs.webkit.org/show_bug.cgi?id=44067
1151
1152         * runtime/StringPrototype.cpp:
1153         (JSC::stringProtoFuncReplace):
1154
1155 2010-08-23  Oliver Hunt  <oliver@apple.com>
1156
1157         Reviewed by Gavin Barraclough.
1158
1159         JSON.stringify is much slower than Firefox on particular pathological input
1160         https://bugs.webkit.org/show_bug.cgi?id=44456
1161
1162         Make StringBuilder::reserveCapacity reserve additional space so we don't end up
1163         repeatedly copying the entire result string.
1164
1165         * runtime/StringBuilder.h:
1166         (JSC::StringBuilder::append):
1167         (JSC::StringBuilder::reserveCapacity):
1168
1169 2010-08-23  Jian Li  <jianli@chromium.org>
1170
1171         Reviewed by Darin Fisher.
1172
1173         Handle blob resource.
1174         https://bugs.webkit.org/show_bug.cgi?id=43941
1175
1176         * JavaScriptCore.exp: Add an export that is neede by BlobResourceHandle.
1177
1178 2010-08-19  Andreas Kling  <andreas.kling@nokia.com>
1179
1180         Reviewed by Geoffrey Garen.
1181
1182         JSC: Move the static_cast into to(U)Int32 fast case
1183         https://bugs.webkit.org/show_bug.cgi?id=44037
1184
1185         Do the static_cast<(u)int32_t> inline to avoid the function call overhead
1186         for easily converted values (within (u)int32_t range.)
1187
1188         * runtime/JSValue.cpp:
1189         (JSC::toInt32SlowCase):
1190         (JSC::toUInt32SlowCase):
1191         * runtime/JSValue.h:
1192         (JSC::JSValue::toInt32):
1193         (JSC::JSValue::toUInt32):
1194
1195 2010-08-18  Andreas Kling  <andreas.kling@nokia.com>
1196
1197         Reviewed by Geoffrey Garen.
1198
1199         REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript
1200         https://bugs.webkit.org/show_bug.cgi?id=43742
1201
1202         Add codegen for pow() to return Int32 values when possible.
1203
1204         * jit/ThunkGenerators.cpp:
1205         (JSC::powThunkGenerator):
1206
1207 2010-08-18  Gabor Loki  <loki@webkit.org>
1208
1209         Reviewed by Gavin Barraclough.
1210
1211         The JITStackFrame is wrong using Thumb-2 JIT with JSVALUE32_64
1212         https://bugs.webkit.org/show_bug.cgi?id=43897
1213
1214         A 64 bits wide member in a structure is aligned to 8 bytes on ARM by
1215         default, but this is not taken into account in the offset defines of
1216         JITStackFrame.
1217
1218         * jit/JITStubs.cpp:
1219         * jit/JITStubs.h:
1220
1221 2010-08-18  Gavin Barraclough  <barraclough@apple.com>
1222
1223         Rubber stamped by Sam Weinig.
1224
1225         Rename UString::substr to substringSharingImpl, add to WTF::String.
1226         Now WTF::String can do everything that JSC::UString can do!
1227
1228         * JavaScriptCore.exp:
1229         * bytecode/CodeBlock.cpp:
1230         (JSC::escapeQuotes):
1231         * bytecompiler/NodesCodegen.cpp:
1232         (JSC::substitute):
1233         * parser/SourceProvider.h:
1234         (JSC::UStringSourceProvider::getRange):
1235         * runtime/FunctionPrototype.cpp:
1236         (JSC::insertSemicolonIfNeeded):
1237         * runtime/JSGlobalObjectFunctions.cpp:
1238         (JSC::parseInt):
1239         * runtime/JSONObject.cpp:
1240         (JSC::gap):
1241         (JSC::Stringifier::indent):
1242         (JSC::Stringifier::unindent):
1243         * runtime/JSString.cpp:
1244         (JSC::JSString::replaceCharacter):
1245         * runtime/NumberPrototype.cpp:
1246         (JSC::numberProtoFuncToFixed):
1247         (JSC::numberProtoFuncToPrecision):
1248         * runtime/StringPrototype.cpp:
1249         (JSC::stringProtoFuncReplace):
1250         (JSC::trimString):
1251         * runtime/UString.cpp:
1252         (JSC::UString::substringSharingImpl):
1253         * runtime/UString.h:
1254         * wtf/text/WTFString.cpp:
1255         (WTF::String::substringSharingImpl):
1256         * wtf/text/WTFString.h:
1257
1258 2010-08-18  Gavin Barraclough  <barraclough@apple.com>
1259
1260         Windows build fix.
1261
1262         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1263         * JavaScriptCore.xcodeproj/project.pbxproj:
1264
1265 2010-08-18  Gavin Barraclough  <barraclough@apple.com>
1266
1267         Windows build fix.
1268
1269         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1270         * JavaScriptCore.xcodeproj/project.pbxproj:
1271
1272 2010-08-17  Gavin Barraclough  <barraclough@apple.com>
1273
1274         Reviewed by Sam Weinig.
1275
1276         Bug 44146 - Remove toDouble/toUInt32 methods from UString.
1277
1278         These methods all implement JavaScript language specific behaviour, and as such
1279         are not suited to being on a generic string object.  They are also inefficient
1280         and incorrectly used, refactor & cleanup.  Uses of these methods really divide
1281         out into two cases.
1282
1283         ToNumber:
1284         Uses of toDouble from JSString and from parseFloat are implementing ecma's
1285         ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble
1286         should largely just be moved out to a global jsToNumber function.  ToNumber is
1287         capable of recognizing either decimal or hexadecimal numbers, but parseFloat
1288         should only recognize decimal values.  This is currently handled by testing for
1289         hexadecimal before calling toDouble, which should unnecessary - instead we can
1290         just split out the two parts to the grammar into separate functions. Also,
1291         strtod recognizes a set of literals (nan, inf, and infinity - all with any
1292         capitalization) - which are not defined by any of the specs we are implementing.
1293         To handle this we need to perform additional work in toDouble to convert the
1294         unsupported cases of infinities back to NaNs.  Instead we should simply remove
1295         support for this literals from strtod.  This should provide a more desirable
1296         behaviour for all clients of strtod.
1297
1298         Indexed properties:
1299         Uses of the toStrictUInt32 methods are were all converting property names to
1300         indices, and all uses of toUInt32 were incorrect; in all cases we should have
1301         been calling toUInt32.  This error results in some incorrect behaviour in the
1302         DOM (accessing property "0 " of a NodeList should fail; it currently does not).
1303         Move this method onto Identifier (our canonical property name), and make it
1304         always perform a strict conversion. Add a layout test to check NodeList does
1305         convert indexed property names correctly.
1306
1307         * JavaScriptCore.exp:
1308         * runtime/Arguments.cpp:
1309         (JSC::Arguments::getOwnPropertySlot):
1310         (JSC::Arguments::getOwnPropertyDescriptor):
1311         (JSC::Arguments::put):
1312         (JSC::Arguments::deleteProperty):
1313         * runtime/Identifier.cpp:
1314         (JSC::Identifier::toUInt32):
1315         * runtime/Identifier.h:
1316         (JSC::Identifier::toUInt32):
1317         * runtime/JSArray.cpp:
1318         (JSC::JSArray::getOwnPropertySlot):
1319         (JSC::JSArray::getOwnPropertyDescriptor):
1320         (JSC::JSArray::put):
1321         (JSC::JSArray::deleteProperty):
1322         * runtime/JSArray.h:
1323         (JSC::Identifier::toArrayIndex):
1324         * runtime/JSByteArray.cpp:
1325         (JSC::JSByteArray::getOwnPropertySlot):
1326         (JSC::JSByteArray::getOwnPropertyDescriptor):
1327         (JSC::JSByteArray::put):
1328         * runtime/JSGlobalObjectFunctions.cpp:
1329         (JSC::isInfinity):
1330         (JSC::jsHexIntegerLiteral):
1331         (JSC::jsStrDecimalLiteral):
1332         (JSC::jsToNumber):
1333         (JSC::parseFloat):
1334         * runtime/JSGlobalObjectFunctions.h:
1335         * runtime/JSString.cpp:
1336         (JSC::JSString::getPrimitiveNumber):
1337         (JSC::JSString::toNumber):
1338         (JSC::JSString::getStringPropertyDescriptor):
1339         * runtime/JSString.h:
1340         (JSC::JSString::getStringPropertySlot):
1341         * runtime/ObjectPrototype.cpp:
1342         (JSC::ObjectPrototype::put):
1343         * runtime/StringObject.cpp:
1344         (JSC::StringObject::deleteProperty):
1345         * runtime/UString.cpp:
1346         * runtime/UString.h:
1347         * wtf/dtoa.cpp:
1348         (WTF::strtod):
1349
1350 2010-08-17  Gavin Barraclough  <barraclough@apple.com>
1351
1352         Reviewed by Sam Weinig.
1353
1354         Bug 44099 - REGRESSION(r65468): Crashes in StringImpl::find
1355
1356         Bug 44080 introuduced a couple of cases in which array bounds could be overrun.
1357         One of these was fixed in r65493, this patch fixes the other and address the
1358         concerns voiced in comment #6 by restructuring the loops to remove the code
1359         dupliction without introducing an additional if check.
1360
1361         * wtf/text/StringImpl.cpp:
1362         (WTF::StringImpl::find):
1363         (WTF::StringImpl::findIgnoringCase):
1364         (WTF::StringImpl::reverseFind):
1365         (WTF::StringImpl::reverseFindIgnoringCase):
1366
1367 2010-08-17  No'am Rosenthal  <noam.rosenthal@nokia.com>
1368
1369         Reviewed by Ariya Hidayat.
1370
1371         [Qt] Move the accelerated compositing build flag to the right place
1372         https://bugs.webkit.org/show_bug.cgi?id=43882
1373
1374         * wtf/Platform.h:
1375
1376 2010-08-17  Yuta Kitamura  <yutak@chromium.org>
1377
1378         Reviewed by Shinichiro Hamaji.
1379
1380         Avoid uninitialized memory read in StringImpl::find().
1381
1382         REGRESSION(r65468): Crashes in StringImpl::find
1383         https://bugs.webkit.org/show_bug.cgi?id=44099
1384
1385         * wtf/text/StringImpl.cpp:
1386         (WTF::StringImpl::find):
1387
1388 2010-08-16  Gavin Barraclough  <barraclough@apple.com>
1389
1390         Rubber stamped by Sam Weinig
1391
1392         Add VectorTraits to String & DefaultHash traits to UString to unify behaviour.
1393
1394         * runtime/UString.h:
1395         (JSC::UStringHash::hash):
1396         (JSC::UStringHash::equal):
1397         (WTF::):
1398         * wtf/text/WTFString.h:
1399         (WTF::):
1400
1401 2010-08-16  Gavin Barraclough  <barraclough@apple.com>
1402
1403         Rubber stamped by Sam Weinig
1404
1405         Remove unnecessary includes from UString.h, add new includes as necessary.
1406
1407         * profiler/CallIdentifier.h:
1408         * profiler/ProfileNode.h:
1409         * runtime/DateConversion.cpp:
1410         * runtime/Identifier.h:
1411         (JSC::IdentifierRepHash::hash):
1412         * runtime/RegExpCache.h:
1413         * runtime/RegExpKey.h:
1414         * runtime/UString.cpp:
1415         (JSC::UString::substr):
1416         * runtime/UString.h:
1417         * wtf/text/WTFString.h:
1418
1419 2010-08-16  Gavin Barraclough  <barraclough@apple.com>
1420
1421         Reviewed by Sam Weinig
1422
1423         Bug 44080 - String find/reverseFind methods need tidying up
1424         These methods have a couple of problems with their interface, and implementation.
1425
1426         These methods take and int index, and return an int - however this is problematic
1427         since on 64-bit string indices may have a full 32-bit range.  This spills out into
1428         surrounding code, which unsafely casts string indices from unsigned to int. Code
1429         checking the result of these methods check for a mix of "== -1", "< 0", and
1430         "== notFound".  Clean this up by changing these methods to take an unsigned
1431         starting index, and return a size_t. with a failed match indicated by notFound.
1432         reverseFind also has a special meaning for the starting index argument, in that a
1433         negative index is interpreted as an offset back from the end of the string. Remove
1434         this functionality, in the (1!) case where it is used we should just calculate the
1435         offset by subtracting from the string's length.
1436
1437         The implementation has a few problems too.  The code is not in webkit style, in
1438         using assorted abbreviations in variable names, and implementations of similar
1439         find methods with differing argument types were unnecessarily inconsistent. When
1440         find is passed const char* data the string would be handled as latin1 (zero
1441         extended to UTF-16) for all characters but the first; this is sign extended.
1442         Case-insensitive find is broken for unicode strings; the hashing optimization is
1443         not unicode safe, and could result in false negatives.
1444
1445         Unify UString find methods to match String.
1446
1447         * JavaScriptCore.exp:
1448         * bytecode/CodeBlock.cpp:
1449         (JSC::escapeQuotes):
1450         * bytecompiler/NodesCodegen.cpp:
1451         (JSC::substitute):
1452         * runtime/JSString.cpp:
1453         (JSC::JSString::replaceCharacter):
1454         * runtime/RegExp.cpp:
1455         (JSC::RegExp::RegExp):
1456         * runtime/RegExpKey.h:
1457         (JSC::RegExpKey::getFlagsValue):
1458         * runtime/StringPrototype.cpp:
1459         (JSC::substituteBackreferencesSlow):
1460         (JSC::substituteBackreferences):
1461         (JSC::stringProtoFuncReplace):
1462         (JSC::stringProtoFuncIndexOf):
1463         (JSC::stringProtoFuncLastIndexOf):
1464         (JSC::stringProtoFuncSplit):
1465         * runtime/UString.cpp:
1466         * runtime/UString.h:
1467         (JSC::UString::find):
1468         (JSC::UString::reverseFind):
1469         * wtf/text/AtomicString.h:
1470         (WTF::AtomicString::find):
1471         * wtf/text/StringImpl.cpp:
1472         (WTF::StringImpl::find):
1473         (WTF::StringImpl::findCaseInsensitive):
1474         (WTF::StringImpl::reverseFind):
1475         (WTF::StringImpl::reverseFindCaseInsensitive):
1476         (WTF::StringImpl::endsWith):
1477         (WTF::StringImpl::replace):
1478         * wtf/text/StringImpl.h:
1479         (WTF::StringImpl::startsWith):
1480         * wtf/text/WTFString.cpp:
1481         (WTF::String::split):
1482         * wtf/text/WTFString.h:
1483         (WTF::String::find):
1484         (WTF::String::reverseFind):
1485         (WTF::String::findCaseInsensitive):
1486         (WTF::String::reverseFindCaseInsensitive):
1487         (WTF::String::contains):
1488         (WTF::find):
1489         (WTF::reverseFind):
1490
1491 2010-08-16  Kevin Ollivier  <kevino@theolliviers.com>
1492
1493         [wx] Build fix, do not build WebCore as a convenience library as this leads to
1494         errors in the Win build w/export symbols and causes problems with DOM bindings
1495         debugging in gdb. 
1496
1497         * wscript:
1498
1499 2010-08-16  Leandro Pereira  <leandro@profusion.mobi>
1500
1501         [EFL] Build fix after r65366.
1502
1503         * CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if
1504         they're empty.
1505         * jsc/CMakeLists.txt: Ditto.
1506         * wtf/CMakeLists.txt: Ditto.
1507
1508 2010-08-15  Kevin Ollivier  <kevino@theolliviers.com>
1509
1510         [wx] Build fix, don't build intermediate source in DerivedSources dir.
1511
1512         * wscript:
1513
1514 2010-08-14  Patrick Gansterer  <paroga@paroga.com>
1515
1516         Reviewed by Kenneth Rohde Christiansen.
1517
1518         [CMake] Add preprocessor detection for generator scripts
1519         https://bugs.webkit.org/show_bug.cgi?id=43984
1520
1521         * CMakeLists.txt:
1522
1523 2010-08-14  Patrick Gansterer  <paroga@paroga.com>
1524
1525         Reviewed by Kenneth Rohde Christiansen.
1526
1527         [CMake] Set target properties only if available
1528         https://bugs.webkit.org/show_bug.cgi?id=43978
1529
1530         * CMakeLists.txt:
1531         * jsc/CMakeLists.txt:
1532         * wtf/CMakeLists.txt:
1533
1534 2010-08-13  Kevin Ollivier  <kevino@theolliviers.com>
1535
1536         [wx] Build fix, add CString to the list of forwards.
1537
1538         * wtf/Forward.h:
1539
1540 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
1541
1542         Windows build fix
1543
1544         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1545
1546 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
1547
1548         Windows build fix
1549
1550         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1551
1552 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
1553
1554         Windows build fix
1555
1556         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1557
1558 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
1559
1560         Rubber stamped by Sam Weinig.
1561         Switch String::/UString::ascii() to return a CString.
1562
1563         * JavaScriptCore.exp:
1564         * JavaScriptCore.xcodeproj/project.pbxproj:
1565         * bytecode/CodeBlock.cpp:
1566         (JSC::CodeBlock::dump):
1567         * bytecode/SamplingTool.cpp:
1568         (JSC::SamplingTool::dump):
1569         * interpreter/CallFrame.cpp:
1570         (JSC::CallFrame::dumpCaller):
1571         * jsc.cpp:
1572         (runWithScripts):
1573         (runInteractive):
1574         * runtime/Identifier.h:
1575         (JSC::Identifier::ascii):
1576         * runtime/ScopeChain.cpp:
1577         (JSC::ScopeChainNode::print):
1578         * runtime/UString.cpp:
1579         (JSC::UString::ascii):
1580         (JSC::UString::latin1):
1581         * runtime/UString.h:
1582         * wtf/text/StringImpl.cpp:
1583         (WTF::StringImpl::asciiOLD):
1584         * wtf/text/StringImpl.h:
1585         * wtf/text/WTFString.cpp:
1586         (WTF::String::ascii):
1587         (WTF::String::latin1):
1588         * wtf/text/WTFString.h:
1589
1590 2010-08-13  Gabor Loki  <loki@webkit.org>
1591
1592         Reviewed by Gavin Barraclough.
1593
1594         Avoid increasing required alignment of target type warning on ARM
1595         https://bugs.webkit.org/show_bug.cgi?id=38045
1596
1597         The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
1598         sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
1599         increases required alignment of target type warnings.
1600         Casting the type of [pointer to Type2] object to void* bypasses the
1601         warning.
1602
1603         * assembler/ARMAssembler.cpp:
1604         (JSC::ARMAssembler::executableCopy):
1605         * assembler/AssemblerBuffer.h:
1606         (JSC::AssemblerBuffer::putShortUnchecked):
1607         (JSC::AssemblerBuffer::putIntUnchecked):
1608         (JSC::AssemblerBuffer::putInt64Unchecked):
1609         * interpreter/RegisterFile.h:
1610         (JSC::RegisterFile::RegisterFile):
1611         (JSC::RegisterFile::grow):
1612         * jit/JITStubs.cpp:
1613         * pcre/pcre_compile.cpp:
1614         (jsRegExpCompile):
1615         * runtime/JSArray.cpp:
1616         (JSC::JSArray::putSlowCase):
1617         (JSC::JSArray::increaseVectorLength):
1618         (JSC::JSArray::increaseVectorPrefixLength):
1619         (JSC::JSArray::shiftCount):
1620         (JSC::JSArray::unshiftCount):
1621         * wtf/FastMalloc.cpp:
1622         (WTF::PageHeapAllocator::New):
1623         (WTF::TCMalloc_Central_FreeList::Populate):
1624         * wtf/MD5.cpp:
1625         (WTF::reverseBytes):
1626         (WTF::MD5::addBytes):
1627         (WTF::MD5::checksum):
1628         * wtf/StdLibExtras.h:
1629         (isPointerTypeAlignmentOkay):
1630         (reinterpret_cast_ptr):
1631         * wtf/Vector.h:
1632         (WTF::VectorBuffer::inlineBuffer):
1633         * wtf/qt/StringQt.cpp:
1634         (WTF::String::String):
1635
1636 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
1637
1638         Reviewed by Sam Weinig
1639
1640         Unify UString::UTF8String() & String::utf8() methods,
1641         remove UString::cost() & make atArrayIndex a free function.
1642
1643         * JavaScriptCore.exp:
1644         * bytecode/CodeBlock.cpp:
1645         (JSC::constantName):
1646         (JSC::idName):
1647         (JSC::CodeBlock::registerName):
1648         (JSC::regexpName):
1649         (JSC::printGlobalResolveInfo):
1650         (JSC::printStructureStubInfo):
1651         (JSC::CodeBlock::printStructure):
1652         (JSC::CodeBlock::printStructures):
1653         * jsc.cpp:
1654         (functionPrint):
1655         (functionDebug):
1656         (runInteractive):
1657         (fillBufferWithContentsOfFile):
1658         * pcre/pcre_exec.cpp:
1659         (Histogram::~Histogram):
1660         * profiler/CallIdentifier.h:
1661         (JSC::CallIdentifier::c_str):
1662         * profiler/Profile.cpp:
1663         (JSC::Profile::debugPrintDataSampleStyle):
1664         * profiler/ProfileGenerator.cpp:
1665         (JSC::ProfileGenerator::willExecute):
1666         (JSC::ProfileGenerator::didExecute):
1667         * profiler/ProfileNode.cpp:
1668         (JSC::ProfileNode::debugPrintData):
1669         (JSC::ProfileNode::debugPrintDataSampleStyle):
1670         * runtime/Arguments.cpp:
1671         (JSC::Arguments::getOwnPropertySlot):
1672         (JSC::Arguments::getOwnPropertyDescriptor):
1673         (JSC::Arguments::put):
1674         (JSC::Arguments::deleteProperty):
1675         * runtime/DateConversion.cpp:
1676         (JSC::parseDate):
1677         * runtime/Identifier.h:
1678         (JSC::Identifier::toStrictUInt32):
1679         * runtime/JSArray.cpp:
1680         (JSC::JSArray::getOwnPropertySlot):
1681         (JSC::JSArray::getOwnPropertyDescriptor):
1682         (JSC::JSArray::put):
1683         (JSC::JSArray::deleteProperty):
1684         * runtime/JSArray.h:
1685         (JSC::toArrayIndex):
1686         * runtime/JSGlobalObjectFunctions.cpp:
1687         (JSC::encode):
1688         (JSC::parseInt):
1689         (JSC::globalFuncJSCPrint):
1690         * runtime/JSString.h:
1691         (JSC::RopeBuilder::JSString):
1692         * runtime/UString.cpp:
1693         (JSC::UString::toDouble):
1694         (JSC::putUTF8Triple):
1695         (JSC::UString::utf8):
1696         * runtime/UString.h:
1697         (JSC::UString::~UString):
1698         (JSC::UString::isNull):
1699         (JSC::UString::isEmpty):
1700         (JSC::UString::impl):
1701         * wtf/text/WTFString.cpp:
1702         (WTF::String::utf8):
1703         * wtf/text/WTFString.h:
1704         (WTF::String::~String):
1705         (WTF::String::swap):
1706         (WTF::String::isNull):
1707         (WTF::String::isEmpty):
1708         (WTF::String::impl):
1709         (WTF::String::length):
1710         (WTF::String::String):
1711         (WTF::String::isHashTableDeletedValue):
1712
1713 2010-08-12  Zoltan Herczeg  <zherczeg@webkit.org>
1714
1715         Reviewed by Gavin Barraclough.
1716
1717         Refactoring the fpu code generator for the ARM port
1718         https://bugs.webkit.org/show_bug.cgi?id=43842
1719
1720         Support up to 32 double precision registers, and the
1721         recent VFP instruction formats. This patch is mainly
1722         a style change which keeps the current functionality.
1723
1724         * assembler/ARMAssembler.h:
1725         (JSC::ARMRegisters::):
1726         (JSC::ARMAssembler::):
1727         (JSC::ARMAssembler::emitInst):
1728         (JSC::ARMAssembler::emitDoublePrecisionInst):
1729         (JSC::ARMAssembler::emitSinglePrecisionInst):
1730         (JSC::ARMAssembler::vadd_f64_r):
1731         (JSC::ARMAssembler::vdiv_f64_r):
1732         (JSC::ARMAssembler::vsub_f64_r):
1733         (JSC::ARMAssembler::vmul_f64_r):
1734         (JSC::ARMAssembler::vcmp_f64_r):
1735         (JSC::ARMAssembler::vsqrt_f64_r):
1736         (JSC::ARMAssembler::vmov_vfp_r):
1737         (JSC::ARMAssembler::vmov_arm_r):
1738         (JSC::ARMAssembler::vcvt_f64_s32_r):
1739         (JSC::ARMAssembler::vcvt_s32_f64_r):
1740         (JSC::ARMAssembler::vmrs_apsr):
1741         * assembler/MacroAssemblerARM.h:
1742         (JSC::MacroAssemblerARM::addDouble):
1743         (JSC::MacroAssemblerARM::divDouble):
1744         (JSC::MacroAssemblerARM::subDouble):
1745         (JSC::MacroAssemblerARM::mulDouble):
1746         (JSC::MacroAssemblerARM::sqrtDouble):
1747         (JSC::MacroAssemblerARM::convertInt32ToDouble):
1748         (JSC::MacroAssemblerARM::branchDouble):
1749         (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
1750
1751 2010-08-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1752
1753         Unreviewed, rolling out r65295.
1754         http://trac.webkit.org/changeset/65295
1755         https://bugs.webkit.org/show_bug.cgi?id=43950
1756
1757         It broke 4 sputnik tests (Requested by Ossy on #webkit).
1758
1759         * JavaScriptCore.exp:
1760         * bytecode/CodeBlock.cpp:
1761         (JSC::constantName):
1762         (JSC::idName):
1763         (JSC::CodeBlock::registerName):
1764         (JSC::regexpName):
1765         (JSC::printGlobalResolveInfo):
1766         (JSC::printStructureStubInfo):
1767         (JSC::CodeBlock::printStructure):
1768         (JSC::CodeBlock::printStructures):
1769         * jsc.cpp:
1770         (functionPrint):
1771         (functionDebug):
1772         (runInteractive):
1773         (fillBufferWithContentsOfFile):
1774         * pcre/pcre_exec.cpp:
1775         (Histogram::~Histogram):
1776         * profiler/CallIdentifier.h:
1777         (JSC::CallIdentifier::c_str):
1778         * profiler/Profile.cpp:
1779         (JSC::Profile::debugPrintDataSampleStyle):
1780         * profiler/ProfileGenerator.cpp:
1781         (JSC::ProfileGenerator::willExecute):
1782         (JSC::ProfileGenerator::didExecute):
1783         * profiler/ProfileNode.cpp:
1784         (JSC::ProfileNode::debugPrintData):
1785         (JSC::ProfileNode::debugPrintDataSampleStyle):
1786         * runtime/Arguments.cpp:
1787         (JSC::Arguments::getOwnPropertySlot):
1788         (JSC::Arguments::getOwnPropertyDescriptor):
1789         (JSC::Arguments::put):
1790         (JSC::Arguments::deleteProperty):
1791         * runtime/DateConversion.cpp:
1792         (JSC::parseDate):
1793         * runtime/Identifier.h:
1794         (JSC::Identifier::Identifier):
1795         (JSC::Identifier::toArrayIndex):
1796         * runtime/JSArray.cpp:
1797         (JSC::JSArray::getOwnPropertySlot):
1798         (JSC::JSArray::getOwnPropertyDescriptor):
1799         (JSC::JSArray::put):
1800         (JSC::JSArray::deleteProperty):
1801         * runtime/JSArray.h:
1802         * runtime/JSGlobalObjectFunctions.cpp:
1803         (JSC::encode):
1804         (JSC::parseInt):
1805         (JSC::globalFuncJSCPrint):
1806         * runtime/JSString.h:
1807         (JSC::RopeBuilder::JSString):
1808         * runtime/UString.cpp:
1809         (JSC::UString::toDouble):
1810         (JSC::UString::UTF8String):
1811         * runtime/UString.h:
1812         (JSC::UString::isNull):
1813         (JSC::UString::isEmpty):
1814         (JSC::UString::impl):
1815         (JSC::UString::cost):
1816         (JSC::UString::~UString):
1817         (JSC::UString::toArrayIndex):
1818         * wtf/text/WTFString.cpp:
1819         (WTF::String::utf8):
1820         * wtf/text/WTFString.h:
1821         (WTF::String::String):
1822         (WTF::String::isHashTableDeletedValue):
1823         (WTF::String::length):
1824         (WTF::String::operator[]):
1825         (WTF::String::isNull):
1826         (WTF::String::isEmpty):
1827         (WTF::String::impl):
1828
1829 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
1830
1831         Windows build fix.
1832
1833         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1834
1835 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
1836
1837         Reviewed by Sam Weinig
1838
1839         Unify UString::UTF8String() & String::utf8() methods,
1840         remove UString::cost() & make atArrayIndex a free function.
1841
1842         * JavaScriptCore.exp:
1843         * bytecode/CodeBlock.cpp:
1844         (JSC::constantName):
1845         (JSC::idName):
1846         (JSC::CodeBlock::registerName):
1847         (JSC::regexpName):
1848         (JSC::printGlobalResolveInfo):
1849         (JSC::printStructureStubInfo):
1850         (JSC::CodeBlock::printStructure):
1851         (JSC::CodeBlock::printStructures):
1852         * jsc.cpp:
1853         (functionPrint):
1854         (functionDebug):
1855         (runInteractive):
1856         (fillBufferWithContentsOfFile):
1857         * pcre/pcre_exec.cpp:
1858         (Histogram::~Histogram):
1859         * profiler/CallIdentifier.h:
1860         (JSC::CallIdentifier::c_str):
1861         * profiler/Profile.cpp:
1862         (JSC::Profile::debugPrintDataSampleStyle):
1863         * profiler/ProfileGenerator.cpp:
1864         (JSC::ProfileGenerator::willExecute):
1865         (JSC::ProfileGenerator::didExecute):
1866         * profiler/ProfileNode.cpp:
1867         (JSC::ProfileNode::debugPrintData):
1868         (JSC::ProfileNode::debugPrintDataSampleStyle):
1869         * runtime/Arguments.cpp:
1870         (JSC::Arguments::getOwnPropertySlot):
1871         (JSC::Arguments::getOwnPropertyDescriptor):
1872         (JSC::Arguments::put):
1873         (JSC::Arguments::deleteProperty):
1874         * runtime/DateConversion.cpp:
1875         (JSC::parseDate):
1876         * runtime/Identifier.h:
1877         (JSC::Identifier::toStrictUInt32):
1878         * runtime/JSArray.cpp:
1879         (JSC::JSArray::getOwnPropertySlot):
1880         (JSC::JSArray::getOwnPropertyDescriptor):
1881         (JSC::JSArray::put):
1882         (JSC::JSArray::deleteProperty):
1883         * runtime/JSArray.h:
1884         (JSC::toArrayIndex):
1885         * runtime/JSGlobalObjectFunctions.cpp:
1886         (JSC::encode):
1887         (JSC::parseInt):
1888         (JSC::globalFuncJSCPrint):
1889         * runtime/JSString.h:
1890         (JSC::RopeBuilder::JSString):
1891         * runtime/UString.cpp:
1892         (JSC::UString::toDouble):
1893         (JSC::putUTF8Triple):
1894         (JSC::UString::utf8):
1895         * runtime/UString.h:
1896         (JSC::UString::~UString):
1897         (JSC::UString::isNull):
1898         (JSC::UString::isEmpty):
1899         (JSC::UString::impl):
1900         * wtf/text/WTFString.cpp:
1901         (WTF::String::utf8):
1902         * wtf/text/WTFString.h:
1903         (WTF::String::~String):
1904         (WTF::String::swap):
1905         (WTF::String::isNull):
1906         (WTF::String::isEmpty):
1907         (WTF::String::impl):
1908         (WTF::String::length):
1909         (WTF::String::String):
1910         (WTF::String::isHashTableDeletedValue):
1911
1912 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
1913
1914         Eeerk! - revert accidentally committed changes in UString!
1915
1916         * JavaScriptCore.exp:
1917         * runtime/UString.cpp:
1918         (JSC::UString::UString):
1919         * runtime/UString.h:
1920
1921 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
1922
1923         Reviewed by Sam Weinig
1924
1925         Change UString constructors to match those in WTF::String.
1926         This changes behaviour of UString((char*)0) to create null
1927         strings, akin to UString() rather than UString::empty().
1928         (This matches String).  Remove unused constructors from
1929         UString, and add null-terminated UTF-16 constructor, to
1930         match String.  Move String's constructor into the .cpp to
1931         match UString.
1932
1933         * JavaScriptCore.exp:
1934         * debugger/DebuggerCallFrame.cpp:
1935         (JSC::DebuggerCallFrame::calculatedFunctionName):
1936         * runtime/RegExpKey.h:
1937         (JSC::RegExpKey::RegExpKey):
1938         * runtime/SmallStrings.cpp:
1939         (JSC::SmallStrings::createSingleCharacterString):
1940         * runtime/UString.cpp:
1941         (JSC::UString::UString):
1942         * runtime/UString.h:
1943         (JSC::UString::UString):
1944         (JSC::UString::swap):
1945         (JSC::UString::adopt):
1946         (JSC::UString::operator[]):
1947         * wtf/text/WTFString.h:
1948         (WTF::String::String):
1949         (WTF::String::adopt):
1950         (WTF::String::operator[]):
1951
1952 2010-08-12  David Levin  <levin@chromium.org>
1953
1954         Reviewed by NOBODY (build fix).
1955
1956         * runtime/UString.h: Removed unneccessary #include.
1957
1958 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
1959
1960         Reviewed by Sam Weinig
1961
1962         Revert changes to ALWAYS_INLINEness of a couple of functions in UString.
1963         This appears to have degraded performance.
1964
1965         * runtime/UString.cpp:
1966         (JSC::UString::ascii):
1967         * runtime/UString.h:
1968         (JSC::UString::length):
1969         (JSC::UString::isEmpty):
1970         (JSC::UString::~UString):
1971
1972 2010-08-12  Csaba Osztrogonác  <ossy@webkit.org>
1973
1974         Reviewed by Antonio Gomes.
1975
1976         [Qt] Fix warnings: unknown conversion type character 'l' in format
1977         https://bugs.webkit.org/show_bug.cgi?id=43359
1978
1979         Qt port doesn't call any printf in String::format(...), consequently
1980         using __attribute__((format(printf,m,n))) is incorrect and causes
1981         false positive warnings on Windows if you build with MinGW.
1982
1983         Qt port calls QString::vsprintf(...) , which is platform
1984         independent, and handles %lli, %llu and %llx on all platforms.
1985         (http://trac.webkit.org/changeset/35712)
1986
1987         * wtf/text/WTFString.h:
1988
1989 2010-08-12  Gabor Loki  <loki@webkit.org>
1990
1991         Reviewed by Geoffrey Garen.
1992
1993         Fix the array subscript is above array bounds warning in ByteArray on ARM.
1994         https://bugs.webkit.org/show_bug.cgi?id=43358
1995
1996         The warning is very similar to this one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861
1997
1998         * wtf/ByteArray.cpp:
1999         (WTF::ByteArray::create):
2000
2001 2010-08-12  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2002
2003         Reviewed by Martin Robinson.
2004
2005         [GTK] Use GSettings to save/restore Web Inspector settings
2006         https://bugs.webkit.org/show_bug.cgi?id=43512
2007
2008         * wtf/gobject/GRefPtr.cpp: Added support for GVariant, used by our
2009         GSettings support.
2010         (WTF::refGPtr):
2011         (WTF::derefGPtr):
2012         * wtf/gobject/GRefPtr.h:
2013
2014 2010-08-12  Gabor Loki  <loki@webkit.org>
2015
2016         Reviewed by Simon Hausmann.
2017
2018         The scratch register should be saved in YARR with ARM JIT
2019         https://bugs.webkit.org/show_bug.cgi?id=43910
2020
2021         Reported by Jocelyn Turcotte.
2022
2023         * yarr/RegexJIT.cpp:
2024         (JSC::Yarr::RegexGenerator::generateEnter):
2025         (JSC::Yarr::RegexGenerator::generateReturn):
2026
2027 2010-08-11  Gavin Barraclough  <barraclough@apple.com>
2028
2029         Windows build fix.
2030
2031         * JavaScriptCore.xcodeproj/project.pbxproj:
2032         * wtf/Forward.h:
2033
2034 2010-08-11  Leo Yang  <leo.yang@torchmobile.com.cn>
2035
2036         Reviewed by Geoffrey Garen.
2037
2038         Date("") should be an invalid date. For IE, Firefox and Chrome, Date("") is invalid date,
2039         which means isNaN(new Date("")) should return true.
2040         https://bugs.webkit.org/show_bug.cgi?id=43793
2041         Tests: fast/js/date-constructor.html
2042
2043         * runtime/JSGlobalData.cpp:
2044         (JSC::JSGlobalData::resetDateCache):
2045
2046 2010-08-11  Gavin Barraclough  <barraclough@apple.com>
2047
2048         Windows & !JIT build fix.
2049
2050         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2051         * JavaScriptCore.xcodeproj/project.pbxproj:
2052         * runtime/RegExp.cpp:
2053         (JSC::RegExp::match):
2054
2055 2010-08-11  Gavin Barraclough  <barraclough@apple.com>
2056
2057         Rubber stamp by sam weinig
2058
2059         Touch a file to stop the bot rolling a bit change out!
2060
2061         * runtime/UString.cpp:
2062         (JSC::UString::ascii):
2063
2064 2010-08-11  Kevin Ollivier  <kevino@theolliviers.com>
2065
2066         [wx] Build fix for wx and WebDOM bindings, add CString classes to the list of forwards.
2067
2068         * wtf/Forward.h:
2069
2070 2010-08-11  Gavin Barraclough  <barraclough@apple.com>
2071
2072         Rubber stamps by Darin Adler & Sam Weinig.
2073
2074         Bug 43867 - Some UString cleanup
2075
2076         Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String.
2077         Move string concatenation methods to a new header to simplify down UString.h.  Remove is8Bit().
2078
2079         * API/JSClassRef.cpp:
2080         (OpaqueJSClass::~OpaqueJSClass):
2081         (OpaqueJSClass::className):
2082         * API/OpaqueJSString.cpp:
2083         (OpaqueJSString::create):
2084         * JavaScriptCore.exp:
2085         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2086         * JavaScriptCore.xcodeproj/project.pbxproj:
2087         * bytecode/CodeBlock.cpp:
2088         (JSC::constantName):
2089         (JSC::idName):
2090         (JSC::CodeBlock::registerName):
2091         (JSC::regexpName):
2092         * bytecode/EvalCodeCache.h:
2093         (JSC::EvalCodeCache::get):
2094         * bytecompiler/NodesCodegen.cpp:
2095         (JSC::ResolveNode::emitBytecode):
2096         (JSC::FunctionCallResolveNode::emitBytecode):
2097         (JSC::ReadModifyResolveNode::emitBytecode):
2098         (JSC::processClauseList):
2099         * parser/ASTBuilder.h:
2100         (JSC::ASTBuilder::createRegex):
2101         * parser/ParserArena.h:
2102         (JSC::IdentifierArena::makeNumericIdentifier):
2103         * parser/SourceProvider.h:
2104         (JSC::UStringSourceProvider::data):
2105         (JSC::UStringSourceProvider::length):
2106         * profiler/Profiler.cpp:
2107         * runtime/Arguments.cpp:
2108         (JSC::Arguments::getOwnPropertySlot):
2109         (JSC::Arguments::getOwnPropertyNames):
2110         (JSC::Arguments::put):
2111         (JSC::Arguments::deleteProperty):
2112         * runtime/ArrayPrototype.cpp:
2113         (JSC::arrayProtoFuncToString):
2114         * runtime/DatePrototype.cpp:
2115         (JSC::formatLocaleDate):
2116         * runtime/ExceptionHelpers.cpp:
2117         * runtime/FunctionConstructor.cpp:
2118         * runtime/FunctionPrototype.cpp:
2119         (JSC::insertSemicolonIfNeeded):
2120         * runtime/Identifier.h:
2121         (JSC::Identifier::characters):
2122         (JSC::Identifier::length):
2123         * runtime/JSGlobalObjectFunctions.cpp:
2124         (JSC::decode):
2125         (JSC::parseInt):
2126         (JSC::parseFloat):
2127         (JSC::globalFuncEscape):
2128         (JSC::globalFuncUnescape):
2129         * runtime/JSNumberCell.cpp:
2130         (JSC::JSNumberCell::toString):
2131         * runtime/JSONObject.cpp:
2132         (JSC::gap):
2133         (JSC::Stringifier::appendQuotedString):
2134         (JSC::Stringifier::appendStringifiedValue):
2135         (JSC::Stringifier::indent):
2136         (JSC::Stringifier::unindent):
2137         (JSC::Walker::walk):
2138         * runtime/JSString.cpp:
2139         (JSC::JSString::replaceCharacter):
2140         (JSC::JSString::getIndexSlowCase):
2141         * runtime/JSString.h:
2142         (JSC::RopeBuilder::JSString):
2143         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
2144         (JSC::RopeBuilder::fiberCount):
2145         (JSC::jsSingleCharacterSubstring):
2146         (JSC::jsNontrivialString):
2147         (JSC::JSString::getIndex):
2148         (JSC::jsString):
2149         (JSC::jsStringWithFinalizer):
2150         (JSC::jsSubstring):
2151         (JSC::jsOwnedString):
2152         * runtime/JSStringBuilder.h:
2153         (JSC::JSStringBuilder::append):
2154         * runtime/LiteralParser.h:
2155         (JSC::LiteralParser::Lexer::Lexer):
2156         * runtime/NumberPrototype.cpp:
2157         (JSC::numberProtoFuncToString):
2158         (JSC::numberProtoFuncToFixed):
2159         (JSC::numberProtoFuncToExponential):
2160         (JSC::numberProtoFuncToPrecision):
2161         * runtime/NumericStrings.h:
2162         (JSC::NumericStrings::add):
2163         (JSC::NumericStrings::lookupSmallString):
2164         * runtime/Operations.h:
2165         (JSC::jsString):
2166         * runtime/RegExp.cpp:
2167         (JSC::RegExp::match):
2168         * runtime/RegExpCache.cpp:
2169         (JSC::RegExpCache::lookupOrCreate):
2170         (JSC::RegExpCache::create):
2171         * runtime/RegExpConstructor.cpp:
2172         (JSC::RegExpConstructor::getRightContext):
2173         * runtime/RegExpObject.cpp:
2174         (JSC::RegExpObject::match):
2175         * runtime/RegExpPrototype.cpp:
2176         (JSC::regExpProtoFuncToString):
2177         * runtime/StringBuilder.h:
2178         (JSC::StringBuilder::append):
2179         * runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h.
2180         (JSC::):
2181         (JSC::sumWithOverflow):
2182         (JSC::tryMakeString):
2183         (JSC::makeString):
2184         * runtime/StringObject.cpp:
2185         (JSC::StringObject::getOwnPropertyNames):
2186         * runtime/StringPrototype.cpp:
2187         (JSC::substituteBackreferencesSlow):
2188         (JSC::localeCompare):
2189         (JSC::jsSpliceSubstringsWithSeparators):
2190         (JSC::stringProtoFuncReplace):
2191         (JSC::stringProtoFuncCharAt):
2192         (JSC::stringProtoFuncCharCodeAt):
2193         (JSC::stringProtoFuncIndexOf):
2194         (JSC::stringProtoFuncLastIndexOf):
2195         (JSC::stringProtoFuncSlice):
2196         (JSC::stringProtoFuncSplit):
2197         (JSC::stringProtoFuncSubstr):
2198         (JSC::stringProtoFuncSubstring):
2199         (JSC::stringProtoFuncToLowerCase):
2200         (JSC::stringProtoFuncToUpperCase):
2201         (JSC::stringProtoFuncFontsize):
2202         (JSC::stringProtoFuncLink):
2203         (JSC::trimString):
2204         * runtime/UString.cpp:
2205         (JSC::UString::number):
2206         (JSC::UString::ascii):
2207         (JSC::UString::operator[]):
2208         (JSC::UString::toDouble):
2209         (JSC::UString::find):
2210         (JSC::UString::rfind):
2211         (JSC::UString::substr):
2212         (JSC::operator==):
2213         (JSC::operator<):
2214         (JSC::operator>):
2215         (JSC::UString::UTF8String):
2216         * runtime/UString.h:
2217         (JSC::UString::UString):
2218         (JSC::UString::adopt):
2219         (JSC::UString::length):
2220         (JSC::UString::characters):
2221         (JSC::UString::isNull):
2222         (JSC::UString::isEmpty):
2223         (JSC::UString::impl):
2224         (JSC::UString::cost):
2225         (JSC::operator==):
2226         (JSC::operator!=):
2227         (JSC::codePointCompare):
2228         (JSC::UString::toArrayIndex):
2229         (JSC::IdentifierRepHash::hash):
2230         (WTF::):
2231         * yarr/RegexJIT.cpp:
2232         (JSC::Yarr::jitCompileRegex):
2233         * yarr/RegexParser.h:
2234         (JSC::Yarr::Parser::Parser):
2235
2236 2010-08-11  Gabor Loki  <loki@webkit.org>
2237
2238         Qt build fix (ARMv7).
2239
2240         Fix invalid conversion from int to Condition.
2241         Add ARMv7Assembler.cpp to JavaScriptCore.pro.
2242
2243         * JavaScriptCore.pro:
2244         * assembler/ARMv7Assembler.h:
2245         (JSC::ARMv7Assembler::):
2246         (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
2247
2248 2010-08-11  Nathan Lawrence  <nlawrence@apple.com>
2249
2250         Reviewed by Geoffrey Garen.
2251
2252         At collection time, we frequently want to mark a cell, while checking
2253         whether it was originally checked.  Previously, this was a get
2254         operation follwed by a set operation.  Fusing the two saves
2255         computation and gives a 0.5% sunspider speedup.
2256
2257         * runtime/Collector.h:
2258         (JSC::CollectorBitmap::getset):
2259         (JSC::Heap::checkMarkCell):
2260         * runtime/JSArray.h:
2261         (JSC::MarkStack::drain):
2262         * runtime/JSCell.h:
2263         (JSC::MarkStack::append):
2264
2265 2010-08-11  Steve Falkenburg  <sfalken@apple.com>
2266
2267         Reviewed by Adam Roben.
2268
2269         Improve vsprops copying for Windows build
2270         https://bugs.webkit.org/show_bug.cgi?id=41982
2271
2272         When we detect a new SDK, always copy a new set of vsprops files.
2273         Previously, if someone updated their SDK after updating their sources,
2274         they could end up with out-of-date vsprops files.
2275
2276         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2277
2278 2010-08-10  Darin Adler  <darin@apple.com>
2279
2280         Reviewed by Sam Weinig.
2281
2282         Add leakRef and clear to all RefPtr variants
2283         https://bugs.webkit.org/show_bug.cgi?id=42389
2284
2285         * API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do
2286         "template<...>". We should probably put this in the style guide and do it
2287         consitently. Fixed other minor style issues. Defined many of the inlined
2288         functions outside the class definition, to avoid style checker warnings
2289         about multiple statements on a single line and for slightly better clarity
2290         of the class definition itself. Renamed releaseRef to leakRef. Added a
2291         releaseRef that calls leakRef so we don't have to rename all callers oat
2292         once. Added a clear function.
2293
2294         * wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef.
2295
2296         * wtf/RefPtr.h: Changed all uses of "template <...>" to instead do
2297         "template<...>". Tidied up declarations and comments a bit.
2298          Changed all uses of releaseRef to leakRef.
2299
2300         * wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do
2301         "template<...>". Defined many of the inlined functions outside the class
2302         definition, to avoid style checker warnings about multiple statements on
2303         a single line and for slightly better clarity of the class definition itself.
2304         Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
2305         don't have to rename all callers at once. Added a clear function.
2306
2307 2010-08-10  Dumitru Daniliuc  <dumi@chromium.org>
2308
2309         Unreviewed, reverting an unintentional change to a file submitted in r65108.
2310
2311         * bytecode/CodeBlock.h:
2312         (JSC::binaryChop):
2313
2314 2010-08-10  Gavin Barraclough  <barraclough@apple.com>
2315
2316         Rubber stamped by Sam Weinig
2317
2318         Bug 43817 - Remove UString::Rep
2319         UString::Rep has for a long time been replaced by UStringImpl (Rep
2320         remaining as a typedef).  UStringImpl has since been removed too
2321         (unified with StringImpl). Remove Rep, rename rep() to impl() and
2322         m_rep to m_impl.  Also add impl() method to Identifier, and rename
2323         its UString member from _ustring to m_string.
2324
2325         * API/JSCallbackObject.h:
2326         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
2327         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
2328         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
2329         * API/JSCallbackObjectFunctions.h:
2330         (JSC::::getOwnPropertySlot):
2331         (JSC::::put):
2332         (JSC::::deleteProperty):
2333         (JSC::::getOwnPropertyNames):
2334         (JSC::::staticValueGetter):
2335         (JSC::::staticFunctionGetter):
2336         * API/JSClassRef.cpp:
2337         (tryCreateStringFromUTF8):
2338         (OpaqueJSClass::OpaqueJSClass):
2339         (OpaqueJSClass::~OpaqueJSClass):
2340         (OpaqueJSClassContextData::OpaqueJSClassContextData):
2341         * API/JSClassRef.h:
2342         * API/OpaqueJSString.cpp:
2343         (OpaqueJSString::ustring):
2344         * bytecode/EvalCodeCache.h:
2345         (JSC::EvalCodeCache::get):
2346         * bytecode/JumpTable.h:
2347         (JSC::StringJumpTable::offsetForValue):
2348         (JSC::StringJumpTable::ctiForValue):
2349         * bytecompiler/BytecodeGenerator.cpp:
2350         (JSC::BytecodeGenerator::addVar):
2351         (JSC::BytecodeGenerator::addGlobalVar):
2352         (JSC::BytecodeGenerator::BytecodeGenerator):
2353         (JSC::BytecodeGenerator::addParameter):
2354         (JSC::BytecodeGenerator::registerFor):
2355         (JSC::BytecodeGenerator::willResolveToArguments):
2356         (JSC::BytecodeGenerator::uncheckedRegisterForArguments):
2357         (JSC::BytecodeGenerator::constRegisterFor):
2358         (JSC::BytecodeGenerator::isLocal):
2359         (JSC::BytecodeGenerator::isLocalConstant):
2360         (JSC::BytecodeGenerator::addConstant):
2361         (JSC::BytecodeGenerator::emitLoad):
2362         (JSC::BytecodeGenerator::findScopedProperty):
2363         (JSC::keyForCharacterSwitch):
2364         (JSC::prepareJumpTableForStringSwitch):
2365         * bytecompiler/BytecodeGenerator.h:
2366         * bytecompiler/NodesCodegen.cpp:
2367         (JSC::processClauseList):
2368         * interpreter/Interpreter.cpp:
2369         (JSC::Interpreter::privateExecute):
2370         * jit/JITStubs.cpp:
2371         (JSC::DEFINE_STUB_FUNCTION):
2372         * parser/JSParser.cpp:
2373         (JSC::JSParser::parseStrictObjectLiteral):
2374         * pcre/pcre_exec.cpp:
2375         (Histogram::add):
2376         * profiler/CallIdentifier.h:
2377         (JSC::CallIdentifier::Hash::hash):
2378         * profiler/Profile.cpp:
2379         * profiler/ProfileNode.cpp:
2380         (JSC::ProfileNode::debugPrintDataSampleStyle):
2381         * profiler/ProfileNode.h:
2382         * runtime/ArrayPrototype.cpp:
2383         (JSC::arrayProtoFuncToString):
2384         * runtime/Identifier.cpp:
2385         (JSC::Identifier::equal):
2386         (JSC::IdentifierCStringTranslator::hash):
2387         (JSC::IdentifierCStringTranslator::equal):
2388         (JSC::IdentifierCStringTranslator::translate):
2389         (JSC::Identifier::add):
2390         (JSC::IdentifierUCharBufferTranslator::hash):
2391         (JSC::IdentifierUCharBufferTranslator::equal):
2392         (JSC::IdentifierUCharBufferTranslator::translate):
2393         (JSC::Identifier::addSlowCase):
2394         * runtime/Identifier.h:
2395         (JSC::Identifier::Identifier):
2396         (JSC::Identifier::ustring):
2397         (JSC::Identifier::impl):
2398         (JSC::Identifier::data):
2399         (JSC::Identifier::size):
2400         (JSC::Identifier::ascii):
2401         (JSC::Identifier::isNull):
2402         (JSC::Identifier::isEmpty):
2403         (JSC::Identifier::toUInt32):
2404         (JSC::Identifier::toStrictUInt32):
2405         (JSC::Identifier::toArrayIndex):
2406         (JSC::Identifier::toDouble):
2407         (JSC::Identifier::equal):
2408         (JSC::Identifier::add):
2409         * runtime/InitializeThreading.cpp:
2410         (JSC::initializeThreadingOnce):
2411         * runtime/InternalFunction.cpp:
2412         (JSC::InternalFunction::displayName):
2413         * runtime/JSFunction.cpp:
2414         (JSC::JSFunction::displayName):
2415         * runtime/JSGlobalObject.h:
2416         (JSC::JSGlobalObject::addStaticGlobals):
2417         * runtime/JSStaticScopeObject.h:
2418         (JSC::JSStaticScopeObject::JSStaticScopeObject):
2419         * runtime/JSString.h:
2420         (JSC::):
2421         (JSC::RopeBuilder::appendStringInConstruct):
2422         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
2423         (JSC::jsSingleCharacterSubstring):
2424         (JSC::jsSubstring):
2425         * runtime/JSVariableObject.cpp:
2426         (JSC::JSVariableObject::deleteProperty):
2427         (JSC::JSVariableObject::symbolTableGet):
2428         * runtime/JSVariableObject.h:
2429         (JSC::JSVariableObject::symbolTableGet):
2430         (JSC::JSVariableObject::symbolTablePut):
2431         (JSC::JSVariableObject::symbolTablePutWithAttributes):
2432         * runtime/Lookup.cpp:
2433         (JSC::HashTable::createTable):
2434         (JSC::HashTable::deleteTable):
2435         * runtime/Lookup.h:
2436         (JSC::HashEntry::initialize):
2437         (JSC::HashEntry::setKey):
2438         (JSC::HashEntry::key):
2439         (JSC::HashTable::entry):
2440         * runtime/PropertyMapHashTable.h:
2441         (JSC::PropertyMapEntry::PropertyMapEntry):
2442         * runtime/PropertyNameArray.cpp:
2443         (JSC::PropertyNameArray::add):
2444         * runtime/PropertyNameArray.h:
2445         (JSC::PropertyNameArray::add):
2446         (JSC::PropertyNameArray::addKnownUnique):
2447         * runtime/RegExp.cpp:
2448         (JSC::RegExp::match):
2449         * runtime/RegExpCache.cpp:
2450         (JSC::RegExpCache::create):
2451         * runtime/RegExpKey.h:
2452         (JSC::RegExpKey::RegExpKey):
2453         * runtime/SmallStrings.cpp:
2454         (JSC::SmallStringsStorage::rep):
2455         (JSC::SmallStrings::singleCharacterStringRep):
2456         * runtime/SmallStrings.h:
2457         * runtime/StringPrototype.cpp:
2458         (JSC::jsSpliceSubstringsWithSeparators):
2459         (JSC::stringProtoFuncMatch):
2460         (JSC::stringProtoFuncSearch):
2461         * runtime/Structure.cpp:
2462         (JSC::Structure::~Structure):
2463         (JSC::Structure::despecifyDictionaryFunction):
2464         (JSC::Structure::addPropertyTransitionToExistingStructure):
2465         (JSC::Structure::addPropertyTransition):
2466         (JSC::Structure::copyPropertyTable):
2467         (JSC::Structure::get):
2468         (JSC::Structure::despecifyFunction):
2469         (JSC::Structure::put):
2470         (JSC::Structure::hasTransition):
2471         (JSC::Structure::remove):
2472         (JSC::Structure::checkConsistency):
2473         * runtime/Structure.h:
2474         (JSC::Structure::get):
2475         (JSC::Structure::hasTransition):
2476         * runtime/StructureTransitionTable.h:
2477         * runtime/SymbolTable.h:
2478         * runtime/UString.cpp:
2479         (JSC::UString::UString):
2480         (JSC::UString::toStrictUInt32):
2481         (JSC::UString::substr):
2482         * runtime/UString.h:
2483         (JSC::UString::UString):
2484         (JSC::UString::adopt):
2485         (JSC::UString::data):
2486         (JSC::UString::size):
2487         (JSC::UString::isNull):
2488         (JSC::UString::isEmpty):
2489         (JSC::UString::impl):
2490         (JSC::UString::cost):
2491         (JSC::operator==):
2492         (JSC::codePointCompare):
2493         (JSC::IdentifierRepHash::hash):
2494         (WTF::):
2495
2496 2010-08-10  Gavin Barraclough  <barraclough@apple.com>
2497
2498         Bug 43816 - Remove UStringImpl
2499         The class was actually removed a long time ago, replaced by StringImpl.
2500         UStringImpl is just a typedef onto StringImpl.  Remove this.
2501
2502         * API/JSClassRef.cpp:
2503         (OpaqueJSClass::OpaqueJSClass):
2504         * JavaScriptCore.xcodeproj/project.pbxproj:
2505         * runtime/JSString.cpp:
2506         (JSC::JSString::resolveRope):
2507         (JSC::JSString::replaceCharacter):
2508         * runtime/JSString.h:
2509         (JSC::RopeBuilder::RopeIterator::operator*):
2510         (JSC::RopeBuilder::JSString):
2511         (JSC::RopeBuilder::appendStringInConstruct):
2512         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
2513         (JSC::jsSingleCharacterSubstring):
2514         (JSC::jsSubstring):
2515         * runtime/JSStringBuilder.h:
2516         (JSC::jsMakeNontrivialString):
2517         * runtime/RopeImpl.cpp:
2518         (JSC::RopeImpl::derefFibersNonRecursive):
2519         * runtime/RopeImpl.h:
2520         (JSC::RopeImpl::deref):
2521         * runtime/SmallStrings.cpp:
2522         (JSC::SmallStringsStorage::SmallStringsStorage):
2523         * runtime/StringConstructor.cpp:
2524         (JSC::stringFromCharCodeSlowCase):
2525         * runtime/StringPrototype.cpp:
2526         (JSC::jsSpliceSubstringsWithSeparators):
2527         (JSC::stringProtoFuncFontsize):
2528         (JSC::stringProtoFuncLink):
2529         * runtime/UString.cpp:
2530         (JSC::initializeUString):
2531         * runtime/UString.h:
2532         (JSC::UString::adopt):
2533         (JSC::tryMakeString):
2534         (JSC::makeString):
2535         * runtime/UStringImpl.h: Removed.
2536
2537 2010-08-10  Patrick Gansterer  <paroga@paroga.com>
2538
2539         Reviewed by Eric Seidel.
2540
2541         Make FastMalloc more portable.
2542         https://bugs.webkit.org/show_bug.cgi?id=41790
2543
2544         * wtf/FastMalloc.cpp:
2545         (WTF::TCMalloc_Central_FreeList::Populate):
2546         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2547
2548 2010-08-10  Patrick Gansterer  <paroga@paroga.com>
2549
2550         Reviewed by David Levin.
2551
2552         [WINCE] Buildfix for CE 6.0
2553         https://bugs.webkit.org/show_bug.cgi?id=43027
2554
2555         CE 6.0 doesn't define localtime in the system include files.
2556
2557         * wtf/Platform.h: Include ce_time.h on all OS(WINCE).
2558
2559 2010-08-10  Gavin Barraclough  <barraclough@apple.com>
2560
2561         Rubber stamped by Sam Weinig.
2562
2563         Bug 43786 - Move AtomicStringHash from WebCore to WTF
2564         Also remove deprecated string headers from WebCore/platform/text.
2565
2566         * GNUmakefile.am:
2567         * JavaScriptCore.gypi:
2568         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2569         * JavaScriptCore.xcodeproj/project.pbxproj:
2570         * wtf/text/AtomicString.h:
2571         * wtf/text/AtomicStringHash.h: Copied from WebCore/platform/text/AtomicStringHash.h.
2572
2573 2010-08-09  Oliver Hunt  <oliver@apple.com>
2574
2575         Fix Qt/ARM again, this time including the other changed file.
2576
2577         * jit/JIT.h:
2578
2579 2010-08-09  Oliver Hunt  <oliver@apple.com>
2580
2581         Fix Qt/ARM
2582
2583         C++ overload resolution I stab at thee
2584
2585         * jit/JITInlineMethods.h:
2586         (JSC::JIT::beginUninterruptedSequence):
2587         (JSC::JIT::endUninterruptedSequence):
2588
2589 2010-08-09  Oliver Hunt  <oliver@apple.com>
2590
2591         Reviewed by Gavin Barraclough.
2592
2593         Allow an assembler/macroassembler to compact branches to more concise forms when linking
2594         https://bugs.webkit.org/show_bug.cgi?id=43745
2595
2596         This patch makes it possible for an assembler to convert jumps into a different
2597         (presumably more efficient) form at link time.  Currently implemented in the
2598         ARMv7 JIT as that already had logic to delay linking of jumps until the end of
2599         compilation already.  The ARMv7 JIT chooses between either a 4 byte short jump
2600         or a full 32-bit offset (and rewrites ITTT instructions as appropriate), so does
2601         not yet produce the most compact form possible.  The general design of the linker
2602         should make it relatively simple to introduce new branch types with little effort,
2603         as the linker has no knowledge of the exact form of any of the branches.
2604
2605         * JavaScriptCore.xcodeproj/project.pbxproj:
2606         * assembler/ARMv7Assembler.cpp: Added.
2607         (JSC::):
2608           Record jump sizes
2609
2610         * assembler/ARMv7Assembler.h:
2611         (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
2612         (JSC::ARMv7Assembler::LinkRecord::from):
2613         (JSC::ARMv7Assembler::LinkRecord::setFrom):
2614         (JSC::ARMv7Assembler::LinkRecord::to):
2615         (JSC::ARMv7Assembler::LinkRecord::type):
2616         (JSC::ARMv7Assembler::LinkRecord::linkType):
2617         (JSC::ARMv7Assembler::LinkRecord::setLinkType):
2618           Encapsulate LinkRecord fields so we can compress the values somewhat
2619
2620         (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
2621           Need to record the jump type now
2622
2623         (JSC::ARMv7Assembler::b):
2624         (JSC::ARMv7Assembler::blx):
2625         (JSC::ARMv7Assembler::bx):
2626           Need to pass the jump types
2627
2628         (JSC::ARMv7Assembler::executableOffsetFor):
2629         (JSC::ARMv7Assembler::jumpSizeDelta):
2630         (JSC::ARMv7Assembler::linkRecordSourceComparator):
2631         (JSC::ARMv7Assembler::computeJumpType):
2632         (JSC::ARMv7Assembler::convertJumpTo):
2633         (JSC::ARMv7Assembler::recordLinkOffsets):
2634         (JSC::ARMv7Assembler::jumpsToLink):
2635         (JSC::ARMv7Assembler::link):
2636         (JSC::ARMv7Assembler::unlinkedCode):
2637           Helper functions for the linker
2638
2639         (JSC::ARMv7Assembler::linkJump):
2640         (JSC::ARMv7Assembler::canBeShortJump):
2641         (JSC::ARMv7Assembler::linkLongJump):
2642         (JSC::ARMv7Assembler::linkShortJump):
2643         (JSC::ARMv7Assembler::linkJumpAbsolute):
2644            Moving code around for the various jump linking functions
2645
2646         * assembler/AbstractMacroAssembler.h:
2647         (JSC::AbstractMacroAssembler::beginUninterruptedSequence):
2648         (JSC::AbstractMacroAssembler::endUninterruptedSequence):
2649           We have to track uninterrupted sequences in any assembler that compacts
2650           branches as that's not something we're allowed to do in such sequences.
2651           AbstractMacroAssembler has a nop version of these functions as it makes the
2652           code elsewhere nicer.
2653
2654         * assembler/LinkBuffer.h:
2655         (JSC::LinkBuffer::LinkBuffer):
2656         (JSC::LinkBuffer::link):
2657         (JSC::LinkBuffer::patch):
2658         (JSC::LinkBuffer::locationOf):
2659         (JSC::LinkBuffer::locationOfNearCall):
2660         (JSC::LinkBuffer::returnAddressOffset):
2661         (JSC::LinkBuffer::trampolineAt):
2662           Updated these functions to adjust for any changed offsets in the linked code
2663
2664         (JSC::LinkBuffer::applyOffset):
2665           A helper function to deal with the now potentially moved labels
2666
2667         (JSC::LinkBuffer::linkCode):
2668           The new and mighty linker function
2669
2670         * assembler/MacroAssemblerARMv7.h:
2671         (JSC::MacroAssemblerARMv7::MacroAssemblerARMv7):
2672         (JSC::MacroAssemblerARMv7::beginUninterruptedSequence):
2673         (JSC::MacroAssemblerARMv7::endUninterruptedSequence):
2674         (JSC::MacroAssemblerARMv7::jumpsToLink):
2675         (JSC::MacroAssemblerARMv7::unlinkedCode):
2676         (JSC::MacroAssemblerARMv7::computeJumpType):
2677         (JSC::MacroAssemblerARMv7::convertJumpTo):
2678         (JSC::MacroAssemblerARMv7::recordLinkOffsets):
2679         (JSC::MacroAssemblerARMv7::jumpSizeDelta):
2680         (JSC::MacroAssemblerARMv7::link):
2681         (JSC::MacroAssemblerARMv7::jump):
2682         (JSC::MacroAssemblerARMv7::branchMul32):
2683         (JSC::MacroAssemblerARMv7::breakpoint):
2684         (JSC::MacroAssemblerARMv7::nearCall):
2685         (JSC::MacroAssemblerARMv7::call):
2686         (JSC::MacroAssemblerARMv7::ret):
2687         (JSC::MacroAssemblerARMv7::tailRecursiveCall):
2688         (JSC::MacroAssemblerARMv7::executableOffsetFor):
2689         (JSC::MacroAssemblerARMv7::inUninterruptedSequence):
2690         (JSC::MacroAssemblerARMv7::makeJump):
2691         (JSC::MacroAssemblerARMv7::makeBranch):
2692            All branches need to pass on their type now
2693
2694         * jit/ExecutableAllocator.h:
2695         (JSC::ExecutablePool::returnLastBytes):
2696            We can't know ahead of time how much space will be necessary to
2697            hold the linked code if we're compacting branches, this new
2698            function allows us to return the unused bytes at the end of linking
2699
2700         * jit/JIT.cpp:
2701         (JSC::JIT::JIT):
2702         (JSC::JIT::privateCompile):
2703         * jit/JIT.h:
2704         (JSC::JIT::compile):
2705            The JIT class now needs to take a linker offset so that recompilation
2706            can generate the same jumps when using branch compaction.
2707         * jit/JITArithmetic32_64.cpp:
2708         (JSC::JIT::emitSlow_op_mod):
2709         * jit/JITOpcodes.cpp:
2710         (JSC::JIT::privateCompileCTIMachineTrampolines):
2711         * jit/JITOpcodes32_64.cpp:
2712         (JSC::JIT::privateCompileCTIMachineTrampolines):
2713         (JSC::JIT::privateCompileCTINativeCall):
2714           Update for new trampolineAt changes
2715
2716         * wtf/FastMalloc.cpp:
2717         (WTF::TCMallocStats::):
2718         * wtf/Platform.h:
2719
2720 2010-08-09  Gavin Barraclough  <barraclough@apple.com>
2721
2722         Qt build fix III.
2723
2724         * wtf/text/WTFString.h:
2725
2726 2010-08-09  Gavin Barraclough  <barraclough@apple.com>
2727
2728         Qt build fix.
2729
2730         * wtf/qt/StringQt.cpp:
2731
2732 2010-08-06  Gavin Barraclough  <barraclough@apple.com>
2733
2734         Rubber stamped by Sam Weinig
2735
2736         Bug 43594 - Add string forwards to Forward.h
2737         This allows us to remove forward declarations for these classes from
2738         WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
2739
2740         * JavaScriptCore.xcodeproj/project.pbxproj:
2741         * wtf/Forward.h:
2742
2743 2010-08-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2744
2745         Unreviewed, rolling out r64938.
2746         http://trac.webkit.org/changeset/64938
2747         https://bugs.webkit.org/show_bug.cgi?id=43685
2748
2749         Did not compile on several ports (Requested by abarth on
2750         #webkit).
2751
2752         * Android.mk:
2753         * CMakeLists.txt:
2754         * GNUmakefile.am:
2755         * JavaScriptCore.gypi:
2756         * JavaScriptCore.pro:
2757         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2758         * JavaScriptCore.xcodeproj/project.pbxproj:
2759         * assembler/AbstractMacroAssembler.h:
2760         * assembler/MacroAssembler.h:
2761         * assembler/MacroAssemblerX86.h:
2762         (JSC::MacroAssemblerX86::load32):
2763         (JSC::MacroAssemblerX86::store32):
2764         * assembler/X86Assembler.h:
2765         (JSC::X86Assembler::movl_rm):
2766         (JSC::X86Assembler::movl_mr):
2767         * bytecode/CodeBlock.cpp:
2768         (JSC::CodeBlock::markAggregate):
2769         * bytecode/Instruction.h:
2770         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
2771         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
2772         (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
2773         * bytecode/StructureStubInfo.cpp:
2774         (JSC::StructureStubInfo::deref):
2775         * bytecode/StructureStubInfo.h:
2776         (JSC::StructureStubInfo::initGetByIdProto):
2777         (JSC::StructureStubInfo::initGetByIdChain):
2778         (JSC::StructureStubInfo::):
2779         * jit/JIT.h:
2780         * jit/JITMarkObjects.cpp: Removed.
2781         * jit/JITPropertyAccess.cpp:
2782         (JSC::JIT::compileGetDirectOffset):
2783         (JSC::JIT::testPrototype):
2784         (JSC::JIT::privateCompilePutByIdTransition):
2785         (JSC::JIT::privateCompileGetByIdProto):
2786         (JSC::JIT::privateCompileGetByIdProtoList):
2787         (JSC::JIT::privateCompileGetByIdChainList):
2788         (JSC::JIT::privateCompileGetByIdChain):
2789         * jit/JITPropertyAccess32_64.cpp:
2790         (JSC::JIT::compileGetDirectOffset):
2791         (JSC::JIT::testPrototype):
2792         (JSC::JIT::privateCompilePutByIdTransition):
2793         (JSC::JIT::privateCompileGetByIdProto):
2794         (JSC::JIT::privateCompileGetByIdProtoList):
2795         (JSC::JIT::privateCompileGetByIdChainList):
2796         (JSC::JIT::privateCompileGetByIdChain):
2797         * jit/JITStubs.cpp:
2798         (JSC::setupPolymorphicProtoList):
2799         * wtf/Platform.h:
2800
2801 2010-08-07  Nathan Lawrence  <nlawrence@apple.com>
2802
2803         Reviewed by Geoffrey Garen.
2804
2805         The JIT code contains a number of direct references to GC'd objects.
2806         When we have movable objects, these references will need to be
2807         updated.
2808
2809         * Android.mk:
2810         * CMakeLists.txt:
2811         * GNUmakefile.am:
2812         * JavaScriptCore.gypi:
2813         * JavaScriptCore.pro:
2814         * JavaScriptCore.xcodeproj/project.pbxproj:
2815         * assembler/AbstractMacroAssembler.h:
2816         (JSC::AbstractMacroAssembler::int32AtLocation):
2817         (JSC::AbstractMacroAssembler::pointerAtLocation):
2818         (JSC::AbstractMacroAssembler::jumpTarget):
2819         * assembler/MacroAssembler.h:
2820         (JSC::MacroAssembler::loadPtrWithPatch):
2821             Normally, loadPtr will optimize when the register is eax.  Since
2822             the slightly smaller instruction changes the offsets, it messes up
2823             our ability to repatch the code.  We added this new instruction
2824             that garuntees a constant size.
2825         * assembler/MacroAssemblerX86.h:
2826         (JSC::MacroAssemblerX86::load32WithPatch):
2827             Changed load32 in the same way described above.
2828         (JSC::MacroAssemblerX86::load32):
2829             Moved the logic to optimize laod32 from movl_mr to load32
2830         (JSC::MacroAssemblerX86::store32):
2831             Moved the logic to optimize store32 from movl_rm to store32
2832         * assembler/X86Assembler.h:
2833         (JSC::X86Assembler::movl_rm):
2834         (JSC::X86Assembler::movl_mr):
2835         (JSC::X86Assembler::int32AtLocation):
2836         (JSC::X86Assembler::pointerAtLocation):
2837         (JSC::X86Assembler::jumpTarget):
2838         * bytecode/CodeBlock.cpp:
2839         (JSC::CodeBlock::markAggregate):
2840         * bytecode/Instruction.h:
2841             As described in StructureStubInfo.h, we needed to add additional
2842             fields to both StructureStubInfo and
2843             PolymorphicAccessStructureList so that we can determine the
2844             structure of the JITed code at patch time.
2845         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
2846         (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
2847         * bytecode/StructureStubInfo.cpp:
2848         (JSC::StructureStubInfo::markAggregate):
2849             Added this function to mark the JITed code that correosponds to
2850             this structure stub info.
2851         * bytecode/StructureStubInfo.h:
2852         (JSC::StructureStubInfo::initGetByIdProto):
2853         (JSC::StructureStubInfo::initGetByIdChain):
2854         (JSC::StructureStubInfo::):
2855         * jit/JIT.h:
2856         * jit/JITMarkObjects.cpp: Added.
2857         (JSC::JIT::patchPrototypeStructureAddress):
2858         (JSC::JIT::patchGetDirectOffset):
2859         (JSC::JIT::markGetByIdProto):
2860         (JSC::JIT::markGetByIdChain):
2861         (JSC::JIT::markGetByIdProtoList):
2862         (JSC::JIT::markPutByIdTransition):
2863         (JSC::JIT::markGlobalObjectReference):
2864         * jit/JITPropertyAccess.cpp:
2865             Added asserts for the patch offsets.
2866         (JSC::JIT::compileGetDirectOffset):
2867         (JSC::JIT::testPrototype):
2868         (JSC::JIT::privateCompilePutByIdTransition):
2869         (JSC::JIT::privateCompileGetByIdProto):
2870         (JSC::JIT::privateCompileGetByIdProtoList):
2871         (JSC::JIT::privateCompileGetByIdChainList):
2872         (JSC::JIT::privateCompileGetByIdChain):
2873         * jit/JITPropertyAccess32_64.cpp:
2874         (JSC::JIT::compileGetDirectOffset):
2875         (JSC::JIT::testPrototype):
2876         (JSC::JIT::privateCompilePutByIdTransition):
2877         (JSC::JIT::privateCompileGetByIdProto):
2878         (JSC::JIT::privateCompileGetByIdProtoList):
2879         (JSC::JIT::privateCompileGetByIdChainList):
2880         (JSC::JIT::privateCompileGetByIdChain):
2881         * jit/JITStubs.cpp:
2882         (JSC::setupPolymorphicProtoList):
2883         * wtf/Platform.h:
2884             Added ENABLE_MOVABLE_GC_OBJECTS flag
2885
2886 2010-08-07  Michael Saboff  <msaboff@apple.com>
2887
2888         Reviewed by Geoffrey Garen.
2889
2890         Revert JSArray to point to the beginning of the contained ArrayStorage
2891         struct.  This is described in
2892         https://bugs.webkit.org/show_bug.cgi?id=43526.
2893
2894         * jit/JITPropertyAccess.cpp:
2895         (JSC::JIT::emit_op_get_by_val):
2896         (JSC::JIT::emit_op_put_by_val):
2897         (JSC::JIT::privateCompilePatchGetArrayLength):
2898         * jit/JITPropertyAccess32_64.cpp:
2899         (JSC::JIT::emit_op_get_by_val):
2900         (JSC::JIT::emit_op_put_by_val):
2901         (JSC::JIT::privateCompilePatchGetArrayLength):
2902         * runtime/JSArray.cpp:
2903         (JSC::JSArray::JSArray):
2904         (JSC::JSArray::~JSArray):
2905         (JSC::JSArray::getOwnPropertySlot):
2906         (JSC::JSArray::getOwnPropertyDescriptor):
2907         (JSC::JSArray::put):
2908         (JSC::JSArray::putSlowCase):
2909         (JSC::JSArray::deleteProperty):
2910         (JSC::JSArray::getOwnPropertyNames):
2911         (JSC::JSArray::getNewVectorLength):
2912         (JSC::JSArray::increaseVectorLength):
2913         (JSC::JSArray::increaseVectorPrefixLength):
2914         (JSC::JSArray::setLength):
2915         (JSC::JSArray::pop):
2916         (JSC::JSArray::push):
2917         (JSC::JSArray::shiftCount):
2918         (JSC::JSArray::unshiftCount):
2919         (JSC::JSArray::sortNumeric):
2920         (JSC::JSArray::sort):
2921         (JSC::JSArray::fillArgList):
2922         (JSC::JSArray::copyToRegisters):
2923         (JSC::JSArray::compactForSorting):
2924         (JSC::JSArray::subclassData):
2925         (JSC::JSArray::setSubclassData):
2926         (JSC::JSArray::checkConsistency):
2927         * runtime/JSArray.h:
2928         (JSC::JSArray::length):
2929         (JSC::JSArray::canGetIndex):
2930         (JSC::JSArray::getIndex):
2931         (JSC::JSArray::setIndex):
2932         (JSC::JSArray::uncheckedSetIndex):
2933         (JSC::JSArray::markChildrenDirect):
2934
2935 2010-08-07  Kwang Yul Seo  <skyul@company100.net>
2936
2937         Reviewed by Eric Seidel.
2938
2939         Add ENABLE(YARR) guard around JSGlobalData::m_regexAllocator
2940         https://bugs.webkit.org/show_bug.cgi?id=43399
2941
2942         m_regexAllocator is used only by RegExp::compile which is guarded with ENABLE(YARR).
2943
2944         * runtime/JSGlobalData.h:
2945
2946 2010-08-07  Patrick Roland Gansterer  <paroga@paroga.com>
2947
2948         Reviewed by Eric Seidel.
2949
2950         [Qt] Enable JIT on WinCE
2951         https://bugs.webkit.org/show_bug.cgi?id=43303
2952
2953         Add ExtraCompiler for generating GeneratedJITStubs_MSVC.asm.
2954
2955         * DerivedSources.pro:
2956
2957 2010-08-07  Dan Bernstein  <mitz@apple.com>
2958
2959         Reviewed by Anders Carlsson.
2960
2961         Created a separate SimpleFontData constructor exclusively for SVG fonts and moved the CTFontRef
2962         from SimpleFontData to FontPlatformData.
2963         https://bugs.webkit.org/show_bug.cgi?id=43674
2964
2965         * wtf/Platform.h: Moved definitions of WTF_USE_CORE_TEXT and WTF_USE_ATSUI here from WebCore/config.h.
2966
2967 2010-08-07  Zoltan Herczeg  <zherczeg@webkit.org>
2968
2969         Reviewed by Eric Seidel.
2970
2971         Bitmap.h has no default constructor
2972         https://bugs.webkit.org/show_bug.cgi?id=43619
2973
2974         Without a constructor, the initial bits of the Bitmap class
2975         are undefinied. If only a few, or zero bits are 0, the memory
2976         area provided by AlignedMemoryAllocator can be easly exhausted.
2977
2978         Csaba Osztrogonác helped to find this bug.
2979
2980         * wtf/Bitmap.h:
2981         (WTF::::Bitmap):
2982
2983 2010-08-06  Rafael Antognolli  <antognolli@profusion.mobi>
2984
2985         [EFL] Build fix.
2986
2987         * CMakeLists.txt: add runtime/CGHandle.cpp.
2988
2989 2010-08-06  Jessie Berlin  <jberlin@apple.com>
2990
2991         Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
2992         Unreviewed.
2993
2994         * JavaScriptCore.xcodeproj/project.pbxproj:
2995         * wtf/Forward.h:
2996
2997 2010-08-06  Jessie Berlin  <jberlin@apple.com>
2998
2999         Windows Build Fix (continued). Unreviewed.
3000
3001         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3002
3003 2010-08-06  Jessie Berlin  <jberlin@apple.com>
3004
3005         Windows Build Fix. Unreviewed.
3006
3007         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3008         Add GCHandle.h and GCHandle.cpp.
3009
3010 2010-08-06  Nathan Lawrence  <nlawrence@apple.com>
3011
3012         Reviewed by Geoffrey Garen.
3013
3014         https://bugs.webkit.org/show_bug.cgi?id=43207
3015
3016         WeakGCPtr's should instead of directly pointing to the GC'd object
3017         should be directed to an array of pointers that can be updated for
3018         movable objects.
3019
3020         * Android.mk:
3021         * GNUmakefile.am:
3022         * JavaScriptCore.exp:
3023         * JavaScriptCore.gypi:
3024         * JavaScriptCore.pro:
3025         * JavaScriptCore.xcodeproj/project.pbxproj:
3026         * runtime/Collector.cpp:
3027         (JSC::Heap::destroy):
3028         (JSC::Heap::allocateBlock):
3029         (JSC::Heap::freeBlock):
3030         (JSC::Heap::updateWeakGCHandles):
3031         (JSC::WeakGCHandlePool::update):
3032         (JSC::Heap::addWeakGCHandle):
3033         (JSC::Heap::markRoots):
3034         * runtime/Collector.h:
3035         (JSC::Heap::weakGCHandlePool):
3036         * runtime/GCHandle.cpp: Added.
3037         (JSC::WeakGCHandle::pool):
3038         (JSC::WeakGCHandlePool::WeakGCHandlePool):
3039         (JSC::WeakGCHandlePool::allocate):
3040         (JSC::WeakGCHandlePool::free):
3041         (JSC::WeakGCHandlePool::operator new):
3042         * runtime/GCHandle.h: Added.
3043         (JSC::WeakGCHandle::isValidPtr):
3044         (JSC::WeakGCHandle::isPtr):
3045         (JSC::WeakGCHandle::isNext):
3046         (JSC::WeakGCHandle::invalidate):
3047         (JSC::WeakGCHandle::get):
3048         (JSC::WeakGCHandle::set):
3049         (JSC::WeakGCHandle::getNextInFreeList):
3050         (JSC::WeakGCHandle::setNextInFreeList):
3051         (JSC::WeakGCHandlePool::isFull):
3052         * runtime/WeakGCPtr.h:
3053         (JSC::WeakGCPtr::WeakGCPtr):
3054         (JSC::WeakGCPtr::~WeakGCPtr):
3055         (JSC::WeakGCPtr::get):
3056         (JSC::WeakGCPtr::clear):
3057         (JSC::WeakGCPtr::assign):
3058         (JSC::get):
3059
3060 2010-08-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3061
3062         Reviewed by Antonio Gomes.
3063
3064         [Qt] Fix warnings about difference in symbol visiblity on Mac OS X
3065
3066         * jsc.pro:
3067
3068 2010-08-06  Zoltan Herczeg  <zherczeg@webkit.org>
3069
3070         Reviewed by Darin Adler.
3071
3072         Refactor identifier parsing in lexer
3073         https://bugs.webkit.org/show_bug.cgi?id=41845
3074
3075         The code is refactored to avoid gotos. The new code
3076         has the same performance as the old one.
3077
3078         SunSpider --parse-only: no change (from 34.0ms to 33.6ms)
3079         SunSpider: no change (from 523.2ms to 523.5ms)
3080
3081         * parser/Lexer.cpp:
3082         (JSC::Lexer::parseIdent):
3083         (JSC::Lexer::lex):
3084         * parser/Lexer.h:
3085
3086 2010-08-06  Gabor Loki  <loki@webkit.org>
3087
3088         Reviewed by Gavin Barraclough.
3089
3090         The ARM JIT does not support JSValue32_64 with RVCT
3091         https://bugs.webkit.org/show_bug.cgi?id=43411
3092
3093         JSValue32_64 is enabled for RVCT by default.
3094
3095         * create_jit_stubs:
3096         * jit/JITStubs.cpp:
3097         (JSC::ctiTrampoline):
3098         (JSC::ctiVMThrowTrampoline):
3099         (JSC::ctiOpThrowNotCaught):
3100         * wtf/Platform.h:
3101
3102 2010-08-05  Chao-ying Fu  <fu@mips.com>
3103
3104         Reviewed by Darin Adler.
3105
3106         Define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER for MIPS
3107         https://bugs.webkit.org/show_bug.cgi?id=43514
3108
3109         MIPS needs to define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER, so that
3110         RenderArena::allocate() can return 8-byte aligned memory to avoid
3111         exceptions on sdc1/ldc1.
3112
3113         * wtf/Platform.h:
3114
3115 2010-08-05  Gavin Barraclough  <barraclough@apple.com>
3116
3117         Rubber stamped by Sam Weinig
3118
3119         Bug 43594 - Add string forwards to Forward.h
3120         This allows us to remove forward declarations for these classes from
3121         WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
3122
3123         * JavaScriptCore.xcodeproj/project.pbxproj:
3124         * wtf/Forward.h:
3125
3126 2010-08-05  Geoffrey Garen  <ggaren@apple.com>
3127
3128         Reviewed by Mark Rowe.
3129
3130         Fixed leak seen on buildbot.
3131
3132         * runtime/GCActivityCallbackCF.cpp:
3133         (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
3134         (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
3135         (JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr,
3136         since anything less would be uncivilized.
3137
3138 2010-08-05  Andy Estes  <aestes@apple.com>
3139
3140         Reviewed by David Kilzer.
3141
3142         Rename iOS-related OS and PLATFORM macros.
3143         https://bugs.webkit.org/show_bug.cgi?id=43493
3144         
3145         Rename WTF_OS_IPHONE_OS to WTF_OS_IOS, WTF_PLATFORM_IPHONE to
3146         WTF_PLATFORM_IOS, and WTF_PLATFORM_IPHONE_SIMULATOR to
3147         WTF_PLATFORM_IOS_SIMULATOR.
3148
3149         * jit/ExecutableAllocator.h:
3150         * jit/JITStubs.cpp:
3151         * profiler/ProfilerServer.mm:
3152         (-[ProfilerServer init]):
3153         * wtf/FastMalloc.cpp:
3154         (WTF::TCMallocStats::):
3155         * wtf/Platform.h:
3156         * wtf/unicode/icu/CollatorICU.cpp:
3157         (WTF::Collator::userDefault):
3158
3159 2010-08-05  Nathan Lawrence  <nlawrence@apple.com>
3160
3161         Reviewed by Darin Adler.
3162
3163         https://bugs.webkit.org/show_bug.cgi?id=43464
3164
3165         Currently, the global object is being embedded in the JavaScriptCore
3166         bytecode, however since the global object is the same for all opcodes
3167         in a code block, we can have the global object just be a member of the
3168         associated code block.
3169
3170         Additionally, I added an assert inside of emitOpcode that verifies
3171         that the last generated opcode was of the correct length.
3172
3173         * bytecode/CodeBlock.cpp:
3174         (JSC::CodeBlock::CodeBlock):
3175         (JSC::CodeBlock::derefStructures):
3176         (JSC::CodeBlock::markAggregate):
3177         * bytecode/CodeBlock.h:
3178         (JSC::CodeBlock::globalObject):
3179         (JSC::GlobalCodeBlock::GlobalCodeBlock):
3180         (JSC::ProgramCodeBlock::ProgramCodeBlock):
3181         (JSC::EvalCodeBlock::EvalCodeBlock):
3182         (JSC::FunctionCodeBlock::FunctionCodeBlock):
3183         * bytecode/Opcode.h:
3184         (JSC::opcodeLength):
3185         * bytecompiler/BytecodeGenerator.cpp:
3186         (JSC::BytecodeGenerator::BytecodeGenerator):
3187         (JSC::BytecodeGenerator::emitOpcode):
3188             Added an assert to check that the last generated opcode is the
3189             correct length.
3190         (JSC::BytecodeGenerator::rewindBinaryOp):
3191             Changed the last opcode to op_end since the length will no longer
3192             be correct.
3193         (JSC::BytecodeGenerator::rewindUnaryOp):
3194             Changed the last opcode to op_end since the length will no longer
3195             be correct.
3196         (JSC::BytecodeGenerator::emitResolve):
3197         (JSC::BytecodeGenerator::emitGetScopedVar):
3198         (JSC::BytecodeGenerator::emitPutScopedVar):
3199         (JSC::BytecodeGenerator::emitResolveWithBase):
3200         * bytecompiler/BytecodeGenerator.h:
3201         * interpreter/Interpreter.cpp:
3202         (JSC::Interpreter::resolveGlobal):
3203         (JSC::Interpreter::resolveGlobalDynamic):
3204         (JSC::Interpreter::privateExecute):
3205         * jit/JITOpcodes.cpp:
3206         (JSC::JIT::emit_op_get_global_var):
3207         (JSC::JIT::emit_op_put_global_var):
3208         (JSC::JIT::emit_op_resolve_global):
3209         (JSC::JIT::emitSlow_op_resolve_global):
3210         (JSC::JIT::emit_op_resolve_global_dynamic):
3211         (JSC::JIT::emitSlow_op_resolve_global_dynamic):
3212         * jit/JITOpcodes32_64.cpp:
3213         (JSC::JIT::emit_op_get_global_var):
3214         (JSC::JIT::emit_op_put_global_var):
3215         (JSC::JIT::emit_op_resolve_global):
3216         (JSC::JIT::emitSlow_op_resolve_global):
3217         * jit/JITStubs.cpp:
3218         (JSC::cti_op_resolve_global):
3219         * runtime/Executable.cpp:
3220         (JSC::FunctionExecutable::compileForCallInternal):
3221         (JSC::FunctionExecutable::compileForConstructInternal):
3222         (JSC::FunctionExecutable::reparseExceptionInfo):
3223
3224 2010-08-05  Gavin Barraclough  <barraclough@apple.com>
3225
3226         Reviewed by Sam Weinig.
3227
3228         Bug 43185 - Switch RegisterFile over to use PageAllocation
3229
3230         Remove platform-specific memory allocation code.
3231
3232         * interpreter/RegisterFile.cpp:
3233         (JSC::RegisterFile::~RegisterFile):
3234         (JSC::RegisterFile::releaseExcessCapacity):
3235         * interpreter/RegisterFile.h:
3236         (JSC::RegisterFile::RegisterFile):
3237         (JSC::RegisterFile::grow):
3238         (JSC::RegisterFile::checkAllocatedOkay):
3239         * wtf/PageAllocation.cpp:
3240         (WTF::PageAllocation::lastError):
3241         * wtf/PageAllocation.h:
3242         (WTF::PageAllocation::allocate):
3243         (WTF::PageAllocation::allocateAt):
3244         (WTF::PageAllocation::allocateAligned):
3245         (WTF::PageAllocation::pageSize):
3246         (WTF::PageAllocation::isPageAligned):
3247         (WTF::PageAllocation::isPowerOfTwo):
3248         * wtf/PageReservation.h:
3249         (WTF::PageReservation::commit):
3250         (WTF::PageReservation::decommit):
3251         (WTF::PageReservation::reserve):
3252         (WTF::PageReservation::reserveAt):
3253
3254 2010-08-05  Michael Saboff  <msaboff@apple.com>
3255
3256         Reviewed by Darin Adler.
3257
3258         Fixed https://bugs.webkit.org/show_bug.cgi?id=43401 where array 
3259         content aren't properly initialized as part of unshift.  
3260
3261         * runtime/JSArray.cpp:
3262         (JSC::JSArray::unshiftCount):
3263
3264 2010-08-05  Jian Li  <jianli@chromium.org>
3265
3266         Reviewed by David Levin.
3267
3268         Unify blob related feature defines to ENABLE(BLOB).
3269         https://bugs.webkit.org/show_bug.cgi?id=43081
3270
3271         * Configurations/FeatureDefines.xcconfig:
3272
3273 2010-08-05  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3274
3275         Rubber-stamped by Xan Lopez.
3276
3277         Remove GHashTable left-overs. GHashTable is ref-counted, and is
3278         correctly supported by GRefPtr.
3279
3280         * wtf/gobject/GOwnPtr.h:
3281
3282 2010-08-05  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3283
3284         Unreviewed.
3285
3286         Typo fix that makes distcheck happy.
3287
3288         * GNUmakefile.am:
3289
3290 2010-08-03  Geoffrey Garen  <ggaren@apple.com>
3291
3292         Reviewed by Oliver Hunt and Beth Dakin.
3293
3294         https://bugs.webkit.org/show_bug.cgi?id=43461
3295         Invalid NaN parsing
3296         
3297         * wtf/dtoa.cpp: Turn off the dtoa feature that allows you to specify a
3298         non-standard NaN representation, since our NaN encoding assumes that all
3299         true NaNs have the standard bit pattern.
3300
3301         * API/JSValueRef.cpp:
3302         (JSValueMakeNumber): Don't allow an API client to accidentally specify
3303         a non-standard NaN either.
3304
3305 2010-08-04  Gavin Barraclough  <barraclough@apple.com>
3306
3307         Windows build fix part II.
3308
3309         * wtf/PageReservation.h:
3310         (WTF::PageReservation::systemReserve):
3311
3312 2010-08-04  Gavin Barraclough  <barraclough@apple.com>
3313
3314         Windows build fix.
3315
3316         * wtf/PageReservation.h:
3317         (WTF::PageReservation::systemReserve):
3318
3319 2010-08-04  Gavin Barraclough  <barraclough@apple.com>
3320
3321         Build fix - add new header to !Mac projects.
3322
3323         * GNUmakefile.am:
3324         * JavaScriptCore.gypi:
3325         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3326
3327 2010-08-04  Gavin Barraclough  <barraclough@apple.com>
3328
3329         Reviewed by Sam Weinig.
3330
3331         Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation.
3332
3333         The PageAllocation class has a number of issues:
3334         * Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate
3335           blocks of memory for the GC heap, instead of allocating RChunks.  Revert this change in
3336           behaviour.
3337         * In order for PageAllocation to work correctly on WinCE we should be decommitting memory
3338           before deallocating.  In order to simplify understanding the expected state at deallocate,
3339           split behaviour out into PageAllocation and PageReservation classes.  Require that all
3340           memory be decommitted before calling deallocate on a PageReservation, add asserts to
3341           enforce this.
3342         * add many missing asserts.
3343         * inline more functions.
3344         * remove ability to create sub-PageAllocations from an existing PageAllocations object -
3345           this presented an interface that would allow sub regions to be deallocated, which would
3346           not have provided expected behaviour.
3347         * remove writable/executable arguments to commit, this value can be cached at the point
3348           the memory is reserved.
3349         * remove writable/executable arguments to allocateAligned, protection other than RW is not
3350           supported.
3351         * add missing checks for overflow & failed allocation to mmap path through allocateAligned.
3352
3353         * JavaScriptCore.xcodeproj/project.pbxproj:
3354         * jit/ExecutableAllocator.cpp:
3355         (JSC::ExecutableAllocator::intializePageSize):
3356         * jit/ExecutableAllocator.h:
3357         (JSC::ExecutablePool::Allocation::Allocation):
3358         (JSC::ExecutablePool::Allocation::base):
3359         (JSC::ExecutablePool::Allocation::size):
3360         (JSC::ExecutablePool::Allocation::operator!):
3361         * jit/ExecutableAllocatorFixedVMPool.cpp:
3362         (JSC::FixedVMPoolAllocator::reuse):
3363         (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
3364         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
3365         (JSC::FixedVMPoolAllocator::alloc):
3366         (JSC::FixedVMPoolAllocator::free):
3367         (JSC::FixedVMPoolAllocator::allocInternal):
3368         * runtime/AlignedMemoryAllocator.h:
3369         (JSC::::allocate):
3370         (JSC::::AlignedMemoryAllocator):
3371         * runtime/Collector.cpp:
3372         (JSC::Heap::allocateBlock):
3373         * runtime/Collector.h:
3374         * wtf/PageAllocation.cpp:
3375         * wtf/PageAllocation.h:
3376         (WTF::PageAllocation::operator!):
3377         (WTF::PageAllocation::allocate):
3378         (WTF::PageAllocation::allocateAt):
3379         (WTF::PageAllocation::allocateAligned):
3380         (WTF::PageAllocation::deallocate):
3381         (WTF::PageAllocation::pageSize):
3382         (WTF::PageAllocation::systemAllocate):
3383         (WTF::PageAllocation::systemAllocateAt):
3384         (WTF::PageAllocation::systemAllocateAligned):
3385         (WTF::PageAllocation::systemDeallocate):
3386         (WTF::PageAllocation::systemPageSize):
3387         * wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h.
3388         (WTF::PageReservation::PageReservation):
3389         (WTF::PageReservation::commit):
3390         (WTF::PageReservation::decommit):
3391         (WTF::PageReservation::reserve):
3392         (WTF::PageReservation::reserveAt):
3393         (WTF::PageReservation::deallocate):
3394         (WTF::PageReservation::systemCommit):
3395         (WTF::PageReservation::systemDecommit):
3396         (WTF::PageReservation::systemReserve):
3397         (WTF::PageReservation::systemReserveAt):
3398         * wtf/Platform.h:
3399
3400 2010-08-04  Sheriff Bot  <webkit.review.bot@gmail.com>
3401
3402         Unreviewed, rolling out r64655.
3403         http://trac.webkit.org/changeset/64655
3404         https://bugs.webkit.org/show_bug.cgi?id=43496
3405
3406         JavaScriptCore references patch seems to have caused
3407         regressions in QT and GTK builds (Requested by nlawrence on
3408         #webkit).
3409
3410         * bytecode/CodeBlock.cpp:
3411         (JSC::CodeBlock::markAggregate):
3412         * runtime/Collector.cpp:
3413         (JSC::Heap::markConservatively):
3414         * runtime/JSCell.h:
3415         (JSC::JSValue::asCell):
3416         (JSC::MarkStack::append):
3417         * runtime/JSGlobalObject.cpp:
3418         (JSC::markIfNeeded):
3419         * runtime/JSONObject.cpp:
3420         (JSC::Stringifier::Holder::object):
3421         * runtime/JSObject.h:
3422         (JSC::JSObject::prototype):
3423         * runtime/JSStaticScopeObject.cpp:
3424         (JSC::JSStaticScopeObject::markChildren):
3425         * runtime/JSValue.h:
3426         (JSC::JSValue::):
3427         (JSC::JSValue::JSValue):
3428         (JSC::JSValue::asCell):
3429         * runtime/MarkStack.h:
3430         * runtime/NativeErrorConstructor.cpp:
3431         * runtime/NativeErrorConstructor.h:
3432         * runtime/Structure.h:
3433         (JSC::Structure::storedPrototype):
3434
3435 2010-08-04  Gavin Barraclough  <barraclough@apple.com>
3436
3437         Rubber stamped by Sam Weinig.
3438
3439         Enable JSVALUE64 for CPU(PPC64).
3440         Basic browsing seems to work.
3441
3442         * wtf/Platform.h:
3443
3444 2010-08-04  Nathan Lawrence  <nlawrence@apple.com>
3445
3446         Reviewed by Darin Adler.
3447
3448         Refactoring MarkStack::append to take a reference.  This is in
3449         preparation for movable objects when we will need to update pointers.
3450         http://bugs.webkit.org/show_bug.cgi?id=41177
3451
3452         Unless otherwise noted, all changes are to either return by reference
3453         or pass a reference to MarkStack::append.
3454
3455         * bytecode/CodeBlock.cpp:
3456         (JSC::CodeBlock::markAggregate):
3457         * runtime/Collector.cpp:
3458         (JSC::Heap::markConservatively):
3459             Added a temporary variable to prevent marking from changing an
3460             unknown value on the stack
3461         * runtime/JSCell.h:
3462         (JSC::JSValue::asCell):
3463         (JSC::MarkStack::append):
3464         (JSC::MarkStack::appendInternal):
3465         * runtime/JSGlobalObject.cpp:
3466         (JSC::markIfNeeded):
3467         * runtime/JSONObject.cpp:
3468         (JSC::Stringifier::Holder::object):
3469         * runtime/JSObject.h:
3470         (JSC::JSObject::prototype):
3471         * runtime/JSStaticScopeObject.cpp:
3472         (JSC::JSStaticScopeObject::markChildren):
3473         * runtime/JSValue.h:
3474         (JSC::JSValue::JSValue):
3475         (JSC::JSValue::asCell):
3476         * runtime/MarkStack.h:
3477         * runtime/NativeErrorConstructor.cpp:
3478         (JSC::NativeErrorConstructor::createStructure):
3479             Changed the structure flags to include a custom markChildren.
3480         (JSC::NativeErrorConstructor::markChildren):
3481             Update the prototype of the stored structure.
3482         * runtime/NativeErrorConstructor.h:
3483             Added structure flags.
3484         * runtime/Structure.h:
3485         (JSC::Structure::storedPrototype):
3486
3487 2010-08-03  Nathan Lawrence  <nlawrence@apple.com>
3488
3489         Reviewed by Oliver Hunt.
3490
3491         Tightened up some get_by_id_chain* code generation
3492         https://bugs.webkit.org/show_bug.cgi?id=40935
3493
3494         This is in the style of
3495         https://bugs.webkit.org/show_bug.cgi?id=30539, and changed code to
3496         call accessor functions when it was not necessary to directly access
3497         the private variables.
3498
3499         * jit/JIT.h:
3500         * jit/JITPropertyAccess.cpp:
3501         (JSC::JIT::compileGetDirectOffset):
3502         (JSC::JIT::testPrototype):
3503         (JSC::JIT::privateCompilePutByIdTransition):
3504         (JSC::JIT::privateCompileGetByIdChainList):
3505         (JSC::JIT::privateCompileGetByIdChain):
3506         * jit/JITPropertyAccess32_64.cpp:
3507         (JSC::JIT::testPrototype):
3508         (JSC::JIT::privateCompilePutByIdTransition):
3509         (JSC::JIT::privateCompileGetByIdChainList):
3510         (JSC::JIT::privateCompileGetByIdChain):
3511
3512 2010-08-03  Adam Roben  <aroben@apple.com>
3513
3514         Turn on PLATFORM_STRATEGIES on Windows
3515
3516         Fixes <http://webkit.org/b/43431>.
3517
3518         Reviewed by Anders Carlsson.
3519
3520         * wtf/Platform.h:
3521
3522 2010-08-04  Gabor Loki  <loki@webkit.org>
3523
3524         Reviewed by Geoffrey Garen.
3525
3526         Enable JSValue32_64 for GCC on ARM by default
3527         https://bugs.webkit.org/show_bug.cgi?id=43410
3528
3529         * wtf/Platform.h:
3530
3531 2010-08-03  Gavin Barraclough  <barraclough@apple.com>
3532
3533         Speculative windows build fix.
3534
3535         * wtf/Bitmap.h:
3536
3537 2010-08-03  Gavin Barraclough  <barraclough@apple.com>
3538
3539         Build fix following r64624.
3540
3541         * JavaScriptCore.xcodeproj/project.pbxproj:
3542         * wtf/PageAllocation.h:
3543
3544 2010-08-03  Nathan Lawrence  <nlawrence@apple.com>
3545
3546         Reviewed by Gavin Barraclough.
3547
3548         https://bugs.webkit.org/show_bug.cgi?id=43269
3549
3550         Added new allocateAligned methods to PageAllocation.  In order to
3551         prevent a regress in performance, the function needs to be inlined.
3552
3553         Additionally, I ported the symbian block allocator to use
3554         PageAllocation and added a new WTF::Bitmap class to support this.
3555
3556         * GNUmakefile.am:
3557         * JavaScriptCore.gypi:
3558         * JavaScriptCore.xcodeproj/project.pbxproj:
3559         * runtime/AlignedMemoryAllocator.h: Added.
3560         (JSC::AlignedMemory::deallocate):
3561         (JSC::AlignedMemory::base):
3562         (JSC::AlignedMemory::AlignedMemory):
3563         (JSC::AlignedMemoryAllocator::destroy):
3564         (JSC::AlignedMemoryAllocator::allocate):
3565         (JSC::AlignedMemoryAllocator::AlignedMemoryAllocator):
3566         (JSC::AlignedMemoryAllocator::~AlignedMemoryAllocator):
3567         (JSC::AlignedMemoryAllocator::free):
3568         * runtime/Collector.cpp:
3569         (JSC::Heap::Heap):
3570         (JSC::Heap::destroy):
3571         (JSC::Heap::allocateBlock):
3572         (JSC::Heap::freeBlock):
3573         (JSC::Heap::freeBlocks):
3574         (JSC::Heap::allocate):
3575         (JSC::Heap::shrinkBlocks):
3576         (JSC::Heap::markConservatively):
3577         (JSC::Heap::clearMarkBits):
3578         (JSC::Heap::markedCells):
3579         * runtime/Collector.h:
3580         (JSC::CollectorHeap::collectorBlock):
3581         * runtime/CollectorHeapIterator.h:
3582         (JSC::CollectorHeapIterator::operator*):
3583         (JSC::LiveObjectIterator::operator++):
3584         (JSC::DeadObjectIterator::operator++):
3585         * wtf/Bitmap.h: Added.
3586         (WTF::Bitmap::get):
3587         (WTF::Bitmap::set):
3588         (WTF::Bitmap::clear):
3589         (WTF::Bitmap::clearAll):
3590         (WTF::Bitmap::advanceToNextFreeBit):
3591         (WTF::Bitmap::count):
3592         (WTF::Bitmap::isEmpty):
3593         (WTF::Bitmap::isFull):
3594         * wtf/PageAllocation.h:
3595         (WTF::PageAllocation::operator UnspecifiedBoolType):
3596         (WTF::PageAllocation::allocateAligned):
3597         (WTF::PageAllocation::reserveAligned):
3598         * wtf/Platform.h:
3599         * wtf/symbian: Removed.
3600         * wtf/symbian/BlockAllocatorSymbian.cpp: Removed.
3601         * wtf/symbian/BlockAllocatorSymbian.h: Removed.
3602
3603 2010-08-03  Michael Saboff  <msaboff@apple.com>
3604
3605         Reviewed by Gavin Barraclough.
3606
3607         Fix for https://bugs.webkit.org/show_bug.cgi?id=43314.  The prior code
3608         was using the wrong "length" value to move array contents when adding
3609         space to the beginning of an array for an unshift() or similar
3610         operation.  Instead of using m_vectorLength, the length of the
3611         allocated JSValue array, the code was using m_length, the declared
3612         length of the array.  These two values do not need to match.
3613
3614         * JavaScriptCore.xcodeproj/project.pbxproj:
3615         * runtime/JSArray.cpp:
3616         (JSC::JSArray::increaseVectorPrefixLength):
3617
3618 2010-08-03  Chao-ying Fu  <fu@mips.com>
3619
3620         Reviewed by Gavin Barraclough.
3621
3622         Fix following https://bugs.webkit.org/show_bug.cgi?id=43089
3623         (accidentally inverted a compiler version check).
3624
3625         * jit/ExecutableAllocator.h:
3626         (JSC::ExecutableAllocator::cacheFlush):
3627
3628 2010-08-03  Patrick Gansterer  <paroga@paroga.com>
3629
3630         Reviewed by Gavin Barraclough.
3631
3632         Implement DEFINE_STUB_FUNCTION for WinCE.
3633         https://bugs.webkit.org/show_bug.cgi?id=34953
3634
3635         * jit/JITStubs.cpp:
3636         (JSC::):
3637         (JSC::DEFINE_STUB_FUNCTION):
3638
3639 2010-08-02  Gavin Barraclough  <barraclough@apple.com>
3640
3641         Reviewed by Oliver Hunt.
3642
3643         Bug 43390 - Do not CRASH if we run out of room for jit code.
3644
3645         Change the ExecutableAllocator implementations not to crash, and to return 0 if memory cannot be allocated.
3646         The assemblers should pass this through without trying to use it in executableCopy.
3647         Change the LinkBuffer to handle this, and to provide an allocationSuccessful() method to test for this.
3648
3649         Change the JIT to throw an exception if allocation fails.
3650         Make JIT optimizations fail gracefully if memory cannot be allocated (use non-optimized path).
3651         Change YARR JIT to fallback to PCRE 
3652
3653         * assembler/ARMAssembler.cpp:
3654         (JSC::ARMAssembler::executableCopy):
3655         * assembler/ARMv7Assembler.h:
3656         (JSC::ARMv7Assembler::executableCopy):
3657         * assembler/LinkBuffer.h:
3658         (JSC::LinkBuffer::allocationSuccessful):
3659         * assembler/MIPSAssembler.h: