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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 11665005: Support scalar lists in array bounds check elimination. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 | runtime/vm/intermediate_language.h » ('j') | runtime/vm/intermediate_language.cc » ('J')
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 16324)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -1782,8 +1782,6 @@
CheckArrayBoundInstr* check);
Definition* LoadArrayLength(CheckArrayBoundInstr* check);
-
-
// Replace uses of the definition def that are dominated by instruction dom
// with uses of other definition.
void RenameDominatedUses(Definition* def,
@@ -2140,7 +2138,7 @@
// It will only be used in range boundaries.
LoadFieldInstr* length_load = new LoadFieldInstr(
check->array()->Copy(),
- Array::length_offset(),
+ CheckArrayBoundInstr::LengthOffsetFor(check->array_type()),
Type::ZoneHandle(Type::SmiType()),
true); // Immutable.
length_load->set_recognized_kind(MethodRecognizer::kObjectArrayLength);
@@ -2157,8 +2155,7 @@
void RangeAnalysis::ConstrainValueAfterCheckArrayBound(
Definition* defn, CheckArrayBoundInstr* check) {
- if ((check->array_type() != kArrayCid) &&
- (check->array_type() != kImmutableArrayCid)) {
+ if (!CheckArrayBoundInstr::IsFixedLengthArrayType(check->array_type())) {
return;
}
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | runtime/vm/intermediate_language.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698