| 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 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 | 1436 |
| 1437 return summary; | 1437 return summary; |
| 1438 } | 1438 } |
| 1439 | 1439 |
| 1440 | 1440 |
| 1441 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1441 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1442 const intptr_t value_cid = value()->Type()->ToCid(); | 1442 const intptr_t value_cid = value()->Type()->ToCid(); |
| 1443 const intptr_t field_cid = field().guarded_cid(); | 1443 const intptr_t field_cid = field().guarded_cid(); |
| 1444 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; | 1444 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; |
| 1445 | 1445 |
| 1446 if (field_cid == kDynamicCid) { | 1446 ASSERT(field_cid != kDynamicCid); |
| 1447 ASSERT(!compiler->is_optimizing()); | |
| 1448 return; // Nothing to emit. | |
| 1449 } | |
| 1450 | 1447 |
| 1451 const bool emit_full_guard = | 1448 const bool emit_full_guard = |
| 1452 !compiler->is_optimizing() || (field_cid == kIllegalCid); | 1449 !compiler->is_optimizing() || (field_cid == kIllegalCid); |
| 1453 | 1450 |
| 1454 const bool needs_value_cid_temp_reg = emit_full_guard || | 1451 const bool needs_value_cid_temp_reg = emit_full_guard || |
| 1455 ((value_cid == kDynamicCid) && (field_cid != kSmiCid)); | 1452 ((value_cid == kDynamicCid) && (field_cid != kSmiCid)); |
| 1456 | 1453 |
| 1457 const bool needs_field_temp_reg = emit_full_guard; | 1454 const bool needs_field_temp_reg = emit_full_guard; |
| 1458 | 1455 |
| 1459 const Register value_reg = locs()->in(0).reg(); | 1456 const Register value_reg = locs()->in(0).reg(); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1587 LocationSummary* summary = new(zone) LocationSummary( | 1584 LocationSummary* summary = new(zone) LocationSummary( |
| 1588 zone, kNumInputs, 0, LocationSummary::kNoCall); | 1585 zone, kNumInputs, 0, LocationSummary::kNoCall); |
| 1589 summary->set_in(0, Location::RequiresRegister()); | 1586 summary->set_in(0, Location::RequiresRegister()); |
| 1590 return summary; | 1587 return summary; |
| 1591 } | 1588 } |
| 1592 UNREACHABLE(); | 1589 UNREACHABLE(); |
| 1593 } | 1590 } |
| 1594 | 1591 |
| 1595 | 1592 |
| 1596 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1593 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1597 if (field().guarded_list_length() == Field::kNoFixedLength) { | 1594 ASSERT(field().guarded_list_length() != Field::kNoFixedLength); |
| 1598 ASSERT(!compiler->is_optimizing()); | |
| 1599 return; // Nothing to emit. | |
| 1600 } | |
| 1601 | 1595 |
| 1602 Label* deopt = compiler->is_optimizing() ? | 1596 Label* deopt = compiler->is_optimizing() ? |
| 1603 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; | 1597 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; |
| 1604 | 1598 |
| 1605 const Register value_reg = locs()->in(0).reg(); | 1599 const Register value_reg = locs()->in(0).reg(); |
| 1606 | 1600 |
| 1607 if (!compiler->is_optimizing() || | 1601 if (!compiler->is_optimizing() || |
| 1608 (field().guarded_list_length() == Field::kUnknownFixedLength)) { | 1602 (field().guarded_list_length() == Field::kUnknownFixedLength)) { |
| 1609 const Register field_reg = locs()->temp(0).reg(); | 1603 const Register field_reg = locs()->temp(0).reg(); |
| 1610 const Register offset_reg = locs()->temp(1).reg(); | 1604 const Register offset_reg = locs()->temp(1).reg(); |
| (...skipping 4035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5646 1, | 5640 1, |
| 5647 locs()); | 5641 locs()); |
| 5648 __ Drop(1); | 5642 __ Drop(1); |
| 5649 __ Pop(result); | 5643 __ Pop(result); |
| 5650 } | 5644 } |
| 5651 | 5645 |
| 5652 | 5646 |
| 5653 } // namespace dart | 5647 } // namespace dart |
| 5654 | 5648 |
| 5655 #endif // defined TARGET_ARCH_ARM64 | 5649 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |