| 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/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 return LocationSummary::Make(zone, | 925 return LocationSummary::Make(zone, |
| 926 kNumInputs, | 926 kNumInputs, |
| 927 Location::RequiresRegister(), | 927 Location::RequiresRegister(), |
| 928 LocationSummary::kNoCall); | 928 LocationSummary::kNoCall); |
| 929 } | 929 } |
| 930 | 930 |
| 931 | 931 |
| 932 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 932 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 933 const Register object = locs()->in(0).reg(); | 933 const Register object = locs()->in(0).reg(); |
| 934 const Register result = locs()->out(0).reg(); | 934 const Register result = locs()->out(0).reg(); |
| 935 | 935 const AbstractType& value_type = *this->object()->Type()->ToAbstractType(); |
| 936 __ LoadTaggedClassIdMayBeSmi(result, object); | 936 if (CompileType::Smi().IsAssignableTo(value_type) || |
| 937 value_type.IsTypeParameter()) { |
| 938 __ LoadTaggedClassIdMayBeSmi(result, object); |
| 939 } else { |
| 940 __ LoadClassId(result, object); |
| 941 __ SmiTag(result); |
| 942 } |
| 937 } | 943 } |
| 938 | 944 |
| 939 | 945 |
| 940 CompileType LoadIndexedInstr::ComputeType() const { | 946 CompileType LoadIndexedInstr::ComputeType() const { |
| 941 switch (class_id_) { | 947 switch (class_id_) { |
| 942 case kArrayCid: | 948 case kArrayCid: |
| 943 case kImmutableArrayCid: | 949 case kImmutableArrayCid: |
| 944 return CompileType::Dynamic(); | 950 return CompileType::Dynamic(); |
| 945 | 951 |
| 946 case kTypedDataFloat32ArrayCid: | 952 case kTypedDataFloat32ArrayCid: |
| (...skipping 4752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5699 1, | 5705 1, |
| 5700 locs()); | 5706 locs()); |
| 5701 __ Drop(1); | 5707 __ Drop(1); |
| 5702 __ Pop(result); | 5708 __ Pop(result); |
| 5703 } | 5709 } |
| 5704 | 5710 |
| 5705 | 5711 |
| 5706 } // namespace dart | 5712 } // namespace dart |
| 5707 | 5713 |
| 5708 #endif // defined TARGET_ARCH_ARM64 | 5714 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |