Index: runtime/vm/intermediate_language_arm.cc |
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc |
index 273cf851aaafb39bfe096a21117297193a4383b1..f12db82315dc5b9b5fbacdff5e5fcd374f103778 100644 |
--- a/runtime/vm/intermediate_language_arm.cc |
+++ b/runtime/vm/intermediate_language_arm.cc |
@@ -1116,9 +1116,11 @@ CompileType LoadIndexedInstr::ComputeType() const { |
return CompileType::FromCid(kSmiCid); |
case kTypedDataInt32ArrayCid: |
- case kTypedDataUint32ArrayCid: |
return Typed32BitIsSmi() ? CompileType::FromCid(kSmiCid) |
Vyacheslav Egorov (Google)
2014/09/30 15:06:01
Any reason you don't want to support Int32List too
Cutch
2014/09/30 15:39:12
Done.
|
- : CompileType::FromCid(kMintCid); |
+ : CompileType::FromCid(kMintCid); |
+ |
+ case kTypedDataUint32ArrayCid: |
+ return CompileType::FromCid(kMintCid); |
Vyacheslav Egorov (Google)
2014/09/30 15:06:02
This is not correct actually: boxing can result in
Cutch
2014/09/30 15:39:12
Done. Here and above.
|
default: |
UNREACHABLE(); |
@@ -1142,8 +1144,9 @@ Representation LoadIndexedInstr::representation() const { |
case kTwoByteStringCid: |
return kTagged; |
case kTypedDataInt32ArrayCid: |
- case kTypedDataUint32ArrayCid: |
return Typed32BitIsSmi() ? kTagged : kUnboxedMint; |
+ case kTypedDataUint32ArrayCid: |
+ return kUnboxedUint32; |
case kTypedDataFloat32ArrayCid: |
case kTypedDataFloat64ArrayCid: |
return kUnboxedDouble; |
@@ -1229,6 +1232,8 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary(Isolate* isolate, |
} else if (representation() == kUnboxedMint) { |
locs->set_out(0, Location::Pair(Location::RequiresRegister(), |
Location::RequiresRegister())); |
+ } else if (representation() == kUnboxedUint32) { |
+ locs->set_out(0, Location::RequiresRegister()); |
} else { |
ASSERT(representation() == kTagged); |
locs->set_out(0, Location::RequiresRegister()); |
@@ -1293,12 +1298,6 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// Sign extend into high word. |
__ SignFill(result2, result1); |
break; |
- case kTypedDataUint32ArrayCid: |
- // Load low word. |
- __ ldr(result1, element_address); |
- // Zero high word. |
- __ eor(result2, result2, Operand(result2)); |
- break; |
default: |
UNREACHABLE(); |
break; |
@@ -1306,6 +1305,13 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
return; |
} |
+ if (representation() == kUnboxedUint32) { |
+ ASSERT(class_id() == kTypedDataUint32ArrayCid); |
+ const Register result = locs()->out(0).reg(); |
+ __ ldr(result, element_address); |
+ return; |
+ } |
+ |
ASSERT(representation() == kTagged); |
const Register result = locs()->out(0).reg(); |