2017-04-25 13:32:18 +00:00
|
|
|
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#include "src/visitors.h"
|
|
|
|
|
2019-02-06 15:30:18 +00:00
|
|
|
#include "src/reloc-info.h"
|
2017-10-13 07:42:11 +00:00
|
|
|
|
2017-04-25 13:32:18 +00:00
|
|
|
namespace v8 {
|
|
|
|
namespace internal {
|
|
|
|
|
2018-02-14 14:22:37 +00:00
|
|
|
const char* RootVisitor::RootName(Root root) {
|
|
|
|
switch (root) {
|
|
|
|
#define ROOT_CASE(root_id, description) \
|
|
|
|
case Root::root_id: \
|
|
|
|
return description;
|
|
|
|
ROOT_ID_LIST(ROOT_CASE)
|
|
|
|
#undef ROOT_CASE
|
|
|
|
case Root::kNumberOfRoots:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
UNREACHABLE();
|
|
|
|
return nullptr;
|
|
|
|
}
|
2017-04-25 13:32:18 +00:00
|
|
|
|
2019-02-06 15:30:18 +00:00
|
|
|
void ObjectVisitor::VisitRelocInfo(RelocIterator* it) {
|
|
|
|
for (; !it->done(); it->next()) {
|
|
|
|
it->rinfo()->Visit(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-25 13:32:18 +00:00
|
|
|
} // namespace internal
|
|
|
|
} // namespace v8
|