Tune context allocation for variables accessed from inner scopes.
authorkeuchel@chromium.org <keuchel@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 3 Nov 2011 14:33:46 +0000 (14:33 +0000)
committerkeuchel@chromium.org <keuchel@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 3 Nov 2011 14:33:46 +0000 (14:33 +0000)
commitea185392445caed67d9e856ebcb02864e7837081
treeba76fb7a370536f66b0c531de7e3998afcf6a308
parent79cadcc947a7906ce178de3f3f0c9a83ed7166fa
Tune context allocation for variables accessed from inner scopes.

After introduction of with scopes we have enough static information to omit
context allocation in the case that a variable is accessed from a nested block
or catch scope of the same function. Only variables accessed from the inside of
a nested function or with scope are forced to be allocated in the context.

This essentially reverts
http://code.google.com/p/v8/source/detail?r=9281 .
which in turn reverted an earlier change.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/scopes.cc
src/variables.cc
src/variables.h