V4 JIT: generate code for unary not operator.

Change-Id: I00a47d261a76db0b938f8c9300be9afc06b42d02
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4: re-enable SSA transformation and optimization.

But keep the register allocator disabled for now.

Change-Id: I475835ec35ef31d76e084788a754c00b1f8fdda6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 JIT: fixes after NaN boxing changes.

Change-Id: I22a1b46f488dc65513ed287dabe7d85469cc5173
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4: fix move mapping

When resolving conflicting register use between basic blocks, only
insert the resolving moves into the successor when it has one incoming
edge. Because of the absence of critical edges, this implies that it is
also save to insert those moves into the predecessor block if there is
more than one incoming edge (the predecessor will only have one outgoing
edge).

Change-Id: I83c41b4ca86946d3aa09619f20ddab3e692136f2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 regalloc: fix intersection calculation.

The previous version was plain wrong: when the first interval had more
than one range, those ranges would never be checked for intersection.

This version iterates over all ranges in the first interval, and returns
the index of the first range in the second interval that overlaps with
that range. Iterating over the second interval is cut off when an
interval is found that starts after the current one end (the ranges of
both intervals are sorted).

Change-Id: I87c254a645164eb6639925c2e3b7fd7c1b1bfa0a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4: enable register allocator on linux and macos on x86_64.

Change-Id: I958cf90da5c44b0119c5666df6ed2e4820444841
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 SSA: change life-time interval coverage calculation.

When iterating over the ranges in a life-time interval, stop when the
range starts after the position to check.

Change-Id: Ib64cbfc644820fdb4c0167b8db0b40dacfb5d076
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 SSA: cleanup: rename single letter variables.

Because "targetTemp" and "sourceTemp" is clearer than, say, t1 and t2.

Change-Id: I5195c75f1958a3bea3c370924685ff6ba9c9c515
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qml: handle all possible QtMsgType in switch because of -Werror

Perhaps this illustrates why having -Werror is more of an annoyance
than whatever it was supposed to help:
https://codereview.qt-project.org/#change,65253 cannot be merged
until the new enum value that it adds is handled _everywhere_ that
it can be.

Change-Id: I2bba730b471683487e38693c9ace2d09be4c874d
Reviewed-by: hjk <hjk121@nokiamail.com>
Fix warnings about includes.

QtQml: WARNING: qtdeclarative/src/qml/qml/qqmlabstracturlinterceptor.h
QtQml: WARNING: qtdeclarative/src/qml/qml/qqmlfileselector.h
includes qtqmlglobal.h when it should include QtQml/qtqmlglobal.h

Change-Id: I1cc4e3a201e0f3bec34c5e4bca8ec1578c8b0224
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Fix setting the id property when also present in the type itself

Fixes tst_qqmllanguage::idProperty

Change-Id: I3051da6a55f29bfca58aa83647fe5d51fb2a67e0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix bindings on properties in grouped value type properties

... such as
    point.x: { someExpression }

This requires special handling to install the QQmlBinding not on the
value type itself (not possible) but on the point property itself.

Fixes tst_qqmllanguage::valueTypes

Change-Id: I8f95379e1872dff7cdcc0480c229a5e68f3cf575
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix assigning composite type object literals to object properties

When doing the assignability test, pick the property cache from our
property caches for the created sub object and only otherwise fall
back to the regular engine cache.

Change-Id: I07b9746335a9a169e1055a3f4dc7fd3f0ab0fdef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix bug in assigning to self-declared properties in child object literals

When createInstance() calls populateInstance, make sure that the QObject
used for bindings is the instance we just created, not the _qobject from
the caller side (which is completely wrong and unrelated).

Change-Id: I7dc44ffaa70799b2f37258aeacdb33d8a1cf8c48
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix component boundary detection

For a component boundary, the type in question has to be an actual
QQmlComponent. If it's a type that itself is derived from a component (type ==
0 && component != 0 in typereference), then it is not a boundary.

Fixes tst_qqmllanguage::componentCompositeType

Change-Id: I938abe94c2fa4c69788176235ac74d0c6e385c0c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix lookup scopes into the context object

Given

QtObject {
     property int value: 42
     property var o: QtObject {
         Component.onCompleted: print(value)
     }
}

Should print 42 - the lookup for "value" should fail in the
scope object (o) and succeed in the context object.

Fixes part of tst_qqmllanguage::onCompleted

Change-Id: If48d6a780aa0f3cb4a7757694f93359e57757973
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix Component.onCompleted emission and bindings for composite types

When instantiating the composite type with a sub QQmlObjectCreator,
make sure to link the componentAttached objects back into the parent
creator. Similarly we need to collect the bindings the sub-creator
created, as finalize() is only called on the top-level creator.

Fixes remaining failures in tst_qqmllanguage::onCompleted

Change-Id: If79b31ee94000aeec280284200df8ee97e57fd03
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
wince: Build fix, NtCurrentTeb() is not available in this platform.

This was copied from qtscript's:
src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp

Change-Id: Iaa5549e6915aa4aa4bf532fbe7c9117a0858ff02
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Doc: Made \since command in Dialog QML types consistent.

-QDoc only requires the version number for Qt versions

Task-number: QTBUG-32172
Change-Id: Ifa3a94fa66194807d58b079b4f451af90cc1d00a
Reviewed-by: Martin Smith <martin.smith@digia.com>
Doc: Made Qt Quick items' \since consistent.

Qt 5.2:
-"\since QtQuick 2.2" -> "\since 5.2"

Qt 5.1:
-"\since QtQuick 2.1" -> "\since 5.1"
-"\since Qt 5.1" -> "\since 5.1"

Qt 5.0:
-"\since QtQuick 2.0" -> "\since 5.0"

Task-number: QTBUG-32172
Change-Id: I699b00b31373a434ddb8f4caccfef40c588bf8a4
Reviewed-by: Martin Smith <martin.smith@digia.com>