Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Issue 9630009: Implement Object.is and Number.is[Finite,NaN] functions. (Closed)

Created:
8 years, 9 months ago by Michael Starzinger
Modified:
8 years, 9 months ago
CC:
v8-dev
Visibility:
Public.

Description

Implement Object.is and Number.is[Finite,NaN] functions. R=rossberg@chromium.org TEST=mjsunit/object-is,mjsunit/number-is Committed: https://code.google.com/p/v8/source/detail?r=10965

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed comments by Andreas Rossberg. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -0 lines) Patch
M src/v8natives.js View 1 4 chunks +27 lines, -0 lines 2 comments Download
M test/mjsunit/mjsunit.js View 1 chunk +2 lines, -0 lines 0 comments Download
A test/mjsunit/number-is.js View 1 chunk +58 lines, -0 lines 0 comments Download
A test/mjsunit/object-is.js View 1 chunk +47 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Michael Starzinger
8 years, 9 months ago (2012-03-08 12:17:58 UTC) #1
rossberg
lgtm https://chromiumcodereview.appspot.com/9630009/diff/1/src/v8natives.js File src/v8natives.js (right): https://chromiumcodereview.appspot.com/9630009/diff/1/src/v8natives.js#newcode1264 src/v8natives.js:1264: return (obj1 !== 0) || ((1 / obj1) ...
8 years, 9 months ago (2012-03-08 12:42:26 UTC) #2
Michael Starzinger
Added new patch set. Landed. https://chromiumcodereview.appspot.com/9630009/diff/1/src/v8natives.js File src/v8natives.js (right): https://chromiumcodereview.appspot.com/9630009/diff/1/src/v8natives.js#newcode1264 src/v8natives.js:1264: return (obj1 !== 0) ...
8 years, 9 months ago (2012-03-08 12:50:00 UTC) #3
arv (Not doing code reviews)
https://chromiumcodereview.appspot.com/9630009/diff/4002/src/v8natives.js File src/v8natives.js (right): https://chromiumcodereview.appspot.com/9630009/diff/4002/src/v8natives.js#newcode1263 src/v8natives.js:1263: if (obj1 === obj2) { Why don't we use ...
8 years, 9 months ago (2012-03-13 05:15:49 UTC) #4
Michael Starzinger
https://chromiumcodereview.appspot.com/9630009/diff/4002/src/v8natives.js File src/v8natives.js (right): https://chromiumcodereview.appspot.com/9630009/diff/4002/src/v8natives.js#newcode1263 src/v8natives.js:1263: if (obj1 === obj2) { On 2012/03/13 05:15:49, arv ...
8 years, 9 months ago (2012-03-13 09:02:08 UTC) #5
arv (Not doing code reviews)
8 years, 9 months ago (2012-03-13 16:58:32 UTC) #6
On 2012/03/13 09:02:08, Michael Starzinger wrote:
> https://chromiumcodereview.appspot.com/9630009/diff/4002/src/v8natives.js
> File src/v8natives.js (right):
> 
>
https://chromiumcodereview.appspot.com/9630009/diff/4002/src/v8natives.js#new...
> src/v8natives.js:1263: if (obj1 === obj2) {
> On 2012/03/13 05:15:49, arv wrote:
> > Why don't we use the SameValue function?
> > 
> >
>
http://code.google.com/codesearch#OAMlx_jo-ck/src/v8/src/runtime.js&exact_pac...
> 
> Yes we could use that function, but I didn't care much about making it perfect
> because this is only an intermediate step. And frankly I didn't remember we
had
> SameValue(), I only remembered it's native counterpart JSObject::SameValue().
If
> you are interested in the full story, here is how I want to proceed with the
> egal operator implementation:
> 
> 1) Have our backends generate optimized code for [[SameValue]] and expose it
via
> an %_SameValue() intrinsic.
> 2) Use the same generated code to implement the "is" keyword behind --harmony
> flag.
> 3) Once the --harmony flag is gone, switch Object.is() to actually use the
"is"
> keyword.

Thanks. That makes sense to me.

Powered by Google App Engine
This is Rietveld 408576698