| 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 5485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5496 } | 5496 } |
| 5497 | 5497 |
| 5498 | 5498 |
| 5499 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5499 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5500 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 5500 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
| 5501 ICData::kDeoptCheckClass, | 5501 ICData::kDeoptCheckClass, |
| 5502 licm_hoisted_ ? ICData::kHoisted : 0); | 5502 licm_hoisted_ ? ICData::kHoisted : 0); |
| 5503 if (IsNullCheck()) { | 5503 if (IsNullCheck()) { |
| 5504 __ CompareObject(locs()->in(0).reg(), | 5504 __ CompareObject(locs()->in(0).reg(), |
| 5505 Object::null_object(), PP); | 5505 Object::null_object(), PP); |
| 5506 __ j(EQUAL, deopt); | 5506 Condition cond = DeoptIfNull() ? EQUAL : NOT_EQUAL; |
| 5507 __ j(cond, deopt); |
| 5507 return; | 5508 return; |
| 5508 } | 5509 } |
| 5509 | 5510 |
| 5510 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || | 5511 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || |
| 5511 (unary_checks().NumberOfChecks() > 1)); | 5512 (unary_checks().NumberOfChecks() > 1)); |
| 5512 Register value = locs()->in(0).reg(); | 5513 Register value = locs()->in(0).reg(); |
| 5513 Register temp = locs()->temp(0).reg(); | 5514 Register temp = locs()->temp(0).reg(); |
| 5514 Label is_ok; | 5515 Label is_ok; |
| 5515 if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) { | 5516 if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) { |
| 5516 __ testq(value, Immediate(kSmiTagMask)); | 5517 __ testq(value, Immediate(kSmiTagMask)); |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6442 __ Drop(1); | 6443 __ Drop(1); |
| 6443 __ popq(result); | 6444 __ popq(result); |
| 6444 } | 6445 } |
| 6445 | 6446 |
| 6446 | 6447 |
| 6447 } // namespace dart | 6448 } // namespace dart |
| 6448 | 6449 |
| 6449 #undef __ | 6450 #undef __ |
| 6450 | 6451 |
| 6451 #endif // defined TARGET_ARCH_X64 | 6452 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |