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

Unified Diff: runtime/vm/flow_graph_optimizer.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_compiler_x64.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 17135)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -598,7 +598,11 @@
value_check = call->ic_data()->AsUnaryClassChecksForArgNr(2);
}
break;
+ case kInt8ArrayCid:
case kUint8ArrayCid:
+ case kUint8ClampedArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
// Check that value is always smi.
value_check = call->ic_data()->AsUnaryClassChecksForArgNr(2);
if ((value_check.NumberOfChecks() != 1) ||
@@ -649,14 +653,19 @@
type_args = new Value(load_type_args);
break;
}
+ case kInt8ArrayCid:
case kUint8ArrayCid:
+ case kUint8ClampedArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
+ ASSERT(value_type.IsIntType());
+ // Fall through.
case kFloat32ArrayCid:
case kFloat64ArrayCid: {
ConstantInstr* null_constant = new ConstantInstr(Object::ZoneHandle());
InsertBefore(call, null_constant, NULL, Definition::kValue);
instantiator = new Value(null_constant);
type_args = new Value(null_constant);
- ASSERT((class_id != kUint8ArrayCid) || value_type.IsIntType());
ASSERT((class_id != kFloat32ArrayCid && class_id != kFloat64ArrayCid) ||
value_type.IsDoubleType());
ASSERT(value_type.IsInstantiated());
@@ -720,9 +729,12 @@
case kGrowableObjectArrayCid:
case kFloat32ArrayCid:
case kFloat64ArrayCid:
+ case kInt8ArrayCid:
case kUint8ArrayCid:
case kUint8ClampedArrayCid:
case kExternalUint8ArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
// Acceptable load index classes.
break;
default:
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698