So, just to recap discussions from IRC:
This patch is the (as far as I can tell) simplest approach to implementing a
subset of the default parameters feature.
This subset includes:
- SingleNameBindings only, no BindingPattern support yet
- ReferenceError when parameters are referenced before initialized (in
order,
left to right) by an initializer or by the value passed on the stack
There is a list of things TODO in followup CLs:
- Properly scope the function body in a separate declaration scope
- Refactor FormalParameter parsing to not declare parameters (remove need to
re-declare them) --- This ties in with BindingPattern support
- Fix function arity for rest and optional parameters (This CL does not
touch
function arity)
- Re-implement rest parameters using desugaring (this will most likely
address
some of the performance pains, and at least match the performance of
lodash's
_.restParams() method =) --- Not directly related, but since optional
params get
desugared, it makes sense to desugar those too. The current CL breaks rest
params when mixed with optional arguments, so some kind of fix is needed
anyways.
----
So, given that there is a plan to move this forward, is it cool if I land
this
and finish the work started? =)
https://codereview.chromium.org/1127063003/
--
--
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.