| Index: runtime/vm/object.cc
|
| ===================================================================
|
| --- runtime/vm/object.cc (revision 26025)
|
| +++ runtime/vm/object.cc (working copy)
|
| @@ -11496,11 +11496,13 @@
|
| }
|
|
|
|
|
| -RawInteger* Integer::New(int64_t value, Heap::Space space) {
|
| +RawInteger* Integer::New(int64_t value, Heap::Space space, const bool silent) {
|
| if ((value <= Smi::kMaxValue) && (value >= Smi::kMinValue)) {
|
| return Smi::New(value);
|
| }
|
| - if (FLAG_throw_on_javascript_int_overflow && !IsJavascriptInt(value)) {
|
| + if (!silent &&
|
| + FLAG_throw_on_javascript_int_overflow &&
|
| + !IsJavascriptInt(value)) {
|
| const Integer &i = Integer::Handle(Mint::New(value));
|
| ThrowJavascriptIntegerOverflow(i);
|
| }
|
| @@ -11743,7 +11745,9 @@
|
|
|
|
|
| // TODO(srdjan): Clarify handling of negative right operand in a shift op.
|
| -RawInteger* Smi::ShiftOp(Token::Kind kind, const Smi& other) const {
|
| +RawInteger* Smi::ShiftOp(Token::Kind kind,
|
| + const Smi& other,
|
| + const bool silent) const {
|
| intptr_t result = 0;
|
| const intptr_t left_value = Value();
|
| const intptr_t right_value = other.Value();
|
| @@ -11762,7 +11766,7 @@
|
| right_value);
|
| } else {
|
| int64_t left_64 = left_value;
|
| - return Integer::New(left_64 << right_value);
|
| + return Integer::New(left_64 << right_value, Heap::kNew, silent);
|
| }
|
| }
|
| }
|
|
|