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