| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 return LocationSummary::Make(isolate, | 932 return LocationSummary::Make(isolate, |
| 933 kNumInputs, | 933 kNumInputs, |
| 934 Location::RequiresRegister(), | 934 Location::RequiresRegister(), |
| 935 LocationSummary::kNoCall); | 935 LocationSummary::kNoCall); |
| 936 } | 936 } |
| 937 | 937 |
| 938 | 938 |
| 939 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 939 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 940 Register object = locs()->in(0).reg(); | 940 Register object = locs()->in(0).reg(); |
| 941 Register result = locs()->out(0).reg(); | 941 Register result = locs()->out(0).reg(); |
| 942 Label load, done; | 942 __ LoadTaggedClassIdMayBeSmi(result, object); |
| 943 __ testl(object, Immediate(kSmiTagMask)); | |
| 944 __ j(NOT_ZERO, &load, Assembler::kNearJump); | |
| 945 __ movl(result, Immediate(Smi::RawValue(kSmiCid))); | |
| 946 __ jmp(&done); | |
| 947 __ Bind(&load); | |
| 948 __ LoadClassId(result, object); | |
| 949 __ SmiTag(result); | |
| 950 __ Bind(&done); | |
| 951 } | 943 } |
| 952 | 944 |
| 953 | 945 |
| 954 CompileType LoadIndexedInstr::ComputeType() const { | 946 CompileType LoadIndexedInstr::ComputeType() const { |
| 955 switch (class_id_) { | 947 switch (class_id_) { |
| 956 case kArrayCid: | 948 case kArrayCid: |
| 957 case kImmutableArrayCid: | 949 case kImmutableArrayCid: |
| 958 return CompileType::Dynamic(); | 950 return CompileType::Dynamic(); |
| 959 | 951 |
| 960 case kTypedDataFloat32ArrayCid: | 952 case kTypedDataFloat32ArrayCid: |
| (...skipping 5335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6296 PcDescriptors::kOther, | 6288 PcDescriptors::kOther, |
| 6297 locs()); | 6289 locs()); |
| 6298 __ Drop(ArgumentCount()); // Discard arguments. | 6290 __ Drop(ArgumentCount()); // Discard arguments. |
| 6299 } | 6291 } |
| 6300 | 6292 |
| 6301 } // namespace dart | 6293 } // namespace dart |
| 6302 | 6294 |
| 6303 #undef __ | 6295 #undef __ |
| 6304 | 6296 |
| 6305 #endif // defined TARGET_ARCH_IA32 | 6297 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |