Fix debug output when tests fail

The tests with expected .errors.txt files support setting the DEBUG=1
environment variable to produce string output. Unfortunately "Actual:"
and "Expected:" were swapped in the output.

Change-Id: I2b378b0d9dcc6e513d82837abf9f8b0d5d7e1392
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix error location when id property is used in list model elements

Change-Id: Iec648d593d30117c512009dcc6ab0d50b8fc51af
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix error reporting for invalid component specifications

Change-Id: I435845ab1188e65a7ef019d758fbbba57e2e0bec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Report errors when a property name starts with an upper case letter and lacks a qualification

Change-Id: I66e9669459920cfb3543a3ebcec8501465c2ef85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Ensure that qualified type names end in an id with an upper case letter

Change-Id: I35166b86ddc7c2e87dc77b59f4d8272279ca5688
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[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>