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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 return defn; | 82 return defn; |
83 } | 83 } |
84 | 84 |
85 | 85 |
86 const ICData* Instruction::GetICData( | 86 const ICData* Instruction::GetICData( |
87 const ZoneGrowableArray<const ICData*>& ic_data_array) const { | 87 const ZoneGrowableArray<const ICData*>& ic_data_array) const { |
88 // The deopt_id can be outside the range of the IC data array for | 88 // The deopt_id can be outside the range of the IC data array for |
89 // computations added in the optimizing compiler. | 89 // computations added in the optimizing compiler. |
90 ASSERT(deopt_id_ != Thread::kNoDeoptId); | 90 ASSERT(deopt_id_ != Thread::kNoDeoptId); |
91 if (deopt_id_ < ic_data_array.length()) { | 91 if (deopt_id_ < ic_data_array.length()) { |
92 return ic_data_array[deopt_id_]; | 92 const ICData* result = ic_data_array[deopt_id_]; |
| 93 #if defined(TAG_IC_DATA) |
| 94 if (result->tag() == -1) { |
| 95 result->set_tag(tag()); |
| 96 } else if (result->tag() != tag()) { |
| 97 FATAL("ICData tag mismatch"); |
| 98 } |
| 99 #endif |
| 100 return result; |
93 } | 101 } |
94 return NULL; | 102 return NULL; |
95 } | 103 } |
96 | 104 |
97 | 105 |
98 intptr_t Instruction::Hashcode() const { | 106 intptr_t Instruction::Hashcode() const { |
99 intptr_t result = tag(); | 107 intptr_t result = tag(); |
100 for (intptr_t i = 0; i < InputCount(); ++i) { | 108 for (intptr_t i = 0; i < InputCount(); ++i) { |
101 Value* value = InputAt(i); | 109 Value* value = InputAt(i); |
102 intptr_t j = value->definition()->ssa_temp_index(); | 110 intptr_t j = value->definition()->ssa_temp_index(); |
(...skipping 3648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3751 set_native_c_function(native_function); | 3759 set_native_c_function(native_function); |
3752 function().SetIsNativeAutoSetupScope(auto_setup_scope); | 3760 function().SetIsNativeAutoSetupScope(auto_setup_scope); |
3753 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); | 3761 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); |
3754 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); | 3762 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); |
3755 set_is_bootstrap_native(is_bootstrap_native); | 3763 set_is_bootstrap_native(is_bootstrap_native); |
3756 } | 3764 } |
3757 | 3765 |
3758 #undef __ | 3766 #undef __ |
3759 | 3767 |
3760 } // namespace dart | 3768 } // namespace dart |
OLD | NEW |