| Index: runtime/vm/intermediate_language.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.cc (revision 25902)
|
| +++ runtime/vm/intermediate_language.cc (working copy)
|
| @@ -86,8 +86,7 @@
|
| CheckClassInstr::CheckClassInstr(Value* value,
|
| intptr_t deopt_id,
|
| const ICData& unary_checks)
|
| - : unary_checks_(unary_checks),
|
| - null_check_(false) {
|
| + : unary_checks_(unary_checks) {
|
| ASSERT(unary_checks.IsZoneHandle());
|
| // Expected useful check data.
|
| ASSERT(!unary_checks_.IsNull());
|
| @@ -128,6 +127,16 @@
|
| }
|
|
|
|
|
| +bool CheckClassInstr::IsNullCheck() const {
|
| + if (unary_checks().NumberOfChecks() != 1) {
|
| + return false;
|
| + }
|
| + CompileType* in_type = value()->Type();
|
| + const intptr_t cid = unary_checks().GetCidAt(0);
|
| + return in_type->is_nullable() && (in_type->ToNullableCid() == cid);
|
| +}
|
| +
|
| +
|
| bool GuardFieldInstr::AttributesEqual(Instruction* other) const {
|
| return field().raw() == other->AsGuardField()->field().raw();
|
| }
|
|
|