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

Unified Diff: runtime/vm/intermediate_language_arm64.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/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm64.cc
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index e8bd7597d3008cd8dd183741aa604c70c5e6284f..0029aaf6d2f2914f4bb4dbecf3106d7508fa4b9c 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -2667,20 +2667,6 @@ void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
-static void EmitJavascriptOverflowCheck(FlowGraphCompiler* compiler,
- Range* range,
- Label* overflow,
- Register result) {
- if (!RangeUtils::IsWithin(range, -0x20000000000000LL, 0x20000000000000LL)) {
- ASSERT(overflow != NULL);
- __ LoadImmediate(TMP, 0x20000000000000LL);
- __ add(TMP2, result, Operand(TMP));
- __ cmp(TMP2, Operand(TMP, LSL, 1));
- __ b(overflow, HI);
- }
-}
-
-
static void EmitSmiShiftLeft(FlowGraphCompiler* compiler,
BinarySmiOpInstr* shift_left) {
const LocationSummary& locs = *shift_left->locs();
@@ -2704,9 +2690,6 @@ static void EmitSmiShiftLeft(FlowGraphCompiler* compiler,
}
// Shift for result now we know there is no overflow.
__ LslImmediate(result, left, value);
- if (FLAG_throw_on_javascript_int_overflow) {
- EmitJavascriptOverflowCheck(compiler, shift_left->range(), deopt, result);
- }
return;
}
@@ -2736,9 +2719,6 @@ static void EmitSmiShiftLeft(FlowGraphCompiler* compiler,
__ SmiUntag(TMP, right);
__ lslv(result, left, TMP);
}
- if (FLAG_throw_on_javascript_int_overflow) {
- EmitJavascriptOverflowCheck(compiler, shift_left->range(), deopt, result);
- }
return;
}
@@ -2783,9 +2763,6 @@ static void EmitSmiShiftLeft(FlowGraphCompiler* compiler,
// Shift for result now we know there is no overflow.
__ lslv(result, left, TMP);
}
- if (FLAG_throw_on_javascript_int_overflow) {
- EmitJavascriptOverflowCheck(compiler, shift_left->range(), deopt, result);
- }
}
@@ -2921,9 +2898,6 @@ void BinarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
UNREACHABLE();
break;
}
- if (FLAG_throw_on_javascript_int_overflow) {
- EmitJavascriptOverflowCheck(compiler, range(), deopt, result);
- }
return;
}
@@ -3066,9 +3040,6 @@ void BinarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
UNREACHABLE();
break;
}
- if (FLAG_throw_on_javascript_int_overflow) {
- EmitJavascriptOverflowCheck(compiler, range(), deopt, result);
- }
}
@@ -4527,9 +4498,6 @@ void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptUnaryOp);
__ subs(result, ZR, Operand(value));
__ b(deopt, VS);
- if (FLAG_throw_on_javascript_int_overflow) {
- EmitJavascriptOverflowCheck(compiler, range(), deopt, value);
- }
break;
}
case Token::kBIT_NOT:
@@ -4645,9 +4613,6 @@ void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ CompareImmediate(result, 0xC000000000000000);
__ b(&do_call, MI);
__ SmiTag(result);
- if (FLAG_throw_on_javascript_int_overflow) {
- EmitJavascriptOverflowCheck(compiler, range(), &do_call, result);
- }
__ b(&done);
__ Bind(&do_call);
__ Push(value_obj);
@@ -4695,9 +4660,6 @@ void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ CompareImmediate(result, 0xC000000000000000);
__ b(deopt, MI);
__ SmiTag(result);
- if (FLAG_throw_on_javascript_int_overflow) {
- EmitJavascriptOverflowCheck(compiler, range(), deopt, result);
- }
}
@@ -5011,9 +4973,6 @@ void MergedMathInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ add(TMP, result_mod, Operand(right));
__ csel(result_mod, TMP, TMP2, GE);
__ Bind(&done);
- // FLAG_throw_on_javascript_int_overflow: not needed.
- // Note that the result of an integer division/modulo of two
- // in-range arguments, cannot create out-of-range result.
return;
}
if (kind() == MergedMathInstr::kSinCos) {
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698