coffeecake 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1336) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +4 -0
  3. data/README.markdown +28 -0
  4. data/Rakefile +2 -0
  5. data/bin/ck +16 -0
  6. data/coffeecake.gemspec +21 -0
  7. data/lib/coffeecake.rb +4 -0
  8. data/lib/coffeecake/generators.rb +12 -0
  9. data/lib/coffeecake/generators/new_generator.rb +55 -0
  10. data/lib/coffeecake/templates/.gitkeep +0 -0
  11. data/lib/coffeecake/templates/README.markdown +56 -0
  12. data/lib/coffeecake/templates/SpecHelper.tt +0 -0
  13. data/lib/coffeecake/templates/docs_readme +5 -0
  14. data/lib/coffeecake/templates/jasmine.tt +18 -0
  15. data/lib/coffeecake/templates/lib.tt +3 -0
  16. data/lib/coffeecake/templates/spec.tt +3 -0
  17. data/lib/coffeecake/version.rb +3 -0
  18. data/lib/thor_register_patch.rb +16 -0
  19. data/node_modules/.bin/cake +7 -0
  20. data/node_modules/.bin/coffee +7 -0
  21. data/node_modules/.bin/docco +8 -0
  22. data/node_modules/.bin/jasmine +26 -0
  23. data/node_modules/.bin/jasmine-node +7 -0
  24. data/node_modules/.bin/uglifycss +127 -0
  25. data/node_modules/.bin/uglifyjs +317 -0
  26. data/node_modules/coffee-script/.npmignore +11 -0
  27. data/node_modules/coffee-script/LICENSE +22 -0
  28. data/node_modules/coffee-script/README +51 -0
  29. data/node_modules/coffee-script/Rakefile +78 -0
  30. data/node_modules/coffee-script/bin/cake +7 -0
  31. data/node_modules/coffee-script/bin/coffee +7 -0
  32. data/node_modules/coffee-script/extras/jsl.conf +44 -0
  33. data/node_modules/coffee-script/lib/coffee-script/browser.js +74 -0
  34. data/node_modules/coffee-script/lib/coffee-script/cake.js +89 -0
  35. data/node_modules/coffee-script/lib/coffee-script/coffee-script.js +148 -0
  36. data/node_modules/coffee-script/lib/coffee-script/command.js +310 -0
  37. data/node_modules/coffee-script/lib/coffee-script/grammar.js +588 -0
  38. data/node_modules/coffee-script/lib/coffee-script/helpers.js +72 -0
  39. data/node_modules/coffee-script/lib/coffee-script/index.js +10 -0
  40. data/node_modules/coffee-script/lib/coffee-script/lexer.js +687 -0
  41. data/node_modules/coffee-script/lib/coffee-script/nodes.js +2481 -0
  42. data/node_modules/coffee-script/lib/coffee-script/optparse.js +122 -0
  43. data/node_modules/coffee-script/lib/coffee-script/parser.js +670 -0
  44. data/node_modules/coffee-script/lib/coffee-script/repl.js +149 -0
  45. data/node_modules/coffee-script/lib/coffee-script/rewriter.js +288 -0
  46. data/node_modules/coffee-script/lib/coffee-script/scope.js +124 -0
  47. data/node_modules/coffee-script/npm-install-45965.sh +282 -0
  48. data/node_modules/coffee-script/package.json +31 -0
  49. data/node_modules/docco/.gitignore +3 -0
  50. data/node_modules/docco/Cakefile +27 -0
  51. data/node_modules/docco/README +13 -0
  52. data/node_modules/docco/bin/docco +8 -0
  53. data/node_modules/docco/index.html +143 -0
  54. data/node_modules/docco/lib/docco.js +155 -0
  55. data/node_modules/docco/package.json +21 -0
  56. data/node_modules/docco/resources/docco.css +186 -0
  57. data/node_modules/docco/resources/docco.jst +58 -0
  58. data/node_modules/docco/src/docco.coffee +204 -0
  59. data/node_modules/docco/vendor/showdown.js +1298 -0
  60. data/node_modules/jasmine-jquery/.gitignore +3 -0
  61. data/node_modules/jasmine-jquery/MIT.LICENSE +20 -0
  62. data/node_modules/jasmine-jquery/README.markdown +174 -0
  63. data/node_modules/jasmine-jquery/SpecRunner.html +24 -0
  64. data/node_modules/jasmine-jquery/index.js +15 -0
  65. data/node_modules/jasmine-jquery/lib/jasmine-jquery.js +288 -0
  66. data/node_modules/jasmine-jquery/package.json +19 -0
  67. data/node_modules/jasmine-jquery/spec/fixtures/real_non_mocked_fixture.html +1 -0
  68. data/node_modules/jasmine-jquery/spec/suites/jasmine-jquery-spec.js +691 -0
  69. data/node_modules/jasmine-node/.gitignore +10 -0
  70. data/node_modules/jasmine-node/LICENSE +22 -0
  71. data/node_modules/jasmine-node/README.md +35 -0
  72. data/node_modules/jasmine-node/bin/jasmine-node +7 -0
  73. data/node_modules/jasmine-node/lib/jasmine-node/cli.js +110 -0
  74. data/node_modules/jasmine-node/lib/jasmine-node/index.js +171 -0
  75. data/node_modules/jasmine-node/lib/jasmine-node/jasmine-2.0.0.rc1.js +2479 -0
  76. data/node_modules/jasmine-node/lib/jasmine-node/reporter.js +177 -0
  77. data/node_modules/jasmine-node/package.json +22 -0
  78. data/node_modules/jasmine-node/spec/CoffeeSpec.coffee +4 -0
  79. data/node_modules/jasmine-node/spec/SampleSpecs.js +15 -0
  80. data/node_modules/jasmine-node/spec/TestSpec.js +5 -0
  81. data/node_modules/jasmine-node/spec/helper_spec.js +7 -0
  82. data/node_modules/jasmine-node/spec/include/include_spec.js +7 -0
  83. data/node_modules/jasmine-node/spec/include/lib/test.js +3 -0
  84. data/node_modules/jasmine-node/spec/nested.js/NestedSpec.js +5 -0
  85. data/node_modules/jasmine-node/spec/nested/NestedSpec.js +5 -0
  86. data/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js +11 -0
  87. data/node_modules/jasmine-node/spec/sample_helper.js +19 -0
  88. data/node_modules/jasmine-node/specs.sh +2 -0
  89. data/node_modules/jasmine-reporters/.gitignore +1 -0
  90. data/node_modules/jasmine-reporters/.gitmodules +3 -0
  91. data/node_modules/jasmine-reporters/LICENSE +21 -0
  92. data/node_modules/jasmine-reporters/README.markdown +52 -0
  93. data/node_modules/jasmine-reporters/ext/env.rhino.1.2.js +13989 -0
  94. data/node_modules/jasmine-reporters/ext/jasmine-html.js +182 -0
  95. data/node_modules/jasmine-reporters/ext/jasmine.css +166 -0
  96. data/node_modules/jasmine-reporters/ext/jasmine.js +2421 -0
  97. data/node_modules/jasmine-reporters/ext/jline.jar +0 -0
  98. data/node_modules/jasmine-reporters/ext/js.jar +0 -0
  99. data/node_modules/jasmine-reporters/ext/phantomjs/.gitignore +10 -0
  100. data/node_modules/jasmine-reporters/ext/phantomjs/ChangeLog +57 -0
  101. data/node_modules/jasmine-reporters/ext/phantomjs/LICENSE.BSD +22 -0
  102. data/node_modules/jasmine-reporters/ext/phantomjs/README.md +28 -0
  103. data/node_modules/jasmine-reporters/ext/phantomjs/examples/arguments.coffee +6 -0
  104. data/node_modules/jasmine-reporters/ext/phantomjs/examples/arguments.js +8 -0
  105. data/node_modules/jasmine-reporters/ext/phantomjs/examples/colorwheel.coffee +45 -0
  106. data/node_modules/jasmine-reporters/ext/phantomjs/examples/colorwheel.js +52 -0
  107. data/node_modules/jasmine-reporters/ext/phantomjs/examples/countdown.coffee +8 -0
  108. data/node_modules/jasmine-reporters/ext/phantomjs/examples/countdown.js +8 -0
  109. data/node_modules/jasmine-reporters/ext/phantomjs/examples/cycle_multiple_urls.js +64 -0
  110. data/node_modules/jasmine-reporters/ext/phantomjs/examples/direction.coffee +28 -0
  111. data/node_modules/jasmine-reporters/ext/phantomjs/examples/direction.js +34 -0
  112. data/node_modules/jasmine-reporters/ext/phantomjs/examples/extract-text.coffee +81 -0
  113. data/node_modules/jasmine-reporters/ext/phantomjs/examples/extract-text.js +121 -0
  114. data/node_modules/jasmine-reporters/ext/phantomjs/examples/fibo.coffee +8 -0
  115. data/node_modules/jasmine-reporters/ext/phantomjs/examples/fibo.js +9 -0
  116. data/node_modules/jasmine-reporters/ext/phantomjs/examples/follow.coffee +36 -0
  117. data/node_modules/jasmine-reporters/ext/phantomjs/examples/follow.js +37 -0
  118. data/node_modules/jasmine-reporters/ext/phantomjs/examples/hello.coffee +2 -0
  119. data/node_modules/jasmine-reporters/ext/phantomjs/examples/hello.js +2 -0
  120. data/node_modules/jasmine-reporters/ext/phantomjs/examples/ipgeocode.coffee +13 -0
  121. data/node_modules/jasmine-reporters/ext/phantomjs/examples/ipgeocode.js +14 -0
  122. data/node_modules/jasmine-reporters/ext/phantomjs/examples/loadspeed.coffee +17 -0
  123. data/node_modules/jasmine-reporters/ext/phantomjs/examples/loadspeed.js +20 -0
  124. data/node_modules/jasmine-reporters/ext/phantomjs/examples/movies.coffee +13 -0
  125. data/node_modules/jasmine-reporters/ext/phantomjs/examples/movies.js +14 -0
  126. data/node_modules/jasmine-reporters/ext/phantomjs/examples/pizza.coffee +10 -0
  127. data/node_modules/jasmine-reporters/ext/phantomjs/examples/pizza.js +12 -0
  128. data/node_modules/jasmine-reporters/ext/phantomjs/examples/rasterize.coffee +21 -0
  129. data/node_modules/jasmine-reporters/ext/phantomjs/examples/rasterize.js +22 -0
  130. data/node_modules/jasmine-reporters/ext/phantomjs/examples/run-jasmine.js +26 -0
  131. data/node_modules/jasmine-reporters/ext/phantomjs/examples/run-qunit.js +24 -0
  132. data/node_modules/jasmine-reporters/ext/phantomjs/examples/seasonfood.coffee +17 -0
  133. data/node_modules/jasmine-reporters/ext/phantomjs/examples/seasonfood.js +19 -0
  134. data/node_modules/jasmine-reporters/ext/phantomjs/examples/technews.coffee +13 -0
  135. data/node_modules/jasmine-reporters/ext/phantomjs/examples/technews.js +14 -0
  136. data/node_modules/jasmine-reporters/ext/phantomjs/examples/tweets.coffee +8 -0
  137. data/node_modules/jasmine-reporters/ext/phantomjs/examples/tweets.js +12 -0
  138. data/node_modules/jasmine-reporters/ext/phantomjs/examples/useragent.coffee +7 -0
  139. data/node_modules/jasmine-reporters/ext/phantomjs/examples/useragent.js +8 -0
  140. data/node_modules/jasmine-reporters/ext/phantomjs/examples/version.coffee +5 -0
  141. data/node_modules/jasmine-reporters/ext/phantomjs/examples/version.js +5 -0
  142. data/node_modules/jasmine-reporters/ext/phantomjs/examples/waitfor.coffee +40 -0
  143. data/node_modules/jasmine-reporters/ext/phantomjs/examples/waitfor.js +43 -0
  144. data/node_modules/jasmine-reporters/ext/phantomjs/examples/weather.coffee +35 -0
  145. data/node_modules/jasmine-reporters/ext/phantomjs/examples/weather.js +42 -0
  146. data/node_modules/jasmine-reporters/ext/phantomjs/phantomjs.pro +3 -0
  147. data/node_modules/jasmine-reporters/ext/phantomjs/python/INSTALL +20 -0
  148. data/node_modules/jasmine-reporters/ext/phantomjs/python/LICENSE +674 -0
  149. data/node_modules/jasmine-reporters/ext/phantomjs/python/README +56 -0
  150. data/node_modules/jasmine-reporters/ext/phantomjs/python/csconverter.py +41 -0
  151. data/node_modules/jasmine-reporters/ext/phantomjs/python/networkaccessmanager.py +84 -0
  152. data/node_modules/jasmine-reporters/ext/phantomjs/python/phantom.py +384 -0
  153. data/node_modules/jasmine-reporters/ext/phantomjs/python/plugincontroller.py +98 -0
  154. data/node_modules/jasmine-reporters/ext/phantomjs/python/plugins/__init__.py +1 -0
  155. data/node_modules/jasmine-reporters/ext/phantomjs/python/pyphantomjs.py +154 -0
  156. data/node_modules/jasmine-reporters/ext/phantomjs/python/resources.py +4160 -0
  157. data/node_modules/jasmine-reporters/ext/phantomjs/python/resources.qrc +6 -0
  158. data/node_modules/jasmine-reporters/ext/phantomjs/python/resources/coffee-script.js +8 -0
  159. data/node_modules/jasmine-reporters/ext/phantomjs/python/resources/pyphantomjs-icon.ico +0 -0
  160. data/node_modules/jasmine-reporters/ext/phantomjs/python/resources/pyphantomjs-icon.png +0 -0
  161. data/node_modules/jasmine-reporters/ext/phantomjs/python/tools/build_resources.sh +14 -0
  162. data/node_modules/jasmine-reporters/ext/phantomjs/python/tools/setup.py +52 -0
  163. data/node_modules/jasmine-reporters/ext/phantomjs/python/utils.py +126 -0
  164. data/node_modules/jasmine-reporters/ext/phantomjs/python/webpage.py +67 -0
  165. data/node_modules/jasmine-reporters/ext/phantomjs/src/coffee-script.js +8 -0
  166. data/node_modules/jasmine-reporters/ext/phantomjs/src/consts.h +39 -0
  167. data/node_modules/jasmine-reporters/ext/phantomjs/src/csconverter.cpp +61 -0
  168. data/node_modules/jasmine-reporters/ext/phantomjs/src/csconverter.h +47 -0
  169. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/config.h +1 -0
  170. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/egif_lib.c +1111 -0
  171. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/gif.pri +20 -0
  172. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/gif_err.c +120 -0
  173. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/gif_hash.c +160 -0
  174. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/gif_hash.h +59 -0
  175. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/gif_lib.h +336 -0
  176. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/gif_lib_private.h +59 -0
  177. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/gifalloc.c +443 -0
  178. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/gifwriter.cpp +126 -0
  179. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/gifwriter.h +38 -0
  180. data/node_modules/jasmine-reporters/ext/phantomjs/src/gif/quantize.c +330 -0
  181. data/node_modules/jasmine-reporters/ext/phantomjs/src/main.cpp +64 -0
  182. data/node_modules/jasmine-reporters/ext/phantomjs/src/networkaccessmanager.cpp +119 -0
  183. data/node_modules/jasmine-reporters/ext/phantomjs/src/networkaccessmanager.h +53 -0
  184. data/node_modules/jasmine-reporters/ext/phantomjs/src/phantom.cpp +494 -0
  185. data/node_modules/jasmine-reporters/ext/phantomjs/src/phantom.h +117 -0
  186. data/node_modules/jasmine-reporters/ext/phantomjs/src/phantomjs-icon.png +0 -0
  187. data/node_modules/jasmine-reporters/ext/phantomjs/src/phantomjs.pro +32 -0
  188. data/node_modules/jasmine-reporters/ext/phantomjs/src/phantomjs.qrc +7 -0
  189. data/node_modules/jasmine-reporters/ext/phantomjs/src/phantomjs_os2.ico +0 -0
  190. data/node_modules/jasmine-reporters/ext/phantomjs/src/phantomjs_os2.rc +1 -0
  191. data/node_modules/jasmine-reporters/ext/phantomjs/src/phantomjs_win.ico +0 -0
  192. data/node_modules/jasmine-reporters/ext/phantomjs/src/phantomjs_win.rc +1 -0
  193. data/node_modules/jasmine-reporters/ext/phantomjs/src/usage.txt +11 -0
  194. data/node_modules/jasmine-reporters/ext/phantomjs/src/utils.cpp +74 -0
  195. data/node_modules/jasmine-reporters/ext/phantomjs/src/utils.h +50 -0
  196. data/node_modules/jasmine-reporters/ext/phantomjs/src/webpage.cpp +87 -0
  197. data/node_modules/jasmine-reporters/ext/phantomjs/src/webpage.h +61 -0
  198. data/node_modules/jasmine-reporters/package.json +15 -0
  199. data/node_modules/jasmine-reporters/src/jasmine.console_reporter.js +132 -0
  200. data/node_modules/jasmine-reporters/src/jasmine.junit_reporter.js +199 -0
  201. data/node_modules/jasmine-reporters/src/load_reporters.js +2 -0
  202. data/node_modules/jasmine-reporters/test/JUnitXmlReporterSpec.js +214 -0
  203. data/node_modules/jasmine-reporters/test/console_reporter.html +36 -0
  204. data/node_modules/jasmine-reporters/test/envjs.bootstrap.js +14 -0
  205. data/node_modules/jasmine-reporters/test/envjs.runner.sh +7 -0
  206. data/node_modules/jasmine-reporters/test/junit_xml_reporter.html +23 -0
  207. data/node_modules/jasmine-reporters/test/phantomjs-testrunner.js +39 -0
  208. data/node_modules/jasmine-reporters/test/phantomjs.runner.sh +30 -0
  209. data/node_modules/jasmine-reporters/test/pyphantomjs-plugins/saveToFile/__init__.py +1 -0
  210. data/node_modules/jasmine-reporters/test/pyphantomjs-plugins/saveToFile/saveToFile.py +46 -0
  211. data/node_modules/jasmine-runner/README.md +42 -0
  212. data/node_modules/jasmine-runner/TODO.md +16 -0
  213. data/node_modules/jasmine-runner/bin/jasmine +26 -0
  214. data/node_modules/jasmine-runner/lib/ServerRoutes.js +70 -0
  215. data/node_modules/jasmine-runner/lib/TestRunner.js +29 -0
  216. data/node_modules/jasmine-runner/lib/browser.js +14 -0
  217. data/node_modules/jasmine-runner/lib/config.js +21 -0
  218. data/node_modules/jasmine-runner/lib/jasmine-runner.js +83 -0
  219. data/node_modules/jasmine-runner/lib/monitor.js +34 -0
  220. data/node_modules/jasmine-runner/lib/notify.js +48 -0
  221. data/node_modules/jasmine-runner/lib/public/control-frame.js +57 -0
  222. data/node_modules/jasmine-runner/lib/public/jasmine-html.js +188 -0
  223. data/node_modules/jasmine-runner/lib/public/jasmine.css +166 -0
  224. data/node_modules/jasmine-runner/lib/public/jasmine.js +2421 -0
  225. data/node_modules/jasmine-runner/lib/public/jquery-1.4.3.js +166 -0
  226. data/node_modules/jasmine-runner/lib/public/json2.js +482 -0
  227. data/node_modules/jasmine-runner/lib/public/run.js +6 -0
  228. data/node_modules/jasmine-runner/lib/reporters.js +31 -0
  229. data/node_modules/jasmine-runner/lib/server-worker.js +18 -0
  230. data/node_modules/jasmine-runner/lib/server.js +27 -0
  231. data/node_modules/jasmine-runner/lib/template/jasmine.json +18 -0
  232. data/node_modules/jasmine-runner/lib/template/public/javascript/Player.js +22 -0
  233. data/node_modules/jasmine-runner/lib/template/public/javascript/Song.js +7 -0
  234. data/node_modules/jasmine-runner/lib/template/spec/PlayerSpec.coffee +45 -0
  235. data/node_modules/jasmine-runner/lib/template/spec/PlayerSpec.js +58 -0
  236. data/node_modules/jasmine-runner/lib/template/spec/SpecHelper.js +9 -0
  237. data/node_modules/jasmine-runner/lib/testserver.js +26 -0
  238. data/node_modules/jasmine-runner/lib/views/control-frame.jade +7 -0
  239. data/node_modules/jasmine-runner/lib/views/index.jade +18 -0
  240. data/node_modules/jasmine-runner/node_modules/.bin/cake +7 -0
  241. data/node_modules/jasmine-runner/node_modules/.bin/coffee +7 -0
  242. data/node_modules/jasmine-runner/node_modules/.bin/express +451 -0
  243. data/node_modules/jasmine-runner/node_modules/.bin/jade +92 -0
  244. data/node_modules/jasmine-runner/node_modules/.bin/vows +421 -0
  245. data/node_modules/jasmine-runner/node_modules/coffee-script/.npmignore +11 -0
  246. data/node_modules/jasmine-runner/node_modules/coffee-script/LICENSE +22 -0
  247. data/node_modules/jasmine-runner/node_modules/coffee-script/README +47 -0
  248. data/node_modules/jasmine-runner/node_modules/coffee-script/Rakefile +78 -0
  249. data/node_modules/jasmine-runner/node_modules/coffee-script/bin/cake +7 -0
  250. data/node_modules/jasmine-runner/node_modules/coffee-script/bin/coffee +7 -0
  251. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/browser.js +52 -0
  252. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/cake.js +76 -0
  253. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/coffee-script.js +82 -0
  254. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/command.js +269 -0
  255. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/grammar.js +586 -0
  256. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/helpers.js +66 -0
  257. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/index.js +8 -0
  258. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/lexer.js +638 -0
  259. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/nodes.js +2181 -0
  260. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/optparse.js +111 -0
  261. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/parser.js +656 -0
  262. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/repl.js +47 -0
  263. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/rewriter.js +353 -0
  264. data/node_modules/jasmine-runner/node_modules/coffee-script/lib/scope.js +120 -0
  265. data/node_modules/jasmine-runner/node_modules/coffee-script/package.json +22 -0
  266. data/node_modules/jasmine-runner/node_modules/colors/MIT-LICENSE.txt +20 -0
  267. data/node_modules/jasmine-runner/node_modules/colors/ReadMe.md +30 -0
  268. data/node_modules/jasmine-runner/node_modules/colors/colors.js +75 -0
  269. data/node_modules/jasmine-runner/node_modules/colors/example.js +6 -0
  270. data/node_modules/jasmine-runner/node_modules/colors/package.json +14 -0
  271. data/node_modules/jasmine-runner/node_modules/express/.npmignore +7 -0
  272. data/node_modules/jasmine-runner/node_modules/express/History.md +630 -0
  273. data/node_modules/jasmine-runner/node_modules/express/LICENSE +22 -0
  274. data/node_modules/jasmine-runner/node_modules/express/Makefile +39 -0
  275. data/node_modules/jasmine-runner/node_modules/express/Readme.md +102 -0
  276. data/node_modules/jasmine-runner/node_modules/express/bin/express +451 -0
  277. data/node_modules/jasmine-runner/node_modules/express/index.js +2 -0
  278. data/node_modules/jasmine-runner/node_modules/express/lib/express.js +78 -0
  279. data/node_modules/jasmine-runner/node_modules/express/lib/http.js +503 -0
  280. data/node_modules/jasmine-runner/node_modules/express/lib/https.js +52 -0
  281. data/node_modules/jasmine-runner/node_modules/express/lib/request.js +289 -0
  282. data/node_modules/jasmine-runner/node_modules/express/lib/response.js +423 -0
  283. data/node_modules/jasmine-runner/node_modules/express/lib/router/index.js +329 -0
  284. data/node_modules/jasmine-runner/node_modules/express/lib/router/methods.js +70 -0
  285. data/node_modules/jasmine-runner/node_modules/express/lib/router/route.js +71 -0
  286. data/node_modules/jasmine-runner/node_modules/express/lib/utils.js +122 -0
  287. data/node_modules/jasmine-runner/node_modules/express/lib/view.js +413 -0
  288. data/node_modules/jasmine-runner/node_modules/express/lib/view/partial.js +40 -0
  289. data/node_modules/jasmine-runner/node_modules/express/lib/view/view.js +206 -0
  290. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/.npmignore +11 -0
  291. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/LICENSE +24 -0
  292. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/index.js +2 -0
  293. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/cache.js +81 -0
  294. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/connect.js +106 -0
  295. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/http.js +215 -0
  296. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/https.js +47 -0
  297. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/index.js +46 -0
  298. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/basicAuth.js +93 -0
  299. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js +92 -0
  300. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/compiler.js +163 -0
  301. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js +46 -0
  302. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/csrf.js +105 -0
  303. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/directory.js +222 -0
  304. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js +100 -0
  305. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/favicon.js +76 -0
  306. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/limit.js +82 -0
  307. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/logger.js +299 -0
  308. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js +38 -0
  309. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/profiler.js +100 -0
  310. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/query.js +40 -0
  311. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/responseTime.js +34 -0
  312. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/router.js +379 -0
  313. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/session.js +346 -0
  314. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/session/cookie.js +126 -0
  315. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/session/memory.js +131 -0
  316. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/session/session.js +137 -0
  317. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/session/store.js +87 -0
  318. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/static.js +225 -0
  319. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/staticCache.js +175 -0
  320. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/middleware/vhost.js +44 -0
  321. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/patch.js +79 -0
  322. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/directory.html +75 -0
  323. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/error.html +13 -0
  324. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/favicon.ico +0 -0
  325. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page.png +0 -0
  326. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_add.png +0 -0
  327. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png +0 -0
  328. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_code.png +0 -0
  329. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png +0 -0
  330. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_delete.png +0 -0
  331. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_edit.png +0 -0
  332. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_error.png +0 -0
  333. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png +0 -0
  334. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_find.png +0 -0
  335. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_gear.png +0 -0
  336. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_go.png +0 -0
  337. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_green.png +0 -0
  338. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_key.png +0 -0
  339. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png +0 -0
  340. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_link.png +0 -0
  341. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png +0 -0
  342. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png +0 -0
  343. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_red.png +0 -0
  344. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png +0 -0
  345. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_save.png +0 -0
  346. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white.png +0 -0
  347. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png +0 -0
  348. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png +0 -0
  349. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png +0 -0
  350. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png +0 -0
  351. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png +0 -0
  352. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png +0 -0
  353. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png +0 -0
  354. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png +0 -0
  355. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png +0 -0
  356. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png +0 -0
  357. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png +0 -0
  358. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png +0 -0
  359. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png +0 -0
  360. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png +0 -0
  361. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png +0 -0
  362. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png +0 -0
  363. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png +0 -0
  364. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png +0 -0
  365. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png +0 -0
  366. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png +0 -0
  367. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png +0 -0
  368. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png +0 -0
  369. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png +0 -0
  370. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png +0 -0
  371. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png +0 -0
  372. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png +0 -0
  373. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png +0 -0
  374. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png +0 -0
  375. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png +0 -0
  376. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png +0 -0
  377. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png +0 -0
  378. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png +0 -0
  379. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png +0 -0
  380. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png +0 -0
  381. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png +0 -0
  382. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png +0 -0
  383. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png +0 -0
  384. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png +0 -0
  385. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png +0 -0
  386. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png +0 -0
  387. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png +0 -0
  388. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png +0 -0
  389. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png +0 -0
  390. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png +0 -0
  391. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png +0 -0
  392. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png +0 -0
  393. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png +0 -0
  394. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png +0 -0
  395. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png +0 -0
  396. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png +0 -0
  397. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png +0 -0
  398. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png +0 -0
  399. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png +0 -0
  400. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png +0 -0
  401. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png +0 -0
  402. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_word.png +0 -0
  403. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/icons/page_world.png +0 -0
  404. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/public/style.css +141 -0
  405. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/lib/utils.js +451 -0
  406. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/package.json +24 -0
  407. data/node_modules/jasmine-runner/node_modules/express/node_modules/connect/test.js +11 -0
  408. data/node_modules/jasmine-runner/node_modules/express/node_modules/mime/LICENSE +19 -0
  409. data/node_modules/jasmine-runner/node_modules/express/node_modules/mime/README.md +50 -0
  410. data/node_modules/jasmine-runner/node_modules/express/node_modules/mime/mime.js +92 -0
  411. data/node_modules/jasmine-runner/node_modules/express/node_modules/mime/package.json +22 -0
  412. data/node_modules/jasmine-runner/node_modules/express/node_modules/mime/test.js +79 -0
  413. data/node_modules/jasmine-runner/node_modules/express/node_modules/mime/types/mime.types +1479 -0
  414. data/node_modules/jasmine-runner/node_modules/express/node_modules/mime/types/node.types +43 -0
  415. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/.gitignore +1 -0
  416. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/.gitmodules +6 -0
  417. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/History.md +57 -0
  418. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/Makefile +7 -0
  419. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/Readme.md +49 -0
  420. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/benchmark.js +17 -0
  421. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/examples.js +48 -0
  422. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/index.js +2 -0
  423. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/lib/querystring.js +236 -0
  424. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/package.json +16 -0
  425. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/test/parse.test.js +156 -0
  426. data/node_modules/jasmine-runner/node_modules/express/node_modules/qs/test/stringify.test.js +95 -0
  427. data/node_modules/jasmine-runner/node_modules/express/package.json +22 -0
  428. data/node_modules/jasmine-runner/node_modules/growl/History.md +10 -0
  429. data/node_modules/jasmine-runner/node_modules/growl/Readme.md +74 -0
  430. data/node_modules/jasmine-runner/node_modules/growl/lib/growl.js +80 -0
  431. data/node_modules/jasmine-runner/node_modules/growl/package.json +6 -0
  432. data/node_modules/jasmine-runner/node_modules/growl/seed.yml +4 -0
  433. data/node_modules/jasmine-runner/node_modules/growl/test.js +17 -0
  434. data/node_modules/jasmine-runner/node_modules/jade/.gitignore +3 -0
  435. data/node_modules/jasmine-runner/node_modules/jade/.gitmodules +21 -0
  436. data/node_modules/jasmine-runner/node_modules/jade/.npmignore +4 -0
  437. data/node_modules/jasmine-runner/node_modules/jade/CNAME +1 -0
  438. data/node_modules/jasmine-runner/node_modules/jade/History.md +163 -0
  439. data/node_modules/jasmine-runner/node_modules/jade/LICENSE +22 -0
  440. data/node_modules/jasmine-runner/node_modules/jade/Makefile +25 -0
  441. data/node_modules/jasmine-runner/node_modules/jade/Readme.md +408 -0
  442. data/node_modules/jasmine-runner/node_modules/jade/api.html +850 -0
  443. data/node_modules/jasmine-runner/node_modules/jade/bin/jade +92 -0
  444. data/node_modules/jasmine-runner/node_modules/jade/index.js +2 -0
  445. data/node_modules/jasmine-runner/node_modules/jade/lib/compiler.js +273 -0
  446. data/node_modules/jasmine-runner/node_modules/jade/lib/doctypes.js +18 -0
  447. data/node_modules/jasmine-runner/node_modules/jade/lib/filters.js +70 -0
  448. data/node_modules/jasmine-runner/node_modules/jade/lib/index.js +314 -0
  449. data/node_modules/jasmine-runner/node_modules/jade/lib/jade.js +314 -0
  450. data/node_modules/jasmine-runner/node_modules/jade/lib/lexer.js +359 -0
  451. data/node_modules/jasmine-runner/node_modules/jade/lib/nodes/block.js +29 -0
  452. data/node_modules/jasmine-runner/node_modules/jade/lib/nodes/code.js +35 -0
  453. data/node_modules/jasmine-runner/node_modules/jade/lib/nodes/comment.js +32 -0
  454. data/node_modules/jasmine-runner/node_modules/jade/lib/nodes/doctype.js +29 -0
  455. data/node_modules/jasmine-runner/node_modules/jade/lib/nodes/each.js +35 -0
  456. data/node_modules/jasmine-runner/node_modules/jade/lib/nodes/filter.js +33 -0
  457. data/node_modules/jasmine-runner/node_modules/jade/lib/nodes/index.js +16 -0
  458. data/node_modules/jasmine-runner/node_modules/jade/lib/nodes/node.js +20 -0
  459. data/node_modules/jasmine-runner/node_modules/jade/lib/nodes/tag.js +80 -0
  460. data/node_modules/jasmine-runner/node_modules/jade/lib/nodes/text.js +29 -0
  461. data/node_modules/jasmine-runner/node_modules/jade/lib/parser.js +358 -0
  462. data/node_modules/jasmine-runner/node_modules/jade/lib/self-closing.js +17 -0
  463. data/node_modules/jasmine-runner/node_modules/jade/lib/utils.js +49 -0
  464. data/node_modules/jasmine-runner/node_modules/jade/package.json +9 -0
  465. data/node_modules/jasmine-runner/node_modules/libnotify/.gitignore +2 -0
  466. data/node_modules/jasmine-runner/node_modules/libnotify/README.md +59 -0
  467. data/node_modules/jasmine-runner/node_modules/libnotify/lib/libnotify.js +72 -0
  468. data/node_modules/jasmine-runner/node_modules/libnotify/package.json +11 -0
  469. data/node_modules/jasmine-runner/node_modules/libnotify/seed.yml +5 -0
  470. data/node_modules/jasmine-runner/node_modules/libnotify/test.js +5 -0
  471. data/node_modules/jasmine-runner/node_modules/socket.io/.gitignore +8 -0
  472. data/node_modules/jasmine-runner/node_modules/socket.io/Makefile +10 -0
  473. data/node_modules/jasmine-runner/node_modules/socket.io/README.md +218 -0
  474. data/node_modules/jasmine-runner/node_modules/socket.io/example/chat.html +61 -0
  475. data/node_modules/jasmine-runner/node_modules/socket.io/example/json.js +18 -0
  476. data/node_modules/jasmine-runner/node_modules/socket.io/example/server.js +58 -0
  477. data/node_modules/jasmine-runner/node_modules/socket.io/index.js +1 -0
  478. data/node_modules/jasmine-runner/node_modules/socket.io/lib/socket.io/client.js +191 -0
  479. data/node_modules/jasmine-runner/node_modules/socket.io/lib/socket.io/index.js +4 -0
  480. data/node_modules/jasmine-runner/node_modules/socket.io/lib/socket.io/listener.js +166 -0
  481. data/node_modules/jasmine-runner/node_modules/socket.io/lib/socket.io/transports/flashsocket.js +44 -0
  482. data/node_modules/jasmine-runner/node_modules/socket.io/lib/socket.io/transports/htmlfile.js +45 -0
  483. data/node_modules/jasmine-runner/node_modules/socket.io/lib/socket.io/transports/jsonp-polling.js +32 -0
  484. data/node_modules/jasmine-runner/node_modules/socket.io/lib/socket.io/transports/websocket.js +137 -0
  485. data/node_modules/jasmine-runner/node_modules/socket.io/lib/socket.io/transports/xhr-multipart.js +63 -0
  486. data/node_modules/jasmine-runner/node_modules/socket.io/lib/socket.io/transports/xhr-polling.js +75 -0
  487. data/node_modules/jasmine-runner/node_modules/socket.io/lib/socket.io/utils.js +52 -0
  488. data/node_modules/jasmine-runner/node_modules/socket.io/package.json +17 -0
  489. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/.gitignore +3 -0
  490. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/.gitmodules +3 -0
  491. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/History.md +97 -0
  492. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/Makefile +53 -0
  493. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/Readme.md +39 -0
  494. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/bin/expresso +837 -0
  495. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/COPYING +339 -0
  496. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/Makefile.am +81 -0
  497. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/Makefile.in +884 -0
  498. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/Readme.md +8 -0
  499. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/aclocal.m4 +872 -0
  500. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/config.guess +1526 -0
  501. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/config.h.in +92 -0
  502. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/config.rpath +666 -0
  503. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/config.sub +1658 -0
  504. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/configure +7971 -0
  505. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/configure.ac +88 -0
  506. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/depcomp +589 -0
  507. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/encoding.c +315 -0
  508. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/encoding.h +33 -0
  509. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/generate-resources.c +58 -0
  510. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/global.h +29 -0
  511. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/highlight.c +478 -0
  512. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/highlight.h +37 -0
  513. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/http-connection.c +192 -0
  514. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/http-exchange.c +494 -0
  515. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/http-host.c +95 -0
  516. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/http-message.c +900 -0
  517. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/http-server.c +236 -0
  518. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/http-server.h +208 -0
  519. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/http-url.c +156 -0
  520. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/install-sh +519 -0
  521. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/instrument-js.cpp +1873 -0
  522. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/instrument-js.h +81 -0
  523. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/instrument.c +226 -0
  524. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/instrument.h +31 -0
  525. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/GNUmakefile +15 -0
  526. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/Makefile.ref +483 -0
  527. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/README.html +54 -0
  528. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/SpiderMonkey.rsp +11 -0
  529. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/aclocal.m4 +9 -0
  530. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/bench.sh +5 -0
  531. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/builtins.tbl +98 -0
  532. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config.mk +206 -0
  533. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/Makefile.in +106 -0
  534. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/Moz/Milestone.pm +232 -0
  535. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/autoconf.mk.in +349 -0
  536. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/check-sync-dirs.py +108 -0
  537. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/check-sync-exceptions +6 -0
  538. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/config.mk +884 -0
  539. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/fastcwd.pl +66 -0
  540. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/gcc_hidden.h +2 -0
  541. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/insure.mk +53 -0
  542. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/make-system-wrappers.pl +59 -0
  543. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/milestone.pl +112 -0
  544. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/milestone.txt +13 -0
  545. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/Makefile.in +84 -0
  546. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/cppsetup.c +233 -0
  547. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/def.h +184 -0
  548. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/ifparser.c +549 -0
  549. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/ifparser.h +83 -0
  550. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/imakemdep.h +733 -0
  551. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/include.c +337 -0
  552. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/main.c +860 -0
  553. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/mkdepend.man +382 -0
  554. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/parse.c +686 -0
  555. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/mkdepend/pr.c +124 -0
  556. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/nfspwd.pl +50 -0
  557. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/nsinstall.c +481 -0
  558. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/nsinstall.py +139 -0
  559. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/pathsub.c +247 -0
  560. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/pathsub.h +74 -0
  561. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/preprocessor.pl +671 -0
  562. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/revdepth-nt.pl +48 -0
  563. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/revdepth.pl +51 -0
  564. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/rules.mk +2269 -0
  565. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/system-headers +1038 -0
  566. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/version.mk +85 -0
  567. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/config/version_win.pl +423 -0
  568. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/dtoa.c +3321 -0
  569. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/editline/Makefile.ref +143 -0
  570. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/editline/README +83 -0
  571. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/editline/editline.3 +175 -0
  572. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/editline/editline.c +1368 -0
  573. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/editline/editline.h +135 -0
  574. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/editline/sysunix.c +182 -0
  575. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/editline/unix.h +82 -0
  576. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/javascript-trace.d +73 -0
  577. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jitstats.tbl +52 -0
  578. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/js-config.h.in +55 -0
  579. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/js-config.in +111 -0
  580. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/js.cpp +4050 -0
  581. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/js.mdp +0 -0
  582. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/js.msg +309 -0
  583. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/js3240.rc +79 -0
  584. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsOS240.def +654 -0
  585. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsapi.cpp +6060 -0
  586. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsapi.h +2699 -0
  587. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsarena.cpp +450 -0
  588. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsarena.h +318 -0
  589. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsarray.cpp +3426 -0
  590. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsarray.h +191 -0
  591. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsatom.cpp +1064 -0
  592. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsatom.h +458 -0
  593. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsbit.h +253 -0
  594. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsbool.cpp +182 -0
  595. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsbool.h +75 -0
  596. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsbuiltins.cpp +497 -0
  597. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsbuiltins.h +374 -0
  598. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsclist.h +139 -0
  599. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jscntxt.cpp +1394 -0
  600. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jscntxt.h +1247 -0
  601. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jscompat.h +57 -0
  602. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsconfig.mk +181 -0
  603. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jscpucfg.cpp +388 -0
  604. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jscpucfg.h +212 -0
  605. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsdate.cpp +2475 -0
  606. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsdate.h +124 -0
  607. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsdbgapi.cpp +1954 -0
  608. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsdbgapi.h +500 -0
  609. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsdhash.cpp +876 -0
  610. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsdhash.h +588 -0
  611. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsdtoa.cpp +572 -0
  612. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsdtoa.h +131 -0
  613. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsdtracef.c +318 -0
  614. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsdtracef.h +81 -0
  615. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsemit.cpp +6857 -0
  616. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsemit.h +777 -0
  617. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsexn.cpp +1376 -0
  618. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsexn.h +96 -0
  619. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsfile.cpp +2736 -0
  620. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsfile.h +56 -0
  621. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsfile.msg +90 -0
  622. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsfun.cpp +2706 -0
  623. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsfun.h +296 -0
  624. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsgc.cpp +3763 -0
  625. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsgc.h +427 -0
  626. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jshash.cpp +476 -0
  627. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jshash.h +151 -0
  628. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsify.pl +483 -0
  629. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsinterp.cpp +7225 -0
  630. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsinterp.h +591 -0
  631. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsinvoke.cpp +42 -0
  632. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsiter.cpp +1050 -0
  633. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsiter.h +140 -0
  634. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jskeyword.tbl +124 -0
  635. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jskwgen.cpp +460 -0
  636. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jslibmath.h +69 -0
  637. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jslock.cpp +1417 -0
  638. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jslock.h +311 -0
  639. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jslocko.asm +60 -0
  640. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jslog2.cpp +94 -0
  641. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jslong.cpp +264 -0
  642. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jslong.h +412 -0
  643. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsmath.cpp +721 -0
  644. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsmath.h +63 -0
  645. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsnum.cpp +1338 -0
  646. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsnum.h +287 -0
  647. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsobj.cpp +5563 -0
  648. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsobj.h +735 -0
  649. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/json.cpp +954 -0
  650. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/json.h +107 -0
  651. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsopcode.cpp +5304 -0
  652. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsopcode.h +404 -0
  653. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsopcode.tbl +557 -0
  654. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsoplengen.cpp +121 -0
  655. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsotypes.h +202 -0
  656. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsparse.cpp +6822 -0
  657. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsparse.h +508 -0
  658. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsprf.cpp +1262 -0
  659. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsprf.h +150 -0
  660. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsproto.tbl +129 -0
  661. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsprvtd.h +263 -0
  662. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jspubtd.h +727 -0
  663. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsregexp.cpp +4772 -0
  664. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsregexp.h +192 -0
  665. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsreops.tbl +145 -0
  666. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsscan.cpp +2017 -0
  667. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsscan.h +389 -0
  668. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsscope.cpp +1955 -0
  669. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsscope.h +419 -0
  670. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsscript.cpp +1891 -0
  671. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsscript.h +330 -0
  672. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsshell.msg +51 -0
  673. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsstaticcheck.h +57 -0
  674. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsstddef.h +87 -0
  675. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsstr.cpp +5347 -0
  676. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsstr.h +662 -0
  677. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jstracer.cpp +8276 -0
  678. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jstracer.h +552 -0
  679. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jstypes.h +490 -0
  680. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsutil.cpp +345 -0
  681. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsutil.h +168 -0
  682. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsversion.h +243 -0
  683. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsxdrapi.cpp +800 -0
  684. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsxdrapi.h +220 -0
  685. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsxml.cpp +8343 -0
  686. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/jsxml.h +298 -0
  687. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/lock_SunOS.s +119 -0
  688. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/plify_jsdhash.sed +35 -0
  689. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/prmjtime.cpp +846 -0
  690. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/prmjtime.h +103 -0
  691. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/AIX4.1.mk +65 -0
  692. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/AIX4.2.mk +64 -0
  693. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/AIX4.3.mk +65 -0
  694. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/Cygwin.mk +14 -0
  695. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/Darwin.mk +85 -0
  696. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/Darwin1.3.mk +81 -0
  697. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/Darwin1.4.mk +41 -0
  698. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/Darwin5.2.mk +81 -0
  699. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/Darwin5.3.mk +81 -0
  700. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/Darwin64.mk +72 -0
  701. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/HP-UXB.10.10.mk +77 -0
  702. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/HP-UXB.10.20.mk +77 -0
  703. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/HP-UXB.11.00.mk +80 -0
  704. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/IRIX.mk +87 -0
  705. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/IRIX5.3.mk +44 -0
  706. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/IRIX6.1.mk +44 -0
  707. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/IRIX6.2.mk +44 -0
  708. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/IRIX6.3.mk +44 -0
  709. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/IRIX6.5.mk +44 -0
  710. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/Linux_All.mk +105 -0
  711. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/MSYS.mk +7 -0
  712. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/Mac_OS10.0.mk +82 -0
  713. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/OSF1V4.0.mk +72 -0
  714. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/OSF1V5.0.mk +69 -0
  715. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/SunOS4.1.4.mk +101 -0
  716. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/SunOS5.10.mk +50 -0
  717. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/SunOS5.3.mk +91 -0
  718. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/SunOS5.4.mk +92 -0
  719. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/SunOS5.5.1.mk +44 -0
  720. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/SunOS5.5.mk +87 -0
  721. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/SunOS5.6.mk +89 -0
  722. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/SunOS5.7.mk +44 -0
  723. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/SunOS5.8.mk +44 -0
  724. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/SunOS5.9.mk +44 -0
  725. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/WINNT4.0.mk +118 -0
  726. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/WINNT5.0.mk +118 -0
  727. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/WINNT5.1.mk +118 -0
  728. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/WINNT5.2.mk +118 -0
  729. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/WINNT6.0.mk +118 -0
  730. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/ref-config/dgux.mk +64 -0
  731. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/resource.h +15 -0
  732. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/rules.mk +206 -0
  733. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/time.sh +13 -0
  734. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/js/win32.order +384 -0
  735. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage-help.txt +12 -0
  736. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage-highlight.css +38 -0
  737. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage-ie.css +89 -0
  738. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage-overlay.js +211 -0
  739. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage-server-help.txt +17 -0
  740. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage-server.1 +79 -0
  741. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage-server.c +1307 -0
  742. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage-throbber.gif +0 -0
  743. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage.1 +52 -0
  744. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage.c +142 -0
  745. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage.css +328 -0
  746. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage.html +125 -0
  747. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage.js +1024 -0
  748. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage.jsm +22 -0
  749. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage.manifest +2 -0
  750. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/jscoverage.xul +36 -0
  751. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/m4/iconv.m4 +180 -0
  752. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/m4/lib-ld.m4 +110 -0
  753. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/m4/lib-link.m4 +709 -0
  754. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/m4/lib-prefix.m4 +185 -0
  755. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/make-bin-dist.sh.in +24 -0
  756. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/make-dist.sh.in +43 -0
  757. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/missing +367 -0
  758. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/report.js +76 -0
  759. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/resource-manager.c +59 -0
  760. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/resource-manager.h +46 -0
  761. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/stream.c +129 -0
  762. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/stream.h +57 -0
  763. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/Makefile.am +130 -0
  764. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/Makefile.in +846 -0
  765. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/asprintf.c +42 -0
  766. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/asprintf.sh +19 -0
  767. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/charset.sh +110 -0
  768. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/chunked.sh +74 -0
  769. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/common.sh +7 -0
  770. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/destination-is-existing-directory.expected.err +2 -0
  771. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/destination-is-file.expected.err +2 -0
  772. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/encoding-requires-argument.expected.err +2 -0
  773. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/encodings.c +223 -0
  774. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/encodings.sh +19 -0
  775. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/exclude-requires-argument.expected.err +2 -0
  776. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/fatal.sh +110 -0
  777. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/gethostbyname.c +53 -0
  778. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/gethostbyname.sh +25 -0
  779. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/help.sh +35 -0
  780. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/http-client-bad-body.c +98 -0
  781. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/http-client-bad-url.c +77 -0
  782. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/http-client-close-after-request.c +57 -0
  783. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/http-server-bad-body.c +97 -0
  784. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/http-server-bad-headers.c +97 -0
  785. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/http-server-charset.c +144 -0
  786. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/http-server-chunked.c +196 -0
  787. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/http-server-close-immediately.c +60 -0
  788. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/invalid-option.expected.err +2 -0
  789. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/invalid-option.sh +29 -0
  790. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-ignore.expected/ignore.js +106 -0
  791. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-ignore.sh +28 -0
  792. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-ignore/ignore.js +44 -0
  793. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-invalid.expected.err +2 -0
  794. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-invalid/javascript-invalid.js +1 -0
  795. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-setter.expected.err +1 -0
  796. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-setter/javascript-setter.js +3 -0
  797. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-utf-8.expected/javascript-utf-8.js +15 -0
  798. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-utf-8.sh +43 -0
  799. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-utf-8/javascript-utf-8.js +2 -0
  800. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-xml.expected.err +1 -0
  801. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript-xml/javascript-xml.js +8 -0
  802. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-array-comprehension.js +32 -0
  803. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-assign.js +51 -0
  804. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-colon.js +24 -0
  805. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-comma.js +12 -0
  806. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-cr.js +12 -0
  807. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-crlf.js +12 -0
  808. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-debugger.js +21 -0
  809. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-dec.js +15 -0
  810. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-delete.js +12 -0
  811. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-destructuring.js +96 -0
  812. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-do.js +28 -0
  813. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-dot.js +30 -0
  814. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-empty.js +9 -0
  815. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-for.js +51 -0
  816. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-foreach.js +16 -0
  817. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-function.js +79 -0
  818. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-generator-expression.js +45 -0
  819. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-generator.js +32 -0
  820. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-getter-setter.js +31 -0
  821. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-hook.js +15 -0
  822. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-if.js +71 -0
  823. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-in.js +19 -0
  824. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-inc.js +15 -0
  825. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-iso-8859-1.js +15 -0
  826. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-lambda.js +14 -0
  827. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-let.js +148 -0
  828. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-lf.js +12 -0
  829. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-new.js +22 -0
  830. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-number.js +57 -0
  831. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-object.js +15 -0
  832. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-op.js +108 -0
  833. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-primary.js +21 -0
  834. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-rb.js +24 -0
  835. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-rc.js +15 -0
  836. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-rp.js +12 -0
  837. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-special-characters.js +30 -0
  838. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-string.js +36 -0
  839. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-switch.js +55 -0
  840. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-throw.js +21 -0
  841. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-try.js +66 -0
  842. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-unaryop.js +27 -0
  843. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-var.js +15 -0
  844. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-while.js +79 -0
  845. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-with.js +30 -0
  846. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript.sh +53 -0
  847. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-array-comprehension.js +14 -0
  848. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-assign.js +14 -0
  849. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-colon.js +7 -0
  850. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-comma.js +1 -0
  851. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-cr.js +1 -0
  852. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-crlf.js +4 -0
  853. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-debugger.js +6 -0
  854. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-dec.js +2 -0
  855. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-delete.js +1 -0
  856. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-destructuring.js +42 -0
  857. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-do.js +10 -0
  858. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-dot.js +8 -0
  859. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-empty.js +0 -0
  860. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-for.js +22 -0
  861. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-foreach.js +8 -0
  862. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-function.js +38 -0
  863. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-generator-expression.js +18 -0
  864. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-generator.js +11 -0
  865. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-getter-setter.js +19 -0
  866. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-hook.js +2 -0
  867. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-if.js +30 -0
  868. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-in.js +4 -0
  869. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-inc.js +2 -0
  870. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-iso-8859-1.js +2 -0
  871. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-lambda.js +3 -0
  872. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-let.js +79 -0
  873. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-lf.js +4 -0
  874. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-new.js +4 -0
  875. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-number.js +19 -0
  876. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-object.js +2 -0
  877. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-op.js +55 -0
  878. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-primary.js +4 -0
  879. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-rb.js +5 -0
  880. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-rc.js +7 -0
  881. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-rp.js +1 -0
  882. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-special-characters.js +11 -0
  883. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-string.js +11 -0
  884. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-switch.js +21 -0
  885. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-throw.js +6 -0
  886. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-try.js +32 -0
  887. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-unaryop.js +6 -0
  888. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-var.js +2 -0
  889. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-while.js +35 -0
  890. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/javascript/javascript-with.js +9 -0
  891. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/json-cmp.js +65 -0
  892. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/json.c +48 -0
  893. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/json.sh +19 -0
  894. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/mkdirs.c +42 -0
  895. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/mkdirs.sh +19 -0
  896. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/netcat.pl +35 -0
  897. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/no-arguments.expected.err +2 -0
  898. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/no-arguments.sh +29 -0
  899. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/no-instrument-requires-argument.expected.err +2 -0
  900. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/proxy-bad-request-body.sh +58 -0
  901. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/proxy-bad-response-body-javascript.sh +53 -0
  902. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/proxy-bad-response-body.expected.err +1 -0
  903. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/proxy-bad-response-body.sh +54 -0
  904. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/proxy-bad-response-headers.sh +53 -0
  905. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/proxy-no-server.sh +49 -0
  906. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/proxy-url.sh +67 -0
  907. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/proxy.sh +143 -0
  908. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive-crlf.sh +59 -0
  909. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive-dir-list.c +93 -0
  910. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive-dir-list.sh +19 -0
  911. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive-exclude.sh +41 -0
  912. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive-fatal.sh +40 -0
  913. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive-no-instrument.sh +41 -0
  914. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/1/1.css +3 -0
  915. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/1/1.html +12 -0
  916. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/1/1.js +12 -0
  917. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/1/2/2.css +3 -0
  918. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/1/2/2.html +11 -0
  919. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/1/2/2.js +12 -0
  920. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/image.png +0 -0
  921. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/index.html +12 -0
  922. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/script.js +19 -0
  923. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/style.css +3 -0
  924. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/unix.txt +3 -0
  925. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/windows.txt +3 -0
  926. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.expected/x +1 -0
  927. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive.sh +55 -0
  928. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/1/1.css +3 -0
  929. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/1/1.html +12 -0
  930. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/1/1.js +1 -0
  931. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/1/2/2.css +3 -0
  932. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/1/2/2.html +11 -0
  933. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/1/2/2.js +1 -0
  934. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/image.png +0 -0
  935. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/index.html +12 -0
  936. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/script.js +6 -0
  937. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/style.css +3 -0
  938. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/unix.txt +3 -0
  939. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/windows.txt +3 -0
  940. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/recursive/x +1 -0
  941. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/same-directory.expected.err +1 -0
  942. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/same-directory.sh +30 -0
  943. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-bad-requests.sh +104 -0
  944. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-close-after-request.sh +47 -0
  945. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-content-types.sh +68 -0
  946. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-directory-listing.expected +4 -0
  947. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-directory-listing.sh +57 -0
  948. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-directory-redirect.sh +50 -0
  949. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-encoded-url.sh +57 -0
  950. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-error.sh +61 -0
  951. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-help.sh +26 -0
  952. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-ip-address.sh +68 -0
  953. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-shutdown-bad-method.sh +49 -0
  954. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-shutdown.expected.err +1 -0
  955. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-shutdown.sh +42 -0
  956. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-special-file.sh +62 -0
  957. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-unreadable-directory.sh +61 -0
  958. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-unreadable-file.sh +62 -0
  959. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-verbose.expected.err +4 -0
  960. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-verbose.sh +54 -0
  961. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server-version.sh +25 -0
  962. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server.pl +61 -0
  963. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/server.sh +216 -0
  964. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/source-does-not-exist.expected.err +2 -0
  965. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/source-is-file.expected.err +2 -0
  966. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-bad-json.sh +50 -0
  967. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-bad-request-body.sh +48 -0
  968. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-bad-response-headers.sh +56 -0
  969. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-bad-source-urls.expected.err +3 -0
  970. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-bad-source-urls.expected.json +14 -0
  971. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-escaped-characters.expected.json +6 -0
  972. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-escaped-characters.js +11 -0
  973. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-escaped-characters.json +3 -0
  974. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-escaped-characters.sh +52 -0
  975. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-server-bad-body.sh +59 -0
  976. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-server-closes-immediately.sh +58 -0
  977. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-source-not-found.expected.err +1 -0
  978. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-source-not-found.expected.json +6 -0
  979. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-source-not-found.json +3 -0
  980. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-source-not-found.sh +50 -0
  981. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-source-urls.expected.err +3 -0
  982. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-source-urls.expected.json +14 -0
  983. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-unreachable-source-urls.expected.err +3 -0
  984. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-unreachable-source-urls.expected.json +14 -0
  985. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-unreadable-json.sh +66 -0
  986. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store-unwritable-json.sh +58 -0
  987. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store.expected.json +14 -0
  988. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store.json +5 -0
  989. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/store.sh +137 -0
  990. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/streams.c +107 -0
  991. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/streams.sh +19 -0
  992. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/too-many-arguments.expected.err +2 -0
  993. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/valgrind.sh +7 -0
  994. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/tests/version.sh +29 -0
  995. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/util.c +570 -0
  996. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/deps/jscoverage/util.h +133 -0
  997. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/docs/api.html +1048 -0
  998. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/docs/index.html +373 -0
  999. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/docs/index.md +290 -0
  1000. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/docs/layout/foot.html +3 -0
  1001. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/docs/layout/head.html +42 -0
  1002. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/lib/bar.js +4 -0
  1003. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/lib/foo.js +16 -0
  1004. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/package.json +12 -0
  1005. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/test/assert.test.js +84 -0
  1006. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/test/async.test.js +6 -0
  1007. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/test/bar.test.js +12 -0
  1008. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/test/foo.test.js +13 -0
  1009. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/test/http.test.js +82 -0
  1010. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/test/serial/async.test.js +38 -0
  1011. data/node_modules/jasmine-runner/node_modules/socket.io/support/expresso/test/serial/http.test.js +47 -0
  1012. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/LICENSE +27 -0
  1013. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/Makefile +8 -0
  1014. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/README.md +41 -0
  1015. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/examples/client-unix.js +12 -0
  1016. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/examples/client.js +10 -0
  1017. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/examples/server-unix.js +13 -0
  1018. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/lib/websocket.js +562 -0
  1019. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/package.json +22 -0
  1020. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/test/test-basic.js +63 -0
  1021. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/test/test-readonly-attrs.js +44 -0
  1022. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/test/test-ready-state.js +23 -0
  1023. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/test/test-unix-send-fd.js +63 -0
  1024. data/node_modules/jasmine-runner/node_modules/socket.io/support/node-websocket-client/test/test-unix-sockets.js +46 -0
  1025. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/.gitignore +1 -0
  1026. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/.gitmodules +3 -0
  1027. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/Makefile +2 -0
  1028. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/README.md +213 -0
  1029. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/io.js +24 -0
  1030. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/socket.js +157 -0
  1031. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/transport.js +141 -0
  1032. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/transports/flashsocket.js +53 -0
  1033. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/transports/htmlfile.js +73 -0
  1034. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/transports/jsonp-polling.js +116 -0
  1035. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/transports/websocket.js +60 -0
  1036. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/transports/xhr-multipart.js +36 -0
  1037. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/transports/xhr-polling.js +68 -0
  1038. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/transports/xhr.js +131 -0
  1039. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/util.js +60 -0
  1040. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/.gitignore +1 -0
  1041. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/FABridge.js +604 -0
  1042. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/README.txt +109 -0
  1043. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/WebSocketMain.swf +0 -0
  1044. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/WebSocketMainInsecure.zip +0 -0
  1045. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocket.as +461 -0
  1046. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocketMain.as +94 -0
  1047. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocketMainInsecure.as +19 -0
  1048. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocketStateEvent.as +32 -0
  1049. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/bridge/FABridge.as +943 -0
  1050. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/build.sh +10 -0
  1051. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/adobe/net/proxies/RFC2817Socket.as +204 -0
  1052. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/gsolo/encryption/MD5.as +375 -0
  1053. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/Crypto.as +287 -0
  1054. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/cert/MozillaRootCertificates.as +3235 -0
  1055. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/cert/X509Certificate.as +218 -0
  1056. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/cert/X509CertificateCollection.as +57 -0
  1057. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/HMAC.as +82 -0
  1058. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/IHMAC.as +27 -0
  1059. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/IHash.as +21 -0
  1060. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/MAC.as +137 -0
  1061. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/MD2.as +124 -0
  1062. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/MD5.as +204 -0
  1063. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHA1.as +106 -0
  1064. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHA224.as +28 -0
  1065. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHA256.as +115 -0
  1066. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHABase.as +71 -0
  1067. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/ARC4.as +90 -0
  1068. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/IPRNG.as +20 -0
  1069. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/Random.as +119 -0
  1070. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/TLSPRF.as +142 -0
  1071. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/rsa/RSAKey.as +339 -0
  1072. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/AESKey.as +2797 -0
  1073. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/BlowFishKey.as +375 -0
  1074. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CBCMode.as +55 -0
  1075. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CFB8Mode.as +61 -0
  1076. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CFBMode.as +64 -0
  1077. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CTRMode.as +58 -0
  1078. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/DESKey.as +365 -0
  1079. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/ECBMode.as +86 -0
  1080. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/ICipher.as +21 -0
  1081. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IMode.as +15 -0
  1082. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IPad.as +32 -0
  1083. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IStreamCipher.as +21 -0
  1084. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/ISymmetricKey.as +35 -0
  1085. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IVMode.as +110 -0
  1086. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/NullPad.as +34 -0
  1087. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/OFBMode.as +52 -0
  1088. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/PKCS5.as +44 -0
  1089. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/SSLPad.as +44 -0
  1090. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/SimpleIVMode.as +60 -0
  1091. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/TLSPad.as +42 -0
  1092. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/TripleDESKey.as +88 -0
  1093. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/XTeaKey.as +94 -0
  1094. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/aeskey.pl +29 -0
  1095. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/dump.txt +2304 -0
  1096. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/AESKeyTest.as +1220 -0
  1097. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/ARC4Test.as +58 -0
  1098. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/BigIntegerTest.as +39 -0
  1099. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/BlowFishKeyTest.as +148 -0
  1100. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/CBCModeTest.as +160 -0
  1101. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/CFB8ModeTest.as +71 -0
  1102. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/CFBModeTest.as +98 -0
  1103. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/CTRModeTest.as +109 -0
  1104. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/DESKeyTest.as +112 -0
  1105. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/ECBModeTest.as +151 -0
  1106. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/HMACTest.as +184 -0
  1107. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/ITestHarness.as +20 -0
  1108. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/MD2Test.as +56 -0
  1109. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/MD5Test.as +58 -0
  1110. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/OFBModeTest.as +101 -0
  1111. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/RSAKeyTest.as +92 -0
  1112. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/SHA1Test.as +198 -0
  1113. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/SHA224Test.as +58 -0
  1114. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/SHA256Test.as +60 -0
  1115. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TLSPRFTest.as +51 -0
  1116. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TestCase.as +42 -0
  1117. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TripleDESKeyTest.as +59 -0
  1118. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/XTeaKeyTest.as +66 -0
  1119. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/BulkCiphers.as +102 -0
  1120. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/CipherSuites.as +117 -0
  1121. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/IConnectionState.as +14 -0
  1122. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/ISecurityParameters.as +29 -0
  1123. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/KeyExchanges.as +24 -0
  1124. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/MACs.as +38 -0
  1125. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/SSLConnectionState.as +171 -0
  1126. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/SSLEvent.as +26 -0
  1127. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/SSLSecurityParameters.as +340 -0
  1128. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSConfig.as +70 -0
  1129. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSConnectionState.as +151 -0
  1130. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSEngine.as +895 -0
  1131. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSError.as +39 -0
  1132. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSEvent.as +27 -0
  1133. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSSecurityParameters.as +197 -0
  1134. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSSocket.as +370 -0
  1135. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSSocketEvent.as +26 -0
  1136. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSTest.as +180 -0
  1137. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/BarrettReduction.as +90 -0
  1138. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/BigInteger.as +1543 -0
  1139. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/ClassicReduction.as +35 -0
  1140. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/IReduction.as +11 -0
  1141. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/MontgomeryReduction.as +85 -0
  1142. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/NullReduction.as +34 -0
  1143. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/bi_internal.as +11 -0
  1144. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/ArrayUtil.as +25 -0
  1145. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Base64.as +189 -0
  1146. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Hex.as +66 -0
  1147. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Memory.as +28 -0
  1148. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/ByteString.as +43 -0
  1149. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/DER.as +210 -0
  1150. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/IAsn1Type.as +21 -0
  1151. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Integer.as +44 -0
  1152. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/OID.as +35 -0
  1153. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/ObjectIdentifier.as +112 -0
  1154. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/PEM.as +118 -0
  1155. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/PrintableString.as +49 -0
  1156. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Sequence.as +90 -0
  1157. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Set.as +27 -0
  1158. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Type.as +94 -0
  1159. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/UTCTime.as +60 -0
  1160. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/sample.html +76 -0
  1161. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/swfobject.js +4 -0
  1162. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/web_socket.js +388 -0
  1163. data/node_modules/jasmine-runner/node_modules/socket.io/support/socket.io-client/socket.io.js +1918 -0
  1164. data/node_modules/jasmine-runner/node_modules/socket.io/tests/index.js +17 -0
  1165. data/node_modules/jasmine-runner/node_modules/socket.io/tests/listener.js +152 -0
  1166. data/node_modules/jasmine-runner/node_modules/socket.io/tests/transports.flashsocket.js +48 -0
  1167. data/node_modules/jasmine-runner/node_modules/socket.io/tests/transports.htmlfile.js +214 -0
  1168. data/node_modules/jasmine-runner/node_modules/socket.io/tests/transports.jsonp-polling.js +148 -0
  1169. data/node_modules/jasmine-runner/node_modules/socket.io/tests/transports.websocket.js +245 -0
  1170. data/node_modules/jasmine-runner/node_modules/socket.io/tests/transports.xhr-multipart.js +215 -0
  1171. data/node_modules/jasmine-runner/node_modules/socket.io/tests/transports.xhr-polling.js +138 -0
  1172. data/node_modules/jasmine-runner/node_modules/socket.io/tests/utils.js +25 -0
  1173. data/node_modules/jasmine-runner/node_modules/vows/LICENSE +20 -0
  1174. data/node_modules/jasmine-runner/node_modules/vows/Makefile +7 -0
  1175. data/node_modules/jasmine-runner/node_modules/vows/README.md +39 -0
  1176. data/node_modules/jasmine-runner/node_modules/vows/bin/vows +421 -0
  1177. data/node_modules/jasmine-runner/node_modules/vows/lib/assert/error.js +27 -0
  1178. data/node_modules/jasmine-runner/node_modules/vows/lib/assert/macros.js +180 -0
  1179. data/node_modules/jasmine-runner/node_modules/vows/lib/vows.js +195 -0
  1180. data/node_modules/jasmine-runner/node_modules/vows/lib/vows/console.js +93 -0
  1181. data/node_modules/jasmine-runner/node_modules/vows/lib/vows/context.js +55 -0
  1182. data/node_modules/jasmine-runner/node_modules/vows/lib/vows/extras.js +28 -0
  1183. data/node_modules/jasmine-runner/node_modules/vows/lib/vows/reporters/dot-matrix.js +69 -0
  1184. data/node_modules/jasmine-runner/node_modules/vows/lib/vows/reporters/json.js +10 -0
  1185. data/node_modules/jasmine-runner/node_modules/vows/lib/vows/reporters/silent.js +8 -0
  1186. data/node_modules/jasmine-runner/node_modules/vows/lib/vows/reporters/spec.js +74 -0
  1187. data/node_modules/jasmine-runner/node_modules/vows/lib/vows/reporters/watch.js +38 -0
  1188. data/node_modules/jasmine-runner/node_modules/vows/lib/vows/reporters/xunit.js +90 -0
  1189. data/node_modules/jasmine-runner/node_modules/vows/lib/vows/suite.js +321 -0
  1190. data/node_modules/jasmine-runner/node_modules/vows/package.json +14 -0
  1191. data/node_modules/jasmine-runner/node_modules/vows/test/assert-test.js +101 -0
  1192. data/node_modules/jasmine-runner/node_modules/vows/test/vows-test.js +373 -0
  1193. data/node_modules/jasmine-runner/node_modules/webworker/.gitignore +2 -0
  1194. data/node_modules/jasmine-runner/node_modules/webworker/LICENSE +27 -0
  1195. data/node_modules/jasmine-runner/node_modules/webworker/Makefile +15 -0
  1196. data/node_modules/jasmine-runner/node_modules/webworker/README.md +74 -0
  1197. data/node_modules/jasmine-runner/node_modules/webworker/docs/design.md +103 -0
  1198. data/node_modules/jasmine-runner/node_modules/webworker/examples/prefork/README.md +1 -0
  1199. data/node_modules/jasmine-runner/node_modules/webworker/examples/prefork/master.js +12 -0
  1200. data/node_modules/jasmine-runner/node_modules/webworker/examples/prefork/worker.js +20 -0
  1201. data/node_modules/jasmine-runner/node_modules/webworker/lib/webworker-child.js +173 -0
  1202. data/node_modules/jasmine-runner/node_modules/webworker/lib/webworker-util.js +185 -0
  1203. data/node_modules/jasmine-runner/node_modules/webworker/lib/webworker.js +304 -0
  1204. data/node_modules/jasmine-runner/node_modules/webworker/lib/ws.js +118 -0
  1205. data/node_modules/jasmine-runner/node_modules/webworker/lib/ws/connection.js +408 -0
  1206. data/node_modules/jasmine-runner/node_modules/webworker/lib/ws/manager.js +98 -0
  1207. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/LICENSE +27 -0
  1208. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/Makefile +8 -0
  1209. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/README.md +41 -0
  1210. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/examples/client-unix.js +12 -0
  1211. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/examples/client.js +10 -0
  1212. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/examples/server-unix.js +13 -0
  1213. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/lib/websocket.js +516 -0
  1214. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/package.json +22 -0
  1215. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/test/test-basic.js +63 -0
  1216. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/test/test-readonly-attrs.js +44 -0
  1217. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/test/test-ready-state.js +23 -0
  1218. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/test/test-unix-send-fd.js +63 -0
  1219. data/node_modules/jasmine-runner/node_modules/webworker/node_modules/websocket-client/test/test-unix-sockets.js +46 -0
  1220. data/node_modules/jasmine-runner/node_modules/webworker/package.json +25 -0
  1221. data/node_modules/jasmine-runner/node_modules/webworker/test/test-error.js +24 -0
  1222. data/node_modules/jasmine-runner/node_modules/webworker/test/test-fd.js +32 -0
  1223. data/node_modules/jasmine-runner/node_modules/webworker/test/test-simple.js +36 -0
  1224. data/node_modules/jasmine-runner/node_modules/webworker/test/workers/error.js +6 -0
  1225. data/node_modules/jasmine-runner/node_modules/webworker/test/workers/fd.js +17 -0
  1226. data/node_modules/jasmine-runner/node_modules/webworker/test/workers/simple.js +15 -0
  1227. data/node_modules/jasmine-runner/package.json +22 -0
  1228. data/node_modules/jasmine-runner/spec/ConsoleLoggerSpec.js +1 -0
  1229. data/node_modules/jasmine-runner/spec/ServerSpec.js +42 -0
  1230. data/node_modules/jasmine-runner/spec/TestRunner.js +72 -0
  1231. data/node_modules/jasmine-runner/spec/file.worker +8 -0
  1232. data/node_modules/jasmine-runner/spec/temp/spec/foo.spec.js +0 -0
  1233. data/node_modules/jasmine-runner/spec/temp/src/foo.hs +1 -0
  1234. data/node_modules/uglify-js/.gitignore +4 -0
  1235. data/node_modules/uglify-js/README.html +1026 -0
  1236. data/node_modules/uglify-js/README.org +571 -0
  1237. data/node_modules/uglify-js/bin/uglifyjs +317 -0
  1238. data/node_modules/uglify-js/docstyle.css +75 -0
  1239. data/node_modules/uglify-js/lib/object-ast.js +75 -0
  1240. data/node_modules/uglify-js/lib/parse-js.js +1339 -0
  1241. data/node_modules/uglify-js/lib/process.js +2001 -0
  1242. data/node_modules/uglify-js/lib/squeeze-more.js +51 -0
  1243. data/node_modules/uglify-js/package.json +24 -0
  1244. data/node_modules/uglify-js/package.json~ +24 -0
  1245. data/node_modules/uglify-js/test/beautify.js +28 -0
  1246. data/node_modules/uglify-js/test/testparser.js +403 -0
  1247. data/node_modules/uglify-js/test/unit/compress/expected/array1.js +1 -0
  1248. data/node_modules/uglify-js/test/unit/compress/expected/array2.js +1 -0
  1249. data/node_modules/uglify-js/test/unit/compress/expected/array3.js +1 -0
  1250. data/node_modules/uglify-js/test/unit/compress/expected/array4.js +1 -0
  1251. data/node_modules/uglify-js/test/unit/compress/expected/assignment.js +1 -0
  1252. data/node_modules/uglify-js/test/unit/compress/expected/concatstring.js +1 -0
  1253. data/node_modules/uglify-js/test/unit/compress/expected/const.js +1 -0
  1254. data/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js +1 -0
  1255. data/node_modules/uglify-js/test/unit/compress/expected/forstatement.js +1 -0
  1256. data/node_modules/uglify-js/test/unit/compress/expected/if.js +1 -0
  1257. data/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js +1 -0
  1258. data/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js +1 -0
  1259. data/node_modules/uglify-js/test/unit/compress/expected/issue10.js +1 -0
  1260. data/node_modules/uglify-js/test/unit/compress/expected/issue11.js +1 -0
  1261. data/node_modules/uglify-js/test/unit/compress/expected/issue13.js +1 -0
  1262. data/node_modules/uglify-js/test/unit/compress/expected/issue14.js +1 -0
  1263. data/node_modules/uglify-js/test/unit/compress/expected/issue16.js +1 -0
  1264. data/node_modules/uglify-js/test/unit/compress/expected/issue17.js +1 -0
  1265. data/node_modules/uglify-js/test/unit/compress/expected/issue20.js +1 -0
  1266. data/node_modules/uglify-js/test/unit/compress/expected/issue21.js +1 -0
  1267. data/node_modules/uglify-js/test/unit/compress/expected/issue25.js +1 -0
  1268. data/node_modules/uglify-js/test/unit/compress/expected/issue27.js +1 -0
  1269. data/node_modules/uglify-js/test/unit/compress/expected/issue28.js +1 -0
  1270. data/node_modules/uglify-js/test/unit/compress/expected/issue29.js +1 -0
  1271. data/node_modules/uglify-js/test/unit/compress/expected/issue30.js +1 -0
  1272. data/node_modules/uglify-js/test/unit/compress/expected/issue34.js +1 -0
  1273. data/node_modules/uglify-js/test/unit/compress/expected/issue4.js +1 -0
  1274. data/node_modules/uglify-js/test/unit/compress/expected/issue48.js +1 -0
  1275. data/node_modules/uglify-js/test/unit/compress/expected/issue50.js +1 -0
  1276. data/node_modules/uglify-js/test/unit/compress/expected/issue53.js +1 -0
  1277. data/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js +1 -0
  1278. data/node_modules/uglify-js/test/unit/compress/expected/issue68.js +1 -0
  1279. data/node_modules/uglify-js/test/unit/compress/expected/issue69.js +1 -0
  1280. data/node_modules/uglify-js/test/unit/compress/expected/issue9.js +1 -0
  1281. data/node_modules/uglify-js/test/unit/compress/expected/mangle.js +1 -0
  1282. data/node_modules/uglify-js/test/unit/compress/expected/null_string.js +1 -0
  1283. data/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js +1 -0
  1284. data/node_modules/uglify-js/test/unit/compress/expected/var.js +1 -0
  1285. data/node_modules/uglify-js/test/unit/compress/expected/whitespace.js +1 -0
  1286. data/node_modules/uglify-js/test/unit/compress/expected/with.js +1 -0
  1287. data/node_modules/uglify-js/test/unit/compress/test/array1.js +3 -0
  1288. data/node_modules/uglify-js/test/unit/compress/test/array2.js +4 -0
  1289. data/node_modules/uglify-js/test/unit/compress/test/array3.js +4 -0
  1290. data/node_modules/uglify-js/test/unit/compress/test/array4.js +6 -0
  1291. data/node_modules/uglify-js/test/unit/compress/test/assignment.js +20 -0
  1292. data/node_modules/uglify-js/test/unit/compress/test/concatstring.js +3 -0
  1293. data/node_modules/uglify-js/test/unit/compress/test/const.js +5 -0
  1294. data/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js +4 -0
  1295. data/node_modules/uglify-js/test/unit/compress/test/forstatement.js +10 -0
  1296. data/node_modules/uglify-js/test/unit/compress/test/if.js +6 -0
  1297. data/node_modules/uglify-js/test/unit/compress/test/ifreturn.js +9 -0
  1298. data/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js +16 -0
  1299. data/node_modules/uglify-js/test/unit/compress/test/issue10.js +1 -0
  1300. data/node_modules/uglify-js/test/unit/compress/test/issue11.js +3 -0
  1301. data/node_modules/uglify-js/test/unit/compress/test/issue13.js +1 -0
  1302. data/node_modules/uglify-js/test/unit/compress/test/issue14.js +1 -0
  1303. data/node_modules/uglify-js/test/unit/compress/test/issue16.js +1 -0
  1304. data/node_modules/uglify-js/test/unit/compress/test/issue17.js +4 -0
  1305. data/node_modules/uglify-js/test/unit/compress/test/issue20.js +1 -0
  1306. data/node_modules/uglify-js/test/unit/compress/test/issue21.js +6 -0
  1307. data/node_modules/uglify-js/test/unit/compress/test/issue25.js +7 -0
  1308. data/node_modules/uglify-js/test/unit/compress/test/issue27.js +1 -0
  1309. data/node_modules/uglify-js/test/unit/compress/test/issue28.js +3 -0
  1310. data/node_modules/uglify-js/test/unit/compress/test/issue29.js +1 -0
  1311. data/node_modules/uglify-js/test/unit/compress/test/issue30.js +3 -0
  1312. data/node_modules/uglify-js/test/unit/compress/test/issue34.js +3 -0
  1313. data/node_modules/uglify-js/test/unit/compress/test/issue4.js +3 -0
  1314. data/node_modules/uglify-js/test/unit/compress/test/issue48.js +1 -0
  1315. data/node_modules/uglify-js/test/unit/compress/test/issue50.js +9 -0
  1316. data/node_modules/uglify-js/test/unit/compress/test/issue53.js +1 -0
  1317. data/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +3 -0
  1318. data/node_modules/uglify-js/test/unit/compress/test/issue68.js +5 -0
  1319. data/node_modules/uglify-js/test/unit/compress/test/issue69.js +1 -0
  1320. data/node_modules/uglify-js/test/unit/compress/test/issue9.js +4 -0
  1321. data/node_modules/uglify-js/test/unit/compress/test/mangle.js +5 -0
  1322. data/node_modules/uglify-js/test/unit/compress/test/null_string.js +1 -0
  1323. data/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +3 -0
  1324. data/node_modules/uglify-js/test/unit/compress/test/var.js +3 -0
  1325. data/node_modules/uglify-js/test/unit/compress/test/whitespace.js +21 -0
  1326. data/node_modules/uglify-js/test/unit/compress/test/with.js +2 -0
  1327. data/node_modules/uglify-js/test/unit/scripts.js +55 -0
  1328. data/node_modules/uglify-js/uglify-js.js +17 -0
  1329. data/node_modules/uglifycss/README.md +21 -0
  1330. data/node_modules/uglifycss/index.js +26 -0
  1331. data/node_modules/uglifycss/package.json +15 -0
  1332. data/node_modules/uglifycss/test.js +43 -0
  1333. data/node_modules/uglifycss/tests.yui.js +42 -0
  1334. data/node_modules/uglifycss/uglifycss +127 -0
  1335. data/node_modules/uglifycss/uglifycss-lib.js +461 -0
  1336. metadata +1383 -0
