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

Side by Side Diff: runtime/vm/intermediate_language_mips.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_ia32.cc ('k') | runtime/vm/intermediate_language_x64.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 3788 matching lines...) Expand 10 before | Expand all | Expand 10 after
3799 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3799 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3800 summary->set_in(0, Location::RequiresRegister()); 3800 summary->set_in(0, Location::RequiresRegister());
3801 if (!IsNullCheck()) { 3801 if (!IsNullCheck()) {
3802 summary->AddTemp(Location::RequiresRegister()); 3802 summary->AddTemp(Location::RequiresRegister());
3803 } 3803 }
3804 return summary; 3804 return summary;
3805 } 3805 }
3806 3806
3807 3807
3808 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3808 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3809 const DeoptReasonId deopt_reason =
3810 licm_hoisted_ ? kDeoptHoistedCheckClass : kDeoptCheckClass;
3809 if (IsNullCheck()) { 3811 if (IsNullCheck()) {
3810 Label* deopt = compiler->AddDeoptStub(deopt_id(), 3812 Label* deopt = compiler->AddDeoptStub(deopt_id(), deopt_reason);
3811 kDeoptCheckClass);
3812 __ BranchEqual(locs()->in(0).reg(), 3813 __ BranchEqual(locs()->in(0).reg(),
3813 reinterpret_cast<int32_t>(Object::null()), deopt); 3814 reinterpret_cast<int32_t>(Object::null()), deopt);
3814 return; 3815 return;
3815 } 3816 }
3816 3817
3817 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || 3818 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) ||
3818 (unary_checks().NumberOfChecks() > 1)); 3819 (unary_checks().NumberOfChecks() > 1));
3819 Register value = locs()->in(0).reg(); 3820 Register value = locs()->in(0).reg();
3820 Register temp = locs()->temp(0).reg(); 3821 Register temp = locs()->temp(0).reg();
3821 Label* deopt = compiler->AddDeoptStub(deopt_id(), 3822 Label* deopt = compiler->AddDeoptStub(deopt_id(), deopt_reason);
3822 kDeoptCheckClass);
3823 Label is_ok; 3823 Label is_ok;
3824 intptr_t cix = 0; 3824 intptr_t cix = 0;
3825 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) { 3825 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) {
3826 __ andi(CMPRES1, value, Immediate(kSmiTagMask)); 3826 __ andi(CMPRES1, value, Immediate(kSmiTagMask));
3827 __ beq(CMPRES1, ZR, &is_ok); 3827 __ beq(CMPRES1, ZR, &is_ok);
3828 cix++; // Skip first check. 3828 cix++; // Skip first check.
3829 } else { 3829 } else {
3830 __ andi(CMPRES1, value, Immediate(kSmiTagMask)); 3830 __ andi(CMPRES1, value, Immediate(kSmiTagMask));
3831 __ beq(CMPRES1, ZR, deopt); 3831 __ beq(CMPRES1, ZR, deopt);
3832 } 3832 }
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
4230 compiler->GenerateCall(token_pos(), 4230 compiler->GenerateCall(token_pos(),
4231 &label, 4231 &label,
4232 PcDescriptors::kOther, 4232 PcDescriptors::kOther,
4233 locs()); 4233 locs());
4234 __ Drop(2); // Discard type arguments and receiver. 4234 __ Drop(2); // Discard type arguments and receiver.
4235 } 4235 }
4236 4236
4237 } // namespace dart 4237 } // namespace dart
4238 4238
4239 #endif // defined TARGET_ARCH_MIPS 4239 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698