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