v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
embedded-file-writer-interface.h
Go to the documentation of this file.
1// Copyright 2021 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_EMBEDDED_FILE_WRITER_INTERFACE_H_
6#define V8_SNAPSHOT_EMBEDDED_EMBEDDED_FILE_WRITER_INTERFACE_H_
7
8#include <string>
9
10#include "v8config.h" // NOLINT(build/include_directory)
11
12namespace v8 {
13namespace internal {
14
15class Builtins;
16
17#if defined(V8_OS_WIN64)
18namespace win64_unwindinfo {
19class BuiltinUnwindInfo;
20}
21#endif // V8_OS_WIN64
22
23static constexpr char kDefaultEmbeddedVariant[] = "Default";
24
25struct LabelInfo {
26 int offset;
27 std::string name;
28};
29
30// Detailed source-code information about builtins can only be obtained by
31// registration on the isolate during compilation.
33 public:
34 // We maintain a database of filenames to synthetic IDs.
35 virtual int LookupOrAddExternallyCompiledFilename(const char* filename) = 0;
36 virtual const char* GetExternallyCompiledFilename(int index) const = 0;
37 virtual int GetExternallyCompiledFilenameCount() const = 0;
38
39 // The isolate will call the method below just prior to replacing the
40 // compiled builtin InstructionStream objects with trampolines.
41 virtual void PrepareBuiltinSourcePositionMap(Builtins* builtins) = 0;
42
43#if defined(V8_OS_WIN64)
44 virtual void SetBuiltinUnwindData(
45 Builtin builtin,
46 const win64_unwindinfo::BuiltinUnwindInfo& unwinding_info) = 0;
47#endif // V8_OS_WIN64
48};
49
50} // namespace internal
51} // namespace v8
52
53#endif // V8_SNAPSHOT_EMBEDDED_EMBEDDED_FILE_WRITER_INTERFACE_H_
virtual int LookupOrAddExternallyCompiledFilename(const char *filename)=0
virtual int GetExternallyCompiledFilenameCount() const =0
virtual void PrepareBuiltinSourcePositionMap(Builtins *builtins)=0
virtual const char * GetExternallyCompiledFilename(int index) const =0
std::string filename
static constexpr char kDefaultEmbeddedVariant[]