summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/backend/unwinding-info-writer.h
blob: 3383da99f7f2ac954726e62ce33ef18a5d74ffa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// 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.

#ifndef V8_COMPILER_BACKEND_UNWINDING_INFO_WRITER_H_
#define V8_COMPILER_BACKEND_UNWINDING_INFO_WRITER_H_

#include "src/flags.h"

#if V8_TARGET_ARCH_ARM
#include "src/compiler/backend/arm/unwinding-info-writer-arm.h"
#elif V8_TARGET_ARCH_ARM64
#include "src/compiler/backend/arm64/unwinding-info-writer-arm64.h"
#elif V8_TARGET_ARCH_X64
#include "src/compiler/backend/x64/unwinding-info-writer-x64.h"
#else

// Placeholder for unsupported architectures.

#include "src/base/logging.h"

namespace v8 {
namespace internal {

class EhFrameWriter;

namespace compiler {

class InstructionBlock;

class UnwindingInfoWriter {
 public:
  explicit UnwindingInfoWriter(Zone* zone) {}

  void SetNumberOfInstructionBlocks(int number) {
    if (FLAG_perf_prof_unwinding_info) UNIMPLEMENTED();
  }

  void BeginInstructionBlock(int pc_offset, const InstructionBlock* block) {
    if (FLAG_perf_prof_unwinding_info) UNIMPLEMENTED();
  }
  void EndInstructionBlock(const InstructionBlock* block) {
    if (FLAG_perf_prof_unwinding_info) UNIMPLEMENTED();
  }

  void Finish(int code_size) {}

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

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

#endif

#endif  // V8_COMPILER_BACKEND_UNWINDING_INFO_WRITER_H_