blob: 26d1513192dc772b0bda3e5608108e27a213722a (
plain) (
blame)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
// clang-format off
#pragma once
#include "root.h"
#include "helpers.h"
#include "JavaScriptCore/BuiltinUtils.h"
namespace WebCore {
using namespace JSC;
#if !defined(BUN_ADDITIONAL_PRIVATE_IDENTIFIERS)
#define BUN_ADDITIONAL_PRIVATE_IDENTIFIERS(macro)
#endif
#define BUN_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
macro(addEventListener) \
macro(argv) \
macro(basename) \
macro(chdir) \
macro(close) \
macro(code) \
macro(connect) \
macro(cork) \
macro(cwd) \
macro(delimiter) \
macro(whenSignalAborted) \
macro(destroy) \
macro(dir) \
macro(dirname) \
macro(end) \
macro(errno) \
macro(execArgv) \
macro(extname) \
macro(file) \
macro(filePath) \
macro(format) \
macro(get) \
macro(hash) \
macro(host) \
macro(hostname) \
macro(href) \
macro(isAbsolute) \
macro(isPaused) \
macro(isWindows) \
macro(join) \
macro(map) \
macro(nextTick) \
macro(normalize) \
macro(on) \
macro(once) \
macro(options) \
macro(origin) \
macro(parse) \
macro(password) \
macro(patch) \
macro(path) \
macro(pathname) \
macro(pause) \
macro(pid) \
macro(pipe) \
macro(port) \
macro(post) \
macro(ppid) \
macro(prependEventListener) \
macro(process) \
macro(protocol) \
macro(put) \
macro(read) \
macro(relative) \
macro(removeEventListener) \
macro(resolve) \
macro(resume) \
macro(search) \
macro(searchParams) \
macro(sep) \
macro(syscall) \
macro(title) \
macro(toNamespacedPath) \
macro(trace) \
macro(uncork) \
macro(unpipe) \
macro(unshift) \
macro(url) \
macro(username) \
macro(version) \
macro(versions) \
macro(write) \
BUN_ADDITIONAL_PRIVATE_IDENTIFIERS(macro) \
class BunBuiltinNames {
public:
// FIXME: Remove the __attribute__((nodebug)) when <rdar://68246686> is fixed.
#if COMPILER(CLANG)
__attribute__((nodebug))
#endif
explicit BunBuiltinNames(JSC::VM& vm)
: m_vm(vm)
BUN_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_BUILTIN_NAMES)
{
#define EXPORT_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
BUN_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(EXPORT_NAME)
#undef EXPORT_NAME
}
BUN_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
private:
JSC::VM& m_vm;
BUN_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(DECLARE_BUILTIN_NAMES)
};
} // namespace WebCore
|