| 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 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3116 if (compiler->is_optimizing()) { | 3116 if (compiler->is_optimizing()) { |
| 3117 __ InstanceCall2Opt(ArgumentCount(), call_ic_data_kidx); | 3117 __ InstanceCall2Opt(ArgumentCount(), call_ic_data_kidx); |
| 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::kRewind, deopt_id(), |
| 3127 token_pos()); |
| 3126 compiler->AddCurrentDescriptor(RawPcDescriptors::kIcCall, deopt_id(), | 3128 compiler->AddCurrentDescriptor(RawPcDescriptors::kIcCall, deopt_id(), |
| 3127 token_pos()); | 3129 token_pos()); |
| 3128 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult); | 3130 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult); |
| 3129 | 3131 |
| 3130 if (compiler->is_optimizing()) { | 3132 if (compiler->is_optimizing()) { |
| 3131 __ PopLocal(locs()->out(0).reg()); | 3133 __ PopLocal(locs()->out(0).reg()); |
| 3132 } | 3134 } |
| 3133 #endif // !defined(TARGET_ARCH_DBC) | 3135 #endif // !defined(TARGET_ARCH_DBC) |
| 3134 } | 3136 } |
| 3135 | 3137 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3283 compiler->GenerateStaticCall(deopt_id(), token_pos(), function(), | 3285 compiler->GenerateStaticCall(deopt_id(), token_pos(), function(), |
| 3284 ArgumentCount(), argument_names(), locs(), | 3286 ArgumentCount(), argument_names(), locs(), |
| 3285 *call_ic_data); | 3287 *call_ic_data); |
| 3286 #else | 3288 #else |
| 3287 const Array& arguments_descriptor = | 3289 const Array& arguments_descriptor = |
| 3288 (ic_data() == NULL) ? Array::Handle(ArgumentsDescriptor::New( | 3290 (ic_data() == NULL) ? Array::Handle(ArgumentsDescriptor::New( |
| 3289 ArgumentCount(), argument_names())) | 3291 ArgumentCount(), argument_names())) |
| 3290 : Array::Handle(ic_data()->arguments_descriptor()); | 3292 : Array::Handle(ic_data()->arguments_descriptor()); |
| 3291 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor); | 3293 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor); |
| 3292 | 3294 |
| 3295 compiler->AddCurrentDescriptor(RawPcDescriptors::kRewind, deopt_id(), |
| 3296 token_pos()); |
| 3293 if (compiler->is_optimizing()) { | 3297 if (compiler->is_optimizing()) { |
| 3294 __ PushConstant(function()); | 3298 __ PushConstant(function()); |
| 3295 __ StaticCall(ArgumentCount(), argdesc_kidx); | 3299 __ StaticCall(ArgumentCount(), argdesc_kidx); |
| 3296 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id(), | 3300 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id(), |
| 3297 token_pos()); | 3301 token_pos()); |
| 3298 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult); | 3302 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult); |
| 3299 __ PopLocal(locs()->out(0).reg()); | 3303 __ PopLocal(locs()->out(0).reg()); |
| 3300 } else { | 3304 } else { |
| 3301 const intptr_t ic_data_kidx = __ AddConstant(*call_ic_data); | 3305 const intptr_t ic_data_kidx = __ AddConstant(*call_ic_data); |
| 3302 __ PushConstant(ic_data_kidx); | 3306 __ PushConstant(ic_data_kidx); |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3958 set_native_c_function(native_function); | 3962 set_native_c_function(native_function); |
| 3959 function().SetIsNativeAutoSetupScope(auto_setup_scope); | 3963 function().SetIsNativeAutoSetupScope(auto_setup_scope); |
| 3960 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); | 3964 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); |
| 3961 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); | 3965 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); |
| 3962 set_is_bootstrap_native(is_bootstrap_native); | 3966 set_is_bootstrap_native(is_bootstrap_native); |
| 3963 } | 3967 } |
| 3964 | 3968 |
| 3965 #undef __ | 3969 #undef __ |
| 3966 | 3970 |
| 3967 } // namespace dart | 3971 } // namespace dart |
| OLD | NEW |