Commit ecea1d19 authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] StaticNewSpaceVisitor: Add UNREACHABLE handlers for pre-tenured types

BUG=

Review-Url: https://codereview.chromium.org/2529113002
Cr-Commit-Position: refs/heads/master@{#41289}
parent 0e742861
......@@ -60,7 +60,6 @@ void StaticNewSpaceVisitor<StaticVisitor>::Initialize() {
int>::Visit);
table_.Register(kVisitByteArray, &VisitByteArray);
table_.Register(kVisitBytecodeArray, &VisitBytecodeArray);
table_.Register(
kVisitSharedFunctionInfo,
......@@ -103,19 +102,11 @@ void StaticNewSpaceVisitor<StaticVisitor>::Initialize() {
table_.template RegisterSpecializations<StructVisitor, kVisitStruct,
kVisitStructGeneric>();
}
template <typename StaticVisitor>
int StaticNewSpaceVisitor<StaticVisitor>::VisitBytecodeArray(
Map* map, HeapObject* object) {
VisitPointers(
map->GetHeap(), object,
HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset),
HeapObject::RawField(object, BytecodeArray::kFrameSizeOffset));
return reinterpret_cast<BytecodeArray*>(object)->BytecodeArraySize();
table_.Register(kVisitBytecodeArray, &UnreachableVisitor);
table_.Register(kVisitSharedFunctionInfo, &UnreachableVisitor);
}
template <typename StaticVisitor>
void StaticMarkingVisitor<StaticVisitor>::Initialize() {
table_.Register(kVisitShortcutCandidate,
......
......@@ -267,12 +267,17 @@ class StaticNewSpaceVisitor : public StaticVisitorBase {
// Although we are using the JSFunction body descriptor which does not
// visit the code entry, compiler wants it to be accessible.
// See JSFunction::BodyDescriptorImpl.
INLINE(static void VisitCodeEntry(Heap* heap, HeapObject* object,
Address entry_address)) {
inline static void VisitCodeEntry(Heap* heap, HeapObject* object,
Address entry_address) {
UNREACHABLE();
}
private:
inline static int UnreachableVisitor(Map* map, HeapObject* object) {
UNREACHABLE();
return 0;
}
INLINE(static int VisitByteArray(Map* map, HeapObject* object)) {
return reinterpret_cast<ByteArray*>(object)->ByteArraySize();
}
......@@ -300,8 +305,6 @@ class StaticNewSpaceVisitor : public StaticVisitorBase {
return FreeSpace::cast(object)->size();
}
INLINE(static int VisitBytecodeArray(Map* map, HeapObject* object));
class DataObjectVisitor {
public:
template <int object_size>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment