The toplevel code generator assumed that declarations did not shadow
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Dec 2009 13:31:47 +0000 (13:31 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Dec 2009 13:31:47 +0000 (13:31 +0000)
commit0bf2822266e6e08c41d60cd1bc1f45e85aa45eb4
treea97b79ae2d1820e10f31e168ae739f8837c59ee0
parentd4787a185569dbbf30b2d2899417ef27110aa058
The toplevel code generator assumed that declarations did not shadow
parameters.  This could case the initial value to be lost or worse, a
crash.

Fix by handling the case of a declaration shadowing both
stack-allocated parameters and those in the arguments object.

This is related to V8 issue 540.
http://code.google.com/p/v8/issues/detail?id=540

BUG=29565
Review URL: http://codereview.chromium.org/469006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/fast-codegen-arm.cc
src/compiler.cc
src/ia32/fast-codegen-ia32.cc
src/x64/fast-codegen-x64.cc
test/mjsunit/regress/regress-540.js