[new compiler] Improve error message for incorrect signal assignments

Change-Id: I16e7cdc6b5b49200259ea7e57d84e00f095554f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix determination of property caches for attached properties

That in turn fixes error messages around property validation in attached
types.

Change-Id: Idef9f7652b225c5769b7fdf43e41731b197c1144
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] When resolving names of attached properties, don't report the 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>
[new compiler] Don't allow for attached properties inside group properties or nested

Change-Id: I7ca4e1c1b111d587f519275b146179b4e6f6a51f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix error reporting when trying to set list properties multiple times

Change-Id: Ifcbed45894b739a57873356e8963670084614880
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix error reporting for group properties

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>
[new compiler] Fix lazy binding evaluation

Similar to commit 5dc7649f5ad7dca6e13707e827d001c3f118a6ef in the vme, we
need to set the pending binding bit for non-value-type property bindings
in order for the optimization to work and the tests to pass.

Change-Id: I89c0a3ea78c331b9c82eb8595bd4ab252b271ab5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix error location for run-time binding errors

We should point to the expression itself, not to the property.

Change-Id: I1d5b7dd80f7865076852228985717f79ceb79134
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix memory leaks

In memory pool allocated classes we cannot have members that require a
destructor to run to free memory. Therefore this patch removes the QSets in the
object class used for duplicate property and signal name checking. The checking
is instead done using linear search, which should be fine given that usually
the number declared signals and newly declared properties is low per type.

Change-Id: Id7a7a9bdd9e145975dcee4d5340489615f4f71e3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Compile functions and bindings in appropriate scopes

This enables accelerated property access also for this code path.

Change-Id: Iafb177b1fe7878e6c54cfb258f2e8d8ea32aa59e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix evaluateEnum for custom parsers

When storing the string for a script binding - next to to the AST node - then
for expression statements skip the (potentially synthetically inserted)
semicolon. Its omission is required for the use of QQmlCustomParser::evaluateEnum.

Change-Id: I3b556fd6a884f5c9c290d7d793eeab4dd135343e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix implicit component determination inside group properties

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>
[new compiler] Fix qquickanimation test crash

Share finalization callbacks across all sub-instances of ObjectCreator,
by moving into into SharedState.

Change-Id: Ibcd679caecd2009b4705d04c859b2fea4c2295fd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix remaining qquickanimation test failures

It can happen that even during initial binding evaluation, additional
finalization callbacks are registered. Catch those by setting the
activeObjectCreator pointer in the QQmlEngine accordingly - the VME does
it the same way.

Change-Id: If0fc902a4c8bdf7e8eec17bf433fd2bf11be7c04
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Remove incorrect assertion

It is perfectly valid for example to do

    Behaviour on someColor.r

Change-Id: I39961509b4698c19441f71baa4af197f633c5b39
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix property assignments to resolved enums

Force the type of the property to write to int, if we resolved the enum earlier
at type compile time. This is consistent with the VME and allows for
assignments to enum properties without a string converter. Fixes
tst_qquickgridview in particular.

Change-Id: Ic29f4a6115930bd7fff45f1658c00d0bfc24c7ec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Report an error when trying to append to a read-only list

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