| 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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 return LocationSummary::Make(zone, | 938 return LocationSummary::Make(zone, |
| 939 kNumInputs, | 939 kNumInputs, |
| 940 Location::RequiresRegister(), | 940 Location::RequiresRegister(), |
| 941 LocationSummary::kNoCall); | 941 LocationSummary::kNoCall); |
| 942 } | 942 } |
| 943 | 943 |
| 944 | 944 |
| 945 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 945 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 946 const Register object = locs()->in(0).reg(); | 946 const Register object = locs()->in(0).reg(); |
| 947 const Register result = locs()->out(0).reg(); | 947 const Register result = locs()->out(0).reg(); |
| 948 static const intptr_t kSmiCidSource = | |
| 949 static_cast<intptr_t>(kSmiCid) << RawObject::kClassIdTagPos; | |
| 950 | 948 |
| 951 __ LoadImmediate(TMP, reinterpret_cast<int64_t>(&kSmiCidSource) + 1); | 949 __ LoadTaggedClassIdMayBeSmi(result, object); |
| 952 __ tsti(object, Immediate(kSmiTagMask)); | |
| 953 __ csel(TMP, TMP, object, EQ); | |
| 954 __ LoadClassId(result, TMP); | |
| 955 __ SmiTag(result); | |
| 956 } | 950 } |
| 957 | 951 |
| 958 | 952 |
| 959 CompileType LoadIndexedInstr::ComputeType() const { | 953 CompileType LoadIndexedInstr::ComputeType() const { |
| 960 switch (class_id_) { | 954 switch (class_id_) { |
| 961 case kArrayCid: | 955 case kArrayCid: |
| 962 case kImmutableArrayCid: | 956 case kImmutableArrayCid: |
| 963 return CompileType::Dynamic(); | 957 return CompileType::Dynamic(); |
| 964 | 958 |
| 965 case kTypedDataFloat32ArrayCid: | 959 case kTypedDataFloat32ArrayCid: |
| (...skipping 4660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5626 1, | 5620 1, |
| 5627 locs()); | 5621 locs()); |
| 5628 __ Drop(1); | 5622 __ Drop(1); |
| 5629 __ Pop(result); | 5623 __ Pop(result); |
| 5630 } | 5624 } |
| 5631 | 5625 |
| 5632 | 5626 |
| 5633 } // namespace dart | 5627 } // namespace dart |
| 5634 | 5628 |
| 5635 #endif // defined TARGET_ARCH_ARM64 | 5629 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |