blob: 026af9615e2a1734ed4fa94b863404bb1e662081 [file] [log] [blame]
2010-06-30 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Add assertion, off by default, for when you forget to do adoptRef
https://bugs.webkit.org/show_bug.cgi?id=41422
* wtf/PassRefPtr.h: Tweaked formatting. Added a new adopted
function, called on the pointer by adoptRef, with an empty inline
default version, meant to be overloaded. Unified the inlining
with a macro named REF_DEREF_INLINE to make it clearer what's
going on in the refIfNotNull/derefIfNotNull functions. Renamed
releaseRef to leakRef, but left the old name in for compatibility
for now.
* wtf/RefCounted.h: Added code to require adoption and assert if
you don't call adoptRef. For now, it is turned off because of the
LOOSE_REF_COUNTED define in this header. Later we can turn it on
once we get everything working without asserting.
2010-06-29 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Bug 41238 - RegExp performance slow on Dromaeo benchmark
Other javascript engines appear to cache prior results of regular
expression operations.
Suggest adding some sort of caching mechanism to regular expression
processing.
Added a single entry cache of match() results to RegExp class.
Also added performance improvements to UString == operator.
First check the impls for equality. Then get the length of
each of the non-null impls. Next check the sizes for equality.
Then check the data for the case of different impls that point
to the same data (most likely due to substrings from the beginning of
another string). Lastly we check the underlying data for equality.
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::match):
* runtime/RegExp.h:
* runtime/UString.h:
(JSC::operator==):
2010-06-29 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
WTF::HashSet iterators are quasi-mutable. Changing the value through
dereferencing an iterator will not change the behavior of methods like
contains or find, but will change the behavior of iterating.
* wtf/HashSet.h:
(WTF::::begin):
(WTF::::end):
(WTF::::find):
(WTF::::remove):
* wtf/HashTable.h:
2010-06-29 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] Clean up the source lists in the GNUMakefile.am files
https://bugs.webkit.org/show_bug.cgi?id=41229
Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate
the source lists.
* GNUmakefile.am:
2010-06-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Fix QtScript build after QScriptValuePrivate ctor changes
https://bugs.webkit.org/show_bug.cgi?id=41307
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::prototype):
* qt/benchmarks/qscriptengine/qscriptengine.pro:
2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] QScriptEngine API should contain a newArray function
https://bugs.webkit.org/show_bug.cgi?id=39115
* qt/api/qscriptengine.cpp:
(QScriptEngine::newArray):
* qt/api/qscriptengine.h:
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::newArray):
* qt/api/qscriptengine_p.h:
* qt/tests/qscriptengine/tst_qscriptengine.cpp:
(tst_QScriptEngine::newArray):
2010-06-28 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
Install jsc as jsc-X where X is the major API version to allow
parallel installation of both GTK+ 2.x and 3.x versions.
* GNUmakefile.am:
2010-06-28 John Gregg <johnnyg@google.com>
Reviewed by Kent Tamura.
add ENABLE_DIRECTORY_UPLOAD build support
https://bugs.webkit.org/show_bug.cgi?id=41100
* Configurations/FeatureDefines.xcconfig:
2010-06-28 Xan Lopez <xlopez@igalia.com>
Revert to build jsc, since the tests expect this.
* GNUmakefile.am:
2010-06-28 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Oliver Hunt.
Only one character lookahead should be enough for the lexer
https://bugs.webkit.org/show_bug.cgi?id=41213
The lexer had 4 character lookahead before, which required
a complex shifting mechanism. This can be improved by using
only one character lookahead for most decisions, and a
peek() function as a fallback when it is absolutely necessary.
* parser/Lexer.cpp:
(JSC::Lexer::currentCharacter):
(JSC::Lexer::currentOffset):
(JSC::Lexer::setCode):
(JSC::Lexer::shift):
(JSC::Lexer::peek):
(JSC::Lexer::getUnicodeCharacter):
(JSC::Lexer::shiftLineTerminator):
(JSC::Lexer::lastTokenWasRestrKeyword):
(JSC::Lexer::lex):
(JSC::Lexer::scanRegExp):
(JSC::Lexer::skipRegExp):
* parser/Lexer.h:
2010-06-28 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Unreviewed build fix.
[EFL] Build fix for latest version of Ecore library.
Ecore recently changed return type of callbacks from int to Eina_Bool.
* wtf/efl/MainThreadEfl.cpp:
(WTF::timeoutFired): Return Eina_Bool instead of int.
2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] QScriptValue should have API for accessing object properties
https://bugs.webkit.org/show_bug.cgi?id=40903
Make possible to access properties inside QScriptValues. While this
still doesn't support the ResolveLocal parameter, it is already useful
for testing the API.
The tests from upstream QtScript weren't imported since most of them
depend on the setProperty() function as well. A simple test was created.
* qt/api/qscriptvalue.cpp:
(QScriptValue::property):
* qt/api/qscriptvalue.h:
(QScriptValue::):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::property):
* qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
(tst_QScriptValue::propertySimple):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
2010-06-28 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
[GTK] Add support for GTK+3
https://bugs.webkit.org/show_bug.cgi?id=41253
Suffix jsc with the API version of the library, so that
libwebkitgtk 1.x and 3.x can install jsc.
* GNUmakefile.am:
2010-06-27 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Turn ENABLE(SINGLE_THREADED) on.
https://bugs.webkit.org/show_bug.cgi?id=41135
Brew MP does not support preemptive multi-threading.
Disable threading for Brew MP.
* wtf/Platform.h:
2010-06-26 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Dimitri Glazkov.
Add an ENABLE_WEB_TIMING option for enabling Web Timing support.
https://bugs.webkit.org/show_bug.cgi?id=38924
* Configurations/FeatureDefines.xcconfig:
2010-06-25 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
We assume in testapi.c that the value aHeapRef refers to will not be
moved. When we have movable objects, this will not be the case.
* API/tests/testapi.c:
(main):
2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r61924.
http://trac.webkit.org/changeset/61924
https://bugs.webkit.org/show_bug.cgi?id=41240
It was rolled out, but cq+ wasn't removed (Requested by Ossy_
on #webkit).
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::create):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-25 Renata Hodovan <reni@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Merge RegExp constructor and RegExp::create methods into one.
Both of function are called with tree parameters and check whether
flags (the third param) is given or not.
Simplify hash lookups in RegExpCache::create with giving them an extra
iterator parameter.
https://bugs.webkit.org/show_bug.cgi?id=41055
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
Introduce QtScript benchmarks.
The QtScript performance should be tested regularly. The patch introduces
micro benchmarks for existing API.
[Qt] Performance of the QtScript API is not tested.
https://bugs.webkit.org/show_bug.cgi?id=40911
* qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri.
* qt/benchmarks/benchmarks.pro: Added.
* qt/benchmarks/qscriptengine/qscriptengine.pro: Added.
* qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added.
(tst_QScriptEngine::checkSyntax_data):
(tst_QScriptEngine::checkSyntax):
(tst_QScriptEngine::constructor):
(tst_QScriptEngine::evaluateString_data):
(tst_QScriptEngine::evaluateString):
(tst_QScriptEngine::evaluateProgram_data):
(tst_QScriptEngine::evaluateProgram):
(tst_QScriptEngine::newObject):
(tst_QScriptEngine::nullValue):
(tst_QScriptEngine::undefinedValue):
(tst_QScriptEngine::globalObject):
(tst_QScriptEngine::toStringHandle):
* qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added.
* qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added.
(tst_QScriptValue::tst_QScriptValue):
(tst_QScriptValue::~tst_QScriptValue):
(tst_QScriptValue::values_data):
(tst_QScriptValue::ctorBool):
(tst_QScriptValue::ctorReal):
(tst_QScriptValue::ctorNumber):
(tst_QScriptValue::ctorQString):
(tst_QScriptValue::ctorCString):
(tst_QScriptValue::ctorSpecial):
(tst_QScriptValue::ctorQScriptValue):
(tst_QScriptValue::isValid_data):
(tst_QScriptValue::isValid):
(tst_QScriptValue::isBool_data):
(tst_QScriptValue::isBool):
(tst_QScriptValue::isNumber_data):
(tst_QScriptValue::isNumber):
(tst_QScriptValue::isFunction_data):
(tst_QScriptValue::isFunction):
(tst_QScriptValue::isNull_data):
(tst_QScriptValue::isNull):
(tst_QScriptValue::isString_data):
(tst_QScriptValue::isString):
(tst_QScriptValue::isUndefined_data):
(tst_QScriptValue::isUndefined):
(tst_QScriptValue::isObject_data):
(tst_QScriptValue::isObject):
(tst_QScriptValue::isError_data):
(tst_QScriptValue::isError):
(tst_QScriptValue::toString_data):
(tst_QScriptValue::toString):
(tst_QScriptValue::toNumber_data):
(tst_QScriptValue::toNumber):
(tst_QScriptValue::toBool_data):
(tst_QScriptValue::toBool):
(tst_QScriptValue::toInteger_data):
(tst_QScriptValue::toInteger):
(tst_QScriptValue::toInt32_data):
(tst_QScriptValue::toInt32):
(tst_QScriptValue::toUInt32_data):
(tst_QScriptValue::toUInt32):
(tst_QScriptValue::toUInt16_data):
(tst_QScriptValue::toUInt16):
(tst_QScriptValue::toObject_data):
(tst_QScriptValue::toObject):
(tst_QScriptValue::equals_data):
(tst_QScriptValue::equals):
(tst_QScriptValue::strictlyEquals_data):
(tst_QScriptValue::strictlyEquals):
(tst_QScriptValue::instanceOf_data):
(tst_QScriptValue::instanceOf):
2010-06-25 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Remove old js parser
https://bugs.webkit.org/show_bug.cgi?id=41222
Remove the old yacc parser, this also solves the tiger problem. Which
was a conflict between yacc generated token values and those in the
custom parser
* Android.mk:
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pro:
* GNUmakefile.am:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* parser/Grammar.y: Removed.
* parser/JSParser.cpp:
* parser/JSParser.h:
* parser/Lexer.cpp:
* parser/NodeConstructors.h:
(JSC::Node::Node):
* parser/Parser.cpp:
(JSC::Parser::parse):
* wtf/Platform.h:
2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
New QtScript API; setPrototype() and prototype().
This patch implements QScriptValue's prototype accessors.
[Qt] QScriptValue should have accessors to a prototype.
https://bugs.webkit.org/show_bug.cgi?id=39356
* qt/api/qscriptvalue.cpp:
(QScriptValue::prototype):
(QScriptValue::setPrototype):
* qt/api/qscriptvalue.h:
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::prototype):
(QScriptValuePrivate::setPrototype):
* qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
(tst_QScriptValue::getSetPrototype):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Kenneth Rohde Christiansen.
[CMake] Add option to enable JIT.
JIT is disabled by default, but now it's possible to enable it through
an option to CMake: -DENABLE_JIT will enable it.
https://bugs.webkit.org/show_bug.cgi?id=40936
* CMakeLists.txt: Add missing files and re-sort.
2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Gustavo Noronha Silva.
[CMake] Remove unused variable in EFL build system. It was previously
being used to set the flags of each port but it was superseded by
other flags.
https://bugs.webkit.org/show_bug.cgi?id=40931
* jsc/CMakeLists.txt:
2010-06-25 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on
sunspider.
* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::AssemblerBuffer):
2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r61842.
http://trac.webkit.org/changeset/61842
https://bugs.webkit.org/show_bug.cgi?id=41208
It broke Windows build (Requested by Ossy_ on #webkit).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Removed.
* wtf/win/OwnPtrWin.h: Removed.
2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r61833.
http://trac.webkit.org/changeset/61833
https://bugs.webkit.org/show_bug.cgi?id=41205
It broke Leopard and GTK (Requested by Ossy_ on #webkit).
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::create):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-25 Kwang Yul Seo <skyul@company100.net>
Reviewed by Adam Barth.
Change OwnPtrCommon to include platform-specific headers
https://bugs.webkit.org/show_bug.cgi?id=40279
Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Added.
* wtf/win/OwnPtrWin.h: Added.
2010-06-25 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
Add the possibility for a head and footer section to create_jit_stubs.
https://bugs.webkit.org/show_bug.cgi?id=36050
* create_jit_stubs:
2010-06-24 Renata Hodovan <reni@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Merge RegExp constructor and RegExp::create methods into one.
Both of function are called with tree parameters and check whether
flags (the third param) is given or not.
Simplify hash lookups in RegExpCache::create with giving them an extra
iterator parameter.
https://bugs.webkit.org/show_bug.cgi?id=41055
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-24 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64
https://bugs.webkit.org/show_bug.cgi?id=41193
I noticed a use of '+ 4' in some of the 32_64 code paths and realised there
were a few places where endianness was being hardcoded. This patch fixes
the errors i could find through code inspection.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_resolve_global):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
2010-06-24 Oliver Hunt <oliver@apple.com>
Build fix
Temporarily get the tiger bot working again by disabling the
new JS parser. GCC on tiger is miscompiling the parser and
I don't have access to a tiger machine right now.
* wtf/Platform.h:
2010-06-21 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoff Garen.
https://bugs.webkit.org/show_bug.cgi?id=40128
Fixed broken debug functionality.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpRegisters):
Fixed to work with updated call frame.
* runtime/JSImmediate.h:
(JSC::JSValue::isCell):
Added assert for aligned cell.
* runtime/JSValue.cpp:
(JSC::JSValue::description):
Fixed to work with current JSValue implementation.
* runtime/JSZombie.cpp:
(JSC::JSZombie::leakedZombieStructure):
JSombies compile again.
2010-06-24 Leandro Pereira <leandro@profusion.mobi>
Unreviewed build fix.
* CMakeLists.txt: Add JSParser.cpp.
2010-06-24 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Single character string replacement may replace too many characters
https://bugs.webkit.org/show_bug.cgi?id=41138
<rdar://problem/8097496>
Simple fix to stop the rope path of single character replacement
once the first replacement occurs.
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
2010-06-24 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Fix the length of instruction stream controlled by constant pool
https://bugs.webkit.org/show_bug.cgi?id=40293
The initial/maximum length of instruction stream (m_maxDistance) should
be set when the first constant arrives to the constant pool. Otherwise
the constant pool could be placed into an uninterrupted sequence.
* assembler/AssemblerBufferWithConstantPool.h:
(JSC::):
2010-06-24 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
We assume bytecodeOffset will always return a value > 1,
so we adjust the failure case to return 1 instead of 0.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
2010-06-23 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Custom-written JavaScript parser
https://bugs.webkit.org/show_bug.cgi?id=34019
Implement a recursive descent parser similar to that used by V8 and
SpiderMonkey. Greater than 2x improvement in SunSpider parsing tests.
The parser consists of a JSParser class that uses a TreeBuilder to actually
build the AST. There are currently two builders -- the ASTBuilder and
SyntaxChecker which separate the job of building an AST for code generation
and simply checking syntactic correctness.
There's still some less than ideal code remaining in the parser to allow
us to retain the existing lexing code with minimal changes. We'll tidy
this up at a later date.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* parser/ASTBuilder.h: Added.
(JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
(JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
(JSC::ASTBuilder::ASTBuilder):
(JSC::ASTBuilder::createSourceElements):
(JSC::ASTBuilder::varDeclarations):
(JSC::ASTBuilder::funcDeclarations):
(JSC::ASTBuilder::features):
(JSC::ASTBuilder::numConstants):
(JSC::ASTBuilder::appendToComma):
(JSC::ASTBuilder::createCommaExpr):
(JSC::ASTBuilder::createLogicalNot):
(JSC::ASTBuilder::createUnaryPlus):
(JSC::ASTBuilder::createVoid):
(JSC::ASTBuilder::thisExpr):
(JSC::ASTBuilder::createResolve):
(JSC::ASTBuilder::createObjectLiteral):
(JSC::ASTBuilder::createArray):
(JSC::ASTBuilder::createNumberExpr):
(JSC::ASTBuilder::createString):
(JSC::ASTBuilder::createBoolean):
(JSC::ASTBuilder::createNull):
(JSC::ASTBuilder::createBracketAccess):
(JSC::ASTBuilder::createDotAccess):
(JSC::ASTBuilder::createRegex):
(JSC::ASTBuilder::createNewExpr):
(JSC::ASTBuilder::createConditionalExpr):
(JSC::ASTBuilder::createAssignResolve):
(JSC::ASTBuilder::createFunctionExpr):
(JSC::ASTBuilder::createFunctionBody):
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createArguments):
(JSC::ASTBuilder::createArgumentsList):
(JSC::ASTBuilder::createProperty):
(JSC::ASTBuilder::createPropertyList):
(JSC::ASTBuilder::createElementList):
(JSC::ASTBuilder::createFormalParameterList):
(JSC::ASTBuilder::createClause):
(JSC::ASTBuilder::createClauseList):
(JSC::ASTBuilder::setUsesArguments):
(JSC::ASTBuilder::createFuncDeclStatement):
(JSC::ASTBuilder::createBlockStatement):
(JSC::ASTBuilder::createExprStatement):
(JSC::ASTBuilder::createIfStatement):
(JSC::ASTBuilder::createForLoop):
(JSC::ASTBuilder::createForInLoop):
(JSC::ASTBuilder::createEmptyStatement):
(JSC::ASTBuilder::createVarStatement):
(JSC::ASTBuilder::createReturnStatement):
(JSC::ASTBuilder::createBreakStatement):
(JSC::ASTBuilder::createContinueStatement):
(JSC::ASTBuilder::createTryStatement):
(JSC::ASTBuilder::createSwitchStatement):
(JSC::ASTBuilder::createWhileStatement):
(JSC::ASTBuilder::createDoWhileStatement):
(JSC::ASTBuilder::createLabelStatement):
(JSC::ASTBuilder::createWithStatement):
(JSC::ASTBuilder::createThrowStatement):
(JSC::ASTBuilder::createDebugger):
(JSC::ASTBuilder::createConstStatement):
(JSC::ASTBuilder::appendConstDecl):
(JSC::ASTBuilder::appendStatement):
(JSC::ASTBuilder::addVar):
(JSC::ASTBuilder::combineCommaNodes):
(JSC::ASTBuilder::evalCount):
(JSC::ASTBuilder::appendBinaryExpressionInfo):
(JSC::ASTBuilder::operatorStackPop):
(JSC::ASTBuilder::operatorStackHasHigherPrecedence):
(JSC::ASTBuilder::getFromOperandStack):
(JSC::ASTBuilder::shrinkOperandStackBy):
(JSC::ASTBuilder::appendBinaryOperation):
(JSC::ASTBuilder::operatorStackAppend):
(JSC::ASTBuilder::popOperandStack):
(JSC::ASTBuilder::appendUnaryToken):
(JSC::ASTBuilder::unaryTokenStackLastType):
(JSC::ASTBuilder::unaryTokenStackLastStart):
(JSC::ASTBuilder::unaryTokenStackRemoveLast):
(JSC::ASTBuilder::assignmentStackAppend):
(JSC::ASTBuilder::createAssignment):
(JSC::ASTBuilder::Scope::Scope):
(JSC::ASTBuilder::setExceptionLocation):
(JSC::ASTBuilder::incConstants):
(JSC::ASTBuilder::usesThis):
(JSC::ASTBuilder::usesCatch):
(JSC::ASTBuilder::usesClosures):
(JSC::ASTBuilder::usesArguments):
(JSC::ASTBuilder::usesAssignment):
(JSC::ASTBuilder::usesWith):
(JSC::ASTBuilder::usesEval):
(JSC::ASTBuilder::createNumber):
(JSC::ASTBuilder::makeTypeOfNode):
(JSC::ASTBuilder::makeDeleteNode):
(JSC::ASTBuilder::makeNegateNode):
(JSC::ASTBuilder::makeBitwiseNotNode):
(JSC::ASTBuilder::makeMultNode):
(JSC::ASTBuilder::makeDivNode):
(JSC::ASTBuilder::makeAddNode):
(JSC::ASTBuilder::makeSubNode):
(JSC::ASTBuilder::makeLeftShiftNode):
(JSC::ASTBuilder::makeRightShiftNode):
(JSC::ASTBuilder::makeFunctionCallNode):
(JSC::ASTBuilder::makeBinaryNode):
(JSC::ASTBuilder::makeAssignNode):
(JSC::ASTBuilder::makePrefixNode):
(JSC::ASTBuilder::makePostfixNode):
* parser/JSParser.cpp: Added.
(JSC::JSParser::AllowInOverride::AllowInOverride):
(JSC::JSParser::AllowInOverride::~AllowInOverride):
(JSC::JSParser::token):
(JSC::JSParser::next):
(JSC::JSParser::consume):
(JSC::JSParser::match):
(JSC::JSParser::tokenStart):
(JSC::JSParser::tokenLine):
(JSC::JSParser::tokenEnd):
(JSC::JSParser::):
(JSC::JSParser::autoSemiColon):
(JSC::JSParser::canRecurse):
(JSC::JSParser::lastTokenEnd):
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::allowAutomaticSemicolon):
(JSC::JSParser::parseSourceElements):
(JSC::JSParser::parseVarDeclaration):
(JSC::JSParser::parseConstDeclaration):
(JSC::JSParser::parseDoWhileStatement):
(JSC::JSParser::parseWhileStatement):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseForStatement):
(JSC::JSParser::parseBreakStatement):
(JSC::JSParser::parseContinueStatement):
(JSC::JSParser::parseReturnStatement):
(JSC::JSParser::parseThrowStatement):
(JSC::JSParser::parseWithStatement):
(JSC::JSParser::parseSwitchStatement):
(JSC::JSParser::parseSwitchClauses):
(JSC::JSParser::parseSwitchDefaultClause):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseDebuggerStatement):
(JSC::JSParser::parseBlockStatement):
(JSC::JSParser::parseStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionBody):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseFunctionDeclaration):
(JSC::JSParser::parseExpressionOrLabelStatement):
(JSC::JSParser::parseExpressionStatement):
(JSC::JSParser::parseIfStatement):
(JSC::JSParser::parseExpression):
(JSC::JSParser::parseAssignmentExpression):
(JSC::JSParser::parseConditionalExpression):
(JSC::isUnaryOp):
(JSC::JSParser::isBinaryOperator):
(JSC::JSParser::parseBinaryExpression):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseObjectLiteral):
(JSC::JSParser::parseArrayLiteral):
(JSC::JSParser::parsePrimaryExpression):
(JSC::JSParser::parseArguments):
(JSC::JSParser::parseMemberExpression):
(JSC::JSParser::parseUnaryExpression):
* parser/JSParser.h: Added.
(JSC::):
(JSC::JSTokenInfo::JSTokenInfo):
* parser/Lexer.cpp:
(JSC::Lexer::lex):
* parser/Lexer.h:
(JSC::Lexer::setLastLineNumber):
(JSC::Lexer::lastLineNumber):
* parser/NodeConstructors.h:
(JSC::Node::Node):
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/SyntaxChecker.h: Added.
(JSC::SyntaxChecker::SyntaxChecker):
(JSC::SyntaxChecker::createSourceElements):
(JSC::SyntaxChecker::makeFunctionCallNode):
(JSC::SyntaxChecker::appendToComma):
(JSC::SyntaxChecker::createCommaExpr):
(JSC::SyntaxChecker::makeAssignNode):
(JSC::SyntaxChecker::makePrefixNode):
(JSC::SyntaxChecker::makePostfixNode):
(JSC::SyntaxChecker::makeTypeOfNode):
(JSC::SyntaxChecker::makeDeleteNode):
(JSC::SyntaxChecker::makeNegateNode):
(JSC::SyntaxChecker::makeBitwiseNotNode):
(JSC::SyntaxChecker::createLogicalNot):
(JSC::SyntaxChecker::createUnaryPlus):
(JSC::SyntaxChecker::createVoid):
(JSC::SyntaxChecker::thisExpr):
(JSC::SyntaxChecker::createResolve):
(JSC::SyntaxChecker::createObjectLiteral):
(JSC::SyntaxChecker::createArray):
(JSC::SyntaxChecker::createNumberExpr):
(JSC::SyntaxChecker::createString):
(JSC::SyntaxChecker::createBoolean):
(JSC::SyntaxChecker::createNull):
(JSC::SyntaxChecker::createBracketAccess):
(JSC::SyntaxChecker::createDotAccess):
(JSC::SyntaxChecker::createRegex):
(JSC::SyntaxChecker::createNewExpr):
(JSC::SyntaxChecker::createConditionalExpr):
(JSC::SyntaxChecker::createAssignResolve):
(JSC::SyntaxChecker::createFunctionExpr):
(JSC::SyntaxChecker::createFunctionBody):
(JSC::SyntaxChecker::createArguments):
(JSC::SyntaxChecker::createArgumentsList):
(JSC::SyntaxChecker::createProperty):
(JSC::SyntaxChecker::createPropertyList):
(JSC::SyntaxChecker::createElementList):
(JSC::SyntaxChecker::createFormalParameterList):
(JSC::SyntaxChecker::createClause):
(JSC::SyntaxChecker::createClauseList):
(JSC::SyntaxChecker::setUsesArguments):
(JSC::SyntaxChecker::createFuncDeclStatement):
(JSC::SyntaxChecker::createBlockStatement):
(JSC::SyntaxChecker::createExprStatement):
(JSC::SyntaxChecker::createIfStatement):
(JSC::SyntaxChecker::createForLoop):
(JSC::SyntaxChecker::createForInLoop):
(JSC::SyntaxChecker::createEmptyStatement):
(JSC::SyntaxChecker::createVarStatement):
(JSC::SyntaxChecker::createReturnStatement):
(JSC::SyntaxChecker::createBreakStatement):
(JSC::SyntaxChecker::createContinueStatement):
(JSC::SyntaxChecker::createTryStatement):
(JSC::SyntaxChecker::createSwitchStatement):
(JSC::SyntaxChecker::createWhileStatement):
(JSC::SyntaxChecker::createWithStatement):
(JSC::SyntaxChecker::createDoWhileStatement):
(JSC::SyntaxChecker::createLabelStatement):
(JSC::SyntaxChecker::createThrowStatement):
(JSC::SyntaxChecker::createDebugger):
(JSC::SyntaxChecker::createConstStatement):
(JSC::SyntaxChecker::appendConstDecl):
(JSC::SyntaxChecker::createGetterOrSetterProperty):
(JSC::SyntaxChecker::appendStatement):
(JSC::SyntaxChecker::addVar):
(JSC::SyntaxChecker::combineCommaNodes):
(JSC::SyntaxChecker::evalCount):
(JSC::SyntaxChecker::appendBinaryExpressionInfo):
(JSC::SyntaxChecker::operatorStackPop):
* runtime/JSGlobalData.h:
* wtf/Platform.h:
* wtf/ThreadSpecific.h:
(WTF::T):
2010-06-23 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
Optimization of the QScriptValuePrivate.
Patch change only internals of the QScriptValuePrivate.
Most of the QScriptValuePrivate's attributes were moved
into an union.
[Qt] Optimization of the QScriptVAluePrivate.
https://bugs.webkit.org/show_bug.cgi?id=40415
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::globalObject):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::):
(QScriptValuePrivate::~QScriptValuePrivate):
(QScriptValuePrivate::QScriptValuePrivate):
(QScriptValuePrivate::toString):
(QScriptValuePrivate::toNumber):
(QScriptValuePrivate::toBool):
(QScriptValuePrivate::toObject):
(QScriptValuePrivate::equals):
(QScriptValuePrivate::strictlyEquals):
(QScriptValuePrivate::assignEngine):
(QScriptValuePrivate::operator JSValueRef):
(QScriptValuePrivate::operator JSObjectRef):
(QScriptValuePrivate::refinedJSValue):
2010-06-23 Kwang Yul Seo <skyul@company100.net>
Reviewed by Oliver Hunt.
[GTK] Implement ThreadSpecific with glib
https://bugs.webkit.org/show_bug.cgi?id=39829
Implement ThreadSpecific with glib's GStaticPrivate.
This patch makes it possible to build GTK port without pthread.
* wtf/ThreadSpecific.h:
(WTF::::ThreadSpecific):
(WTF::::~ThreadSpecific):
(WTF::::get):
(WTF::::set):
(WTF::::destroy):
2010-06-23 Leandro Pereira <leandro@profusion.mobi>
Unreviewed build fix.
* CMakeLists.txt: Add runtime/RegExpCache.cpp.
2010-06-22 Renata Hodovan <hodovan@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Adding regular expression caching to JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=38142
The cache is based on Round Robin eviction policy, and
can cache at most 256 character long regular expressions,
and at most 256 of them. These values can be changed at compile time.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecompiler/NodesCodegen.cpp:
(JSC::RegExpNode::emitBytecode):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::regExpCache):
* runtime/RegExpCache.cpp: Added.
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
(JSC::RegExpCache::RegExpCache):
* runtime/RegExpCache.h: Added.
* runtime/RegExpConstructor.cpp:
(JSC::constructRegExp):
* runtime/RegExpKey.h: Added.
(JSC::RegExpKey::RegExpKey):
(JSC::RegExpKey::getFlagsValue):
(WTF::operator==):
(WTF::):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncCompile):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
2010-06-22 Gabor Loki <loki@webkit.org>
Reviewed by Geoffrey Garen.
Add native call support for ARM and Thumb-2 JIT.
https://bugs.webkit.org/show_bug.cgi?id=40231
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* wtf/Platform.h:
2010-06-21 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Make JSC more resilient in the face of parse failures
https://bugs.webkit.org/show_bug.cgi?id=40951
A number of recent bugs have occurred due to issues like miscounting
BOMs, etc which lead to interesting crashes later on. Adding this
logic hardens JSC in the face of these errors, and has no impact on
performance (32bit jit actually gets 0.7% faster but I put that down
to cache effects).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
(JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::compileForCall):
(JSC::FunctionExecutable::compileForConstruct):
(JSC::FunctionExecutable::generateJITCodeForCall):
(JSC::FunctionExecutable::generateJITCodeForConstruct):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
* runtime/Executable.h:
(JSC::FunctionExecutable::bytecodeForCall):
(JSC::FunctionExecutable::bytecodeForConstruct):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::numericCompareFunction):
2010-06-21 John Sullivan <sullivan@apple.com>
Reviewed by Adam Roben.
RetainPtr can't be used in HashMaps or HashSets
<https://bugs.webkit.org/show_bug.cgi?id=40938>
Added hashing knowledge similar to that in COMPtr.h.
* wtf/RetainPtr.h:
(WTF::RetainPtr::RetainPtr):
New function, copied from COMPtr.h but for the type change.
(WTF::RetainPtr::isHashTableDeletedValue):
Ditto.
(WTF::RetainPtr::hashTableDeletedValue):
Ditto.
Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change.
The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h)
rather than the COMPtr implementation.
2010-06-19 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Need to ensure that we grow the RegisterFile when creating a callframe for host code
https://bugs.webkit.org/show_bug.cgi?id=40858
<rdar://problem/8108986>
In the past the use of the callframe in hostcode was much more
limited. Now that we expect the callframe to always be valid
we need to grow the RegisterFile so that this is actually the
case. In this particular case the problem was failing to grow
the registerfile could lead to a callframe that extended beyond
RegisterFiler::end(), so vm re-entry would clobber the callframe
other scenarios could also lead to badness.
I was unable to construct a simple testcase to trigger badness,
and any such testcase would be so dependent on exact vm stack
layout that it would be unlikely to work as a testcase following
any callframe or register allocation changes anyway.
Thankfully the new assertion I added should help to catch these
failures in future, and triggers on a couple of tests currently.
* interpreter/CallFrame.cpp:
(JSC::CallFrame::registerFile):
* interpreter/CallFrame.h:
(JSC::ExecState::init):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
2010-06-21 Satish Sampath <satish@chromium.org>
Reviewed by Steve Block.
Speech Input Patch 0: Added compilation argument to conditionally compile pending patches.
https://bugs.webkit.org/show_bug.cgi?id=40878
* Configurations/FeatureDefines.xcconfig:
2010-06-21 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1
https://bugs.webkit.org/show_bug.cgi?id=40653
Currently, other ports do not use global new/delete operator overloading
when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable
"global fastMalloc new" because the default new/delete causes crash on device.
We need to replace them with Brew MP's MALLOC/FREE.
* wtf/FastMalloc.h:
2010-06-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Work around a build problem with libjscore on Symbian.
https://bugs.webkit.org/show_bug.cgi?id=40840
Sbsv2 sometimes have problems with debug/release configuration
determination causing QtWebKit in release to try linking with the debug
JavaScriptCore static library. This patch limit the jscore/jscored
r58306 fix necessary for mac builds only to the mac platform to prevent the
different name problem.
The real fix would be to fix qmake or the toolchain, this patch might
help meanwhile.
* JavaScriptCore.pri:
2010-06-21 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kent Tamura.
Buildfix after r61338.
https://bugs.webkit.org/show_bug.cgi?id=40888
roundUpAllocationSize is needed in RegisterFile.h.
* jit/ExecutableAllocator.h:
2010-06-19 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
Include <string.h> in StringExtras.h
https://bugs.webkit.org/show_bug.cgi?id=40808
Without string.h, RVCT 2.2 can't compile StringExtras.h.
It can't find strlen and strncmp.
* wtf/StringExtras.h:
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Don't use __attribute__((may_alias)) with the Intel compiler,
as it doesn't understand it.
* wtf/Vector.h:
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Fix compilation with the Intel C++ compiler (11.1.072).
Like RVCT, label pointers must be void*, not const void*.
* bytecode/Opcode.h:
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Add the WTF_COMPILER_INTEL for when the Intel compiler is used
for building. Usually, the Intel compiler masquerades as
another compiler in the system and gets away with it, but some
times specific fixes are required (such as when using language
extensions).
* wtf/Platform.h:
2010-06-18 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Incorrect handling of multiple BOMs scattered through a file.
https://bugs.webkit.org/show_bug.cgi?id=40865
When determining the offset of open and close braces in a source
with BOMs we were finishing our count early as we failed to account
for BOMs prior to the open/close brace positions effecting those
positions.
* parser/Lexer.cpp:
(JSC::Lexer::sourceCode):
2010-06-17 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Don't throw away exception information for functions that use exceptions
https://bugs.webkit.org/show_bug.cgi?id=40786
Simple patch to stop JSC from throwing away the exception information
of a function that uses "exceptiony" features like try and throw. This
is a speed up for catching expressions but it's difficult to quantify as
the old cost of reparsing is amortised over all exceptions caught in the
effected function.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::emitCatch):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitThrow):
2010-06-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add PlatformStrategies and PluginStrategy classes.
https://bugs.webkit.org/show_bug.cgi?id=40850
* wtf/Platform.h:
2010-06-18 Leandro Pereira <leandro@profusion.mobi>
[EFL] Unreviewed build fix.
* wtf/CMakeLists.txt: Add MD5.cpp.
2010-06-17 Shu Chang <chang.shu@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Fix the link error on symbian with ENABLE_JIT=0.
1. Add "#if ENABLE(JIT)" in the header file;
2. Put feature enable/disable logic to a common.pri so
that both JavaScriptCore.pri and WebCore.pri can share.
https://bugs.webkit.org/show_bug.cgi?id=40780
* JavaScriptCore.pri:
* jit/ExecutableAllocator.h:
2010-06-17 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Use adoptRef and create functions in more code paths
https://bugs.webkit.org/show_bug.cgi?id=40760
* API/JSClassRef.h: Removed unneeded include of RefCounted.h.
* API/JSWeakObjectMapRefPrivate.cpp: Ditto.
* bytecode/CodeBlock.h:
(JSC::FunctionCodeBlock::FunctionCodeBlock): Use the
SharedSymbolTable::create function instead of calling new directly.
* runtime/SymbolTable.h: Added a create function to the SharedSymbolTable
class and made the constructor private.
2010-06-17 Mark Brand <mabrand@mabrand.nl>
Reviewed by Simon Hausmann.
[Qt] use "win32-g++*" scope to match all MinGW makespecs
The scope "win32-g++" comes from the name of the makespec. However, it
is frequently used to check for MinGW. This works fine as long as
win32-g++ is the only makespec for MinGW. Now we need the wildcard
to cover "win32-g++-cross" as well.
* JavaScriptCore.pro:
2010-06-16 Darin Adler <darin@apple.com>
Reviewed by David Levin.
Deploy adoptRef in more places, including all HTML and MathML elements
https://bugs.webkit.org/show_bug.cgi?id=39941
* wtf/ThreadSafeShared.h: Made the constructor protected and removed the
unneeded support for initial reference counts other than 1.
2010-06-16 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Store matchBegin directly in the array of output instead of the stack.
https://bugs.webkit.org/show_bug.cgi?id=38988
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
(JSC::Yarr::RegexGenerator::generate):
2010-06-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Make JavaScriptCore build with clang++.
* jit/JITInlineMethods.h:
(JSC::JIT::emitPutVirtualRegister):
Explicitly cast to an int.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::compileRegex):
Return 0 instead of false.
2010-06-15 Adam Roben <aroben@apple.com>
Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds
Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>.
Reviewed by Sam Weinig.
* JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of
JavaScriptCore's DerivedSources directory to
AppleInternal/Sources/JavaScriptCore.
2010-06-15 Gabor Loki <loki@webkit.org>
Rubber-stamped by Eric Seidel.
Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM
https://bugs.webkit.org/show_bug.cgi?id=40423
Using OBJECT_OFFSETOF macro instead of objectof to bypass access to
non-static data member warning.
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
2010-06-11 Eric Seidel <eric@webkit.org>
Reviewed by Adam Barth.
Rename the rest of the *Tokenizer classes to *DocumentParser
https://bugs.webkit.org/show_bug.cgi?id=40507
* wtf/Platform.h:
- fixed a comment to match new names.
2010-06-11 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Explicit conversions from QtScript types to JSC opaque types were removed.
https://bugs.webkit.org/show_bug.cgi?id=40412
Conversion between a JSC C types and a QtScript private types, takes
main part of the source code. In most cases a mapping between the types
is one to one. New cast operators were added to simplify the code.
The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef.
The QScriptEnginePrivate could be casted to the JSGlobalContext.
The QScriptProgramPrivate could be casted to the JSStringRef.
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::evaluate):
(QScriptEnginePrivate::newObject):
(QScriptEnginePrivate::globalObject):
* qt/api/qscriptengine_p.h:
(QScriptEnginePrivate::operator JSGlobalContextRef):
* qt/api/qscriptprogram_p.h:
(QScriptProgramPrivate::operator JSStringRef):
* qt/api/qscriptsyntaxcheckresult.cpp:
(QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
(QScriptSyntaxCheckResultPrivate::errorMessage):
(QScriptSyntaxCheckResultPrivate::errorLineNumber):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::~QScriptValuePrivate):
(QScriptValuePrivate::QScriptValuePrivate):
(QScriptValuePrivate::isBool):
(QScriptValuePrivate::isNumber):
(QScriptValuePrivate::isNull):
(QScriptValuePrivate::isString):
(QScriptValuePrivate::isUndefined):
(QScriptValuePrivate::isFunction):
(QScriptValuePrivate::toString):
(QScriptValuePrivate::toNumber):
(QScriptValuePrivate::toBool):
(QScriptValuePrivate::toObject):
(QScriptValuePrivate::equals):
(QScriptValuePrivate::strictlyEquals):
(QScriptValuePrivate::instanceOf):
(QScriptValuePrivate::call):
(QScriptValuePrivate::operator JSValueRef):
(QScriptValuePrivate::operator JSObjectRef):
(QScriptValuePrivate::setValue):
(QScriptValuePrivate::inherits):
(QScriptValuePrivate::refinedJSValue):
2010-05-31 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Implement the simple text code path.
https://bugs.webkit.org/show_bug.cgi?id=40077
Remove the FONT_FAST_PATH macro and use the Qt's
fast text implementation instead of the one of WebKit.
The Qt::TextBypassShaping flag is used to tell Qt to
only use the glyph advances.
Qt 4.7 is needed to get this flag thus the complex path is always
used if QtWebKit is compiled against an earlier version.
Contrary to the WebKit's implementation, the complex code path
is taken if the text is RightToLeft, justified or is formatted
with non-zero letter or word spacing.
* wtf/Platform.h:
2010-06-11 Luiz Agostini <luiz.agostini@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
add codePointCompare to JavaScriptCore.exp
https://bugs.webkit.org/show_bug.cgi?id=40426
* JavaScriptCore.exp:
2010-06-10 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode
https://bugs.webkit.org/show_bug.cgi?id=40367
If we're in the slow case of right shift we must write the type tag as
the only reason we hit this code path is because we know we're working
with a double. eg. we are guaranteed that the tag cannot be reused.
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emitRightShiftSlowCase):
2010-06-10 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
Remove weakRandomNumber
https://bugs.webkit.org/show_bug.cgi?id=40291
weakRandomNumber is used nowhere. Currently, WeakRandom is used instead.
* wtf/RandomNumber.cpp:
* wtf/RandomNumber.h:
2010-06-09 Alexey Proskuryakov <ap@apple.com>
Reviewed by Brady Eidson.
Export StringImpl::ascii(). It might be not very useful, but it's a public function.
* JavaScriptCore.exp:
2010-06-09 Leandro Pereira <leandro@profusion.mobi>
Reviewed by Adam Treat.
[EFL] Allow building core libraries as shared objects to speed up
linking time on machines with small amounts of memory.
http://webkit.org/b/39899
* CMakeLists.txt: If building with shared core, install the lib.
* jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically.
* wtf/CMakeLists.txt: If building with shared core, install the lib.
2010-06-09 Gabor Loki <loki@webkit.org>
Reviewed by David Levin.
Remove some unused variable warnings from JITOpcodes
https://bugs.webkit.org/show_bug.cgi?id=40298
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
2010-05-18 Yuzo Fujishima <yuzo@google.com>
Reviewed by Shinichiro Hamaji.
Fix for Bug 34529 - [CSSOM] issues with cssText and selectorText
Add U16_LENGTH that is needed to implement CSS character serialization.
https://bugs.webkit.org/show_bug.cgi?id=34529
* wtf/unicode/qt4/UnicodeQt4.h:
* wtf/unicode/wince/UnicodeWince.h:
2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r60830.
http://trac.webkit.org/changeset/60830
https://bugs.webkit.org/show_bug.cgi?id=40305
Broke the Windows build (Requested by abarth on #webkit).
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Removed.
* wtf/win/OwnPtrWin.h: Removed.
2010-06-08 MORITA Hajime <morrita@google.com>
Unreviewed. An attempt to fix test break.
* Configurations/FeatureDefines.xcconfig:
2010-06-08 Kwang Yul Seo <skyul@company100.net>
Reviewed by Adam Barth.
Change OwnPtrCommon to include platform-specific headers
https://bugs.webkit.org/show_bug.cgi?id=40279
Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Added.
* wtf/win/OwnPtrWin.h: Added.
2010-06-07 MORITA Hajime <morrita@google.com>
Reviewed by Kent Tamura.
https://bugs.webkit.org/show_bug.cgi?id=40219
[Mac] ENABLE_METER_TAG should be enabled
Added ENABLE_METER_TAG.
* Configurations/FeatureDefines.xcconfig:
2010-06-07 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
[BREWMP] Add more types to OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=39667
Add ISSL and ISocket to the list of OwnPtr-ed type.
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.cpp:
(WTF::deleteOwnedPtr):
2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Crash when compiling on Snow Leopard and running on Leopard
https://bugs.webkit.org/show_bug.cgi?id=31403
Disable the use of pthread_setname_np and other symbols
when targetting Leopard.
Use the defines TARGETING_XX instead of BUILDING_ON_XX
for features that cannot be used before Snow Leopard.
* wtf/Platform.h:
2010-06-07 Gabor Loki <loki@webkit.org>
Reviewed by NOBODY (JSVALUE32_64 build fix).
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
2010-06-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix pt 2).
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix pt 1).
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 40214 - Clean up error construction / throwing in JSC.
The one egregious insanity here is that creating an error requires
a VM-entry-esqe-host call (the string argument is wrapped as a JS
object & pushed on the RegisterFile, then unwrapped back to a
UString). Changing this also means you only require a global
object, not an ExecState, to create an error.
The methods to create error objects are also parameterized
requiring a switch on the type, which can be made cleaner and
faster by moving to a separate method per error type. Code to add
divot information to error had been duplicated, and is coalesced
back into a single function.
Convenience methods added to create & throw type & syntax error
with a default error message, since this is a common case.
Also, errors are currently thrown either using
"throwError(exec, error)" or "exec->setException(error)" - unify
on the former, since this is more commonly used. Add
"throwVMError(exec, error)" equivalents, as a convenience for
cases where the result was being wrapped in "JSValue::encode(...)".
* API/JSCallbackConstructor.cpp:
(JSC::constructJSCallback):
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::call):
* API/JSCallbackObjectFunctions.h:
(JSC::::getOwnPropertySlot):
(JSC::::put):
(JSC::::deleteProperty):
(JSC::::construct):
(JSC::::hasInstance):
(JSC::::call):
(JSC::::toNumber):
(JSC::::toString):
(JSC::::staticValueGetter):
(JSC::::staticFunctionGetter):
(JSC::::callbackGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeError):
* JavaScriptCore.exp:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewError):
(JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ThrowableExpressionData::emitThrowError):
(JSC::RegExpNode::emitBytecode):
(JSC::PostfixErrorNode::emitBytecode):
(JSC::PrefixErrorNode::emitBytecode):
(JSC::AssignErrorNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::LabelNode::emitBytecode):
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(functionRun):
(functionLoad):
(functionCheckSyntax):
* parser/Nodes.h:
* runtime/ArrayConstructor.cpp:
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
* runtime/BooleanPrototype.cpp:
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncToGMTString):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
(JSC::dateProtoFuncToJSON):
* runtime/Error.cpp:
(JSC::createError):
(JSC::createEvalError):
(JSC::createRangeError):
(JSC::createReferenceError):
(JSC::createSyntaxError):
(JSC::createTypeError):
(JSC::createURIError):
(JSC::addErrorSourceInfo):
(JSC::addErrorDivotInfo):
(JSC::addErrorInfo):
(JSC::hasErrorInfo):
(JSC::throwError):
(JSC::throwTypeError):
(JSC::throwSyntaxError):
* runtime/Error.h:
(JSC::throwVMError):
(JSC::throwVMTypeError):
* runtime/ErrorConstructor.cpp:
(JSC::constructWithErrorConstructor):
(JSC::callErrorConstructor):
* runtime/ErrorConstructor.h:
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
(JSC::ErrorInstance::create):
* runtime/ErrorInstance.h:
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/ExceptionHelpers.cpp:
(JSC::createStackOverflowError):
(JSC::createUndefinedVariableError):
(JSC::createInvalidParamError):
(JSC::createNotAConstructorError):
(JSC::createNotAFunctionError):
(JSC::createNotAnObjectError):
(JSC::throwOutOfMemoryError):
* runtime/ExceptionHelpers.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compile):
(JSC::ProgramExecutable::checkSyntax):
(JSC::ProgramExecutable::compile):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):
(JSC::functionProtoFuncApply):
(JSC::functionProtoFuncCall):
* runtime/Identifier.cpp:
(JSC::Identifier::from):
* runtime/Identifier.h:
* runtime/JSArray.cpp:
(JSC::JSArray::put):
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::decode):
(JSC::globalFuncEval):
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendStringifiedValue):
(JSC::Walker::walk):
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
* runtime/JSObject.cpp:
(JSC::throwSetterError):
(JSC::JSObject::put):
(JSC::JSObject::putWithAttributes):
(JSC::JSObject::defaultValue):
(JSC::JSObject::hasInstance):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
* runtime/JSValue.cpp:
(JSC::JSValue::toObjectSlowCase):
(JSC::JSValue::synthesizeObject):
(JSC::JSValue::synthesizePrototype):
* runtime/NativeErrorConstructor.cpp:
(JSC::constructWithNativeErrorConstructor):
(JSC::callNativeErrorConstructor):
* runtime/NativeErrorConstructor.h:
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorKeys):
(JSC::toPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
* runtime/RegExpConstructor.cpp:
(JSC::constructRegExp):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::match):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncToString):
2010-06-05 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
[BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx
https://bugs.webkit.org/show_bug.cgi?id=39710
Build fix for BREW MP.
* wtf/MathExtras.h:
2010-06-04 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
HTML5 parser should be within 1% of old parser performance
https://bugs.webkit.org/show_bug.cgi?id=40172
Fix cast in this operator= to allow for assignment between vectors with
different inline capacities (as clearly intended by its author).
* wtf/Vector.h:
(WTF::::operator):
2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
New QtScript API; QScriptValue::instanceOf.
New function create an easy way to check value's prototype hierarchy.
[Qt] QScriptValue should have an instanceOf method
https://bugs.webkit.org/show_bug.cgi?id=40120
* qt/api/qscriptvalue.cpp:
(QScriptValue::instanceOf):
* qt/api/qscriptvalue.h:
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::instanceOf):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
* qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
(tst_QScriptValue::instanceOf_initData):
(tst_QScriptValue::instanceOf_makeData):
(tst_QScriptValue::instanceOf_test):
2010-06-04 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (interpreter build fix).
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-06-04 Mark Rowe <mrowe@apple.com>
Silence some warnings seen on the build bot.
* JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline.
* JavaScriptCore.JSVALUE32only.exp: Ditto.
* JavaScriptCore.JSVALUE64only.exp: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't
complain about not knowing how to compile them.
2010-06-04 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 40187 - Change function signature of NativeConstructor to match NativeFunction
Mostly for consistency, but constructor & args arguments are redundant,
and this will help if we wish to be able to JIT calls to more constructors.
* API/JSCallbackConstructor.cpp:
(JSC::constructJSCallback):
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::construct):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeConstruct):
* interpreter/Interpreter.h:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/ArrayConstructor.cpp:
(JSC::constructWithArrayConstructor):
* runtime/BooleanConstructor.cpp:
(JSC::constructWithBooleanConstructor):
* runtime/ConstructData.cpp:
(JSC::construct):
* runtime/ConstructData.h:
* runtime/DateConstructor.cpp:
(JSC::constructWithDateConstructor):
* runtime/Error.cpp:
(JSC::constructNativeError):
(JSC::Error::create):
* runtime/ErrorConstructor.cpp:
(JSC::constructWithErrorConstructor):
* runtime/FunctionConstructor.cpp:
(JSC::constructWithFunctionConstructor):
* runtime/NativeErrorConstructor.cpp:
(JSC::constructWithNativeErrorConstructor):
* runtime/NativeErrorConstructor.h:
(JSC::NativeErrorConstructor::errorStructure):
* runtime/NumberConstructor.cpp:
(JSC::constructWithNumberConstructor):
* runtime/ObjectConstructor.cpp:
(JSC::constructWithObjectConstructor):
* runtime/RegExpConstructor.cpp:
(JSC::constructWithRegExpConstructor):
* runtime/StringConstructor.cpp:
(JSC::constructWithStringConstructor):
2010-06-04 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Adam Barth.
Add a takeFirst() method to Deque and use it where appropriate.
https://bugs.webkit.org/show_bug.cgi?id=40089
* wtf/Deque.h:
(WTF::::takeFirst):
* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
* wtf/MessageQueue.h:
(WTF::::tryGetMessage):
2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Remove a QEXPECT_FAIL flag from an autotest.
Test tst_QScriptEngine::globalObject pass after 36600 bug
fix have been applied.
[Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed.
https://bugs.webkit.org/show_bug.cgi?id=40114
* qt/tests/qscriptengine/tst_qscriptengine.cpp:
(tst_QScriptEngine::globalObject):
2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Fix QScriptValue::equals.
Handling for a few edge cases were added. Now comparison between
NaN, an invalid objects should works as supposed.
[Qt] QScriptValue::equals problems
https://bugs.webkit.org/show_bug.cgi?id=40110
* qt/api/qscriptvalue.cpp:
(QScriptValue::equals):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::equals):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
* qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
(tst_QScriptValue::equals_initData):
(tst_QScriptValue::equals_makeData):
(tst_QScriptValue::equals_test):
2010-06-03 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
New states in QScriptValuePrivate.
The CSpecial state was divided into CNull and CUndefined. It simplify
the QScriptValue code by avoiding a few "cast" and "if".
Moreover the MSVS compiler didn't like casting between a double and an
enum which is avoided now.
[Qt] The QScriptValuePrivate::CSpecial is too generic.
https://bugs.webkit.org/show_bug.cgi?id=40067
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::):
(QScriptValuePrivate::QScriptValuePrivate):
(QScriptValuePrivate::isNull):
(QScriptValuePrivate::isUndefined):
(QScriptValuePrivate::toString):
(QScriptValuePrivate::toNumber):
(QScriptValuePrivate::toBool):
(QScriptValuePrivate::toObject):
(QScriptValuePrivate::assignEngine):
(QScriptValuePrivate::isNumberBased):
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (Qt build fix).
* wtf/Platform.h:
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by Mark Rowe.
Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms
This was fixed in bug #40094.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/Platform.h:
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (Interpreter build fix).
* JavaScriptCore.JSVALUE32_64only.exp:
* JavaScriptCore.JSVALUE32only.exp:
* JavaScriptCore.JSVALUE64only.exp:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix II).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 40094 - The return type of NativeFunction should be EncodedJSValue
On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::call):
* API/JSCallbackFunction.h:
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::call):
* JavaScriptCore.exp:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeCall):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* jsc.cpp:
(functionPrint):
(functionDebug):
(functionGC):
(functionVersion):
(functionRun):
(functionLoad):
(functionCheckSyntax):
(functionSetSamplingFlags):
(functionClearSamplingFlags):
(functionReadline):
(functionQuit):
* runtime/ArrayConstructor.cpp:
(JSC::callArrayConstructor):
(JSC::arrayConstructorIsArray):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncConcat):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSort):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/BooleanConstructor.cpp:
(JSC::callBooleanConstructor):
* runtime/BooleanPrototype.cpp:
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/CallData.h:
* runtime/DateConstructor.cpp:
(JSC::callDate):
(JSC::dateParse):
(JSC::dateNow):
(JSC::dateUTC):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncToGMTString):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
(JSC::dateProtoFuncToJSON):
* runtime/ErrorConstructor.cpp:
(JSC::callErrorConstructor):
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString):
* runtime/FunctionConstructor.cpp:
(JSC::callFunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::callFunctionPrototype):
(JSC::functionProtoFuncToString):
(JSC::functionProtoFuncApply):
(JSC::functionProtoFuncCall):
* runtime/JSCell.h:
(JSC::getCallData):
(JSC::getConstructData):
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSFunction.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
(JSC::globalFuncIsNaN):
(JSC::globalFuncIsFinite):
(JSC::globalFuncDecodeURI):
(JSC::globalFuncDecodeURIComponent):
(JSC::globalFuncEncodeURI):
(JSC::globalFuncEncodeURIComponent):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
(JSC::globalFuncJSCPrint):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSONObject.cpp:
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
* runtime/JSObject.cpp:
(JSC::callDefaultValueFunction):
* runtime/JSValue.h:
* runtime/MathObject.cpp:
(JSC::mathProtoFuncAbs):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncCeil):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncFloor):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
(JSC::mathProtoFuncRandom):
(JSC::mathProtoFuncRound):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncSqrt):
(JSC::mathProtoFuncTan):
* runtime/NativeErrorConstructor.cpp:
(JSC::callNativeErrorConstructor):
* runtime/NumberConstructor.cpp:
(JSC::callNumberConstructor):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/ObjectConstructor.cpp:
(JSC::callObjectConstructor):
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorKeys):
(JSC::toPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncPropertyIsEnumerable):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):
* runtime/ObjectPrototype.h:
* runtime/RegExpConstructor.cpp:
(JSC::callRegExpConstructor):
* runtime/RegExpObject.cpp:
(JSC::callRegExpObject):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCode):
(JSC::callStringConstructor):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncToString):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncConcat):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncLocaleCompare):
(JSC::stringProtoFuncBig):
(JSC::stringProtoFuncSmall):
(JSC::stringProtoFuncBlink):
(JSC::stringProtoFuncBold):
(JSC::stringProtoFuncFixed):
(JSC::stringProtoFuncItalics):
(JSC::stringProtoFuncStrike):
(JSC::stringProtoFuncSub):
(JSC::stringProtoFuncSup):
(JSC::stringProtoFuncFontcolor):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncAnchor):
(JSC::stringProtoFuncLink):
(JSC::stringProtoFuncTrim):
(JSC::stringProtoFuncTrimLeft):
(JSC::stringProtoFuncTrimRight):
2010-06-02 Mark Rowe <mrowe@apple.com>
Reviewed by Gavin Barraclough.
Add value-representation specific sections to the mac export file.
* Configurations/JavaScriptCore.xcconfig:
* DerivedSources.make:
* JavaScriptCore.JSVALUE32_64only.exp: Added.
* JavaScriptCore.JSVALUE32only.exp: Added.
* JavaScriptCore.JSVALUE64only.exp: Added.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-06-02 Mark Rowe <mrowe@apple.com>
Reviewed by Gavin Barraclough.
<rdar://problem/8054988> Work around an LLVM GCC code generation bug that results in crashes inside PCRE.
* pcre/pcre_exec.cpp:
(repeatInformationFromInstructionOffset): Change the type of instructionOffset to int. There's no good
reason for it to be a short, and using int prevents this code from triggering the LLVM GCC bug.
2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Fix the QScriptValue::strictlyEquals function.
Handling for a few edge cases was added.
New autotest that covers the QScriptValue::strictlyEquals function.
[Qt] QScriptValue::strictlyEquals is broken
https://bugs.webkit.org/show_bug.cgi?id=36600
* qt/api/qscriptvalue.cpp:
(QScriptValue::strictlyEquals):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::strictlyEquals):
* qt/tests/qscriptvalue/qscriptvalue.pro:
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
* qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: Added.
(tst_QScriptValue::strictlyEquals_initData):
(tst_QScriptValue::strictlyEquals_makeData):
(tst_QScriptValue::strictlyEquals_test):
2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
New function QScriptEngine::newObject.
The function creates a object of class Object and returns it
as a QScriptValue.
[Qt] QScriptEngine API should contain a newObject function
https://bugs.webkit.org/show_bug.cgi?id=39114
* qt/api/qscriptengine.cpp:
(QScriptEngine::newObject):
* qt/api/qscriptengine.h:
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::newObject):
* qt/api/qscriptengine_p.h:
* qt/tests/qscriptengine/tst_qscriptengine.cpp:
(tst_QScriptEngine::newObject):
2010-06-02 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
https://bugs.webkit.org/show_bug.cgi?id=40011
Thumb-2 build fix: The offset parameter of ldrh should be encoded as an
imm12 immediate constant in load16. If it is not fit in the instruction
a temporary register has to be used.
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::load16):
2010-06-02 Sterling Swigart <sswigart@google.com>
Reviewed by David Levin.
Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches.
https://bugs.webkit.org/show_bug.cgi?id=39906
* Configurations/FeatureDefines.xcconfig:
2010-06-01 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together
This is a useful stepping stone towards reversing argument order.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::addParameter):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallEval):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::CallArguments::thisRegister):
(JSC::CallArguments::argumentRegister):
(JSC::CallArguments::callFrame):
(JSC::CallArguments::count):
(JSC::BytecodeGenerator::shouldEmitProfileHooks):
* bytecompiler/NodesCodegen.cpp:
(JSC::NewExprNode::emitBytecode):
(JSC::CallArguments::CallArguments):
(JSC::EvalFunctionCallNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::FunctionCallBracketNode::emitBytecode):
(JSC::FunctionCallDotNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
2010-06-01 Yong Li <yoli@rim.com>
Reviewed by Darin Adler.
Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex.
https://bugs.webkit.org/show_bug.cgi?id=39893
* wtf/ThreadingPthreads.cpp:
(WTF::Mutex::Mutex):
2010-06-01 Kwang Yul Seo <skyul@company100.net>
Reviewed by Xan Lopez.
[GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap
https://bugs.webkit.org/show_bug.cgi?id=39831
Use DEFINE_STATIC_LOCAL for static local variables.
* wtf/gtk/ThreadingGtk.cpp:
(WTF::threadMapMutex):
(WTF::threadMap):
(WTF::identifierByGthreadHandle):
2010-06-01 Kent Tamura <tkent@chromium.org>
Reviewed by Shinichiro Hamaji.
Fix style errors of dtoa
https://bugs.webkit.org/show_bug.cgi?id=39972
Fix all errors reported by check-webkit-style.
* wtf/dtoa.cpp:
* wtf/dtoa.h:
2010-05-30 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
* wtf/OwnArrayPtr.h:
(WTF::OwnArrayPtr::set): Fix the assertion in here to match the one in OwnPtr.
At some point someone fixed the "asserts when assigning to 0 and the pointer is
already 0" issue in OwnPtr but forgot to do it here.
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Windows build fix: Updated exported symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I
can figure out why it's crashing.
* wtf/Platform.h:
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Fixed Windows crash seen on buildbot.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first
argument in ecx.
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Windows build fix: Updated exported symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL
is disabled.
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
* wtf/Platform.h:
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Windows build fix: Updated exported symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
Simplified the host calling convention.
22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host
function calls.
No change on SunSpider.
All JS calls (but not constructs, yet) now go through the normal JS
calling convention via the RegisterFile. As a result, the host calling
convention, which used to be this
JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&)
is now this
JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*)
Callee, 'this', and argument access all hapen relative to the ExecState*,
which is a pointer into the RegisterFile.
This patch comes in two parts.
PART ONE: Functional code changes.
* wtf/Platform.h: Disabled optimized calls on platforms I didn't test.
We can re-enable once we verify that host calls on these platforms are
correct.
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::functionName):
(JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to
ExecState::callee().
(JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue().
* interpreter/CallFrame.cpp:
* interpreter/CallFrame.h:
(JSC::ExecState::callee):
(JSC::ExecState::scopeChain):
(JSC::ExecState::init): Changed callee() to be JSObject* instead of
JSFunction* -- now, it might be some other callable host object.
(JSC::ExecState::hostThisRegister):
(JSC::ExecState::hostThisValue):
(JSC::ExecState::argumentCount):
(JSC::ExecState::argumentCountIncludingThis):
(JSC::ExecState::argument):
(JSC::ExecState::setArgumentCountIncludingThis):
(JSC::ExecState::setCallee): Added convenient accessors for arguments
from within a host function. Removed thisValue() because it was too
tempting to use incorrectly, and it only had one or two clients, anyway.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue().
(JSC::Interpreter::throwException): Be sure to shrink the register file
before invoking the exception handler, to reduce the chances that the
handler will re-throw in the case of stack overflow. (Re-throwing is now
more likely than it used to be, since standardizing the calling convention
implicitly added stack overflow checks to some places where they used to be missing.)
(JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope.
Updated for CallFrame::init API change.
(JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope.
Updated for CallFrame::init API change. Added support for calling a host
function.
(JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope.
Updated for CallFrame::init API change.
(JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change.
(JSC::Interpreter::privateExecute): Updated for CallFrame::init API change.
Added some explicit JSValue(JSObject*) initialization, since relaxing
the JSFunction* restriction on callee has made register types more ambiguous.
Removed toThisObject() conversion, since all callees do it themselves now.
Updated host function call for new host function signature. Updated for
change to ExecState::argumentCount() API.
* interpreter/Register.h:
(JSC::Register::):
(JSC::Register::operator=):
(JSC::Register::function): Changed callee() to be JSObject* instead of
JSFunction* -- now, it might be some other callable host object.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that
set up the arguments to host functions -- all but one of the arguments
are gone now. This is the actual optimization.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API
changes noted above. Removed toThisObject() conversion, since all callees
do it themselves now.
* runtime/ArgList.h:
(JSC::ArgList::ArgList): ArgList is getting close to unused. Added a
temporary shim for converting from ExecState* to ArgList where it's still
necessary.
* runtime/Arguments.h:
(JSC::Arguments::getArgumentsData):
(JSC::Arguments::Arguments): Updated for ExecState and Register API
changes noted above.
* runtime/CallData.cpp:
(JSC::call): Changed call always to call Interpreter::executeCall, even
for host functions. This ensures that the normal calling convention is
set up in the RegsiterFile when calling from C++ to host function.
* runtime/CallData.h: Changed host function signature as described above.
* runtime/ConstructData.cpp:
(JSC::construct): Moved JSFunction::construct code here so I could nix
JSFunction::call and JSFunction::call. We want a JSFunction-agnostic
way to call and construct, so that everything works naturally for non-
JSFunction objects.
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSFunction.h: Updated for ExecState and Register API changes
noted above. Nixed JSFunction::call and JSFunction::construct, noted above.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Ditto.
PART TWO: Global search and replace.
In the areas below, I used global search-and-replace to change
(ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
args.size() => exec->argumentCount()
args.at(i) => exec->argument(i)
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::call):
* API/JSCallbackFunction.h:
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::call):
* JavaScriptCore.exp:
* jsc.cpp:
(functionPrint):
(functionDebug):
(functionGC):
(functionVersion):
(functionRun):
(functionLoad):
(functionCheckSyntax):
(functionSetSamplingFlags):
(functionClearSamplingFlags):
(functionReadline):
(functionQuit):
* runtime/ArrayConstructor.cpp:
(JSC::callArrayConstructor):
(JSC::arrayConstructorIsArray):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncConcat):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSort):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/BooleanConstructor.cpp:
(JSC::callBooleanConstructor):
* runtime/BooleanPrototype.cpp:
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/DateConstructor.cpp:
(JSC::callDate):
(JSC::dateParse):
(JSC::dateNow):
(JSC::dateUTC):
* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
(JSC::fillStructuresUsingTimeArgs):
(JSC::fillStructuresUsingDateArgs):
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncToGMTString):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
(JSC::dateProtoFuncToJSON):
* runtime/ErrorConstructor.cpp:
(JSC::callErrorConstructor):
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString):
* runtime/FunctionConstructor.cpp:
(JSC::callFunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::callFunctionPrototype):
(JSC::functionProtoFuncToString):
(JSC::functionProtoFuncApply):
(JSC::functionProtoFuncCall):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::decode):
(JSC::globalFuncEval):
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
(JSC::globalFuncIsNaN):
(JSC::globalFuncIsFinite):
(JSC::globalFuncDecodeURI):
(JSC::globalFuncDecodeURIComponent):
(JSC::globalFuncEncodeURI):
(JSC::globalFuncEncodeURIComponent):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
(JSC::globalFuncJSCPrint):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSONObject.cpp:
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
* runtime/JSString.h:
* runtime/MathObject.cpp:
(JSC::mathProtoFuncAbs):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncCeil):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncFloor):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
(JSC::mathProtoFuncRandom):
(JSC::mathProtoFuncRound):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncSqrt):
(JSC::mathProtoFuncTan):
* runtime/NativeErrorConstructor.cpp:
(JSC::callNativeErrorConstructor):
* runtime/NumberConstructor.cpp:
(JSC::callNumberConstructor):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/ObjectConstructor.cpp:
(JSC::callObjectConstructor):
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorKeys):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncPropertyIsEnumerable):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):
* runtime/ObjectPrototype.h:
* runtime/Operations.h:
(JSC::jsString):
* runtime/RegExpConstructor.cpp:
(JSC::callRegExpConstructor):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::test):
(JSC::RegExpObject::exec):
(JSC::callRegExpObject):
(JSC::RegExpObject::match):
* runtime/RegExpObject.h:
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCodeSlowCase):
(JSC::stringFromCharCode):
(JSC::callStringConstructor):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncToString):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncConcat):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncLocaleCompare):
(JSC::stringProtoFuncBig):
(JSC::stringProtoFuncSmall):
(JSC::stringProtoFuncBlink):
(JSC::stringProtoFuncBold):
(JSC::stringProtoFuncFixed):
(JSC::stringProtoFuncItalics):
(JSC::stringProtoFuncStrike):
(JSC::stringProtoFuncSub):
(JSC::stringProtoFuncSup):
(JSC::stringProtoFuncFontcolor):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncAnchor):
(JSC::stringProtoFuncLink):
(JSC::stringProtoFuncTrim):
(JSC::stringProtoFuncTrimLeft):
(JSC::stringProtoFuncTrimRight):
2010-05-28 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Geoffrey Garen.
Fix the JSObjectSetPrototype function.
A cycle in a prototype chain can cause an application hang or
even crash.
A check for a prototype chain cycles was added to
the JSObjectSetPrototype.
JSObjectSetPrototype doesn't check for cycle in prototype chain.
https://bugs.webkit.org/show_bug.cgi?id=39360
* API/JSObjectRef.cpp:
(JSObjectSetPrototype):
* API/tests/testapi.c:
(assertTrue):
(checkForCycleInPrototypeChain):
(main):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
* runtime/JSObject.h:
(JSC::JSObject::setPrototypeWithCycleCheck):
2010-05-28 Chao-ying Fu <fu@mips.com>
Reviewed by Eric Seidel.
Fix MIPS JIT DoubleGreaterThanOrEqual Operands
https://bugs.webkit.org/show_bug.cgi?id=39504
Swapped two operands of left and right for DoubleGreaterThanOrEqual.
This patch fixed two layout tests as follows.
fast/js/comparison-operators-greater.html
fast/js/comparison-operators-less.html
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchDouble):
2010-05-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Move jit compilation from linking thunks into cti_vm_lazyLink methods.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
2010-05-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 39898 - Move arity check into callee.
We can reduce the size of the virtual call trampolines by moving the arity check
into the callee functions. As a following step we will be able to remove the
check for native function / codeblocks by performing translation in a lazy stub.
* interpreter/CallFrame.h:
(JSC::ExecState::init):
(JSC::ExecState::setReturnPC):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
(JSC::JIT::linkCall):
(JSC::JIT::linkConstruct):
* jit/JIT.h:
(JSC::JIT::compile):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::generateJITCodeForCall):
(JSC::FunctionExecutable::generateJITCodeForConstruct):
(JSC::FunctionExecutable::reparseExceptionInfo):
* runtime/Executable.h:
(JSC::NativeExecutable::NativeExecutable):
(JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck):
(JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
2010-05-27 Luiz Agostini <luiz.agostini@openbossa.org>
Reviewed by Darin Adler.
UTF-16 code points compare() for String objects
https://bugs.webkit.org/show_bug.cgi?id=39701
Moving compare() implementation from UString to StringImpl for it to be shared
with String. Adding overloaded free functions codePointCompare() in StringImpl
and WTFString. Renaming function compare in UString to codePointCompare to be
consistent.
* runtime/JSArray.cpp:
(JSC::compareByStringPairForQSort):
* runtime/UString.cpp:
* runtime/UString.h:
(JSC::codePointCompare):
* wtf/text/StringImpl.cpp:
(WebCore::codePointCompare):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.cpp:
(WebCore::codePointCompare):
* wtf/text/WTFString.h:
2010-05-26 Darin Adler <darin@apple.com>
Reviewed by Kent Tamura.
Null characters handled incorrectly in ToNumber conversion
https://bugs.webkit.org/show_bug.cgi?id=38088
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::parseInt): Changed code to use UTF8String().data() instead of
ascii() to fix the thread safety issue. Code path is covered by existing
tests in run-javascriptcore-tests.
(JSC::parseFloat): Moved comment to UString::toDouble since the issue
affects all clients, not just parseFloat. Specifically, this also affects
standard JavaScript numeric conversion, ToNumber.
* runtime/UString.cpp:
(JSC::UString::toDouble): Added a comment about incorrect space skipping.
Changed trailing junk check to use the length of the CString instead of
checking for a null character. Also got rid of a little unneeded logic
in the case where we tolerate trailing junk.
2010-05-27 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
Search for the new allocation one word at a time. Improves
performance on SunSpider by approximately 1%.
http://bugs.webkit.org/show_bug.cgi?id=39758
* runtime/Collector.cpp:
(JSC::Heap::allocate):
* runtime/Collector.h:
(JSC::CollectorBitmap::advanceToNextPossibleFreeCell):
2010-05-27 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fixes for Windows after recent changes.
* wscript:
2010-05-27 Gustavo Noronha Silva <gns@gnome.org>
More build fixage for make dist.
* GNUmakefile.am:
2010-05-27 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
RVCT does not have strnstr.
https://bugs.webkit.org/show_bug.cgi?id=39719
Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr.
* wtf/StringExtras.h:
2010-05-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
(relanding r60267)
If the last item in a main disjunction is a quantified set of parentheses,
this is easier to code generate for than the general case for quantified
parentheses. This is because we never need to backtrack into the parentheses
- the first match will be the final and accepted match.
This patch also somewhat reverts a recent change to when fallback to PCRE
occurs. At the minute the compiler is tracking on patterns which will
require JIT fallback. This is handy from a performance perspective (it saves
the failed attempt at JIT compilation), but it means introducing knowledge
of the JITs capabilities into the other layers of the regex compilers. For
the specific feature of back-references, add a flag tracking their presence
on the pattern, and make these expressions fallback without attempting to
JIT. For parentheses, return to detecting which cases are have or have not
been handled during JIT compilation.
18% progression on tagcloud, ~1.5% overall on sunspidey.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::RegexGenerator::generateTerm):
(JSC::Yarr::RegexGenerator::RegexGenerator):
(JSC::Yarr::RegexGenerator::shouldFallBack):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-05-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (revert).
Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::TermGenerationState::term):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
(JSC::Yarr::RegexGenerator::generateTerm):
(JSC::Yarr::RegexGenerator::RegexGenerator):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-05-26 Gustavo Noronha Silva <gns@gnome.org>
Build fixes for make distcheck.
* GNUmakefile.am:
2010-05-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
If the last item in a main disjunction is a quantified set of parentheses,
this is easier to code generate for than the general case for quantified
parentheses. This is because we never need to backtrack into the parentheses
- the first match will be the final and accepted match.
This patch also somewhat reverts a recent change to when fallback to PCRE
occurs. At the minute the compiler is tracking on patterns which will
require JIT fallback. This is handy from a performance perspective (it saves
the failed attempt at JIT compilation), but it means introducing knowledge
of the JITs capabilities into the other layers of the regex compilers. For
the specific feature of back-references, add a flag tracking their presence
on the pattern, and make these expressions fallback without attempting to
JIT. For parentheses, return to detecting which cases are have or have not
been handled during JIT compilation.
18% progression on tagcloud, ~1.5% overall on sunspidey.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::RegexGenerator::generateTerm):
(JSC::Yarr::RegexGenerator::RegexGenerator):
(JSC::Yarr::RegexGenerator::shouldFallBack):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-05-26 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Fixed a crash seen on the Leopard bot, caused by merge.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe,
since it's no longer passed to us as an argument.
2010-05-25 Geoffrey Garen <ggaren@apple.com>
Fixed build failure caused by merge.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this
function no longer returns a pair.
2010-05-25 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/8020221>
Fixed a crash seen on Windows when calling a function with too many
arguments.
SunSpider reports no change.
No test because the ASSERT I added fires in existing tests.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too
many arguments have been provided, since the caller only allocated enough
registerFile space for the arguments it provided, not enough for the extra
copy of arguments we're going to need.
2010-05-25 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
Build fix for JSFunction
https://bugs.webkit.org/show_bug.cgi?id=39658
MSVC can't compile one of JSFunction constructors when JIT is disabled.
"PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined.
Add ENABLE(JIT) guard to the constructor.
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
* runtime/JSFunction.h:
2010-05-24 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call.
Presently, as soon as op-call strays off the hot path we set up a set of values on
the stack to be passed as arguments to cti functions, in case any should be called.
Instead, hoist the setup of the callframe to happen slightly sooner, and make the
cti functions to compile & check arity read these values from the callframe. This
allows up to remove the deprecated methods to manually set up cti arguments, rather
than using JITStubCall.h.
* interpreter/CallFrame.h:
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCallVarargsSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCallVarargsSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITInlineMethods.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
(JSC::):
2010-05-24 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Relanding r60075.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
* bytecode/CodeBlock.h:
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitGetByIdExceptionInfo):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_convert_this):
(JSC::JIT::emit_op_get_callee):
(JSC::JIT::emit_op_create_this):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_get_callee):
(JSC::JIT::emit_op_create_this):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC::JITThunks::hostFunctionStub):
* jit/JITStubs.h:
(JSC::JITThunks::ctiNativeConstruct):
(JSC::):
* runtime/ExceptionHelpers.cpp:
(JSC::createNotAnObjectError):
* runtime/Executable.h:
(JSC::NativeExecutable::create):
(JSC::NativeExecutable::NativeExecutable):
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSFunction.h:
* wtf/Platform.h:
== Rolled over to ChangeLog-2010-05-24 ==