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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 const ICData* result = ic_data_array[deopt_id_]; | 92 const ICData* result = ic_data_array[deopt_id_]; |
93 #if defined(TAG_IC_DATA) | 93 #if defined(TAG_IC_DATA) |
94 if (result->tag() == -1) { | 94 if (result != NULL) { |
95 result->set_tag(tag()); | 95 if (result->tag() == -1) { |
96 } else if (result->tag() != tag()) { | 96 result->set_tag(tag()); |
97 FATAL("ICData tag mismatch"); | 97 } else if (result->tag() != tag()) { |
| 98 FATAL("ICData tag mismatch"); |
| 99 } |
98 } | 100 } |
99 #endif | 101 #endif |
100 return result; | 102 return result; |
101 } | 103 } |
102 return NULL; | 104 return NULL; |
103 } | 105 } |
104 | 106 |
105 | 107 |
106 intptr_t Instruction::Hashcode() const { | 108 intptr_t Instruction::Hashcode() const { |
107 intptr_t result = tag(); | 109 intptr_t result = tag(); |
(...skipping 3651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3759 set_native_c_function(native_function); | 3761 set_native_c_function(native_function); |
3760 function().SetIsNativeAutoSetupScope(auto_setup_scope); | 3762 function().SetIsNativeAutoSetupScope(auto_setup_scope); |
3761 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); | 3763 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); |
3762 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); | 3764 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); |
3763 set_is_bootstrap_native(is_bootstrap_native); | 3765 set_is_bootstrap_native(is_bootstrap_native); |
3764 } | 3766 } |
3765 | 3767 |
3766 #undef __ | 3768 #undef __ |
3767 | 3769 |
3768 } // namespace dart | 3770 } // namespace dart |
OLD | NEW |