CommonPropertyNames.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. *
  8. * 1. Redistributions of source code must retain the above copyright notice, this
  9. * list of conditions and the following disclaimer.
  10. *
  11. * 2. Redistributions in binary form must reproduce the above copyright notice,
  12. * this list of conditions and the following disclaimer in the documentation
  13. * and/or other materials provided with the distribution.
  14. *
  15. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  16. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  18. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  19. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  20. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  21. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  22. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  23. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  24. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. #pragma once
  27. #include <AK/FlyString.h>
  28. #include <LibJS/Forward.h>
  29. namespace JS {
  30. #define ENUMERATE_STANDARD_PROPERTY_NAMES(P) \
  31. P(BYTES_PER_ELEMENT) \
  32. P(BigInt) \
  33. P(Boolean) \
  34. P(E) \
  35. P(EPSILON) \
  36. P(Infinity) \
  37. P(JSON) \
  38. P(LN10) \
  39. P(LN2) \
  40. P(LOG10E) \
  41. P(LOG2E) \
  42. P(MAX_SAFE_INTEGER) \
  43. P(MIN_SAFE_INTEGER) \
  44. P(Math) \
  45. P(NEGATIVE_INFINITY) \
  46. P(NaN) \
  47. P(Number) \
  48. P(PI) \
  49. P(POSITIVE_INFINITY) \
  50. P(Proxy) \
  51. P(Reflect) \
  52. P(RegExp) \
  53. P(SQRT1_2) \
  54. P(SQRT2) \
  55. P(String) \
  56. P(Symbol) \
  57. P(UTC) \
  58. P(abs) \
  59. P(acos) \
  60. P(acosh) \
  61. P(apply) \
  62. P(arguments) \
  63. P(asIntN) \
  64. P(asUintN) \
  65. P(asin) \
  66. P(asinh) \
  67. P(at) \
  68. P(atan) \
  69. P(atan2) \
  70. P(atanh) \
  71. P(bind) \
  72. P(byteLength) \
  73. P(call) \
  74. P(callee) \
  75. P(cbrt) \
  76. P(ceil) \
  77. P(charAt) \
  78. P(charCodeAt) \
  79. P(clear) \
  80. P(clz32) \
  81. P(concat) \
  82. P(configurable) \
  83. P(console) \
  84. P(construct) \
  85. P(constructor) \
  86. P(cos) \
  87. P(cosh) \
  88. P(count) \
  89. P(countReset) \
  90. P(debug) \
  91. P(defineProperty) \
  92. P(deleteProperty) \
  93. P(description) \
  94. P(done) \
  95. P(dotAll) \
  96. P(endsWith) \
  97. P(entries) \
  98. P(enumerable) \
  99. P(error) \
  100. P(eval) \
  101. P(every) \
  102. P(exec) \
  103. P(exp) \
  104. P(expm1) \
  105. P(fill) \
  106. P(filter) \
  107. P(find) \
  108. P(findIndex) \
  109. P(flags) \
  110. P(flat) \
  111. P(floor) \
  112. P(forEach) \
  113. P(from) \
  114. P(fromCharCode) \
  115. P(fround) \
  116. P(gc) \
  117. P(get) \
  118. P(getDate) \
  119. P(getDay) \
  120. P(getFullYear) \
  121. P(getHours) \
  122. P(getMilliseconds) \
  123. P(getMinutes) \
  124. P(getMonth) \
  125. P(getOwnPropertyDescriptor) \
  126. P(getOwnPropertyNames) \
  127. P(getPrototypeOf) \
  128. P(getSeconds) \
  129. P(getTime) \
  130. P(getUTCDate) \
  131. P(getUTCDay) \
  132. P(getUTCFullYear) \
  133. P(getUTCHours) \
  134. P(getUTCMilliseconds) \
  135. P(getUTCMinutes) \
  136. P(getUTCMonth) \
  137. P(getUTCSeconds) \
  138. P(global) \
  139. P(globalThis) \
  140. P(groups) \
  141. P(has) \
  142. P(hasOwnProperty) \
  143. P(hypot) \
  144. P(ignoreCase) \
  145. P(imul) \
  146. P(includes) \
  147. P(index) \
  148. P(indexOf) \
  149. P(info) \
  150. P(input) \
  151. P(is) \
  152. P(isArray) \
  153. P(isExtensible) \
  154. P(isFinite) \
  155. P(isInteger) \
  156. P(isNaN) \
  157. P(isPrototypeOf) \
  158. P(isSafeInteger) \
  159. P(isView) \
  160. P(join) \
  161. P(keyFor) \
  162. P(keys) \
  163. P(lastIndex) \
  164. P(lastIndexOf) \
  165. P(length) \
  166. P(log) \
  167. P(log1p) \
  168. P(log2) \
  169. P(log10) \
  170. P(map) \
  171. P(max) \
  172. P(message) \
  173. P(min) \
  174. P(multiline) \
  175. P(name) \
  176. P(next) \
  177. P(now) \
  178. P(of) \
  179. P(ownKeys) \
  180. P(padEnd) \
  181. P(padStart) \
  182. P(parse) \
  183. P(parseFloat) \
  184. P(parseInt) \
  185. P(pop) \
  186. P(pow) \
  187. P(preventExtensions) \
  188. P(propertyIsEnumerable) \
  189. P(prototype) \
  190. P(push) \
  191. P(random) \
  192. P(raw) \
  193. P(reduce) \
  194. P(reduceRight) \
  195. P(repeat) \
  196. P(reverse) \
  197. P(round) \
  198. P(set) \
  199. P(setFullYear) \
  200. P(setHours) \
  201. P(setMilliseconds) \
  202. P(setMinutes) \
  203. P(setPrototypeOf) \
  204. P(setSeconds) \
  205. P(shift) \
  206. P(sign) \
  207. P(sin) \
  208. P(sinh) \
  209. P(slice) \
  210. P(some) \
  211. P(sort) \
  212. P(source) \
  213. P(splice) \
  214. P(sqrt) \
  215. P(startsWith) \
  216. P(sticky) \
  217. P(stringify) \
  218. P(substr) \
  219. P(substring) \
  220. P(tan) \
  221. P(tanh) \
  222. P(test) \
  223. P(toDateString) \
  224. P(toGMTString) \
  225. P(toISOString) \
  226. P(toJSON) \
  227. P(toLocaleDateString) \
  228. P(toLocaleString) \
  229. P(toLocaleTimeString) \
  230. P(toLowerCase) \
  231. P(toString) \
  232. P(toTimeString) \
  233. P(toUpperCase) \
  234. P(trace) \
  235. P(trim) \
  236. P(trimEnd) \
  237. P(trimStart) \
  238. P(trunc) \
  239. P(undefined) \
  240. P(unicode) \
  241. P(unshift) \
  242. P(value) \
  243. P(valueOf) \
  244. P(values) \
  245. P(warn) \
  246. P(writable)
  247. struct CommonPropertyNames {
  248. FlyString for_ { "for" };
  249. #define __ENUMERATE(x) FlyString x { #x };
  250. ENUMERATE_STANDARD_PROPERTY_NAMES(__ENUMERATE)
  251. #undef __ENUMERATE
  252. #define __JS_ENUMERATE(x, a, b, c, t) FlyString x { #x };
  253. JS_ENUMERATE_BUILTIN_TYPES
  254. #undef __JS_ENUMERATE
  255. #define __JS_ENUMERATE(x, a) FlyString x { #x };
  256. JS_ENUMERATE_WELL_KNOWN_SYMBOLS
  257. #undef __JS_ENUMERATE
  258. };
  259. }