Simplify Object::IsHeapObject() into !IsSmi()

Change-Id: I10ca732853729564c59755648d5fb369fb49ce97
Reviewed-on: https://chromium-review.googlesource.com/446364
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43442}
This commit is contained in:
Camillo Bruni 2017-02-27 10:07:25 +01:00 committed by Commit Bot
parent 00c581d684
commit 11e0f7810f

View File

@ -1522,8 +1522,10 @@ class Object {
// In objects.h to be usable without objects-inl.h inclusion.
bool Object::IsSmi() const { return HAS_SMI_TAG(this); }
bool Object::IsHeapObject() const { return Internals::HasHeapObjectTag(this); }
bool Object::IsHeapObject() const {
DCHECK_EQ(!IsSmi(), Internals::HasHeapObjectTag(this));
return !IsSmi();
}
struct Brief {
explicit Brief(const Object* const v) : value(v) {}