• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "src/objects/visitors.h"
6 
7 #include "src/codegen/reloc-info.h"
8 
9 namespace v8 {
10 namespace internal {
11 
RootName(Root root)12 const char* RootVisitor::RootName(Root root) {
13   switch (root) {
14 #define ROOT_CASE(root_id, description) \
15   case Root::root_id:                   \
16     return description;
17     ROOT_ID_LIST(ROOT_CASE)
18 #undef ROOT_CASE
19     case Root::kNumberOfRoots:
20       break;
21   }
22   UNREACHABLE();
23 }
24 
VisitRelocInfo(RelocIterator * it)25 void ObjectVisitor::VisitRelocInfo(RelocIterator* it) {
26   for (; !it->done(); it->next()) {
27     it->rinfo()->Visit(this);
28   }
29 }
30 
31 }  // namespace internal
32 }  // namespace v8
33