Closed
Bug 1248930
Opened 9 years ago
Closed 9 years ago
Use Int32Value in ArrayBufferObject::BYTE_LENGTH_SLOT.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
2.67 KB,
patch
|
lth
:
review+
|
Details | Diff | Splinter Review |
Currently ArrayBufferObject::BYTE_LENGTH_SLOT slot is using DoubleValue, but byteLength property should fit into Int32, and using Int32Value should be better for inlining in bug 1165053.
Assignee | ||
Comment 1•9 years ago
|
||
Just replacing DoubleValue with Int32Value works.
Green on try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6427abbbd86e
Assignee: nobody → arai.unmht
Attachment #8720253 -
Flags: review?(lhansen)
Comment 2•9 years ago
|
||
Note that per spec byteLength should be clamped using ToLength, so be in the range of [0,2^53). That we don't currently support lengths above Int32 is something we should fix, not further cement in our code.
Comment 3•9 years ago
|
||
IMVHO there's so much code that needs to change if we move away from the int32 assumption that it's better to at least be consistent, if we're not going to make that change straight away.
cc'ing Waldo on the theory that he might have opinions.
Comment 4•9 years ago
|
||
I kinda suggested this in bug 1165053. :-) I agree being consistent -- and more efficient/faster for now, as well -- is good. (And if we extend to the 2**53 limit at some point, it wouldn't surprise me if we encoded it not as a double value anyway.)
Updated•9 years ago
|
Attachment #8720253 -
Flags: review?(lhansen) → review+
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/58cb45035b724e5114c5fac236291badce35e41c
Bug 1248930 - Use Int32Value in ArrayBufferObject::BYTE_LENGTH_SLOT. r=lth
Comment 6•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•