| 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/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 return LocationSummary::Make(isolate, | 1012 return LocationSummary::Make(isolate, |
| 1013 kNumInputs, | 1013 kNumInputs, |
| 1014 Location::RequiresRegister(), | 1014 Location::RequiresRegister(), |
| 1015 LocationSummary::kNoCall); | 1015 LocationSummary::kNoCall); |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 | 1018 |
| 1019 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1019 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1020 Register object = locs()->in(0).reg(); | 1020 Register object = locs()->in(0).reg(); |
| 1021 Register result = locs()->out(0).reg(); | 1021 Register result = locs()->out(0).reg(); |
| 1022 Label load, done; | 1022 __ LoadTaggedClassIdMayBeSmi(result, object); |
| 1023 __ andi(CMPRES1, object, Immediate(kSmiTagMask)); | |
| 1024 __ bne(CMPRES1, ZR, &load); | |
| 1025 __ LoadImmediate(result, Smi::RawValue(kSmiCid)); | |
| 1026 __ b(&done); | |
| 1027 __ Bind(&load); | |
| 1028 __ LoadClassId(result, object); | |
| 1029 __ SmiTag(result); | |
| 1030 __ Bind(&done); | |
| 1031 } | 1023 } |
| 1032 | 1024 |
| 1033 | 1025 |
| 1034 CompileType LoadIndexedInstr::ComputeType() const { | 1026 CompileType LoadIndexedInstr::ComputeType() const { |
| 1035 switch (class_id_) { | 1027 switch (class_id_) { |
| 1036 case kArrayCid: | 1028 case kArrayCid: |
| 1037 case kImmutableArrayCid: | 1029 case kImmutableArrayCid: |
| 1038 return CompileType::Dynamic(); | 1030 return CompileType::Dynamic(); |
| 1039 | 1031 |
| 1040 case kTypedDataFloat32ArrayCid: | 1032 case kTypedDataFloat32ArrayCid: |
| (...skipping 3642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4683 compiler->GenerateCall(token_pos(), | 4675 compiler->GenerateCall(token_pos(), |
| 4684 &label, | 4676 &label, |
| 4685 PcDescriptors::kOther, | 4677 PcDescriptors::kOther, |
| 4686 locs()); | 4678 locs()); |
| 4687 __ Drop(ArgumentCount()); // Discard arguments. | 4679 __ Drop(ArgumentCount()); // Discard arguments. |
| 4688 } | 4680 } |
| 4689 | 4681 |
| 4690 } // namespace dart | 4682 } // namespace dart |
| 4691 | 4683 |
| 4692 #endif // defined TARGET_ARCH_MIPS | 4684 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |