platform/upstream/qtdeclarative.git
11 years agoFix semingly random failing assertions in DefUsesCalculator
Simon Hausmann [Thu, 27 Jun 2013 09:49:50 +0000 (11:49 +0200)]
Fix semingly random failing assertions in DefUsesCalculator

Add a default constructor to DefUse to ensure that the pointer members are
properly initialized to zero.

Change-Id: I80a1858be2662c246f0f1ecd2fa6f795bbdabf87
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
11 years agoEnable ARM unwind support on QNX/ARM as well.
Petr Nejedly [Wed, 26 Jun 2013 21:52:09 +0000 (14:52 -0700)]
Enable ARM unwind support on QNX/ARM as well.

The QNX/gcc behaves the same as Linux when it comes to ARM unwinding
tables. Use the same support as on ARM. It may not work flawlessly yet,
but at least it fixes one of the QNX compilation issues.

Change-Id: I1592a18d62fd8d8738c5254a75c73e3608b3d38b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix try/catch on ARM
Simon Hausmann [Tue, 25 Jun 2013 14:18:30 +0000 (16:18 +0200)]
Fix try/catch on ARM

When returning _to_ tryWrapper we pass the address on where to continue
execution in r0. So in our leaveStackFrame() we shouldn't clobber r0
and in fact there's little value in restoring r0-r3 given that they're
used to pass arguments and don't require save/restore.

Change-Id: Iba0091e19eb74347472e698ffc7687e647a5e5be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix module name (QtQml) in the license header under src/3rdparty
Sergio Ahumada [Mon, 24 Jun 2013 12:49:13 +0000 (14:49 +0200)]
Fix module name (QtQml) in the license header under src/3rdparty

Also updating the copyright year to 2013

Change-Id: I743d93d13d1841e13600f7353c4fe3e05bbd7c32
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix tst_QJSValue::engineDeleted with MSVC
Simon Hausmann [Wed, 26 Jun 2013 11:33:53 +0000 (13:33 +0200)]
Fix tst_QJSValue::engineDeleted with MSVC

Don't return void in a non-void function :)

Change-Id: I467347a9471655d3c3472dbe3690e9d26cad7e46
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix failing assertion with MSVC in debug builds in various tests
Simon Hausmann [Wed, 26 Jun 2013 11:25:07 +0000 (13:25 +0200)]
Fix failing assertion with MSVC in debug builds in various tests

We re-implemented Vector::begin() and end() by means of dereferencing the return
value from std::begin() and then taking the address of it. That causes a failing
assertion in MSVC's STL (rightly so!). We did this only to avoid modifying
the original YarrJIT.cpp code.

This patch instead simplifies our Vector.h stub again and just fixes the two
small occurrences in YarrJIT.cpp where it expects vector->begin() to return a
pointer instead of an iterator.

Change-Id: I2ad137be91ea969ccb310333dffa8d98e5825f8f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix build with MingW
Simon Hausmann [Tue, 25 Jun 2013 13:48:26 +0000 (15:48 +0200)]
Fix build with MingW

We can use the same win32 functions here to get the stack base address.

Change-Id: I7f26434b2c479772eaee94b8a9f7e1eba7f0721f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix crash in qqmlecmascript::sequenceSort with MSVC in debug builds
Simon Hausmann [Wed, 26 Jun 2013 10:44:56 +0000 (12:44 +0200)]
Fix crash in qqmlecmascript::sequenceSort with MSVC in debug builds

ArrayPrototype.sort allows specifying a compare function implemented in JS,
which we "wrap" and then pass on to std::sort. std::sort with MSVC has
an assertion verifying that the less-than compare function provided is
perfectly consistent in its return values. We don't want JS to easily crash
the entire application and therefore resort to qSort().

Change-Id: Id2c758a7d2bee60f31a7a3971172bca9b3c69af6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix crashes with MSVC on x86
Simon Hausmann [Wed, 26 Jun 2013 10:41:21 +0000 (12:41 +0200)]
Fix crashes with MSVC on x86

When returning a struct like QV4::Value from a function, the compiler can
either place the return value into the stack by expecting the caller
to provide a hidden first argument (pointer to where to store the value)
or pass it in eax:edx. The choice of which approach to pick depends on
whether the type is known at function declaration time. In this case we
had a mismatch where qv4serialize.cpp had a function that returned a value
and it is implemented by calling another function that would return the value.
QV4::Value was forward-declared, and so when compiling the function, the
compiler would assume that the caller provided an invisible first argument
for return value storage. The caller (in qquickworkerscript.cpp) however
had fully visibility of QV4::Value at call time and therefore assumed that
the value is returned in eax:edx. This mismatch caused naturally all sorts
of funny crashes.

The approach chosen is to eliminate any forward declarations of QV4::Value
and instead include the definition where appropriate.

Change-Id: I33303d86964239d3be30d1096806c605cddb7bbc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoDisable the JIT on Windows/AMD64 as well as on iOS
Simon Hausmann [Tue, 25 Jun 2013 14:07:41 +0000 (16:07 +0200)]
Disable the JIT on Windows/AMD64 as well as on iOS

