Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index e8f7213ced9e17852598f5943d28ff1da0e4db05..1ba66ef8e82e36ffc29289549acec1a37cd38e3b 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -1001,17 +1001,17 @@ template <class C> inline bool Is(Object* obj); |
| V(WeakHashTable) \ |
| V(OrderedHashTable) |
| -#define ODDBALL_LIST(V) \ |
| - V(Undefined) \ |
| - V(Null) \ |
| - V(TheHole) \ |
| - V(Exception) \ |
| - V(Uninitialized) \ |
| - V(True) \ |
| - V(False) \ |
| - V(ArgumentsMarker) \ |
| - V(OptimizedOut) \ |
| - V(StaleRegister) |
| +#define ODDBALL_LIST(V) \ |
| + V(Undefined, undefined_value) \ |
| + V(Null, null_value) \ |
| + V(TheHole, the_hole_value) \ |
| + V(Exception, exception) \ |
| + V(Uninitialized, uninitialized_value) \ |
| + V(True, true_value) \ |
| + V(False, false_value) \ |
| + V(ArgumentsMarker, arguments_marker) \ |
| + V(OptimizedOut, optimized_out) \ |
| + V(StaleRegister, stale_register) |
| // The element types selection for CreateListFromArrayLike. |
| enum class ElementTypes { kAll, kStringAndSymbol }; |
| @@ -1027,9 +1027,13 @@ class Object { |
| // Type testing. |
| bool IsObject() const { return true; } |
| -#define IS_TYPE_FUNCTION_DECL(type_) INLINE(bool Is##type_() const); |
| +// TODO(cbruni): clean up once isolate-based versions are in place. |
|
Michael Starzinger
2016/06/08 15:58:20
nit: This TODO should actually be addressed by thi
Camillo Bruni
2016/06/10 09:28:57
nah, let's just keep the todos alive a bit longer
|
| +#define IS_TYPE_FUNCTION_DECL(Type) INLINE(bool Is##Type() const); |
| OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
| HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
| +#undef IS_TYPE_FUNCTION_DECL |
| +#define IS_TYPE_FUNCTION_DECL(Type, Value) \ |
| + INLINE(bool Is##Type(Isolate* isolate) const); |
| ODDBALL_LIST(IS_TYPE_FUNCTION_DECL) |
| #undef IS_TYPE_FUNCTION_DECL |
| @@ -1064,9 +1068,6 @@ class Object { |
| STRUCT_LIST(DECLARE_STRUCT_PREDICATE) |
| #undef DECLARE_STRUCT_PREDICATE |
| - INLINE(bool IsTheHole(Isolate* isolate) const); |
| - INLINE(bool IsUndefined(Isolate* isolate) const); |
| - |
| // ES6, section 7.2.2 IsArray. NOT to be confused with %_IsArray. |
| MUST_USE_RESULT static Maybe<bool> IsArray(Handle<Object> object); |
| @@ -1550,18 +1551,20 @@ class HeapObject: public Object { |
| inline Isolate* GetIsolate() const; |
| // TODO(cbruni): clean up once isolate-based versions are in place. |
|
Michael Starzinger
2016/06/08 15:58:20
nit: This TODO should actually be addressed by thi
|
| -#define IS_TYPE_FUNCTION_DECL(type_) INLINE(bool Is##type_() const); |
| +#define IS_TYPE_FUNCTION_DECL(Type) INLINE(bool Is##Type() const); |
| HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
| +#undef IS_TYPE_FUNCTION_DECL |
| + |
| +#define IS_TYPE_FUNCTION_DECL(Type, Value) \ |
| + INLINE(bool Is##Type(Isolate* isolate) const); |
| ODDBALL_LIST(IS_TYPE_FUNCTION_DECL) |
| #undef IS_TYPE_FUNCTION_DECL |
| + |
| #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) \ |
| INLINE(bool Is##Name() const); |
| STRUCT_LIST(DECLARE_STRUCT_PREDICATE) |
| #undef DECLARE_STRUCT_PREDICATE |
| - INLINE(bool IsTheHole(Isolate* isolate) const); |
| - INLINE(bool IsUndefined(Isolate* isolate) const); |
| - |
| // Converts an address to a HeapObject pointer. |
| static inline HeapObject* FromAddress(Address address) { |
| DCHECK_TAG_ALIGNED(address); |