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

Unified Diff: runtime/vm/constant_propagator.cc

Issue 835843004: Eliminate bounds checks on fixed-length registers array. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « no previous file | runtime/vm/regexp_assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constant_propagator.cc
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
index efff680f2b5d194e4f052b32f35a7636f0752655..0c765f273b9d43b8797365a94a9d8e5f9bae281c 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -803,6 +803,11 @@ void ConstantPropagator::VisitLoadField(LoadFieldInstr* instr) {
Smi::New(Array::Cast(constant->value()).Length())));
return;
}
+ if (constant->value().IsTypedData()) {
+ SetValue(instr, Smi::ZoneHandle(I,
+ Smi::New(TypedData::Cast(constant->value()).Length())));
+ return;
+ }
}
}
SetValue(instr, non_constant_);
« no previous file with comments | « no previous file | runtime/vm/regexp_assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698