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 3170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3181 compiler->RecordAfterCall(this); | 3181 compiler->RecordAfterCall(this); |
3182 | 3182 |
3183 if (compiler->is_optimizing()) { | 3183 if (compiler->is_optimizing()) { |
3184 __ PopLocal(locs()->out(0).reg()); | 3184 __ PopLocal(locs()->out(0).reg()); |
3185 } | 3185 } |
3186 #endif // !defined(TARGET_ARCH_DBC) | 3186 #endif // !defined(TARGET_ARCH_DBC) |
3187 } | 3187 } |
3188 | 3188 |
3189 | 3189 |
3190 bool PolymorphicInstanceCallInstr::HasSingleRecognizedTarget() const { | 3190 bool PolymorphicInstanceCallInstr::HasSingleRecognizedTarget() const { |
| 3191 if (FLAG_precompiled_mode && with_checks()) return false; |
| 3192 |
3191 return ic_data().HasOneTarget() && | 3193 return ic_data().HasOneTarget() && |
3192 (MethodRecognizer::RecognizeKind( | 3194 (MethodRecognizer::RecognizeKind( |
3193 Function::Handle(ic_data().GetTargetAt(0))) != | 3195 Function::Handle(ic_data().GetTargetAt(0))) != |
3194 MethodRecognizer::kUnknown); | 3196 MethodRecognizer::kUnknown); |
3195 } | 3197 } |
3196 | 3198 |
3197 | 3199 |
3198 bool PolymorphicInstanceCallInstr::HasOnlyDispatcherTargets() const { | 3200 bool PolymorphicInstanceCallInstr::HasOnlyDispatcherTargets() const { |
| 3201 if (FLAG_precompiled_mode && with_checks()) return false; |
| 3202 |
3199 for (intptr_t i = 0; i < ic_data().NumberOfChecks(); ++i) { | 3203 for (intptr_t i = 0; i < ic_data().NumberOfChecks(); ++i) { |
3200 const Function& target = Function::Handle(ic_data().GetTargetAt(i)); | 3204 const Function& target = Function::Handle(ic_data().GetTargetAt(i)); |
3201 if (!target.IsNoSuchMethodDispatcher() && | 3205 if (!target.IsNoSuchMethodDispatcher() && |
3202 !target.IsInvokeFieldDispatcher()) { | 3206 !target.IsInvokeFieldDispatcher()) { |
3203 return false; | 3207 return false; |
3204 } | 3208 } |
3205 } | 3209 } |
3206 return true; | 3210 return true; |
3207 } | 3211 } |
3208 | 3212 |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3871 set_native_c_function(native_function); | 3875 set_native_c_function(native_function); |
3872 function().SetIsNativeAutoSetupScope(auto_setup_scope); | 3876 function().SetIsNativeAutoSetupScope(auto_setup_scope); |
3873 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); | 3877 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); |
3874 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); | 3878 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); |
3875 set_is_bootstrap_native(is_bootstrap_native); | 3879 set_is_bootstrap_native(is_bootstrap_native); |
3876 } | 3880 } |
3877 | 3881 |
3878 #undef __ | 3882 #undef __ |
3879 | 3883 |
3880 } // namespace dart | 3884 } // namespace dart |
OLD | NEW |