PTAL

https://codereview.chromium.org/1153373003/diff/140001/src/factory.h
File src/factory.h (right):

https://codereview.chromium.org/1153373003/diff/140001/src/factory.h#newcode355
src/factory.h:355: Handle<Float32x4> NewFloat32x4(double w, double x,
double y, double z,
On 2015/06/03 13:27:15, titzer wrote:
Should we use float here to force the rounding into the caller?

Yes, much better.

https://codereview.chromium.org/1153373003/diff/140001/src/heap/heap.h
File src/heap/heap.h (right):

https://codereview.chromium.org/1153373003/diff/140001/src/heap/heap.h#newcode1610
src/heap/heap.h:1610: AllocateFloat32x4(double w, double x, double y,
double z,
On 2015/06/03 13:27:15, titzer wrote:
Float

Done.

https://codereview.chromium.org/1153373003/diff/140001/src/objects-inl.h
File src/objects-inl.h (right):

https://codereview.chromium.org/1153373003/diff/140001/src/objects-inl.h#newcode1587
src/objects-inl.h:1587: DCHECK(lane < 4 && lane >= 0);
On 2015/06/03 13:27:15, titzer wrote:
Looks like we are only supporting little endian for now. I suppose
that's OK.

I guess there aren't any big-endian media instruction sets? However,
it's easy enough to support here. Done.

https://codereview.chromium.org/1153373003/diff/140001/src/objects.cc
File src/objects.cc (right):

https://codereview.chromium.org/1153373003/diff/140001/src/objects.cc#newcode100
src/objects.cc:100: if (IsFloat32x4()) return
Float32x4::cast(this)->Float32x4BooleanValue();
On 2015/06/03 13:27:15, titzer wrote:
Maybe it's better just to return true for now here, since the rest of
the system
will treat all objects as true. There'll be a lot of work to make the
value-objectness work correctly in V8, so let's just be consistent for
now.

Done. (I'll remove the Float32x4BooleanValue() function too.)

https://codereview.chromium.org/1153373003/diff/140001/src/objects.h
File src/objects.h (right):

https://codereview.chromium.org/1153373003/diff/140001/src/objects.h#newcode1621
src/objects.h:1621: inline double get_lane(int lane) const;
On 2015/06/03 13:27:15, titzer wrote:
I think we should float here too.

Done.

https://codereview.chromium.org/1153373003/diff/140001/src/objects.h#newcode1634
src/objects.h:1634: #if defined(V8_TARGET_LITTLE_ENDIAN)
On 2015/06/03 13:27:15, titzer wrote:
Can we leave these out of the header to force users to go through the
get_lane()
and set_lane() methods?

Done (I just deleted them, since they're not used anywhere and I'm not
sure they're needed.)

https://codereview.chromium.org/1153373003/diff/140001/test/cctest/test-heap.cc
File test/cctest/test-heap.cc (right):

https://codereview.chromium.org/1153373003/diff/140001/test/cctest/test-heap.cc#newcode187
test/cctest/test-heap.cc:187: value = factory->NewFloat32x4(1, 2, 3, 4);
On 2015/06/03 13:27:15, titzer wrote:
Can we try some more floating point values, and also -0.0 and NaN
values?

You can write your own method with lots of example values and
exhaustive reading
and writing of the individual lanes.

Done.

https://codereview.chromium.org/1153373003/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to