Closed Bug 1618637 Opened 4 years ago Closed 4 years ago

Initialize JSFunction::nargs when allocating function in function

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: mgaudet, Assigned: tcampbell)

References

Details

Attachments

(1 file)

FunctionBox::synchronizeArgCount is a workaround which can be removed once we're done JSFunction deferral / stencil

Priority: -- → P3

I leave FunctionBox::synchronizeArgCount around for BinAST, but remove it from the normal frontend case.

Assignee: nobody → tcampbell
Blocks: 1584646
Severity: normal → N/A
No longer depends on: 1598713
Priority: P3 → P2
Summary: Remove FunctionBox::synchronizeArgCount once JSFunction allocation is deferred past bytecode emission → Initialize JSFunction::nargs when allocating function in function

With JSFunction allocations deferred until after at least parsing, we have
the correct nargs on the FunctionBox by the time we allocate that function.
This lets use remove a number of synchronizeArgCount calls.

Standalone functions still need to be updated after parsing completes because
the function is an input.

BinAST allocations aren't deferred yet, so leave those calls alone.

Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b165ac2f1059
Construct JSFunctions directly with correct nargs in frontend. r=mgaudet
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: