Closed Bug 1654495 Opened 4 years ago Closed 4 years ago

Support more than 256 CacheIR ops

Categories

(Core :: JavaScript Engine: JIT, task, P2)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(2 files)

We'll soon run into the one-byte limit for CacheIR ops. The plan is to use a variable-length encoding.

Severity: normal → N/A
Priority: -- → P2

Adds {write,read}Unsigned15Bit methods to the CompactBuffer classes, as faster
alternative to {write,read}Unsigned. In an opt build, Clang inlines writeUnsigned15Bit
into the callers and can optimize based on the CacheOp value being written.

The OOM-check change in writeByte doesn't affect behavior but is a minor
optimization: Clang was emitting an unnecessary AND 1, <addr> that's eliminated
by that change.

This way they can be encoded in one byte instead of two. I'm not sure if it's worth
mentioning or documenting this explicitly.

Depends on D84482

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dc8f3078adcc
part 1 - Use a variable length encoding for CacheOp to support more than 256 ops. r=iain
https://hg.mozilla.org/integration/autoland/rev/7f1cce423fde
part 2 - Move ops that are used in most stubs to the beginning of the file. r=iain
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: