Closed
Bug 1052491
Opened 10 years ago
Closed 10 years ago
Add support for symbol-keyed properties to jsinfer
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: jorendorff, Assigned: jorendorff)
Details
Attachments
(2 files)
2.16 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
2.26 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
Currently we treat symbol-keyed properties the same as indexed properties: they are all glommed into a single category. We'll infer more specific types if we support symbols, and I don't think it even requires any new code -- just let symbol jsids through.
Assignee | ||
Comment 1•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=d2ff062a3e75
Assignee | ||
Comment 2•10 years ago
|
||
I think this must have been written before there was an invariant that string jsids are never indexes.
Assignee: nobody → jorendorff
Attachment #8486485 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 3•10 years ago
|
||
Well -- I think it's really this simple. Passes all the jit-tests and js/tests locally.
Attachment #8486486 -
Flags: review?(bhackett1024)
Comment 4•10 years ago
|
||
Comment on attachment 8486485 [details] [diff] [review] bug-1052491-part-1-simplify-v1.patch Review of attachment 8486485 [details] [diff] [review]: ----------------------------------------------------------------- Nice, I've wanted to remove this for a while. This is some of the oldest TI code still around, and does, yeah, date to before we canonicalized jsids.
Attachment #8486485 -
Flags: review?(bhackett1024) → review+
Comment 5•10 years ago
|
||
Comment on attachment 8486486 [details] [diff] [review] bug-1052491-part-2-symbols-v1.patch Review of attachment 8486486 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsinferinlines.h @@ +205,5 @@ > JS_ASSERT(!JSID_IS_EMPTY(id)); > > // All integers must map to the aggregate property for index types, including > // negative integers. > + return JSID_IS_STRING(id) || JSID_IS_SYMBOL(id) ? id : JSID_VOID; Parens around JSID_IS_STRING(id) || JSID_IS_SYMBOL(id), to make this easier for humans to parse. Or, change this to: return JSID_IS_INT(id) ? JSID_VOID : id; Also, missed this in the earlier patch, but the comment is wrong about negative integers. The existing comment is kind of vague, so you can change it to: // All properties which can be stored in an object's dense elements must map to the aggregate property for index types.
Attachment #8486486 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Cool. (This makes it even more ridiculous to have two patches -- hg rebase deleted my second changeset. So I'll just be pushing one changeset.)
Assignee | ||
Comment 7•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd2cd2e8c258
Assignee | ||
Comment 8•10 years ago
|
||
Of course hg rebase was wrong to delete my second changeset, and the tree burned bright orange. Pushed the fix.
Assignee | ||
Comment 9•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/eec8eb2b4dd6
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fd2cd2e8c258 https://hg.mozilla.org/mozilla-central/rev/eec8eb2b4dd6
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•