Rewrite a very awkwardly worded comment describing the flat closure optimization. rs=cdleary over IRL

This commit is contained in:
Jeff Walden 2011-09-27 16:35:41 -07:00
parent 9a495ee4f8
commit 72665286da

View File

@ -910,9 +910,11 @@ struct LexicalScopeNode : public JSParseNode {
* because the above one-pass algorithm sees the definition before any uses,
* and because all uses are contained in the same block as the definition.
*
* We also analyze function uses to flag upward/downward funargs, optimizing
* those lambdas that post-dominate their upvars inevitable only assignments or
* initializations as flat closures (after Chez Scheme's display closures).
* We also analyze function uses to flag upward/downward funargs. If a lambda
* post-dominates each of its upvars' sole, inevitable (i.e. not hidden behind
* conditions or within loops or the like) initialization or assignment; then
* we can optimize the lambda as a flat closure (after Chez Scheme's display
* closures).
*/
#define dn_uses pn_link