Be stricter about the number of messages when testing profiler service

It's better to fail a test than to crash on invalid array access later.

Change-Id: Ia3d24218eba80f362908979720657312c8c6cd67
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix a bug in qmljs_set_element and improve it's performance

Avoid expensive function calls for setting indexed properties
in the common case. The spec requires us to read the value before
writing it to check whether it's empty. In that case we need to
fall back to the slow implementation that checks the proto chain.

Change-Id: If278ba81f170d35c18135d2f8661459262e7e606
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Implement Lookup::indexedSetter

use this instead of the generic runtime method. This gives
around 10% speedup for array heavy Javascript such
as crypto.js.

Change-Id: Ic8f478c5b18893f2ef49e3f658b1ef24ae22e64f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Rename some files

Rename qv4value_def_p.h -> qv4value_p.h and qv4value_p.h to
qv4value_inl_p.h.
It makes more sense to have the class definition in the file
that is named after the class and move the inline methods into
a _inl file. Doing this now, as I expect we'll be needing a few
more _inl files soon.

Change-Id: Ib59e9380e9e976254c6b4369574157f39b1b5f51
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Move ArrayElementLessThen to qv4arraydata.cpp

This is the only place the class gets used.

Change-Id: Iebb0cba7af30c1b2da68f67596c349d5e20c5053
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Get rid of the SafeObject class

Having SafeValue is enough, and we can pass an ObjectRef instead
of a SafeObject * for function calls.

Change-Id: I4e1435105403f8091b43eeda01303f9602c74235
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Cleanups

Remove SafeValue, it was used to port over to an exact GC. Since
we now have that, we can now safely merge it with QV4::Value
again. Also rename SafeString to StringValue for better naming
consistency.

Change-Id: I8553d1bec5134c53996f6b0d758738a0ec8a2e4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Move Encode into qv4value_p.h

This is where the class logically belongs.

Change-Id: I366013aad2c9b6324ae82ab5f3250f1d9c719da4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Disentangle some includes

ScopedValue should require less dependencies. Hopefully we can then
move it together with the main class definition at some point (ie.
move ScopedValue int qv4value_p.h; similar for the other types).

Change-Id: Ie7b31715cb718a90dba40845c7ae785a29855062
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Move ValueRef into qv4value_p.h

The ref class belongs logically together with the value.

Change-Id: I40c0908715cbc8b2a5c51d2544cb06fcd8e25365
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Remove unused macro

Change-Id: Ie7044aecad59197fd2cab17d5ddcc7c44ad2ad84
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Use lookups for get/setElement in the interpreter

Significantly speeds up crypto.js

Change-Id: Icd3d59bea3fe4427e93e9e10e3526178e8de859c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
alloca() is declared in stdlib.h on BSD systems

... except on Darwin.

Bonus change: Updated auto-tests trying to include 'alloca.h'.

This is a follow up on 24c43a5748b8502.

Change-Id: I299de00bf0dca7842470b158282daea221a10f2d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
[new compiler] Fix recursive property validation across component boundaries

Change-Id: Ia2a6e9de534fcc4e3780544ad0d5708e656e11a1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix location of errors in group property objects

Change-Id: I63aa43ec7d9e90c1593c54dfc44890330c8669ae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix property declarations inside group properties

Property declarations inside group properties as well as their initializers go
into into the surrounding object.

Change-Id: I5b2b0f7bc41daea1275eb17ed04560e17052ca42
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Add support for signal handler objects

Change-Id: I644dcea86fa886a6a2dc7cd230ad6942d165c4c5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix signal handler parameters for overloaded signals

When extracting the parameters for a signal, make sure to pick the
original variant that has all the parameters.

Change-Id: Ie28cb75ce32d8840812884ce2eef2934d473466c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix location when reporting signal declaration errors

Change-Id: Iaddb51cb7b0e28048761b98d6e48c70723cd5d00
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix signal handlers that are fuzzily matched

Use the same logic at object creation time as during the signal handler
conversion phase.

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