Implement Object.is

RESOLVED FIXED in mozilla22

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: David Bruant, Assigned: evilpie)

Tracking

(Blocks: 1 bug, {dev-doc-complete})

unspecified
mozilla22
x86
Linux
dev-doc-complete
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Per TC39 January 2013 meeting [1], is/isnt are out as operators, but Object.is remains (no need for Object.isnt, ! is enough for negation)

[1] https://github.com/rwldrn/tc39-notes/blob/master/es6/2013-01/jan-29.md#41-isisnt-operators
(Reporter)

Updated

5 years ago
Blocks: 694100
I implemented these as |is| and |isnt| before, taking.
Assignee: general → evilpies
Status: NEW → ASSIGNED
Created attachment 725793 [details] [diff] [review]
v1

I took some ideas for tests from bug 715359. The rest is pretty straight forward, except maybe the args.length() < 2, because this is actually not clearly defined. So I made a post to es-discuss.
Attachment #725793 - Flags: review?(jorendorff)
For some reason I confused myself more than I should have here. The args.length() < 2 should not return false here. New patch coming up.
Created attachment 725938 [details] [diff] [review]
v2

This now has the right behavior.
Attachment #725793 - Attachment is obsolete: true
Attachment #725793 - Flags: review?(jorendorff)
Attachment #725938 - Flags: review?(jorendorff)
Comment on attachment 725938 [details] [diff] [review]
v2

Review of attachment 725938 [details] [diff] [review]:
-----------------------------------------------------------------

Beautiful!
Attachment #725938 - Flags: review?(jorendorff) → review+
Keywords: dev-doc-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/a321bf04c39b
https://hg.mozilla.org/mozilla-central/rev/a321bf04c39b
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
https://developer.mozilla.org/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/22
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.