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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 12328055: Insert missing test for unboxed mint support when inlining _setIndexed, getUint32, getInt32. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « no previous file | no next file » | 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 18818)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -688,6 +688,11 @@
}
case kInt32ArrayCid:
case kUint32ArrayCid:
+ // Check if elements fit into a smi or the platform supports unboxed
Vyacheslav Egorov (Google) 2013/02/22 13:20:43 Consider moving this to the function start and usi
+ // mints.
+ if ((kSmiBits < 32) && !FlowGraphCompiler::SupportsUnboxedMints()) {
+ return false;
+ }
// We don't have ICData for the value stored, so we optimistically assume
// smis first. If we ever deoptimized here, we require to unbox the value
// before storing to handle the mint case, too.
@@ -1526,9 +1531,19 @@
array_op = BuildByteArrayViewLoad(call, class_ids[0], kUint16ArrayCid);
break;
case MethodRecognizer::kByteArrayBaseGetInt32:
+ // Check if elements fit into a smi or the platform supports unboxed
Vyacheslav Egorov (Google) 2013/02/22 13:20:43 Consider moving this to the function start and usi
+ // mints.
+ if ((kSmiBits < 32) && !FlowGraphCompiler::SupportsUnboxedMints()) {
+ return false;
+ }
array_op = BuildByteArrayViewLoad(call, class_ids[0], kInt32ArrayCid);
break;
case MethodRecognizer::kByteArrayBaseGetUint32:
+ // Check if elements fit into a smi or the platform supports unboxed
Vyacheslav Egorov (Google) 2013/02/22 13:20:43 Consider moving this to the function start and usi
+ // mints.
+ if ((kSmiBits < 32) && !FlowGraphCompiler::SupportsUnboxedMints()) {
+ return false;
+ }
array_op = BuildByteArrayViewLoad(call, class_ids[0], kUint32ArrayCid);
break;
case MethodRecognizer::kByteArrayBaseGetFloat32:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698