Closed Bug 688794 Opened 15 years ago Closed 8 years ago

[pacman] speculatively inline Array::getLength in the JIT.

Categories

(Tamarin Graveyard :: Library, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: pnkfelix, Unassigned)

References

Details

Array subclasses can override the length getter. But for non-subclassed arrays, it should suffice to extract the length field, and that operation could be inlined by the jit. I don't know off-hand how hard it is to emit jit-code to inspect the type of an object nor how much overhead it would introduce. But Bug 688486 and Bug 688772 are already introducing an 'm_isSimple' member to ArrayObject that the jit will use for speculative fast-paths; the same could be easily used for length, and it would cover all the cases we actually care about, I imagine.
See also Bug 682280 for how Vector.length is being dealt with. (It is a simper case to attack than Array, but is likely to serve as an initial template.)
Blocks: 683839
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.