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/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 | 1431 |
1432 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1432 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1433 ASSERT(sizeof(classid_t) == kInt32Size); | 1433 ASSERT(sizeof(classid_t) == kInt32Size); |
1434 const intptr_t value_cid = value()->Type()->ToCid(); | 1434 const intptr_t value_cid = value()->Type()->ToCid(); |
1435 const intptr_t field_cid = field().guarded_cid(); | 1435 const intptr_t field_cid = field().guarded_cid(); |
1436 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; | 1436 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; |
1437 | 1437 |
1438 if (field_cid == kDynamicCid) { | 1438 if (field_cid == kDynamicCid) { |
1439 if (Compiler::IsBackgroundCompilation()) { | 1439 if (Compiler::IsBackgroundCompilation()) { |
1440 // Field state changed while compiling. | 1440 // Field state changed while compiling. |
1441 Compiler::AbortBackgroundCompilation(deopt_id()); | 1441 Compiler::AbortBackgroundCompilation(deopt_id(), |
| 1442 "GuardFieldClassInstr: field state changed while compiling"); |
1442 } | 1443 } |
1443 ASSERT(!compiler->is_optimizing()); | 1444 ASSERT(!compiler->is_optimizing()); |
1444 return; // Nothing to emit. | 1445 return; // Nothing to emit. |
1445 } | 1446 } |
1446 | 1447 |
1447 const bool emit_full_guard = | 1448 const bool emit_full_guard = |
1448 !compiler->is_optimizing() || (field_cid == kIllegalCid); | 1449 !compiler->is_optimizing() || (field_cid == kIllegalCid); |
1449 | 1450 |
1450 const bool needs_value_cid_temp_reg = emit_full_guard || | 1451 const bool needs_value_cid_temp_reg = emit_full_guard || |
1451 ((value_cid == kDynamicCid) && (field_cid != kSmiCid)); | 1452 ((value_cid == kDynamicCid) && (field_cid != kSmiCid)); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 return summary; | 1587 return summary; |
1587 } | 1588 } |
1588 UNREACHABLE(); | 1589 UNREACHABLE(); |
1589 } | 1590 } |
1590 | 1591 |
1591 | 1592 |
1592 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1593 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1593 if (field().guarded_list_length() == Field::kNoFixedLength) { | 1594 if (field().guarded_list_length() == Field::kNoFixedLength) { |
1594 if (Compiler::IsBackgroundCompilation()) { | 1595 if (Compiler::IsBackgroundCompilation()) { |
1595 // Field state changed while compiling. | 1596 // Field state changed while compiling. |
1596 Compiler::AbortBackgroundCompilation(deopt_id()); | 1597 Compiler::AbortBackgroundCompilation(deopt_id(), |
| 1598 "GuardFieldLengthInstr: field state changed while compiling"); |
1597 } | 1599 } |
1598 ASSERT(!compiler->is_optimizing()); | 1600 ASSERT(!compiler->is_optimizing()); |
1599 return; // Nothing to emit. | 1601 return; // Nothing to emit. |
1600 } | 1602 } |
1601 | 1603 |
1602 Label* deopt = compiler->is_optimizing() ? | 1604 Label* deopt = compiler->is_optimizing() ? |
1603 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; | 1605 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; |
1604 | 1606 |
1605 const Register value_reg = locs()->in(0).reg(); | 1607 const Register value_reg = locs()->in(0).reg(); |
1606 | 1608 |
(...skipping 4090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5697 1, | 5699 1, |
5698 locs()); | 5700 locs()); |
5699 __ Drop(1); | 5701 __ Drop(1); |
5700 __ Pop(result); | 5702 __ Pop(result); |
5701 } | 5703 } |
5702 | 5704 |
5703 | 5705 |
5704 } // namespace dart | 5706 } // namespace dart |
5705 | 5707 |
5706 #endif // defined TARGET_ARCH_ARM64 | 5708 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |