Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index eb1f6e56f662b69d079864d2945fa217901ec010..bb00506640d83644c2b608287d3522ce641d421a 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1001,17 +1001,17 @@ |
V(WeakHashTable) \ |
V(OrderedHashTable) |
-#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) |
+#define ODDBALL_LIST(V) \ |
+ V(Undefined) \ |
+ V(Null) \ |
+ V(TheHole) \ |
+ V(Exception) \ |
+ V(Uninitialized) \ |
+ V(True) \ |
+ V(False) \ |
+ V(ArgumentsMarker) \ |
+ V(OptimizedOut) \ |
+ V(StaleRegister) |
// The element types selection for CreateListFromArrayLike. |
enum class ElementTypes { kAll, kStringAndSymbol }; |
@@ -1027,12 +1027,9 @@ |
// Type testing. |
bool IsObject() const { return true; } |
-#define IS_TYPE_FUNCTION_DECL(Type) INLINE(bool Is##Type() const); |
+#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 |
@@ -1066,6 +1063,9 @@ |
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); |
// ES6, section 7.2.2 IsArray. NOT to be confused with %_IsArray. |
MUST_USE_RESULT static Maybe<bool> IsArray(Handle<Object> object); |
@@ -1549,19 +1549,18 @@ |
// Convenience method to get current isolate. |
inline Isolate* GetIsolate() const; |
-#define IS_TYPE_FUNCTION_DECL(Type) INLINE(bool Is##Type() const); |
+// TODO(cbruni): clean up once isolate-based versions are in place. |
+#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) { |