Change-Id: I7402981caa2f73fd0712975e657488a4065f403f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix build with msvc2010 in 32-bit mode
Simon Hausmann [Tue, 25 Jun 2013 12:23:35 +0000 (14:23 +0200)]
Fix build with msvc2010 in 32-bit mode

It cannot map a function pointer that returns a structure that isn't known
at declaration time.

Done with Lars.

Change-Id: I02a241695a6f6a94883507eb2c4988852cc9b912
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoVarious build fixes for Windows:
Simon Hausmann [Tue, 25 Jun 2013 09:17:34 +0000 (11:17 +0200)]
Various build fixes for Windows:

* Fix processor #defines in stack trace generation code
* Fix return type of doEdgeSplitting. It doesn't actually return anything.
* Work around internal compiler error in the array construction in qquickworkerscript.cpp

Change-Id: I8fac4bc2e8ca7447f4eeff260d8502d70ff6faf6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoProspective CI system build fix for Ubuntu 10.04's gcc
Simon Hausmann [Mon, 24 Jun 2013 15:00:28 +0000 (17:00 +0200)]
Prospective CI system build fix for Ubuntu 10.04's gcc

Change-Id: I4293c3a75e6a98cafd8f41a68012102628416610
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix compilation with namespaced Qt
Simon Hausmann [Mon, 24 Jun 2013 13:28:00 +0000 (15:28 +0200)]
Fix compilation with namespaced Qt

This also moves the extern "C" symbols back into the QV4 namespace

Change-Id: Id6d137df8610010588554bf0660228b357477823
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRe-add qtjsbackend
Simon Hausmann [Mon, 24 Jun 2013 12:31:36 +0000 (14:31 +0200)]
Re-add qtjsbackend

This is not an actual dependency, but required to build with qt.pro in the
CI system. This can be reverted again when merging back to dev.

Change-Id: I48f038553754b971e0ce37587afe43dabf4e50cf
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
11 years agoFix module name (QtQml) in the license header
Sergio Ahumada [Mon, 24 Jun 2013 11:50:51 +0000 (13:50 +0200)]
Fix module name (QtQml) in the license header

Change-Id: Id78dfee1ac76a3b4d0976864353c4eb50e63c08b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix missing license headers for test262.py
Sergio Ahumada [Mon, 24 Jun 2013 11:45:32 +0000 (13:45 +0200)]
Fix missing license headers for test262.py

Change-Id: I805cf8951fb50518372aad0024fc287ee5955bbd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove a ### comment
Lars Knoll [Mon, 24 Jun 2013 11:39:58 +0000 (13:39 +0200)]
Remove a ### comment

This has been fixed in a different way already in
commit 19e4901e74fe29cdb11302873bd96641dd9b97da.

Change-Id: I7780b709e3fac3c724b94eeae92e814aae929e52
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoProspective fix for sync.profile for CI runs on the branch
Simon Hausmann [Mon, 24 Jun 2013 11:31:32 +0000 (13:31 +0200)]
Prospective fix for sync.profile for CI runs on the branch

Don't try to check out wip/v4 in qtbase and qtxmlpatterns

Change-Id: I1b4cb3f83ba62123414f184e141f52bbaac79827
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
11 years agoFix some missing license headers
Sergio Ahumada [Mon, 24 Jun 2013 10:07:48 +0000 (12:07 +0200)]
Fix some missing license headers

Change-Id: I758fe0a61d1ecb9418087ac318ac93f227013248
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMerge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into wip/v4
Simon Hausmann [Mon, 24 Jun 2013 09:26:22 +0000 (11:26 +0200)]
Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into wip/v4

Conflicts:
src/imports/qtquick2/plugins.qmltypes
src/qml/debugger/qv8debugservice.cpp
src/qml/qml/qml.pri
src/qml/qml/qqmlcompiler.cpp
src/qml/qml/qqmlcomponent.cpp
src/qml/qml/qqmlcontext.cpp
src/qml/qml/qqmldata_p.h
src/qml/qml/qqmlengine_p.h
src/qml/qml/qqmljavascriptexpression.cpp
src/qml/qml/qqmlxmlhttprequest.cpp
src/qml/qml/v4/qv4bindings.cpp
src/qml/qml/v4/qv4irbuilder.cpp
src/qml/qml/v4/qv4jsonobject_p.h
src/qml/qml/v8/qqmlbuiltinfunctions.cpp
src/qml/qml/v8/qv8bindings.cpp
src/qml/qml/v8/qv8contextwrapper.cpp
src/qml/qml/v8/qv8listwrapper.cpp
src/qml/qml/v8/qv8qobjectwrapper.cpp
src/qml/qml/v8/qv8qobjectwrapper_p.h
src/qml/qml/v8/qv8sequencewrapper_p_p.h
src/qml/qml/v8/qv8typewrapper.cpp
src/qml/qml/v8/qv8valuetypewrapper.cpp
src/qml/types/qqmldelegatemodel.cpp
src/quick/items/context2d/qquickcanvasitem.cpp
src/quick/items/context2d/qquickcontext2d.cpp
sync.profile
tests/auto/qml/qjsengine/tst_qjsengine.cpp
tests/benchmarks/qml/animation/animation.pro
tools/qmlprofiler/qmlprofiler.pro

Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9

