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