Chromium Code Reviews| Index: src/ic-inl.h |
| diff --git a/src/ic-inl.h b/src/ic-inl.h |
| index 8fbc18436dd2a395db691f9d815fa39ed822c1c5..9d358eddb31a3dc887078c4ce784e0aff4d3fe6f 100644 |
| --- a/src/ic-inl.h |
| +++ b/src/ic-inl.h |
| @@ -76,6 +76,15 @@ Code* IC::GetTargetAtAddress(Address address) { |
| void IC::SetTargetAtAddress(Address address, Code* target) { |
| ASSERT(target->is_inline_cache_stub() || target->is_compare_ic_stub()); |
| +#ifdef DEBUG |
| + // STORE_IC and KEYED_STORE_IC use Code::extra_ic_state() to mark |
| + // ICs as strict mode. The strict-ness of the IC must be preserved. |
| + Code* old_target = GetTargetAtAddress(address); |
| + if (old_target->kind() == Code::STORE_IC || |
| + old_target->kind() == Code::KEYED_STORE_IC) { |
| + ASSERT(old_target->extra_ic_state() == target->extra_ic_state()); |
| + } |
| +#endif |
|
Martin Maly
2011/02/27 23:04:04
This is a check that ICs do not migrate from stric
|
| Assembler::set_target_address_at(address, target->instruction_start()); |
| } |