| 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 5745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5756 | 5756 |
| 5757 | 5757 |
| 5758 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5758 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5759 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 5759 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
| 5760 ICData::kDeoptCheckClass, | 5760 ICData::kDeoptCheckClass, |
| 5761 licm_hoisted_ ? ICData::kHoisted : 0); | 5761 licm_hoisted_ ? ICData::kHoisted : 0); |
| 5762 if (IsNullCheck()) { | 5762 if (IsNullCheck()) { |
| 5763 const Immediate& raw_null = | 5763 const Immediate& raw_null = |
| 5764 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 5764 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 5765 __ cmpl(locs()->in(0).reg(), raw_null); | 5765 __ cmpl(locs()->in(0).reg(), raw_null); |
| 5766 __ j(EQUAL, deopt); | 5766 ASSERT(DeoptIfNull() || DeoptIfNotNull()); |
| 5767 Condition cond = DeoptIfNull() ? EQUAL : NOT_EQUAL; |
| 5768 __ j(cond, deopt); |
| 5767 return; | 5769 return; |
| 5768 } | 5770 } |
| 5769 | 5771 |
| 5770 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || | 5772 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || |
| 5771 (unary_checks().NumberOfChecks() > 1)); | 5773 (unary_checks().NumberOfChecks() > 1)); |
| 5772 Register value = locs()->in(0).reg(); | 5774 Register value = locs()->in(0).reg(); |
| 5773 Register temp = locs()->temp(0).reg(); | 5775 Register temp = locs()->temp(0).reg(); |
| 5774 Label is_ok; | 5776 Label is_ok; |
| 5775 if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) { | 5777 if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) { |
| 5776 __ testl(value, Immediate(kSmiTagMask)); | 5778 __ testl(value, Immediate(kSmiTagMask)); |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6874 __ Drop(1); | 6876 __ Drop(1); |
| 6875 __ popl(result); | 6877 __ popl(result); |
| 6876 } | 6878 } |
| 6877 | 6879 |
| 6878 | 6880 |
| 6879 } // namespace dart | 6881 } // namespace dart |
| 6880 | 6882 |
| 6881 #undef __ | 6883 #undef __ |
| 6882 | 6884 |
| 6883 #endif // defined TARGET_ARCH_IA32 | 6885 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |