https://codereview.chromium.org/72323003/diff/1/src/v8conversions.h
File src/v8conversions.h (right):
https://codereview.chromium.org/72323003/diff/1/src/v8conversions.h#newcode64
src/v8conversions.h:64: CHECK(value >= 0
On 2013/11/14 10:17:48, Jakob wrote:
Not that it makes a big difference, but it's sufficient to:
CHECK(value >= 0);
ASSERT(static_cast<unsigned>(value) <=
std::numeric_limits<size_t>::max());
or even:
STATIC_ASSERT(Smi::kMaxValue <= std::numeric_limits<size_t>::max());
if that numeric_limits call is static assert capable.
Great suggestion, this is by far the commonest case so shaving a couple
cycles here is useful.
https://codereview.chromium.org/72323003/
--
--
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.