11 years agoFix crash on ARMv7 when leaving functions
Simon Hausmann [Mon, 24 Jun 2013 07:31:43 +0000 (09:31 +0200)]
Fix crash on ARMv7 when leaving functions

Don't clobber r6 (ScratchRegister) when adjusting the stack pointer for the
locals, as it is a callee-save register.

Change-Id: Ib14fca0cb0807e7b07d0210d102ae9cc57828741
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix build on Android (part 2)
Simon Hausmann [Fri, 21 Jun 2013 12:56:21 +0000 (14:56 +0200)]
Fix build on Android (part 2)

Don't include linux kernel headers from user space just for one constant :)

Change-Id: Ia760b3f0cccbdad49f3f2ce31598a109b63ac788
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix build with traditional (non-thumb2) ARM
Simon Hausmann [Fri, 21 Jun 2013 12:12:02 +0000 (14:12 +0200)]
Fix build with traditional (non-thumb2) ARM

Pull in the BSD licensed SegmentedVector (that is based on Vector)
and use malloc/free instead of fastMalloc/fastFree in the constant pool.

Change-Id: I25aeb34a6f778f2c886a331851d8fc1dd0fc1d61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix build on Android
Simon Hausmann [Fri, 21 Jun 2013 12:05:56 +0000 (14:05 +0200)]
Fix build on Android

Don't include execinfo.h and use open_memstream on Android

Change-Id: I5b45dd4fc7f3b435b35e1951d6e722d4b52a6ea4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoProspective fix for JIT crashes on ARM
Simon Hausmann [Fri, 21 Jun 2013 06:58:02 +0000 (08:58 +0200)]
Prospective fix for JIT crashes on ARM

Don't do the ret(n) cleanup dance on ARM, as the address of where to
store the return value is provided in r0 and therefore there's nothing
to clean up.

Change-Id: I5b34355e52c9d374d31981361bdfb67193530d38
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMark automatic-semicolon insertion bugs as XFAIL
Simon Hausmann [Mon, 24 Jun 2013 07:57:15 +0000 (09:57 +0200)]
Mark automatic-semicolon insertion bugs as XFAIL

(but marked as needs-fix in trello)

Change-Id: I7cfebc9494dd0d5cb027b36f8c8cbcd02a520302
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix tst_qjsengine::jsIncDecNonObjectProperty
Simon Hausmann [Sun, 23 Jun 2013 18:11:21 +0000 (20:11 +0200)]
Fix tst_qjsengine::jsIncDecNonObjectProperty

With pre increment/decrement expressions, don't rely on the
target expr to be readable after the write to it. In case of
++someString.length for example the value of the property may not
change, but the result of the expression still has to be the
incremented value.

Change-Id: I2389eeee38dbed75aa2764638cb40950e32b8a68
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix failing tst_qqmlecmascript::qtbug_22843:"with .pragma library"
Simon Hausmann [Sun, 23 Jun 2013 13:45:46 +0000 (15:45 +0200)]
Fix failing tst_qqmlecmascript::qtbug_22843:"with .pragma library"

Try to to load a .pragma library type of script only once, even if
it has a syntax error.

Change-Id: I32d7fb71647f413dc75e339e7bff8d74f7754c87
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix tst_qqmlecmascripts::importScripts with private imports
Simon Hausmann [Sun, 23 Jun 2013 13:08:13 +0000 (15:08 +0200)]
Fix tst_qqmlecmascripts::importScripts with private imports

* In QQmlContextWrapper::get we must check the calling context before
  allowing the get, just like in the Getter() in qv8contextwrapper.cpp
* When trying to call a method on undefined/null, throw a readable error message,
  as expected by the test.

Change-Id: Ie39e8ae82a108deef264e4044e12e7b15959caf9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix expected error messages in singleonType test
Simon Hausmann [Sun, 23 Jun 2013 12:31:12 +0000 (14:31 +0200)]
Fix expected error messages in singleonType test

Writing to a property of a frozen object doesn't throw a type error
exception in non-strict mode.

Change-Id: I408078a2a09d16868b95f275f13f2f7a176f66e9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix a memory management issues with the name map in internal classes
Simon Hausmann [Sun, 23 Jun 2013 11:35:17 +0000 (13:35 +0200)]
Fix a memory management issues with the name map in internal classes

The string pointer we store in the nameMap is not marked directly, i.e. our
class hierarchy doesn't have a recursive mark() function. So we must otherwise
make sure that that string is marked, otherwise we get dangling pointers that
are likely to point to _other_ strings later. This is hard to reproduce, but it
does happen with MM_AGGRESSIVE_GC=1 and the singletonType test in
qqmlecmascript, when due to the dangling pointer we end up using the wrong
property name in freeze() when iterating through the name map.

