| 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 3694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3705 Register value = locs()->in(0).reg(); | 3705 Register value = locs()->in(0).reg(); |
| 3706 Register result = locs()->out().reg(); | 3706 Register result = locs()->out().reg(); |
| 3707 | 3707 |
| 3708 __ LoadObject(result, Bool::True()); | 3708 __ LoadObject(result, Bool::True()); |
| 3709 __ LoadObject(TMP1, Bool::False()); | 3709 __ LoadObject(TMP1, Bool::False()); |
| 3710 __ subu(CMPRES, value, result); | 3710 __ subu(CMPRES, value, result); |
| 3711 __ movz(result, TMP1, CMPRES); // If value is True, move False into result. | 3711 __ movz(result, TMP1, CMPRES); // If value is True, move False into result. |
| 3712 } | 3712 } |
| 3713 | 3713 |
| 3714 | 3714 |
| 3715 LocationSummary* ChainContextInstr::MakeLocationSummary() const { | |
| 3716 return LocationSummary::Make(1, | |
| 3717 Location::NoLocation(), | |
| 3718 LocationSummary::kNoCall); | |
| 3719 } | |
| 3720 | |
| 3721 | |
| 3722 void ChainContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | |
| 3723 Register context_value = locs()->in(0).reg(); | |
| 3724 | |
| 3725 // Chain the new context in context_value to its parent in CTX. | |
| 3726 __ StoreIntoObject(context_value, | |
| 3727 FieldAddress(context_value, Context::parent_offset()), | |
| 3728 CTX); | |
| 3729 // Set new context as current context. | |
| 3730 __ mov(CTX, context_value); | |
| 3731 } | |
| 3732 | |
| 3733 | |
| 3734 LocationSummary* StoreVMFieldInstr::MakeLocationSummary() const { | 3715 LocationSummary* StoreVMFieldInstr::MakeLocationSummary() const { |
| 3735 const intptr_t kNumInputs = 2; | 3716 const intptr_t kNumInputs = 2; |
| 3736 const intptr_t kNumTemps = 0; | 3717 const intptr_t kNumTemps = 0; |
| 3737 LocationSummary* locs = | 3718 LocationSummary* locs = |
| 3738 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3719 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3739 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() | 3720 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() |
| 3740 : Location::RequiresRegister()); | 3721 : Location::RequiresRegister()); |
| 3741 locs->set_in(1, Location::RequiresRegister()); | 3722 locs->set_in(1, Location::RequiresRegister()); |
| 3742 return locs; | 3723 return locs; |
| 3743 } | 3724 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3791 compiler->GenerateCall(token_pos(), | 3772 compiler->GenerateCall(token_pos(), |
| 3792 &label, | 3773 &label, |
| 3793 PcDescriptors::kOther, | 3774 PcDescriptors::kOther, |
| 3794 locs()); | 3775 locs()); |
| 3795 __ Drop(2); // Discard type arguments and receiver. | 3776 __ Drop(2); // Discard type arguments and receiver. |
| 3796 } | 3777 } |
| 3797 | 3778 |
| 3798 } // namespace dart | 3779 } // namespace dart |
| 3799 | 3780 |
| 3800 #endif // defined TARGET_ARCH_MIPS | 3781 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |