Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 8359aa33529aed900efafe6391099a0568be8067..87a7efd4940210d30be68cb8828625e360362f80 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1024,38 +1024,6 @@ void HeapObject::HeapObjectShortPrint(StringStream* accumulator) { |
} |
-int HeapObject::SlowSizeFromMap(Map* map) { |
- // Avoid calling functions such as FixedArray::cast during GC, which |
- // read map pointer of this object again. |
- InstanceType instance_type = map->instance_type(); |
- uint32_t type = static_cast<uint32_t>(instance_type); |
- |
- if (instance_type < FIRST_NONSTRING_TYPE |
- && (StringShape(instance_type).IsSequential())) { |
- if ((type & kStringEncodingMask) == kAsciiStringTag) { |
- SeqAsciiString* seq_ascii_this = reinterpret_cast<SeqAsciiString*>(this); |
- return seq_ascii_this->SeqAsciiStringSize(instance_type); |
- } else { |
- SeqTwoByteString* self = reinterpret_cast<SeqTwoByteString*>(this); |
- return self->SeqTwoByteStringSize(instance_type); |
- } |
- } |
- |
- switch (instance_type) { |
- case FIXED_ARRAY_TYPE: |
- return FixedArray::BodyDescriptor::SizeOf(map, this); |
- case BYTE_ARRAY_TYPE: |
- return reinterpret_cast<ByteArray*>(this)->ByteArraySize(); |
- case CODE_TYPE: |
- return reinterpret_cast<Code*>(this)->CodeSize(); |
- case MAP_TYPE: |
- return Map::kSize; |
- default: |
- return map->instance_size(); |
- } |
-} |
- |
- |
void HeapObject::Iterate(ObjectVisitor* v) { |
// Handle header |
IteratePointer(v, kMapOffset); |