This patch fixes that by storing the actual identifier string, that's
guaranteed to get marked.

Change-Id: I28d1a2d2f56fe3abf692229ba008af8b0789189e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoAdd missing null check to QQuickTextEdit::hoveredLink()
J-P Nurmi [Tue, 18 Jun 2013 07:54:24 +0000 (09:54 +0200)]
Add missing null check to QQuickTextEdit::hoveredLink()

Change-Id: Ie0cb144bb5596f566584b8bb80e334983dd2b50e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoFixes to __qmljs_strict_equal
Lars Knoll [Sat, 22 Jun 2013 13:03:27 +0000 (15:03 +0200)]
Fixes to __qmljs_strict_equal

The implementation was broken if we had mixed int/double
values. In addition, this code should be slightly faster.

Change-Id: I5cf0c493902e33ed242c3ca7034fc369e840167f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSmall cleanup
Lars Knoll [Sat, 22 Jun 2013 12:55:05 +0000 (14:55 +0200)]
Small cleanup

Change-Id: If46ef96f0ab64240b4811645f768844ad43ef48d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the context argument from Managed::call
Lars Knoll [Sat, 22 Jun 2013 08:02:06 +0000 (10:02 +0200)]
Remove the context argument from Managed::call

Change-Id: I0895f9a94af47c8aab1dc93579921737e9516f7d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the context argument from Managed::construct
Lars Knoll [Sat, 22 Jun 2013 07:29:23 +0000 (09:29 +0200)]
Remove the context argument from Managed::construct

Change-Id: I39f5c23de787da70cd4259b3cdcd56391ee0dc7b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove context argument from Object::get/putValue
Lars Knoll [Fri, 21 Jun 2013 22:52:47 +0000 (00:52 +0200)]
Remove context argument from Object::get/putValue

Change-Id: I981b95e30b7761574ddd7891b5dfc24a0136af7f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove context argument from String::makeIdentifier()
Lars Knoll [Fri, 21 Jun 2013 22:16:40 +0000 (00:16 +0200)]
Remove context argument from String::makeIdentifier()

Change-Id: I7c02301499cb1a6895e94beb40ec35c2094bb999
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove context parameter from Manged::put.
Lars Knoll [Fri, 21 Jun 2013 22:09:24 +0000 (00:09 +0200)]
Remove context parameter from Manged::put.

Change-Id: Ib99e726ffbb20463d45a8444b4fbdfe32cd6dbef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the context argument from Managed::putIndexed
Lars Knoll [Fri, 21 Jun 2013 21:42:08 +0000 (23:42 +0200)]
Remove the context argument from Managed::putIndexed

Change-Id: If311140333a1c45be6c6d5464d43898e09eb4322
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove context parameter from Managed::get()
Lars Knoll [Fri, 21 Jun 2013 21:26:11 +0000 (23:26 +0200)]
Remove context parameter from Managed::get()

Change-Id: I61837e4b17d7475dcda2f31b8a293c0020930d52
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove context parameter from Managed::getIndexed
Lars Knoll [Fri, 21 Jun 2013 20:55:13 +0000 (22:55 +0200)]
Remove context parameter from Managed::getIndexed

Change-Id: Ibc6271dbe789ef5ed063d8650ee36978f7c18021
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the execution context from most lookup calls.
Lars Knoll [Fri, 21 Jun 2013 20:04:54 +0000 (22:04 +0200)]
Remove the execution context from most lookup calls.

Change-Id: I6f2bdfa233ebda1596a5a1d2b9d418cd45033d23
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the ExecutionContext parameter from Managed::get/setLookup
Lars Knoll [Fri, 21 Jun 2013 19:48:06 +0000 (21:48 +0200)]
Remove the ExecutionContext parameter from Managed::get/setLookup

Change-Id: I9d3763b97438db83fef899917cbaee2f7cd59f96
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the context argument from Managed::hasInstance()
Lars Knoll [Fri, 21 Jun 2013 18:53:13 +0000 (20:53 +0200)]
Remove the context argument from Managed::hasInstance()

Change-Id: I33937a469c7ad1c6c9913068e7dc898a39d8bf49
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the context argument from Managed::delete(Indexed)Property
Lars Knoll [Fri, 21 Jun 2013 18:33:39 +0000 (20:33 +0200)]
Remove the context argument from Managed::delete(Indexed)Property

It's not required, as we can always get the current context from
the Managed object for the cases we need it.

Change-Id: I29fb9861a73ece1b3d5aa45f3bc350d8a5f76fa9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix GC errors in small objects during construction
Simon Hausmann [Fri, 21 Jun 2013 19:28:11 +0000 (21:28 +0200)]
Fix GC errors in small objects during construction

When creating small objects with for example only one accessor property,
then that is stored in the inline member allocation, which needs to
be initialized as well to prevent GCs during construction to access
uninitialized members.

Change-Id: Ie20d27a650e09475845f8ee6aa79b8e62a4bb795
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix GC errors with Error object
Simon Hausmann [Fri, 21 Jun 2013 19:27:33 +0000 (21:27 +0200)]
Fix GC errors with Error object

