Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index bdfa23cde59d32626192b08ec182f5e2784550e6..d2873b11c918f5b26a0639625fa2ef8cc60783b5 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1807,11 +1807,7 @@ MaybeHandle<Map> Map::CopyWithField(Handle<Map> map, |
return MaybeHandle<Map>(); |
} |
- // Normalize the object if the name is an actual name (not the |
- // hidden strings) and is not a real identifier. |
- // Normalize the object if it will have too many fast properties. |
Isolate* isolate = map->GetIsolate(); |
- if (!name->IsCacheable(isolate)) return MaybeHandle<Map>(); |
// Compute the new index for new field. |
int index = map->NextFreePropertyIndex(); |
@@ -8463,30 +8459,6 @@ bool DescriptorArray::IsEqualTo(DescriptorArray* other) { |
#endif |
-static bool IsIdentifier(UnicodeCache* cache, Name* name) { |
- // Checks whether the buffer contains an identifier (no escape). |
- if (!name->IsString()) return false; |
- String* string = String::cast(name); |
- if (string->length() == 0) return true; |
- ConsStringIteratorOp op; |
- StringCharacterStream stream(string, &op); |
- if (!cache->IsIdentifierStart(stream.GetNext())) { |
- return false; |
- } |
- while (stream.HasMore()) { |
- if (!cache->IsIdentifierPart(stream.GetNext())) { |
- return false; |
- } |
- } |
- return true; |
-} |
- |
- |
-bool Name::IsCacheable(Isolate* isolate) { |
- return IsSymbol() || IsIdentifier(isolate->unicode_cache(), this); |
-} |
- |
- |
bool String::LooksValid() { |
if (!GetIsolate()->heap()->Contains(this)) return false; |
return true; |