Closed
Bug 895728
Opened 11 years ago
Closed 11 years ago
make Web IDL bindings support distinguishing primitive types and DOMString
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: heycam, Assigned: bzbarsky)
References
Details
Attachments
(5 files, 2 obsolete files)
16.31 KB,
patch
|
Details | Diff | Splinter Review | |
2.77 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
11.01 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
8.60 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
9.21 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
Web IDL now supports distinguishing primitive types and DOMString for overload resolution and enum types.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #778263 -
Flags: review?(khuey)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bzbarsky
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #778265 -
Flags: review?(khuey)
Assignee | ||
Updated•11 years ago
|
Attachment #778263 -
Attachment is obsolete: true
Attachment #778263 -
Flags: review?(khuey)
Assignee | ||
Comment 3•11 years ago
|
||
Comment on attachment 778265 [details] [diff] [review] With a bit more cleanup Spec is changing more. :(
Attachment #778265 -
Flags: review?(khuey)
Reporter | ||
Comment 4•11 years ago
|
||
Spec is now updated to have boolean, numeric types and DOMString all be distinguishable.
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #778797 -
Flags: review?(khuey)
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #778798 -
Flags: review?(khuey)
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #778799 -
Flags: review?(khuey)
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #778800 -
Flags: review?(khuey)
Comment 9•11 years ago
|
||
Comment on attachment 778798 [details] [diff] [review] part 3. Fix overload resolution to work with the new boolean/numeric/string setup. Review of attachment 778798 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/Codegen.py @@ +5070,5 @@ > + if numericSignature: > + addCase(numericSignature, numericCondition) > + if stringSignature: > + addCase(stringSignature, None) > + trailing ws
Comment 10•11 years ago
|
||
Comment on attachment 778799 [details] [diff] [review] part 4. Fix unions to work with the new boolean/numeric/string setup. Review of attachment 778799 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/Codegen.py @@ +2930,5 @@ > else: > templateBody = CGGeneric() > > + stringTypes = filter(lambda t: t.isString() or t.isEnum(), > + memberTypes) [t if t.isString() or t.isEnum() for t in memberTypes] would be more idiomatic, I think.
Assignee | ||
Comment 11•11 years ago
|
||
> trailing ws Fixed. > [t if t.isString() or t.isEnum() for t in memberTypes] would be more idiomatic, I think. Good catch. I was just copying the existing code, but that was already suboptimal. ;)
Attachment #779023 -
Flags: review?(khuey)
Assignee | ||
Updated•11 years ago
|
Attachment #778799 -
Attachment is obsolete: true
Attachment #778799 -
Flags: review?(khuey)
Assignee | ||
Updated•11 years ago
|
Whiteboard: [need review]
Attachment #778797 -
Flags: review?(khuey) → review+
Comment on attachment 778800 [details] [diff] [review] part 2. Make booleans, numerics, and strings/enums all be distinguishable from each other. Review of attachment 778800 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/parser/WebIDL.py @@ +2165,5 @@ > + return (other.isNumeric() or other.isString() or other.isEnum() or > + other.isInterface() or other.isObject() or > + other.isCallback() or other.isDictionary() or > + other.isSequence() or other.isArray() or > + other.isDate()) Wouldn't this be easier as 'return not other.isBoolean()'? @@ +2171,5 @@ > + return (other.isBoolean() or other.isString() or other.isEnum() or > + other.isInterface() or other.isObject() or > + other.isCallback() or other.isDictionary() or > + other.isSequence() or other.isArray() or > + other.isDate()) Similarly here?
Attachment #778800 -
Flags: review?(khuey) → review+
Comment on attachment 778798 [details] [diff] [review] part 3. Fix overload resolution to work with the new boolean/numeric/string setup. Review of attachment 778798 [details] [diff] [review]: ----------------------------------------------------------------- Note Ms2ger's comment.
Attachment #778798 -
Flags: review?(khuey) → review+
Attachment #779023 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 14•11 years ago
|
||
> Wouldn't this be easier as 'return not other.isBoolean()'?
It'd have to be 'return not other.isBoolean() and not other.isAny()', I think. Which is why I didn't do it: it's a less-direct translation of the distinguishability table to do it that way...
I can change it if you prefer; let me know.
Assignee | ||
Comment 15•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/11874cb86560 https://hg.mozilla.org/integration/mozilla-inbound/rev/7cc767d92af6 https://hg.mozilla.org/integration/mozilla-inbound/rev/c4e3b826d3f3 https://hg.mozilla.org/integration/mozilla-inbound/rev/d879c9cff194
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla25
Comment 16•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/11874cb86560 https://hg.mozilla.org/mozilla-central/rev/7cc767d92af6 https://hg.mozilla.org/mozilla-central/rev/c4e3b826d3f3 https://hg.mozilla.org/mozilla-central/rev/d879c9cff194
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•