platform/upstream/qtdeclarative.git
11 years agoFix build on Android with -developer-build
Simon Hausmann [Fri, 11 Oct 2013 11:22:19 +0000 (13:22 +0200)]
Fix build on Android with -developer-build

That configuration implies -Werror for some kind of warnings. This patch fixes

   * Mix of different types in conditional (qv4isel_masm.cpp)
   * Noreturn function returning instead of calling another noreturn function at the end (qv4engine_cxxabi.cpp)
   * An out-of-line function being declared inline

Task-Number: QTBUG-33998
Change-Id: I3ba58dcadeac6774c5de63e6bb551354a2f23332
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoSupport statically linked module plugins
Richard Moe Gustavsen [Tue, 13 Aug 2013 12:16:26 +0000 (14:16 +0200)]
Support statically linked module plugins

Up til now, QQmlImports would always assume module plugins are
dynamically linked, and as such, go looking for them on the file
system. This would fail for plugins linked in statically.

This patch will hook into QQmlImports at the place where it
iterates through all plugins in a qmldir and try to load them
dynamically. If some plugins cannot be resolved, we now do an
extra interation over static plugins to check if any
of them has the correct uri specified in their metadata.

Hooking into the loading process this late, will ensure that as
much code as possible is shared between dynamic and static plugin loading
so that setting up base urls, namespaces and guards will remain the same.

Note: this patch is one out of several patches that is needed to build
QML2 apps statically, and depends on plugins reporting their URI
through the plugin meta data system. This will be injected
automatically by qmake+moc.

Task-number: QTBUG-28357
Change-Id: If9a204e942ca7003448e188a1a47eec69b34c37b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix and re-enable constantUpdateOnWindow test.
Gunnar Sletta [Thu, 10 Oct 2013 07:41:43 +0000 (09:41 +0200)]
Fix and re-enable constantUpdateOnWindow test.

Change-Id: I0015ea58bfd673352405642153a038b72d44aa37
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoUnskip test which now passes.
Gunnar Sletta [Mon, 7 Oct 2013 11:05:36 +0000 (13:05 +0200)]
Unskip test which now passes.

Change-Id: Ifccab1ef822a9bb455d442f6b13711887a399d6e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoProtect a few constructors against self destruction
Lars Knoll [Thu, 10 Oct 2013 17:52:49 +0000 (19:52 +0200)]
Protect a few constructors against self destruction

This gets most of qqmlecmascript to pass with aggressive and
exact garbage collection.

Change-Id: I93ecbfe55f62af68227cdf3b1ec2bd066f1cbdef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSmaller cleanups
Lars Knoll [Thu, 10 Oct 2013 14:17:28 +0000 (16:17 +0200)]
Smaller cleanups

Change-Id: I0a7eee96ef7c92ad4a3c5963010e3ac66fe6ed3a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove usage of String pointers where not required
Lars Knoll [Thu, 10 Oct 2013 10:21:12 +0000 (12:21 +0200)]
Remove usage of String pointers where not required

Change-Id: Ia533308a1641fab263d8faa8316455e8ade1c859
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMark strings stored in the lookups
Lars Knoll [Thu, 10 Oct 2013 09:29:19 +0000 (11:29 +0200)]
Mark strings stored in the lookups

Change-Id: I4cb72a3eee9f87305316137b0a1bfd4a003de840
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove more direct usages of Managed pointers
Lars Knoll [Mon, 7 Oct 2013 10:23:38 +0000 (12:23 +0200)]
Remove more direct usages of Managed pointers

Change-Id: I32f61b7919797eef51a8705695787175b76244c4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSmall optimisation for bit shift operations
Lars Knoll [Fri, 4 Oct 2013 19:31:34 +0000 (21:31 +0200)]
Small optimisation for bit shift operations

We don't need the right side of the shift operation as uint.
Converting it to int is cheaper and more then enough, as all
but the lowest 5 bits are ignored anyway.

Change-Id: I8833e6cc4e565b8bd1e35a22250e03a9b34938df
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix build on iOS
Simon Hausmann [Thu, 10 Oct 2013 18:53:32 +0000 (20:53 +0200)]
Fix build on iOS

