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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 10908214: Revert "Whenever possible use length passed to the List constructor for bounds checks instead of lo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 10292764b10394e5f6bf687ca695fda55bd1953c..069528f16caff523eacd1fd4959aad9043416f87 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -1125,11 +1125,6 @@ RawAbstractType* CheckArrayBoundInstr::CompileType() const {
}
-RawAbstractType* CheckBoundInstr::CompileType() const {
- return AbstractType::null();
-}
-
-
RawAbstractType* CheckEitherNonSmiInstr::CompileType() const {
return AbstractType::null();
}
@@ -1186,28 +1181,6 @@ Definition* CheckEitherNonSmiInstr::Canonicalize() {
}
-Definition* CheckArrayBoundInstr::Canonicalize() {
- if (array_type() == kArrayCid) {
- // For fixed length arrays check if array is the result of a constructor
- // call. In this case we can use the length passed to the constructor
- // instead of loading it from array itself.
- StaticCallInstr* allocation = array()->definition()->AsStaticCall();
- if ((allocation != NULL) &&
- allocation->is_known_constructor() &&
- (allocation->ResultCid() == kArrayCid)) {
- CheckBoundInstr* check =
- new CheckBoundInstr(allocation->ArgumentAt(0)->value()->Copy(),
- index(),
- deopt_id_);
- check->set_env(env());
- set_env(NULL);
- return check;
- }
- }
- return this;
-}
-
-
// Shared code generation methods (EmitNativeCode, MakeLocationSummary, and
// PrepareEntry). Only assembly code that can be shared across all architectures
// can be used. Machine specific register allocation and code generation

Powered by Google App Engine
This is Rietveld 408576698