Chromium Code Reviews| Index: runtime/lib/integers.cc |
| =================================================================== |
| --- runtime/lib/integers.cc (revision 23089) |
| +++ runtime/lib/integers.cc (working copy) |
| @@ -256,10 +256,16 @@ |
| big_value = Bigint::Cast(value).raw(); |
| } |
| switch (kind) { |
| - case Token::kSHL: |
| - return BigintOperations::ShiftLeft(big_value, amount.Value()); |
| - case Token::kSHR: |
| - return BigintOperations::ShiftRight(big_value, amount.Value()); |
| + case Token::kSHL: { |
| + const Bigint& big = Bigint::Handle( |
| + BigintOperations::ShiftLeft(big_value, amount.Value())); |
| + return big.AsValidInteger(); |
|
Ivan Posva
2013/05/23 21:37:54
Aren't these here redundant as the result will be
zra
2013/05/23 22:14:38
You're right. I've removed the changes here.
|
| + } |
| + case Token::kSHR: { |
| + const Bigint& big = Bigint::Handle( |
| + BigintOperations::ShiftRight(big_value, amount.Value())); |
| + return big.AsValidInteger(); |
| + } |
| default: |
| UNIMPLEMENTED(); |
| } |
| @@ -304,6 +310,7 @@ |
| return Smi::New(result); |
| } |
| + |
|
Ivan Posva
2013/05/23 21:37:54
Two lines!
zra
2013/05/23 22:14:38
There are two lines between the bottom of the func
|
| // Mint natives. |
| DEFINE_NATIVE_ENTRY(Mint_bitNegate, 1) { |
| @@ -316,6 +323,7 @@ |
| return Integer::New(result); |
| } |
| + |
| // Bigint natives. |
| DEFINE_NATIVE_ENTRY(Bigint_bitNegate, 1) { |