On 32-bit ARM, iOS uses SJLJ for exceptions, which is probably why
_Unwind_Backtrace is not available (it's hard to implement reliably without
unwind tables). Don't use it there, we don't need it (because we can't JIT).

Task-Number: QTBUG-33979

Change-Id: Ifafbb59a32fd23c9b2e93228779535b2324ac4a3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
11 years agoAdd support for showing disassembled ARM JIT code
Simon Hausmann [Thu, 3 Oct 2013 11:03:18 +0000 (13:03 +0200)]
Add support for showing disassembled ARM JIT code

Ported the ARM disassembler from upstream trunk. QtQml needs to be configured
with qmake CONFIG+=disassembler and QV4_SHOW_ASM=1 enables the dump at
run-time.

Change-Id: Ia13a98835829fde0d3c5a795cb8f6ef9de951807
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoqdoc: Added excludedirs to qtquickdialogs.qdocconf
Martin Smith [Tue, 8 Oct 2013 13:56:44 +0000 (15:56 +0200)]
qdoc: Added excludedirs to qtquickdialogs.qdocconf

Added excludedirs += ../qml to qtquickdialogs.qdocconf.

Task-number: QTBUG-33966
Change-Id: I08a74061ed82301712239bc0979ed6fcea0a2448
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoV4 runtime: add some more counters.
Erik Verbruggen [Wed, 9 Oct 2013 08:47:11 +0000 (10:47 +0200)]
V4 runtime: add some more counters.

Change-Id: I872f259a9fd4580e8faeae664f4d34f59a785c4e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 JIT: ISel for bitwise or/xor.
Erik Verbruggen [Tue, 8 Oct 2013 08:48:57 +0000 (10:48 +0200)]
V4 JIT: ISel for bitwise or/xor.

Removes another 4mln calls when running v8-bench.js.

Change-Id: I7fd777e4e6303f989391c4d1e361277cc24b37e8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 JIT: generate some strict (not) equal conditions
Erik Verbruggen [Fri, 4 Oct 2013 14:06:16 +0000 (16:06 +0200)]
V4 JIT: generate some strict (not) equal conditions

Checks for strict (not) equal to null, undefined, or a boolean value
can be generated without reserving extra registers, or doing a call.

This reduces the amount of runtime calls from >25mln to ~6500 for
v8-bench.js

Change-Id: If08d1124b2869227654b1233a89833c5b5e7b40c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 JIT: do not generate inline fall-back code for strings types.
Erik Verbruggen [Fri, 4 Oct 2013 11:47:12 +0000 (13:47 +0200)]
V4 JIT: do not generate inline fall-back code for strings types.

Change-Id: I30ac6fcbc7d03f412ff03e87f2ecf61fd2617108
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4: Remove more jumps.
Erik Verbruggen [Fri, 4 Oct 2013 09:55:38 +0000 (11:55 +0200)]
V4: Remove more jumps.

Do not generate jump instructions when the target immediately follows
the current basic block, even if there are intermediate jumps in between
as long as they jump to the same basic block. In the IR snippet below,
no jumps will be generated at all.


L8:  goto L6;
L12: goto L6;
L6:  goto L4;
L11: goto L4;
L4:  goto L2;
L10: goto L2;
L2:  ….

Before this change, the gotos in L8, L6, and L2 were still generated.

Change-Id: I718ed0d41c603a6905f2279b782cd9e9cafb7d55
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoUse common prefix for environment variable
Kai Koehne [Mon, 7 Oct 2013 12:22:02 +0000 (14:22 +0200)]
Use common prefix for environment variable

Change-Id: Idbbdcad42106d30451000fc6593428a0bac4bc04
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
11 years agoBe explicit about precision specifiers.
Gunnar Sletta [Tue, 8 Oct 2013 06:54:38 +0000 (08:54 +0200)]
Be explicit about precision specifiers.

Task-number: QTBUG-33912
Change-Id: I4b6988e7385bcf9167e5f44d0bde7c80fbc1e117
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
11 years agoAll matrices in a batch need to be 2D safe when merging.
Gunnar Sletta [Mon, 7 Oct 2013 08:17:56 +0000 (10:17 +0200)]
All matrices in a batch need to be 2D safe when merging.

If we merge geometry nodes that make actual use of the
z-coordinate, this information becomes lost when merging
and the result is that we end up with an arbitrary
wrongfully applied transformation to the merged element.

Task-number: QTBUG-33897
Change-Id: I6129243e9bb890949023c35dc6b7bce30d31709a
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoSeveral smaller fixes to Animators.
Gunnar Sletta [Fri, 4 Oct 2013 13:42:35 +0000 (15:42 +0200)]
Several smaller fixes to Animators.

Backwards animations are not supported for animators as the
animation system cannot handle uncontrolled backwards animations.

Make sure we write back values only for the animators that have
run at all.

Clockwise rotation to 0 can easily end up on 360 as a result
the _q_interpolateClockwise function not being entirely correct.

Change-Id: If69b8555a1361f46600a40e80419b65438c18097
Reviewed-by: Michael Brasser <michael.brasser@live.com>
11 years agoDelay calculation of offline storage path as long as is practically possible.
Robin Burchell [Mon, 7 Oct 2013 23:23:15 +0000 (01:23 +0200)]
Delay calculation of offline storage path as long as is practically possible.

This avoids calculating it incorrectly in the case that something later clobbers
argv, such as a zygote or booster-type mechanism.

Change-Id: Ifab16c7c94e9ee3fded0dfda2266a12c910858ee
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
11 years agoFix qquickframebufferobject.h syncqt warning
J-P Nurmi [Mon, 7 Oct 2013 09:43:59 +0000 (11:43 +0200)]
Fix qquickframebufferobject.h syncqt warning

QtQuick: WARNING: qquickframebuffe robject.h includes QQuickItem when
it should include QtQuick/QQuickItem

Change-Id: Ia702bab8881ade601693cbee495b1dc6a5e14abb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoQStringRef has toInt(), so no need to create a new QString
Thiago Macieira [Fri, 4 Oct 2013 04:54:18 +0000 (21:54 -0700)]
QStringRef has toInt(), so no need to create a new QString

Saves up on memory allocations.

Change-Id: I0f7c82521b0b10085861fc62fed9b9d591169b5a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoReshuffle inlined functions to fix MinGW-warnings.
Friedemann Kleint [Fri, 4 Oct 2013 08:28:23 +0000 (10:28 +0200)]
Reshuffle inlined functions to fix MinGW-warnings.

When compiling QtQuick:

qv4value_p.h:80:17: warning: 'QV4::Managed* QV4::Value::asManaged() const'
redeclared without dllimport attribute after being referenced with dll
linkage
                 ^
qv4value_p.h:180:14: warning:
'static QV4::Value QV4::Value::fromManaged(QV4::Managed*)' redeclared
without dllimport attribute after being referenced with dll linkage
              ^
qv4value_p.h:285:16: warning:
'QV4::String* QV4::Value::asString() const' redeclared without dllimport
attribute after being referenced with dll linkage

Change-Id: I548a2f8049b8eca06ab1061f56416a332820dc01
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
11 years agoFix regression in pressDelay behavior.
Michael Brasser [Fri, 4 Oct 2013 02:14:08 +0000 (21:14 -0500)]
Fix regression in pressDelay behavior.

Don't deliver a press event when a Flickable is moved before
the pressDelay expires. This prevents delegates flickering
between pressed and unpressed states when beginning to
flick a Flickable.

Fixes regression introduced by
429af6244518172e19abf7fecd7112f26bac6b31/
d02131e743597b9bd3070d986c61a1c91ea8317a.

Task-number: QTBUG-31168
Change-Id: Id4e853fabe99000837df3681acd8fc4e76d2e9b3
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
11 years agoRespect DirtyForceUpdate in QSGBatchRenderer.
Gunnar Sletta [Fri, 4 Oct 2013 08:39:20 +0000 (10:39 +0200)]
Respect DirtyForceUpdate in QSGBatchRenderer.

There is a way this could have been done slightly more efficitently.
If we moved all "combined" logic out of the scene graph and into the
Node shadow tree, we could ignore the forceupdate all
together. However, this is a quite large change for what is currently
a non-common case. It would also increase overall memory consumption a
bit as we would have superfluous combined matrix and opacity in the
QSGNodes.

Task-number: QTBUG-33838
Change-Id: I06c486ace2be15bef1f1dc72a8b41cb649d7c813
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoV4 JIT: enable register allocator for linux/x86.
Erik Verbruggen [Wed, 25 Sep 2013 13:16:39 +0000 (15:16 +0200)]
V4 JIT: enable register allocator for linux/x86.

Change-Id: I9424838139a419beb2e207f168fc25c0c47c64e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoV4 JIT: fix visitRet for 32-bit architectures.
Erik Verbruggen [Wed, 25 Sep 2013 13:17:16 +0000 (15:17 +0200)]
V4 JIT: fix visitRet for 32-bit architectures.

Change-Id: I004fe8d5de0f5a932c23393ed06a04738b8e8bf1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoSignal no region descriptors follow the ETH table.
Petr Nejedly [Fri, 4 Oct 2013 05:18:54 +0000 (22:18 -0700)]
Signal no region descriptors follow the ETH table.

In our implementation, the 2-word EXIDX is directly followed
by a 3-word ETH for personality 2 unwind interpretter.
According to ARM EHABI 9.2, "region of interest" descriptors
should follow, finished by a single zero word.
As the generated functions don't have any such regions,
only the closing zero needs to be present.

Change-Id: I65fde548371cf12a31aac3e8829275965e034f3a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMake sure to markDirty the node from UniformAnimator.
Gunnar Sletta [Thu, 3 Oct 2013 07:01:51 +0000 (09:01 +0200)]
Make sure to markDirty the node from UniformAnimator.

Failure to do so will not repaint scene graphs which only
has changes from the animator.

Change-Id: Id420775d704df17379ca9b0eecd543fd3829fd00
Reviewed-by: Michael Brasser <michael.brasser@live.com>
11 years agoMake sure we apply the last transformation step.
Gunnar Sletta [Thu, 3 Oct 2013 06:52:39 +0000 (08:52 +0200)]
Make sure we apply the last transformation step.

Change-Id: Ie9b9a04cf41033bb475875f419b16ce91f6a477d
Reviewed-by: Michael Brasser <michael.brasser@live.com>
11 years agoMake transform and opacity animators work when layer.enabled: true
Gunnar Sletta [Thu, 3 Oct 2013 07:00:08 +0000 (09:00 +0200)]
Make transform and opacity animators work when layer.enabled: true

Change-Id: I6d9ece93a75782d524c211fc81a43f4311a38571
Reviewed-by: Michael Brasser <michael.brasser@live.com>
11 years agoRemane private QQuickAction into QQuickStateAction
Gabriel de Dietrich [Thu, 3 Oct 2013 15:04:40 +0000 (17:04 +0200)]
Remane private QQuickAction into QQuickStateAction

This avoid symbol conflicts when statically linking with Qt Quick
Controls, that has its own QQuickAction class and which may become
public some day. (QQuickPropertyAction might be a more apt name, but
it's already taken).

Change-Id: Ia9514d63d38295603a89d8ec5a88815a651380f7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoDon't print garbage or crash when using console.log
Jan Arve Saether [Wed, 2 Oct 2013 13:21:10 +0000 (15:21 +0200)]
Don't print garbage or crash when using console.log

The problem was that the ctor of QMessageLogger did not make a deep
copy of the source or the function. Since the QByteArray returned from
toUtf8() was only guaranteed to live within the statement it was used,
the pointers that QMessageLogger held would point to released memory as
soon as the QByteArray got destructed.

This could only be reproduced if the logging framework tried to print
the source file or the source function.
In my case, I had set this environment variable to provoke this:

  $env:QT_MESSAGE_PATTERN="%{file}(%{line}):%{message}"

Change-Id: I4ea4cf309c6c6420cef5bab0108a6cb2b2f9e841
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoA dynamically-created Window can have a parent Item and vice-versa
Shawn Rutledge [Tue, 1 Oct 2013 07:01:35 +0000 (09:01 +0200)]
A dynamically-created Window can have a parent Item and vice-versa

There can be a QML-declared Item which uses Component.createObject to
instantiate a Window; in that case the Window will be transient for
the window containing the Item.  There can also be a QML-declared
Window which uses Component.createObject to instantiate an Item;
in that case the Item's parent will be set to the Window's contentItem.

Task-number: QTBUG-33644
Change-Id: I0b1fe2e98c862c100e52bd5952788af3a727d25e
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoA dynamically created Window can have a parent Window
Shawn Rutledge [Tue, 1 Oct 2013 06:36:03 +0000 (08:36 +0200)]
A dynamically created Window can have a parent Window

So far the parent relationship has existed only for Items.  parent
is still not exposed as a property of Window, but since it was possible
to give a parent parameter to Component.createObject(), it makes
sense to try to interpret it as a Window in that case.  So now a
Window can be created with another Window as its parent just as an
Item can be created with a parent Item.

Task-number: QTBUG-33644
Change-Id: I796198a38bd47253eef462c80f5098825451c59c
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoInvalidate the bounding rects when the roots change.
Gunnar Sletta [Wed, 2 Oct 2013 10:58:42 +0000 (12:58 +0200)]
Invalidate the bounding rects when the roots change.

When roots change, matrices are updated in the nodes, so
we need to also invalidate the bounding rects for geometry
nodes.

Change-Id: I61f60ad069c3b1d018ce31c57310a1e5c4807684
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoRespect Qt.vector2d as input to ShaderEffect uniforms.
Gunnar Sletta [Tue, 1 Oct 2013 18:15:46 +0000 (20:15 +0200)]
Respect Qt.vector2d as input to ShaderEffect uniforms.

Change-Id: I7c24f822424d36cf16648d17df161f15083b0da5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoMark DirtySubtreeBlocked correctly from OpacityNode
Gunnar Sletta [Tue, 1 Oct 2013 07:11:54 +0000 (09:11 +0200)]
Mark DirtySubtreeBlocked correctly from OpacityNode

In the edgecase where the opacity was exactly the OPACITY_THRESHOLD
we would fail to mark the tree as dirty. This led to a crash
in the renderer.

Change-Id: I618910d0c792a215133598b6a87217be1f8729bc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoAnimator overview docs and example.
Gunnar Sletta [Mon, 30 Sep 2013 13:33:57 +0000 (15:33 +0200)]
Animator overview docs and example.

Change-Id: If0852e48dbbfea4fadca9c897ea0e62393763055
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoSeparate and fix 8/24-bit text mask materials.
Gunnar Sletta [Thu, 3 Oct 2013 11:16:10 +0000 (13:16 +0200)]
Separate and fix 8/24-bit text mask materials.

The logic was a bit cluttered, trying to handle two rather
different pieces of logic in one material shader. The 8-bit
shader does not try to be fancy in any way, it just takes the
alpha * color which gives similar intensities as the distance
fields. The logic for 24-bit contains a tiny fix for opacity.

The patch also includes a change from QColor -> QVector4D and
QPointF -> QVector2D to simplify the conversion needed and
be consistent with what kind of types we use.

Task-number: QTBUG-33805
Task-number: QTBUG-33633
Task-number: QTCREATORBUG-10176
Change-Id: Ia8c464f98a1fc2c190a1d323fc21466a4d7b0dfd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoRemove QSGContext's precompilation step.
Gunnar Sletta [Mon, 30 Sep 2013 11:18:10 +0000 (13:18 +0200)]
Remove QSGContext's precompilation step.

Materials are managed solely inside the renderer now, so these
are just wasting time.

Task-number: QTBUG-33456
Change-Id: Ie320df20b7971633c257b1bd3a218e7d70e52c3d
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
11 years agoEnable profiling of materials and atlas textures
Gunnar Sletta [Mon, 30 Sep 2013 11:19:30 +0000 (13:19 +0200)]
Enable profiling of materials and atlas textures

Task-number: QTBUG-33459

Change-Id: Ie9ea176fbb7ee46a128b4bf66a8f4475a5d4c90b
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
11 years agoGet lookups working (somehow) on ARM
Petr Nejedly [Tue, 1 Oct 2013 06:23:25 +0000 (23:23 -0700)]
Get lookups working (somehow) on ARM

Edit(Simon): This is a workaround for the register clash on ARM. r0
(ReturnValueRegister) is also used to pass the first argument, therefore we
can't use it as "temporary" register for the duration of the parameter setup.
Temporarily allocate r8 for now until we have constraints like these properly
propagated into the register allocator.

Change-Id: Iae266672856dea247b720367b8e8393333622e4e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoTemporarily disable libunwind exception throwing on Mac
Simon Hausmann [Wed, 2 Oct 2013 18:43:25 +0000 (20:43 +0200)]
Temporarily disable libunwind exception throwing on Mac

The run-time appears to have a slightly different behaviour wrt exception
ownership. We don't strictly need this code path on Mac, so use regular C++
exceptions until I can figure out what happens there.

Change-Id: Idd540c8656d25ffdb4002843f398114881e33214
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix backtrace generation on Android/ARM/QNX
Simon Hausmann [Tue, 1 Oct 2013 14:34:21 +0000 (16:34 +0200)]
Fix backtrace generation on Android/ARM/QNX

Use a GCC extension to the common C++ ABI's called _Unwind_Backtrace, which
generate backtraces if possible. Its direct use will ensure we use the
statically linked unwind, which knows about our unwind tables. This also helps
for the setup when libc doesn't have the glibc specific backtrace() function we
used previously. The unwinder on Mac OS X with clang also implements the same
extension.

Change-Id: I0b780590c10c16e50ec570f7da1efae2e64c46dd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoCleanup exception handling
Simon Hausmann [Tue, 1 Oct 2013 14:19:28 +0000 (16:19 +0200)]
Cleanup exception handling

The code in the Exception class operates entirely on the engine's data,
so move it into ExecutionEngine instead. This eliminates the need for
a QV4::Exception class and catches and old code that tries to still do
catch (Exception &) instead of catch (...)

Change-Id: Ie608bec6af652038aca6c9423c225a4d7eb13b39
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoChange v4 exceptions to use the common C++ ABIs foreign exceptions
Simon Hausmann [Tue, 1 Oct 2013 13:10:33 +0000 (15:10 +0200)]
Change v4 exceptions to use the common C++ ABIs foreign exceptions

On platforms where we use the common C++ ABI, throw the exception not using a
dummy C++ exception structure and the throw keyboard, but instead use the
lower-level _Unwind_RaiseException to throw a foreign exception.  It is caught
with the existing "catch (...)" and re-throw is implemented similarly, by
grabbing the current exception from the globals (a standardized data structure)
and re-throwing it.

On platforms such as ARM that lack hooks for supplying our unwind tables to the
system run-time, this patch will make it possible to link the unwinder
statically into libQtQml (libgcc or libunwind) and thus force it to use our
unwind tables, because throwing or re-throwing will always go through our
statically linked code through direct calls to _Unwind_RaiseException (instead
of libstdc++).

Change-Id: Ic2ac056fc7ed9e93fb51e30ab45f35b260487c5f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix warnings in tst_qquickaccessible.
Friedemann Kleint [Mon, 30 Sep 2013 13:58:05 +0000 (15:58 +0200)]
Fix warnings in tst_qquickaccessible.

tst_qquickaccessible.cpp: In function 'int verifyHierarchy(QAccessibleInterface*)':
tst_qquickaccessible.cpp:70:27: warning: variable 'middleChild' set but not used
tst_qquickaccessible.cpp: In function 'QAccessibleInterface*
topLevelChildAt(QAccessibleInterface*, int, int)': tst_qquickaccessible.cpp:325:46:
warning: suggest parentheses around assignment used as truth value.

Change-Id: I80f9a1e5438279add3671828a3145af2b1f2abf8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoForward-declare QV4::String in qqmlmetatype_p.h.
Friedemann Kleint [Mon, 30 Sep 2013 13:52:38 +0000 (15:52 +0200)]
Forward-declare QV4::String in qqmlmetatype_p.h.

Required for follow-up changes reordering inline functions for
MinGW as otherwise QV4::Value::isString() is reported as
used but not defined.

Change-Id: Ib07caa9eee667295ecc88f94ab8960b100cd084b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix warnings in tst_qquickaccessible.
Friedemann Kleint [Mon, 30 Sep 2013 13:58:05 +0000 (15:58 +0200)]
Fix warnings in tst_qquickaccessible.

tst_qquickaccessible.cpp: In function 'int verifyHierarchy(QAccessibleInterface*)':
tst_qquickaccessible.cpp:70:27: warning: variable 'middleChild' set but not used
tst_qquickaccessible.cpp: In function 'QAccessibleInterface*
topLevelChildAt(QAccessibleInterface*, int, int)': tst_qquickaccessible.cpp:325:46:
warning: suggest parentheses around assignment used as truth value.

Change-Id: I80f9a1e5438279add3671828a3145af2b1f2abf8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoForward-declare QV4::String in qqmlmetatype_p.h.
Friedemann Kleint [Mon, 30 Sep 2013 13:52:38 +0000 (15:52 +0200)]
Forward-declare QV4::String in qqmlmetatype_p.h.

Required for follow-up changes reordering inline functions for
MinGW as otherwise QV4::Value::isString() is reported as
used but not defined.

Change-Id: Ib07caa9eee667295ecc88f94ab8960b100cd084b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMark DirtySubtreeBlocked correctly from OpacityNode
Gunnar Sletta [Tue, 1 Oct 2013 07:11:54 +0000 (09:11 +0200)]
Mark DirtySubtreeBlocked correctly from OpacityNode

In the edgecase where the opacity was exactly the OPACITY_THRESHOLD
we would fail to mark the tree as dirty. This led to a crash
in the renderer.

Change-Id: I618910d0c792a215133598b6a87217be1f8729bc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoForward-declare QV4::String in qqmlmetatype_p.h.
Friedemann Kleint [Mon, 30 Sep 2013 13:52:38 +0000 (15:52 +0200)]
Forward-declare QV4::String in qqmlmetatype_p.h.

Required for follow-up changes reordering inline functions for
MinGW as otherwise QV4::Value::isString() is reported as
used but not defined.

Change-Id: Ib07caa9eee667295ecc88f94ab8960b100cd084b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMark DirtySubtreeBlocked correctly from OpacityNode
Gunnar Sletta [Tue, 1 Oct 2013 07:11:54 +0000 (09:11 +0200)]
Mark DirtySubtreeBlocked correctly from OpacityNode

In the edgecase where the opacity was exactly the OPACITY_THRESHOLD
we would fail to mark the tree as dirty. This led to a crash
in the renderer.

Change-Id: I618910d0c792a215133598b6a87217be1f8729bc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoRespect Qt.vector2d as input to ShaderEffect uniforms.
Gunnar Sletta [Tue, 1 Oct 2013 18:15:46 +0000 (20:15 +0200)]
Respect Qt.vector2d as input to ShaderEffect uniforms.

Change-Id: I7c24f822424d36cf16648d17df161f15083b0da5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoUse a QVector instead of a QList
Lars Knoll [Wed, 2 Oct 2013 13:14:45 +0000 (15:14 +0200)]
Use a QVector instead of a QList

This makes the code go quite a bit faster (saves ~7-8% of the
total amount of instructions executed when running crypto.js

Change-Id: I6b3bd08eca98b45593262e2fc6e0ce5056257e76
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoV4 JIT: implement convertUInt32ToDouble on ARMv7.
Erik Verbruggen [Tue, 1 Oct 2013 12:53:05 +0000 (14:53 +0200)]
V4 JIT: implement convertUInt32ToDouble on ARMv7.

Change-Id: I11caf07a8776bb2c6527639f22d47103f4ca1cef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 IR: fix dead-code elimination.
Erik Verbruggen [Tue, 1 Oct 2013 11:12:52 +0000 (13:12 +0200)]
V4 IR: fix dead-code elimination.

Change-Id: If00a108fb107d331478dd36ad7feae4c4521c2ae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4: invert conditions when the true block follows the test.
Erik Verbruggen [Wed, 2 Oct 2013 12:41:35 +0000 (14:41 +0200)]
V4: invert conditions when the true block follows the test.

Change-Id: I5044acd4263b71734e4eb5d7e74b1a4a8414741e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoChange exception handling API
Simon Hausmann [Wed, 11 Sep 2013 11:23:21 +0000 (13:23 +0200)]
Change exception handling API

This patch changes the exception handling API in the engine slightly, encapsulating
any use of direct throw statements and catch blocks with concrete types. In the future
we need to be able to change the way these are implemented, in order to ensure that
the correct stack unwinding code is triggered for throw and re-throw.

This patch separates the C++ exception object thrown from the V4 exception
(that includes value, throwing context pointer) and stores the latter inside
the engine.

In order for that to compile, ExecutionEngine::StackTrace and StackFrame had to
move into the QV4 namespace directly.

In addition the syntax for catching exceptions changes from

try {
    ...
} catch (QV4::Exception &ex) {
    ex.accept(context);
    QV4::ScopedValue exceptionValue(scope, ex.value());
}

to

try {
    ...
} catch (...) {
    QV4::ScopedValue exception(scope, context->catchException());
}

Context::catchException() checks if there's a "current" exception in the engine,
and if not assumes that we caught an unrelated exception and consequently re-throws.

partiallyUnwind() is also gone and replaced with rethrowException(), in order to
encapsulate the re-throw.

Lastly, in the future nesting try/catch blocks isn't going to be possible due to
limitations in the common C++ ABI with regards to foreign exceptions.

Change-Id: Ic81c75b057a2147e3176d8e0b4d326c14278b47d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoCleanup API of Safe<T>
Lars Knoll [Tue, 1 Oct 2013 14:11:55 +0000 (16:11 +0200)]
Cleanup API of Safe<T>

Don't have an implicit cast operator to Returned<T>
anymore, and return a T* from the operator->()

Change-Id: If4165071b986bfc84a157560d94d39c2dcfbc9e1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse SafeValue instead of Value in ScopedValue methods
Lars Knoll [Mon, 30 Sep 2013 20:41:12 +0000 (22:41 +0200)]
Use SafeValue instead of Value in ScopedValue methods

Change-Id: Ie463efe600d498ce77d4b9e8b48abcfd61c1ab78
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove some more uses of QV4::Value
Lars Knoll [Mon, 30 Sep 2013 18:57:57 +0000 (20:57 +0200)]
Remove some more uses of QV4::Value

All remaining uses should be GC safe now.

Change-Id: I05c962de6ab896f108f70caa1bf937a24e67bfe1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove more uses of Value
Lars Knoll [Mon, 30 Sep 2013 13:41:24 +0000 (15:41 +0200)]
Remove more uses of Value

Change-Id: I889e760f75b485a28e1f2a2c26b2337ae9bfafac
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix ObjectIterator API to be GC safe
Lars Knoll [Mon, 30 Sep 2013 11:48:05 +0000 (13:48 +0200)]
Fix ObjectIterator API to be GC safe

Change-Id: I3a9c48d53d8dbadcb9b32c00fcef1f89447c4b8c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDon't create a ValueRef to a temporary
Lars Knoll [Wed, 2 Oct 2013 06:13:58 +0000 (08:13 +0200)]
Don't create a ValueRef to a temporary

Change-Id: I6d7fbcee594298517b880e4b0fac9df1f9e54d61
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoAlways call callCompleted in QQmlDataBlob::tryDone
Albert Astals Cid [Thu, 26 Sep 2013 08:56:03 +0000 (10:56 +0200)]
Always call callCompleted in QQmlDataBlob::tryDone

We need this since it could happen that in QQmlComponentPrivate::loadUrl we did
  QQmlTypeData *data = QQmlEnginePrivate::get(engine)->typeLoader.getType(url, loaderMode);
and got a sync QQmlTypeData even if we asked for async, and thus the async loader was never notified
when it finished and we were never loaded.

Situation in which this can happen is:
 * ListView with an async Loader as delegate
 * Loader loads two items A and B, while A is a B
 * Item 0 of the ListView triggers an async loading of A that triggers the sync loading of B
 * Item 1 of the ListView triggers an async loading of B
 * Since B is already being loaded (though in sync), we just add ourselves to the people that want to be notified
 * sync loading of B is done and QQmlDataBlob::tryDone does not call the callbacks because it's sync
 * Item 1 is never finished loading

Change-Id: I52a0979a1d3cfcfe73a71196bf24f491d6cf8e9a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoV4 IR: fix type inference.
Erik Verbruggen [Tue, 1 Oct 2013 15:44:54 +0000 (17:44 +0200)]
V4 IR: fix type inference.

When a phi-node couldn't be fully typed (e.g., when one of the temps
was not yet typed), VarType was assumed. When a circular dependency
between two phi-nodes occurred, like with a condition inside a loop,
then depending on the ordering of the work-list, the two phi-nodes
could start oscillating between VarType and the correct type.

The fix is to check if one of the temps is not fully typed, and if so,
assume whatever we currently have as the result and have the statement
re-scheduled. Full typing will occur when the temp with the missing
type information is typed.

Change-Id: I950d81fe7fa8272cb37f7eea5b88092d1eb4817e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoDon't delete scene-graph atlas manager if it hasn't been created yet
Tor Arne Vestbø [Tue, 1 Oct 2013 13:35:16 +0000 (15:35 +0200)]
Don't delete scene-graph atlas manager if it hasn't been created yet

QSGContext::invalidate() is called from the QSGContext destructor,
but the atlas manager is only created if QSGContext::initialize()
is called, which may not always happen.

The result was a bunch of "QCoreApplication::postEvent: Unexpected
null receiver" messages during testing.

Change-Id: I11a294d48c06d687a9f82cf1ce825063cda8ecf6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoStabilize tst_qqmlprofilerservice
Gunnar Sletta [Tue, 1 Oct 2013 10:08:39 +0000 (12:08 +0200)]
Stabilize tst_qqmlprofilerservice

Change-Id: Ia381d51561f1c183ec7f2e3fcfe49810bfbfcc61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoqdoc: no longer recognizes the version nr in QML refs
Martin Smith [Tue, 1 Oct 2013 11:03:28 +0000 (13:03 +0200)]
qdoc: no longer recognizes the version nr in QML refs

All QML references of the form
<QML-module-name><QML-module-version>::<QML-type>::<member-name> have
had the <QML-module-version> removed i.

Task-number: QTBUG-33776
Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoAdd fine-grained QML / QtQuick performance benchmarks
Chris Adams [Wed, 17 Apr 2013 01:27:17 +0000 (11:27 +1000)]
Add fine-grained QML / QtQuick performance benchmarks

This commit adds a series of benchmarks to test the performance of
fundamental areas of the QML engine (compilation, instantiation, binding
evaluation, positioning) using types provided by the QtQuick QML module.

Change-Id: Iecec058c45aea0bd728f03123fa2aa79d6af8efa
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
11 years agoFix compilation on Android with 4.8 toolchain
Laszlo Agocs [Tue, 1 Oct 2013 08:14:54 +0000 (10:14 +0200)]
Fix compilation on Android with 4.8 toolchain

Change-Id: I1ce4ec8c9c671f0130c1530c772c1dd74f1fb1f4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoV4: fix ArrayPrototype::method_isArray() build break
J-P Nurmi [Tue, 1 Oct 2013 07:55:50 +0000 (09:55 +0200)]
V4: fix ArrayPrototype::method_isArray() build break

With a recent Clang in C++11 mode:
error: incompatible operand types ('QV4::ArrayObject *' and 'bool')

Task-number: QTBUG-33706
Change-Id: I7bd4fe01176745fb6f8dbdf8f271edb7121eb35e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix PathView stealing mouse grab from its child items.
Andrew den Exter [Fri, 27 Sep 2013 04:26:48 +0000 (14:26 +1000)]
Fix PathView stealing mouse grab from its child items.

Apply the improvements that have been applied to Flickables handling of
child items over time to PathView to bring its behavior back in line.

Task-number: QTBUG-33699
Change-Id: I76a412d75c48f9cf2f12f5f6f1aa01ff62d06364
Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoFix invalid alias error reporting in new compiler
Simon Hausmann [Mon, 30 Sep 2013 07:41:35 +0000 (09:41 +0200)]
Fix invalid alias error reporting in new compiler

Match exactly the VME code path by reporting the right type of error
as well as the right hand side of the alias binding if necessary.

Change-Id: I35d192a20641e0acbf25d20f3dc5fb53cc7cbae5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoImprove error location reporting for invalid aliases in old VME
Simon Hausmann [Mon, 30 Sep 2013 06:56:29 +0000 (08:56 +0200)]
Improve error location reporting for invalid aliases in old VME

When an alias declaration is missing a location, report the error with the
location of the alias declaration, not the object declaration.  This matches
the code patch in the new compiler, which also reports it accurately.

Change-Id: I709dbddb3273f4e05cc4d63079da52d7224466bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix error message for group property definitions on signals in new compiler
Simon Hausmann [Mon, 30 Sep 2013 06:46:45 +0000 (08:46 +0200)]
Fix error message for group property definitions on signals in new compiler

It may happen that people forget the colon after the handler name in

    onSomeSignal { code here }

and we have to print out the correct error message. It looks like a
group property, but we can identify this binding due to its reserved
use of starting with "on".

Change-Id: I7c502c1a2a5f2a6c613879468a60bc57a7d20fe8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoImprove component boundary detect in new compiler
Simon Hausmann [Mon, 30 Sep 2013 06:38:55 +0000 (08:38 +0200)]
Improve component boundary detect in new compiler

Instead of going through the property cache and the potential creation
of a dynamic meta object to determine inequality with QQmlComponent::staticMetaObject,
we can simply use the QQmlType and its know metaObject directly to perform
the check. That's faster and more reliably.

Change-Id: If6484b059ec2bed234009755adf2fa3aa19b2b9f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix error messages when assigning to non-existent properties in new compiler
Simon Hausmann [Mon, 30 Sep 2013 06:37:37 +0000 (08:37 +0200)]
Fix error messages when assigning to non-existent properties in new compiler

Introduce a simple valdator pass early on to catch those assignments. Also
fix storing the correct line/col for default property object bindings and
remember the minor/major version of an import in the final type reference.

Change-Id: Ib2a93dfe1a30fcd9c09b5443fb8199ad11b19769
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix line/column in import related error messages with the new compiler
Simon Hausmann [Mon, 30 Sep 2013 04:36:35 +0000 (06:36 +0200)]
Fix line/column in import related error messages with the new compiler

Grab the line/column from the import token, not the import id token,
as the latter is not always present in all import statements.

Change-Id: Iaa0c2f1d60422fb779fa7a6c4fd1c895fa3f777b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix composite type registration in the new compiler
Simon Hausmann [Mon, 30 Sep 2013 03:52:31 +0000 (05:52 +0200)]
Fix composite type registration in the new compiler

When setting a property of a composite type like this

    property MyType foo: MyType {}

and MyType.qml defines the new type, we test for assignability of MyType to the
property foo. This test happens before MyType is instantiated and it relies on
the meta-type in the CompiledData being set. Therefore this patch makes sure
that the meta-type and the list meta-type are set accordingly at type
compilation time, not instantiation time, similar to how it's done in the VME.

Change-Id: Id7231e0a0113fa63ba6508bfbb1565dd554c5e56
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix JS script imports with namespaces
Simon Hausmann [Mon, 30 Sep 2013 03:11:47 +0000 (05:11 +0200)]
Fix JS script imports with namespaces

Make sure to add the resolved namespaces to the import cache, before later
adding scripts into it.

Change-Id: I41537230c49248c2e6c60623bc5a1fe3d50d76cd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix support for JS imports in QML files in the new compiler
Simon Hausmann [Mon, 30 Sep 2013 01:28:47 +0000 (03:28 +0200)]
Fix support for JS imports in QML files in the new compiler

Remove the v4 value initialization for imported scripts code out of the VME
(the method didn't even need any members of the VME class) and into ScriptData,
for re-use on the QmlObjectCreator side.

Also add the script index setup for the import cache (used by qml context
wrapper) to the type loader.

Change-Id: Idc3953a48f6fb66d008008e88a2b9b556c775537
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoCompile imported scripts in the loader thread
Simon Hausmann [Sun, 29 Sep 2013 19:20:09 +0000 (21:20 +0200)]
Compile imported scripts in the loader thread

This has the benefit of blocking the GUI thread less and speeding up type
creation in the GUI thread (for types that import js libraries).

This patch also brings one behavioral change: Due to the parsing at type
instantiation type, things like syntax errors for script imports would only
generate a run-time warning and the code in the QML file would just see
"undefined". Errors in the script now generate real errors at component
compilation time, meaning the errors come out earlier and as real errors.

This patch implements the separation for the VME only (to keep the size
of this patch small).

Change-Id: I82f7f3a2d3d4524ea12a7ab62abd8640aba6a47f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4 IR: do type inference/propagation before optimization.
Erik Verbruggen [Fri, 27 Sep 2013 16:44:09 +0000 (18:44 +0200)]
V4 IR: do type inference/propagation before optimization.

This gives slightly better results for inplace increment/decrement,
where the operand has to be converted to a number. When that operand is
known to be a number, this conversion can be removed. By doing the
optimizations after typing, these conversions will not only turn into
assignments, but they will be propagated through the IR. That saves
a copy/move, which, in turn, will lighten the work for the register
allocator and the instruction selection.

Change-Id: If76575a71fbcb2d810b94060e61b4364bdaaa065
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4: remove inplace operations
Erik Verbruggen [Thu, 26 Sep 2013 12:49:44 +0000 (14:49 +0200)]
V4: remove inplace operations

Inplace operations are expanded when building the IR, so the neither the
IR, nor the instruction selection backends or runtime need to handle
them.

Change-Id: Id01f9544e137dd52364cf2ed2c10931c31ddfff3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoV4: changed environment variable SHOW_CODE.
Erik Verbruggen [Thu, 26 Sep 2013 08:25:22 +0000 (10:25 +0200)]
V4: changed environment variable SHOW_CODE.

Use QV4_SHOW_ASM for the generated assembly from the JIT, and use
QV4_SHOW_IR to get dumps of the IR.

Change-Id: Id85d3d6c87b47088c312475a7c737d54c58c7791
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix license headers of QtQuick sources.
Gunnar Sletta [Mon, 30 Sep 2013 05:28:31 +0000 (07:28 +0200)]
Fix license headers of QtQuick sources.

Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRemove debug output from tst_qqmlprofilerservice.
Gunnar Sletta [Mon, 30 Sep 2013 05:50:33 +0000 (07:50 +0200)]
Remove debug output from tst_qqmlprofilerservice.

I suspect this got snuck in accidentally.

Change-Id: I4684bf333a19e6c760ea499b751d51be34f51c6f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRemove some uses of raw Object pointers
Lars Knoll [Fri, 27 Sep 2013 15:04:42 +0000 (17:04 +0200)]
Remove some uses of raw Object pointers

Change-Id: I7c715f33d197ebbf6f0c00040099b27ed7221d42
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoremove more uses of QV4::Value
Lars Knoll [Fri, 27 Sep 2013 14:15:38 +0000 (16:15 +0200)]
remove more uses of QV4::Value

Change-Id: I11b0b2b7626297e2c98dc77784574da4b59ba8cf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove most uses of Value from qml/qml
Lars Knoll [Fri, 27 Sep 2013 07:45:55 +0000 (09:45 +0200)]
Remove most uses of Value from qml/qml

Change-Id: I409a8505a9e01f86d777bc694d24516d1c8f0c4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove some more QV4::Value usages
Lars Knoll [Fri, 27 Sep 2013 06:32:44 +0000 (08:32 +0200)]
Remove some more QV4::Value usages

Change-Id: Ic146a964f2ff6b90eeceda90bf1834d7212386a5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove more occurrences of QV4::Value
Lars Knoll [Thu, 26 Sep 2013 20:07:27 +0000 (22:07 +0200)]
Remove more occurrences of QV4::Value

Change-Id: I66c370680d7e6bee2e73a7a940aa96ab4009ec57
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix colorization of native rendered text...
Gunnar Sletta [Fri, 27 Sep 2013 13:31:12 +0000 (15:31 +0200)]
Fix colorization of native rendered text...

Task-number: QTBUG-33633

Change-Id: Ic7fabe36887fc19e28286ae6f4eb2f22b4211b4f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoV4 regalloc: fix the case where too few regs are available.
Erik Verbruggen [Wed, 25 Sep 2013 10:11:14 +0000 (12:11 +0200)]
V4 regalloc: fix the case where too few regs are available.

When all registers are allocated, and a new range gets active, some
other range will have to be split and spilled to the stack. This gets
slightly more complicated when the temporary is defined by a phi-node,
so in that case, the temporary is immediately spilled.

Change-Id: Iaab8b8e88849866e5841ae752377796e8540e30f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>