Don't forget to properly mark the stack value we're keeping

Change-Id: Ifb002a5e8519e40cd1a4c7f7845171452a585562
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMark qqmlecmascript::hasOwnProperty as xfail
Simon Hausmann [Fri, 21 Jun 2013 14:51:51 +0000 (16:51 +0200)]
Mark qqmlecmascript::hasOwnProperty as xfail

hasOwnProperty is not currently properly supported on dynamic objects that
re-implement get.

Change-Id: Ib6cfe13bbdbe4457adf05cd20e42d3a5e85ac318
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix qqmlmoduleplugin
Simon Hausmann [Fri, 21 Jun 2013 14:15:09 +0000 (16:15 +0200)]
Fix qqmlmoduleplugin

Adjust the expected error message after commit 227f7ed60cfb34f7c3d91b27b07ddc5bbd1a2922

Change-Id: I328072dfb0151d6cd9b8452d8d3f9a306a132203
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix tst_qqmlcomponent::onDestructionLookup
Simon Hausmann [Fri, 21 Jun 2013 14:10:43 +0000 (16:10 +0200)]
Fix tst_qqmlcomponent::onDestructionLookup

Don't rely on the JIT generated code to immediately discard and ignore
the return value of createObject(). Instead move that call into another
function that, so that the return value of createObject() is guaranteed
to be invisible to the GC and thus collect the recently created object
as expected.

Change-Id: I08a0a35fc895482792deffbae7f7f6437727d871
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix enumerating QObject properties
Simon Hausmann [Fri, 21 Jun 2013 14:05:53 +0000 (16:05 +0200)]
Fix enumerating QObject properties

Make sure to enumerate the properties as well as the invokable methods.

Fixes various tests in qmltest

Change-Id: If40dbc8f2203f99d75523e40f78849224e301481
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMark a sub-test in qqmlecmascript::scope() as xfail
Simon Hausmann [Fri, 21 Jun 2013 13:36:25 +0000 (15:36 +0200)]
Mark a sub-test in qqmlecmascript::scope() as xfail

This test relies on the global object vs. context ordering and consequently
fails right now

Change-Id: I6b6cec38bf2d2074c2fcfacf9b499bc7a97cca44
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix tst_qjsvalue::engineDeleted()
Simon Hausmann [Fri, 21 Jun 2013 13:19:20 +0000 (15:19 +0200)]
Fix tst_qjsvalue::engineDeleted()

Move the engine pointer from QJSValuePrivate to PersistentValuePrivate
and set it back to null in the memory manager destructor.

Change-Id: I904b365221e1559701353cb359eac768928ad918
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix expected error message
Lars Knoll [Fri, 21 Jun 2013 12:36:54 +0000 (14:36 +0200)]
Fix expected error message

Change-Id: I41ebd1506b0d1675cac1205d5fd8f60fd751a4aa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix conversion of variantlists to ArrayObjects
Lars Knoll [Fri, 21 Jun 2013 12:14:37 +0000 (14:14 +0200)]
Fix conversion of variantlists to ArrayObjects

Fixes a crash in the qquickmultipointtoucharea test

Change-Id: Ic1ca5220e5e7a569e3cc499ba120296fb885d6c0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix expected test output for one list model test
Lars Knoll [Fri, 21 Jun 2013 12:07:31 +0000 (14:07 +0200)]
Fix expected test output for one list model test

There's no reason to disallow calling model.set() with
an ArrayObject as argument.

Change-Id: I44baad677ca34e1fb4188b89f0a548af84580b4f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove XFAILs that was due to strict mode
Simon Hausmann [Fri, 21 Jun 2013 12:01:21 +0000 (14:01 +0200)]
Remove XFAILs that was due to strict mode

In non-strict mode we can use with() and eval() again, and so these tests pass.

Change-Id: I66b16653a28b1d7e420e53c012d7908c8fc6c29a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMark test as xfail that assumes writability of the global object
Simon Hausmann [Fri, 21 Jun 2013 11:56:52 +0000 (13:56 +0200)]
Mark test as xfail that assumes writability of the global object

As discussed, this needs to be fixed post merge

Change-Id: Iebdc06da4977158b5d6190b3f093f8962459e109
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoDisable the v8profiler, not the qml profiler
Lars Knoll [Fri, 21 Jun 2013 11:11:37 +0000 (13:11 +0200)]
Disable the v8profiler, not the qml profiler

Change-Id: I6113ef5cefa5be8d53e45857ab76c23deb6fe805
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSkip some tests that are failing because of our date time parser
Lars Knoll [Fri, 21 Jun 2013 10:58:49 +0000 (12:58 +0200)]
Skip some tests that are failing because of our date time parser

The parser needs to be fixed to better parse localized dates, times
and timezone fields

Change-Id: I6542ee459e7135b6f845fb5fc89685cb8c2d67c5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDisable some debugger tests until we have a reimplementation for v4
Lars Knoll [Fri, 21 Jun 2013 10:38:01 +0000 (12:38 +0200)]
Disable some debugger tests until we have a reimplementation for v4

