| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/compiler.h" |
| 10 #include "vm/cpu.h" | 11 #include "vm/cpu.h" |
| 11 #include "vm/dart_entry.h" | 12 #include "vm/dart_entry.h" |
| 12 #include "vm/flow_graph.h" | 13 #include "vm/flow_graph.h" |
| 13 #include "vm/flow_graph_compiler.h" | 14 #include "vm/flow_graph_compiler.h" |
| 14 #include "vm/flow_graph_range_analysis.h" | 15 #include "vm/flow_graph_range_analysis.h" |
| 15 #include "vm/locations.h" | 16 #include "vm/locations.h" |
| 16 #include "vm/object_store.h" | 17 #include "vm/object_store.h" |
| 17 #include "vm/parser.h" | 18 #include "vm/parser.h" |
| 18 #include "vm/simulator.h" | 19 #include "vm/simulator.h" |
| 19 #include "vm/stack_frame.h" | 20 #include "vm/stack_frame.h" |
| (...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 | 1577 |
| 1577 | 1578 |
| 1578 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1579 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1579 ASSERT(sizeof(classid_t) == kInt16Size); | 1580 ASSERT(sizeof(classid_t) == kInt16Size); |
| 1580 | 1581 |
| 1581 const intptr_t value_cid = value()->Type()->ToCid(); | 1582 const intptr_t value_cid = value()->Type()->ToCid(); |
| 1582 const intptr_t field_cid = field().guarded_cid(); | 1583 const intptr_t field_cid = field().guarded_cid(); |
| 1583 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; | 1584 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; |
| 1584 | 1585 |
| 1585 if (field_cid == kDynamicCid) { | 1586 if (field_cid == kDynamicCid) { |
| 1587 if (Compiler::IsBackgroundCompilation()) { |
| 1588 // Field state changed while compiling. |
| 1589 Compiler::AbortBackgroundCompilation(deopt_id()); |
| 1590 } |
| 1586 ASSERT(!compiler->is_optimizing()); | 1591 ASSERT(!compiler->is_optimizing()); |
| 1587 return; // Nothing to emit. | 1592 return; // Nothing to emit. |
| 1588 } | 1593 } |
| 1589 | 1594 |
| 1590 const bool emit_full_guard = | 1595 const bool emit_full_guard = |
| 1591 !compiler->is_optimizing() || (field_cid == kIllegalCid); | 1596 !compiler->is_optimizing() || (field_cid == kIllegalCid); |
| 1592 | 1597 |
| 1593 const bool needs_value_cid_temp_reg = emit_full_guard || | 1598 const bool needs_value_cid_temp_reg = emit_full_guard || |
| 1594 ((value_cid == kDynamicCid) && (field_cid != kSmiCid)); | 1599 ((value_cid == kDynamicCid) && (field_cid != kSmiCid)); |
| 1595 | 1600 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1730 summary->set_in(0, Location::RequiresRegister()); | 1735 summary->set_in(0, Location::RequiresRegister()); |
| 1731 summary->set_temp(0, Location::RequiresRegister()); | 1736 summary->set_temp(0, Location::RequiresRegister()); |
| 1732 return summary; | 1737 return summary; |
| 1733 } | 1738 } |
| 1734 UNREACHABLE(); | 1739 UNREACHABLE(); |
| 1735 } | 1740 } |
| 1736 | 1741 |
| 1737 | 1742 |
| 1738 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1743 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1739 if (field().guarded_list_length() == Field::kNoFixedLength) { | 1744 if (field().guarded_list_length() == Field::kNoFixedLength) { |
| 1745 if (Compiler::IsBackgroundCompilation()) { |
| 1746 // Field state changed while compiling. |
| 1747 Compiler::AbortBackgroundCompilation(deopt_id()); |
| 1748 } |
| 1740 ASSERT(!compiler->is_optimizing()); | 1749 ASSERT(!compiler->is_optimizing()); |
| 1741 return; // Nothing to emit. | 1750 return; // Nothing to emit. |
| 1742 } | 1751 } |
| 1743 | 1752 |
| 1744 Label* deopt = compiler->is_optimizing() ? | 1753 Label* deopt = compiler->is_optimizing() ? |
| 1745 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; | 1754 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; |
| 1746 | 1755 |
| 1747 const Register value_reg = locs()->in(0).reg(); | 1756 const Register value_reg = locs()->in(0).reg(); |
| 1748 | 1757 |
| 1749 if (!compiler->is_optimizing() || | 1758 if (!compiler->is_optimizing() || |
| (...skipping 5102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6852 1, | 6861 1, |
| 6853 locs()); | 6862 locs()); |
| 6854 __ Drop(1); | 6863 __ Drop(1); |
| 6855 __ Pop(result); | 6864 __ Pop(result); |
| 6856 } | 6865 } |
| 6857 | 6866 |
| 6858 | 6867 |
| 6859 } // namespace dart | 6868 } // namespace dart |
| 6860 | 6869 |
| 6861 #endif // defined TARGET_ARCH_ARM | 6870 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |