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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 612553002: Make LoadIndexedInstr for Uint32List use kUnboxedUint32 representation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698