| 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/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 5909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5920 __ BranchIfNotSmi(value, deopt); | 5920 __ BranchIfNotSmi(value, deopt); |
| 5921 } | 5921 } |
| 5922 | 5922 |
| 5923 | 5923 |
| 5924 LocationSummary* CheckClassIdInstr::MakeLocationSummary(Zone* zone, | 5924 LocationSummary* CheckClassIdInstr::MakeLocationSummary(Zone* zone, |
| 5925 bool opt) const { | 5925 bool opt) const { |
| 5926 const intptr_t kNumInputs = 1; | 5926 const intptr_t kNumInputs = 1; |
| 5927 const intptr_t kNumTemps = 0; | 5927 const intptr_t kNumTemps = 0; |
| 5928 LocationSummary* summary = new (zone) | 5928 LocationSummary* summary = new (zone) |
| 5929 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5929 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 5930 summary->set_in(0, Location::RequiresRegister()); | 5930 summary->set_in(0, cids_.IsSingleCid() ? Location::RequiresRegister() |
| 5931 : Location::WritableRegister()); |
| 5931 return summary; | 5932 return summary; |
| 5932 } | 5933 } |
| 5933 | 5934 |
| 5934 | 5935 |
| 5935 void CheckClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5936 void CheckClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5936 Register value = locs()->in(0).reg(); | 5937 Register value = locs()->in(0).reg(); |
| 5937 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckClass); | 5938 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckClass); |
| 5938 __ cmpl(value, Immediate(Smi::RawValue(cid_))); | 5939 if (cids_.IsSingleCid()) { |
| 5939 __ j(NOT_ZERO, deopt); | 5940 __ cmpl(value, Immediate(Smi::RawValue(cids_.cid_start))); |
| 5941 __ j(NOT_ZERO, deopt); |
| 5942 } else { |
| 5943 __ AddImmediate(value, Immediate(-Smi::RawValue(cids_.cid_start))); |
| 5944 __ cmpl(value, Immediate(Smi::RawValue(cids_.Extent()))); |
| 5945 __ j(ABOVE, deopt); |
| 5946 } |
| 5940 } | 5947 } |
| 5941 | 5948 |
| 5942 | 5949 |
| 5943 LocationSummary* GenericCheckBoundInstr::MakeLocationSummary(Zone* zone, | 5950 LocationSummary* GenericCheckBoundInstr::MakeLocationSummary(Zone* zone, |
| 5944 bool opt) const { | 5951 bool opt) const { |
| 5945 // Only needed for AOT. | 5952 // Only needed for AOT. |
| 5946 UNIMPLEMENTED(); | 5953 UNIMPLEMENTED(); |
| 5947 return NULL; | 5954 return NULL; |
| 5948 } | 5955 } |
| 5949 | 5956 |
| (...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6932 __ Drop(1); | 6939 __ Drop(1); |
| 6933 __ popl(result); | 6940 __ popl(result); |
| 6934 } | 6941 } |
| 6935 | 6942 |
| 6936 | 6943 |
| 6937 } // namespace dart | 6944 } // namespace dart |
| 6938 | 6945 |
| 6939 #undef __ | 6946 #undef __ |
| 6940 | 6947 |
| 6941 #endif // defined TARGET_ARCH_IA32 | 6948 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |