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