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