1 2010-06-18 Leandro Pereira <leandro@profusion.mobi>
3 [EFL] Unreviewed build fix.
5 * wtf/CMakeLists.txt: Add MD5.cpp.
7 2010-06-17 Shu Chang <chang.shu@nokia.com>
9 Reviewed by Kenneth Rohde Christiansen.
11 [Qt] Fix the link error on symbian with ENABLE_JIT=0.
12 1. Add "#if ENABLE(JIT)" in the header file;
13 2. Put feature enable/disable logic to a common.pri so
14 that both JavaScriptCore.pri and WebCore.pri can share.
16 https://bugs.webkit.org/show_bug.cgi?id=40780
19 * jit/ExecutableAllocator.h:
21 2010-06-17 Darin Adler <darin@apple.com>
23 Reviewed by Sam Weinig.
25 Use adoptRef and create functions in more code paths
26 https://bugs.webkit.org/show_bug.cgi?id=40760
28 * API/JSClassRef.h: Removed unneeded include of RefCounted.h.
29 * API/JSWeakObjectMapRefPrivate.cpp: Ditto.
31 * bytecode/CodeBlock.h:
32 (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the
33 SharedSymbolTable::create function instead of calling new directly.
35 * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable
36 class and made the constructor private.
38 2010-06-17 Mark Brand <mabrand@mabrand.nl>
40 Reviewed by Simon Hausmann.
42 [Qt] use "win32-g++*" scope to match all MinGW makespecs
44 The scope "win32-g++" comes from the name of the makespec. However, it
45 is frequently used to check for MinGW. This works fine as long as
46 win32-g++ is the only makespec for MinGW. Now we need the wildcard
47 to cover "win32-g++-cross" as well.
51 2010-06-16 Darin Adler <darin@apple.com>
53 Reviewed by David Levin.
55 Deploy adoptRef in more places, including all HTML and MathML elements
56 https://bugs.webkit.org/show_bug.cgi?id=39941
58 * wtf/ThreadSafeShared.h: Made the constructor protected and removed the
59 unneeded support for initial reference counts other than 1.
61 2010-06-16 Peter Varga <pvarga@inf.u-szeged.hu>
63 Reviewed by Geoffrey Garen.
65 Store matchBegin directly in the array of output instead of the stack.
66 https://bugs.webkit.org/show_bug.cgi?id=38988
69 (JSC::Yarr::RegexGenerator::generateDisjunction):
70 (JSC::Yarr::RegexGenerator::generate):
72 2010-06-15 Anders Carlsson <andersca@apple.com>
74 Reviewed by Sam Weinig.
76 Make JavaScriptCore build with clang++.
78 * jit/JITInlineMethods.h:
79 (JSC::JIT::emitPutVirtualRegister):
80 Explicitly cast to an int.
82 * yarr/RegexCompiler.cpp:
83 (JSC::Yarr::compileRegex):
84 Return 0 instead of false.
86 2010-06-15 Adam Roben <aroben@apple.com>
88 Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds
90 Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>.
92 Reviewed by Sam Weinig.
94 * JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of
95 JavaScriptCore's DerivedSources directory to
96 AppleInternal/Sources/JavaScriptCore.
98 2010-06-15 Gabor Loki <loki@webkit.org>
100 Rubber-stamped by Eric Seidel.
102 Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM
103 https://bugs.webkit.org/show_bug.cgi?id=40423
105 Using OBJECT_OFFSETOF macro instead of objectof to bypass access to
106 non-static data member warning.
108 * jit/JITPropertyAccess32_64.cpp:
109 (JSC::JIT::privateCompilePutByIdTransition):
111 2010-06-11 Eric Seidel <eric@webkit.org>
113 Reviewed by Adam Barth.
115 Rename the rest of the *Tokenizer classes to *DocumentParser
116 https://bugs.webkit.org/show_bug.cgi?id=40507
119 - fixed a comment to match new names.
121 2010-06-11 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
123 Reviewed by Simon Hausmann.
125 [Qt] Explicit conversions from QtScript types to JSC opaque types were removed.
126 https://bugs.webkit.org/show_bug.cgi?id=40412
128 Conversion between a JSC C types and a QtScript private types, takes
129 main part of the source code. In most cases a mapping between the types
130 is one to one. New cast operators were added to simplify the code.
132 The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef.
133 The QScriptEnginePrivate could be casted to the JSGlobalContext.
134 The QScriptProgramPrivate could be casted to the JSStringRef.
136 * qt/api/qscriptengine_p.cpp:
137 (QScriptEnginePrivate::evaluate):
138 (QScriptEnginePrivate::newObject):
139 (QScriptEnginePrivate::globalObject):
140 * qt/api/qscriptengine_p.h:
141 (QScriptEnginePrivate::operator JSGlobalContextRef):
142 * qt/api/qscriptprogram_p.h:
143 (QScriptProgramPrivate::operator JSStringRef):
144 * qt/api/qscriptsyntaxcheckresult.cpp:
145 (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
146 (QScriptSyntaxCheckResultPrivate::errorMessage):
147 (QScriptSyntaxCheckResultPrivate::errorLineNumber):
148 * qt/api/qscriptvalue_p.h:
149 (QScriptValuePrivate::~QScriptValuePrivate):
150 (QScriptValuePrivate::QScriptValuePrivate):
151 (QScriptValuePrivate::isBool):
152 (QScriptValuePrivate::isNumber):
153 (QScriptValuePrivate::isNull):
154 (QScriptValuePrivate::isString):
155 (QScriptValuePrivate::isUndefined):
156 (QScriptValuePrivate::isFunction):
157 (QScriptValuePrivate::toString):
158 (QScriptValuePrivate::toNumber):
159 (QScriptValuePrivate::toBool):
160 (QScriptValuePrivate::toObject):
161 (QScriptValuePrivate::equals):
162 (QScriptValuePrivate::strictlyEquals):
163 (QScriptValuePrivate::instanceOf):
164 (QScriptValuePrivate::call):
165 (QScriptValuePrivate::operator JSValueRef):
166 (QScriptValuePrivate::operator JSObjectRef):
167 (QScriptValuePrivate::setValue):
168 (QScriptValuePrivate::inherits):
169 (QScriptValuePrivate::refinedJSValue):
171 2010-05-31 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
173 Reviewed by Simon Hausmann.
175 [Qt] Implement the simple text code path.
176 https://bugs.webkit.org/show_bug.cgi?id=40077
178 Remove the FONT_FAST_PATH macro and use the Qt's
179 fast text implementation instead of the one of WebKit.
181 The Qt::TextBypassShaping flag is used to tell Qt to
182 only use the glyph advances.
184 Qt 4.7 is needed to get this flag thus the complex path is always
185 used if QtWebKit is compiled against an earlier version.
187 Contrary to the WebKit's implementation, the complex code path
188 is taken if the text is RightToLeft, justified or is formatted
189 with non-zero letter or word spacing.
193 2010-06-11 Luiz Agostini <luiz.agostini@openbossa.org>
195 Reviewed by Kenneth Rohde Christiansen.
197 add codePointCompare to JavaScriptCore.exp
198 https://bugs.webkit.org/show_bug.cgi?id=40426
200 * JavaScriptCore.exp:
202 2010-06-10 Oliver Hunt <oliver@apple.com>
204 Reviewed by Maciej Stachowiak.
206 Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode
207 https://bugs.webkit.org/show_bug.cgi?id=40367
209 If we're in the slow case of right shift we must write the type tag as
210 the only reason we hit this code path is because we know we're working
211 with a double. eg. we are guaranteed that the tag cannot be reused.
213 * jit/JITArithmetic32_64.cpp:
214 (JSC::JIT::emitRightShiftSlowCase):
216 2010-06-10 Kwang Yul Seo <skyul@company100.net>
218 Reviewed by Eric Seidel.
220 Remove weakRandomNumber
221 https://bugs.webkit.org/show_bug.cgi?id=40291
223 weakRandomNumber is used nowhere. Currently, WeakRandom is used instead.
225 * wtf/RandomNumber.cpp:
226 * wtf/RandomNumber.h:
228 2010-06-09 Alexey Proskuryakov <ap@apple.com>
230 Reviewed by Brady Eidson.
232 Export StringImpl::ascii(). It might be not very useful, but it's a public function.
234 * JavaScriptCore.exp:
236 2010-06-09 Leandro Pereira <leandro@profusion.mobi>
238 Reviewed by Adam Treat.
240 [EFL] Allow building core libraries as shared objects to speed up
241 linking time on machines with small amounts of memory.
242 http://webkit.org/b/39899
244 * CMakeLists.txt: If building with shared core, install the lib.
245 * jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically.
246 * wtf/CMakeLists.txt: If building with shared core, install the lib.
248 2010-06-09 Gabor Loki <loki@webkit.org>
250 Reviewed by David Levin.
252 Remove some unused variable warnings from JITOpcodes
253 https://bugs.webkit.org/show_bug.cgi?id=40298
255 * jit/JITOpcodes.cpp:
256 (JSC::JIT::privateCompileCTINativeCall):
257 * jit/JITOpcodes32_64.cpp:
258 (JSC::JIT::privateCompileCTINativeCall):
260 2010-05-18 Yuzo Fujishima <yuzo@google.com>
262 Reviewed by Shinichiro Hamaji.
264 Fix for Bug 34529 - [CSSOM] issues with cssText and selectorText
265 Add U16_LENGTH that is needed to implement CSS character serialization.
266 https://bugs.webkit.org/show_bug.cgi?id=34529
268 * wtf/unicode/qt4/UnicodeQt4.h:
269 * wtf/unicode/wince/UnicodeWince.h:
271 2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com>
273 Unreviewed, rolling out r60830.
274 http://trac.webkit.org/changeset/60830
275 https://bugs.webkit.org/show_bug.cgi?id=40305
277 Broke the Windows build (Requested by abarth on #webkit).
279 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
280 * wtf/OwnPtrCommon.h:
281 * wtf/brew/OwnPtrBrew.h: Removed.
282 * wtf/win/OwnPtrWin.h: Removed.
284 2010-06-08 MORITA Hajime <morrita@google.com>
286 Unreviewed. An attempt to fix test break.
288 * Configurations/FeatureDefines.xcconfig:
290 2010-06-08 Kwang Yul Seo <skyul@company100.net>
292 Reviewed by Adam Barth.
294 Change OwnPtrCommon to include platform-specific headers
295 https://bugs.webkit.org/show_bug.cgi?id=40279
297 Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
298 Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
300 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
301 * wtf/OwnPtrCommon.h:
302 * wtf/brew/OwnPtrBrew.h: Added.
303 * wtf/win/OwnPtrWin.h: Added.
305 2010-06-07 MORITA Hajime <morrita@google.com>
307 Reviewed by Kent Tamura.
309 https://bugs.webkit.org/show_bug.cgi?id=40219
310 [Mac] ENABLE_METER_TAG should be enabled
312 Added ENABLE_METER_TAG.
314 * Configurations/FeatureDefines.xcconfig:
316 2010-06-07 Kwang Yul Seo <skyul@company100.net>
318 Reviewed by Eric Seidel.
320 [BREWMP] Add more types to OwnPtr
321 https://bugs.webkit.org/show_bug.cgi?id=39667
323 Add ISSL and ISocket to the list of OwnPtr-ed type.
325 * wtf/OwnPtrCommon.h:
326 * wtf/brew/OwnPtrBrew.cpp:
327 (WTF::deleteOwnedPtr):
329 2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com>
331 Reviewed by Simon Hausmann.
333 [Qt] Crash when compiling on Snow Leopard and running on Leopard
334 https://bugs.webkit.org/show_bug.cgi?id=31403
336 Disable the use of pthread_setname_np and other symbols
337 when targetting Leopard.
339 Use the defines TARGETING_XX instead of BUILDING_ON_XX
340 for features that cannot be used before Snow Leopard.
344 2010-06-07 Gabor Loki <loki@webkit.org>
346 Reviewed by NOBODY (JSVALUE32_64 build fix).
348 * jit/JITOpcodes32_64.cpp:
349 (JSC::JIT::privateCompileCTINativeCall):
351 2010-06-06 Gavin Barraclough <barraclough@apple.com>
353 Reviewed by NOBODY (windows build fix pt 2).
355 * JavaScriptCore.exp:
356 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
358 2010-06-06 Gavin Barraclough <barraclough@apple.com>
360 Reviewed by NOBODY (windows build fix pt 1).
362 * JavaScriptCore.exp:
363 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
365 2010-06-06 Gavin Barraclough <barraclough@apple.com>
367 Reviewed by Sam Weinig.
369 Bug 40214 - Clean up error construction / throwing in JSC.
371 The one egregious insanity here is that creating an error requires
372 a VM-entry-esqe-host call (the string argument is wrapped as a JS
373 object & pushed on the RegisterFile, then unwrapped back to a
374 UString). Changing this also means you only require a global
375 object, not an ExecState, to create an error.
377 The methods to create error objects are also parameterized
378 requiring a switch on the type, which can be made cleaner and
379 faster by moving to a separate method per error type. Code to add
380 divot information to error had been duplicated, and is coalesced
381 back into a single function.
383 Convenience methods added to create & throw type & syntax error
384 with a default error message, since this is a common case.
386 Also, errors are currently thrown either using
387 "throwError(exec, error)" or "exec->setException(error)" - unify
388 on the former, since this is more commonly used. Add
389 "throwVMError(exec, error)" equivalents, as a convenience for
390 cases where the result was being wrapped in "JSValue::encode(...)".
392 * API/JSCallbackConstructor.cpp:
393 (JSC::constructJSCallback):
394 * API/JSCallbackFunction.cpp:
395 (JSC::JSCallbackFunction::call):
396 * API/JSCallbackObjectFunctions.h:
397 (JSC::::getOwnPropertySlot):
399 (JSC::::deleteProperty):
401 (JSC::::hasInstance):
405 (JSC::::staticValueGetter):
406 (JSC::::staticFunctionGetter):
407 (JSC::::callbackGetter):
408 * API/JSObjectRef.cpp:
410 * JavaScriptCore.exp:
411 * bytecompiler/BytecodeGenerator.cpp:
412 (JSC::BytecodeGenerator::emitNewError):
413 (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
414 * bytecompiler/BytecodeGenerator.h:
415 * bytecompiler/NodesCodegen.cpp:
416 (JSC::ThrowableExpressionData::emitThrowError):
417 (JSC::RegExpNode::emitBytecode):
418 (JSC::PostfixErrorNode::emitBytecode):
419 (JSC::PrefixErrorNode::emitBytecode):
420 (JSC::AssignErrorNode::emitBytecode):
421 (JSC::ForInNode::emitBytecode):
422 (JSC::ContinueNode::emitBytecode):
423 (JSC::BreakNode::emitBytecode):
424 (JSC::ReturnNode::emitBytecode):
425 (JSC::LabelNode::emitBytecode):
426 * interpreter/CallFrame.h:
427 * interpreter/Interpreter.cpp:
428 (JSC::Interpreter::throwException):
429 (JSC::Interpreter::privateExecute):
431 (JSC::DEFINE_STUB_FUNCTION):
435 (functionCheckSyntax):
437 * runtime/ArrayConstructor.cpp:
438 (JSC::constructArrayWithSizeQuirk):
439 * runtime/ArrayPrototype.cpp:
440 (JSC::arrayProtoFuncToString):
441 (JSC::arrayProtoFuncToLocaleString):
442 (JSC::arrayProtoFuncJoin):
443 (JSC::arrayProtoFuncFilter):
444 (JSC::arrayProtoFuncMap):
445 (JSC::arrayProtoFuncEvery):
446 (JSC::arrayProtoFuncForEach):
447 (JSC::arrayProtoFuncSome):
448 (JSC::arrayProtoFuncReduce):
449 (JSC::arrayProtoFuncReduceRight):
450 * runtime/BooleanPrototype.cpp:
451 (JSC::booleanProtoFuncToString):
452 (JSC::booleanProtoFuncValueOf):
453 * runtime/DatePrototype.cpp:
454 (JSC::dateProtoFuncToString):
455 (JSC::dateProtoFuncToUTCString):
456 (JSC::dateProtoFuncToISOString):
457 (JSC::dateProtoFuncToDateString):
458 (JSC::dateProtoFuncToTimeString):
459 (JSC::dateProtoFuncToLocaleString):
460 (JSC::dateProtoFuncToLocaleDateString):
461 (JSC::dateProtoFuncToLocaleTimeString):
462 (JSC::dateProtoFuncGetTime):
463 (JSC::dateProtoFuncGetFullYear):
464 (JSC::dateProtoFuncGetUTCFullYear):
465 (JSC::dateProtoFuncToGMTString):
466 (JSC::dateProtoFuncGetMonth):
467 (JSC::dateProtoFuncGetUTCMonth):
468 (JSC::dateProtoFuncGetDate):
469 (JSC::dateProtoFuncGetUTCDate):
470 (JSC::dateProtoFuncGetDay):
471 (JSC::dateProtoFuncGetUTCDay):
472 (JSC::dateProtoFuncGetHours):
473 (JSC::dateProtoFuncGetUTCHours):
474 (JSC::dateProtoFuncGetMinutes):
475 (JSC::dateProtoFuncGetUTCMinutes):
476 (JSC::dateProtoFuncGetSeconds):
477 (JSC::dateProtoFuncGetUTCSeconds):
478 (JSC::dateProtoFuncGetMilliSeconds):
479 (JSC::dateProtoFuncGetUTCMilliseconds):
480 (JSC::dateProtoFuncGetTimezoneOffset):
481 (JSC::dateProtoFuncSetTime):
482 (JSC::setNewValueFromTimeArgs):
483 (JSC::setNewValueFromDateArgs):
484 (JSC::dateProtoFuncSetMilliSeconds):
485 (JSC::dateProtoFuncSetUTCMilliseconds):
486 (JSC::dateProtoFuncSetSeconds):
487 (JSC::dateProtoFuncSetUTCSeconds):
488 (JSC::dateProtoFuncSetMinutes):
489 (JSC::dateProtoFuncSetUTCMinutes):
490 (JSC::dateProtoFuncSetHours):
491 (JSC::dateProtoFuncSetUTCHours):
492 (JSC::dateProtoFuncSetDate):
493 (JSC::dateProtoFuncSetUTCDate):
494 (JSC::dateProtoFuncSetMonth):
495 (JSC::dateProtoFuncSetUTCMonth):
496 (JSC::dateProtoFuncSetFullYear):
497 (JSC::dateProtoFuncSetUTCFullYear):
498 (JSC::dateProtoFuncSetYear):
499 (JSC::dateProtoFuncGetYear):
500 (JSC::dateProtoFuncToJSON):
503 (JSC::createEvalError):
504 (JSC::createRangeError):
505 (JSC::createReferenceError):
506 (JSC::createSyntaxError):
507 (JSC::createTypeError):
508 (JSC::createURIError):
509 (JSC::addErrorSourceInfo):
510 (JSC::addErrorDivotInfo):
514 (JSC::throwTypeError):
515 (JSC::throwSyntaxError):
518 (JSC::throwVMTypeError):
519 * runtime/ErrorConstructor.cpp:
520 (JSC::constructWithErrorConstructor):
521 (JSC::callErrorConstructor):
522 * runtime/ErrorConstructor.h:
523 * runtime/ErrorInstance.cpp:
524 (JSC::ErrorInstance::ErrorInstance):
525 (JSC::ErrorInstance::create):
526 * runtime/ErrorInstance.h:
527 * runtime/ErrorPrototype.cpp:
528 (JSC::ErrorPrototype::ErrorPrototype):
529 * runtime/ExceptionHelpers.cpp:
530 (JSC::createStackOverflowError):
531 (JSC::createUndefinedVariableError):
532 (JSC::createInvalidParamError):
533 (JSC::createNotAConstructorError):
534 (JSC::createNotAFunctionError):
535 (JSC::createNotAnObjectError):
536 (JSC::throwOutOfMemoryError):
537 * runtime/ExceptionHelpers.h:
538 * runtime/Executable.cpp:
539 (JSC::EvalExecutable::compile):
540 (JSC::ProgramExecutable::checkSyntax):
541 (JSC::ProgramExecutable::compile):
542 * runtime/FunctionConstructor.cpp:
543 (JSC::constructFunction):
544 * runtime/FunctionPrototype.cpp:
545 (JSC::functionProtoFuncToString):
546 (JSC::functionProtoFuncApply):
547 (JSC::functionProtoFuncCall):
548 * runtime/Identifier.cpp:
549 (JSC::Identifier::from):
550 * runtime/Identifier.h:
551 * runtime/JSArray.cpp:
553 * runtime/JSFunction.cpp:
554 (JSC::callHostFunctionAsConstructor):
555 * runtime/JSGlobalObjectFunctions.cpp:
558 (JSC::globalFuncEval):
559 * runtime/JSONObject.cpp:
560 (JSC::Stringifier::appendStringifiedValue):
562 (JSC::JSONProtoFuncParse):
563 (JSC::JSONProtoFuncStringify):
564 * runtime/JSObject.cpp:
565 (JSC::throwSetterError):
566 (JSC::JSObject::put):
567 (JSC::JSObject::putWithAttributes):
568 (JSC::JSObject::defaultValue):
569 (JSC::JSObject::hasInstance):
570 (JSC::JSObject::defineOwnProperty):
571 * runtime/JSObject.h:
572 * runtime/JSValue.cpp:
573 (JSC::JSValue::toObjectSlowCase):
574 (JSC::JSValue::synthesizeObject):
575 (JSC::JSValue::synthesizePrototype):
576 * runtime/NativeErrorConstructor.cpp:
577 (JSC::constructWithNativeErrorConstructor):
578 (JSC::callNativeErrorConstructor):
579 * runtime/NativeErrorConstructor.h:
580 * runtime/NumberPrototype.cpp:
581 (JSC::numberProtoFuncToString):
582 (JSC::numberProtoFuncToLocaleString):
583 (JSC::numberProtoFuncValueOf):
584 (JSC::numberProtoFuncToFixed):
585 (JSC::numberProtoFuncToExponential):
586 (JSC::numberProtoFuncToPrecision):
587 * runtime/ObjectConstructor.cpp:
588 (JSC::objectConstructorGetPrototypeOf):
589 (JSC::objectConstructorGetOwnPropertyDescriptor):
590 (JSC::objectConstructorGetOwnPropertyNames):
591 (JSC::objectConstructorKeys):
592 (JSC::toPropertyDescriptor):
593 (JSC::objectConstructorDefineProperty):
594 (JSC::objectConstructorDefineProperties):
595 (JSC::objectConstructorCreate):
596 * runtime/ObjectPrototype.cpp:
597 (JSC::objectProtoFuncDefineGetter):
598 (JSC::objectProtoFuncDefineSetter):
599 * runtime/RegExpConstructor.cpp:
600 (JSC::constructRegExp):
601 * runtime/RegExpObject.cpp:
602 (JSC::RegExpObject::match):
603 * runtime/RegExpPrototype.cpp:
604 (JSC::regExpProtoFuncTest):
605 (JSC::regExpProtoFuncExec):
606 (JSC::regExpProtoFuncCompile):
607 (JSC::regExpProtoFuncToString):
608 * runtime/StringPrototype.cpp:
609 (JSC::stringProtoFuncToString):
611 2010-06-05 Kwang Yul Seo <skyul@company100.net>
613 Reviewed by Eric Seidel.
615 [BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx
616 https://bugs.webkit.org/show_bug.cgi?id=39710
618 Build fix for BREW MP.
622 2010-06-04 Adam Barth <abarth@webkit.org>
624 Reviewed by Darin Adler.
626 HTML5 parser should be within 1% of old parser performance
627 https://bugs.webkit.org/show_bug.cgi?id=40172
629 Fix cast in this operator= to allow for assignment between vectors with
630 different inline capacities (as clearly intended by its author).
635 2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
637 Reviewed by Kenneth Rohde Christiansen.
639 New QtScript API; QScriptValue::instanceOf.
641 New function create an easy way to check value's prototype hierarchy.
643 [Qt] QScriptValue should have an instanceOf method
644 https://bugs.webkit.org/show_bug.cgi?id=40120
646 * qt/api/qscriptvalue.cpp:
647 (QScriptValue::instanceOf):
648 * qt/api/qscriptvalue.h:
649 * qt/api/qscriptvalue_p.h:
650 (QScriptValuePrivate::instanceOf):
651 * qt/tests/qscriptvalue/tst_qscriptvalue.h:
652 * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
653 (tst_QScriptValue::instanceOf_initData):
654 (tst_QScriptValue::instanceOf_makeData):
655 (tst_QScriptValue::instanceOf_test):
657 2010-06-04 Gavin Barraclough <barraclough@apple.com>
659 Reviewed by NOBODY (interpreter build fix).
661 * interpreter/Interpreter.cpp:
662 (JSC::Interpreter::privateExecute):
664 2010-06-04 Mark Rowe <mrowe@apple.com>
666 Silence some warnings seen on the build bot.
668 * JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline.
669 * JavaScriptCore.JSVALUE32only.exp: Ditto.
670 * JavaScriptCore.JSVALUE64only.exp: Ditto.
671 * JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't
672 complain about not knowing how to compile them.
674 2010-06-04 Gavin Barraclough <barraclough@apple.com>
676 Reviewed by Oliver Hunt.
678 Bug 40187 - Change function signature of NativeConstructor to match NativeFunction
680 Mostly for consistency, but constructor & args arguments are redundant,
681 and this will help if we wish to be able to JIT calls to more constructors.
683 * API/JSCallbackConstructor.cpp:
684 (JSC::constructJSCallback):
685 * API/JSCallbackObject.h:
686 * API/JSCallbackObjectFunctions.h:
688 * interpreter/Interpreter.cpp:
689 (JSC::Interpreter::executeConstruct):
690 * interpreter/Interpreter.h:
692 (JSC::DEFINE_STUB_FUNCTION):
693 * runtime/ArrayConstructor.cpp:
694 (JSC::constructWithArrayConstructor):
695 * runtime/BooleanConstructor.cpp:
696 (JSC::constructWithBooleanConstructor):
697 * runtime/ConstructData.cpp:
699 * runtime/ConstructData.h:
700 * runtime/DateConstructor.cpp:
701 (JSC::constructWithDateConstructor):
703 (JSC::constructNativeError):
704 (JSC::Error::create):
705 * runtime/ErrorConstructor.cpp:
706 (JSC::constructWithErrorConstructor):
707 * runtime/FunctionConstructor.cpp:
708 (JSC::constructWithFunctionConstructor):
709 * runtime/NativeErrorConstructor.cpp:
710 (JSC::constructWithNativeErrorConstructor):
711 * runtime/NativeErrorConstructor.h:
712 (JSC::NativeErrorConstructor::errorStructure):
713 * runtime/NumberConstructor.cpp:
714 (JSC::constructWithNumberConstructor):
715 * runtime/ObjectConstructor.cpp:
716 (JSC::constructWithObjectConstructor):
717 * runtime/RegExpConstructor.cpp:
718 (JSC::constructWithRegExpConstructor):
719 * runtime/StringConstructor.cpp:
720 (JSC::constructWithStringConstructor):
722 2010-06-04 Tony Gentilcore <tonyg@chromium.org>
724 Reviewed by Adam Barth.
726 Add a takeFirst() method to Deque and use it where appropriate.
727 https://bugs.webkit.org/show_bug.cgi?id=40089
731 * wtf/MainThread.cpp:
732 (WTF::dispatchFunctionsFromMainThread):
733 * wtf/MessageQueue.h:
734 (WTF::::tryGetMessage):
736 2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
738 Reviewed by Kenneth Rohde Christiansen.
740 Remove a QEXPECT_FAIL flag from an autotest.
742 Test tst_QScriptEngine::globalObject pass after 36600 bug
743 fix have been applied.
745 [Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed.
746 https://bugs.webkit.org/show_bug.cgi?id=40114
748 * qt/tests/qscriptengine/tst_qscriptengine.cpp:
749 (tst_QScriptEngine::globalObject):
751 2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
753 Reviewed by Kenneth Rohde Christiansen.
755 Fix QScriptValue::equals.
757 Handling for a few edge cases were added. Now comparison between
758 NaN, an invalid objects should works as supposed.
760 [Qt] QScriptValue::equals problems
761 https://bugs.webkit.org/show_bug.cgi?id=40110
763 * qt/api/qscriptvalue.cpp:
764 (QScriptValue::equals):
765 * qt/api/qscriptvalue_p.h:
766 (QScriptValuePrivate::equals):
767 * qt/tests/qscriptvalue/tst_qscriptvalue.h:
768 * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
769 (tst_QScriptValue::equals_initData):
770 (tst_QScriptValue::equals_makeData):
771 (tst_QScriptValue::equals_test):
773 2010-06-03 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
775 Reviewed by Kenneth Rohde Christiansen.
777 New states in QScriptValuePrivate.
779 The CSpecial state was divided into CNull and CUndefined. It simplify
780 the QScriptValue code by avoiding a few "cast" and "if".
781 Moreover the MSVS compiler didn't like casting between a double and an
782 enum which is avoided now.
784 [Qt] The QScriptValuePrivate::CSpecial is too generic.
785 https://bugs.webkit.org/show_bug.cgi?id=40067
787 * qt/api/qscriptvalue_p.h:
788 (QScriptValuePrivate::):
789 (QScriptValuePrivate::QScriptValuePrivate):
790 (QScriptValuePrivate::isNull):
791 (QScriptValuePrivate::isUndefined):
792 (QScriptValuePrivate::toString):
793 (QScriptValuePrivate::toNumber):
794 (QScriptValuePrivate::toBool):
795 (QScriptValuePrivate::toObject):
796 (QScriptValuePrivate::assignEngine):
797 (QScriptValuePrivate::isNumberBased):
799 2010-06-03 Gavin Barraclough <barraclough@apple.com>
801 Reviewed by NOBODY (Qt build fix).
805 2010-06-03 Gavin Barraclough <barraclough@apple.com>
807 Reviewed by Mark Rowe.
809 Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms
810 This was fixed in bug #40094.
812 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
815 2010-06-03 Gavin Barraclough <barraclough@apple.com>
817 Reviewed by NOBODY (Interpreter build fix).
819 * JavaScriptCore.JSVALUE32_64only.exp:
820 * JavaScriptCore.JSVALUE32only.exp:
821 * JavaScriptCore.JSVALUE64only.exp:
822 * interpreter/Interpreter.cpp:
823 (JSC::Interpreter::privateExecute):
825 2010-06-03 Gavin Barraclough <barraclough@apple.com>
827 Reviewed by NOBODY (windows build fix II).
829 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
831 2010-06-03 Gavin Barraclough <barraclough@apple.com>
833 Reviewed by NOBODY (windows build fix).
835 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
837 2010-06-02 Gavin Barraclough <barraclough@apple.com>
839 Reviewed by Oliver Hunt.
841 Bug 40094 - The return type of NativeFunction should be EncodedJSValue
842 On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
844 * API/JSCallbackFunction.cpp:
845 (JSC::JSCallbackFunction::call):
846 * API/JSCallbackFunction.h:
847 * API/JSCallbackObject.h:
848 * API/JSCallbackObjectFunctions.h:
850 * JavaScriptCore.exp:
851 * interpreter/Interpreter.cpp:
852 (JSC::Interpreter::executeCall):
854 (JSC::DEFINE_STUB_FUNCTION):
863 (functionCheckSyntax):
864 (functionSetSamplingFlags):
865 (functionClearSamplingFlags):
868 * runtime/ArrayConstructor.cpp:
869 (JSC::callArrayConstructor):
870 (JSC::arrayConstructorIsArray):
871 * runtime/ArrayPrototype.cpp:
872 (JSC::arrayProtoFuncToString):
873 (JSC::arrayProtoFuncToLocaleString):
874 (JSC::arrayProtoFuncJoin):
875 (JSC::arrayProtoFuncConcat):
876 (JSC::arrayProtoFuncPop):
877 (JSC::arrayProtoFuncPush):
878 (JSC::arrayProtoFuncReverse):
879 (JSC::arrayProtoFuncShift):
880 (JSC::arrayProtoFuncSlice):
881 (JSC::arrayProtoFuncSort):
882 (JSC::arrayProtoFuncSplice):
883 (JSC::arrayProtoFuncUnShift):
884 (JSC::arrayProtoFuncFilter):
885 (JSC::arrayProtoFuncMap):
886 (JSC::arrayProtoFuncEvery):
887 (JSC::arrayProtoFuncForEach):
888 (JSC::arrayProtoFuncSome):
889 (JSC::arrayProtoFuncReduce):
890 (JSC::arrayProtoFuncReduceRight):
891 (JSC::arrayProtoFuncIndexOf):
892 (JSC::arrayProtoFuncLastIndexOf):
893 * runtime/BooleanConstructor.cpp:
894 (JSC::callBooleanConstructor):
895 * runtime/BooleanPrototype.cpp:
896 (JSC::booleanProtoFuncToString):
897 (JSC::booleanProtoFuncValueOf):
898 * runtime/CallData.h:
899 * runtime/DateConstructor.cpp:
904 * runtime/DatePrototype.cpp:
905 (JSC::dateProtoFuncToString):
906 (JSC::dateProtoFuncToUTCString):
907 (JSC::dateProtoFuncToISOString):
908 (JSC::dateProtoFuncToDateString):
909 (JSC::dateProtoFuncToTimeString):
910 (JSC::dateProtoFuncToLocaleString):
911 (JSC::dateProtoFuncToLocaleDateString):
912 (JSC::dateProtoFuncToLocaleTimeString):
913 (JSC::dateProtoFuncGetTime):
914 (JSC::dateProtoFuncGetFullYear):
915 (JSC::dateProtoFuncGetUTCFullYear):
916 (JSC::dateProtoFuncToGMTString):
917 (JSC::dateProtoFuncGetMonth):
918 (JSC::dateProtoFuncGetUTCMonth):
919 (JSC::dateProtoFuncGetDate):
920 (JSC::dateProtoFuncGetUTCDate):
921 (JSC::dateProtoFuncGetDay):
922 (JSC::dateProtoFuncGetUTCDay):
923 (JSC::dateProtoFuncGetHours):
924 (JSC::dateProtoFuncGetUTCHours):
925 (JSC::dateProtoFuncGetMinutes):
926 (JSC::dateProtoFuncGetUTCMinutes):
927 (JSC::dateProtoFuncGetSeconds):
928 (JSC::dateProtoFuncGetUTCSeconds):
929 (JSC::dateProtoFuncGetMilliSeconds):
930 (JSC::dateProtoFuncGetUTCMilliseconds):
931 (JSC::dateProtoFuncGetTimezoneOffset):
932 (JSC::dateProtoFuncSetTime):
933 (JSC::dateProtoFuncSetMilliSeconds):
934 (JSC::dateProtoFuncSetUTCMilliseconds):
935 (JSC::dateProtoFuncSetSeconds):
936 (JSC::dateProtoFuncSetUTCSeconds):
937 (JSC::dateProtoFuncSetMinutes):
938 (JSC::dateProtoFuncSetUTCMinutes):
939 (JSC::dateProtoFuncSetHours):
940 (JSC::dateProtoFuncSetUTCHours):
941 (JSC::dateProtoFuncSetDate):
942 (JSC::dateProtoFuncSetUTCDate):
943 (JSC::dateProtoFuncSetMonth):
944 (JSC::dateProtoFuncSetUTCMonth):
945 (JSC::dateProtoFuncSetFullYear):
946 (JSC::dateProtoFuncSetUTCFullYear):
947 (JSC::dateProtoFuncSetYear):
948 (JSC::dateProtoFuncGetYear):
949 (JSC::dateProtoFuncToJSON):
950 * runtime/ErrorConstructor.cpp:
951 (JSC::callErrorConstructor):
952 * runtime/ErrorPrototype.cpp:
953 (JSC::errorProtoFuncToString):
954 * runtime/FunctionConstructor.cpp:
955 (JSC::callFunctionConstructor):
956 * runtime/FunctionPrototype.cpp:
957 (JSC::callFunctionPrototype):
958 (JSC::functionProtoFuncToString):
959 (JSC::functionProtoFuncApply):
960 (JSC::functionProtoFuncCall):
963 (JSC::getConstructData):
964 * runtime/JSFunction.cpp:
965 (JSC::callHostFunctionAsConstructor):
966 * runtime/JSFunction.h:
967 * runtime/JSGlobalObjectFunctions.cpp:
968 (JSC::globalFuncEval):
969 (JSC::globalFuncParseInt):
970 (JSC::globalFuncParseFloat):
971 (JSC::globalFuncIsNaN):
972 (JSC::globalFuncIsFinite):
973 (JSC::globalFuncDecodeURI):
974 (JSC::globalFuncDecodeURIComponent):
975 (JSC::globalFuncEncodeURI):
976 (JSC::globalFuncEncodeURIComponent):
977 (JSC::globalFuncEscape):
978 (JSC::globalFuncUnescape):
979 (JSC::globalFuncJSCPrint):
980 * runtime/JSGlobalObjectFunctions.h:
981 * runtime/JSONObject.cpp:
982 (JSC::JSONProtoFuncParse):
983 (JSC::JSONProtoFuncStringify):
984 * runtime/JSObject.cpp:
985 (JSC::callDefaultValueFunction):
987 * runtime/MathObject.cpp:
988 (JSC::mathProtoFuncAbs):
989 (JSC::mathProtoFuncACos):
990 (JSC::mathProtoFuncASin):
991 (JSC::mathProtoFuncATan):
992 (JSC::mathProtoFuncATan2):
993 (JSC::mathProtoFuncCeil):
994 (JSC::mathProtoFuncCos):
995 (JSC::mathProtoFuncExp):
996 (JSC::mathProtoFuncFloor):
997 (JSC::mathProtoFuncLog):
998 (JSC::mathProtoFuncMax):
999 (JSC::mathProtoFuncMin):
1000 (JSC::mathProtoFuncPow):
1001 (JSC::mathProtoFuncRandom):
1002 (JSC::mathProtoFuncRound):
1003 (JSC::mathProtoFuncSin):
1004 (JSC::mathProtoFuncSqrt):
1005 (JSC::mathProtoFuncTan):
1006 * runtime/NativeErrorConstructor.cpp:
1007 (JSC::callNativeErrorConstructor):
1008 * runtime/NumberConstructor.cpp:
1009 (JSC::callNumberConstructor):
1010 * runtime/NumberPrototype.cpp:
1011 (JSC::numberProtoFuncToString):
1012 (JSC::numberProtoFuncToLocaleString):
1013 (JSC::numberProtoFuncValueOf):
1014 (JSC::numberProtoFuncToFixed):
1015 (JSC::numberProtoFuncToExponential):
1016 (JSC::numberProtoFuncToPrecision):
1017 * runtime/ObjectConstructor.cpp:
1018 (JSC::callObjectConstructor):
1019 (JSC::objectConstructorGetPrototypeOf):
1020 (JSC::objectConstructorGetOwnPropertyDescriptor):
1021 (JSC::objectConstructorGetOwnPropertyNames):
1022 (JSC::objectConstructorKeys):
1023 (JSC::toPropertyDescriptor):
1024 (JSC::objectConstructorDefineProperty):
1025 (JSC::objectConstructorDefineProperties):
1026 (JSC::objectConstructorCreate):
1027 * runtime/ObjectPrototype.cpp:
1028 (JSC::objectProtoFuncValueOf):
1029 (JSC::objectProtoFuncHasOwnProperty):
1030 (JSC::objectProtoFuncIsPrototypeOf):
1031 (JSC::objectProtoFuncDefineGetter):
1032 (JSC::objectProtoFuncDefineSetter):
1033 (JSC::objectProtoFuncLookupGetter):
1034 (JSC::objectProtoFuncLookupSetter):
1035 (JSC::objectProtoFuncPropertyIsEnumerable):
1036 (JSC::objectProtoFuncToLocaleString):
1037 (JSC::objectProtoFuncToString):
1038 * runtime/ObjectPrototype.h:
1039 * runtime/RegExpConstructor.cpp:
1040 (JSC::callRegExpConstructor):
1041 * runtime/RegExpObject.cpp:
1042 (JSC::callRegExpObject):
1043 * runtime/RegExpPrototype.cpp:
1044 (JSC::regExpProtoFuncTest):
1045 (JSC::regExpProtoFuncExec):
1046 (JSC::regExpProtoFuncCompile):
1047 (JSC::regExpProtoFuncToString):
1048 * runtime/StringConstructor.cpp:
1049 (JSC::stringFromCharCode):
1050 (JSC::callStringConstructor):
1051 * runtime/StringPrototype.cpp:
1052 (JSC::stringProtoFuncReplace):
1053 (JSC::stringProtoFuncToString):
1054 (JSC::stringProtoFuncCharAt):
1055 (JSC::stringProtoFuncCharCodeAt):
1056 (JSC::stringProtoFuncConcat):
1057 (JSC::stringProtoFuncIndexOf):
1058 (JSC::stringProtoFuncLastIndexOf):
1059 (JSC::stringProtoFuncMatch):
1060 (JSC::stringProtoFuncSearch):
1061 (JSC::stringProtoFuncSlice):
1062 (JSC::stringProtoFuncSplit):
1063 (JSC::stringProtoFuncSubstr):
1064 (JSC::stringProtoFuncSubstring):
1065 (JSC::stringProtoFuncToLowerCase):
1066 (JSC::stringProtoFuncToUpperCase):
1067 (JSC::stringProtoFuncLocaleCompare):
1068 (JSC::stringProtoFuncBig):
1069 (JSC::stringProtoFuncSmall):
1070 (JSC::stringProtoFuncBlink):
1071 (JSC::stringProtoFuncBold):
1072 (JSC::stringProtoFuncFixed):
1073 (JSC::stringProtoFuncItalics):
1074 (JSC::stringProtoFuncStrike):
1075 (JSC::stringProtoFuncSub):
1076 (JSC::stringProtoFuncSup):
1077 (JSC::stringProtoFuncFontcolor):
1078 (JSC::stringProtoFuncFontsize):
1079 (JSC::stringProtoFuncAnchor):
1080 (JSC::stringProtoFuncLink):
1081 (JSC::stringProtoFuncTrim):
1082 (JSC::stringProtoFuncTrimLeft):
1083 (JSC::stringProtoFuncTrimRight):
1085 2010-06-02 Mark Rowe <mrowe@apple.com>
1087 Reviewed by Gavin Barraclough.
1089 Add value-representation specific sections to the mac export file.
1091 * Configurations/JavaScriptCore.xcconfig:
1092 * DerivedSources.make:
1093 * JavaScriptCore.JSVALUE32_64only.exp: Added.
1094 * JavaScriptCore.JSVALUE32only.exp: Added.
1095 * JavaScriptCore.JSVALUE64only.exp: Added.
1096 * JavaScriptCore.xcodeproj/project.pbxproj:
1098 2010-06-02 Mark Rowe <mrowe@apple.com>
1100 Reviewed by Gavin Barraclough.
1102 <rdar://problem/8054988> Work around an LLVM GCC code generation bug that results in crashes inside PCRE.
1104 * pcre/pcre_exec.cpp:
1105 (repeatInformationFromInstructionOffset): Change the type of instructionOffset to int. There's no good
1106 reason for it to be a short, and using int prevents this code from triggering the LLVM GCC bug.
1108 2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
1110 Reviewed by Kenneth Rohde Christiansen.
1112 Fix the QScriptValue::strictlyEquals function.
1114 Handling for a few edge cases was added.
1116 New autotest that covers the QScriptValue::strictlyEquals function.
1118 [Qt] QScriptValue::strictlyEquals is broken
1119 https://bugs.webkit.org/show_bug.cgi?id=36600
1121 * qt/api/qscriptvalue.cpp:
1122 (QScriptValue::strictlyEquals):
1123 * qt/api/qscriptvalue_p.h:
1124 (QScriptValuePrivate::strictlyEquals):
1125 * qt/tests/qscriptvalue/qscriptvalue.pro:
1126 * qt/tests/qscriptvalue/tst_qscriptvalue.h:
1127 * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: Added.
1128 (tst_QScriptValue::strictlyEquals_initData):
1129 (tst_QScriptValue::strictlyEquals_makeData):
1130 (tst_QScriptValue::strictlyEquals_test):
1132 2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
1134 Reviewed by Kenneth Rohde Christiansen.
1136 New function QScriptEngine::newObject.
1138 The function creates a object of class Object and returns it
1141 [Qt] QScriptEngine API should contain a newObject function
1142 https://bugs.webkit.org/show_bug.cgi?id=39114
1144 * qt/api/qscriptengine.cpp:
1145 (QScriptEngine::newObject):
1146 * qt/api/qscriptengine.h:
1147 * qt/api/qscriptengine_p.cpp:
1148 (QScriptEnginePrivate::newObject):
1149 * qt/api/qscriptengine_p.h:
1150 * qt/tests/qscriptengine/tst_qscriptengine.cpp:
1151 (tst_QScriptEngine::newObject):
1153 2010-06-02 Gabor Loki <loki@webkit.org>
1155 Reviewed by Gavin Barraclough.
1156 https://bugs.webkit.org/show_bug.cgi?id=40011
1158 Thumb-2 build fix: The offset parameter of ldrh should be encoded as an
1159 imm12 immediate constant in load16. If it is not fit in the instruction
1160 a temporary register has to be used.
1162 * assembler/MacroAssemblerARMv7.h:
1163 (JSC::MacroAssemblerARMv7::load16):
1165 2010-06-02 Sterling Swigart <sswigart@google.com>
1167 Reviewed by David Levin.
1169 Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches.
1170 https://bugs.webkit.org/show_bug.cgi?id=39906
1172 * Configurations/FeatureDefines.xcconfig:
1174 2010-06-01 Gavin Barraclough <barraclough@apple.com>
1176 Reviewed by Sam Weinig.
1178 Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together
1180 This is a useful stepping stone towards reversing argument order.
1182 * bytecompiler/BytecodeGenerator.cpp:
1183 (JSC::BytecodeGenerator::BytecodeGenerator):
1184 (JSC::BytecodeGenerator::addParameter):
1185 (JSC::BytecodeGenerator::emitCall):
1186 (JSC::BytecodeGenerator::emitCallEval):
1187 (JSC::BytecodeGenerator::emitConstruct):
1188 * bytecompiler/BytecodeGenerator.h:
1189 (JSC::CallArguments::thisRegister):
1190 (JSC::CallArguments::argumentRegister):
1191 (JSC::CallArguments::callFrame):
1192 (JSC::CallArguments::count):
1193 (JSC::BytecodeGenerator::shouldEmitProfileHooks):
1194 * bytecompiler/NodesCodegen.cpp:
1195 (JSC::NewExprNode::emitBytecode):
1196 (JSC::CallArguments::CallArguments):
1197 (JSC::EvalFunctionCallNode::emitBytecode):
1198 (JSC::FunctionCallValueNode::emitBytecode):
1199 (JSC::FunctionCallResolveNode::emitBytecode):
1200 (JSC::FunctionCallBracketNode::emitBytecode):
1201 (JSC::FunctionCallDotNode::emitBytecode):
1202 (JSC::CallFunctionCallDotNode::emitBytecode):
1203 (JSC::ApplyFunctionCallDotNode::emitBytecode):
1205 2010-06-01 Yong Li <yoli@rim.com>
1207 Reviewed by Darin Adler.
1209 Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex.
1210 https://bugs.webkit.org/show_bug.cgi?id=39893
1212 * wtf/ThreadingPthreads.cpp:
1213 (WTF::Mutex::Mutex):
1215 2010-06-01 Kwang Yul Seo <skyul@company100.net>
1217 Reviewed by Xan Lopez.
1219 [GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap
1220 https://bugs.webkit.org/show_bug.cgi?id=39831
1222 Use DEFINE_STATIC_LOCAL for static local variables.
1224 * wtf/gtk/ThreadingGtk.cpp:
1225 (WTF::threadMapMutex):
1227 (WTF::identifierByGthreadHandle):
1229 2010-06-01 Kent Tamura <tkent@chromium.org>
1231 Reviewed by Shinichiro Hamaji.
1233 Fix style errors of dtoa
1234 https://bugs.webkit.org/show_bug.cgi?id=39972
1236 Fix all errors reported by check-webkit-style.
1241 2010-05-30 Darin Adler <darin@apple.com>
1243 Reviewed by Sam Weinig.
1245 * wtf/OwnArrayPtr.h:
1246 (WTF::OwnArrayPtr::set): Fix the assertion in here to match the one in OwnPtr.
1247 At some point someone fixed the "asserts when assigning to 0 and the pointer is
1248 already 0" issue in OwnPtr but forgot to do it here.
1250 2010-05-29 Geoffrey Garen <ggaren@apple.com>
1252 Windows build fix: Updated exported symbols.
1254 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1256 2010-05-29 Geoffrey Garen <ggaren@apple.com>
1258 Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I
1259 can figure out why it's crashing.
1263 2010-05-29 Geoffrey Garen <ggaren@apple.com>
1265 Fixed Windows crash seen on buildbot.
1267 * jit/JITOpcodes32_64.cpp:
1268 (JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first
1271 2010-05-28 Geoffrey Garen <ggaren@apple.com>
1273 Windows build fix: Updated exported symbols.
1275 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1277 2010-05-28 Geoffrey Garen <ggaren@apple.com>
1279 Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL
1282 * runtime/Lookup.cpp:
1283 (JSC::setUpStaticFunctionSlot):
1287 2010-05-28 Geoffrey Garen <ggaren@apple.com>
1289 Windows build fix: Updated exported symbols.
1291 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1293 2010-05-28 Geoffrey Garen <ggaren@apple.com>
1295 Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
1297 Simplified the host calling convention.
1299 22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host
1302 No change on SunSpider.
1304 All JS calls (but not constructs, yet) now go through the normal JS
1305 calling convention via the RegisterFile. As a result, the host calling
1306 convention, which used to be this
1308 JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&)
1312 JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*)
1314 Callee, 'this', and argument access all hapen relative to the ExecState*,
1315 which is a pointer into the RegisterFile.
1317 This patch comes in two parts.
1319 PART ONE: Functional code changes.
1321 * wtf/Platform.h: Disabled optimized calls on platforms I didn't test.
1322 We can re-enable once we verify that host calls on these platforms are
1325 * debugger/DebuggerCallFrame.cpp:
1326 (JSC::DebuggerCallFrame::functionName):
1327 (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to
1328 ExecState::callee().
1330 (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue().
1332 * interpreter/CallFrame.cpp:
1333 * interpreter/CallFrame.h:
1334 (JSC::ExecState::callee):
1335 (JSC::ExecState::scopeChain):
1336 (JSC::ExecState::init): Changed callee() to be JSObject* instead of
1337 JSFunction* -- now, it might be some other callable host object.
1339 (JSC::ExecState::hostThisRegister):
1340 (JSC::ExecState::hostThisValue):
1341 (JSC::ExecState::argumentCount):
1342 (JSC::ExecState::argumentCountIncludingThis):
1343 (JSC::ExecState::argument):
1344 (JSC::ExecState::setArgumentCountIncludingThis):
1345 (JSC::ExecState::setCallee): Added convenient accessors for arguments
1346 from within a host function. Removed thisValue() because it was too
1347 tempting to use incorrectly, and it only had one or two clients, anyway.
1349 * interpreter/Interpreter.cpp:
1350 (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue().
1352 (JSC::Interpreter::throwException): Be sure to shrink the register file
1353 before invoking the exception handler, to reduce the chances that the
1354 handler will re-throw in the case of stack overflow. (Re-throwing is now
1355 more likely than it used to be, since standardizing the calling convention
1356 implicitly added stack overflow checks to some places where they used to be missing.)
1358 (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope.
1359 Updated for CallFrame::init API change.
1361 (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope.
1362 Updated for CallFrame::init API change. Added support for calling a host
1365 (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope.
1366 Updated for CallFrame::init API change.
1368 (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change.
1370 (JSC::Interpreter::privateExecute): Updated for CallFrame::init API change.
1371 Added some explicit JSValue(JSObject*) initialization, since relaxing
1372 the JSFunction* restriction on callee has made register types more ambiguous.
1373 Removed toThisObject() conversion, since all callees do it themselves now.
1374 Updated host function call for new host function signature. Updated for
1375 change to ExecState::argumentCount() API.
1377 * interpreter/Register.h:
1379 (JSC::Register::operator=):
1380 (JSC::Register::function): Changed callee() to be JSObject* instead of
1381 JSFunction* -- now, it might be some other callable host object.
1383 * jit/JITOpcodes.cpp:
1384 (JSC::JIT::privateCompileCTINativeCall):
1385 * jit/JITOpcodes32_64.cpp:
1386 (JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that
1387 set up the arguments to host functions -- all but one of the arguments
1388 are gone now. This is the actual optimization.
1391 (JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API
1392 changes noted above. Removed toThisObject() conversion, since all callees
1393 do it themselves now.
1395 * runtime/ArgList.h:
1396 (JSC::ArgList::ArgList): ArgList is getting close to unused. Added a
1397 temporary shim for converting from ExecState* to ArgList where it's still
1400 * runtime/Arguments.h:
1401 (JSC::Arguments::getArgumentsData):
1402 (JSC::Arguments::Arguments): Updated for ExecState and Register API
1403 changes noted above.
1405 * runtime/CallData.cpp:
1406 (JSC::call): Changed call always to call Interpreter::executeCall, even
1407 for host functions. This ensures that the normal calling convention is
1408 set up in the RegsiterFile when calling from C++ to host function.
1410 * runtime/CallData.h: Changed host function signature as described above.
1412 * runtime/ConstructData.cpp:
1413 (JSC::construct): Moved JSFunction::construct code here so I could nix
1414 JSFunction::call and JSFunction::call. We want a JSFunction-agnostic
1415 way to call and construct, so that everything works naturally for non-
1418 * runtime/JSFunction.cpp:
1419 (JSC::callHostFunctionAsConstructor):
1420 * runtime/JSFunction.h: Updated for ExecState and Register API changes
1421 noted above. Nixed JSFunction::call and JSFunction::construct, noted above.
1423 * runtime/JSGlobalObject.cpp:
1424 (JSC::JSGlobalObject::init): Ditto.
1426 PART TWO: Global search and replace.
1428 In the areas below, I used global search-and-replace to change
1429 (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
1430 args.size() => exec->argumentCount()
1431 args.at(i) => exec->argument(i)
1433 * API/JSCallbackFunction.cpp:
1434 (JSC::JSCallbackFunction::call):
1435 * API/JSCallbackFunction.h:
1436 * API/JSCallbackObject.h:
1437 * API/JSCallbackObjectFunctions.h:
1439 * JavaScriptCore.exp:
1447 (functionCheckSyntax):
1448 (functionSetSamplingFlags):
1449 (functionClearSamplingFlags):
1452 * runtime/ArrayConstructor.cpp:
1453 (JSC::callArrayConstructor):
1454 (JSC::arrayConstructorIsArray):
1455 * runtime/ArrayPrototype.cpp:
1456 (JSC::arrayProtoFuncToString):
1457 (JSC::arrayProtoFuncToLocaleString):
1458 (JSC::arrayProtoFuncJoin):
1459 (JSC::arrayProtoFuncConcat):
1460 (JSC::arrayProtoFuncPop):
1461 (JSC::arrayProtoFuncPush):
1462 (JSC::arrayProtoFuncReverse):
1463 (JSC::arrayProtoFuncShift):
1464 (JSC::arrayProtoFuncSlice):
1465 (JSC::arrayProtoFuncSort):
1466 (JSC::arrayProtoFuncSplice):
1467 (JSC::arrayProtoFuncUnShift):
1468 (JSC::arrayProtoFuncFilter):
1469 (JSC::arrayProtoFuncMap):
1470 (JSC::arrayProtoFuncEvery):
1471 (JSC::arrayProtoFuncForEach):
1472 (JSC::arrayProtoFuncSome):
1473 (JSC::arrayProtoFuncReduce):
1474 (JSC::arrayProtoFuncReduceRight):
1475 (JSC::arrayProtoFuncIndexOf):
1476 (JSC::arrayProtoFuncLastIndexOf):
1477 * runtime/BooleanConstructor.cpp:
1478 (JSC::callBooleanConstructor):
1479 * runtime/BooleanPrototype.cpp:
1480 (JSC::booleanProtoFuncToString):
1481 (JSC::booleanProtoFuncValueOf):
1482 * runtime/DateConstructor.cpp:
1487 * runtime/DatePrototype.cpp:
1488 (JSC::formatLocaleDate):
1489 (JSC::fillStructuresUsingTimeArgs):
1490 (JSC::fillStructuresUsingDateArgs):
1491 (JSC::dateProtoFuncToString):
1492 (JSC::dateProtoFuncToUTCString):
1493 (JSC::dateProtoFuncToISOString):
1494 (JSC::dateProtoFuncToDateString):
1495 (JSC::dateProtoFuncToTimeString):
1496 (JSC::dateProtoFuncToLocaleString):
1497 (JSC::dateProtoFuncToLocaleDateString):
1498 (JSC::dateProtoFuncToLocaleTimeString):
1499 (JSC::dateProtoFuncGetTime):
1500 (JSC::dateProtoFuncGetFullYear):
1501 (JSC::dateProtoFuncGetUTCFullYear):
1502 (JSC::dateProtoFuncToGMTString):
1503 (JSC::dateProtoFuncGetMonth):
1504 (JSC::dateProtoFuncGetUTCMonth):
1505 (JSC::dateProtoFuncGetDate):
1506 (JSC::dateProtoFuncGetUTCDate):
1507 (JSC::dateProtoFuncGetDay):
1508 (JSC::dateProtoFuncGetUTCDay):
1509 (JSC::dateProtoFuncGetHours):
1510 (JSC::dateProtoFuncGetUTCHours):
1511 (JSC::dateProtoFuncGetMinutes):
1512 (JSC::dateProtoFuncGetUTCMinutes):
1513 (JSC::dateProtoFuncGetSeconds):
1514 (JSC::dateProtoFuncGetUTCSeconds):
1515 (JSC::dateProtoFuncGetMilliSeconds):
1516 (JSC::dateProtoFuncGetUTCMilliseconds):
1517 (JSC::dateProtoFuncGetTimezoneOffset):
1518 (JSC::dateProtoFuncSetTime):
1519 (JSC::setNewValueFromTimeArgs):
1520 (JSC::setNewValueFromDateArgs):
1521 (JSC::dateProtoFuncSetMilliSeconds):
1522 (JSC::dateProtoFuncSetUTCMilliseconds):
1523 (JSC::dateProtoFuncSetSeconds):
1524 (JSC::dateProtoFuncSetUTCSeconds):
1525 (JSC::dateProtoFuncSetMinutes):
1526 (JSC::dateProtoFuncSetUTCMinutes):
1527 (JSC::dateProtoFuncSetHours):
1528 (JSC::dateProtoFuncSetUTCHours):
1529 (JSC::dateProtoFuncSetDate):
1530 (JSC::dateProtoFuncSetUTCDate):
1531 (JSC::dateProtoFuncSetMonth):
1532 (JSC::dateProtoFuncSetUTCMonth):
1533 (JSC::dateProtoFuncSetFullYear):
1534 (JSC::dateProtoFuncSetUTCFullYear):
1535 (JSC::dateProtoFuncSetYear):
1536 (JSC::dateProtoFuncGetYear):
1537 (JSC::dateProtoFuncToJSON):
1538 * runtime/ErrorConstructor.cpp:
1539 (JSC::callErrorConstructor):
1540 * runtime/ErrorPrototype.cpp:
1541 (JSC::errorProtoFuncToString):
1542 * runtime/FunctionConstructor.cpp:
1543 (JSC::callFunctionConstructor):
1544 * runtime/FunctionPrototype.cpp:
1545 (JSC::callFunctionPrototype):
1546 (JSC::functionProtoFuncToString):
1547 (JSC::functionProtoFuncApply):
1548 (JSC::functionProtoFuncCall):
1549 * runtime/JSGlobalObjectFunctions.cpp:
1552 (JSC::globalFuncEval):
1553 (JSC::globalFuncParseInt):
1554 (JSC::globalFuncParseFloat):
1555 (JSC::globalFuncIsNaN):
1556 (JSC::globalFuncIsFinite):
1557 (JSC::globalFuncDecodeURI):
1558 (JSC::globalFuncDecodeURIComponent):
1559 (JSC::globalFuncEncodeURI):
1560 (JSC::globalFuncEncodeURIComponent):
1561 (JSC::globalFuncEscape):
1562 (JSC::globalFuncUnescape):
1563 (JSC::globalFuncJSCPrint):
1564 * runtime/JSGlobalObjectFunctions.h:
1565 * runtime/JSONObject.cpp:
1566 (JSC::JSONProtoFuncParse):
1567 (JSC::JSONProtoFuncStringify):
1568 * runtime/JSString.h:
1569 * runtime/MathObject.cpp:
1570 (JSC::mathProtoFuncAbs):
1571 (JSC::mathProtoFuncACos):
1572 (JSC::mathProtoFuncASin):
1573 (JSC::mathProtoFuncATan):
1574 (JSC::mathProtoFuncATan2):
1575 (JSC::mathProtoFuncCeil):
1576 (JSC::mathProtoFuncCos):
1577 (JSC::mathProtoFuncExp):
1578 (JSC::mathProtoFuncFloor):
1579 (JSC::mathProtoFuncLog):
1580 (JSC::mathProtoFuncMax):
1581 (JSC::mathProtoFuncMin):
1582 (JSC::mathProtoFuncPow):
1583 (JSC::mathProtoFuncRandom):
1584 (JSC::mathProtoFuncRound):
1585 (JSC::mathProtoFuncSin):
1586 (JSC::mathProtoFuncSqrt):
1587 (JSC::mathProtoFuncTan):
1588 * runtime/NativeErrorConstructor.cpp:
1589 (JSC::callNativeErrorConstructor):
1590 * runtime/NumberConstructor.cpp:
1591 (JSC::callNumberConstructor):
1592 * runtime/NumberPrototype.cpp:
1593 (JSC::numberProtoFuncToString):
1594 (JSC::numberProtoFuncToLocaleString):
1595 (JSC::numberProtoFuncValueOf):
1596 (JSC::numberProtoFuncToFixed):
1597 (JSC::numberProtoFuncToExponential):
1598 (JSC::numberProtoFuncToPrecision):
1599 * runtime/ObjectConstructor.cpp:
1600 (JSC::callObjectConstructor):
1601 (JSC::objectConstructorGetPrototypeOf):
1602 (JSC::objectConstructorGetOwnPropertyDescriptor):
1603 (JSC::objectConstructorGetOwnPropertyNames):
1604 (JSC::objectConstructorKeys):
1605 (JSC::objectConstructorDefineProperty):
1606 (JSC::objectConstructorDefineProperties):
1607 (JSC::objectConstructorCreate):
1608 * runtime/ObjectPrototype.cpp:
1609 (JSC::objectProtoFuncValueOf):
1610 (JSC::objectProtoFuncHasOwnProperty):
1611 (JSC::objectProtoFuncIsPrototypeOf):
1612 (JSC::objectProtoFuncDefineGetter):
1613 (JSC::objectProtoFuncDefineSetter):
1614 (JSC::objectProtoFuncLookupGetter):
1615 (JSC::objectProtoFuncLookupSetter):
1616 (JSC::objectProtoFuncPropertyIsEnumerable):
1617 (JSC::objectProtoFuncToLocaleString):
1618 (JSC::objectProtoFuncToString):
1619 * runtime/ObjectPrototype.h:
1620 * runtime/Operations.h:
1622 * runtime/RegExpConstructor.cpp:
1623 (JSC::callRegExpConstructor):
1624 * runtime/RegExpObject.cpp:
1625 (JSC::RegExpObject::test):
1626 (JSC::RegExpObject::exec):
1627 (JSC::callRegExpObject):
1628 (JSC::RegExpObject::match):
1629 * runtime/RegExpObject.h:
1630 * runtime/RegExpPrototype.cpp:
1631 (JSC::regExpProtoFuncTest):
1632 (JSC::regExpProtoFuncExec):
1633 (JSC::regExpProtoFuncCompile):
1634 (JSC::regExpProtoFuncToString):
1635 * runtime/StringConstructor.cpp:
1636 (JSC::stringFromCharCodeSlowCase):
1637 (JSC::stringFromCharCode):
1638 (JSC::callStringConstructor):
1639 * runtime/StringPrototype.cpp:
1640 (JSC::stringProtoFuncReplace):
1641 (JSC::stringProtoFuncToString):
1642 (JSC::stringProtoFuncCharAt):
1643 (JSC::stringProtoFuncCharCodeAt):
1644 (JSC::stringProtoFuncConcat):
1645 (JSC::stringProtoFuncIndexOf):
1646 (JSC::stringProtoFuncLastIndexOf):
1647 (JSC::stringProtoFuncMatch):
1648 (JSC::stringProtoFuncSearch):
1649 (JSC::stringProtoFuncSlice):
1650 (JSC::stringProtoFuncSplit):
1651 (JSC::stringProtoFuncSubstr):
1652 (JSC::stringProtoFuncSubstring):
1653 (JSC::stringProtoFuncToLowerCase):
1654 (JSC::stringProtoFuncToUpperCase):
1655 (JSC::stringProtoFuncLocaleCompare):
1656 (JSC::stringProtoFuncBig):
1657 (JSC::stringProtoFuncSmall):
1658 (JSC::stringProtoFuncBlink):
1659 (JSC::stringProtoFuncBold):
1660 (JSC::stringProtoFuncFixed):
1661 (JSC::stringProtoFuncItalics):
1662 (JSC::stringProtoFuncStrike):
1663 (JSC::stringProtoFuncSub):
1664 (JSC::stringProtoFuncSup):
1665 (JSC::stringProtoFuncFontcolor):
1666 (JSC::stringProtoFuncFontsize):
1667 (JSC::stringProtoFuncAnchor):
1668 (JSC::stringProtoFuncLink):
1669 (JSC::stringProtoFuncTrim):
1670 (JSC::stringProtoFuncTrimLeft):
1671 (JSC::stringProtoFuncTrimRight):
1673 2010-05-28 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
1675 Reviewed by Geoffrey Garen.
1677 Fix the JSObjectSetPrototype function.
1679 A cycle in a prototype chain can cause an application hang or
1681 A check for a prototype chain cycles was added to
1682 the JSObjectSetPrototype.
1684 JSObjectSetPrototype doesn't check for cycle in prototype chain.
1685 https://bugs.webkit.org/show_bug.cgi?id=39360
1687 * API/JSObjectRef.cpp:
1688 (JSObjectSetPrototype):
1689 * API/tests/testapi.c:
1691 (checkForCycleInPrototypeChain):
1693 * runtime/JSObject.cpp:
1694 (JSC::JSObject::put):
1695 * runtime/JSObject.h:
1696 (JSC::JSObject::setPrototypeWithCycleCheck):
1698 2010-05-28 Chao-ying Fu <fu@mips.com>
1700 Reviewed by Eric Seidel.
1702 Fix MIPS JIT DoubleGreaterThanOrEqual Operands
1703 https://bugs.webkit.org/show_bug.cgi?id=39504
1705 Swapped two operands of left and right for DoubleGreaterThanOrEqual.
1706 This patch fixed two layout tests as follows.
1707 fast/js/comparison-operators-greater.html
1708 fast/js/comparison-operators-less.html
1710 * assembler/MacroAssemblerMIPS.h:
1711 (JSC::MacroAssemblerMIPS::branchDouble):
1713 2010-05-28 Gavin Barraclough <barraclough@apple.com>
1715 Reviewed by Geoff Garen.
1717 Move jit compilation from linking thunks into cti_vm_lazyLink methods.
1719 * jit/JITOpcodes.cpp:
1720 (JSC::JIT::privateCompileCTIMachineTrampolines):
1721 * jit/JITOpcodes32_64.cpp:
1722 (JSC::JIT::privateCompileCTIMachineTrampolines):
1724 (JSC::DEFINE_STUB_FUNCTION):
1726 2010-05-28 Gavin Barraclough <barraclough@apple.com>
1728 Reviewed by Sam Weinig.
1730 Bug 39898 - Move arity check into callee.
1732 We can reduce the size of the virtual call trampolines by moving the arity check
1733 into the callee functions. As a following step we will be able to remove the
1734 check for native function / codeblocks by performing translation in a lazy stub.
1736 * interpreter/CallFrame.h:
1737 (JSC::ExecState::init):
1738 (JSC::ExecState::setReturnPC):
1740 (JSC::JIT::privateCompile):
1741 (JSC::JIT::linkCall):
1742 (JSC::JIT::linkConstruct):
1744 (JSC::JIT::compile):
1745 * jit/JITOpcodes.cpp:
1746 (JSC::JIT::privateCompileCTIMachineTrampolines):
1747 * jit/JITOpcodes32_64.cpp:
1748 (JSC::JIT::privateCompileCTIMachineTrampolines):
1750 (JSC::DEFINE_STUB_FUNCTION):
1751 * runtime/Executable.cpp:
1752 (JSC::FunctionExecutable::generateJITCodeForCall):
1753 (JSC::FunctionExecutable::generateJITCodeForConstruct):
1754 (JSC::FunctionExecutable::reparseExceptionInfo):
1755 * runtime/Executable.h:
1756 (JSC::NativeExecutable::NativeExecutable):
1757 (JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck):
1758 (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
1760 2010-05-27 Luiz Agostini <luiz.agostini@openbossa.org>
1762 Reviewed by Darin Adler.
1764 UTF-16 code points compare() for String objects
1765 https://bugs.webkit.org/show_bug.cgi?id=39701
1767 Moving compare() implementation from UString to StringImpl for it to be shared
1768 with String. Adding overloaded free functions codePointCompare() in StringImpl
1769 and WTFString. Renaming function compare in UString to codePointCompare to be
1772 * runtime/JSArray.cpp:
1773 (JSC::compareByStringPairForQSort):
1774 * runtime/UString.cpp:
1775 * runtime/UString.h:
1776 (JSC::codePointCompare):
1777 * wtf/text/StringImpl.cpp:
1778 (WebCore::codePointCompare):
1779 * wtf/text/StringImpl.h:
1780 * wtf/text/WTFString.cpp:
1781 (WebCore::codePointCompare):
1782 * wtf/text/WTFString.h:
1784 2010-05-26 Darin Adler <darin@apple.com>
1786 Reviewed by Kent Tamura.
1788 Null characters handled incorrectly in ToNumber conversion
1789 https://bugs.webkit.org/show_bug.cgi?id=38088
1791 * runtime/JSGlobalObjectFunctions.cpp:
1792 (JSC::parseInt): Changed code to use UTF8String().data() instead of
1793 ascii() to fix the thread safety issue. Code path is covered by existing
1794 tests in run-javascriptcore-tests.
1795 (JSC::parseFloat): Moved comment to UString::toDouble since the issue
1796 affects all clients, not just parseFloat. Specifically, this also affects
1797 standard JavaScript numeric conversion, ToNumber.
1799 * runtime/UString.cpp:
1800 (JSC::UString::toDouble): Added a comment about incorrect space skipping.
1801 Changed trailing junk check to use the length of the CString instead of
1802 checking for a null character. Also got rid of a little unneeded logic
1803 in the case where we tolerate trailing junk.
1805 2010-05-27 Nathan Lawrence <nlawrence@apple.com>
1807 Reviewed by Geoffrey Garen.
1809 Search for the new allocation one word at a time. Improves
1810 performance on SunSpider by approximately 1%.
1811 http://bugs.webkit.org/show_bug.cgi?id=39758
1813 * runtime/Collector.cpp:
1814 (JSC::Heap::allocate):
1815 * runtime/Collector.h:
1816 (JSC::CollectorBitmap::advanceToNextPossibleFreeCell):
1818 2010-05-27 Kevin Ollivier <kevino@theolliviers.com>
1820 [wx] Build fixes for Windows after recent changes.
1824 2010-05-27 Gustavo Noronha Silva <gns@gnome.org>
1826 More build fixage for make dist.
1830 2010-05-27 Kwang Yul Seo <skyul@company100.net>
1832 Reviewed by Darin Adler.
1834 RVCT does not have strnstr.
1835 https://bugs.webkit.org/show_bug.cgi?id=39719
1837 Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr.
1839 * wtf/StringExtras.h:
1841 2010-05-26 Gavin Barraclough <barraclough@apple.com>
1843 Reviewed by Oliver Hunt.
1845 Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
1848 If the last item in a main disjunction is a quantified set of parentheses,
1849 this is easier to code generate for than the general case for quantified
1850 parentheses. This is because we never need to backtrack into the parentheses
1851 - the first match will be the final and accepted match.
1853 This patch also somewhat reverts a recent change to when fallback to PCRE
1854 occurs. At the minute the compiler is tracking on patterns which will
1855 require JIT fallback. This is handy from a performance perspective (it saves
1856 the failed attempt at JIT compilation), but it means introducing knowledge
1857 of the JITs capabilities into the other layers of the regex compilers. For
1858 the specific feature of back-references, add a flag tracking their presence
1859 on the pattern, and make these expressions fallback without attempting to
1860 JIT. For parentheses, return to detecting which cases are have or have not
1861 been handled during JIT compilation.
1863 18% progression on tagcloud, ~1.5% overall on sunspidey.
1865 * yarr/RegexCompiler.cpp:
1866 (JSC::Yarr::RegexPatternConstructor::atomBackReference):
1867 (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
1868 * yarr/RegexJIT.cpp:
1869 (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
1870 (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
1871 (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
1872 (JSC::Yarr::RegexGenerator::generateTerm):
1873 (JSC::Yarr::RegexGenerator::RegexGenerator):
1874 (JSC::Yarr::RegexGenerator::shouldFallBack):
1875 (JSC::Yarr::jitCompileRegex):
1876 * yarr/RegexPattern.h:
1877 (JSC::Yarr::RegexPattern::RegexPattern):
1878 (JSC::Yarr::RegexPattern::reset):
1880 2010-05-26 Gavin Barraclough <barraclough@apple.com>
1882 Reviewed by NOBODY (revert).
1884 Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing.
1886 * yarr/RegexCompiler.cpp:
1887 (JSC::Yarr::RegexPatternConstructor::atomBackReference):
1888 (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
1889 * yarr/RegexJIT.cpp:
1890 (JSC::Yarr::RegexGenerator::TermGenerationState::term):
1891 (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
1892 (JSC::Yarr::RegexGenerator::generateTerm):
1893 (JSC::Yarr::RegexGenerator::RegexGenerator):
1894 (JSC::Yarr::jitCompileRegex):
1895 * yarr/RegexPattern.h:
1896 (JSC::Yarr::RegexPattern::RegexPattern):
1897 (JSC::Yarr::RegexPattern::reset):
1899 2010-05-26 Gustavo Noronha Silva <gns@gnome.org>
1901 Build fixes for make distcheck.
1905 2010-05-26 Gavin Barraclough <barraclough@apple.com>
1907 Reviewed by Oliver Hunt.
1909 Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
1911 If the last item in a main disjunction is a quantified set of parentheses,
1912 this is easier to code generate for than the general case for quantified
1913 parentheses. This is because we never need to backtrack into the parentheses
1914 - the first match will be the final and accepted match.
1916 This patch also somewhat reverts a recent change to when fallback to PCRE
1917 occurs. At the minute the compiler is tracking on patterns which will
1918 require JIT fallback. This is handy from a performance perspective (it saves
1919 the failed attempt at JIT compilation), but it means introducing knowledge
1920 of the JITs capabilities into the other layers of the regex compilers. For
1921 the specific feature of back-references, add a flag tracking their presence
1922 on the pattern, and make these expressions fallback without attempting to
1923 JIT. For parentheses, return to detecting which cases are have or have not
1924 been handled during JIT compilation.
1926 18% progression on tagcloud, ~1.5% overall on sunspidey.
1928 * yarr/RegexCompiler.cpp:
1929 (JSC::Yarr::RegexPatternConstructor::atomBackReference):
1930 (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
1931 * yarr/RegexJIT.cpp:
1932 (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
1933 (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
1934 (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
1935 (JSC::Yarr::RegexGenerator::generateTerm):
1936 (JSC::Yarr::RegexGenerator::RegexGenerator):
1937 (JSC::Yarr::RegexGenerator::shouldFallBack):
1938 (JSC::Yarr::jitCompileRegex):
1939 * yarr/RegexPattern.h:
1940 (JSC::Yarr::RegexPattern::RegexPattern):
1941 (JSC::Yarr::RegexPattern::reset):
1943 2010-05-26 Geoffrey Garen <ggaren@apple.com>
1945 Reviewed by Sam Weinig.
1947 Fixed a crash seen on the Leopard bot, caused by merge.
1950 (JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe,
1951 since it's no longer passed to us as an argument.
1953 2010-05-25 Geoffrey Garen <ggaren@apple.com>
1955 Fixed build failure caused by merge.
1958 (JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this
1959 function no longer returns a pair.
1961 2010-05-25 Geoffrey Garen <ggaren@apple.com>
1963 Reviewed by Oliver Hunt.
1965 <rdar://problem/8020221>
1967 Fixed a crash seen on Windows when calling a function with too many
1970 SunSpider reports no change.
1972 No test because the ASSERT I added fires in existing tests.
1975 (JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too
1976 many arguments have been provided, since the caller only allocated enough
1977 registerFile space for the arguments it provided, not enough for the extra
1978 copy of arguments we're going to need.
1980 2010-05-25 Kwang Yul Seo <skyul@company100.net>
1982 Reviewed by Darin Adler.
1984 Build fix for JSFunction
1985 https://bugs.webkit.org/show_bug.cgi?id=39658
1987 MSVC can't compile one of JSFunction constructors when JIT is disabled.
1988 "PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined.
1989 Add ENABLE(JIT) guard to the constructor.
1991 * runtime/JSFunction.cpp:
1992 (JSC::JSFunction::JSFunction):
1993 * runtime/JSFunction.h:
1995 2010-05-24 Gavin Barraclough <barraclough@apple.com>
1997 Reviewed by Sam Weinig.
1999 Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call.
2001 Presently, as soon as op-call strays off the hot path we set up a set of values on
2002 the stack to be passed as arguments to cti functions, in case any should be called.
2004 Instead, hoist the setup of the callframe to happen slightly sooner, and make the
2005 cti functions to compile & check arity read these values from the callframe. This
2006 allows up to remove the deprecated methods to manually set up cti arguments, rather
2007 than using JITStubCall.h.
2009 * interpreter/CallFrame.h:
2012 (JSC::JIT::compileOpCallInitializeCallFrame):
2013 (JSC::JIT::compileOpCallVarargs):
2014 (JSC::JIT::compileOpCallVarargsSlowCase):
2015 (JSC::JIT::compileOpCall):
2016 (JSC::JIT::compileOpCallSlowCase):
2017 * jit/JITCall32_64.cpp:
2018 (JSC::JIT::compileOpCallInitializeCallFrame):
2019 (JSC::JIT::compileOpCallVarargs):
2020 (JSC::JIT::compileOpCallVarargsSlowCase):
2021 (JSC::JIT::compileOpCall):
2022 (JSC::JIT::compileOpCallSlowCase):
2023 * jit/JITInlineMethods.h:
2024 * jit/JITOpcodes.cpp:
2025 (JSC::JIT::privateCompileCTIMachineTrampolines):
2026 * jit/JITOpcodes32_64.cpp:
2027 (JSC::JIT::privateCompileCTIMachineTrampolines):
2029 (JSC::DEFINE_STUB_FUNCTION):
2033 2010-05-24 Gavin Barraclough <barraclough@apple.com>
2035 Reviewed by Sam Weinig.
2038 * bytecode/CodeBlock.cpp:
2039 (JSC::CodeBlock::dump):
2040 (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
2041 * bytecode/CodeBlock.h:
2042 * bytecode/Opcode.h:
2043 * bytecompiler/BytecodeGenerator.cpp:
2044 (JSC::BytecodeGenerator::BytecodeGenerator):
2045 (JSC::BytecodeGenerator::emitConstruct):
2046 * bytecompiler/BytecodeGenerator.h:
2047 (JSC::BytecodeGenerator::emitGetByIdExceptionInfo):
2048 * interpreter/Interpreter.cpp:
2049 (JSC::Interpreter::privateExecute):
2051 (JSC::JIT::privateCompileMainPass):
2054 (JSC::JIT::compileOpCall):
2055 (JSC::JIT::compileOpCallSlowCase):
2056 * jit/JITCall32_64.cpp:
2057 (JSC::JIT::compileOpCall):
2058 (JSC::JIT::compileOpCallSlowCase):
2059 * jit/JITOpcodes.cpp:
2060 (JSC::JIT::privateCompileCTIMachineTrampolines):
2061 (JSC::JIT::privateCompileCTINativeCall):
2062 (JSC::JIT::emit_op_neq_null):
2063 (JSC::JIT::emit_op_convert_this):
2064 (JSC::JIT::emit_op_get_callee):
2065 (JSC::JIT::emit_op_create_this):
2066 * jit/JITOpcodes32_64.cpp:
2067 (JSC::JIT::privateCompileCTIMachineTrampolines):
2068 (JSC::JIT::privateCompileCTINativeCall):
2069 (JSC::JIT::emit_op_get_callee):
2070 (JSC::JIT::emit_op_create_this):
2072 (JSC::DEFINE_STUB_FUNCTION):
2073 (JSC::JITThunks::hostFunctionStub):
2075 (JSC::JITThunks::ctiNativeConstruct):
2077 * runtime/ExceptionHelpers.cpp:
2078 (JSC::createNotAnObjectError):
2079 * runtime/Executable.h:
2080 (JSC::NativeExecutable::create):
2081 (JSC::NativeExecutable::NativeExecutable):
2082 * runtime/JSFunction.cpp:
2083 (JSC::callHostFunctionAsConstructor):
2084 * runtime/JSFunction.h:
2087 == Rolled over to ChangeLog-2010-05-24 ==