[new compiler] Fix signal handlers on own properties

When compiling signal handler expressions we need to determine the parameters.
We first try to look up the signal in the base meta-object. For our own
QML type itself we don't have a meta-object yet and so we extract the information
about which parameters the signals have from the parsed AST's signal declarations.

For signal handlers on declared properties we need to "synthesize" the
signal (myPropertyChanged) as well, with an empty parameter list.

Change-Id: Iecfe7bc7a9979d57586cbd9434bb9eb2f38a2c7b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix JavaScript expressions in composite types

When creating a composite type, we instantiate a nested QQmlObjectCreator
on the QQmlCompiledData of the composite type. It may be that this is
the first time the type is instantiated and the QV4::CompiledData::CompilationUnit
isn't linked into the engine yet. Instead of doing that on the QQmlComponent
side, do it in the QQmlObjectCreator constructor (on demand), so that it
also works for nested builders.

Change-Id: I614bbae4ef6da5a5960cc64b40b092663e1bd810
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Improve error handling with invalid base types

If we fail to instantiate a composite type, handle it gracefully and
propagate the errors to the caller correctly. Similarly, if we try to
create an uncreatable type, produce an error.

Change-Id: Idce5b567c4f33eff7a97a733606c1e823c6d8297
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix crash with remote imports

The import logic keeps pointers to the provided const QQmlImport references,
which means we can't pass references to temporaries when using the new code
path but for now have to keep the import objcts as member.

Change-Id: I75eff8dbe655ed23188f3f62f743a8f987bc709e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix local variable declarations in binding expressions

Always look up locals by name

Change-Id: I2fa14499f6d8749f450bfe2b8a53d684b93bd1dc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix binding evaluations

All created bindings are activated at finalization time and given sub-objects
they're all collected in allCreatedBindings. When populating that, make sure
to populate the right variable before the qSwap.

Change-Id: Ibf5b55aca933c062e1ffcac327214c73a2ae6348
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Add support for default properties

When trying to determine the destination property for a binding, properly
fall back to the default property if existent.

Fixes tst_qqmllanguage::simpleContainer

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