Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index e1778f367de93d3c1f45131754501ef53e244c23..3a2b7820564eeca9e819378df77e52514247e0ab 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -2219,6 +2219,9 @@ int JSObject::GetHeaderSize(InstanceType type) { |
} |
} |
+inline bool IsSpecialReceiverInstanceType(InstanceType instance_type) { |
+ return instance_type <= LAST_SPECIAL_RECEIVER_TYPE; |
+} |
int JSObject::GetInternalFieldCount(Map* map) { |
int instance_size = map->instance_size(); |
@@ -4946,6 +4949,12 @@ bool Map::IsJSGlobalObjectMap() { |
bool Map::IsJSTypedArrayMap() { return instance_type() == JS_TYPED_ARRAY_TYPE; } |
bool Map::IsJSDataViewMap() { return instance_type() == JS_DATA_VIEW_TYPE; } |
+bool Map::IsSpecialReceiverMap() { |
+ bool result = IsSpecialReceiverInstanceType(instance_type()); |
+ DCHECK_IMPLIES(!result, |
+ !has_named_interceptor() && !is_access_check_needed()); |
+ return result; |
+} |
bool Map::CanOmitMapChecks() { |
return is_stable() && FLAG_omit_map_checks_for_leaf_maps; |