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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
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 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 | 1405 |
1406 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1406 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1407 ASSERT(sizeof(classid_t) == kInt16Size); | 1407 ASSERT(sizeof(classid_t) == kInt16Size); |
1408 const intptr_t value_cid = value()->Type()->ToCid(); | 1408 const intptr_t value_cid = value()->Type()->ToCid(); |
1409 const intptr_t field_cid = field().guarded_cid(); | 1409 const intptr_t field_cid = field().guarded_cid(); |
1410 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; | 1410 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; |
1411 | 1411 |
1412 if (field_cid == kDynamicCid) { | 1412 if (field_cid == kDynamicCid) { |
1413 if (Compiler::IsBackgroundCompilation()) { | 1413 if (Compiler::IsBackgroundCompilation()) { |
1414 // Field state changed while compiling. | 1414 // Field state changed while compiling. |
1415 Compiler::AbortBackgroundCompilation(deopt_id()); | 1415 Compiler::AbortBackgroundCompilation(deopt_id(), |
| 1416 "GuardFieldClassInstr: field state changed while compiling"); |
1416 } | 1417 } |
1417 ASSERT(!compiler->is_optimizing()); | 1418 ASSERT(!compiler->is_optimizing()); |
1418 return; // Nothing to emit. | 1419 return; // Nothing to emit. |
1419 } | 1420 } |
1420 | 1421 |
1421 const bool emit_full_guard = | 1422 const bool emit_full_guard = |
1422 !compiler->is_optimizing() || (field_cid == kIllegalCid); | 1423 !compiler->is_optimizing() || (field_cid == kIllegalCid); |
1423 | 1424 |
1424 const bool needs_value_cid_temp_reg = | 1425 const bool needs_value_cid_temp_reg = |
1425 (value_cid == kDynamicCid) && (emit_full_guard || (field_cid != kSmiCid)); | 1426 (value_cid == kDynamicCid) && (emit_full_guard || (field_cid != kSmiCid)); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 return summary; | 1565 return summary; |
1565 } | 1566 } |
1566 UNREACHABLE(); | 1567 UNREACHABLE(); |
1567 } | 1568 } |
1568 | 1569 |
1569 | 1570 |
1570 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1571 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1571 if (field().guarded_list_length() == Field::kNoFixedLength) { | 1572 if (field().guarded_list_length() == Field::kNoFixedLength) { |
1572 if (Compiler::IsBackgroundCompilation()) { | 1573 if (Compiler::IsBackgroundCompilation()) { |
1573 // Field state changed while compiling. | 1574 // Field state changed while compiling. |
1574 Compiler::AbortBackgroundCompilation(deopt_id()); | 1575 Compiler::AbortBackgroundCompilation(deopt_id(), |
| 1576 "GuardFieldLengthInstr: field state changed while compiling"); |
1575 } | 1577 } |
1576 ASSERT(!compiler->is_optimizing()); | 1578 ASSERT(!compiler->is_optimizing()); |
1577 return; // Nothing to emit. | 1579 return; // Nothing to emit. |
1578 } | 1580 } |
1579 | 1581 |
1580 Label* deopt = compiler->is_optimizing() ? | 1582 Label* deopt = compiler->is_optimizing() ? |
1581 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; | 1583 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; |
1582 | 1584 |
1583 const Register value_reg = locs()->in(0).reg(); | 1585 const Register value_reg = locs()->in(0).reg(); |
1584 | 1586 |
(...skipping 5257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6842 __ Drop(1); | 6844 __ Drop(1); |
6843 __ popl(result); | 6845 __ popl(result); |
6844 } | 6846 } |
6845 | 6847 |
6846 | 6848 |
6847 } // namespace dart | 6849 } // namespace dart |
6848 | 6850 |
6849 #undef __ | 6851 #undef __ |
6850 | 6852 |
6851 #endif // defined TARGET_ARCH_IA32 | 6853 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |