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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11967012: Optimized loads/stores for scalar list: Uint8Clamped, Int8, Int16, Uint16. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 7 years, 11 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.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 17135)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -1131,9 +1131,12 @@
case kFloat32ArrayCid :
case kFloat64ArrayCid :
return Type::Double();
+ case kInt8ArrayCid:
case kUint8ArrayCid:
case kUint8ClampedArrayCid:
case kExternalUint8ArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
return Type::IntType();
default:
UNIMPLEMENTED();
@@ -1150,9 +1153,12 @@
case kFloat32ArrayCid :
case kFloat64ArrayCid :
return kDoubleCid;
+ case kInt8ArrayCid:
case kUint8ArrayCid:
case kUint8ClampedArrayCid:
case kExternalUint8ArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
return kSmiCid;
default:
UNIMPLEMENTED();
@@ -1165,9 +1171,12 @@
switch (class_id_) {
case kArrayCid:
case kImmutableArrayCid:
+ case kInt8ArrayCid:
case kUint8ArrayCid:
case kUint8ClampedArrayCid:
case kExternalUint8ArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
return kTagged;
case kFloat32ArrayCid :
case kFloat64ArrayCid :
@@ -1190,7 +1199,11 @@
ASSERT(idx == 2);
switch (class_id_) {
case kArrayCid:
+ case kInt8ArrayCid:
case kUint8ArrayCid:
+ case kUint8ClampedArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
return kTagged;
case kFloat32ArrayCid :
case kFloat64ArrayCid :
@@ -2705,12 +2718,24 @@
void LoadIndexedInstr::InferRange() {
switch (class_id()) {
+ case kInt8ArrayCid:
+ range_ = new Range(RangeBoundary::FromConstant(-128),
+ RangeBoundary::FromConstant(127));
+ break;
case kUint8ArrayCid:
case kUint8ClampedArrayCid:
case kExternalUint8ArrayCid:
range_ = new Range(RangeBoundary::FromConstant(0),
RangeBoundary::FromConstant(255));
break;
+ case kInt16ArrayCid:
+ range_ = new Range(RangeBoundary::FromConstant(-32768),
+ RangeBoundary::FromConstant(32767));
+ break;
+ case kUint16ArrayCid:
+ range_ = new Range(RangeBoundary::FromConstant(0),
+ RangeBoundary::FromConstant(65535));
+ break;
default:
Definition::InferRange();
break;
« 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