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

Side by Side Diff: runtime/vm/intermediate_language_arm.cc

Issue 157833004: Disable hoisting CheckClass due to excessive deoptimization. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4528 matching lines...) Expand 10 before | Expand all | Expand 10 after
4539 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 4539 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
4540 summary->set_in(0, Location::RequiresRegister()); 4540 summary->set_in(0, Location::RequiresRegister());
4541 if (!IsNullCheck()) { 4541 if (!IsNullCheck()) {
4542 summary->AddTemp(Location::RequiresRegister()); 4542 summary->AddTemp(Location::RequiresRegister());
4543 } 4543 }
4544 return summary; 4544 return summary;
4545 } 4545 }
4546 4546
4547 4547
4548 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4548 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4549 const DeoptReasonId deopt_reason =
4550 licm_hoisted_ ? kDeoptHoistedCheckClass : kDeoptCheckClass;
4549 if (IsNullCheck()) { 4551 if (IsNullCheck()) {
4550 Label* deopt = compiler->AddDeoptStub(deopt_id(), 4552 Label* deopt = compiler->AddDeoptStub(deopt_id(), deopt_reason);
4551 kDeoptCheckClass);
4552 __ CompareImmediate(locs()->in(0).reg(), 4553 __ CompareImmediate(locs()->in(0).reg(),
4553 reinterpret_cast<intptr_t>(Object::null())); 4554 reinterpret_cast<intptr_t>(Object::null()));
4554 __ b(deopt, EQ); 4555 __ b(deopt, EQ);
4555 return; 4556 return;
4556 } 4557 }
4557 4558
4558 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || 4559 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) ||
4559 (unary_checks().NumberOfChecks() > 1)); 4560 (unary_checks().NumberOfChecks() > 1));
4560 Register value = locs()->in(0).reg(); 4561 Register value = locs()->in(0).reg();
4561 Register temp = locs()->temp(0).reg(); 4562 Register temp = locs()->temp(0).reg();
4562 Label* deopt = compiler->AddDeoptStub(deopt_id(), 4563 Label* deopt = compiler->AddDeoptStub(deopt_id(), deopt_reason);
4563 kDeoptCheckClass);
4564 Label is_ok; 4564 Label is_ok;
4565 intptr_t cix = 0; 4565 intptr_t cix = 0;
4566 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) { 4566 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) {
4567 __ tst(value, ShifterOperand(kSmiTagMask)); 4567 __ tst(value, ShifterOperand(kSmiTagMask));
4568 __ b(&is_ok, EQ); 4568 __ b(&is_ok, EQ);
4569 cix++; // Skip first check. 4569 cix++; // Skip first check.
4570 } else { 4570 } else {
4571 __ tst(value, ShifterOperand(kSmiTagMask)); 4571 __ tst(value, ShifterOperand(kSmiTagMask));
4572 __ b(deopt, EQ); 4572 __ b(deopt, EQ);
4573 } 4573 }
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
4956 compiler->GenerateCall(token_pos(), 4956 compiler->GenerateCall(token_pos(),
4957 &label, 4957 &label,
4958 PcDescriptors::kOther, 4958 PcDescriptors::kOther,
4959 locs()); 4959 locs());
4960 __ Drop(2); // Discard type arguments and receiver. 4960 __ Drop(2); // Discard type arguments and receiver.
4961 } 4961 }
4962 4962
4963 } // namespace dart 4963 } // namespace dart
4964 4964
4965 #endif // defined TARGET_ARCH_ARM 4965 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698