Index: runtime/vm/intermediate_language.cc |
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc |
index 5b5ac04d502a2b9096de257f0f69903968046088..231e9eff503f63daa550b4697714bcdce4304410 100644 |
--- a/runtime/vm/intermediate_language.cc |
+++ b/runtime/vm/intermediate_language.cc |
@@ -89,7 +89,15 @@ const ICData* Instruction::GetICData( |
// computations added in the optimizing compiler. |
ASSERT(deopt_id_ != Thread::kNoDeoptId); |
if (deopt_id_ < ic_data_array.length()) { |
- return ic_data_array[deopt_id_]; |
+ const ICData* result = ic_data_array[deopt_id_]; |
+#if defined(TAG_IC_DATA) |
+ if (result->tag() == -1) { |
+ result->set_tag(tag()); |
+ } else if (result->tag() != tag()) { |
+ FATAL("ICData tag mismatch"); |
+ } |
+#endif |
+ return result; |
} |
return NULL; |
} |