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