-
marja authored
This is an overly pessimistic approach where PreParser only keeps track of unresolved variables, but doesn't declare anything. This will result in context-allocating variables in the outer function unnecessarily, if the variable names clash with variable names used by the inner function (even if the variables are not the same). However, we have been unable to prove that this approach wouldn't be good enough for the practical purposes. Fixes after the previous try ( https://codereview.chromium.org/2322243002/ ): Keep the context-allocation decision stable when compiling fully eagerly. Tests which exercise this functionality: mjsunit/fixed-context-shapes-when-recompiling.js Design document (chromium): https://docs.google.com/a/chromium.org/document/d/1rRv5JJZ0JpOZAZN2CSUwZPFJiBAdRnTiSYhazseNHFg/edit?usp=sharing BUG= Review-Url: https://codereview.chromium.org/2352593002 Cr-Commit-Position: refs/heads/master@{#39719}
7c73cf32