Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. | 6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 7 #if defined(TARGET_ARCH_ARM) | 7 #if defined(TARGET_ARCH_ARM) |
| 8 | 8 |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 | 10 |
| (...skipping 3121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3132 Register result = locs->out(0).reg(); | 3132 Register result = locs->out(0).reg(); |
| 3133 locs->live_registers()->Remove(Location::RegisterLocation(result)); | 3133 locs->live_registers()->Remove(Location::RegisterLocation(result)); |
| 3134 | 3134 |
| 3135 compiler->SaveLiveRegisters(locs); | 3135 compiler->SaveLiveRegisters(locs); |
| 3136 if (instruction_->env() != NULL) { | 3136 if (instruction_->env() != NULL) { |
| 3137 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); | 3137 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); |
| 3138 compiler->pending_deoptimization_env_ = env; | 3138 compiler->pending_deoptimization_env_ = env; |
| 3139 } | 3139 } |
| 3140 __ Push(locs->in(0).reg()); | 3140 __ Push(locs->in(0).reg()); |
| 3141 __ Push(locs->in(1).reg()); | 3141 __ Push(locs->in(1).reg()); |
| 3142 String& selector = | |
| 3143 String::Handle(instruction_->call()->ic_data()->target_name()); | |
| 3144 Array& argument_names = | |
| 3145 Array::Handle(instruction_->call()->ic_data()->arguments_descriptor()); | |
| 3142 compiler->EmitMegamorphicInstanceCall( | 3146 compiler->EmitMegamorphicInstanceCall( |
| 3143 *instruction_->call()->ic_data(), instruction_->call()->ArgumentCount(), | 3147 selector, argument_names, instruction_->call()->ArgumentCount(), |
| 3144 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), | 3148 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), |
| 3145 locs, try_index_, | 3149 locs, try_index_, |
| 3146 /* slow_path_argument_count = */ 2); | 3150 /* slow_path_argument_count = */ 2); |
| 3147 __ mov(result, Operand(R0)); | 3151 __ mov(result, Operand(R0)); |
| 3148 compiler->RestoreLiveRegisters(locs); | 3152 compiler->RestoreLiveRegisters(locs); |
| 3149 __ b(exit_label()); | 3153 __ b(exit_label()); |
| 3150 compiler->pending_deoptimization_env_ = NULL; | 3154 compiler->pending_deoptimization_env_ = NULL; |
| 3151 } | 3155 } |
| 3152 | 3156 |
| 3153 private: | 3157 private: |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3271 Register result = merged_ ? locs->temp(0).reg() : locs->out(0).reg(); | 3275 Register result = merged_ ? locs->temp(0).reg() : locs->out(0).reg(); |
| 3272 locs->live_registers()->Remove(Location::RegisterLocation(result)); | 3276 locs->live_registers()->Remove(Location::RegisterLocation(result)); |
| 3273 | 3277 |
| 3274 compiler->SaveLiveRegisters(locs); | 3278 compiler->SaveLiveRegisters(locs); |
| 3275 if (instruction_->env() != NULL) { | 3279 if (instruction_->env() != NULL) { |
| 3276 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); | 3280 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); |
| 3277 compiler->pending_deoptimization_env_ = env; | 3281 compiler->pending_deoptimization_env_ = env; |
| 3278 } | 3282 } |
| 3279 __ Push(locs->in(0).reg()); | 3283 __ Push(locs->in(0).reg()); |
| 3280 __ Push(locs->in(1).reg()); | 3284 __ Push(locs->in(1).reg()); |
| 3285 String& selector = | |
|
Vyacheslav Egorov (Google)
2017/04/10 10:59:28
const String&
erikcorry
2017/04/19 15:06:40
Done.
| |
| 3286 String::Handle(instruction_->call()->ic_data()->target_name()); | |
| 3287 Array& argument_names = | |
|
Vyacheslav Egorov (Google)
2017/04/10 10:59:28
const Array&
erikcorry
2017/04/19 15:06:40
Done.
| |
| 3288 Array::Handle(instruction_->call()->ic_data()->arguments_descriptor()); | |
| 3281 compiler->EmitMegamorphicInstanceCall( | 3289 compiler->EmitMegamorphicInstanceCall( |
| 3282 *instruction_->call()->ic_data(), instruction_->call()->ArgumentCount(), | 3290 selector, argument_names, instruction_->call()->ArgumentCount(), |
| 3283 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), | 3291 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), |
| 3284 locs, try_index_, | 3292 locs, try_index_, |
| 3285 /* slow_path_argument_count = */ 2); | 3293 /* slow_path_argument_count = */ 2); |
| 3286 __ mov(result, Operand(R0)); | 3294 __ mov(result, Operand(R0)); |
| 3287 compiler->RestoreLiveRegisters(locs); | 3295 compiler->RestoreLiveRegisters(locs); |
| 3288 compiler->pending_deoptimization_env_ = NULL; | 3296 compiler->pending_deoptimization_env_ = NULL; |
| 3289 if (merged_) { | 3297 if (merged_) { |
| 3290 __ CompareObject(result, Bool::True()); | 3298 __ CompareObject(result, Bool::True()); |
| 3291 __ b( | 3299 __ b( |
| 3292 instruction_->is_negated() ? labels_.false_label : labels_.true_label, | 3300 instruction_->is_negated() ? labels_.false_label : labels_.true_label, |
| (...skipping 3019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6312 if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) { | 6320 if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) { |
| 6313 __ tst(value, Operand(kSmiTagMask)); | 6321 __ tst(value, Operand(kSmiTagMask)); |
| 6314 __ b(&is_ok, EQ); | 6322 __ b(&is_ok, EQ); |
| 6315 } else { | 6323 } else { |
| 6316 __ tst(value, Operand(kSmiTagMask)); | 6324 __ tst(value, Operand(kSmiTagMask)); |
| 6317 __ b(deopt, EQ); | 6325 __ b(deopt, EQ); |
| 6318 } | 6326 } |
| 6319 Register biased_cid = temp; | 6327 Register biased_cid = temp; |
| 6320 __ LoadClassId(biased_cid, value); | 6328 __ LoadClassId(biased_cid, value); |
| 6321 | 6329 |
| 6322 GrowableArray<CidRangeTarget> sorted_ic_data; | 6330 ZoneGrowableArray<CidRangeTarget> sorted_ic_data; |
| 6323 FlowGraphCompiler::SortICDataByCount(unary_checks(), &sorted_ic_data, | 6331 FlowGraphCompiler::SortICDataByCount(unary_checks(), &sorted_ic_data, |
| 6324 /* drop_smi = */ true); | 6332 /* drop_smi = */ true); |
| 6325 | 6333 |
| 6326 if (IsDenseSwitch()) { | 6334 if (IsDenseSwitch()) { |
| 6327 ASSERT(cids_[0] < cids_[cids_.length() - 1]); | 6335 ASSERT(cids_[0] < cids_[cids_.length() - 1]); |
| 6328 __ AddImmediate(biased_cid, -cids_[0]); | 6336 __ AddImmediate(biased_cid, -cids_[0]); |
| 6329 __ CompareImmediate(biased_cid, cids_[cids_.length() - 1] - cids_[0]); | 6337 __ CompareImmediate(biased_cid, cids_[cids_.length() - 1] - cids_[0]); |
| 6330 __ b(deopt, HI); | 6338 __ b(deopt, HI); |
| 6331 | 6339 |
| 6332 intptr_t mask = ComputeCidMask(); | 6340 intptr_t mask = ComputeCidMask(); |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7262 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), | 7270 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), |
| 7263 kGrowRegExpStackRuntimeEntry, 1, locs()); | 7271 kGrowRegExpStackRuntimeEntry, 1, locs()); |
| 7264 __ Drop(1); | 7272 __ Drop(1); |
| 7265 __ Pop(result); | 7273 __ Pop(result); |
| 7266 } | 7274 } |
| 7267 | 7275 |
| 7268 | 7276 |
| 7269 } // namespace dart | 7277 } // namespace dart |
| 7270 | 7278 |
| 7271 #endif // defined TARGET_ARCH_ARM | 7279 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |