Closed Bug 1949075 Opened 9 months ago Closed 7 months ago

Use 'final' when optimizing cast codegen

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: rhunt, Assigned: bvisness)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

A struct or array type can be 'final' and not have any declared subtypes. This means that if we're casting to a type that is final, we only need to emit a type 'equality' check and can skip the 'supertype' vector check.

Instead of doing this check here [1] we could just do a comparison for if the value we're casting has the exactly correct STV.

[1] https://searchfox.org/mozilla-central/rev/27583d5afd9beea3a7551f35470cf188de1d368c/js/src/jit/MacroAssembler.cpp#6845-6848

Final types can have no subtypes, and therefore when casting to them it
is sufficient to do a simple equality check.

Assignee: nobody → bvisness
Status: NEW → ASSIGNED
Pushed by bvisness@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cff9edcdf174 Use final-ness in wasm subtype checks. r=rhunt
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
QA Whiteboard: [qa-triage-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: