ensure correct initialization order for local variables
authorLars Knoll <lars.knoll@digia.com>
Mon, 17 Dec 2012 20:56:19 +0000 (21:56 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Tue, 18 Dec 2012 07:19:36 +0000 (08:19 +0100)
commit97625f03a660f0caf7960e9bad2c2fc792abc296
tree9093af52dd715b11f74ed553c2c964dc48521dc0
parent2522d2d3ff8a8dbd2e45bad1d8dc7cb1f45dd10b
ensure correct initialization order for local variables

section 10.5 requires that function definitions get initialized
at the beginning of the method. variable declarations do not
override the function definitions. assignments to variables
happen when they appear in the source code.

Also remove a duplicated intializations of variables to
undefined. This is already being done by initCallContext
or builtin_declare_vars, so no need to do it in the generated
code again.

Change-Id: I63805b97017f8676d57e0662073689e852b6ac23
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qv4codegen.cpp
qv4codegen_p.h