https://codereview.chromium.org/1133243006/diff/20001/src/heap/heap.h
File src/heap/heap.h (right):

https://codereview.chromium.org/1133243006/diff/20001/src/heap/heap.h#newcode1084
src/heap/heap.h:1084: if (sizeof(int) < sizeof(int64_t) && total >
kMaxInt) {
On 2015/05/19 14:23:25, Jakob wrote:
Isn't "sizeof(int) < sizeof(int64_t)" true on all platforms?

Currently, yes (see http://www.unix.org/whitepapers/64bit.html), but
there's no fundamental reason why there can't be an IP64 platform. :-}

How about we change the original line to:

if (total > std::numeric_limits<intptr_t>::max()) {
   return std::numeric_limits<intptr_t>::max();
}

Looks OK to me, but I'm really puzzled by all those types used for sizes
here (int, int64_t, intptr_t), this looks really scary and error-prone.
Perhaps we should consistently use (s)size_t or ptrdiff_t? o_O

https://codereview.chromium.org/1133243006/

--
--
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.

Reply via email to