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