unwinding-info-writer.h 1.59 KB
Newer Older
1 2 3 4
// Copyright 2014 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.

5 6
#ifndef V8_COMPILER_BACKEND_UNWINDING_INFO_WRITER_H_
#define V8_COMPILER_BACKEND_UNWINDING_INFO_WRITER_H_
7

8
#include "src/flags/flags.h"
9

10
#if V8_TARGET_ARCH_ARM
11
#include "src/compiler/backend/arm/unwinding-info-writer-arm.h"
12
#elif V8_TARGET_ARCH_ARM64
13
#include "src/compiler/backend/arm64/unwinding-info-writer-arm64.h"
14
#elif V8_TARGET_ARCH_X64
15
#include "src/compiler/backend/x64/unwinding-info-writer-x64.h"
16 17
#elif V8_TARGET_ARCH_S390X
#include "src/compiler/backend/s390/unwinding-info-writer-s390.h"
18
#elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
19
#include "src/compiler/backend/ppc/unwinding-info-writer-ppc.h"
20 21 22 23 24 25 26 27 28 29
#else

// Placeholder for unsupported architectures.

#include "src/base/logging.h"

namespace v8 {
namespace internal {

class EhFrameWriter;
30
class Zone;
31 32 33 34 35

namespace compiler {

class InstructionBlock;

36 37 38 39
static_assert(!FLAG_perf_prof_unwinding_info,
              "--perf-prof-unwinding-info should be statically disabled if not "
              "supported");

40 41
class UnwindingInfoWriter {
 public:
42 43 44 45 46 47 48
  explicit UnwindingInfoWriter(Zone*) {}

  void SetNumberOfInstructionBlocks(int number) {}

  void BeginInstructionBlock(int pc_offset, const InstructionBlock*) {}

  void EndInstructionBlock(const InstructionBlock*) {}
49 50 51 52 53 54 55 56 57 58 59 60

  void Finish(int code_size) {}

  EhFrameWriter* eh_frame_writer() { return nullptr; }
};

}  // namespace compiler
}  // namespace internal
}  // namespace v8

#endif

61
#endif  // V8_COMPILER_BACKEND_UNWINDING_INFO_WRITER_H_