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