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/compiler.h" |
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1574 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1575 ASSERT(sizeof(classid_t) == kInt16Size); | 1575 ASSERT(sizeof(classid_t) == kInt16Size); |
1576 | 1576 |
1577 const intptr_t value_cid = value()->Type()->ToCid(); | 1577 const intptr_t value_cid = value()->Type()->ToCid(); |
1578 const intptr_t field_cid = field().guarded_cid(); | 1578 const intptr_t field_cid = field().guarded_cid(); |
1579 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; | 1579 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; |
1580 | 1580 |
1581 if (field_cid == kDynamicCid) { | 1581 if (field_cid == kDynamicCid) { |
1582 if (Compiler::IsBackgroundCompilation()) { | 1582 if (Compiler::IsBackgroundCompilation()) { |
1583 // Field state changed while compiling. | 1583 // Field state changed while compiling. |
1584 Compiler::AbortBackgroundCompilation(deopt_id()); | 1584 Compiler::AbortBackgroundCompilation(deopt_id(), |
| 1585 "GuardFieldClassInstr: field state changed while compiling"); |
1585 } | 1586 } |
1586 ASSERT(!compiler->is_optimizing()); | 1587 ASSERT(!compiler->is_optimizing()); |
1587 return; // Nothing to emit. | 1588 return; // Nothing to emit. |
1588 } | 1589 } |
1589 | 1590 |
1590 const bool emit_full_guard = | 1591 const bool emit_full_guard = |
1591 !compiler->is_optimizing() || (field_cid == kIllegalCid); | 1592 !compiler->is_optimizing() || (field_cid == kIllegalCid); |
1592 | 1593 |
1593 const bool needs_value_cid_temp_reg = emit_full_guard || | 1594 const bool needs_value_cid_temp_reg = emit_full_guard || |
1594 ((value_cid == kDynamicCid) && (field_cid != kSmiCid)); | 1595 ((value_cid == kDynamicCid) && (field_cid != kSmiCid)); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1732 return summary; | 1733 return summary; |
1733 } | 1734 } |
1734 UNREACHABLE(); | 1735 UNREACHABLE(); |
1735 } | 1736 } |
1736 | 1737 |
1737 | 1738 |
1738 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1739 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1739 if (field().guarded_list_length() == Field::kNoFixedLength) { | 1740 if (field().guarded_list_length() == Field::kNoFixedLength) { |
1740 if (Compiler::IsBackgroundCompilation()) { | 1741 if (Compiler::IsBackgroundCompilation()) { |
1741 // Field state changed while compiling. | 1742 // Field state changed while compiling. |
1742 Compiler::AbortBackgroundCompilation(deopt_id()); | 1743 Compiler::AbortBackgroundCompilation(deopt_id(), |
| 1744 "GuardFieldLengthInstr: field state changed while compiling"); |
1743 } | 1745 } |
1744 ASSERT(!compiler->is_optimizing()); | 1746 ASSERT(!compiler->is_optimizing()); |
1745 return; // Nothing to emit. | 1747 return; // Nothing to emit. |
1746 } | 1748 } |
1747 | 1749 |
1748 Label* deopt = compiler->is_optimizing() ? | 1750 Label* deopt = compiler->is_optimizing() ? |
1749 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; | 1751 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; |
1750 | 1752 |
1751 const Register value_reg = locs()->in(0).reg(); | 1753 const Register value_reg = locs()->in(0).reg(); |
1752 | 1754 |
(...skipping 5182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6935 1, | 6937 1, |
6936 locs()); | 6938 locs()); |
6937 __ Drop(1); | 6939 __ Drop(1); |
6938 __ Pop(result); | 6940 __ Pop(result); |
6939 } | 6941 } |
6940 | 6942 |
6941 | 6943 |
6942 } // namespace dart | 6944 } // namespace dart |
6943 | 6945 |
6944 #endif // defined TARGET_ARCH_ARM | 6946 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |