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

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

Issue 657613004: VM: Avoid repeated deoptimization on speculatively hoisted smi-checks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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_arm.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 3022 matching lines...) Expand 10 before | Expand all | Expand 10 after
3033 LocationSummary* summary = new(isolate) LocationSummary( 3033 LocationSummary* summary = new(isolate) LocationSummary(
3034 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); 3034 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
3035 summary->set_in(0, Location::RequiresRegister()); 3035 summary->set_in(0, Location::RequiresRegister());
3036 summary->set_in(1, Location::RequiresRegister()); 3036 summary->set_in(1, Location::RequiresRegister());
3037 return summary; 3037 return summary;
3038 } 3038 }
3039 3039
3040 3040
3041 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3041 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3042 Label* deopt = compiler->AddDeoptStub(deopt_id(), 3042 Label* deopt = compiler->AddDeoptStub(deopt_id(),
3043 ICData::kDeoptBinaryDoubleOp); 3043 ICData::kDeoptBinaryDoubleOp,
3044 licm_hoisted_ ? ICData::kHoisted : 0);
3044 intptr_t left_cid = left()->Type()->ToCid(); 3045 intptr_t left_cid = left()->Type()->ToCid();
3045 intptr_t right_cid = right()->Type()->ToCid(); 3046 intptr_t right_cid = right()->Type()->ToCid();
3046 const Register left = locs()->in(0).reg(); 3047 const Register left = locs()->in(0).reg();
3047 const Register right = locs()->in(1).reg(); 3048 const Register right = locs()->in(1).reg();
3048 if (left_cid == kSmiCid) { 3049 if (left_cid == kSmiCid) {
3049 __ tsti(right, Immediate(kSmiTagMask)); 3050 __ tsti(right, Immediate(kSmiTagMask));
3050 } else if (right_cid == kSmiCid) { 3051 } else if (right_cid == kSmiCid) {
3051 __ tsti(left, Immediate(kSmiTagMask)); 3052 __ tsti(left, Immediate(kSmiTagMask));
3052 } else { 3053 } else {
3053 __ orr(TMP, left, Operand(right)); 3054 __ orr(TMP, left, Operand(right));
(...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after
5103 const intptr_t kNumTemps = 0; 5104 const intptr_t kNumTemps = 0;
5104 LocationSummary* summary = new(isolate) LocationSummary( 5105 LocationSummary* summary = new(isolate) LocationSummary(
5105 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); 5106 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
5106 summary->set_in(0, Location::RequiresRegister()); 5107 summary->set_in(0, Location::RequiresRegister());
5107 return summary; 5108 return summary;
5108 } 5109 }
5109 5110
5110 5111
5111 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5112 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5112 const Register value = locs()->in(0).reg(); 5113 const Register value = locs()->in(0).reg();
5113 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi); 5114 Label* deopt = compiler->AddDeoptStub(deopt_id(),
5115 ICData::kDeoptCheckSmi,
5116 licm_hoisted_ ? ICData::kHoisted : 0);
5114 __ tsti(value, Immediate(kSmiTagMask)); 5117 __ tsti(value, Immediate(kSmiTagMask));
5115 __ b(deopt, NE); 5118 __ b(deopt, NE);
5116 } 5119 }
5117 5120
5118 5121
5119 LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Isolate* isolate, 5122 LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Isolate* isolate,
5120 bool opt) const { 5123 bool opt) const {
5121 const intptr_t kNumInputs = 2; 5124 const intptr_t kNumInputs = 2;
5122 const intptr_t kNumTemps = 0; 5125 const intptr_t kNumTemps = 0;
5123 LocationSummary* locs = new(isolate) LocationSummary( 5126 LocationSummary* locs = new(isolate) LocationSummary(
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
5601 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 5604 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
5602 #if defined(DEBUG) 5605 #if defined(DEBUG)
5603 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); 5606 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP);
5604 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); 5607 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP);
5605 #endif 5608 #endif
5606 } 5609 }
5607 5610
5608 } // namespace dart 5611 } // namespace dart
5609 5612
5610 #endif // defined TARGET_ARCH_ARM64 5613 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698