Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: runtime/lib/integers.cc

Issue 1690903003: Remove support for Javascript warnings in the VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/identical.cc ('k') | runtime/lib/math_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/integers.cc
diff --git a/runtime/lib/integers.cc b/runtime/lib/integers.cc
index 8deeee437b07c954136755346862d61097749d98..9478fcc40088e4dffe6325e456e6b5f5c6054320 100644
--- a/runtime/lib/integers.cc
+++ b/runtime/lib/integers.cc
@@ -251,17 +251,15 @@ DEFINE_NATIVE_ENTRY(Integer_fromEnvironment, 3) {
}
-// Passing true for 'silent' prevents throwing JavascriptIntegerOverflow.
static RawInteger* ShiftOperationHelper(Token::Kind kind,
const Integer& value,
- const Smi& amount,
- const bool silent = false) {
+ const Smi& amount) {
if (amount.Value() < 0) {
Exceptions::ThrowArgumentError(amount);
}
if (value.IsSmi()) {
const Smi& smi_value = Smi::Cast(value);
- return smi_value.ShiftOp(kind, amount, Heap::kNew, silent);
+ return smi_value.ShiftOp(kind, amount, Heap::kNew);
}
if (value.IsMint()) {
const int64_t mint_value = value.AsInt64Value();
@@ -273,11 +271,11 @@ static RawInteger* ShiftOperationHelper(Token::Kind kind,
if ((count + shift_count) < Mint::kBits) {
switch (kind) {
case Token::kSHL:
- return Integer::New(mint_value << shift_count, Heap::kNew, silent);
+ return Integer::New(mint_value << shift_count, Heap::kNew);
case Token::kSHR:
shift_count =
(-shift_count > Mint::kBits) ? Mint::kBits : -shift_count;
- return Integer::New(mint_value >> shift_count, Heap::kNew, silent);
+ return Integer::New(mint_value >> shift_count, Heap::kNew);
default:
UNIMPLEMENTED();
}
@@ -307,7 +305,7 @@ DEFINE_NATIVE_ENTRY(Integer_leftShiftWithMask32, 3) {
}
const Smi& smi_shift_count = Smi::Cast(shift_count);
const Integer& shift_result = Integer::Handle(
- ShiftOperationHelper(Token::kSHL, value, smi_shift_count, true));
+ ShiftOperationHelper(Token::kSHL, value, smi_shift_count));
const Integer& result =
Integer::Handle(shift_result.BitOp(Token::kBIT_AND, mask));
return result.AsValidInteger();
« no previous file with comments | « runtime/lib/identical.cc ('k') | runtime/lib/math_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698