Closed
Bug 674775
Opened 13 years ago
Closed 13 years ago
Implement js::IndexToString(cx, uint32_t)
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
(Whiteboard: [inbound])
Attachments
(1 file, 1 obsolete file)
5.07 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
Upcoming work on using separate storage for element properties (property names which are the string versions of unsigned 32-bit integers) will need to be able to get a string for a given uint32_t, at least as long as jsid can't hold a full 32-bit-integer range of values. Implement js::IndexToString to support this, and in the absence of users exactly right now, add a JSAPI test that uses private headers to test it.
Attachment #548976 -
Flags: review?(luke)
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #548976 -
Attachment is obsolete: true
Attachment #548976 -
Flags: review?(luke)
Attachment #548980 -
Flags: review?(luke)
Comment 2•13 years ago
|
||
Comment on attachment 548980 [details] [diff] [review] h8 hg Review of attachment 548980 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/vm/String-inl.h @@ +206,5 @@ > +inline JSStaticAtom & > +JSAtom::uintStatic(uint32 u) > +{ > + JS_ASSERT(hasUintStatic(u)); > + return *reinterpret_cast<JSStaticAtom *>(const_cast<JSString::Data *>(intStaticTable[u])); This casting shold match the casting in JSAtom::intStatic. Personally, I find this a bit verbose and not terribly informative, but you pick. I guess you already did :)
Attachment #548980 -
Flags: review?(luke) → review+
Assignee | ||
Comment 3•13 years ago
|
||
...or even better: just make the int32 version call the uint32 version. (With some pre-validity-checking assertions still, of course.) :-) Landing shortly...
Assignee | ||
Comment 4•13 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/375dba36b860
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
Comment 5•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/375dba36b860
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•