It would make sense, as long as we can emit a SyntaxError with the correct location at that time. ES5 requires an "early error" for these syntax errors, but any time before running any code should be fine. We will need resolved variables anyway, in order to emit early SyntaxError for deleting local variables.
/L On Wed, Jan 19, 2011 at 08:54, <[email protected]> wrote: > Methinks parameter validation doesn't belong in the parser. After parsing > we > resolve variables in scopes.cc, which is already hashing and canonicalizing > variable references. Wouldn't that be the right place to check all things > scope-related? > > We should avoid adding extra passes and auxiliary data structures to the > parser. > > > http://codereview.chromium.org/6144005/ > -- Lasse R.H. Nielsen [email protected] 'Faith without judgement merely degrades the spirit divine' Google Denmark ApS - Frederiksborggade 20B, 1 sal - 1360 København K - Denmark - CVR nr. 28 86 69 84 -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
