Simplify our breakpoint handling

Only store a Hash of break points in the debugger,
instead of the involved logic that currently adds and
removes break points. Add the current line number to
the Debug statements in the interpreter, and pass them
on to the debugger for checking whether we should really
break.

This adds a slight additional overhead to running inside the
debugger, but greatly simplifies the logic and doesn't require
modifying the bytecode anymore. This in turn opens up the
possibility to run the debugger on JIT generated code later on.

Change-Id: If2a3ae8f8d08b69a3a704cbbe0a84000f917a32e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Add a Line instruction to the interpreter

This unifies the way we handle line numbers in the
JIT and Interpreter.

Remove the now unused lineNumberMapping code and data.

Change-Id: I1d60b1fbb77e70b531fa73d93410683e84dd1e3c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fixes to breakpoint handling

Make sure stepping works correctly, and we always
break at a valid breakpoint.

Change-Id: I6a3032b3ae204484b8a92b2031904a7f681c7f80
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix test failure in qqmldebugjs autotest

The debugger should only have one breakpoint that can
be set per line. Nevertheless, we should have proper
line number information available in case we stop at
other places.

We also need a debug instruction before the return
statement, so that step out will always find a last
stopping point in the parent frame.

Change-Id: I86145fc244148f106a4a97ce69ab60b568c8dac6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Remove unused entries in CompiledData

Change-Id: Ie5313371fa5dec6630a1d955d4409ea4d6163810
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reduce memory consumption of FunctionObject

Remove varCount and formalParameterCount members
in FunctionObject and retrieve them from the
CompiledFunction instead.

Change-Id: I8a6cdc6d354b0f33da9d67a4c3dbfe8a7cc96176
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Remove the name member of FunctionObject

The data is anyway stored in the name property of
the FunctionObject, and is not performance critical.

Change-Id: If1784b0ec6f368bc474c246bb9c2c50d5e56b689
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Better way of retrieving the prototype property for FunctionObjects

Make sure FunctionObjects always have the prototype property at
index 0. This way we can speed up the instanceOf operator even more,
and at the same time save 16-28 bytes of memory per FunctionObject.

Change-Id: I8527bc8f9dc7b04a9db8395b5f05bab47ddc21ce
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Move some methods from ExecutionContext to CallContext

This is where they really belong. Slightly simplifies
and cleans up the code.

Change-Id: Ib5782c1f57c761c46f4bc52c3d496220299f8ac9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
QQuickWidget: handle windowChange

When the toplevel window changes, QQuickWidget needs to recreate
the context so it is compatible with the new window.

Change-Id: Ic7c3410061a33f223e20e3d1f93437917abcff18
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>