Closed Bug 1674108 Opened 4 years ago Closed 4 years ago

Store dense and TypedArray index in PropertyResult

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(3 files)

Currently we can store a property Shape in PropertyResult, but for dense/typed elements we don't store anything. When we use the PropertyResult, we mostly use JSID_TO_INT(id) for dense/typed lookups, but for large typed arrays (bug 1673557) this won't work because we need to support indexes larger than JSID_INT_MAX (= INT32_MAX).

We determine the actual index (and bounds check this) when we do the lookup, so if we store this in PropertyResult the consumers can then just use that instead of JSID_TO_INT.

This refactors PropertyResult so that we can also store indexes. This will help
us support typed arrays larger than 2 GB because it lets us replace JSID_TO_INT
(limited to INT32_MAX) with the size_t we stored.

This way we don't truncate the size_t passed from PropertyResult.

Depends on D95142

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d4bb71e5cae6
part 1 - Store dense and TypedArray index in PropertyResult. r=jonco
https://hg.mozilla.org/integration/autoland/rev/10f13dde0b9a
part 2 - Remove getDenseOrTypedArrayElement. r=jonco
https://hg.mozilla.org/integration/autoland/rev/95d76c4e7057
part 3 - Change getElement and related methods to take size_t instead of uint32_t. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: