| OLD | NEW |
| 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 5114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5125 const intptr_t kNumTemps = 0; | 5125 const intptr_t kNumTemps = 0; |
| 5126 LocationSummary* locs = new(isolate) LocationSummary( | 5126 LocationSummary* locs = new(isolate) LocationSummary( |
| 5127 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5127 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 5128 locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length())); | 5128 locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length())); |
| 5129 locs->set_in(kIndexPos, Location::RegisterOrSmiConstant(index())); | 5129 locs->set_in(kIndexPos, Location::RegisterOrSmiConstant(index())); |
| 5130 return locs; | 5130 return locs; |
| 5131 } | 5131 } |
| 5132 | 5132 |
| 5133 | 5133 |
| 5134 void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5134 void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5135 uint32_t flags = generalized_ ? ICData::kGeneralized : 0; |
| 5136 flags |= licm_hoisted_ ? ICData::kHoisted : 0; |
| 5135 Label* deopt = compiler->AddDeoptStub( | 5137 Label* deopt = compiler->AddDeoptStub( |
| 5136 deopt_id(), | 5138 deopt_id(), |
| 5137 ICData::kDeoptCheckArrayBound, | 5139 ICData::kDeoptCheckArrayBound, |
| 5138 generalized_ ? ICData::kGeneralized : 0); | 5140 flags); |
| 5139 | 5141 |
| 5140 Location length_loc = locs()->in(kLengthPos); | 5142 Location length_loc = locs()->in(kLengthPos); |
| 5141 Location index_loc = locs()->in(kIndexPos); | 5143 Location index_loc = locs()->in(kIndexPos); |
| 5142 | 5144 |
| 5143 if (length_loc.IsConstant() && index_loc.IsConstant()) { | 5145 if (length_loc.IsConstant() && index_loc.IsConstant()) { |
| 5144 // TODO(srdjan): remove this code once failures are fixed. | 5146 // TODO(srdjan): remove this code once failures are fixed. |
| 5145 if ((Smi::Cast(length_loc.constant()).Value() > | 5147 if ((Smi::Cast(length_loc.constant()).Value() > |
| 5146 Smi::Cast(index_loc.constant()).Value()) && | 5148 Smi::Cast(index_loc.constant()).Value()) && |
| 5147 (Smi::Cast(index_loc.constant()).Value() >= 0)) { | 5149 (Smi::Cast(index_loc.constant()).Value() >= 0)) { |
| 5148 // This CheckArrayBoundInstr should have been eliminated. | 5150 // This CheckArrayBoundInstr should have been eliminated. |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5604 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 5606 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 5605 #if defined(DEBUG) | 5607 #if defined(DEBUG) |
| 5606 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); | 5608 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); |
| 5607 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); | 5609 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); |
| 5608 #endif | 5610 #endif |
| 5609 } | 5611 } |
| 5610 | 5612 |
| 5611 } // namespace dart | 5613 } // namespace dart |
| 5612 | 5614 |
| 5613 #endif // defined TARGET_ARCH_ARM64 | 5615 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |