Index: src/types.h |
diff --git a/src/types.h b/src/types.h |
index a2bcda65791646c57464a5d85a908564efc5587a..31aa9512f4c3a44433412fc836df800ea5efe524 100644 |
--- a/src/types.h |
+++ b/src/types.h |
@@ -184,6 +184,13 @@ class Type : public Object { |
return Iterator<v8::internal::Object>(this->handle()); |
} |
+ static Type* cast(v8::internal::Object* object) { |
+ Type* t = static_cast<Type*>(object); |
+ ASSERT(t->is_bitset() || t->is_class() || |
+ t->is_constant() || t->is_union()); |
+ return t; |
+ } |
+ |
private: |
// A union is a fixed array containing types. Invariants: |
// - its length is at least 2 |