| Index: runtime/vm/flow_graph_optimizer.cc
|
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
|
| index f5333546f2ed98d51cc45fded39181aab427b875..c9b9b0ad3187e9cf40c09507e318d5f286e0d54e 100644
|
| --- a/runtime/vm/flow_graph_optimizer.cc
|
| +++ b/runtime/vm/flow_graph_optimizer.cc
|
| @@ -75,6 +75,7 @@ static bool CanConvertUnboxedMintToDouble() {
|
| #endif
|
| }
|
|
|
| +
|
| // Optimize instance calls using ICData.
|
| void FlowGraphOptimizer::ApplyICData() {
|
| VisitBlocks();
|
| @@ -628,6 +629,8 @@ void FlowGraphOptimizer::InsertConversion(Representation from,
|
| converted = new(I) UnboxIntegerInstr(use->CopyWithType(), deopt_id);
|
| } else if ((from == kUnboxedMint) && (to == kTagged)) {
|
| converted = new(I) BoxIntegerInstr(use->CopyWithType());
|
| + } else if ((from == kUnboxedUint32) && (to == kTagged)) {
|
| + converted = new(I) BoxUint32Instr(use->CopyWithType());
|
| } else if (IsUnboxedInteger(from) && IsUnboxedInteger(to)) {
|
| const intptr_t deopt_id = (to == kUnboxedInt32) && (deopt_target != NULL) ?
|
| deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId;
|
| @@ -1355,7 +1358,12 @@ bool FlowGraphOptimizer::InlineSetIndexed(
|
| RawObject::IsTypedDataViewClassId(array_cid) ||
|
| RawObject::IsExternalTypedDataClassId(array_cid)) ? kNoStoreBarrier
|
| : kEmitStoreBarrier;
|
| - if (!value_check.IsNull()) {
|
| +
|
| + // No need to class check stores to Int32 and Uint32 arrays because
|
| + // we insert unboxing instructions below which include a class check.
|
| + if ((array_cid != kTypedDataUint32ArrayCid) &&
|
| + (array_cid != kTypedDataInt32ArrayCid) &&
|
| + !value_check.IsNull()) {
|
| // No store barrier needed because checked value is a smi, an unboxed mint,
|
| // an unboxed double, an unboxed Float32x4, or unboxed Int32x4.
|
| needs_store_barrier = kNoStoreBarrier;
|
|
|