Change-Id: I273fba969c72299e84c091afd7d4a43f9dbd1bf8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRevert to non strict mode for qml expressions etc.
Lars Knoll [Fri, 21 Jun 2013 10:28:34 +0000 (12:28 +0200)]
Revert to non strict mode for qml expressions etc.

Forcing them to strict lead to too many incompatibilites
to 5.1, so let's rather leave them non strict

Change-Id: I7c3bafc9a840daa565add7abbad0d0042cdae332
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix scope chain for eval in strict mode
Lars Knoll [Fri, 21 Jun 2013 08:39:03 +0000 (10:39 +0200)]
Fix scope chain for eval in strict mode

Change-Id: Ie00046f98a126cd46cd79758a78be1d0e1d17c61
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix qqmlvaluetypewrapper auto-tests
Simon Hausmann [Thu, 20 Jun 2013 09:32:45 +0000 (11:32 +0200)]
Fix qqmlvaluetypewrapper auto-tests

QQmlValueTypeWrapper stores its prototype in a global variable
(PersistentValue), which doesn't work when using multiple engines. Instead
this patch introduces the QML extensions structure to hold things like
prototypes for type extensions to JS that are specific to QML.

Change-Id: I41a71029edb6ce895eb80db7aa0809aab86b31db
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Thu, 20 Jun 2013 14:19:05 +0000 (16:19 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I5cc2cacd26004ba18f0c6214759f5e073b5c6cfb

11 years agoFix instanceStateValues xhr test
Simon Hausmann [Thu, 20 Jun 2013 06:01:58 +0000 (08:01 +0200)]
Fix instanceStateValues xhr test

Writing to a read-only property or trying to deleting will throw an exception
in strict mode and thus abort the execution. Make the test work in strict and
non-strict mode by surrounding the offending statements with individual
try/catch pairs.

Change-Id: I25f803b6ffd7ef721ac874f53a37b3208b5c05ab
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoPrevent generating jumps to blocks following the current block.
Erik Verbruggen [Tue, 11 Jun 2013 10:18:44 +0000 (12:18 +0200)]
Prevent generating jumps to blocks following the current block.

Copied the JIT logic for it.

Change-Id: I4a11f4c8ede1d093f367b714d92b393c810b4fb5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the index magic from the temp.
Erik Verbruggen [Mon, 10 Jun 2013 15:59:41 +0000 (17:59 +0200)]
Remove the index magic from the temp.

Change-Id: If746ebdd6f29d7140781869af6d589cc4c5b8c9e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix tst_qqmlecmascript::functionAssignmentfromJS_invalid
Simon Hausmann [Tue, 18 Jun 2013 12:15:19 +0000 (14:15 +0200)]
Fix tst_qqmlecmascript::functionAssignmentfromJS_invalid

Remove the column number from the expected output, as we generate those
QQmlBinding objects from within a v4 callback and produce the line number
and column number from the stack trace of the engine, which currently
doesn't produce column numbers.

Change-Id: I9840f0ab571d4261570dd079436aaa9f81e27abf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix tst_qqmlecmascript::functionAssignment_afterBinding
Simon Hausmann [Tue, 18 Jun 2013 13:07:24 +0000 (15:07 +0200)]
Fix tst_qqmlecmascript::functionAssignment_afterBinding

When calling Qt.binding(f), don't modify f and set the bindingKeyFlag
there, but instead we must return a _new_ function that acts as proxy
and has the bindingKeyFlag set to true, similar to how the V8 based
implementation created a clone.

Change-Id: I4998359869c02e32c89e929793bf74a4adafcb72
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix tst_qqmlecmascript::functionAssignment_fromJS
Simon Hausmann [Tue, 18 Jun 2013 12:01:52 +0000 (14:01 +0200)]
Fix tst_qqmlecmascript::functionAssignment_fromJS

Make the test-case compile with strict mode, where function declarations
are not allowed within blocks. An alternative would be to use function
expressions here.

Change-Id: If7e1cc23ef4a0c6a83e4ba8ae03dc9c6b678730d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix tst_qqmlecmascript::functionAssignment_fromBinding
Simon Hausmann [Tue, 18 Jun 2013 11:47:33 +0000 (13:47 +0200)]
Fix tst_qqmlecmascript::functionAssignment_fromBinding

Function declarations in QML mode should be similar to function expressions and
therefore need to go to the return value of the function..

Change-Id: Ib1dd8a970a967f2456d0558be74edf5d74d288e5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix two more errors in the worker script auto test
Lars Knoll [Tue, 18 Jun 2013 11:17:01 +0000 (13:17 +0200)]
Fix two more errors in the worker script auto test

Change-Id: Ib1359a985efae18cd4fc8344b81092af57f1a9d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix parts of workerscript
Lars Knoll [Tue, 18 Jun 2013 10:48:08 +0000 (12:48 +0200)]
Fix parts of workerscript

The worker script creates a special QmlContextWrapper
that doesn't contain many things found in the main thread.
However we still need to be able to cast to it, so it
should be the same class as the regular context wrapper.

Fixes parts of the worker script auto tests.

Change-Id: I3697b2b0080dc4ac967eb447e2efd0f28fbab465
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix inifite loop when running ecmascript tests
Simon Hausmann [Tue, 18 Jun 2013 10:59:51 +0000 (12:59 +0200)]
Fix inifite loop when running ecmascript tests

Revert the initialization part of 42825af048ab2724e0d434178dcef1b23b4850ff in
the IR, apparently it is needed.

Change-Id: Ia415133ee2fb6cd060fa5a0e5da7b711ac98ddd1
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
11 years agofix case insensitive issue with image provider id
Tasuku Suzuki [Sat, 8 Jun 2013 06:53:09 +0000 (15:53 +0900)]
fix case insensitive issue with image provider id

Task-number: QTBUG-31614

Change-Id: I866df6e3ed6226b443640a51f66a3dbb92b31249
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoRemove use of 'register' from QtQml.
Stephen Kelly [Mon, 17 Jun 2013 14:12:31 +0000 (16:12 +0200)]
Remove use of 'register' from QtQml.

Change-Id: Id9848e3161346c7519d430c47718670cabe556de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoFix the first half of qqmllocale auto tests
Lars Knoll [Mon, 17 Jun 2013 20:44:49 +0000 (22:44 +0200)]
Fix the first half of qqmllocale auto tests

Change-Id: I0f37208eaefcb668d3b61d294129134cfaa7c8f4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoAdd QQuickText::hoveredLink
J-P Nurmi [Tue, 23 Apr 2013 13:29:56 +0000 (15:29 +0200)]
Add QQuickText::hoveredLink

Task-number: QTBUG-30804
Change-Id: I6c6993b152285f4bdf34d6e1aa04f25fa7ca41e0
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoFix dead lock when showDotAndDotDot is set to FolderListModel
Tasuku Suzuki [Wed, 12 Jun 2013 14:51:10 +0000 (23:51 +0900)]
Fix dead lock when showDotAndDotDot is set to FolderListModel

Task-number: QTBUG-31687

Change-Id: Iaec798018f54f80c67fe5a06defee73ab7b79605
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoFix url test in qqmllanguage
Simon Hausmann [Mon, 17 Jun 2013 12:27:55 +0000 (14:27 +0200)]
Fix url test in qqmllanguage

In V4 URLs were mapped to strings, with V8 they were mapped to opaque
variants, which is also what we do with v4 at the moment. In the future
we want to provide a real JS API for URLs, but that is a feature that
should be discussed in a wider scope and developed on the dev branch.

Change-Id: I17660066b2797239eddebad03f49ffa424f86f78
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMake it possible to evaluate JS with the v4 tool the QML way
Simon Hausmann [Mon, 17 Jun 2013 11:36:21 +0000 (13:36 +0200)]
Make it possible to evaluate JS with the v4 tool the QML way

Change-Id: I2a40e82612c2da1b52a37cbff2507951e4ac0349
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix the console autotests
Lars Knoll [Mon, 17 Jun 2013 12:27:06 +0000 (14:27 +0200)]
Fix the console autotests

Change-Id: I8936c6baa274e673c23c65637fa199a6140e0a15
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix qmlmin test
Lars Knoll [Mon, 17 Jun 2013 11:52:38 +0000 (13:52 +0200)]
Fix qmlmin test

Exclude the test262 test suite, as qmlmin can't deal with
all of the test cases there.

Change-Id: Ie56c0d9adecc6b1ae0ddcbcd3edd5b0eaf30cd4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix the remaining test failures in the jsonbinding autotest
Lars Knoll [Mon, 17 Jun 2013 11:47:24 +0000 (13:47 +0200)]
Fix the remaining test failures in the jsonbinding autotest

Skip properties that are function objects when converting a V4 Object to a
QJsonObject. For arrays the function object gets replaced with null.
Fix the test case for arrays to have the correct expected output.

Change-Id: I3ee63935d038e0922e33ac6e64e9c31ecfbd4a7e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix memory corruption in qjsvalueprivate
Lars Knoll [Mon, 17 Jun 2013 11:35:07 +0000 (13:35 +0200)]
Fix memory corruption in qjsvalueprivate

When converting to a memory managed string, we need to add
the PersistentValuePrivate to the chain of persistent objects.
Otherwise the string stored in the JSValue can get garbage
collected.

Change-Id: I159fd77a7ae6f29e4121969cac962bd12b0f9bc7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix and enable the qmldirparser autotest
Lars Knoll [Mon, 17 Jun 2013 07:55:40 +0000 (09:55 +0200)]
Fix and enable the qmldirparser autotest

Change-Id: I2e9b64e5df63dbd9fffc204b7058d3c77255b09c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix most qjsonbinding auto tests
Lars Knoll [Mon, 17 Jun 2013 07:18:19 +0000 (09:18 +0200)]
Fix most qjsonbinding auto tests

Change-Id: I67476bc7e931e2f4790e859d4a3c00c050752271
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoPrefix internal classes properly and private export them.
Gunnar Sletta [Fri, 14 Jun 2013 17:27:01 +0000 (19:27 +0200)]
Prefix internal classes properly and private export them.

Without the private export on these classes, the private
export on the QSGDefaultImageNode and QSGDefaultTextureNode
is useless, as the symbols fail to resolve

Change-Id: I25a265a7669e5f5015c482aa24fe154c2c9a1062
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoMark the eval() test as xfail
Simon Hausmann [Mon, 17 Jun 2013 05:31:41 +0000 (07:31 +0200)]
Mark the eval() test as xfail

eval() works differently in strict mode, and it's nicely covered by
test262

Change-Id: I9bb84753032d5106c94d78afe765680f3d85348d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRevert "Local initialisation is now done in codegen."
Simon Hausmann [Sun, 16 Jun 2013 20:42:47 +0000 (22:42 +0200)]
Revert "Local initialisation is now done in codegen."

This reverts commit 2bd6e240a3c2b3dc7a2c81c639d4f30e4dfd685f.

This doesn't work properly as the code generator will not keep those
initializations at the beginning of the function, resulting in
uninitialized values in ctx->locals[], which gives valgrind warnings
when they're marked.

Change-Id: I81501e0ea80e7f76b7d9112fea261e406084b69b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRevert "Local initialization is now done in codegen"
Simon Hausmann [Sun, 16 Jun 2013 20:42:34 +0000 (22:42 +0200)]
Revert "Local initialization is now done in codegen"

This reverts commit 01526deb814cf53a9dc80014960da2f4e8def3e2.

This doesn't work properly as the code generator will not keep those
initializations at the beginning of the function, resulting in
uninitialized values in ctx->locals[], which gives valgrind warnings
when they're marked.

Change-Id: I8f671c85b6744c80b6fe11b628bf6b6de125a6bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoAdjust expected error message for qqmlecmascript::qtbug_22843
Simon Hausmann [Sat, 15 Jun 2013 20:43:58 +0000 (22:43 +0200)]
Adjust expected error message for qqmlecmascript::qtbug_22843

Change-Id: Ib6f58c2d7ee5e4f03fcc755d2290bdf204e3aa61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRe-enable two disabled var property tests and make them pass
Simon Hausmann [Fri, 14 Jun 2013 20:12:04 +0000 (22:12 +0200)]
Re-enable two disabled var property tests and make them pass

When marking the var properties of a VME-metaobject (we decided to keep its
QObject alive), then we must also mark the var properties of the parent
VME-metaobject. The two property var inheritance tests verify that.

Change-Id: If1f0d4f3daef78d42adb7052cc1ce7bbdd6da585
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix qqmlproperty::warnOnInvalidBinding
Simon Hausmann [Fri, 14 Jun 2013 06:07:01 +0000 (08:07 +0200)]
Fix qqmlproperty::warnOnInvalidBinding

* Add column to expected warning message
* Get rid of eval that doesn't make sense with only one JS engine
  and doesn't work in strict mode

Change-Id: I63cd3784cd8c255af8832ea5ca1e6e5e2d48431e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix QVariantObject destruction
Simon Hausmann [Fri, 14 Jun 2013 14:08:48 +0000 (16:08 +0200)]
Fix QVariantObject destruction

Make sure to call the VariantObject destructor from its destroy method,
in order to ensure that the ExecutionEngine::ScarceResourceData destructor
we inherit from is also called, which ensures that the refcount in the
QVariant it holds also drops correctly.

Fixes tst_qqmlecmascript::propertyVarCircular

Change-Id: I14df8e2f0d5be6f3049a295a527afa09e19f0ef2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix JS ownership of children of marked but floating QObjects
Simon Hausmann [Fri, 14 Jun 2013 10:21:45 +0000 (12:21 +0200)]
Fix JS ownership of children of marked but floating QObjects

This patch fixes four qqmlecmascript tests: propertyVarImplicitOwnership,
propertyVarReparent, propertyVarReparentNullContext, propertyVarCircular2

Usually QObjects wrapped in JS are kept alive because the GC knows about their
weak values stored in the QQmlData, and so it has to do few steps only to
locate those and mark them.

A slightly less common case is a QObject that's wrapped in JS, without a parent
and is stored in a var or variant property. It's visible to the GC, but the
only strong reference to it is through that var property. So when such an
object gets marked (it's without parent), we also have to mark the child
QObjects's JS wrappers (if existent), all recursively.

Change-Id: Ice347a37a841212c145b6d7a58216e449e5cce08
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoSet default font size to 10px as per spec, not 10pt.
Mitch Curtis [Thu, 13 Jun 2013 08:50:31 +0000 (10:50 +0200)]
Set default font size to 10px as per spec, not 10pt.

See: http://www.w3.org/TR/2dcontext/#dom-context-2d-font

Also removes duplicated assignments that are done as part of the
default constructor.

Task-number: QTBUG-31716

Change-Id: I5bd131c14a5defd422d858f02974c215de7adae9
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>