• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 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_SNAPSHOT_EMBEDDED_PLATFORM_EMBEDDED_FILE_WRITER_AIX_H_
6 #define V8_SNAPSHOT_EMBEDDED_PLATFORM_EMBEDDED_FILE_WRITER_AIX_H_
7 
8 #include "src/base/macros.h"
9 #include "src/snapshot/embedded/platform-embedded-file-writer-base.h"
10 
11 namespace v8 {
12 namespace internal {
13 
14 class PlatformEmbeddedFileWriterAIX : public PlatformEmbeddedFileWriterBase {
15  public:
PlatformEmbeddedFileWriterAIX(EmbeddedTargetArch target_arch,EmbeddedTargetOs target_os)16   PlatformEmbeddedFileWriterAIX(EmbeddedTargetArch target_arch,
17                                 EmbeddedTargetOs target_os)
18       : target_arch_(target_arch), target_os_(target_os) {
19     USE(target_arch_);
20     USE(target_os_);
21     DCHECK_EQ(target_os_, EmbeddedTargetOs::kAIX);
22   }
23 
24   void SectionText() override;
25   void SectionData() override;
26   void SectionRoData() override;
27 
28   void AlignToCodeAlignment() override;
29   void AlignToDataAlignment() override;
30 
31   void DeclareUint32(const char* name, uint32_t value) override;
32   void DeclarePointerToSymbol(const char* name, const char* target) override;
33 
34   void DeclareSymbolGlobal(const char* name) override;
35   void DeclareLabel(const char* name) override;
36 
37   void SourceInfo(int fileid, const char* filename, int line) override;
38   void DeclareFunctionBegin(const char* name, uint32_t size) override;
39   void DeclareFunctionEnd(const char* name) override;
40 
41   void Comment(const char* string) override;
42 
43   void FilePrologue() override;
44   void DeclareExternalFilename(int fileid, const char* filename) override;
45   void FileEpilogue() override;
46 
47   int IndentedDataDirective(DataDirective directive) override;
48 
49   DataDirective ByteChunkDataDirective() const override;
50 
51  private:
52   const EmbeddedTargetArch target_arch_;
53   const EmbeddedTargetOs target_os_;
54 };
55 
56 }  // namespace internal
57 }  // namespace v8
58 
59 #endif  // V8_SNAPSHOT_EMBEDDED_PLATFORM_EMBEDDED_FILE_WRITER_AIX_H_
60