| 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 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3068 compiler->GenerateInstanceCall(deopt_id(), token_pos(), ArgumentCount(), | 3068 compiler->GenerateInstanceCall(deopt_id(), token_pos(), ArgumentCount(), |
| 3069 locs(), unary_ic_data); | 3069 locs(), unary_ic_data); |
| 3070 } else { | 3070 } else { |
| 3071 // Call was not visited yet, use original ICData in order to populate it. | 3071 // Call was not visited yet, use original ICData in order to populate it. |
| 3072 compiler->GenerateInstanceCall(deopt_id(), token_pos(), ArgumentCount(), | 3072 compiler->GenerateInstanceCall(deopt_id(), token_pos(), ArgumentCount(), |
| 3073 locs(), *call_ic_data); | 3073 locs(), *call_ic_data); |
| 3074 } | 3074 } |
| 3075 } else { | 3075 } else { |
| 3076 // Unoptimized code. | 3076 // Unoptimized code. |
| 3077 ASSERT(!HasICData()); | 3077 ASSERT(!HasICData()); |
| 3078 compiler->AddCurrentDescriptor(RawPcDescriptors::kRewind, deopt_id(), | |
| 3079 token_pos()); | |
| 3080 bool is_smi_two_args_op = false; | 3078 bool is_smi_two_args_op = false; |
| 3081 const StubEntry* stub_entry = TwoArgsSmiOpInlineCacheEntry(token_kind()); | 3079 const StubEntry* stub_entry = TwoArgsSmiOpInlineCacheEntry(token_kind()); |
| 3082 if (stub_entry != NULL) { | 3080 if (stub_entry != NULL) { |
| 3083 // We have a dedicated inline cache stub for this operation, add an | 3081 // We have a dedicated inline cache stub for this operation, add an |
| 3084 // an initial Smi/Smi check with count 0. | 3082 // an initial Smi/Smi check with count 0. |
| 3085 is_smi_two_args_op = call_ic_data->AddSmiSmiCheckForFastSmiStubs(); | 3083 is_smi_two_args_op = call_ic_data->AddSmiSmiCheckForFastSmiStubs(); |
| 3086 } | 3084 } |
| 3087 if (is_smi_two_args_op) { | 3085 if (is_smi_two_args_op) { |
| 3088 ASSERT(ArgumentCount() == 2); | 3086 ASSERT(ArgumentCount() == 2); |
| 3089 compiler->EmitInstanceCall(*stub_entry, *call_ic_data, ArgumentCount(), | 3087 compiler->EmitInstanceCall(*stub_entry, *call_ic_data, ArgumentCount(), |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3931 set_native_c_function(native_function); | 3929 set_native_c_function(native_function); |
| 3932 function().SetIsNativeAutoSetupScope(auto_setup_scope); | 3930 function().SetIsNativeAutoSetupScope(auto_setup_scope); |
| 3933 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); | 3931 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); |
| 3934 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); | 3932 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); |
| 3935 set_is_bootstrap_native(is_bootstrap_native); | 3933 set_is_bootstrap_native(is_bootstrap_native); |
| 3936 } | 3934 } |
| 3937 | 3935 |
| 3938 #undef __ | 3936 #undef __ |
| 3939 | 3937 |
| 3940 } // namespace dart | 3938 } // namespace dart |
| OLD | NEW |