1 // Copyright 2014 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 #ifndef V8_COMPILER_BACKEND_UNWINDING_INFO_WRITER_H_ 6 #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 #elif V8_TARGET_ARCH_S390X 17 #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 #else 21 22 // Placeholder for unsupported architectures. 23 24 #include "src/base/logging.h" 25 26 namespace v8 { 27 namespace internal { 28 29 class EhFrameWriter; 30 class Zone; 31 32 namespace compiler { 33 34 class InstructionBlock; 35 36 static_assert(!FLAG_perf_prof_unwinding_info, 37 "--perf-prof-unwinding-info should be statically disabled if not " 38 "supported"); 39 40 class UnwindingInfoWriter { 41 public: UnwindingInfoWriter(Zone *)42 explicit UnwindingInfoWriter(Zone*) {} 43 SetNumberOfInstructionBlocks(int number)44 void SetNumberOfInstructionBlocks(int number) {} 45 BeginInstructionBlock(int pc_offset,const InstructionBlock *)46 void BeginInstructionBlock(int pc_offset, const InstructionBlock*) {} 47 EndInstructionBlock(const InstructionBlock *)48 void EndInstructionBlock(const InstructionBlock*) {} 49 Finish(int code_size)50 void Finish(int code_size) {} 51 eh_frame_writer()52 EhFrameWriter* eh_frame_writer() { return nullptr; } 53 }; 54 55 } // namespace compiler 56 } // namespace internal 57 } // namespace v8 58 59 #endif 60 61 #endif // V8_COMPILER_BACKEND_UNWINDING_INFO_WRITER_H_ 62