| Index: runtime/vm/parser.h
|
| ===================================================================
|
| --- runtime/vm/parser.h (revision 9036)
|
| +++ runtime/vm/parser.h (working copy)
|
| @@ -139,9 +139,12 @@
|
| struct Block;
|
| class TryBlocks;
|
|
|
| - // The function being parsed.
|
| + // The function for which we will generate code.
|
| const Function& current_function() const;
|
|
|
| + // The innermost function being parsed.
|
| + const Function& innermost_function() const;
|
| +
|
| // Note that a local function may be parsed multiple times. It is first parsed
|
| // when its outermost enclosing function is being parsed. It is then parsed
|
| // again when an enclosing function calls this local function or calls
|
| @@ -151,10 +154,13 @@
|
| // itself nested in a static function, is parsed 3 times (unless it does not
|
| // end up being invoked).
|
| // Now, current_function() always points to the outermost function being
|
| - // parsed (i.e. the function that is being invoked), and is not updated while
|
| - // parsing a nested function of that outermost function.
|
| - // Therefore, the statements being parsed may or may not belong to the body of
|
| - // the current_function(); they may belong to nested functions.
|
| + // compiled (i.e. the function that is being invoked), and is not updated
|
| + // while parsing a nested function of that outermost function.
|
| + // Therefore, the statements being parsed may or may not belong to the body
|
| + // of the current_function(); they may belong to nested functions.
|
| + // innermost_function() is the function that is currently being parsed.
|
| + // It is either the same as current_function(), or a lexically nested
|
| + // function.
|
| // The function level of the current parsing scope reflects the function
|
| // nesting. The function level is zero while parsing the body of the
|
| // current_function(), but is greater than zero while parsing the body of
|
| @@ -519,9 +525,12 @@
|
| bool SetAllowFunctionLiterals(bool value);
|
| bool allow_function_literals_;
|
|
|
| - // The function currently being parsed.
|
| + // The function currently being compiled.
|
| const Function& current_function_;
|
|
|
| + // The function currently being parsed.
|
| + Function& innermost_function_;
|
| +
|
| // The class or interface currently being parsed, or the owner class of the
|
| // function currently being parsed. It is used for primary identifier lookups.
|
| Class& current_class_;
|
|
|