Comment #7 on issue 3501 by [email protected]: CHECK(!already_resolved()) failed when parsing let/const arrow function expression
https://code.google.com/p/v8/issues/detail?id=3501

Okay, I have a grasp on this now:

 * The issue can be further reduced to arrow functions that are lazy parsed
   (i.e top-level functions) if, and only if, they have parameters — This
   assertion is never triggered with “--no-lazy”.

 * Parameter lists of arrow functions are parsed as expressions, and the
   resulting AST subtree is reinterpreted as a parameter list. For parameter
   names ParserTraits::ExpressionFromIdentifier() is called, which in turn
   ends up calling Scope::NewUnresolved().

 * When lazy-parsing, the scope chain is deserialized from ScopeInfo values.
   Scope instances created this way are already resolved, and the assertion
   is triggered when the first parameter name is found.

TL;DR: When lazy-parsing a function and the scope chain has been deserialized,
the ParserTraits::ExpressionFromIdentifier() function should just create the
needed VariableProxy values directly, without calling Scope::NewUnresolved().

I'll have a patch uploaded soon to solve this issue.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to