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