| Index: runtime/vm/intermediate_language.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.cc (revision 36427)
|
| +++ runtime/vm/intermediate_language.cc (working copy)
|
| @@ -1634,8 +1634,20 @@
|
| }
|
|
|
|
|
| +static bool HasTryBlockUse(Value* use_list) {
|
| + for (Value::Iterator it(use_list); !it.Done(); it.Advance()) {
|
| + Value* use = it.Current();
|
| + if (use->instruction()->MayThrow() &&
|
| + use->instruction()->GetBlock()->InsideTryBlock()) {
|
| + return true;
|
| + }
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +
|
| Definition* BoxDoubleInstr::Canonicalize(FlowGraph* flow_graph) {
|
| - if (input_use_list() == NULL) {
|
| + if ((input_use_list() == NULL) && !HasTryBlockUse(env_use_list())) {
|
| // Environments can accomodate any representation. No need to box.
|
| return value()->definition();
|
| }
|
| @@ -1670,7 +1682,7 @@
|
|
|
|
|
| Definition* BoxFloat32x4Instr::Canonicalize(FlowGraph* flow_graph) {
|
| - if (input_use_list() == NULL) {
|
| + if ((input_use_list() == NULL) && !HasTryBlockUse(env_use_list())) {
|
| // Environments can accomodate any representation. No need to box.
|
| return value()->definition();
|
| }
|
| @@ -1693,7 +1705,7 @@
|
|
|
|
|
| Definition* BoxFloat64x2Instr::Canonicalize(FlowGraph* flow_graph) {
|
| - if (input_use_list() == NULL) {
|
| + if ((input_use_list() == NULL) && !HasTryBlockUse(env_use_list())) {
|
| // Environments can accomodate any representation. No need to box.
|
| return value()->definition();
|
| }
|
| @@ -1717,7 +1729,7 @@
|
|
|
|
|
| Definition* BoxInt32x4Instr::Canonicalize(FlowGraph* flow_graph) {
|
| - if (input_use_list() == NULL) {
|
| + if ((input_use_list() == NULL) && !HasTryBlockUse(env_use_list())) {
|
| // Environments can accomodate any representation. No need to box.
|
| return value()->definition();
|
| }
|
|
|