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