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

Unified Diff: runtime/vm/intermediate_language_ia32.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_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 0325e38ecd3713b86545551cf03f18544ffdc7f0..20a557bfd90d43f062b4be9c60ee6d50dd008ca2 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -2249,38 +2249,6 @@ void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
-LocationSummary* CheckBoundInstr::MakeLocationSummary() const {
- const intptr_t kNumInputs = 2;
- const intptr_t kNumTemps = 0;
- LocationSummary* locs =
- new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
- locs->set_in(0, Location::RequiresRegister());
- locs->set_in(1, Location::RegisterOrConstant(index()));
- return locs;
-}
-
-
-void CheckBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- Register length = locs()->in(0).reg();
-
- Label* deopt = compiler->AddDeoptStub(deopt_id(),
- kDeoptLoadIndexedFixedArray);
-
- if (locs()->in(1).IsConstant()) {
- const Object& constant = locs()->in(1).constant();
- ASSERT(constant.IsSmi());
- const int32_t imm =
- reinterpret_cast<int32_t>(constant.raw());
- __ cmpl(length, Immediate(imm));
- __ j(BELOW_EQUAL, deopt);
- } else {
- Register index = locs()->in(1).reg();
- __ cmpl(index, length);
- __ j(ABOVE_EQUAL, deopt);
- }
-}
-
-
} // namespace dart
#undef __

Powered by Google App Engine
This is Rietveld 408576698