| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 | 1437 |
| 1438 return summary; | 1438 return summary; |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 | 1441 |
| 1442 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1442 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1443 const intptr_t value_cid = value()->Type()->ToCid(); | 1443 const intptr_t value_cid = value()->Type()->ToCid(); |
| 1444 const intptr_t field_cid = field().guarded_cid(); | 1444 const intptr_t field_cid = field().guarded_cid(); |
| 1445 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; | 1445 const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid; |
| 1446 | 1446 |
| 1447 if (field_cid == kDynamicCid) { | 1447 ASSERT(field_cid != kDynamicCid); |
| 1448 ASSERT(!compiler->is_optimizing()); | |
| 1449 return; // Nothing to emit. | |
| 1450 } | |
| 1451 | 1448 |
| 1452 const bool emit_full_guard = | 1449 const bool emit_full_guard = |
| 1453 !compiler->is_optimizing() || (field_cid == kIllegalCid); | 1450 !compiler->is_optimizing() || (field_cid == kIllegalCid); |
| 1454 | 1451 |
| 1455 const bool needs_value_cid_temp_reg = | 1452 const bool needs_value_cid_temp_reg = |
| 1456 (value_cid == kDynamicCid) && (emit_full_guard || (field_cid != kSmiCid)); | 1453 (value_cid == kDynamicCid) && (emit_full_guard || (field_cid != kSmiCid)); |
| 1457 | 1454 |
| 1458 const bool needs_field_temp_reg = emit_full_guard; | 1455 const bool needs_field_temp_reg = emit_full_guard; |
| 1459 | 1456 |
| 1460 const Register value_reg = locs()->in(0).reg(); | 1457 const Register value_reg = locs()->in(0).reg(); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1578 LocationSummary* summary = new(zone) LocationSummary( | 1575 LocationSummary* summary = new(zone) LocationSummary( |
| 1579 zone, kNumInputs, 0, LocationSummary::kNoCall); | 1576 zone, kNumInputs, 0, LocationSummary::kNoCall); |
| 1580 summary->set_in(0, Location::RequiresRegister()); | 1577 summary->set_in(0, Location::RequiresRegister()); |
| 1581 return summary; | 1578 return summary; |
| 1582 } | 1579 } |
| 1583 UNREACHABLE(); | 1580 UNREACHABLE(); |
| 1584 } | 1581 } |
| 1585 | 1582 |
| 1586 | 1583 |
| 1587 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1584 void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1588 if (field().guarded_list_length() == Field::kNoFixedLength) { | 1585 ASSERT(field().guarded_list_length() != Field::kNoFixedLength); |
| 1589 ASSERT(!compiler->is_optimizing()); | |
| 1590 return; // Nothing to emit. | |
| 1591 } | |
| 1592 | 1586 |
| 1593 Label* deopt = compiler->is_optimizing() ? | 1587 Label* deopt = compiler->is_optimizing() ? |
| 1594 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; | 1588 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; |
| 1595 | 1589 |
| 1596 const Register value_reg = locs()->in(0).reg(); | 1590 const Register value_reg = locs()->in(0).reg(); |
| 1597 | 1591 |
| 1598 if (!compiler->is_optimizing() || | 1592 if (!compiler->is_optimizing() || |
| 1599 (field().guarded_list_length() == Field::kUnknownFixedLength)) { | 1593 (field().guarded_list_length() == Field::kUnknownFixedLength)) { |
| 1600 const Register field_reg = locs()->temp(0).reg(); | 1594 const Register field_reg = locs()->temp(0).reg(); |
| 1601 const Register offset_reg = locs()->temp(1).reg(); | 1595 const Register offset_reg = locs()->temp(1).reg(); |
| (...skipping 4847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6449 __ Drop(1); | 6443 __ Drop(1); |
| 6450 __ popq(result); | 6444 __ popq(result); |
| 6451 } | 6445 } |
| 6452 | 6446 |
| 6453 | 6447 |
| 6454 } // namespace dart | 6448 } // namespace dart |
| 6455 | 6449 |
| 6456 #undef __ | 6450 #undef __ |
| 6457 | 6451 |
| 6458 #endif // defined TARGET_ARCH_X64 | 6452 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |