Closed Bug 1799971 Opened 2 years ago Closed 1 year ago

Use signal handling for null pointer checks of GC objects in baseline

Categories

(Core :: JavaScript: WebAssembly, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: rhunt, Assigned: yury)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We should see if we can eliminate our null-checks for GC operations using our signal handling mechanism.

We currently do something similar to this for call_indirect, where the function we're calling will have InstanceReg = null when the function pointer is null. So we mark the instruction to load the HeapReg from InstanceReg as a potentially trapping instruction [1].

I believe we can just do a similar thing for most of our GC instructions. For all of them we need to emit the trap metadata immediately before the first load that would be done on a potentially null pointer.

[1] https://searchfox.org/mozilla-central/rev/99f83e78415867726a5076a525e4a60840f3be33/js/src/jit/MacroAssembler.cpp#4436

Assignee: nobody → ydelendik
Attachment #9303354 - Attachment description: WIP: Bug 1799971 - Use signal for null GC references checks. → Bug 1799971 - Use signal for null GC references checks. r?rhunt
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Depends on: 1803381
Summary: Use signal handling for null pointer checks of GC objects → Use signal handling for null pointer checks of GC objects in baseline
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: