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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 19395003: Cleanups. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 25102)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -230,9 +230,9 @@
// Replace Mint op with Smi op.
BinarySmiOpInstr* smi_op = new BinarySmiOpInstr(
Token::kBIT_AND,
- bit_and_instr->AsBinaryMintOp()->instance_call(),
new Value(left_instr),
- new Value(right_instr));
+ new Value(right_instr),
+ bit_and_instr->deopt_id());
bit_and_instr->ReplaceWith(smi_op, current_iterator());
}
}
@@ -734,7 +734,7 @@
InsertBefore(call,
new CheckArrayBoundInstr(new Value(length),
new Value(*index),
- call),
+ call->deopt_id()),
call->env(),
Definition::kEffect);
@@ -1106,25 +1106,25 @@
InsertBefore(call,
new CheckEitherNonSmiInstr(new Value(left),
new Value(right),
- call),
+ call->deopt_id()),
call->env(),
Definition::kEffect);
BinaryDoubleOpInstr* double_bin_op =
new BinaryDoubleOpInstr(op_kind, new Value(left), new Value(right),
- call);
+ call->deopt_id());
ReplaceCall(call, double_bin_op);
} else if (operands_type == kMintCid) {
if (!FlowGraphCompiler::SupportsUnboxedMints()) return false;
if ((op_kind == Token::kSHR) || (op_kind == Token::kSHL)) {
ShiftMintOpInstr* shift_op =
new ShiftMintOpInstr(op_kind, new Value(left), new Value(right),
- call);
+ call->deopt_id());
ReplaceCall(call, shift_op);
} else {
BinaryMintOpInstr* bin_op =
new BinaryMintOpInstr(op_kind, new Value(left), new Value(right),
- call);
+ call->deopt_id());
ReplaceCall(call, bin_op);
}
} else if (operands_type == kFloat32x4Cid) {
@@ -1185,9 +1185,10 @@
ConstantInstr* constant =
flow_graph()->GetConstant(Smi::Handle(Smi::New(value - 1)));
BinarySmiOpInstr* bin_op =
- new BinarySmiOpInstr(Token::kBIT_AND, call,
+ new BinarySmiOpInstr(Token::kBIT_AND,
new Value(left),
- new Value(constant));
+ new Value(constant),
+ call->deopt_id());
ReplaceCall(call, bin_op);
} else {
ASSERT(operands_type == kSmiCid);
@@ -1203,7 +1204,8 @@
right = temp;
}
BinarySmiOpInstr* bin_op =
- new BinarySmiOpInstr(op_kind, call, new Value(left), new Value(right));
+ new BinarySmiOpInstr(op_kind, new Value(left), new Value(right),
+ call->deopt_id());
ReplaceCall(call, bin_op);
}
return true;
@@ -1220,11 +1222,12 @@
new CheckSmiInstr(new Value(input), call->deopt_id()),
call->env(),
Definition::kEffect);
- unary_op = new UnarySmiOpInstr(op_kind, call, new Value(input));
+ unary_op = new UnarySmiOpInstr(op_kind, new Value(input), call->deopt_id());
} else if ((op_kind == Token::kBIT_NOT) &&
HasOnlySmiOrMint(*call->ic_data()) &&
FlowGraphCompiler::SupportsUnboxedMints()) {
- unary_op = new UnaryMintOpInstr(op_kind, new Value(input), call);
+ unary_op = new UnaryMintOpInstr(
+ op_kind, new Value(input), call->deopt_id());
} else if (HasOnlyOneDouble(*call->ic_data()) &&
(op_kind == Token::kNEGATE)) {
AddReceiverCheck(call);
@@ -1233,7 +1236,7 @@
unary_op = new BinaryDoubleOpInstr(Token::kMUL,
new Value(input),
new Value(minus_one),
- call);
+ call->deopt_id());
}
if (unary_op == NULL) return false;
@@ -1615,7 +1618,7 @@
InsertBefore(call,
new CheckArrayBoundInstr(new Value(length),
new Value(index),
- call),
+ call->deopt_id()),
call->env(),
Definition::kEffect);
}
@@ -1770,7 +1773,7 @@
d2i_instr = new DoubleToIntegerInstr(new Value(input), call);
} else {
// Optimistically assume result fits into Smi.
- d2i_instr = new DoubleToSmiInstr(new Value(input), call);
+ d2i_instr = new DoubleToSmiInstr(new Value(input), call->deopt_id());
}
ReplaceCall(call, d2i_instr);
return true;
@@ -1789,8 +1792,7 @@
AddReceiverCheck(call);
DoubleToDoubleInstr* d2d_instr =
new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)),
- call,
- recognized_kind);
+ recognized_kind, call->deopt_id());
ReplaceCall(call, d2d_instr);
}
return true;
@@ -2239,16 +2241,16 @@
flow_graph()->GetConstant(Smi::Handle(Smi::New(element_size)));
BinarySmiOpInstr* len_in_bytes =
new BinarySmiOpInstr(Token::kMUL,
- call,
new Value(length),
- new Value(bytes_per_element));
+ new Value(bytes_per_element),
+ call->deopt_id());
InsertBefore(call, len_in_bytes, call->env(), Definition::kValue);
// Check byte_index < len_in_bytes.
InsertBefore(call,
new CheckArrayBoundInstr(new Value(len_in_bytes),
new Value(byte_index),
- call),
+ call->deopt_id()),
call->env(),
Definition::kEffect);
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698