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