bd110db87a
1. When the input to a BoxInteger operation is in smi-range, we can eliminate the range check and just perform a smi-tag operation on the input. 2. There was a bug in checking for smi-overflow for range boundaries: Calling Smi::IsValid with a int64_t argument resulted in silent truncation of the input and therefore a wrong result. Compiling with -Wconversion would have caught this, but currently we cannot compile with this flag because of too many broken places. Instead, I removed Smi::IsValid64 and created one variant Smi::IsValid that is specialized for the input type with a template parameter. This way calling Smi::IsValid is always safe and will never result in silent alteration of the input argument. R=vegorov@google.com Review URL: https://codereview.chromium.org//353513002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37657 260f80e4-7a28-3924-810f-c04153c831b5