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 wrote:
Why don't we use the SameValue function?
http://code.google.com/codesearch#OAMlx_jo-ck/src/v8/src/runtime.js&exact_package=chromium&q=SameValue%2520file:runtime.js&ct=rc&cd=1&sq=&l=600 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. https://chromiumcodereview.appspot.com/9630009/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
