v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
platform-embedded-file-writer-win.h
Go to the documentation of this file.
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_WIN_H_
6#define V8_SNAPSHOT_EMBEDDED_PLATFORM_EMBEDDED_FILE_WRITER_WIN_H_
7
8#include "src/base/macros.h"
10
11namespace v8 {
12namespace internal {
13
15 public:
22
23 void SectionText() override;
24 void SectionRoData() override;
25
26 void AlignToCodeAlignment() override;
27 void AlignToDataAlignment() override;
28
29 void DeclareUint32(const char* name, uint32_t value) override;
30
31 void DeclareSymbolGlobal(const char* name) override;
32 void DeclareLabel(const char* name) override;
33
34 void SourceInfo(int fileid, const char* filename, int line) override;
35 void DeclareFunctionBegin(const char* name, uint32_t size) override;
36 void DeclareFunctionEnd(const char* name) override;
37
38 int HexLiteral(uint64_t value) override;
39
40 void Comment(const char* string) override;
41
42 void FilePrologue() override;
43 void DeclareExternalFilename(int fileid, const char* filename) override;
44 void FileEpilogue() override;
45
46 int IndentedDataDirective(DataDirective directive) override;
47
49 int WriteByteChunk(const uint8_t* data) override;
50
51 void StartPdataSection();
52 void EndPdataSection();
53 void StartXdataSection();
54 void EndXdataSection();
55 void DeclareExternalFunction(const char* name);
56
57 // Emits an RVA (address relative to the module load address) specified as an
58 // offset from a given symbol.
59 void DeclareRvaToSymbol(const char* name, uint64_t offset = 0);
60
61 void MaybeEmitUnwindData(const char* unwind_info_symbol,
62 const char* embedded_blob_data_symbol,
63 const EmbeddedData* blob,
64 const void* unwind_infos) override;
65
66 private:
67 const char* DirectiveAsString(DataDirective directive);
68
69 private:
72};
73
74} // namespace internal
75} // namespace v8
76
77#endif // V8_SNAPSHOT_EMBEDDED_PLATFORM_EMBEDDED_FILE_WRITER_WIN_H_
void SourceInfo(int fileid, const char *filename, int line) override
PlatformEmbeddedFileWriterWin(EmbeddedTargetArch target_arch, EmbeddedTargetOs target_os)
void DeclareRvaToSymbol(const char *name, uint64_t offset=0)
void DeclareFunctionBegin(const char *name, uint32_t size) override
void DeclareExternalFilename(int fileid, const char *filename) override
void DeclareUint32(const char *name, uint32_t value) override
void MaybeEmitUnwindData(const char *unwind_info_symbol, const char *embedded_blob_data_symbol, const EmbeddedData *blob, const void *unwind_infos) override
std::string filename
int32_t offset
#define DCHECK_EQ(v1, v2)
Definition logging.h:485
#define USE(...)
Definition macros.h:293