Chromium Code Reviews| Index: runtime/lib/typed_data.cc |
| =================================================================== |
| --- runtime/lib/typed_data.cc (revision 23089) |
| +++ runtime/lib/typed_data.cc (working copy) |
| @@ -110,6 +110,7 @@ |
| return Bool::True().raw(); |
| } |
| + |
|
Ivan Posva
2013/05/23 21:37:54
ditto
zra
2013/05/23 22:14:38
Not sure what this is dittoing.
|
| DEFINE_NATIVE_ENTRY(TypedData_setRange, 5) { |
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, dst, arguments->NativeArgAt(0)); |
| GET_NON_NULL_NATIVE_ARGUMENT(Smi, dst_start, arguments->NativeArgAt(1)); |
| @@ -255,13 +256,9 @@ |
| args.SetAt(0, error); \ |
| Exceptions::ThrowByType(Exceptions::kArgument, args); \ |
| } \ |
| - Integer& result = Integer::Handle(); \ |
| - if (value > static_cast<uint64_t>(Mint::kMaxValue)) { \ |
| - result = BigintOperations::NewFromUint64(value); \ |
| - } else { \ |
| - result = Integer::New(value); \ |
| - } \ |
| - return result.raw(); \ |
| + const Bigint& result = \ |
|
Ivan Posva
2013/05/23 21:37:54
This instance feels like it would be better served
zra
2013/05/23 22:14:38
Done.
|
| + Bigint::Handle(BigintOperations::NewFromUint64(value)); \ |
| + return result.AsValidInteger(); \ |
| } \ |
| @@ -405,10 +402,8 @@ |
| } else { |
| value = Utils::HostToBigEndian64(value); |
| } |
| - if (value > static_cast<uint64_t>(Mint::kMaxValue)) { |
| - return BigintOperations::NewFromUint64(value); |
| - } |
| - return Integer::New(value); |
| + const Bigint& result = Bigint::Handle(BigintOperations::NewFromUint64(value)); |
|
Ivan Posva
2013/05/23 21:37:54
ditto
zra
2013/05/23 22:14:38
Done.
|
| + return result.AsValidInteger(); |
| } |