| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 2850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2861 Register result = locs->out(0).reg(); | 2861 Register result = locs->out(0).reg(); |
| 2862 locs->live_registers()->Remove(Location::RegisterLocation(result)); | 2862 locs->live_registers()->Remove(Location::RegisterLocation(result)); |
| 2863 | 2863 |
| 2864 compiler->SaveLiveRegisters(locs); | 2864 compiler->SaveLiveRegisters(locs); |
| 2865 if (instruction_->env() != NULL) { | 2865 if (instruction_->env() != NULL) { |
| 2866 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); | 2866 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); |
| 2867 compiler->pending_deoptimization_env_ = env; | 2867 compiler->pending_deoptimization_env_ = env; |
| 2868 } | 2868 } |
| 2869 __ Push(locs->in(0).reg()); | 2869 __ Push(locs->in(0).reg()); |
| 2870 __ Push(locs->in(1).reg()); | 2870 __ Push(locs->in(1).reg()); |
| 2871 const String& selector = |
| 2872 String::Handle(instruction_->call()->ic_data()->target_name()); |
| 2873 const Array& argument_names = |
| 2874 Array::Handle(instruction_->call()->ic_data()->arguments_descriptor()); |
| 2871 compiler->EmitMegamorphicInstanceCall( | 2875 compiler->EmitMegamorphicInstanceCall( |
| 2872 *instruction_->call()->ic_data(), instruction_->call()->ArgumentCount(), | 2876 selector, argument_names, instruction_->call()->ArgumentCount(), |
| 2873 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), | 2877 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), |
| 2874 locs, try_index_, | 2878 locs, try_index_, |
| 2875 /* slow_path_argument_count = */ 2); | 2879 /* slow_path_argument_count = */ 2); |
| 2876 __ mov(result, R0); | 2880 __ mov(result, R0); |
| 2877 compiler->RestoreLiveRegisters(locs); | 2881 compiler->RestoreLiveRegisters(locs); |
| 2878 __ b(exit_label()); | 2882 __ b(exit_label()); |
| 2879 compiler->pending_deoptimization_env_ = NULL; | 2883 compiler->pending_deoptimization_env_ = NULL; |
| 2880 } | 2884 } |
| 2881 | 2885 |
| 2882 private: | 2886 private: |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3003 Register result = merged_ ? locs->temp(0).reg() : locs->out(0).reg(); | 3007 Register result = merged_ ? locs->temp(0).reg() : locs->out(0).reg(); |
| 3004 locs->live_registers()->Remove(Location::RegisterLocation(result)); | 3008 locs->live_registers()->Remove(Location::RegisterLocation(result)); |
| 3005 | 3009 |
| 3006 compiler->SaveLiveRegisters(locs); | 3010 compiler->SaveLiveRegisters(locs); |
| 3007 if (instruction_->env() != NULL) { | 3011 if (instruction_->env() != NULL) { |
| 3008 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); | 3012 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); |
| 3009 compiler->pending_deoptimization_env_ = env; | 3013 compiler->pending_deoptimization_env_ = env; |
| 3010 } | 3014 } |
| 3011 __ Push(locs->in(0).reg()); | 3015 __ Push(locs->in(0).reg()); |
| 3012 __ Push(locs->in(1).reg()); | 3016 __ Push(locs->in(1).reg()); |
| 3017 String& selector = |
| 3018 String::Handle(instruction_->call()->ic_data()->target_name()); |
| 3019 Array& argument_names = |
| 3020 Array::Handle(instruction_->call()->ic_data()->arguments_descriptor()); |
| 3013 compiler->EmitMegamorphicInstanceCall( | 3021 compiler->EmitMegamorphicInstanceCall( |
| 3014 *instruction_->call()->ic_data(), instruction_->call()->ArgumentCount(), | 3022 selector, argument_names, instruction_->call()->ArgumentCount(), |
| 3015 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), | 3023 instruction_->call()->deopt_id(), instruction_->call()->token_pos(), |
| 3016 locs, try_index_, | 3024 locs, try_index_, |
| 3017 /* slow_path_argument_count = */ 2); | 3025 /* slow_path_argument_count = */ 2); |
| 3018 __ mov(result, R0); | 3026 __ mov(result, R0); |
| 3019 compiler->RestoreLiveRegisters(locs); | 3027 compiler->RestoreLiveRegisters(locs); |
| 3020 compiler->pending_deoptimization_env_ = NULL; | 3028 compiler->pending_deoptimization_env_ = NULL; |
| 3021 if (merged_) { | 3029 if (merged_) { |
| 3022 __ CompareObject(result, Bool::True()); | 3030 __ CompareObject(result, Bool::True()); |
| 3023 __ b( | 3031 __ b( |
| 3024 instruction_->is_negated() ? labels_.false_label : labels_.true_label, | 3032 instruction_->is_negated() ? labels_.false_label : labels_.true_label, |
| (...skipping 3059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6084 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), | 6092 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), |
| 6085 kGrowRegExpStackRuntimeEntry, 1, locs()); | 6093 kGrowRegExpStackRuntimeEntry, 1, locs()); |
| 6086 __ Drop(1); | 6094 __ Drop(1); |
| 6087 __ Pop(result); | 6095 __ Pop(result); |
| 6088 } | 6096 } |
| 6089 | 6097 |
| 6090 | 6098 |
| 6091 } // namespace dart | 6099 } // namespace dart |
| 6092 | 6100 |
| 6093 #endif // defined TARGET_ARCH_ARM64 | 6101 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |