Closed Bug 1475464 Opened 6 years ago Closed 6 years ago

Add more description about FunctionScope data

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

There are many kind of bindings in FunctionScope, and it's complicated.
we need some more description.
Comment on attachment 8991794 [details] [diff] [review]
Add more description about FunctionScope data.

Review of attachment 8991794 [details] [diff] [review]:
-----------------------------------------------------------------

That's useful, thanks!

::: js/src/vm/Scope.h
@@ +589,5 @@
>          //
> +        // Rest parameter binding is also included in positional formals.
> +        // This also becomes nullptr if destructuring.
> +        //
> +        // The number of positional formals equals to function.length if

Nit: s/equals to/is equal to/

@@ +593,5 @@
> +        // The number of positional formals equals to function.length if
> +        // there's no rest, function.length+1 otherwise.
> +        //
> +        // Destructuring parameters and destructuring rest are included in
> +        // other formals.

Nit: at first I didn't realize 'other formals' refers to the separate section mentioned below. Maybe s/other formals/"other formals"/ to avoid confusion.
Attachment #8991794 - Flags: review?(jdemooij) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/738e3cb89b4b7513d69438da6a1b3f3748a34538
Bug 1475464 - Add more description about FunctionScope data. r=jandem DONTBUILD because comment only
https://hg.mozilla.org/mozilla-central/rev/738e3cb89b4b
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: