]> git.saurik.com Git - apple/javascriptcore.git/blame - runtime/CommonIdentifiers.h
JavaScriptCore-1097.3.3.tar.gz
[apple/javascriptcore.git] / runtime / CommonIdentifiers.h
CommitLineData
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) \
9dae56ea 30 macro(apply) \
b37bf2e1 31 macro(arguments) \
6fe7ccc8 32 macro(bind) \
9dae56ea 33 macro(call) \
b37bf2e1
A
34 macro(callee) \
35 macro(caller) \
9dae56ea 36 macro(compile) \
f9bf01c6 37 macro(configurable) \
b37bf2e1 38 macro(constructor) \
f9bf01c6 39 macro(enumerable) \
9dae56ea
A
40 macro(eval) \
41 macro(exec) \
b37bf2e1
A
42 macro(fromCharCode) \
43 macro(global) \
f9bf01c6 44 macro(get) \
9dae56ea 45 macro(hasOwnProperty) \
b37bf2e1
A
46 macro(ignoreCase) \
47 macro(index) \
48 macro(input) \
f9bf01c6 49 macro(isArray) \
9dae56ea 50 macro(isPrototypeOf) \
6fe7ccc8 51 macro(lastIndex) \
b37bf2e1
A
52 macro(length) \
53 macro(message) \
54 macro(multiline) \
55 macro(name) \
9dae56ea
A
56 macro(now) \
57 macro(parse) \
58 macro(propertyIsEnumerable) \
b37bf2e1 59 macro(prototype) \
f9bf01c6 60 macro(set) \
b37bf2e1 61 macro(source) \
6fe7ccc8 62 macro(stack) \
9dae56ea 63 macro(test) \
b37bf2e1
A
64 macro(toExponential) \
65 macro(toFixed) \
ba379fdc
A
66 macro(toISOString) \
67 macro(toJSON) \
b37bf2e1
A
68 macro(toLocaleString) \
69 macro(toPrecision) \
70 macro(toString) \
9dae56ea 71 macro(UTC) \
f9bf01c6 72 macro(value) \
ba379fdc 73 macro(valueOf) \
f9bf01c6 74 macro(writable) \
6fe7ccc8
A
75 macro(displayName) \
76 macro(join)
b37bf2e1 77
14957cd0
A
78#define JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(macro) \
79 macro(null) \
6fe7ccc8 80 macro(undefined) \
14957cd0
A
81 macro(true) \
82 macro(false) \
83 macro(break) \
84 macro(case) \
85 macro(catch) \
86 macro(const) \
87 macro(default) \
88 macro(finally) \
89 macro(for) \
90 macro(instanceof) \
91 macro(new) \
92 macro(var) \
93 macro(continue) \
94 macro(function) \
95 macro(return) \
96 macro(void) \
97 macro(delete) \
98 macro(if) \
99 macro(this) \
100 macro(do) \
101 macro(while) \
102 macro(else) \
103 macro(in) \
104 macro(switch) \
105 macro(throw) \
106 macro(try) \
107 macro(typeof) \
108 macro(with) \
109 macro(debugger) \
110 macro(class) \
111 macro(enum) \
112 macro(export) \
113 macro(extends) \
114 macro(import) \
6fe7ccc8
A
115 macro(super) \
116 macro(implements) \
117 macro(interface) \
118 macro(let) \
119 macro(package) \
120 macro(private) \
121 macro(protected) \
122 macro(public) \
123 macro(static) \
124 macro(yield)
14957cd0 125
9dae56ea 126namespace JSC {
b37bf2e1 127
14957cd0
A
128 class CommonIdentifiers {
129 WTF_MAKE_NONCOPYABLE(CommonIdentifiers); WTF_MAKE_FAST_ALLOCATED;
b37bf2e1 130 private:
9dae56ea
A
131 CommonIdentifiers(JSGlobalData*);
132 friend class JSGlobalData;
b37bf2e1
A
133
134 public:
b37bf2e1 135 const Identifier nullIdentifier;
ba379fdc 136 const Identifier emptyIdentifier;
b37bf2e1 137 const Identifier underscoreProto;
9dae56ea 138 const Identifier thisIdentifier;
14957cd0 139 const Identifier useStrictIdentifier;
b37bf2e1 140
14957cd0
A
141
142#define JSC_IDENTIFIER_DECLARE_KEYWORD_NAME_GLOBAL(name) const Identifier name##Keyword;
143 JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(JSC_IDENTIFIER_DECLARE_KEYWORD_NAME_GLOBAL)
144#undef JSC_IDENTIFIER_DECLARE_KEYWORD_NAME_GLOBAL
145
9dae56ea
A
146#define JSC_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL(name) const Identifier name;
147 JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(JSC_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL)
148#undef JSC_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL
b37bf2e1 149 };
b37bf2e1 150
9dae56ea 151} // namespace JSC
b37bf2e1 152
9dae56ea 153#endif // CommonIdentifiers_h