namespace v8 {
namespace internal {
+template<class Config>
+bool TypeImpl<Config>::NowContains(i::Object* value) {
+ DisallowHeapAllocation no_allocation;
+ if (this->IsAny()) return true;
+ if (value->IsHeapObject()) {
+ i::Map* map = i::HeapObject::cast(value)->map();
+ for (Iterator<i::Map> it = this->Classes(); !it.Done(); it.Advance()) {
+ if (*it.Current() == map) return true;
+ }
+ }
+ return this->Contains(value);
+}
+
+
// static
Type* ZoneTypeConfig::handle(Type* type) {
return type;
}
-template<class Config>
-bool TypeImpl<Config>::NowContains(i::Object* value) {
- DisallowHeapAllocation no_allocation;
- if (value->IsHeapObject()) {
- i::Map* map = i::HeapObject::cast(value)->map();
- for (Iterator<i::Map> it = this->Classes(); !it.Done(); it.Advance()) {
- if (*it.Current() == map) return true;
- }
- }
- return this->Contains(value);
-}
-
-
template<class Config>
bool TypeImpl<Config>::InUnion(StructHandle unioned, int current_size) {
ASSERT(!this->IsUnion());
bool NowIs(TypeImpl* that);
template<class TypeHandle>
bool NowIs(TypeHandle that) { return this->NowIs(*that); }
- bool NowContains(i::Object* val);
+ inline bool NowContains(i::Object* val);
bool NowContains(i::Handle<i::Object> val) { return this->NowContains(*val); }
bool IsClass() { return Config::is_class(this); }