]>
Commit | Line | Data |
---|---|---|
b37bf2e1 | 1 | /* |
ba379fdc | 2 | * Copyright (C) 2003, 2007, 2009 Apple Inc. All rights reserved. |
b37bf2e1 A |
3 | * |
4 | * This library is free software; you can redistribute it and/or | |
5 | * modify it under the terms of the GNU Library General Public | |
6 | * License as published by the Free Software Foundation; either | |
7 | * version 2 of the License, or (at your option) any later version. | |
8 | * | |
9 | * This library is distributed in the hope that it will be useful, | |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 | * Library General Public License for more details. | |
13 | * | |
14 | * You should have received a copy of the GNU Library General Public License | |
15 | * along with this library; see the file COPYING.LIB. If not, write to | |
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
17 | * Boston, MA 02110-1301, USA. | |
18 | * | |
19 | */ | |
20 | ||
9dae56ea A |
21 | #ifndef CommonIdentifiers_h |
22 | #define CommonIdentifiers_h | |
b37bf2e1 | 23 | |
9dae56ea | 24 | #include "Identifier.h" |
b37bf2e1 A |
25 | #include <wtf/Noncopyable.h> |
26 | ||
ba379fdc | 27 | // MarkedArgumentBuffer of property names, passed to a macro so we can do set them up various |
b37bf2e1 | 28 | // ways without repeating the list. |
9dae56ea | 29 | #define JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \ |
93a37866 A |
30 | macro(Array) \ |
31 | macro(Boolean) \ | |
32 | macro(Date) \ | |
33 | macro(Error) \ | |
34 | macro(EvalError) \ | |
35 | macro(Function) \ | |
36 | macro(Infinity) \ | |
37 | macro(JSON) \ | |
38 | macro(Math) \ | |
39 | macro(NaN) \ | |
40 | macro(Number) \ | |
41 | macro(Object) \ | |
42 | macro(RangeError) \ | |
43 | macro(ReferenceError) \ | |
44 | macro(RegExp) \ | |
45 | macro(String) \ | |
46 | macro(SyntaxError) \ | |
47 | macro(TypeError) \ | |
48 | macro(URIError) \ | |
49 | macro(UTC) \ | |
50 | macro(__defineGetter__) \ | |
51 | macro(__defineSetter__) \ | |
52 | macro(__lookupGetter__) \ | |
53 | macro(__lookupSetter__) \ | |
54 | macro(anonymous) \ | |
9dae56ea | 55 | macro(apply) \ |
b37bf2e1 | 56 | macro(arguments) \ |
6fe7ccc8 | 57 | macro(bind) \ |
93a37866 A |
58 | macro(bytecode) \ |
59 | macro(bytecodeIndex) \ | |
60 | macro(bytecodes) \ | |
61 | macro(bytecodesID) \ | |
9dae56ea | 62 | macro(call) \ |
b37bf2e1 A |
63 | macro(callee) \ |
64 | macro(caller) \ | |
93a37866 A |
65 | macro(compilationKind) \ |
66 | macro(compilations) \ | |
9dae56ea | 67 | macro(compile) \ |
f9bf01c6 | 68 | macro(configurable) \ |
b37bf2e1 | 69 | macro(constructor) \ |
93a37866 A |
70 | macro(count) \ |
71 | macro(counters) \ | |
72 | macro(description) \ | |
73 | macro(descriptions) \ | |
74 | macro(displayName) \ | |
75 | macro(document) \ | |
f9bf01c6 | 76 | macro(enumerable) \ |
9dae56ea A |
77 | macro(eval) \ |
78 | macro(exec) \ | |
93a37866 A |
79 | macro(executionCount) \ |
80 | macro(exitKind) \ | |
b37bf2e1 | 81 | macro(fromCharCode) \ |
f9bf01c6 | 82 | macro(get) \ |
93a37866 | 83 | macro(global) \ |
9dae56ea | 84 | macro(hasOwnProperty) \ |
93a37866 A |
85 | macro(hash) \ |
86 | macro(header) \ | |
87 | macro(id) \ | |
b37bf2e1 A |
88 | macro(ignoreCase) \ |
89 | macro(index) \ | |
93a37866 | 90 | macro(inferredName) \ |
b37bf2e1 | 91 | macro(input) \ |
93a37866 | 92 | macro(instructionCount) \ |
f9bf01c6 | 93 | macro(isArray) \ |
9dae56ea | 94 | macro(isPrototypeOf) \ |
93a37866 A |
95 | macro(isWatchpoint) \ |
96 | macro(join) \ | |
6fe7ccc8 | 97 | macro(lastIndex) \ |
b37bf2e1 A |
98 | macro(length) \ |
99 | macro(message) \ | |
100 | macro(multiline) \ | |
101 | macro(name) \ | |
9dae56ea | 102 | macro(now) \ |
93a37866 A |
103 | macro(numInlinedCalls) \ |
104 | macro(numInlinedGetByIds) \ | |
105 | macro(numInlinedPutByIds) \ | |
106 | macro(opcode) \ | |
107 | macro(origin) \ | |
108 | macro(osrExitSites) \ | |
109 | macro(osrExits) \ | |
9dae56ea | 110 | macro(parse) \ |
93a37866 | 111 | macro(profiledBytecodes) \ |
9dae56ea | 112 | macro(propertyIsEnumerable) \ |
b37bf2e1 | 113 | macro(prototype) \ |
f9bf01c6 | 114 | macro(set) \ |
b37bf2e1 | 115 | macro(source) \ |
93a37866 | 116 | macro(sourceCode) \ |
6fe7ccc8 | 117 | macro(stack) \ |
9dae56ea | 118 | macro(test) \ |
b37bf2e1 A |
119 | macro(toExponential) \ |
120 | macro(toFixed) \ | |
ba379fdc A |
121 | macro(toISOString) \ |
122 | macro(toJSON) \ | |
b37bf2e1 A |
123 | macro(toLocaleString) \ |
124 | macro(toPrecision) \ | |
125 | macro(toString) \ | |
f9bf01c6 | 126 | macro(value) \ |
ba379fdc | 127 | macro(valueOf) \ |
93a37866 A |
128 | macro(window) \ |
129 | macro(writable) | |
b37bf2e1 | 130 | |
14957cd0 A |
131 | #define JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(macro) \ |
132 | macro(null) \ | |
6fe7ccc8 | 133 | macro(undefined) \ |
14957cd0 A |
134 | macro(true) \ |
135 | macro(false) \ | |
136 | macro(break) \ | |
137 | macro(case) \ | |
138 | macro(catch) \ | |
139 | macro(const) \ | |
140 | macro(default) \ | |
141 | macro(finally) \ | |
142 | macro(for) \ | |
143 | macro(instanceof) \ | |
144 | macro(new) \ | |
145 | macro(var) \ | |
146 | macro(continue) \ | |
147 | macro(function) \ | |
148 | macro(return) \ | |
149 | macro(void) \ | |
150 | macro(delete) \ | |
151 | macro(if) \ | |
152 | macro(this) \ | |
153 | macro(do) \ | |
154 | macro(while) \ | |
155 | macro(else) \ | |
156 | macro(in) \ | |
157 | macro(switch) \ | |
158 | macro(throw) \ | |
159 | macro(try) \ | |
160 | macro(typeof) \ | |
161 | macro(with) \ | |
162 | macro(debugger) \ | |
163 | macro(class) \ | |
164 | macro(enum) \ | |
165 | macro(export) \ | |
166 | macro(extends) \ | |
167 | macro(import) \ | |
6fe7ccc8 A |
168 | macro(super) \ |
169 | macro(implements) \ | |
170 | macro(interface) \ | |
171 | macro(let) \ | |
172 | macro(package) \ | |
173 | macro(private) \ | |
174 | macro(protected) \ | |
175 | macro(public) \ | |
176 | macro(static) \ | |
177 | macro(yield) | |
14957cd0 | 178 | |
9dae56ea | 179 | namespace JSC { |
b37bf2e1 | 180 | |
14957cd0 A |
181 | class CommonIdentifiers { |
182 | WTF_MAKE_NONCOPYABLE(CommonIdentifiers); WTF_MAKE_FAST_ALLOCATED; | |
b37bf2e1 | 183 | private: |
93a37866 A |
184 | CommonIdentifiers(VM*); |
185 | friend class VM; | |
b37bf2e1 A |
186 | |
187 | public: | |
b37bf2e1 | 188 | const Identifier nullIdentifier; |
ba379fdc | 189 | const Identifier emptyIdentifier; |
b37bf2e1 | 190 | const Identifier underscoreProto; |
9dae56ea | 191 | const Identifier thisIdentifier; |
14957cd0 | 192 | const Identifier useStrictIdentifier; |
b37bf2e1 | 193 | |
14957cd0 A |
194 | |
195 | #define JSC_IDENTIFIER_DECLARE_KEYWORD_NAME_GLOBAL(name) const Identifier name##Keyword; | |
196 | JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(JSC_IDENTIFIER_DECLARE_KEYWORD_NAME_GLOBAL) | |
197 | #undef JSC_IDENTIFIER_DECLARE_KEYWORD_NAME_GLOBAL | |
198 | ||
9dae56ea A |
199 | #define JSC_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL(name) const Identifier name; |
200 | JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(JSC_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL) | |
201 | #undef JSC_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL | |
b37bf2e1 | 202 | }; |
b37bf2e1 | 203 | |
9dae56ea | 204 | } // namespace JSC |
b37bf2e1 | 205 | |
9dae56ea | 206 | #endif // CommonIdentifiers_h |