tc39 / proposal-binary-ast

Binary AST proposal for ECMAScript
965 stars 23 forks source link

Add function length field for functions, except getter which is always 0 (fixes #49) #55

Closed arai-a closed 6 years ago

arai-a commented 6 years ago

Added length field to functions, except Getter which is always 0. (Setter needs it since it can be 0 if it's default parameter, while it's most likely 1 :P )

function object's length is retrieved from the tagged AST node in ExpectedArgumentCount static semantics. and it's verified after delazifying parameter, both for eager and lazy functions.