Chromium Code Reviews| Index: runtime/vm/flow_graph_optimizer.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_optimizer.cc (revision 18818) |
| +++ runtime/vm/flow_graph_optimizer.cc (working copy) |
| @@ -688,6 +688,11 @@ |
| } |
| case kInt32ArrayCid: |
| case kUint32ArrayCid: |
| + // Check if elements fit into a smi or the platform supports unboxed |
|
Vyacheslav Egorov (Google)
2013/02/22 13:20:43
Consider moving this to the function start and usi
|
| + // mints. |
| + if ((kSmiBits < 32) && !FlowGraphCompiler::SupportsUnboxedMints()) { |
| + return false; |
| + } |
| // We don't have ICData for the value stored, so we optimistically assume |
| // smis first. If we ever deoptimized here, we require to unbox the value |
| // before storing to handle the mint case, too. |
| @@ -1526,9 +1531,19 @@ |
| array_op = BuildByteArrayViewLoad(call, class_ids[0], kUint16ArrayCid); |
| break; |
| case MethodRecognizer::kByteArrayBaseGetInt32: |
| + // Check if elements fit into a smi or the platform supports unboxed |
|
Vyacheslav Egorov (Google)
2013/02/22 13:20:43
Consider moving this to the function start and usi
|
| + // mints. |
| + if ((kSmiBits < 32) && !FlowGraphCompiler::SupportsUnboxedMints()) { |
| + return false; |
| + } |
| array_op = BuildByteArrayViewLoad(call, class_ids[0], kInt32ArrayCid); |
| break; |
| case MethodRecognizer::kByteArrayBaseGetUint32: |
| + // Check if elements fit into a smi or the platform supports unboxed |
|
Vyacheslav Egorov (Google)
2013/02/22 13:20:43
Consider moving this to the function start and usi
|
| + // mints. |
| + if ((kSmiBits < 32) && !FlowGraphCompiler::SupportsUnboxedMints()) { |
| + return false; |
| + } |
| array_op = BuildByteArrayViewLoad(call, class_ids[0], kUint32ArrayCid); |
| break; |
| case MethodRecognizer::kByteArrayBaseGetFloat32: |