Chromium Code Reviews
DescriptionFix capturing variables in optimized compilations
Second attempt, this time also capturing hidden variables
like 'this' in initializer lists. Original CL is
https://codereview.chromium.org/1980193002
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/117693961f3494283fe1ec8f2cda9c106b490092
Patch Set 1 #
Messages
Total messages: 7 (4 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||