| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 return LocationSummary::Make(isolate, | 861 return LocationSummary::Make(isolate, |
| 862 kNumInputs, | 862 kNumInputs, |
| 863 Location::RequiresRegister(), | 863 Location::RequiresRegister(), |
| 864 LocationSummary::kNoCall); | 864 LocationSummary::kNoCall); |
| 865 } | 865 } |
| 866 | 866 |
| 867 | 867 |
| 868 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 868 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 869 Register object = locs()->in(0).reg(); | 869 Register object = locs()->in(0).reg(); |
| 870 Register result = locs()->out(0).reg(); | 870 Register result = locs()->out(0).reg(); |
| 871 Label load, done; | 871 __ LoadTaggedClassIdMayBeSmi(result, object); |
| 872 __ testq(object, Immediate(kSmiTagMask)); | |
| 873 __ j(NOT_ZERO, &load, Assembler::kNearJump); | |
| 874 __ LoadImmediate(result, Immediate(Smi::RawValue(kSmiCid)), PP); | |
| 875 __ jmp(&done); | |
| 876 __ Bind(&load); | |
| 877 __ LoadClassId(result, object); | |
| 878 __ SmiTag(result); | |
| 879 __ Bind(&done); | |
| 880 } | 872 } |
| 881 | 873 |
| 882 | 874 |
| 883 CompileType LoadIndexedInstr::ComputeType() const { | 875 CompileType LoadIndexedInstr::ComputeType() const { |
| 884 switch (class_id_) { | 876 switch (class_id_) { |
| 885 case kArrayCid: | 877 case kArrayCid: |
| 886 case kImmutableArrayCid: | 878 case kImmutableArrayCid: |
| 887 return CompileType::Dynamic(); | 879 return CompileType::Dynamic(); |
| 888 | 880 |
| 889 case kTypedDataFloat32ArrayCid: | 881 case kTypedDataFloat32ArrayCid: |
| (...skipping 4935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5825 PcDescriptors::kOther, | 5817 PcDescriptors::kOther, |
| 5826 locs()); | 5818 locs()); |
| 5827 __ Drop(ArgumentCount()); // Discard arguments. | 5819 __ Drop(ArgumentCount()); // Discard arguments. |
| 5828 } | 5820 } |
| 5829 | 5821 |
| 5830 } // namespace dart | 5822 } // namespace dart |
| 5831 | 5823 |
| 5832 #undef __ | 5824 #undef __ |
| 5833 | 5825 |
| 5834 #endif // defined TARGET_ARCH_X64 | 5826 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |