2010-07-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2010-07-13  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2
3         Reviewed by Oliver Hunt.
4
5         testapi.c depends on the Core Foundation.
6         https://bugs.webkit.org/show_bug.cgi?id=40058
7
8         Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it
9         to compile in Qt environments.
10
11         All tests should work except for the JSStringCreateWithCharacters() function,
12         because its tests depend on Core Foundation specific functions.
13
14         * API/tests/testapi.c:
15         (testJSStringRefCF): moved CoreFoundation specific tests to this function.
16         (main): The moves plus some minor tweaks.
17         * testapi.pro: Added.
18
19 2010-07-13  Gavin Barraclough  <barraclough@apple.com>
20
21         Reviewed by Oliver Hunt.
22
23         Bug 42182 - Change how numeric compare functions are detected
24
25         There are three problems with the current mechanism:
26           * It requires that a function executable be bytecode compiled without
27             being JIT generated (in order to copy the bytecode from the numeric
28             compare function).  This is a problem since we have an invariant when
29             running with the JIT that functions are never bytecode compiled without
30             also being JIT generated (after checking the codeblock we assume the
31             function has JIT code).  To help maintain this invariant 
32           * This implementation will prevent us from experimenting with alternate
33             compilation paths which do not compile via bytecode.
34           * It doesn't work.  Functions passing more than two arguments will match
35             if they are comparing their last two arguments, not the first two.
36             Generally the mapping back from bytecode to semantics may be more
37             complex then initially expected.
38
39         * bytecompiler/BytecodeGenerator.cpp:
40         (JSC::BytecodeGenerator::generate):
41         (JSC::BytecodeGenerator::setIsNumericCompareFunction):
42         (JSC::BytecodeGenerator::argumentNumberFor):
43         * bytecompiler/BytecodeGenerator.h:
44         * bytecompiler/NodesCodegen.cpp:
45         (JSC::BlockNode::singleStatement):
46         (JSC::FunctionBodyNode::emitBytecode):
47         * parser/Nodes.h:
48         (JSC::ExpressionNode::isSubtract):
49         (JSC::BinaryOpNode::lhs):
50         (JSC::BinaryOpNode::rhs):
51         (JSC::SubNode::isSubtract):
52         (JSC::ReturnNode::value):
53         * runtime/JSGlobalData.cpp:
54         (JSC::JSGlobalData::JSGlobalData):
55         * runtime/JSGlobalData.h:
56
57 2010-07-12  Oliver Hunt  <oliver@apple.com>
58
59         Reviewed by Gavin Barraclough.
60
61         REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*)
62         https://bugs.webkit.org/show_bug.cgi?id=41763
63
64         There are two parts to this patch, the first is to fix the actual
65         problem.  When calling copyStringWithoutBOMs on a string we know
66         to contain BOMs we return a value indicating that there are no
67         BOMs.
68
69         The second part of this fix is simply to harden the path that
70         led to a crash when parsing failed.
71
72         * jit/JITOpcodes.cpp:
73         (JSC::JIT::privateCompileCTIMachineTrampolines):
74         * jit/JITOpcodes32_64.cpp:
75         (JSC::JIT::privateCompileCTIMachineTrampolines):
76         * jit/JITStubs.cpp:
77         (JSC::DEFINE_STUB_FUNCTION):
78            Harden compilation stubs against parser failure.
79         * parser/Lexer.cpp:
80         (JSC::Lexer::sourceCode):
81            Add assertions to ensure that subranges into a source provider
82            are always actually braces.  Hopefully this should catch similar
83            failures in future.  These assertions fire on existing tests
84            without this fix.
85         * runtime/Executable.h:
86         (JSC::FunctionExecutable::tryJitCodeForCall):
87         (JSC::FunctionExecutable::tryJitCodeForConstruct):
88         * wtf/text/StringImpl.h:
89         (WebCore::StringImpl::copyStringWithoutBOMs):
90            Make copyStringWithBOMs do the right thing.
91
92 2010-07-13  Gabor Loki  <loki@webkit.org>
93
94         Reviewed by Gavin Barraclough.
95
96         Fix the constant encoding in data transfer instructions on ARM
97         https://bugs.webkit.org/show_bug.cgi?id=42166
98
99         The getImm function is designed to produce modified immediate constant
100         for data processing instructions. It should not be used to encode
101         any constant for data transfer. In the current situation there is no
102         way to use any immediate constant for data transfer. So, the moveImm
103         function is the desired method to pass the offset value to the data
104         transfer instructions.
105
106         Reported by Jacob Bramley.
107
108         * assembler/ARMAssembler.cpp:
109         (JSC::ARMAssembler::dataTransfer32):
110         * assembler/MacroAssemblerARM.h:
111         (JSC::MacroAssemblerARM::call32):
112
113 2010-07-09  Darin Adler  <darin@apple.com>
114
115         Reviewed by Geoffrey Garen.
116
117         String to number coercion is not spec compliant
118         https://bugs.webkit.org/show_bug.cgi?id=31349
119
120         ToNumber should ignore NBSP (\u00a0)
121         https://bugs.webkit.org/show_bug.cgi?id=25490
122
123         * runtime/JSGlobalObjectFunctions.cpp:
124         (JSC::parseIntOverflow): Added a version that works on UChar.
125         * runtime/JSGlobalObjectFunctions.h: Ditto.
126
127         * runtime/UString.cpp:
128         (JSC::isInfinity): Added helper functions.
129         (JSC::UString::toDouble): Use isStrWhiteSpace instead of
130         isSASCIISpace to define what we should skip. Got rid of the
131         code that used CString and UTF8String, instead processing the
132         UChar of the string directly, except for when we call strtod.
133         For strtod, use our own home-grown conversion function that
134         does not try to do any UTF-16 processing. Tidied up the logic
135         a bit as well.
136
137 2010-07-12  Martin Robinson  <mrobinson@igalia.com>
138
139         Reviewed by Xan Lopez.
140
141         [GTK] make dist is broken because of missing headers and other miscellaneous reasons
142         https://bugs.webkit.org/show_bug.cgi?id=42107
143
144         * GNUmakefile.am: Add missing header to the sources list.
145
146 2010-07-12  Adam Roben  <aroben@apple.com>
147
148         Stop generating stripped symbols for Release builds
149
150         It turns out we can strip the symbols after-the-fact using PDBCopy.
151
152         Fixes <http://webkit.org/b/42085>.
153
154         Reviewed by Steve Falkenburg.
155
156         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
157         Removed the pre-link event, which just created the public\sym
158         directory.
159
160 2010-07-12  Anders Carlsson  <andersca@apple.com>
161
162         Reviewed by Dan Bernstein.
163
164         Add WARN_UNUSED_RETURN to the smart pointer "leak" member functions
165         https://bugs.webkit.org/show_bug.cgi?id=42086
166
167         * wtf/OwnPtr.h:
168         * wtf/PassOwnPtr.h:
169         * wtf/PassRefPtr.h:
170         (WTF::PassRefPtr::releaseRef):
171         (WTF::NonNullPassRefPtr::leakRef):
172         (WTF::NonNullPassRefPtr::releaseRef):
173         * wtf/RetainPtr.h:
174         (WTF::RetainPtr::releaseRef):
175
176 2010-07-10  Oliver Hunt  <oliver@apple.com>
177
178         Reviewed by Maciej Stachowiak.
179
180         HAVE_COMPUTED_GOTO is dependent on the interpreter being enabled
181         https://bugs.webkit.org/show_bug.cgi?id=42039
182
183         Separate the existence of computed goto support in the compiler
184         from whether or not we are using the interpreter.  All the current
185         HAVE(COMPUTED_GOTO) guards are for the interpreter, but I'd like
186         the option of using it elsewhere.  The interpreter now uses
187         ENABLE(COMPUTED_GOTO_INTERPRETER) 
188
189         * bytecode/Instruction.h:
190         (JSC::Instruction::Instruction):
191         * bytecode/Opcode.h:
192         * interpreter/Interpreter.cpp:
193         (JSC::Interpreter::Interpreter):
194         (JSC::Interpreter::isOpcode):
195         (JSC::Interpreter::privateExecute):
196         * interpreter/Interpreter.h:
197         (JSC::Interpreter::getOpcode):
198         (JSC::Interpreter::getOpcodeID):
199         * wtf/Platform.h:
200
201 2010-07-10  Oliver Hunt  <oliver@apple.com>
202
203         Reviewed by Gavin Barraclough.
204
205         Remove switches from inner expression loops in the parser
206         https://bugs.webkit.org/show_bug.cgi?id=42035
207
208         Use bitmasks and flags on the token types to identify unary and
209         binary operators, rather than switching on the token type to
210         identify them.
211
212         * parser/JSParser.cpp:
213         (JSC::isUnaryOp):
214         (JSC::JSParser::isBinaryOperator):
215         * parser/JSParser.h:
216         (JSC::):
217
218 2010-07-09  Leon Clarke  <leonclarke@google.com>
219
220         Reviewed by Adam Barth.
221
222         add support for link prefetching
223         https://bugs.webkit.org/show_bug.cgi?id=3652
224
225         * Configurations/FeatureDefines.xcconfig:
226
227 2010-07-09  Oliver Hunt  <oliver@apple.com>
228
229         Reviewed by Darin Adler.
230
231         Tidy up lexer token ids
232         https://bugs.webkit.org/show_bug.cgi?id=42014
233
234         Stop using character literals to identify single character tokens
235         and instead use symbolic names for all tokens.
236
237         * parser/ASTBuilder.h:
238         (JSC::ASTBuilder::makeBinaryNode):
239         * parser/JSParser.cpp:
240         (JSC::JSParser::consume):
241         (JSC::JSParser::match):
242         (JSC::JSParser::autoSemiColon):
243         (JSC::JSParser::JSParser):
244         (JSC::JSParser::parseProgram):
245         (JSC::JSParser::allowAutomaticSemicolon):
246         (JSC::JSParser::parseDoWhileStatement):
247         (JSC::JSParser::parseWhileStatement):
248         (JSC::JSParser::parseVarDeclarationList):
249         (JSC::JSParser::parseConstDeclarationList):
250         (JSC::JSParser::parseForStatement):
251         (JSC::JSParser::parseReturnStatement):
252         (JSC::JSParser::parseWithStatement):
253         (JSC::JSParser::parseSwitchStatement):
254         (JSC::JSParser::parseSwitchClauses):
255         (JSC::JSParser::parseSwitchDefaultClause):
256         (JSC::JSParser::parseTryStatement):
257         (JSC::JSParser::parseDebuggerStatement):
258         (JSC::JSParser::parseStatement):
259         (JSC::JSParser::parseFormalParameters):
260         (JSC::JSParser::parseFunctionInfo):
261         (JSC::JSParser::parseExpressionOrLabelStatement):
262         (JSC::JSParser::parseIfStatement):
263         (JSC::JSParser::parseExpression):
264         (JSC::JSParser::parseAssignmentExpression):
265         (JSC::JSParser::parseConditionalExpression):
266         (JSC::isUnaryOp):
267         (JSC::JSParser::isBinaryOperator):
268         (JSC::JSParser::parseBinaryExpression):
269         (JSC::JSParser::parseProperty):
270         (JSC::JSParser::parseObjectLiteral):
271         (JSC::JSParser::parseStrictObjectLiteral):
272         (JSC::JSParser::parseArrayLiteral):
273         (JSC::JSParser::parsePrimaryExpression):
274         (JSC::JSParser::parseArguments):
275         (JSC::JSParser::parseMemberExpression):
276         (JSC::JSParser::parseUnaryExpression):
277         * parser/JSParser.h:
278         (JSC::):
279         * parser/Lexer.cpp:
280         (JSC::):
281         (JSC::Lexer::lex):
282         * parser/Lexer.h:
283
284 2010-07-09  Gavin Barraclough  <barraclough@apple.com>
285
286         Reviewed by Oliver Hunt.
287
288         Bug 42015 - Enable JSValue32_64 on ARMv7
289
290         * Configurations/JavaScriptCore.xcconfig:
291         * jit/JIT.h:
292         * jit/JITStubs.cpp:
293         * wtf/Platform.h:
294
295 2010-07-09  Kenneth Russell  <kbr@google.com>
296
297         Reviewed by Dimitri Glazkov.
298
299         Assertion failure in String::utf8() for certain invalid UTF16 inputs
300         https://bugs.webkit.org/show_bug.cgi?id=41983
301
302         * wtf/text/WTFString.cpp:
303         (WebCore::String::utf8):
304          - Fixed assertion when sourceExhausted is returned from convertUTF16ToUTF8.
305
306 2010-07-09  Oliver Hunt  <oliver@apple.com>
307
308         Reviewed by Geoffrey Garen.
309
310         Remove a couple of excess writes from the lexer
311         https://bugs.webkit.org/show_bug.cgi?id=41981
312
313         Remove a couple of fields from JSTokenInfo, and rename the remaining ones
314         to something more accurate
315
316         * parser/JSParser.cpp:
317         (JSC::JSParser::next):
318         (JSC::JSParser::tokenStart):
319         (JSC::JSParser::tokenLine):
320         (JSC::JSParser::tokenEnd):
321         * parser/JSParser.h:
322         (JSC::JSTokenInfo::JSTokenInfo):
323         * parser/Lexer.cpp:
324         (JSC::Lexer::lex):
325
326 2010-07-08  Oliver Hunt  <oliver@apple.com>
327
328         Reviewed by Sam Weinig.
329
330         Property declarations in an object literal should not consider the prototype chain when being added to the new object
331         https://bugs.webkit.org/show_bug.cgi?id=41929
332
333         To fix this all we need to do is ensure that all new properties are
334         added with putDirect rather than a fully generic call to put.  This
335         is safe as an object literal is by definition going to produce a
336         completely normal object.
337
338         Rather than duplicating all the put_by_id logic we add an additional
339         flag to op_put_by_id to indicate it should be using putDirect.  In
340         the interpreter this adds a runtime branch, but in the jit this is
341         essentially free as the branch is taken at compile time.  This does
342         actually improve object literal creation time even in the interpreter
343         as we no longer need to walk the prototype chain to verify that the
344         cached put is safe.
345
346         We still emit normal put_by_id code when emitting __proto__ as we want
347         to get the correct handling for changing the prototype.
348
349         Sunspider claims this is a 0.7% speedup which is conceivably real due
350         to the performance improvement in object literals, but I suspect its
351         really just the result of code motion.
352
353         * bytecode/Opcode.h:
354         * bytecompiler/BytecodeGenerator.cpp:
355         (JSC::BytecodeGenerator::emitPutById):
356         (JSC::BytecodeGenerator::emitDirectPutById):
357         * bytecompiler/BytecodeGenerator.h:
358         * bytecompiler/NodesCodegen.cpp:
359         (JSC::PropertyListNode::emitBytecode):
360         * interpreter/Interpreter.cpp:
361         (JSC::Interpreter::privateExecute):
362         * jit/JIT.h:
363         (JSC::JIT::compilePutByIdTransition):
364         * jit/JITPropertyAccess.cpp:
365         (JSC::JIT::emit_op_put_by_id):
366         (JSC::JIT::emitSlow_op_put_by_id):
367         (JSC::JIT::privateCompilePutByIdTransition):
368         (JSC::JIT::patchPutByIdReplace):
369         * jit/JITPropertyAccess32_64.cpp:
370         (JSC::JIT::emitSlow_op_put_by_id):
371         (JSC::JIT::privateCompilePutByIdTransition):
372         (JSC::JIT::patchPutByIdReplace):
373         * jit/JITStubs.cpp:
374         (JSC::JITThunks::tryCachePutByID):
375         (JSC::DEFINE_STUB_FUNCTION):
376         * jit/JITStubs.h:
377         (JSC::):
378         * runtime/JSGlobalData.cpp:
379         (JSC::JSGlobalData::JSGlobalData):
380         * runtime/JSObject.h:
381         (JSC::JSObject::putDirect):
382         (JSC::JSValue::putDirect):
383         * runtime/JSValue.h:
384
385 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
386
387         Reviewed by Sam Weinig.
388
389         String.prototype methods should CheckObjectCoercible (test this is not null or undefined).
390
391         * runtime/StringPrototype.cpp:
392         (JSC::stringProtoFuncCharAt):
393         (JSC::stringProtoFuncCharCodeAt):
394         (JSC::stringProtoFuncConcat):
395         (JSC::stringProtoFuncIndexOf):
396         (JSC::stringProtoFuncLastIndexOf):
397         (JSC::stringProtoFuncMatch):
398         (JSC::stringProtoFuncSearch):
399         (JSC::stringProtoFuncSlice):
400         (JSC::stringProtoFuncSplit):
401         (JSC::stringProtoFuncSubstr):
402         (JSC::stringProtoFuncSubstring):
403         (JSC::stringProtoFuncToLowerCase):
404         (JSC::stringProtoFuncToUpperCase):
405         (JSC::stringProtoFuncLocaleCompare):
406         (JSC::trimString):
407
408 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
409
410         Reviewed by Sam Weinig.
411
412         Date.prototype.toJSON takes one argument, report this correctly.
413
414         * runtime/DatePrototype.cpp:
415
416 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
417
418         Reviewed by Sam Weinig.
419
420         RegExp's prototype should be an object of type RegExp.
421
422         * runtime/RegExpPrototype.cpp:
423         (JSC::RegExpPrototype::RegExpPrototype):
424         * runtime/RegExpPrototype.h:
425
426 2010-07-08  Oliver Hunt  <oliver@apple.com>
427
428         Reviewed by Gavin Barraclough.
429
430         JavaScript parser violates ECMA automatic semicolon insertion rule
431         https://bugs.webkit.org/show_bug.cgi?id=41844
432
433         Remove (very) old and bogus logic that automatically inserted a semicolon
434         at the end of a script's source.
435
436         * parser/Lexer.cpp:
437         (JSC::Lexer::lex):
438
439 2010-07-08  Oliver Hunt  <oliver@apple.com>
440
441         Reviewed by Anders Carlson.
442
443         Tidy up the lexer
444
445         Remove some of the old yacc/lex-isms still present in the lexer
446
447         * parser/JSParser.h:
448         (JSC::):
449         * parser/Lexer.cpp:
450         (JSC::Lexer::parseString):
451         (JSC::Lexer::lex):
452         * parser/Lexer.h:
453
454 2010-07-08  Oliver Hunt  <oliver@apple.com>
455
456         Reviewed by Gavin Barraclough.
457
458         Make object-literal parsing conformant with the spec.
459         https://bugs.webkit.org/show_bug.cgi?id=41892
460
461         Bring our parsing of object literals into conformance with the ES5 spec.
462         Basically disallow conflicting accessor vs. normal property definitions
463         The bulk of this patch is just fiddling to maintain performance.
464
465         * parser/ASTBuilder.h:
466         (JSC::ASTBuilder::createGetterOrSetterProperty):
467         (JSC::ASTBuilder::createProperty):
468         (JSC::ASTBuilder::getName):
469         (JSC::ASTBuilder::getType):
470         * parser/JSParser.cpp:
471         (JSC::jsParse):
472         (JSC::JSParser::JSParser):
473         (JSC::JSParser::parseProperty):
474         (JSC::JSParser::parseObjectLiteral):
475         (JSC::JSParser::parseStrictObjectLiteral):
476         * parser/JSParser.h:
477         * parser/Lexer.cpp:
478         (JSC::Lexer::clear):
479         * parser/Lexer.h:
480         (JSC::Lexer::currentOffset):
481         (JSC::Lexer::setOffset):
482           Add logic to allow us to roll the lexer back in the input stream.
483         * parser/Nodes.h:
484         (JSC::PropertyNode::):
485         (JSC::PropertyNode::type):
486         * parser/Parser.cpp:
487         (JSC::Parser::parse):
488         * parser/SourceProvider.h:
489         (JSC::SourceProvider::SourceProvider):
490         (JSC::SourceProvider::isValid):
491         (JSC::SourceProvider::setValid):
492           SourceProvider now records whether the input text
493           has already been validated.
494         * parser/SyntaxChecker.h:
495         (JSC::SyntaxChecker::SyntaxChecker):
496         (JSC::SyntaxChecker::Property::Property):
497         (JSC::SyntaxChecker::Property::operator!):
498         (JSC::SyntaxChecker::createProperty):
499         (JSC::SyntaxChecker::createPropertyList):
500         (JSC::SyntaxChecker::createGetterOrSetterProperty):
501           The SyntaxChecker mode now needs to maintain a bit more information
502           to ensure that we can validate object literals correctly.
503
504 2010-07-08  Darin Adler  <darin@apple.com>
505
506         * runtime/JSGlobalData.cpp:
507         (JSC::JSGlobalData::sharedInstance): Fix typo.
508
509 2010-07-08  Darin Adler  <darin@apple.com>
510
511         Reviewed by Oliver Hunt.
512
513         Fix assertion seen on the Leopard buildbot.
514         The single shared instance of JSGlobalData was not being
515         adopted after creation.
516
517         * runtime/JSGlobalData.cpp:
518         (JSC::JSGlobalData::sharedInstance): Do adoptRef and then leakRef.
519
520 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
521
522         Reviewed by Sam Weinig.
523
524         BOMs are whitespace.
525
526         * runtime/JSGlobalObjectFunctions.cpp:
527         (JSC::isStrWhiteSpace):
528
529 2010-07-08  Martin Robinson  <mrobinson@igalia.com>
530
531         Unreviewed.
532
533         Try fix the GTK+ build by touching this file.
534
535         * jit/ExecutableAllocatorFixedVMPool.cpp:
536
537 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
538
539         GTK build fix take two.
540
541         * GNUmakefile.am:
542
543 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
544
545         GTK build fix.
546
547         * GNUmakefile.am:
548
549 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
550
551         Reviewed by Sam Weinig.
552
553         https://bugs.webkit.org/show_bug.cgi?id=41641
554
555         Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
556         other than x86-64 (this may be useful on 32-bit platforms, too).
557
558         Simplify ifdefs by dividing into thwo broad allocation strategies
559         (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
560
561         Rename constant used in the code to have names descriptive of their purpose,
562         rather than their specific value on a given platform.
563
564         * jit/ExecutableAllocator.cpp:
565         (JSC::ExecutableAllocator::reprotectRegion):
566         (JSC::ExecutableAllocator::cacheFlush):
567         * jit/ExecutableAllocatorFixedVMPool.cpp:
568         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
569         (JSC::FixedVMPoolAllocator::free):
570         (JSC::ExecutablePool::systemAlloc):
571         * jit/ExecutableAllocatorPosix.cpp:
572         * jit/ExecutableAllocatorSymbian.cpp:
573         * jit/ExecutableAllocatorWin.cpp:
574         * wtf/Platform.h:
575
576 2010-07-08  Xan Lopez  <xlopez@igalia.com>
577
578         Reviewed by Gustavo Noronha.
579
580         Silence a few noisy build rules.
581
582         * GNUmakefile.am:
583
584 2010-07-08  Sheriff Bot  <webkit.review.bot@gmail.com>
585
586         Unreviewed, rolling out r62765.
587         http://trac.webkit.org/changeset/62765
588         https://bugs.webkit.org/show_bug.cgi?id=41840
589
590         All jscore and layout tests crash on Qt bot (Requested by Ossy
591         on #webkit).
592
593         * wtf/FastMalloc.cpp:
594         (WTF::TCMalloc_PageHeap::initializeScavenger):
595         (WTF::TCMalloc_PageHeap::signalScavenger):
596         (WTF::TCMalloc_PageHeap::scavengerThread):
597
598 2010-07-08  Andreas Kling  <andreas.kling@nokia.com>
599
600         Reviewed by Oliver Hunt.
601
602         Interpreter: Crash in op_load_varargs on 64-bit
603         https://bugs.webkit.org/show_bug.cgi?id=41795
604
605         Added missing cast of argCount to int32_t in op_load_varargs.
606
607         * interpreter/Interpreter.cpp:
608         (JSC::Interpreter::privateExecute):
609
610 2010-07-08  Patrick Gansterer  <paroga@paroga.com>
611
612         Reviewed by Geoffrey Garen.
613
614         Make FastMalloc more portable.
615         https://bugs.webkit.org/show_bug.cgi?id=41790
616
617         Use WTF::Mutex instead of pthread_mutex_t and
618         replace pthread_cond_t with WTF::ThreadCondition.
619
620         * wtf/FastMalloc.cpp:
621         (WTF::TCMalloc_PageHeap::initializeScavenger):
622         (WTF::TCMalloc_PageHeap::signalScavenger):
623         (WTF::TCMalloc_PageHeap::scavengerThread):
624
625 2010-07-08  Patrick Gansterer  <paroga@paroga.com>
626
627         Reviewed by Darin Adler.
628
629         Remove needless #include <fcntl.h> from TCSystemAlloc.cpp.
630         https://bugs.webkit.org/show_bug.cgi?id=41777
631
632         * wtf/TCSystemAlloc.cpp:
633
634 2010-07-07  Darin Adler  <darin@apple.com>
635
636         Fixed build in configurations like PowerPC.
637
638         * runtime/RegExpConstructor.cpp: Added include of PassOwnPtr.h.
639         * runtime/RegExpObject.cpp: Ditto.
640         * wtf/SizeLimits.cpp: Changed compile time assertion to work
641         even on platforms where two bool members do not end up taking
642         the same size as one int member!
643
644 2010-07-07  Oliver Hunt  <oliver@apple.com>
645
646         Reviewed by Geoffrey Garen.
647
648         Lazy mode of parser allows invalid syntax in object literals.
649         https://bugs.webkit.org/show_bug.cgi?id=41809
650
651         Make the parser itself validate getter and setter syntax rather
652         than offloading it to the AST builder.
653
654         * parser/ASTBuilder.h:
655         (JSC::ASTBuilder::createGetterOrSetterProperty):
656         * parser/JSParser.cpp:
657         (JSC::JSParser::parseProperty):
658
659 2010-07-07  Dumitru Daniliuc  <dumi@chromium.org>
660
661         Reviewed by Adam Roben.
662
663         Revert r62689.
664         https://bugs.webkit.org/show_bug.cgi?id=41804
665
666         * runtime/Collector.cpp:
667         (JSC::Heap::freeBlocks):
668
669 2010-07-07  Adam Barth  <abarth@webkit.org>
670
671         Reviewed by Sam Weinig.
672
673         Add reverseFind to Vector and deploy in HTML5 parser
674         https://bugs.webkit.org/show_bug.cgi?id=41778
675
676         This method seems generally useful.  I'm slightly surprised we don't
677         have it already.
678
679         * wtf/Vector.h:
680         (WTF::::reverseFind):
681
682 2010-07-07  Darin Adler  <darin@apple.com>
683
684         Reviewed by Adam Barth.
685
686         Turn on adoptRef assertion for RefCounted
687         https://bugs.webkit.org/show_bug.cgi?id=41547
688
689         * wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other
690         WTF headers should use "" includes; consistent in most WTF headers.
691         Added a call to relaxAdoptionRequirement.
692
693         * wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED.
694         Added relaxAdoptionRequirement.
695
696 2010-07-07  Anders Carlsson  <andersca@apple.com>
697
698         Try to fix the Windows build.
699
700         * runtime/Collector.cpp:
701         (JSC::Heap::freeBlocks):
702
703 2010-07-07  Darin Adler  <darin@apple.com>
704
705         Reviewed by Adam Barth.
706
707         More OwnPtr work
708         https://bugs.webkit.org/show_bug.cgi?id=41727
709
710         * API/JSCallbackObject.h:
711         (JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr.
712         * API/JSCallbackObjectFunctions.h:
713         (JSC::JSCallbackObject::JSCallbackObject): Ditto.
714         * bytecode/CodeBlock.cpp:
715         (JSC::CodeBlock::CodeBlock): Ditto.
716         * bytecode/CodeBlock.h:
717         (JSC::CodeBlock::createRareDataIfNecessary): Ditto.
718         * parser/Nodes.cpp:
719         (JSC::ScopeNode::ScopeNode): Ditto.
720         * parser/ParserArena.cpp:
721         (JSC::ParserArena::ParserArena): Ditto.
722         * runtime/Arguments.h:
723         (JSC::Arguments::Arguments): Ditto.
724         * runtime/Executable.cpp:
725         (JSC::EvalExecutable::compile): Ditto.
726         (JSC::ProgramExecutable::compile): Ditto.
727         (JSC::FunctionExecutable::compileForCall): Ditto.
728         (JSC::FunctionExecutable::compileForConstruct): Ditto.
729         (JSC::FunctionExecutable::reparseExceptionInfo): Ditto.
730         (JSC::EvalExecutable::reparseExceptionInfo): Ditto.
731         * runtime/JSArray.cpp:
732         (JSC::JSArray::sort): Ditto.
733         * runtime/RegExpConstructor.cpp:
734         (JSC::RegExpConstructor::RegExpConstructor): Ditto.
735         * runtime/RegExpObject.cpp:
736         (JSC::RegExpObject::RegExpObject): Ditto.
737         * runtime/SmallStrings.cpp:
738         (JSC::SmallStrings::createSingleCharacterString): Ditto.
739         (JSC::SmallStrings::singleCharacterStringRep): Ditto.
740
741         * wtf/unicode/icu/CollatorICU.cpp:
742         (WTF::Collator::userDefault): Use adoptPtr.
743         * yarr/RegexInterpreter.cpp:
744         (JSC::Yarr::ByteCompiler::ByteCompiler): Ditto.
745         (JSC::Yarr::ByteCompiler::compile): Ditto.
746         (JSC::Yarr::ByteCompiler::regexBegin): Ditto.
747         (JSC::Yarr::byteCompileRegex): Ditto.
748         * yarr/RegexInterpreter.h:
749         (JSC::Yarr::BytecodePattern::BytecodePattern): Ditto.
750
751 2010-07-07  Darin Adler  <darin@apple.com>
752
753         Reviewed by Adam Barth.
754
755         Make clear set the pointer to 0 before deletion
756         https://bugs.webkit.org/show_bug.cgi?id=41727
757
758         * wtf/OwnArrayPtr.h: Changed code so we always set the pointer to its new
759         value before deleting the old one, including in the set function and the
760         clear function. This required changing safeDelete.
761         * wtf/OwnPtr.h: Ditto. Also removed some extra null checks.
762         * wtf/PassOwnPtr.h: Ditto.
763
764         * wtf/PassRefPtr.h: Changed code so we always set the pointer to its new
765         value before deref'ing the old one in the clear function. Also added a
766         leakRef function for NonNullPassRefPtr.
767         * wtf/RefPtr.h: Ditto.
768
769         * wtf/gobject/GOwnPtr.h: More of the same.
770         * wtf/gobject/GRefPtr.h: Ditto.
771
772 2010-07-07  Zoltan Herczeg  <zherczeg@webkit.org>
773
774         Reviewed by Oliver Hunt.
775
776         Refactored string parsing inside the lexer
777         https://bugs.webkit.org/show_bug.cgi?id=41606
778
779         Does not use goto. Although the last sunspider
780         parse-only tests yields 1.044x speedup, I think the
781         patch can have a slight improvement at most.
782
783         * parser/Lexer.cpp:
784         (JSC::singleEscape):
785         (JSC::Lexer::parseString):
786         (JSC::Lexer::lex):
787         * parser/Lexer.h:
788
789 2010-07-06  Oliver Hunt  <oliver@apple.com>
790
791         Reviewed by Maciej Stachowiak.
792
793         Make it possible to have both the JIT and Interpreter available in a single build
794         https://bugs.webkit.org/show_bug.cgi?id=41722
795
796         Separate the concept of !ENABLE(JIT) and ENABLE(INTERPRETER) and make it possible
797         to have both JIT and INTERPRETER enabled at the same time.  This doesn't add
798         support for mix mode execution, but it does allow a single build to contain all
799         the code needed to use either the interpreter or the jit.
800
801         If both ENABLE(INTERPRETER) and ENABLE(JIT) are true then setting the environment
802         variable JSC_FORCE_INTERPRETER will force JSC to use the interpreter.
803
804         This patch basically consists of replacing !ENABLE(JIT) with ENABLE(INTERPRETER),
805         or converting #if ENABLE(JIT) ... #else ... into #if ENABLE(JIT) ... #endif
806         #if ENABLE(INTERPRETER), etc.  There are also a few functions that need to be
807         renamed to resolve return type ambiguity.
808
809         * bytecode/CodeBlock.cpp:
810         (JSC::CodeBlock::~CodeBlock):
811         (JSC::CodeBlock::shrinkToFit):
812         * bytecode/CodeBlock.h:
813         * interpreter/CallFrame.h:
814         (JSC::ExecState::returnVPC):
815         * interpreter/Interpreter.cpp:
816         (JSC::Interpreter::unwindCallFrame):
817         (JSC::Interpreter::throwException):
818         (JSC::Interpreter::execute):
819         (JSC::Interpreter::executeCall):
820         (JSC::Interpreter::executeConstruct):
821         (JSC::Interpreter::prepareForRepeatCall):
822         (JSC::Interpreter::privateExecute):
823         (JSC::Interpreter::retrieveLastCaller):
824         * interpreter/Interpreter.h:
825         * runtime/ArrayPrototype.cpp:
826         (JSC::isNumericCompareFunction):
827         * runtime/Executable.cpp:
828         (JSC::EvalExecutable::generateJITCode):
829         (JSC::ProgramExecutable::generateJITCode):
830         (JSC::FunctionExecutable::generateJITCodeForCall):
831         (JSC::FunctionExecutable::generateJITCodeForConstruct):
832         (JSC::FunctionExecutable::reparseExceptionInfo):
833         (JSC::EvalExecutable::reparseExceptionInfo):
834         * runtime/JSFunction.cpp:
835         * runtime/JSGlobalData.cpp:
836         (JSC::JSGlobalData::JSGlobalData):
837         * runtime/JSGlobalData.h:
838         (JSC::JSGlobalData::canUseJIT):
839         * wtf/Platform.h:
840
841 2010-07-06  Darin Adler  <darin@apple.com>
842
843         Reviewed by Adam Barth.
844
845         Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr
846         https://bugs.webkit.org/show_bug.cgi?id=41320
847
848         * bytecode/CodeBlock.cpp:
849         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Use assignment
850         instead of set since the result of reparseExceptionInfo is now a
851         PassOwnPtr.
852
853         * bytecode/CodeBlock.h: Change extractExceptionInfo to return a
854         PassOwnPtr instead of a raw pointer.
855
856         * runtime/Executable.cpp:
857         (JSC::FunctionExecutable::reparseExceptionInfo): Return a PassOwnPtr.
858         (JSC::EvalExecutable::reparseExceptionInfo): Ditto.
859         (JSC::ProgramExecutable::reparseExceptionInfo): Added. This was
860         in the header before, but it's better to not have it there to reduce
861         header dependencies. Return a PassOwnPtr.
862
863         * runtime/Executable.h: Made reparseExceptionInfo return a PassOwnPtr,
864         and put it in the private sections of classes other than the base class.
865
866         * wtf/MessageQueue.h:
867         (WTF::MessageQueue::append): Use leakPtr instead of release.
868         (WTF::MessageQueue::appendAndCheckEmpty): Ditto.
869         (WTF::MessageQueue::prepend): Ditto.
870
871         * wtf/OwnPtr.h: Tweaked formatting. Changed the release function to return
872         a PassOwnPtr rather than a raw pointer. Added a leakPtr function that
873         returns a raw pointer. Put the constructor that takes a raw pointer and
874         the set function into a section guarded by LOOSE_OWN_PTR. Adapted to the
875         new adoptPtr function from PassOwnPtr.h.
876
877         * wtf/PassOwnPtr.h: Tweaked formatting. Renamed the release function
878         to leakPtr. Added an adoptPtr function that creates a new PassOwnPtr.
879         Put the constructor and assignment operators that take a raw pointer
880         into a section guarded by LOOSE_PASS_OWN_PTR.
881
882 2010-07-06  Sam Weinig  <sam@webkit.org>
883
884         Reviewed by Darin Adler
885
886         Update comment in StringExtras.h to be more accurate.
887
888         * wtf/StringExtras.h:
889
890 2010-07-06  Sheriff Bot  <webkit.review.bot@gmail.com>
891
892         Unreviewed, rolling out r62511.
893         http://trac.webkit.org/changeset/62511
894         https://bugs.webkit.org/show_bug.cgi?id=41686
895
896         Breaks Linux/64bit compilation (Requested by xan_ on #webkit).
897
898         * jit/ExecutableAllocator.cpp:
899         * jit/ExecutableAllocatorFixedVMPool.cpp:
900         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
901         (JSC::FixedVMPoolAllocator::free):
902         (JSC::ExecutablePool::systemAlloc):
903         * jit/ExecutableAllocatorPosix.cpp:
904         (JSC::ExecutableAllocator::reprotectRegion):
905         (JSC::ExecutableAllocator::cacheFlush):
906         * jit/ExecutableAllocatorSymbian.cpp:
907         * jit/ExecutableAllocatorWin.cpp:
908         * wtf/Platform.h:
909
910 2010-07-05  Gavin Barraclough  <barraclough@apple.com>
911
912         Reviewed by Sam Weinig.
913
914         https://bugs.webkit.org/show_bug.cgi?id=41641
915
916         Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
917         other than x86-64 (this may be useful on 32-bit platforms, too).
918
919         Simplify ifdefs by dividing into thwo broad allocation strategies
920         (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
921
922         Rename constant used in the code to have names descriptive of their purpose,
923         rather than their specific value on a given platform.
924
925         * jit/ExecutableAllocator.cpp:
926         (JSC::ExecutableAllocator::reprotectRegion):
927         (JSC::ExecutableAllocator::cacheFlush):
928         * jit/ExecutableAllocatorFixedVMPool.cpp:
929         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
930         (JSC::FixedVMPoolAllocator::free):
931         (JSC::ExecutablePool::systemAlloc):
932         * jit/ExecutableAllocatorPosix.cpp:
933         * jit/ExecutableAllocatorSymbian.cpp:
934         * jit/ExecutableAllocatorWin.cpp:
935         * wtf/Platform.h:
936
937 2010-07-05  Steve Block  <steveblock@google.com>
938
939         Reviewed by Darin Adler.
940
941         ThreadingPthreads.cpp should use JNIUtility.h on Android, not outdated jni_utility.h
942         https://bugs.webkit.org/show_bug.cgi?id=41594
943
944         * wtf/ThreadingPthreads.cpp:
945
946 2010-07-04  Mark Rowe  <mrowe@apple.com>
947
948         Build fix after r62456.
949
950         * interpreter/Interpreter.cpp:
951         (JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent
952         warnings about comparisons between signed and unsigned types, and attempts to call an overload
953         of std::min that doesn't exist.
954
955 2010-07-02  Sam Weinig  <sam@webkit.org>
956
957         Reviewed by Darin Adler.
958
959         Patch for https://bugs.webkit.org/show_bug.cgi?id=41553
960         Make StringExtras.h versions of snprintf and vsnprintf match the unix versions.
961
962         - MSVC does not ensure the buffers are null terminated as the unix versions do.
963
964         * runtime/JSGlobalObjectFunctions.cpp: Cleanup includes.
965         * runtime/UString.cpp: Clean up includes.
966         (JSC::UString::from): Don't pass sizeof(buf) - 1, that is wrong.
967         * wtf/StringExtras.h:
968         (snprintf): Ensure null termination of buffer.
969         (vsnprintf): Ditto.
970
971 2010-07-03  Yong Li  <yoli@rim.com>
972
973         Reviewed by Darin Adler.
974
975         Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in
976         the interpreter as well as the JIT.
977
978         https://bugs.webkit.org/show_bug.cgi?id=41351
979         rdar://problem/8142141
980
981         * interpreter/Interpreter.cpp:
982         (JSC::Interpreter::privateExecute): Fix signed integer overflow problem
983         in op_load_varargs handling. 0xFFFFFFFF was read as -1.
984
985 2010-06-26  Jeremy Orlow  <jorlow@chromium.org>
986
987         Reviewed by Dumitru Daniliuc.
988
989         Support for keys and in-memory storage for IndexedDB
990         https://bugs.webkit.org/show_bug.cgi?id=41252
991
992         Set the role to Private.
993
994         * JavaScriptCore.xcodeproj/project.pbxproj:
995
996 2010-07-02  Oliver Hunt  <oliver@apple.com>
997
998         Reviewed by Geoffrey Garen.
999
1000         Move BOM handling out of the lexer and parser
1001         https://bugs.webkit.org/show_bug.cgi?id=41539
1002
1003         Doing the BOM stripping in the lexer meant that we could
1004         end up having to strip the BOMs from a source multiple times.
1005         To deal with this we now require all strings provided by
1006         a SourceProvider to already have had the BOMs stripped.
1007         This also simplifies some of the lexer logic.
1008
1009         * parser/Lexer.cpp:
1010         (JSC::Lexer::setCode):
1011         (JSC::Lexer::sourceCode):
1012         * parser/SourceProvider.h:
1013         (JSC::SourceProvider::SourceProvider):
1014         (JSC::UStringSourceProvider::create):
1015         (JSC::UStringSourceProvider::getRange):
1016         (JSC::UStringSourceProvider::UStringSourceProvider):
1017         * wtf/text/StringImpl.h:
1018         (WebCore::StringImpl::copyStringWithoutBOMs):
1019
1020 2010-07-03  Patrick Gansterer  <paroga@paroga.com>
1021
1022         Reviewed by Kent Tamura.
1023
1024         [WINCE] Implement Unicode::isAlphanumeric and Unicode::isArabicChar.
1025         https://bugs.webkit.org/show_bug.cgi?id=41411
1026
1027         * wtf/unicode/wince/UnicodeWince.cpp:
1028         (WTF::Unicode::isAlphanumeric):
1029         * wtf/unicode/wince/UnicodeWince.h:
1030         (WTF::Unicode::isArabicChar):
1031
1032 2010-07-03  Kwang Yul Seo  <skyul@company100.net>
1033
1034         Reviewed by Kent Tamura.
1035
1036         [BREWMP] Change the CRASH() macro to print "WebKit CRASH" log.
1037         https://bugs.webkit.org/show_bug.cgi?id=41524
1038
1039         Print "WebKit CRASH" before crashing.
1040
1041         * wtf/Assertions.h:
1042
1043 2010-07-02  Gavin Barraclough  <barraclough@apple.com>
1044
1045         Reviewed by Oliver Hunt.
1046
1047         Bug 41565 - Repatching in ARMv7Assembler::repatchLoadPtrToLEA is broken
1048
1049         This method tried to repatch a LDR (T2) into an ADD (T3) - but it only
1050         repatches the first instruction word.  The layout of the fields in the
1051         second word is different, and also needs repatching.
1052
1053         * assembler/ARMv7Assembler.h:
1054         (JSC::ARMv7Assembler::repatchLoadPtrToLEA):
1055
1056 2010-07-02  Oliver Hunt  <oliver@apple.com>
1057
1058         Reviewed by Gavin Barraclough.
1059
1060         Clamp the number of arguments supported by function.apply
1061         https://bugs.webkit.org/show_bug.cgi?id=41351
1062         <rdar://problem/8142141>
1063
1064         Add clamping logic to function.apply similar to that
1065         enforced by firefox.  We have a smaller clamp than
1066         firefox as our calling convention means that stack
1067         usage is proportional to argument count -- the firefox
1068         limit is larger than you could actually call.
1069
1070         * interpreter/Interpreter.cpp:
1071         (JSC::Interpreter::privateExecute):
1072         * jit/JITStubs.cpp:
1073         (JSC::DEFINE_STUB_FUNCTION):
1074         * runtime/Arguments.h:
1075         (JSC::Arguments::):
1076
1077 2010-07-02  Chao-ying Fu  <fu@mips.com>
1078
1079         Reviewed by Oliver Hunt.
1080
1081         Re-enable JIT_OPTIMIZE_NATIVE_CALL on MIPS
1082         https://bugs.webkit.org/show_bug.cgi?id=40179
1083
1084         Add the MIPS part to re-enable JIT_OPTIMIZE_NATIVE_CALL.
1085
1086         * jit/JITOpcodes.cpp:
1087         (JSC::JIT::privateCompileCTINativeCall):
1088         * wtf/Platform.h:
1089
1090 2010-07-02  Gavin Barraclough  <barraclough@apple.com>
1091
1092         Reviewed by Oliver Hunt.
1093
1094         Bug 41552 - Clean up ARMv7 vfp code generation
1095         Emit separate opcode individually, remove magic numbers.
1096
1097         Also remove invalid assert from JSImmediate (number cells are not CELL_MASK aligned).
1098
1099         * assembler/ARMv7Assembler.h:
1100         (JSC::ARMv7Assembler::):
1101         (JSC::ARMv7Assembler::vadd_F64):
1102         (JSC::ARMv7Assembler::vcmp_F64):
1103         (JSC::ARMv7Assembler::vcvt_F64_S32):
1104         (JSC::ARMv7Assembler::vcvtr_S32_F64):
1105         (JSC::ARMv7Assembler::vdiv_F64):
1106         (JSC::ARMv7Assembler::vldr):
1107         (JSC::ARMv7Assembler::vmov_F64_0):
1108         (JSC::ARMv7Assembler::vmov):
1109         (JSC::ARMv7Assembler::vmrs):
1110         (JSC::ARMv7Assembler::vmul_F64):
1111         (JSC::ARMv7Assembler::vstr):
1112         (JSC::ARMv7Assembler::vsub_F64):
1113         (JSC::ARMv7Assembler::VFPOperand::VFPOperand):
1114         (JSC::ARMv7Assembler::VFPOperand::bits1):
1115         (JSC::ARMv7Assembler::VFPOperand::bits4):
1116         (JSC::ARMv7Assembler::vcvtOp):
1117         (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpOp):
1118         (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpMemOp):
1119         * assembler/MacroAssemblerARMv7.h:
1120         (JSC::MacroAssemblerARMv7::branchDouble):
1121         * runtime/JSImmediate.h:
1122         (JSC::JSValue::isCell):
1123
1124 2010-07-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1125
1126         Unreviewed, rolling out r62410.
1127         http://trac.webkit.org/changeset/62410
1128         https://bugs.webkit.org/show_bug.cgi?id=41549
1129
1130         accursed last minute changes (Requested by olliej on #webkit).
1131
1132         * parser/Lexer.cpp:
1133         (JSC::Lexer::setCode):
1134         (JSC::Lexer::copyCodeWithoutBOMs):
1135         (JSC::Lexer::sourceCode):
1136         * parser/SourceProvider.h:
1137         (JSC::):
1138         (JSC::SourceProvider::SourceProvider):
1139         (JSC::SourceProvider::hasBOMs):
1140         (JSC::UStringSourceProvider::create):
1141         (JSC::UStringSourceProvider::getRange):
1142         (JSC::UStringSourceProvider::UStringSourceProvider):
1143         * wtf/text/StringImpl.h:
1144
1145 2010-07-02  Sam Weinig  <sam@webkit.org>
1146
1147         Reviewed by Geoffrey Garen.
1148
1149         Patch for https://bugs.webkit.org/show_bug.cgi?id=41548
1150         Use snprintf instead of sprintf everywhere in JavaScriptCore
1151
1152         * runtime/JSGlobalObjectFunctions.cpp:
1153         (JSC::encode):
1154         (JSC::globalFuncEscape):
1155         * runtime/UString.cpp:
1156         (JSC::UString::from):
1157
1158 2010-07-02  Oliver Hunt  <oliver@apple.com>
1159
1160         Reviewed by Geoffrey Garen.
1161
1162         Move BOM handling out of the lexer and parser
1163         https://bugs.webkit.org/show_bug.cgi?id=41539
1164
1165         Doing the BOM stripping in the lexer meant that we could
1166         end up having to strip the BOMs from a source multiple times.
1167         To deal with this we now require all strings provided by
1168         a SourceProvider to already have had the BOMs stripped.
1169         This also simplifies some of the lexer logic.
1170
1171         * parser/Lexer.cpp:
1172         (JSC::Lexer::setCode):
1173         (JSC::Lexer::sourceCode):
1174         * parser/SourceProvider.h:
1175         (JSC::SourceProvider::SourceProvider):
1176         (JSC::UStringSourceProvider::create):
1177         (JSC::UStringSourceProvider::getRange):
1178         (JSC::UStringSourceProvider::UStringSourceProvider):
1179         * wtf/text/StringImpl.h:
1180         (WebCore::StringImpl::copyStringWithoutBOMs):
1181
1182 2010-07-02  Renata Hodovan  <reni@inf.u-szeged.hu>
1183
1184         Reviewed by Oliver Hunt.
1185         
1186         [ Updated after rollout. ]
1187
1188         Merged RegExp constructor and RegExp::create methods.
1189         Both functions are called with three parameters and check whether 
1190         flags (the third param) is given or not.
1191         Avoid extra hash lookups in RegExpCache::create by passing a pre-computed
1192         iterator parameter.
1193         https://bugs.webkit.org/show_bug.cgi?id=41055
1194
1195         * runtime/RegExp.cpp:
1196         (JSC::RegExp::RegExp):
1197         * runtime/RegExp.h:
1198         * runtime/RegExpCache.cpp:
1199         (JSC::RegExpCache::lookupOrCreate):
1200         (JSC::RegExpCache::create):
1201         * runtime/RegExpCache.h:
1202
1203 2010-07-02  Martin Robinson  <mrobinson@igalia.com>
1204
1205         Unreviewed. Build fix for GTK+.
1206
1207         Build Lexer.lut.h with the rest of the .lut.h files. Later these should
1208         all probably be moved to DerivedSources.
1209
1210         * GNUmakefile.am:
1211
1212 2010-06-23  Martin Robinson  <mrobinson@igalia.com>
1213
1214         Reviewed by Gustavo Noronha Silva.
1215
1216         [GTK] Separate DerivedSources per-project
1217         https://bugs.webkit.org/show_bug.cgi?id=41109
1218
1219         Generate JavaScriptCore derived sources in <builddir>/DerivedSources/JavaScriptCore.
1220
1221         * GNUmakefile.am:
1222
1223 2010-07-02  Peter Varga  <pvarga@inf.u-szeged.hu>
1224
1225         Reviewed by Oliver Hunt.
1226
1227         The alternativeFrameLocation value is wrong in the emitDisjunction function in
1228         case of PatternTerm::TypeParentheticalAssertion. This value needs to be
1229         computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc
1230         memory corruption in some cases.
1231         Layout test added for checking of TypeParentheticalAssertion case.
1232         https://bugs.webkit.org/show_bug.cgi?id=41458
1233
1234         * yarr/RegexInterpreter.cpp:
1235         (JSC::Yarr::ByteCompiler::emitDisjunction):
1236
1237 2010-07-01  Oliver Hunt  <oliver@apple.com>
1238
1239         Reviewed by Maciej Stachowiak.
1240
1241         Add a FixedArray template to encapsulate fixed length arrays
1242         https://bugs.webkit.org/show_bug.cgi?id=41506
1243
1244         This new type is used in place of fixed length C arrays so
1245         that debug builds can guard against attempts to go beyond
1246         the end of the array.
1247
1248         * JavaScriptCore.xcodeproj/project.pbxproj:
1249         * bytecode/Opcode.cpp:
1250         (JSC::OpcodeStats::~OpcodeStats):
1251         * pcre/pcre_compile.cpp:
1252         (calculateCompiledPatternLength):
1253         * runtime/Collector.cpp:
1254         (JSC::Heap::allocateBlock):
1255         (JSC::Heap::allocate):
1256         * runtime/Collector.h:
1257         (JSC::CollectorBitmap::clearAll):
1258         * runtime/CollectorHeapIterator.h:
1259         (JSC::CollectorHeapIterator::operator*):
1260         * runtime/DateInstanceCache.h:
1261         * runtime/JSString.cpp:
1262         (JSC::JSString::replaceCharacter):
1263         * runtime/JSString.h:
1264         (JSC::RopeBuilder::JSStringFinalizerStruct::):
1265         * runtime/NumericStrings.h:
1266         * runtime/RegExpCache.h:
1267         * runtime/SmallStrings.h:
1268         (JSC::SmallStrings::singleCharacterStrings):
1269         * wtf/AVLTree.h:
1270         * wtf/FixedArray.h: Added.
1271         (WTF::FixedArray::operator[]):
1272         (WTF::FixedArray::data):
1273
1274 2010-07-01  Zoltan Herczeg  <zherczeg@webkit.org>
1275
1276         Reviewed by Oliver Hunt.
1277
1278         Improve the main lexer switch by mapping input characters to their type
1279         https://bugs.webkit.org/show_bug.cgi?id=41459
1280
1281         Sunsipder: no change (from 532.9ms to 531.5ms)
1282         SunSpider --parse-only: 1.025x as fast (from 33.1ms to 32.3ms)
1283
1284         * parser/Lexer.cpp:
1285         (JSC::):
1286         (JSC::Lexer::lex):
1287
1288 2010-07-01  Sam Weinig  <sam@webkit.org>
1289
1290         Rubber-stamped by Ander Carlsson.
1291
1292         Define HAVE_HOSTED_CORE_ANIMATION on Snow Leopard.
1293
1294         * wtf/Platform.h:
1295
1296 2010-07-01  Gavin Barraclough  <barraclough@apple.com>
1297
1298         Reviewed by Oliver Hunt.
1299
1300         Bug 41490 - Add missing operations to MacroAssemblerARMv7
1301         Also, make single, double, quad register numbers in ARMv7Assembler distinct & strongly typed.
1302
1303         * assembler/ARMv7Assembler.h:
1304         (JSC::ARMRegisters::):
1305         (JSC::ARMRegisters::asSingle):
1306         (JSC::ARMRegisters::asDouble):
1307         (JSC::VFPImmediate::VFPImmediate):
1308         (JSC::VFPImmediate::isValid):
1309         (JSC::VFPImmediate::value):
1310         (JSC::ARMv7Assembler::singleRegisterMask):
1311         (JSC::ARMv7Assembler::doubleRegisterMask):
1312         (JSC::ARMv7Assembler::):
1313         (JSC::ARMv7Assembler::add_S):
1314         (JSC::ARMv7Assembler::neg):
1315         (JSC::ARMv7Assembler::orr_S):
1316         (JSC::ARMv7Assembler::sub):
1317         (JSC::ARMv7Assembler::sub_S):
1318         (JSC::ARMv7Assembler::vadd_F64):
1319         (JSC::ARMv7Assembler::vcmp_F64):
1320         (JSC::ARMv7Assembler::vcvt_F64_S32):
1321         (JSC::ARMv7Assembler::vcvtr_S32_F64):
1322         (JSC::ARMv7Assembler::vdiv_F64):
1323         (JSC::ARMv7Assembler::vldr):
1324         (JSC::ARMv7Assembler::vmov_F64_0):
1325         (JSC::ARMv7Assembler::vmov):
1326         (JSC::ARMv7Assembler::vmul_F64):
1327         (JSC::ARMv7Assembler::vstr):
1328         (JSC::ARMv7Assembler::vsub_F64):
1329         (JSC::ARMv7Assembler::vcvt):
1330         (JSC::ARMv7Assembler::vmem):
1331         * assembler/AbstractMacroAssembler.h:
1332         * assembler/MacroAssemblerARM.h:
1333         * assembler/MacroAssemblerARMv7.h:
1334         (JSC::MacroAssemblerARMv7::fpTempRegisterAsSingle):
1335         (JSC::MacroAssemblerARMv7::neg32):
1336         (JSC::MacroAssemblerARMv7::loadDouble):
1337         (JSC::MacroAssemblerARMv7::divDouble):
1338         (JSC::MacroAssemblerARMv7::convertInt32ToDouble):
1339         (JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32):
1340         (JSC::MacroAssemblerARMv7::zeroDouble):
1341         (JSC::MacroAssemblerARMv7::branchOr32):
1342         (JSC::MacroAssemblerARMv7::set32):
1343         (JSC::MacroAssemblerARMv7::set8):
1344         * assembler/MacroAssemblerMIPS.h:
1345         * assembler/MacroAssemblerX86Common.h:
1346
1347 2010-07-01  Oliver Hunt  <oliver@apple.com>
1348
1349         Reviewed by Geoff Garen.
1350
1351         Improve reentrancy logic in polymorphic cache stubs
1352         <https://bugs.webkit.org/show_bug.cgi?id=41482>
1353         <rdar://problem/8094380>
1354
1355         Make the polymorphic cache stubs handle reentrancy
1356         better.
1357
1358         * jit/JITStubs.cpp:
1359         (JSC::DEFINE_STUB_FUNCTION):
1360         (JSC::getPolymorphicAccessStructureListSlot):
1361
1362 2010-07-01  Antti Koivisto  <koivisto@iki.fi>
1363
1364         Revert accidental commit.
1365
1366         * runtime/Collector.cpp:
1367         (JSC::Heap::allocateBlock):
1368
1369 2010-06-30  Darin Adler  <darin@apple.com>
1370
1371         Reviewed by Adam Barth.
1372
1373         Add assertion, off by default, for when you forget to do adoptRef
1374         https://bugs.webkit.org/show_bug.cgi?id=41422
1375
1376         * wtf/PassRefPtr.h: Tweaked formatting. Added a new adopted
1377         function, called on the pointer by adoptRef, with an empty inline
1378         default version, meant to be overloaded. Unified the inlining
1379         with a macro named REF_DEREF_INLINE to make it clearer what's
1380         going on in the refIfNotNull/derefIfNotNull functions. Renamed
1381         releaseRef to leakRef, but left the old name in for compatibility
1382         for now.
1383
1384         * wtf/RefCounted.h: Added code to require adoption and assert if
1385         you don't call adoptRef. For now, it is turned off because of the
1386         LOOSE_REF_COUNTED define in this header. Later we can turn it on
1387         once we get everything working without asserting.
1388
1389 2010-06-29  Michael Saboff  <msaboff@apple.com>
1390
1391         Reviewed by Darin Adler.
1392
1393         Bug 41238 - RegExp performance slow on Dromaeo benchmark
1394
1395         Other javascript engines appear to cache prior results of regular 
1396         expression operations.
1397
1398         Suggest adding some sort of caching mechanism to regular expression 
1399         processing.
1400
1401         Added a single entry cache of match() results to RegExp class.
1402
1403         Also added performance improvements to UString == operator.
1404         First check the impls for equality.  Then get the length of
1405         each of the non-null impls.  Next check the sizes for equality.
1406         Then check the data for the case of different impls that point 
1407         to the same data (most likely due to substrings from the beginning of
1408         another string).  Lastly we check the underlying data for equality.
1409
1410         * runtime/RegExp.cpp:
1411         (JSC::RegExp::RegExp):
1412         (JSC::RegExp::match):
1413         * runtime/RegExp.h:
1414         * runtime/UString.h:
1415         (JSC::operator==):
1416
1417 2010-06-29  Nathan Lawrence  <nlawrence@apple.com>
1418
1419         Reviewed by Geoffrey Garen.
1420
1421         WTF::HashSet iterators are quasi-mutable.  Changing the value through
1422         dereferencing an iterator will not change the behavior of methods like
1423         contains or find, but will change the behavior of iterating.
1424
1425         * wtf/HashSet.h:
1426         (WTF::::begin):
1427         (WTF::::end):
1428         (WTF::::find):
1429         (WTF::::remove):
1430         * wtf/HashTable.h:
1431
1432 2010-06-29  Martin Robinson  <mrobinson@igalia.com>
1433
1434         Reviewed by Xan Lopez.
1435
1436         [GTK] Clean up the source lists in the GNUMakefile.am files
1437         https://bugs.webkit.org/show_bug.cgi?id=41229
1438
1439         Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate
1440         the source lists.
1441
1442         * GNUmakefile.am:
1443
1444 2010-06-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1445
1446         Reviewed by Kenneth Rohde Christiansen.
1447
1448         [Qt] Fix QtScript build after QScriptValuePrivate ctor changes
1449         https://bugs.webkit.org/show_bug.cgi?id=41307
1450
1451         * qt/api/qscriptvalue_p.h:
1452         (QScriptValuePrivate::prototype):
1453         * qt/benchmarks/qscriptengine/qscriptengine.pro:
1454
1455 2010-06-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1456
1457         Reviewed by Kenneth Rohde Christiansen.
1458
1459         [Qt] QScriptEngine API should contain a newArray function
1460         https://bugs.webkit.org/show_bug.cgi?id=39115
1461
1462         * qt/api/qscriptengine.cpp:
1463         (QScriptEngine::newArray):
1464         * qt/api/qscriptengine.h:
1465         * qt/api/qscriptengine_p.cpp:
1466         (QScriptEnginePrivate::newArray):
1467         * qt/api/qscriptengine_p.h:
1468         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
1469         (tst_QScriptEngine::newArray):
1470
1471 2010-06-28  Xan Lopez  <xlopez@igalia.com>
1472
1473         Reviewed by Gustavo Noronha.
1474
1475         Install jsc as jsc-X where X is the major API version to allow
1476         parallel installation of both GTK+ 2.x and 3.x versions.
1477
1478         * GNUmakefile.am:
1479
1480 2010-06-28  John Gregg  <johnnyg@google.com>
1481
1482         Reviewed by Kent Tamura.
1483
1484         add ENABLE_DIRECTORY_UPLOAD build support
1485         https://bugs.webkit.org/show_bug.cgi?id=41100
1486
1487         * Configurations/FeatureDefines.xcconfig:
1488
1489 2010-06-28  Xan Lopez  <xlopez@igalia.com>
1490
1491         Revert to build jsc, since the tests expect this.
1492
1493         * GNUmakefile.am:
1494
1495 2010-06-28  Zoltan Herczeg  <zherczeg@webkit.org>
1496
1497         Reviewed by Oliver Hunt.
1498
1499         Only one character lookahead should be enough for the lexer
1500         https://bugs.webkit.org/show_bug.cgi?id=41213
1501
1502         The lexer had 4 character lookahead before, which required
1503         a complex shifting mechanism. This can be improved by using
1504         only one character lookahead for most decisions, and a
1505         peek() function as a fallback when it is absolutely necessary.
1506
1507         * parser/Lexer.cpp:
1508         (JSC::Lexer::currentCharacter):
1509         (JSC::Lexer::currentOffset):
1510         (JSC::Lexer::setCode):
1511         (JSC::Lexer::shift):
1512         (JSC::Lexer::peek):
1513         (JSC::Lexer::getUnicodeCharacter):
1514         (JSC::Lexer::shiftLineTerminator):
1515         (JSC::Lexer::lastTokenWasRestrKeyword):
1516         (JSC::Lexer::lex):
1517         (JSC::Lexer::scanRegExp):
1518         (JSC::Lexer::skipRegExp):
1519         * parser/Lexer.h:
1520
1521 2010-06-28  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
1522
1523         Unreviewed build fix.
1524
1525         [EFL] Build fix for latest version of Ecore library.
1526         Ecore recently changed return type of callbacks from int to Eina_Bool.
1527
1528         * wtf/efl/MainThreadEfl.cpp:
1529         (WTF::timeoutFired): Return Eina_Bool instead of int.
1530
1531 2010-06-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1532
1533         Reviewed by Kenneth Rohde Christiansen.
1534
1535         [Qt] QScriptValue should have API for accessing object properties
1536         https://bugs.webkit.org/show_bug.cgi?id=40903
1537
1538         Make possible to access properties inside QScriptValues. While this
1539         still doesn't support the ResolveLocal parameter, it is already useful
1540         for testing the API.
1541
1542         The tests from upstream QtScript weren't imported since most of them
1543         depend on the setProperty() function as well. A simple test was created.
1544
1545         * qt/api/qscriptvalue.cpp:
1546         (QScriptValue::property):
1547         * qt/api/qscriptvalue.h:
1548         (QScriptValue::):
1549         * qt/api/qscriptvalue_p.h:
1550         (QScriptValuePrivate::property):
1551         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
1552         (tst_QScriptValue::propertySimple):
1553         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
1554
1555 2010-06-28  Xan Lopez  <xlopez@igalia.com>
1556
1557         Reviewed by Gustavo Noronha.
1558
1559         [GTK] Add support for GTK+3
1560         https://bugs.webkit.org/show_bug.cgi?id=41253
1561
1562         Suffix jsc with the API version of the library, so that
1563         libwebkitgtk 1.x and 3.x can install jsc.
1564
1565         * GNUmakefile.am:
1566
1567 2010-06-27  Kwang Yul Seo  <skyul@company100.net>
1568
1569         Reviewed by Kent Tamura.
1570
1571         [BREWMP] Turn ENABLE(SINGLE_THREADED) on.
1572         https://bugs.webkit.org/show_bug.cgi?id=41135
1573
1574         Brew MP does not support preemptive multi-threading.
1575         Disable threading for Brew MP.
1576
1577         * wtf/Platform.h:
1578
1579 2010-06-26  Tony Gentilcore  <tonyg@chromium.org>
1580
1581         Reviewed by Dimitri Glazkov.
1582
1583         Add an ENABLE_WEB_TIMING option for enabling Web Timing support.
1584         https://bugs.webkit.org/show_bug.cgi?id=38924
1585
1586         * Configurations/FeatureDefines.xcconfig:
1587
1588 2010-06-25  Nathan Lawrence  <nlawrence@apple.com>
1589
1590         Reviewed by Geoffrey Garen.
1591
1592         We assume in testapi.c that the value aHeapRef refers to will not be
1593         moved.  When we have movable objects, this will not be the case.
1594
1595         * API/tests/testapi.c:
1596         (main):
1597
1598 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1599
1600         Unreviewed, rolling out r61924.
1601         http://trac.webkit.org/changeset/61924
1602         https://bugs.webkit.org/show_bug.cgi?id=41240
1603
1604         It was rolled out, but cq+ wasn't removed (Requested by Ossy_
1605         on #webkit).
1606
1607         * runtime/RegExp.cpp:
1608         (JSC::RegExp::RegExp):
1609         (JSC::RegExp::create):
1610         * runtime/RegExp.h:
1611         * runtime/RegExpCache.cpp:
1612         (JSC::RegExpCache::lookupOrCreate):
1613         (JSC::RegExpCache::create):
1614         * runtime/RegExpCache.h:
1615
1616 2010-06-25  Renata Hodovan  <reni@inf.u-szeged.hu>
1617
1618         Reviewed by Geoffrey Garen.
1619
1620         Merge RegExp constructor and RegExp::create methods into one.
1621         Both of function are called with tree parameters and check whether 
1622         flags (the third param) is given or not.
1623         Simplify hash lookups in RegExpCache::create with giving them an extra 
1624         iterator parameter.
1625         https://bugs.webkit.org/show_bug.cgi?id=41055
1626
1627         * runtime/RegExp.cpp:
1628         (JSC::RegExp::RegExp):
1629         * runtime/RegExp.h:
1630         * runtime/RegExpCache.cpp:
1631         (JSC::RegExpCache::lookupOrCreate):
1632         (JSC::RegExpCache::create):
1633         * runtime/RegExpCache.h:
1634
1635 2010-06-25  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1636
1637         Reviewed by Simon Hausmann.
1638
1639         Introduce QtScript benchmarks.
1640
1641         The QtScript performance should be tested regularly. The patch introduces
1642         micro benchmarks for existing API.
1643
1644         [Qt] Performance of the QtScript API is not tested.
1645         https://bugs.webkit.org/show_bug.cgi?id=40911
1646
1647         * qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri.
1648         * qt/benchmarks/benchmarks.pro: Added.
1649         * qt/benchmarks/qscriptengine/qscriptengine.pro: Added.
1650         * qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added.
1651         (tst_QScriptEngine::checkSyntax_data):
1652         (tst_QScriptEngine::checkSyntax):
1653         (tst_QScriptEngine::constructor):
1654         (tst_QScriptEngine::evaluateString_data):
1655         (tst_QScriptEngine::evaluateString):
1656         (tst_QScriptEngine::evaluateProgram_data):
1657         (tst_QScriptEngine::evaluateProgram):
1658         (tst_QScriptEngine::newObject):
1659         (tst_QScriptEngine::nullValue):
1660         (tst_QScriptEngine::undefinedValue):
1661         (tst_QScriptEngine::globalObject):
1662         (tst_QScriptEngine::toStringHandle):
1663         * qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added.
1664         * qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added.
1665         (tst_QScriptValue::tst_QScriptValue):
1666         (tst_QScriptValue::~tst_QScriptValue):
1667         (tst_QScriptValue::values_data):
1668         (tst_QScriptValue::ctorBool):
1669         (tst_QScriptValue::ctorReal):
1670         (tst_QScriptValue::ctorNumber):
1671         (tst_QScriptValue::ctorQString):
1672         (tst_QScriptValue::ctorCString):
1673         (tst_QScriptValue::ctorSpecial):
1674         (tst_QScriptValue::ctorQScriptValue):
1675         (tst_QScriptValue::isValid_data):
1676         (tst_QScriptValue::isValid):
1677         (tst_QScriptValue::isBool_data):
1678         (tst_QScriptValue::isBool):
1679         (tst_QScriptValue::isNumber_data):
1680         (tst_QScriptValue::isNumber):
1681         (tst_QScriptValue::isFunction_data):
1682         (tst_QScriptValue::isFunction):
1683         (tst_QScriptValue::isNull_data):
1684         (tst_QScriptValue::isNull):
1685         (tst_QScriptValue::isString_data):
1686         (tst_QScriptValue::isString):
1687         (tst_QScriptValue::isUndefined_data):
1688         (tst_QScriptValue::isUndefined):
1689         (tst_QScriptValue::isObject_data):
1690         (tst_QScriptValue::isObject):
1691         (tst_QScriptValue::isError_data):
1692         (tst_QScriptValue::isError):
1693         (tst_QScriptValue::toString_data):
1694         (tst_QScriptValue::toString):
1695         (tst_QScriptValue::toNumber_data):
1696         (tst_QScriptValue::toNumber):
1697         (tst_QScriptValue::toBool_data):
1698         (tst_QScriptValue::toBool):
1699         (tst_QScriptValue::toInteger_data):
1700         (tst_QScriptValue::toInteger):
1701         (tst_QScriptValue::toInt32_data):
1702         (tst_QScriptValue::toInt32):
1703         (tst_QScriptValue::toUInt32_data):
1704         (tst_QScriptValue::toUInt32):
1705         (tst_QScriptValue::toUInt16_data):
1706         (tst_QScriptValue::toUInt16):
1707         (tst_QScriptValue::toObject_data):
1708         (tst_QScriptValue::toObject):
1709         (tst_QScriptValue::equals_data):
1710         (tst_QScriptValue::equals):
1711         (tst_QScriptValue::strictlyEquals_data):
1712         (tst_QScriptValue::strictlyEquals):
1713         (tst_QScriptValue::instanceOf_data):
1714         (tst_QScriptValue::instanceOf):
1715
1716 2010-06-25  Oliver Hunt  <oliver@apple.com>
1717
1718         Reviewed by Geoffrey Garen.
1719
1720         Remove old js parser
1721         https://bugs.webkit.org/show_bug.cgi?id=41222
1722
1723         Remove the old yacc parser, this also solves the tiger problem.  Which
1724         was a conflict between yacc generated token values and those in the
1725         custom parser
1726
1727         * Android.mk:
1728         * CMakeLists.txt:
1729         * DerivedSources.make:
1730         * DerivedSources.pro:
1731         * GNUmakefile.am:
1732         * JavaScriptCore.pro:
1733         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1734         * JavaScriptCore.xcodeproj/project.pbxproj:
1735         * parser/Grammar.y: Removed.
1736         * parser/JSParser.cpp:
1737         * parser/JSParser.h:
1738         * parser/Lexer.cpp:
1739         * parser/NodeConstructors.h:
1740         (JSC::Node::Node):
1741         * parser/Parser.cpp:
1742         (JSC::Parser::parse):
1743         * wtf/Platform.h:
1744
1745 2010-06-25  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1746
1747         Reviewed by Simon Hausmann.
1748
1749         New QtScript API; setPrototype() and prototype().
1750
1751         This patch implements QScriptValue's prototype accessors.
1752
1753         [Qt] QScriptValue should have accessors to a prototype.
1754         https://bugs.webkit.org/show_bug.cgi?id=39356
1755
1756         * qt/api/qscriptvalue.cpp:
1757         (QScriptValue::prototype):
1758         (QScriptValue::setPrototype):
1759         * qt/api/qscriptvalue.h:
1760         * qt/api/qscriptvalue_p.h:
1761         (QScriptValuePrivate::prototype):
1762         (QScriptValuePrivate::setPrototype):
1763         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
1764         (tst_QScriptValue::getSetPrototype):
1765         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
1766
1767 2010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
1768
1769         Reviewed by Kenneth Rohde Christiansen.
1770
1771         [CMake] Add option to enable JIT.
1772         JIT is disabled by default, but now it's possible to enable it through
1773         an option to CMake: -DENABLE_JIT will enable it.
1774         https://bugs.webkit.org/show_bug.cgi?id=40936
1775
1776         * CMakeLists.txt: Add missing files and re-sort.
1777
1778 2010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
1779
1780         Reviewed by Gustavo Noronha Silva.
1781
1782         [CMake] Remove unused variable in EFL build system. It was previously
1783         being used to set the flags of each port but it was superseded by
1784         other flags.
1785         https://bugs.webkit.org/show_bug.cgi?id=40931
1786
1787         * jsc/CMakeLists.txt:
1788
1789 2010-06-25  Nathan Lawrence  <nlawrence@apple.com>
1790
1791         Reviewed by Geoffrey Garen.
1792
1793         Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on
1794         sunspider.
1795
1796         * assembler/AssemblerBuffer.h:
1797         (JSC::AssemblerBuffer::AssemblerBuffer):
1798
1799 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1800
1801         Unreviewed, rolling out r61842.
1802         http://trac.webkit.org/changeset/61842
1803         https://bugs.webkit.org/show_bug.cgi?id=41208
1804
1805         It broke Windows build (Requested by Ossy_ on #webkit).
1806
1807         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1808         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1809         * wtf/OwnPtrCommon.h:
1810         * wtf/brew/OwnPtrBrew.h: Removed.
1811         * wtf/win/OwnPtrWin.h: Removed.
1812
1813 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1814
1815         Unreviewed, rolling out r61833.
1816         http://trac.webkit.org/changeset/61833
1817         https://bugs.webkit.org/show_bug.cgi?id=41205
1818
1819         It broke Leopard and GTK (Requested by Ossy_ on #webkit).
1820
1821         * runtime/RegExp.cpp:
1822         (JSC::RegExp::RegExp):
1823         (JSC::RegExp::create):
1824         * runtime/RegExp.h:
1825         * runtime/RegExpCache.cpp:
1826         (JSC::RegExpCache::lookupOrCreate):
1827         (JSC::RegExpCache::create):
1828         * runtime/RegExpCache.h:
1829
1830 2010-06-25  Kwang Yul Seo  <skyul@company100.net>
1831
1832         Reviewed by Adam Barth.
1833
1834         Change OwnPtrCommon to include platform-specific headers
1835         https://bugs.webkit.org/show_bug.cgi?id=40279
1836
1837         Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
1838         Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
1839
1840         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1841         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1842         * wtf/OwnPtrCommon.h:
1843         * wtf/brew/OwnPtrBrew.h: Added.
1844         * wtf/win/OwnPtrWin.h: Added.
1845
1846 2010-06-25  Patrick Gansterer  <paroga@paroga.com>
1847
1848         Reviewed by Darin Adler.
1849
1850         Add the possibility for a head and footer section to create_jit_stubs.
1851         https://bugs.webkit.org/show_bug.cgi?id=36050
1852
1853         * create_jit_stubs:
1854
1855 2010-06-24  Renata Hodovan  <reni@inf.u-szeged.hu>
1856
1857         Reviewed by Geoffrey Garen.
1858
1859         Merge RegExp constructor and RegExp::create methods into one.
1860         Both of function are called with tree parameters and check whether 
1861         flags (the third param) is given or not.
1862         Simplify hash lookups in RegExpCache::create with giving them an extra 
1863         iterator parameter.
1864         https://bugs.webkit.org/show_bug.cgi?id=41055
1865
1866         * runtime/RegExp.cpp:
1867         (JSC::RegExp::RegExp):
1868         * runtime/RegExp.h:
1869         * runtime/RegExpCache.cpp:
1870         (JSC::RegExpCache::lookupOrCreate):
1871         (JSC::RegExpCache::create):
1872         * runtime/RegExpCache.h:
1873
1874 2010-06-24  Oliver Hunt  <oliver@apple.com>
1875
1876         Reviewed by Maciej Stachowiak.
1877
1878         Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64
1879         https://bugs.webkit.org/show_bug.cgi?id=41193
1880
1881         I noticed a use of '+ 4' in some of the 32_64 code paths and realised there
1882         were a few places where endianness was being hardcoded.  This patch fixes
1883         the errors i could find through code inspection.
1884
1885         * jit/JITOpcodes32_64.cpp:
1886         (JSC::JIT::emit_op_resolve_global):
1887         * jit/JITPropertyAccess32_64.cpp:
1888         (JSC::JIT::emit_op_get_by_val):
1889         (JSC::JIT::emit_op_put_by_val):
1890         (JSC::JIT::compileGetDirectOffset):
1891         (JSC::JIT::privateCompilePutByIdTransition):
1892         (JSC::JIT::patchGetByIdSelf):
1893         (JSC::JIT::patchPutByIdReplace):
1894
1895 2010-06-24  Oliver Hunt  <oliver@apple.com>
1896
1897         Build fix
1898
1899         Temporarily get the tiger bot working again by disabling the
1900         new JS parser.  GCC on tiger is miscompiling the parser and
1901         I don't have access to a tiger machine right now.
1902
1903         * wtf/Platform.h:
1904
1905  2010-06-21  Nathan Lawrence  <nlawrence@apple.com>
1906
1907          Reviewed by Geoff Garen.
1908
1909          https://bugs.webkit.org/show_bug.cgi?id=40128
1910          Fixed broken debug functionality.
1911
1912          * interpreter/Interpreter.cpp:
1913          (JSC::Interpreter::dumpRegisters):
1914              Fixed to work with updated call frame.
1915          * runtime/JSImmediate.h:
1916          (JSC::JSValue::isCell):
1917              Added assert for aligned cell.
1918          * runtime/JSValue.cpp:
1919          (JSC::JSValue::description):
1920              Fixed to work with current JSValue implementation.
1921          * runtime/JSZombie.cpp:
1922          (JSC::JSZombie::leakedZombieStructure):
1923              JSombies compile again.
1924
1925 2010-06-24  Leandro Pereira  <leandro@profusion.mobi>
1926
1927         Unreviewed build fix.
1928
1929         * CMakeLists.txt: Add JSParser.cpp.
1930
1931 2010-06-24  Oliver Hunt  <oliver@apple.com>
1932
1933         Reviewed by Maciej Stachowiak.
1934
1935         Single character string replacement may replace too many characters
1936         https://bugs.webkit.org/show_bug.cgi?id=41138
1937         <rdar://problem/8097496>
1938
1939         Simple fix to stop the rope path of single character replacement
1940         once the first replacement occurs.
1941
1942         * runtime/JSString.cpp:
1943         (JSC::JSString::replaceCharacter):
1944
1945 2010-06-24  Gabor Loki  <loki@webkit.org>
1946
1947         Reviewed by Gavin Barraclough.
1948
1949         Fix the length of instruction stream controlled by constant pool
1950         https://bugs.webkit.org/show_bug.cgi?id=40293
1951
1952         The initial/maximum length of instruction stream (m_maxDistance) should
1953         be set when the first constant arrives to the constant pool. Otherwise
1954         the constant pool could be placed into an uninterrupted sequence.
1955
1956         * assembler/AssemblerBufferWithConstantPool.h:
1957         (JSC::):
1958
1959 2010-06-24  Oliver Hunt  <oliver@apple.com>
1960
1961         Reviewed by Gavin Barraclough.
1962
1963         We assume bytecodeOffset will always return a value > 1,
1964         so we adjust the failure case to return 1 instead of 0.
1965
1966         * bytecode/CodeBlock.h:
1967         (JSC::CodeBlock::bytecodeOffset):
1968
1969 2010-06-23  Oliver Hunt  <oliver@apple.com>
1970
1971         Reviewed by Gavin Barraclough.
1972
1973         Custom-written JavaScript parser
1974         https://bugs.webkit.org/show_bug.cgi?id=34019
1975
1976         Implement a recursive descent parser similar to that used by V8 and
1977         SpiderMonkey.  Greater than 2x improvement in SunSpider parsing tests.
1978
1979         The parser consists of a JSParser class that uses a TreeBuilder to actually
1980         build the AST.  There are currently two builders -- the ASTBuilder and
1981         SyntaxChecker which separate the job of building an AST for code generation
1982         and simply checking syntactic correctness.
1983
1984         There's still some less than ideal code remaining in the parser to allow
1985         us to retain the existing lexing code with minimal changes.  We'll tidy
1986         this up at a later date.
1987
1988         * GNUmakefile.am:
1989         * JavaScriptCore.gypi:
1990         * JavaScriptCore.pro:
1991         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1992         * JavaScriptCore.xcodeproj/project.pbxproj:
1993         * parser/ASTBuilder.h: Added.
1994         (JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
1995         (JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
1996         (JSC::ASTBuilder::ASTBuilder):
1997         (JSC::ASTBuilder::createSourceElements):
1998         (JSC::ASTBuilder::varDeclarations):
1999         (JSC::ASTBuilder::funcDeclarations):
2000         (JSC::ASTBuilder::features):
2001         (JSC::ASTBuilder::numConstants):
2002         (JSC::ASTBuilder::appendToComma):
2003         (JSC::ASTBuilder::createCommaExpr):
2004         (JSC::ASTBuilder::createLogicalNot):
2005         (JSC::ASTBuilder::createUnaryPlus):
2006         (JSC::ASTBuilder::createVoid):
2007         (JSC::ASTBuilder::thisExpr):
2008         (JSC::ASTBuilder::createResolve):
2009         (JSC::ASTBuilder::createObjectLiteral):
2010         (JSC::ASTBuilder::createArray):
2011         (JSC::ASTBuilder::createNumberExpr):
2012         (JSC::ASTBuilder::createString):
2013         (JSC::ASTBuilder::createBoolean):
2014         (JSC::ASTBuilder::createNull):
2015         (JSC::ASTBuilder::createBracketAccess):
2016         (JSC::ASTBuilder::createDotAccess):
2017         (JSC::ASTBuilder::createRegex):
2018         (JSC::ASTBuilder::createNewExpr):
2019         (JSC::ASTBuilder::createConditionalExpr):
2020         (JSC::ASTBuilder::createAssignResolve):
2021         (JSC::ASTBuilder::createFunctionExpr):
2022         (JSC::ASTBuilder::createFunctionBody):
2023         (JSC::ASTBuilder::createGetterOrSetterProperty):
2024         (JSC::ASTBuilder::createArguments):
2025         (JSC::ASTBuilder::createArgumentsList):
2026         (JSC::ASTBuilder::createProperty):
2027         (JSC::ASTBuilder::createPropertyList):
2028         (JSC::ASTBuilder::createElementList):
2029         (JSC::ASTBuilder::createFormalParameterList):
2030         (JSC::ASTBuilder::createClause):
2031         (JSC::ASTBuilder::createClauseList):
2032         (JSC::ASTBuilder::setUsesArguments):
2033         (JSC::ASTBuilder::createFuncDeclStatement):
2034         (JSC::ASTBuilder::createBlockStatement):
2035         (JSC::ASTBuilder::createExprStatement):
2036         (JSC::ASTBuilder::createIfStatement):
2037         (JSC::ASTBuilder::createForLoop):
2038         (JSC::ASTBuilder::createForInLoop):
2039         (JSC::ASTBuilder::createEmptyStatement):
2040         (JSC::ASTBuilder::createVarStatement):
2041         (JSC::ASTBuilder::createReturnStatement):
2042         (JSC::ASTBuilder::createBreakStatement):
2043         (JSC::ASTBuilder::createContinueStatement):
2044         (JSC::ASTBuilder::createTryStatement):
2045         (JSC::ASTBuilder::createSwitchStatement):
2046         (JSC::ASTBuilder::createWhileStatement):
2047         (JSC::ASTBuilder::createDoWhileStatement):
2048         (JSC::ASTBuilder::createLabelStatement):
2049         (JSC::ASTBuilder::createWithStatement):
2050         (JSC::ASTBuilder::createThrowStatement):
2051         (JSC::ASTBuilder::createDebugger):
2052         (JSC::ASTBuilder::createConstStatement):
2053         (JSC::ASTBuilder::appendConstDecl):
2054         (JSC::ASTBuilder::appendStatement):
2055         (JSC::ASTBuilder::addVar):
2056         (JSC::ASTBuilder::combineCommaNodes):
2057         (JSC::ASTBuilder::evalCount):
2058         (JSC::ASTBuilder::appendBinaryExpressionInfo):
2059         (JSC::ASTBuilder::operatorStackPop):
2060         (JSC::ASTBuilder::operatorStackHasHigherPrecedence):
2061         (JSC::ASTBuilder::getFromOperandStack):
2062         (JSC::ASTBuilder::shrinkOperandStackBy):
2063         (JSC::ASTBuilder::appendBinaryOperation):
2064         (JSC::ASTBuilder::operatorStackAppend):
2065         (JSC::ASTBuilder::popOperandStack):
2066         (JSC::ASTBuilder::appendUnaryToken):
2067         (JSC::ASTBuilder::unaryTokenStackLastType):
2068         (JSC::ASTBuilder::unaryTokenStackLastStart):
2069         (JSC::ASTBuilder::unaryTokenStackRemoveLast):
2070         (JSC::ASTBuilder::assignmentStackAppend):
2071         (JSC::ASTBuilder::createAssignment):
2072         (JSC::ASTBuilder::Scope::Scope):
2073         (JSC::ASTBuilder::setExceptionLocation):
2074         (JSC::ASTBuilder::incConstants):
2075         (JSC::ASTBuilder::usesThis):
2076         (JSC::ASTBuilder::usesCatch):
2077         (JSC::ASTBuilder::usesClosures):
2078         (JSC::ASTBuilder::usesArguments):
2079         (JSC::ASTBuilder::usesAssignment):
2080         (JSC::ASTBuilder::usesWith):
2081         (JSC::ASTBuilder::usesEval):
2082         (JSC::ASTBuilder::createNumber):
2083         (JSC::ASTBuilder::makeTypeOfNode):
2084         (JSC::ASTBuilder::makeDeleteNode):
2085         (JSC::ASTBuilder::makeNegateNode):
2086         (JSC::ASTBuilder::makeBitwiseNotNode):
2087         (JSC::ASTBuilder::makeMultNode):
2088         (JSC::ASTBuilder::makeDivNode):
2089         (JSC::ASTBuilder::makeAddNode):
2090         (JSC::ASTBuilder::makeSubNode):
2091         (JSC::ASTBuilder::makeLeftShiftNode):
2092         (JSC::ASTBuilder::makeRightShiftNode):
2093         (JSC::ASTBuilder::makeFunctionCallNode):
2094         (JSC::ASTBuilder::makeBinaryNode):
2095         (JSC::ASTBuilder::makeAssignNode):
2096         (JSC::ASTBuilder::makePrefixNode):
2097         (JSC::ASTBuilder::makePostfixNode):
2098         * parser/JSParser.cpp: Added.
2099         (JSC::JSParser::AllowInOverride::AllowInOverride):
2100         (JSC::JSParser::AllowInOverride::~AllowInOverride):
2101         (JSC::JSParser::token):
2102         (JSC::JSParser::next):
2103         (JSC::JSParser::consume):
2104         (JSC::JSParser::match):
2105         (JSC::JSParser::tokenStart):
2106         (JSC::JSParser::tokenLine):
2107         (JSC::JSParser::tokenEnd):
2108         (JSC::JSParser::):
2109         (JSC::JSParser::autoSemiColon):
2110         (JSC::JSParser::canRecurse):
2111         (JSC::JSParser::lastTokenEnd):
2112         (JSC::jsParse):
2113         (JSC::JSParser::JSParser):
2114         (JSC::JSParser::parseProgram):
2115         (JSC::JSParser::allowAutomaticSemicolon):
2116         (JSC::JSParser::parseSourceElements):
2117         (JSC::JSParser::parseVarDeclaration):
2118         (JSC::JSParser::parseConstDeclaration):
2119         (JSC::JSParser::parseDoWhileStatement):
2120         (JSC::JSParser::parseWhileStatement):
2121         (JSC::JSParser::parseVarDeclarationList):
2122         (JSC::JSParser::parseConstDeclarationList):
2123         (JSC::JSParser::parseForStatement):
2124         (JSC::JSParser::parseBreakStatement):
2125         (JSC::JSParser::parseContinueStatement):
2126         (JSC::JSParser::parseReturnStatement):
2127         (JSC::JSParser::parseThrowStatement):
2128         (JSC::JSParser::parseWithStatement):
2129         (JSC::JSParser::parseSwitchStatement):
2130         (JSC::JSParser::parseSwitchClauses):
2131         (JSC::JSParser::parseSwitchDefaultClause):
2132         (JSC::JSParser::parseTryStatement):
2133         (JSC::JSParser::parseDebuggerStatement):
2134         (JSC::JSParser::parseBlockStatement):
2135         (JSC::JSParser::parseStatement):
2136         (JSC::JSParser::parseFormalParameters):
2137         (JSC::JSParser::parseFunctionBody):
2138         (JSC::JSParser::parseFunctionInfo):
2139         (JSC::JSParser::parseFunctionDeclaration):
2140         (JSC::JSParser::parseExpressionOrLabelStatement):
2141         (JSC::JSParser::parseExpressionStatement):
2142         (JSC::JSParser::parseIfStatement):
2143         (JSC::JSParser::parseExpression):
2144         (JSC::JSParser::parseAssignmentExpression):
2145         (JSC::JSParser::parseConditionalExpression):
2146         (JSC::isUnaryOp):
2147         (JSC::JSParser::isBinaryOperator):
2148         (JSC::JSParser::parseBinaryExpression):
2149         (JSC::JSParser::parseProperty):
2150         (JSC::JSParser::parseObjectLiteral):
2151         (JSC::JSParser::parseArrayLiteral):
2152         (JSC::JSParser::parsePrimaryExpression):
2153         (JSC::JSParser::parseArguments):
2154         (JSC::JSParser::parseMemberExpression):
2155         (JSC::JSParser::parseUnaryExpression):
2156         * parser/JSParser.h: Added.
2157         (JSC::):
2158         (JSC::JSTokenInfo::JSTokenInfo):
2159         * parser/Lexer.cpp:
2160         (JSC::Lexer::lex):
2161         * parser/Lexer.h:
2162         (JSC::Lexer::setLastLineNumber):
2163         (JSC::Lexer::lastLineNumber):
2164         * parser/NodeConstructors.h:
2165         (JSC::Node::Node):
2166         * parser/Parser.cpp:
2167         (JSC::Parser::parse):
2168         * parser/SyntaxChecker.h: Added.
2169         (JSC::SyntaxChecker::SyntaxChecker):
2170         (JSC::SyntaxChecker::createSourceElements):
2171         (JSC::SyntaxChecker::makeFunctionCallNode):
2172         (JSC::SyntaxChecker::appendToComma):
2173         (JSC::SyntaxChecker::createCommaExpr):
2174         (JSC::SyntaxChecker::makeAssignNode):
2175         (JSC::SyntaxChecker::makePrefixNode):
2176         (JSC::SyntaxChecker::makePostfixNode):
2177         (JSC::SyntaxChecker::makeTypeOfNode):
2178         (JSC::SyntaxChecker::makeDeleteNode):
2179         (JSC::SyntaxChecker::makeNegateNode):
2180         (JSC::SyntaxChecker::makeBitwiseNotNode):
2181         (JSC::SyntaxChecker::createLogicalNot):
2182         (JSC::SyntaxChecker::createUnaryPlus):
2183         (JSC::SyntaxChecker::createVoid):
2184         (JSC::SyntaxChecker::thisExpr):
2185         (JSC::SyntaxChecker::createResolve):
2186         (JSC::SyntaxChecker::createObjectLiteral):
2187         (JSC::SyntaxChecker::createArray):
2188         (JSC::SyntaxChecker::createNumberExpr):
2189         (JSC::SyntaxChecker::createString):
2190         (JSC::SyntaxChecker::createBoolean):
2191         (JSC::SyntaxChecker::createNull):
2192         (JSC::SyntaxChecker::createBracketAccess):
2193         (JSC::SyntaxChecker::createDotAccess):
2194         (JSC::SyntaxChecker::createRegex):
2195         (JSC::SyntaxChecker::createNewExpr):
2196         (JSC::SyntaxChecker::createConditionalExpr):
2197         (JSC::SyntaxChecker::createAssignResolve):
2198         (JSC::SyntaxChecker::createFunctionExpr):
2199         (JSC::SyntaxChecker::createFunctionBody):
2200         (JSC::SyntaxChecker::createArguments):
2201         (JSC::SyntaxChecker::createArgumentsList):
2202         (JSC::SyntaxChecker::createProperty):
2203         (JSC::SyntaxChecker::createPropertyList):
2204         (JSC::SyntaxChecker::createElementList):
2205         (JSC::SyntaxChecker::createFormalParameterList):
2206         (JSC::SyntaxChecker::createClause):
2207         (JSC::SyntaxChecker::createClauseList):
2208         (JSC::SyntaxChecker::setUsesArguments):
2209         (JSC::SyntaxChecker::createFuncDeclStatement):
2210         (JSC::SyntaxChecker::createBlockStatement):
2211         (JSC::SyntaxChecker::createExprStatement):
2212         (JSC::SyntaxChecker::createIfStatement):
2213         (JSC::SyntaxChecker::createForLoop):
2214         (JSC::SyntaxChecker::createForInLoop):
2215         (JSC::SyntaxChecker::createEmptyStatement):
2216         (JSC::SyntaxChecker::createVarStatement):
2217         (JSC::SyntaxChecker::createReturnStatement):
2218         (JSC::SyntaxChecker::createBreakStatement):
2219         (JSC::SyntaxChecker::createContinueStatement):
2220         (JSC::SyntaxChecker::createTryStatement):
2221         (JSC::SyntaxChecker::createSwitchStatement):
2222         (JSC::SyntaxChecker::createWhileStatement):
2223         (JSC::SyntaxChecker::createWithStatement):
2224         (JSC::SyntaxChecker::createDoWhileStatement):
2225         (JSC::SyntaxChecker::createLabelStatement):
2226         (JSC::SyntaxChecker::createThrowStatement):
2227         (JSC::SyntaxChecker::createDebugger):
2228         (JSC::SyntaxChecker::createConstStatement):
2229         (JSC::SyntaxChecker::appendConstDecl):
2230         (JSC::SyntaxChecker::createGetterOrSetterProperty):
2231         (JSC::SyntaxChecker::appendStatement):
2232         (JSC::SyntaxChecker::addVar):
2233         (JSC::SyntaxChecker::combineCommaNodes):
2234         (JSC::SyntaxChecker::evalCount):
2235         (JSC::SyntaxChecker::appendBinaryExpressionInfo):
2236         (JSC::SyntaxChecker::operatorStackPop):
2237         * runtime/JSGlobalData.h:
2238         * wtf/Platform.h:
2239         * wtf/ThreadSpecific.h:
2240         (WTF::T):
2241
2242 2010-06-23  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2243
2244         Reviewed by Simon Hausmann.
2245
2246         Optimization of the QScriptValuePrivate.
2247
2248         Patch change only internals of the QScriptValuePrivate.
2249         Most of the QScriptValuePrivate's attributes were moved
2250         into an union.
2251
2252         [Qt] Optimization of the QScriptVAluePrivate.
2253         https://bugs.webkit.org/show_bug.cgi?id=40415
2254
2255         * qt/api/qscriptengine_p.cpp:
2256         (QScriptEnginePrivate::globalObject):
2257         * qt/api/qscriptvalue_p.h:
2258         (QScriptValuePrivate::):
2259         (QScriptValuePrivate::~QScriptValuePrivate):
2260         (QScriptValuePrivate::QScriptValuePrivate):
2261         (QScriptValuePrivate::toString):
2262         (QScriptValuePrivate::toNumber):
2263         (QScriptValuePrivate::toBool):
2264         (QScriptValuePrivate::toObject):
2265         (QScriptValuePrivate::equals):
2266         (QScriptValuePrivate::strictlyEquals):
2267         (QScriptValuePrivate::assignEngine):
2268         (QScriptValuePrivate::operator JSValueRef):
2269         (QScriptValuePrivate::operator JSObjectRef):
2270         (QScriptValuePrivate::refinedJSValue):
2271
2272 2010-06-23  Kwang Yul Seo  <skyul@company100.net>
2273
2274         Reviewed by Oliver Hunt.
2275
2276         [GTK] Implement ThreadSpecific with glib
2277         https://bugs.webkit.org/show_bug.cgi?id=39829
2278
2279         Implement ThreadSpecific with glib's GStaticPrivate.
2280         This patch makes it possible to build GTK port without pthread.
2281
2282         * wtf/ThreadSpecific.h:
2283         (WTF::::ThreadSpecific):
2284         (WTF::::~ThreadSpecific):
2285         (WTF::::get):
2286         (WTF::::set):
2287         (WTF::::destroy):
2288
2289 2010-06-23  Leandro Pereira  <leandro@profusion.mobi>
2290
2291         Unreviewed build fix.
2292
2293         * CMakeLists.txt: Add runtime/RegExpCache.cpp.
2294
2295 2010-06-22  Renata Hodovan  <hodovan@inf.u-szeged.hu>
2296
2297         Reviewed by Geoffrey Garen.
2298
2299         Adding regular expression caching to JavaScriptCore
2300         https://bugs.webkit.org/show_bug.cgi?id=38142
2301
2302         The cache is based on Round Robin eviction policy, and
2303         can cache at most 256 character long regular expressions,
2304         and at most 256 of them. These values can be changed at compile time.
2305
2306         * GNUmakefile.am:
2307         * JavaScriptCore.gypi:
2308         * JavaScriptCore.pro:
2309         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2310         * JavaScriptCore.xcodeproj/project.pbxproj:
2311         * bytecompiler/NodesCodegen.cpp:
2312         (JSC::RegExpNode::emitBytecode):
2313         * runtime/JSGlobalData.cpp:
2314         (JSC::JSGlobalData::JSGlobalData):
2315         (JSC::JSGlobalData::~JSGlobalData):
2316         * runtime/JSGlobalData.h:
2317         (JSC::JSGlobalData::regExpCache):
2318         * runtime/RegExpCache.cpp: Added.
2319         (JSC::RegExpCache::lookupOrCreate):
2320         (JSC::RegExpCache::create):
2321         (JSC::RegExpCache::RegExpCache):
2322         * runtime/RegExpCache.h: Added.
2323         * runtime/RegExpConstructor.cpp:
2324         (JSC::constructRegExp):
2325         * runtime/RegExpKey.h: Added.
2326         (JSC::RegExpKey::RegExpKey):
2327         (JSC::RegExpKey::getFlagsValue):
2328         (WTF::operator==):
2329         (WTF::):
2330         * runtime/RegExpPrototype.cpp:
2331         (JSC::regExpProtoFuncCompile):
2332         * runtime/StringPrototype.cpp:
2333         (JSC::stringProtoFuncMatch):
2334         (JSC::stringProtoFuncSearch):
2335
2336 2010-06-22  Gabor Loki  <loki@webkit.org>
2337
2338         Reviewed by Geoffrey Garen.
2339
2340         Add native call support for ARM and Thumb-2 JIT.
2341         https://bugs.webkit.org/show_bug.cgi?id=40231
2342
2343         * jit/JITOpcodes.cpp:
2344         (JSC::JIT::privateCompileCTINativeCall):
2345         * jit/JITOpcodes32_64.cpp:
2346         (JSC::JIT::privateCompileCTINativeCall):
2347         * wtf/Platform.h:
2348
2349 2010-06-21  Oliver Hunt  <oliver@apple.com>
2350
2351         Reviewed by Geoffrey Garen.
2352
2353         Make JSC more resilient in the face of parse failures
2354         https://bugs.webkit.org/show_bug.cgi?id=40951
2355
2356         A number of recent bugs have occurred due to issues like miscounting
2357         BOMs, etc which lead to interesting crashes later on.  Adding this
2358         logic hardens JSC in the face of these errors, and has no impact on
2359         performance (32bit jit actually gets 0.7% faster but I put that down
2360         to cache effects).
2361
2362         * bytecode/CodeBlock.cpp:
2363         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
2364         (JSC::CodeBlock::lineNumberForBytecodeOffset):
2365         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
2366         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
2367         * bytecode/CodeBlock.h:
2368         (JSC::CodeBlock::bytecodeOffset):
2369         * interpreter/Interpreter.cpp:
2370         (JSC::Interpreter::execute):
2371         (JSC::Interpreter::executeCall):
2372         (JSC::Interpreter::executeConstruct):
2373         (JSC::Interpreter::prepareForRepeatCall):
2374         (JSC::Interpreter::privateExecute):
2375         * jit/JITOpcodes.cpp:
2376         (JSC::JIT::privateCompileCTIMachineTrampolines):
2377         * jit/JITOpcodes32_64.cpp:
2378         (JSC::JIT::privateCompileCTIMachineTrampolines):
2379         * jit/JITStubs.cpp:
2380         (JSC::DEFINE_STUB_FUNCTION):
2381         * runtime/ArrayPrototype.cpp:
2382         (JSC::isNumericCompareFunction):
2383         * runtime/Executable.cpp:
2384         (JSC::FunctionExecutable::compileForCall):
2385         (JSC::FunctionExecutable::compileForConstruct):
2386         (JSC::FunctionExecutable::generateJITCodeForCall):
2387         (JSC::FunctionExecutable::generateJITCodeForConstruct):
2388         (JSC::FunctionExecutable::reparseExceptionInfo):
2389         (JSC::EvalExecutable::reparseExceptionInfo):
2390         * runtime/Executable.h:
2391         (JSC::FunctionExecutable::bytecodeForCall):
2392         (JSC::FunctionExecutable::bytecodeForConstruct):
2393         * runtime/JSGlobalData.cpp:
2394         (JSC::JSGlobalData::numericCompareFunction):
2395
2396 2010-06-21  John Sullivan  <sullivan@apple.com>
2397
2398         Reviewed by Adam Roben.
2399
2400         RetainPtr can't be used in HashMaps or HashSets
2401         <https://bugs.webkit.org/show_bug.cgi?id=40938>
2402         
2403         Added hashing knowledge similar to that in COMPtr.h.
2404
2405         * wtf/RetainPtr.h:
2406         (WTF::RetainPtr::RetainPtr):
2407         New function, copied from COMPtr.h but for the type change.
2408         (WTF::RetainPtr::isHashTableDeletedValue):
2409         Ditto.
2410         (WTF::RetainPtr::hashTableDeletedValue):
2411         Ditto.
2412         Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change.
2413         The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h)
2414         rather than the COMPtr implementation.
2415
2416 2010-06-19  Oliver Hunt  <oliver@apple.com>
2417
2418         Reviewed by Geoffrey Garen.
2419
2420         Need to ensure that we grow the RegisterFile when creating a callframe for host code
2421         https://bugs.webkit.org/show_bug.cgi?id=40858
2422         <rdar://problem/8108986>
2423
2424         In the past the use of the callframe in hostcode was much more
2425         limited.  Now that we expect the callframe to always be valid
2426         we need to grow the RegisterFile so that this is actually the
2427         case.  In this particular case the problem was failing to grow
2428         the registerfile could lead to a callframe that extended beyond
2429         RegisterFiler::end(), so vm re-entry would clobber the callframe
2430         other scenarios could also lead to badness.
2431
2432         I was unable to construct a simple testcase to trigger badness,
2433         and any such testcase would be so dependent on exact vm stack
2434         layout that it would be unlikely to work as a testcase following
2435         any callframe or register allocation changes anyway.
2436
2437         Thankfully the new assertion I added should help to catch these
2438         failures in future, and triggers on a couple of tests currently.
2439
2440         * interpreter/CallFrame.cpp:
2441         (JSC::CallFrame::registerFile):
2442         * interpreter/CallFrame.h:
2443         (JSC::ExecState::init):
2444         * interpreter/Interpreter.cpp:
2445         (JSC::Interpreter::privateExecute):
2446         * jit/JITStubs.cpp:
2447         (JSC::DEFINE_STUB_FUNCTION):
2448
2449 2010-06-21  Satish Sampath  <satish@chromium.org>
2450
2451         Reviewed by Steve Block.
2452
2453         Speech Input Patch 0: Added compilation argument to conditionally compile pending patches.
2454         https://bugs.webkit.org/show_bug.cgi?id=40878
2455
2456         * Configurations/FeatureDefines.xcconfig:
2457
2458 2010-06-21  Kwang Yul Seo  <skyul@company100.net>
2459
2460         Reviewed by Kent Tamura.
2461
2462         [BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1
2463         https://bugs.webkit.org/show_bug.cgi?id=40653
2464
2465         Currently, other ports do not use global new/delete operator overloading
2466         when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable
2467         "global fastMalloc new" because the default new/delete causes crash on device.
2468         We need to replace them with Brew MP's MALLOC/FREE.
2469
2470         * wtf/FastMalloc.h:
2471
2472 2010-06-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2473
2474         Reviewed by Simon Hausmann.
2475
2476         [Qt] Work around a build problem with libjscore on Symbian.
2477         https://bugs.webkit.org/show_bug.cgi?id=40840
2478
2479         Sbsv2 sometimes have problems with debug/release configuration
2480         determination causing QtWebKit in release to try linking with the debug
2481         JavaScriptCore static library. This patch limit the jscore/jscored
2482         r58306 fix necessary for mac builds only to the mac platform to prevent the
2483         different name problem.
2484
2485         The real fix would be to fix qmake or the toolchain, this patch might
2486         help meanwhile.
2487
2488         * JavaScriptCore.pri:
2489
2490 2010-06-21  Patrick Gansterer  <paroga@paroga.com>
2491
2492         Reviewed by Kent Tamura.
2493
2494         Buildfix after r61338.
2495         https://bugs.webkit.org/show_bug.cgi?id=40888
2496
2497         roundUpAllocationSize is needed in RegisterFile.h.
2498
2499         * jit/ExecutableAllocator.h:
2500
2501 2010-06-19  Kwang Yul Seo  <skyul@company100.net>
2502
2503         Reviewed by Darin Adler.
2504
2505         Include <string.h> in StringExtras.h
2506         https://bugs.webkit.org/show_bug.cgi?id=40808
2507
2508         Without string.h, RVCT 2.2 can't compile StringExtras.h.
2509         It can't find strlen and strncmp.
2510
2511         * wtf/StringExtras.h:
2512
2513 2010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
2514
2515         Reviewed by Kenneth Rohde Christiansen.
2516
2517         Don't use __attribute__((may_alias)) with the Intel compiler,
2518         as it doesn't understand it.
2519
2520         * wtf/Vector.h:
2521
2522 2010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
2523
2524         Reviewed by Kenneth Rohde Christiansen.
2525
2526         Fix compilation with the Intel C++ compiler (11.1.072).
2527
2528         Like RVCT, label pointers must be void*, not const void*.
2529
2530         * bytecode/Opcode.h:
2531
2532 2010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
2533
2534         Reviewed by Kenneth Rohde Christiansen.
2535
2536         Add the WTF_COMPILER_INTEL for when the Intel compiler is used
2537         for building. Usually, the Intel compiler masquerades as
2538         another compiler in the system and gets away with it, but some
2539         times specific fixes are required (such as when using language
2540         extensions).
2541
2542         * wtf/Platform.h:
2543
2544 2010-06-18  Oliver Hunt  <oliver@apple.com>
2545
2546         Reviewed by Geoffrey Garen.
2547
2548         Incorrect handling of multiple BOMs scattered through a file.
2549         https://bugs.webkit.org/show_bug.cgi?id=40865
2550
2551         When determining the offset of open and close braces in a source
2552         with BOMs we were finishing our count early as we failed to account
2553         for BOMs prior to the open/close brace positions effecting those
2554         positions.
2555
2556         * parser/Lexer.cpp:
2557         (JSC::Lexer::sourceCode):
2558
2559 2010-06-17  Oliver Hunt  <oliver@apple.com>
2560
2561         Reviewed by Sam Weinig.
2562
2563         Don't throw away exception information for functions that use exceptions
2564         https://bugs.webkit.org/show_bug.cgi?id=40786
2565
2566         Simple patch to stop JSC from throwing away the exception information
2567         of a function that uses "exceptiony" features like try and throw.  This
2568         is a speed up for catching expressions but it's difficult to quantify as
2569         the old cost of reparsing is amortised over all exceptions caught in the
2570         effected function.
2571
2572         * bytecode/CodeBlock.cpp:
2573         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
2574         * bytecompiler/BytecodeGenerator.cpp:
2575         (JSC::BytecodeGenerator::generate):
2576         (JSC::BytecodeGenerator::emitCatch):
2577         * bytecompiler/BytecodeGenerator.h:
2578         (JSC::BytecodeGenerator::emitThrow):
2579
2580 2010-06-18  Anders Carlsson  <andersca@apple.com>
2581
2582         Reviewed by Sam Weinig.
2583
2584         Add PlatformStrategies and PluginStrategy classes.
2585         https://bugs.webkit.org/show_bug.cgi?id=40850
2586
2587         * wtf/Platform.h:
2588
2589 2010-06-18  Leandro Pereira  <leandro@profusion.mobi>
2590
2591         [EFL] Unreviewed build fix.
2592
2593         * wtf/CMakeLists.txt: Add MD5.cpp.
2594
2595 2010-06-17  Shu Chang  <chang.shu@nokia.com>
2596
2597         Reviewed by Kenneth Rohde Christiansen.
2598
2599         [Qt] Fix the link error on symbian with ENABLE_JIT=0.
2600         1. Add "#if ENABLE(JIT)" in the header file;
2601         2. Put feature enable/disable logic to a common.pri so
2602         that both JavaScriptCore.pri and WebCore.pri can share.
2603
2604         https://bugs.webkit.org/show_bug.cgi?id=40780
2605
2606         * JavaScriptCore.pri:
2607         * jit/ExecutableAllocator.h:
2608
2609 2010-06-17  Darin Adler  <darin@apple.com>
2610
2611         Reviewed by Sam Weinig.
2612
2613         Use adoptRef and create functions in more code paths
2614         https://bugs.webkit.org/show_bug.cgi?id=40760
2615
2616         * API/JSClassRef.h: Removed unneeded include of RefCounted.h.
2617         * API/JSWeakObjectMapRefPrivate.cpp: Ditto.
2618
2619         * bytecode/CodeBlock.h:
2620         (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the
2621         SharedSymbolTable::create function instead of calling new directly.
2622
2623         * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable
2624         class and made the constructor private.
2625
2626 2010-06-17  Mark Brand  <mabrand@mabrand.nl>
2627
2628         Reviewed by Simon Hausmann.
2629
2630         [Qt] use "win32-g++*" scope to match all MinGW makespecs
2631
2632         The scope "win32-g++" comes from the name of the makespec. However, it
2633         is frequently used to check for MinGW. This works fine as long as
2634         win32-g++ is the only makespec for MinGW. Now we need the wildcard
2635         to cover "win32-g++-cross" as well.
2636
2637         * JavaScriptCore.pro:
2638
2639 2010-06-16  Darin Adler  <darin@apple.com>
2640
2641         Reviewed by David Levin.
2642
2643         Deploy adoptRef in more places, including all HTML and MathML elements
2644         https://bugs.webkit.org/show_bug.cgi?id=39941
2645
2646         * wtf/ThreadSafeShared.h: Made the constructor protected and removed the
2647         unneeded support for initial reference counts other than 1.
2648
2649 2010-06-16  Peter Varga  <pvarga@inf.u-szeged.hu>
2650
2651         Reviewed by Geoffrey Garen.
2652
2653         Store matchBegin directly in the array of output instead of the stack.
2654         https://bugs.webkit.org/show_bug.cgi?id=38988
2655
2656         * yarr/RegexJIT.cpp:
2657         (JSC::Yarr::RegexGenerator::generateDisjunction):
2658         (JSC::Yarr::RegexGenerator::generate):
2659
2660 2010-06-15  Anders Carlsson  <andersca@apple.com>
2661
2662         Reviewed by Sam Weinig.
2663
2664         Make JavaScriptCore build with clang++.
2665
2666         * jit/JITInlineMethods.h:
2667         (JSC::JIT::emitPutVirtualRegister):
2668         Explicitly cast to an int.
2669
2670         * yarr/RegexCompiler.cpp:
2671         (JSC::Yarr::compileRegex):
2672         Return 0 instead of false.
2673
2674 2010-06-15  Adam Roben  <aroben@apple.com>
2675
2676         Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds
2677
2678         Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>.
2679
2680         Reviewed by Sam Weinig.
2681
2682         * JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of
2683         JavaScriptCore's DerivedSources directory to
2684         AppleInternal/Sources/JavaScriptCore.
2685
2686 2010-06-15  Gabor Loki  <loki@webkit.org>
2687
2688         Rubber-stamped by Eric Seidel.
2689
2690         Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM
2691         https://bugs.webkit.org/show_bug.cgi?id=40423
2692
2693         Using OBJECT_OFFSETOF macro instead of objectof to bypass access to
2694         non-static data member warning.
2695
2696         * jit/JITPropertyAccess32_64.cpp:
2697         (JSC::JIT::privateCompilePutByIdTransition):
2698
2699 2010-06-11  Eric Seidel  <eric@webkit.org>
2700
2701         Reviewed by Adam Barth.
2702
2703         Rename the rest of the *Tokenizer classes to *DocumentParser
2704         https://bugs.webkit.org/show_bug.cgi?id=40507
2705
2706         * wtf/Platform.h:
2707          - fixed a comment to match new names.
2708
2709 2010-06-11  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2710
2711         Reviewed by Simon Hausmann.
2712
2713         [Qt] Explicit conversions from QtScript types to JSC opaque types were removed.
2714         https://bugs.webkit.org/show_bug.cgi?id=40412
2715
2716         Conversion between a JSC C types and a QtScript private types, takes
2717         main part of the source code. In most cases a mapping between the types
2718         is one to one. New cast operators were added to simplify the code.
2719
2720         The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef.
2721         The QScriptEnginePrivate could be casted to the JSGlobalContext.
2722         The QScriptProgramPrivate could be casted to the JSStringRef.
2723
2724         * qt/api/qscriptengine_p.cpp:
2725         (QScriptEnginePrivate::evaluate):
2726         (QScriptEnginePrivate::newObject):
2727         (QScriptEnginePrivate::globalObject):
2728         * qt/api/qscriptengine_p.h:
2729         (QScriptEnginePrivate::operator JSGlobalContextRef):
2730         * qt/api/qscriptprogram_p.h:
2731         (QScriptProgramPrivate::operator JSStringRef):
2732         * qt/api/qscriptsyntaxcheckresult.cpp:
2733         (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
2734         (QScriptSyntaxCheckResultPrivate::errorMessage):
2735         (QScriptSyntaxCheckResultPrivate::errorLineNumber):
2736         * qt/api/qscriptvalue_p.h:
2737         (QScriptValuePrivate::~QScriptValuePrivate):
2738         (QScriptValuePrivate::QScriptValuePrivate):
2739         (QScriptValuePrivate::isBool):
2740         (QScriptValuePrivate::isNumber):
2741         (QScriptValuePrivate::isNull):
2742         (QScriptValuePrivate::isString):
2743         (QScriptValuePrivate::isUndefined):
2744         (QScriptValuePrivate::isFunction):
2745         (QScriptValuePrivate::toString):
2746         (QScriptValuePrivate::toNumber):
2747         (QScriptValuePrivate::toBool):
2748         (QScriptValuePrivate::toObject):
2749         (QScriptValuePrivate::equals):
2750         (QScriptValuePrivate::strictlyEquals):
2751         (QScriptValuePrivate::instanceOf):
2752         (QScriptValuePrivate::call):
2753         (QScriptValuePrivate::operator JSValueRef):
2754         (QScriptValuePrivate::operator JSObjectRef):
2755         (QScriptValuePrivate::setValue):
2756         (QScriptValuePrivate::inherits):
2757         (QScriptValuePrivate::refinedJSValue):
2758
2759 2010-05-31  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2760
2761         Reviewed by Simon Hausmann.
2762
2763         [Qt] Implement the simple text code path.
2764         https://bugs.webkit.org/show_bug.cgi?id=40077
2765
2766         Remove the FONT_FAST_PATH macro and use the Qt's
2767         fast text implementation instead of the one of WebKit.
2768
2769         The Qt::TextBypassShaping flag is used to tell Qt to
2770         only use the glyph advances.
2771
2772         Qt 4.7 is needed to get this flag thus the complex path is always
2773         used if QtWebKit is compiled against an earlier version.
2774
2775         Contrary to the WebKit's implementation, the complex code path
2776         is taken if the text is RightToLeft, justified or is formatted
2777         with non-zero letter or word spacing.
2778
2779         * wtf/Platform.h:
2780
2781 2010-06-11  Luiz Agostini  <luiz.agostini@openbossa.org>
2782
2783         Reviewed by Kenneth Rohde Christiansen.
2784
2785         add codePointCompare to JavaScriptCore.exp
2786         https://bugs.webkit.org/show_bug.cgi?id=40426
2787
2788         * JavaScriptCore.exp:
2789
2790 2010-06-10  Oliver Hunt  <oliver@apple.com>
2791
2792         Reviewed by Maciej Stachowiak.
2793
2794         Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode
2795         https://bugs.webkit.org/show_bug.cgi?id=40367
2796
2797         If we're in the slow case of right shift we must write the type tag as
2798         the only reason we hit this code path is because we know we're working
2799         with a double.  eg. we are guaranteed that the tag cannot be reused.
2800
2801         * jit/JITArithmetic32_64.cpp:
2802         (JSC::JIT::emitRightShiftSlowCase):
2803
2804 2010-06-10  Kwang Yul Seo  <skyul@company100.net>
2805
2806         Reviewed by Eric Seidel.
2807
2808         Remove weakRandomNumber
2809         https://bugs.webkit.org/show_bug.cgi?id=40291
2810
2811         weakRandomNumber is used nowhere. Currently, WeakRandom is used instead.
2812
2813         * wtf/RandomNumber.cpp:
2814         * wtf/RandomNumber.h:
2815
2816 2010-06-09  Alexey Proskuryakov  <ap@apple.com>
2817
2818         Reviewed by Brady Eidson.
2819
2820         Export StringImpl::ascii(). It might be not very useful, but it's a public function.
2821
2822         * JavaScriptCore.exp:
2823
2824 2010-06-09  Leandro Pereira  <leandro@profusion.mobi>
2825
2826         Reviewed by Adam Treat.
2827
2828         [EFL] Allow building core libraries as shared objects to speed up
2829         linking time on machines with small amounts of memory.
2830         http://webkit.org/b/39899
2831
2832         * CMakeLists.txt: If building with shared core, install the lib.
2833         * jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically.
2834         * wtf/CMakeLists.txt: If building with shared core, install the lib.
2835
2836 2010-06-09  Gabor Loki  <loki@webkit.org>
2837
2838         Reviewed by David Levin.
2839
2840         Remove some unused variable warnings from JITOpcodes
2841         https://bugs.webkit.org/show_bug.cgi?id=40298
2842
2843         * jit/JITOpcodes.cpp:
2844         (JSC::JIT::privateCompileCTINativeCall):
2845         * jit/JITOpcodes32_64.cpp:
2846         (JSC::JIT::privateCompileCTINativeCall):
2847
2848 2010-05-18  Yuzo Fujishima  <yuzo@google.com>
2849
2850         Reviewed by Shinichiro Hamaji.
2851
2852         Fix for Bug 34529 -  [CSSOM] issues with cssText and selectorText
2853         Add U16_LENGTH that is needed to implement CSS character serialization.
2854         https://bugs.webkit.org/show_bug.cgi?id=34529
2855
2856         * wtf/unicode/qt4/UnicodeQt4.h:
2857         * wtf/unicode/wince/UnicodeWince.h:
2858
2859 2010-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2860
2861         Unreviewed, rolling out r60830.
2862         http://trac.webkit.org/changeset/60830
2863         https://bugs.webkit.org/show_bug.cgi?id=40305
2864
2865         Broke the Windows build (Requested by abarth on #webkit).
2866
2867         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2868         * wtf/OwnPtrCommon.h:
2869         * wtf/brew/OwnPtrBrew.h: Removed.
2870         * wtf/win/OwnPtrWin.h: Removed.
2871
2872 2010-06-08  MORITA Hajime  <morrita@google.com>
2873
2874         Unreviewed. An attempt to fix test break.
2875
2876         * Configurations/FeatureDefines.xcconfig:
2877
2878 2010-06-08  Kwang Yul Seo  <skyul@company100.net>
2879
2880         Reviewed by Adam Barth.
2881
2882         Change OwnPtrCommon to include platform-specific headers
2883         https://bugs.webkit.org/show_bug.cgi?id=40279
2884
2885         Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
2886         Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
2887
2888         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2889         * wtf/OwnPtrCommon.h:
2890         * wtf/brew/OwnPtrBrew.h: Added.
2891         * wtf/win/OwnPtrWin.h: Added.
2892
2893 2010-06-07  MORITA Hajime  <morrita@google.com>
2894         
2895         Reviewed by Kent Tamura.
2896
2897         https://bugs.webkit.org/show_bug.cgi?id=40219
2898         [Mac] ENABLE_METER_TAG should be enabled
2899         
2900         Added ENABLE_METER_TAG.
2901
2902         * Configurations/FeatureDefines.xcconfig:
2903
2904 2010-06-07  Kwang Yul Seo  <skyul@company100.net>
2905
2906         Reviewed by Eric Seidel.
2907
2908         [BREWMP] Add more types to OwnPtr
2909         https://bugs.webkit.org/show_bug.cgi?id=39667
2910
2911         Add ISSL and ISocket to the list of OwnPtr-ed type.
2912
2913         * wtf/OwnPtrCommon.h:
2914         * wtf/brew/OwnPtrBrew.cpp:
2915         (WTF::deleteOwnedPtr):
2916
2917 2010-06-07  Benjamin Poulain  <benjamin.poulain@nokia.com>
2918
2919         Reviewed by Simon Hausmann.
2920
2921         [Qt] Crash when compiling on Snow Leopard and running on Leopard
2922         https://bugs.webkit.org/show_bug.cgi?id=31403
2923
2924         Disable the use of pthread_setname_np and other symbols
2925         when targetting Leopard.
2926
2927         Use the defines TARGETING_XX instead of BUILDING_ON_XX 
2928         for features that cannot be used before Snow Leopard.
2929
2930         * wtf/Platform.h:
2931
2932 2010-06-07  Gabor Loki  <loki@webkit.org>
2933
2934         Reviewed by NOBODY (JSVALUE32_64 build fix).
2935
2936         * jit/JITOpcodes32_64.cpp:
2937         (JSC::JIT::privateCompileCTINativeCall):
2938
2939 2010-06-06  Gavin Barraclough  <barraclough@apple.com>
2940
2941         Reviewed by NOBODY (windows build fix pt 2).
2942
2943         * JavaScriptCore.exp:
2944         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2945
2946 2010-06-06  Gavin Barraclough  <barraclough@apple.com>
2947
2948         Reviewed by NOBODY (windows build fix pt 1).
2949
2950         * JavaScriptCore.exp:
2951         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2952
2953 2010-06-06  Gavin Barraclough  <barraclough@apple.com>
2954
2955         Reviewed by Sam Weinig.
2956
2957         Bug 40214 - Clean up error construction / throwing in JSC.
2958         
2959         The one egregious insanity here is that creating an error requires
2960         a VM-entry-esqe-host call (the string argument is wrapped as a JS
2961         object & pushed on the RegisterFile, then unwrapped back to a
2962         UString).  Changing this also means you only require a global
2963         object, not an ExecState, to create an error.
2964
2965         The methods to create error objects are also parameterized
2966         requiring a switch on the type, which can be made cleaner and
2967         faster by moving to a separate method per error type.  Code to add
2968         divot information to error had been duplicated, and is coalesced
2969         back into a single function.
2970
2971         Convenience methods added to create & throw type & syntax error
2972         with a default error message, since this is a common case.
2973
2974         Also, errors are currently thrown either using
2975         "throwError(exec, error)" or "exec->setException(error)" - unify
2976         on the former, since this is more commonly used.  Add
2977         "throwVMError(exec, error)" equivalents, as a convenience for
2978         cases where the result was being wrapped in "JSValue::encode(...)".
2979
2980         * API/JSCallbackConstructor.cpp:
2981         (JSC::constructJSCallback):
2982         * API/JSCallbackFunction.cpp:
2983         (JSC::JSCallbackFunction::call):
2984         * API/JSCallbackObjectFunctions.h:
2985         (JSC::::getOwnPropertySlot):
2986         (JSC::::put):
2987         (JSC::::deleteProperty):
2988         (JSC::::construct):
2989         (JSC::::hasInstance):
2990         (JSC::::call):
2991         (JSC::::toNumber):
2992         (JSC::::toString):
2993         (JSC::::staticValueGetter):
2994         (JSC::::staticFunctionGetter):
2995         (JSC::::callbackGetter):
2996         * API/JSObjectRef.cpp:
2997         (JSObjectMakeError):
2998         * JavaScriptCore.exp:
2999         * bytecompiler/BytecodeGenerator.cpp:
3000         (JSC::BytecodeGenerator::emitNewError):
3001         (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
3002         * bytecompiler/BytecodeGenerator.h:
3003         * bytecompiler/NodesCodegen.cpp:
3004         (JSC::ThrowableExpressionData::emitThrowError):
3005         (JSC::RegExpNode::emitBytecode):
3006         (JSC::PostfixErrorNode::emitBytecode):
3007         (JSC::PrefixErrorNode::emitBytecode):
3008         (JSC::AssignErrorNode::emitBytecode):
3009         (JSC::ForInNode::emitBytecode):
3010         (JSC::ContinueNode::emitBytecode):
3011         (JSC::BreakNode::emitBytecode):
3012         (JSC::ReturnNode::emitBytecode):
3013         (JSC::LabelNode::emitBytecode):
3014         * interpreter/CallFrame.h:
3015         * interpreter/Interpreter.cpp:
3016         (JSC::Interpreter::throwException):
3017         (JSC::Interpreter::privateExecute):
3018         * jit/JITStubs.cpp:
3019         (JSC::DEFINE_STUB_FUNCTION):
3020         * jsc.cpp:
3021         (functionRun):
3022         (functionLoad):
3023         (functionCheckSyntax):
3024         * parser/Nodes.h:
3025         * runtime/ArrayConstructor.cpp:
3026         (JSC::constructArrayWithSizeQuirk):
3027         * runtime/ArrayPrototype.cpp:
3028         (JSC::arrayProtoFuncToString):
3029         (JSC::arrayProtoFuncToLocaleString):
3030         (JSC::arrayProtoFuncJoin):
3031         (JSC::arrayProtoFuncFilter):
3032         (JSC::arrayProtoFuncMap):
3033         (JSC::arrayProtoFuncEvery):
3034         (JSC::arrayProtoFuncForEach):
3035         (JSC::arrayProtoFuncSome):
3036         (JSC::arrayProtoFuncReduce):
3037         (JSC::arrayProtoFuncReduceRight):
3038         * runtime/BooleanPrototype.cpp:
3039         (JSC::booleanProtoFuncToString):
3040         (JSC::booleanProtoFuncValueOf):
3041         * runtime/DatePrototype.cpp:
3042         (JSC::dateProtoFuncToString):
3043         (JSC::dateProtoFuncToUTCString):
3044         (JSC::dateProtoFuncToISOString):
3045         (JSC::dateProtoFuncToDateString):
3046         (JSC::dateProtoFuncToTimeString):
3047         (JSC::dateProtoFuncToLocaleString):
3048         (JSC::dateProtoFuncToLocaleDateString):
3049         (JSC::dateProtoFuncToLocaleTimeString):
3050         (JSC::dateProtoFuncGetTime):
3051         (JSC::dateProtoFuncGetFullYear):
3052         (JSC::dateProtoFuncGetUTCFullYear):
3053         (JSC::dateProtoFuncToGMTString):
3054         (JSC::dateProtoFuncGetMonth):
3055         (JSC::dateProtoFuncGetUTCMonth):
3056         (JSC::dateProtoFuncGetDate):
3057         (JSC::dateProtoFuncGetUTCDate):
3058         (JSC::dateProtoFuncGetDay):
3059         (JSC::dateProtoFuncGetUTCDay):
3060         (JSC::dateProtoFuncGetHours):
3061         (JSC::dateProtoFuncGetUTCHours):
3062         (JSC::dateProtoFuncGetMinutes):
3063         (JSC::dateProtoFuncGetUTCMinutes):
3064         (JSC::dateProtoFuncGetSeconds):
3065         (JSC::dateProtoFuncGetUTCSeconds):
3066         (JSC::dateProtoFuncGetMilliSeconds):
3067         (JSC::dateProtoFuncGetUTCMilliseconds):
3068         (JSC::dateProtoFuncGetTimezoneOffset):
3069         (JSC::dateProtoFuncSetTime):
3070         (JSC::setNewValueFromTimeArgs):
3071         (JSC::setNewValueFromDateArgs):
3072         (JSC::dateProtoFuncSetMilliSeconds):
3073         (JSC::dateProtoFuncSetUTCMilliseconds):
3074         (JSC::dateProtoFuncSetSeconds):
3075         (JSC::dateProtoFuncSetUTCSeconds):
3076         (JSC::dateProtoFuncSetMinutes):
3077         (JSC::dateProtoFuncSetUTCMinutes):
3078         (JSC::dateProtoFuncSetHours):
3079         (JSC::dateProtoFuncSetUTCHours):
3080         (JSC::dateProtoFuncSetDate):
3081         (JSC::dateProtoFuncSetUTCDate):
3082         (JSC::dateProtoFuncSetMonth):
3083         (JSC::dateProtoFuncSetUTCMonth):
3084         (JSC::dateProtoFuncSetFullYear):
3085         (JSC::dateProtoFuncSetUTCFullYear):
3086         (JSC::dateProtoFuncSetYear):
3087         (JSC::dateProtoFuncGetYear):
3088         (JSC::dateProtoFuncToJSON):
3089         * runtime/Error.cpp:
3090         (JSC::createError):
3091         (JSC::createEvalError):
3092         (JSC::createRangeError):
3093         (JSC::createReferenceError):
3094         (JSC::createSyntaxError):
3095         (JSC::createTypeError):
3096         (JSC::createURIError):
3097         (JSC::addErrorSourceInfo):
3098         (JSC::addErrorDivotInfo):
3099         (JSC::addErrorInfo):
3100         (JSC::hasErrorInfo):
3101         (JSC::throwError):
3102         (JSC::throwTypeError):
3103         (JSC::throwSyntaxError):
3104         * runtime/Error.h:
3105         (JSC::throwVMError):
3106         (JSC::throwVMTypeError):
3107         * runtime/ErrorConstructor.cpp:
3108         (JSC::constructWithErrorConstructor):
3109         (JSC::callErrorConstructor):
3110         * runtime/ErrorConstructor.h:
3111         * runtime/ErrorInstance.cpp:
3112         (JSC::ErrorInstance::ErrorInstance):
3113         (JSC::ErrorInstance::create):
3114         * runtime/ErrorInstance.h:
3115         * runtime/ErrorPrototype.cpp:
3116         (JSC::ErrorPrototype::ErrorPrototype):
3117         * runtime/ExceptionHelpers.cpp:
3118         (JSC::createStackOverflowError):
3119         (JSC::createUndefinedVariableError):
3120         (JSC::createInvalidParamError):
3121         (JSC::createNotAConstructorError):
3122         (JSC::createNotAFunctionError):
3123         (JSC::createNotAnObjectError):
3124         (JSC::throwOutOfMemoryError):
3125         * runtime/ExceptionHelpers.h:
3126         * runtime/Executable.cpp:
3127         (JSC::EvalExecutable::compile):
3128         (JSC::ProgramExecutable::checkSyntax):
3129         (JSC::ProgramExecutable::compile):
3130         * runtime/FunctionConstructor.cpp:
3131         (JSC::constructFunction):
3132         * runtime/FunctionPrototype.cpp:
3133         (JSC::functionProtoFuncToString):
3134         (JSC::functionProtoFuncApply):
3135         (JSC::functionProtoFuncCall):
3136         * runtime/Identifier.cpp:
3137         (JSC::Identifier::from):
3138         * runtime/Identifier.h:
3139         * runtime/JSArray.cpp:
3140         (JSC::JSArray::put):
3141         * runtime/JSFunction.cpp:
3142         (JSC::callHostFunctionAsConstructor):
3143         * runtime/JSGlobalObjectFunctions.cpp:
3144         (JSC::encode):
3145         (JSC::decode):
3146         (JSC::globalFuncEval):
3147         * runtime/JSONObject.cpp:
3148         (JSC::Stringifier::appendStringifiedValue):
3149         (JSC::Walker::walk):
3150         (JSC::JSONProtoFuncParse):
3151         (JSC::JSONProtoFuncStringify):
3152         * runtime/JSObject.cpp:
3153         (JSC::throwSetterError):
3154         (JSC::JSObject::put):
3155         (JSC::JSObject::putWithAttributes):
3156         (JSC::JSObject::defaultValue):
3157         (JSC::JSObject::hasInstance):
3158         (JSC::JSObject::defineOwnProperty):
3159         * runtime/JSObject.h:
3160         * runtime/JSValue.cpp:
3161         (JSC::JSValue::toObjectSlowCase):
3162         (JSC::JSValue::synthesizeObject):
3163         (JSC::JSValue::synthesizePrototype):
3164         * runtime/NativeErrorConstructor.cpp:
3165         (JSC::constructWithNativeErrorConstructor):
3166         (JSC::callNativeErrorConstructor):
3167         * runtime/NativeErrorConstructor.h:
3168         * runtime/NumberPrototype.cpp:
3169         (JSC::numberProtoFuncToString):
3170         (JSC::numberProtoFuncToLocaleString):
3171         (JSC::numberProtoFuncValueOf):
3172         (JSC::numberProtoFuncToFixed):
3173         (JSC::numberProtoFuncToExponential):
3174         (JSC::numberProtoFuncToPrecision):
3175         * runtime/ObjectConstructor.cpp:
3176         (JSC::objectConstructorGetPrototypeOf):
3177         (JSC::objectConstructorGetOwnPropertyDescriptor):
3178         (JSC::objectConstructorGetOwnPropertyNames):
3179         (JSC::objectConstructorKeys):
3180         (JSC::toPropertyDescriptor):
3181         (JSC::objectConstructorDefineProperty):
3182         (JSC::objectConstructorDefineProperties):
3183         (JSC::objectConstructorCreate):
3184         * runtime/ObjectPrototype.cpp:
3185         (JSC::objectProtoFuncDefineGetter):
3186         (JSC::objectProtoFuncDefineSetter):
3187         * runtime/RegExpConstructor.cpp:
3188         (JSC::constructRegExp):
3189         * runtime/RegExpObject.cpp:
3190         (JSC::RegExpObject::match):
3191         * runtime/RegExpPrototype.cpp:
3192         (JSC::regExpProtoFuncTest):
3193         (JSC::regExpProtoFuncExec):
3194         (JSC::regExpProtoFuncCompile):
3195         (JSC::regExpProtoFuncToString):
3196         * runtime/StringPrototype.cpp:
3197         (JSC::stringProtoFuncToString):
3198
3199 2010-06-05  Kwang Yul Seo  <skyul@company100.net>
3200
3201         Reviewed by Eric Seidel.
3202
3203         [BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx
3204         https://bugs.webkit.org/show_bug.cgi?id=39710
3205
3206         Build fix for BREW MP.
3207
3208         * wtf/MathExtras.h:
3209
3210 2010-06-04  Adam Barth  <abarth@webkit.org>
3211
3212         Reviewed by Darin Adler.
3213
3214         HTML5 parser should be within 1% of old parser performance
3215         https://bugs.webkit.org/show_bug.cgi?id=40172
3216
3217         Fix cast in this operator= to allow for assignment between vectors with
3218         different inline capacities (as clearly intended by its author).
3219
3220         * wtf/Vector.h:
3221         (WTF::::operator):
3222
3223 2010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3224
3225         Reviewed by Kenneth Rohde Christiansen.
3226
3227         New QtScript API; QScriptValue::instanceOf.
3228
3229         New function create an easy way to check value's prototype hierarchy.
3230
3231         [Qt] QScriptValue should have an instanceOf method
3232         https://bugs.webkit.org/show_bug.cgi?id=40120
3233
3234         * qt/api/qscriptvalue.cpp:
3235         (QScriptValue::instanceOf):
3236         * qt/api/qscriptvalue.h:
3237         * qt/api/qscriptvalue_p.h:
3238         (QScriptValuePrivate::instanceOf):
3239         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
3240         * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
3241         (tst_QScriptValue::instanceOf_initData):
3242         (tst_QScriptValue::instanceOf_makeData):
3243         (tst_QScriptValue::instanceOf_test):
3244
3245 2010-06-04  Gavin Barraclough  <barraclough@apple.com>
3246
3247         Reviewed by NOBODY (interpreter build fix).
3248
3249         * interpreter/Interpreter.cpp:
3250         (JSC::Interpreter::privateExecute):
3251
3252 2010-06-04  Mark Rowe  <mrowe@apple.com>
3253
3254         Silence some warnings seen on the build bot.
3255
3256         * JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline.
3257         * JavaScriptCore.JSVALUE32only.exp: Ditto.
3258         * JavaScriptCore.JSVALUE64only.exp: Ditto.
3259         * JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't
3260         complain about not knowing how to compile them.
3261
3262 2010-06-04  Gavin Barraclough  <barraclough@apple.com>
3263
3264         Reviewed by Oliver Hunt.
3265
3266         Bug 40187 - Change function signature of NativeConstructor to match NativeFunction
3267
3268         Mostly for consistency, but constructor & args arguments are redundant,
3269         and this will help if we wish to be able to JIT calls to more constructors.
3270
3271         * API/JSCallbackConstructor.cpp:
3272         (JSC::constructJSCallback):
3273         * API/JSCallbackObject.h:
3274         * API/JSCallbackObjectFunctions.h:
3275         (JSC::::construct):
3276         * interpreter/Interpreter.cpp:
3277         (JSC::Interpreter::executeConstruct):
3278         * interpreter/Interpreter.h:
3279         * jit/JITStubs.cpp:
3280         (JSC::DEFINE_STUB_FUNCTION):
3281         * runtime/ArrayConstructor.cpp:
3282         (JSC::constructWithArrayConstructor):
3283         * runtime/BooleanConstructor.cpp:
3284         (JSC::constructWithBooleanConstructor):
3285         * runtime/ConstructData.cpp:
3286         (JSC::construct):
3287         * runtime/ConstructData.h:
3288         * runtime/DateConstructor.cpp:
3289         (JSC::constructWithDateConstructor):
3290         * runtime/Error.cpp:
3291         (JSC::constructNativeError):
3292         (JSC::Error::create):
3293         * runtime/ErrorConstructor.cpp:
3294         (JSC::constructWithErrorConstructor):
3295         * runtime/FunctionConstructor.cpp:
3296         (JSC::constructWithFunctionConstructor):
3297         * runtime/NativeErrorConstructor.cpp:
3298         (JSC::constructWithNativeErrorConstructor):
3299         * runtime/NativeErrorConstructor.h:
3300         (JSC::NativeErrorConstructor::errorStructure):
3301         * runtime/NumberConstructor.cpp:
3302         (JSC::constructWithNumberConstructor):
3303         * runtime/ObjectConstructor.cpp:
3304         (JSC::constructWithObjectConstructor):
3305         * runtime/RegExpConstructor.cpp:
3306         (JSC::constructWithRegExpConstructor):
3307         * runtime/StringConstructor.cpp:
3308         (JSC::constructWithStringConstructor):
3309
3310 2010-06-04  Tony Gentilcore  <tonyg@chromium.org>
3311
3312         Reviewed by Adam Barth.
3313
3314         Add a takeFirst() method to Deque and use it where appropriate.
3315         https://bugs.webkit.org/show_bug.cgi?id=40089
3316
3317         * wtf/Deque.h:
3318         (WTF::::takeFirst):
3319         * wtf/MainThread.cpp:
3320         (WTF::dispatchFunctionsFromMainThread):
3321         * wtf/MessageQueue.h:
3322         (WTF::::tryGetMessage):
3323
3324 2010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3325
3326         Reviewed by Kenneth Rohde Christiansen.
3327
3328         Remove a QEXPECT_FAIL flag from an autotest.
3329
3330         Test tst_QScriptEngine::globalObject pass after 36600 bug
3331         fix have been applied.
3332
3333         [Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed.
3334         https://bugs.webkit.org/show_bug.cgi?id=40114
3335
3336         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
3337         (tst_QScriptEngine::globalObject):
3338
3339 2010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3340
3341         Reviewed by Kenneth Rohde Christiansen.
3342
3343         Fix QScriptValue::equals.
3344
3345         Handling for a few edge cases were added. Now comparison between
3346         NaN, an invalid objects should works as supposed.
3347
3348         [Qt] QScriptValue::equals problems
3349         https://bugs.webkit.org/show_bug.cgi?id=40110
3350
3351         * qt/api/qscriptvalue.cpp:
3352         (QScriptValue::equals):
3353         * qt/api/qscriptvalue_p.h:
3354         (QScriptValuePrivate::equals):
3355         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
3356         * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
3357         (tst_QScriptValue::equals_initData):
3358         (tst_QScriptValue::equals_makeData):
3359         (tst_QScriptValue::equals_test):
3360
3361 2010-06-03  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3362
3363         Reviewed by Kenneth Rohde Christiansen.
3364
3365         New states in QScriptValuePrivate.
3366
3367         The CSpecial state was divided into CNull and CUndefined. It simplify
3368         the QScriptValue code by avoiding a few "cast" and "if".
3369         Moreover the MSVS compiler didn't like casting between a double and an
3370         enum which is avoided now.
3371
3372         [Qt] The QScriptValuePrivate::CSpecial is too generic.
3373         https://bugs.webkit.org/show_bug.cgi?id=40067
3374
3375         * qt/api/qscriptvalue_p.h:
3376         (QScriptValuePrivate::):
3377         (QScriptValuePrivate::QScriptValuePrivate):
3378         (QScriptValuePrivate::isNull):
3379         (QScriptValuePrivate::isUndefined):
3380         (QScriptValuePrivate::toString):
3381         (QScriptValuePrivate::toNumber):
3382         (QScriptValuePrivate::toBool):
3383         (QScriptValuePrivate::toObject):
3384         (QScriptValuePrivate::assignEngine):
3385         (QScriptValuePrivate::isNumberBased):
3386
3387 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
3388
3389         Reviewed by NOBODY (Qt build fix).
3390
3391         * wtf/Platform.h:
3392
3393 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
3394
3395         Reviewed by Mark Rowe.
3396
3397         Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms
3398         This was fixed in bug #40094.
3399
3400         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3401         * wtf/Platform.h:
3402
3403 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
3404
3405         Reviewed by NOBODY (Interpreter build fix).
3406
3407         * JavaScriptCore.JSVALUE32_64only.exp:
3408         * JavaScriptCore.JSVALUE32only.exp:
3409         * JavaScriptCore.JSVALUE64only.exp:
3410         * interpreter/Interpreter.cpp:
3411         (JSC::Interpreter::privateExecute):
3412
3413 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
3414
3415         Reviewed by NOBODY (windows build fix II).
3416
3417         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3418
3419 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
3420
3421         Reviewed by NOBODY (windows build fix).
3422
3423         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3424
3425 2010-06-02  Gavin Barraclough  <barraclough@apple.com>
3426
3427         Reviewed by Oliver Hunt.
3428
3429         Bug 40094 - The return type of NativeFunction should be EncodedJSValue
3430         On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
3431
3432         * API/JSCallbackFunction.cpp:
3433         (JSC::JSCallbackFunction::call):
3434         * API/JSCallbackFunction.h:
3435         * API/JSCallbackObject.h:
3436         * API/JSCallbackObjectFunctions.h:
3437         (JSC::::call):
3438         * JavaScriptCore.exp:
3439         * interpreter/Interpreter.cpp:
3440         (JSC::Interpreter::executeCall):
3441         * jit/JITStubs.cpp:
3442         (JSC::DEFINE_STUB_FUNCTION):
3443         * jit/JITStubs.h:
3444         * jsc.cpp:
3445         (functionPrint):
3446         (functionDebug):
3447         (functionGC):
3448         (functionVersion):
3449         (functionRun):
3450         (functionLoad):
3451         (functionCheckSyntax):
3452         (functionSetSamplingFlags):
3453         (functionClearSamplingFlags):
3454         (functionReadline):
3455         (functionQuit):
3456         * runtime/ArrayConstructor.cpp:
3457         (JSC::callArrayConstructor):
3458         (JSC::arrayConstructorIsArray):
3459         * runtime/ArrayPrototype.cpp:
3460         (JSC::arrayProtoFuncToString):
3461         (JSC::arrayProtoFuncToLocaleString):
3462         (JSC::arrayProtoFuncJoin):
3463         (JSC::arrayProtoFuncConcat):
3464         (JSC::arrayProtoFuncPop):
3465         (JSC::arrayProtoFuncPush):
3466         (JSC::arrayProtoFuncReverse):
3467         (JSC::arrayProtoFuncShift):
3468         (JSC::arrayProtoFuncSlice):
3469         (JSC::arrayProtoFuncSort):
3470         (JSC::arrayProtoFuncSplice):
3471         (JSC::arrayProtoFuncUnShift):
3472         (JSC::arrayProtoFuncFilter):
3473         (JSC::arrayProtoFuncMap):
3474         (JSC::arrayProtoFuncEvery):
3475         (JSC::arrayProtoFuncForEach):
3476         (JSC::arrayProtoFuncSome):
3477         (JSC::arrayProtoFuncReduce):
3478         (JSC::arrayProtoFuncReduceRight):
3479         (JSC::arrayProtoFuncIndexOf):
3480         (JSC::arrayProtoFuncLastIndexOf):
3481         * runtime/BooleanConstructor.cpp:
3482         (JSC::callBooleanConstructor):
3483         * runtime/BooleanPrototype.cpp:
3484         (JSC::booleanProtoFuncToString):
3485         (JSC::booleanProtoFuncValueOf):
3486         * runtime/CallData.h:
3487         * runtime/DateConstructor.cpp:
3488         (JSC::callDate):
3489         (JSC::dateParse):
3490         (JSC::dateNow):
3491         (JSC::dateUTC):
3492         * runtime/DatePrototype.cpp:
3493         (JSC::dateProtoFuncToString):
3494         (JSC::dateProtoFuncToUTCString):
3495         (JSC::dateProtoFuncToISOString):
3496         (JSC::dateProtoFuncToDateString):
3497         (JSC::dateProtoFuncToTimeString):
3498         (JSC::dateProtoFuncToLocaleString):
3499         (JSC::dateProtoFuncToLocaleDateString):
3500         (JSC::dateProtoFuncToLocaleTimeString):
3501         (JSC::dateProtoFuncGetTime):
3502         (JSC::dateProtoFuncGetFullYear):
3503         (JSC::dateProtoFuncGetUTCFullYear):
3504         (JSC::dateProtoFuncToGMTString):
3505         (JSC::dateProtoFuncGetMonth):
3506         (JSC::dateProtoFuncGetUTCMonth):
3507         (JSC::dateProtoFuncGetDate):
3508         (JSC::dateProtoFuncGetUTCDate):
3509         (JSC::dateProtoFuncGetDay):
3510         (JSC::dateProtoFuncGetUTCDay):
3511         (JSC::dateProtoFuncGetHours):
3512         (JSC::dateProtoFuncGetUTCHours):
3513         (JSC::dateProtoFuncGetMinutes):
3514         (JSC::dateProtoFuncGetUTCMinutes):
3515         (JSC::dateProtoFuncGetSeconds):
3516         (JSC::dateProtoFuncGetUTCSeconds):
3517         (JSC::dateProtoFuncGetMilliSeconds):
3518         (JSC::dateProtoFuncGetUTCMilliseconds):
3519         (JSC::dateProtoFuncGetTimezoneOffset):
3520         (JSC::dateProtoFuncSetTime):
3521         (JSC::dateProtoFuncSetMilliSeconds):
3522         (JSC::dateProtoFuncSetUTCMilliseconds):
3523         (JSC::dateProtoFuncSetSeconds):
3524         (JSC::dateProtoFuncSetUTCSeconds):
3525         (JSC::dateProtoFuncSetMinutes):
3526         (JSC::dateProtoFuncSetUTCMinutes):
3527         (JSC::dateProtoFuncSetHours):
3528         (JSC::dateProtoFuncSetUTCHours):
3529         (JSC::dateProtoFuncSetDate):
3530         (JSC::dateProtoFuncSetUTCDate):
3531         (JSC::dateProtoFuncSetMonth):
3532         (JSC::dateProtoFuncSetUTCMonth):
3533         (JSC::dateProtoFuncSetFullYear):
3534         (JSC::dateProtoFuncSetUTCFullYear):
3535         (JSC::dateProtoFuncSetYear):
3536         (JSC::dateProtoFuncGetYear):
3537         (JSC::dateProtoFuncToJSON):
3538         * runtime/ErrorConstructor.cpp:
3539         (JSC::callErrorConstructor):
3540         * runtime/ErrorPrototype.cpp:
3541         (JSC::errorProtoFuncToString):
3542         * runtime/FunctionConstructor.cpp:
3543         (JSC::callFunctionConstructor):
3544         * runtime/FunctionPrototype.cpp:
3545         (JSC::callFunctionPrototype):
3546         (JSC::functionProtoFuncToString):
3547         (JSC::functionProtoFuncApply):
3548         (JSC::functionProtoFuncCall):
3549         * runtime/JSCell.h:
3550         (JSC::getCallData):
3551         (JSC::getConstructData):
3552         * runtime/JSFunction.cpp:
3553         (JSC::callHostFunctionAsConstructor):
3554         * runtime/JSFunction.h:
3555         * runtime/JSGlobalObjectFunctions.cpp:
3556         (JSC::globalFuncEval):
3557         (JSC::globalFuncParseInt):
3558         (JSC::globalFuncParseFloat):
3559         (JSC::globalFuncIsNaN):
3560         (JSC::globalFuncIsFinite):
3561         (JSC::globalFuncDecodeURI):
3562         (JSC::globalFuncDecodeURIComponent):
3563         (JSC::globalFuncEncodeURI):
3564         (JSC::globalFuncEncodeURIComponent):
3565         (JSC::globalFuncEscape):
3566         (JSC::globalFuncUnescape):
3567         (JSC::globalFuncJSCPrint):
3568         * runtime/JSGlobalObjectFunctions.h:
3569         * runtime/JSONObject.cpp:
3570         (JSC::JSONProtoFuncParse):
3571         (JSC::JSONProtoFuncStringify):
3572         * runtime/JSObject.cpp:
3573         (JSC::callDefaultValueFunction):
3574         * runtime/JSValue.h:
3575         * runtime/MathObject.cpp:
3576         (JSC::mathProtoFuncAbs):
3577         (JSC::mathProtoFuncACos):
3578         (JSC::mathProtoFuncASin):
3579         (JSC::mathProtoFuncATan):
3580         (JSC::mathProtoFuncATan2):
3581         (JSC::mathProtoFuncCeil):
3582         (JSC::mathProtoFuncCos):
3583         (JSC::mathProtoFuncExp):
3584         (JSC::mathProtoFuncFloor):
3585         (JSC::mathProtoFuncLog):
3586         (JSC::mathProtoFuncMax):
3587         (JSC::mathProtoFuncMin):
3588         (JSC::mathProtoFuncPow)