2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2010-06-25  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2
3         Reviewed by Simon Hausmann.
4
5         Introduce QtScript benchmarks.
6
7         The QtScript performance should be tested regularly. The patch introduces
8         micro benchmarks for existing API.
9
10         [Qt] Performance of the QtScript API is not tested.
11         https://bugs.webkit.org/show_bug.cgi?id=40911
12
13         * qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri.
14         * qt/benchmarks/benchmarks.pro: Added.
15         * qt/benchmarks/qscriptengine/qscriptengine.pro: Added.
16         * qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added.
17         (tst_QScriptEngine::checkSyntax_data):
18         (tst_QScriptEngine::checkSyntax):
19         (tst_QScriptEngine::constructor):
20         (tst_QScriptEngine::evaluateString_data):
21         (tst_QScriptEngine::evaluateString):
22         (tst_QScriptEngine::evaluateProgram_data):
23         (tst_QScriptEngine::evaluateProgram):
24         (tst_QScriptEngine::newObject):
25         (tst_QScriptEngine::nullValue):
26         (tst_QScriptEngine::undefinedValue):
27         (tst_QScriptEngine::globalObject):
28         (tst_QScriptEngine::toStringHandle):
29         * qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added.
30         * qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added.
31         (tst_QScriptValue::tst_QScriptValue):
32         (tst_QScriptValue::~tst_QScriptValue):
33         (tst_QScriptValue::values_data):
34         (tst_QScriptValue::ctorBool):
35         (tst_QScriptValue::ctorReal):
36         (tst_QScriptValue::ctorNumber):
37         (tst_QScriptValue::ctorQString):
38         (tst_QScriptValue::ctorCString):
39         (tst_QScriptValue::ctorSpecial):
40         (tst_QScriptValue::ctorQScriptValue):
41         (tst_QScriptValue::isValid_data):
42         (tst_QScriptValue::isValid):
43         (tst_QScriptValue::isBool_data):
44         (tst_QScriptValue::isBool):
45         (tst_QScriptValue::isNumber_data):
46         (tst_QScriptValue::isNumber):
47         (tst_QScriptValue::isFunction_data):
48         (tst_QScriptValue::isFunction):
49         (tst_QScriptValue::isNull_data):
50         (tst_QScriptValue::isNull):
51         (tst_QScriptValue::isString_data):
52         (tst_QScriptValue::isString):
53         (tst_QScriptValue::isUndefined_data):
54         (tst_QScriptValue::isUndefined):
55         (tst_QScriptValue::isObject_data):
56         (tst_QScriptValue::isObject):
57         (tst_QScriptValue::isError_data):
58         (tst_QScriptValue::isError):
59         (tst_QScriptValue::toString_data):
60         (tst_QScriptValue::toString):
61         (tst_QScriptValue::toNumber_data):
62         (tst_QScriptValue::toNumber):
63         (tst_QScriptValue::toBool_data):
64         (tst_QScriptValue::toBool):
65         (tst_QScriptValue::toInteger_data):
66         (tst_QScriptValue::toInteger):
67         (tst_QScriptValue::toInt32_data):
68         (tst_QScriptValue::toInt32):
69         (tst_QScriptValue::toUInt32_data):
70         (tst_QScriptValue::toUInt32):
71         (tst_QScriptValue::toUInt16_data):
72         (tst_QScriptValue::toUInt16):
73         (tst_QScriptValue::toObject_data):
74         (tst_QScriptValue::toObject):
75         (tst_QScriptValue::equals_data):
76         (tst_QScriptValue::equals):
77         (tst_QScriptValue::strictlyEquals_data):
78         (tst_QScriptValue::strictlyEquals):
79         (tst_QScriptValue::instanceOf_data):
80         (tst_QScriptValue::instanceOf):
81
82 2010-06-25  Oliver Hunt  <oliver@apple.com>
83
84         Reviewed by Geoffrey Garen.
85
86         Remove old js parser
87         https://bugs.webkit.org/show_bug.cgi?id=41222
88
89         Remove the old yacc parser, this also solves the tiger problem.  Which
90         was a conflict between yacc generated token values and those in the
91         custom parser
92
93         * Android.mk:
94         * CMakeLists.txt:
95         * DerivedSources.make:
96         * DerivedSources.pro:
97         * GNUmakefile.am:
98         * JavaScriptCore.pro:
99         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
100         * JavaScriptCore.xcodeproj/project.pbxproj:
101         * parser/Grammar.y: Removed.
102         * parser/JSParser.cpp:
103         * parser/JSParser.h:
104         * parser/Lexer.cpp:
105         * parser/NodeConstructors.h:
106         (JSC::Node::Node):
107         * parser/Parser.cpp:
108         (JSC::Parser::parse):
109         * wtf/Platform.h:
110
111 2010-06-25  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
112
113         Reviewed by Simon Hausmann.
114
115         New QtScript API; setPrototype() and prototype().
116
117         This patch implements QScriptValue's prototype accessors.
118
119         [Qt] QScriptValue should have accessors to a prototype.
120         https://bugs.webkit.org/show_bug.cgi?id=39356
121
122         * qt/api/qscriptvalue.cpp:
123         (QScriptValue::prototype):
124         (QScriptValue::setPrototype):
125         * qt/api/qscriptvalue.h:
126         * qt/api/qscriptvalue_p.h:
127         (QScriptValuePrivate::prototype):
128         (QScriptValuePrivate::setPrototype):
129         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
130         (tst_QScriptValue::getSetPrototype):
131         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
132
133 2010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
134
135         Reviewed by Kenneth Rohde Christiansen.
136
137         [CMake] Add option to enable JIT.
138         JIT is disabled by default, but now it's possible to enable it through
139         an option to CMake: -DENABLE_JIT will enable it.
140         https://bugs.webkit.org/show_bug.cgi?id=40936
141
142         * CMakeLists.txt: Add missing files and re-sort.
143
144 2010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
145
146         Reviewed by Gustavo Noronha Silva.
147
148         [CMake] Remove unused variable in EFL build system. It was previously
149         being used to set the flags of each port but it was superseded by
150         other flags.
151         https://bugs.webkit.org/show_bug.cgi?id=40931
152
153         * jsc/CMakeLists.txt:
154
155 2010-06-25  Nathan Lawrence  <nlawrence@apple.com>
156
157         Reviewed by Geoffrey Garen.
158
159         Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on
160         sunspider.
161
162         * assembler/AssemblerBuffer.h:
163         (JSC::AssemblerBuffer::AssemblerBuffer):
164
165 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
166
167         Unreviewed, rolling out r61842.
168         http://trac.webkit.org/changeset/61842
169         https://bugs.webkit.org/show_bug.cgi?id=41208
170
171         It broke Windows build (Requested by Ossy_ on #webkit).
172
173         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
174         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
175         * wtf/OwnPtrCommon.h:
176         * wtf/brew/OwnPtrBrew.h: Removed.
177         * wtf/win/OwnPtrWin.h: Removed.
178
179 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
180
181         Unreviewed, rolling out r61833.
182         http://trac.webkit.org/changeset/61833
183         https://bugs.webkit.org/show_bug.cgi?id=41205
184
185         It broke Leopard and GTK (Requested by Ossy_ on #webkit).
186
187         * runtime/RegExp.cpp:
188         (JSC::RegExp::RegExp):
189         (JSC::RegExp::create):
190         * runtime/RegExp.h:
191         * runtime/RegExpCache.cpp:
192         (JSC::RegExpCache::lookupOrCreate):
193         (JSC::RegExpCache::create):
194         * runtime/RegExpCache.h:
195
196 2010-06-25  Kwang Yul Seo  <skyul@company100.net>
197
198         Reviewed by Adam Barth.
199
200         Change OwnPtrCommon to include platform-specific headers
201         https://bugs.webkit.org/show_bug.cgi?id=40279
202
203         Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
204         Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
205
206         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
207         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
208         * wtf/OwnPtrCommon.h:
209         * wtf/brew/OwnPtrBrew.h: Added.
210         * wtf/win/OwnPtrWin.h: Added.
211
212 2010-06-25  Patrick Gansterer  <paroga@paroga.com>
213
214         Reviewed by Darin Adler.
215
216         Add the possibility for a head and footer section to create_jit_stubs.
217         https://bugs.webkit.org/show_bug.cgi?id=36050
218
219         * create_jit_stubs:
220
221 2010-06-24  Renata Hodovan  <reni@inf.u-szeged.hu>
222
223         Reviewed by Geoffrey Garen.
224
225         Merge RegExp constructor and RegExp::create methods into one.
226         Both of function are called with tree parameters and check whether 
227         flags (the third param) is given or not.
228         Simplify hash lookups in RegExpCache::create with giving them an extra 
229         iterator parameter.
230         https://bugs.webkit.org/show_bug.cgi?id=41055
231
232         * runtime/RegExp.cpp:
233         (JSC::RegExp::RegExp):
234         * runtime/RegExp.h:
235         * runtime/RegExpCache.cpp:
236         (JSC::RegExpCache::lookupOrCreate):
237         (JSC::RegExpCache::create):
238         * runtime/RegExpCache.h:
239
240 2010-06-24  Oliver Hunt  <oliver@apple.com>
241
242         Reviewed by Maciej Stachowiak.
243
244         Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64
245         https://bugs.webkit.org/show_bug.cgi?id=41193
246
247         I noticed a use of '+ 4' in some of the 32_64 code paths and realised there
248         were a few places where endianness was being hardcoded.  This patch fixes
249         the errors i could find through code inspection.
250
251         * jit/JITOpcodes32_64.cpp:
252         (JSC::JIT::emit_op_resolve_global):
253         * jit/JITPropertyAccess32_64.cpp:
254         (JSC::JIT::emit_op_get_by_val):
255         (JSC::JIT::emit_op_put_by_val):
256         (JSC::JIT::compileGetDirectOffset):
257         (JSC::JIT::privateCompilePutByIdTransition):
258         (JSC::JIT::patchGetByIdSelf):
259         (JSC::JIT::patchPutByIdReplace):
260
261 2010-06-24  Oliver Hunt  <oliver@apple.com>
262
263         Build fix
264
265         Temporarily get the tiger bot working again by disabling the
266         new JS parser.  GCC on tiger is miscompiling the parser and
267         I don't have access to a tiger machine right now.
268
269         * wtf/Platform.h:
270
271  2010-06-21  Nathan Lawrence  <nlawrence@apple.com>
272
273          Reviewed by Geoff Garen.
274
275          https://bugs.webkit.org/show_bug.cgi?id=40128
276          Fixed broken debug functionality.
277
278          * interpreter/Interpreter.cpp:
279          (JSC::Interpreter::dumpRegisters):
280              Fixed to work with updated call frame.
281          * runtime/JSImmediate.h:
282          (JSC::JSValue::isCell):
283              Added assert for aligned cell.
284          * runtime/JSValue.cpp:
285          (JSC::JSValue::description):
286              Fixed to work with current JSValue implementation.
287          * runtime/JSZombie.cpp:
288          (JSC::JSZombie::leakedZombieStructure):
289              JSombies compile again.
290
291 2010-06-24  Leandro Pereira  <leandro@profusion.mobi>
292
293         Unreviewed build fix.
294
295         * CMakeLists.txt: Add JSParser.cpp.
296
297 2010-06-24  Oliver Hunt  <oliver@apple.com>
298
299         Reviewed by Maciej Stachowiak.
300
301         Single character string replacement may replace too many characters
302         https://bugs.webkit.org/show_bug.cgi?id=41138
303         <rdar://problem/8097496>
304
305         Simple fix to stop the rope path of single character replacement
306         once the first replacement occurs.
307
308         * runtime/JSString.cpp:
309         (JSC::JSString::replaceCharacter):
310
311 2010-06-24  Gabor Loki  <loki@webkit.org>
312
313         Reviewed by Gavin Barraclough.
314
315         Fix the length of instruction stream controlled by constant pool
316         https://bugs.webkit.org/show_bug.cgi?id=40293
317
318         The initial/maximum length of instruction stream (m_maxDistance) should
319         be set when the first constant arrives to the constant pool. Otherwise
320         the constant pool could be placed into an uninterrupted sequence.
321
322         * assembler/AssemblerBufferWithConstantPool.h:
323         (JSC::):
324
325 2010-06-24  Oliver Hunt  <oliver@apple.com>
326
327         Reviewed by Gavin Barraclough.
328
329         We assume bytecodeOffset will always return a value > 1,
330         so we adjust the failure case to return 1 instead of 0.
331
332         * bytecode/CodeBlock.h:
333         (JSC::CodeBlock::bytecodeOffset):
334
335 2010-06-23  Oliver Hunt  <oliver@apple.com>
336
337         Reviewed by Gavin Barraclough.
338
339         Custom-written JavaScript parser
340         https://bugs.webkit.org/show_bug.cgi?id=34019
341
342         Implement a recursive descent parser similar to that used by V8 and
343         SpiderMonkey.  Greater than 2x improvement in SunSpider parsing tests.
344
345         The parser consists of a JSParser class that uses a TreeBuilder to actually
346         build the AST.  There are currently two builders -- the ASTBuilder and
347         SyntaxChecker which separate the job of building an AST for code generation
348         and simply checking syntactic correctness.
349
350         There's still some less than ideal code remaining in the parser to allow
351         us to retain the existing lexing code with minimal changes.  We'll tidy
352         this up at a later date.
353
354         * GNUmakefile.am:
355         * JavaScriptCore.gypi:
356         * JavaScriptCore.pro:
357         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
358         * JavaScriptCore.xcodeproj/project.pbxproj:
359         * parser/ASTBuilder.h: Added.
360         (JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
361         (JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
362         (JSC::ASTBuilder::ASTBuilder):
363         (JSC::ASTBuilder::createSourceElements):
364         (JSC::ASTBuilder::varDeclarations):
365         (JSC::ASTBuilder::funcDeclarations):
366         (JSC::ASTBuilder::features):
367         (JSC::ASTBuilder::numConstants):
368         (JSC::ASTBuilder::appendToComma):
369         (JSC::ASTBuilder::createCommaExpr):
370         (JSC::ASTBuilder::createLogicalNot):
371         (JSC::ASTBuilder::createUnaryPlus):
372         (JSC::ASTBuilder::createVoid):
373         (JSC::ASTBuilder::thisExpr):
374         (JSC::ASTBuilder::createResolve):
375         (JSC::ASTBuilder::createObjectLiteral):
376         (JSC::ASTBuilder::createArray):
377         (JSC::ASTBuilder::createNumberExpr):
378         (JSC::ASTBuilder::createString):
379         (JSC::ASTBuilder::createBoolean):
380         (JSC::ASTBuilder::createNull):
381         (JSC::ASTBuilder::createBracketAccess):
382         (JSC::ASTBuilder::createDotAccess):
383         (JSC::ASTBuilder::createRegex):
384         (JSC::ASTBuilder::createNewExpr):
385         (JSC::ASTBuilder::createConditionalExpr):
386         (JSC::ASTBuilder::createAssignResolve):
387         (JSC::ASTBuilder::createFunctionExpr):
388         (JSC::ASTBuilder::createFunctionBody):
389         (JSC::ASTBuilder::createGetterOrSetterProperty):
390         (JSC::ASTBuilder::createArguments):
391         (JSC::ASTBuilder::createArgumentsList):
392         (JSC::ASTBuilder::createProperty):
393         (JSC::ASTBuilder::createPropertyList):
394         (JSC::ASTBuilder::createElementList):
395         (JSC::ASTBuilder::createFormalParameterList):
396         (JSC::ASTBuilder::createClause):
397         (JSC::ASTBuilder::createClauseList):
398         (JSC::ASTBuilder::setUsesArguments):
399         (JSC::ASTBuilder::createFuncDeclStatement):
400         (JSC::ASTBuilder::createBlockStatement):
401         (JSC::ASTBuilder::createExprStatement):
402         (JSC::ASTBuilder::createIfStatement):
403         (JSC::ASTBuilder::createForLoop):
404         (JSC::ASTBuilder::createForInLoop):
405         (JSC::ASTBuilder::createEmptyStatement):
406         (JSC::ASTBuilder::createVarStatement):
407         (JSC::ASTBuilder::createReturnStatement):
408         (JSC::ASTBuilder::createBreakStatement):
409         (JSC::ASTBuilder::createContinueStatement):
410         (JSC::ASTBuilder::createTryStatement):
411         (JSC::ASTBuilder::createSwitchStatement):
412         (JSC::ASTBuilder::createWhileStatement):
413         (JSC::ASTBuilder::createDoWhileStatement):
414         (JSC::ASTBuilder::createLabelStatement):
415         (JSC::ASTBuilder::createWithStatement):
416         (JSC::ASTBuilder::createThrowStatement):
417         (JSC::ASTBuilder::createDebugger):
418         (JSC::ASTBuilder::createConstStatement):
419         (JSC::ASTBuilder::appendConstDecl):
420         (JSC::ASTBuilder::appendStatement):
421         (JSC::ASTBuilder::addVar):
422         (JSC::ASTBuilder::combineCommaNodes):
423         (JSC::ASTBuilder::evalCount):
424         (JSC::ASTBuilder::appendBinaryExpressionInfo):
425         (JSC::ASTBuilder::operatorStackPop):
426         (JSC::ASTBuilder::operatorStackHasHigherPrecedence):
427         (JSC::ASTBuilder::getFromOperandStack):
428         (JSC::ASTBuilder::shrinkOperandStackBy):
429         (JSC::ASTBuilder::appendBinaryOperation):
430         (JSC::ASTBuilder::operatorStackAppend):
431         (JSC::ASTBuilder::popOperandStack):
432         (JSC::ASTBuilder::appendUnaryToken):
433         (JSC::ASTBuilder::unaryTokenStackLastType):
434         (JSC::ASTBuilder::unaryTokenStackLastStart):
435         (JSC::ASTBuilder::unaryTokenStackRemoveLast):
436         (JSC::ASTBuilder::assignmentStackAppend):
437         (JSC::ASTBuilder::createAssignment):
438         (JSC::ASTBuilder::Scope::Scope):
439         (JSC::ASTBuilder::setExceptionLocation):
440         (JSC::ASTBuilder::incConstants):
441         (JSC::ASTBuilder::usesThis):
442         (JSC::ASTBuilder::usesCatch):
443         (JSC::ASTBuilder::usesClosures):
444         (JSC::ASTBuilder::usesArguments):
445         (JSC::ASTBuilder::usesAssignment):
446         (JSC::ASTBuilder::usesWith):
447         (JSC::ASTBuilder::usesEval):
448         (JSC::ASTBuilder::createNumber):
449         (JSC::ASTBuilder::makeTypeOfNode):
450         (JSC::ASTBuilder::makeDeleteNode):
451         (JSC::ASTBuilder::makeNegateNode):
452         (JSC::ASTBuilder::makeBitwiseNotNode):
453         (JSC::ASTBuilder::makeMultNode):
454         (JSC::ASTBuilder::makeDivNode):
455         (JSC::ASTBuilder::makeAddNode):
456         (JSC::ASTBuilder::makeSubNode):
457         (JSC::ASTBuilder::makeLeftShiftNode):
458         (JSC::ASTBuilder::makeRightShiftNode):
459         (JSC::ASTBuilder::makeFunctionCallNode):
460         (JSC::ASTBuilder::makeBinaryNode):
461         (JSC::ASTBuilder::makeAssignNode):
462         (JSC::ASTBuilder::makePrefixNode):
463         (JSC::ASTBuilder::makePostfixNode):
464         * parser/JSParser.cpp: Added.
465         (JSC::JSParser::AllowInOverride::AllowInOverride):
466         (JSC::JSParser::AllowInOverride::~AllowInOverride):
467         (JSC::JSParser::token):
468         (JSC::JSParser::next):
469         (JSC::JSParser::consume):
470         (JSC::JSParser::match):
471         (JSC::JSParser::tokenStart):
472         (JSC::JSParser::tokenLine):
473         (JSC::JSParser::tokenEnd):
474         (JSC::JSParser::):
475         (JSC::JSParser::autoSemiColon):
476         (JSC::JSParser::canRecurse):
477         (JSC::JSParser::lastTokenEnd):
478         (JSC::jsParse):
479         (JSC::JSParser::JSParser):
480         (JSC::JSParser::parseProgram):
481         (JSC::JSParser::allowAutomaticSemicolon):
482         (JSC::JSParser::parseSourceElements):
483         (JSC::JSParser::parseVarDeclaration):
484         (JSC::JSParser::parseConstDeclaration):
485         (JSC::JSParser::parseDoWhileStatement):
486         (JSC::JSParser::parseWhileStatement):
487         (JSC::JSParser::parseVarDeclarationList):
488         (JSC::JSParser::parseConstDeclarationList):
489         (JSC::JSParser::parseForStatement):
490         (JSC::JSParser::parseBreakStatement):
491         (JSC::JSParser::parseContinueStatement):
492         (JSC::JSParser::parseReturnStatement):
493         (JSC::JSParser::parseThrowStatement):
494         (JSC::JSParser::parseWithStatement):
495         (JSC::JSParser::parseSwitchStatement):
496         (JSC::JSParser::parseSwitchClauses):
497         (JSC::JSParser::parseSwitchDefaultClause):
498         (JSC::JSParser::parseTryStatement):
499         (JSC::JSParser::parseDebuggerStatement):
500         (JSC::JSParser::parseBlockStatement):
501         (JSC::JSParser::parseStatement):
502         (JSC::JSParser::parseFormalParameters):
503         (JSC::JSParser::parseFunctionBody):
504         (JSC::JSParser::parseFunctionInfo):
505         (JSC::JSParser::parseFunctionDeclaration):
506         (JSC::JSParser::parseExpressionOrLabelStatement):
507         (JSC::JSParser::parseExpressionStatement):
508         (JSC::JSParser::parseIfStatement):
509         (JSC::JSParser::parseExpression):
510         (JSC::JSParser::parseAssignmentExpression):
511         (JSC::JSParser::parseConditionalExpression):
512         (JSC::isUnaryOp):
513         (JSC::JSParser::isBinaryOperator):
514         (JSC::JSParser::parseBinaryExpression):
515         (JSC::JSParser::parseProperty):
516         (JSC::JSParser::parseObjectLiteral):
517         (JSC::JSParser::parseArrayLiteral):
518         (JSC::JSParser::parsePrimaryExpression):
519         (JSC::JSParser::parseArguments):
520         (JSC::JSParser::parseMemberExpression):
521         (JSC::JSParser::parseUnaryExpression):
522         * parser/JSParser.h: Added.
523         (JSC::):
524         (JSC::JSTokenInfo::JSTokenInfo):
525         * parser/Lexer.cpp:
526         (JSC::Lexer::lex):
527         * parser/Lexer.h:
528         (JSC::Lexer::setLastLineNumber):
529         (JSC::Lexer::lastLineNumber):
530         * parser/NodeConstructors.h:
531         (JSC::Node::Node):
532         * parser/Parser.cpp:
533         (JSC::Parser::parse):
534         * parser/SyntaxChecker.h: Added.
535         (JSC::SyntaxChecker::SyntaxChecker):
536         (JSC::SyntaxChecker::createSourceElements):
537         (JSC::SyntaxChecker::makeFunctionCallNode):
538         (JSC::SyntaxChecker::appendToComma):
539         (JSC::SyntaxChecker::createCommaExpr):
540         (JSC::SyntaxChecker::makeAssignNode):
541         (JSC::SyntaxChecker::makePrefixNode):
542         (JSC::SyntaxChecker::makePostfixNode):
543         (JSC::SyntaxChecker::makeTypeOfNode):
544         (JSC::SyntaxChecker::makeDeleteNode):
545         (JSC::SyntaxChecker::makeNegateNode):
546         (JSC::SyntaxChecker::makeBitwiseNotNode):
547         (JSC::SyntaxChecker::createLogicalNot):
548         (JSC::SyntaxChecker::createUnaryPlus):
549         (JSC::SyntaxChecker::createVoid):
550         (JSC::SyntaxChecker::thisExpr):
551         (JSC::SyntaxChecker::createResolve):
552         (JSC::SyntaxChecker::createObjectLiteral):
553         (JSC::SyntaxChecker::createArray):
554         (JSC::SyntaxChecker::createNumberExpr):
555         (JSC::SyntaxChecker::createString):
556         (JSC::SyntaxChecker::createBoolean):
557         (JSC::SyntaxChecker::createNull):
558         (JSC::SyntaxChecker::createBracketAccess):
559         (JSC::SyntaxChecker::createDotAccess):
560         (JSC::SyntaxChecker::createRegex):
561         (JSC::SyntaxChecker::createNewExpr):
562         (JSC::SyntaxChecker::createConditionalExpr):
563         (JSC::SyntaxChecker::createAssignResolve):
564         (JSC::SyntaxChecker::createFunctionExpr):
565         (JSC::SyntaxChecker::createFunctionBody):
566         (JSC::SyntaxChecker::createArguments):
567         (JSC::SyntaxChecker::createArgumentsList):
568         (JSC::SyntaxChecker::createProperty):
569         (JSC::SyntaxChecker::createPropertyList):
570         (JSC::SyntaxChecker::createElementList):
571         (JSC::SyntaxChecker::createFormalParameterList):
572         (JSC::SyntaxChecker::createClause):
573         (JSC::SyntaxChecker::createClauseList):
574         (JSC::SyntaxChecker::setUsesArguments):
575         (JSC::SyntaxChecker::createFuncDeclStatement):
576         (JSC::SyntaxChecker::createBlockStatement):
577         (JSC::SyntaxChecker::createExprStatement):
578         (JSC::SyntaxChecker::createIfStatement):
579         (JSC::SyntaxChecker::createForLoop):
580         (JSC::SyntaxChecker::createForInLoop):
581         (JSC::SyntaxChecker::createEmptyStatement):
582         (JSC::SyntaxChecker::createVarStatement):
583         (JSC::SyntaxChecker::createReturnStatement):
584         (JSC::SyntaxChecker::createBreakStatement):
585         (JSC::SyntaxChecker::createContinueStatement):
586         (JSC::SyntaxChecker::createTryStatement):
587         (JSC::SyntaxChecker::createSwitchStatement):
588         (JSC::SyntaxChecker::createWhileStatement):
589         (JSC::SyntaxChecker::createWithStatement):
590         (JSC::SyntaxChecker::createDoWhileStatement):
591         (JSC::SyntaxChecker::createLabelStatement):
592         (JSC::SyntaxChecker::createThrowStatement):
593         (JSC::SyntaxChecker::createDebugger):
594         (JSC::SyntaxChecker::createConstStatement):
595         (JSC::SyntaxChecker::appendConstDecl):
596         (JSC::SyntaxChecker::createGetterOrSetterProperty):
597         (JSC::SyntaxChecker::appendStatement):
598         (JSC::SyntaxChecker::addVar):
599         (JSC::SyntaxChecker::combineCommaNodes):
600         (JSC::SyntaxChecker::evalCount):
601         (JSC::SyntaxChecker::appendBinaryExpressionInfo):
602         (JSC::SyntaxChecker::operatorStackPop):
603         * runtime/JSGlobalData.h:
604         * wtf/Platform.h:
605         * wtf/ThreadSpecific.h:
606         (WTF::T):
607
608 2010-06-23  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
609
610         Reviewed by Simon Hausmann.
611
612         Optimization of the QScriptValuePrivate.
613
614         Patch change only internals of the QScriptValuePrivate.
615         Most of the QScriptValuePrivate's attributes were moved
616         into an union.
617
618         [Qt] Optimization of the QScriptVAluePrivate.
619         https://bugs.webkit.org/show_bug.cgi?id=40415
620
621         * qt/api/qscriptengine_p.cpp:
622         (QScriptEnginePrivate::globalObject):
623         * qt/api/qscriptvalue_p.h:
624         (QScriptValuePrivate::):
625         (QScriptValuePrivate::~QScriptValuePrivate):
626         (QScriptValuePrivate::QScriptValuePrivate):
627         (QScriptValuePrivate::toString):
628         (QScriptValuePrivate::toNumber):
629         (QScriptValuePrivate::toBool):
630         (QScriptValuePrivate::toObject):
631         (QScriptValuePrivate::equals):
632         (QScriptValuePrivate::strictlyEquals):
633         (QScriptValuePrivate::assignEngine):
634         (QScriptValuePrivate::operator JSValueRef):
635         (QScriptValuePrivate::operator JSObjectRef):
636         (QScriptValuePrivate::refinedJSValue):
637
638 2010-06-23  Kwang Yul Seo  <skyul@company100.net>
639
640         Reviewed by Oliver Hunt.
641
642         [GTK] Implement ThreadSpecific with glib
643         https://bugs.webkit.org/show_bug.cgi?id=39829
644
645         Implement ThreadSpecific with glib's GStaticPrivate.
646         This patch makes it possible to build GTK port without pthread.
647
648         * wtf/ThreadSpecific.h:
649         (WTF::::ThreadSpecific):
650         (WTF::::~ThreadSpecific):
651         (WTF::::get):
652         (WTF::::set):
653         (WTF::::destroy):
654
655 2010-06-23  Leandro Pereira  <leandro@profusion.mobi>
656
657         Unreviewed build fix.
658
659         * CMakeLists.txt: Add runtime/RegExpCache.cpp.
660
661 2010-06-22  Renata Hodovan  <hodovan@inf.u-szeged.hu>
662
663         Reviewed by Geoffrey Garen.
664
665         Adding regular expression caching to JavaScriptCore
666         https://bugs.webkit.org/show_bug.cgi?id=38142
667
668         The cache is based on Round Robin eviction policy, and
669         can cache at most 256 character long regular expressions,
670         and at most 256 of them. These values can be changed at compile time.
671
672         * GNUmakefile.am:
673         * JavaScriptCore.gypi:
674         * JavaScriptCore.pro:
675         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
676         * JavaScriptCore.xcodeproj/project.pbxproj:
677         * bytecompiler/NodesCodegen.cpp:
678         (JSC::RegExpNode::emitBytecode):
679         * runtime/JSGlobalData.cpp:
680         (JSC::JSGlobalData::JSGlobalData):
681         (JSC::JSGlobalData::~JSGlobalData):
682         * runtime/JSGlobalData.h:
683         (JSC::JSGlobalData::regExpCache):
684         * runtime/RegExpCache.cpp: Added.
685         (JSC::RegExpCache::lookupOrCreate):
686         (JSC::RegExpCache::create):
687         (JSC::RegExpCache::RegExpCache):
688         * runtime/RegExpCache.h: Added.
689         * runtime/RegExpConstructor.cpp:
690         (JSC::constructRegExp):
691         * runtime/RegExpKey.h: Added.
692         (JSC::RegExpKey::RegExpKey):
693         (JSC::RegExpKey::getFlagsValue):
694         (WTF::operator==):
695         (WTF::):
696         * runtime/RegExpPrototype.cpp:
697         (JSC::regExpProtoFuncCompile):
698         * runtime/StringPrototype.cpp:
699         (JSC::stringProtoFuncMatch):
700         (JSC::stringProtoFuncSearch):
701
702 2010-06-22  Gabor Loki  <loki@webkit.org>
703
704         Reviewed by Geoffrey Garen.
705
706         Add native call support for ARM and Thumb-2 JIT.
707         https://bugs.webkit.org/show_bug.cgi?id=40231
708
709         * jit/JITOpcodes.cpp:
710         (JSC::JIT::privateCompileCTINativeCall):
711         * jit/JITOpcodes32_64.cpp:
712         (JSC::JIT::privateCompileCTINativeCall):
713         * wtf/Platform.h:
714
715 2010-06-21  Oliver Hunt  <oliver@apple.com>
716
717         Reviewed by Geoffrey Garen.
718
719         Make JSC more resilient in the face of parse failures
720         https://bugs.webkit.org/show_bug.cgi?id=40951
721
722         A number of recent bugs have occurred due to issues like miscounting
723         BOMs, etc which lead to interesting crashes later on.  Adding this
724         logic hardens JSC in the face of these errors, and has no impact on
725         performance (32bit jit actually gets 0.7% faster but I put that down
726         to cache effects).
727
728         * bytecode/CodeBlock.cpp:
729         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
730         (JSC::CodeBlock::lineNumberForBytecodeOffset):
731         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
732         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
733         * bytecode/CodeBlock.h:
734         (JSC::CodeBlock::bytecodeOffset):
735         * interpreter/Interpreter.cpp:
736         (JSC::Interpreter::execute):
737         (JSC::Interpreter::executeCall):
738         (JSC::Interpreter::executeConstruct):
739         (JSC::Interpreter::prepareForRepeatCall):
740         (JSC::Interpreter::privateExecute):
741         * jit/JITOpcodes.cpp:
742         (JSC::JIT::privateCompileCTIMachineTrampolines):
743         * jit/JITOpcodes32_64.cpp:
744         (JSC::JIT::privateCompileCTIMachineTrampolines):
745         * jit/JITStubs.cpp:
746         (JSC::DEFINE_STUB_FUNCTION):
747         * runtime/ArrayPrototype.cpp:
748         (JSC::isNumericCompareFunction):
749         * runtime/Executable.cpp:
750         (JSC::FunctionExecutable::compileForCall):
751         (JSC::FunctionExecutable::compileForConstruct):
752         (JSC::FunctionExecutable::generateJITCodeForCall):
753         (JSC::FunctionExecutable::generateJITCodeForConstruct):
754         (JSC::FunctionExecutable::reparseExceptionInfo):
755         (JSC::EvalExecutable::reparseExceptionInfo):
756         * runtime/Executable.h:
757         (JSC::FunctionExecutable::bytecodeForCall):
758         (JSC::FunctionExecutable::bytecodeForConstruct):
759         * runtime/JSGlobalData.cpp:
760         (JSC::JSGlobalData::numericCompareFunction):
761
762 2010-06-21  John Sullivan  <sullivan@apple.com>
763
764         Reviewed by Adam Roben.
765
766         RetainPtr can't be used in HashMaps or HashSets
767         <https://bugs.webkit.org/show_bug.cgi?id=40938>
768         
769         Added hashing knowledge similar to that in COMPtr.h.
770
771         * wtf/RetainPtr.h:
772         (WTF::RetainPtr::RetainPtr):
773         New function, copied from COMPtr.h but for the type change.
774         (WTF::RetainPtr::isHashTableDeletedValue):
775         Ditto.
776         (WTF::RetainPtr::hashTableDeletedValue):
777         Ditto.
778         Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change.
779         The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h)
780         rather than the COMPtr implementation.
781
782 2010-06-19  Oliver Hunt  <oliver@apple.com>
783
784         Reviewed by Geoffrey Garen.
785
786         Need to ensure that we grow the RegisterFile when creating a callframe for host code
787         https://bugs.webkit.org/show_bug.cgi?id=40858
788         <rdar://problem/8108986>
789
790         In the past the use of the callframe in hostcode was much more
791         limited.  Now that we expect the callframe to always be valid
792         we need to grow the RegisterFile so that this is actually the
793         case.  In this particular case the problem was failing to grow
794         the registerfile could lead to a callframe that extended beyond
795         RegisterFiler::end(), so vm re-entry would clobber the callframe
796         other scenarios could also lead to badness.
797
798         I was unable to construct a simple testcase to trigger badness,
799         and any such testcase would be so dependent on exact vm stack
800         layout that it would be unlikely to work as a testcase following
801         any callframe or register allocation changes anyway.
802
803         Thankfully the new assertion I added should help to catch these
804         failures in future, and triggers on a couple of tests currently.
805
806         * interpreter/CallFrame.cpp:
807         (JSC::CallFrame::registerFile):
808         * interpreter/CallFrame.h:
809         (JSC::ExecState::init):
810         * interpreter/Interpreter.cpp:
811         (JSC::Interpreter::privateExecute):
812         * jit/JITStubs.cpp:
813         (JSC::DEFINE_STUB_FUNCTION):
814
815 2010-06-21  Satish Sampath  <satish@chromium.org>
816
817         Reviewed by Steve Block.
818
819         Speech Input Patch 0: Added compilation argument to conditionally compile pending patches.
820         https://bugs.webkit.org/show_bug.cgi?id=40878
821
822         * Configurations/FeatureDefines.xcconfig:
823
824 2010-06-21  Kwang Yul Seo  <skyul@company100.net>
825
826         Reviewed by Kent Tamura.
827
828         [BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1
829         https://bugs.webkit.org/show_bug.cgi?id=40653
830
831         Currently, other ports do not use global new/delete operator overloading
832         when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable
833         "global fastMalloc new" because the default new/delete causes crash on device.
834         We need to replace them with Brew MP's MALLOC/FREE.
835
836         * wtf/FastMalloc.h:
837
838 2010-06-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
839
840         Reviewed by Simon Hausmann.
841
842         [Qt] Work around a build problem with libjscore on Symbian.
843         https://bugs.webkit.org/show_bug.cgi?id=40840
844
845         Sbsv2 sometimes have problems with debug/release configuration
846         determination causing QtWebKit in release to try linking with the debug
847         JavaScriptCore static library. This patch limit the jscore/jscored
848         r58306 fix necessary for mac builds only to the mac platform to prevent the
849         different name problem.
850
851         The real fix would be to fix qmake or the toolchain, this patch might
852         help meanwhile.
853
854         * JavaScriptCore.pri:
855
856 2010-06-21  Patrick Gansterer  <paroga@paroga.com>
857
858         Reviewed by Kent Tamura.
859
860         Buildfix after r61338.
861         https://bugs.webkit.org/show_bug.cgi?id=40888
862
863         roundUpAllocationSize is needed in RegisterFile.h.
864
865         * jit/ExecutableAllocator.h:
866
867 2010-06-19  Kwang Yul Seo  <skyul@company100.net>
868
869         Reviewed by Darin Adler.
870
871         Include <string.h> in StringExtras.h
872         https://bugs.webkit.org/show_bug.cgi?id=40808
873
874         Without string.h, RVCT 2.2 can't compile StringExtras.h.
875         It can't find strlen and strncmp.
876
877         * wtf/StringExtras.h:
878
879 2010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
880
881         Reviewed by Kenneth Rohde Christiansen.
882
883         Don't use __attribute__((may_alias)) with the Intel compiler,
884         as it doesn't understand it.
885
886         * wtf/Vector.h:
887
888 2010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
889
890         Reviewed by Kenneth Rohde Christiansen.
891
892         Fix compilation with the Intel C++ compiler (11.1.072).
893
894         Like RVCT, label pointers must be void*, not const void*.
895
896         * bytecode/Opcode.h:
897
898 2010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
899
900         Reviewed by Kenneth Rohde Christiansen.
901
902         Add the WTF_COMPILER_INTEL for when the Intel compiler is used
903         for building. Usually, the Intel compiler masquerades as
904         another compiler in the system and gets away with it, but some
905         times specific fixes are required (such as when using language
906         extensions).
907
908         * wtf/Platform.h:
909
910 2010-06-18  Oliver Hunt  <oliver@apple.com>
911
912         Reviewed by Geoffrey Garen.
913
914         Incorrect handling of multiple BOMs scattered through a file.
915         https://bugs.webkit.org/show_bug.cgi?id=40865
916
917         When determining the offset of open and close braces in a source
918         with BOMs we were finishing our count early as we failed to account
919         for BOMs prior to the open/close brace positions effecting those
920         positions.
921
922         * parser/Lexer.cpp:
923         (JSC::Lexer::sourceCode):
924
925 2010-06-17  Oliver Hunt  <oliver@apple.com>
926
927         Reviewed by Sam Weinig.
928
929         Don't throw away exception information for functions that use exceptions
930         https://bugs.webkit.org/show_bug.cgi?id=40786
931
932         Simple patch to stop JSC from throwing away the exception information
933         of a function that uses "exceptiony" features like try and throw.  This
934         is a speed up for catching expressions but it's difficult to quantify as
935         the old cost of reparsing is amortised over all exceptions caught in the
936         effected function.
937
938         * bytecode/CodeBlock.cpp:
939         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
940         * bytecompiler/BytecodeGenerator.cpp:
941         (JSC::BytecodeGenerator::generate):
942         (JSC::BytecodeGenerator::emitCatch):
943         * bytecompiler/BytecodeGenerator.h:
944         (JSC::BytecodeGenerator::emitThrow):
945
946 2010-06-18  Anders Carlsson  <andersca@apple.com>
947
948         Reviewed by Sam Weinig.
949
950         Add PlatformStrategies and PluginStrategy classes.
951         https://bugs.webkit.org/show_bug.cgi?id=40850
952
953         * wtf/Platform.h:
954
955 2010-06-18  Leandro Pereira  <leandro@profusion.mobi>
956
957         [EFL] Unreviewed build fix.
958
959         * wtf/CMakeLists.txt: Add MD5.cpp.
960
961 2010-06-17  Shu Chang  <chang.shu@nokia.com>
962
963         Reviewed by Kenneth Rohde Christiansen.
964
965         [Qt] Fix the link error on symbian with ENABLE_JIT=0.
966         1. Add "#if ENABLE(JIT)" in the header file;
967         2. Put feature enable/disable logic to a common.pri so
968         that both JavaScriptCore.pri and WebCore.pri can share.
969
970         https://bugs.webkit.org/show_bug.cgi?id=40780
971
972         * JavaScriptCore.pri:
973         * jit/ExecutableAllocator.h:
974
975 2010-06-17  Darin Adler  <darin@apple.com>
976
977         Reviewed by Sam Weinig.
978
979         Use adoptRef and create functions in more code paths
980         https://bugs.webkit.org/show_bug.cgi?id=40760
981
982         * API/JSClassRef.h: Removed unneeded include of RefCounted.h.
983         * API/JSWeakObjectMapRefPrivate.cpp: Ditto.
984
985         * bytecode/CodeBlock.h:
986         (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the
987         SharedSymbolTable::create function instead of calling new directly.
988
989         * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable
990         class and made the constructor private.
991
992 2010-06-17  Mark Brand  <mabrand@mabrand.nl>
993
994         Reviewed by Simon Hausmann.
995
996         [Qt] use "win32-g++*" scope to match all MinGW makespecs
997
998         The scope "win32-g++" comes from the name of the makespec. However, it
999         is frequently used to check for MinGW. This works fine as long as
1000         win32-g++ is the only makespec for MinGW. Now we need the wildcard
1001         to cover "win32-g++-cross" as well.
1002
1003         * JavaScriptCore.pro:
1004
1005 2010-06-16  Darin Adler  <darin@apple.com>
1006
1007         Reviewed by David Levin.
1008
1009         Deploy adoptRef in more places, including all HTML and MathML elements
1010         https://bugs.webkit.org/show_bug.cgi?id=39941
1011
1012         * wtf/ThreadSafeShared.h: Made the constructor protected and removed the
1013         unneeded support for initial reference counts other than 1.
1014
1015 2010-06-16  Peter Varga  <pvarga@inf.u-szeged.hu>
1016
1017         Reviewed by Geoffrey Garen.
1018
1019         Store matchBegin directly in the array of output instead of the stack.
1020         https://bugs.webkit.org/show_bug.cgi?id=38988
1021
1022         * yarr/RegexJIT.cpp:
1023         (JSC::Yarr::RegexGenerator::generateDisjunction):
1024         (JSC::Yarr::RegexGenerator::generate):
1025
1026 2010-06-15  Anders Carlsson  <andersca@apple.com>
1027
1028         Reviewed by Sam Weinig.
1029
1030         Make JavaScriptCore build with clang++.
1031
1032         * jit/JITInlineMethods.h:
1033         (JSC::JIT::emitPutVirtualRegister):
1034         Explicitly cast to an int.
1035
1036         * yarr/RegexCompiler.cpp:
1037         (JSC::Yarr::compileRegex):
1038         Return 0 instead of false.
1039
1040 2010-06-15  Adam Roben  <aroben@apple.com>
1041
1042         Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds
1043
1044         Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>.
1045
1046         Reviewed by Sam Weinig.
1047
1048         * JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of
1049         JavaScriptCore's DerivedSources directory to
1050         AppleInternal/Sources/JavaScriptCore.
1051
1052 2010-06-15  Gabor Loki  <loki@webkit.org>
1053
1054         Rubber-stamped by Eric Seidel.
1055
1056         Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM
1057         https://bugs.webkit.org/show_bug.cgi?id=40423
1058
1059         Using OBJECT_OFFSETOF macro instead of objectof to bypass access to
1060         non-static data member warning.
1061
1062         * jit/JITPropertyAccess32_64.cpp:
1063         (JSC::JIT::privateCompilePutByIdTransition):
1064
1065 2010-06-11  Eric Seidel  <eric@webkit.org>
1066
1067         Reviewed by Adam Barth.
1068
1069         Rename the rest of the *Tokenizer classes to *DocumentParser
1070         https://bugs.webkit.org/show_bug.cgi?id=40507
1071
1072         * wtf/Platform.h:
1073          - fixed a comment to match new names.
1074
1075 2010-06-11  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1076
1077         Reviewed by Simon Hausmann.
1078
1079         [Qt] Explicit conversions from QtScript types to JSC opaque types were removed.
1080         https://bugs.webkit.org/show_bug.cgi?id=40412
1081
1082         Conversion between a JSC C types and a QtScript private types, takes
1083         main part of the source code. In most cases a mapping between the types
1084         is one to one. New cast operators were added to simplify the code.
1085
1086         The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef.
1087         The QScriptEnginePrivate could be casted to the JSGlobalContext.
1088         The QScriptProgramPrivate could be casted to the JSStringRef.
1089
1090         * qt/api/qscriptengine_p.cpp:
1091         (QScriptEnginePrivate::evaluate):
1092         (QScriptEnginePrivate::newObject):
1093         (QScriptEnginePrivate::globalObject):
1094         * qt/api/qscriptengine_p.h:
1095         (QScriptEnginePrivate::operator JSGlobalContextRef):
1096         * qt/api/qscriptprogram_p.h:
1097         (QScriptProgramPrivate::operator JSStringRef):
1098         * qt/api/qscriptsyntaxcheckresult.cpp:
1099         (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
1100         (QScriptSyntaxCheckResultPrivate::errorMessage):
1101         (QScriptSyntaxCheckResultPrivate::errorLineNumber):
1102         * qt/api/qscriptvalue_p.h:
1103         (QScriptValuePrivate::~QScriptValuePrivate):
1104         (QScriptValuePrivate::QScriptValuePrivate):
1105         (QScriptValuePrivate::isBool):
1106         (QScriptValuePrivate::isNumber):
1107         (QScriptValuePrivate::isNull):
1108         (QScriptValuePrivate::isString):
1109         (QScriptValuePrivate::isUndefined):
1110         (QScriptValuePrivate::isFunction):
1111         (QScriptValuePrivate::toString):
1112         (QScriptValuePrivate::toNumber):
1113         (QScriptValuePrivate::toBool):
1114         (QScriptValuePrivate::toObject):
1115         (QScriptValuePrivate::equals):
1116         (QScriptValuePrivate::strictlyEquals):
1117         (QScriptValuePrivate::instanceOf):
1118         (QScriptValuePrivate::call):
1119         (QScriptValuePrivate::operator JSValueRef):
1120         (QScriptValuePrivate::operator JSObjectRef):
1121         (QScriptValuePrivate::setValue):
1122         (QScriptValuePrivate::inherits):
1123         (QScriptValuePrivate::refinedJSValue):
1124
1125 2010-05-31  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1126
1127         Reviewed by Simon Hausmann.
1128
1129         [Qt] Implement the simple text code path.
1130         https://bugs.webkit.org/show_bug.cgi?id=40077
1131
1132         Remove the FONT_FAST_PATH macro and use the Qt's
1133         fast text implementation instead of the one of WebKit.
1134
1135         The Qt::TextBypassShaping flag is used to tell Qt to
1136         only use the glyph advances.
1137
1138         Qt 4.7 is needed to get this flag thus the complex path is always
1139         used if QtWebKit is compiled against an earlier version.
1140
1141         Contrary to the WebKit's implementation, the complex code path
1142         is taken if the text is RightToLeft, justified or is formatted
1143         with non-zero letter or word spacing.
1144
1145         * wtf/Platform.h:
1146
1147 2010-06-11  Luiz Agostini  <luiz.agostini@openbossa.org>
1148
1149         Reviewed by Kenneth Rohde Christiansen.
1150
1151         add codePointCompare to JavaScriptCore.exp
1152         https://bugs.webkit.org/show_bug.cgi?id=40426
1153
1154         * JavaScriptCore.exp:
1155
1156 2010-06-10  Oliver Hunt  <oliver@apple.com>
1157
1158         Reviewed by Maciej Stachowiak.
1159
1160         Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode
1161         https://bugs.webkit.org/show_bug.cgi?id=40367
1162
1163         If we're in the slow case of right shift we must write the type tag as
1164         the only reason we hit this code path is because we know we're working
1165         with a double.  eg. we are guaranteed that the tag cannot be reused.
1166
1167         * jit/JITArithmetic32_64.cpp:
1168         (JSC::JIT::emitRightShiftSlowCase):
1169
1170 2010-06-10  Kwang Yul Seo  <skyul@company100.net>
1171
1172         Reviewed by Eric Seidel.
1173
1174         Remove weakRandomNumber
1175         https://bugs.webkit.org/show_bug.cgi?id=40291
1176
1177         weakRandomNumber is used nowhere. Currently, WeakRandom is used instead.
1178
1179         * wtf/RandomNumber.cpp:
1180         * wtf/RandomNumber.h:
1181
1182 2010-06-09  Alexey Proskuryakov  <ap@apple.com>
1183
1184         Reviewed by Brady Eidson.
1185
1186         Export StringImpl::ascii(). It might be not very useful, but it's a public function.
1187
1188         * JavaScriptCore.exp:
1189
1190 2010-06-09  Leandro Pereira  <leandro@profusion.mobi>
1191
1192         Reviewed by Adam Treat.
1193
1194         [EFL] Allow building core libraries as shared objects to speed up
1195         linking time on machines with small amounts of memory.
1196         http://webkit.org/b/39899
1197
1198         * CMakeLists.txt: If building with shared core, install the lib.
1199         * jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically.
1200         * wtf/CMakeLists.txt: If building with shared core, install the lib.
1201
1202 2010-06-09  Gabor Loki  <loki@webkit.org>
1203
1204         Reviewed by David Levin.
1205
1206         Remove some unused variable warnings from JITOpcodes
1207         https://bugs.webkit.org/show_bug.cgi?id=40298
1208
1209         * jit/JITOpcodes.cpp:
1210         (JSC::JIT::privateCompileCTINativeCall):
1211         * jit/JITOpcodes32_64.cpp:
1212         (JSC::JIT::privateCompileCTINativeCall):
1213
1214 2010-05-18  Yuzo Fujishima  <yuzo@google.com>
1215
1216         Reviewed by Shinichiro Hamaji.
1217
1218         Fix for Bug 34529 -  [CSSOM] issues with cssText and selectorText
1219         Add U16_LENGTH that is needed to implement CSS character serialization.
1220         https://bugs.webkit.org/show_bug.cgi?id=34529
1221
1222         * wtf/unicode/qt4/UnicodeQt4.h:
1223         * wtf/unicode/wince/UnicodeWince.h:
1224
1225 2010-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1226
1227         Unreviewed, rolling out r60830.
1228         http://trac.webkit.org/changeset/60830
1229         https://bugs.webkit.org/show_bug.cgi?id=40305
1230
1231         Broke the Windows build (Requested by abarth on #webkit).
1232
1233         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1234         * wtf/OwnPtrCommon.h:
1235         * wtf/brew/OwnPtrBrew.h: Removed.
1236         * wtf/win/OwnPtrWin.h: Removed.
1237
1238 2010-06-08  MORITA Hajime  <morrita@google.com>
1239
1240         Unreviewed. An attempt to fix test break.
1241
1242         * Configurations/FeatureDefines.xcconfig:
1243
1244 2010-06-08  Kwang Yul Seo  <skyul@company100.net>
1245
1246         Reviewed by Adam Barth.
1247
1248         Change OwnPtrCommon to include platform-specific headers
1249         https://bugs.webkit.org/show_bug.cgi?id=40279
1250
1251         Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
1252         Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
1253
1254         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1255         * wtf/OwnPtrCommon.h:
1256         * wtf/brew/OwnPtrBrew.h: Added.
1257         * wtf/win/OwnPtrWin.h: Added.
1258
1259 2010-06-07  MORITA Hajime  <morrita@google.com>
1260         
1261         Reviewed by Kent Tamura.
1262
1263         https://bugs.webkit.org/show_bug.cgi?id=40219
1264         [Mac] ENABLE_METER_TAG should be enabled
1265         
1266         Added ENABLE_METER_TAG.
1267
1268         * Configurations/FeatureDefines.xcconfig:
1269
1270 2010-06-07  Kwang Yul Seo  <skyul@company100.net>
1271
1272         Reviewed by Eric Seidel.
1273
1274         [BREWMP] Add more types to OwnPtr
1275         https://bugs.webkit.org/show_bug.cgi?id=39667
1276
1277         Add ISSL and ISocket to the list of OwnPtr-ed type.
1278
1279         * wtf/OwnPtrCommon.h:
1280         * wtf/brew/OwnPtrBrew.cpp:
1281         (WTF::deleteOwnedPtr):
1282
1283 2010-06-07  Benjamin Poulain  <benjamin.poulain@nokia.com>
1284
1285         Reviewed by Simon Hausmann.
1286
1287         [Qt] Crash when compiling on Snow Leopard and running on Leopard
1288         https://bugs.webkit.org/show_bug.cgi?id=31403
1289
1290         Disable the use of pthread_setname_np and other symbols
1291         when targetting Leopard.
1292
1293         Use the defines TARGETING_XX instead of BUILDING_ON_XX 
1294         for features that cannot be used before Snow Leopard.
1295
1296         * wtf/Platform.h:
1297
1298 2010-06-07  Gabor Loki  <loki@webkit.org>
1299
1300         Reviewed by NOBODY (JSVALUE32_64 build fix).
1301
1302         * jit/JITOpcodes32_64.cpp:
1303         (JSC::JIT::privateCompileCTINativeCall):
1304
1305 2010-06-06  Gavin Barraclough  <barraclough@apple.com>
1306
1307         Reviewed by NOBODY (windows build fix pt 2).
1308
1309         * JavaScriptCore.exp:
1310         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1311
1312 2010-06-06  Gavin Barraclough  <barraclough@apple.com>
1313
1314         Reviewed by NOBODY (windows build fix pt 1).
1315
1316         * JavaScriptCore.exp:
1317         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1318
1319 2010-06-06  Gavin Barraclough  <barraclough@apple.com>
1320
1321         Reviewed by Sam Weinig.
1322
1323         Bug 40214 - Clean up error construction / throwing in JSC.
1324         
1325         The one egregious insanity here is that creating an error requires
1326         a VM-entry-esqe-host call (the string argument is wrapped as a JS
1327         object & pushed on the RegisterFile, then unwrapped back to a
1328         UString).  Changing this also means you only require a global
1329         object, not an ExecState, to create an error.
1330
1331         The methods to create error objects are also parameterized
1332         requiring a switch on the type, which can be made cleaner and
1333         faster by moving to a separate method per error type.  Code to add
1334         divot information to error had been duplicated, and is coalesced
1335         back into a single function.
1336
1337         Convenience methods added to create & throw type & syntax error
1338         with a default error message, since this is a common case.
1339
1340         Also, errors are currently thrown either using
1341         "throwError(exec, error)" or "exec->setException(error)" - unify
1342         on the former, since this is more commonly used.  Add
1343         "throwVMError(exec, error)" equivalents, as a convenience for
1344         cases where the result was being wrapped in "JSValue::encode(...)".
1345
1346         * API/JSCallbackConstructor.cpp:
1347         (JSC::constructJSCallback):
1348         * API/JSCallbackFunction.cpp:
1349         (JSC::JSCallbackFunction::call):
1350         * API/JSCallbackObjectFunctions.h:
1351         (JSC::::getOwnPropertySlot):
1352         (JSC::::put):
1353         (JSC::::deleteProperty):
1354         (JSC::::construct):
1355         (JSC::::hasInstance):
1356         (JSC::::call):
1357         (JSC::::toNumber):
1358         (JSC::::toString):
1359         (JSC::::staticValueGetter):
1360         (JSC::::staticFunctionGetter):
1361         (JSC::::callbackGetter):
1362         * API/JSObjectRef.cpp:
1363         (JSObjectMakeError):
1364         * JavaScriptCore.exp:
1365         * bytecompiler/BytecodeGenerator.cpp:
1366         (JSC::BytecodeGenerator::emitNewError):
1367         (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
1368         * bytecompiler/BytecodeGenerator.h:
1369         * bytecompiler/NodesCodegen.cpp:
1370         (JSC::ThrowableExpressionData::emitThrowError):
1371         (JSC::RegExpNode::emitBytecode):
1372         (JSC::PostfixErrorNode::emitBytecode):
1373         (JSC::PrefixErrorNode::emitBytecode):
1374         (JSC::AssignErrorNode::emitBytecode):
1375         (JSC::ForInNode::emitBytecode):
1376         (JSC::ContinueNode::emitBytecode):
1377         (JSC::BreakNode::emitBytecode):
1378         (JSC::ReturnNode::emitBytecode):
1379         (JSC::LabelNode::emitBytecode):
1380         * interpreter/CallFrame.h:
1381         * interpreter/Interpreter.cpp:
1382         (JSC::Interpreter::throwException):
1383         (JSC::Interpreter::privateExecute):
1384         * jit/JITStubs.cpp:
1385         (JSC::DEFINE_STUB_FUNCTION):
1386         * jsc.cpp:
1387         (functionRun):
1388         (functionLoad):
1389         (functionCheckSyntax):
1390         * parser/Nodes.h:
1391         * runtime/ArrayConstructor.cpp:
1392         (JSC::constructArrayWithSizeQuirk):
1393         * runtime/ArrayPrototype.cpp:
1394         (JSC::arrayProtoFuncToString):
1395         (JSC::arrayProtoFuncToLocaleString):
1396         (JSC::arrayProtoFuncJoin):
1397         (JSC::arrayProtoFuncFilter):
1398         (JSC::arrayProtoFuncMap):
1399         (JSC::arrayProtoFuncEvery):
1400         (JSC::arrayProtoFuncForEach):
1401         (JSC::arrayProtoFuncSome):
1402         (JSC::arrayProtoFuncReduce):
1403         (JSC::arrayProtoFuncReduceRight):
1404         * runtime/BooleanPrototype.cpp:
1405         (JSC::booleanProtoFuncToString):
1406         (JSC::booleanProtoFuncValueOf):
1407         * runtime/DatePrototype.cpp:
1408         (JSC::dateProtoFuncToString):
1409         (JSC::dateProtoFuncToUTCString):
1410         (JSC::dateProtoFuncToISOString):
1411         (JSC::dateProtoFuncToDateString):
1412         (JSC::dateProtoFuncToTimeString):
1413         (JSC::dateProtoFuncToLocaleString):
1414         (JSC::dateProtoFuncToLocaleDateString):
1415         (JSC::dateProtoFuncToLocaleTimeString):
1416         (JSC::dateProtoFuncGetTime):
1417         (JSC::dateProtoFuncGetFullYear):
1418         (JSC::dateProtoFuncGetUTCFullYear):
1419         (JSC::dateProtoFuncToGMTString):
1420         (JSC::dateProtoFuncGetMonth):
1421         (JSC::dateProtoFuncGetUTCMonth):
1422         (JSC::dateProtoFuncGetDate):
1423         (JSC::dateProtoFuncGetUTCDate):
1424         (JSC::dateProtoFuncGetDay):
1425         (JSC::dateProtoFuncGetUTCDay):
1426         (JSC::dateProtoFuncGetHours):
1427         (JSC::dateProtoFuncGetUTCHours):
1428         (JSC::dateProtoFuncGetMinutes):
1429         (JSC::dateProtoFuncGetUTCMinutes):
1430         (JSC::dateProtoFuncGetSeconds):
1431         (JSC::dateProtoFuncGetUTCSeconds):
1432         (JSC::dateProtoFuncGetMilliSeconds):
1433         (JSC::dateProtoFuncGetUTCMilliseconds):
1434         (JSC::dateProtoFuncGetTimezoneOffset):
1435         (JSC::dateProtoFuncSetTime):
1436         (JSC::setNewValueFromTimeArgs):
1437         (JSC::setNewValueFromDateArgs):
1438         (JSC::dateProtoFuncSetMilliSeconds):
1439         (JSC::dateProtoFuncSetUTCMilliseconds):
1440         (JSC::dateProtoFuncSetSeconds):
1441         (JSC::dateProtoFuncSetUTCSeconds):
1442         (JSC::dateProtoFuncSetMinutes):
1443         (JSC::dateProtoFuncSetUTCMinutes):
1444         (JSC::dateProtoFuncSetHours):
1445         (JSC::dateProtoFuncSetUTCHours):
1446         (JSC::dateProtoFuncSetDate):
1447         (JSC::dateProtoFuncSetUTCDate):
1448         (JSC::dateProtoFuncSetMonth):
1449         (JSC::dateProtoFuncSetUTCMonth):
1450         (JSC::dateProtoFuncSetFullYear):
1451         (JSC::dateProtoFuncSetUTCFullYear):
1452         (JSC::dateProtoFuncSetYear):
1453         (JSC::dateProtoFuncGetYear):
1454         (JSC::dateProtoFuncToJSON):
1455         * runtime/Error.cpp:
1456         (JSC::createError):
1457         (JSC::createEvalError):
1458         (JSC::createRangeError):
1459         (JSC::createReferenceError):
1460         (JSC::createSyntaxError):
1461         (JSC::createTypeError):
1462         (JSC::createURIError):
1463         (JSC::addErrorSourceInfo):
1464         (JSC::addErrorDivotInfo):
1465         (JSC::addErrorInfo):
1466         (JSC::hasErrorInfo):
1467         (JSC::throwError):
1468         (JSC::throwTypeError):
1469         (JSC::throwSyntaxError):
1470         * runtime/Error.h:
1471         (JSC::throwVMError):
1472         (JSC::throwVMTypeError):
1473         * runtime/ErrorConstructor.cpp:
1474         (JSC::constructWithErrorConstructor):
1475         (JSC::callErrorConstructor):
1476         * runtime/ErrorConstructor.h:
1477         * runtime/ErrorInstance.cpp:
1478         (JSC::ErrorInstance::ErrorInstance):
1479         (JSC::ErrorInstance::create):
1480         * runtime/ErrorInstance.h:
1481         * runtime/ErrorPrototype.cpp:
1482         (JSC::ErrorPrototype::ErrorPrototype):
1483         * runtime/ExceptionHelpers.cpp:
1484         (JSC::createStackOverflowError):
1485         (JSC::createUndefinedVariableError):
1486         (JSC::createInvalidParamError):
1487         (JSC::createNotAConstructorError):
1488         (JSC::createNotAFunctionError):
1489         (JSC::createNotAnObjectError):
1490         (JSC::throwOutOfMemoryError):
1491         * runtime/ExceptionHelpers.h:
1492         * runtime/Executable.cpp:
1493         (JSC::EvalExecutable::compile):
1494         (JSC::ProgramExecutable::checkSyntax):
1495         (JSC::ProgramExecutable::compile):
1496         * runtime/FunctionConstructor.cpp:
1497         (JSC::constructFunction):
1498         * runtime/FunctionPrototype.cpp:
1499         (JSC::functionProtoFuncToString):
1500         (JSC::functionProtoFuncApply):
1501         (JSC::functionProtoFuncCall):
1502         * runtime/Identifier.cpp:
1503         (JSC::Identifier::from):
1504         * runtime/Identifier.h:
1505         * runtime/JSArray.cpp:
1506         (JSC::JSArray::put):
1507         * runtime/JSFunction.cpp:
1508         (JSC::callHostFunctionAsConstructor):
1509         * runtime/JSGlobalObjectFunctions.cpp:
1510         (JSC::encode):
1511         (JSC::decode):
1512         (JSC::globalFuncEval):
1513         * runtime/JSONObject.cpp:
1514         (JSC::Stringifier::appendStringifiedValue):
1515         (JSC::Walker::walk):
1516         (JSC::JSONProtoFuncParse):
1517         (JSC::JSONProtoFuncStringify):
1518         * runtime/JSObject.cpp:
1519         (JSC::throwSetterError):
1520         (JSC::JSObject::put):
1521         (JSC::JSObject::putWithAttributes):
1522         (JSC::JSObject::defaultValue):
1523         (JSC::JSObject::hasInstance):
1524         (JSC::JSObject::defineOwnProperty):
1525         * runtime/JSObject.h:
1526         * runtime/JSValue.cpp:
1527         (JSC::JSValue::toObjectSlowCase):
1528         (JSC::JSValue::synthesizeObject):
1529         (JSC::JSValue::synthesizePrototype):
1530         * runtime/NativeErrorConstructor.cpp:
1531         (JSC::constructWithNativeErrorConstructor):
1532         (JSC::callNativeErrorConstructor):
1533         * runtime/NativeErrorConstructor.h:
1534         * runtime/NumberPrototype.cpp:
1535         (JSC::numberProtoFuncToString):
1536         (JSC::numberProtoFuncToLocaleString):
1537         (JSC::numberProtoFuncValueOf):
1538         (JSC::numberProtoFuncToFixed):
1539         (JSC::numberProtoFuncToExponential):
1540         (JSC::numberProtoFuncToPrecision):
1541         * runtime/ObjectConstructor.cpp:
1542         (JSC::objectConstructorGetPrototypeOf):
1543         (JSC::objectConstructorGetOwnPropertyDescriptor):
1544         (JSC::objectConstructorGetOwnPropertyNames):
1545         (JSC::objectConstructorKeys):
1546         (JSC::toPropertyDescriptor):
1547         (JSC::objectConstructorDefineProperty):
1548         (JSC::objectConstructorDefineProperties):
1549         (JSC::objectConstructorCreate):
1550         * runtime/ObjectPrototype.cpp:
1551         (JSC::objectProtoFuncDefineGetter):
1552         (JSC::objectProtoFuncDefineSetter):
1553         * runtime/RegExpConstructor.cpp:
1554         (JSC::constructRegExp):
1555         * runtime/RegExpObject.cpp:
1556         (JSC::RegExpObject::match):
1557         * runtime/RegExpPrototype.cpp:
1558         (JSC::regExpProtoFuncTest):
1559         (JSC::regExpProtoFuncExec):
1560         (JSC::regExpProtoFuncCompile):
1561         (JSC::regExpProtoFuncToString):
1562         * runtime/StringPrototype.cpp:
1563         (JSC::stringProtoFuncToString):
1564
1565 2010-06-05  Kwang Yul Seo  <skyul@company100.net>
1566
1567         Reviewed by Eric Seidel.
1568
1569         [BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx
1570         https://bugs.webkit.org/show_bug.cgi?id=39710
1571
1572         Build fix for BREW MP.
1573
1574         * wtf/MathExtras.h:
1575
1576 2010-06-04  Adam Barth  <abarth@webkit.org>
1577
1578         Reviewed by Darin Adler.
1579
1580         HTML5 parser should be within 1% of old parser performance
1581         https://bugs.webkit.org/show_bug.cgi?id=40172
1582
1583         Fix cast in this operator= to allow for assignment between vectors with
1584         different inline capacities (as clearly intended by its author).
1585
1586         * wtf/Vector.h:
1587         (WTF::::operator):
1588
1589 2010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1590
1591         Reviewed by Kenneth Rohde Christiansen.
1592
1593         New QtScript API; QScriptValue::instanceOf.
1594
1595         New function create an easy way to check value's prototype hierarchy.
1596
1597         [Qt] QScriptValue should have an instanceOf method
1598         https://bugs.webkit.org/show_bug.cgi?id=40120
1599
1600         * qt/api/qscriptvalue.cpp:
1601         (QScriptValue::instanceOf):
1602         * qt/api/qscriptvalue.h:
1603         * qt/api/qscriptvalue_p.h:
1604         (QScriptValuePrivate::instanceOf):
1605         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
1606         * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
1607         (tst_QScriptValue::instanceOf_initData):
1608         (tst_QScriptValue::instanceOf_makeData):
1609         (tst_QScriptValue::instanceOf_test):
1610
1611 2010-06-04  Gavin Barraclough  <barraclough@apple.com>
1612
1613         Reviewed by NOBODY (interpreter build fix).
1614
1615         * interpreter/Interpreter.cpp:
1616         (JSC::Interpreter::privateExecute):
1617
1618 2010-06-04  Mark Rowe  <mrowe@apple.com>
1619
1620         Silence some warnings seen on the build bot.
1621
1622         * JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline.
1623         * JavaScriptCore.JSVALUE32only.exp: Ditto.
1624         * JavaScriptCore.JSVALUE64only.exp: Ditto.
1625         * JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't
1626         complain about not knowing how to compile them.
1627
1628 2010-06-04  Gavin Barraclough  <barraclough@apple.com>
1629
1630         Reviewed by Oliver Hunt.
1631
1632         Bug 40187 - Change function signature of NativeConstructor to match NativeFunction
1633
1634         Mostly for consistency, but constructor & args arguments are redundant,
1635         and this will help if we wish to be able to JIT calls to more constructors.
1636
1637         * API/JSCallbackConstructor.cpp:
1638         (JSC::constructJSCallback):
1639         * API/JSCallbackObject.h:
1640         * API/JSCallbackObjectFunctions.h:
1641         (JSC::::construct):
1642         * interpreter/Interpreter.cpp:
1643         (JSC::Interpreter::executeConstruct):
1644         * interpreter/Interpreter.h:
1645         * jit/JITStubs.cpp:
1646         (JSC::DEFINE_STUB_FUNCTION):
1647         * runtime/ArrayConstructor.cpp:
1648         (JSC::constructWithArrayConstructor):
1649         * runtime/BooleanConstructor.cpp:
1650         (JSC::constructWithBooleanConstructor):
1651         * runtime/ConstructData.cpp:
1652         (JSC::construct):
1653         * runtime/ConstructData.h:
1654         * runtime/DateConstructor.cpp:
1655         (JSC::constructWithDateConstructor):
1656         * runtime/Error.cpp:
1657         (JSC::constructNativeError):
1658         (JSC::Error::create):
1659         * runtime/ErrorConstructor.cpp:
1660         (JSC::constructWithErrorConstructor):
1661         * runtime/FunctionConstructor.cpp:
1662         (JSC::constructWithFunctionConstructor):
1663         * runtime/NativeErrorConstructor.cpp:
1664         (JSC::constructWithNativeErrorConstructor):
1665         * runtime/NativeErrorConstructor.h:
1666         (JSC::NativeErrorConstructor::errorStructure):
1667         * runtime/NumberConstructor.cpp:
1668         (JSC::constructWithNumberConstructor):
1669         * runtime/ObjectConstructor.cpp:
1670         (JSC::constructWithObjectConstructor):
1671         * runtime/RegExpConstructor.cpp:
1672         (JSC::constructWithRegExpConstructor):
1673         * runtime/StringConstructor.cpp:
1674         (JSC::constructWithStringConstructor):
1675
1676 2010-06-04  Tony Gentilcore  <tonyg@chromium.org>
1677
1678         Reviewed by Adam Barth.
1679
1680         Add a takeFirst() method to Deque and use it where appropriate.
1681         https://bugs.webkit.org/show_bug.cgi?id=40089
1682
1683         * wtf/Deque.h:
1684         (WTF::::takeFirst):
1685         * wtf/MainThread.cpp:
1686         (WTF::dispatchFunctionsFromMainThread):
1687         * wtf/MessageQueue.h:
1688         (WTF::::tryGetMessage):
1689
1690 2010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1691
1692         Reviewed by Kenneth Rohde Christiansen.
1693
1694         Remove a QEXPECT_FAIL flag from an autotest.
1695
1696         Test tst_QScriptEngine::globalObject pass after 36600 bug
1697         fix have been applied.
1698
1699         [Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed.
1700         https://bugs.webkit.org/show_bug.cgi?id=40114
1701
1702         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
1703         (tst_QScriptEngine::globalObject):
1704
1705 2010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1706
1707         Reviewed by Kenneth Rohde Christiansen.
1708
1709         Fix QScriptValue::equals.
1710
1711         Handling for a few edge cases were added. Now comparison between
1712         NaN, an invalid objects should works as supposed.
1713
1714         [Qt] QScriptValue::equals problems
1715         https://bugs.webkit.org/show_bug.cgi?id=40110
1716
1717         * qt/api/qscriptvalue.cpp:
1718         (QScriptValue::equals):
1719         * qt/api/qscriptvalue_p.h:
1720         (QScriptValuePrivate::equals):
1721         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
1722         * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
1723         (tst_QScriptValue::equals_initData):
1724         (tst_QScriptValue::equals_makeData):
1725         (tst_QScriptValue::equals_test):
1726
1727 2010-06-03  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1728
1729         Reviewed by Kenneth Rohde Christiansen.
1730
1731         New states in QScriptValuePrivate.
1732
1733         The CSpecial state was divided into CNull and CUndefined. It simplify
1734         the QScriptValue code by avoiding a few "cast" and "if".
1735         Moreover the MSVS compiler didn't like casting between a double and an
1736         enum which is avoided now.
1737
1738         [Qt] The QScriptValuePrivate::CSpecial is too generic.
1739         https://bugs.webkit.org/show_bug.cgi?id=40067
1740
1741         * qt/api/qscriptvalue_p.h:
1742         (QScriptValuePrivate::):
1743         (QScriptValuePrivate::QScriptValuePrivate):
1744         (QScriptValuePrivate::isNull):
1745         (QScriptValuePrivate::isUndefined):
1746         (QScriptValuePrivate::toString):
1747         (QScriptValuePrivate::toNumber):
1748         (QScriptValuePrivate::toBool):
1749         (QScriptValuePrivate::toObject):
1750         (QScriptValuePrivate::assignEngine):
1751         (QScriptValuePrivate::isNumberBased):
1752
1753 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
1754
1755         Reviewed by NOBODY (Qt build fix).
1756
1757         * wtf/Platform.h:
1758
1759 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
1760
1761         Reviewed by Mark Rowe.
1762
1763         Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms
1764         This was fixed in bug #40094.
1765
1766         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1767         * wtf/Platform.h:
1768
1769 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
1770
1771         Reviewed by NOBODY (Interpreter build fix).
1772
1773         * JavaScriptCore.JSVALUE32_64only.exp:
1774         * JavaScriptCore.JSVALUE32only.exp:
1775         * JavaScriptCore.JSVALUE64only.exp:
1776         * interpreter/Interpreter.cpp:
1777         (JSC::Interpreter::privateExecute):
1778
1779 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
1780
1781         Reviewed by NOBODY (windows build fix II).
1782
1783         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1784
1785 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
1786
1787         Reviewed by NOBODY (windows build fix).
1788
1789         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1790
1791 2010-06-02  Gavin Barraclough  <barraclough@apple.com>
1792
1793         Reviewed by Oliver Hunt.
1794
1795         Bug 40094 - The return type of NativeFunction should be EncodedJSValue
1796         On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
1797
1798         * API/JSCallbackFunction.cpp:
1799         (JSC::JSCallbackFunction::call):
1800         * API/JSCallbackFunction.h:
1801         * API/JSCallbackObject.h:
1802         * API/JSCallbackObjectFunctions.h:
1803         (JSC::::call):
1804         * JavaScriptCore.exp:
1805         * interpreter/Interpreter.cpp:
1806         (JSC::Interpreter::executeCall):
1807         * jit/JITStubs.cpp:
1808         (JSC::DEFINE_STUB_FUNCTION):
1809         * jit/JITStubs.h:
1810         * jsc.cpp:
1811         (functionPrint):
1812         (functionDebug):
1813         (functionGC):
1814         (functionVersion):
1815         (functionRun):
1816         (functionLoad):
1817         (functionCheckSyntax):
1818         (functionSetSamplingFlags):
1819         (functionClearSamplingFlags):
1820         (functionReadline):
1821         (functionQuit):
1822         * runtime/ArrayConstructor.cpp:
1823         (JSC::callArrayConstructor):
1824         (JSC::arrayConstructorIsArray):
1825         * runtime/ArrayPrototype.cpp:
1826         (JSC::arrayProtoFuncToString):
1827         (JSC::arrayProtoFuncToLocaleString):
1828         (JSC::arrayProtoFuncJoin):
1829         (JSC::arrayProtoFuncConcat):
1830         (JSC::arrayProtoFuncPop):
1831         (JSC::arrayProtoFuncPush):
1832         (JSC::arrayProtoFuncReverse):
1833         (JSC::arrayProtoFuncShift):
1834         (JSC::arrayProtoFuncSlice):
1835         (JSC::arrayProtoFuncSort):
1836         (JSC::arrayProtoFuncSplice):
1837         (JSC::arrayProtoFuncUnShift):
1838         (JSC::arrayProtoFuncFilter):
1839         (JSC::arrayProtoFuncMap):
1840         (JSC::arrayProtoFuncEvery):
1841         (JSC::arrayProtoFuncForEach):
1842         (JSC::arrayProtoFuncSome):
1843         (JSC::arrayProtoFuncReduce):
1844         (JSC::arrayProtoFuncReduceRight):
1845         (JSC::arrayProtoFuncIndexOf):
1846         (JSC::arrayProtoFuncLastIndexOf):
1847         * runtime/BooleanConstructor.cpp:
1848         (JSC::callBooleanConstructor):
1849         * runtime/BooleanPrototype.cpp:
1850         (JSC::booleanProtoFuncToString):
1851         (JSC::booleanProtoFuncValueOf):
1852         * runtime/CallData.h:
1853         * runtime/DateConstructor.cpp:
1854         (JSC::callDate):
1855         (JSC::dateParse):
1856         (JSC::dateNow):
1857         (JSC::dateUTC):
1858         * runtime/DatePrototype.cpp:
1859         (JSC::dateProtoFuncToString):
1860         (JSC::dateProtoFuncToUTCString):
1861         (JSC::dateProtoFuncToISOString):
1862         (JSC::dateProtoFuncToDateString):
1863         (JSC::dateProtoFuncToTimeString):
1864         (JSC::dateProtoFuncToLocaleString):
1865         (JSC::dateProtoFuncToLocaleDateString):
1866         (JSC::dateProtoFuncToLocaleTimeString):
1867         (JSC::dateProtoFuncGetTime):
1868         (JSC::dateProtoFuncGetFullYear):
1869         (JSC::dateProtoFuncGetUTCFullYear):
1870         (JSC::dateProtoFuncToGMTString):
1871         (JSC::dateProtoFuncGetMonth):
1872         (JSC::dateProtoFuncGetUTCMonth):
1873         (JSC::dateProtoFuncGetDate):
1874         (JSC::dateProtoFuncGetUTCDate):
1875         (JSC::dateProtoFuncGetDay):
1876         (JSC::dateProtoFuncGetUTCDay):
1877         (JSC::dateProtoFuncGetHours):
1878         (JSC::dateProtoFuncGetUTCHours):
1879         (JSC::dateProtoFuncGetMinutes):
1880         (JSC::dateProtoFuncGetUTCMinutes):
1881         (JSC::dateProtoFuncGetSeconds):
1882         (JSC::dateProtoFuncGetUTCSeconds):
1883         (JSC::dateProtoFuncGetMilliSeconds):
1884         (JSC::dateProtoFuncGetUTCMilliseconds):
1885         (JSC::dateProtoFuncGetTimezoneOffset):
1886         (JSC::dateProtoFuncSetTime):
1887         (JSC::dateProtoFuncSetMilliSeconds):
1888         (JSC::dateProtoFuncSetUTCMilliseconds):
1889         (JSC::dateProtoFuncSetSeconds):
1890         (JSC::dateProtoFuncSetUTCSeconds):
1891         (JSC::dateProtoFuncSetMinutes):
1892         (JSC::dateProtoFuncSetUTCMinutes):
1893         (JSC::dateProtoFuncSetHours):
1894         (JSC::dateProtoFuncSetUTCHours):
1895         (JSC::dateProtoFuncSetDate):
1896         (JSC::dateProtoFuncSetUTCDate):
1897         (JSC::dateProtoFuncSetMonth):
1898         (JSC::dateProtoFuncSetUTCMonth):
1899         (JSC::dateProtoFuncSetFullYear):
1900         (JSC::dateProtoFuncSetUTCFullYear):
1901         (JSC::dateProtoFuncSetYear):
1902         (JSC::dateProtoFuncGetYear):
1903         (JSC::dateProtoFuncToJSON):
1904         * runtime/ErrorConstructor.cpp:
1905         (JSC::callErrorConstructor):
1906         * runtime/ErrorPrototype.cpp:
1907         (JSC::errorProtoFuncToString):
1908         * runtime/FunctionConstructor.cpp:
1909         (JSC::callFunctionConstructor):
1910         * runtime/FunctionPrototype.cpp:
1911         (JSC::callFunctionPrototype):
1912         (JSC::functionProtoFuncToString):
1913         (JSC::functionProtoFuncApply):
1914         (JSC::functionProtoFuncCall):
1915         * runtime/JSCell.h:
1916         (JSC::getCallData):
1917         (JSC::getConstructData):
1918         * runtime/JSFunction.cpp:
1919         (JSC::callHostFunctionAsConstructor):
1920         * runtime/JSFunction.h:
1921         * runtime/JSGlobalObjectFunctions.cpp:
1922         (JSC::globalFuncEval):
1923         (JSC::globalFuncParseInt):
1924         (JSC::globalFuncParseFloat):
1925         (JSC::globalFuncIsNaN):
1926         (JSC::globalFuncIsFinite):
1927         (JSC::globalFuncDecodeURI):
1928         (JSC::globalFuncDecodeURIComponent):
1929         (JSC::globalFuncEncodeURI):
1930         (JSC::globalFuncEncodeURIComponent):
1931         (JSC::globalFuncEscape):
1932         (JSC::globalFuncUnescape):
1933         (JSC::globalFuncJSCPrint):
1934         * runtime/JSGlobalObjectFunctions.h:
1935         * runtime/JSONObject.cpp:
1936         (JSC::JSONProtoFuncParse):
1937         (JSC::JSONProtoFuncStringify):
1938         * runtime/JSObject.cpp:
1939         (JSC::callDefaultValueFunction):
1940         * runtime/JSValue.h:
1941         * runtime/MathObject.cpp:
1942         (JSC::mathProtoFuncAbs):
1943         (JSC::mathProtoFuncACos):
1944         (JSC::mathProtoFuncASin):
1945         (JSC::mathProtoFuncATan):
1946         (JSC::mathProtoFuncATan2):
1947         (JSC::mathProtoFuncCeil):
1948         (JSC::mathProtoFuncCos):
1949         (JSC::mathProtoFuncExp):
1950         (JSC::mathProtoFuncFloor):
1951         (JSC::mathProtoFuncLog):
1952         (JSC::mathProtoFuncMax):
1953         (JSC::mathProtoFuncMin):
1954         (JSC::mathProtoFuncPow):
1955         (JSC::mathProtoFuncRandom):
1956         (JSC::mathProtoFuncRound):
1957         (JSC::mathProtoFuncSin):
1958         (JSC::mathProtoFuncSqrt):
1959         (JSC::mathProtoFuncTan):
1960         * runtime/NativeErrorConstructor.cpp:
1961         (JSC::callNativeErrorConstructor):
1962         * runtime/NumberConstructor.cpp:
1963         (JSC::callNumberConstructor):
1964         * runtime/NumberPrototype.cpp:
1965         (JSC::numberProtoFuncToString):
1966         (JSC::numberProtoFuncToLocaleString):
1967         (JSC::numberProtoFuncValueOf):
1968         (JSC::numberProtoFuncToFixed):
1969         (JSC::numberProtoFuncToExponential):
1970         (JSC::numberProtoFuncToPrecision):
1971         * runtime/ObjectConstructor.cpp:
1972         (JSC::callObjectConstructor):
1973         (JSC::objectConstructorGetPrototypeOf):
1974         (JSC::objectConstructorGetOwnPropertyDescriptor):
1975         (JSC::objectConstructorGetOwnPropertyNames):
1976         (JSC::objectConstructorKeys):
1977         (JSC::toPropertyDescriptor):
1978         (JSC::objectConstructorDefineProperty):
1979         (JSC::objectConstructorDefineProperties):
1980         (JSC::objectConstructorCreate):
1981         * runtime/ObjectPrototype.cpp:
1982         (JSC::objectProtoFuncValueOf):
1983         (JSC::objectProtoFuncHasOwnProperty):
1984         (JSC::objectProtoFuncIsPrototypeOf):
1985         (JSC::objectProtoFuncDefineGetter):
1986         (JSC::objectProtoFuncDefineSetter):
1987         (JSC::objectProtoFuncLookupGetter):
1988         (JSC::objectProtoFuncLookupSetter):
1989         (JSC::objectProtoFuncPropertyIsEnumerable):
1990         (JSC::objectProtoFuncToLocaleString):
1991         (JSC::objectProtoFuncToString):
1992         * runtime/ObjectPrototype.h:
1993         * runtime/RegExpConstructor.cpp:
1994         (JSC::callRegExpConstructor):
1995         * runtime/RegExpObject.cpp:
1996         (JSC::callRegExpObject):
1997         * runtime/RegExpPrototype.cpp:
1998         (JSC::regExpProtoFuncTest):
1999         (JSC::regExpProtoFuncExec):
2000         (JSC::regExpProtoFuncCompile):
2001         (JSC::regExpProtoFuncToString):
2002         * runtime/StringConstructor.cpp:
2003         (JSC::stringFromCharCode):
2004         (JSC::callStringConstructor):
2005         * runtime/StringPrototype.cpp:
2006         (JSC::stringProtoFuncReplace):
2007         (JSC::stringProtoFuncToString):
2008         (JSC::stringProtoFuncCharAt):
2009         (JSC::stringProtoFuncCharCodeAt):
2010         (JSC::stringProtoFuncConcat):
2011         (JSC::stringProtoFuncIndexOf):
2012         (JSC::stringProtoFuncLastIndexOf):
2013         (JSC::stringProtoFuncMatch):
2014         (JSC::stringProtoFuncSearch):
2015         (JSC::stringProtoFuncSlice):
2016         (JSC::stringProtoFuncSplit):
2017         (JSC::stringProtoFuncSubstr):
2018         (JSC::stringProtoFuncSubstring):
2019         (JSC::stringProtoFuncToLowerCase):
2020         (JSC::stringProtoFuncToUpperCase):
2021         (JSC::stringProtoFuncLocaleCompare):
2022         (JSC::stringProtoFuncBig):
2023         (JSC::stringProtoFuncSmall):
2024         (JSC::stringProtoFuncBlink):
2025         (JSC::stringProtoFuncBold):
2026         (JSC::stringProtoFuncFixed):
2027         (JSC::stringProtoFuncItalics):
2028         (JSC::stringProtoFuncStrike):
2029         (JSC::stringProtoFuncSub):
2030         (JSC::stringProtoFuncSup):
2031         (JSC::stringProtoFuncFontcolor):
2032         (JSC::stringProtoFuncFontsize):
2033         (JSC::stringProtoFuncAnchor):
2034         (JSC::stringProtoFuncLink):
2035         (JSC::stringProtoFuncTrim):
2036         (JSC::stringProtoFuncTrimLeft):
2037         (JSC::stringProtoFuncTrimRight):
2038
2039 2010-06-02  Mark Rowe  <mrowe@apple.com>
2040
2041         Reviewed by Gavin Barraclough.
2042
2043         Add value-representation specific sections to the mac export file.
2044
2045         * Configurations/JavaScriptCore.xcconfig:
2046         * DerivedSources.make:
2047         * JavaScriptCore.JSVALUE32_64only.exp: Added.
2048         * JavaScriptCore.JSVALUE32only.exp: Added.
2049         * JavaScriptCore.JSVALUE64only.exp: Added.
2050         * JavaScriptCore.xcodeproj/project.pbxproj:
2051
2052 2010-06-02  Mark Rowe  <mrowe@apple.com>
2053
2054         Reviewed by Gavin Barraclough.
2055
2056         <rdar://problem/8054988> Work around an LLVM GCC code generation bug that results in crashes inside PCRE.
2057
2058         * pcre/pcre_exec.cpp:
2059         (repeatInformationFromInstructionOffset): Change the type of instructionOffset to int.  There's no good
2060         reason for it to be a short, and using int prevents this code from triggering the LLVM GCC bug.
2061
2062 2010-06-02  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2063
2064         Reviewed by Kenneth Rohde Christiansen.
2065
2066         Fix the QScriptValue::strictlyEquals function.
2067
2068         Handling for a few edge cases was added.
2069
2070         New autotest that covers the QScriptValue::strictlyEquals function.
2071
2072         [Qt] QScriptValue::strictlyEquals is broken
2073         https://bugs.webkit.org/show_bug.cgi?id=36600
2074
2075         * qt/api/qscriptvalue.cpp:
2076         (QScriptValue::strictlyEquals):
2077         * qt/api/qscriptvalue_p.h:
2078         (QScriptValuePrivate::strictlyEquals):
2079         * qt/tests/qscriptvalue/qscriptvalue.pro:
2080         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
2081         * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: Added.
2082         (tst_QScriptValue::strictlyEquals_initData):
2083         (tst_QScriptValue::strictlyEquals_makeData):
2084         (tst_QScriptValue::strictlyEquals_test):
2085
2086 2010-06-02  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2087
2088         Reviewed by Kenneth Rohde Christiansen.
2089
2090         New function QScriptEngine::newObject.
2091
2092         The function creates a object of class Object and returns it
2093         as a QScriptValue.
2094
2095         [Qt] QScriptEngine API should contain a newObject function
2096         https://bugs.webkit.org/show_bug.cgi?id=39114
2097
2098         * qt/api/qscriptengine.cpp:
2099         (QScriptEngine::newObject):
2100         * qt/api/qscriptengine.h:
2101         * qt/api/qscriptengine_p.cpp:
2102         (QScriptEnginePrivate::newObject):
2103         * qt/api/qscriptengine_p.h:
2104         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
2105         (tst_QScriptEngine::newObject):
2106
2107 2010-06-02  Gabor Loki  <loki@webkit.org>
2108
2109         Reviewed by Gavin Barraclough.
2110         https://bugs.webkit.org/show_bug.cgi?id=40011
2111
2112         Thumb-2 build fix: The offset parameter of ldrh should be encoded as an
2113         imm12 immediate constant in load16. If it is not fit in the instruction
2114         a temporary register has to be used.
2115
2116         * assembler/MacroAssemblerARMv7.h:
2117         (JSC::MacroAssemblerARMv7::load16):
2118
2119 2010-06-02  Sterling Swigart  <sswigart@google.com>
2120
2121         Reviewed by David Levin.
2122
2123         Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches.
2124         https://bugs.webkit.org/show_bug.cgi?id=39906
2125
2126         * Configurations/FeatureDefines.xcconfig:
2127
2128 2010-06-01  Gavin Barraclough  <barraclough@apple.com>
2129
2130         Reviewed by Sam Weinig.
2131
2132         Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together
2133
2134         This is a useful stepping stone towards reversing argument order.
2135
2136         * bytecompiler/BytecodeGenerator.cpp:
2137         (JSC::BytecodeGenerator::BytecodeGenerator):
2138         (JSC::BytecodeGenerator::addParameter):
2139         (JSC::BytecodeGenerator::emitCall):
2140         (JSC::BytecodeGenerator::emitCallEval):
2141         (JSC::BytecodeGenerator::emitConstruct):
2142         * bytecompiler/BytecodeGenerator.h:
2143         (JSC::CallArguments::thisRegister):
2144         (JSC::CallArguments::argumentRegister):
2145         (JSC::CallArguments::callFrame):
2146         (JSC::CallArguments::count):
2147         (JSC::BytecodeGenerator::shouldEmitProfileHooks):
2148         * bytecompiler/NodesCodegen.cpp:
2149         (JSC::NewExprNode::emitBytecode):
2150         (JSC::CallArguments::CallArguments):
2151         (JSC::EvalFunctionCallNode::emitBytecode):
2152         (JSC::FunctionCallValueNode::emitBytecode):
2153         (JSC::FunctionCallResolveNode::emitBytecode):
2154         (JSC::FunctionCallBracketNode::emitBytecode):
2155         (JSC::FunctionCallDotNode::emitBytecode):
2156         (JSC::CallFunctionCallDotNode::emitBytecode):
2157         (JSC::ApplyFunctionCallDotNode::emitBytecode):
2158
2159 2010-06-01  Yong Li  <yoli@rim.com>
2160
2161         Reviewed by Darin Adler.
2162
2163         Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex.
2164         https://bugs.webkit.org/show_bug.cgi?id=39893
2165
2166         * wtf/ThreadingPthreads.cpp:
2167         (WTF::Mutex::Mutex):
2168
2169 2010-06-01  Kwang Yul Seo  <skyul@company100.net>
2170
2171         Reviewed by Xan Lopez.
2172
2173         [GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap
2174         https://bugs.webkit.org/show_bug.cgi?id=39831
2175
2176         Use DEFINE_STATIC_LOCAL for static local variables.
2177
2178         * wtf/gtk/ThreadingGtk.cpp:
2179         (WTF::threadMapMutex):
2180         (WTF::threadMap):
2181         (WTF::identifierByGthreadHandle):
2182
2183 2010-06-01  Kent Tamura  <tkent@chromium.org>
2184
2185         Reviewed by Shinichiro Hamaji.
2186
2187         Fix style errors of dtoa
2188         https://bugs.webkit.org/show_bug.cgi?id=39972
2189
2190         Fix all errors reported by check-webkit-style.
2191
2192         * wtf/dtoa.cpp:
2193         * wtf/dtoa.h:
2194
2195 2010-05-30  Darin Adler  <darin@apple.com>
2196
2197         Reviewed by Sam Weinig.
2198
2199         * wtf/OwnArrayPtr.h:
2200         (WTF::OwnArrayPtr::set): Fix the assertion in here to match the one in OwnPtr.
2201         At some point someone fixed the "asserts when assigning to 0 and the pointer is
2202         already 0" issue in OwnPtr but forgot to do it here.
2203
2204 2010-05-29  Geoffrey Garen  <ggaren@apple.com>
2205
2206         Windows build fix: Updated exported symbols.
2207         
2208         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2209
2210 2010-05-29  Geoffrey Garen  <ggaren@apple.com>
2211
2212         Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I
2213         can figure out why it's crashing.
2214
2215         * wtf/Platform.h:
2216
2217 2010-05-29  Geoffrey Garen  <ggaren@apple.com>
2218
2219         Fixed Windows crash seen on buildbot.
2220
2221         * jit/JITOpcodes32_64.cpp:
2222         (JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first
2223         argument in ecx.
2224
2225 2010-05-28  Geoffrey Garen  <ggaren@apple.com>
2226
2227         Windows build fix: Updated exported symbols.
2228
2229         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2230
2231 2010-05-28  Geoffrey Garen  <ggaren@apple.com>
2232
2233         Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL
2234         is disabled.
2235
2236         * runtime/Lookup.cpp:
2237         (JSC::setUpStaticFunctionSlot):
2238         * runtime/Lookup.h:
2239         * wtf/Platform.h:
2240
2241 2010-05-28  Geoffrey Garen  <ggaren@apple.com>
2242
2243         Windows build fix: Updated exported symbols.
2244
2245         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2246
2247 2010-05-28  Geoffrey Garen  <ggaren@apple.com>
2248
2249         Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
2250
2251         Simplified the host calling convention.
2252         
2253         22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host
2254         function calls.
2255         
2256         No change on SunSpider.
2257         
2258         All JS calls (but not constructs, yet) now go through the normal JS
2259         calling convention via the RegisterFile. As a result, the host calling
2260         convention, which used to be this
2261
2262             JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&)
2263             
2264         is now this
2265
2266             JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*)
2267             
2268         Callee, 'this', and argument access all hapen relative to the ExecState*,
2269         which is a pointer into the RegisterFile.
2270         
2271         This patch comes in two parts.
2272         
2273         PART ONE: Functional code changes.
2274         
2275         * wtf/Platform.h: Disabled optimized calls on platforms I didn't test.
2276         We can re-enable once we verify that host calls on these platforms are
2277         correct.
2278
2279         * debugger/DebuggerCallFrame.cpp:
2280         (JSC::DebuggerCallFrame::functionName):
2281         (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to
2282         ExecState::callee().
2283
2284         (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue().
2285
2286         * interpreter/CallFrame.cpp:
2287         * interpreter/CallFrame.h:
2288         (JSC::ExecState::callee):
2289         (JSC::ExecState::scopeChain):
2290         (JSC::ExecState::init): Changed callee() to be JSObject* instead of
2291         JSFunction* -- now, it might be some other callable host object.
2292
2293         (JSC::ExecState::hostThisRegister):
2294         (JSC::ExecState::hostThisValue):
2295         (JSC::ExecState::argumentCount):
2296         (JSC::ExecState::argumentCountIncludingThis):
2297         (JSC::ExecState::argument):
2298         (JSC::ExecState::setArgumentCountIncludingThis):
2299         (JSC::ExecState::setCallee): Added convenient accessors for arguments
2300         from within a host function. Removed thisValue() because it was too
2301         tempting to use incorrectly, and it only had one or two clients, anyway.
2302
2303         * interpreter/Interpreter.cpp:
2304         (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue().
2305
2306         (JSC::Interpreter::throwException): Be sure to shrink the register file
2307         before invoking the exception handler, to reduce the chances that the
2308         handler will re-throw in the case of stack overflow. (Re-throwing is now
2309         more likely than it used to be, since standardizing the calling convention
2310         implicitly added stack overflow checks to some places where they used to be missing.)
2311
2312         (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope.
2313         Updated for CallFrame::init API change.
2314
2315         (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope.
2316         Updated for CallFrame::init API change. Added support for calling a host
2317         function.
2318
2319         (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope.
2320         Updated for CallFrame::init API change. 
2321
2322         (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change. 
2323
2324         (JSC::Interpreter::privateExecute): Updated for CallFrame::init API change.
2325         Added some explicit JSValue(JSObject*) initialization, since relaxing
2326         the JSFunction* restriction on callee has made register types more ambiguous.
2327         Removed toThisObject() conversion, since all callees do it themselves now.
2328         Updated host function call for new host function signature. Updated for
2329         change to ExecState::argumentCount() API.
2330
2331         * interpreter/Register.h:
2332         (JSC::Register::):
2333         (JSC::Register::operator=):
2334         (JSC::Register::function): Changed callee() to be JSObject* instead of
2335         JSFunction* -- now, it might be some other callable host object.
2336
2337         * jit/JITOpcodes.cpp:
2338         (JSC::JIT::privateCompileCTINativeCall):
2339         * jit/JITOpcodes32_64.cpp:
2340         (JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that
2341         set up the arguments to host functions -- all but one of the arguments
2342         are gone now. This is the actual optimization.
2343
2344         * jit/JITStubs.cpp:
2345         (JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API
2346         changes noted above. Removed toThisObject() conversion, since all callees
2347         do it themselves now.
2348         
2349         * runtime/ArgList.h:
2350         (JSC::ArgList::ArgList): ArgList is getting close to unused. Added a
2351         temporary shim for converting from ExecState* to ArgList where it's still
2352         necessary.
2353
2354         * runtime/Arguments.h:
2355         (JSC::Arguments::getArgumentsData):
2356         (JSC::Arguments::Arguments): Updated for ExecState and Register API
2357         changes noted above. 
2358
2359         * runtime/CallData.cpp:
2360         (JSC::call): Changed call always to call Interpreter::executeCall, even
2361         for host functions. This ensures that the normal calling convention is
2362         set up in the RegsiterFile when calling from C++ to host function.
2363
2364         * runtime/CallData.h: Changed host function signature as described above.
2365
2366         * runtime/ConstructData.cpp:
2367         (JSC::construct): Moved JSFunction::construct code here so I could nix
2368         JSFunction::call and JSFunction::call. We want a JSFunction-agnostic
2369         way to call and construct, so that everything works naturally for non-
2370         JSFunction objects. 
2371
2372         * runtime/JSFunction.cpp:
2373         (JSC::callHostFunctionAsConstructor):
2374         * runtime/JSFunction.h: Updated for ExecState and Register API changes
2375         noted above. Nixed JSFunction::call and JSFunction::construct, noted above.
2376  
2377         * runtime/JSGlobalObject.cpp:
2378         (JSC::JSGlobalObject::init): Ditto.
2379
2380         PART TWO: Global search and replace.
2381         
2382         In the areas below, I used global search-and-replace to change
2383             (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
2384             args.size() => exec->argumentCount()
2385             args.at(i) => exec->argument(i)
2386
2387         * API/JSCallbackFunction.cpp:
2388         (JSC::JSCallbackFunction::call):
2389         * API/JSCallbackFunction.h:
2390         * API/JSCallbackObject.h:
2391         * API/JSCallbackObjectFunctions.h:
2392         (JSC::::call):
2393         * JavaScriptCore.exp:
2394         * jsc.cpp:
2395         (functionPrint):
2396         (functionDebug):
2397         (functionGC):
2398         (functionVersion):
2399         (functionRun):
2400         (functionLoad):
2401         (functionCheckSyntax):
2402         (functionSetSamplingFlags):
2403         (functionClearSamplingFlags):
2404         (functionReadline):
2405         (functionQuit):
2406         * runtime/ArrayConstructor.cpp:
2407         (JSC::callArrayConstructor):
2408         (JSC::arrayConstructorIsArray):
2409         * runtime/ArrayPrototype.cpp:
2410         (JSC::arrayProtoFuncToString):
2411         (JSC::arrayProtoFuncToLocaleString):
2412         (JSC::arrayProtoFuncJoin):
2413         (JSC::arrayProtoFuncConcat):
2414         (JSC::arrayProtoFuncPop):
2415         (JSC::arrayProtoFuncPush):
2416         (JSC::arrayProtoFuncReverse):
2417         (JSC::arrayProtoFuncShift):
2418         (JSC::arrayProtoFuncSlice):
2419         (JSC::arrayProtoFuncSort):
2420         (JSC::arrayProtoFuncSplice):
2421         (JSC::arrayProtoFuncUnShift):
2422         (JSC::arrayProtoFuncFilter):
2423         (JSC::arrayProtoFuncMap):
2424         (JSC::arrayProtoFuncEvery):
2425         (JSC::arrayProtoFuncForEach):
2426         (JSC::arrayProtoFuncSome):
2427         (JSC::arrayProtoFuncReduce):
2428         (JSC::arrayProtoFuncReduceRight):
2429         (JSC::arrayProtoFuncIndexOf):
2430         (JSC::arrayProtoFuncLastIndexOf):
2431         * runtime/BooleanConstructor.cpp:
2432         (JSC::callBooleanConstructor):
2433         * runtime/BooleanPrototype.cpp:
2434         (JSC::booleanProtoFuncToString):
2435         (JSC::booleanProtoFuncValueOf):
2436         * runtime/DateConstructor.cpp:
2437         (JSC::callDate):
2438         (JSC::dateParse):
2439         (JSC::dateNow):
2440         (JSC::dateUTC):
2441         * runtime/DatePrototype.cpp:
2442         (JSC::formatLocaleDate):
2443         (JSC::fillStructuresUsingTimeArgs):
2444         (JSC::fillStructuresUsingDateArgs):
2445         (JSC::dateProtoFuncToString):
2446         (JSC::dateProtoFuncToUTCString):
2447         (JSC::dateProtoFuncToISOString):
2448         (JSC::dateProtoFuncToDateString):
2449         (JSC::dateProtoFuncToTimeString):
2450         (JSC::dateProtoFuncToLocaleString):
2451         (JSC::dateProtoFuncToLocaleDateString):
2452         (JSC::dateProtoFuncToLocaleTimeString):
2453         (JSC::dateProtoFuncGetTime):
2454         (JSC::dateProtoFuncGetFullYear):
2455         (JSC::dateProtoFuncGetUTCFullYear):
2456         (JSC::dateProtoFuncToGMTString):
2457         (JSC::dateProtoFuncGetMonth):
2458         (JSC::dateProtoFuncGetUTCMonth):
2459         (JSC::dateProtoFuncGetDate):
2460         (JSC::dateProtoFuncGetUTCDate):
2461         (JSC::dateProtoFuncGetDay):
2462         (JSC::dateProtoFuncGetUTCDay):
2463         (JSC::dateProtoFuncGetHours):
2464         (JSC::dateProtoFuncGetUTCHours):
2465         (JSC::dateProtoFuncGetMinutes):
2466         (JSC::dateProtoFuncGetUTCMinutes):
2467         (JSC::dateProtoFuncGetSeconds):
2468         (JSC::dateProtoFuncGetUTCSeconds):
2469         (JSC::dateProtoFuncGetMilliSeconds):
2470         (JSC::dateProtoFuncGetUTCMilliseconds):
2471         (JSC::dateProtoFuncGetTimezoneOffset):
2472         (JSC::dateProtoFuncSetTime):
2473         (JSC::setNewValueFromTimeArgs):
2474         (JSC::setNewValueFromDateArgs):
2475         (JSC::dateProtoFuncSetMilliSeconds):
2476         (JSC::dateProtoFuncSetUTCMilliseconds):
2477         (JSC::dateProtoFuncSetSeconds):
2478         (JSC::dateProtoFuncSetUTCSeconds):
2479         (JSC::dateProtoFuncSetMinutes):
2480         (JSC::dateProtoFuncSetUTCMinutes):
2481         (JSC::dateProtoFuncSetHours):
2482         (JSC::dateProtoFuncSetUTCHours):
2483         (JSC::dateProtoFuncSetDate):
2484         (JSC::dateProtoFuncSetUTCDate):
2485         (JSC::dateProtoFuncSetMonth):
2486         (JSC::dateProtoFuncSetUTCMonth):
2487         (JSC::dateProtoFuncSetFullYear):
2488         (JSC::dateProtoFuncSetUTCFullYear):
2489         (JSC::dateProtoFuncSetYear):
2490         (JSC::dateProtoFuncGetYear):
2491         (JSC::dateProtoFuncToJSON):
2492         * runtime/ErrorConstructor.cpp:
2493         (JSC::callErrorConstructor):
2494         * runtime/ErrorPrototype.cpp:
2495         (JSC::errorProtoFuncToString):
2496         * runtime/FunctionConstructor.cpp:
2497         (JSC::callFunctionConstructor):
2498         * runtime/FunctionPrototype.cpp:
2499         (JSC::callFunctionPrototype):
2500         (JSC::functionProtoFuncToString):
2501         (JSC::functionProtoFuncApply):
2502         (JSC::functionProtoFuncCall):
2503         * runtime/JSGlobalObjectFunctions.cpp:
2504         (JSC::encode):
2505         (JSC::decode):
2506         (JSC::globalFuncEval):
2507         (JSC::globalFuncParseInt):
2508         (JSC::globalFuncParseFloat):
2509         (JSC::globalFuncIsNaN):
2510         (JSC::globalFuncIsFinite):
2511         (JSC::globalFuncDecodeURI):
2512         (JSC::globalFuncDecodeURIComponent):
2513         (JSC::globalFuncEncodeURI):
2514         (JSC::globalFuncEncodeURIComponent):
2515         (JSC::globalFuncEscape):
2516         (JSC::globalFuncUnescape):
2517         (JSC::globalFuncJSCPrint):
2518         * runtime/JSGlobalObjectFunctions.h:
2519         * runtime/JSONObject.cpp:
2520         (JSC::JSONProtoFuncParse):
2521         (JSC::JSONProtoFuncStringify):
2522         * runtime/JSString.h:
2523         * runtime/MathObject.cpp:
2524         (JSC::mathProtoFuncAbs):
2525         (JSC::mathProtoFuncACos):
2526         (JSC::mathProtoFuncASin):
2527         (JSC::mathProtoFuncATan):
2528         (JSC::mathProtoFuncATan2):
2529         (JSC::mathProtoFuncCeil):
2530         (JSC::mathProtoFuncCos):
2531         (JSC::mathProtoFuncExp):
2532         (JSC::mathProtoFuncFloor):
2533         (JSC::mathProtoFuncLog):
2534         (JSC::mathProtoFuncMax):
2535         (JSC::mathProtoFuncMin):
2536         (JSC::mathProtoFuncPow):
2537         (JSC::mathProtoFuncRandom):
2538         (JSC::mathProtoFuncRound):
2539         (JSC::mathProtoFuncSin):
2540         (JSC::mathProtoFuncSqrt):
2541         (JSC::mathProtoFuncTan):
2542         * runtime/NativeErrorConstructor.cpp:
2543         (JSC::callNativeErrorConstructor):
2544         * runtime/NumberConstructor.cpp:
2545         (JSC::callNumberConstructor):
2546         * runtime/NumberPrototype.cpp:
2547         (JSC::numberProtoFuncToString):
2548         (JSC::numberProtoFuncToLocaleString):
2549         (JSC::numberProtoFuncValueOf):
2550         (JSC::numberProtoFuncToFixed):
2551         (JSC::numberProtoFuncToExponential):
2552         (JSC::numberProtoFuncToPrecision):
2553         * runtime/ObjectConstructor.cpp:
2554         (JSC::callObjectConstructor):
2555         (JSC::objectConstructorGetPrototypeOf):
2556         (JSC::objectConstructorGetOwnPropertyDescriptor):
2557         (JSC::objectConstructorGetOwnPropertyNames):
2558         (JSC::objectConstructorKeys):
2559         (JSC::objectConstructorDefineProperty):
2560         (JSC::objectConstructorDefineProperties):
2561         (JSC::objectConstructorCreate):
2562         * runtime/ObjectPrototype.cpp:
2563         (JSC::objectProtoFuncValueOf):
2564         (JSC::objectProtoFuncHasOwnProperty):
2565         (JSC::objectProtoFuncIsPrototypeOf):
2566         (JSC::objectProtoFuncDefineGetter):
2567         (JSC::objectProtoFuncDefineSetter):
2568         (JSC::objectProtoFuncLookupGetter):
2569         (JSC::objectProtoFuncLookupSetter):
2570         (JSC::objectProtoFuncPropertyIsEnumerable):
2571         (JSC::objectProtoFuncToLocaleString):
2572         (JSC::objectProtoFuncToString):
2573         * runtime/ObjectPrototype.h:
2574         * runtime/Operations.h:
2575         (JSC::jsString):
2576         * runtime/RegExpConstructor.cpp:
2577         (JSC::callRegExpConstructor):
2578         * runtime/RegExpObject.cpp:
2579         (JSC::RegExpObject::test):
2580         (JSC::RegExpObject::exec):
2581         (JSC::callRegExpObject):
2582         (JSC::RegExpObject::match):
2583         * runtime/RegExpObject.h:
2584         * runtime/RegExpPrototype.cpp:
2585         (JSC::regExpProtoFuncTest):
2586         (JSC::regExpProtoFuncExec):
2587         (JSC::regExpProtoFuncCompile):
2588         (JSC::regExpProtoFuncToString):
2589         * runtime/StringConstructor.cpp:
2590         (JSC::stringFromCharCodeSlowCase):
2591         (JSC::stringFromCharCode):
2592         (JSC::callStringConstructor):
2593         * runtime/StringPrototype.cpp:
2594         (JSC::stringProtoFuncReplace):
2595         (JSC::stringProtoFuncToString):
2596         (JSC::stringProtoFuncCharAt):
2597         (JSC::stringProtoFuncCharCodeAt):
2598         (JSC::stringProtoFuncConcat):
2599         (JSC::stringProtoFuncIndexOf):
2600         (JSC::stringProtoFuncLastIndexOf):
2601         (JSC::stringProtoFuncMatch):
2602         (JSC::stringProtoFuncSearch):
2603         (JSC::stringProtoFuncSlice):
2604         (JSC::stringProtoFuncSplit):
2605         (JSC::stringProtoFuncSubstr):
2606         (JSC::stringProtoFuncSubstring):
2607         (JSC::stringProtoFuncToLowerCase):
2608         (JSC::stringProtoFuncToUpperCase):
2609         (JSC::stringProtoFuncLocaleCompare):
2610         (JSC::stringProtoFuncBig):
2611         (JSC::stringProtoFuncSmall):
2612         (JSC::stringProtoFuncBlink):
2613         (JSC::stringProtoFuncBold):
2614         (JSC::stringProtoFuncFixed):
2615         (JSC::stringProtoFuncItalics):
2616         (JSC::stringProtoFuncStrike):
2617         (JSC::stringProtoFuncSub):
2618         (JSC::stringProtoFuncSup):
2619         (JSC::stringProtoFuncFontcolor):
2620         (JSC::stringProtoFuncFontsize):
2621         (JSC::stringProtoFuncAnchor):
2622         (JSC::stringProtoFuncLink):
2623         (JSC::stringProtoFuncTrim):
2624         (JSC::stringProtoFuncTrimLeft):
2625         (JSC::stringProtoFuncTrimRight):
2626
2627 2010-05-28  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2628
2629         Reviewed by Geoffrey Garen.
2630
2631         Fix the JSObjectSetPrototype function.
2632
2633         A cycle in a prototype chain can cause an application hang or
2634         even crash.
2635         A check for a prototype chain cycles was added to
2636         the JSObjectSetPrototype.
2637
2638         JSObjectSetPrototype doesn't check for cycle in prototype chain.
2639         https://bugs.webkit.org/show_bug.cgi?id=39360
2640
2641         * API/JSObjectRef.cpp:
2642         (JSObjectSetPrototype):
2643         * API/tests/testapi.c:
2644         (assertTrue):
2645         (checkForCycleInPrototypeChain):
2646         (main):
2647         * runtime/JSObject.cpp:
2648         (JSC::JSObject::put):
2649         * runtime/JSObject.h:
2650         (JSC::JSObject::setPrototypeWithCycleCheck):
2651
2652 2010-05-28  Chao-ying Fu  <fu@mips.com>
2653
2654         Reviewed by Eric Seidel.
2655
2656         Fix MIPS JIT DoubleGreaterThanOrEqual Operands
2657         https://bugs.webkit.org/show_bug.cgi?id=39504
2658
2659         Swapped two operands of left and right for DoubleGreaterThanOrEqual.
2660         This patch fixed two layout tests as follows.
2661         fast/js/comparison-operators-greater.html
2662         fast/js/comparison-operators-less.html
2663
2664         * assembler/MacroAssemblerMIPS.h:
2665         (JSC::MacroAssemblerMIPS::branchDouble):
2666
2667 2010-05-28  Gavin Barraclough  <barraclough@apple.com>
2668
2669         Reviewed by Geoff Garen.
2670
2671         Move jit compilation from linking thunks into cti_vm_lazyLink methods.
2672
2673         * jit/JITOpcodes.cpp:
2674         (JSC::JIT::privateCompileCTIMachineTrampolines):
2675         * jit/JITOpcodes32_64.cpp:
2676         (JSC::JIT::privateCompileCTIMachineTrampolines):
2677         * jit/JITStubs.cpp:
2678         (JSC::DEFINE_STUB_FUNCTION):
2679
2680 2010-05-28  Gavin Barraclough  <barraclough@apple.com>
2681
2682         Reviewed by Sam Weinig.
2683
2684         Bug 39898 - Move arity check into callee.
2685         
2686         We can reduce the size of the virtual call trampolines by moving the arity check
2687         into the callee functions.  As a following step we will be able to remove the
2688         check for native function / codeblocks by performing translation in a lazy stub.
2689         
2690         * interpreter/CallFrame.h:
2691         (JSC::ExecState::init):
2692         (JSC::ExecState::setReturnPC):
2693         * jit/JIT.cpp:
2694         (JSC::JIT::privateCompile):
2695         (JSC::JIT::linkCall):
2696         (JSC::JIT::linkConstruct):
2697         * jit/JIT.h:
2698         (JSC::JIT::compile):
2699         * jit/JITOpcodes.cpp:
2700         (JSC::JIT::privateCompileCTIMachineTrampolines):
2701         * jit/JITOpcodes32_64.cpp:
2702         (JSC::JIT::privateCompileCTIMachineTrampolines):
2703         * jit/JITStubs.cpp:
2704         (JSC::DEFINE_STUB_FUNCTION):
2705         * runtime/Executable.cpp:
2706         (JSC::FunctionExecutable::generateJITCodeForCall):
2707         (JSC::FunctionExecutable::generateJITCodeForConstruct):
2708         (JSC::FunctionExecutable::reparseExceptionInfo):
2709         * runtime/Executable.h:
2710         (JSC::NativeExecutable::NativeExecutable):
2711         (JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck):
2712         (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
2713
2714 2010-05-27  Luiz Agostini  <luiz.agostini@openbossa.org>
2715
2716         Reviewed by Darin Adler.
2717
2718         UTF-16 code points compare() for String objects
2719         https://bugs.webkit.org/show_bug.cgi?id=39701
2720
2721         Moving compare() implementation from UString to StringImpl for it to be shared
2722         with String. Adding overloaded free functions codePointCompare() in StringImpl
2723         and WTFString. Renaming function compare in UString to codePointCompare to be
2724         consistent.
2725
2726         * runtime/JSArray.cpp:
2727         (JSC::compareByStringPairForQSort):
2728         * runtime/UString.cpp:
2729         * runtime/UString.h:
2730         (JSC::codePointCompare):
2731         * wtf/text/StringImpl.cpp:
2732         (WebCore::codePointCompare):
2733         * wtf/text/StringImpl.h:
2734         * wtf/text/WTFString.cpp:
2735         (WebCore::codePointCompare):
2736         * wtf/text/WTFString.h:
2737
2738 2010-05-26  Darin Adler  <darin@apple.com>
2739
2740         Reviewed by Kent Tamura.
2741
2742         Null characters handled incorrectly in ToNumber conversion
2743         https://bugs.webkit.org/show_bug.cgi?id=38088
2744
2745         * runtime/JSGlobalObjectFunctions.cpp:
2746         (JSC::parseInt): Changed code to use UTF8String().data() instead of
2747         ascii() to fix the thread safety issue. Code path is covered by existing
2748         tests in run-javascriptcore-tests.
2749         (JSC::parseFloat): Moved comment to UString::toDouble since the issue
2750         affects all clients, not just parseFloat. Specifically, this also affects
2751         standard JavaScript numeric conversion, ToNumber.
2752
2753         * runtime/UString.cpp:
2754         (JSC::UString::toDouble): Added a comment about incorrect space skipping.
2755         Changed trailing junk check to use the length of the CString instead of
2756         checking for a null character. Also got rid of a little unneeded logic
2757         in the case where we tolerate trailing junk.
2758
2759 2010-05-27  Nathan Lawrence  <nlawrence@apple.com>
2760
2761         Reviewed by Geoffrey Garen.
2762
2763         Search for the new allocation one word at a time.  Improves
2764         performance on SunSpider by approximately 1%.
2765         http://bugs.webkit.org/show_bug.cgi?id=39758
2766
2767         * runtime/Collector.cpp:
2768         (JSC::Heap::allocate):
2769         * runtime/Collector.h:
2770         (JSC::CollectorBitmap::advanceToNextPossibleFreeCell):
2771
2772 2010-05-27  Kevin Ollivier  <kevino@theolliviers.com>
2773
2774         [wx] Build fixes for Windows after recent changes.
2775
2776         * wscript:
2777
2778 2010-05-27  Gustavo Noronha Silva  <gns@gnome.org>
2779
2780         More build fixage for make dist.
2781
2782         * GNUmakefile.am:
2783
2784 2010-05-27  Kwang Yul Seo  <skyul@company100.net>
2785
2786         Reviewed by Darin Adler.
2787
2788         RVCT does not have strnstr.
2789         https://bugs.webkit.org/show_bug.cgi?id=39719
2790
2791         Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr.
2792
2793         * wtf/StringExtras.h:
2794
2795 2010-05-26  Gavin Barraclough  <barraclough@apple.com>
2796
2797         Reviewed by Oliver Hunt.
2798
2799         Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
2800         (relanding r60267)
2801
2802         If the last item in a main disjunction is a quantified set of parentheses,
2803         this is easier to code generate for than the general case for quantified
2804         parentheses. This is because we never need to backtrack into the parentheses
2805         - the first match will be the final and accepted match.
2806
2807         This patch also somewhat reverts a recent change to when fallback to PCRE
2808         occurs. At the minute the compiler is tracking on patterns which will
2809         require JIT fallback. This is handy from a performance perspective (it saves
2810         the failed attempt at JIT compilation), but it means introducing knowledge
2811         of the JITs capabilities into the other layers of the regex compilers. For
2812         the specific feature of back-references, add a flag tracking their presence
2813         on the pattern, and make these expressions fallback without attempting to
2814         JIT. For parentheses, return to detecting which cases are have or have not
2815         been handled during JIT compilation.
2816
2817         18% progression on tagcloud, ~1.5% overall on sunspidey.
2818
2819         * yarr/RegexCompiler.cpp:
2820         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
2821         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
2822         * yarr/RegexJIT.cpp:
2823         (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
2824         (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
2825         (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
2826         (JSC::Yarr::RegexGenerator::generateTerm):
2827         (JSC::Yarr::RegexGenerator::RegexGenerator):
2828         (JSC::Yarr::RegexGenerator::shouldFallBack):
2829         (JSC::Yarr::jitCompileRegex):
2830         * yarr/RegexPattern.h:
2831         (JSC::Yarr::RegexPattern::RegexPattern):
2832         (JSC::Yarr::RegexPattern::reset):
2833
2834 2010-05-26  Gavin Barraclough  <barraclough@apple.com>
2835
2836         Reviewed by NOBODY (revert).
2837
2838         Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing.
2839
2840         * yarr/RegexCompiler.cpp:
2841         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
2842         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
2843         * yarr/RegexJIT.cpp:
2844         (JSC::Yarr::RegexGenerator::TermGenerationState::term):
2845         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2846         (JSC::Yarr::RegexGenerator::generateTerm):
2847         (JSC::Yarr::RegexGenerator::RegexGenerator):
2848         (JSC::Yarr::jitCompileRegex):
2849         * yarr/RegexPattern.h:
2850         (JSC::Yarr::RegexPattern::RegexPattern):
2851         (JSC::Yarr::RegexPattern::reset):
2852
2853 2010-05-26  Gustavo Noronha Silva  <gns@gnome.org>
2854
2855         Build fixes for make distcheck.
2856
2857         * GNUmakefile.am:
2858
2859 2010-05-26  Gavin Barraclough  <barraclough@apple.com>
2860
2861         Reviewed by Oliver Hunt.
2862
2863         Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
2864
2865         If the last item in a main disjunction is a quantified set of parentheses,
2866         this is easier to code generate for than the general case for quantified
2867         parentheses. This is because we never need to backtrack into the parentheses
2868         - the first match will be the final and accepted match.
2869
2870         This patch also somewhat reverts a recent change to when fallback to PCRE
2871         occurs. At the minute the compiler is tracking on patterns which will
2872         require JIT fallback. This is handy from a performance perspective (it saves
2873         the failed attempt at JIT compilation), but it means introducing knowledge
2874         of the JITs capabilities into the other layers of the regex compilers. For
2875         the specific feature of back-references, add a flag tracking their presence
2876         on the pattern, and make these expressions fallback without attempting to
2877         JIT. For parentheses, return to detecting which cases are have or have not
2878         been handled during JIT compilation.
2879
2880         18% progression on tagcloud, ~1.5% overall on sunspidey.
2881
2882         * yarr/RegexCompiler.cpp:
2883         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
2884         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
2885         * yarr/RegexJIT.cpp:
2886         (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
2887         (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
2888         (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
2889         (JSC::Yarr::RegexGenerator::generateTerm):
2890         (JSC::Yarr::RegexGenerator::RegexGenerator):
2891         (JSC::Yarr::RegexGenerator::shouldFallBack):
2892         (JSC::Yarr::jitCompileRegex):
2893         * yarr/RegexPattern.h:
2894         (JSC::Yarr::RegexPattern::RegexPattern):
2895         (JSC::Yarr::RegexPattern::reset):
2896
2897 2010-05-26  Geoffrey Garen  <ggaren@apple.com>
2898
2899         Reviewed by Sam Weinig.
2900
2901         Fixed a crash seen on the Leopard bot, caused by merge.
2902
2903         * jit/JITStubs.cpp:
2904         (JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe,
2905         since it's no longer passed to us as an argument.
2906
2907 2010-05-25  Geoffrey Garen  <ggaren@apple.com>
2908
2909         Fixed build failure caused by merge.
2910
2911         * jit/JITStubs.cpp:
2912         (JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this
2913         function no longer returns a pair.
2914
2915 2010-05-25  Geoffrey Garen  <ggaren@apple.com>
2916
2917         Reviewed by Oliver Hunt.
2918
2919         <rdar://problem/8020221>
2920         
2921         Fixed a crash seen on Windows when calling a function with too many
2922         arguments.
2923         
2924         SunSpider reports no change.
2925         
2926         No test because the ASSERT I added fires in existing tests.
2927
2928         * jit/JITStubs.cpp:
2929         (JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too
2930         many arguments have been provided, since the caller only allocated enough
2931         registerFile space for the arguments it provided, not enough for the extra
2932         copy of arguments we're going to need.
2933
2934 2010-05-25  Kwang Yul Seo  <skyul@company100.net>
2935
2936         Reviewed by Darin Adler.
2937
2938         Build fix for JSFunction
2939         https://bugs.webkit.org/show_bug.cgi?id=39658
2940
2941         MSVC can't compile one of JSFunction constructors when JIT is disabled.
2942         "PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined. 
2943         Add ENABLE(JIT) guard to the constructor.
2944
2945         * runtime/JSFunction.cpp:
2946         (JSC::JSFunction::JSFunction):
2947         * runtime/JSFunction.h:
2948
2949 2010-05-24  Gavin Barraclough  <barraclough@apple.com>
2950
2951         Reviewed by Sam Weinig.
2952
2953         Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call.
2954
2955         Presently, as soon as op-call strays off the hot path we set up a set of values on
2956         the stack to be passed as arguments to cti functions, in case any should be called.
2957
2958         Instead, hoist the setup of the callframe to happen slightly sooner, and make the
2959         cti functions to compile & check arity read these values from the callframe. This
2960         allows up to remove the deprecated methods to manually set up cti arguments, rather
2961         than using JITStubCall.h.
2962
2963         * interpreter/CallFrame.h:
2964         * jit/JIT.h:
2965         * jit/JITCall.cpp:
2966         (JSC::JIT::compileOpCallInitializeCallFrame):
2967         (JSC::JIT::compileOpCallVarargs):
2968         (JSC::JIT::compileOpCallVarargsSlowCase):
2969         (JSC::JIT::compileOpCall):
2970         (JSC::JIT::compileOpCallSlowCase):
2971         * jit/JITCall32_64.cpp:
2972         (JSC::JIT::compileOpCallInitializeCallFrame):
2973         (JSC::JIT::compileOpCallVarargs):
2974         (JSC::JIT::compileOpCallVarargsSlowCase):
2975         (JSC::JIT::compileOpCall):
2976         (JSC::JIT::compileOpCallSlowCase):
2977         * jit/JITInlineMethods.h:
2978         * jit/JITOpcodes.cpp:
2979         (JSC::JIT::privateCompileCTIMachineTrampolines):
2980         * jit/JITOpcodes32_64.cpp:
2981         (JSC::JIT::privateCompileCTIMachineTrampolines):
2982         * jit/JITStubs.cpp:
2983         (JSC::DEFINE_STUB_FUNCTION):
2984         * jit/JITStubs.h:
2985         (JSC::):
2986
2987 2010-05-24  Gavin Barraclough  <barraclough@apple.com>
2988
2989         Reviewed by Sam Weinig.
2990         Relanding r60075.
2991
2992         * bytecode/CodeBlock.cpp:
2993         (JSC::CodeBlock::dump):
2994         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
2995         * bytecode/CodeBlock.h:
2996         * bytecode/Opcode.h:
2997         * bytecompiler/BytecodeGenerator.cpp:
2998         (JSC::BytecodeGenerator::BytecodeGenerator):
2999         (JSC::BytecodeGenerator::emitConstruct):
3000         * bytecompiler/BytecodeGenerator.h:
3001         (JSC::BytecodeGenerator::emitGetByIdExceptionInfo):
3002         * interpreter/Interpreter.cpp:
3003         (JSC::Interpreter::privateExecute):
3004         * jit/JIT.cpp:
3005         (JSC::JIT::privateCompileMainPass):
3006         * jit/JIT.h:
3007         * jit/JITCall.cpp:
3008         (JSC::JIT::compileOpCall):
3009         (JSC::JIT::compileOpCallSlowCase):
3010         * jit/JITCall32_64.cpp:
3011         (JSC::JIT::compileOpCall):
3012         (JSC::JIT::compileOpCallSlowCase):
3013         * jit/JITOpcodes.cpp:
3014         (JSC::JIT::privateCompileCTIMachineTrampolines):
3015         (JSC::JIT::privateCompileCTINativeCall):
3016         (JSC::JIT::emit_op_neq_null):
3017         (JSC::JIT::emit_op_convert_this):
3018         (JSC::JIT::emit_op_get_callee):
3019         (JSC::JIT::emit_op_create_this):
3020         * jit/JITOpcodes32_64.cpp:
3021         (JSC::JIT::privateCompileCTIMachineTrampolines):
3022         (JSC::JIT::privateCompileCTINativeCall):
3023         (JSC::JIT::emit_op_get_callee):
3024         (JSC::JIT::emit_op_create_this):
3025         * jit/JITStubs.cpp:
3026         (JSC::DEFINE_STUB_FUNCTION):
3027         (JSC::JITThunks::hostFunctionStub):
3028         * jit/JITStubs.h:
3029         (JSC::JITThunks::ctiNativeConstruct):
3030         (JSC::):
3031         * runtime/ExceptionHelpers.cpp:
3032         (JSC::createNotAnObjectError):
3033         * runtime/Executable.h:
3034         (JSC::NativeExecutable::create):
3035         (JSC::NativeExecutable::NativeExecutable):
3036         * runtime/JSFunction.cpp:
3037         (JSC::callHostFunctionAsConstructor):
3038         * runtime/JSFunction.h:
3039         * wtf/Platform.h:
3040
3041 == Rolled over to ChangeLog-2010-05-24 ==