| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This happens when trying to search for implicit component definitions,
which only makes sense if we have a property cache.
Task-number: QTBUG-38466
Change-Id: I788159453efc24bcda1b9709a1933b49fd54d6a7
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is among other things needed to fix the qml import scanner to detect
dependencies from .js files correctly.
The patch also fixes the use of Q_QML_EXPORT towards Q_QML_PRIVATE_EXPORT
where appropriate and corrects the wrong include path for the double conversion
code to actually be relative to the file it is included from. This worked by
accident because of other include paths present in the build.
Change-Id: I338583dad2f76300819af8ab0dae8e5724c84430
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the argument is neither a temporary nor a constant, slot isn't
initialized. So don't try to add it.
qqmltypecompiler.cpp:2548:36: error: variable 'slot' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
qqmltypecompiler.cpp:2553:36: note: uninitialized use occurs here
_functionParameters.append(slot);
^~~~
Change-Id: I5a538bfa0ef1fbbd00e23dfd6e15c404359c7c46
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that object creation is done in nested function calls we can
use an RAII-type profiler to trace it. This makes the profiling
much simpler and more robust.
Also, the stack of profiling data in the VME profiler has to match
the stack of completion callbacks in the VME, so the push and pop
operations are synchronized now.
Task-number: QTBUG-37978
Change-Id: I1bc5e0665b88e5b3772e48c8676cdda3fae59e1b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Don't store the string of binding scripts in the compiled data. The only
exception to the rule are properties of type QQmlScriptString as well as types
with custom parsers.
Change-Id: I7f53262bf957b442bac4db71d0a2c0bed74a9b54
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The right hand side of script string properties can be evaluated in entirely
dynamic scopes, due to QQmlExpressions' public API of allowing construction
from a QQmlScriptString and a variable scope/context. Nevertheless we should
compile these bindings at type compile time, as long as we make sure that the
compiled code doesn't try to do any compile time determined property lookups
and type resolution. This is implemented using a separate compilation pass
that ensures the disableAcceleratedLookups flag is set.
A few minor cleanups come with this patch:
* Ensure that the property caches array is always symmetric to the list of
compiled QML objects, as that allows the use of at() instead of value().
* The code for creating a QML callable function object for a given run-time
function is now centralized in a static function QmlBindingWrapper, used
for script strings and bindings from custom parsers.
The provided unit test verifies the successful execution of the same script
string with two different scope objects.
Change-Id: Ica2cea46dd9e47263b4d494d922d3cc9664b08ae
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
There is no need anymore to pass through the object index of the
object being "custom compiled".
Change-Id: I8ef8e578b27523d9e7190503fbf95d1eb863a149
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We can store them as regular strings. This has the advantage that the
entire special handling from the custom parser of the list model goes away,
we don't need astForBinding in QQmlCustomParser anymore neither and types
with a custom parser can now generally benefit from the expression simplification
pass.
Change-Id: I39d1b76edd1273d8c73b847aed71f7bcce37d877
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Encapsulate the string pooling for the V4 data generation into a StringGenerator class.
* Move type reference collection into the IR::Document, where it belongs (as it writes
into the typeReferences there)
* const fixes
* Remove unused methods and members
* Store unit and qml unit sizes right in the generated data structure. That makes copying
easier (like we do when generating the QML data based on the JS fields)
Change-Id: I053146ab0b00cc90ac7f72f867415962d1be121b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When doing something like
property Item blah: Item { ... }
in a list model, we would erroneously pass "blah" to the custom parser of the
list model, which is wrong as the binding to blah is on an existing property
(not custom). For regular properties there's a code path in place to avoid
passing this to the custom parser, but for sub-object bindings we'd
unconditionally register it with the custom parser. This patch corrects that
and also adds a unit test to verify that we don't pass any bindings to existing
properties to the custom parser.
Task-number: QTBUG-37795
Change-Id: I1a3091fb5fad4be08b577cf74a85f24c3ab62ef4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
* Get rid of members in QQmlCompiledData that were used by the VME
and are now unused
* Get rid of QQmlVME friend declarations that are not needed anymore
Change-Id: I11b4b6f0b4b0b60edf92a1256be3d0d44d76bbc9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
gcc 4.6 chokes on this construct.
Replace with a shorter and more readable one :)
Change-Id: I02ff7a2c5300de656e61ee5ca8effabdd74991bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* QQmlCodeGenerator -> QQmlIR::IRBuilder (it doesn't generate code, it
generates the Object/Property/Signal/etc. IR of the .qml file, that's
going to get transformed to QV4::CompiledData::*)
* ParsedQML -> QQmlIR::Document
Change-Id: I329e858487b66e1ae528d44316761f5dd34b79f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
Move the QML IR types into the QmlIR namespace and clean them up.
Change-Id: I2125449e5a519034e23670651efa620f405730b4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Remove redundant ref to QQmlTypeNameCache object in
QQmlTypeCompiler::compile()
Change-Id: Ie166e8d04c1504194bec227bf5e945b273778a20
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Delete the QV4::IR::Function object before removing it
Change-Id: Ie85de6f18034b2def5645c07df1ccc84ac3060ec
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Simple calls to qsTr and qsTrId are detected at type compile time and
reduced to a special Translation and TranslationById binding type, which
avoids allocating a QML binding at type instantiation type just to perform
a translation.
Change-Id: I61e4f2db2a8092b5e6870e174b832d9c20cd62b5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
When compiling JS code in the scope of a component, make sure to always
set the id object mapping, even if it is empty. Otherwise the id objects
from one scope might leak into another, leading to id object dependencies
that are invalid.
Change-Id: Ib2bca11203acd6924e8c74f9560a1ee3e00d7e39
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A binding like this
property Component foo: SomeComposite {}
should not do an implicit component insertion if SomeComposite is actually
a component. The property assignment is compatible and can proceed normally.
Fixes tst_qquickcanvasitem, but added a separate unit test for this case.
Change-Id: I7221eebd38dba3f2a82b59341739b9b67211e352
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I592518444ef353cfcf153df0e6afa2fbac613560
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If QQmlCompiledData gets destroyed while somebody still has refcount on the
QV4::CompiledData::CompilationUnit, then unit's _data_ would be freed already
by ~QQmlCompiledData. Given that compilationUnit->data is pointing to the same
malloc'ed address as QQmlCompiledData::qmlUnit, we can just let the
CompilationUnit always own the data.
Fixes tst_qquickloader and makes it possible to run the qquickcomponent tests.
Change-Id: Ie3f3e5335139236d7c2524a327665bda0a9cc847
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
property setups
Get a little closer to replicating the old compiler's behavior without
introducing a new nested data structure for lists:
* List property assignments should happen in declaration order for the items.
Instead of doing magic in QmlObject::appendBinding, simply traverse the UiArrayBinding
members in reverse order. Within a list, the items remain in order then, due to
QmlObject::appendItem prepending. In the overall picture for the entire object,
the reverse initialization order for properties is also preserved this way.
* When an object has property bindings to the default property and also bindings
to a named property that - after meta-object determination - turns out to be
the default property, then we need to merge the bindings and preserve the
declaration order. (tst_qqmlecmascript::defaultPropertyListOrder checks that)
Fixes tst_qqmlenginedebugservice that expects bindings to an entire list to
happen in reverse order (like other properties).
Change-Id: I7408c97cdb971e06b1ee43a2a85f8cc6f008c444
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Add profiler tracing calls during objection creation and make sure to set the
function token / source location correctly for the synthesized function
declarations of signal handlers.
Change-Id: Ie4f8accce3a5c5d1d57bb0646cda588b89b76718
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to track the objects created and pass them over to the VME guard used in the
incubator. The incremental build nature of the incubator requires that to avoid crashes.
For nested incubators we need to set the activeVMEData field in the root QQmlContext, to allow
child incubators to locate the parent.
Lastly we need can emulate most of the VME behavior in terms of build states when running with
QQmlInstantiationInterrupt by presenting four build steps: The initial state, two build steps,
a finalization step and the state when we're done.
Change-Id: I16cd7f71744decb9d4735ec77e9d944fad18e88d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make sure to remove earlier set bindings for any value type property, not just
scripts. We want font.bold: false to also override an earlier actual binding
for example.
* Propagate on assignments on qualified property names throughout the
chain of bindings - that makes it easier to detect them early on.
* The group property collection in the bindings validator should only include
value bindings to group properties, not on assignments - as they can always
appear in parallel.
Change-Id: Ib7ec4de755a5a8d269324a77cba36eb945366274
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Also annotate QML expressions in the IR with a proper function name, to
make debugging easier.
Change-Id: I5bacf446f40d35896f50bed0732f6f10408d9c97
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
As required by the tst_qqmlinfo tests.
Change-Id: Id163c9dab539e7fd1e1da43c4fa0dfb0d1fb6e34
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Without the correct index the calls to astForBinding run out of bounds. Fixes
tst_qqmllistmodel crash.
Change-Id: I6fb8b77866cbf247e7373cdbece6833c92be3615
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Move SignalHandlerConverter into the type compiler and make it a proper
compile pass sub-class.
Change-Id: Ice8fc9acdfdb613e1d7b25728401a2376a692ccc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure to pass onFooChanged handlers to QQmlConnection's custom parser by
not relying on the signal handler converter to set the
IsSignalHandlerExpression flag. That should only be set for real signal
handlers, the custom parser gets the raw bindings.
Also don't try to initialize bindings at creation time the custom parser
covers.
Change-Id: Iae22bc886c312843136f073959e59da440f4184c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Allow for signal handlers to be installed on group property objects. We determine
the property cache objects earlier correctly, so the empyt type name check is not
necessary.
Change-Id: Idc38fdc1a78c0f4d5147ec882e7872a62510e790
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
QQmlPropertyMap is treated as a type that cannot be cached with QQmlPropertyCache,
doesn't allow for accelerated property access and also doesn't allow for declarations
of any kind in sub-types.
Change-Id: Id8a6811120aa61ffb5037394e758cc62501e0fc3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Don't only scan full-typed objects for property bindings that may define
components implicitly, do this for any types we know (propertyCache populated)
and that aren't explicitly of Component type.
Change-Id: I918b636be6d524e919cdd4efd49c33e63da64de3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
This enables accelerated property access also for this code path.
Change-Id: Iafb177b1fe7878e6c54cfb258f2e8d8ea32aa59e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Report errors when setting group properties multiple times, or when
assigning values to them. Some of this can be done right after parsing,
some of it requires knowledge about the type of group property (QObject or
value type)
Change-Id: I1aa33e64a5f64dfa4f625469f5b6a84cd8dfb18d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
or nested
Change-Id: I7ca4e1c1b111d587f519275b146179b4e6f6a51f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
error at import time
Instead report it later with a more specific error message. This is consistent with the old compiler.
Change-Id: Iba345b7ecc8a9ff474938f69118665eb0d965594
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
That in turn fixes error messages around property validation in attached
types.
Change-Id: Idef9f7652b225c5769b7fdf43e41731b197c1144
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
letter and lacks a qualification
Change-Id: I66e9669459920cfb3543a3ebcec8501465c2ef85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I435845ab1188e65a7ef019d758fbbba57e2e0bec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
QQmlJS::MASM -> QV4::JIT
QQmlJS::V4IR -> QV4::IR
Change-Id: I707e8990459114a699c200fe3c22cec3c8df1afc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
access
Change-Id: I36a945dd4e4c0e699a2b34af066eae4d4c73a588
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ib564002f790921d4e233bb56d1a6ff6ef6aa6c2b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I873bded73a0d2210910c496312fb3b7b04e4a65f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ic26e8a01995c296ab9cd4deb8714a5cf17cfdf2b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pre-calculate the amount of space we need for binding and parser status
callbacks at compile time and therefore use a much simpler data structure
(vector) to store the points to the bindings and callbacks. They need to be
stored because during object construction and binding enabling phase, it may
happen that they get destroyed and thus their m_mePtr pointing into the array
gets deleted.
The contiguous vector will also make it possible to interrupt the completion
phase.
Change-Id: Ic7c985bb8325ab355112e30e9d33d6ae4e7476d1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I614cc1428439801ed20cdee099cf8260ff930618
Reviewed-by: Liang Qi <liang.qi@digia.com>
|
|
|
|
|
|
|
|
| |
qqmlecmascript's alias binding tests expect bindings on non-aliases to be bound
before bindings on aliases, as the latter may override parts of the former.
Change-Id: I23d25c2b7a449f0ed4672ef6865c4a7ef0ed0129
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Ensure that the empty string always has index 0, that simplifies the code in a
few places and makes it easier to check for the empty string in other places
where there's no access to the string pool itself.
Change-Id: Icd204aec478e8350ef3fee75d89bda1f88cffe26
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I3b99f3fc762df7ac820b26597bf809a80849b5ce
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|