| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 // Chain the new context in context_value to its parent in CTX. | 1527 // Chain the new context in context_value to its parent in CTX. |
| 1528 __ StoreIntoObject(context_value, | 1528 __ StoreIntoObject(context_value, |
| 1529 FieldAddress(context_value, Context::parent_offset()), | 1529 FieldAddress(context_value, Context::parent_offset()), |
| 1530 CTX); | 1530 CTX); |
| 1531 // Set new context as current context. | 1531 // Set new context as current context. |
| 1532 __ MoveRegister(CTX, context_value); | 1532 __ MoveRegister(CTX, context_value); |
| 1533 } | 1533 } |
| 1534 | 1534 |
| 1535 | 1535 |
| 1536 LocationSummary* StoreVMFieldInstr::MakeLocationSummary() const { | 1536 LocationSummary* StoreVMFieldInstr::MakeLocationSummary() const { |
| 1537 return LocationSummary::Make(2, | 1537 return LocationSummary::Make( |
| 1538 Location::SameAsFirstInput(), | 1538 2, |
| 1539 LocationSummary::kNoCall); | 1539 is_used() ? Location::SameAsFirstInput() : Location::NoLocation(), |
| 1540 LocationSummary::kNoCall); |
| 1540 } | 1541 } |
| 1541 | 1542 |
| 1542 | 1543 |
| 1543 void StoreVMFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1544 void StoreVMFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1544 Register value_reg = locs()->in(0).reg(); | 1545 Register value_reg = locs()->in(0).reg(); |
| 1545 Register dest_reg = locs()->in(1).reg(); | 1546 Register dest_reg = locs()->in(1).reg(); |
| 1546 ASSERT(value_reg == locs()->out().reg()); | 1547 ASSERT(!is_used() || (value_reg == locs()->out().reg())); |
| 1547 | 1548 |
| 1548 if (value()->NeedsStoreBuffer()) { | 1549 if (value()->NeedsStoreBuffer()) { |
| 1549 __ StoreIntoObject(dest_reg, FieldAddress(dest_reg, offset_in_bytes()), | 1550 __ StoreIntoObject(dest_reg, FieldAddress(dest_reg, offset_in_bytes()), |
| 1550 value_reg); | 1551 value_reg); |
| 1551 } else { | 1552 } else { |
| 1552 __ StoreIntoObjectNoBarrier( | 1553 __ StoreIntoObjectNoBarrier( |
| 1553 dest_reg, FieldAddress(dest_reg, offset_in_bytes()), value_reg); | 1554 dest_reg, FieldAddress(dest_reg, offset_in_bytes()), value_reg); |
| 1554 } | 1555 } |
| 1555 } | 1556 } |
| 1556 | 1557 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1635 value->set_use_index(i); | 1636 value->set_use_index(i); |
| 1636 value->AddToEnvUseList(); | 1637 value->AddToEnvUseList(); |
| 1637 } | 1638 } |
| 1638 instr->set_env(copy); | 1639 instr->set_env(copy); |
| 1639 } | 1640 } |
| 1640 | 1641 |
| 1641 | 1642 |
| 1642 #undef __ | 1643 #undef __ |
| 1643 | 1644 |
| 1644 } // namespace dart | 1645 } // namespace dart |
| OLD | NEW |