| Index: runtime/vm/intermediate_language.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.cc (revision 11378)
|
| +++ runtime/vm/intermediate_language.cc (working copy)
|
| @@ -1130,6 +1130,18 @@
|
| }
|
|
|
|
|
| +Definition* CheckClassComp::TryReplace(BindInstr* instr) const {
|
| + const intptr_t v_cid = value()->ResultCid();
|
| + const intptr_t num_checks = ic_data()->NumberOfChecks();
|
| + if ((num_checks == 1) &&
|
| + (v_cid == ic_data()->GetReceiverClassIdAt(0))) {
|
| + // No checks needed.
|
| + return NULL;
|
| + }
|
| + return instr;
|
| +}
|
| +
|
| +
|
| Definition* CheckSmiComp::TryReplace(BindInstr* instr) const {
|
| return (value()->ResultCid() == kSmiCid) ? NULL : instr;
|
| }
|
|
|