@@ -0,0 +1,419 @@
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 jsscope_h___
42
+ #define jsscope_h___
43
+ /*
44
+ * JS symbol tables.
45
+ */
46
+ #include "jstypes.h"
47
+ #include "jslock.h"
48
+ #include "jsobj.h"
49
+ #include "jsprvtd.h"
50
+ #include "jspubtd.h"
51
+
52
+ JS_BEGIN_EXTERN_C
53
+
54
+ /*
55
+ * Given P independent, non-unique properties each of size S words mapped by
56
+ * all scopes in a runtime, construct a property tree of N nodes each of size
57
+ * S+L words (L for tree linkage). A nominal L value is 2 for leftmost-child
58
+ * and right-sibling links. We hope that the N < P by enough that the space
59
+ * overhead of L, and the overhead of scope entries pointing at property tree
60
+ * nodes, is worth it.
61
+ *
62
+ * The tree construction goes as follows. If any empty scope in the runtime
63
+ * has a property X added to it, find or create a node under the tree root
64
+ * labeled X, and set scope->lastProp to point at that node. If any non-empty
65
+ * scope whose most recently added property is labeled Y has another property
66
+ * labeled Z added, find or create a node for Z under the node that was added
67
+ * for Y, and set scope->lastProp to point at that node.
68
+ *
69
+ * A property is labeled by its members' values: id, getter, setter, slot,
70
+ * attributes, tiny or short id, and a field telling for..in order. Note that
71
+ * labels are not unique in the tree, but they are unique among a node's kids
72
+ * (barring rare and benign multi-threaded race condition outcomes, see below)
73
+ * and along any ancestor line from the tree root to a given leaf node (except
74
+ * for the hard case of duplicate formal parameters to a function).
75
+ *
76
+ * Thus the root of the tree represents all empty scopes, and the first ply
77
+ * of the tree represents all scopes containing one property, etc. Each node
78
+ * in the tree can stand for any number of scopes having the same ordered set
79
+ * of properties, where that node was the last added to the scope. (We need
80
+ * not store the root of the tree as a node, and do not -- all we need are
81
+ * links to its kids.)
82
+ *
83
+ * Sidebar on for..in loop order: ECMA requires no particular order, but this
84
+ * implementation has promised and delivered property definition order, and
85
+ * compatibility is king. We could use an order number per property, which
86
+ * would require a sort in js_Enumerate, and an entry order generation number
87
+ * per scope. An order number beats a list, which should be doubly-linked for
88
+ * O(1) delete. An even better scheme is to use a parent link in the property
89
+ * tree, so that the ancestor line can be iterated from scope->lastProp when
90
+ * filling in a JSIdArray from back to front. This parent link also helps the
91
+ * GC to sweep properties iteratively.
92
+ *
93
+ * What if a property Y is deleted from a scope? If Y is the last property in
94
+ * the scope, we simply adjust the scope's lastProp member after we remove the
95
+ * scope's hash-table entry pointing at that property node. The parent link
96
+ * mentioned in the for..in sidebar above makes this adjustment O(1). But if
97
+ * Y comes between X and Z in the scope, then we might have to "fork" the tree
98
+ * at X, leaving X->Y->Z in case other scopes have those properties added in
99
+ * that order; and to finish the fork, we'd add a node labeled Z with the path
100
+ * X->Z, if it doesn't exist. This could lead to lots of extra nodes, and to
101
+ * O(n^2) growth when deleting lots of properties.
102
+ *
103
+ * Rather, for O(1) growth all around, we should share the path X->Y->Z among
104
+ * scopes having those three properties added in that order, and among scopes
105
+ * having only X->Z where Y was deleted. All such scopes have a lastProp that
106
+ * points to the Z child of Y. But a scope in which Y was deleted does not
107
+ * have a table entry for Y, and when iterating that scope by traversing the
108
+ * ancestor line from Z, we will have to test for a table entry for each node,
109
+ * skipping nodes that lack entries.
110
+ *
111
+ * What if we add Y again? X->Y->Z->Y is wrong and we'll enumerate Y twice.
112
+ * Therefore we must fork in such a case, if not earlier. Because delete is
113
+ * "bursty", we should not fork eagerly. Delaying a fork till we are at risk
114
+ * of adding Y after it was deleted already requires a flag in the JSScope, to
115
+ * wit, SCOPE_MIDDLE_DELETE.
116
+ *
117
+ * What about thread safety? If the property tree operations done by requests
118
+ * are find-node and insert-node, then the only hazard is duplicate insertion.
119
+ * This is harmless except for minor bloat. When all requests have ended or
120
+ * been suspended, the GC is free to sweep the tree after marking all nodes
121
+ * reachable from scopes, performing remove-node operations as needed.
122
+ *
123
+ * Is the property tree worth it compared to property storage in each table's
124
+ * entries? To decide, we must find the relation <> between the words used
125
+ * with a property tree and the words required without a tree.
126
+ *
127
+ * Model all scopes as one super-scope of capacity T entries (T a power of 2).
128
+ * Let alpha be the load factor of this double hash-table. With the property
129
+ * tree, each entry in the table is a word-sized pointer to a node that can be
130
+ * shared by many scopes. But all such pointers are overhead compared to the
131
+ * situation without the property tree, where the table stores property nodes
132
+ * directly, as entries each of size S words. With the property tree, we need
133
+ * L=2 extra words per node for siblings and kids pointers. Without the tree,
134
+ * (1-alpha)*S*T words are wasted on free or removed sentinel-entries required
135
+ * by double hashing.
136
+ *
137
+ * Therefore,
138
+ *
139
+ * (property tree) <> (no property tree)
140
+ * N*(S+L) + T <> S*T
141
+ * N*(S+L) + T <> P*S + (1-alpha)*S*T
142
+ * N*(S+L) + alpha*T + (1-alpha)*T <> P*S + (1-alpha)*S*T
143
+ *
144
+ * Note that P is alpha*T by definition, so
145
+ *
146
+ * N*(S+L) + P + (1-alpha)*T <> P*S + (1-alpha)*S*T
147
+ * N*(S+L) <> P*S - P + (1-alpha)*S*T - (1-alpha)*T
148
+ * N*(S+L) <> (P + (1-alpha)*T) * (S-1)
149
+ * N*(S+L) <> (P + (1-alpha)*P/alpha) * (S-1)
150
+ * N*(S+L) <> P * (1/alpha) * (S-1)
151
+ *
152
+ * Let N = P*beta for a compression ratio beta, beta <= 1:
153
+ *
154
+ * P*beta*(S+L) <> P * (1/alpha) * (S-1)
155
+ * beta*(S+L) <> (S-1)/alpha
156
+ * beta <> (S-1)/((S+L)*alpha)
157
+ *
158
+ * For S = 6 (32-bit architectures) and L = 2, the property tree wins iff
159
+ *
160
+ * beta < 5/(8*alpha)
161
+ *
162
+ * We ensure that alpha <= .75, so the property tree wins if beta < .83_. An
163
+ * average beta from recent Mozilla browser startups was around .6.
164
+ *
165
+ * Can we reduce L? Observe that the property tree degenerates into a list of
166
+ * lists if at most one property Y follows X in all scopes. In or near such a
167
+ * case, we waste a word on the right-sibling link outside of the root ply of
168
+ * the tree. Note also that the root ply tends to be large, so O(n^2) growth
169
+ * searching it is likely, indicating the need for hashing (but with increased
170
+ * thread safety costs).
171
+ *
172
+ * If only K out of N nodes in the property tree have more than one child, we
173
+ * could eliminate the sibling link and overlay a children list or hash-table
174
+ * pointer on the leftmost-child link (which would then be either null or an
175
+ * only-child link; the overlay could be tagged in the low bit of the pointer,
176
+ * or flagged elsewhere in the property tree node, although such a flag must
177
+ * not be considered when comparing node labels during tree search).
178
+ *
179
+ * For such a system, L = 1 + (K * averageChildrenTableSize) / N instead of 2.
180
+ * If K << N, L approaches 1 and the property tree wins if beta < .95.
181
+ *
182
+ * We observe that fan-out below the root ply of the property tree appears to
183
+ * have extremely low degree (see the MeterPropertyTree code that histograms
184
+ * child-counts in jsscope.c), so instead of a hash-table we use a linked list
185
+ * of child node pointer arrays ("kid chunks"). The details are isolated in
186
+ * jsscope.c; others must treat JSScopeProperty.kids as opaque. We leave it
187
+ * strongly typed for debug-ability of the common (null or one-kid) cases.
188
+ *
189
+ * One final twist (can you stand it?): the mean number of entries per scope
190
+ * in Mozilla is < 5, with a large standard deviation (~8). Instead of always
191
+ * allocating scope->table, we leave it null while initializing all the other
192
+ * scope members as if it were non-null and minimal-length. Until a property
193
+ * is added that crosses the threshold of 6 or more entries for hashing, or
194
+ * until a "middle delete" occurs, we use linear search from scope->lastProp
195
+ * to find a given id, and save on the space overhead of a hash table.
196
+ */
197
+
198
+ struct JSScope {
199
+ JSObjectMap map; /* base class state */
200
+ #ifdef JS_THREADSAFE
201
+ JSTitle title; /* lock state */
202
+ #endif
203
+ JSObject *object; /* object that owns this scope */
204
+ uint32 shape; /* property cache shape identifier */
205
+ uint8 flags; /* flags, see below */
206
+ int8 hashShift; /* multiplicative hash shift */
207
+ uint16 spare; /* reserved */
208
+ uint32 entryCount; /* number of entries in table */
209
+ uint32 removedCount; /* removed entry sentinels in table */
210
+ JSScopeProperty **table; /* table of ptrs to shared tree nodes */
211
+ JSScopeProperty *lastProp; /* pointer to last property added */
212
+ };
213
+
214
+ #ifdef JS_THREADSAFE
215
+ JS_STATIC_ASSERT(offsetof(JSScope, title) == sizeof(JSObjectMap));
216
+ #endif
217
+
218
+ #define JS_IS_SCOPE_LOCKED(cx, scope) JS_IS_TITLE_LOCKED(cx, &(scope)->title)
219
+
220
+ #define OBJ_SCOPE(obj) ((JSScope *)(obj)->map)
221
+ #define OBJ_SHAPE(obj) (OBJ_SCOPE(obj)->shape)
222
+
223
+ #define SCOPE_MAKE_UNIQUE_SHAPE(cx,scope) \
224
+ ((scope)->shape = js_GenerateShape((cx), JS_FALSE, NULL))
225
+
226
+ #define SCOPE_EXTEND_SHAPE(cx,scope,sprop) \
227
+ JS_BEGIN_MACRO \
228
+ if (!(scope)->lastProp || \
229
+ (scope)->shape == (scope)->lastProp->shape) { \
230
+ (scope)->shape = (sprop)->shape; \
231
+ } else { \
232
+ (scope)->shape = js_GenerateShape((cx), JS_FALSE, sprop); \
233
+ } \
234
+ JS_END_MACRO
235
+
236
+ /* By definition, hashShift = JS_DHASH_BITS - log2(capacity). */
237
+ #define SCOPE_CAPACITY(scope) JS_BIT(JS_DHASH_BITS-(scope)->hashShift)
238
+
239
+ /* Scope flags and some macros to hide them from other files than jsscope.c. */
240
+ #define SCOPE_MIDDLE_DELETE 0x0001
241
+ #define SCOPE_SEALED 0x0002
242
+ #define SCOPE_BRANDED 0x0004
243
+
244
+ #define SCOPE_HAD_MIDDLE_DELETE(scope) ((scope)->flags & SCOPE_MIDDLE_DELETE)
245
+ #define SCOPE_SET_MIDDLE_DELETE(scope) ((scope)->flags |= SCOPE_MIDDLE_DELETE)
246
+ #define SCOPE_CLR_MIDDLE_DELETE(scope) ((scope)->flags &= ~SCOPE_MIDDLE_DELETE)
247
+
248
+ #define SCOPE_IS_SEALED(scope) ((scope)->flags & SCOPE_SEALED)
249
+ #define SCOPE_SET_SEALED(scope) ((scope)->flags |= SCOPE_SEALED)
250
+ #if 0
251
+ /*
252
+ * Don't define this, it can't be done safely because JS_LOCK_OBJ will avoid
253
+ * taking the lock if the object owns its scope and the scope is sealed.
254
+ */
255
+ #undef SCOPE_CLR_SEALED(scope) ((scope)->flags &= ~SCOPE_SEALED)
256
+ #endif
257
+
258
+ /*
259
+ * A branded scope's object contains plain old methods (function-valued
260
+ * properties without magic getters and setters), and its scope->shape
261
+ * evolves whenever a function value changes.
262
+ */
263
+ #define SCOPE_IS_BRANDED(scope) ((scope)->flags & SCOPE_BRANDED)
264
+ #define SCOPE_SET_BRANDED(scope) ((scope)->flags |= SCOPE_BRANDED)
265
+ #define SCOPE_CLR_BRANDED(scope) ((scope)->flags &= ~SCOPE_BRANDED)
266
+
267
+ /*
268
+ * A little information hiding for scope->lastProp, in case it ever becomes
269
+ * a tagged pointer again.
270
+ */
271
+ #define SCOPE_LAST_PROP(scope) ((scope)->lastProp)
272
+ #define SCOPE_REMOVE_LAST_PROP(scope) ((scope)->lastProp = \
273
+ (scope)->lastProp->parent)
274
+
275
+ struct JSScopeProperty {
276
+ jsid id; /* int-tagged jsval/untagged JSAtom* */
277
+ JSPropertyOp getter; /* getter and setter hooks or objects */
278
+ JSPropertyOp setter;
279
+ uint32 slot; /* abstract index in object slots */
280
+ uint8 attrs; /* attributes, see jsapi.h JSPROP_* */
281
+ uint8 flags; /* flags, see below for defines */
282
+ int16 shortid; /* tinyid, or local arg/var index */
283
+ JSScopeProperty *parent; /* parent node, reverse for..in order */
284
+ JSScopeProperty *kids; /* null, single child, or a tagged ptr
285
+ to many-kids data structure */
286
+ uint32 shape; /* property cache shape identifier */
287
+ };
288
+
289
+ /* JSScopeProperty pointer tag bit indicating a collision. */
290
+ #define SPROP_COLLISION ((jsuword)1)
291
+ #define SPROP_REMOVED ((JSScopeProperty *) SPROP_COLLISION)
292
+
293
+ /* Macros to get and set sprop pointer values and collision flags. */
294
+ #define SPROP_IS_FREE(sprop) ((sprop) == NULL)
295
+ #define SPROP_IS_REMOVED(sprop) ((sprop) == SPROP_REMOVED)
296
+ #define SPROP_IS_LIVE(sprop) ((sprop) > SPROP_REMOVED)
297
+ #define SPROP_FLAG_COLLISION(spp,sprop) (*(spp) = (JSScopeProperty *) \
298
+ ((jsuword)(sprop) | SPROP_COLLISION))
299
+ #define SPROP_HAD_COLLISION(sprop) ((jsuword)(sprop) & SPROP_COLLISION)
300
+ #define SPROP_FETCH(spp) SPROP_CLEAR_COLLISION(*(spp))
301
+
302
+ #define SPROP_CLEAR_COLLISION(sprop) \
303
+ ((JSScopeProperty *) ((jsuword)(sprop) & ~SPROP_COLLISION))
304
+
305
+ #define SPROP_STORE_PRESERVING_COLLISION(spp, sprop) \
306
+ (*(spp) = (JSScopeProperty *) ((jsuword)(sprop) \
307
+ | SPROP_HAD_COLLISION(*(spp))))
308
+
309
+ /* Bits stored in sprop->flags. */
310
+ #define SPROP_MARK 0x01
311
+ #define SPROP_IS_ALIAS 0x02
312
+ #define SPROP_HAS_SHORTID 0x04
313
+ #define SPROP_FLAG_SHAPE_REGEN 0x08
314
+
315
+ /*
316
+ * If SPROP_HAS_SHORTID is set in sprop->flags, we use sprop->shortid rather
317
+ * than id when calling sprop's getter or setter.
318
+ */
319
+ #define SPROP_USERID(sprop) \
320
+ (((sprop)->flags & SPROP_HAS_SHORTID) ? INT_TO_JSVAL((sprop)->shortid) \
321
+ : ID_TO_VALUE((sprop)->id))
322
+
323
+ #define SPROP_INVALID_SLOT 0xffffffff
324
+
325
+ #define SLOT_IN_SCOPE(slot,scope) ((slot) < (scope)->map.freeslot)
326
+ #define SPROP_HAS_VALID_SLOT(sprop,scope) SLOT_IN_SCOPE((sprop)->slot, scope)
327
+
328
+ #define SPROP_HAS_STUB_GETTER(sprop) (!(sprop)->getter)
329
+ #define SPROP_HAS_STUB_SETTER(sprop) (!(sprop)->setter)
330
+
331
+ /*
332
+ * NB: SPROP_GET must not be called if SPROP_HAS_STUB_GETTER(sprop).
333
+ */
334
+ #define SPROP_GET(cx,sprop,obj,obj2,vp) \
335
+ (((sprop)->attrs & JSPROP_GETTER) \
336
+ ? js_InternalGetOrSet(cx, obj, (sprop)->id, \
337
+ OBJECT_TO_JSVAL((sprop)->getter), JSACC_READ, \
338
+ 0, 0, vp) \
339
+ : (sprop)->getter(cx, OBJ_THIS_OBJECT(cx,obj), SPROP_USERID(sprop), vp))
340
+
341
+ /*
342
+ * NB: SPROP_SET must not be called if (SPROP_HAS_STUB_SETTER(sprop) &&
343
+ * !(sprop->attrs & JSPROP_GETTER)).
344
+ */
345
+ #define SPROP_SET(cx,sprop,obj,obj2,vp) \
346
+ (((sprop)->attrs & JSPROP_SETTER) \
347
+ ? js_InternalGetOrSet(cx, obj, (sprop)->id, \
348
+ OBJECT_TO_JSVAL((sprop)->setter), JSACC_WRITE, \
349
+ 1, vp, vp) \
350
+ : ((sprop)->attrs & JSPROP_GETTER) \
351
+ ? (JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, \
352
+ JSMSG_GETTER_ONLY, NULL), JS_FALSE) \
353
+ : (sprop)->setter(cx, OBJ_THIS_OBJECT(cx,obj), SPROP_USERID(sprop), vp))
354
+
355
+ /* Macro for common expression to test for shared permanent attributes. */
356
+ #define SPROP_IS_SHARED_PERMANENT(sprop) \
357
+ ((~(sprop)->attrs & (JSPROP_SHARED | JSPROP_PERMANENT)) == 0)
358
+
359
+ extern JSScope *
360
+ js_GetMutableScope(JSContext *cx, JSObject *obj);
361
+
362
+ extern JSScope *
363
+ js_NewScope(JSContext *cx, jsrefcount nrefs, JSObjectOps *ops, JSClass *clasp,
364
+ JSObject *obj);
365
+
366
+ extern void
367
+ js_DestroyScope(JSContext *cx, JSScope *scope);
368
+
369
+ extern JS_FRIEND_API(JSScopeProperty **)
370
+ js_SearchScope(JSScope *scope, jsid id, JSBool adding);
371
+
372
+ #define SCOPE_GET_PROPERTY(scope, id) \
373
+ SPROP_FETCH(js_SearchScope(scope, id, JS_FALSE))
374
+
375
+ #define SCOPE_HAS_PROPERTY(scope, sprop) \
376
+ (SCOPE_GET_PROPERTY(scope, (sprop)->id) == (sprop))
377
+
378
+ extern JSScopeProperty *
379
+ js_AddScopeProperty(JSContext *cx, JSScope *scope, jsid id,
380
+ JSPropertyOp getter, JSPropertyOp setter, uint32 slot,
381
+ uintN attrs, uintN flags, intN shortid);
382
+
383
+ extern JSScopeProperty *
384
+ js_ChangeScopePropertyAttrs(JSContext *cx, JSScope *scope,
385
+ JSScopeProperty *sprop, uintN attrs, uintN mask,
386
+ JSPropertyOp getter, JSPropertyOp setter);
387
+
388
+ extern JSBool
389
+ js_RemoveScopeProperty(JSContext *cx, JSScope *scope, jsid id);
390
+
391
+ extern void
392
+ js_ClearScope(JSContext *cx, JSScope *scope);
393
+
394
+ /*
395
+ * These macros used to inline short code sequences, but they grew over time.
396
+ * We retain them for internal backward compatibility, and in case one or both
397
+ * ever shrink to inline-able size.
398
+ */
399
+ #define TRACE_ID(trc, id) js_TraceId(trc, id)
400
+ #define TRACE_SCOPE_PROPERTY(trc, sprop) js_TraceScopeProperty(trc, sprop)
401
+
402
+ extern void
403
+ js_TraceId(JSTracer *trc, jsid id);
404
+
405
+ extern void
406
+ js_TraceScopeProperty(JSTracer *trc, JSScopeProperty *sprop);
407
+
408
+ extern void
409
+ js_SweepScopeProperties(JSContext *cx);
410
+
411
+ extern JSBool
412
+ js_InitPropertyTree(JSRuntime *rt);
413
+
414
+ extern void
415
+ js_FinishPropertyTree(JSRuntime *rt);
416
+
417
+ JS_END_EXTERN_C
418
+
419
+ #endif /* jsscope_h___ */
@@ -0,0 +1,1891 @@
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
+ /*
42
+ * JS script operations.
43
+ */
44
+ #include "jsstddef.h"
45
+ #include <string.h>
46
+ #include "jstypes.h"
47
+ #include "jsutil.h" /* Added by JSIFY */
48
+ #include "jsprf.h"
49
+ #include "jsapi.h"
50
+ #include "jsatom.h"
51
+ #include "jscntxt.h"
52
+ #include "jsversion.h"
53
+ #include "jsdbgapi.h"
54
+ #include "jsemit.h"
55
+ #include "jsfun.h"
56
+ #include "jsinterp.h"
57
+ #include "jslock.h"
58
+ #include "jsnum.h"
59
+ #include "jsopcode.h"
60
+ #include "jsparse.h"
61
+ #include "jsscope.h"
62
+ #include "jsscript.h"
63
+ #if JS_HAS_XDR
64
+ #include "jsxdrapi.h"
65
+ #endif
66
+
67
+ #if JS_HAS_SCRIPT_OBJECT
68
+
69
+ static const char js_script_exec_str[] = "Script.prototype.exec";
70
+ static const char js_script_compile_str[] = "Script.prototype.compile";
71
+
72
+ /*
73
+ * This routine requires that obj has been locked previously.
74
+ */
75
+ static jsint
76
+ GetScriptExecDepth(JSContext *cx, JSObject *obj)
77
+ {
78
+ jsval v;
79
+
80
+ JS_ASSERT(JS_IS_OBJ_LOCKED(cx, obj));
81
+ v = LOCKED_OBJ_GET_SLOT(obj, JSSLOT_START(&js_ScriptClass));
82
+ return JSVAL_TO_INT(v);
83
+ }
84
+
85
+ static void
86
+ AdjustScriptExecDepth(JSContext *cx, JSObject *obj, jsint delta)
87
+ {
88
+ jsint execDepth;
89
+
90
+ JS_LOCK_OBJ(cx, obj);
91
+ execDepth = GetScriptExecDepth(cx, obj);
92
+ LOCKED_OBJ_SET_SLOT(obj, JSSLOT_START(&js_ScriptClass),
93
+ INT_TO_JSVAL(execDepth + delta));
94
+ JS_UNLOCK_OBJ(cx, obj);
95
+ }
96
+
97
+ #if JS_HAS_TOSOURCE
98
+ static JSBool
99
+ script_toSource(JSContext *cx, uintN argc, jsval *vp)
100
+ {
101
+ JSObject *obj;
102
+ uint32 indent;
103
+ JSScript *script;
104
+ size_t i, j, k, n;
105
+ char buf[16];
106
+ jschar *s, *t;
107
+ JSString *str;
108
+
109
+ obj = JS_THIS_OBJECT(cx, vp);
110
+ if (!JS_InstanceOf(cx, obj, &js_ScriptClass, vp + 2))
111
+ return JS_FALSE;
112
+
113
+ indent = 0;
114
+ if (argc != 0) {
115
+ indent = js_ValueToECMAUint32(cx, &vp[2]);
116
+ if (JSVAL_IS_NULL(vp[2]))
117
+ return JS_FALSE;
118
+ }
119
+
120
+ script = (JSScript *) JS_GetPrivate(cx, obj);
121
+
122
+ /* Let n count the source string length, j the "front porch" length. */
123
+ j = JS_snprintf(buf, sizeof buf, "(new %s(", js_ScriptClass.name);
124
+ n = j + 2;
125
+ if (!script) {
126
+ /* Let k count the constructor argument string length. */
127
+ k = 0;
128
+ s = NULL; /* quell GCC overwarning */
129
+ } else {
130
+ str = JS_DecompileScript(cx, script, "Script.prototype.toSource",
131
+ (uintN)indent);
132
+ if (!str)
133
+ return JS_FALSE;
134
+ str = js_QuoteString(cx, str, '\'');
135
+ if (!str)
136
+ return JS_FALSE;
137
+ JSSTRING_CHARS_AND_LENGTH(str, s, k);
138
+ n += k;
139
+ }
140
+
141
+ /* Allocate the source string and copy into it. */
142
+ t = (jschar *) JS_malloc(cx, (n + 1) * sizeof(jschar));
143
+ if (!t)
144
+ return JS_FALSE;
145
+ for (i = 0; i < j; i++)
146
+ t[i] = buf[i];
147
+ for (j = 0; j < k; i++, j++)
148
+ t[i] = s[j];
149
+ t[i++] = ')';
150
+ t[i++] = ')';
151
+ t[i] = 0;
152
+
153
+ /* Create and return a JS string for t. */
154
+ str = JS_NewUCString(cx, t, n);
155
+ if (!str) {
156
+ JS_free(cx, t);
157
+ return JS_FALSE;
158
+ }
159
+ *vp = STRING_TO_JSVAL(str);
160
+ return JS_TRUE;
161
+ }
162
+ #endif /* JS_HAS_TOSOURCE */
163
+
164
+ static JSBool
165
+ script_toString(JSContext *cx, uintN argc, jsval *vp)
166
+ {
167
+ uint32 indent;
168
+ JSObject *obj;
169
+ JSScript *script;
170
+ JSString *str;
171
+
172
+ indent = 0;
173
+ if (argc != 0) {
174
+ indent = js_ValueToECMAUint32(cx, &vp[2]);
175
+ if (JSVAL_IS_NULL(vp[2]))
176
+ return JS_FALSE;
177
+ }
178
+
179
+ obj = JS_THIS_OBJECT(cx, vp);
180
+ if (!JS_InstanceOf(cx, obj, &js_ScriptClass, vp + 2))
181
+ return JS_FALSE;
182
+ script = (JSScript *) JS_GetPrivate(cx, obj);
183
+ if (!script) {
184
+ *vp = STRING_TO_JSVAL(cx->runtime->emptyString);
185
+ return JS_TRUE;
186
+ }
187
+
188
+ str = JS_DecompileScript(cx, script, "Script.prototype.toString",
189
+ (uintN)indent);
190
+ if (!str)
191
+ return JS_FALSE;
192
+ *vp = STRING_TO_JSVAL(str);
193
+ return JS_TRUE;
194
+ }
195
+
196
+ static JSBool
197
+ script_compile_sub(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
198
+ jsval *rval)
199
+ {
200
+ JSString *str;
201
+ JSObject *scopeobj;
202
+ jsval v;
203
+ JSScript *script, *oldscript;
204
+ JSStackFrame *caller;
205
+ const char *file;
206
+ uintN line;
207
+ JSPrincipals *principals;
208
+ uint32 tcflags;
209
+ jsint execDepth;
210
+
211
+ /* Make sure obj is a Script object. */
212
+ if (!JS_InstanceOf(cx, obj, &js_ScriptClass, argv))
213
+ return JS_FALSE;
214
+
215
+ /* If no args, leave private undefined and return early. */
216
+ if (argc == 0)
217
+ goto out;
218
+
219
+ /* Otherwise, the first arg is the script source to compile. */
220
+ str = js_ValueToString(cx, argv[0]);
221
+ if (!str)
222
+ return JS_FALSE;
223
+ argv[0] = STRING_TO_JSVAL(str);
224
+
225
+ scopeobj = NULL;
226
+ if (argc >= 2) {
227
+ if (!js_ValueToObject(cx, argv[1], &scopeobj))
228
+ return JS_FALSE;
229
+ argv[1] = OBJECT_TO_JSVAL(scopeobj);
230
+ }
231
+
232
+ /* Compile using the caller's scope chain, which js_Invoke passes to fp. */
233
+ caller = JS_GetScriptedCaller(cx, cx->fp);
234
+ JS_ASSERT(!caller || cx->fp->scopeChain == caller->scopeChain);
235
+
236
+ if (caller) {
237
+ if (!scopeobj) {
238
+ scopeobj = js_GetScopeChain(cx, caller);
239
+ if (!scopeobj)
240
+ return JS_FALSE;
241
+ }
242
+
243
+ principals = JS_EvalFramePrincipals(cx, cx->fp, caller);
244
+ file = js_ComputeFilename(cx, caller, principals, &line);
245
+ } else {
246
+ file = NULL;
247
+ line = 0;
248
+ principals = NULL;
249
+ }
250
+
251
+ /* Ensure we compile this script with the right (inner) principals. */
252
+ scopeobj = js_CheckScopeChainValidity(cx, scopeobj, js_script_compile_str);
253
+ if (!scopeobj)
254
+ return JS_FALSE;
255
+
256
+ /*
257
+ * Compile the new script using the caller's scope chain, a la eval().
258
+ * Unlike jsobj.c:obj_eval, however, we do not pass TCF_COMPILE_N_GO in
259
+ * tcflags and use NULL for the callerFrame argument, because compilation
260
+ * is here separated from execution, and the run-time scope chain may not
261
+ * match the compile-time. TCF_COMPILE_N_GO is tested in jsemit.c and
262
+ * jsparse.c to optimize based on identity of run- and compile-time scope.
263
+ */
264
+ tcflags = 0;
265
+ script = js_CompileScript(cx, scopeobj, NULL, principals, tcflags,
266
+ JSSTRING_CHARS(str), JSSTRING_LENGTH(str),
267
+ NULL, file, line);
268
+ if (!script)
269
+ return JS_FALSE;
270
+
271
+ JS_LOCK_OBJ(cx, obj);
272
+ execDepth = GetScriptExecDepth(cx, obj);
273
+
274
+ /*
275
+ * execDepth must be 0 to allow compilation here, otherwise the JSScript
276
+ * struct can be released while running.
277
+ */
278
+ if (execDepth > 0) {
279
+ JS_UNLOCK_OBJ(cx, obj);
280
+ JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
281
+ JSMSG_COMPILE_EXECED_SCRIPT);
282
+ return JS_FALSE;
283
+ }
284
+
285
+ /* Swap script for obj's old script, if any. */
286
+ v = LOCKED_OBJ_GET_SLOT(obj, JSSLOT_PRIVATE);
287
+ oldscript = (JSScript*) (!JSVAL_IS_VOID(v) ? JSVAL_TO_PRIVATE(v) : NULL);
288
+ LOCKED_OBJ_SET_SLOT(obj, JSSLOT_PRIVATE, PRIVATE_TO_JSVAL(script));
289
+ JS_UNLOCK_OBJ(cx, obj);
290
+
291
+ if (oldscript)
292
+ js_DestroyScript(cx, oldscript);
293
+
294
+ script->u.object = obj;
295
+ js_CallNewScriptHook(cx, script, NULL);
296
+
297
+ out:
298
+ /* Return the object. */
299
+ *rval = OBJECT_TO_JSVAL(obj);
300
+ return JS_TRUE;
301
+ }
302
+
303
+ static JSBool
304
+ script_compile(JSContext *cx, uintN argc, jsval *vp)
305
+ {
306
+ return script_compile_sub(cx, JS_THIS_OBJECT(cx, vp), argc, vp + 2, vp);
307
+ }
308
+
309
+ static JSBool
310
+ script_exec_sub(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
311
+ jsval *rval)
312
+ {
313
+ JSObject *scopeobj, *parent;
314
+ JSStackFrame *fp, *caller;
315
+ JSPrincipals *principals;
316
+ JSScript *script;
317
+ JSBool ok;
318
+
319
+ if (!JS_InstanceOf(cx, obj, &js_ScriptClass, argv))
320
+ return JS_FALSE;
321
+
322
+ scopeobj = NULL;
323
+ if (argc != 0) {
324
+ if (!js_ValueToObject(cx, argv[0], &scopeobj))
325
+ return JS_FALSE;
326
+ argv[0] = OBJECT_TO_JSVAL(scopeobj);
327
+ }
328
+
329
+ /*
330
+ * Emulate eval() by using caller's this, var object, sharp array, etc.,
331
+ * all propagated by js_Execute via a non-null fourth (down) argument to
332
+ * js_Execute. If there is no scripted caller, js_Execute uses its second
333
+ * (chain) argument to set the exec frame's varobj, thisp, and scopeChain.
334
+ *
335
+ * Unlike eval, which the compiler detects, Script.prototype.exec may be
336
+ * called from a lightweight function, or even from native code (in which
337
+ * case fp->varobj and fp->scopeChain are null). If exec is called from
338
+ * a lightweight function, we will need to get a Call object representing
339
+ * its frame, to act as the var object and scope chain head.
340
+ */
341
+ fp = cx->fp;
342
+ caller = JS_GetScriptedCaller(cx, fp);
343
+ if (caller && !caller->varobj) {
344
+ /* Called from a lightweight function. */
345
+ JS_ASSERT(caller->fun && !JSFUN_HEAVYWEIGHT_TEST(caller->fun->flags));
346
+
347
+ /* Scope chain links from Call object to callee's parent. */
348
+ parent = OBJ_GET_PARENT(cx, caller->callee);
349
+ if (!js_GetCallObject(cx, caller, parent))
350
+ return JS_FALSE;
351
+ }
352
+
353
+ if (!scopeobj) {
354
+ /* No scope object passed in: try to use the caller's scope chain. */
355
+ if (caller) {
356
+ /*
357
+ * Load caller->scopeChain after the conditional js_GetCallObject
358
+ * call above, which resets scopeChain as well as varobj.
359
+ */
360
+ scopeobj = js_GetScopeChain(cx, caller);
361
+ if (!scopeobj)
362
+ return JS_FALSE;
363
+ } else {
364
+ /*
365
+ * Called from native code, so we don't know what scope object to
366
+ * use. We could use parent (see above), but Script.prototype.exec
367
+ * might be a shared/sealed "superglobal" method. A more general
368
+ * approach would use cx->globalObject, which will be the same as
369
+ * exec.__parent__ in the non-superglobal case. In the superglobal
370
+ * case it's the right object: the global, not the superglobal.
371
+ */
372
+ scopeobj = cx->globalObject;
373
+ }
374
+ }
375
+
376
+ scopeobj = js_CheckScopeChainValidity(cx, scopeobj, js_script_exec_str);
377
+ if (!scopeobj)
378
+ return JS_FALSE;
379
+
380
+ /* Keep track of nesting depth for the script. */
381
+ AdjustScriptExecDepth(cx, obj, 1);
382
+
383
+ /* Must get to out label after this */
384
+ script = (JSScript *) JS_GetPrivate(cx, obj);
385
+ if (!script) {
386
+ ok = JS_FALSE;
387
+ goto out;
388
+ }
389
+
390
+ /* Belt-and-braces: check that this script object has access to scopeobj. */
391
+ principals = script->principals;
392
+ ok = js_CheckPrincipalsAccess(cx, scopeobj, principals,
393
+ CLASS_ATOM(cx, Script));
394
+ if (!ok)
395
+ goto out;
396
+
397
+ ok = js_Execute(cx, scopeobj, script, caller, JSFRAME_EVAL, rval);
398
+
399
+ out:
400
+ AdjustScriptExecDepth(cx, obj, -1);
401
+ return ok;
402
+ }
403
+
404
+ static JSBool
405
+ script_exec(JSContext *cx, uintN argc, jsval *vp)
406
+ {
407
+ return script_exec_sub(cx, JS_THIS_OBJECT(cx, vp), argc, vp + 2, vp);
408
+ }
409
+
410
+ #endif /* JS_HAS_SCRIPT_OBJECT */
411
+
412
+ #if JS_HAS_XDR
413
+
414
+ JSBool
415
+ js_XDRScript(JSXDRState *xdr, JSScript **scriptp, JSBool *hasMagic)
416
+ {
417
+ JSContext *cx;
418
+ JSScript *script, *oldscript;
419
+ JSBool ok;
420
+ jsbytecode *code;
421
+ uint32 length, lineno, nslots, magic;
422
+ uint32 natoms, nsrcnotes, ntrynotes, nobjects, nupvars, nregexps, i;
423
+ uint32 prologLength, version;
424
+ JSTempValueRooter tvr;
425
+ JSPrincipals *principals;
426
+ uint32 encodeable;
427
+ JSBool filenameWasSaved;
428
+ jssrcnote *notes, *sn;
429
+ JSSecurityCallbacks *callbacks;
430
+
431
+ cx = xdr->cx;
432
+ script = *scriptp;
433
+ nsrcnotes = ntrynotes = natoms = nobjects = nupvars = nregexps = 0;
434
+ filenameWasSaved = JS_FALSE;
435
+ notes = NULL;
436
+
437
+ if (xdr->mode == JSXDR_ENCODE)
438
+ magic = JSXDR_MAGIC_SCRIPT_CURRENT;
439
+ if (!JS_XDRUint32(xdr, &magic))
440
+ return JS_FALSE;
441
+ if (magic != JSXDR_MAGIC_SCRIPT_CURRENT) {
442
+ /* We do not provide binary compatibility with older scripts. */
443
+ if (!hasMagic) {
444
+ JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
445
+ JSMSG_BAD_SCRIPT_MAGIC);
446
+ return JS_FALSE;
447
+ }
448
+ *hasMagic = JS_FALSE;
449
+ return JS_TRUE;
450
+ }
451
+ if (hasMagic)
452
+ *hasMagic = JS_TRUE;
453
+
454
+ if (xdr->mode == JSXDR_ENCODE) {
455
+ length = script->length;
456
+ prologLength = PTRDIFF(script->main, script->code, jsbytecode);
457
+ JS_ASSERT((int16)script->version != JSVERSION_UNKNOWN);
458
+ version = (uint32)script->version | (script->nfixed << 16);
459
+ lineno = (uint32)script->lineno;
460
+ nslots = (uint32)script->nslots;
461
+ nslots = (uint32)((script->staticDepth << 16) | script->nslots);
462
+ natoms = (uint32)script->atomMap.length;
463
+
464
+ /* Count the srcnotes, keeping notes pointing at the first one. */
465
+ notes = SCRIPT_NOTES(script);
466
+ for (sn = notes; !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn))
467
+ continue;
468
+ nsrcnotes = PTRDIFF(sn, notes, jssrcnote);
469
+ nsrcnotes++; /* room for the terminator */
470
+
471
+ if (script->objectsOffset != 0)
472
+ nobjects = JS_SCRIPT_OBJECTS(script)->length;
473
+ if (script->upvarsOffset != 0)
474
+ nupvars = JS_SCRIPT_UPVARS(script)->length;
475
+ if (script->regexpsOffset != 0)
476
+ nregexps = JS_SCRIPT_REGEXPS(script)->length;
477
+ if (script->trynotesOffset != 0)
478
+ ntrynotes = JS_SCRIPT_TRYNOTES(script)->length;
479
+ }
480
+
481
+ if (!JS_XDRUint32(xdr, &length))
482
+ return JS_FALSE;
483
+ if (!JS_XDRUint32(xdr, &prologLength))
484
+ return JS_FALSE;
485
+ if (!JS_XDRUint32(xdr, &version))
486
+ return JS_FALSE;
487
+
488
+ /*
489
+ * To fuse allocations, we need srcnote, atom, objects, upvar, regexp,
490
+ * and trynote counts early.
491
+ */
492
+ if (!JS_XDRUint32(xdr, &natoms))
493
+ return JS_FALSE;
494
+ if (!JS_XDRUint32(xdr, &nsrcnotes))
495
+ return JS_FALSE;
496
+ if (!JS_XDRUint32(xdr, &ntrynotes))
497
+ return JS_FALSE;
498
+ if (!JS_XDRUint32(xdr, &nobjects))
499
+ return JS_FALSE;
500
+ if (!JS_XDRUint32(xdr, &nupvars))
501
+ return JS_FALSE;
502
+ if (!JS_XDRUint32(xdr, &nregexps))
503
+ return JS_FALSE;
504
+
505
+ if (xdr->mode == JSXDR_DECODE) {
506
+ script = js_NewScript(cx, length, nsrcnotes, natoms, nobjects, nupvars,
507
+ nregexps, ntrynotes);
508
+ if (!script)
509
+ return JS_FALSE;
510
+
511
+ script->main += prologLength;
512
+ script->version = (JSVersion) (version & 0xffff);
513
+ script->nfixed = (uint16) (version >> 16);
514
+
515
+ /* If we know nsrcnotes, we allocated space for notes in script. */
516
+ notes = SCRIPT_NOTES(script);
517
+ *scriptp = script;
518
+ JS_PUSH_TEMP_ROOT_SCRIPT(cx, script, &tvr);
519
+ }
520
+
521
+ /*
522
+ * Control hereafter must goto error on failure, in order for the
523
+ * DECODE case to destroy script.
524
+ */
525
+ oldscript = xdr->script;
526
+ code = script->code;
527
+ if (xdr->mode == JSXDR_ENCODE) {
528
+ code = js_UntrapScriptCode(cx, script);
529
+ if (!code)
530
+ goto error;
531
+ }
532
+
533
+ xdr->script = script;
534
+ ok = JS_XDRBytes(xdr, (char *) code, length * sizeof(jsbytecode));
535
+
536
+ if (code != script->code)
537
+ JS_free(cx, code);
538
+
539
+ if (!ok)
540
+ goto error;
541
+
542
+ if (!JS_XDRBytes(xdr, (char *)notes, nsrcnotes * sizeof(jssrcnote)) ||
543
+ !JS_XDRCStringOrNull(xdr, (char **)&script->filename) ||
544
+ !JS_XDRUint32(xdr, &lineno) ||
545
+ !JS_XDRUint32(xdr, &nslots)) {
546
+ goto error;
547
+ }
548
+
549
+ callbacks = JS_GetSecurityCallbacks(cx);
550
+ if (xdr->mode == JSXDR_ENCODE) {
551
+ principals = script->principals;
552
+ encodeable = callbacks && callbacks->principalsTranscoder;
553
+ if (!JS_XDRUint32(xdr, &encodeable))
554
+ goto error;
555
+ if (encodeable &&
556
+ !callbacks->principalsTranscoder(xdr, &principals)) {
557
+ goto error;
558
+ }
559
+ } else {
560
+ if (!JS_XDRUint32(xdr, &encodeable))
561
+ goto error;
562
+ if (encodeable) {
563
+ if (!(callbacks && callbacks->principalsTranscoder)) {
564
+ JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
565
+ JSMSG_CANT_DECODE_PRINCIPALS);
566
+ goto error;
567
+ }
568
+ if (!callbacks->principalsTranscoder(xdr, &principals))
569
+ goto error;
570
+ script->principals = principals;
571
+ }
572
+ }
573
+
574
+ if (xdr->mode == JSXDR_DECODE) {
575
+ const char *filename = script->filename;
576
+ if (filename) {
577
+ filename = js_SaveScriptFilename(cx, filename);
578
+ if (!filename)
579
+ goto error;
580
+ JS_free(cx, (void *) script->filename);
581
+ script->filename = filename;
582
+ filenameWasSaved = JS_TRUE;
583
+ }
584
+ script->lineno = (uintN)lineno;
585
+ script->nslots = (uint16)nslots;
586
+ script->staticDepth = nslots >> 16;
587
+ }
588
+
589
+ for (i = 0; i != natoms; ++i) {
590
+ if (!js_XDRAtom(xdr, &script->atomMap.vector[i]))
591
+ goto error;
592
+ }
593
+
594
+ /*
595
+ * Here looping from 0-to-length to xdr objects is essential. It ensures
596
+ * that block objects from the script->objects array will be written and
597
+ * restored in the outer-to-inner order. block_xdrObject relies on this to
598
+ * restore the parent chain.
599
+ */
600
+ for (i = 0; i != nobjects; ++i) {
601
+ if (!js_XDRObject(xdr, &JS_SCRIPT_OBJECTS(script)->vector[i]))
602
+ goto error;
603
+ }
604
+ for (i = 0; i != nupvars; ++i) {
605
+ if (!JS_XDRUint32(xdr, &JS_SCRIPT_UPVARS(script)->vector[i]))
606
+ goto error;
607
+ }
608
+ for (i = 0; i != nregexps; ++i) {
609
+ if (!js_XDRObject(xdr, &JS_SCRIPT_REGEXPS(script)->vector[i]))
610
+ goto error;
611
+ }
612
+
613
+ if (ntrynotes != 0) {
614
+ /*
615
+ * We combine tn->kind and tn->stackDepth when serializing as XDR is not
616
+ * efficient when serializing small integer types.
617
+ */
618
+ JSTryNote *tn, *tnfirst;
619
+ uint32 kindAndDepth;
620
+ JS_STATIC_ASSERT(sizeof(tn->kind) == sizeof(uint8));
621
+ JS_STATIC_ASSERT(sizeof(tn->stackDepth) == sizeof(uint16));
622
+
623
+ tnfirst = JS_SCRIPT_TRYNOTES(script)->vector;
624
+ JS_ASSERT(JS_SCRIPT_TRYNOTES(script)->length == ntrynotes);
625
+ tn = tnfirst + ntrynotes;
626
+ do {
627
+ --tn;
628
+ if (xdr->mode == JSXDR_ENCODE) {
629
+ kindAndDepth = ((uint32)tn->kind << 16)
630
+ | (uint32)tn->stackDepth;
631
+ }
632
+ if (!JS_XDRUint32(xdr, &kindAndDepth) ||
633
+ !JS_XDRUint32(xdr, &tn->start) ||
634
+ !JS_XDRUint32(xdr, &tn->length)) {
635
+ goto error;
636
+ }
637
+ if (xdr->mode == JSXDR_DECODE) {
638
+ tn->kind = (uint8)(kindAndDepth >> 16);
639
+ tn->stackDepth = (uint16)kindAndDepth;
640
+ }
641
+ } while (tn != tnfirst);
642
+ }
643
+
644
+ xdr->script = oldscript;
645
+ if (xdr->mode == JSXDR_DECODE)
646
+ JS_POP_TEMP_ROOT(cx, &tvr);
647
+ return JS_TRUE;
648
+
649
+ error:
650
+ if (xdr->mode == JSXDR_DECODE) {
651
+ JS_POP_TEMP_ROOT(cx, &tvr);
652
+ if (script->filename && !filenameWasSaved) {
653
+ JS_free(cx, (void *) script->filename);
654
+ script->filename = NULL;
655
+ }
656
+ js_DestroyScript(cx, script);
657
+ *scriptp = NULL;
658
+ }
659
+ xdr->script = oldscript;
660
+ return JS_FALSE;
661
+ }
662
+
663
+ #if JS_HAS_SCRIPT_OBJECT && JS_HAS_XDR_FREEZE_THAW
664
+ /*
665
+ * These cannot be exposed to web content, and chrome does not need them, so
666
+ * we take them out of the Mozilla client altogether. Fortunately, there is
667
+ * no way to serialize a native function (see fun_xdrObject in jsfun.c).
668
+ */
669
+
670
+ static JSBool
671
+ script_freeze(JSContext *cx, uintN argc, jsval *vp)
672
+ {
673
+ JSObject *obj;
674
+ JSXDRState *xdr;
675
+ JSScript *script;
676
+ JSBool ok, hasMagic;
677
+ uint32 len;
678
+ void *buf;
679
+ JSString *str;
680
+
681
+ obj = JS_THIS_OBJECT(cx, vp);
682
+ if (!JS_InstanceOf(cx, obj, &js_ScriptClass, vp + 2))
683
+ return JS_FALSE;
684
+ script = (JSScript *) JS_GetPrivate(cx, obj);
685
+ if (!script)
686
+ return JS_TRUE;
687
+
688
+ /* create new XDR */
689
+ xdr = JS_XDRNewMem(cx, JSXDR_ENCODE);
690
+ if (!xdr)
691
+ return JS_FALSE;
692
+
693
+ /* write */
694
+ ok = js_XDRScript(xdr, &script, &hasMagic);
695
+ if (!ok)
696
+ goto out;
697
+ if (!hasMagic) {
698
+ *vp = JSVAL_VOID;
699
+ goto out;
700
+ }
701
+
702
+ buf = JS_XDRMemGetData(xdr, &len);
703
+ if (!buf) {
704
+ ok = JS_FALSE;
705
+ goto out;
706
+ }
707
+
708
+ JS_ASSERT((jsword)buf % sizeof(jschar) == 0);
709
+ len /= sizeof(jschar);
710
+ #if IS_BIG_ENDIAN
711
+ {
712
+ jschar *chars;
713
+ uint32 i;
714
+
715
+ /* Swap bytes in Unichars to keep frozen strings machine-independent. */
716
+ chars = (jschar *)buf;
717
+ for (i = 0; i < len; i++)
718
+ chars[i] = JSXDR_SWAB16(chars[i]);
719
+ }
720
+ #endif
721
+ str = JS_NewUCStringCopyN(cx, (jschar *)buf, len);
722
+ if (!str) {
723
+ ok = JS_FALSE;
724
+ goto out;
725
+ }
726
+
727
+ *vp = STRING_TO_JSVAL(str);
728
+
729
+ out:
730
+ JS_XDRDestroy(xdr);
731
+ return ok;
732
+ }
733
+
734
+ static JSBool
735
+ script_thaw(JSContext *cx, uintN argc, jsval *vp)
736
+ {
737
+ JSObject *obj;
738
+ JSXDRState *xdr;
739
+ JSString *str;
740
+ void *buf;
741
+ uint32 len;
742
+ jsval v;
743
+ JSScript *script, *oldscript;
744
+ JSBool ok, hasMagic;
745
+ jsint execDepth;
746
+
747
+ obj = JS_THIS_OBJECT(cx, vp);
748
+ if (!JS_InstanceOf(cx, obj, &js_ScriptClass, vp + 2))
749
+ return JS_FALSE;
750
+
751
+ if (argc == 0)
752
+ return JS_TRUE;
753
+ str = js_ValueToString(cx, vp[2]);
754
+ if (!str)
755
+ return JS_FALSE;
756
+ vp[2] = STRING_TO_JSVAL(str);
757
+
758
+ /* create new XDR */
759
+ xdr = JS_XDRNewMem(cx, JSXDR_DECODE);
760
+ if (!xdr)
761
+ return JS_FALSE;
762
+
763
+ JSSTRING_CHARS_AND_LENGTH(str, buf, len);
764
+ #if IS_BIG_ENDIAN
765
+ {
766
+ jschar *from, *to;
767
+ uint32 i;
768
+
769
+ /* Swap bytes in Unichars to keep frozen strings machine-independent. */
770
+ from = (jschar *)buf;
771
+ to = (jschar *) JS_malloc(cx, len * sizeof(jschar));
772
+ if (!to) {
773
+ JS_XDRDestroy(xdr);
774
+ return JS_FALSE;
775
+ }
776
+ for (i = 0; i < len; i++)
777
+ to[i] = JSXDR_SWAB16(from[i]);
778
+ buf = (char *)to;
779
+ }
780
+ #endif
781
+ len *= sizeof(jschar);
782
+ JS_XDRMemSetData(xdr, buf, len);
783
+
784
+ /* XXXbe should magic mismatch be error, or false return value? */
785
+ ok = js_XDRScript(xdr, &script, &hasMagic);
786
+ if (!ok)
787
+ goto out;
788
+ if (!hasMagic) {
789
+ *vp = JSVAL_FALSE;
790
+ goto out;
791
+ }
792
+
793
+ JS_LOCK_OBJ(cx, obj);
794
+ execDepth = GetScriptExecDepth(cx, obj);
795
+
796
+ /*
797
+ * execDepth must be 0 to allow compilation here, otherwise the JSScript
798
+ * struct can be released while running.
799
+ */
800
+ if (execDepth > 0) {
801
+ JS_UNLOCK_OBJ(cx, obj);
802
+ JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
803
+ JSMSG_COMPILE_EXECED_SCRIPT);
804
+ goto out;
805
+ }
806
+
807
+ /* Swap script for obj's old script, if any. */
808
+ v = LOCKED_OBJ_GET_SLOT(obj, JSSLOT_PRIVATE);
809
+ oldscript = !JSVAL_IS_VOID(v) ? JSVAL_TO_PRIVATE(v) : NULL;
810
+ LOCKED_OBJ_SET_SLOT(obj, JSSLOT_PRIVATE, PRIVATE_TO_JSVAL(script));
811
+ JS_UNLOCK_OBJ(cx, obj);
812
+
813
+ if (oldscript)
814
+ js_DestroyScript(cx, oldscript);
815
+
816
+ script->u.object = obj;
817
+ js_CallNewScriptHook(cx, script, NULL);
818
+
819
+ out:
820
+ /*
821
+ * We reset the buffer to be NULL so that it doesn't free the chars
822
+ * memory owned by str (vp[2]).
823
+ */
824
+ JS_XDRMemSetData(xdr, NULL, 0);
825
+ JS_XDRDestroy(xdr);
826
+ #if IS_BIG_ENDIAN
827
+ JS_free(cx, buf);
828
+ #endif
829
+ *vp = JSVAL_TRUE;
830
+ return ok;
831
+ }
832
+
833
+ static const char js_thaw_str[] = "thaw";
834
+
835
+ #endif /* JS_HAS_SCRIPT_OBJECT && JS_HAS_XDR_FREEZE_THAW */
836
+ #endif /* JS_HAS_XDR */
837
+
838
+ #if JS_HAS_SCRIPT_OBJECT
839
+
840
+ static JSFunctionSpec script_methods[] = {
841
+ #if JS_HAS_TOSOURCE
842
+ JS_FN(js_toSource_str, script_toSource, 0,0),
843
+ #endif
844
+ JS_FN(js_toString_str, script_toString, 0,0),
845
+ JS_FN("compile", script_compile, 2,0),
846
+ JS_FN("exec", script_exec, 1,0),
847
+ #if JS_HAS_XDR_FREEZE_THAW
848
+ JS_FN("freeze", script_freeze, 0,0),
849
+ JS_FN(js_thaw_str, script_thaw, 1,0),
850
+ #endif /* JS_HAS_XDR_FREEZE_THAW */
851
+ JS_FS_END
852
+ };
853
+
854
+ #endif /* JS_HAS_SCRIPT_OBJECT */
855
+
856
+ static void
857
+ script_finalize(JSContext *cx, JSObject *obj)
858
+ {
859
+ JSScript *script;
860
+
861
+ script = (JSScript *) JS_GetPrivate(cx, obj);
862
+ if (script)
863
+ js_DestroyScript(cx, script);
864
+ }
865
+
866
+ static JSBool
867
+ script_call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
868
+ {
869
+ #if JS_HAS_SCRIPT_OBJECT
870
+ return script_exec_sub(cx, JSVAL_TO_OBJECT(argv[-2]), argc, argv, rval);
871
+ #else
872
+ return JS_FALSE;
873
+ #endif
874
+ }
875
+
876
+ static void
877
+ script_trace(JSTracer *trc, JSObject *obj)
878
+ {
879
+ JSScript *script;
880
+
881
+ script = (JSScript *) JS_GetPrivate(trc->context, obj);
882
+ if (script)
883
+ js_TraceScript(trc, script);
884
+ }
885
+
886
+ #if !JS_HAS_SCRIPT_OBJECT
887
+ #define JSProto_Script JSProto_Object
888
+ #endif
889
+
890
+ JS_FRIEND_DATA(JSClass) js_ScriptClass = {
891
+ js_Script_str,
892
+ JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(1) |
893
+ JSCLASS_MARK_IS_TRACE | JSCLASS_HAS_CACHED_PROTO(JSProto_Script),
894
+ JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
895
+ JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, script_finalize,
896
+ NULL, NULL, script_call, NULL,/*XXXbe xdr*/
897
+ NULL, NULL, JS_CLASS_TRACE(script_trace), NULL
898
+ };
899
+
900
+ #if JS_HAS_SCRIPT_OBJECT
901
+
902
+ static JSBool
903
+ Script(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
904
+ {
905
+ /* If not constructing, replace obj with a new Script object. */
906
+ if (!(cx->fp->flags & JSFRAME_CONSTRUCTING)) {
907
+ obj = js_NewObject(cx, &js_ScriptClass, NULL, NULL, 0);
908
+ if (!obj)
909
+ return JS_FALSE;
910
+
911
+ /*
912
+ * script_compile_sub does not use rval to root its temporaries so we
913
+ * can use it to root obj.
914
+ */
915
+ *rval = OBJECT_TO_JSVAL(obj);
916
+ }
917
+
918
+ if (!JS_SetReservedSlot(cx, obj, 0, INT_TO_JSVAL(0)))
919
+ return JS_FALSE;
920
+
921
+ return script_compile_sub(cx, obj, argc, argv, rval);
922
+ }
923
+
924
+ #if JS_HAS_SCRIPT_OBJECT && JS_HAS_XDR_FREEZE_THAW
925
+
926
+ static JSBool
927
+ script_static_thaw(JSContext *cx, uintN argc, jsval *vp)
928
+ {
929
+ JSObject *obj;
930
+
931
+ obj = js_NewObject(cx, &js_ScriptClass, NULL, NULL);
932
+ if (!obj)
933
+ return JS_FALSE;
934
+ vp[1] = OBJECT_TO_JSVAL(obj);
935
+ if (!script_thaw(cx, argc, vp))
936
+ return JS_FALSE;
937
+ *vp = OBJECT_TO_JSVAL(obj);
938
+ return JS_TRUE;
939
+ }
940
+
941
+ static JSFunctionSpec script_static_methods[] = {
942
+ JS_FN(js_thaw_str, script_static_thaw, 1,0),
943
+ JS_FS_END
944
+ };
945
+
946
+ #else /* !JS_HAS_SCRIPT_OBJECT || !JS_HAS_XDR_FREEZE_THAW */
947
+
948
+ #define script_static_methods NULL
949
+
950
+ #endif /* !JS_HAS_SCRIPT_OBJECT || !JS_HAS_XDR_FREEZE_THAW */
951
+
952
+ JSObject *
953
+ js_InitScriptClass(JSContext *cx, JSObject *obj)
954
+ {
955
+ return JS_InitClass(cx, obj, NULL, &js_ScriptClass, Script, 1,
956
+ NULL, script_methods, NULL, script_static_methods);
957
+ }
958
+
959
+ #endif /* JS_HAS_SCRIPT_OBJECT */
960
+
961
+ /*
962
+ * Shared script filename management.
963
+ */
964
+ static int
965
+ js_compare_strings(const void *k1, const void *k2)
966
+ {
967
+ return strcmp((const char *) k1, (const char *) k2) == 0;
968
+ }
969
+
970
+ /* NB: This struct overlays JSHashEntry -- see jshash.h, do not reorganize. */
971
+ typedef struct ScriptFilenameEntry {
972
+ JSHashEntry *next; /* hash chain linkage */
973
+ JSHashNumber keyHash; /* key hash function result */
974
+ const void *key; /* ptr to filename, below */
975
+ uint32 flags; /* user-defined filename prefix flags */
976
+ JSPackedBool mark; /* GC mark flag */
977
+ char filename[3]; /* two or more bytes, NUL-terminated */
978
+ } ScriptFilenameEntry;
979
+
980
+ static void *
981
+ js_alloc_table_space(void *priv, size_t size)
982
+ {
983
+ return malloc(size);
984
+ }
985
+
986
+ static void
987
+ js_free_table_space(void *priv, void *item)
988
+ {
989
+ free(item);
990
+ }
991
+
992
+ static JSHashEntry *
993
+ js_alloc_sftbl_entry(void *priv, const void *key)
994
+ {
995
+ size_t nbytes = offsetof(ScriptFilenameEntry, filename) +
996
+ strlen((const char *) key) + 1;
997
+
998
+ return (JSHashEntry *) malloc(JS_MAX(nbytes, sizeof(JSHashEntry)));
999
+ }
1000
+
1001
+ static void
1002
+ js_free_sftbl_entry(void *priv, JSHashEntry *he, uintN flag)
1003
+ {
1004
+ if (flag != HT_FREE_ENTRY)
1005
+ return;
1006
+ free(he);
1007
+ }
1008
+
1009
+ static JSHashAllocOps sftbl_alloc_ops = {
1010
+ js_alloc_table_space, js_free_table_space,
1011
+ js_alloc_sftbl_entry, js_free_sftbl_entry
1012
+ };
1013
+
1014
+ JSBool
1015
+ js_InitRuntimeScriptState(JSRuntime *rt)
1016
+ {
1017
+ #ifdef JS_THREADSAFE
1018
+ JS_ASSERT(!rt->scriptFilenameTableLock);
1019
+ rt->scriptFilenameTableLock = JS_NEW_LOCK();
1020
+ if (!rt->scriptFilenameTableLock)
1021
+ return JS_FALSE;
1022
+ #endif
1023
+ JS_ASSERT(!rt->scriptFilenameTable);
1024
+ rt->scriptFilenameTable =
1025
+ JS_NewHashTable(16, JS_HashString, js_compare_strings, NULL,
1026
+ &sftbl_alloc_ops, NULL);
1027
+ if (!rt->scriptFilenameTable) {
1028
+ js_FinishRuntimeScriptState(rt); /* free lock if threadsafe */
1029
+ return JS_FALSE;
1030
+ }
1031
+ JS_INIT_CLIST(&rt->scriptFilenamePrefixes);
1032
+ return JS_TRUE;
1033
+ }
1034
+
1035
+ typedef struct ScriptFilenamePrefix {
1036
+ JSCList links; /* circular list linkage for easy deletion */
1037
+ const char *name; /* pointer to pinned ScriptFilenameEntry string */
1038
+ size_t length; /* prefix string length, precomputed */
1039
+ uint32 flags; /* user-defined flags to inherit from this prefix */
1040
+ } ScriptFilenamePrefix;
1041
+
1042
+ void
1043
+ js_FinishRuntimeScriptState(JSRuntime *rt)
1044
+ {
1045
+ if (rt->scriptFilenameTable) {
1046
+ JS_HashTableDestroy(rt->scriptFilenameTable);
1047
+ rt->scriptFilenameTable = NULL;
1048
+ }
1049
+ #ifdef JS_THREADSAFE
1050
+ if (rt->scriptFilenameTableLock) {
1051
+ JS_DESTROY_LOCK(rt->scriptFilenameTableLock);
1052
+ rt->scriptFilenameTableLock = NULL;
1053
+ }
1054
+ #endif
1055
+ }
1056
+
1057
+ void
1058
+ js_FreeRuntimeScriptState(JSRuntime *rt)
1059
+ {
1060
+ ScriptFilenamePrefix *sfp;
1061
+
1062
+ if (!rt->scriptFilenameTable)
1063
+ return;
1064
+
1065
+ while (!JS_CLIST_IS_EMPTY(&rt->scriptFilenamePrefixes)) {
1066
+ sfp = (ScriptFilenamePrefix *) rt->scriptFilenamePrefixes.next;
1067
+ JS_REMOVE_LINK(&sfp->links);
1068
+ free(sfp);
1069
+ }
1070
+ js_FinishRuntimeScriptState(rt);
1071
+ }
1072
+
1073
+ #ifdef DEBUG_brendan
1074
+ #define DEBUG_SFTBL
1075
+ #endif
1076
+ #ifdef DEBUG_SFTBL
1077
+ size_t sftbl_savings = 0;
1078
+ #endif
1079
+
1080
+ static ScriptFilenameEntry *
1081
+ SaveScriptFilename(JSRuntime *rt, const char *filename, uint32 flags)
1082
+ {
1083
+ JSHashTable *table;
1084
+ JSHashNumber hash;
1085
+ JSHashEntry **hep;
1086
+ ScriptFilenameEntry *sfe;
1087
+ size_t length;
1088
+ JSCList *head, *link;
1089
+ ScriptFilenamePrefix *sfp;
1090
+
1091
+ table = rt->scriptFilenameTable;
1092
+ hash = JS_HashString(filename);
1093
+ hep = JS_HashTableRawLookup(table, hash, filename);
1094
+ sfe = (ScriptFilenameEntry *) *hep;
1095
+ #ifdef DEBUG_SFTBL
1096
+ if (sfe)
1097
+ sftbl_savings += strlen(sfe->filename);
1098
+ #endif
1099
+
1100
+ if (!sfe) {
1101
+ sfe = (ScriptFilenameEntry *)
1102
+ JS_HashTableRawAdd(table, hep, hash, filename, NULL);
1103
+ if (!sfe)
1104
+ return NULL;
1105
+ sfe->key = strcpy(sfe->filename, filename);
1106
+ sfe->flags = 0;
1107
+ sfe->mark = JS_FALSE;
1108
+ }
1109
+
1110
+ /* If saving a prefix, add it to the set in rt->scriptFilenamePrefixes. */
1111
+ if (flags != 0) {
1112
+ /* Search in case filename was saved already; we must be idempotent. */
1113
+ sfp = NULL;
1114
+ length = strlen(filename);
1115
+ for (head = link = &rt->scriptFilenamePrefixes;
1116
+ link->next != head;
1117
+ link = link->next) {
1118
+ /* Lag link behind sfp to insert in non-increasing length order. */
1119
+ sfp = (ScriptFilenamePrefix *) link->next;
1120
+ if (!strcmp(sfp->name, filename))
1121
+ break;
1122
+ if (sfp->length <= length) {
1123
+ sfp = NULL;
1124
+ break;
1125
+ }
1126
+ sfp = NULL;
1127
+ }
1128
+
1129
+ if (!sfp) {
1130
+ /* No such prefix: add one now. */
1131
+ sfp = (ScriptFilenamePrefix *) malloc(sizeof(ScriptFilenamePrefix));
1132
+ if (!sfp)
1133
+ return NULL;
1134
+ JS_INSERT_AFTER(&sfp->links, link);
1135
+ sfp->name = sfe->filename;
1136
+ sfp->length = length;
1137
+ sfp->flags = 0;
1138
+ }
1139
+
1140
+ /*
1141
+ * Accumulate flags in both sfe and sfp: sfe for later access from the
1142
+ * JS_GetScriptedCallerFilenameFlags debug-API, and sfp so that longer
1143
+ * filename entries can inherit by prefix.
1144
+ */
1145
+ sfe->flags |= flags;
1146
+ sfp->flags |= flags;
1147
+ }
1148
+
1149
+ return sfe;
1150
+ }
1151
+
1152
+ const char *
1153
+ js_SaveScriptFilename(JSContext *cx, const char *filename)
1154
+ {
1155
+ JSRuntime *rt;
1156
+ ScriptFilenameEntry *sfe;
1157
+ JSCList *head, *link;
1158
+ ScriptFilenamePrefix *sfp;
1159
+
1160
+ rt = cx->runtime;
1161
+ JS_ACQUIRE_LOCK(rt->scriptFilenameTableLock);
1162
+ sfe = SaveScriptFilename(rt, filename, 0);
1163
+ if (!sfe) {
1164
+ JS_RELEASE_LOCK(rt->scriptFilenameTableLock);
1165
+ JS_ReportOutOfMemory(cx);
1166
+ return NULL;
1167
+ }
1168
+
1169
+ /*
1170
+ * Try to inherit flags by prefix. We assume there won't be more than a
1171
+ * few (dozen! ;-) prefixes, so linear search is tolerable.
1172
+ * XXXbe every time I've assumed that in the JS engine, I've been wrong!
1173
+ */
1174
+ for (head = &rt->scriptFilenamePrefixes, link = head->next;
1175
+ link != head;
1176
+ link = link->next) {
1177
+ sfp = (ScriptFilenamePrefix *) link;
1178
+ if (!strncmp(sfp->name, filename, sfp->length)) {
1179
+ sfe->flags |= sfp->flags;
1180
+ break;
1181
+ }
1182
+ }
1183
+ JS_RELEASE_LOCK(rt->scriptFilenameTableLock);
1184
+ return sfe->filename;
1185
+ }
1186
+
1187
+ const char *
1188
+ js_SaveScriptFilenameRT(JSRuntime *rt, const char *filename, uint32 flags)
1189
+ {
1190
+ ScriptFilenameEntry *sfe;
1191
+
1192
+ /* This may be called very early, via the jsdbgapi.h entry point. */
1193
+ if (!rt->scriptFilenameTable && !js_InitRuntimeScriptState(rt))
1194
+ return NULL;
1195
+
1196
+ JS_ACQUIRE_LOCK(rt->scriptFilenameTableLock);
1197
+ sfe = SaveScriptFilename(rt, filename, flags);
1198
+ JS_RELEASE_LOCK(rt->scriptFilenameTableLock);
1199
+ if (!sfe)
1200
+ return NULL;
1201
+
1202
+ return sfe->filename;
1203
+ }
1204
+
1205
+ /*
1206
+ * Back up from a saved filename by its offset within its hash table entry.
1207
+ */
1208
+ #define FILENAME_TO_SFE(fn) \
1209
+ ((ScriptFilenameEntry *) ((fn) - offsetof(ScriptFilenameEntry, filename)))
1210
+
1211
+ /*
1212
+ * The sfe->key member, redundant given sfe->filename but required by the old
1213
+ * jshash.c code, here gives us a useful sanity check. This assertion will
1214
+ * very likely botch if someone tries to mark a string that wasn't allocated
1215
+ * as an sfe->filename.
1216
+ */
1217
+ #define ASSERT_VALID_SFE(sfe) JS_ASSERT((sfe)->key == (sfe)->filename)
1218
+
1219
+ uint32
1220
+ js_GetScriptFilenameFlags(const char *filename)
1221
+ {
1222
+ ScriptFilenameEntry *sfe;
1223
+
1224
+ sfe = FILENAME_TO_SFE(filename);
1225
+ ASSERT_VALID_SFE(sfe);
1226
+ return sfe->flags;
1227
+ }
1228
+
1229
+ void
1230
+ js_MarkScriptFilename(const char *filename)
1231
+ {
1232
+ ScriptFilenameEntry *sfe;
1233
+
1234
+ sfe = FILENAME_TO_SFE(filename);
1235
+ ASSERT_VALID_SFE(sfe);
1236
+ sfe->mark = JS_TRUE;
1237
+ }
1238
+
1239
+ static intN
1240
+ js_script_filename_marker(JSHashEntry *he, intN i, void *arg)
1241
+ {
1242
+ ScriptFilenameEntry *sfe = (ScriptFilenameEntry *) he;
1243
+
1244
+ sfe->mark = JS_TRUE;
1245
+ return HT_ENUMERATE_NEXT;
1246
+ }
1247
+
1248
+ void
1249
+ js_MarkScriptFilenames(JSRuntime *rt, JSBool keepAtoms)
1250
+ {
1251
+ JSCList *head, *link;
1252
+ ScriptFilenamePrefix *sfp;
1253
+
1254
+ if (!rt->scriptFilenameTable)
1255
+ return;
1256
+
1257
+ if (keepAtoms) {
1258
+ JS_HashTableEnumerateEntries(rt->scriptFilenameTable,
1259
+ js_script_filename_marker,
1260
+ rt);
1261
+ }
1262
+ for (head = &rt->scriptFilenamePrefixes, link = head->next;
1263
+ link != head;
1264
+ link = link->next) {
1265
+ sfp = (ScriptFilenamePrefix *) link;
1266
+ js_MarkScriptFilename(sfp->name);
1267
+ }
1268
+ }
1269
+
1270
+ static intN
1271
+ js_script_filename_sweeper(JSHashEntry *he, intN i, void *arg)
1272
+ {
1273
+ ScriptFilenameEntry *sfe = (ScriptFilenameEntry *) he;
1274
+
1275
+ if (!sfe->mark)
1276
+ return HT_ENUMERATE_REMOVE;
1277
+ sfe->mark = JS_FALSE;
1278
+ return HT_ENUMERATE_NEXT;
1279
+ }
1280
+
1281
+ void
1282
+ js_SweepScriptFilenames(JSRuntime *rt)
1283
+ {
1284
+ if (!rt->scriptFilenameTable)
1285
+ return;
1286
+
1287
+ JS_HashTableEnumerateEntries(rt->scriptFilenameTable,
1288
+ js_script_filename_sweeper,
1289
+ rt);
1290
+ #ifdef DEBUG_notme
1291
+ #ifdef DEBUG_SFTBL
1292
+ printf("script filename table savings so far: %u\n", sftbl_savings);
1293
+ #endif
1294
+ #endif
1295
+ }
1296
+
1297
+ /*
1298
+ * JSScript data structures memory alignment:
1299
+ *
1300
+ * JSScript
1301
+ * JSObjectArray script objects' descriptor if JSScript.objectsOffset != 0,
1302
+ * use JS_SCRIPT_OBJECTS(script) macro to access it.
1303
+ * JSObjectArray script regexps' descriptor if JSScript.regexpsOffset != 0,
1304
+ * use JS_SCRIPT_REGEXPS(script) macro to access it.
1305
+ * JSTryNoteArray script try notes' descriptor if JSScript.tryNotesOffset
1306
+ * != 0, use JS_SCRIPT_TRYNOTES(script) macro to access it.
1307
+ * JSAtom *a[] array of JSScript.atomMap.length atoms pointed by
1308
+ * JSScript.atomMap.vector if any.
1309
+ * JSObject *o[] array of JS_SCRIPT_OBJECTS(script)->length objects if any
1310
+ * pointed by JS_SCRIPT_OBJECTS(script)->vector.
1311
+ * JSObject *r[] array of JS_SCRIPT_REGEXPS(script)->length regexps if any
1312
+ * pointed by JS_SCRIPT_REGEXPS(script)->vector.
1313
+ * JSTryNote t[] array of JS_SCRIPT_TRYNOTES(script)->length try notes if any
1314
+ * pointed by JS_SCRIPT_TRYNOTES(script)->vector.
1315
+ * jsbytecode b[] script bytecode pointed by JSScript.code.
1316
+ * jssrcnote s[] script source notes, use SCRIPT_NOTES(script) to access it
1317
+ *
1318
+ * The alignment avoids gaps between entries as alignment requirement for each
1319
+ * subsequent structure or array is the same or divides the alignment
1320
+ * requirement for the previous one.
1321
+ *
1322
+ * The followings asserts checks that assuming that the alignment requirement
1323
+ * for JSObjectArray and JSTryNoteArray are sizeof(void *) and for JSTryNote
1324
+ * it is sizeof(uint32) as the structure consists of 3 uint32 fields.
1325
+ */
1326
+ JS_STATIC_ASSERT(sizeof(JSScript) % sizeof(void *) == 0);
1327
+ JS_STATIC_ASSERT(sizeof(JSObjectArray) % sizeof(void *) == 0);
1328
+ JS_STATIC_ASSERT(sizeof(JSTryNoteArray) == sizeof(JSObjectArray));
1329
+ JS_STATIC_ASSERT(sizeof(JSAtom *) == sizeof(JSObject *));
1330
+ JS_STATIC_ASSERT(sizeof(JSObject *) % sizeof(uint32) == 0);
1331
+ JS_STATIC_ASSERT(sizeof(JSTryNote) == 3 * sizeof(uint32));
1332
+ JS_STATIC_ASSERT(sizeof(uint32) % sizeof(jsbytecode) == 0);
1333
+ JS_STATIC_ASSERT(sizeof(jsbytecode) % sizeof(jssrcnote) == 0);
1334
+
1335
+ /*
1336
+ * Check that uint8 offset for object, upvar, regexp, and try note arrays is
1337
+ * sufficient.
1338
+ */
1339
+ JS_STATIC_ASSERT(sizeof(JSScript) + 2 * sizeof(JSObjectArray) +
1340
+ sizeof(JSUpvarArray) < JS_BIT(8));
1341
+
1342
+ JSScript *
1343
+ js_NewScript(JSContext *cx, uint32 length, uint32 nsrcnotes, uint32 natoms,
1344
+ uint32 nobjects, uint32 nupvars, uint32 nregexps,
1345
+ uint32 ntrynotes)
1346
+ {
1347
+ size_t size, vectorSize;
1348
+ JSScript *script;
1349
+ uint8 *cursor;
1350
+
1351
+ size = sizeof(JSScript) +
1352
+ sizeof(JSAtom *) * natoms +
1353
+ length * sizeof(jsbytecode) +
1354
+ nsrcnotes * sizeof(jssrcnote);
1355
+ if (nobjects != 0)
1356
+ size += sizeof(JSObjectArray) + nobjects * sizeof(JSObject *);
1357
+ if (nupvars != 0)
1358
+ size += sizeof(JSUpvarArray) + nupvars * sizeof(uint32);
1359
+ if (nregexps != 0)
1360
+ size += sizeof(JSObjectArray) + nregexps * sizeof(JSObject *);
1361
+ if (ntrynotes != 0)
1362
+ size += sizeof(JSTryNoteArray) + ntrynotes * sizeof(JSTryNote);
1363
+
1364
+ script = (JSScript *) JS_malloc(cx, size);
1365
+ if (!script)
1366
+ return NULL;
1367
+ memset(script, 0, sizeof(JSScript));
1368
+ script->length = length;
1369
+ script->version = cx->version;
1370
+
1371
+ cursor = (uint8 *)script + sizeof(JSScript);
1372
+ if (nobjects != 0) {
1373
+ script->objectsOffset = (uint8)(cursor - (uint8 *)script);
1374
+ cursor += sizeof(JSObjectArray);
1375
+ }
1376
+ if (nupvars != 0) {
1377
+ script->upvarsOffset = (uint8)(cursor - (uint8 *)script);
1378
+ cursor += sizeof(JSUpvarArray);
1379
+ }
1380
+ if (nregexps != 0) {
1381
+ script->regexpsOffset = (uint8)(cursor - (uint8 *)script);
1382
+ cursor += sizeof(JSObjectArray);
1383
+ }
1384
+ if (ntrynotes != 0) {
1385
+ script->trynotesOffset = (uint8)(cursor - (uint8 *)script);
1386
+ cursor += sizeof(JSTryNoteArray);
1387
+ }
1388
+
1389
+ if (natoms != 0) {
1390
+ script->atomMap.length = natoms;
1391
+ script->atomMap.vector = (JSAtom **)cursor;
1392
+ vectorSize = natoms * sizeof(script->atomMap.vector[0]);
1393
+
1394
+ /*
1395
+ * Clear object map's vector so the GC tracing can run when not yet
1396
+ * all atoms are copied to the array.
1397
+ */
1398
+ memset(cursor, 0, vectorSize);
1399
+ cursor += vectorSize;
1400
+ }
1401
+
1402
+ if (nobjects != 0) {
1403
+ JS_SCRIPT_OBJECTS(script)->length = nobjects;
1404
+ JS_SCRIPT_OBJECTS(script)->vector = (JSObject **)cursor;
1405
+ vectorSize = nobjects * sizeof(JS_SCRIPT_OBJECTS(script)->vector[0]);
1406
+ memset(cursor, 0, vectorSize);
1407
+ cursor += vectorSize;
1408
+ }
1409
+
1410
+ if (nupvars != 0) {
1411
+ JS_SCRIPT_UPVARS(script)->length = nupvars;
1412
+ JS_SCRIPT_UPVARS(script)->vector = (uint32 *)cursor;
1413
+ vectorSize = nupvars * sizeof(JS_SCRIPT_UPVARS(script)->vector[0]);
1414
+ memset(cursor, 0, vectorSize);
1415
+ cursor += vectorSize;
1416
+ }
1417
+
1418
+ if (nregexps != 0) {
1419
+ JS_SCRIPT_REGEXPS(script)->length = nregexps;
1420
+ JS_SCRIPT_REGEXPS(script)->vector = (JSObject **)cursor;
1421
+ vectorSize = nregexps * sizeof(JS_SCRIPT_REGEXPS(script)->vector[0]);
1422
+ memset(cursor, 0, vectorSize);
1423
+ cursor += vectorSize;
1424
+ }
1425
+
1426
+ if (ntrynotes != 0) {
1427
+ JS_SCRIPT_TRYNOTES(script)->length = ntrynotes;
1428
+ JS_SCRIPT_TRYNOTES(script)->vector = (JSTryNote *)cursor;
1429
+ vectorSize = ntrynotes * sizeof(JS_SCRIPT_TRYNOTES(script)->vector[0]);
1430
+ #ifdef DEBUG
1431
+ memset(cursor, 0, vectorSize);
1432
+ #endif
1433
+ cursor += vectorSize;
1434
+ }
1435
+
1436
+ script->code = script->main = (jsbytecode *)cursor;
1437
+ JS_ASSERT(cursor +
1438
+ length * sizeof(jsbytecode) +
1439
+ nsrcnotes * sizeof(jssrcnote) ==
1440
+ (uint8 *)script + size);
1441
+
1442
+ #ifdef CHECK_SCRIPT_OWNER
1443
+ script->owner = cx->thread;
1444
+ #endif
1445
+ return script;
1446
+ }
1447
+
1448
+ JSScript *
1449
+ js_NewScriptFromCG(JSContext *cx, JSCodeGenerator *cg)
1450
+ {
1451
+ uint32 mainLength, prologLength, nsrcnotes, nfixed;
1452
+ JSScript *script;
1453
+ const char *filename;
1454
+ JSFunction *fun;
1455
+
1456
+ /* The counts of indexed things must be checked during code generation. */
1457
+ JS_ASSERT(cg->atomList.count <= INDEX_LIMIT);
1458
+ JS_ASSERT(cg->objectList.length <= INDEX_LIMIT);
1459
+ JS_ASSERT(cg->regexpList.length <= INDEX_LIMIT);
1460
+
1461
+ mainLength = CG_OFFSET(cg);
1462
+ prologLength = CG_PROLOG_OFFSET(cg);
1463
+ CG_COUNT_FINAL_SRCNOTES(cg, nsrcnotes);
1464
+ script = js_NewScript(cx, prologLength + mainLength, nsrcnotes,
1465
+ cg->atomList.count, cg->objectList.length,
1466
+ cg->upvarList.count, cg->regexpList.length,
1467
+ cg->ntrynotes);
1468
+ if (!script)
1469
+ return NULL;
1470
+
1471
+ /* Now that we have script, error control flow must go to label bad. */
1472
+ script->main += prologLength;
1473
+ memcpy(script->code, CG_PROLOG_BASE(cg), prologLength * sizeof(jsbytecode));
1474
+ memcpy(script->main, CG_BASE(cg), mainLength * sizeof(jsbytecode));
1475
+ nfixed = (cg->treeContext.flags & TCF_IN_FUNCTION)
1476
+ ? cg->treeContext.u.fun->u.i.nvars
1477
+ : cg->treeContext.ngvars + cg->regexpList.length;
1478
+ JS_ASSERT(nfixed < SLOTNO_LIMIT);
1479
+ script->nfixed = (uint16) nfixed;
1480
+ js_InitAtomMap(cx, &script->atomMap, &cg->atomList);
1481
+
1482
+ filename = cg->treeContext.parseContext->tokenStream.filename;
1483
+ if (filename) {
1484
+ script->filename = js_SaveScriptFilename(cx, filename);
1485
+ if (!script->filename)
1486
+ goto bad;
1487
+ }
1488
+ script->lineno = cg->firstLine;
1489
+ if (script->nfixed + cg->maxStackDepth >= JS_BIT(16)) {
1490
+ js_ReportCompileErrorNumber(cx, CG_TS(cg), NULL, JSREPORT_ERROR,
1491
+ JSMSG_NEED_DIET, "script");
1492
+ goto bad;
1493
+ }
1494
+ script->nslots = script->nfixed + cg->maxStackDepth;
1495
+ script->staticDepth = cg->staticDepth;
1496
+ script->principals = cg->treeContext.parseContext->principals;
1497
+ if (script->principals)
1498
+ JSPRINCIPALS_HOLD(cx, script->principals);
1499
+
1500
+ if (!js_FinishTakingSrcNotes(cx, cg, SCRIPT_NOTES(script)))
1501
+ goto bad;
1502
+ if (cg->ntrynotes != 0)
1503
+ js_FinishTakingTryNotes(cg, JS_SCRIPT_TRYNOTES(script));
1504
+ if (cg->objectList.length != 0)
1505
+ FinishParsedObjects(&cg->objectList, JS_SCRIPT_OBJECTS(script));
1506
+ if (cg->regexpList.length != 0)
1507
+ FinishParsedObjects(&cg->regexpList, JS_SCRIPT_REGEXPS(script));
1508
+ if (cg->treeContext.flags & TCF_NO_SCRIPT_RVAL)
1509
+ script->flags |= JSSF_NO_SCRIPT_RVAL;
1510
+
1511
+ if (cg->upvarList.count != 0) {
1512
+ JS_ASSERT(cg->upvarList.count <= cg->upvarMap.length);
1513
+ memcpy(JS_SCRIPT_UPVARS(script)->vector, cg->upvarMap.vector,
1514
+ cg->upvarList.count * sizeof(uint32));
1515
+ ATOM_LIST_INIT(&cg->upvarList);
1516
+ JS_free(cx, cg->upvarMap.vector);
1517
+ cg->upvarMap.vector = NULL;
1518
+ }
1519
+
1520
+ /*
1521
+ * We initialize fun->u.script to be the script constructed above
1522
+ * so that the debugger has a valid FUN_SCRIPT(fun).
1523
+ */
1524
+ fun = NULL;
1525
+ if (cg->treeContext.flags & TCF_IN_FUNCTION) {
1526
+ fun = cg->treeContext.u.fun;
1527
+ JS_ASSERT(FUN_INTERPRETED(fun) && !FUN_SCRIPT(fun));
1528
+ JS_ASSERT_IF(script->upvarsOffset != 0,
1529
+ JS_SCRIPT_UPVARS(script)->length == fun->u.i.nupvars);
1530
+
1531
+ js_FreezeLocalNames(cx, fun);
1532
+ fun->u.i.script = script;
1533
+ #ifdef CHECK_SCRIPT_OWNER
1534
+ script->owner = NULL;
1535
+ #endif
1536
+ if (cg->treeContext.flags & TCF_FUN_HEAVYWEIGHT)
1537
+ fun->flags |= JSFUN_HEAVYWEIGHT;
1538
+ }
1539
+
1540
+ /* Tell the debugger about this compiled script. */
1541
+ js_CallNewScriptHook(cx, script, fun);
1542
+ return script;
1543
+
1544
+ bad:
1545
+ js_DestroyScript(cx, script);
1546
+ return NULL;
1547
+ }
1548
+
1549
+ JS_FRIEND_API(void)
1550
+ js_CallNewScriptHook(JSContext *cx, JSScript *script, JSFunction *fun)
1551
+ {
1552
+ JSNewScriptHook hook;
1553
+
1554
+ hook = cx->debugHooks->newScriptHook;
1555
+ if (hook) {
1556
+ JS_KEEP_ATOMS(cx->runtime);
1557
+ hook(cx, script->filename, script->lineno, script, fun,
1558
+ cx->debugHooks->newScriptHookData);
1559
+ JS_UNKEEP_ATOMS(cx->runtime);
1560
+ }
1561
+ }
1562
+
1563
+ JS_FRIEND_API(void)
1564
+ js_CallDestroyScriptHook(JSContext *cx, JSScript *script)
1565
+ {
1566
+ JSDestroyScriptHook hook;
1567
+
1568
+ hook = cx->debugHooks->destroyScriptHook;
1569
+ if (hook)
1570
+ hook(cx, script, cx->debugHooks->destroyScriptHookData);
1571
+ }
1572
+
1573
+ void
1574
+ js_DestroyScript(JSContext *cx, JSScript *script)
1575
+ {
1576
+ js_CallDestroyScriptHook(cx, script);
1577
+ JS_ClearScriptTraps(cx, script);
1578
+
1579
+ if (script->principals)
1580
+ JSPRINCIPALS_DROP(cx, script->principals);
1581
+
1582
+ if (JS_GSN_CACHE(cx).code == script->code)
1583
+ JS_CLEAR_GSN_CACHE(cx);
1584
+
1585
+ /*
1586
+ * The GC flushes all property caches, so no need to purge just the
1587
+ * entries for this script.
1588
+ *
1589
+ * JS_THREADSAFE note: js_FlushPropertyCacheForScript flushes only the
1590
+ * current thread's property cache, so a script not owned by a function
1591
+ * or object, which hands off lifetime management for that script to the
1592
+ * GC, must be used by only one thread over its lifetime.
1593
+ *
1594
+ * This should be an API-compatible change, since a script is never safe
1595
+ * against premature GC if shared among threads without a rooted object
1596
+ * wrapping it to protect the script's mapped atoms against GC. We use
1597
+ * script->owner to enforce this requirement via assertions.
1598
+ */
1599
+ #ifdef CHECK_SCRIPT_OWNER
1600
+ JS_ASSERT_IF(cx->runtime->gcRunning, !script->owner);
1601
+ #endif
1602
+
1603
+ if (!cx->runtime->gcRunning) {
1604
+ if (!(cx->fp && (cx->fp->flags & JSFRAME_EVAL))) {
1605
+ #ifdef CHECK_SCRIPT_OWNER
1606
+ JS_ASSERT(script->owner == cx->thread);
1607
+ #endif
1608
+ js_FlushPropertyCacheForScript(cx, script);
1609
+ }
1610
+ }
1611
+
1612
+ JS_free(cx, script);
1613
+ }
1614
+
1615
+ void
1616
+ js_TraceScript(JSTracer *trc, JSScript *script)
1617
+ {
1618
+ JSAtomMap *map;
1619
+ uintN i, length;
1620
+ JSAtom **vector;
1621
+ jsval v;
1622
+ JSObjectArray *objarray;
1623
+
1624
+ map = &script->atomMap;
1625
+ length = map->length;
1626
+ vector = map->vector;
1627
+ for (i = 0; i < length; i++) {
1628
+ v = ATOM_KEY(vector[i]);
1629
+ if (JSVAL_IS_TRACEABLE(v)) {
1630
+ JS_SET_TRACING_INDEX(trc, "atomMap", i);
1631
+ JS_CallTracer(trc, JSVAL_TO_TRACEABLE(v), JSVAL_TRACE_KIND(v));
1632
+ }
1633
+ }
1634
+
1635
+ if (script->objectsOffset != 0) {
1636
+ objarray = JS_SCRIPT_OBJECTS(script);
1637
+ i = objarray->length;
1638
+ do {
1639
+ --i;
1640
+ if (objarray->vector[i]) {
1641
+ JS_SET_TRACING_INDEX(trc, "objects", i);
1642
+ JS_CallTracer(trc, objarray->vector[i], JSTRACE_OBJECT);
1643
+ }
1644
+ } while (i != 0);
1645
+ }
1646
+
1647
+ if (script->regexpsOffset != 0) {
1648
+ objarray = JS_SCRIPT_REGEXPS(script);
1649
+ i = objarray->length;
1650
+ do {
1651
+ --i;
1652
+ if (objarray->vector[i]) {
1653
+ JS_SET_TRACING_INDEX(trc, "regexps", i);
1654
+ JS_CallTracer(trc, objarray->vector[i], JSTRACE_OBJECT);
1655
+ }
1656
+ } while (i != 0);
1657
+ }
1658
+
1659
+ if (script->u.object) {
1660
+ JS_SET_TRACING_NAME(trc, "object");
1661
+ JS_CallTracer(trc, script->u.object, JSTRACE_OBJECT);
1662
+ }
1663
+
1664
+ if (IS_GC_MARKING_TRACER(trc) && script->filename)
1665
+ js_MarkScriptFilename(script->filename);
1666
+ }
1667
+
1668
+ typedef struct GSNCacheEntry {
1669
+ JSDHashEntryHdr hdr;
1670
+ jsbytecode *pc;
1671
+ jssrcnote *sn;
1672
+ } GSNCacheEntry;
1673
+
1674
+ #define GSN_CACHE_THRESHOLD 100
1675
+
1676
+ jssrcnote *
1677
+ js_GetSrcNoteCached(JSContext *cx, JSScript *script, jsbytecode *pc)
1678
+ {
1679
+ ptrdiff_t target, offset;
1680
+ GSNCacheEntry *entry;
1681
+ jssrcnote *sn, *result;
1682
+ uintN nsrcnotes;
1683
+
1684
+
1685
+ target = PTRDIFF(pc, script->code, jsbytecode);
1686
+ if ((uint32)target >= script->length)
1687
+ return NULL;
1688
+
1689
+ if (JS_GSN_CACHE(cx).code == script->code) {
1690
+ JS_METER_GSN_CACHE(cx, hits);
1691
+ entry = (GSNCacheEntry *)
1692
+ JS_DHashTableOperate(&JS_GSN_CACHE(cx).table, pc,
1693
+ JS_DHASH_LOOKUP);
1694
+ return entry->sn;
1695
+ }
1696
+
1697
+ JS_METER_GSN_CACHE(cx, misses);
1698
+ offset = 0;
1699
+ for (sn = SCRIPT_NOTES(script); ; sn = SN_NEXT(sn)) {
1700
+ if (SN_IS_TERMINATOR(sn)) {
1701
+ result = NULL;
1702
+ break;
1703
+ }
1704
+ offset += SN_DELTA(sn);
1705
+ if (offset == target && SN_IS_GETTABLE(sn)) {
1706
+ result = sn;
1707
+ break;
1708
+ }
1709
+ }
1710
+
1711
+ if (JS_GSN_CACHE(cx).code != script->code &&
1712
+ script->length >= GSN_CACHE_THRESHOLD) {
1713
+ JS_CLEAR_GSN_CACHE(cx);
1714
+ nsrcnotes = 0;
1715
+ for (sn = SCRIPT_NOTES(script); !SN_IS_TERMINATOR(sn);
1716
+ sn = SN_NEXT(sn)) {
1717
+ if (SN_IS_GETTABLE(sn))
1718
+ ++nsrcnotes;
1719
+ }
1720
+ if (!JS_DHashTableInit(&JS_GSN_CACHE(cx).table, JS_DHashGetStubOps(),
1721
+ NULL, sizeof(GSNCacheEntry),
1722
+ JS_DHASH_DEFAULT_CAPACITY(nsrcnotes))) {
1723
+ JS_GSN_CACHE(cx).table.ops = NULL;
1724
+ } else {
1725
+ pc = script->code;
1726
+ for (sn = SCRIPT_NOTES(script); !SN_IS_TERMINATOR(sn);
1727
+ sn = SN_NEXT(sn)) {
1728
+ pc += SN_DELTA(sn);
1729
+ if (SN_IS_GETTABLE(sn)) {
1730
+ entry = (GSNCacheEntry *)
1731
+ JS_DHashTableOperate(&JS_GSN_CACHE(cx).table, pc,
1732
+ JS_DHASH_ADD);
1733
+ entry->pc = pc;
1734
+ entry->sn = sn;
1735
+ }
1736
+ }
1737
+ JS_GSN_CACHE(cx).code = script->code;
1738
+ JS_METER_GSN_CACHE(cx, fills);
1739
+ }
1740
+ }
1741
+
1742
+ return result;
1743
+ }
1744
+
1745
+ uintN
1746
+ js_FramePCToLineNumber(JSContext *cx, JSStackFrame *fp)
1747
+ {
1748
+ return js_PCToLineNumber(cx, fp->script, fp->imacpc ? fp->imacpc : fp->regs->pc);
1749
+ }
1750
+
1751
+ uintN
1752
+ js_PCToLineNumber(JSContext *cx, JSScript *script, jsbytecode *pc)
1753
+ {
1754
+ JSFunction *fun;
1755
+ uintN lineno;
1756
+ ptrdiff_t offset, target;
1757
+ jssrcnote *sn;
1758
+ JSSrcNoteType type;
1759
+
1760
+ /* Cope with JSStackFrame.pc value prior to entering js_Interpret. */
1761
+ if (!pc)
1762
+ return 0;
1763
+
1764
+ /*
1765
+ * Special case: function definition needs no line number note because
1766
+ * the function's script contains its starting line number.
1767
+ */
1768
+ if (js_CodeSpec[*pc].format & JOF_INDEXBASE)
1769
+ pc += js_CodeSpec[*pc].length;
1770
+ if (*pc == JSOP_DEFFUN) {
1771
+ GET_FUNCTION_FROM_BYTECODE(script, pc, 0, fun);
1772
+ return fun->u.i.script->lineno;
1773
+ }
1774
+
1775
+ /*
1776
+ * General case: walk through source notes accumulating their deltas,
1777
+ * keeping track of line-number notes, until we pass the note for pc's
1778
+ * offset within script->code.
1779
+ */
1780
+ lineno = script->lineno;
1781
+ offset = 0;
1782
+ target = PTRDIFF(pc, script->code, jsbytecode);
1783
+ for (sn = SCRIPT_NOTES(script); !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) {
1784
+ offset += SN_DELTA(sn);
1785
+ type = (JSSrcNoteType) SN_TYPE(sn);
1786
+ if (type == SRC_SETLINE) {
1787
+ if (offset <= target)
1788
+ lineno = (uintN) js_GetSrcNoteOffset(sn, 0);
1789
+ } else if (type == SRC_NEWLINE) {
1790
+ if (offset <= target)
1791
+ lineno++;
1792
+ }
1793
+ if (offset > target)
1794
+ break;
1795
+ }
1796
+ return lineno;
1797
+ }
1798
+
1799
+ /* The line number limit is the same as the jssrcnote offset limit. */
1800
+ #define SN_LINE_LIMIT (SN_3BYTE_OFFSET_FLAG << 16)
1801
+
1802
+ jsbytecode *
1803
+ js_LineNumberToPC(JSScript *script, uintN target)
1804
+ {
1805
+ ptrdiff_t offset, best;
1806
+ uintN lineno, bestdiff, diff;
1807
+ jssrcnote *sn;
1808
+ JSSrcNoteType type;
1809
+
1810
+ offset = 0;
1811
+ best = -1;
1812
+ lineno = script->lineno;
1813
+ bestdiff = SN_LINE_LIMIT;
1814
+ for (sn = SCRIPT_NOTES(script); !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) {
1815
+ /*
1816
+ * Exact-match only if offset is not in the prolog; otherwise use
1817
+ * nearest greater-or-equal line number match.
1818
+ */
1819
+ if (lineno == target && script->code + offset >= script->main)
1820
+ goto out;
1821
+ if (lineno >= target) {
1822
+ diff = lineno - target;
1823
+ if (diff < bestdiff) {
1824
+ bestdiff = diff;
1825
+ best = offset;
1826
+ }
1827
+ }
1828
+ offset += SN_DELTA(sn);
1829
+ type = (JSSrcNoteType) SN_TYPE(sn);
1830
+ if (type == SRC_SETLINE) {
1831
+ lineno = (uintN) js_GetSrcNoteOffset(sn, 0);
1832
+ } else if (type == SRC_NEWLINE) {
1833
+ lineno++;
1834
+ }
1835
+ }
1836
+ if (best >= 0)
1837
+ offset = best;
1838
+ out:
1839
+ return script->code + offset;
1840
+ }
1841
+
1842
+ JS_FRIEND_API(uintN)
1843
+ js_GetScriptLineExtent(JSScript *script)
1844
+ {
1845
+ uintN lineno;
1846
+ jssrcnote *sn;
1847
+ JSSrcNoteType type;
1848
+
1849
+ lineno = script->lineno;
1850
+ for (sn = SCRIPT_NOTES(script); !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) {
1851
+ type = (JSSrcNoteType) SN_TYPE(sn);
1852
+ if (type == SRC_SETLINE) {
1853
+ lineno = (uintN) js_GetSrcNoteOffset(sn, 0);
1854
+ } else if (type == SRC_NEWLINE) {
1855
+ lineno++;
1856
+ }
1857
+ }
1858
+ return 1 + lineno - script->lineno;
1859
+ }
1860
+
1861
+ #if JS_HAS_GENERATORS
1862
+
1863
+ JSBool
1864
+ js_IsInsideTryWithFinally(JSScript *script, jsbytecode *pc)
1865
+ {
1866
+ JSTryNoteArray *tarray;
1867
+ JSTryNote *tn, *tnlimit;
1868
+ uint32 off;
1869
+
1870
+ JS_ASSERT(script->code <= pc);
1871
+ JS_ASSERT(pc < script->code + script->length);
1872
+
1873
+ if (!script->trynotesOffset != 0)
1874
+ return JS_FALSE;
1875
+ tarray = JS_SCRIPT_TRYNOTES(script);
1876
+ JS_ASSERT(tarray->length != 0);
1877
+
1878
+ tn = tarray->vector;
1879
+ tnlimit = tn + tarray->length;
1880
+ off = (uint32)(pc - script->main);
1881
+ do {
1882
+ if (off - tn->start < tn->length) {
1883
+ if (tn->kind == JSTRY_FINALLY)
1884
+ return JS_TRUE;
1885
+ JS_ASSERT(tn->kind == JSTRY_CATCH);
1886
+ }
1887
+ } while (++tn != tnlimit);
1888
+ return JS_FALSE;
1889
+ }
1890
+
1891
+ #endif