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

Unified Diff: src/hydrogen.cc

Issue 1288313003: [strong] Fix weird work-around for magic truncating int conversions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 9b2a2f6a078341f7cacbc40eaec9557450444801..204a300bda4645102ece56251354fb71c67939ac 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -11008,23 +11008,6 @@ HValue* HGraphBuilder::BuildBinaryOperation(
Add<HPushArguments>(left, right);
instr = AddUncasted<HInvokeFunction>(function, 2);
} else {
- if (is_strong(strength) && Token::IsBitOp(op)) {
- // TODO(conradw): This is not efficient, but is necessary to prevent
- // conversion of oddball values to numbers in strong mode. It would be
- // better to prevent the conversion rather than adding a runtime check.
- IfBuilder if_builder(this);
- if_builder.If<HHasInstanceTypeAndBranch>(left, ODDBALL_TYPE);
- if_builder.OrIf<HHasInstanceTypeAndBranch>(right, ODDBALL_TYPE);
- if_builder.Then();
- Add<HCallRuntime>(
- isolate()->factory()->empty_string(),
- Runtime::FunctionForId(Runtime::kThrowStrongModeImplicitConversion),
- 0);
- if (!graph()->info()->IsStub()) {
- Add<HSimulate>(opt_id, REMOVABLE_SIMULATE);
- }
- if_builder.End();
- }
switch (op) {
case Token::ADD:
instr = AddUncasted<HAdd>(left, right, strength);
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698