OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
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 5072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5083 return summary; | 5083 return summary; |
5084 } | 5084 } |
5085 | 5085 |
5086 | 5086 |
5087 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5087 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5088 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 5088 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
5089 ICData::kDeoptCheckClass, | 5089 ICData::kDeoptCheckClass, |
5090 licm_hoisted_ ? ICData::kHoisted : 0); | 5090 licm_hoisted_ ? ICData::kHoisted : 0); |
5091 if (IsNullCheck()) { | 5091 if (IsNullCheck()) { |
5092 __ CompareObject(locs()->in(0).reg(), Object::null_object(), PP); | 5092 __ CompareObject(locs()->in(0).reg(), Object::null_object(), PP); |
5093 __ b(deopt, EQ); | 5093 ASSERT(DeoptIfNull() || DeoptIfNotNull()); |
| 5094 Condition cond = DeoptIfNull() ? EQ : NE; |
| 5095 __ b(deopt, cond); |
5094 return; | 5096 return; |
5095 } | 5097 } |
5096 | 5098 |
5097 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || | 5099 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || |
5098 (unary_checks().NumberOfChecks() > 1)); | 5100 (unary_checks().NumberOfChecks() > 1)); |
5099 const Register value = locs()->in(0).reg(); | 5101 const Register value = locs()->in(0).reg(); |
5100 const Register temp = locs()->temp(0).reg(); | 5102 const Register temp = locs()->temp(0).reg(); |
5101 Label is_ok; | 5103 Label is_ok; |
5102 if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) { | 5104 if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) { |
5103 __ tsti(value, Immediate(kSmiTagMask)); | 5105 __ tsti(value, Immediate(kSmiTagMask)); |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5637 1, | 5639 1, |
5638 locs()); | 5640 locs()); |
5639 __ Drop(1); | 5641 __ Drop(1); |
5640 __ Pop(result); | 5642 __ Pop(result); |
5641 } | 5643 } |
5642 | 5644 |
5643 | 5645 |
5644 } // namespace dart | 5646 } // namespace dart |
5645 | 5647 |
5646 #endif // defined TARGET_ARCH_ARM64 | 5648 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |