johnson 2.0.0.pre1 → 2.0.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) hide show
  1. data/CHANGELOG.rdoc +12 -0
  2. data/Manifest.txt +4 -285
  3. data/Rakefile +13 -20
  4. data/ext/tracemonkey/global.cc +4 -1
  5. data/ext/tracemonkey/js.cc +30 -33
  6. data/ext/tracemonkey/runtime.cc +96 -6
  7. data/ext/tracemonkey/split_global.cc +0 -5
  8. data/ext/tracemonkey/tracemonkey.h +2 -2
  9. data/lib/johnson.rb +2 -2
  10. data/lib/johnson/runtime.rb +25 -15
  11. data/lib/johnson/tracemonkey/runtime.rb +6 -3
  12. data/vendor/tracemonkey/config/system-headers +1 -3
  13. data/vendor/tracemonkey/jscntxt.h +5 -2
  14. data/vendor/tracemonkey/jsdbgapi.cpp +9 -1
  15. data/vendor/tracemonkey/jsdbgapi.h +4 -0
  16. data/vendor/tracemonkey/tests/ecma/NativeObjects/browser.js +0 -0
  17. data/vendor/tracemonkey/tests/ecma/NativeObjects/jstests.list +0 -0
  18. data/vendor/tracemonkey/tests/ecma_3_1/Object/jstests.list +1 -1
  19. data/vendor/tracemonkey/tests/js1_3/misc/browser.js +0 -0
  20. data/vendor/tracemonkey/tests/js1_3/misc/jstests.list +0 -0
  21. data/vendor/tracemonkey/tests/js1_5/Regress/jstests.list +4 -4
  22. data/vendor/tracemonkey/tests/js1_5/Scope/jstests.list +1 -1
  23. data/vendor/tracemonkey/tests/js1_5/decompilation/jstests.list +2 -2
  24. data/vendor/tracemonkey/tests/js1_7/decompilation/jstests.list +1 -1
  25. data/vendor/tracemonkey/tests/shell.js +2 -1
  26. metadata +51 -309
  27. data/ext/spidermonkey/context.c +0 -116
  28. data/ext/spidermonkey/context.h +0 -19
  29. data/ext/spidermonkey/conversions.c +0 -361
  30. data/ext/spidermonkey/conversions.h +0 -31
  31. data/ext/spidermonkey/debugger.c +0 -234
  32. data/ext/spidermonkey/debugger.h +0 -10
  33. data/ext/spidermonkey/extconf.rb +0 -32
  34. data/ext/spidermonkey/extensions.c +0 -37
  35. data/ext/spidermonkey/extensions.h +0 -12
  36. data/ext/spidermonkey/global.c +0 -40
  37. data/ext/spidermonkey/global.h +0 -11
  38. data/ext/spidermonkey/idhash.c +0 -16
  39. data/ext/spidermonkey/idhash.h +0 -8
  40. data/ext/spidermonkey/immutable_node.c +0 -1153
  41. data/ext/spidermonkey/immutable_node.c.erb +0 -523
  42. data/ext/spidermonkey/immutable_node.h +0 -22
  43. data/ext/spidermonkey/jroot.h +0 -197
  44. data/ext/spidermonkey/js_land_proxy.c +0 -620
  45. data/ext/spidermonkey/js_land_proxy.h +0 -20
  46. data/ext/spidermonkey/ruby_land_proxy.c +0 -618
  47. data/ext/spidermonkey/ruby_land_proxy.h +0 -38
  48. data/ext/spidermonkey/runtime.c +0 -396
  49. data/ext/spidermonkey/runtime.h +0 -27
  50. data/ext/spidermonkey/spidermonkey.c +0 -22
  51. data/ext/spidermonkey/spidermonkey.h +0 -29
  52. data/lib/johnson/spidermonkey.rb +0 -12
  53. data/lib/johnson/spidermonkey/context.rb +0 -10
  54. data/lib/johnson/spidermonkey/debugger.rb +0 -67
  55. data/lib/johnson/spidermonkey/immutable_node.rb +0 -282
  56. data/lib/johnson/spidermonkey/js_land_proxy.rb +0 -64
  57. data/lib/johnson/spidermonkey/mutable_tree_visitor.rb +0 -242
  58. data/lib/johnson/spidermonkey/ruby_land_proxy.rb +0 -17
  59. data/lib/johnson/spidermonkey/runtime.rb +0 -74
  60. data/test/johnson/spidermonkey/context_test.rb +0 -21
  61. data/test/johnson/spidermonkey/immutable_node_test.rb +0 -34
  62. data/test/johnson/spidermonkey/js_land_proxy_test.rb +0 -273
  63. data/test/johnson/spidermonkey/ruby_land_proxy_test.rb +0 -274
  64. data/test/johnson/spidermonkey/runtime_test.rb +0 -41
  65. data/vendor/spidermonkey/.cvsignore +0 -9
  66. data/vendor/spidermonkey/Makefile.in +0 -449
  67. data/vendor/spidermonkey/Makefile.ref +0 -365
  68. data/vendor/spidermonkey/README.html +0 -820
  69. data/vendor/spidermonkey/SpiderMonkey.rsp +0 -12
  70. data/vendor/spidermonkey/Y.js +0 -19
  71. data/vendor/spidermonkey/build.mk +0 -43
  72. data/vendor/spidermonkey/config.mk +0 -192
  73. data/vendor/spidermonkey/config/AIX4.1.mk +0 -65
  74. data/vendor/spidermonkey/config/AIX4.2.mk +0 -64
  75. data/vendor/spidermonkey/config/AIX4.3.mk +0 -65
  76. data/vendor/spidermonkey/config/Darwin.mk +0 -83
  77. data/vendor/spidermonkey/config/Darwin1.3.mk +0 -81
  78. data/vendor/spidermonkey/config/Darwin1.4.mk +0 -41
  79. data/vendor/spidermonkey/config/Darwin5.2.mk +0 -81
  80. data/vendor/spidermonkey/config/Darwin5.3.mk +0 -81
  81. data/vendor/spidermonkey/config/HP-UXB.10.10.mk +0 -77
  82. data/vendor/spidermonkey/config/HP-UXB.10.20.mk +0 -77
  83. data/vendor/spidermonkey/config/HP-UXB.11.00.mk +0 -80
  84. data/vendor/spidermonkey/config/IRIX.mk +0 -87
  85. data/vendor/spidermonkey/config/IRIX5.3.mk +0 -44
  86. data/vendor/spidermonkey/config/IRIX6.1.mk +0 -44
  87. data/vendor/spidermonkey/config/IRIX6.2.mk +0 -44
  88. data/vendor/spidermonkey/config/IRIX6.3.mk +0 -44
  89. data/vendor/spidermonkey/config/IRIX6.5.mk +0 -44
  90. data/vendor/spidermonkey/config/Linux_All.mk +0 -103
  91. data/vendor/spidermonkey/config/Mac_OS10.0.mk +0 -82
  92. data/vendor/spidermonkey/config/OSF1V4.0.mk +0 -72
  93. data/vendor/spidermonkey/config/OSF1V5.0.mk +0 -69
  94. data/vendor/spidermonkey/config/SunOS4.1.4.mk +0 -101
  95. data/vendor/spidermonkey/config/SunOS5.10.mk +0 -50
  96. data/vendor/spidermonkey/config/SunOS5.3.mk +0 -91
  97. data/vendor/spidermonkey/config/SunOS5.4.mk +0 -92
  98. data/vendor/spidermonkey/config/SunOS5.5.1.mk +0 -44
  99. data/vendor/spidermonkey/config/SunOS5.5.mk +0 -87
  100. data/vendor/spidermonkey/config/SunOS5.6.mk +0 -89
  101. data/vendor/spidermonkey/config/SunOS5.7.mk +0 -44
  102. data/vendor/spidermonkey/config/SunOS5.8.mk +0 -44
  103. data/vendor/spidermonkey/config/SunOS5.9.mk +0 -44
  104. data/vendor/spidermonkey/config/WINNT4.0.mk +0 -117
  105. data/vendor/spidermonkey/config/WINNT5.0.mk +0 -117
  106. data/vendor/spidermonkey/config/WINNT5.1.mk +0 -117
  107. data/vendor/spidermonkey/config/WINNT5.2.mk +0 -117
  108. data/vendor/spidermonkey/config/WINNT6.0.mk +0 -117
  109. data/vendor/spidermonkey/config/dgux.mk +0 -64
  110. data/vendor/spidermonkey/editline/Makefile.ref +0 -144
  111. data/vendor/spidermonkey/editline/README +0 -83
  112. data/vendor/spidermonkey/editline/editline.3 +0 -175
  113. data/vendor/spidermonkey/editline/editline.c +0 -1369
  114. data/vendor/spidermonkey/editline/editline.h +0 -135
  115. data/vendor/spidermonkey/editline/sysunix.c +0 -182
  116. data/vendor/spidermonkey/editline/unix.h +0 -82
  117. data/vendor/spidermonkey/fdlibm/.cvsignore +0 -7
  118. data/vendor/spidermonkey/fdlibm/Makefile.in +0 -127
  119. data/vendor/spidermonkey/fdlibm/Makefile.ref +0 -192
  120. data/vendor/spidermonkey/fdlibm/e_acos.c +0 -147
  121. data/vendor/spidermonkey/fdlibm/e_acosh.c +0 -105
  122. data/vendor/spidermonkey/fdlibm/e_asin.c +0 -156
  123. data/vendor/spidermonkey/fdlibm/e_atan2.c +0 -165
  124. data/vendor/spidermonkey/fdlibm/e_atanh.c +0 -110
  125. data/vendor/spidermonkey/fdlibm/e_cosh.c +0 -133
  126. data/vendor/spidermonkey/fdlibm/e_exp.c +0 -202
  127. data/vendor/spidermonkey/fdlibm/e_fmod.c +0 -184
  128. data/vendor/spidermonkey/fdlibm/e_gamma.c +0 -71
  129. data/vendor/spidermonkey/fdlibm/e_gamma_r.c +0 -70
  130. data/vendor/spidermonkey/fdlibm/e_hypot.c +0 -173
  131. data/vendor/spidermonkey/fdlibm/e_j0.c +0 -524
  132. data/vendor/spidermonkey/fdlibm/e_j1.c +0 -523
  133. data/vendor/spidermonkey/fdlibm/e_jn.c +0 -315
  134. data/vendor/spidermonkey/fdlibm/e_lgamma.c +0 -71
  135. data/vendor/spidermonkey/fdlibm/e_lgamma_r.c +0 -347
  136. data/vendor/spidermonkey/fdlibm/e_log.c +0 -184
  137. data/vendor/spidermonkey/fdlibm/e_log10.c +0 -134
  138. data/vendor/spidermonkey/fdlibm/e_pow.c +0 -386
  139. data/vendor/spidermonkey/fdlibm/e_rem_pio2.c +0 -222
  140. data/vendor/spidermonkey/fdlibm/e_remainder.c +0 -120
  141. data/vendor/spidermonkey/fdlibm/e_scalb.c +0 -89
  142. data/vendor/spidermonkey/fdlibm/e_sinh.c +0 -122
  143. data/vendor/spidermonkey/fdlibm/e_sqrt.c +0 -497
  144. data/vendor/spidermonkey/fdlibm/fdlibm.h +0 -273
  145. data/vendor/spidermonkey/fdlibm/fdlibm.mak +0 -1453
  146. data/vendor/spidermonkey/fdlibm/fdlibm.mdp +0 -0
  147. data/vendor/spidermonkey/fdlibm/k_cos.c +0 -135
  148. data/vendor/spidermonkey/fdlibm/k_rem_pio2.c +0 -354
  149. data/vendor/spidermonkey/fdlibm/k_sin.c +0 -114
  150. data/vendor/spidermonkey/fdlibm/k_standard.c +0 -785
  151. data/vendor/spidermonkey/fdlibm/k_tan.c +0 -170
  152. data/vendor/spidermonkey/fdlibm/s_asinh.c +0 -101
  153. data/vendor/spidermonkey/fdlibm/s_atan.c +0 -175
  154. data/vendor/spidermonkey/fdlibm/s_cbrt.c +0 -133
  155. data/vendor/spidermonkey/fdlibm/s_ceil.c +0 -120
  156. data/vendor/spidermonkey/fdlibm/s_copysign.c +0 -72
  157. data/vendor/spidermonkey/fdlibm/s_cos.c +0 -118
  158. data/vendor/spidermonkey/fdlibm/s_erf.c +0 -356
  159. data/vendor/spidermonkey/fdlibm/s_expm1.c +0 -267
  160. data/vendor/spidermonkey/fdlibm/s_fabs.c +0 -70
  161. data/vendor/spidermonkey/fdlibm/s_finite.c +0 -71
  162. data/vendor/spidermonkey/fdlibm/s_floor.c +0 -121
  163. data/vendor/spidermonkey/fdlibm/s_frexp.c +0 -99
  164. data/vendor/spidermonkey/fdlibm/s_ilogb.c +0 -85
  165. data/vendor/spidermonkey/fdlibm/s_isnan.c +0 -74
  166. data/vendor/spidermonkey/fdlibm/s_ldexp.c +0 -66
  167. data/vendor/spidermonkey/fdlibm/s_lib_version.c +0 -73
  168. data/vendor/spidermonkey/fdlibm/s_log1p.c +0 -211
  169. data/vendor/spidermonkey/fdlibm/s_logb.c +0 -79
  170. data/vendor/spidermonkey/fdlibm/s_matherr.c +0 -64
  171. data/vendor/spidermonkey/fdlibm/s_modf.c +0 -132
  172. data/vendor/spidermonkey/fdlibm/s_nextafter.c +0 -124
  173. data/vendor/spidermonkey/fdlibm/s_rint.c +0 -131
  174. data/vendor/spidermonkey/fdlibm/s_scalbn.c +0 -107
  175. data/vendor/spidermonkey/fdlibm/s_signgam.c +0 -40
  176. data/vendor/spidermonkey/fdlibm/s_significand.c +0 -68
  177. data/vendor/spidermonkey/fdlibm/s_sin.c +0 -118
  178. data/vendor/spidermonkey/fdlibm/s_tan.c +0 -112
  179. data/vendor/spidermonkey/fdlibm/s_tanh.c +0 -122
  180. data/vendor/spidermonkey/fdlibm/w_acos.c +0 -78
  181. data/vendor/spidermonkey/fdlibm/w_acosh.c +0 -78
  182. data/vendor/spidermonkey/fdlibm/w_asin.c +0 -80
  183. data/vendor/spidermonkey/fdlibm/w_atan2.c +0 -79
  184. data/vendor/spidermonkey/fdlibm/w_atanh.c +0 -81
  185. data/vendor/spidermonkey/fdlibm/w_cosh.c +0 -77
  186. data/vendor/spidermonkey/fdlibm/w_exp.c +0 -88
  187. data/vendor/spidermonkey/fdlibm/w_fmod.c +0 -78
  188. data/vendor/spidermonkey/fdlibm/w_gamma.c +0 -85
  189. data/vendor/spidermonkey/fdlibm/w_gamma_r.c +0 -81
  190. data/vendor/spidermonkey/fdlibm/w_hypot.c +0 -78
  191. data/vendor/spidermonkey/fdlibm/w_j0.c +0 -105
  192. data/vendor/spidermonkey/fdlibm/w_j1.c +0 -106
  193. data/vendor/spidermonkey/fdlibm/w_jn.c +0 -128
  194. data/vendor/spidermonkey/fdlibm/w_lgamma.c +0 -85
  195. data/vendor/spidermonkey/fdlibm/w_lgamma_r.c +0 -81
  196. data/vendor/spidermonkey/fdlibm/w_log.c +0 -78
  197. data/vendor/spidermonkey/fdlibm/w_log10.c +0 -81
  198. data/vendor/spidermonkey/fdlibm/w_pow.c +0 -99
  199. data/vendor/spidermonkey/fdlibm/w_remainder.c +0 -77
  200. data/vendor/spidermonkey/fdlibm/w_scalb.c +0 -95
  201. data/vendor/spidermonkey/fdlibm/w_sinh.c +0 -77
  202. data/vendor/spidermonkey/fdlibm/w_sqrt.c +0 -77
  203. data/vendor/spidermonkey/javascript-trace.d +0 -73
  204. data/vendor/spidermonkey/js.c +0 -3951
  205. data/vendor/spidermonkey/js.mdp +0 -0
  206. data/vendor/spidermonkey/js.msg +0 -308
  207. data/vendor/spidermonkey/js.pkg +0 -2
  208. data/vendor/spidermonkey/js3240.rc +0 -79
  209. data/vendor/spidermonkey/jsOS240.def +0 -654
  210. data/vendor/spidermonkey/jsapi.c +0 -5836
  211. data/vendor/spidermonkey/jsapi.h +0 -2624
  212. data/vendor/spidermonkey/jsarena.c +0 -450
  213. data/vendor/spidermonkey/jsarena.h +0 -318
  214. data/vendor/spidermonkey/jsarray.c +0 -2996
  215. data/vendor/spidermonkey/jsarray.h +0 -127
  216. data/vendor/spidermonkey/jsatom.c +0 -1045
  217. data/vendor/spidermonkey/jsatom.h +0 -442
  218. data/vendor/spidermonkey/jsbit.h +0 -253
  219. data/vendor/spidermonkey/jsbool.c +0 -176
  220. data/vendor/spidermonkey/jsbool.h +0 -73
  221. data/vendor/spidermonkey/jsclist.h +0 -139
  222. data/vendor/spidermonkey/jscntxt.c +0 -1348
  223. data/vendor/spidermonkey/jscntxt.h +0 -1120
  224. data/vendor/spidermonkey/jscompat.h +0 -57
  225. data/vendor/spidermonkey/jsconfig.h +0 -248
  226. data/vendor/spidermonkey/jsconfig.mk +0 -181
  227. data/vendor/spidermonkey/jscpucfg.c +0 -396
  228. data/vendor/spidermonkey/jscpucfg.h +0 -212
  229. data/vendor/spidermonkey/jsdate.c +0 -2390
  230. data/vendor/spidermonkey/jsdate.h +0 -124
  231. data/vendor/spidermonkey/jsdbgapi.c +0 -1802
  232. data/vendor/spidermonkey/jsdbgapi.h +0 -464
  233. data/vendor/spidermonkey/jsdhash.c +0 -868
  234. data/vendor/spidermonkey/jsdhash.h +0 -592
  235. data/vendor/spidermonkey/jsdtoa.c +0 -3167
  236. data/vendor/spidermonkey/jsdtoa.h +0 -130
  237. data/vendor/spidermonkey/jsdtracef.c +0 -317
  238. data/vendor/spidermonkey/jsdtracef.h +0 -77
  239. data/vendor/spidermonkey/jsemit.c +0 -6909
  240. data/vendor/spidermonkey/jsemit.h +0 -741
  241. data/vendor/spidermonkey/jsexn.c +0 -1371
  242. data/vendor/spidermonkey/jsexn.h +0 -96
  243. data/vendor/spidermonkey/jsfile.c +0 -2736
  244. data/vendor/spidermonkey/jsfile.h +0 -56
  245. data/vendor/spidermonkey/jsfile.msg +0 -90
  246. data/vendor/spidermonkey/jsfun.c +0 -2634
  247. data/vendor/spidermonkey/jsfun.h +0 -254
  248. data/vendor/spidermonkey/jsgc.c +0 -3562
  249. data/vendor/spidermonkey/jsgc.h +0 -403
  250. data/vendor/spidermonkey/jshash.c +0 -476
  251. data/vendor/spidermonkey/jshash.h +0 -151
  252. data/vendor/spidermonkey/jsify.pl +0 -485
  253. data/vendor/spidermonkey/jsinterp.c +0 -7007
  254. data/vendor/spidermonkey/jsinterp.h +0 -525
  255. data/vendor/spidermonkey/jsinvoke.c +0 -43
  256. data/vendor/spidermonkey/jsiter.c +0 -1067
  257. data/vendor/spidermonkey/jsiter.h +0 -122
  258. data/vendor/spidermonkey/jskeyword.tbl +0 -124
  259. data/vendor/spidermonkey/jskwgen.c +0 -460
  260. data/vendor/spidermonkey/jslibmath.h +0 -266
  261. data/vendor/spidermonkey/jslock.c +0 -1309
  262. data/vendor/spidermonkey/jslock.h +0 -313
  263. data/vendor/spidermonkey/jslocko.asm +0 -60
  264. data/vendor/spidermonkey/jslog2.c +0 -94
  265. data/vendor/spidermonkey/jslong.c +0 -264
  266. data/vendor/spidermonkey/jslong.h +0 -412
  267. data/vendor/spidermonkey/jsmath.c +0 -567
  268. data/vendor/spidermonkey/jsmath.h +0 -57
  269. data/vendor/spidermonkey/jsnum.c +0 -1239
  270. data/vendor/spidermonkey/jsnum.h +0 -283
  271. data/vendor/spidermonkey/jsobj.c +0 -5282
  272. data/vendor/spidermonkey/jsobj.h +0 -709
  273. data/vendor/spidermonkey/jsopcode.c +0 -5245
  274. data/vendor/spidermonkey/jsopcode.h +0 -394
  275. data/vendor/spidermonkey/jsopcode.tbl +0 -523
  276. data/vendor/spidermonkey/jsotypes.h +0 -202
  277. data/vendor/spidermonkey/jsparse.c +0 -6704
  278. data/vendor/spidermonkey/jsparse.h +0 -511
  279. data/vendor/spidermonkey/jsprf.c +0 -1264
  280. data/vendor/spidermonkey/jsprf.h +0 -150
  281. data/vendor/spidermonkey/jsproto.tbl +0 -128
  282. data/vendor/spidermonkey/jsprvtd.h +0 -267
  283. data/vendor/spidermonkey/jspubtd.h +0 -744
  284. data/vendor/spidermonkey/jsregexp.c +0 -4364
  285. data/vendor/spidermonkey/jsregexp.h +0 -183
  286. data/vendor/spidermonkey/jsreops.tbl +0 -145
  287. data/vendor/spidermonkey/jsscan.c +0 -2012
  288. data/vendor/spidermonkey/jsscan.h +0 -387
  289. data/vendor/spidermonkey/jsscope.c +0 -1957
  290. data/vendor/spidermonkey/jsscope.h +0 -418
  291. data/vendor/spidermonkey/jsscript.c +0 -1832
  292. data/vendor/spidermonkey/jsscript.h +0 -287
  293. data/vendor/spidermonkey/jsshell.msg +0 -50
  294. data/vendor/spidermonkey/jsstddef.h +0 -83
  295. data/vendor/spidermonkey/jsstr.c +0 -5005
  296. data/vendor/spidermonkey/jsstr.h +0 -641
  297. data/vendor/spidermonkey/jstypes.h +0 -475
  298. data/vendor/spidermonkey/jsutil.c +0 -345
  299. data/vendor/spidermonkey/jsutil.h +0 -157
  300. data/vendor/spidermonkey/jsxdrapi.c +0 -800
  301. data/vendor/spidermonkey/jsxdrapi.h +0 -218
  302. data/vendor/spidermonkey/jsxml.c +0 -8476
  303. data/vendor/spidermonkey/jsxml.h +0 -349
  304. data/vendor/spidermonkey/lock_SunOS.s +0 -119
  305. data/vendor/spidermonkey/perfect.js +0 -39
  306. data/vendor/spidermonkey/plify_jsdhash.sed +0 -36
  307. data/vendor/spidermonkey/prmjtime.c +0 -846
  308. data/vendor/spidermonkey/prmjtime.h +0 -103
  309. data/vendor/spidermonkey/resource.h +0 -15
  310. data/vendor/spidermonkey/rules.mk +0 -197
  311. data/vendor/spidermonkey/win32.order +0 -384
@@ -1,511 +0,0 @@
1
- /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2
- * vim: set ts=8 sw=4 et tw=78:
3
- *
4
- * ***** BEGIN LICENSE BLOCK *****
5
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6
- *
7
- * The contents of this file are subject to the Mozilla Public License Version
8
- * 1.1 (the "License"); you may not use this file except in compliance with
9
- * the License. You may obtain a copy of the License at
10
- * http://www.mozilla.org/MPL/
11
- *
12
- * Software distributed under the License is distributed on an "AS IS" basis,
13
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14
- * for the specific language governing rights and limitations under the
15
- * License.
16
- *
17
- * The Original Code is Mozilla Communicator client code, released
18
- * March 31, 1998.
19
- *
20
- * The Initial Developer of the Original Code is
21
- * Netscape Communications Corporation.
22
- * Portions created by the Initial Developer are Copyright (C) 1998
23
- * the Initial Developer. All Rights Reserved.
24
- *
25
- * Contributor(s):
26
- *
27
- * Alternatively, the contents of this file may be used under the terms of
28
- * either of the GNU General Public License Version 2 or later (the "GPL"),
29
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30
- * in which case the provisions of the GPL or the LGPL are applicable instead
31
- * of those above. If you wish to allow use of your version of this file only
32
- * under the terms of either the GPL or the LGPL, and not to allow others to
33
- * use your version of this file under the terms of the MPL, indicate your
34
- * decision by deleting the provisions above and replace them with the notice
35
- * and other provisions required by the GPL or the LGPL. If you do not delete
36
- * the provisions above, a recipient may use your version of this file under
37
- * the terms of any one of the MPL, the GPL or the LGPL.
38
- *
39
- * ***** END LICENSE BLOCK ***** */
40
-
41
- #ifndef jsparse_h___
42
- #define jsparse_h___
43
- /*
44
- * JS parser definitions.
45
- */
46
- #include "jsconfig.h"
47
- #include "jsprvtd.h"
48
- #include "jspubtd.h"
49
- #include "jsscan.h"
50
-
51
- JS_BEGIN_EXTERN_C
52
-
53
- /*
54
- * Parsing builds a tree of nodes that directs code generation. This tree is
55
- * not a concrete syntax tree in all respects (for example, || and && are left
56
- * associative, but (A && B && C) translates into the right-associated tree
57
- * <A && <B && C>> so that code generation can emit a left-associative branch
58
- * around <B && C> when A is false). Nodes are labeled by token type, with a
59
- * JSOp secondary label when needed:
60
- *
61
- * Label Variant Members
62
- * ----- ------- -------
63
- * <Definitions>
64
- * TOK_FUNCTION func pn_funpob: JSParsedObjectBox holding function
65
- * object containing arg and var properties. We
66
- * create the function object at parse (not emit)
67
- * time to specialize arg and var bytecodes early.
68
- * pn_body: TOK_LC node for function body statements
69
- * pn_flags: TCF_FUN_* flags (see jsemit.h) collected
70
- * while parsing the function's body
71
- * pn_sclen: maximum lexical scope chain length
72
- *
73
- * <Statements>
74
- * TOK_LC list pn_head: list of pn_count statements
75
- * TOK_EXPORT list pn_head: list of pn_count TOK_NAMEs or one TOK_STAR
76
- * (which is not a multiply node)
77
- * TOK_IMPORT list pn_head: list of pn_count sub-trees of the form
78
- * a.b.*, a[b].*, a.*, a.b, or a[b] -- but never a.
79
- * Each member is expressed with TOK_DOT or TOK_LB.
80
- * Each sub-tree's root node has a pn_op in the set
81
- * JSOP_IMPORT{ALL,PROP,ELEM}
82
- * TOK_IF ternary pn_kid1: cond, pn_kid2: then, pn_kid3: else or null
83
- * TOK_SWITCH binary pn_left: discriminant
84
- * pn_right: list of TOK_CASE nodes, with at most one
85
- * TOK_DEFAULT node, or if there are let bindings
86
- * in the top level of the switch body's cases, a
87
- * TOK_LEXICALSCOPE node that contains the list of
88
- * TOK_CASE nodes.
89
- * TOK_CASE, binary pn_left: case expr or null if TOK_DEFAULT
90
- * TOK_DEFAULT pn_right: TOK_LC node for this case's statements
91
- * pn_val: constant value if lookup or table switch
92
- * TOK_WHILE binary pn_left: cond, pn_right: body
93
- * TOK_DO binary pn_left: body, pn_right: cond
94
- * TOK_FOR binary pn_left: either
95
- * for/in loop: a binary TOK_IN node with
96
- * pn_left: TOK_VAR or TOK_NAME to left of 'in'
97
- * if TOK_VAR, its pn_extra may have PNX_POPVAR
98
- * and PNX_FORINVAR bits set
99
- * pn_right: object expr to right of 'in'
100
- * for(;;) loop: a ternary TOK_RESERVED node with
101
- * pn_kid1: init expr before first ';'
102
- * pn_kid2: cond expr before second ';'
103
- * pn_kid3: update expr after second ';'
104
- * any kid may be null
105
- * pn_right: body
106
- * TOK_THROW unary pn_op: JSOP_THROW, pn_kid: exception
107
- * TOK_TRY ternary pn_kid1: try block
108
- * pn_kid2: null or TOK_RESERVED list of
109
- * TOK_LEXICALSCOPE nodes, each with pn_expr pointing
110
- * to a TOK_CATCH node
111
- * pn_kid3: null or finally block
112
- * TOK_CATCH ternary pn_kid1: TOK_NAME, TOK_RB, or TOK_RC catch var node
113
- * (TOK_RB or TOK_RC if destructuring)
114
- * pn_kid2: null or the catch guard expression
115
- * pn_kid3: catch block statements
116
- * TOK_BREAK name pn_atom: label or null
117
- * TOK_CONTINUE name pn_atom: label or null
118
- * TOK_WITH binary pn_left: head expr, pn_right: body
119
- * TOK_VAR list pn_head: list of pn_count TOK_NAME nodes
120
- * each name node has
121
- * pn_atom: variable name
122
- * pn_expr: initializer or null
123
- * TOK_RETURN unary pn_kid: return expr or null
124
- * TOK_SEMI unary pn_kid: expr or null statement
125
- * TOK_COLON name pn_atom: label, pn_expr: labeled statement
126
- *
127
- * <Expressions>
128
- * All left-associated binary trees of the same type are optimized into lists
129
- * to avoid recursion when processing expression chains.
130
- * TOK_COMMA list pn_head: list of pn_count comma-separated exprs
131
- * TOK_ASSIGN binary pn_left: lvalue, pn_right: rvalue
132
- * pn_op: JSOP_ADD for +=, etc.
133
- * TOK_HOOK ternary pn_kid1: cond, pn_kid2: then, pn_kid3: else
134
- * TOK_OR binary pn_left: first in || chain, pn_right: rest of chain
135
- * TOK_AND binary pn_left: first in && chain, pn_right: rest of chain
136
- * TOK_BITOR binary pn_left: left-assoc | expr, pn_right: ^ expr
137
- * TOK_BITXOR binary pn_left: left-assoc ^ expr, pn_right: & expr
138
- * TOK_BITAND binary pn_left: left-assoc & expr, pn_right: EQ expr
139
- * TOK_EQOP binary pn_left: left-assoc EQ expr, pn_right: REL expr
140
- * pn_op: JSOP_EQ, JSOP_NE,
141
- * JSOP_STRICTEQ, JSOP_STRICTNE
142
- * TOK_RELOP binary pn_left: left-assoc REL expr, pn_right: SH expr
143
- * pn_op: JSOP_LT, JSOP_LE, JSOP_GT, JSOP_GE
144
- * TOK_SHOP binary pn_left: left-assoc SH expr, pn_right: ADD expr
145
- * pn_op: JSOP_LSH, JSOP_RSH, JSOP_URSH
146
- * TOK_PLUS, binary pn_left: left-assoc ADD expr, pn_right: MUL expr
147
- * pn_extra: if a left-associated binary TOK_PLUS
148
- * tree has been flattened into a list (see above
149
- * under <Expressions>), pn_extra will contain
150
- * PNX_STRCAT if at least one list element is a
151
- * string literal (TOK_STRING); if such a list has
152
- * any non-string, non-number term, pn_extra will
153
- * contain PNX_CANTFOLD.
154
- * pn_
155
- * TOK_MINUS pn_op: JSOP_ADD, JSOP_SUB
156
- * TOK_STAR, binary pn_left: left-assoc MUL expr, pn_right: UNARY expr
157
- * TOK_DIVOP pn_op: JSOP_MUL, JSOP_DIV, JSOP_MOD
158
- * TOK_UNARYOP unary pn_kid: UNARY expr, pn_op: JSOP_NEG, JSOP_POS,
159
- * JSOP_NOT, JSOP_BITNOT, JSOP_TYPEOF, JSOP_VOID
160
- * TOK_INC, unary pn_kid: MEMBER expr
161
- * TOK_DEC
162
- * TOK_NEW list pn_head: list of ctor, arg1, arg2, ... argN
163
- * pn_count: 1 + N (where N is number of args)
164
- * ctor is a MEMBER expr
165
- * TOK_DELETE unary pn_kid: MEMBER expr
166
- * TOK_DOT, name pn_expr: MEMBER expr to left of .
167
- * TOK_DBLDOT pn_atom: name to right of .
168
- * TOK_LB binary pn_left: MEMBER expr to left of [
169
- * pn_right: expr between [ and ]
170
- * TOK_LP list pn_head: list of call, arg1, arg2, ... argN
171
- * pn_count: 1 + N (where N is number of args)
172
- * call is a MEMBER expr naming a callable object
173
- * TOK_RB list pn_head: list of pn_count array element exprs
174
- * [,,] holes are represented by TOK_COMMA nodes
175
- * #n=[...] produces TOK_DEFSHARP at head of list
176
- * pn_extra: PN_ENDCOMMA if extra comma at end
177
- * TOK_RC list pn_head: list of pn_count TOK_COLON nodes where
178
- * each has pn_left: property id, pn_right: value
179
- * #n={...} produces TOK_DEFSHARP at head of list
180
- * var {x} = object destructuring shorthand shares
181
- * PN_NAME node for x on left and right of TOK_COLON
182
- * node in TOK_RC's list, has PNX_SHORTHAND flag
183
- * TOK_DEFSHARP unary pn_num: jsint value of n in #n=
184
- * pn_kid: null for #n=[...] and #n={...}, primary
185
- * if #n=primary for function, paren, name, object
186
- * literal expressions
187
- * TOK_USESHARP nullary pn_num: jsint value of n in #n#
188
- * TOK_RP unary pn_kid: parenthesized expression
189
- * TOK_NAME, name pn_atom: name, string, or object atom
190
- * TOK_STRING, pn_op: JSOP_NAME, JSOP_STRING, or JSOP_OBJECT, or
191
- * JSOP_REGEXP
192
- * TOK_REGEXP If JSOP_NAME, pn_op may be JSOP_*ARG or JSOP_*VAR
193
- * with pn_slot >= 0 and pn_const telling const-ness
194
- * TOK_NUMBER dval pn_dval: double value of numeric literal
195
- * TOK_PRIMARY nullary pn_op: JSOp bytecode
196
- *
197
- * <E4X node descriptions>
198
- * TOK_ANYNAME nullary pn_op: JSOP_ANYNAME
199
- * pn_atom: cx->runtime->atomState.starAtom
200
- * TOK_AT unary pn_op: JSOP_TOATTRNAME; pn_kid attribute id/expr
201
- * TOK_DBLCOLON binary pn_op: JSOP_QNAME
202
- * pn_left: TOK_ANYNAME or TOK_NAME node
203
- * pn_right: TOK_STRING "*" node, or expr within []
204
- * name pn_op: JSOP_QNAMECONST
205
- * pn_expr: TOK_ANYNAME or TOK_NAME left operand
206
- * pn_atom: name on right of ::
207
- * TOK_XMLELEM list XML element node
208
- * pn_head: start tag, content1, ... contentN, end tag
209
- * pn_count: 2 + N where N is number of content nodes
210
- * N may be > x.length() if {expr} embedded
211
- * TOK_XMLLIST list XML list node
212
- * pn_head: content1, ... contentN
213
- * TOK_XMLSTAGO, list XML start, end, and point tag contents
214
- * TOK_XMLETAGC, pn_head: tag name or {expr}, ... XML attrs ...
215
- * TOK_XMLPTAGO
216
- * TOK_XMLNAME nullary pn_atom: XML name, with no {expr} embedded
217
- * TOK_XMLNAME list pn_head: tag name or {expr}, ... name or {expr}
218
- * TOK_XMLATTR, nullary pn_atom: attribute value string; pn_op: JSOP_STRING
219
- * TOK_XMLCDATA,
220
- * TOK_XMLCOMMENT
221
- * TOK_XMLPI nullary pn_atom: XML processing instruction target
222
- * pn_atom2: XML PI content, or null if no content
223
- * TOK_XMLTEXT nullary pn_atom: marked-up text, or null if empty string
224
- * TOK_LC unary {expr} in XML tag or content; pn_kid is expr
225
- *
226
- * So an XML tag with no {expr} and three attributes is a list with the form:
227
- *
228
- * (tagname attrname1 attrvalue1 attrname2 attrvalue2 attrname2 attrvalue3)
229
- *
230
- * An XML tag with embedded expressions like so:
231
- *
232
- * <name1{expr1} name2{expr2}name3={expr3}>
233
- *
234
- * would have the form:
235
- *
236
- * ((name1 {expr1}) (name2 {expr2} name3) {expr3})
237
- *
238
- * where () bracket a list with elements separated by spaces, and {expr} is a
239
- * TOK_LC unary node with expr as its kid.
240
- *
241
- * Thus, the attribute name/value pairs occupy successive odd and even list
242
- * locations, where pn_head is the TOK_XMLNAME node at list location 0. The
243
- * parser builds the same sort of structures for elements:
244
- *
245
- * <a x={x}>Hi there!<b y={y}>How are you?</b><answer>{x + y}</answer></a>
246
- *
247
- * translates to:
248
- *
249
- * ((a x {x}) 'Hi there!' ((b y {y}) 'How are you?') ((answer) {x + y}))
250
- *
251
- * <Non-E4X node descriptions, continued>
252
- *
253
- * Label Variant Members
254
- * ----- ------- -------
255
- * TOK_LEXICALSCOPE name pn_op: JSOP_LEAVEBLOCK or JSOP_LEAVEBLOCKEXPR
256
- * pn_pob: block object
257
- * pn_expr: block body
258
- * TOK_ARRAYCOMP list pn_head: list of pn_count (1 or 2) elements
259
- * if pn_count is 2, first element is #n=[...]
260
- * last element is block enclosing for loop(s)
261
- * and optionally if-guarded TOK_ARRAYPUSH
262
- * pn_extra: stack slot, used during code gen
263
- * TOK_ARRAYPUSH unary pn_op: JSOP_ARRAYCOMP
264
- * pn_kid: array comprehension expression
265
- */
266
- typedef enum JSParseNodeArity {
267
- PN_FUNC = -3,
268
- PN_LIST = -2,
269
- PN_TERNARY = 3,
270
- PN_BINARY = 2,
271
- PN_UNARY = 1,
272
- PN_NAME = -1,
273
- PN_NULLARY = 0
274
- } JSParseNodeArity;
275
-
276
- struct JSParseNode {
277
- uint16 pn_type;
278
- uint8 pn_op;
279
- int8 pn_arity;
280
- JSTokenPos pn_pos;
281
- ptrdiff_t pn_offset; /* first generated bytecode offset */
282
- union {
283
- struct { /* TOK_FUNCTION node */
284
- JSParsedObjectBox *funpob; /* function object */
285
- JSParseNode *body; /* TOK_LC list of statements */
286
- uint16 flags; /* accumulated tree context flags */
287
- uint16 sclen; /* maximum scope chain length */
288
- uint32 index; /* emitter's index */
289
- } func;
290
- struct { /* list of next-linked nodes */
291
- JSParseNode *head; /* first node in list */
292
- JSParseNode **tail; /* ptr to ptr to last node in list */
293
- uint32 count; /* number of nodes in list */
294
- uint32 extra; /* extra flags, see below */
295
- } list;
296
- struct { /* ternary: if, for(;;), ?: */
297
- JSParseNode *kid1; /* condition, discriminant, etc. */
298
- JSParseNode *kid2; /* then-part, case list, etc. */
299
- JSParseNode *kid3; /* else-part, default case, etc. */
300
- } ternary;
301
- struct { /* two kids if binary */
302
- JSParseNode *left;
303
- JSParseNode *right;
304
- jsval val; /* switch case value */
305
- } binary;
306
- struct { /* one kid if unary */
307
- JSParseNode *kid;
308
- jsint num; /* -1 or sharp variable number */
309
- JSBool hidden; /* hidden genexp-induced JSOP_YIELD */
310
- } unary;
311
- struct { /* name, labeled statement, etc. */
312
- JSAtom *atom; /* name or label atom, null if slot */
313
- JSParseNode *expr; /* object or initializer */
314
- jsint slot; /* -1 or arg or local var slot */
315
- JSBool isconst; /* true for const names */
316
- } name;
317
- struct { /* lexical scope. */
318
- JSParsedObjectBox *pob; /* block object */
319
- JSParseNode *expr; /* object or initializer */
320
- jsint slot; /* -1 or arg or local var slot */
321
- } lexical;
322
- struct {
323
- JSAtom *atom; /* first atom in pair */
324
- JSAtom *atom2; /* second atom in pair or null */
325
- } apair;
326
- struct { /* object literal */
327
- JSParsedObjectBox *pob;
328
- } object;
329
- jsdouble dval; /* aligned numeric literal value */
330
- } pn_u;
331
- JSParseNode *pn_next; /* to align dval and pn_u on RISCs */
332
- };
333
-
334
- #define pn_funpob pn_u.func.funpob
335
- #define pn_body pn_u.func.body
336
- #define pn_flags pn_u.func.flags
337
- #define pn_sclen pn_u.func.sclen
338
- #define pn_index pn_u.func.index
339
- #define pn_head pn_u.list.head
340
- #define pn_tail pn_u.list.tail
341
- #define pn_count pn_u.list.count
342
- #define pn_extra pn_u.list.extra
343
- #define pn_kid1 pn_u.ternary.kid1
344
- #define pn_kid2 pn_u.ternary.kid2
345
- #define pn_kid3 pn_u.ternary.kid3
346
- #define pn_left pn_u.binary.left
347
- #define pn_right pn_u.binary.right
348
- #define pn_val pn_u.binary.val
349
- #define pn_kid pn_u.unary.kid
350
- #define pn_num pn_u.unary.num
351
- #define pn_hidden pn_u.unary.hidden
352
- #define pn_atom pn_u.name.atom
353
- #define pn_expr pn_u.name.expr
354
- #define pn_slot pn_u.name.slot
355
- #define pn_const pn_u.name.isconst
356
- #define pn_dval pn_u.dval
357
- #define pn_atom2 pn_u.apair.atom2
358
- #define pn_pob pn_u.object.pob
359
-
360
- /* PN_LIST pn_extra flags. */
361
- #define PNX_STRCAT 0x01 /* TOK_PLUS list has string term */
362
- #define PNX_CANTFOLD 0x02 /* TOK_PLUS list has unfoldable term */
363
- #define PNX_POPVAR 0x04 /* TOK_VAR last result needs popping */
364
- #define PNX_FORINVAR 0x08 /* TOK_VAR is left kid of TOK_IN node,
365
- which is left kid of TOK_FOR */
366
- #define PNX_ENDCOMMA 0x10 /* array literal has comma at end */
367
- #define PNX_XMLROOT 0x20 /* top-most node in XML literal tree */
368
- #define PNX_GROUPINIT 0x40 /* var [a, b] = [c, d]; unit list */
369
- #define PNX_NEEDBRACES 0x80 /* braces necessary due to closure */
370
- #define PNX_FUNCDEFS 0x100 /* contains top-level function
371
- statements */
372
- #define PNX_SHORTHAND 0x200 /* shorthand syntax used, at present
373
- object destructuring ({x,y}) only */
374
-
375
- /*
376
- * Move pn2 into pn, preserving pn->pn_pos and pn->pn_offset and handing off
377
- * any kids in pn2->pn_u, by clearing pn2.
378
- */
379
- #define PN_MOVE_NODE(pn, pn2) \
380
- JS_BEGIN_MACRO \
381
- (pn)->pn_type = (pn2)->pn_type; \
382
- (pn)->pn_op = (pn2)->pn_op; \
383
- (pn)->pn_arity = (pn2)->pn_arity; \
384
- (pn)->pn_u = (pn2)->pn_u; \
385
- PN_CLEAR_NODE(pn2); \
386
- JS_END_MACRO
387
-
388
- #define PN_CLEAR_NODE(pn) \
389
- JS_BEGIN_MACRO \
390
- (pn)->pn_type = TOK_EOF; \
391
- (pn)->pn_op = JSOP_NOP; \
392
- (pn)->pn_arity = PN_NULLARY; \
393
- JS_END_MACRO
394
-
395
- /* True if pn is a parsenode representing a literal constant. */
396
- #define PN_IS_CONSTANT(pn) \
397
- ((pn)->pn_type == TOK_NUMBER || \
398
- (pn)->pn_type == TOK_STRING || \
399
- ((pn)->pn_type == TOK_PRIMARY && (pn)->pn_op != JSOP_THIS))
400
-
401
- #define PN_OP(pn) ((JSOp)(pn)->pn_op)
402
- #define PN_TYPE(pn) ((JSTokenType)(pn)->pn_type)
403
-
404
- /*
405
- * Compute a pointer to the last JSParseNode element in a singly-linked list.
406
- * NB: list must be non-empty for correct PN_LAST usage!
407
- */
408
- #define PN_LAST(list) \
409
- ((JSParseNode *)((char *)(list)->pn_tail - offsetof(JSParseNode, pn_next)))
410
-
411
- #define PN_INIT_LIST(list) \
412
- JS_BEGIN_MACRO \
413
- (list)->pn_head = NULL; \
414
- (list)->pn_tail = &(list)->pn_head; \
415
- (list)->pn_count = (list)->pn_extra = 0; \
416
- JS_END_MACRO
417
-
418
- #define PN_INIT_LIST_1(list, pn) \
419
- JS_BEGIN_MACRO \
420
- (list)->pn_head = (pn); \
421
- (list)->pn_tail = &(pn)->pn_next; \
422
- (list)->pn_count = 1; \
423
- (list)->pn_extra = 0; \
424
- JS_END_MACRO
425
-
426
- #define PN_APPEND(list, pn) \
427
- JS_BEGIN_MACRO \
428
- *(list)->pn_tail = (pn); \
429
- (list)->pn_tail = &(pn)->pn_next; \
430
- (list)->pn_count++; \
431
- JS_END_MACRO
432
-
433
- struct JSParsedObjectBox {
434
- JSParsedObjectBox *traceLink;
435
- JSParsedObjectBox *emitLink;
436
- JSObject *object;
437
- };
438
-
439
- struct JSParseContext {
440
- JSTokenStream tokenStream;
441
- void *tempPoolMark; /* initial JSContext.tempPool mark */
442
- JSPrincipals *principals; /* principals associated with source */
443
- JSParseNode *nodeList; /* list of recyclable parse-node
444
- structs */
445
- JSParsedObjectBox *traceListHead; /* list of parsed object for GC
446
- tracing */
447
- JSTempValueRooter tempRoot; /* root to trace traceListHead */
448
- };
449
-
450
- /*
451
- * Convenience macro to access JSParseContext.tokenStream as a pointer.
452
- */
453
- #define TS(pc) (&(pc)->tokenStream)
454
-
455
- /*
456
- * Parse a top-level JS script.
457
- */
458
- extern JSParseNode *
459
- js_ParseScript(JSContext *cx, JSObject *chain, JSParseContext *pc);
460
-
461
- extern JSScript *
462
- js_CompileScript(JSContext *cx, JSObject *obj, JSPrincipals *principals,
463
- uint32 tcflags, const jschar *chars, size_t length,
464
- FILE *file, const char *filename, uintN lineno);
465
-
466
- extern JSBool
467
- js_CompileFunctionBody(JSContext *cx, JSFunction *fun, JSPrincipals *principals,
468
- const jschar *chars, size_t length,
469
- const char *filename, uintN lineno);
470
-
471
- extern JSBool
472
- js_FoldConstants(JSContext *cx, JSParseNode *pn, JSTreeContext *tc);
473
-
474
- #if JS_HAS_XML_SUPPORT
475
- JS_FRIEND_API(JSParseNode *)
476
- js_ParseXMLText(JSContext *cx, JSObject *chain, JSParseContext *pc,
477
- JSBool allowList);
478
- #endif
479
-
480
- /*
481
- * Initialize a parse context. All parameters after pc are passed to
482
- * js_InitTokenStream.
483
- *
484
- * The parse context owns the arena pool "tops-of-stack" space above the
485
- * current JSContext.tempPool mark. This means you cannot allocate from
486
- * tempPool and save the pointer beyond the next js_FinishParseContext.
487
- */
488
- extern JSBool
489
- js_InitParseContext(JSContext *cx, JSParseContext *pc, JSPrincipals *principals,
490
- const jschar *base, size_t length, FILE *fp,
491
- const char *filename, uintN lineno);
492
-
493
- extern void
494
- js_FinishParseContext(JSContext *cx, JSParseContext *pc);
495
-
496
- extern void
497
- js_InitCompilePrincipals(JSContext *cx, JSParseContext *pc,
498
- JSPrincipals *principals);
499
-
500
- /*
501
- * Allocate a new parseed object node from cx->tempPool.
502
- */
503
- extern JSParsedObjectBox *
504
- js_NewParsedObjectBox(JSContext *cx, JSParseContext *pc, JSObject *obj);
505
-
506
- extern void
507
- js_TraceParseContext(JSTracer *trc, JSParseContext *pc);
508
-
509
- JS_END_EXTERN_C
510
-
511
- #endif /* jsparse_h___ */