http://codereview.chromium.org/460109/diff/3001/3006 File src/x64/codegen-x64.cc (right):
http://codereview.chromium.org/460109/diff/3001/3006#newcode7953 src/x64/codegen-x64.cc:7953: ASSERT((String::kMaxLength & 0x80000000) == 0); It's definitly true that kMaxLength isn't negative. Whether it's the same as not having bit 31 set, that's a different question :) We assume that int is 32-bit in many, many places already, and you read the string length from a 32-bit field in other parts of this code, so string lengths are necessarily restricted to 32 bits. kMaxLength should probably be unsigned, but the "above" test takes care of that anyway. That strings lengths are actually less than 31 bits is more important to check above, where you add two lengths and don't check for overflow (you don't need to, but it isn't asserted there). http://codereview.chromium.org/460109/diff/3001/3007 File src/x64/codegen-x64.h (right): http://codereview.chromium.org/460109/diff/3001/3007#newcode763 src/x64/codegen-x64.h:763: int MinorKey() { return string_check_ ? 0 : 1; } Yes, but if you just return string_check from a method returning int, it will be converted. Here you actively swap the 0 and 1 values, and I was wondering if there was a reason for that. http://codereview.chromium.org/460109 -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
