2010-11-05 Oliver Hunt <oliver@apple.com>
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2010-11-05  Oliver Hunt  <oliver@apple.com>
2
3         Reviewed by Gavin Barraclough.
4
5         Website consistently crashing TOT in JIT::execute() on news.com.au
6         https://bugs.webkit.org/show_bug.cgi?id=48954
7
8         The problem here was the strict pass of this conversion was loading the
9         this structure into one register but doing the flags check off a different
10         register.  This is clearly wrong.  I have been unable to trigger the crash
11         with a reduction, but I've added an assertion to the this conversion to
12         attempt to make it more readily catchable in future.
13
14         * jit/JITOpcodes.cpp:
15         (JSC::JIT::emit_op_convert_this_strict):
16         * jit/JITOpcodes32_64.cpp:
17         (JSC::JIT::emit_op_convert_this_strict):
18         * jit/JITStubs.cpp:
19         (JSC::DEFINE_STUB_FUNCTION):
20
21 2010-11-04  Xan Lopez  <xlopez@igalia.com>
22
23         Reviewed by Adam Barth.
24
25         Use leakRef instead of releaseRef
26         https://bugs.webkit.org/show_bug.cgi?id=48974
27
28         Use leakRef instead of the deprecated releaseRef. This was renamed
29         some time ago because 'releaseRef' is too close to 'release',
30         which does something completely different.
31
32 2010-11-04  Eric Seidel  <eric@webkit.org>
33
34         Reviewed by Gavin Barraclough.
35
36         REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute
37         https://bugs.webkit.org/show_bug.cgi?id=48789
38
39         The contract for all String/AtomicString methods seems to be that it's
40         safe to call them, even when the String is null (impl() returns 0).
41         This contract was broken by r49798 (unintentionally) when optimizing
42         for dromeo.
43         This patch adds a null check to AtomicString::lower() fixing this
44         crash and preventing future confusion.
45
46         * wtf/text/AtomicString.cpp:
47         (WTF::AtomicString::lower):
48
49 2010-11-04  Adam Barth  <abarth@webkit.org>
50
51         Enabled ICCJPEG on Chromium Mac
52         https://bugs.webkit.org/show_bug.cgi?id=48977
53
54         * wtf/Platform.h:
55
56 2010-11-03  Oliver Hunt  <oliver@apple.com>
57
58         Reviewed by Gavin Barraclough.
59
60         Crash in Function.prototype.call.apply
61         https://bugs.webkit.org/show_bug.cgi?id=48485
62
63         The problem here was op_load_varargs failing to ensure that
64         there was sufficient space for the entire callframe prior to
65         op_call_varargs.  This meant that when we then re-entered the
66         VM it was possible to stomp over an earlier portion of the
67         stack, so causing sub-optimal behaviour.
68
69         * bytecode/Opcode.h:
70         * bytecompiler/BytecodeGenerator.cpp:
71         (JSC::BytecodeGenerator::emitLoadVarargs):
72         * bytecompiler/BytecodeGenerator.h:
73         * bytecompiler/NodesCodegen.cpp:
74         (JSC::ApplyFunctionCallDotNode::emitBytecode):
75         * jit/JIT.cpp:
76         (JSC::JIT::privateCompile):
77         * jit/JITOpcodes.cpp:
78         (JSC::JIT::emit_op_load_varargs):
79
80 2010-11-03  Kenneth Russell  <kbr@google.com>
81
82         Reviewed by Chris Marrin.
83
84         Redesign extension mechanism in GraphicsContext3D
85         https://bugs.webkit.org/show_bug.cgi?id=46894
86
87         * JavaScriptCore.exp:
88          - Exposed String::split(const String&, Vector<String>).
89
90 2010-11-03  Adam Roben  <aroben@apple.com>
91
92         Bring WTF.vcproj up to date
93
94         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and
95         unicode directories, added new files, removed old files.
96
97 2010-11-03  Gabor Loki  <loki@webkit.org>
98
99         Reviewed by Andreas Kling.
100
101         Remove unused initializeWeakRandomNumberGenerator
102         https://bugs.webkit.org/show_bug.cgi?id=48899
103
104         WeakRandom class is used instead of weakRandomNumber and its initializer.
105
106         * wtf/RandomNumberSeed.h:
107
108 2010-11-03  Gabor Loki  <loki@webkit.org>
109
110         Reviewed by Geoffrey Garen.
111
112         Unused class: JSFastMath with JSValue64
113         https://bugs.webkit.org/show_bug.cgi?id=48835
114
115         Remove unused JSFastMath class.
116
117         * runtime/JSImmediate.h:
118
119 2010-11-02  Adam Roben  <aroben@apple.com>
120
121         Windows build fix after r71127
122
123         MSVC isn't smart enough to figure out that the definition of the global
124         nullptr variable isn't needed, so we provide one for it.
125
126         Fixes <http://webkit.org/b/48862> Windows build is broken due to
127         undefined symbol nullptr
128
129         Reviewed by Anders Carlsson.
130
131         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr.
132
133         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS
134         resort the files.
135
136         * wtf/NullPtr.cpp: Added.
137
138 2010-11-02  Martin Robinson  <mrobinson@igalia.com>
139
140         Reviewed by Xan Lopez.
141
142         Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits
143         https://bugs.webkit.org/show_bug.cgi?id=48841
144
145         Remove special handling of HashTableDeletedValue in PlatformRefPtr.
146         This is better handled on a case-by-case basis, when HashTraits
147         cannot account for it.
148
149         * wtf/PlatformRefPtr.h:
150         (WTF::PlatformRefPtr::~PlatformRefPtr):
151         (WTF::PlatformRefPtr::clear):
152         (WTF::::operator):
153
154 2010-10-29  Oliver Hunt  <oliver@apple.com>
155
156         Reviewed by Gavin Barraclough.
157
158         REGRESSION: r69429-r69611: Crash in JSC::Interpreter::privateExecute
159         https://bugs.webkit.org/show_bug.cgi?id=47573
160
161         I think the interpreter portion of this was introduced by
162         an incorrect but silent merge when I updated prior to committing.
163         The JIT change is basically just a correctness fix, but it is
164         needed to prevent the testcase from asserting in debug builds.
165
166         The basic problem is incorrectly setting the activation object
167         on an arguments object.  The crash was due to us setting a null
168         activation in the interpreter, in the jit we were setting the
169         activation of a strict mode arguments object.
170
171         * interpreter/Interpreter.cpp:
172         (JSC::Interpreter::privateExecute):
173         * jit/JITStubs.cpp:
174         (JSC::DEFINE_STUB_FUNCTION):
175         * wtf/Platform.h:
176
177 2010-10-29  Csaba Osztrogonác  <ossy@webkit.org>
178
179         Reviewed by Adam Roben and David Kilzer.
180
181         Fix and cleanup of build systems
182         https://bugs.webkit.org/show_bug.cgi?id=48342
183
184         * Configurations/FeatureDefines.xcconfig: Add missing ENABLE_FULLSCREEN_API
185
186 2010-10-28  Kwang Yul Seo  <skyul@company100.net>
187
188         Reviewed by Darin Adler.
189
190         Include stddef.h unconditionally in Assertions.h
191         https://bugs.webkit.org/show_bug.cgi?id=48573
192
193         There is no reason to have stddef.h include be MSVC-only.
194
195         * wtf/Assertions.h:
196
197 2010-10-28  Herczeg Zoltan  <zherczeg@webkit.org>
198
199         Rubber stamped by Csaba Osztrogonác.
200
201         Try to fix interpreter build.
202
203         Needed parentheses around assignment to avoid GCC warning after
204         http://trac.webkit.org/changeset/70703
205
206         * interpreter/Interpreter.cpp:
207         (JSC::Interpreter::privateExecute):
208
209 2010-10-28  Peter Varga  <pvarga@inf.u-szeged.hu>
210
211         Reviewed by Csaba Osztrogonác.
212
213         resetAssertionMatches() is an unused function in YARR Interpreter
214         https://bugs.webkit.org/show_bug.cgi?id=48503
215
216         The resetAssertionMatches() function is removed from YARR Interpreter
217         because it's never called.
218
219         * yarr/RegexInterpreter.cpp:
220         (JSC::Yarr::Interpreter::resetMatches):
221
222 2010-10-28  Zoltan Herczeg  <zherczeg@webkit.org>
223
224         Reviewed by Andreas Kling.
225
226         Wrong instruction form for BKPT
227         https://bugs.webkit.org/show_bug.cgi?id=48427
228
229         One '0' is missing from BKPT instruction.
230         Thanks for Jacob Bramley for reporting this error.
231
232         * assembler/ARMAssembler.h:
233
234 2010-10-28  Xan Lopez  <xlopez@igalia.com>
235
236         Try to fix Snow Leopard build.
237
238         * jit/JITPropertyAccess.cpp:
239         (JSC::JIT::testPrototype):
240
241 2010-10-28  Xan Lopez  <xlopez@igalia.com>
242
243         Reviewed by Oliver Hunt.
244
245         Do not have two different asCell APIs in JSValue
246         https://bugs.webkit.org/show_bug.cgi?id=47979
247
248         Remove JSCell* asCell(JSValue) in favor of only using
249         JSValue::asCell().
250
251         * API/APICast.h:
252         (toRef):
253         * jit/JITPropertyAccess32_64.cpp:
254         (JSC::JIT::testPrototype):
255         * jit/JITStubs.cpp:
256         (JSC::JITThunks::tryCachePutByID):
257         (JSC::JITThunks::tryCacheGetByID):
258         (JSC::DEFINE_STUB_FUNCTION):
259         * runtime/GetterSetter.h:
260         (JSC::asGetterSetter):
261         * runtime/JSByteArray.h:
262         (JSC::asByteArray):
263         * runtime/JSCell.h:
264         (JSC::JSCell::getCallData):
265         (JSC::JSCell::getConstructData):
266         * runtime/JSString.h:
267         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
268         (JSC::asString):
269         * runtime/JSValue.h:
270         * runtime/Operations.cpp:
271         (JSC::jsIsObjectType):
272         * runtime/Operations.h:
273         (JSC::normalizePrototypeChain):
274         * runtime/Protect.h:
275         (JSC::gcProtect):
276         (JSC::gcUnprotect):
277
278 2010-10-27  Chao-ying Fu  <fu@mips.com>
279
280         Reviewed by Oliver Hunt.
281
282         Support emit_op_mod() for MIPS on JSVALUE32_64
283         https://bugs.webkit.org/show_bug.cgi?id=46511
284
285         This patch uses MIPS div instructions for op_mod to improve performance.
286
287         * jit/JITArithmetic32_64.cpp:
288         (JSC::JIT::emit_op_mod):
289
290 2010-10-27  Brent Fulgham  <bfulgham@webkit.org>
291
292         Unreviewed build correction.
293
294         * wtf/Platform.h: Make sure ACCELERATED_COMPOSITING is
295         turned off in the WinCairo port.  This isn't supported (yet.)
296
297 2010-10-27  Chris Rogers  <crogers@google.com>
298
299         Reviewed by Chris Marrin.
300
301         Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit
302         https://bugs.webkit.org/show_bug.cgi?id=48279
303
304         * Configurations/FeatureDefines.xcconfig:
305
306 2010-10-27  Brian Weinstein  <bweinstein@apple.com>
307
308         Windows build fix.
309
310         * jit/JITStubs.cpp:
311         (JSC::jitThrow):
312
313 2010-10-27  Gavin Barraclough  <barraclough@apple.com>
314
315         Reviewed by Oliver Hunt.
316
317         Bug 48365 - Remove output parameters from JITStackFrame
318
319         The JIT stub functions presently use the stackframe to provide a couple of additional return values.
320           * In the case of uncaught exceptions the exception value is returned on the stackframe.exception property.
321           * In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property.
322
323         Change exception returns such that exceptions are always returned on JSGlobalData::exception.
324         Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0.
325
326         * JavaScriptCore.xcodeproj/project.pbxproj:
327         * debugger/Debugger.cpp:
328         (JSC::evaluateInGlobalCallFrame):
329         * debugger/DebuggerCallFrame.cpp:
330         (JSC::DebuggerCallFrame::evaluate):
331         * interpreter/CachedCall.h:
332         (JSC::CachedCall::CachedCall):
333         (JSC::CachedCall::call):
334         * interpreter/CallFrame.h:
335         (JSC::ExecState::exception):
336         * interpreter/Interpreter.cpp:
337         (JSC::Interpreter::callEval):
338         (JSC::Interpreter::Interpreter):
339         (JSC::Interpreter::execute):
340         (JSC::Interpreter::executeCall):
341         (JSC::Interpreter::executeConstruct):
342         (JSC::Interpreter::prepareForRepeatCall):
343         (JSC::Interpreter::privateExecute):
344         * interpreter/Interpreter.h:
345         * jit/JITCode.h:
346         (JSC::JITCode::execute):
347         * jit/JITOpcodes.cpp:
348         (JSC::JIT::emit_op_catch):
349         * jit/JITOpcodes32_64.cpp:
350         (JSC::JIT::emit_op_catch):
351         * jit/JITStubs.cpp:
352         (JSC::ctiTrampoline):
353         (JSC::jitThrow):
354         (JSC::DEFINE_STUB_FUNCTION):
355         * jit/JITStubs.h:
356         * runtime/ArrayPrototype.cpp:
357         (JSC::arrayProtoFuncFilter):
358         (JSC::arrayProtoFuncMap):
359         (JSC::arrayProtoFuncEvery):
360         (JSC::arrayProtoFuncForEach):
361         (JSC::arrayProtoFuncSome):
362         (JSC::arrayProtoFuncReduce):
363         (JSC::arrayProtoFuncReduceRight):
364         * runtime/CallData.cpp:
365         (JSC::call):
366         * runtime/Completion.cpp:
367         (JSC::evaluate):
368         * runtime/ConstructData.cpp:
369         (JSC::construct):
370         * runtime/ExceptionHelpers.cpp:
371         (JSC::createErrorForInvalidGlobalAssignment):
372         (JSC::throwOutOfMemoryError):
373         (JSC::throwStackOverflowError):
374         * runtime/ExceptionHelpers.h:
375         * runtime/JSArray.cpp:
376         (JSC::JSArray::sort):
377         * runtime/JSGlobalObjectFunctions.cpp:
378         (JSC::globalFuncEval):
379         * runtime/StringPrototype.cpp:
380         (JSC::stringProtoFuncReplace):
381
382 2010-10-27  Gabor Loki  <loki@webkit.org>
383
384         Reviewed by Oliver Hunt.
385
386         https://bugs.webkit.org/show_bug.cgi?id=48060
387         Speed up op_jeq_null and op_jneq_null.
388
389         For both opcodes the NullTag and UndefinedTag are checked to control the
390         jump. These values can be simply checked by AboveOrEqual or Below
391         condition if they are the two highest unsigned integers from JSValue's
392         Tag field.
393
394         * jit/JITOpcodes32_64.cpp:
395         (JSC::JIT::emit_op_jeq_null):
396         (JSC::JIT::emit_op_jneq_null):
397         * runtime/JSValue.h:
398
399 2010-10-25  Geoffrey Garen  <ggaren@apple.com>
400
401         Reviewed by Oliver Hunt.
402
403         https://bugs.webkit.org/show_bug.cgi?id=41948
404         REGRESSION(r60392): Registerfile can be unwound too far following an exception
405         
406         SunSpider reports no change.
407
408         * interpreter/Interpreter.cpp:
409         (JSC::Interpreter::throwException): Walk the stack to calculate the high
410         water mark currently in use. It's not safe to assume that the current
411         CallFrame's high water mark is the highest high water mark because
412         calls do not always set up at the end of a CallFrame. A large caller
413         CallFrame can encompass a small callee CallFrame.
414
415         * jit/JITOpcodes.cpp:
416         (JSC::JIT::privateCompileCTINativeCall):
417         * jit/JITOpcodes32_64.cpp:
418         (JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock
419         in the CallFrame of a host call, like the Interpreter does, instead of
420         leaving the CodeBlock field uninitialized. The backtracing code requires
421         a valid CodeBlock field in each CallFrame.
422
423 2010-10-27  Gabor Loki  <loki@webkit.org>
424
425         Reviewed by Csaba Osztrogonác.
426
427         Add cmn to branch32(reg, imm) on ARM
428         https://bugs.webkit.org/show_bug.cgi?id=48062
429
430         The conditional comparison can be done with cmn if the imm value is
431         negative and can fit into the cmn instruction.
432
433         * assembler/MacroAssemblerARM.h:
434         (JSC::MacroAssemblerARM::branch32):
435
436 2010-10-26  Oliver Hunt  <oliver@apple.com>
437
438         Interpreter build fix.
439
440         * interpreter/Interpreter.cpp:
441         (JSC::Interpreter::privateExecute):
442
443 2010-10-25  Oliver Hunt  <oliver@apple.com>
444
445         Reviewed by Gavin Barraclough.
446
447         Remove exec and globalData arguments from jsNumber
448         https://bugs.webkit.org/show_bug.cgi?id=48270
449
450         Remove the now unused exec and globalData arguments from jsNumber
451         and mechanically update all users of jsNumber.
452
453         * API/JSValueRef.cpp:
454         (JSValueMakeNumber):
455         * bytecompiler/BytecodeGenerator.cpp:
456         (JSC::BytecodeGenerator::emitLoad):
457         * bytecompiler/NodesCodegen.cpp:
458         (JSC::ArrayNode::emitBytecode):
459         * jit/JITArithmetic.cpp:
460         (JSC::JIT::emit_op_mod):
461         * jit/JITArithmetic32_64.cpp:
462         (JSC::JIT::emit_op_mod):
463         * jit/JITOpcodes.cpp:
464         (JSC::JIT::emit_op_jfalse):
465         (JSC::JIT::emit_op_jtrue):
466         * jit/JITStubs.cpp:
467         (JSC::DEFINE_STUB_FUNCTION):
468         * jsc.cpp:
469         (functionRun):
470         * runtime/Arguments.cpp:
471         (JSC::Arguments::getOwnPropertySlot):
472         (JSC::Arguments::getOwnPropertyDescriptor):
473         * runtime/ArrayConstructor.cpp:
474         (JSC::ArrayConstructor::ArrayConstructor):
475         * runtime/ArrayPrototype.cpp:
476         (JSC::arrayProtoFuncPop):
477         (JSC::arrayProtoFuncPush):
478         (JSC::arrayProtoFuncShift):
479         (JSC::arrayProtoFuncSplice):
480         (JSC::arrayProtoFuncUnShift):
481         (JSC::arrayProtoFuncFilter):
482         (JSC::arrayProtoFuncMap):
483         (JSC::arrayProtoFuncEvery):
484         (JSC::arrayProtoFuncForEach):
485         (JSC::arrayProtoFuncSome):
486         (JSC::arrayProtoFuncReduce):
487         (JSC::arrayProtoFuncReduceRight):
488         (JSC::arrayProtoFuncIndexOf):
489         (JSC::arrayProtoFuncLastIndexOf):
490         * runtime/BooleanConstructor.cpp:
491         (JSC::BooleanConstructor::BooleanConstructor):
492         * runtime/CachedTranscendentalFunction.h:
493         (JSC::CachedTranscendentalFunction::operator()):
494         * runtime/DateConstructor.cpp:
495         (JSC::DateConstructor::DateConstructor):
496         (JSC::dateParse):
497         (JSC::dateNow):
498         (JSC::dateUTC):
499         * runtime/DateInstance.cpp:
500         (JSC::DateInstance::DateInstance):
501         * runtime/DatePrototype.cpp:
502         (JSC::dateProtoFuncGetFullYear):
503         (JSC::dateProtoFuncGetUTCFullYear):
504         (JSC::dateProtoFuncGetMonth):
505         (JSC::dateProtoFuncGetUTCMonth):
506         (JSC::dateProtoFuncGetDate):
507         (JSC::dateProtoFuncGetUTCDate):
508         (JSC::dateProtoFuncGetDay):
509         (JSC::dateProtoFuncGetUTCDay):
510         (JSC::dateProtoFuncGetHours):
511         (JSC::dateProtoFuncGetUTCHours):
512         (JSC::dateProtoFuncGetMinutes):
513         (JSC::dateProtoFuncGetUTCMinutes):
514         (JSC::dateProtoFuncGetSeconds):
515         (JSC::dateProtoFuncGetUTCSeconds):
516         (JSC::dateProtoFuncGetMilliSeconds):
517         (JSC::dateProtoFuncGetUTCMilliseconds):
518         (JSC::dateProtoFuncGetTimezoneOffset):
519         (JSC::dateProtoFuncSetTime):
520         (JSC::setNewValueFromTimeArgs):
521         (JSC::setNewValueFromDateArgs):
522         (JSC::dateProtoFuncSetYear):
523         (JSC::dateProtoFuncGetYear):
524         * runtime/Error.cpp:
525         (JSC::addErrorSourceInfo):
526         (JSC::addErrorDivotInfo):
527         * runtime/ErrorConstructor.cpp:
528         (JSC::ErrorConstructor::ErrorConstructor):
529         * runtime/FunctionConstructor.cpp:
530         (JSC::FunctionConstructor::FunctionConstructor):
531         * runtime/FunctionPrototype.cpp:
532         (JSC::FunctionPrototype::FunctionPrototype):
533         * runtime/JSArray.cpp:
534         (JSC::JSArray::getOwnPropertySlot):
535         (JSC::JSArray::getOwnPropertyDescriptor):
536         * runtime/JSByteArray.cpp:
537         (JSC::JSByteArray::JSByteArray):
538         * runtime/JSByteArray.h:
539         (JSC::JSByteArray::getIndex):
540         * runtime/JSFunction.cpp:
541         (JSC::JSFunction::JSFunction):
542         (JSC::JSFunction::lengthGetter):
543         (JSC::JSFunction::getOwnPropertyDescriptor):
544         * runtime/JSGlobalObject.cpp:
545         (JSC::JSGlobalObject::reset):
546         * runtime/JSGlobalObjectFunctions.cpp:
547         (JSC::globalFuncParseInt):
548         (JSC::globalFuncParseFloat):
549         * runtime/JSNumberCell.h:
550         (JSC::JSValue::JSValue):
551         (JSC::jsNaN):
552         (JSC::JSValue::toJSNumber):
553         * runtime/JSONObject.cpp:
554         (JSC::unwrapBoxedPrimitive):
555         (JSC::PropertyNameForFunctionCall::value):
556         (JSC::JSONStringify):
557         * runtime/JSString.cpp:
558         (JSC::JSString::getStringPropertyDescriptor):
559         * runtime/JSString.h:
560         (JSC::JSString::getStringPropertySlot):
561         * runtime/JSValue.h:
562         (JSC::jsDoubleNumber):
563         (JSC::jsNumber):
564         (JSC::jsNaN):
565         (JSC::JSValue::JSValue):
566         (JSC::JSValue::toJSNumber):
567         * runtime/LiteralParser.cpp:
568         (JSC::LiteralParser::parse):
569         * runtime/MathObject.cpp:
570         (JSC::MathObject::MathObject):
571         (JSC::mathProtoFuncAbs):
572         (JSC::mathProtoFuncACos):
573         (JSC::mathProtoFuncASin):
574         (JSC::mathProtoFuncATan):
575         (JSC::mathProtoFuncATan2):
576         (JSC::mathProtoFuncCeil):
577         (JSC::mathProtoFuncCos):
578         (JSC::mathProtoFuncExp):
579         (JSC::mathProtoFuncFloor):
580         (JSC::mathProtoFuncLog):
581         (JSC::mathProtoFuncMax):
582         (JSC::mathProtoFuncMin):
583         (JSC::mathProtoFuncPow):
584         (JSC::mathProtoFuncRandom):
585         (JSC::mathProtoFuncRound):
586         (JSC::mathProtoFuncSin):
587         (JSC::mathProtoFuncSqrt):
588         (JSC::mathProtoFuncTan):
589         * runtime/NativeErrorConstructor.cpp:
590         (JSC::NativeErrorConstructor::NativeErrorConstructor):
591         * runtime/NumberConstructor.cpp:
592         (JSC::NumberConstructor::NumberConstructor):
593         (JSC::numberConstructorNaNValue):
594         (JSC::numberConstructorNegInfinity):
595         (JSC::numberConstructorPosInfinity):
596         (JSC::numberConstructorMaxValue):
597         (JSC::numberConstructorMinValue):
598         (JSC::constructWithNumberConstructor):
599         (JSC::callNumberConstructor):
600         * runtime/NumberPrototype.cpp:
601         (JSC::NumberPrototype::NumberPrototype):
602         * runtime/ObjectConstructor.cpp:
603         (JSC::ObjectConstructor::ObjectConstructor):
604         * runtime/Operations.cpp:
605         (JSC::jsAddSlowCase):
606         * runtime/Operations.h:
607         (JSC::jsAdd):
608         * runtime/PrototypeFunction.cpp:
609         (JSC::PrototypeFunction::PrototypeFunction):
610         * runtime/RegExpConstructor.cpp:
611         (JSC::RegExpConstructor::RegExpConstructor):
612         (JSC::RegExpMatchesArray::fillArrayInstance):
613         * runtime/RegExpObject.cpp:
614         (JSC::regExpObjectLastIndex):
615         * runtime/StringConstructor.cpp:
616         (JSC::StringConstructor::StringConstructor):
617         * runtime/StringPrototype.cpp:
618         (JSC::StringPrototype::StringPrototype):
619         (JSC::stringProtoFuncReplace):
620         (JSC::stringProtoFuncCharCodeAt):
621         (JSC::stringProtoFuncIndexOf):
622         (JSC::stringProtoFuncLastIndexOf):
623         (JSC::stringProtoFuncSearch):
624         (JSC::stringProtoFuncLocaleCompare):
625
626 2010-10-25  David Tapuska  <dtapuska@rim.com>
627
628         Reviewed by David Kilzer.
629
630         Enable VFP if our compiler settings indicated we had a hardware
631         VFP.
632
633         https://bugs.webkit.org/show_bug.cgi?id=46096
634
635         * assembler/MacroAssemblerARM.cpp:
636         (JSC::isVFPPresent):
637
638 2010-10-25  Sheriff Bot  <webkit.review.bot@gmail.com>
639
640         Unreviewed, rolling out r70451.
641         http://trac.webkit.org/changeset/70451
642         https://bugs.webkit.org/show_bug.cgi?id=48249
643
644         Broke set-unloaded-frame-location.html under Qt (Requested by
645         caseq on #webkit).
646
647         * GNUmakefile.am:
648         * JavaScriptCore.gypi:
649         * JavaScriptCore.xcodeproj/project.pbxproj:
650         * wtf/text/TextPosition.h: Removed.
651
652 2010-10-25  Patrick Gansterer  <paroga@webkit.org>
653
654         Reviewed by David Kilzer.
655
656         Replace _countof with WTF_ARRAY_LENGTH
657         https://bugs.webkit.org/show_bug.cgi?id=48229
658
659         * wtf/Platform.h:
660
661 2010-10-25  Peter Rybin  <peter.rybin@gmail.com>
662
663         Reviewed by Adam Barth.
664
665         HTML parser should provide script column position within HTML document to JavaScript engine
666         https://bugs.webkit.org/show_bug.cgi?id=45271
667
668         Adds TextPosition* classes -- a structure that stores line/column/generation
669         level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
670         wrappers that emphasize whether int number is used as zero-based or
671         one-based.
672
673         * GNUmakefile.am:
674         * JavaScriptCore.gypi:
675         * JavaScriptCore.xcodeproj/project.pbxproj:
676         * wtf/text/TextPosition.h: Added.
677         (WTF::TextPosition::TextPosition):
678         (WTF::TextPosition::minimumPosition):
679         (WTF::TextPosition::belowRangePosition):
680         (WTF::ZeroBasedNumber::fromZeroBasedInt):
681         (WTF::ZeroBasedNumber::ZeroBasedNumber):
682         (WTF::ZeroBasedNumber::zeroBasedInt):
683         (WTF::ZeroBasedNumber::base):
684         (WTF::ZeroBasedNumber::belowBase):
685         (WTF::OneBasedNumber::fromOneBasedInt):
686         (WTF::OneBasedNumber::OneBasedNumber):
687         (WTF::OneBasedNumber::oneBasedInt):
688         (WTF::OneBasedNumber::convertAsZeroBasedInt):
689         (WTF::OneBasedNumber::convertToZeroBased):
690         (WTF::OneBasedNumber::base):
691         (WTF::OneBasedNumber::belowBase):
692         (WTF::toZeroBasedTextPosition):
693         (WTF::toOneBasedTextPosition):
694         (WTF::ZeroBasedNumber::convertToOneBased):
695
696 2010-10-24  Kwang Yul Seo  <skyul@company100.net>
697
698         Reviewed by David Kilzer.
699
700         Check endianness with __BIG_ENDIAN in RVCT.
701         https://bugs.webkit.org/show_bug.cgi?id=46122
702
703         RVCT defines __BIG_ENDIAN if compiling for a big-endian target.
704
705         * wtf/Platform.h:
706
707 2010-10-24  Dan Bernstein  <mitz@apple.com>
708
709         Rubber-stamped by Dave Kilzer.
710
711         Removed empty directories.
712
713         * JavaScriptCore: Removed.
714         * JavaScriptCore/runtime: Removed.
715
716 2010-10-24  Patrick Gansterer  <paroga@webkit.org>
717
718         Unreviewed, fix typo of last build fix.
719
720         * wtf/DateMath.cpp:
721
722 2010-10-24  Patrick Gansterer  <paroga@webkit.org>
723
724         Unreviewed build fix for chromium.
725
726         * wtf/DateMath.cpp: Added missing include.
727
728 2010-10-24  Patrick Gansterer  <paroga@webkit.org>
729
730         Reviewed by David Kilzer.
731
732         Add WTF_ARRAY_LENGTH macro to WTF
733         https://bugs.webkit.org/show_bug.cgi?id=32828
734
735         Unify the different implementations and usages.
736
737         * interpreter/Interpreter.cpp:
738         (JSC::Interpreter::privateExecute):
739         * runtime/DatePrototype.cpp:
740         (JSC::formatLocaleDate):
741         * runtime/JSGlobalObject.cpp:
742         (JSC::JSGlobalObject::reset):
743         * runtime/JSONObject.cpp:
744         (JSC::Stringifier::appendQuotedString):
745         (JSC::Stringifier::toJSON):
746         (JSC::Stringifier::appendStringifiedValue):
747         * runtime/UString.cpp:
748         (JSC::UString::number):
749         * wtf/DateMath.cpp:
750         (WTF::parseDateFromNullTerminatedCharacters):
751         * wtf/StdLibExtras.h:
752
753 2010-10-24  Dirk Schulze  <krit@webkit.org>
754
755         Reviewed by Nikolas Zimmermann.
756
757         Filter example Chiseled from SVG Wow! is slow
758         https://bugs.webkit.org/show_bug.cgi?id=48174
759
760         Added 'using WTF::ByteArray;' at the end of ByteArray.h
761
762         * wtf/ByteArray.h:
763
764 2010-10-24  Patrick Gansterer  <paroga@webkit.org>
765
766         Reviewed by David Kilzer.
767
768         Inline WTF::bitwise_cast and fix style
769         https://bugs.webkit.org/show_bug.cgi?id=48208
770
771         * wtf/StdLibExtras.h:
772         (WTF::bitwise_cast):
773         (WTF::bitCount):
774
775 2010-10-23  Xan Lopez  <xlopez@igalia.com>
776
777         Reviewed by Sam Weinig.
778
779         Unify globalData APIs
780         https://bugs.webkit.org/show_bug.cgi?id=47969
781
782         Make JSGlobalObject::globalData return a reference and adapt
783         callers. This unifies the API with the existing
784         CallFrame::globalData, which also returns a reference.
785
786         * debugger/Debugger.cpp:
787         (JSC::evaluateInGlobalCallFrame):
788         * interpreter/CallFrame.h:
789         * interpreter/Interpreter.cpp:
790         (JSC::Interpreter::dumpRegisters):
791         * jsc.cpp:
792         (runWithScripts):
793         * parser/JSParser.cpp:
794         (JSC::jsParse):
795         * parser/Parser.cpp:
796         (JSC::Parser::parse):
797         * parser/Parser.h:
798         (JSC::Parser::parse):
799         * runtime/Error.cpp:
800         (JSC::createError):
801         (JSC::createEvalError):
802         (JSC::createRangeError):
803         (JSC::createReferenceError):
804         (JSC::createSyntaxError):
805         (JSC::createTypeError):
806         (JSC::createURIError):
807         * runtime/FunctionConstructor.cpp:
808         (JSC::constructFunction):
809         * runtime/JSGlobalObject.cpp:
810         (JSC::JSGlobalObject::~JSGlobalObject):
811         (JSC::JSGlobalObject::markChildren):
812         * runtime/JSGlobalObject.h:
813         (JSC::JSGlobalObject::globalData):
814
815 2010-10-23  Dimitri Glazkov  <dglazkov@chromium.org>
816
817         Unreviewed, rolling out r70369.
818         http://trac.webkit.org/changeset/70369
819         https://bugs.webkit.org/show_bug.cgi?id=47974
820
821         Caused weird artifacts in expected results.
822
823         * wtf/Platform.h:
824
825 2010-10-23  Martin Robinson  <mrobinson@igalia.com>
826
827         Reviewed by Xan Lopez.
828
829         Crashes randomly in cairo_scaled_font_destroy
830         https://bugs.webkit.org/show_bug.cgi?id=46794
831
832         Make PlatformRefPtr aware of hashTableDeletedValue. When PlatformRefPtr
833         goes away this should probably be handled in the future via some special
834         hooks in RefCounted (or its contained type).
835
836         * wtf/PlatformRefPtr.h:
837         (WTF::PlatformRefPtr::~PlatformRefPtr):
838         (WTF::PlatformRefPtr::clear):
839         (WTF::::operator):
840
841 2010-10-22  Adam Roben  <aroben@apple.com>
842
843         Remove the QuartzCorePresent.h mechanism
844
845         This header was used to detect whether QuartzCore headers were present
846         on the system. Everyone should have these headers now so we no longer
847         need to detect.
848
849         Reviewed by Sam Weinig.
850
851         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Remove
852         code to generate QuartzCorePresent.h.
853
854         * wtf/Platform.h: Stop including QuartzCorePresent.h on Windows and
855         collapse all USE_ACCELERATED_COMPOSITING settings into one #ifdef.
856
857 2010-10-22  Adam Barth  <abarth@webkit.org>
858
859         Unreviewed, rolling out r70290.
860         http://trac.webkit.org/changeset/70290
861         https://bugs.webkit.org/show_bug.cgi?id=48111
862
863         Undelete Android build files.
864
865         * Android.mk: Added.
866
867 2010-10-22  Zoltan Herczeg  <zherczeg@webkit.org>
868
869         Reviewed by Csaba Osztrogonác.
870
871         JSC interpreter regressions after r69940
872         https://bugs.webkit.org/show_bug.cgi?id=47839
873
874         Wrong "if": It should test whether the result exists,
875         and not the opposite. It is an interpreter bug, hence
876         the bots does not capture it.
877
878         * interpreter/Interpreter.cpp:
879         (JSC::Interpreter::resolveBase):
880
881 2010-10-21  Adam Barth  <abarth@webkit.org>
882
883         Reviewed by David Levin.
884
885         Remove Android build system
886         https://bugs.webkit.org/show_bug.cgi?id=48111
887
888         * Android.mk: Removed.
889
890 2010-10-21  Kwang Yul Seo  <skyul@company100.net>
891
892         Reviewed by Kent Tamura.
893
894         [BREWMP] Add a String constructor which takes AECHAR*
895         https://bugs.webkit.org/show_bug.cgi?id=45043
896
897         Add String(const AECHAR*) constructor for convenience.
898
899         * wtf/text/WTFString.h:
900
901 2010-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
902
903         Reviewed by Martin Robinson.
904
905         [GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk
906         https://bugs.webkit.org/show_bug.cgi?id=47896
907
908         * wtf/gobject/GTypedefs.h:
909
910 2010-10-21  Adam Barth  <abarth@webkit.org>
911
912         Unreviewed, rolling out r70174.
913         http://trac.webkit.org/changeset/70174
914         https://bugs.webkit.org/show_bug.cgi?id=41948
915
916         This patch reverts a change that causes
917         http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash.
918
919         * interpreter/Interpreter.cpp:
920         (JSC::Interpreter::throwException):
921
922 2010-10-20  Simon Fraser  <simon.fraser@apple.com>
923
924         Fix the EFL build.
925
926         * wtf/CMakeLists.txt:
927
928 2010-10-20  Simon Fraser  <simon.fraser@apple.com>
929
930         Fix Windows build: export needed symbols.
931
932         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
933
934 2010-10-19  Simon Fraser  <simon.fraser@apple.com>
935
936         Reviewed by Gavin Barraclough.
937
938         https://bugs.webkit.org/show_bug.cgi?id=47851
939         
940         Add methods to DecimalNumber to return the buffer length
941         required for decimal and exponential output.
942         
943         Make some of the DecimalNumber code non-inline (no
944         effect on Sunspider), adding DecimalNumber.cpp to various
945         build systems.
946         
947         Make some DecimalNumber methods 'const'.
948
949         * Android.mk:
950         * Android.v8.wtf.mk:
951         * GNUmakefile.am:
952         * JavaScriptCore.exp:
953         * JavaScriptCore.gypi:
954         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
955         * JavaScriptCore.xcodeproj/project.pbxproj:
956         * runtime/NumberPrototype.cpp:
957         (JSC::numberProtoFuncToExponential):
958         (JSC::numberProtoFuncToFixed):
959         (JSC::numberProtoFuncToPrecision):
960         * wtf/DecimalNumber.cpp: Added.
961         (WTF::DecimalNumber::bufferLengthForStringDecimal):
962         (WTF::DecimalNumber::bufferLengthForStringExponential):
963         (WTF::DecimalNumber::toStringDecimal):
964         (WTF::DecimalNumber::toStringExponential):
965         * wtf/DecimalNumber.h:
966         (WTF::DecimalNumber::sign):
967         (WTF::DecimalNumber::exponent):
968         (WTF::DecimalNumber::significand):
969         (WTF::DecimalNumber::precision):
970         * wtf/dtoa.cpp:
971         (WTF::dtoa):
972         * wtf/dtoa.h:
973         * wtf/wtf.pri:
974
975 2010-10-20  Sheriff Bot  <webkit.review.bot@gmail.com>
976
977         Unreviewed, rolling out r70165.
978         http://trac.webkit.org/changeset/70165
979         https://bugs.webkit.org/show_bug.cgi?id=48007
980
981         It broke tests on Qt bot (Requested by Ossy on #webkit).
982
983         * GNUmakefile.am:
984         * JavaScriptCore.gypi:
985         * JavaScriptCore.xcodeproj/project.pbxproj:
986         * wtf/text/TextPosition.h: Removed.
987
988 2010-10-20  Brian Weinstein  <bweinstein@apple.com>
989
990         Reviewed by Adam Roben.
991
992         Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build
993         step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed.
994
995         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
996         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
997
998 2010-10-20  Dumitru Daniliuc  <dumi@chromium.org>
999
1000         Unreviewed, fixing the Win build.
1001
1002         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1003
1004 2010-10-20  Geoffrey Garen  <ggaren@apple.com>
1005
1006         Reviewed by Darin Adler.
1007         
1008         https://bugs.webkit.org/show_bug.cgi?id=41948
1009         REGRESSION(r60392): Registerfile can be unwound too far following an exception
1010
1011         * interpreter/Interpreter.cpp:
1012         (JSC::Interpreter::throwException): Walk the stack to calculate the high
1013         water mark currently in use. It's not safe to assume that the current
1014         CallFrame's high water mark is the highest high water mark because
1015         calls do not always set up at the end of a CallFrame. A large caller
1016         CallFrame can encompass a small callee CallFrame.
1017
1018 2010-10-20  Peter Rybin  <peter.rybin@gmail.com>
1019
1020         Reviewed by Adam Barth.
1021
1022         HTML parser should provide script column position within HTML document to JavaScript engine
1023         https://bugs.webkit.org/show_bug.cgi?id=45271
1024
1025         Adds TextPosition* classes -- a structure that stores line/column/generation
1026         level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
1027         wrappers that emphasize whether int number is used as zero-based or
1028         one-based.
1029
1030         * GNUmakefile.am:
1031         * JavaScriptCore.gypi:
1032         * JavaScriptCore.xcodeproj/project.pbxproj:
1033         * wtf/text/TextPosition.h: Added.
1034         (WTF::TextPosition::TextPosition):
1035         (WTF::TextPosition::minimumPosition):
1036         (WTF::TextPosition::belowRangePosition):
1037         (WTF::ZeroBasedNumber::fromZeroBasedInt):
1038         (WTF::ZeroBasedNumber::ZeroBasedNumber):
1039         (WTF::ZeroBasedNumber::zeroBasedInt):
1040         (WTF::ZeroBasedNumber::base):
1041         (WTF::ZeroBasedNumber::belowBase):
1042         (WTF::OneBasedNumber::fromOneBasedInt):
1043         (WTF::OneBasedNumber::OneBasedNumber):
1044         (WTF::OneBasedNumber::oneBasedInt):
1045         (WTF::OneBasedNumber::convertAsZeroBasedInt):
1046         (WTF::OneBasedNumber::convertToZeroBased):
1047         (WTF::OneBasedNumber::base):
1048         (WTF::OneBasedNumber::belowBase):
1049         (WTF::toZeroBasedTextPosition):
1050         (WTF::toOneBasedTextPosition):
1051         (WTF::ZeroBasedNumber::convertToOneBased):
1052
1053 2010-10-19  Kwang Yul Seo  <skyul@company100.net>
1054
1055         Reviewed by David Kilzer.
1056
1057         [BREWMP] Turn off JIT for simulator build
1058         https://bugs.webkit.org/show_bug.cgi?id=47937
1059
1060         We don't need to test x86 JIT.
1061
1062         * wtf/Platform.h:
1063
1064 2010-10-19  Oliver Hunt  <oliver@apple.com>
1065
1066         Reviewed by Geoffrey Garen.
1067
1068         Remove support for JSVALUE32 from JSC
1069         https://bugs.webkit.org/show_bug.cgi?id=47948
1070
1071         Remove all the code for supporting JSVALUE32 from JSC.
1072
1073         * jit/JIT.cpp:
1074         (JSC::JIT::privateCompileMainPass):
1075         (JSC::JIT::privateCompileSlowCases):
1076         * jit/JIT.h:
1077         * jit/JITArithmetic.cpp:
1078         (JSC::JIT::emit_op_lshift):
1079         (JSC::JIT::emitSlow_op_lshift):
1080         (JSC::JIT::emit_op_rshift):
1081         (JSC::JIT::emitSlow_op_rshift):
1082         (JSC::JIT::emit_op_urshift):
1083         (JSC::JIT::emitSlow_op_urshift):
1084         (JSC::JIT::emit_op_jnless):
1085         (JSC::JIT::emitSlow_op_jnless):
1086         (JSC::JIT::emit_op_jless):
1087         (JSC::JIT::emitSlow_op_jless):
1088         (JSC::JIT::emit_op_jlesseq):
1089         (JSC::JIT::emitSlow_op_jlesseq):
1090         (JSC::JIT::emit_op_bitand):
1091         (JSC::JIT::emit_op_post_inc):
1092         (JSC::JIT::emit_op_post_dec):
1093         (JSC::JIT::emit_op_pre_inc):
1094         (JSC::JIT::emit_op_pre_dec):
1095         (JSC::JIT::emit_op_mod):
1096         (JSC::JIT::emitSlow_op_mod):
1097         * jit/JITCall.cpp:
1098         * jit/JITInlineMethods.h:
1099         (JSC::JIT::emitGetFromCallFrameHeaderPtr):
1100         (JSC::JIT::emitGetFromCallFrameHeader32):
1101         * jit/JITOpcodes.cpp:
1102         (JSC::JIT::emit_op_loop_if_lesseq):
1103         (JSC::JIT::emit_op_bitnot):
1104         (JSC::JIT::emit_op_next_pname):
1105         * jit/JITPropertyAccess.cpp:
1106         (JSC::JIT::emit_op_get_by_val):
1107         (JSC::JIT::emit_op_put_by_val):
1108         * jit/JITStubs.h:
1109         * jit/JSInterfaceJIT.h:
1110         * jit/SpecializedThunkJIT.h:
1111         (JSC::SpecializedThunkJIT::returnDouble):
1112         (JSC::SpecializedThunkJIT::tagReturnAsInt32):
1113         * jit/ThunkGenerators.cpp:
1114         (JSC::sqrtThunkGenerator):
1115         (JSC::powThunkGenerator):
1116         * runtime/Collector.cpp:
1117         (JSC::isPossibleCell):
1118         (JSC::typeName):
1119         * runtime/JSCell.h:
1120         * runtime/JSGlobalData.cpp:
1121         (JSC::JSGlobalData::JSGlobalData):
1122         * runtime/JSGlobalData.h:
1123         * runtime/JSGlobalObject.h:
1124         (JSC::Structure::prototypeForLookup):
1125         * runtime/JSImmediate.h:
1126         (JSC::reinterpretIntptrToDouble):
1127         (JSC::JSImmediate::isIntegerNumber):
1128         (JSC::JSImmediate::isDouble):
1129         (JSC::JSImmediate::areBothImmediateIntegerNumbers):
1130         (JSC::JSImmediate::makeDouble):
1131         (JSC::JSImmediate::doubleValue):
1132         (JSC::JSImmediate::toBoolean):
1133         (JSC::JSImmediate::fromNumberOutsideIntegerRange):
1134         (JSC::JSImmediate::from):
1135         (JSC::JSImmediate::toDouble):
1136         (JSC::JSFastMath::rightShiftImmediateNumbers):
1137         * runtime/JSNumberCell.cpp:
1138         * runtime/JSNumberCell.h:
1139         * runtime/JSObject.h:
1140         (JSC::JSObject::JSObject):
1141         * runtime/JSValue.h:
1142         * runtime/NumberObject.h:
1143         * wtf/Platform.h:
1144
1145 2010-10-19  Csaba Osztrogonác  <ossy@webkit.org>
1146
1147         Reviewed by Geoffrey Garen.
1148
1149         BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors
1150         https://bugs.webkit.org/show_bug.cgi?id=47920
1151
1152         * bytecompiler/BytecodeGenerator.cpp:
1153         (JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization.
1154
1155 2010-10-19  Kwang Yul Seo  <skyul@company100.net>
1156
1157         Reviewed by David Kilzer.
1158
1159         RVCT fails to compile DateMath.cpp due to overloaded function pow
1160         https://bugs.webkit.org/show_bug.cgi?id=47844
1161
1162         Choose std::pow(double, double) among multiple overloaded pow functions
1163         to fix build for RVCT.
1164
1165         * wtf/DateMath.cpp:
1166         (WTF::parseES5DateFromNullTerminatedCharacters):
1167
1168 2010-10-19  Patrick Gansterer  <paroga@webkit.org>
1169
1170         Reviewed by David Kilzer.
1171
1172         Use UChar instead of wchar_t in UnicodeWinCE
1173         https://bugs.webkit.org/show_bug.cgi?id=47904
1174
1175         Make UnicodeWinCE more portable, so we can use it for other ports too.
1176
1177         * wtf/unicode/wince/UnicodeWinCE.cpp:
1178         (WTF::Unicode::toLower):
1179         (WTF::Unicode::toUpper):
1180         (WTF::Unicode::foldCase):
1181         (WTF::Unicode::isPrintableChar):
1182         (WTF::Unicode::isSpace):
1183         (WTF::Unicode::isLetter):
1184         (WTF::Unicode::isUpper):
1185         (WTF::Unicode::isLower):
1186         (WTF::Unicode::isDigit):
1187         (WTF::Unicode::isPunct):
1188         (WTF::Unicode::isAlphanumeric):
1189         (WTF::Unicode::toTitleCase):
1190         (WTF::Unicode::mirroredChar):
1191         (WTF::Unicode::digitValue):
1192         * wtf/unicode/wince/UnicodeWinCE.h:
1193         (WTF::Unicode::isSeparatorSpace):
1194         (WTF::Unicode::isHighSurrogate):
1195         (WTF::Unicode::isLowSurrogate):
1196         (WTF::Unicode::umemcasecmp):
1197         (WTF::Unicode::surrogateToUcs4):
1198
1199 2010-10-19  Patrick Gansterer  <paroga@webkit.org>
1200
1201         Reviewed by Andreas Kling.
1202
1203         Fix style of UnicodeWinCE
1204         https://bugs.webkit.org/show_bug.cgi?id=47818
1205
1206         * wtf/unicode/wince/UnicodeWinCE.cpp:
1207         (WTF::Unicode::toLower):
1208         (WTF::Unicode::toUpper):
1209         * wtf/unicode/wince/UnicodeWinCE.h:
1210
1211 2010-10-18  Xan Lopez  <xlopez@igalia.com>
1212
1213         Reviewed by Martin Robinson.
1214
1215         * GNUmakefile.am: add missing file.
1216
1217 2010-10-18  Oliver Hunt  <oliver@apple.com>
1218
1219         Reviewed by Sam Weinig.
1220
1221         Strict mode: Functions created with the function constructor don't implement strict mode semantics
1222         https://bugs.webkit.org/show_bug.cgi?id=47860
1223
1224         When creating the FunctionExecutable for a new function the function constructor
1225         was always passing false for whether or not a function was strict, rather than
1226         using the information from the freshly parsed function itself.
1227
1228         * runtime/Executable.cpp:
1229         (JSC::FunctionExecutable::fromGlobalCode):
1230
1231 2010-10-18  Oliver Hunt  <oliver@apple.com>
1232
1233         Reviewed by Darin Adler.
1234
1235         Strict mode: |this| should be undefined if it is not explicitly provided
1236         https://bugs.webkit.org/show_bug.cgi?id=47833
1237
1238         To make strict mode behave correctly we want to pass undefined instead of null
1239         as the default this value.  This has no impact on behaviour outside of strict
1240         mode as both values are replaced with the global object if necessary.
1241
1242         * bytecompiler/NodesCodegen.cpp:
1243         (JSC::FunctionCallValueNode::emitBytecode):
1244         (JSC::FunctionCallResolveNode::emitBytecode):
1245         (JSC::CallFunctionCallDotNode::emitBytecode):
1246         (JSC::ApplyFunctionCallDotNode::emitBytecode):
1247
1248
1249 2010-10-18  Darin Adler  <darin@apple.com>
1250
1251         Reviewed by Anders Carlsson.
1252
1253         Make a nullptr that works with OwnPtr and RefPtr
1254         https://bugs.webkit.org/show_bug.cgi?id=47756
1255
1256         * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h.
1257
1258         * wtf/NullPtr.h: Added.
1259
1260         * wtf/OwnArrayPtr.h: Add an overload of = taking nullptr.
1261         * wtf/OwnPtr.h: Ditto.
1262         * wtf/PassOwnArrayPtr.h: Ditto.
1263         * wtf/PassOwnPtr.h: Ditto.
1264         * wtf/PassRefPtr.h: Ditto.
1265         * wtf/RefPtr.h: Ditto.
1266         * wtf/RetainPtr.h: Ditto.
1267
1268 2010-10-18  Oliver Hunt  <oliver@apple.com>
1269
1270         Reviewed by Sam Weinig.
1271
1272         Strict mode: JIT doesn't check for |this| being an immediate before dereferencing
1273         https://bugs.webkit.org/show_bug.cgi?id=47826
1274
1275         There's no guarantee that |this| will be a cell in a strict mode function, so
1276         don't claim that it is.
1277
1278         * bytecode/CodeBlock.h:
1279         (JSC::CodeBlock::isKnownNotImmediate):
1280
1281 2010-10-18  Zoltan Herczeg  <zherczeg@webkit.org>
1282
1283         Reviewed by Oliver Hunt.
1284
1285         if (0) throw "x" ; else { } throws parse error after r69906
1286         https://bugs.webkit.org/show_bug.cgi?id=47807
1287
1288         r69906 introduced a bug: the semicolon is not parsed after a throw
1289         expression anymore. Thus, the semicolon terminates the "if" parsing
1290         in the example above, and the else token results a parse error.
1291
1292         * parser/JSParser.cpp:
1293         (JSC::JSParser::parseThrowStatement):
1294
1295 2010-10-18  Peter Varga  <pvarga@inf.u-szeged.hu>
1296
1297         Reviewed by Andreas Kling.
1298
1299         Remove some unnecessary lines of code from Parser.cpp
1300         https://bugs.webkit.org/show_bug.cgi?id=47816
1301
1302         * parser/Parser.cpp:
1303
1304 2010-10-18  Xan Lopez  <xlopez@igalia.com>
1305
1306         Reviewed by Csaba Osztrogonác.
1307
1308         Build broken with JIT disabled
1309         https://bugs.webkit.org/show_bug.cgi?id=47801
1310
1311         This is a regression caused by r69940.
1312
1313         * interpreter/Interpreter.cpp:
1314         (JSC::Interpreter::resolveBase):
1315
1316 2010-10-18  Zoltan Horvath  <zoltan@webkit.org>
1317
1318         Reviewed by Darin Adler.
1319
1320         Change FastAllocBase implementation into a macro
1321         https://bugs.webkit.org/show_bug.cgi?id=42998
1322
1323         It was investigated in bug #33896 that inheriting classes from FastAllocBase 
1324         can result in objects getting larger which leads to memory regressions. 
1325         Using a macro instead of inheriting classes from FastAllocBase would solve the issue. 
1326
1327         * wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro
1328
1329 2010-10-17  Oliver Hunt  <oliver@apple.com>
1330
1331         Reviewed by Sam Weinig.
1332
1333         Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions
1334         https://bugs.webkit.org/show_bug.cgi?id=47791
1335
1336         Simple fix, check for arguments in addition to eval.
1337
1338         * parser/JSParser.cpp:
1339         (JSC::JSParser::parseUnaryExpression):
1340
1341 2010-10-17  Oliver Hunt  <oliver@apple.com>
1342
1343         Reviewed by Sam Weinig.
1344
1345         Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure
1346         https://bugs.webkit.org/show_bug.cgi?id=47788
1347
1348         Fixing this required a couple of changes:
1349          * resolve_base now has a flag to indicate whether it is being used for a put in strict mode.
1350            this allows us to throw an exception when we're doing a completely generic resolve for
1351            assignment, and that assignment would create a new global.
1352          * There is a new opcode 'op_ensure_property_exists' that is used to determine whether
1353            the property being assigned to already exists on the global object.  This currently
1354            has no caching, but such caching could be added relatively trivially.  It is only used
1355            in the case where we know that a property will be placed on the global object, and
1356            we cannot verify that the property already exists.
1357
1358         In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather
1359         than making op_resolve_base have an additional runtime branch.
1360
1361         There's also a new helper function to create the exception for the invalid assignment.
1362
1363         * bytecode/CodeBlock.cpp:
1364         (JSC::CodeBlock::dump):
1365         * bytecode/Opcode.h:
1366         * bytecompiler/BytecodeGenerator.cpp:
1367         (JSC::BytecodeGenerator::emitResolveBase):
1368         (JSC::BytecodeGenerator::emitResolveBaseForPut):
1369         * bytecompiler/BytecodeGenerator.h:
1370         * bytecompiler/NodesCodegen.cpp:
1371         (JSC::AssignResolveNode::emitBytecode):
1372         (JSC::ForInNode::emitBytecode):
1373         * interpreter/Interpreter.cpp:
1374         (JSC::Interpreter::resolveBase):
1375         (JSC::Interpreter::privateExecute):
1376         * jit/JIT.cpp:
1377         (JSC::JIT::privateCompileMainPass):
1378         * jit/JIT.h:
1379         * jit/JITOpcodes.cpp:
1380         (JSC::JIT::emit_op_resolve_base):
1381         (JSC::JIT::emit_op_ensure_property_exists):
1382         * jit/JITOpcodes32_64.cpp:
1383         (JSC::JIT::emit_op_resolve_base):
1384         (JSC::JIT::emit_op_ensure_property_exists):
1385         * jit/JITStubs.cpp:
1386         (JSC::DEFINE_STUB_FUNCTION):
1387         * jit/JITStubs.h:
1388         * parser/JSParser.cpp:
1389         (JSC::JSParser::parseProgram):
1390         * runtime/ExceptionHelpers.cpp:
1391         (JSC::createErrorForInvalidGlobalAssignment):
1392         * runtime/ExceptionHelpers.h:
1393         * runtime/Operations.h:
1394         (JSC::resolveBase):
1395
1396 2010-10-17  Simon Fraser  <simon.fraser@apple.com>
1397
1398         First part of fix for Windows build failure. Will wait for the
1399         next set of link errors to determine the mangled forms for dtoaRoundSF
1400         and dtoaRoundDP.
1401
1402         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1403
1404 2010-10-17  Simon Fraser  <simon.fraser@apple.com>
1405
1406         Reviewed by Nikolas Zimmermann.
1407
1408         Very large and small numbers fail to round-trip through CSS
1409         https://bugs.webkit.org/show_bug.cgi?id=20674
1410         
1411         New exports required to use DecimalNumber in WebCore.
1412
1413         * JavaScriptCore.exp:
1414         * JavaScriptCore.xcodeproj/project.pbxproj:
1415
1416 2010-10-16  Kyusun Kim  <maniagoon@company100.net>
1417
1418         Reviewed by Alexey Proskuryakov.
1419
1420         Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters()
1421         https://bugs.webkit.org/show_bug.cgi?id=47758
1422
1423         * wtf/CurrentTime.h:
1424         * wtf/DateMath.h:
1425
1426 2010-10-16  Patrick Gansterer  <paroga@webkit.org>
1427
1428         Reviewed by Adam Barth.
1429
1430         Rename StringHasherFunctions.h to StringHasher.h
1431         https://bugs.webkit.org/show_bug.cgi?id=47200
1432
1433         Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name.
1434
1435         * GNUmakefile.am:
1436         * JavaScriptCore.gypi:
1437         * JavaScriptCore.xcodeproj/project.pbxproj:
1438         * wtf/StringHashFunctions.h: Removed.
1439         * wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h.
1440         * wtf/text/StringHash.h:
1441         * wtf/text/StringImpl.h:
1442
1443 2010-10-15  Oliver Hunt  <oliver@apple.com>
1444
1445         Reviewed by Sam Weinig.
1446
1447         Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline
1448         https://bugs.webkit.org/show_bug.cgi?id=47762
1449
1450         The old YACC parser depended on the lexer for some classes of semicolon insertion.
1451         The new parser handles ASI entirely on its own so when the lexer inserts a semicolon
1452         on its own the net result is a spurious semicolon in the input stream.  This can result
1453         in incorrect parsing in some cases:
1454
1455         if (0)
1456             break
1457         ;else {}
1458
1459         Would result in a parse failure as the output from the lexer is essentially
1460
1461         if (0)
1462              break
1463         ;;else
1464
1465         So the second semicolon is interpreted as a empty statement, which terminates the if,
1466         making the else an error.
1467
1468
1469         * parser/JSParser.cpp:
1470         (JSC::JSParser::parseThrowStatement):
1471           Parsing of throw statement was wrong, and only worked due to the weird behaviour
1472           in the lexer
1473         * parser/Lexer.cpp:
1474         (JSC::Lexer::lex):
1475           Remove bogus semicolon insertion from the newline handling
1476
1477 2010-10-15  Nikolas Zimmermann  <nzimmermann@rim.com>
1478
1479         Reviewed by Dirk Schulze.
1480
1481         Replace some String::format() usages by StringConcatenate in WebKit
1482         https://bugs.webkit.org/show_bug.cgi?id=47714
1483
1484         * wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString().
1485
1486 2010-10-15  Ilya Tikhonovsky  <loislo@chromium.org>
1487
1488         Unreviewed build fix for Debug Leopard which is failng to compile after r69842.
1489
1490         * yarr/RegexInterpreter.cpp:
1491         (JSC::Yarr::ByteCompiler::emitDisjunction):
1492
1493 2010-10-15  Peter Varga  <pvarga@inf.u-szeged.hu>
1494
1495         Reviewed by Gavin Barraclough.
1496
1497         The parenthetical assertion checking isn't working in some cases with YARR
1498         Interpreter
1499         https://bugs.webkit.org/show_bug.cgi?id=46893
1500
1501         Calculate the countToCheck value of a TypeParentheticalAssertion by
1502         subtracting the number of characters which follows
1503         a TypeParentheticalAssertion term with the number of characters which should
1504         be matched by terms which are contained
1505         in the TypeParentheticalAssertion term (minimumSize).
1506
1507         * yarr/RegexInterpreter.cpp:
1508         (JSC::Yarr::ByteCompiler::emitDisjunction):
1509
1510 2010-10-14  Nathan Vander Wilt  <nate@andyet.net>
1511
1512         Reviewed by Darin Adler.
1513
1514         Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632
1515
1516         * runtime/DateConversion.cpp:
1517         (JSC::parseDate):
1518         * wtf/DateMath.cpp:
1519         (WTF::ymdhmsToSeconds):
1520         (WTF::parseES5DateFromNullTerminatedCharacters):
1521         * wtf/DateMath.h:
1522
1523 2010-10-14  Nikolas Zimmermann  <nzimmermann@rim.com>
1524
1525         Reviewed by Gavin Barraclough.
1526
1527         Replace lots of String::format() usages by StringConcatenate
1528         https://bugs.webkit.org/show_bug.cgi?id=47664
1529
1530         Add StringTypeAdapter<char> to accept single characters for makeString().
1531
1532         * wtf/text/StringConcatenate.h:
1533         (WTF::makeString):
1534
1535 2010-10-14  David Goodwin  <david_goodwin@apple.com>
1536
1537         Reviewed by Darin Adler.
1538
1539         need way to measure size of JITed ARM code
1540         https://bugs.webkit.org/show_bug.cgi?id=47121
1541
1542         * assembler/LinkBuffer.h:
1543         (JSC::LinkBuffer::linkCode):
1544         (JSC::LinkBuffer::dumpLinkStats):
1545         (JSC::LinkBuffer::dumpCode):
1546
1547 2010-10-14  Peter Varga  <pvarga@inf.u-szeged.hu>
1548
1549         Reviewed by Gavin Barraclough.
1550
1551         The backreference checking isn't working in some cases with YARR Interpreter
1552         https://bugs.webkit.org/show_bug.cgi?id=46904
1553
1554         The Interpreter::matchBackReference() function returns true without matching
1555         when a backreference points to the same parentheses where it is.
1556
1557         * yarr/RegexInterpreter.cpp:
1558         (JSC::Yarr::Interpreter::matchBackReference):
1559
1560 2010-10-14  No'am Rosenthal  <noam.rosenthal@nokia.com>
1561
1562         Reviewed by Andreas Kling.
1563
1564         [Qt] Text breaking is slow: enable ICU as an opt-in
1565         https://bugs.webkit.org/show_bug.cgi?id=40332
1566
1567         Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
1568         Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h
1569
1570         * JavaScriptCore.pri:
1571         * wtf/unicode/qt4/UnicodeQt4.h:
1572         (WTF::Unicode::toLower):
1573         (WTF::Unicode::toUpper):
1574         (WTF::Unicode::toTitleCase):
1575         (WTF::Unicode::foldCase):
1576         (WTF::Unicode::isPrintableChar):
1577         (WTF::Unicode::isSeparatorSpace):
1578         (WTF::Unicode::isPunct):
1579         (WTF::Unicode::isLower):
1580         (WTF::Unicode::mirroredChar):
1581         (WTF::Unicode::combiningClass):
1582         (WTF::Unicode::direction):
1583         (WTF::Unicode::category):
1584
1585 2010-10-14  Anton Faern  <anton@bladehawke.com>
1586
1587         Reviewed by Csaba Osztrogonác.
1588
1589         https://bugs.webkit.org/show_bug.cgi?id=47658
1590         NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO
1591         change.  This means that OS(NETBSD) is also undefined.
1592
1593         * wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD
1594
1595 2010-10-13  David Goodwin  <david_goodwin@apple.com>
1596
1597         Reviewed by Oliver Hunt.
1598
1599         ARMv7 JIT should generated conditional branches when possible
1600         https://bugs.webkit.org/show_bug.cgi?id=47384
1601
1602         Use different jump padding sizes for conditional and unconditional
1603         jumps (12 bytes and 10 bytes respectively). This allows the JIT to
1604         include the IT instruction as part of the conditional jump sequence
1605         which in turn allows it to optimize away the IT using an ARMv7 
1606         conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for
1607         conditional branches when displacement is in range. Also use IT/B(T4)
1608         for conditional branch when displacement does not fit in B(T3).
1609
1610         For unconditional jump, instruction selection options are:
1611         B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection
1612         options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX.
1613
1614         * assembler/ARMv7Assembler.cpp:
1615         * assembler/ARMv7Assembler.h:
1616         (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
1617         (JSC::ARMv7Assembler::ifThenElse):
1618         (JSC::ARMv7Assembler::jumpSizeDelta):
1619         (JSC::ARMv7Assembler::canCompact):
1620         (JSC::ARMv7Assembler::computeJumpType):
1621         (JSC::ARMv7Assembler::link):
1622         (JSC::ARMv7Assembler::canBeJumpT1):
1623         (JSC::ARMv7Assembler::canBeJumpT3):
1624         (JSC::ARMv7Assembler::canBeJumpT4):
1625         (JSC::ARMv7Assembler::linkJumpT1):
1626         (JSC::ARMv7Assembler::linkJumpT3):
1627         (JSC::ARMv7Assembler::linkJumpT4):
1628         (JSC::ARMv7Assembler::linkConditionalJumpT4):
1629         (JSC::ARMv7Assembler::linkBX):
1630         (JSC::ARMv7Assembler::linkConditionalBX):
1631         (JSC::ARMv7Assembler::linkJumpAbsolute):
1632         * assembler/LinkBuffer.h:
1633         (JSC::LinkBuffer::linkCode):
1634         * assembler/MacroAssemblerARMv7.h:
1635         (JSC::MacroAssemblerARMv7::canCompact):
1636         (JSC::MacroAssemblerARMv7::computeJumpType):
1637         (JSC::MacroAssemblerARMv7::jumpSizeDelta):
1638         (JSC::MacroAssemblerARMv7::jump):
1639         (JSC::MacroAssemblerARMv7::nearCall):
1640         (JSC::MacroAssemblerARMv7::call):
1641         (JSC::MacroAssemblerARMv7::ret):
1642         (JSC::MacroAssemblerARMv7::tailRecursiveCall):
1643         (JSC::MacroAssemblerARMv7::makeJump):
1644         (JSC::MacroAssemblerARMv7::makeBranch):
1645
1646 2010-10-13  Fridrich Strba  <fridrich.strba@bluewin.ch>
1647
1648         Reviewed by Darin Adler.
1649
1650         Don't depend on Windows on sched_yield and sched.h
1651         https://bugs.webkit.org/show_bug.cgi?id=45543
1652
1653         sched.h is part of pthreads and sched_yield is implemented
1654         in pthreads-win32 as Sleep(0). This patch avoids a gratuitous
1655         dependency on pthreads-win32 in this file.
1656
1657         * wtf/TCSpinLock.h:
1658         (TCMalloc_SlowLock):
1659
1660 2010-10-13  Kwang Yul Seo  <skyul@company100.net>
1661
1662         Reviewed by Kent Tamura.
1663
1664         [BREWMP] Port unicode
1665         https://bugs.webkit.org/show_bug.cgi?id=45716
1666
1667         Brew MP port uses only the subset of ICU library to reduce the binary size.
1668         Follow the WinCE's implementation.
1669
1670         * wtf/Platform.h:
1671         * wtf/unicode/Unicode.h:
1672         * wtf/unicode/brew/UnicodeBrew.cpp: Added.
1673         (WTF::Unicode::toLower):
1674         (WTF::Unicode::toUpper):
1675         (WTF::Unicode::foldCase):
1676         (WTF::Unicode::isPrintableChar):
1677         (WTF::Unicode::isUpper):
1678         (WTF::Unicode::isLower):
1679         (WTF::Unicode::isDigit):
1680         (WTF::Unicode::isPunct):
1681         (WTF::Unicode::isAlphanumeric):
1682         (WTF::Unicode::toTitleCase):
1683         (WTF::Unicode::direction):
1684         (WTF::Unicode::category):
1685         (WTF::Unicode::decompositionType):
1686         (WTF::Unicode::combiningClass):
1687         (WTF::Unicode::mirroredChar):
1688         (WTF::Unicode::digitValue):
1689         (WTF::Unicode::isSpace):
1690         (WTF::Unicode::isLetter):
1691         * wtf/unicode/brew/UnicodeBrew.h: Added.
1692         (WTF::Unicode::isArabicChar):
1693         (WTF::Unicode::isSeparatorSpace):
1694         (WTF::Unicode::hasLineBreakingPropertyComplexContext):
1695         (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
1696         (WTF::Unicode::umemcasecmp):
1697
1698 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
1699
1700         Windows build fix.
1701
1702         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1703
1704 2010-10-13  Adam Barth  <abarth@webkit.org>
1705
1706         Reviewed by Maciej Stachowiak.
1707
1708         [WTFURL] Add URLQueryCanonicalizer
1709         https://bugs.webkit.org/show_bug.cgi?id=45088
1710
1711         This class canonicalizes the query component of URLs.  The main tricky
1712         bit there is the convertCharset function, which I've moved to a
1713         templated dependency.  There'll likely be more about that in future
1714         patches.
1715
1716         * JavaScriptCore.xcodeproj/project.pbxproj:
1717         * wtf/url/src/URLEscape.cpp: Added.
1718         * wtf/url/src/URLEscape.h: Added.
1719         (WTF::appendEscapedCharacter):
1720         * wtf/url/src/URLQueryCanonicalizer.h: Added.
1721         (WTF::URLQueryCanonicalizer::canonicalize):
1722         (WTF::URLQueryCanonicalizer::isAllASCII):
1723         (WTF::URLQueryCanonicalizer::appendRaw8BitQueryString):
1724         (WTF::URLQueryCanonicalizer::convertToQueryEncoding):
1725
1726 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
1727
1728         Reviewed by Oliver Hunt.
1729
1730         Bug 43987 - Downloading using XHR is much slower than before
1731         Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector.
1732         Fundamentally this should be the same (copies current contents to expand capacity,
1733         rather than using a rope), but this approach allows the intermadiate state of the
1734         String to be inspected in the buffer without copying to resolve.
1735
1736         * runtime/JSONObject.cpp:
1737         (JSC::Stringifier::appendQuotedString):
1738         (JSC::Stringifier::Holder::appendNextProperty):
1739             Renamed StringBuilder::size() -> length() (to match other String types).
1740
1741         * runtime/UStringBuilder.h:
1742         (JSC::UStringBuilder::append):
1743         (JSC::UStringBuilder::toUString):
1744             Update for changes in parent class, can just 'using' the append methods.
1745
1746         * wtf/text/StringBuilder.cpp: Added.
1747         (WTF::StringBuilder::reifyString):
1748         (WTF::StringBuilder::resize):
1749         (WTF::StringBuilder::reserveCapacity):
1750         (WTF::StringBuilder::allocateBuffer):
1751         (WTF::StringBuilder::appendUninitialized):
1752         (WTF::StringBuilder::append):
1753         (WTF::StringBuilder::shrinkToFit):
1754         * wtf/text/StringBuilder.h:
1755         (WTF::StringBuilder::StringBuilder):
1756         (WTF::StringBuilder::append):
1757         (WTF::StringBuilder::toString):
1758         (WTF::StringBuilder::toStringPreserveCapacity):
1759         (WTF::StringBuilder::length):
1760         (WTF::StringBuilder::isEmpty):
1761         (WTF::StringBuilder::operator[]):
1762         (WTF::StringBuilder::clear):
1763             Class updated to use overcapacity in a StringImpl, rather than a Vector.
1764
1765         * Android.mk:
1766         * Android.v8.wtf.mk:
1767         * GNUmakefile.am:
1768         * JavaScriptCore.exp:
1769         * JavaScriptCore.gypi:
1770         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1771         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1772         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1773         * JavaScriptCore.xcodeproj/project.pbxproj:
1774         * wtf/CMakeLists.txt:
1775         * wtf/wtf.pri:
1776
1777 2010-10-13  Adam Roben  <aroben@apple.com>
1778
1779         Export tryFastRealloc for WebKit2's benefit
1780
1781         Rubber-stamped by Anders Carlsson.
1782
1783         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
1784         tryFastRealloc. Removed RegExpObject::info, which is now exported via
1785         JS_EXPORTDATA.
1786
1787 2010-10-13  Adam Barth  <abarth@webkit.org>
1788
1789         Reviewed by Maciej Stachowiak.
1790
1791         [WTFURL] Add a mechanism for classifying types of characters
1792         https://bugs.webkit.org/show_bug.cgi?id=45085
1793
1794         Various characters have different escaping rules depending on where
1795         they are in URLs.  This patch adds a table containing that information.
1796
1797         * JavaScriptCore.xcodeproj/project.pbxproj:
1798         * wtf/url/src/URLCharacterTypes.cpp: Added.
1799         * wtf/url/src/URLCharacterTypes.h: Added.
1800         (WTF::URLCharacterTypes::isQueryChar):
1801         (WTF::URLCharacterTypes::isIPv4Char):
1802         (WTF::URLCharacterTypes::isHexChar):
1803         (WTF::URLCharacterTypes::isCharOfType):
1804
1805 2010-10-13  Xan Lopez  <xlopez@igalia.com>
1806
1807         Reviewed by Csaba Osztrogonác.
1808
1809         Missing parameters for bytecode dump of next_pname
1810         https://bugs.webkit.org/show_bug.cgi?id=47590
1811
1812         * bytecode/CodeBlock.cpp:
1813         (JSC::CodeBlock::dump): add missing parameters to the dump.
1814
1815 2010-10-13  Nikolas Zimmermann  <nzimmermann@rim.com>
1816
1817         Reviewed by Dirk Schulze.
1818
1819         Add wtf/text/StringConcatenate
1820         https://bugs.webkit.org/show_bug.cgi?id=47584
1821
1822         Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too.
1823         Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString.
1824         Exactly the same design that has been followed while refactoring StringBuilder.
1825
1826         The UString variants can all be removed as soon as WTF::String & JSC::UString converge.
1827
1828         * GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h.
1829         * JavaScriptCore.gypi: Ditto.
1830         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
1831         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
1832         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
1833         * bytecode/CodeBlock.cpp: s/makeString/makeUString/
1834         (JSC::escapeQuotes):
1835         (JSC::valueToSourceString):
1836         (JSC::constantName):
1837         (JSC::idName):
1838         (JSC::CodeBlock::registerName):
1839         (JSC::regexpToSourceString):
1840         (JSC::regexpName):
1841         * bytecompiler/NodesCodegen.cpp: Ditto.
1842         (JSC::substitute):
1843         * profiler/Profiler.cpp: Ditto.
1844         (JSC::Profiler::createCallIdentifier):
1845         * runtime/ExceptionHelpers.cpp: Ditto.
1846         (JSC::createUndefinedVariableError):
1847         (JSC::createErrorMessage):
1848         (JSC::createInvalidParamError):
1849         * runtime/FunctionConstructor.cpp: Ditto.
1850         (JSC::constructFunction):
1851         * runtime/FunctionPrototype.cpp: Ditto.
1852         (JSC::insertSemicolonIfNeeded):
1853         * runtime/JSONObject.cpp: Ditto.
1854         (JSC::Stringifier::indent):
1855         * runtime/JSStringBuilder.h:
1856         (JSC::jsMakeNontrivialString):
1857         * runtime/RegExpConstructor.cpp: Ditto.
1858         (JSC::constructRegExp):
1859         * runtime/RegExpObject.cpp: Ditto.
1860         (JSC::RegExpObject::match):
1861         * runtime/RegExpPrototype.cpp: Ditto.
1862         (JSC::regExpProtoFuncCompile):
1863         * runtime/StringConcatenate.h: Removed.
1864         * runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h
1865         (JSC::makeUString):
1866         * wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h.
1867         (WTF::makeString):
1868
1869 2010-10-12  Gavin Barraclough  <barraclough@apple.com>
1870
1871         Windows build fix.
1872
1873         * wtf/text/StringBuilder.h:
1874         (WTF::StringBuilder::length):
1875
1876 2010-10-12  Nikolas Zimmermann  <nzimmermann@rim.com>
1877
1878         Reviewed by Gavin Barraclough.
1879
1880         Unify JSC::StringBuilder & WebCore::StringBuilder
1881         https://bugs.webkit.org/show_bug.cgi?id=47538
1882
1883         Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String().
1884         Move the append(const JSC::UString&) method into runtime/UStringBuilder.h.
1885         UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality.
1886
1887         No new code, just move code around.
1888
1889         * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h.
1890         * JavaScriptCore.gypi: Ditto.
1891         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
1892         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
1893         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
1894         * runtime/Executable.cpp:
1895         (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString().
1896         * runtime/FunctionConstructor.cpp:
1897         (JSC::constructFunction): Ditto.
1898         * runtime/JSGlobalObjectFunctions.cpp:
1899         (JSC::globalFuncUnescape): Ditto.
1900         * runtime/JSONObject.cpp:
1901         (JSC::Stringifier::stringify): Ditto.
1902         (JSC::Stringifier::appendQuotedString): Ditto.
1903         (JSC::Stringifier::appendStringifiedValue): Ditto.
1904         (JSC::Stringifier::startNewLine): Ditto.
1905         (JSC::Stringifier::Holder::appendNextProperty): Ditto.
1906         * runtime/LiteralParser.cpp:
1907         (JSC::LiteralParser::Lexer::lexString): Ditto.
1908         * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include.
1909         * runtime/StringBuilder.h: Removed.
1910         * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods.
1911         (JSC::UStringBuilder::append): append(const JSC::UString&)
1912         (JSC::UStringBuilder::toUString):
1913         * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h
1914         (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere.
1915         (WTF::StringBuilder::isEmpty): Ditto (+ constify method). 
1916         (WTF::StringBuilder::reserveCapacity): Ditto.
1917         (WTF::StringBuilder::resize): Ditto.
1918         (WTF::StringBuilder::size): Ditto.
1919         (WTF::StringBuilder::operator[]): Ditto.
1920         (WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder.
1921
1922 2010-10-12  Michael Saboff  <msaboff@apple.com>
1923
1924         Reviewed by Oliver Hunt.
1925
1926         Cleaned up the processing of replacements after regular expression
1927         processing, especially the case where there wasn't a match.
1928         Changed to use empty strings instead of computing a zero length sub
1929         string.
1930         https://bugs.webkit.org/show_bug.cgi?id=47506
1931
1932         * runtime/StringPrototype.cpp:
1933         (JSC::jsSpliceSubstringsWithSeparators):
1934         (JSC::stringProtoFuncReplace):
1935
1936 2010-10-11  Patrick Gansterer  <paroga@webkit.org>
1937
1938         Unreviewed.
1939
1940         Clang build fix after r69472.
1941         https://bugs.webkit.org/show_bug.cgi?id=46523
1942
1943         * wtf/text/StringHash.h:
1944
1945 2010-10-11  Oliver Hunt  <oliver@apple.com>
1946
1947         Undo last minute change to 32bit build.
1948
1949         * jit/JITOpcodes32_64.cpp:
1950         (JSC::JIT::emit_op_convert_this_strict):
1951
1952 2010-10-11  Brian Weinstein  <bweinstein@apple.com>
1953
1954         Build fix for Windows. Add a necessary export from r69516.
1955
1956         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1957
1958 2010-10-11  Oliver Hunt  <oliver@apple.com>
1959
1960         Fix interpreter build -- was broken by incorrect merge.
1961
1962         * interpreter/Interpreter.cpp:
1963         (JSC::Interpreter::privateExecute):
1964
1965 2010-10-01  Oliver Hunt  <oliver@apple.com>
1966
1967         Reviewed by Gavin Barraclough.
1968
1969         [ES5] Implement strict mode
1970         https://bugs.webkit.org/show_bug.cgi?id=10701
1971
1972         Initial strict mode implementation.  This is the simplest
1973         implementation that could possibly work and adds (hopefully)
1974         all of the restrictions required by strict mode.  There are
1975         a number of inefficiencies, especially in the handling of
1976         arguments and eval as smart implementations would make this
1977         patch more complicated.  
1978
1979         The SyntaxChecker AST builder has become somewhat more complex
1980         as strict mode does require more parse tree information to
1981         validate the syntax.
1982
1983         Summary of major changes to the parser:
1984             * We track when we enter strict mode (this may come as a surprise)
1985             * Strict mode actually requires a degree of AST knowledge to validate
1986               so the SyntaxChecker now produces values that can be used to distinguish
1987               "node" types.
1988             * We now track variables that are written to.  We do this to
1989               statically identify writes to global properties that don't exist
1990               and abort at that point.  This should actually make it possible
1991               to optimise some other cases in the future but for now it's
1992               purely for validity checking.  Currently writes are only tracked
1993               in strict mode code.
1994             * Labels are now tracked as it is now a syntax error to jump to a label
1995               that does not exist (or to use break, continue, or return in a context
1996               where they would be invalid).
1997
1998         Runtime changes:
1999             * In order to get correct hanlding of the Arguments object all
2000               strict mode functions that reference arguments create and tearoff
2001               the arguments object on entry.  This is not strictly necessary
2002               but was the least work necessary to get the correct behaviour.
2003             * PutPropertySlot now tracks whether it is being used for a strict
2004               mode write, and if so Object::put will throw when a write can't be
2005               completed.
2006             * StrictEvalActivation was added as an "activation" object for strict
2007               mode eval (so that strict eval does not introduce new variables into
2008               the containing scope).
2009
2010         * CMakeLists.txt:
2011         * GNUmakefile.am:
2012         * JavaScriptCore.exp:
2013         * JavaScriptCore.pro:
2014         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2015         * JavaScriptCore.xcodeproj/project.pbxproj:
2016         * bytecode/CodeBlock.cpp:
2017         (JSC::CodeBlock::dump):
2018         (JSC::CodeBlock::CodeBlock):
2019         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
2020         * bytecode/CodeBlock.h:
2021         (JSC::CodeBlock::isStrictMode):
2022         * bytecode/EvalCodeCache.h:
2023         (JSC::EvalCodeCache::get):
2024         * bytecode/Opcode.h:
2025         * bytecompiler/BytecodeGenerator.cpp:
2026         (JSC::BytecodeGenerator::BytecodeGenerator):
2027         (JSC::BytecodeGenerator::createArgumentsIfNecessary):
2028         (JSC::BytecodeGenerator::emitReturn):
2029         * bytecompiler/BytecodeGenerator.h:
2030         (JSC::BytecodeGenerator::isStrictMode):
2031         (JSC::BytecodeGenerator::makeFunction):
2032         * debugger/Debugger.cpp:
2033         (JSC::evaluateInGlobalCallFrame):
2034         * debugger/DebuggerCallFrame.cpp:
2035         (JSC::DebuggerCallFrame::evaluate):
2036         * interpreter/Interpreter.cpp:
2037         (JSC::Interpreter::callEval):
2038         (JSC::Interpreter::unwindCallFrame):
2039         (JSC::Interpreter::execute):
2040         (JSC::Interpreter::privateExecute):
2041         * jit/JIT.cpp:
2042         (JSC::JIT::privateCompileMainPass):
2043         (JSC::JIT::privateCompileSlowCases):
2044         * jit/JIT.h:
2045         * jit/JITOpcodes.cpp:
2046         (JSC::JIT::emit_op_get_pnames):
2047         (JSC::JIT::emit_op_convert_this_strict):
2048         (JSC::JIT::emitSlow_op_convert_this_strict):
2049         * jit/JITOpcodes32_64.cpp:
2050         (JSC::JIT::emit_op_get_pnames):
2051         * jit/JITStubs.cpp:
2052         (JSC::DEFINE_STUB_FUNCTION):
2053         * jit/JITStubs.h:
2054         * parser/ASTBuilder.h:
2055         (JSC::ASTBuilder::createFunctionBody):
2056         (JSC::ASTBuilder::isResolve):
2057         * parser/JSParser.cpp:
2058         (JSC::JSParser::next):
2059         (JSC::JSParser::startLoop):
2060         (JSC::JSParser::endLoop):
2061         (JSC::JSParser::startSwitch):
2062         (JSC::JSParser::endSwitch):
2063         (JSC::JSParser::setStrictMode):
2064         (JSC::JSParser::strictMode):
2065         (JSC::JSParser::isValidStrictMode):
2066         (JSC::JSParser::declareParameter):
2067         (JSC::JSParser::breakIsValid):
2068         (JSC::JSParser::pushLabel):
2069         (JSC::JSParser::popLabel):
2070         (JSC::JSParser::hasLabel):
2071         (JSC::JSParser::DepthManager::DepthManager):
2072         (JSC::JSParser::DepthManager::~DepthManager):
2073         (JSC::JSParser::Scope::Scope):
2074         (JSC::JSParser::Scope::startSwitch):
2075         (JSC::JSParser::Scope::endSwitch):
2076         (JSC::JSParser::Scope::startLoop):
2077         (JSC::JSParser::Scope::endLoop):
2078         (JSC::JSParser::Scope::inLoop):
2079         (JSC::JSParser::Scope::breakIsValid):
2080         (JSC::JSParser::Scope::pushLabel):
2081         (JSC::JSParser::Scope::popLabel):
2082         (JSC::JSParser::Scope::hasLabel):
2083         (JSC::JSParser::Scope::isFunction):
2084         (JSC::JSParser::Scope::declareVariable):
2085         (JSC::JSParser::Scope::declareWrite):
2086         (JSC::JSParser::Scope::deleteProperty):
2087         (JSC::JSParser::Scope::declareParameter):
2088         (JSC::JSParser::Scope::setNeedsFullActivation):
2089         (JSC::JSParser::Scope::collectFreeVariables):
2090         (JSC::JSParser::Scope::getUncapturedWrittenVariables):
2091         (JSC::JSParser::Scope::getDeletedVariables):
2092         (JSC::JSParser::Scope::setStrictMode):
2093         (JSC::JSParser::Scope::strictMode):
2094         (JSC::JSParser::Scope::isValidStrictMode):
2095         (JSC::JSParser::pushScope):
2096         (JSC::JSParser::popScope):
2097         (JSC::JSParser::declareVariable):
2098         (JSC::JSParser::declareWrite):
2099         (JSC::JSParser::deleteProperty):
2100         (JSC::jsParse):
2101         (JSC::JSParser::JSParser):
2102         (JSC::JSParser::parseProgram):
2103         (JSC::JSParser::parseSourceElements):
2104         (JSC::JSParser::parseDoWhileStatement):
2105         (JSC::JSParser::parseWhileStatement):
2106         (JSC::JSParser::parseVarDeclarationList):
2107         (JSC::JSParser::parseConstDeclarationList):
2108         (JSC::JSParser::parseForStatement):
2109         (JSC::JSParser::parseBreakStatement):
2110         (JSC::JSParser::parseContinueStatement):
2111         (JSC::JSParser::parseReturnStatement):
2112         (JSC::JSParser::parseWithStatement):
2113         (JSC::JSParser::parseSwitchStatement):
2114         (JSC::JSParser::parseSwitchClauses):
2115         (JSC::JSParser::parseSwitchDefaultClause):
2116         (JSC::JSParser::parseTryStatement):
2117         (JSC::JSParser::parseBlockStatement):
2118         (JSC::JSParser::parseStatement):
2119         (JSC::JSParser::parseFormalParameters):
2120         (JSC::JSParser::parseFunctionBody):
2121         (JSC::JSParser::parseFunctionInfo):
2122         (JSC::JSParser::parseFunctionDeclaration):
2123         (JSC::JSParser::parseExpressionOrLabelStatement):
2124         (JSC::JSParser::parseIfStatement):
2125         (JSC::JSParser::parseExpression):
2126         (JSC::JSParser::parseAssignmentExpression):
2127         (JSC::JSParser::parseConditionalExpression):
2128         (JSC::JSParser::parseBinaryExpression):
2129         (JSC::JSParser::parseStrictObjectLiteral):
2130         (JSC::JSParser::parsePrimaryExpression):
2131         (JSC::JSParser::parseMemberExpression):
2132         (JSC::JSParser::parseUnaryExpression):
2133         * parser/JSParser.h:
2134         * parser/Lexer.cpp:
2135         (JSC::Lexer::parseString):
2136         (JSC::Lexer::lex):
2137         * parser/Lexer.h:
2138         (JSC::Lexer::isReparsing):
2139         * parser/Nodes.cpp:
2140         (JSC::ScopeNode::ScopeNode):
2141         (JSC::FunctionBodyNode::FunctionBodyNode):
2142         (JSC::FunctionBodyNode::create):
2143         * parser/Nodes.h:
2144         (JSC::ScopeNode::isStrictMode):
2145         * parser/Parser.cpp:
2146         (JSC::Parser::parse):
2147         * parser/Parser.h:
2148         (JSC::Parser::parse):
2149         * parser/SyntaxChecker.h:
2150         (JSC::SyntaxChecker::SyntaxChecker):
2151         (JSC::SyntaxChecker::makeFunctionCallNode):
2152         (JSC::SyntaxChecker::appendToComma):
2153         (JSC::SyntaxChecker::createCommaExpr):
2154         (JSC::SyntaxChecker::makeAssignNode):
2155         (JSC::SyntaxChecker::makePrefixNode):
2156         (JSC::SyntaxChecker::makePostfixNode):
2157         (JSC::SyntaxChecker::makeTypeOfNode):
2158         (JSC::SyntaxChecker::makeDeleteNode):
2159         (JSC::SyntaxChecker::makeNegateNode):
2160         (JSC::SyntaxChecker::makeBitwiseNotNode):
2161         (JSC::SyntaxChecker::createLogicalNot):
2162         (JSC::SyntaxChecker::createUnaryPlus):
2163         (JSC::SyntaxChecker::createVoid):
2164         (JSC::SyntaxChecker::thisExpr):
2165         (JSC::SyntaxChecker::createResolve):
2166         (JSC::SyntaxChecker::createObjectLiteral):
2167         (JSC::SyntaxChecker::createArray):
2168         (JSC::SyntaxChecker::createNumberExpr):
2169         (JSC::SyntaxChecker::createString):
2170         (JSC::SyntaxChecker::createBoolean):
2171         (JSC::SyntaxChecker::createNull):
2172         (JSC::SyntaxChecker::createBracketAccess):
2173         (JSC::SyntaxChecker::createDotAccess):
2174         (JSC::SyntaxChecker::createRegex):
2175         (JSC::SyntaxChecker::createNewExpr):
2176         (JSC::SyntaxChecker::createConditionalExpr):
2177         (JSC::SyntaxChecker::createAssignResolve):
2178         (JSC::SyntaxChecker::createFunctionExpr):
2179         (JSC::SyntaxChecker::createFunctionBody):
2180         (JSC::SyntaxChecker::appendBinaryExpressionInfo):
2181         (JSC::SyntaxChecker::operatorStackPop):
2182         * runtime/Arguments.cpp:
2183         (JSC::Arguments::createStrictModeCallerIfNecessary):
2184         (JSC::Arguments::createStrictModeCalleeIfNecessary):
2185         (JSC::Arguments::getOwnPropertySlot):
2186         (JSC::Arguments::getOwnPropertyDescriptor):
2187         (JSC::Arguments::put):
2188         (JSC::Arguments::deleteProperty):
2189         * runtime/Arguments.h:
2190         (JSC::Arguments::Arguments):
2191         * runtime/CommonIdentifiers.cpp:
2192         (JSC::CommonIdentifiers::CommonIdentifiers):
2193         * runtime/CommonIdentifiers.h:
2194         * runtime/Error.cpp:
2195         (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
2196         (JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
2197         (JSC::StrictModeTypeErrorFunction::getConstructData):
2198         (JSC::StrictModeTypeErrorFunction::callThrowTypeError):
2199         (JSC::StrictModeTypeErrorFunction::getCallData):
2200         (JSC::createTypeErrorFunction):
2201         * runtime/Error.h:
2202         * runtime/Executable.cpp:
2203         (JSC::EvalExecutable::EvalExecutable):
2204         (JSC::ProgramExecutable::ProgramExecutable):
2205         (JSC::FunctionExecutable::FunctionExecutable):
2206         (JSC::EvalExecutable::compileInternal):
2207         (JSC::ProgramExecutable::checkSyntax):
2208         (JSC::ProgramExecutable::compileInternal):
2209         (JSC::FunctionExecutable::compileForCallInternal):
2210         (JSC::FunctionExecutable::compileForConstructInternal):
2211         (JSC::FunctionExecutable::reparseExceptionInfo):
2212         (JSC::EvalExecutable::reparseExceptionInfo):
2213         (JSC::FunctionExecutable::fromGlobalCode):
2214         (JSC::ProgramExecutable::reparseExceptionInfo):
2215         * runtime/Executable.h:
2216         (JSC::ScriptExecutable::ScriptExecutable):
2217         (JSC::ScriptExecutable::isStrictMode):
2218         (JSC::EvalExecutable::create):
2219         (JSC::FunctionExecutable::create):
2220         * runtime/JSActivation.cpp:
2221         (JSC::JSActivation::toStrictThisObject):
2222         * runtime/JSActivation.h:
2223         * runtime/JSFunction.cpp:
2224         (JSC::createDescriptorForThrowingProperty):
2225         (JSC::JSFunction::getOwnPropertySlot):
2226         (JSC::JSFunction::getOwnPropertyDescriptor):
2227         (JSC::JSFunction::put):
2228         * runtime/JSGlobalData.cpp:
2229         (JSC::JSGlobalData::JSGlobalData):
2230         * runtime/JSGlobalData.h:
2231         * runtime/JSGlobalObject.cpp:
2232         (JSC::JSGlobalObject::reset):
2233         * runtime/JSGlobalObject.h:
2234         (JSC::JSGlobalObject::internalFunctionStructure):
2235         * runtime/JSGlobalObjectFunctions.cpp:
2236         (JSC::globalFuncEval):
2237         * runtime/JSObject.cpp:
2238         (JSC::JSObject::put):
2239         (JSC::JSObject::toStrictThisObject):
2240         (JSC::throwTypeError):
2241         * runtime/JSObject.h:
2242         (JSC::JSObject::isStrictModeFunction):
2243         (JSC::JSObject::putDirectInternal):
2244         (JSC::JSObject::putDirect):
2245         (JSC::JSValue::putDirect):
2246         (JSC::JSValue::toStrictThisObject):
2247         * runtime/JSStaticScopeObject.cpp:
2248         (JSC::JSStaticScopeObject::toStrictThisObject):
2249         * runtime/JSStaticScopeObject.h:
2250         * runtime/JSValue.h:
2251         * runtime/JSZombie.h:
2252         (JSC::JSZombie::toStrictThisObject):
2253         * runtime/PutPropertySlot.h:
2254         (JSC::PutPropertySlot::PutPropertySlot):
2255         (JSC::PutPropertySlot::isStrictMode):
2256         * runtime/StrictEvalActivation.cpp: Added.
2257         (JSC::StrictEvalActivation::StrictEvalActivation):
2258         (JSC::StrictEvalActivation::deleteProperty):
2259         (JSC::StrictEvalActivation::toThisObject):
2260         (JSC::StrictEvalActivation::toStrictThisObject):
2261         * runtime/StrictEvalActivation.h: Added.
2262
2263 2010-10-10  Patrick Gansterer  <paroga@webkit.org>
2264
2265         Unreviewed.
2266
2267         Windows build fix after r69472.
2268
2269         * wtf/text/StringHash.h:
2270         (WTF::CaseFoldingHash::hash):
2271
2272 2010-10-10  Patrick Gansterer  <paroga@webkit.org>
2273
2274         Reviewed by Adam Barth.
2275
2276         Use WTF::StringHasher in WTF::CaseFoldingHash
2277         https://bugs.webkit.org/show_bug.cgi?id=46523
2278
2279         * wtf/text/StringHash.h:
2280         (WTF::CaseFoldingHash::foldCase):
2281         (WTF::CaseFoldingHash::hash):
2282
2283 2010-10-09  Pratik Solanki  <psolanki@apple.com>
2284
2285         Reviewed by Xan Lopez.
2286
2287         https://bugs.webkit.org/show_bug.cgi?id=47445
2288         Remove unused function WTFThreadData::initializeIdentifierTable()
2289
2290         * wtf/WTFThreadData.h:
2291
2292 2010-10-08  Michael Saboff  <msaboff@apple.com>
2293
2294         Reviewed by Darin Adler.
2295
2296         Added check to start of subexpression being positive before using
2297         subexpression in replacement.
2298         https://bugs.webkit.org/show_bug.cgi?id=47324
2299
2300         * runtime/StringPrototype.cpp:
2301         (JSC::substituteBackreferencesSlow):
2302
2303 2010-10-08  Chris Evans  <cevans@google.com>
2304
2305         Reviewed by David Levin.
2306
2307         https://bugs.webkit.org/show_bug.cgi?id=47393
2308
2309         Use unsigned consistently to check for max StringImpl length.
2310         Add a few integer overflow checks.
2311         Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request.
2312
2313         * wtf/text/WTFString.cpp:
2314         * wtf/text/StringImpl.h:
2315         * wtf/text/StringImpl.cpp:
2316         Better use of size_t vs. unsigned; check for integer overflows.
2317
2318 2010-10-07  David Goodwin  <david_goodwin@apple.com>
2319
2320         Reviewed by Oliver Hunt.
2321
2322         ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount
2323         https://bugs.webkit.org/show_bug.cgi?id=47356
2324
2325         * assembler/ARMv7Assembler.h:
2326
2327 2010-10-06  Chris Evans  <cevans@google.com>
2328
2329         Reviewed by David Levin.
2330
2331         https://bugs.webkit.org/show_bug.cgi?id=47248
2332
2333         Use size_t consistently in CString, to prevent theoretical trouble
2334         with > 4GB strings on 64-bit platforms.
2335
2336         * wtf/text/CString.h:
2337         * wtf/text/CString.cpp:
2338         Use size_t for string lengths.
2339         * wtf/MD5.cpp:
2340         (WTF::expectMD5): use suitable format string + cast for size_t.
2341         * JavaScriptCore.exp:
2342         Update symbol name.
2343
2344 2010-10-06  Anders Carlsson  <andersca@apple.com>
2345
2346         Reviewed by Sam Weinig.
2347
2348         Start cleaning up Arguments.h
2349         https://bugs.webkit.org/show_bug.cgi?id=47304
2350
2351         * wtf/TypeTraits.h:
2352         * wtf/TypeTraits.cpp:
2353         Add RemoveReference type trait.
2354
2355 2010-10-06  Rafael Antognolli  <antognolli@profusion.mobi>
2356
2357         Unreviewed build fix.
2358
2359         [EFL] Build fix for glib support.
2360         https://bugs.webkit.org/show_bug.cgi?id=47221
2361
2362         If compiling with GLib support enabled, we also need to link wtf against
2363         glib library.
2364
2365         * wtf/CMakeListsEfl.txt:
2366
2367 2010-10-05  Kwang Yul Seo  <skyul@company100.net>
2368
2369         Reviewed by Gavin Barraclough.
2370
2371         [BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT
2372         https://bugs.webkit.org/show_bug.cgi?id=47117
2373
2374         Use IMemCache1 to flush data cache and invalidate instruction cache.
2375
2376         * jit/ExecutableAllocator.h:
2377         (JSC::ExecutableAllocator::cacheFlush):
2378
2379 2010-10-05  Leandro Pereira  <leandro@profusion.mobi>
2380
2381         Unreviewed. Build fix.
2382
2383         Moved "jsc" directory to "shell", so that the name does not clash with the
2384         JavaScriptCore shell in some build systems.
2385         http://webkit.org/b/47049
2386
2387         * CMakeLists.txt: Changed reference from "jsc" to "shell".
2388         * jsc: Removed.
2389         * jsc/CMakeLists.txt: Removed.
2390         * jsc/CMakeListsEfl.txt: Removed.
2391         * shell: Copied from JavaScriptCore/jsc.
2392
2393 2010-10-05  Kwang Yul Seo  <skyul@company100.net>
2394
2395         Reviewed by Kent Tamura.
2396
2397         [BREWMP] Use PlatformRefPtr in randomNumber
2398         https://bugs.webkit.org/show_bug.cgi?id=46989
2399
2400         Use PlatformRefPtr to free memory automatically.
2401
2402         * wtf/RandomNumber.cpp:
2403         (WTF::randomNumber):
2404
2405 2010-10-05  Oliver Hunt  <oliver@apple.com>
2406
2407         Reviewed by Darin Adler.
2408
2409         REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64)
2410         https://bugs.webkit.org/show_bug.cgi?id=46690
2411
2412         Use the correct register value when initialising the arguments
2413         object in the interpreter.  This is covered by existing tests.
2414
2415         * interpreter/Interpreter.cpp:
2416         (JSC::Interpreter::privateExecute):
2417
2418 2010-10-04  David Goodwin  <david_goodwin@apple.com>
2419
2420         Reviewed by Oliver Hunt.
2421
2422         ARMv7 JIT should take advantage of 2-byte branches to reduce code size
2423         https://bugs.webkit.org/show_bug.cgi?id=47007
2424
2425         * assembler/ARMv7Assembler.cpp:
2426         * assembler/ARMv7Assembler.h:
2427         (JSC::ARMv7Assembler::computeJumpType):
2428         (JSC::ARMv7Assembler::link):
2429         (JSC::ARMv7Assembler::canBeJumpT2):
2430         (JSC::ARMv7Assembler::canBeJumpT4):
2431         (JSC::ARMv7Assembler::linkBX):
2432         (JSC::ARMv7Assembler::linkJumpT4):
2433         (JSC::ARMv7Assembler::linkJumpT2):
2434         (JSC::ARMv7Assembler::linkJumpAbsolute):
2435
2436 2010-10-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2437
2438         Reviewed by Antonio Gomes.
2439
2440         [EFL] Use fast malloc for WebKit EFL
2441         https://bugs.webkit.org/show_bug.cgi?id=46691
2442
2443         Use fast malloc for WebKit EFL because the fast malloc is to allocate
2444         memory quickly.
2445
2446         * wtf/CMakeListsEfl.txt:
2447
2448 2010-10-04  Oliver Hunt  <oliver@apple.com>
2449
2450         Reviewed by Geoff Garen.
2451
2452         Lazily create activation objects
2453         https://bugs.webkit.org/show_bug.cgi?id=47107
2454
2455         Make it possible to lazily create the activation object
2456         for a function that needs one.  This allows us to reduce
2457         the overhead of entering a function that may require
2458         an activation in some cases, but not always.
2459
2460         This does make exception handling a little more complex as
2461         it's now necessary to verify that a callframes activation
2462         has been created, and create it if not, in all of the
2463         paths used in exception handling.
2464
2465         We also need to add logic to check for the existence of
2466         the activation in the scoped_var opcodes, as well as
2467         op_ret, op_ret_object_or_this and op_tearoff_activation
2468         so that we can avoid creating an activation unnecesarily
2469         on function exit. 
2470
2471         * bytecode/CodeBlock.cpp:
2472         (JSC::CodeBlock::dump):
2473         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
2474         (JSC::CodeBlock::createActivation):
2475         * bytecode/CodeBlock.h:
2476         (JSC::CodeBlock::setActivationRegister):
2477         (JSC::CodeBlock::activationRegister):
2478         * bytecode/Opcode.h:
2479         * bytecompiler/BytecodeGenerator.cpp:
2480         (JSC::BytecodeGenerator::BytecodeGenerator):
2481         (JSC::BytecodeGenerator::emitNewFunctionInternal):
2482         (JSC::BytecodeGenerator::emitNewFunctionExpression):
2483         (JSC::BytecodeGenerator::createActivationIfNecessary):
2484         * bytecompiler/BytecodeGenerator.h:
2485         * interpreter/Interpreter.cpp:
2486         (JSC::Interpreter::resolveSkip):
2487         (JSC::Interpreter::resolveGlobalDynamic):
2488         (JSC::Interpreter::resolveBase):
2489         (JSC::Interpreter::unwindCallFrame):
2490         (JSC::Interpreter::throwException):
2491         (JSC::Interpreter::privateExecute):
2492         * jit/JIT.cpp:
2493         (JSC::JIT::privateCompileMainPass):
2494         * jit/JIT.h:
2495         * jit/JITCall32_64.cpp:
2496         (JSC::JIT::emit_op_ret):
2497         (JSC::JIT::emit_op_ret_object_or_this):
2498         * jit/JITOpcodes.cpp:
2499         (JSC::JIT::emit_op_end):
2500         (JSC::JIT::emit_op_get_scoped_var):
2501         (JSC::JIT::emit_op_put_scoped_var):
2502         (JSC::JIT::emit_op_tear_off_activation):
2503         (JSC::JIT::emit_op_ret):
2504         (JSC::JIT::emit_op_ret_object_or_this):
2505         (JSC::JIT::emit_op_create_activation):
2506         (JSC::JIT::emit_op_resolve_global_dynamic):
2507         * jit/JITOpcodes32_64.cpp:
2508         (JSC::JIT::emit_op_get_scoped_var):
2509         (JSC::JIT::emit_op_put_scoped_var):
2510         (JSC::JIT::emit_op_tear_off_activation):
2511         (JSC::JIT::emit_op_create_activation):
2512         * jit/JITStubs.cpp:
2513         (JSC::DEFINE_STUB_FUNCTION):
2514
2515 2010-10-04  Adam Barth  <abarth@webkit.org>
2516
2517         Reviewed by Sam Weinig.
2518
2519         Remove ENABLE_SANDBOX
2520         https://bugs.webkit.org/show_bug.cgi?id=47032
2521
2522         * Configurations/FeatureDefines.xcconfig:
2523
2524 2010-10-01  Pratik Solanki  <psolanki@apple.com>
2525
2526         Reviewed by Geoffrey Garen.
2527         Specify ALWAYS_INLINE at function declaration not function definition
2528         https://bugs.webkit.org/show_bug.cgi?id=46960
2529
2530         For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well.
2531
2532         * bytecompiler/BytecodeGenerator.h:
2533         * wtf/FastMalloc.cpp:
2534
2535 2010-10-01  Kwang Yul Seo  <skyul@company100.net>
2536
2537         Unreviewed.
2538
2539         [BREWMP] Change Collector BLOCK_SIZE to 64KB
2540         https://bugs.webkit.org/show_bug.cgi?id=46436
2541
2542         Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices.
2543
2544         * runtime/Collector.h:
2545
2546 2010-10-01  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2547
2548         Reviewed by Andreas Kling.
2549
2550         [Qt] Stack overflow on symbian platform.
2551         https://bugs.webkit.org/show_bug.cgi?id=40598
2552         
2553         Move big allocation in arrayProtoFuncToString from stack to heap.
2554         JSC::arrayProtoFuncToString function can be called recursivly and
2555         1K allocation on stack cahse stack overflow.
2556         Can be useful for other platforms with limited stack size.
2557
2558         * runtime/ArrayPrototype.cpp:
2559         (JSC::arrayProtoFuncToString):
2560
2561 2010-09-30  Kwang Yul Seo  <skyul@company100.net>
2562
2563         Reviewed by Kent Tamura.
2564
2565         [BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr.
2566         https://bugs.webkit.org/show_bug.cgi?id=46373
2567
2568         A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef
2569         to wrap the instance in PlatformRefPtr.
2570
2571         * wtf/brew/ShellBrew.h:
2572         (WTF::createRefPtrInstance):
2573
2574 2010-09-30  Kwang Yul Seo  <skyul@company100.net>
2575
2576         Reviewed by Kent Tamura.
2577
2578         [BREWMP] Port PlatformRefPtr
2579         https://bugs.webkit.org/show_bug.cgi?id=46370
2580
2581         Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP.
2582
2583         * wtf/brew/RefPtrBrew.h: Added.
2584         (WTF::refPlatformPtr):
2585         (WTF::derefPlatformPtr):
2586
2587 2010-09-29  Sam Weinig  <sam@webkit.org>
2588
2589         Reviewed by Darin Adler.
2590
2591         Add additional checks to StringBuffer.
2592         <rdar://problem/7756381>
2593
2594         * wtf/text/StringBuffer.h:
2595         (WTF::StringBuffer::StringBuffer):
2596         (WTF::StringBuffer::resize):
2597
2598 2010-09-30  Chris Marrin  <cmarrin@apple.com>
2599
2600         Reviewed by Simon Fraser.
2601
2602         Make 2D accelerated canvas rendering build on Mac
2603         https://bugs.webkit.org/show_bug.cgi?id=46007
2604         
2605         Added ACCELERATED_2D_CANVAS to FeatureDefines
2606
2607         * Configurations/FeatureDefines.xcconfig:
2608
2609 2010-09-30  Kevin Ollivier  <kevino@theolliviers.com>
2610
2611         [wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from
2612         the copy so as not to alter global settings.
2613
2614         * wscript:
2615
2616 2010-09-30  Peter Varga  <pvarga@inf.u-szeged.hu>
2617
2618         Reviewed by Gavin Barraclough.
2619
2620         The case-insensitivity backreference checking isn't working with YARR
2621         Interpreter
2622         https://bugs.webkit.org/show_bug.cgi?id=46882
2623
2624         Add ignorecase checking to the Interpreter::tryConsumeBackReference() function.
2625
2626         * yarr/RegexInterpreter.cpp:
2627         (JSC::Yarr::Interpreter::tryConsumeBackReference):
2628
2629 2010-09-30  Kwang Yul Seo  <skyul@company100.net>
2630
2631         Reviewed by Andreas Kling.
2632
2633         [BREWMP] Leave initializeRandomNumberGenerator empty.
2634         https://bugs.webkit.org/show_bug.cgi?id=46851
2635
2636         On Brew MP, AEECLSID_RANDOM initializes itself.
2637
2638         * wtf/RandomNumberSeed.h:
2639         (WTF::initializeRandomNumberGenerator):
2640
2641 2010-09-30  Gabor Loki  <loki@webkit.org>
2642
2643         Reviewed by Csaba Osztrogonác.
2644
2645         Remove unnecessary cacheFlush calls from Thumb-2
2646         https://bugs.webkit.org/show_bug.cgi?id=46702
2647
2648         * assembler/ARMv7Assembler.h:
2649         (JSC::ARMv7Assembler::relinkCall):
2650         (JSC::ARMv7Assembler::repatchInt32):
2651         (JSC::ARMv7Assembler::repatchPointer):
2652
2653 2010-09-29  Patrick Gansterer  <paroga@webkit.org>
2654
2655         Unreviewed.
2656
2657         Next try to fix cygwin build.
2658
2659         * wtf/Assertions.cpp:
2660
2661 2010-09-29  Patrick Gansterer  <paroga@webkit.org>
2662
2663         Unreviewed.
2664
2665         Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN).
2666
2667         * wtf/Assertions.cpp:
2668
2669 2010-09-29  Patrick Gansterer  <paroga@webkit.org>
2670
2671         Unreviewed.
2672
2673         Build fix for cygwin.
2674
2675         * wtf/Assertions.cpp:
2676
2677 2010-09-29  Patrick Gansterer  <paroga@webkit.org>
2678
2679         Reviewed by Andreas Kling.
2680
2681         [WINCE] Buildfix for Assertions.cpp after r68511.
2682         https://bugs.webkit.org/show_bug.cgi?id=46807
2683
2684         Some, but not all WinCE environments have support for IsDebuggerPresent().
2685         Add HAVE(ISDEBUGGERPRESENT) to make this a build option.
2686         HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default.
2687
2688         * wtf/Assertions.cpp:
2689         * wtf/Platform.h:
2690
2691 2010-09-29  Peter Varga  <pvarga@inf.u-szeged.hu>
2692
2693         Reviewed by Csaba Osztrogonác.
2694
2695         JSC compile fails on 32bit platform when Regexp Tracing is enabled
2696         https://bugs.webkit.org/show_bug.cgi?id=46713
2697
2698         Fix the cast of pointer in regexp tracing to avoid the warning.
2699
2700         * runtime/RegExp.cpp:
2701         (JSC::RegExp::match):
2702
2703 2010-09-28  Anders Carlsson  <andersca@apple.com>
2704
2705         Reviewed by Sam Weinig.
2706
2707         Begin hooking up painting in the plug-in process
2708         https://bugs.webkit.org/show_bug.cgi?id=46766
2709
2710         * JavaScriptCore.exp:
2711         Add tryFastRealloc, used by WebKit2.
2712
2713 2010-09-28  Philippe Normand  <pnormand@igalia.com>
2714
2715         Reviewed by Martin Robinson.
2716
2717         Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT)
2718         https://bugs.webkit.org/show_bug.cgi?id=46721
2719
2720         Enable GOwnPtr/GRefPtr build only if glib support has been
2721         explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro.
2722
2723         * wtf/gobject/GOwnPtr.cpp:
2724         * wtf/gobject/GOwnPtr.h:
2725         * wtf/gobject/GRefPtr.cpp:
2726         * wtf/gobject/GRefPtr.h:
2727
2728 2010-09-28  İsmail Dönmez  <ismail@namtrac.org>
2729
2730         Reviewed by Andreas Kling.
2731
2732         Test for WINCE instead of WINCEBASIC, compiler always defines WINCE.
2733         Remove reference to unexisting path JavaScriptCore/os-wince.
2734
2735         * JavaScriptCore.pri:
2736         * wtf/Assertions.cpp:
2737
2738 2010-09-27  Michael Saboff  <msaboff@apple.com>
2739
2740         Reviewed by Geoffrey Garen.
2741
2742         Changed the initialization of JSArray objects to have space for 
2743         3 elements for the constructor that takes a ArgList argument.
2744         This improves v8-deltablue performance by about 2.8% by reducing 
2745         the number of realloc() calls.
2746         https://bugs.webkit.org/show_bug.cgi?id=46664
2747
2748         * runtime/JSArray.cpp:
2749         (JSC::JSArray::JSArray):
2750
2751 2010-09-27  Gavin Barraclough  <barraclough@apple.com>
2752
2753         Reviewed by Darin Adler.
2754
2755         Bug 46680 - Inlining string concatenation can regress interpreter performance
2756         <rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter
2757         Do not inline calls to string concatenation in the interpret loop.
2758
2759         * interpreter/Interpreter.cpp:
2760         (JSC::concatenateStrings):
2761         (JSC::Interpreter::privateExecute):
2762
2763 2010-09-27  Anders Carlsson  <andersca@apple.com>
2764
2765         Fix thinko.
2766
2767         * runtime/JSCell.h:
2768
2769 2010-09-27  Anders Carlsson  <andersca@apple.com>
2770
2771         Reviewed by Adam Roben.
2772
2773         Try to fix Windows build.
2774
2775         * runtime/JSCell.h:
2776         (JSC::MSVCBugWorkaround::MSVCBugWorkaround):
2777         (JSC::MSVCBugWorkaround::~MSVCBugWorkaround):
2778
2779 2010-09-27  Erik Arvidsson  <arv@chromium.org>
2780
2781         Reviewed by Darin Adler.
2782
2783         Add operator == for AtomicString and Vector<Uchar>
2784         https://bugs.webkit.org/show_bug.cgi?id=46509
2785
2786         * JavaScriptCore.exp:
2787         * wtf/text/AtomicString.cpp:
2788         (WTF::operator==):
2789         * wtf/text/AtomicString.h:
2790         (WTF::operator==):
2791         (WTF::operator!=):
2792
2793 2010-09-27  Anders Carlsson  <andersca@apple.com>
2794
2795         Try to fix the Windows build.
2796
2797         * wtf/Noncopyable.h:
2798
2799 2010-09-26  Anders Carlsson  <andersca@apple.com>
2800
2801         Reviewed by Alexey Proskuryakov and Adam Barth.
2802
2803         Add WTF_MAKE_NONCOPYABLE macro
2804         https://bugs.webkit.org/show_bug.cgi?id=46589
2805
2806         Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The
2807         reason for this is that the Itanium C++ ABI states that no empty classes of the same type
2808         can be laid out at the same offset in the class. This can result in objects getting larger
2809         which leads to memory regressions. (One example of this is the String class which grew by
2810         sizeof(void*) when both its base class and its first member variable inherited indirectly
2811         from FastAllocBase).
2812
2813         * wtf/Noncopyable.h:
2814         Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated.
2815         
2816         * runtime/JSCell.h:
2817         * wtf/RefCounted.h:
2818         Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE.
2819
2820 2010-09-27  Philippe Normand  <pnormand@igalia.com>
2821
2822         Reviewed by Martin Robinson.
2823
2824         [GTK] use ENABLE(GLIB_SUPPORT)
2825         https://bugs.webkit.org/show_bug.cgi?id=46630
2826
2827         * wtf/Platform.h: Include GTypedefs.h only if glib support
2828         is explicitly enabled.
2829
2830 2010-09-25  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
2831
2832         Reviewed by Adam Barth.
2833
2834         jsc: Document the strcat opcode.
2835         https://bugs.webkit.org/show_bug.cgi?id=46571
2836
2837         * interpreter/Interpreter.cpp:
2838         (JSC::Interpreter::privateExecute):
2839
2840 2010-09-21  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
2841
2842         Reviewed by Adam Barth.
2843
2844         make-bytecode-docs.pl: Add a comment to the generated HTML
2845         https://bugs.webkit.org/show_bug.cgi?id=46570
2846
2847         Generate an HTML Comment that this file was generated from
2848         Interpreter.cpp with the make-bytecode-docs.pl script.
2849
2850         * docs/make-bytecode-docs.pl:
2851
2852 2010-09-27  Patrick Gansterer  <paroga@webkit.org>
2853
2854         Reviewed by Adam Barth.
2855
2856         Remove WTF::stringHash functions
2857         https://bugs.webkit.org/show_bug.cgi?id=46520
2858
2859         Since r68289 the stringHash functions are only wrappers around StringHasher::createHash.
2860         So use StringHasher::createHash directly and remove stringHash.
2861
2862         * wtf/StringHashFunctions.h:
2863         * wtf/text/StringImpl.h:
2864         (WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly.
2865
2866 2010-09-26  Patrick Gansterer  <paroga@webkit.org>
2867
2868         Reviewed by Adam Barth.
2869
2870         Add WTF::StringHasher::createBlobHash
2871         https://bugs.webkit.org/show_bug.cgi?id=46514
2872
2873         Add this function for hashing FormElementKey and QualifiedNameComponents.
2874
2875         * wtf/StringHashFunctions.h:
2876         (WTF::StringHasher::createBlobHash):
2877
2878 2010-09-26  Patrick Gansterer  <paroga@webkit.org>
2879
2880         Reviewed by Adam Barth.
2881
2882         REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue)
2883         running websocket/tests/bad-sub-protocol-non-ascii.html
2884         https://bugs.webkit.org/show_bug.cgi?id=46553
2885
2886         Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong.
2887         Add an additional member variable to indicate if we have an pending character
2888         instead of only using an invalid character for this purpose.
2889
2890         * wtf/StringHashFunctions.h:
2891         (WTF::StringHasher::StringHasher):
2892         (WTF::StringHasher::addCharacters):
2893         (WTF::StringHasher::addCharacter):
2894         (WTF::StringHasher::hash):
2895
2896 2010-09-26  Mark Hahnenberg  <mhahnenb@gmail.com>
2897
2898         Reviewed by Oliver Hunt.
2899
2900         valueOf called in wrong order in atan2 and date constructors.
2901         https://bugs.webkit.org/show_bug.cgi?id=26978
2902
2903         Fixed the bug where the arguments to atan2 were being evaluated 
2904         out of order.
2905
2906         * runtime/MathObject.cpp:
2907         (JSC::mathProtoFuncATan2):
2908
2909 2010-09-26  Mark Hahnenberg  <mhahnenb@gmail.com>
2910
2911         Reviewed by Oliver Hunt.
2912
2913         valueOf called in wrong order in atan2 and date constructors.
2914         https://bugs.webkit.org/show_bug.cgi?id=26978
2915
2916         Fixed the issue where the parameters to the Date constructor
2917         were being evaluated to numbers more than once.
2918
2919         * runtime/DateConstructor.cpp:
2920         (JSC::constructDate):
2921         (JSC::dateUTC):
2922
2923 2010-09-25  Oliver Hunt  <oliver@apple.com>
2924
2925         Fix various builds
2926
2927         Relearning the lesson that last minute changes are bad.
2928
2929         * bytecode/CodeBlock.cpp:
2930         (JSC::CodeBlock::dump):
2931         * bytecompiler/BytecodeGenerator.cpp:
2932         (JSC::BytecodeGenerator::emitGetArgumentsLength):
2933         * jit/JITOpcodes.cpp:
2934         (JSC::JIT::emitSlow_op_get_argument_by_val):
2935
2936 2010-09-25  Oliver Hunt  <oliver@apple.com>
2937
2938         Reviewed by Cameron Zwarich.
2939
2940         Avoid constructing arguments object when accessing length and index properties
2941         https://bugs.webkit.org/show_bug.cgi?id=46572
2942
2943         Add opcodes to read argument length and properties, and then implement them.
2944         Much like other lazy opcodes these opcodes take a fast path when the arguments
2945         object has not been instantiated, and fall back on generic access mechanisms
2946         if they are acting on an instantiated object.
2947
2948         3% win on v8-earleyboyer, no change elsewhere.
2949
2950         * bytecode/CodeBlock.cpp:
2951         (JSC::CodeBlock::dump):
2952         * bytecode/Opcode.h:
2953         * bytecompiler/BytecodeGenerator.cpp:
2954         (JSC::BytecodeGenerator::emitGetArgumentsLength):
2955         (JSC::BytecodeGenerator::emitGetArgumentByVal):
2956         * bytecompiler/BytecodeGenerator.h:
2957         * bytecompiler/NodesCodegen.cpp:
2958         (JSC::BracketAccessorNode::emitBytecode):
2959         (JSC::DotAccessorNode::emitBytecode):
2960         * interpreter/Interpreter.cpp:
2961         (JSC::Interpreter::privateExecute):
2962         * jit/JIT.cpp:
2963         (JSC::JIT::privateCompileMainPass):
2964         (JSC::JIT::privateCompileSlowCases):
2965         * jit/JIT.h:
2966         * jit/JITOpcodes.cpp:
2967         (JSC::JIT::emit_op_get_arguments_length):
2968         (JSC::JIT::emitSlow_op_get_arguments_length):
2969         (JSC::JIT::emit_op_get_argument_by_val):
2970         (JSC::JIT::emitSlow_op_get_argument_by_val):
2971         * jit/JITOpcodes32_64.cpp:
2972         (JSC::JIT::emit_op_get_arguments_length):
2973         (JSC::JIT::emitSlow_op_get_arguments_length):
2974         (JSC::JIT::emit_op_get_argument_by_val):
2975         (JSC::JIT::emitSlow_op_get_argument_by_val):
2976
2977 2010-09-25  Patrick Gansterer  <paroga@webkit.org>
2978
2979         Unreviewed.
2980
2981         Fix typo in StringHasher class
2982         https://bugs.webkit.org/show_bug.cgi?id=45970
2983
2984         * wtf/StringHashFunctions.h:
2985         (WTF::StringHasher::createHash):
2986
2987 2010-09-24  Patrick Gansterer  <paroga@paroga.com>
2988
2989         Reviewed by Gavin Barraclough.
2990
2991         Add WTF::StringHasher
2992         https://bugs.webkit.org/show_bug.cgi?id=45970
2993
2994         StringHasher is a class for calculation stringHash out of character string.
2995         This class will unify the different usages of the same algorithm.
2996
2997         * wtf/StringHashFunctions.h:
2998         (WTF::StringHasher::StringHasher):
2999         (WTF::StringHasher::addCharacters):
3000         (WTF::StringHasher::addCharacter):
3001         (WTF::StringHasher::hash):
3002         (WTF::StringHasher::createHash):
3003         (WTF::StringHasher::defaultCoverter):
3004         (WTF::StringHasher::addCharactersToHash):
3005         (WTF::stringHash):
3006
3007 2010-09-24  Oliver Hunt  <oliver@apple.com>
3008
3009         Reviewed by Geoffrey Garen.
3010
3011         Variable declarations inside a catch scope don't get propogated to the parent scope
3012         https://bugs.webkit.org/show_bug.cgi?id=46501
3013
3014         Add logic to make variable declaration look for a scope for the
3015         new variable.  This allows us to create a scope (eg. for catch)
3016         and then seal it, so that additional variable declarations
3017         contained are propogated to the correct target.  Strangely this
3018         comes out as a performance win, but I think it's mostly cache
3019         effects.
3020
3021         * parser/JSParser.cpp:
3022         (JSC::JSParser::Scope::Scope):
3023         (JSC::JSParser::Scope::preventNewDecls):
3024         (JSC::JSParser::Scope::allowsNewDecls):
3025         (JSC::JSParser::declareVariable):
3026         (JSC::JSParser::parseVarDeclarationList):
3027         (JSC::JSParser::parseConstDeclarationList):
3028         (JSC::JSParser::parseTryStatement):
3029         (JSC::JSParser::parseFormalParameters):
3030         (JSC::JSParser::parseFunctionDeclaration):
3031
3032 2010-09-24  İsmail Dönmez  <ismail@namtrac.org>
3033
3034        Reviewed by Csaba Osztrogonác.
3035
3036        Add a Windows compatible inttypes.h header to fix WinCE build.
3037        https://bugs.webkit.org/show_bug.cgi?id=46463
3038
3039        * os-win32/inttypes.h: Added.
3040
3041 2010-09-24  Oliver Hunt  <oliver@apple.com>
3042
3043         Reviewed by Gavin Barraclough.
3044
3045         REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit).
3046         https://bugs.webkit.org/show_bug.cgi?id=46448
3047
3048         Roll this back in, with additional logic to prevent us from delaying construction
3049         of functions named "arguments"
3050
3051         * bytecode/CodeBlock.cpp:
3052         (JSC::CodeBlock::dump):
3053         * bytecode/Opcode.h:
3054         * bytecompiler/BytecodeGenerator.cpp:
3055         (JSC::BytecodeGenerator::BytecodeGenerator):
3056         (JSC::BytecodeGenerator::emitInitLazyRegister):
3057         (JSC::BytecodeGenerator::registerFor):
3058         (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
3059         (JSC::BytecodeGenerator::constRegisterFor):
3060         (JSC::BytecodeGenerator::emitNewFunction):
3061         (JSC::BytecodeGenerator::emitLazyNewFunction):
3062         (JSC::BytecodeGenerator::emitNewFunctionInternal):
3063         * bytecompiler/BytecodeGenerator.h:
3064         * interpreter/Interpreter.cpp:
3065         (JSC::Interpreter::privateExecute):
3066         * jit/JIT.cpp:
3067         (JSC::JIT::privateCompileMainPass):
3068         * jit/JIT.h:
3069         * jit/JITOpcodes.cpp:
3070         (JSC::JIT::emit_op_init_lazy_reg):
3071         (JSC::JIT::emit_op_new_func):
3072         * jit/JITOpcodes32_64.cpp:
3073         (JSC::JIT::emit_op_init_lazy_reg):
3074         * parser/Nodes.h:
3075         (JSC::ScopeNode::needsActivationForMoreThanVariables):
3076
3077 2010-09-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3078
3079         Unreviewed, rolling out r68223.
3080         http://trac.webkit.org/changeset/68223
3081         https://bugs.webkit.org/show_bug.cgi?id=46448
3082
3083         It broke 2-3 tests on bots (Requested by Ossy on #webkit).
3084
3085         * bytecode/CodeBlock.cpp:
3086         (JSC::CodeBlock::dump):
3087         * bytecode/Opcode.h:
3088         * bytecompiler/BytecodeGenerator.cpp:
3089         (JSC::BytecodeGenerator::BytecodeGenerator):
3090         (JSC::BytecodeGenerator::registerFor):
3091         (JSC::BytecodeGenerator::constRegisterFor):
3092         (JSC::BytecodeGenerator::emitNewFunction):
3093         * bytecompiler/BytecodeGenerator.h:
3094         * interpreter/Interpreter.cpp:
3095         (JSC::Interpreter::privateExecute):
3096         * jit/JIT.cpp:
3097         (JSC::JIT::privateCompileMainPass):
3098         * jit/JIT.h:
3099         * jit/JITOpcodes.cpp:
3100         (JSC::JIT::emit_op_new_func):
3101         (JSC::JIT::emit_op_init_arguments):
3102         * jit/JITOpcodes32_64.cpp:
3103         (JSC::JIT::emit_op_new_func):
3104         (JSC::JIT::emit_op_init_arguments):
3105         * parser/Nodes.h:
3106
3107 2010-09-23  Oliver Hunt  <oliver@apple.com>
3108
3109         Reviewed by Geoffrey Garen.
3110
3111         Delay construction of functions that aren't captured
3112         https://bugs.webkit.org/show_bug.cgi?id=46433
3113
3114         If a function isn't captured by an activation there's no
3115         way it can be accessed indirectly, so we can delay the
3116         construction until it's used (similar to what we do with
3117         arguments).  We rename the existing op_init_arguments to
3118         op_init_lazy_reg and removed its implicit handling of
3119         the anonymous argument register, and make op_new_function
3120         take a parameter to indicate whether it should null check
3121         the target slot before creating the function object.
3122
3123         * bytecode/CodeBlock.cpp:
3124         (JSC::CodeBlock::dump):
3125         * bytecode/Opcode.h:
3126         * bytecompiler/BytecodeGenerator.cpp:
3127         (JSC::BytecodeGenerator::BytecodeGenerator):
3128         (JSC::BytecodeGenerator::emitInitLazyRegister):
3129         (JSC::BytecodeGenerator::registerFor):
3130         (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
3131         (JSC::BytecodeGenerator::constRegisterFor):
3132         (JSC::BytecodeGenerator::emitNewFunction):
3133         (JSC::BytecodeGenerator::emitLazyNewFunction):
3134         (JSC::BytecodeGenerator::emitNewFunctionInternal):
3135         * bytecompiler/BytecodeGenerator.h:
3136         * interpreter/Interpreter.cpp:
3137         (JSC::Interpreter::privateExecute):
3138         * jit/JIT.cpp:
3139         (JSC::JIT::privateCompileMainPass):
3140         * jit/JIT.h:
3141         * jit/JITOpcodes.cpp:
3142         (JSC::JIT::emit_op_init_lazy_reg):
3143         (JSC::JIT::emit_op_new_func):
3144         * jit/JITOpcodes32_64.cpp:
3145         (JSC::JIT::emit_op_init_lazy_reg):
3146         * parser/Nodes.h:
3147         (JSC::ScopeNode::needsActivationForMoreThanVariables):
3148
3149 2010-09-23  David Kilzer  <ddkilzer@apple.com>
3150
3151         <rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2
3152         https://bugs.webkit.org/show_bug.cgi?id=46423
3153
3154         Reviewed by Oliver Hunt.
3155
3156         * interpreter/Interpreter.cpp:
3157         (JSC::Interpreter::privateExecute): Disable the gcc computed
3158         goto hacks added in r55564 when compiling with llvm-gcc-4.2.
3159
3160 2010-09-23  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
3161
3162         Reviewed by Darin Adler.
3163
3164         Fix usage of enum as if it was a define
3165         https://bugs.webkit.org/show_bug.cgi?id=46355
3166
3167         pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an
3168         enum.  Hence, it cannot be used by the preprocessor which always
3169         evaluates that condition as true. This was giving a warning when
3170         compiling with gcc and "-Wundef" flag.
3171
3172         The second path, when PTHREAD_MUTEX_DEFAULT is not the same of
3173         PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path
3174         and get rid of that #if.
3175
3176         * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to
3177         set mutex type to PTHREAD_MUTEX_NORMAL.
3178         (WTF::Mutex::Mutex):
3179
3180 2010-09-23  Michael Saboff  <msaboff@apple.com>
3181
3182         Reviewed by Geoffrey Garen.
3183
3184         Removed extraneous truncation of ovector on entry and error exit.
3185         Changed the initialization to -1 of vector to only initialize
3186         the start indecies, which is sufficient for the pattern/subpatterns.
3187         Changed the JIT code to not clear the end index for subpatterns
3188         as it isn't needed.  These changes are worth ~2.7% on v8-regexp.
3189         https://bugs.webkit.org/show_bug.cgi?id=46404
3190
3191         * runtime/RegExp.cpp:
3192         (JSC::RegExp::match):
3193         * yarr/RegexJIT.cpp:
3194         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
3195
3196 2010-09-22  Oliver Hunt  <oliver@apple.com>
3197
3198         Reviewed by Geoff Garen.
3199
3200         Only copy captured variables into activation
3201         https://bugs.webkit.org/show_bug.cgi?id=46330
3202
3203         We now track free variable information which means that
3204         we no longer need to copy every variable defined in a
3205         function.  With this patch activations only retain those
3206         variables needed for correctness.  In order to interact
3207         safely with the inspector this means that JSActivation
3208         now provides its own lookup functions so it can avoid 
3209         trying to read or write to variables that have been
3210         optimised out.
3211
3212         * bytecode/CodeBlock.h:
3213         * bytecompiler/BytecodeGenerator.cpp:
3214         (JSC::BytecodeGenerator::BytecodeGenerator):
3215         * parser/Nodes.h:
3216         (JSC::ScopeNode::capturedVariableCount):
3217         (JSC::ScopeNode::captures):
3218         * runtime/Arguments.h:
3219         (JSC::JSActivation::copyRegisters):
3220         * runtime/Executable.cpp:
3221         (JSC::FunctionExecutable::FunctionExecutable):
3222         (JSC::FunctionExecutable::compileForCallInternal):
3223         (JSC::FunctionExecutable::compileForConstructInternal):
3224         * runtime/Executable.h:
3225         (JSC::FunctionExecutable::capturedVariableCount):
3226         * runtime/JSActivation.cpp:
3227         (JSC::JSActivation::markChildren):
3228         (JSC::JSActivation::symbolTableGet):
3229         (JSC::JSActivation::symbolTablePut):
3230         (JSC::JSActivation::getOwnPropertyNames):
3231         (JSC::JSActivation::symbolTablePutWithAttributes):
3232         * runtime/JSActivation.h:
3233
3234 2010-09-23  Ismail Donmez  <ismail@namtrac.org>
3235
3236         Reviewed by Andreas Kling.
3237
3238         Fix jsc.exe build for Windows CE
3239
3240         * jsc.pro: Add mmtimer.lib for Windows CE.
3241
3242 2010-09-23  Ismail Donmez  <ismail@namtrac.org>
3243
3244         Unreviewed.
3245
3246         JIT should be disabled on Windows CE. Broken in r64176.
3247
3248         * wtf/Platform.h:
3249
3250 2010-09-23  Peter Varga  <pvarga@inf.u-szeged.hu>
3251
3252         Reviewed by Gavin Barraclough.
3253
3254         Reduce the number of BOL checks in YARR Interpreter
3255         https://bugs.webkit.org/show_bug.cgi?id=46260
3256
3257         Extend the YARR Interpreter with an optimization which reduces the number of
3258         BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a
3259         "TypeAssertionBOL" byteTerm it will be checked just one time.
3260
3261         * yarr/RegexInterpreter.cpp:
3262         (JSC::Yarr::Interpreter::matchDisjunction):
3263         (JSC::Yarr::ByteCompiler::compile):
3264         (JSC::Yarr::ByteCompiler::regexBegin):
3265         (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
3266         (JSC::Yarr::ByteCompiler::emitDisjunction):
3267         * yarr/RegexInterpreter.h:
3268         (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
3269         (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
3270         (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
3271         (JSC::Yarr::ByteTerm::AlternativeBegin):
3272         (JSC::Yarr::ByteTerm::AlternativeDisjunction):
3273         (JSC::Yarr::ByteTerm::AlternativeEnd):
3274
3275 2010-09-22  Michael Saboff  <msaboff@apple.com>
3276
3277         Reviewed by Gavin Barraclough.
3278
3279         Fixed the cross over from alternatives executed once and
3280         those that loop.  This fixed the problem where the index
3281         was getting messed up for looping alternatives causing an
3282         infinite loop.
3283         https://bugs.webkit.org/show_bug.cgi?id=46189
3284
3285         * yarr/RegexJIT.cpp:
3286         (JSC::Yarr::RegexGenerator::generateDisjunction):
3287
3288 2010-09-22  Steve Falkenburg  <sfalken@apple.com>
3289
3290         Rubber stamped by Jon Honeycutt.
3291
3292         Allow jsc.exe to be run against unversioned ICU.
3293
3294         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
3295
3296 2010-09-22  Kwang Yul Seo  <skyul@company100.net>
3297
3298         Reviewed by Laszlo Gombos.
3299
3300         Use "typedef wchar_t JSChar" when compiled with RVCT
3301         https://bugs.webkit.org/show_bug.cgi?id=40651
3302
3303         Use wchar_t for JSChar and UChar when compiled with RVCT.
3304         Linux is the exception for this rule.
3305
3306         * API/JSStringRef.h:
3307         * wtf/unicode/qt4/UnicodeQt4.h:
3308
3309 2010-09-22  Oliver Hunt  <oliver@apple.com>
3310
3311         Reviewed by Gavin Barraclough.
3312
3313         [INTERPRETER] Two tests fail with SputnikError: #1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown
3314         https://bugs.webkit.org/show_bug.cgi?id=44245
3315
3316         Remove incorrect code from op_load_varargs in the interpreter.
3317
3318         * interpreter/Interpreter.cpp:
3319         (JSC::Interpreter::privateExecute):
3320
3321 2010-09-22  Oliver Hunt  <oliver@apple.com>
3322
3323         Reviewed by Gavin Barraclough.
3324
3325         [JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails
3326         https://bugs.webkit.org/show_bug.cgi?id=44246
3327
3328         JIT code generated for instanceof was not checking to ensure that the prototype property was
3329         an object, this patch ensures that it does.
3330
3331         * jit/JITOpcodes.cpp:
3332         (JSC::JIT::emit_op_instanceof):
3333         (JSC::JIT::emitSlow_op_instanceof):
3334         * jit/JITOpcodes32_64.cpp:
3335         (JSC::JIT::emit_op_instanceof):
3336         (JSC::JIT::emitSlow_op_instanceof):
3337
3338 2010-09-22  Patrick Gansterer  <paroga@webkit.org>
3339
3340         Reviewed by Darin Adler.
3341
3342         Inline UTF8SequenceLength
3343         https://bugs.webkit.org/show_bug.cgi?id=45589
3344
3345         * wtf/unicode/UTF8.cpp:
3346         (WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance.
3347
3348 2010-09-21  Oliver Hunt  <oliver@apple.com>
3349
3350         RS=Gavin Barraclough.
3351
3352         Fix codeblock dumping
3353
3354         * bytecode/CodeBlock.cpp:
3355         (JSC::CodeBlock::dump):
3356         * runtime/Executable.h:
3357         (JSC::ScriptExecutable::ScriptExecutable):
3358
3359 2010-09-21  Oliver Hunt  <oliver@apple.com>
3360
3361         Reviewed by Geoffrey Garen.
3362
3363         Speed up function.apply(..., arguments)
3364         https://bugs.webkit.org/show_bug.cgi?id=46207
3365
3366         Add code to do argument copying inline in the case
3367         where we're using Function.apply to forward our arguments
3368         directly.
3369
3370         * jit/JIT.cpp:
3371         (JSC::JIT::privateCompileSlowCases):
3372            Splitted op_load_varargs into fast and slow paths, so add the call
3373            to the slow path generator.
3374         * jit/JIT.h:
3375         * jit/JITCall32_64.cpp:
3376           Remove 32bit specific emit_op_load_varargs as the logic is the
3377           same for all value representations
3378         * jit/JITOpcodes.cpp:
3379         (JSC::JIT::emit_op_load_varargs):
3380           Copy arguments inline
3381         (JSC::JIT::emitSlow_op_load_varargs):
3382
3383 2010-09-21  Geoffrey Garen  <ggaren@apple.com>
3384
3385         Reviewed by Oliver Hunt.
3386
3387         <rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in
3388         interpreter due to 54724 and 54596
3389         
3390         Fixed a typo (using "UNLIKELY" instead of "LIKELY").
3391         
3392         * wtf/PassRefPtr.h:
3393         (WTF::refIfNotNull):
3394         (WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs
3395         hold real data. Also, in cases where they do not hold real data, the
3396         compiler usually sees a call to release() right before the call to the
3397         destructor, so it can probably optimize out the test completely.
3398
3399 2010-09-21  Fridrich Strba  <fridrich.strba@bluewin.ch>
3400
3401         Reviewed by Martin Robinson.
3402
3403         Build issues with Windows versions of the GTK+ port
3404         https://bugs.webkit.org/show_bug.cgi?id=45844
3405
3406         Link with winmm.dll when necessary and specify the executable extension
3407         explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@
3408         rule actually works.
3409
3410         Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses
3411         a section in ThreadSpecific.cpp
3412
3413         * GNUmakefile.am:
3414
3415 2010-09-21  Martin Robinson  <mrobinson@igalia.com>
3416
3417         Reviewed by Xan Lopez.
3418
3419         [GTK] 'make dist' should be fixed in preparation for the next release
3420         https://bugs.webkit.org/show_bug.cgi?id=46129
3421
3422         * GNUmakefile.am: Update the sources list to include missing headers.
3423
3424 2010-09-21  Dave Tapuska  <dtapuska@rim.com>
3425
3426         Reviewed by Csaba Osztrogonác.
3427
3428         https://bugs.webkit.org/show_bug.cgi?id=45673
3429
3430         r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be
3431         8 byte aligned. A non 8 byte divisible value for this will
3432         cause the sp to become non 8 byte aligned.
3433
3434         Verify and correct offset values that r65596 effected that
3435         weren't updated.
3436
3437         * jit/JITStubs.cpp:
3438         * jit/JITStubs.h:
3439
3440 2010-09-21  Xan Lopez  <xlopez@igalia.com>
3441
3442         Reviewed by Martin Robinson.
3443
3444         Fix Opcode stats compilation
3445         https://bugs.webkit.org/show_bug.cgi?id=46079
3446
3447         The FixedArray API had changed, and <stdio.h> was not included for
3448         printf.
3449
3450         * bytecode/Opcode.cpp:
3451         (JSC::OpcodeStats::~OpcodeStats):
3452
3453 2010-09-20  Michael Saboff  <msaboff@apple.com>
3454
3455         Reviewed by Gavin Barraclough.
3456
3457         Fixed detection of alternative smaller than the first alternative
3458         to only check looping alternatives.
3459         https://bugs.webkit.org/show_bug.cgi?id=46049
3460
3461         * yarr/RegexJIT.cpp:
3462         (JSC::Yarr::RegexGenerator::generateDisjunction):
3463
3464 2010-09-20  Peter Varga  <pvarga@inf.u-szeged.hu>
3465
3466         Reviewed by Geoffrey Garen.
3467
3468         REGRESSION(67790): jsc tests are failed with YARR interpreter
3469         https://bugs.webkit.org/show_bug.cgi?id=46083
3470
3471         Fix the initializing of the lastSubpatternId member of
3472         parentheses.
3473
3474         * yarr/RegexCompiler.cpp:
3475         (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
3476
3477 2010-09-20  Gavin Barraclough  <barraclough@apple.com>
3478
3479         Reviewed by Oliver Hunt.
3480
3481         Bug 46077 - ASSERT failure in YARR JIT
3482
3483         We will currently attempt to loop if there are multiple alternatives, they are all
3484         BOL predicated, and the last alternative is longer then the first - however if all
3485         alternatives are BOL predicated the head of loop label will not have been set, and
3486         we'll try to link a jump to an undefined label. Stop doing so.
3487
3488         * yarr/RegexJIT.cpp:
3489         (JSC::Yarr::RegexGenerator::generateDisjunction):
3490
3491 2010-09-20  Adam Roben  <aroben@apple.com>
3492
3493         Export RegExpObject::info from JavaScriptCore
3494
3495         This allows obj->inherits(&RegExpObject::info) to work correctly from
3496         outside JavaScriptCore.dll on Windows.
3497
3498         Fixes <http://webkit.org/b/46098>
3499         fast/loader/stateobjects/pushstate-object-types.html fails on Windows
3500
3501         Reviewed by John Sullivan.
3502
3503         * runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as
3504         we already have for some other classes whose info members have to be
3505         used from outside the DLL.
3506
3507 2010-09-19  Gavin Barraclough  <barraclough@apple.com>
3508
3509         Windows build fix pt 2.
3510
3511         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3512
3513 2010-09-19  Gavin Barraclough  <barraclough@apple.com>
3514
3515         Windows build fix pt 1.
3516
3517         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3518
3519 2010-09-19  Gavin Barraclough  <barraclough@apple.com>
3520
3521         Build fix - implicit double-to-int conversion invalid on 32-bit.
3522
3523         * runtime/DatePrototype.cpp:
3524         (JSC::fillStructuresUsingDateArgs):
3525         (JSC::dateProtoFuncSetYear):
3526
3527 2010-09-19  Gavin Barraclough  <barraclough@apple.com>
3528
3529         Reviewed by Oliver Hunt.
3530
3531         Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod.
3532
3533         These methods implement the same conversion (see discussion in the notes
3534         of sections of 9.5 and 9.6 of the spec), only differing in how the result
3535         is interpretted.
3536
3537         Date prototype is incorrectly using toInt32, and this is causing us to
3538         provide an output value indicating whether the input to ToInt32 was finite
3539         (the corresponding methods on Date are actually spec'ed to use ToInteger,
3540         not ToInt32).  This patch partially fixes this in order to remove this
3541         bogus output value, hoewever more work will be require to bring Date
3542         fully up to spec compliance (the constructor is still performing ToInt32
3543         conversions).
3544
3545         * JavaScriptCore.exp:
3546         * runtime/DatePrototype.cpp:
3547         (JSC::fillStructuresUsingTimeArgs):
3548         (JSC::fillStructuresUsingDateArgs):
3549         (JSC::dateProtoFuncSetYear):
3550         * runtime/JSValue.cpp:
3551         (JSC::toInt32):
3552         * runtime/JSValue.h:
3553         (JSC::toUInt32):
3554         (JSC::JSValue::toInt32):
3555         (JSC::JSValue::toUInt32):
3556
3557 2010-09-18  Darin Adler  <darin@apple.com>
3558
3559         First step in fixing Windows build.
3560
3561         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3562         Removed incorrect symbol. The build will probably still fail,
3563         but the failure will tell us what symbol to add.
3564
3565 2010-09-18  Michael Saboff  <msaboff@apple.com>
3566
3567         Reviewed by Gavin Barraclough.
3568
3569         Added code to unroll regular expressions containing ^.
3570         Alternatives that begin with ^ are tagged during parsing
3571         and rolled up in containing sub expression structs.
3572         After parsing, a regular expression flagged as containing
3573         a ^ (a.k.a. BOL) is processed further in optimizeBOL().
3574         A copy of the disjunction is made excluding alternatives that
3575         are rooted with BOL.  The original alternatives are flagged
3576         to only be executed once.  The copy of the other alternatives are
3577         added to the original expression.
3578         In the case that all original alternatives are flagged, there
3579         won't be any looping alternatives.
3580         The JIT generator will emit code accordingly, executing the
3581         original alternatives once and then looping over the
3582         alternatives that aren't anchored with a BOL (if any).
3583         https://bugs.webkit.org/show_bug.cgi?id=45787
3584
3585         * yarr/RegexCompiler.cpp:
3586         (JSC::Yarr::RegexPatternConstructor::assertionBOL):
3587         (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
3588         (JSC::Yarr::RegexPatternConstructor::copyDisjunction):
3589         (JSC::Yarr::RegexPatternConstructor::copyTerm):
3590         (JSC::Yarr::RegexPatternConstructor::optimizeBOL):
3591         (JSC::Yarr::compileRegex):
3592         * yarr/RegexJIT.cpp:
3593         (JSC::Yarr::RegexGenerator::generateDisjunction):
3594         * yarr/RegexPattern.h:
3595         (JSC::Yarr::PatternAlternative::PatternAlternative):
3596         (JSC::Yarr::PatternAlternative::setOnceThrough):
3597         (JSC::Yarr::PatternAlternative::onceThrough):
3598         (JSC::Yarr::PatternDisjunction::PatternDisjunction):
3599         (JSC::Yarr::RegexPattern::RegexPattern):