| 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 "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 3006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3017 Register result = locs->out(0).reg(); | 3017 Register result = locs->out(0).reg(); |
| 3018 locs->live_registers()->Remove(Location::RegisterLocation(result)); | 3018 locs->live_registers()->Remove(Location::RegisterLocation(result)); |
| 3019 | 3019 |
| 3020 compiler->SaveLiveRegisters(locs); | 3020 compiler->SaveLiveRegisters(locs); |
| 3021 if (instruction_->env() != NULL) { | 3021 if (instruction_->env() != NULL) { |
| 3022 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); | 3022 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); |
| 3023 compiler->pending_deoptimization_env_ = env; | 3023 compiler->pending_deoptimization_env_ = env; |
| 3024 } | 3024 } |
| 3025 __ Push(locs->in(0).reg()); | 3025 __ Push(locs->in(0).reg()); |
| 3026 __ Push(locs->in(1).reg()); | 3026 __ Push(locs->in(1).reg()); |
| 3027 const String& selector = |
| 3028 String::Handle(instruction_->call()->ic_data()->target_name()); |
| 3029 const Array& argument_names = |
| 3030 Array::Handle(instruction_->call()->ic_data()->arguments_descriptor()); |
| 3027 compiler->EmitMegamorphicInstanceCall( | 3031 compiler->EmitMegamorphicInstanceCall( |
| 3028 *instruction_->call()->ic_data(), instruction_->call()->ArgumentCount(), | 3032 selector, argument_names, instruction_->call()->ArgumentCount(), |
| 3029 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), | 3033 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), |
| 3030 locs, try_index_, | 3034 locs, try_index_, |
| 3031 /* slow_path_argument_count = */ 2); | 3035 /* slow_path_argument_count = */ 2); |
| 3032 __ mov(result, V0); | 3036 __ mov(result, V0); |
| 3033 compiler->RestoreLiveRegisters(locs); | 3037 compiler->RestoreLiveRegisters(locs); |
| 3034 __ b(exit_label()); | 3038 __ b(exit_label()); |
| 3035 compiler->pending_deoptimization_env_ = NULL; | 3039 compiler->pending_deoptimization_env_ = NULL; |
| 3036 } | 3040 } |
| 3037 | 3041 |
| 3038 private: | 3042 private: |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3153 Register result = merged_ ? locs->temp(0).reg() : locs->out(0).reg(); | 3157 Register result = merged_ ? locs->temp(0).reg() : locs->out(0).reg(); |
| 3154 locs->live_registers()->Remove(Location::RegisterLocation(result)); | 3158 locs->live_registers()->Remove(Location::RegisterLocation(result)); |
| 3155 | 3159 |
| 3156 compiler->SaveLiveRegisters(locs); | 3160 compiler->SaveLiveRegisters(locs); |
| 3157 if (instruction_->env() != NULL) { | 3161 if (instruction_->env() != NULL) { |
| 3158 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); | 3162 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); |
| 3159 compiler->pending_deoptimization_env_ = env; | 3163 compiler->pending_deoptimization_env_ = env; |
| 3160 } | 3164 } |
| 3161 __ Push(locs->in(0).reg()); | 3165 __ Push(locs->in(0).reg()); |
| 3162 __ Push(locs->in(1).reg()); | 3166 __ Push(locs->in(1).reg()); |
| 3167 String& selector = |
| 3168 String::Handle(instruction_->call()->ic_data()->target_name()); |
| 3169 Array& argument_names = |
| 3170 Array::Handle(instruction_->call()->ic_data()->arguments_descriptor()); |
| 3163 compiler->EmitMegamorphicInstanceCall( | 3171 compiler->EmitMegamorphicInstanceCall( |
| 3164 *instruction_->call()->ic_data(), instruction_->call()->ArgumentCount(), | 3172 selector, argument_names, instruction_->call()->ArgumentCount(), |
| 3165 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), | 3173 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), |
| 3166 locs, try_index_, | 3174 locs, try_index_, |
| 3167 /* slow_path_argument_count = */ 2); | 3175 /* slow_path_argument_count = */ 2); |
| 3168 __ mov(result, V0); | 3176 __ mov(result, V0); |
| 3169 compiler->RestoreLiveRegisters(locs); | 3177 compiler->RestoreLiveRegisters(locs); |
| 3170 compiler->pending_deoptimization_env_ = NULL; | 3178 compiler->pending_deoptimization_env_ = NULL; |
| 3171 if (merged_) { | 3179 if (merged_) { |
| 3172 __ BranchEqual(result, Bool::True(), instruction_->is_negated() | 3180 __ BranchEqual(result, Bool::True(), instruction_->is_negated() |
| 3173 ? labels_.false_label | 3181 ? labels_.false_label |
| 3174 : labels_.true_label); | 3182 : labels_.true_label); |
| (...skipping 2925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6100 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), | 6108 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), |
| 6101 kGrowRegExpStackRuntimeEntry, 1, locs()); | 6109 kGrowRegExpStackRuntimeEntry, 1, locs()); |
| 6102 __ lw(result, Address(SP, 1 * kWordSize)); | 6110 __ lw(result, Address(SP, 1 * kWordSize)); |
| 6103 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 6111 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
| 6104 } | 6112 } |
| 6105 | 6113 |
| 6106 | 6114 |
| 6107 } // namespace dart | 6115 } // namespace dart |
| 6108 | 6116 |
| 6109 #endif // defined TARGET_ARCH_MIPS | 6117 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |