Fix a bug in with and catch context allocation.
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 4 Jul 2011 09:34:47 +0000 (09:34 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 4 Jul 2011 09:34:47 +0000 (09:34 +0000)
commit57c29c1f290e62093c406a7096cd35e2e03e84eb
tree58adcb1e7a908be5022e2044ef7b5e821e657b53
parentc5aebcb7b0af88d8e1f35ab5330ac708712b5cdb
Fix a bug in with and catch context allocation.

We were only looking one level up the scope chain to decide which
closure to use in the fresh context.  Instead, we should look to the
first non-catch scope.

R=vegorov@chromium.org
BUG=1528
TEST=regress-1528

Review URL: http://codereview.chromium.org/7309002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/full-codegen-arm.cc
src/ia32/full-codegen-ia32.cc
src/mips/full-codegen-mips.cc
src/parser.cc
src/parser.h
src/scopes.cc
src/scopes.h
src/x64/full-codegen-x64.cc
test/mjsunit/regress/regress-1528.js [new file with mode: 0644]