DescriptionFix capturing variables in optimized compilations
Fourth(!) attempt. This CL fixes another instance where parsing a nested function modifies the parser state of the function that is being compiled.
When a local function gets compiled the second time, constant
expressions may not be parsed again, since the constant value
is found in the cache. If the expression refers to an outer
variable, it does not get captured correctly.
Fix: instead of parsing a local function repeatedly to capture
outer variables, use the local function’s context scope to mark
outer variables as captured. This fixes the bug, and makes the
compiler more efficient as well.
BUG=26453
R=rmacnak@google.com
Committed: https://github.com/dart-lang/sdk/commit/7daa2a8915af72ba9394fada91cb40402bff2624
Patch Set 1 #Patch Set 2 : patch in fix for bug 26453 #Patch Set 3 : Fix skipping closurization #
Messages
Total messages: 9 (5 generated)
|