Index: src/field-type.h |
diff --git a/src/field-type.h b/src/field-type.h |
index e390fca53ee39cbd3af0a1aa63a6915725c72ab0..eb7ffcab477ae6b505288c4aaf6c540d8d2cd54c 100644 |
--- a/src/field-type.h |
+++ b/src/field-type.h |
@@ -22,8 +22,15 @@ class FieldType : public Object { |
static Handle<FieldType> Class(i::Handle<i::Map> map, Isolate* isolate); |
static FieldType* cast(Object* object); |
- bool NowContains(Object* value); |
- bool NowContains(Handle<Object> value); |
+ bool NowContains(Object* value) { |
+ if (this == Any()) return true; |
+ if (this == None()) return false; |
+ if (!value->IsHeapObject()) return false; |
+ return HeapObject::cast(value)->map() == Map::cast(this); |
+ } |
+ |
+ bool NowContains(Handle<Object> value) { return NowContains(*value); } |
+ |
bool IsClass(); |
Handle<i::Map> AsClass(); |
bool IsNone() { return this == None(); } |