| 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/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/bootstrap.h" | 8 #include "vm/bootstrap.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/constant_propagator.h" | 10 #include "vm/constant_propagator.h" |
| (...skipping 3107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3118 } else { | 3118 } else { |
| 3119 __ InstanceCall2(ArgumentCount(), call_ic_data_kidx); | 3119 __ InstanceCall2(ArgumentCount(), call_ic_data_kidx); |
| 3120 } | 3120 } |
| 3121 break; | 3121 break; |
| 3122 default: | 3122 default: |
| 3123 UNIMPLEMENTED(); | 3123 UNIMPLEMENTED(); |
| 3124 break; | 3124 break; |
| 3125 } | 3125 } |
| 3126 compiler->AddCurrentDescriptor(RawPcDescriptors::kIcCall, deopt_id(), | 3126 compiler->AddCurrentDescriptor(RawPcDescriptors::kIcCall, deopt_id(), |
| 3127 token_pos()); | 3127 token_pos()); |
| 3128 compiler->RecordAfterCall(this); | 3128 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult); |
| 3129 | 3129 |
| 3130 if (compiler->is_optimizing()) { | 3130 if (compiler->is_optimizing()) { |
| 3131 __ PopLocal(locs()->out(0).reg()); | 3131 __ PopLocal(locs()->out(0).reg()); |
| 3132 } | 3132 } |
| 3133 #endif // !defined(TARGET_ARCH_DBC) | 3133 #endif // !defined(TARGET_ARCH_DBC) |
| 3134 } | 3134 } |
| 3135 | 3135 |
| 3136 | 3136 |
| 3137 bool PolymorphicInstanceCallInstr::HasSingleRecognizedTarget() const { | 3137 bool PolymorphicInstanceCallInstr::HasSingleRecognizedTarget() const { |
| 3138 if (FLAG_precompiled_mode && with_checks()) return false; | 3138 if (FLAG_precompiled_mode && with_checks()) return false; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3266 (ic_data() == NULL) ? Array::Handle(ArgumentsDescriptor::New( | 3266 (ic_data() == NULL) ? Array::Handle(ArgumentsDescriptor::New( |
| 3267 ArgumentCount(), argument_names())) | 3267 ArgumentCount(), argument_names())) |
| 3268 : Array::Handle(ic_data()->arguments_descriptor()); | 3268 : Array::Handle(ic_data()->arguments_descriptor()); |
| 3269 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor); | 3269 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor); |
| 3270 | 3270 |
| 3271 if (compiler->is_optimizing()) { | 3271 if (compiler->is_optimizing()) { |
| 3272 __ PushConstant(function()); | 3272 __ PushConstant(function()); |
| 3273 __ StaticCall(ArgumentCount(), argdesc_kidx); | 3273 __ StaticCall(ArgumentCount(), argdesc_kidx); |
| 3274 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id(), | 3274 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id(), |
| 3275 token_pos()); | 3275 token_pos()); |
| 3276 compiler->RecordAfterCall(this); | 3276 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult); |
| 3277 __ PopLocal(locs()->out(0).reg()); | 3277 __ PopLocal(locs()->out(0).reg()); |
| 3278 } else { | 3278 } else { |
| 3279 const intptr_t ic_data_kidx = __ AddConstant(*call_ic_data); | 3279 const intptr_t ic_data_kidx = __ AddConstant(*call_ic_data); |
| 3280 __ PushConstant(ic_data_kidx); | 3280 __ PushConstant(ic_data_kidx); |
| 3281 __ IndirectStaticCall(ArgumentCount(), argdesc_kidx); | 3281 __ IndirectStaticCall(ArgumentCount(), argdesc_kidx); |
| 3282 compiler->AddCurrentDescriptor(RawPcDescriptors::kUnoptStaticCall, | 3282 compiler->AddCurrentDescriptor(RawPcDescriptors::kUnoptStaticCall, |
| 3283 deopt_id(), token_pos()); | 3283 deopt_id(), token_pos()); |
| 3284 compiler->RecordAfterCall(this); | 3284 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult); |
| 3285 } | 3285 } |
| 3286 #endif // !defined(TARGET_ARCH_DBC) | 3286 #endif // !defined(TARGET_ARCH_DBC) |
| 3287 } | 3287 } |
| 3288 | 3288 |
| 3289 | 3289 |
| 3290 void AssertAssignableInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3290 void AssertAssignableInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3291 compiler->GenerateAssertAssignable(token_pos(), deopt_id(), dst_type(), | 3291 compiler->GenerateAssertAssignable(token_pos(), deopt_id(), dst_type(), |
| 3292 dst_name(), locs()); | 3292 dst_name(), locs()); |
| 3293 | 3293 |
| 3294 // DBC does not use LocationSummaries in the same way as other architectures. | 3294 // DBC does not use LocationSummaries in the same way as other architectures. |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3931 set_native_c_function(native_function); | 3931 set_native_c_function(native_function); |
| 3932 function().SetIsNativeAutoSetupScope(auto_setup_scope); | 3932 function().SetIsNativeAutoSetupScope(auto_setup_scope); |
| 3933 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); | 3933 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); |
| 3934 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); | 3934 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); |
| 3935 set_is_bootstrap_native(is_bootstrap_native); | 3935 set_is_bootstrap_native(is_bootstrap_native); |
| 3936 } | 3936 } |
| 3937 | 3937 |
| 3938 #undef __ | 3938 #undef __ |
| 3939 | 3939 |
| 3940 } // namespace dart | 3940 } // namespace dart |
| OLD | NEW |