bf2fba78e0
Arbitrary ObjectPtr can be a non-heap object (Smi), so methods ObjectPtr::Is* which test class id should account for Smi. Changed ObjectPtr::GetClassId to account for Smi similarly to Object::GetClassId. Added unsafe ObjectPtr::GetClassIdOfHeapObject which can be used when caller knows the heap nature of the object. This change also fixes Integer::GetInt64Value which was relying on ObjectPtr::IsSmi. TEST=vm/cc/Smi, vm/cc/Mint Change-Id: I1391600e2acedc7b2a8f35c814df113ec9ba8698 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380280 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>