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