Fix warning from clang.

items/qquicktext.cpp:2160:49: warning: '&&' within '||' [-Wlogical-op-parentheses]
            || vAlign() != QQuickText::AlignTop && heightChanged) {
            ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
items/qquicktext.cpp:2160:49: note: place parentheses around the '&&' expression to silence this warning
            || vAlign() != QQuickText::AlignTop && heightChanged) {
                                                ^
               (                                                )

Change-Id: Id4bc18642228e7fad6d674bbcdf623446bb6a00f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QNX-specific implementation of the stack base retrieval.

The garbage collector needs the top of the stack.
On QNX, every thread has the TLS structure at the top
of the stack, then the stack extends below this TLS structure
This is the easiest and fastest way resolve the stack base
of the current thread.

Change-Id: I9cc9592928298d06aeaee0f6110d61bf3cf68e49
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Get rid of the signal expression rewriter

This replaces the entire rewriter with more or less:

expressionToEval = "(function(<named params here>) { " + expr + " } )"

This also fixes crashes at run-time when the signal rewriter was
executed from the loader thread and tried to use a v4 identifier
hash with the same engine that's also in the main thread.

Change-Id: Ib1e4927d330706a593411fbff64ed3da1e23d0e0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Cleanup: Remove unnecessary use of ReturnValueRegister

Change-Id: Ic159fa8dcbce3d51db0b39d1cb22d01f9a94e15a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
JIT: support WIN64

Change-Id: Id657831231ddec66f7d41f32aaac22a71c4c1673
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I15cb7460171b38d11d66367aeb0831ec6e3ca933
Add lifetime interval calculation.

This is used in the interpreter to do stack-slot allocation.

Change-Id: I9f4df8fdca35889f4b1154dbbe7d68b579886e18
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Fix Qt.application.xxx notifier signals

QCoreApplication now provides change notifications.

Change-Id: Icd7e1247426f4b5ad124d6d9b72a2ba99225ee08
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Fix regression in tst_qqmlecmascript::signalAssignment

Detect errors in the signal declaration already at compile time, re-introducing
the earlier code in qqmlcompiler.cpp that checked that. This also means that
the parameter string construction can be done once for each signal and not for
each handler.

Change-Id: Icf6242a793939466bbc44d43bf041281164ad1b6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix failing GC related tests with gcc in release builds

Our conservative collector might is more likely to find old pointers
to QV4::Objects on the C stack in release builds, when gcc optimizes out
stores that seem unnecessary. These two tests are prone to that due to
temporary QV4::Values potentially ending up on the stack on x86,
because vmeProperty returns then through an invisible first argument that
is a pointer a a location on the stack.

This patch makes those temporaries explicit, clears them out after
usages and adds GCC pragmas to disable optimizations for these two
test functions.

Change-Id: Ie43841e869346792296911fee6fed80c745faeff
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix crashes in tst_qquickvisualdatamodel

Don't try to set the name string pointer of FunctionObject
to itself for these two FunctionObject subclasses.

Change-Id: I4e5a1963ffefd4ce96308022c251a4bdba54dc1e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Rename V4IR::InstructionSelection to V4IR::IRDecoder.

Now it can be used by classes that want to walk the IR but do not
generate instructions, without causing confusion.

Change-Id: Idb220a1aee3ba2bbcd43bdeecd28946d567c9f3c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Introduce PhysicalRegister and StackSlot Temps.

Change-Id: I8d0b6a1e85fd0c42772f294fd13bc6041d41c81e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Get rid of the first half of QQmlGuard usage

QQmlGuard was being used as a more performant replacement
for QPointer. QPointer got now fixed in Qt 5.0, making this
class obsolete.

Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Follow-up to previous commit about forcing thumb builds:

Disable the checks of the thumb bit in code pointers when building for Android,
because we want to allow for intermixing of thumb (what the JIT generates) and
arm code (what the compiler generates for run-time functions we call, in debug
builds)

Change-Id: I0bcce4015d18db4e38244a1d1ad89413b3f17152
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix JIT selection on Android with ARM builds

Debug builds on Android are done as ARM builds instead of thumb because of
problems with debugging thumb builds with older toolchains. However for the JIT
we're not interested in such a choice and prefer to have a consistent choice of
JIT - thumb2 generated code in release _and_ debug builds.

Change-Id: I36b1ec76311b409e36e3fb38c46c6c193adb1be8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Added ApplicationStateChangeEvent handling to QQuickApplication.

Change-Id: I8b8965bc36b483be7287abf4485221f428a0b92a
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
QtDeclarative: Removing parallel_test from config

tst_qquickvisualdatamodel and tst_qquickpositioners have been failing
recently on CI. One can't reproduce the failures locally unless
running the tests parallel, like CI does.

Task-number: QTQAINFRA-705
Change-Id: I09a9123d045f2213af915518917ce622b33b27ba
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Don't assume that the last step of the XPath is an element name

In order to find the number of items in the model, the model did a
second query on the document representing the result set.
So, suppose the user queried for //a/b/c, the result set would contain
all the 'c' elements from the input document.
In order to find the number of items in the result set, it did a second
query with the expression  "count(/dummy:items/c)", where 'c' was
extracted from the last step in the original XPath expression

For simple expressions, this worked fine.

However, if the last step had a predicate such as "//c/parent::b" it
didn't work.

The solution is to not filter *again* the last step when we query for
the count, since we know that all result items are direct children of
"dummy:items", and instead just execute the query
"count(dummy::items/*)".

This should also potentially improve performance.

Task-number: QTBUG-17588
Change-Id: Ib2fdf1ec8b91022df0597e089ad34d34b04428b0
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev