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