Closed
Bug 684717
Opened 13 years ago
Closed 4 months ago
Useful type tags for js::Value to allow easier type checking and so forth
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: evilpie, Unassigned)
Details
We should assign type tags in a way, in which we can use a bitmask/and to reuse the same code for different stuff. For example, for ToInt32, it would be useful if we could detected int/boolean/undefined/null, which just require use to use the payload. I am sure there are some other cases, too. It would be good if we could find out these beforehand.
Comment 1•13 years ago
|
||
Originally type tags were just a bitmask. Punboxing forced a dense index since there were only 3 bits and I just made nunboxing do the same for simplicity in a few cases and to optimize a few conversions in the tracer (hah!). With nunbox64, the type bitmask could help both 32/64-bit, so I'm excited to see what speedups you find. One reason why there may not be a massive speedup awaiting is that js::Value usage in the VM is increasingly not hot and the hot paths often involve single-type queries, isObjectOrNull or isNumber and the latter two are, by design, already single operations.
Reporter | ||
Updated•13 years ago
|
Assignee: general → evilpies
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Severity: normal → S3
Comment 3•4 months ago
|
||
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•