| OLD | NEW |
| 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/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 return LocationSummary::Make(zone, | 1128 return LocationSummary::Make(zone, |
| 1129 kNumInputs, | 1129 kNumInputs, |
| 1130 Location::RequiresRegister(), | 1130 Location::RequiresRegister(), |
| 1131 LocationSummary::kNoCall); | 1131 LocationSummary::kNoCall); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 | 1134 |
| 1135 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1135 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1136 Register object = locs()->in(0).reg(); | 1136 Register object = locs()->in(0).reg(); |
| 1137 Register result = locs()->out(0).reg(); | 1137 Register result = locs()->out(0).reg(); |
| 1138 __ LoadTaggedClassIdMayBeSmi(result, object); | 1138 const AbstractType& value_type = *this->object()->Type()->ToAbstractType(); |
| 1139 if (CompileType::Smi().IsAssignableTo(value_type) || |
| 1140 value_type.IsTypeParameter()) { |
| 1141 __ LoadTaggedClassIdMayBeSmi(result, object); |
| 1142 } else { |
| 1143 __ LoadClassId(result, object); |
| 1144 __ SmiTag(result); |
| 1145 } |
| 1139 } | 1146 } |
| 1140 | 1147 |
| 1141 | 1148 |
| 1142 CompileType LoadIndexedInstr::ComputeType() const { | 1149 CompileType LoadIndexedInstr::ComputeType() const { |
| 1143 switch (class_id_) { | 1150 switch (class_id_) { |
| 1144 case kArrayCid: | 1151 case kArrayCid: |
| 1145 case kImmutableArrayCid: | 1152 case kImmutableArrayCid: |
| 1146 return CompileType::Dynamic(); | 1153 return CompileType::Dynamic(); |
| 1147 | 1154 |
| 1148 case kTypedDataFloat32ArrayCid: | 1155 case kTypedDataFloat32ArrayCid: |
| (...skipping 4563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5712 1, | 5719 1, |
| 5713 locs()); | 5720 locs()); |
| 5714 __ lw(result, Address(SP, 1 * kWordSize)); | 5721 __ lw(result, Address(SP, 1 * kWordSize)); |
| 5715 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5722 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
| 5716 } | 5723 } |
| 5717 | 5724 |
| 5718 | 5725 |
| 5719 } // namespace dart | 5726 } // namespace dart |
| 5720 | 5727 |
| 5721 #endif // defined TARGET_ARCH_MIPS | 5728 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |