Open Bug 1488551 Opened Last year Updated Last year

Create NumberOperandId class in CacheIR

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox63 --- affected

People

(Reporter: mgaudet, Unassigned)

References

(Blocks 1 open bug)

Details

We have enough methods in CacheIR that are manipulating Numbers that we ought to have a type for it:

We could return NumberOperandId from guardIsNumber and guardAndGetNumberFromString, and then use it as the argument type to  compareDoubleResult, to provide a little type safety.
Perhaps one question would be: Should Int32OperandId inherit from NumberOperandId?
(In reply to Matthew Gaudet (he/him) [:mgaudet] from comment #1)
> Perhaps one question would be: Should Int32OperandId inherit from
> NumberOperandId?

I think NumberOperandId should inherit from ValOperandId because a number is represented as a boxed Value (because it can be double or int32). Int32OperandId OTOH has to be a TypedOperandId because it's just the payload. This matters for the register allocator.
You need to log in before you can comment on or make changes to this bug.