V4 JIT: fix JS stack frame size calculation.
authorErik Verbruggen <erik.verbruggen@digia.com>
Tue, 12 Aug 2014 14:56:39 +0000 (16:56 +0200)
committerErik Verbruggen <erik.verbruggen@digia.com>
Wed, 13 Aug 2014 09:01:55 +0000 (11:01 +0200)
commita0986e6116e3a98f181cfd77fbcd3cf168dbc565
treed1a36c7036bdb872afa37f33b570589ec06d53c9
parent1fd06d1ecf588a1ac4bf6bc4f9eed5f95d4e7982
V4 JIT: fix JS stack frame size calculation.

StackLayout::calculateJSStackFrameSize now returns the size in number
of QV4::Value items, instead of bytes. The value is then multiplied in
the assembler by sizeof(Value) to get the number of bytes. Previously,
the return value was number of bytes, which also got multiplied.

A direct effect is that the JS stack size will be ~87% smaller, with
the nice effect that the GC will run faster (less roots on the stack).
It also won't retain objects whose reference accidentally ended up on
the stack below the used portion for the current function, so possibly
freeing (more) objects (earlier) than before.

Change-Id: Idd5a9c173e641c03e6b8a6fe743e403eda34dfe0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jit/qv4assembler_p.h