Landing...

https://codereview.chromium.org/15735005/diff/35001/src/arm/code-stubs-arm.cc
File src/arm/code-stubs-arm.cc (right):

https://codereview.chromium.org/15735005/diff/35001/src/arm/code-stubs-arm.cc#newcode2230
src/arm/code-stubs-arm.cc:2230: __ VFPCompareAndSetFlags(d1, d8);
On 2013/06/03 16:33:17, Rodolph Perfetta wrote:
Wouldn't it be possible to compare to the already converted int32:

   __ cmp(right, Operand(fixed_right_arg_value());

Hmmm, unless I misunderstood things, 'right' doesn't contain the int32
value at that point, it still contains the right operand, which could be
a Smi or a HeapNumber. On Intel things are different, the conversion
macro instructions set both floating register *and* a normal one.
Because this doesn't appear to be the case here, I did it the other way
round (int=>double, then compare the double).

Nevertheless, if you see some way to improve this, I'll be happy to
review the change.

https://codereview.chromium.org/15735005/diff/35001/src/code-stubs.h
File src/code-stubs.h (right):

https://codereview.chromium.org/15735005/diff/35001/src/code-stubs.h#newcode942
src/code-stubs.h:942:
FixedRightArgValueBits::is_valid(WhichPowerOf2(value));
On 2013/06/03 15:12:05, Jakob wrote:
nit: It would be nice to s/WhichPowerOf2/encode_arg_value/ here,
however that
would create an infinite recursion with the ASSERT in
encode_arg_value(). You'd
have to move the ASSERT to the call sites, i.e. into the two ctors.
Your call.
(Yet another alternative would be to split encode_arg_value into an
entry point
and and ..._internal function, but that seems overkill.)

I had exactly the same thoughts when writing this, but I consciously
ended up with the current version: Moving an ASSERT to the call sites
feels fundamentally wrong, doing it 2 times feels even more wrong. Using
an ..._internal function seems to be overkill, furthermore the
IsPowerOf2 and WhichPowerOf2 really belong together. What one *really*
wants here semantically is a function with type 'int32_t -> Maybe
FixedRightArgValueBits'. C++ sucks...

Anyway, all this cr^H^H stuff should go away when we have a more general
way of attaching type feedback than our current glorious 25 bits. :-P

https://codereview.chromium.org/15735005/

--
--
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/groups/opt_out.


Reply via email to