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

Side by Side Diff: runtime/vm/intermediate_language_x64.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_mips.cc ('k') | runtime/vm/object.h » ('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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 4569 matching lines...) Expand 10 before | Expand all | Expand 10 after
4580 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 4580 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
4581 summary->set_in(0, Location::RequiresRegister()); 4581 summary->set_in(0, Location::RequiresRegister());
4582 if (!IsNullCheck()) { 4582 if (!IsNullCheck()) {
4583 summary->AddTemp(Location::RequiresRegister()); 4583 summary->AddTemp(Location::RequiresRegister());
4584 } 4584 }
4585 return summary; 4585 return summary;
4586 } 4586 }
4587 4587
4588 4588
4589 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4589 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4590 const DeoptReasonId deopt_reason =
4591 licm_hoisted_ ? kDeoptHoistedCheckClass : kDeoptCheckClass;
4590 if (IsNullCheck()) { 4592 if (IsNullCheck()) {
4591 Label* deopt = compiler->AddDeoptStub(deopt_id(), 4593 Label* deopt = compiler->AddDeoptStub(deopt_id(), deopt_reason);
4592 kDeoptCheckClass);
4593 __ CompareObject(locs()->in(0).reg(), 4594 __ CompareObject(locs()->in(0).reg(),
4594 Object::null_object(), PP); 4595 Object::null_object(), PP);
4595 __ j(EQUAL, deopt); 4596 __ j(EQUAL, deopt);
4596 return; 4597 return;
4597 } 4598 }
4598 4599
4599 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || 4600 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) ||
4600 (unary_checks().NumberOfChecks() > 1)); 4601 (unary_checks().NumberOfChecks() > 1));
4601 Register value = locs()->in(0).reg(); 4602 Register value = locs()->in(0).reg();
4602 Register temp = locs()->temp(0).reg(); 4603 Register temp = locs()->temp(0).reg();
4603 Label* deopt = compiler->AddDeoptStub(deopt_id(), 4604 Label* deopt = compiler->AddDeoptStub(deopt_id(), deopt_reason);
4604 kDeoptCheckClass);
4605 Label is_ok; 4605 Label is_ok;
4606 intptr_t cix = 0; 4606 intptr_t cix = 0;
4607 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) { 4607 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) {
4608 __ testq(value, Immediate(kSmiTagMask)); 4608 __ testq(value, Immediate(kSmiTagMask));
4609 __ j(ZERO, &is_ok); 4609 __ j(ZERO, &is_ok);
4610 cix++; // Skip first check. 4610 cix++; // Skip first check.
4611 } else { 4611 } else {
4612 __ testq(value, Immediate(kSmiTagMask)); 4612 __ testq(value, Immediate(kSmiTagMask));
4613 __ j(ZERO, deopt); 4613 __ j(ZERO, deopt);
4614 } 4614 }
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
5046 PcDescriptors::kOther, 5046 PcDescriptors::kOther,
5047 locs()); 5047 locs());
5048 __ Drop(2); // Discard type arguments and receiver. 5048 __ Drop(2); // Discard type arguments and receiver.
5049 } 5049 }
5050 5050
5051 } // namespace dart 5051 } // namespace dart
5052 5052
5053 #undef __ 5053 #undef __
5054 5054
5055 #endif // defined TARGET_ARCH_X64 5055 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698