This will be used in the SIMD value type tests for SameValue and
SameValueZero,
in objects.cc and in the runtime-simd.cc implementation of new intrinsics
that
implement used by SameValue and SameValueZero in runtime.js.
utils.h seemed like a good place to put this but I'm open to other
suggestions.
https://codereview.chromium.org/1234073003/diff/20001/src/objects.cc
File src/objects.cc (right):
https://codereview.chromium.org/1234073003/diff/20001/src/objects.cc#newcode686
src/objects.cc:686: return v8::internal::SameValue(Number(),
other->Number());
On 2015/07/14 18:26:58, adamk wrote:
Why the "v8::internal::" prefix here? Does this fail to lookup
properly without
it?
Without the prefix, it tries to match to an Object:: overload, which
doesn't exist. I could change the name to same_value but this seems more
consistent with the existing math functions in utils.h.
https://codereview.chromium.org/1234073003/diff/20001/src/utils.h
File src/utils.h (right):
https://codereview.chromium.org/1234073003/diff/20001/src/utils.h#newcode205
src/utils.h:205: bool SameValue(T x, T y) {
On 2015/07/14 18:26:58, adamk wrote:
Can you add a comment linking to:
http://www.ecma-international.org/ecma-262/6.0/#sec-samevalue
Done.
https://codereview.chromium.org/1234073003/diff/20001/src/utils.h#newcode215
src/utils.h:215: bool SameValueZero(T x, T y) {
On 2015/07/14 18:26:58, adamk wrote:
And here linking to:
http://www.ecma-international.org/ecma-262/6.0/#sec-samevaluezero
Done.
https://codereview.chromium.org/1234073003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.