Optimize Function.prototype.apply/call()

Use a QVarLengthArray instead of a QVector for holding
the arguments that are being passed on.

Change-Id: I41500fecb1efc94ae1735adb3c631596916ed7d2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix two small issues when construcint Array objects

When constructing from a stringlist, we need to correctly
set arrayDataLen.
init() doesn't need to malloc a memberData array, as we have
4 properties stored inline.

Change-Id: Ia35bd89fe2d58b80ebba1356ba1d16f088d111e4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Optimize contruction of Arguments objects

Change-Id: If77bff28a25462a6069d646a2594dd903fefb9e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Move arguments object creation into the generated code

So far we've been creating the arguments object at runtime
in initCallContext(). It's much more efficient to simply add
arguments as a local variable in qv4codegen if it's being used
and initialize it through a builtin method.

Change-Id: I6913f3565adf3aa1917adae8dceef9f50ecf1722
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Never convert the this object when calling a builtin function

When calling builtin methods, the this object should should be
passed unmodified to the method. This failed so far because some
of our buitin methods where implemented slightly wrong.

Change-Id: I725f4dc952b4af6101645cf702e01b5410406a92
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simplify __qmljs_call_property_lookup

This was still using the older (and slower) member of Lookup. Instead
call the function pointer to resolve the lookup.

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