webruby 0.2.7 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1537) hide show
  1. checksums.yaml +4 -4
  2. data/lib/webruby/environment.rb +24 -8
  3. data/lib/webruby/rake/files.rake +6 -22
  4. data/lib/webruby/rake/general.rake +1 -1
  5. data/lib/webruby/rake/mruby.rake +1 -0
  6. data/lib/webruby/utility.rb +14 -0
  7. data/modules/mruby/AUTHORS +14 -0
  8. data/modules/mruby/CONTRIBUTING.md +7 -4
  9. data/modules/mruby/INSTALL +28 -11
  10. data/modules/mruby/MITL +13 -13
  11. data/modules/mruby/Makefile +4 -5
  12. data/modules/mruby/README.md +54 -49
  13. data/modules/mruby/Rakefile +36 -6
  14. data/modules/mruby/benchmark/ao-render.rb +1 -2
  15. data/modules/mruby/benchmark/bm_app_lc_fizzbuzz.rb +52 -0
  16. data/modules/mruby/benchmark/fib39.rb +0 -0
  17. data/modules/mruby/bintest/mrbc.rb +12 -0
  18. data/modules/mruby/build_config.rb +32 -2
  19. data/modules/mruby/doc/api/README.md +30 -0
  20. data/modules/mruby/doc/api/mruby.h.md +69 -0
  21. data/modules/mruby/doc/compile/README.md +208 -99
  22. data/modules/mruby/doc/debugger/README.md +370 -0
  23. data/modules/mruby/doc/language/Core.md +1590 -0
  24. data/modules/mruby/doc/language/README.md +9 -0
  25. data/modules/mruby/doc/language/generator.rb +15 -0
  26. data/modules/mruby/doc/language/mrbdoc/lib/mrbdoc_analyze.rb +231 -0
  27. data/modules/mruby/doc/language/mrbdoc/lib/mrbdoc_docu.rb +118 -0
  28. data/modules/mruby/doc/language/mrbdoc/mrbdoc.rb +38 -0
  29. data/modules/mruby/doc/mrbconf/README.md +160 -0
  30. data/modules/mruby/doc/mrbgems/README.md +136 -66
  31. data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake +1 -1
  32. data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c +1 -1
  33. data/modules/mruby/examples/mrbgems/c_extension_example/mrbgem.rake +1 -1
  34. data/modules/mruby/examples/mrbgems/c_extension_example/src/example.c +1 -1
  35. data/modules/mruby/examples/mrbgems/ruby_extension_example/mrbgem.rake +1 -1
  36. data/modules/mruby/examples/targets/{ArduinoDue.rb → build_config_ArduinoDue.rb} +32 -6
  37. data/modules/mruby/examples/targets/build_config_IntelGalileo.rb +106 -0
  38. data/modules/mruby/examples/targets/{chipKitMax32.rb → build_config_chipKITMax32.rb} +26 -7
  39. data/modules/mruby/include/mrbconf.h +25 -1
  40. data/modules/mruby/include/mruby/array.h +32 -22
  41. data/modules/mruby/include/mruby/boxing_nan.h +94 -0
  42. data/modules/mruby/include/mruby/boxing_no.h +49 -0
  43. data/modules/mruby/include/mruby/boxing_word.h +119 -0
  44. data/modules/mruby/include/mruby/class.h +15 -13
  45. data/modules/mruby/include/mruby/compile.h +43 -36
  46. data/modules/mruby/include/mruby/data.h +13 -5
  47. data/modules/mruby/include/mruby/debug.h +9 -9
  48. data/modules/mruby/include/mruby/dump.h +32 -23
  49. data/modules/mruby/include/mruby/error.h +36 -0
  50. data/modules/mruby/include/mruby/gc.h +11 -6
  51. data/modules/mruby/include/mruby/hash.h +12 -12
  52. data/modules/mruby/include/mruby/irep.h +9 -3
  53. data/modules/mruby/include/mruby/khash.h +58 -41
  54. data/modules/mruby/include/mruby/numeric.h +38 -4
  55. data/modules/mruby/include/mruby/object.h +55 -0
  56. data/modules/mruby/include/mruby/opcode.h +160 -0
  57. data/modules/mruby/include/mruby/proc.h +19 -5
  58. data/modules/mruby/include/mruby/range.h +4 -3
  59. data/modules/mruby/include/mruby/re.h +20 -0
  60. data/modules/mruby/include/mruby/string.h +86 -47
  61. data/modules/mruby/include/mruby/value.h +100 -374
  62. data/modules/mruby/include/mruby/variable.h +34 -32
  63. data/modules/mruby/include/mruby/version.h +40 -0
  64. data/modules/mruby/include/mruby.h +211 -139
  65. data/modules/mruby/minirake +16 -9
  66. data/modules/mruby/mrbgems/default.gembox +12 -0
  67. data/modules/mruby/mrbgems/full-core.gembox +3 -3
  68. data/modules/mruby/mrbgems/mruby-array-ext/mrbgem.rake +1 -0
  69. data/modules/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +488 -8
  70. data/modules/mruby/mrbgems/mruby-array-ext/src/array.c +57 -31
  71. data/modules/mruby/mrbgems/mruby-array-ext/test/array.rb +231 -45
  72. data/modules/mruby/mrbgems/mruby-bin-debugger/bintest/mrdb.rb +286 -0
  73. data/modules/mruby/mrbgems/mruby-bin-debugger/bintest/print.rb +701 -0
  74. data/modules/mruby/mrbgems/mruby-bin-debugger/mrbgem.rake +9 -0
  75. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +516 -0
  76. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.h +26 -0
  77. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c +235 -0
  78. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.h +14 -0
  79. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +78 -0
  80. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.h +13 -0
  81. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c +428 -0
  82. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c +501 -0
  83. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c +58 -0
  84. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c +54 -0
  85. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +746 -0
  86. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +163 -0
  87. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +16 -0
  88. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdberror.h +20 -0
  89. data/modules/mruby/mrbgems/mruby-bin-mirb/bintest/mirb.rb +12 -0
  90. data/modules/mruby/mrbgems/mruby-bin-mirb/mrbgem.rake +14 -1
  91. data/modules/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +154 -72
  92. data/modules/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +46 -0
  93. data/modules/mruby/mrbgems/mruby-bin-mruby/mrbgem.rake +1 -0
  94. data/modules/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +37 -28
  95. data/modules/mruby/mrbgems/mruby-bin-mruby-config/mrbgem.rake +30 -0
  96. data/modules/mruby/mrbgems/mruby-bin-mruby-config/mruby-config +16 -0
  97. data/modules/mruby/mrbgems/mruby-bin-mruby-config/mruby-config.bat +30 -0
  98. data/modules/mruby/mrbgems/mruby-bin-strip/bintest/mruby-strip.rb +73 -0
  99. data/modules/mruby/mrbgems/mruby-bin-strip/mrbgem.rake +6 -0
  100. data/modules/mruby/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c +155 -0
  101. data/modules/mruby/mrbgems/mruby-enum-ext/mrbgem.rake +1 -0
  102. data/modules/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +555 -21
  103. data/modules/mruby/mrbgems/mruby-enum-ext/test/enum.rb +119 -0
  104. data/modules/mruby/mrbgems/mruby-enum-lazy/mrbgem.rake +7 -0
  105. data/modules/mruby/mrbgems/mruby-enum-lazy/mrblib/lazy.rb +150 -0
  106. data/modules/mruby/mrbgems/mruby-enum-lazy/test/lazy.rb +47 -0
  107. data/modules/mruby/mrbgems/mruby-enumerator/mrbgem.rake +7 -0
  108. data/modules/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +636 -0
  109. data/modules/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +537 -0
  110. data/modules/mruby/mrbgems/mruby-eval/mrbgem.rake +1 -0
  111. data/modules/mruby/mrbgems/mruby-eval/src/eval.c +243 -4
  112. data/modules/mruby/mrbgems/mruby-eval/test/eval.rb +80 -0
  113. data/modules/mruby/mrbgems/mruby-exit/mrbgem.rake +1 -0
  114. data/modules/mruby/mrbgems/mruby-exit/src/mruby-exit.c +1 -1
  115. data/modules/mruby/mrbgems/mruby-fiber/mrbgem.rake +1 -0
  116. data/modules/mruby/mrbgems/mruby-fiber/src/fiber.c +157 -51
  117. data/modules/mruby/mrbgems/mruby-fiber/test/fiber.rb +179 -35
  118. data/modules/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +3 -0
  119. data/modules/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +241 -1
  120. data/modules/mruby/mrbgems/mruby-hash-ext/src/hash-ext.c +11 -19
  121. data/modules/mruby/mrbgems/mruby-hash-ext/test/hash.rb +138 -1
  122. data/modules/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake +5 -0
  123. data/modules/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +183 -0
  124. data/modules/mruby/mrbgems/mruby-kernel-ext/test/kernel.rb +53 -0
  125. data/modules/mruby/mrbgems/mruby-math/mrbgem.rake +1 -0
  126. data/modules/mruby/mrbgems/mruby-math/src/math.c +107 -14
  127. data/modules/mruby/mrbgems/mruby-math/test/math.rb +16 -0
  128. data/modules/mruby/mrbgems/mruby-numeric-ext/mrbgem.rake +1 -0
  129. data/modules/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb +5 -0
  130. data/modules/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +9 -1
  131. data/modules/mruby/mrbgems/mruby-object-ext/mrbgem.rake +1 -0
  132. data/modules/mruby/mrbgems/mruby-object-ext/mrblib/object.rb +19 -0
  133. data/modules/mruby/mrbgems/mruby-object-ext/src/object.c +5 -8
  134. data/modules/mruby/mrbgems/mruby-object-ext/test/object.rb +16 -0
  135. data/modules/mruby/mrbgems/mruby-objectspace/mrbgem.rake +1 -0
  136. data/modules/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +121 -53
  137. data/modules/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +27 -4
  138. data/modules/mruby/mrbgems/mruby-print/mrbgem.rake +1 -0
  139. data/modules/mruby/mrbgems/mruby-print/src/print.c +3 -5
  140. data/modules/mruby/mrbgems/mruby-proc-ext/mrbgem.rake +1 -0
  141. data/modules/mruby/mrbgems/mruby-proc-ext/src/proc.c +89 -19
  142. data/modules/mruby/mrbgems/mruby-proc-ext/test/proc.c +56 -0
  143. data/modules/mruby/mrbgems/mruby-proc-ext/test/proc.rb +47 -0
  144. data/modules/mruby/mrbgems/mruby-random/mrbgem.rake +1 -0
  145. data/modules/mruby/mrbgems/mruby-random/src/mt19937ar.c +30 -25
  146. data/modules/mruby/mrbgems/mruby-random/src/mt19937ar.h +6 -3
  147. data/modules/mruby/mrbgems/mruby-random/src/random.c +157 -137
  148. data/modules/mruby/mrbgems/mruby-random/src/random.h +3 -3
  149. data/modules/mruby/mrbgems/mruby-random/test/random.rb +9 -9
  150. data/modules/mruby/mrbgems/mruby-range-ext/mrbgem.rake +1 -0
  151. data/modules/mruby/mrbgems/mruby-range-ext/src/range.c +57 -3
  152. data/modules/mruby/mrbgems/mruby-range-ext/test/range.rb +9 -0
  153. data/modules/mruby/mrbgems/mruby-sprintf/mrbgem.rake +1 -0
  154. data/modules/mruby/mrbgems/mruby-sprintf/mrblib/string.rb +9 -0
  155. data/modules/mruby/mrbgems/mruby-sprintf/src/sprintf.c +29 -23
  156. data/modules/mruby/mrbgems/mruby-sprintf/test/sprintf.rb +7 -2
  157. data/modules/mruby/mrbgems/mruby-string-ext/mrbgem.rake +1 -0
  158. data/modules/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +250 -11
  159. data/modules/mruby/mrbgems/mruby-string-ext/src/string.c +220 -5
  160. data/modules/mruby/mrbgems/mruby-string-ext/test/string.rb +326 -4
  161. data/modules/mruby/mrbgems/mruby-string-utf8/mrbgem.rake +2 -0
  162. data/modules/mruby/mrbgems/mruby-string-utf8/src/string.c +486 -52
  163. data/modules/mruby/mrbgems/mruby-string-utf8/test/string.rb +97 -14
  164. data/modules/mruby/mrbgems/mruby-struct/mrbgem.rake +1 -0
  165. data/modules/mruby/mrbgems/mruby-struct/mrblib/struct.rb +31 -0
  166. data/modules/mruby/mrbgems/mruby-struct/src/struct.c +178 -196
  167. data/modules/mruby/mrbgems/mruby-struct/test/struct.rb +115 -61
  168. data/modules/mruby/mrbgems/mruby-symbol-ext/mrbgem.rake +1 -0
  169. data/modules/mruby/mrbgems/mruby-symbol-ext/mrblib/symbol.rb +22 -17
  170. data/modules/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +20 -11
  171. data/modules/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +14 -0
  172. data/modules/mruby/mrbgems/mruby-time/mrbgem.rake +1 -0
  173. data/modules/mruby/mrbgems/mruby-time/mrblib/time.rb +9 -0
  174. data/modules/mruby/mrbgems/mruby-time/src/time.c +98 -37
  175. data/modules/mruby/mrbgems/mruby-time/test/time.rb +152 -148
  176. data/modules/mruby/mrbgems/mruby-toplevel-ext/mrbgem.rake +1 -0
  177. data/modules/mruby/mrbgems/mruby-toplevel-ext/test/toplevel.rb +1 -1
  178. data/modules/mruby/mrblib/array.rb +110 -4
  179. data/modules/mruby/mrblib/class.rb +1 -22
  180. data/modules/mruby/mrblib/compar.rb +10 -30
  181. data/modules/mruby/mrblib/enum.rb +64 -52
  182. data/modules/mruby/mrblib/error.rb +9 -4
  183. data/modules/mruby/mrblib/hash.rb +164 -23
  184. data/modules/mruby/mrblib/kernel.rb +26 -22
  185. data/modules/mruby/mrblib/mrblib.rake +4 -4
  186. data/modules/mruby/mrblib/numeric.rb +22 -9
  187. data/modules/mruby/mrblib/range.rb +24 -2
  188. data/modules/mruby/mrblib/string.rb +15 -3
  189. data/modules/mruby/src/array.c +279 -339
  190. data/modules/mruby/src/backtrace.c +68 -16
  191. data/modules/mruby/src/class.c +539 -379
  192. data/modules/mruby/src/codegen.c +424 -207
  193. data/modules/mruby/src/compar.c +1 -1
  194. data/modules/mruby/src/crc.c +7 -6
  195. data/modules/mruby/src/debug.c +37 -36
  196. data/modules/mruby/src/dump.c +463 -213
  197. data/modules/mruby/src/enum.c +1 -1
  198. data/modules/mruby/src/error.c +91 -92
  199. data/modules/mruby/src/error.h +3 -19
  200. data/modules/mruby/src/etc.c +85 -82
  201. data/modules/mruby/src/gc.c +134 -108
  202. data/modules/mruby/src/hash.c +161 -565
  203. data/modules/mruby/src/init.c +2 -13
  204. data/modules/mruby/src/kernel.c +217 -251
  205. data/modules/mruby/src/load.c +280 -283
  206. data/modules/mruby/src/mrb_throw.h +41 -0
  207. data/modules/mruby/src/mruby_core.rake +57 -7
  208. data/modules/mruby/src/node.h +104 -104
  209. data/modules/mruby/src/numeric.c +221 -208
  210. data/modules/mruby/src/object.c +41 -42
  211. data/modules/mruby/src/opcode.h +2 -160
  212. data/modules/mruby/src/parse.y +3430 -3223
  213. data/modules/mruby/src/pool.c +13 -9
  214. data/modules/mruby/src/print.c +20 -17
  215. data/modules/mruby/src/proc.c +77 -21
  216. data/modules/mruby/src/range.c +55 -45
  217. data/modules/mruby/src/state.c +95 -31
  218. data/modules/mruby/src/string.c +462 -468
  219. data/modules/mruby/src/symbol.c +95 -85
  220. data/modules/mruby/src/variable.c +104 -74
  221. data/modules/mruby/src/version.c +13 -0
  222. data/modules/mruby/src/vm.c +528 -296
  223. data/modules/mruby/tasks/libmruby.rake +9 -5
  224. data/modules/mruby/tasks/mrbgem_spec.rake +130 -26
  225. data/modules/mruby/tasks/mrbgems.rake +21 -11
  226. data/modules/mruby/tasks/mrbgems_test.rake +46 -40
  227. data/modules/mruby/tasks/mruby_build.rake +54 -12
  228. data/modules/mruby/tasks/mruby_build_commands.rake +34 -5
  229. data/modules/mruby/tasks/mruby_build_gem.rake +25 -3
  230. data/modules/mruby/tasks/ruby_ext.rake +11 -2
  231. data/modules/mruby/tasks/toolchains/clang.rake +2 -1
  232. data/modules/mruby/tasks/toolchains/gcc.rake +26 -3
  233. data/modules/mruby/tasks/toolchains/visualcpp.rake +17 -8
  234. data/modules/mruby/test/assert.rb +30 -8
  235. data/modules/mruby/test/bintest.rb +10 -0
  236. data/modules/mruby/test/driver.c +74 -24
  237. data/modules/mruby/test/init_mrbtest.c +21 -2
  238. data/modules/mruby/test/mrbtest.rake +27 -5
  239. data/modules/mruby/test/t/argumenterror.rb +0 -5
  240. data/modules/mruby/test/t/array.rb +23 -7
  241. data/modules/mruby/test/t/bs_block.rb +32 -0
  242. data/modules/mruby/test/t/class.rb +29 -5
  243. data/modules/mruby/test/t/comparable.rb +20 -12
  244. data/modules/mruby/test/t/enumerable.rb +33 -7
  245. data/modules/mruby/test/t/exception.rb +63 -38
  246. data/modules/mruby/test/t/false.rb +2 -4
  247. data/modules/mruby/test/t/float.rb +39 -4
  248. data/modules/mruby/test/t/hash.rb +40 -6
  249. data/modules/mruby/test/t/indexerror.rb +0 -4
  250. data/modules/mruby/test/t/integer.rb +41 -5
  251. data/modules/mruby/test/t/kernel.rb +90 -3
  252. data/modules/mruby/test/t/localjumperror.rb +4 -4
  253. data/modules/mruby/test/t/methods.rb +1 -1
  254. data/modules/mruby/test/t/module.rb +43 -13
  255. data/modules/mruby/test/t/nameerror.rb +0 -4
  256. data/modules/mruby/test/t/nil.rb +5 -0
  257. data/modules/mruby/test/t/nomethoderror.rb +11 -2
  258. data/modules/mruby/test/t/numeric.rb +18 -4
  259. data/modules/mruby/test/t/proc.rb +59 -6
  260. data/modules/mruby/test/t/range.rb +15 -5
  261. data/modules/mruby/test/t/rangeerror.rb +0 -4
  262. data/modules/mruby/test/t/standarderror.rb +0 -4
  263. data/modules/mruby/test/t/string.rb +56 -12
  264. data/modules/mruby/test/t/superclass.rb +46 -0
  265. data/modules/mruby/test/t/symbol.rb +0 -4
  266. data/modules/mruby/test/t/syntax.rb +134 -1
  267. data/modules/mruby/test/t/true.rb +2 -4
  268. data/modules/mruby/test/t/typeerror.rb +0 -5
  269. data/modules/mruby/test/t/unicode.rb +35 -0
  270. data/modules/mruby/tools/mrbc/mrbc.c +9 -12
  271. data/modules/mruby/travis_config.rb +22 -2
  272. metadata +98 -1299
  273. data/modules/emscripten/AUTHORS +0 -117
  274. data/modules/emscripten/CONTRIBUTING.markdown +0 -5
  275. data/modules/emscripten/ChangeLog +0 -468
  276. data/modules/emscripten/LICENSE +0 -94
  277. data/modules/emscripten/README.markdown +0 -14
  278. data/modules/emscripten/cmake/Modules/FindOpenAL.cmake +0 -26
  279. data/modules/emscripten/cmake/Platform/Emscripten.cmake +0 -228
  280. data/modules/emscripten/em++ +0 -12
  281. data/modules/emscripten/em++.bat +0 -2
  282. data/modules/emscripten/em-config +0 -24
  283. data/modules/emscripten/em-config.bat +0 -2
  284. data/modules/emscripten/emar +0 -24
  285. data/modules/emscripten/emar.bat +0 -2
  286. data/modules/emscripten/emcc +0 -2069
  287. data/modules/emscripten/emcc.bat +0 -2
  288. data/modules/emscripten/emcc.py +0 -5
  289. data/modules/emscripten/emconfigure +0 -27
  290. data/modules/emscripten/emconfigure.bat +0 -2
  291. data/modules/emscripten/emlink.py +0 -33
  292. data/modules/emscripten/emmake +0 -29
  293. data/modules/emscripten/emmake.bat +0 -2
  294. data/modules/emscripten/emranlib +0 -9
  295. data/modules/emscripten/emranlib.bat +0 -2
  296. data/modules/emscripten/emrun +0 -1087
  297. data/modules/emscripten/emrun.bat +0 -2
  298. data/modules/emscripten/emscons +0 -20
  299. data/modules/emscripten/emscripten.py +0 -1347
  300. data/modules/emscripten/package.json +0 -7
  301. data/modules/emscripten/patches/README +0 -4
  302. data/modules/emscripten/patches/series +0 -2
  303. data/modules/emscripten/scons-tools/closure.py +0 -28
  304. data/modules/emscripten/scons-tools/emscripten.py +0 -364
  305. data/modules/emscripten/scons-tools/llvm.py +0 -34
  306. data/modules/emscripten/src/analyzer.js +0 -1781
  307. data/modules/emscripten/src/closure-externs.js +0 -110
  308. data/modules/emscripten/src/compiler.html +0 -48
  309. data/modules/emscripten/src/compiler.js +0 -331
  310. data/modules/emscripten/src/compiler_phase.html +0 -33
  311. data/modules/emscripten/src/corruptionCheck.js +0 -98
  312. data/modules/emscripten/src/determinstic.js +0 -20
  313. data/modules/emscripten/src/embind/embind.js +0 -1677
  314. data/modules/emscripten/src/embind/emval.js +0 -284
  315. data/modules/emscripten/src/emrun_postjs.js +0 -20
  316. data/modules/emscripten/src/emrun_prejs.js +0 -5
  317. data/modules/emscripten/src/emscripten-source-map.min.js +0 -31
  318. data/modules/emscripten/src/experimental/allow_loopvars_from_memsetcpy_inasm.diff +0 -97
  319. data/modules/emscripten/src/experimental/batching.diff +0 -44
  320. data/modules/emscripten/src/experimental/functypeopt.diff +0 -113
  321. data/modules/emscripten/src/experimental/multiple_heaps.diff +0 -175
  322. data/modules/emscripten/src/experimental/noncallgraphprofiling.diff +0 -197
  323. data/modules/emscripten/src/experimental/optimize_memcpy_for_ta1.diff +0 -124
  324. data/modules/emscripten/src/experimental/remove__label__s.diff +0 -140
  325. data/modules/emscripten/src/experimental/renderer_cache_hash.diff +0 -99
  326. data/modules/emscripten/src/experimental/sdl_key_forwarding.diff +0 -57
  327. data/modules/emscripten/src/experimental/simplifyGeneratedFunctionsDetection.diff +0 -336
  328. data/modules/emscripten/src/experimental/stringCache.diff +0 -147
  329. data/modules/emscripten/src/fastLong.js +0 -299
  330. data/modules/emscripten/src/gl-matrix.js +0 -1952
  331. data/modules/emscripten/src/headless.js +0 -295
  332. data/modules/emscripten/src/headlessCanvas.js +0 -618
  333. data/modules/emscripten/src/hello_world.js +0 -92
  334. data/modules/emscripten/src/intertyper.js +0 -1228
  335. data/modules/emscripten/src/jsifier.js +0 -1969
  336. data/modules/emscripten/src/library.js +0 -9196
  337. data/modules/emscripten/src/library_browser.js +0 -988
  338. data/modules/emscripten/src/library_egl.js +0 -564
  339. data/modules/emscripten/src/library_fs.js +0 -1619
  340. data/modules/emscripten/src/library_gc.js +0 -236
  341. data/modules/emscripten/src/library_gl.js +0 -5194
  342. data/modules/emscripten/src/library_glfw.js +0 -585
  343. data/modules/emscripten/src/library_glut.js +0 -504
  344. data/modules/emscripten/src/library_idbfs.js +0 -216
  345. data/modules/emscripten/src/library_jansson.js +0 -320
  346. data/modules/emscripten/src/library_memfs.js +0 -303
  347. data/modules/emscripten/src/library_nodefs.js +0 -286
  348. data/modules/emscripten/src/library_openal.js +0 -915
  349. data/modules/emscripten/src/library_path.js +0 -133
  350. data/modules/emscripten/src/library_sdl.js +0 -2728
  351. data/modules/emscripten/src/library_sockfs.js +0 -578
  352. data/modules/emscripten/src/library_strtok_r.c +0 -97
  353. data/modules/emscripten/src/library_tty.js +0 -146
  354. data/modules/emscripten/src/library_uuid.js +0 -140
  355. data/modules/emscripten/src/library_xlib.js +0 -23
  356. data/modules/emscripten/src/long.js +0 -1609
  357. data/modules/emscripten/src/modules.js +0 -543
  358. data/modules/emscripten/src/parseTools.js +0 -2723
  359. data/modules/emscripten/src/postamble.js +0 -239
  360. data/modules/emscripten/src/postamble_sharedlib.js +0 -16
  361. data/modules/emscripten/src/preamble.js +0 -1233
  362. data/modules/emscripten/src/preamble_sharedlib.js +0 -25
  363. data/modules/emscripten/src/proxyClient.js +0 -82
  364. data/modules/emscripten/src/proxyWorker.js +0 -143
  365. data/modules/emscripten/src/relooper/README.markdown +0 -14
  366. data/modules/emscripten/src/relooper/Relooper.cpp +0 -1301
  367. data/modules/emscripten/src/relooper/Relooper.h +0 -257
  368. data/modules/emscripten/src/relooper/doit.sh +0 -70
  369. data/modules/emscripten/src/relooper/emscripten/glue.js +0 -67
  370. data/modules/emscripten/src/relooper/emscripten/test.js +0 -44
  371. data/modules/emscripten/src/relooper/fuzzer.py +0 -131
  372. data/modules/emscripten/src/relooper/ministring.h +0 -35
  373. data/modules/emscripten/src/relooper/paper.pdf +0 -0
  374. data/modules/emscripten/src/relooper/test.cpp +0 -290
  375. data/modules/emscripten/src/relooper/test.txt +0 -317
  376. data/modules/emscripten/src/relooper/test2.c +0 -44
  377. data/modules/emscripten/src/relooper/test2.txt +0 -26
  378. data/modules/emscripten/src/relooper/test3.c +0 -42
  379. data/modules/emscripten/src/relooper/test3.txt +0 -56
  380. data/modules/emscripten/src/relooper/test4.cpp +0 -40
  381. data/modules/emscripten/src/relooper/test4.txt +0 -44
  382. data/modules/emscripten/src/relooper/test5.cpp +0 -40
  383. data/modules/emscripten/src/relooper/test5.txt +0 -56
  384. data/modules/emscripten/src/relooper/test6.cpp +0 -31
  385. data/modules/emscripten/src/relooper/test6.txt +0 -26
  386. data/modules/emscripten/src/relooper/test_dead.cpp +0 -28
  387. data/modules/emscripten/src/relooper/test_dead.txt +0 -9
  388. data/modules/emscripten/src/relooper/test_debug.cpp +0 -30
  389. data/modules/emscripten/src/relooper/test_debug.txt +0 -142
  390. data/modules/emscripten/src/relooper/test_fuzz1.cpp +0 -52
  391. data/modules/emscripten/src/relooper/test_fuzz1.txt +0 -72
  392. data/modules/emscripten/src/relooper/test_fuzz2.cpp +0 -34
  393. data/modules/emscripten/src/relooper/test_fuzz2.txt +0 -30
  394. data/modules/emscripten/src/relooper/test_fuzz3.cpp +0 -36
  395. data/modules/emscripten/src/relooper/test_fuzz3.txt +0 -25
  396. data/modules/emscripten/src/relooper/test_fuzz4.cpp +0 -38
  397. data/modules/emscripten/src/relooper/test_fuzz4.txt +0 -41
  398. data/modules/emscripten/src/relooper/test_fuzz5.cpp +0 -57
  399. data/modules/emscripten/src/relooper/test_fuzz5.txt +0 -86
  400. data/modules/emscripten/src/relooper/test_fuzz6.cpp +0 -322
  401. data/modules/emscripten/src/relooper/test_fuzz6.txt +0 -291
  402. data/modules/emscripten/src/relooper/test_inf.cpp +0 -813
  403. data/modules/emscripten/src/relooper/test_inf.txt +0 -1131
  404. data/modules/emscripten/src/relooper/testit.sh +0 -62
  405. data/modules/emscripten/src/relooper/updateit.sh +0 -17
  406. data/modules/emscripten/src/runtime.js +0 -604
  407. data/modules/emscripten/src/settings.js +0 -476
  408. data/modules/emscripten/src/shell.html +0 -95
  409. data/modules/emscripten/src/shell.js +0 -173
  410. data/modules/emscripten/src/shell_sharedlib.js +0 -29
  411. data/modules/emscripten/src/simd.js +0 -1128
  412. data/modules/emscripten/src/socket.io.js +0 -3870
  413. data/modules/emscripten/src/struct_info.json +0 -1077
  414. data/modules/emscripten/src/utility.js +0 -411
  415. data/modules/emscripten/src/wrtcp.js +0 -821
  416. data/modules/emscripten/system/bin/sdl-config +0 -13
  417. data/modules/emscripten/system/include/AL/al.h +0 -172
  418. data/modules/emscripten/system/include/AL/alc.h +0 -84
  419. data/modules/emscripten/system/include/EGL/egl.h +0 -329
  420. data/modules/emscripten/system/include/EGL/eglext.h +0 -398
  421. data/modules/emscripten/system/include/EGL/eglplatform.h +0 -141
  422. data/modules/emscripten/system/include/GL/freeglut_std.h +0 -628
  423. data/modules/emscripten/system/include/GL/gl.h +0 -2241
  424. data/modules/emscripten/system/include/GL/glew.h +0 -6
  425. data/modules/emscripten/system/include/GL/glext.h +0 -11127
  426. data/modules/emscripten/system/include/GL/glfw.h +0 -518
  427. data/modules/emscripten/system/include/GL/glu.h +0 -353
  428. data/modules/emscripten/system/include/GL/glut.h +0 -21
  429. data/modules/emscripten/system/include/GLES/gl.h +0 -770
  430. data/modules/emscripten/system/include/GLES/glext.h +0 -1278
  431. data/modules/emscripten/system/include/GLES/glplatform.h +0 -30
  432. data/modules/emscripten/system/include/GLES2/gl2.h +0 -621
  433. data/modules/emscripten/system/include/GLES2/gl2ext.h +0 -803
  434. data/modules/emscripten/system/include/GLES2/gl2platform.h +0 -30
  435. data/modules/emscripten/system/include/KHR/khrplatform.h +0 -277
  436. data/modules/emscripten/system/include/SDL/COPYING +0 -19
  437. data/modules/emscripten/system/include/SDL/SDL.h +0 -162
  438. data/modules/emscripten/system/include/SDL/SDL_assert.h +0 -241
  439. data/modules/emscripten/system/include/SDL/SDL_atomic.h +0 -318
  440. data/modules/emscripten/system/include/SDL/SDL_audio.h +0 -509
  441. data/modules/emscripten/system/include/SDL/SDL_blendmode.h +0 -60
  442. data/modules/emscripten/system/include/SDL/SDL_clipboard.h +0 -75
  443. data/modules/emscripten/system/include/SDL/SDL_compat.h +0 -365
  444. data/modules/emscripten/system/include/SDL/SDL_config.h +0 -48
  445. data/modules/emscripten/system/include/SDL/SDL_config.h.in +0 -297
  446. data/modules/emscripten/system/include/SDL/SDL_config_android.h +0 -133
  447. data/modules/emscripten/system/include/SDL/SDL_config_iphoneos.h +0 -148
  448. data/modules/emscripten/system/include/SDL/SDL_config_macosx.h +0 -172
  449. data/modules/emscripten/system/include/SDL/SDL_config_minimal.h +0 -74
  450. data/modules/emscripten/system/include/SDL/SDL_config_nintendods.h +0 -129
  451. data/modules/emscripten/system/include/SDL/SDL_config_pandora.h +0 -125
  452. data/modules/emscripten/system/include/SDL/SDL_config_windows.h +0 -207
  453. data/modules/emscripten/system/include/SDL/SDL_config_wiz.h +0 -119
  454. data/modules/emscripten/system/include/SDL/SDL_copying.h +0 -20
  455. data/modules/emscripten/system/include/SDL/SDL_cpuinfo.h +0 -150
  456. data/modules/emscripten/system/include/SDL/SDL_endian.h +0 -248
  457. data/modules/emscripten/system/include/SDL/SDL_error.h +0 -77
  458. data/modules/emscripten/system/include/SDL/SDL_events.h +0 -640
  459. data/modules/emscripten/system/include/SDL/SDL_gesture.h +0 -91
  460. data/modules/emscripten/system/include/SDL/SDL_gfxPrimitives.h +0 -246
  461. data/modules/emscripten/system/include/SDL/SDL_haptic.h +0 -1200
  462. data/modules/emscripten/system/include/SDL/SDL_hints.h +0 -206
  463. data/modules/emscripten/system/include/SDL/SDL_image.h +0 -138
  464. data/modules/emscripten/system/include/SDL/SDL_input.h +0 -87
  465. data/modules/emscripten/system/include/SDL/SDL_joystick.h +0 -208
  466. data/modules/emscripten/system/include/SDL/SDL_keyboard.h +0 -169
  467. data/modules/emscripten/system/include/SDL/SDL_keycode.h +0 -344
  468. data/modules/emscripten/system/include/SDL/SDL_loadso.h +0 -85
  469. data/modules/emscripten/system/include/SDL/SDL_log.h +0 -211
  470. data/modules/emscripten/system/include/SDL/SDL_main.h +0 -98
  471. data/modules/emscripten/system/include/SDL/SDL_mixer.h +0 -634
  472. data/modules/emscripten/system/include/SDL/SDL_mouse.h +0 -213
  473. data/modules/emscripten/system/include/SDL/SDL_mutex.h +0 -248
  474. data/modules/emscripten/system/include/SDL/SDL_name.h +0 -11
  475. data/modules/emscripten/system/include/SDL/SDL_opengl.h +0 -11116
  476. data/modules/emscripten/system/include/SDL/SDL_opengles.h +0 -38
  477. data/modules/emscripten/system/include/SDL/SDL_opengles2.h +0 -38
  478. data/modules/emscripten/system/include/SDL/SDL_pixels.h +0 -423
  479. data/modules/emscripten/system/include/SDL/SDL_platform.h +0 -160
  480. data/modules/emscripten/system/include/SDL/SDL_power.h +0 -79
  481. data/modules/emscripten/system/include/SDL/SDL_quit.h +0 -58
  482. data/modules/emscripten/system/include/SDL/SDL_rect.h +0 -136
  483. data/modules/emscripten/system/include/SDL/SDL_render.h +0 -615
  484. data/modules/emscripten/system/include/SDL/SDL_revision.h +0 -2
  485. data/modules/emscripten/system/include/SDL/SDL_revision.h.orig +0 -2
  486. data/modules/emscripten/system/include/SDL/SDL_rotozoom.h +0 -123
  487. data/modules/emscripten/system/include/SDL/SDL_rwops.h +0 -220
  488. data/modules/emscripten/system/include/SDL/SDL_scancode.h +0 -398
  489. data/modules/emscripten/system/include/SDL/SDL_shape.h +0 -147
  490. data/modules/emscripten/system/include/SDL/SDL_stdinc.h +0 -764
  491. data/modules/emscripten/system/include/SDL/SDL_surface.h +0 -499
  492. data/modules/emscripten/system/include/SDL/SDL_syswm.h +0 -241
  493. data/modules/emscripten/system/include/SDL/SDL_thread.h +0 -182
  494. data/modules/emscripten/system/include/SDL/SDL_timer.h +0 -108
  495. data/modules/emscripten/system/include/SDL/SDL_touch.h +0 -124
  496. data/modules/emscripten/system/include/SDL/SDL_ttf.h +0 -249
  497. data/modules/emscripten/system/include/SDL/SDL_types.h +0 -29
  498. data/modules/emscripten/system/include/SDL/SDL_version.h +0 -166
  499. data/modules/emscripten/system/include/SDL/SDL_video.h +0 -820
  500. data/modules/emscripten/system/include/SDL/begin_code.h +0 -135
  501. data/modules/emscripten/system/include/SDL/close_code.h +0 -37
  502. data/modules/emscripten/system/include/X11/X.h +0 -717
  503. data/modules/emscripten/system/include/X11/Xatom.h +0 -79
  504. data/modules/emscripten/system/include/X11/Xfuncproto.h +0 -127
  505. data/modules/emscripten/system/include/X11/Xlib.h +0 -4023
  506. data/modules/emscripten/system/include/X11/Xosdefs.h +0 -116
  507. data/modules/emscripten/system/include/X11/Xutil.h +0 -826
  508. data/modules/emscripten/system/include/X11/keysym.h +0 -73
  509. data/modules/emscripten/system/include/X11/keysymdef.h +0 -2389
  510. data/modules/emscripten/system/include/compat/ctype.h +0 -34
  511. data/modules/emscripten/system/include/compat/malloc.h +0 -48
  512. data/modules/emscripten/system/include/compat/math.h +0 -14
  513. data/modules/emscripten/system/include/compat/netdb.h +0 -22
  514. data/modules/emscripten/system/include/compat/stdarg.h +0 -16
  515. data/modules/emscripten/system/include/compat/stdlib.h +0 -16
  516. data/modules/emscripten/system/include/compat/string.h +0 -17
  517. data/modules/emscripten/system/include/compat/sys/socketvar.h +0 -14
  518. data/modules/emscripten/system/include/compat/sys/stat.h +0 -20
  519. data/modules/emscripten/system/include/compat/sys/timeb.h +0 -35
  520. data/modules/emscripten/system/include/compat/time.h +0 -18
  521. data/modules/emscripten/system/include/compat/unistd.h +0 -16
  522. data/modules/emscripten/system/include/compat/wchar.h +0 -23
  523. data/modules/emscripten/system/include/compat/wctype.h +0 -23
  524. data/modules/emscripten/system/include/compat/xlocale.h +0 -19
  525. data/modules/emscripten/system/include/emscripten/bind.h +0 -1210
  526. data/modules/emscripten/system/include/emscripten/emmintrin.h +0 -87
  527. data/modules/emscripten/system/include/emscripten/emscripten.h +0 -519
  528. data/modules/emscripten/system/include/emscripten/val.h +0 -311
  529. data/modules/emscripten/system/include/emscripten/vector.h +0 -34
  530. data/modules/emscripten/system/include/emscripten/wire.h +0 -393
  531. data/modules/emscripten/system/include/emscripten/xmmintrin.h +0 -131
  532. data/modules/emscripten/system/include/execinfo.h +0 -44
  533. data/modules/emscripten/system/include/gc.h +0 -70
  534. data/modules/emscripten/system/include/gfx/png.h +0 -3798
  535. data/modules/emscripten/system/include/gfx/pngconf.h +0 -1665
  536. data/modules/emscripten/system/include/gfx/tiff.h +0 -654
  537. data/modules/emscripten/system/include/gfx/tiffconf.h +0 -104
  538. data/modules/emscripten/system/include/gfx/tiffio.h +0 -526
  539. data/modules/emscripten/system/include/gfx/tiffvers.h +0 -9
  540. data/modules/emscripten/system/include/jansson.h +0 -323
  541. data/modules/emscripten/system/include/jansson_config.h +0 -54
  542. data/modules/emscripten/system/include/libc/aio.h +0 -69
  543. data/modules/emscripten/system/include/libc/alloca.h +0 -21
  544. data/modules/emscripten/system/include/libc/ar.h +0 -25
  545. data/modules/emscripten/system/include/libc/arpa/ftp.h +0 -35
  546. data/modules/emscripten/system/include/libc/arpa/inet.h +0 -36
  547. data/modules/emscripten/system/include/libc/arpa/nameser.h +0 -467
  548. data/modules/emscripten/system/include/libc/arpa/nameser_compat.h +0 -2
  549. data/modules/emscripten/system/include/libc/arpa/telnet.h +0 -251
  550. data/modules/emscripten/system/include/libc/arpa/tftp.h +0 -31
  551. data/modules/emscripten/system/include/libc/assert.h +0 -19
  552. data/modules/emscripten/system/include/libc/bits/alltypes.h +0 -397
  553. data/modules/emscripten/system/include/libc/bits/endian.h +0 -1
  554. data/modules/emscripten/system/include/libc/bits/errno.h +0 -134
  555. data/modules/emscripten/system/include/libc/bits/fcntl.h +0 -38
  556. data/modules/emscripten/system/include/libc/bits/fenv.h +0 -34
  557. data/modules/emscripten/system/include/libc/bits/float.h +0 -17
  558. data/modules/emscripten/system/include/libc/bits/io.h +0 -0
  559. data/modules/emscripten/system/include/libc/bits/ioctl.h +0 -197
  560. data/modules/emscripten/system/include/libc/bits/ipc.h +0 -14
  561. data/modules/emscripten/system/include/libc/bits/limits.h +0 -8
  562. data/modules/emscripten/system/include/libc/bits/mman.h +0 -62
  563. data/modules/emscripten/system/include/libc/bits/msg.h +0 -16
  564. data/modules/emscripten/system/include/libc/bits/posix.h +0 -2
  565. data/modules/emscripten/system/include/libc/bits/reg.h +0 -19
  566. data/modules/emscripten/system/include/libc/bits/setjmp.h +0 -1
  567. data/modules/emscripten/system/include/libc/bits/shm.h +0 -18
  568. data/modules/emscripten/system/include/libc/bits/signal.h +0 -112
  569. data/modules/emscripten/system/include/libc/bits/socket.h +0 -17
  570. data/modules/emscripten/system/include/libc/bits/stat.h +0 -22
  571. data/modules/emscripten/system/include/libc/bits/statfs.h +0 -7
  572. data/modules/emscripten/system/include/libc/bits/stdarg.h +0 -4
  573. data/modules/emscripten/system/include/libc/bits/stdint.h +0 -20
  574. data/modules/emscripten/system/include/libc/bits/syscall.h +0 -696
  575. data/modules/emscripten/system/include/libc/bits/termios.h +0 -160
  576. data/modules/emscripten/system/include/libc/bits/user.h +0 -48
  577. data/modules/emscripten/system/include/libc/byteswap.h +0 -26
  578. data/modules/emscripten/system/include/libc/complex.h +0 -125
  579. data/modules/emscripten/system/include/libc/cpio.h +0 -29
  580. data/modules/emscripten/system/include/libc/crypt.h +0 -20
  581. data/modules/emscripten/system/include/libc/ctype.h +0 -67
  582. data/modules/emscripten/system/include/libc/dirent.h +0 -79
  583. data/modules/emscripten/system/include/libc/dlfcn.h +0 -42
  584. data/modules/emscripten/system/include/libc/elf.h +0 -2555
  585. data/modules/emscripten/system/include/libc/endian.h +0 -82
  586. data/modules/emscripten/system/include/libc/err.h +0 -25
  587. data/modules/emscripten/system/include/libc/errno.h +0 -27
  588. data/modules/emscripten/system/include/libc/fcntl.h +0 -175
  589. data/modules/emscripten/system/include/libc/features.h +0 -32
  590. data/modules/emscripten/system/include/libc/fenv.h +0 -28
  591. data/modules/emscripten/system/include/libc/float.h +0 -34
  592. data/modules/emscripten/system/include/libc/fnmatch.h +0 -29
  593. data/modules/emscripten/system/include/libc/ftw.h +0 -42
  594. data/modules/emscripten/system/include/libc/getopt.h +0 -31
  595. data/modules/emscripten/system/include/libc/glob.h +0 -48
  596. data/modules/emscripten/system/include/libc/grp.h +0 -52
  597. data/modules/emscripten/system/include/libc/iconv.h +0 -24
  598. data/modules/emscripten/system/include/libc/ifaddrs.h +0 -35
  599. data/modules/emscripten/system/include/libc/inttypes.h +0 -227
  600. data/modules/emscripten/system/include/libc/iso646.h +0 -20
  601. data/modules/emscripten/system/include/libc/langinfo.h +0 -88
  602. data/modules/emscripten/system/include/libc/lastlog.h +0 -1
  603. data/modules/emscripten/system/include/libc/libgen.h +0 -15
  604. data/modules/emscripten/system/include/libc/libintl.h +0 -25
  605. data/modules/emscripten/system/include/libc/limits.h +0 -146
  606. data/modules/emscripten/system/include/libc/link.h +0 -54
  607. data/modules/emscripten/system/include/libc/locale.h +0 -82
  608. data/modules/emscripten/system/include/libc/malloc.h +0 -0
  609. data/modules/emscripten/system/include/libc/math.h +0 -422
  610. data/modules/emscripten/system/include/libc/memory.h +0 -1
  611. data/modules/emscripten/system/include/libc/mntent.h +0 -44
  612. data/modules/emscripten/system/include/libc/monetary.h +0 -23
  613. data/modules/emscripten/system/include/libc/mqueue.h +0 -36
  614. data/modules/emscripten/system/include/libc/net/ethernet.h +0 -55
  615. data/modules/emscripten/system/include/libc/net/if.h +0 -135
  616. data/modules/emscripten/system/include/libc/net/if_arp.h +0 -133
  617. data/modules/emscripten/system/include/libc/net/route.h +0 -124
  618. data/modules/emscripten/system/include/libc/netdb.h +0 -161
  619. data/modules/emscripten/system/include/libc/netinet/ether.h +0 -14
  620. data/modules/emscripten/system/include/libc/netinet/icmp6.h +0 -305
  621. data/modules/emscripten/system/include/libc/netinet/if_ether.h +0 -126
  622. data/modules/emscripten/system/include/libc/netinet/in.h +0 -336
  623. data/modules/emscripten/system/include/libc/netinet/in_systm.h +0 -9
  624. data/modules/emscripten/system/include/libc/netinet/ip.h +0 -186
  625. data/modules/emscripten/system/include/libc/netinet/ip6.h +0 -142
  626. data/modules/emscripten/system/include/libc/netinet/ip_icmp.h +0 -192
  627. data/modules/emscripten/system/include/libc/netinet/tcp.h +0 -71
  628. data/modules/emscripten/system/include/libc/netinet/udp.h +0 -35
  629. data/modules/emscripten/system/include/libc/netpacket/packet.h +0 -44
  630. data/modules/emscripten/system/include/libc/nl_types.h +0 -22
  631. data/modules/emscripten/system/include/libc/paths.h +0 -32
  632. data/modules/emscripten/system/include/libc/poll.h +0 -46
  633. data/modules/emscripten/system/include/libc/pthread.h +0 -222
  634. data/modules/emscripten/system/include/libc/pty.h +0 -18
  635. data/modules/emscripten/system/include/libc/pwd.h +0 -49
  636. data/modules/emscripten/system/include/libc/readme.txt +0 -3
  637. data/modules/emscripten/system/include/libc/regex.h +0 -62
  638. data/modules/emscripten/system/include/libc/resolv.h +0 -144
  639. data/modules/emscripten/system/include/libc/sched.h +0 -132
  640. data/modules/emscripten/system/include/libc/search.h +0 -51
  641. data/modules/emscripten/system/include/libc/semaphore.h +0 -35
  642. data/modules/emscripten/system/include/libc/setjmp.h +0 -42
  643. data/modules/emscripten/system/include/libc/shadow.h +0 -44
  644. data/modules/emscripten/system/include/libc/signal.h +0 -255
  645. data/modules/emscripten/system/include/libc/spawn.h +0 -74
  646. data/modules/emscripten/system/include/libc/stdalign.h +0 -15
  647. data/modules/emscripten/system/include/libc/stdarg.h +0 -25
  648. data/modules/emscripten/system/include/libc/stdbool.h +0 -14
  649. data/modules/emscripten/system/include/libc/stddef.h +0 -18
  650. data/modules/emscripten/system/include/libc/stdint.h +0 -117
  651. data/modules/emscripten/system/include/libc/stdio.h +0 -199
  652. data/modules/emscripten/system/include/libc/stdio_ext.h +0 -34
  653. data/modules/emscripten/system/include/libc/stdlib.h +0 -171
  654. data/modules/emscripten/system/include/libc/stdnoreturn.h +0 -5
  655. data/modules/emscripten/system/include/libc/string.h +0 -102
  656. data/modules/emscripten/system/include/libc/strings.h +0 -35
  657. data/modules/emscripten/system/include/libc/stropts.h +0 -139
  658. data/modules/emscripten/system/include/libc/sys/acct.h +0 -75
  659. data/modules/emscripten/system/include/libc/sys/cachectl.h +0 -22
  660. data/modules/emscripten/system/include/libc/sys/dir.h +0 -2
  661. data/modules/emscripten/system/include/libc/sys/epoll.h +0 -67
  662. data/modules/emscripten/system/include/libc/sys/errno.h +0 -2
  663. data/modules/emscripten/system/include/libc/sys/eventfd.h +0 -26
  664. data/modules/emscripten/system/include/libc/sys/fcntl.h +0 -2
  665. data/modules/emscripten/system/include/libc/sys/file.h +0 -21
  666. data/modules/emscripten/system/include/libc/sys/fsuid.h +0 -20
  667. data/modules/emscripten/system/include/libc/sys/inotify.h +0 -57
  668. data/modules/emscripten/system/include/libc/sys/io.h +0 -17
  669. data/modules/emscripten/system/include/libc/sys/ioctl.h +0 -14
  670. data/modules/emscripten/system/include/libc/sys/ipc.h +0 -42
  671. data/modules/emscripten/system/include/libc/sys/klog.h +0 -14
  672. data/modules/emscripten/system/include/libc/sys/mman.h +0 -55
  673. data/modules/emscripten/system/include/libc/sys/mount.h +0 -72
  674. data/modules/emscripten/system/include/libc/sys/msg.h +0 -52
  675. data/modules/emscripten/system/include/libc/sys/mtio.h +0 -188
  676. data/modules/emscripten/system/include/libc/sys/param.h +0 -35
  677. data/modules/emscripten/system/include/libc/sys/personality.h +0 -46
  678. data/modules/emscripten/system/include/libc/sys/poll.h +0 -2
  679. data/modules/emscripten/system/include/libc/sys/prctl.h +0 -101
  680. data/modules/emscripten/system/include/libc/sys/procfs.h +0 -65
  681. data/modules/emscripten/system/include/libc/sys/ptrace.h +0 -96
  682. data/modules/emscripten/system/include/libc/sys/reboot.h +0 -20
  683. data/modules/emscripten/system/include/libc/sys/reg.h +0 -9
  684. data/modules/emscripten/system/include/libc/sys/resource.h +0 -103
  685. data/modules/emscripten/system/include/libc/sys/select.h +0 -42
  686. data/modules/emscripten/system/include/libc/sys/sem.h +0 -82
  687. data/modules/emscripten/system/include/libc/sys/sendfile.h +0 -22
  688. data/modules/emscripten/system/include/libc/sys/shm.h +0 -61
  689. data/modules/emscripten/system/include/libc/sys/signal.h +0 -2
  690. data/modules/emscripten/system/include/libc/sys/signalfd.h +0 -44
  691. data/modules/emscripten/system/include/libc/sys/socket.h +0 -299
  692. data/modules/emscripten/system/include/libc/sys/stat.h +0 -114
  693. data/modules/emscripten/system/include/libc/sys/statfs.h +0 -32
  694. data/modules/emscripten/system/include/libc/sys/statvfs.h +0 -57
  695. data/modules/emscripten/system/include/libc/sys/stropts.h +0 -1
  696. data/modules/emscripten/system/include/libc/sys/swap.h +0 -21
  697. data/modules/emscripten/system/include/libc/sys/syscall.h +0 -6
  698. data/modules/emscripten/system/include/libc/sys/sysctl.h +0 -17
  699. data/modules/emscripten/system/include/libc/sys/sysinfo.h +0 -36
  700. data/modules/emscripten/system/include/libc/sys/syslog.h +0 -1
  701. data/modules/emscripten/system/include/libc/sys/sysmacros.h +0 -15
  702. data/modules/emscripten/system/include/libc/sys/termios.h +0 -2
  703. data/modules/emscripten/system/include/libc/sys/time.h +0 -57
  704. data/modules/emscripten/system/include/libc/sys/timerfd.h +0 -24
  705. data/modules/emscripten/system/include/libc/sys/times.h +0 -26
  706. data/modules/emscripten/system/include/libc/sys/timex.h +0 -98
  707. data/modules/emscripten/system/include/libc/sys/ttydefaults.h +0 -39
  708. data/modules/emscripten/system/include/libc/sys/types.h +0 -91
  709. data/modules/emscripten/system/include/libc/sys/ucontext.h +0 -1
  710. data/modules/emscripten/system/include/libc/sys/uio.h +0 -48
  711. data/modules/emscripten/system/include/libc/sys/un.h +0 -32
  712. data/modules/emscripten/system/include/libc/sys/user.h +0 -16
  713. data/modules/emscripten/system/include/libc/sys/utsname.h +0 -30
  714. data/modules/emscripten/system/include/libc/sys/vfs.h +0 -1
  715. data/modules/emscripten/system/include/libc/sys/wait.h +0 -55
  716. data/modules/emscripten/system/include/libc/sys/xattr.h +0 -30
  717. data/modules/emscripten/system/include/libc/syscall.h +0 -1
  718. data/modules/emscripten/system/include/libc/sysexits.h +0 -21
  719. data/modules/emscripten/system/include/libc/syslog.h +0 -104
  720. data/modules/emscripten/system/include/libc/tar.h +0 -33
  721. data/modules/emscripten/system/include/libc/termios.h +0 -46
  722. data/modules/emscripten/system/include/libc/tgmath.h +0 -270
  723. data/modules/emscripten/system/include/libc/time.h +0 -132
  724. data/modules/emscripten/system/include/libc/ucontext.h +0 -25
  725. data/modules/emscripten/system/include/libc/ulimit.h +0 -17
  726. data/modules/emscripten/system/include/libc/unistd.h +0 -519
  727. data/modules/emscripten/system/include/libc/utime.h +0 -24
  728. data/modules/emscripten/system/include/libc/utmp.h +0 -47
  729. data/modules/emscripten/system/include/libc/utmpx.h +0 -58
  730. data/modules/emscripten/system/include/libc/values.h +0 -39
  731. data/modules/emscripten/system/include/libc/wchar.h +0 -183
  732. data/modules/emscripten/system/include/libc/wctype.h +0 -77
  733. data/modules/emscripten/system/include/libc/wordexp.h +0 -42
  734. data/modules/emscripten/system/include/libcxx/CREDITS.TXT +0 -123
  735. data/modules/emscripten/system/include/libcxx/LICENSE.txt +0 -76
  736. data/modules/emscripten/system/include/libcxx/__bit_reference +0 -1287
  737. data/modules/emscripten/system/include/libcxx/__config +0 -610
  738. data/modules/emscripten/system/include/libcxx/__debug +0 -218
  739. data/modules/emscripten/system/include/libcxx/__functional_03 +0 -2130
  740. data/modules/emscripten/system/include/libcxx/__functional_base +0 -615
  741. data/modules/emscripten/system/include/libcxx/__functional_base_03 +0 -1087
  742. data/modules/emscripten/system/include/libcxx/__hash_table +0 -2457
  743. data/modules/emscripten/system/include/libcxx/__locale +0 -1445
  744. data/modules/emscripten/system/include/libcxx/__mutex_base +0 -407
  745. data/modules/emscripten/system/include/libcxx/__split_buffer +0 -654
  746. data/modules/emscripten/system/include/libcxx/__sso_allocator +0 -77
  747. data/modules/emscripten/system/include/libcxx/__std_stream +0 -359
  748. data/modules/emscripten/system/include/libcxx/__tree +0 -2309
  749. data/modules/emscripten/system/include/libcxx/__tuple +0 -305
  750. data/modules/emscripten/system/include/libcxx/__tuple_03 +0 -27
  751. data/modules/emscripten/system/include/libcxx/__undef_min_max +0 -27
  752. data/modules/emscripten/system/include/libcxx/algorithm +0 -5679
  753. data/modules/emscripten/system/include/libcxx/array +0 -342
  754. data/modules/emscripten/system/include/libcxx/atomic +0 -1531
  755. data/modules/emscripten/system/include/libcxx/bitset +0 -1081
  756. data/modules/emscripten/system/include/libcxx/cassert +0 -25
  757. data/modules/emscripten/system/include/libcxx/ccomplex +0 -29
  758. data/modules/emscripten/system/include/libcxx/cctype +0 -164
  759. data/modules/emscripten/system/include/libcxx/cerrno +0 -393
  760. data/modules/emscripten/system/include/libcxx/cfenv +0 -82
  761. data/modules/emscripten/system/include/libcxx/cfloat +0 -78
  762. data/modules/emscripten/system/include/libcxx/chrono +0 -1027
  763. data/modules/emscripten/system/include/libcxx/cinttypes +0 -259
  764. data/modules/emscripten/system/include/libcxx/ciso646 +0 -25
  765. data/modules/emscripten/system/include/libcxx/climits +0 -48
  766. data/modules/emscripten/system/include/libcxx/clocale +0 -53
  767. data/modules/emscripten/system/include/libcxx/cmath +0 -1690
  768. data/modules/emscripten/system/include/libcxx/codecvt +0 -550
  769. data/modules/emscripten/system/include/libcxx/complex +0 -1567
  770. data/modules/emscripten/system/include/libcxx/complex.h +0 -35
  771. data/modules/emscripten/system/include/libcxx/condition_variable +0 -256
  772. data/modules/emscripten/system/include/libcxx/csetjmp +0 -52
  773. data/modules/emscripten/system/include/libcxx/csignal +0 -58
  774. data/modules/emscripten/system/include/libcxx/cstdarg +0 -48
  775. data/modules/emscripten/system/include/libcxx/cstdbool +0 -32
  776. data/modules/emscripten/system/include/libcxx/cstddef +0 -103
  777. data/modules/emscripten/system/include/libcxx/cstdint +0 -191
  778. data/modules/emscripten/system/include/libcxx/cstdio +0 -182
  779. data/modules/emscripten/system/include/libcxx/cstdlib +0 -172
  780. data/modules/emscripten/system/include/libcxx/cstring +0 -112
  781. data/modules/emscripten/system/include/libcxx/ctgmath +0 -29
  782. data/modules/emscripten/system/include/libcxx/ctime +0 -72
  783. data/modules/emscripten/system/include/libcxx/cwchar +0 -217
  784. data/modules/emscripten/system/include/libcxx/cwctype +0 -213
  785. data/modules/emscripten/system/include/libcxx/deque +0 -2873
  786. data/modules/emscripten/system/include/libcxx/dynarray +0 -311
  787. data/modules/emscripten/system/include/libcxx/exception +0 -250
  788. data/modules/emscripten/system/include/libcxx/ext/__hash +0 -46
  789. data/modules/emscripten/system/include/libcxx/ext/hash_map +0 -1007
  790. data/modules/emscripten/system/include/libcxx/ext/hash_set +0 -661
  791. data/modules/emscripten/system/include/libcxx/forward_list +0 -1663
  792. data/modules/emscripten/system/include/libcxx/fstream +0 -1431
  793. data/modules/emscripten/system/include/libcxx/functional +0 -2418
  794. data/modules/emscripten/system/include/libcxx/future +0 -2615
  795. data/modules/emscripten/system/include/libcxx/initializer_list +0 -118
  796. data/modules/emscripten/system/include/libcxx/iomanip +0 -651
  797. data/modules/emscripten/system/include/libcxx/ios +0 -1023
  798. data/modules/emscripten/system/include/libcxx/iosfwd +0 -194
  799. data/modules/emscripten/system/include/libcxx/iostream +0 -60
  800. data/modules/emscripten/system/include/libcxx/istream +0 -1716
  801. data/modules/emscripten/system/include/libcxx/iterator +0 -1568
  802. data/modules/emscripten/system/include/libcxx/limits +0 -813
  803. data/modules/emscripten/system/include/libcxx/list +0 -2355
  804. data/modules/emscripten/system/include/libcxx/locale +0 -4465
  805. data/modules/emscripten/system/include/libcxx/map +0 -2045
  806. data/modules/emscripten/system/include/libcxx/memory +0 -5448
  807. data/modules/emscripten/system/include/libcxx/mutex +0 -566
  808. data/modules/emscripten/system/include/libcxx/new +0 -146
  809. data/modules/emscripten/system/include/libcxx/numeric +0 -197
  810. data/modules/emscripten/system/include/libcxx/optional +0 -697
  811. data/modules/emscripten/system/include/libcxx/ostream +0 -1295
  812. data/modules/emscripten/system/include/libcxx/queue +0 -717
  813. data/modules/emscripten/system/include/libcxx/random +0 -6725
  814. data/modules/emscripten/system/include/libcxx/ratio +0 -487
  815. data/modules/emscripten/system/include/libcxx/readme.txt +0 -1
  816. data/modules/emscripten/system/include/libcxx/regex +0 -6487
  817. data/modules/emscripten/system/include/libcxx/scoped_allocator +0 -578
  818. data/modules/emscripten/system/include/libcxx/set +0 -1189
  819. data/modules/emscripten/system/include/libcxx/shared_mutex +0 -419
  820. data/modules/emscripten/system/include/libcxx/sstream +0 -972
  821. data/modules/emscripten/system/include/libcxx/stack +0 -292
  822. data/modules/emscripten/system/include/libcxx/stdexcept +0 -162
  823. data/modules/emscripten/system/include/libcxx/streambuf +0 -564
  824. data/modules/emscripten/system/include/libcxx/string +0 -4198
  825. data/modules/emscripten/system/include/libcxx/strstream +0 -400
  826. data/modules/emscripten/system/include/libcxx/support/ibm/limits.h +0 -99
  827. data/modules/emscripten/system/include/libcxx/support/ibm/support.h +0 -54
  828. data/modules/emscripten/system/include/libcxx/support/ibm/xlocale.h +0 -326
  829. data/modules/emscripten/system/include/libcxx/support/solaris/floatingpoint.h +0 -5
  830. data/modules/emscripten/system/include/libcxx/support/solaris/wchar.h +0 -38
  831. data/modules/emscripten/system/include/libcxx/support/solaris/xlocale.h +0 -146
  832. data/modules/emscripten/system/include/libcxx/support/win32/limits_win32.h +0 -79
  833. data/modules/emscripten/system/include/libcxx/support/win32/locale_win32.h +0 -129
  834. data/modules/emscripten/system/include/libcxx/support/win32/math_win32.h +0 -115
  835. data/modules/emscripten/system/include/libcxx/support/win32/support.h +0 -119
  836. data/modules/emscripten/system/include/libcxx/system_error +0 -642
  837. data/modules/emscripten/system/include/libcxx/tgmath.h +0 -29
  838. data/modules/emscripten/system/include/libcxx/thread +0 -458
  839. data/modules/emscripten/system/include/libcxx/tuple +0 -1102
  840. data/modules/emscripten/system/include/libcxx/type_traits +0 -3292
  841. data/modules/emscripten/system/include/libcxx/typeindex +0 -103
  842. data/modules/emscripten/system/include/libcxx/typeinfo +0 -124
  843. data/modules/emscripten/system/include/libcxx/unordered_map +0 -2078
  844. data/modules/emscripten/system/include/libcxx/unordered_set +0 -1379
  845. data/modules/emscripten/system/include/libcxx/utility +0 -768
  846. data/modules/emscripten/system/include/libcxx/valarray +0 -4779
  847. data/modules/emscripten/system/include/libcxx/vector +0 -3246
  848. data/modules/emscripten/system/include/unwind.h +0 -154
  849. data/modules/emscripten/system/include/uuid/uuid.h +0 -35
  850. data/modules/emscripten/system/include/zconf.h +0 -428
  851. data/modules/emscripten/system/include/zlib.h +0 -1613
  852. data/modules/emscripten/system/lib/compiler-rt/LICENSE.TXT +0 -97
  853. data/modules/emscripten/system/lib/compiler-rt/divdi3.c +0 -47
  854. data/modules/emscripten/system/lib/compiler-rt/int_endianness.h +0 -116
  855. data/modules/emscripten/system/lib/compiler-rt/int_lib.h +0 -46
  856. data/modules/emscripten/system/lib/compiler-rt/int_math.h +0 -67
  857. data/modules/emscripten/system/lib/compiler-rt/int_types.h +0 -140
  858. data/modules/emscripten/system/lib/compiler-rt/int_util.h +0 -29
  859. data/modules/emscripten/system/lib/compiler-rt/muldi3.c +0 -56
  860. data/modules/emscripten/system/lib/compiler-rt/readme.txt +0 -20
  861. data/modules/emscripten/system/lib/compiler-rt/udivdi3.c +0 -36
  862. data/modules/emscripten/system/lib/compiler-rt/udivmoddi4.c +0 -251
  863. data/modules/emscripten/system/lib/debugging.cpp +0 -24
  864. data/modules/emscripten/system/lib/dlmalloc.c +0 -6297
  865. data/modules/emscripten/system/lib/embind/bind.cpp +0 -63
  866. data/modules/emscripten/system/lib/libc/gen/err.c +0 -49
  867. data/modules/emscripten/system/lib/libc/gen/errx.c +0 -49
  868. data/modules/emscripten/system/lib/libc/gen/verr.c +0 -58
  869. data/modules/emscripten/system/lib/libc/gen/verrx.c +0 -51
  870. data/modules/emscripten/system/lib/libc/gen/vwarn.c +0 -55
  871. data/modules/emscripten/system/lib/libc/gen/vwarnx.c +0 -48
  872. data/modules/emscripten/system/lib/libc/gen/warn.c +0 -49
  873. data/modules/emscripten/system/lib/libc/gen/warnx.c +0 -49
  874. data/modules/emscripten/system/lib/libc/musl/COPYRIGHT +0 -92
  875. data/modules/emscripten/system/lib/libc/musl/readme.txt +0 -9
  876. data/modules/emscripten/system/lib/libc/musl/src/ctype/alpha.h +0 -125
  877. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswalnum.c +0 -7
  878. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswalpha.c +0 -14
  879. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswblank.c +0 -8
  880. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswcntrl.c +0 -10
  881. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswctype.c +0 -63
  882. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswdigit.c +0 -9
  883. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswgraph.c +0 -7
  884. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswlower.c +0 -6
  885. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswprint.c +0 -19
  886. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswpunct.c +0 -12
  887. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswspace.c +0 -19
  888. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswupper.c +0 -6
  889. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswxdigit.c +0 -7
  890. data/modules/emscripten/system/lib/libc/musl/src/ctype/nonspacing.h +0 -62
  891. data/modules/emscripten/system/lib/libc/musl/src/ctype/punct.h +0 -109
  892. data/modules/emscripten/system/lib/libc/musl/src/ctype/towctrans.c +0 -268
  893. data/modules/emscripten/system/lib/libc/musl/src/ctype/wcswidth.c +0 -8
  894. data/modules/emscripten/system/lib/libc/musl/src/ctype/wctrans.c +0 -16
  895. data/modules/emscripten/system/lib/libc/musl/src/ctype/wcwidth.c +0 -29
  896. data/modules/emscripten/system/lib/libc/musl/src/ctype/wide.h +0 -42
  897. data/modules/emscripten/system/lib/libc/musl/src/internal/libc.c +0 -22
  898. data/modules/emscripten/system/lib/libc/musl/src/internal/libc.h +0 -71
  899. data/modules/emscripten/system/lib/libc/musl/src/internal/locale_impl.h +0 -5
  900. data/modules/emscripten/system/lib/libc/musl/src/internal/stdio_impl.h +0 -92
  901. data/modules/emscripten/system/lib/libc/musl/src/locale/big5.h +0 -1085
  902. data/modules/emscripten/system/lib/libc/musl/src/locale/codepages.h +0 -238
  903. data/modules/emscripten/system/lib/libc/musl/src/locale/gb18030.h +0 -1836
  904. data/modules/emscripten/system/lib/libc/musl/src/locale/hkscs.h +0 -390
  905. data/modules/emscripten/system/lib/libc/musl/src/locale/iconv.c +0 -454
  906. data/modules/emscripten/system/lib/libc/musl/src/locale/iswalnum_l.c +0 -6
  907. data/modules/emscripten/system/lib/libc/musl/src/locale/iswalpha_l.c +0 -6
  908. data/modules/emscripten/system/lib/libc/musl/src/locale/iswblank_l.c +0 -6
  909. data/modules/emscripten/system/lib/libc/musl/src/locale/iswcntrl_l.c +0 -6
  910. data/modules/emscripten/system/lib/libc/musl/src/locale/iswctype_l.c +0 -9
  911. data/modules/emscripten/system/lib/libc/musl/src/locale/iswdigit_l.c +0 -6
  912. data/modules/emscripten/system/lib/libc/musl/src/locale/iswgraph_l.c +0 -6
  913. data/modules/emscripten/system/lib/libc/musl/src/locale/iswlower_l.c +0 -6
  914. data/modules/emscripten/system/lib/libc/musl/src/locale/iswprint_l.c +0 -6
  915. data/modules/emscripten/system/lib/libc/musl/src/locale/iswpunct_l.c +0 -6
  916. data/modules/emscripten/system/lib/libc/musl/src/locale/iswspace_l.c +0 -6
  917. data/modules/emscripten/system/lib/libc/musl/src/locale/iswupper_l.c +0 -6
  918. data/modules/emscripten/system/lib/libc/musl/src/locale/iswxdigit_l.c +0 -6
  919. data/modules/emscripten/system/lib/libc/musl/src/locale/jis0208.h +0 -550
  920. data/modules/emscripten/system/lib/libc/musl/src/locale/ksc.h +0 -640
  921. data/modules/emscripten/system/lib/libc/musl/src/locale/legacychars.h +0 -39
  922. data/modules/emscripten/system/lib/libc/musl/src/locale/strfmon.c +0 -101
  923. data/modules/emscripten/system/lib/libc/musl/src/locale/strxfrm.c +0 -18
  924. data/modules/emscripten/system/lib/libc/musl/src/locale/towctrans_l.c +0 -6
  925. data/modules/emscripten/system/lib/libc/musl/src/locale/towlower_l.c +0 -9
  926. data/modules/emscripten/system/lib/libc/musl/src/locale/towupper_l.c +0 -9
  927. data/modules/emscripten/system/lib/libc/musl/src/locale/wcscoll.c +0 -16
  928. data/modules/emscripten/system/lib/libc/musl/src/locale/wcscoll_l.c +0 -6
  929. data/modules/emscripten/system/lib/libc/musl/src/locale/wcsxfrm.c +0 -21
  930. data/modules/emscripten/system/lib/libc/musl/src/locale/wcsxfrm_l.c +0 -6
  931. data/modules/emscripten/system/lib/libc/musl/src/locale/wctrans_l.c +0 -6
  932. data/modules/emscripten/system/lib/libc/musl/src/locale/wctype_l.c +0 -9
  933. data/modules/emscripten/system/lib/libc/musl/src/multibyte/btowc.c +0 -7
  934. data/modules/emscripten/system/lib/libc/musl/src/multibyte/internal.c +0 -38
  935. data/modules/emscripten/system/lib/libc/musl/src/multibyte/internal.h +0 -22
  936. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mblen.c +0 -17
  937. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbrlen.c +0 -18
  938. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbrtowc.c +0 -57
  939. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsinit.c +0 -17
  940. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsnrtowcs.c +0 -65
  941. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsrtowcs.c +0 -100
  942. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbstowcs.c +0 -7
  943. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbtowc.c +0 -53
  944. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcrtomb.c +0 -38
  945. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcsnrtombs.c +0 -52
  946. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcsrtombs.c +0 -58
  947. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcstombs.c +0 -7
  948. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wctob.c +0 -8
  949. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wctomb.c +0 -18
  950. data/modules/emscripten/system/lib/libc/musl/src/regex/regcomp.c +0 -3352
  951. data/modules/emscripten/system/lib/libc/musl/src/regex/regerror.c +0 -35
  952. data/modules/emscripten/system/lib/libc/musl/src/regex/regexec.c +0 -1011
  953. data/modules/emscripten/system/lib/libc/musl/src/regex/tre-mem.c +0 -158
  954. data/modules/emscripten/system/lib/libc/musl/src/regex/tre.h +0 -231
  955. data/modules/emscripten/system/lib/libc/musl/src/stdio/fwprintf.c +0 -13
  956. data/modules/emscripten/system/lib/libc/musl/src/stdio/swprintf.c +0 -14
  957. data/modules/emscripten/system/lib/libc/musl/src/stdio/vfwprintf.c +0 -361
  958. data/modules/emscripten/system/lib/libc/musl/src/stdio/vswprintf.c +0 -53
  959. data/modules/emscripten/system/lib/libc/musl/src/stdio/vwprintf.c +0 -7
  960. data/modules/emscripten/system/lib/libc/musl/src/stdio/wprintf.c +0 -13
  961. data/modules/emscripten/system/lib/libc/musl/src/stdlib/ecvt.c +0 -19
  962. data/modules/emscripten/system/lib/libc/musl/src/stdlib/fcvt.c +0 -25
  963. data/modules/emscripten/system/lib/libc/musl/src/stdlib/gcvt.c +0 -8
  964. data/modules/emscripten/system/lib/libc/musl/src/string/wcpcpy.c +0 -6
  965. data/modules/emscripten/system/lib/libc/musl/src/string/wcpncpy.c +0 -6
  966. data/modules/emscripten/system/lib/libc/musl/src/string/wcscasecmp.c +0 -7
  967. data/modules/emscripten/system/lib/libc/musl/src/string/wcscasecmp_l.c +0 -6
  968. data/modules/emscripten/system/lib/libc/musl/src/string/wcscat.c +0 -7
  969. data/modules/emscripten/system/lib/libc/musl/src/string/wcschr.c +0 -8
  970. data/modules/emscripten/system/lib/libc/musl/src/string/wcscmp.c +0 -7
  971. data/modules/emscripten/system/lib/libc/musl/src/string/wcscpy.c +0 -8
  972. data/modules/emscripten/system/lib/libc/musl/src/string/wcscspn.c +0 -10
  973. data/modules/emscripten/system/lib/libc/musl/src/string/wcsdup.c +0 -11
  974. data/modules/emscripten/system/lib/libc/musl/src/string/wcslen.c +0 -8
  975. data/modules/emscripten/system/lib/libc/musl/src/string/wcsncasecmp.c +0 -9
  976. data/modules/emscripten/system/lib/libc/musl/src/string/wcsncasecmp_l.c +0 -6
  977. data/modules/emscripten/system/lib/libc/musl/src/string/wcsncat.c +0 -10
  978. data/modules/emscripten/system/lib/libc/musl/src/string/wcsncmp.c +0 -7
  979. data/modules/emscripten/system/lib/libc/musl/src/string/wcsncpy.c +0 -9
  980. data/modules/emscripten/system/lib/libc/musl/src/string/wcsnlen.c +0 -8
  981. data/modules/emscripten/system/lib/libc/musl/src/string/wcspbrk.c +0 -7
  982. data/modules/emscripten/system/lib/libc/musl/src/string/wcsrchr.c +0 -8
  983. data/modules/emscripten/system/lib/libc/musl/src/string/wcsspn.c +0 -8
  984. data/modules/emscripten/system/lib/libc/musl/src/string/wcsstr.c +0 -108
  985. data/modules/emscripten/system/lib/libc/musl/src/string/wcstok.c +0 -12
  986. data/modules/emscripten/system/lib/libc/musl/src/string/wcswcs.c +0 -6
  987. data/modules/emscripten/system/lib/libc/musl/src/string/wmemchr.c +0 -8
  988. data/modules/emscripten/system/lib/libc/musl/src/string/wmemcmp.c +0 -8
  989. data/modules/emscripten/system/lib/libc/musl/src/string/wmemcpy.c +0 -9
  990. data/modules/emscripten/system/lib/libc/musl/src/string/wmemmove.c +0 -12
  991. data/modules/emscripten/system/lib/libc/musl/src/string/wmemset.c +0 -9
  992. data/modules/emscripten/system/lib/libc/stdlib/getopt_long.c +0 -511
  993. data/modules/emscripten/system/lib/libc/stdlib/strtod.c +0 -305
  994. data/modules/emscripten/system/lib/libc.symbols +0 -81
  995. data/modules/emscripten/system/lib/libcextra.symbols +0 -115
  996. data/modules/emscripten/system/lib/libcxx/CREDITS.TXT +0 -123
  997. data/modules/emscripten/system/lib/libcxx/LICENSE.txt +0 -76
  998. data/modules/emscripten/system/lib/libcxx/algorithm.cpp +0 -84
  999. data/modules/emscripten/system/lib/libcxx/bind.cpp +0 -30
  1000. data/modules/emscripten/system/lib/libcxx/chrono.cpp +0 -132
  1001. data/modules/emscripten/system/lib/libcxx/condition_variable.cpp +0 -81
  1002. data/modules/emscripten/system/lib/libcxx/debug.cpp +0 -530
  1003. data/modules/emscripten/system/lib/libcxx/exception.cpp +0 -307
  1004. data/modules/emscripten/system/lib/libcxx/future.cpp +0 -291
  1005. data/modules/emscripten/system/lib/libcxx/hash.cpp +0 -570
  1006. data/modules/emscripten/system/lib/libcxx/ios.cpp +0 -460
  1007. data/modules/emscripten/system/lib/libcxx/iostream.cpp +0 -68
  1008. data/modules/emscripten/system/lib/libcxx/locale.cpp +0 -6169
  1009. data/modules/emscripten/system/lib/libcxx/memory.cpp +0 -223
  1010. data/modules/emscripten/system/lib/libcxx/mutex.cpp +0 -253
  1011. data/modules/emscripten/system/lib/libcxx/new.cpp +0 -239
  1012. data/modules/emscripten/system/lib/libcxx/optional.cpp +0 -25
  1013. data/modules/emscripten/system/lib/libcxx/random.cpp +0 -74
  1014. data/modules/emscripten/system/lib/libcxx/readme.txt +0 -1
  1015. data/modules/emscripten/system/lib/libcxx/regex.cpp +0 -325
  1016. data/modules/emscripten/system/lib/libcxx/shared_mutex.cpp +0 -101
  1017. data/modules/emscripten/system/lib/libcxx/stdexcept.cpp +0 -200
  1018. data/modules/emscripten/system/lib/libcxx/string.cpp +0 -530
  1019. data/modules/emscripten/system/lib/libcxx/strstream.cpp +0 -329
  1020. data/modules/emscripten/system/lib/libcxx/support/solaris/README +0 -4
  1021. data/modules/emscripten/system/lib/libcxx/support/solaris/mbsnrtowcs.inc +0 -76
  1022. data/modules/emscripten/system/lib/libcxx/support/solaris/wcsnrtombs.inc +0 -93
  1023. data/modules/emscripten/system/lib/libcxx/support/solaris/xlocale.c +0 -245
  1024. data/modules/emscripten/system/lib/libcxx/support/win32/locale_win32.cpp +0 -95
  1025. data/modules/emscripten/system/lib/libcxx/support/win32/support.cpp +0 -166
  1026. data/modules/emscripten/system/lib/libcxx/symbols +0 -2699
  1027. data/modules/emscripten/system/lib/libcxx/system_error.cpp +0 -205
  1028. data/modules/emscripten/system/lib/libcxx/thread.cpp +0 -225
  1029. data/modules/emscripten/system/lib/libcxx/typeinfo.cpp +0 -73
  1030. data/modules/emscripten/system/lib/libcxx/utility.cpp +0 -17
  1031. data/modules/emscripten/system/lib/libcxx/valarray.cpp +0 -56
  1032. data/modules/emscripten/system/lib/libcxxabi/CREDITS.TXT +0 -38
  1033. data/modules/emscripten/system/lib/libcxxabi/LICENSE.TXT +0 -76
  1034. data/modules/emscripten/system/lib/libcxxabi/include/cxa_demangle.h +0 -167
  1035. data/modules/emscripten/system/lib/libcxxabi/include/cxxabi.h +0 -175
  1036. data/modules/emscripten/system/lib/libcxxabi/lib/buildit +0 -99
  1037. data/modules/emscripten/system/lib/libcxxabi/readme.txt +0 -1
  1038. data/modules/emscripten/system/lib/libcxxabi/src/abort_message.cpp +0 -50
  1039. data/modules/emscripten/system/lib/libcxxabi/src/abort_message.h +0 -33
  1040. data/modules/emscripten/system/lib/libcxxabi/src/cxa_aux_runtime.cpp +0 -34
  1041. data/modules/emscripten/system/lib/libcxxabi/src/cxa_demangle.cpp +0 -11036
  1042. data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception.cpp +0 -622
  1043. data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception.hpp +0 -123
  1044. data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception_storage.cpp +0 -91
  1045. data/modules/emscripten/system/lib/libcxxabi/src/cxa_guard.cpp +0 -231
  1046. data/modules/emscripten/system/lib/libcxxabi/src/cxa_handlers.cpp +0 -125
  1047. data/modules/emscripten/system/lib/libcxxabi/src/cxa_handlers.hpp +0 -54
  1048. data/modules/emscripten/system/lib/libcxxabi/src/cxa_new_delete.cpp +0 -242
  1049. data/modules/emscripten/system/lib/libcxxabi/src/cxa_personality.cpp +0 -1055
  1050. data/modules/emscripten/system/lib/libcxxabi/src/cxa_unexpected.cpp +0 -27
  1051. data/modules/emscripten/system/lib/libcxxabi/src/cxa_vector.cpp +0 -367
  1052. data/modules/emscripten/system/lib/libcxxabi/src/cxa_virtual.cpp +0 -31
  1053. data/modules/emscripten/system/lib/libcxxabi/src/exception.cpp +0 -41
  1054. data/modules/emscripten/system/lib/libcxxabi/src/fallback_malloc.ipp +0 -174
  1055. data/modules/emscripten/system/lib/libcxxabi/src/private_typeinfo.cpp +0 -1146
  1056. data/modules/emscripten/system/lib/libcxxabi/src/private_typeinfo.h +0 -248
  1057. data/modules/emscripten/system/lib/libcxxabi/src/stdexcept.cpp +0 -169
  1058. data/modules/emscripten/system/lib/libcxxabi/src/typeinfo.cpp +0 -53
  1059. data/modules/emscripten/system/lib/libcxxabi/symbols +0 -236
  1060. data/modules/emscripten/system/lib/sdl.cpp +0 -13
  1061. data/modules/emscripten/system/lib/sdl.symbols +0 -1
  1062. data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/CppHeaderParser.py +0 -2347
  1063. data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/__init__.py +0 -4
  1064. data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/doc/CppHeaderParser.html +0 -657
  1065. data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/examples/SampleClass.h +0 -147
  1066. data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/examples/readSampleClass.py +0 -74
  1067. data/modules/emscripten/third_party/CppHeaderParser/PKG-INFO +0 -249
  1068. data/modules/emscripten/third_party/CppHeaderParser/README.html +0 -544
  1069. data/modules/emscripten/third_party/CppHeaderParser/README.txt +0 -226
  1070. data/modules/emscripten/third_party/CppHeaderParser/setup.py +0 -43
  1071. data/modules/emscripten/third_party/ansidecl.h +0 -371
  1072. data/modules/emscripten/third_party/closure-compiler/COPYING +0 -202
  1073. data/modules/emscripten/third_party/closure-compiler/README +0 -292
  1074. data/modules/emscripten/third_party/closure-compiler/compiler.jar +0 -0
  1075. data/modules/emscripten/third_party/closure-compiler/readme.txt +0 -3
  1076. data/modules/emscripten/third_party/cp-demangle.h +0 -161
  1077. data/modules/emscripten/third_party/demangle.h +0 -549
  1078. data/modules/emscripten/third_party/demangler.py +0 -49
  1079. data/modules/emscripten/third_party/gcc_demangler.c +0 -4226
  1080. data/modules/emscripten/third_party/gcc_demangler.js +0 -21282
  1081. data/modules/emscripten/third_party/jni/emjvm.cpp +0 -133
  1082. data/modules/emscripten/third_party/jni/emjvm.h +0 -8
  1083. data/modules/emscripten/third_party/jni/emjvm.js +0 -185
  1084. data/modules/emscripten/third_party/jni/jni.h +0 -1154
  1085. data/modules/emscripten/third_party/libiberty.h +0 -634
  1086. data/modules/emscripten/third_party/lzma.js/README.markdown +0 -37
  1087. data/modules/emscripten/third_party/lzma.js/doit.bat +0 -4
  1088. data/modules/emscripten/third_party/lzma.js/doit.sh +0 -44
  1089. data/modules/emscripten/third_party/lzma.js/lzip/AUTHORS +0 -7
  1090. data/modules/emscripten/third_party/lzma.js/lzip/COPYING +0 -676
  1091. data/modules/emscripten/third_party/lzma.js/lzip/ChangeLog +0 -201
  1092. data/modules/emscripten/third_party/lzma.js/lzip/INSTALL +0 -56
  1093. data/modules/emscripten/third_party/lzma.js/lzip/Makefile +0 -160
  1094. data/modules/emscripten/third_party/lzma.js/lzip/Makefile.in +0 -138
  1095. data/modules/emscripten/third_party/lzma.js/lzip/NEWS +0 -22
  1096. data/modules/emscripten/third_party/lzma.js/lzip/README +0 -77
  1097. data/modules/emscripten/third_party/lzma.js/lzip/arg_parser.cc +0 -204
  1098. data/modules/emscripten/third_party/lzma.js/lzip/arg_parser.h +0 -106
  1099. data/modules/emscripten/third_party/lzma.js/lzip/configure +0 -192
  1100. data/modules/emscripten/third_party/lzma.js/lzip/decoder.cc +0 -252
  1101. data/modules/emscripten/third_party/lzma.js/lzip/decoder.h +0 -268
  1102. data/modules/emscripten/third_party/lzma.js/lzip/encoder.cc +0 -643
  1103. data/modules/emscripten/third_party/lzma.js/lzip/encoder.h +0 -582
  1104. data/modules/emscripten/third_party/lzma.js/lzip/fast_encoder.cc +0 -378
  1105. data/modules/emscripten/third_party/lzma.js/lzip/fast_encoder.h +0 -171
  1106. data/modules/emscripten/third_party/lzma.js/lzip/lzip.h +0 -264
  1107. data/modules/emscripten/third_party/lzma.js/lzip/main.cc +0 -545
  1108. data/modules/emscripten/third_party/lzma.js/lzma-decoder.js +0 -27
  1109. data/modules/emscripten/third_party/lzma.js/lzma-full.js +0 -27
  1110. data/modules/emscripten/third_party/lzma.js/native_test.sh +0 -5
  1111. data/modules/emscripten/third_party/lzma.js/post.js +0 -13
  1112. data/modules/emscripten/third_party/lzma.js/pre.js +0 -13
  1113. data/modules/emscripten/third_party/lzma.js/test-decoder.js +0 -39
  1114. data/modules/emscripten/third_party/lzma.js/test-full.html +0 -9
  1115. data/modules/emscripten/third_party/lzma.js/test-full.js +0 -78
  1116. data/modules/emscripten/third_party/ply/ANNOUNCE +0 -40
  1117. data/modules/emscripten/third_party/ply/CHANGES +0 -1093
  1118. data/modules/emscripten/third_party/ply/PKG-INFO +0 -22
  1119. data/modules/emscripten/third_party/ply/README +0 -271
  1120. data/modules/emscripten/third_party/ply/TODO +0 -16
  1121. data/modules/emscripten/third_party/ply/doc/internal.html +0 -874
  1122. data/modules/emscripten/third_party/ply/doc/makedoc.py +0 -194
  1123. data/modules/emscripten/third_party/ply/doc/ply.html +0 -3262
  1124. data/modules/emscripten/third_party/ply/example/BASIC/README +0 -79
  1125. data/modules/emscripten/third_party/ply/example/BASIC/basic.py +0 -71
  1126. data/modules/emscripten/third_party/ply/example/BASIC/basiclex.py +0 -74
  1127. data/modules/emscripten/third_party/ply/example/BASIC/basiclog.py +0 -79
  1128. data/modules/emscripten/third_party/ply/example/BASIC/basinterp.py +0 -441
  1129. data/modules/emscripten/third_party/ply/example/BASIC/basparse.py +0 -424
  1130. data/modules/emscripten/third_party/ply/example/BASIC/dim.bas +0 -14
  1131. data/modules/emscripten/third_party/ply/example/BASIC/func.bas +0 -5
  1132. data/modules/emscripten/third_party/ply/example/BASIC/gcd.bas +0 -22
  1133. data/modules/emscripten/third_party/ply/example/BASIC/gosub.bas +0 -13
  1134. data/modules/emscripten/third_party/ply/example/BASIC/hello.bas +0 -4
  1135. data/modules/emscripten/third_party/ply/example/BASIC/linear.bas +0 -17
  1136. data/modules/emscripten/third_party/ply/example/BASIC/maxsin.bas +0 -12
  1137. data/modules/emscripten/third_party/ply/example/BASIC/powers.bas +0 -13
  1138. data/modules/emscripten/third_party/ply/example/BASIC/rand.bas +0 -4
  1139. data/modules/emscripten/third_party/ply/example/BASIC/sales.bas +0 -20
  1140. data/modules/emscripten/third_party/ply/example/BASIC/sears.bas +0 -18
  1141. data/modules/emscripten/third_party/ply/example/BASIC/sqrt1.bas +0 -5
  1142. data/modules/emscripten/third_party/ply/example/BASIC/sqrt2.bas +0 -4
  1143. data/modules/emscripten/third_party/ply/example/GardenSnake/GardenSnake.py +0 -709
  1144. data/modules/emscripten/third_party/ply/example/GardenSnake/README +0 -5
  1145. data/modules/emscripten/third_party/ply/example/README +0 -10
  1146. data/modules/emscripten/third_party/ply/example/ansic/README +0 -2
  1147. data/modules/emscripten/third_party/ply/example/ansic/clex.py +0 -164
  1148. data/modules/emscripten/third_party/ply/example/ansic/cparse.py +0 -863
  1149. data/modules/emscripten/third_party/ply/example/calc/calc.py +0 -107
  1150. data/modules/emscripten/third_party/ply/example/calcdebug/calc.py +0 -113
  1151. data/modules/emscripten/third_party/ply/example/classcalc/calc.py +0 -157
  1152. data/modules/emscripten/third_party/ply/example/cleanup.sh +0 -2
  1153. data/modules/emscripten/third_party/ply/example/closurecalc/calc.py +0 -130
  1154. data/modules/emscripten/third_party/ply/example/hedit/hedit.py +0 -48
  1155. data/modules/emscripten/third_party/ply/example/newclasscalc/calc.py +0 -160
  1156. data/modules/emscripten/third_party/ply/example/optcalc/README +0 -9
  1157. data/modules/emscripten/third_party/ply/example/optcalc/calc.py +0 -119
  1158. data/modules/emscripten/third_party/ply/example/unicalc/calc.py +0 -117
  1159. data/modules/emscripten/third_party/ply/example/yply/README +0 -41
  1160. data/modules/emscripten/third_party/ply/example/yply/ylex.py +0 -112
  1161. data/modules/emscripten/third_party/ply/example/yply/yparse.py +0 -217
  1162. data/modules/emscripten/third_party/ply/example/yply/yply.py +0 -53
  1163. data/modules/emscripten/third_party/ply/ply/__init__.py +0 -4
  1164. data/modules/emscripten/third_party/ply/ply/cpp.py +0 -898
  1165. data/modules/emscripten/third_party/ply/ply/ctokens.py +0 -133
  1166. data/modules/emscripten/third_party/ply/ply/lex.py +0 -1058
  1167. data/modules/emscripten/third_party/ply/ply/yacc.py +0 -3276
  1168. data/modules/emscripten/third_party/ply/setup.py +0 -31
  1169. data/modules/emscripten/third_party/ply/test/README +0 -7
  1170. data/modules/emscripten/third_party/ply/test/calclex.py +0 -49
  1171. data/modules/emscripten/third_party/ply/test/cleanup.sh +0 -4
  1172. data/modules/emscripten/third_party/ply/test/lex_closure.py +0 -54
  1173. data/modules/emscripten/third_party/ply/test/lex_doc1.py +0 -26
  1174. data/modules/emscripten/third_party/ply/test/lex_dup1.py +0 -29
  1175. data/modules/emscripten/third_party/ply/test/lex_dup2.py +0 -33
  1176. data/modules/emscripten/third_party/ply/test/lex_dup3.py +0 -31
  1177. data/modules/emscripten/third_party/ply/test/lex_empty.py +0 -20
  1178. data/modules/emscripten/third_party/ply/test/lex_error1.py +0 -24
  1179. data/modules/emscripten/third_party/ply/test/lex_error2.py +0 -26
  1180. data/modules/emscripten/third_party/ply/test/lex_error3.py +0 -27
  1181. data/modules/emscripten/third_party/ply/test/lex_error4.py +0 -27
  1182. data/modules/emscripten/third_party/ply/test/lex_hedit.py +0 -47
  1183. data/modules/emscripten/third_party/ply/test/lex_ignore.py +0 -31
  1184. data/modules/emscripten/third_party/ply/test/lex_ignore2.py +0 -29
  1185. data/modules/emscripten/third_party/ply/test/lex_literal1.py +0 -25
  1186. data/modules/emscripten/third_party/ply/test/lex_literal2.py +0 -25
  1187. data/modules/emscripten/third_party/ply/test/lex_many_tokens.py +0 -27
  1188. data/modules/emscripten/third_party/ply/test/lex_module.py +0 -10
  1189. data/modules/emscripten/third_party/ply/test/lex_module_import.py +0 -42
  1190. data/modules/emscripten/third_party/ply/test/lex_object.py +0 -55
  1191. data/modules/emscripten/third_party/ply/test/lex_opt_alias.py +0 -54
  1192. data/modules/emscripten/third_party/ply/test/lex_optimize.py +0 -50
  1193. data/modules/emscripten/third_party/ply/test/lex_optimize2.py +0 -50
  1194. data/modules/emscripten/third_party/ply/test/lex_optimize3.py +0 -52
  1195. data/modules/emscripten/third_party/ply/test/lex_re1.py +0 -27
  1196. data/modules/emscripten/third_party/ply/test/lex_re2.py +0 -27
  1197. data/modules/emscripten/third_party/ply/test/lex_re3.py +0 -29
  1198. data/modules/emscripten/third_party/ply/test/lex_rule1.py +0 -27
  1199. data/modules/emscripten/third_party/ply/test/lex_rule2.py +0 -29
  1200. data/modules/emscripten/third_party/ply/test/lex_rule3.py +0 -27
  1201. data/modules/emscripten/third_party/ply/test/lex_state1.py +0 -40
  1202. data/modules/emscripten/third_party/ply/test/lex_state2.py +0 -40
  1203. data/modules/emscripten/third_party/ply/test/lex_state3.py +0 -42
  1204. data/modules/emscripten/third_party/ply/test/lex_state4.py +0 -41
  1205. data/modules/emscripten/third_party/ply/test/lex_state5.py +0 -40
  1206. data/modules/emscripten/third_party/ply/test/lex_state_noerror.py +0 -39
  1207. data/modules/emscripten/third_party/ply/test/lex_state_norule.py +0 -40
  1208. data/modules/emscripten/third_party/ply/test/lex_state_try.py +0 -45
  1209. data/modules/emscripten/third_party/ply/test/lex_token1.py +0 -19
  1210. data/modules/emscripten/third_party/ply/test/lex_token2.py +0 -22
  1211. data/modules/emscripten/third_party/ply/test/lex_token3.py +0 -24
  1212. data/modules/emscripten/third_party/ply/test/lex_token4.py +0 -26
  1213. data/modules/emscripten/third_party/ply/test/lex_token5.py +0 -31
  1214. data/modules/emscripten/third_party/ply/test/lex_token_dup.py +0 -29
  1215. data/modules/emscripten/third_party/ply/test/testlex.py +0 -606
  1216. data/modules/emscripten/third_party/ply/test/testyacc.py +0 -347
  1217. data/modules/emscripten/third_party/ply/test/yacc_badargs.py +0 -68
  1218. data/modules/emscripten/third_party/ply/test/yacc_badid.py +0 -77
  1219. data/modules/emscripten/third_party/ply/test/yacc_badprec.py +0 -64
  1220. data/modules/emscripten/third_party/ply/test/yacc_badprec2.py +0 -68
  1221. data/modules/emscripten/third_party/ply/test/yacc_badprec3.py +0 -68
  1222. data/modules/emscripten/third_party/ply/test/yacc_badrule.py +0 -68
  1223. data/modules/emscripten/third_party/ply/test/yacc_badtok.py +0 -68
  1224. data/modules/emscripten/third_party/ply/test/yacc_dup.py +0 -68
  1225. data/modules/emscripten/third_party/ply/test/yacc_error1.py +0 -68
  1226. data/modules/emscripten/third_party/ply/test/yacc_error2.py +0 -68
  1227. data/modules/emscripten/third_party/ply/test/yacc_error3.py +0 -67
  1228. data/modules/emscripten/third_party/ply/test/yacc_error4.py +0 -72
  1229. data/modules/emscripten/third_party/ply/test/yacc_inf.py +0 -56
  1230. data/modules/emscripten/third_party/ply/test/yacc_literal.py +0 -69
  1231. data/modules/emscripten/third_party/ply/test/yacc_misplaced.py +0 -68
  1232. data/modules/emscripten/third_party/ply/test/yacc_missing1.py +0 -68
  1233. data/modules/emscripten/third_party/ply/test/yacc_nested.py +0 -33
  1234. data/modules/emscripten/third_party/ply/test/yacc_nodoc.py +0 -67
  1235. data/modules/emscripten/third_party/ply/test/yacc_noerror.py +0 -66
  1236. data/modules/emscripten/third_party/ply/test/yacc_nop.py +0 -68
  1237. data/modules/emscripten/third_party/ply/test/yacc_notfunc.py +0 -66
  1238. data/modules/emscripten/third_party/ply/test/yacc_notok.py +0 -67
  1239. data/modules/emscripten/third_party/ply/test/yacc_prec1.py +0 -68
  1240. data/modules/emscripten/third_party/ply/test/yacc_rr.py +0 -72
  1241. data/modules/emscripten/third_party/ply/test/yacc_rr_unused.py +0 -30
  1242. data/modules/emscripten/third_party/ply/test/yacc_simple.py +0 -68
  1243. data/modules/emscripten/third_party/ply/test/yacc_sr.py +0 -63
  1244. data/modules/emscripten/third_party/ply/test/yacc_term1.py +0 -68
  1245. data/modules/emscripten/third_party/ply/test/yacc_unused.py +0 -77
  1246. data/modules/emscripten/third_party/ply/test/yacc_unused_rule.py +0 -72
  1247. data/modules/emscripten/third_party/ply/test/yacc_uprec.py +0 -63
  1248. data/modules/emscripten/third_party/ply/test/yacc_uprec2.py +0 -63
  1249. data/modules/emscripten/third_party/readme.txt +0 -7
  1250. data/modules/emscripten/third_party/stb_image.c +0 -4673
  1251. data/modules/emscripten/third_party/websockify/CHANGES.txt +0 -23
  1252. data/modules/emscripten/third_party/websockify/LICENSE.txt +0 -16
  1253. data/modules/emscripten/third_party/websockify/MANIFEST.in +0 -1
  1254. data/modules/emscripten/third_party/websockify/Makefile +0 -11
  1255. data/modules/emscripten/third_party/websockify/README.md +0 -168
  1256. data/modules/emscripten/third_party/websockify/Windows/Windows Service Readme.txt +0 -39
  1257. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Program.cs +0 -24
  1258. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs +0 -61
  1259. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.cs +0 -19
  1260. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.resx +0 -129
  1261. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs +0 -36
  1262. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Service1.Designer.cs +0 -37
  1263. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Service1.cs +0 -41
  1264. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj +0 -75
  1265. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.sln +0 -20
  1266. data/modules/emscripten/third_party/websockify/docs/LICENSE.GPL-3 +0 -621
  1267. data/modules/emscripten/third_party/websockify/docs/LICENSE.LGPL-3 +0 -165
  1268. data/modules/emscripten/third_party/websockify/docs/LICENSE.MPL-2.0 +0 -373
  1269. data/modules/emscripten/third_party/websockify/docs/TODO +0 -9
  1270. data/modules/emscripten/third_party/websockify/docs/flash_policy.txt +0 -4
  1271. data/modules/emscripten/third_party/websockify/docs/latency_results.txt +0 -114
  1272. data/modules/emscripten/third_party/websockify/docs/notes +0 -17
  1273. data/modules/emscripten/third_party/websockify/docs/release.txt +0 -9
  1274. data/modules/emscripten/third_party/websockify/docs/websockify.1 +0 -110
  1275. data/modules/emscripten/third_party/websockify/include/VT100.js +0 -919
  1276. data/modules/emscripten/third_party/websockify/include/base64.js +0 -114
  1277. data/modules/emscripten/third_party/websockify/include/keysym.js +0 -99
  1278. data/modules/emscripten/third_party/websockify/include/util.js +0 -359
  1279. data/modules/emscripten/third_party/websockify/include/web-socket-js/README.txt +0 -109
  1280. data/modules/emscripten/third_party/websockify/include/web-socket-js/WebSocketMain.swf +0 -0
  1281. data/modules/emscripten/third_party/websockify/include/web-socket-js/swfobject.js +0 -4
  1282. data/modules/emscripten/third_party/websockify/include/web-socket-js/web_socket.js +0 -391
  1283. data/modules/emscripten/third_party/websockify/include/websock.js +0 -422
  1284. data/modules/emscripten/third_party/websockify/include/webutil.js +0 -216
  1285. data/modules/emscripten/third_party/websockify/include/wsirc.js +0 -235
  1286. data/modules/emscripten/third_party/websockify/include/wstelnet.js +0 -335
  1287. data/modules/emscripten/third_party/websockify/other/Makefile +0 -14
  1288. data/modules/emscripten/third_party/websockify/other/README.md +0 -51
  1289. data/modules/emscripten/third_party/websockify/other/launch.sh +0 -108
  1290. data/modules/emscripten/third_party/websockify/other/project.clj +0 -13
  1291. data/modules/emscripten/third_party/websockify/other/websocket.c +0 -802
  1292. data/modules/emscripten/third_party/websockify/other/websocket.h +0 -84
  1293. data/modules/emscripten/third_party/websockify/other/websocket.rb +0 -456
  1294. data/modules/emscripten/third_party/websockify/other/websockify.c +0 -385
  1295. data/modules/emscripten/third_party/websockify/other/websockify.clj +0 -233
  1296. data/modules/emscripten/third_party/websockify/other/websockify.js +0 -196
  1297. data/modules/emscripten/third_party/websockify/other/websockify.rb +0 -171
  1298. data/modules/emscripten/third_party/websockify/other/wswrap +0 -22
  1299. data/modules/emscripten/third_party/websockify/rebind +0 -18
  1300. data/modules/emscripten/third_party/websockify/rebind.c +0 -94
  1301. data/modules/emscripten/third_party/websockify/run +0 -5
  1302. data/modules/emscripten/third_party/websockify/setup.py +0 -30
  1303. data/modules/emscripten/third_party/websockify/tests/b64_vs_utf8.py +0 -29
  1304. data/modules/emscripten/third_party/websockify/tests/base64.html +0 -91
  1305. data/modules/emscripten/third_party/websockify/tests/base64.js +0 -12
  1306. data/modules/emscripten/third_party/websockify/tests/echo.html +0 -148
  1307. data/modules/emscripten/third_party/websockify/tests/echo.py +0 -75
  1308. data/modules/emscripten/third_party/websockify/tests/echo.rb +0 -62
  1309. data/modules/emscripten/third_party/websockify/tests/latency.html +0 -290
  1310. data/modules/emscripten/third_party/websockify/tests/latency.py +0 -75
  1311. data/modules/emscripten/third_party/websockify/tests/load.html +0 -250
  1312. data/modules/emscripten/third_party/websockify/tests/load.py +0 -167
  1313. data/modules/emscripten/third_party/websockify/tests/plain_echo.html +0 -168
  1314. data/modules/emscripten/third_party/websockify/tests/simple.html +0 -68
  1315. data/modules/emscripten/third_party/websockify/tests/utf8-list.py +0 -22
  1316. data/modules/emscripten/third_party/websockify/websockify/__init__.py +0 -2
  1317. data/modules/emscripten/third_party/websockify/websockify/websocket.py +0 -982
  1318. data/modules/emscripten/third_party/websockify/websockify/websocketproxy.py +0 -393
  1319. data/modules/emscripten/third_party/websockify/websockify.py +0 -5
  1320. data/modules/emscripten/third_party/websockify/wsirc.html +0 -99
  1321. data/modules/emscripten/third_party/websockify/wstelnet.html +0 -74
  1322. data/modules/emscripten/tools/__init__.py +0 -0
  1323. data/modules/emscripten/tools/asm_module.py +0 -275
  1324. data/modules/emscripten/tools/autodebugger.py +0 -291
  1325. data/modules/emscripten/tools/autodebugger_c.py +0 -37
  1326. data/modules/emscripten/tools/autodebugger_indenter.py +0 -18
  1327. data/modules/emscripten/tools/autodebugger_js.py +0 -47
  1328. data/modules/emscripten/tools/autodediffer.py +0 -60
  1329. data/modules/emscripten/tools/bindings_generator.py +0 -832
  1330. data/modules/emscripten/tools/bisect_pair.py +0 -88
  1331. data/modules/emscripten/tools/cache.py +0 -196
  1332. data/modules/emscripten/tools/clean_webconsole.py +0 -34
  1333. data/modules/emscripten/tools/crunch-worker.js +0 -124
  1334. data/modules/emscripten/tools/diff_autodebugger.py +0 -15
  1335. data/modules/emscripten/tools/eliminator/asm-eliminator-test-output.js +0 -307
  1336. data/modules/emscripten/tools/eliminator/asm-eliminator-test.js +0 -382
  1337. data/modules/emscripten/tools/eliminator/eliminator-test-output.js +0 -6136
  1338. data/modules/emscripten/tools/eliminator/eliminator-test.js +0 -8879
  1339. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/README.html +0 -888
  1340. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/README.org +0 -463
  1341. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/bin/uglifyjs +0 -317
  1342. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/docstyle.css +0 -75
  1343. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/object-ast.js +0 -75
  1344. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/parse-js.js +0 -1363
  1345. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/process.js +0 -2005
  1346. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/squeeze-more.js +0 -51
  1347. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/package.json +0 -22
  1348. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/beautify.js +0 -28
  1349. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/testparser.js +0 -402
  1350. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array1.js +0 -1
  1351. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array2.js +0 -1
  1352. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array3.js +0 -1
  1353. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array4.js +0 -1
  1354. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/assignment.js +0 -1
  1355. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/concatstring.js +0 -1
  1356. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/const.js +0 -1
  1357. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js +0 -1
  1358. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/forstatement.js +0 -1
  1359. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/if.js +0 -1
  1360. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js +0 -1
  1361. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js +0 -1
  1362. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue10.js +0 -1
  1363. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue11.js +0 -1
  1364. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue13.js +0 -1
  1365. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue14.js +0 -1
  1366. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue16.js +0 -1
  1367. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue17.js +0 -1
  1368. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue20.js +0 -1
  1369. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue21.js +0 -1
  1370. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue25.js +0 -1
  1371. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue27.js +0 -1
  1372. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue28.js +0 -1
  1373. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue29.js +0 -1
  1374. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue30.js +0 -1
  1375. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue34.js +0 -1
  1376. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue4.js +0 -1
  1377. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue48.js +0 -1
  1378. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue50.js +0 -1
  1379. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue53.js +0 -1
  1380. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js +0 -1
  1381. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue68.js +0 -1
  1382. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue69.js +0 -1
  1383. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue9.js +0 -1
  1384. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/mangle.js +0 -1
  1385. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js +0 -1
  1386. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/var.js +0 -1
  1387. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/with.js +0 -1
  1388. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array1.js +0 -3
  1389. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array2.js +0 -4
  1390. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array3.js +0 -4
  1391. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array4.js +0 -6
  1392. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/assignment.js +0 -20
  1393. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/concatstring.js +0 -3
  1394. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/const.js +0 -5
  1395. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js +0 -4
  1396. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/forstatement.js +0 -10
  1397. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/if.js +0 -6
  1398. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/ifreturn.js +0 -9
  1399. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js +0 -16
  1400. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue10.js +0 -1
  1401. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue11.js +0 -3
  1402. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue13.js +0 -1
  1403. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue14.js +0 -1
  1404. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue16.js +0 -1
  1405. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue17.js +0 -4
  1406. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue20.js +0 -1
  1407. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue21.js +0 -6
  1408. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue25.js +0 -7
  1409. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue27.js +0 -1
  1410. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue28.js +0 -3
  1411. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue29.js +0 -1
  1412. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue30.js +0 -3
  1413. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue34.js +0 -3
  1414. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue4.js +0 -3
  1415. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue48.js +0 -1
  1416. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue50.js +0 -9
  1417. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue53.js +0 -1
  1418. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +0 -3
  1419. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue68.js +0 -5
  1420. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue69.js +0 -1
  1421. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue9.js +0 -4
  1422. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/mangle.js +0 -5
  1423. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +0 -3
  1424. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/var.js +0 -3
  1425. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/with.js +0 -2
  1426. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/scripts.js +0 -55
  1427. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/hoist.js +0 -33
  1428. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/instrument.js +0 -97
  1429. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/instrument2.js +0 -138
  1430. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/test.js +0 -16
  1431. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/uglify-js.js +0 -17
  1432. data/modules/emscripten/tools/eliminator/safe-eliminator-test-output.js +0 -85
  1433. data/modules/emscripten/tools/eliminator/safe-eliminator-test.js +0 -103
  1434. data/modules/emscripten/tools/emconfiguren.py +0 -19
  1435. data/modules/emscripten/tools/emmaken.py +0 -230
  1436. data/modules/emscripten/tools/emmakenxx.py +0 -18
  1437. data/modules/emscripten/tools/exec_llvm.py +0 -50
  1438. data/modules/emscripten/tools/file2json.py +0 -49
  1439. data/modules/emscripten/tools/file_packager.py +0 -719
  1440. data/modules/emscripten/tools/find_bigfuncs.py +0 -23
  1441. data/modules/emscripten/tools/find_bigis.py +0 -18
  1442. data/modules/emscripten/tools/find_bigvars.py +0 -24
  1443. data/modules/emscripten/tools/fix_closure.py +0 -88
  1444. data/modules/emscripten/tools/gen_struct_info.py +0 -509
  1445. data/modules/emscripten/tools/ie7_fix.py +0 -14
  1446. data/modules/emscripten/tools/js-optimizer.js +0 -4023
  1447. data/modules/emscripten/tools/js_optimizer.py +0 -357
  1448. data/modules/emscripten/tools/jsrun.py +0 -37
  1449. data/modules/emscripten/tools/ll-strip.py +0 -56
  1450. data/modules/emscripten/tools/make_file.py +0 -19
  1451. data/modules/emscripten/tools/make_minigzip.py +0 -13
  1452. data/modules/emscripten/tools/merge_asm.py +0 -26
  1453. data/modules/emscripten/tools/namespacer.py +0 -95
  1454. data/modules/emscripten/tools/nativize_llvm.py +0 -34
  1455. data/modules/emscripten/tools/node_modules/source-map/CHANGELOG.md +0 -58
  1456. data/modules/emscripten/tools/node_modules/source-map/LICENSE +0 -28
  1457. data/modules/emscripten/tools/node_modules/source-map/Makefile.dryice.js +0 -166
  1458. data/modules/emscripten/tools/node_modules/source-map/README.md +0 -347
  1459. data/modules/emscripten/tools/node_modules/source-map/build/assert-shim.js +0 -56
  1460. data/modules/emscripten/tools/node_modules/source-map/build/mini-require.js +0 -152
  1461. data/modules/emscripten/tools/node_modules/source-map/build/prefix-source-map.jsm +0 -20
  1462. data/modules/emscripten/tools/node_modules/source-map/build/prefix-utils.jsm +0 -18
  1463. data/modules/emscripten/tools/node_modules/source-map/build/suffix-browser.js +0 -8
  1464. data/modules/emscripten/tools/node_modules/source-map/build/suffix-source-map.jsm +0 -6
  1465. data/modules/emscripten/tools/node_modules/source-map/build/suffix-utils.jsm +0 -21
  1466. data/modules/emscripten/tools/node_modules/source-map/build/test-prefix.js +0 -8
  1467. data/modules/emscripten/tools/node_modules/source-map/build/test-suffix.js +0 -3
  1468. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/array-set.js +0 -96
  1469. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/base64-vlq.js +0 -144
  1470. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/base64.js +0 -42
  1471. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/binary-search.js +0 -81
  1472. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-map-consumer.js +0 -430
  1473. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-map-generator.js +0 -381
  1474. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-node.js +0 -353
  1475. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/util.js +0 -117
  1476. data/modules/emscripten/tools/node_modules/source-map/lib/source-map.js +0 -8
  1477. data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/LICENSE +0 -58
  1478. data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/README.md +0 -119
  1479. data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/amdefine.js +0 -299
  1480. data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/package.json +0 -33
  1481. data/modules/emscripten/tools/node_modules/source-map/package.json +0 -74
  1482. data/modules/emscripten/tools/node_modules/source-map/test/run-tests.js +0 -73
  1483. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-api.js +0 -26
  1484. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-array-set.js +0 -71
  1485. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64-vlq.js +0 -24
  1486. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js +0 -35
  1487. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-binary-search.js +0 -54
  1488. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-dog-fooding.js +0 -72
  1489. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-map-consumer.js +0 -306
  1490. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-map-generator.js +0 -391
  1491. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-node.js +0 -282
  1492. data/modules/emscripten/tools/node_modules/source-map/test/source-map/util.js +0 -152
  1493. data/modules/emscripten/tools/reproduceriter.js +0 -216
  1494. data/modules/emscripten/tools/reproduceriter.py +0 -160
  1495. data/modules/emscripten/tools/response_file.py +0 -34
  1496. data/modules/emscripten/tools/scan_js.py +0 -20
  1497. data/modules/emscripten/tools/scan_ll.py +0 -18
  1498. data/modules/emscripten/tools/scons/site_scons/site_tools/emscripten/__init__.py +0 -3
  1499. data/modules/emscripten/tools/scons/site_scons/site_tools/emscripten/emscripten.py +0 -46
  1500. data/modules/emscripten/tools/settings_template_readonly.py +0 -49
  1501. data/modules/emscripten/tools/shared.py +0 -1705
  1502. data/modules/emscripten/tools/source-maps/sourcemap2json.js +0 -15
  1503. data/modules/emscripten/tools/source-maps/sourcemapper.js +0 -208
  1504. data/modules/emscripten/tools/split.py +0 -105
  1505. data/modules/emscripten/tools/split_asm.py +0 -30
  1506. data/modules/emscripten/tools/tempfiles.py +0 -41
  1507. data/modules/emscripten/tools/test-js-optimizer-asm-last-output.js +0 -75
  1508. data/modules/emscripten/tools/test-js-optimizer-asm-last.js +0 -91
  1509. data/modules/emscripten/tools/test-js-optimizer-asm-minlast-output.js +0 -2
  1510. data/modules/emscripten/tools/test-js-optimizer-asm-minlast.js +0 -8
  1511. data/modules/emscripten/tools/test-js-optimizer-asm-outline1-output.js +0 -929
  1512. data/modules/emscripten/tools/test-js-optimizer-asm-outline1.js +0 -351
  1513. data/modules/emscripten/tools/test-js-optimizer-asm-outline2-output.js +0 -793
  1514. data/modules/emscripten/tools/test-js-optimizer-asm-outline2.js +0 -606
  1515. data/modules/emscripten/tools/test-js-optimizer-asm-outline3-output.js +0 -28
  1516. data/modules/emscripten/tools/test-js-optimizer-asm-outline3.js +0 -30
  1517. data/modules/emscripten/tools/test-js-optimizer-asm-pre-output.js +0 -522
  1518. data/modules/emscripten/tools/test-js-optimizer-asm-pre.js +0 -533
  1519. data/modules/emscripten/tools/test-js-optimizer-asm-regs-min-output.js +0 -36
  1520. data/modules/emscripten/tools/test-js-optimizer-asm-regs-min.js +0 -37
  1521. data/modules/emscripten/tools/test-js-optimizer-asm-regs-output.js +0 -106
  1522. data/modules/emscripten/tools/test-js-optimizer-asm-regs.js +0 -110
  1523. data/modules/emscripten/tools/test-js-optimizer-asm-relocate-output.js +0 -9
  1524. data/modules/emscripten/tools/test-js-optimizer-asm-relocate.js +0 -12
  1525. data/modules/emscripten/tools/test-js-optimizer-output.js +0 -291
  1526. data/modules/emscripten/tools/test-js-optimizer-regs-output.js +0 -232
  1527. data/modules/emscripten/tools/test-js-optimizer-regs.js +0 -237
  1528. data/modules/emscripten/tools/test-js-optimizer-t2-output.js +0 -91
  1529. data/modules/emscripten/tools/test-js-optimizer-t2.js +0 -92
  1530. data/modules/emscripten/tools/test-js-optimizer-t2c-output.js +0 -17
  1531. data/modules/emscripten/tools/test-js-optimizer-t2c.js +0 -18
  1532. data/modules/emscripten/tools/test-js-optimizer-t3-output.js +0 -49
  1533. data/modules/emscripten/tools/test-js-optimizer-t3.js +0 -50
  1534. data/modules/emscripten/tools/test-js-optimizer.js +0 -401
  1535. data/modules/emscripten/tools/validate_asmjs.py +0 -82
  1536. data/modules/mruby/mrblib/print.rb +0 -18
  1537. data/modules/mruby/src/re.h +0 -12
@@ -1,1969 +0,0 @@
1
- //"use strict";
2
-
3
- // Convert analyzed data to javascript. Everything has already been calculated
4
- // before this stage, which just does the final conversion to JavaScript.
5
-
6
- // Handy sets
7
-
8
- var STRUCT_LIST = set('struct', 'list');
9
- var RELOOP_IGNORED_LASTS = set('return', 'unreachable', 'resume');
10
-
11
- var addedLibraryItems = {};
12
- var asmLibraryFunctions = [];
13
-
14
- var SETJMP_LABEL = -1;
15
-
16
- var INDENTATION = ' ';
17
-
18
- var functionStubSigs = {};
19
-
20
- // JSifier
21
- function JSify(data, functionsOnly) {
22
- //B.start('jsifier');
23
- var mainPass = !functionsOnly;
24
-
25
- var itemsDict = { type: [], GlobalVariableStub: [], functionStub: [], function: [], GlobalVariable: [], GlobalVariablePostSet: [] };
26
-
27
- if (mainPass) {
28
- var shellFile = SHELL_FILE ? SHELL_FILE : (BUILD_AS_SHARED_LIB || SIDE_MODULE ? 'shell_sharedlib.js' : 'shell.js');
29
-
30
- if (phase == 'pre' || phase == 'glue') {
31
- // We will start to print out the data, but must do so carefully - we are
32
- // dealing with potentially *huge* strings. Convenient replacements and
33
- // manipulations may create in-memory copies, and we may OOM.
34
- //
35
- // Final shape that will be created:
36
- // shell
37
- // (body)
38
- // preamble
39
- // runtime
40
- // generated code
41
- // postamble
42
- // global_vars
43
- //
44
- // First, we print out everything until the generated code. Then the
45
- // functions will print themselves out as they are parsed. Finally, we
46
- // will call finalCombiner in the main pass, to print out everything
47
- // else. This lets us not hold any strings in memory, we simply print
48
- // things out as they are ready.
49
-
50
- var shellParts = read(shellFile).split('{{BODY}}');
51
- print(processMacros(preprocess(shellParts[0])));
52
- var preFile = BUILD_AS_SHARED_LIB || SIDE_MODULE ? 'preamble_sharedlib.js' : 'preamble.js';
53
- var pre = processMacros(preprocess(read(preFile).replace('{{RUNTIME}}', getRuntime())));
54
- print(pre);
55
-
56
- // Populate implementedFunctions. Note that this is before types, and will be updated later.
57
- data.unparsedFunctions.forEach(function(func) {
58
- Functions.implementedFunctions[func.ident] = Functions.getSignature(func.returnType, func.params.map(function(param) { return param.type }));
59
- });
60
- }
61
- }
62
-
63
- if (mainPass) {
64
- // Handle unparsed types TODO: Batch them
65
- analyzer(intertyper(data.unparsedTypess[0].lines, true), true);
66
- data.unparsedTypess = null;
67
-
68
- // Add additional necessary items for the main pass. We can now do this since types are parsed (types can be used through
69
- // generateStructInfo in library.js)
70
- //B.start('jsifier-libload');
71
- LibraryManager.load();
72
- //B.stop('jsifier-libload');
73
-
74
- if (phase == 'pre' || phase == 'glue') {
75
- var libFuncsToInclude;
76
- if (INCLUDE_FULL_LIBRARY) {
77
- assert(!(BUILD_AS_SHARED_LIB || SIDE_MODULE), 'Cannot have both INCLUDE_FULL_LIBRARY and BUILD_AS_SHARED_LIB/SIDE_MODULE set.')
78
- libFuncsToInclude = [];
79
- for (var key in LibraryManager.library) {
80
- if (!key.match(/__(deps|postset|inline|asm|sig)$/)) {
81
- libFuncsToInclude.push(key);
82
- }
83
- }
84
- } else {
85
- libFuncsToInclude = DEFAULT_LIBRARY_FUNCS_TO_INCLUDE;
86
- }
87
- libFuncsToInclude.forEach(function(ident) {
88
- data.functionStubs.push({
89
- intertype: 'functionStub',
90
- ident: '_' + ident
91
- });
92
- });
93
- }
94
- }
95
-
96
- // Functions
97
-
98
- if (phase == 'funcs') { // || phase == 'pre') { // pre has function shells, just to defined implementedFunctions
99
- var MAX_BATCH_FUNC_LINES = 1000;
100
- while (data.unparsedFunctions.length > 0) {
101
- var currFuncLines = [];
102
- var currBaseLineNums = [];
103
- while (currFuncLines.length == 0 ||
104
- (data.unparsedFunctions.length > 0 && currFuncLines.length + data.unparsedFunctions[0].lines.length <= MAX_BATCH_FUNC_LINES)) {
105
- currBaseLineNums.push([currFuncLines.length, data.unparsedFunctions[0].lineNum-1]);
106
- currFuncLines = currFuncLines.concat(data.unparsedFunctions[0].lines); // for first one, assign, do not concat?
107
- data.unparsedFunctions.shift();
108
- }
109
- dprint('unparsedFunctions','====================\n// Processing function batch of ' + currBaseLineNums.length +
110
- ' functions, ' + currFuncLines.length + ' lines, functions left: ' + data.unparsedFunctions.length);
111
- if (DEBUG_MEMORY) MemoryDebugger.tick('pre-func');
112
- JSify(analyzer(intertyper(currFuncLines, true, currBaseLineNums), true), true);
113
- if (DEBUG_MEMORY) MemoryDebugger.tick('post-func');
114
- }
115
- currFuncLines = currBaseLineNums = null; // Do not hold on to anything from inside that loop (JS function scoping..)
116
- data.unparsedFunctions = null;
117
- }
118
-
119
- // Actors
120
-
121
- function makeEmptyStruct(type) {
122
- var ret = [];
123
- var typeData = Types.types[type];
124
- assertTrue(typeData);
125
- for (var i = 0; i < typeData.flatSize; i++) {
126
- ret.push(0);
127
- }
128
- return ret;
129
- }
130
-
131
- function alignStruct(values, type) {
132
- var typeData = Types.types[type];
133
- assertTrue(typeData);
134
- var ret = new Array(typeData.flatSize);
135
- var index = 0;
136
- var i = 0;
137
- while (i < values.length) {
138
- // Pad until the right place
139
- var padded = typeData.flatFactor ? typeData.flatFactor*i : typeData.flatIndexes[i];
140
- while (index < padded) {
141
- ret[index++] = 0;
142
- }
143
- // Add current value(s)
144
- var currValue = values[i];
145
- if (USE_TYPED_ARRAYS == 2 && (typeData.fields[i] == 'i64' || (typeData.flatFactor && typeData.fields[0] == 'i64'))) {
146
- // 'flatten' out the 64-bit value into two 32-bit halves
147
- var parts = parseI64Constant(currValue, true);
148
- ret[index++] = parts[0];
149
- ret[index++] = 0;
150
- ret[index++] = 0;
151
- ret[index++] = 0;
152
- ret[index++] = parts[1];
153
- ret[index++] = 0;
154
- ret[index++] = 0;
155
- ret[index++] = 0;
156
- } else {
157
- currValue = flatten(currValue);
158
- if (typeof currValue == 'object') {
159
- for (var j = 0; j < currValue.length; j++) {
160
- ret[index++] = currValue[j];
161
- }
162
- } else {
163
- ret[index++] = currValue;
164
- }
165
- }
166
- i += 1;
167
- }
168
- while (index < typeData.flatSize) {
169
- ret[index++] = 0;
170
- }
171
- return ret;
172
- }
173
-
174
- // Gets an entire constant expression
175
- function makeConst(value, type, ident) {
176
- // Gets an array of constant items, separated by ',' tokens
177
- function handleSegments(tokens) {
178
- // Handle a single segment (after comma separation)
179
- function handleSegment(segment) {
180
- var ret;
181
- if (segment.intertype === 'value') {
182
- ret = segment.ident;
183
- } else if (segment.intertype === 'emptystruct') {
184
- ret = makeEmptyStruct(segment.type);
185
- } else if (segment.intertype in PARSABLE_LLVM_FUNCTIONS) {
186
- ret = finalizeLLVMFunctionCall(segment);
187
- } else if (segment.intertype in STRUCT_LIST) {
188
- ret = alignStruct(handleSegments(segment.contents), segment.type);
189
- } else if (segment.intertype === 'string') {
190
- ret = parseLLVMString(segment.text); // + ' /* ' + text + '*/';
191
- } else if (segment.intertype === 'blockaddress') {
192
- ret = finalizeBlockAddress(segment);
193
- } else {
194
- throw 'Invalid segment: ' + dump(segment);
195
- }
196
- assert(segment.type, 'Missing type for constant segment!');
197
- return makeGlobalUse(indexizeFunctions(ret, segment.type));
198
- };
199
- return tokens.map(handleSegment)
200
- }
201
-
202
- //dprint('jsifier const: ' + JSON.stringify(value) + ',' + type + '\n');
203
- if (value.intertype in PARSABLE_LLVM_FUNCTIONS) {
204
- return [finalizeLLVMFunctionCall(value)];
205
- } else if (Runtime.isNumberType(type) || pointingLevels(type) >= 1) {
206
- return [makeGlobalUse(indexizeFunctions(parseNumerical(value.value), type))];
207
- } else if (value.intertype === 'emptystruct') {
208
- return makeEmptyStruct(type);
209
- } else if (value.intertype === 'string') {
210
- return parseLLVMString(value.text);
211
- } else {
212
- return alignStruct(handleSegments(value.contents), type);
213
- }
214
- }
215
-
216
- function parseConst(value, type, ident) {
217
- var constant = makeConst(value, type);
218
- constant = flatten(constant).map(function(x) { return parseNumerical(x) })
219
- return constant;
220
- }
221
-
222
- // globalVariable
223
- function globalVariableHandler(item) {
224
- function needsPostSet(value) {
225
- if (typeof value !== 'string') return false;
226
- // (' is ok, as it is something we can indexize later into a concrete int: ('{{ FI_ ...
227
- return /^([(_][^']|CHECK_OVERFLOW|GLOBAL).*/.test(value);
228
- }
229
-
230
- item.intertype = 'GlobalVariableStub';
231
- itemsDict.GlobalVariableStub.push(item);
232
- assert(!item.lines); // FIXME remove this, after we are sure it isn't needed
233
- if (item.ident == '_llvm_global_ctors') {
234
- item.JS = '\n/* global initializers */ __ATINIT__.push(' +
235
- item.ctors.map(function(ctor) { return '{ func: function() { ' + ctor + '() } }' }).join(',') +
236
- ');\n';
237
- return;
238
- }
239
-
240
- var constant = null;
241
- var allocator = (BUILD_AS_SHARED_LIB && !item.external) ? 'ALLOC_NORMAL' : 'ALLOC_STATIC';
242
- var index = null;
243
- if (item.external && BUILD_AS_SHARED_LIB) {
244
- // External variables in shared libraries should not be declared as
245
- // they would shadow similarly-named globals in the parent.
246
- item.JS = '';
247
- } else {
248
- item.JS = makeGlobalDef(item.ident);
249
- }
250
-
251
- if (!NAMED_GLOBALS && isIndexableGlobal(item.ident)) {
252
- index = makeGlobalUse(item.ident); // index !== null indicates we are indexing this
253
- allocator = 'ALLOC_NONE';
254
- }
255
-
256
- Variables.globals[item.ident].named = item.named;
257
-
258
- if (ASM_JS && (MAIN_MODULE || SIDE_MODULE) && !item.private_ && !NAMED_GLOBALS && isIndexableGlobal(item.ident)) {
259
- // We need this to be named (and it normally would not be), so that it can be linked to and used from other modules
260
- Variables.globals[item.ident].linkable = 1;
261
- }
262
-
263
- if (isBSS(item)) {
264
- // If using indexed globals, go ahead and early out (no need to explicitly
265
- // initialize).
266
- if (!NAMED_GLOBALS) return;
267
-
268
- // If using named globals, we can at least shorten the call to allocate by
269
- // passing an integer representing the size of memory to alloc instead of
270
- // an array of 0s of size length.
271
- constant = Runtime.alignMemory(calcAllocatedSize(item.type));
272
- } else {
273
- if (item.external) {
274
- if (Runtime.isNumberType(item.type) || isPointerType(item.type)) {
275
- constant = zeros(Runtime.getNativeFieldSize(item.type));
276
- } else {
277
- constant = makeEmptyStruct(item.type);
278
- }
279
- } else {
280
- constant = parseConst(item.value, item.type, item.ident);
281
- }
282
- assert(typeof constant === 'object');//, [typeof constant, JSON.stringify(constant), item.external]);
283
-
284
- // This is a flattened object. We need to find its idents, so they can be assigned to later
285
- var structTypes = null;
286
- constant.forEach(function(value, i) {
287
- if (needsPostSet(value)) { // ident, or expression containing an ident
288
- if (!structTypes) structTypes = generateStructTypes(item.type);
289
- itemsDict.GlobalVariablePostSet.push({
290
- intertype: 'GlobalVariablePostSet',
291
- JS: makeSetValue(makeGlobalUse(item.ident), i, value, structTypes[i], false, true) + ';' // ignore=true, since e.g. rtti and statics cause lots of safe_heap errors
292
- });
293
- constant[i] = '0';
294
- } else {
295
- if (typeof value === 'string') constant[i] = deParenCarefully(value);
296
- }
297
- });
298
-
299
- if (item.external) {
300
- // External variables in shared libraries should not be declared as
301
- // they would shadow similarly-named globals in the parent, so do nothing here.
302
- if (BUILD_AS_SHARED_LIB) return;
303
- if (SIDE_MODULE) {
304
- itemsDict.GlobalVariableStub.pop(); // remove this item
305
- return;
306
- }
307
- // Library items need us to emit something, but everything else requires nothing.
308
- if (!LibraryManager.library[item.ident.slice(1)]) return;
309
- }
310
-
311
- // ensure alignment
312
- var extra = Runtime.alignMemory(constant.length) - constant.length;
313
- if (item.ident.substr(0, 5) == '__ZTV') extra += Runtime.alignMemory(QUANTUM_SIZE);
314
- while (extra-- > 0) constant.push(0);
315
- }
316
-
317
- // NOTE: This is the only place that could potentially create static
318
- // allocations in a shared library.
319
- constant = makePointer(constant, null, allocator, item.type, index);
320
-
321
- var js = (index !== null ? '' : item.ident + '=') + constant;
322
- if (js) js += ';';
323
-
324
- if (!ASM_JS && NAMED_GLOBALS && (EXPORT_ALL || (item.ident in EXPORTED_GLOBALS))) {
325
- js += '\nModule["' + item.ident + '"] = ' + item.ident + ';';
326
- }
327
- if (BUILD_AS_SHARED_LIB == 2 && !item.private_) {
328
- // TODO: make the assert conditional on ASSERTIONS
329
- js += 'if (globalScope) { assert(!globalScope["' + item.ident + '"]); globalScope["' + item.ident + '"] = ' + item.ident + ' }';
330
- }
331
- if (item.external && !NAMED_GLOBALS) {
332
- js = 'var ' + item.ident + '=' + js; // force an explicit naming, even if unnamed globals, for asm forwarding
333
- }
334
- itemsDict.GlobalVariableStub.push({
335
- intertype: 'GlobalVariable',
336
- JS: js,
337
- });
338
- }
339
-
340
- // alias
341
- function aliasHandler(item) {
342
- item.intertype = 'GlobalVariableStub';
343
- itemsDict.GlobalVariableStub.push(item);
344
- item.JS = 'var ' + item.ident + ';';
345
- // Set the actual value in a postset, since it may be a global variable. We also order by dependencies there
346
- Variables.globals[item.ident].targetIdent = item.value.ident;
347
- var value = Variables.globals[item.ident].resolvedAlias = finalizeLLVMParameter(item.value);
348
- if ((MAIN_MODULE || SIDE_MODULE) && isFunctionType(item.type)) {
349
- var target = item.value.ident;
350
- if (!Functions.aliases[target]) Functions.aliases[target] = [];
351
- Functions.aliases[target].push(item.ident);
352
- }
353
- }
354
-
355
- function processLibraryFunction(snippet, ident) {
356
- snippet = snippet.toString();
357
- assert(snippet.indexOf('XXX missing C define') == -1,
358
- 'Trying to include a library function with missing C defines: ' + ident + ' | ' + snippet);
359
-
360
- // name the function; overwrite if it's already named
361
- snippet = snippet.replace(/function(?:\s+([^(]+))?\s*\(/, 'function _' + ident + '(');
362
- if (LIBRARY_DEBUG) {
363
- snippet = snippet.replace('{', '{ var ret = (function() { if (Runtime.debug) Module.printErr("[library call:' + ident + ': " + Array.prototype.slice.call(arguments).map(Runtime.prettyPrint) + "]"); ');
364
- snippet = snippet.substr(0, snippet.length-1) + '}).apply(this, arguments); if (Runtime.debug && typeof ret !== "undefined") Module.printErr(" [ return:" + Runtime.prettyPrint(ret)); return ret; \n}';
365
- }
366
- return snippet;
367
- }
368
-
369
- // functionStub
370
- function functionStubHandler(item) {
371
- // note the signature
372
- if (item.returnType && item.params) {
373
- functionStubSigs[item.ident] = Functions.getSignature(item.returnType.text, item.params.map(function(arg) { return arg.type }), false);
374
- }
375
-
376
- function addFromLibrary(ident) {
377
- if (ident in addedLibraryItems) return '';
378
- addedLibraryItems[ident] = true;
379
-
380
- // dependencies can be JS functions, which we just run
381
- if (typeof ident == 'function') return ident();
382
-
383
- // Don't replace implemented functions with library ones (which can happen when we add dependencies).
384
- // Note: We don't return the dependencies here. Be careful not to end up where this matters
385
- if (('_' + ident) in Functions.implementedFunctions) return '';
386
-
387
- var snippet = LibraryManager.library[ident];
388
- var redirectedIdent = null;
389
- var deps = LibraryManager.library[ident + '__deps'] || [];
390
- deps.forEach(function(dep) {
391
- if (typeof snippet === 'string' && !(dep in LibraryManager.library)) warn('missing library dependency ' + dep + ', make sure you are compiling with the right options (see #ifdefs in src/library*.js)');
392
- });
393
- var isFunction = false;
394
-
395
- if (typeof snippet === 'string') {
396
- var target = LibraryManager.library[snippet];
397
- if (target) {
398
- // Redirection for aliases. We include the parent, and at runtime make ourselves equal to it.
399
- // This avoid having duplicate functions with identical content.
400
- redirectedIdent = snippet;
401
- deps.push(snippet);
402
- snippet = '_' + snippet;
403
- }
404
- // In asm, we need to know about library functions. If there is a target, though, then no
405
- // need to consider this a library function - we will call directly to it anyhow
406
- if (ASM_JS && !redirectedIdent && (typeof target == 'function' || /Math_\w+/.exec(snippet))) {
407
- Functions.libraryFunctions[ident] = 1;
408
- }
409
- } else if (typeof snippet === 'object') {
410
- snippet = stringifyWithFunctions(snippet);
411
- } else if (typeof snippet === 'function') {
412
- isFunction = true;
413
- snippet = processLibraryFunction(snippet, ident);
414
- if (ASM_JS) Functions.libraryFunctions[ident] = 1;
415
- }
416
-
417
- var postsetId = ident + '__postset';
418
- var postset = LibraryManager.library[postsetId];
419
- if (postset && !addedLibraryItems[postsetId] && !SIDE_MODULE) {
420
- addedLibraryItems[postsetId] = true;
421
- itemsDict.GlobalVariablePostSet.push({
422
- intertype: 'GlobalVariablePostSet',
423
- JS: postset
424
- });
425
- }
426
-
427
- if (redirectedIdent) {
428
- deps = deps.concat(LibraryManager.library[redirectedIdent + '__deps'] || []);
429
- }
430
- if (ASM_JS) {
431
- // In asm, dependencies implemented in C might be needed by JS library functions.
432
- // We don't know yet if they are implemented in C or not. To be safe, export such
433
- // special cases.
434
- [LIBRARY_DEPS_TO_AUTOEXPORT].forEach(function(special) {
435
- deps.forEach(function(dep) {
436
- if (dep == special && !EXPORTED_FUNCTIONS[dep]) {
437
- EXPORTED_FUNCTIONS[dep] = 1;
438
- }
439
- });
440
- });
441
- }
442
- // $ident's are special, we do not prefix them with a '_'.
443
- if (ident[0] === '$') {
444
- ident = ident.substr(1);
445
- } else {
446
- ident = '_' + ident;
447
- }
448
- if (VERBOSE) printErr('adding ' + ident + ' and deps ' + deps);
449
- var depsText = (deps ? '\n' + deps.map(addFromLibrary).filter(function(x) { return x != '' }).join('\n') : '');
450
- var contentText = isFunction ? snippet : ('var ' + ident + '=' + snippet + ';');
451
- if (ASM_JS) {
452
- var sig = LibraryManager.library[ident.substr(1) + '__sig'];
453
- if (isFunction && sig && LibraryManager.library[ident.substr(1) + '__asm']) {
454
- // asm library function, add it as generated code alongside the generated code
455
- Functions.implementedFunctions[ident] = sig;
456
- asmLibraryFunctions.push(contentText);
457
- contentText = ' ';
458
- EXPORTED_FUNCTIONS[ident] = 1;
459
- Functions.libraryFunctions[ident.substr(1)] = 2;
460
- }
461
- }
462
- if (SIDE_MODULE) return ';'; // we import into the side module js library stuff from the outside parent
463
- if ((!ASM_JS || phase == 'pre' || phase == 'glue') &&
464
- (EXPORT_ALL || (ident in EXPORTED_FUNCTIONS))) {
465
- contentText += '\nModule["' + ident + '"] = ' + ident + ';';
466
- }
467
- return depsText + contentText;
468
- }
469
-
470
- itemsDict.functionStub.push(item);
471
- if (IGNORED_FUNCTIONS.indexOf(item.ident) >= 0) return;
472
- var shortident = item.ident.substr(1);
473
- if (BUILD_AS_SHARED_LIB) {
474
- // Shared libraries reuse the runtime of their parents.
475
- item.JS = '';
476
- } else {
477
- // If this is not linkable, anything not in the library is definitely missing
478
- var cancel = false;
479
- if (item.ident in DEAD_FUNCTIONS) {
480
- if (LibraryManager.library[shortident + '__asm']) {
481
- warn('cannot kill asm library function ' + item.ident);
482
- } else {
483
- LibraryManager.library[shortident] = new Function("Module['printErr']('dead function: " + shortident + "'); abort(-1);");
484
- delete LibraryManager.library[shortident + '__inline'];
485
- delete LibraryManager.library[shortident + '__deps'];
486
- }
487
- }
488
- if (!LINKABLE && !LibraryManager.library.hasOwnProperty(shortident) && !LibraryManager.library.hasOwnProperty(shortident + '__inline')) {
489
- if (ERROR_ON_UNDEFINED_SYMBOLS) error('unresolved symbol: ' + shortident);
490
- else if (VERBOSE || WARN_ON_UNDEFINED_SYMBOLS) warn('unresolved symbol: ' + shortident);
491
- if (ASM_JS) {
492
- // emit a stub that will fail during runtime. this allows asm validation to succeed.
493
- LibraryManager.library[shortident] = new Function("Module['printErr']('missing function: " + shortident + "'); abort(-1);");
494
- } else {
495
- cancel = true; // emit nothing, not even var X = undefined;
496
- }
497
- }
498
- item.JS = cancel ? ';' : addFromLibrary(shortident);
499
- }
500
- }
501
-
502
- // function splitter
503
- function functionSplitter(item) {
504
- item.lines.forEach(function(line) {
505
- //B.start('jsifier-handle-' + line.intertype);
506
- Framework.currItem = line;
507
- line.funcData = item; // TODO: remove all these, access it globally
508
- switch (line.intertype) {
509
- case 'value': line.JS = valueHandler(line); break;
510
- case 'noop': line.JS = noopHandler(line); break;
511
- case 'var': line.JS = varHandler(line); break;
512
- case 'store': line.JS = storeHandler(line); break;
513
- case 'deleted': line.JS = deletedHandler(line); break;
514
- case 'branch': line.JS = branchHandler(line); break;
515
- case 'switch': line.JS = switchHandler(line); break;
516
- case 'return': line.JS = returnHandler(line); break;
517
- case 'resume': line.JS = resumeHandler(line); break;
518
- case 'invoke': line.JS = invokeHandler(line); break;
519
- case 'atomic': line.JS = atomicHandler(line); break;
520
- case 'landingpad': line.JS = landingpadHandler(line); break;
521
- case 'load': line.JS = loadHandler(line); break;
522
- case 'extractvalue': line.JS = extractvalueHandler(line); break;
523
- case 'insertvalue': line.JS = insertvalueHandler(line); break;
524
- case 'insertelement': line.JS = insertelementHandler(line); break;
525
- case 'extracttelement': line.JS = extractelementHandler(line); break;
526
- case 'shufflevector': line.JS = shufflevectorHandler(line); break;
527
- case 'indirectbr': line.JS = indirectbrHandler(line); break;
528
- case 'alloca': line.JS = allocaHandler(line); break;
529
- case 'va_arg': line.JS = va_argHandler(line); break;
530
- case 'mathop': line.JS = mathopHandler(line); break;
531
- case 'bitcast': line.JS = bitcastHandler(line); break;
532
- case 'getelementptr': line.JS = getelementptrHandler(line); break;
533
- case 'call': line.JS = callHandler(line); break;
534
- case 'unreachable': line.JS = unreachableHandler(line); break;
535
- default: throw 'what is this line? ' + dump(line);
536
- }
537
- //if (ASM_JS) assert(line.JS.indexOf('var ') < 0, dump(line));
538
- if (line.assignTo) makeAssign(line);
539
- Framework.currItem = null;
540
- //B.stop('jsifier-handle-' + line.intertype);
541
- });
542
- //B.start('jsifier-frec');
543
- functionReconstructor(item);
544
- //B.stop('jsifier-frec');
545
- }
546
-
547
- // function for filtering functions for label debugging
548
- if (LABEL_FUNCTION_FILTERS.length > 0) {
549
- var LABEL_FUNCTION_FILTER_SET = set(LABEL_FUNCTION_FILTERS);
550
- var functionNameFilterTest = function(ident) {
551
- return (ident in LABEL_FUNCTION_FILTER_SET);
552
- };
553
- } else {
554
- // no filters are specified, all function names are printed
555
- var functionNameFilterTest = function(ident) {
556
- return true;
557
- }
558
- }
559
-
560
- // function reconstructor & post-JS optimizer
561
- function functionReconstructor(func) {
562
- // We have this function all reconstructed, go and finalize it's JS!
563
-
564
- if (IGNORED_FUNCTIONS.indexOf(func.ident) >= 0) return null;
565
-
566
- func.JS = '\n';
567
-
568
- var paramIdents = func.params.map(function(param) {
569
- return toNiceIdent(param.ident);
570
- });
571
-
572
- if (CLOSURE_ANNOTATIONS) {
573
- func.JS += '/**\n';
574
- paramIdents.forEach(function(param) {
575
- func.JS += ' * @param {number} ' + param + '\n';
576
- });
577
- func.JS += ' * @return {number}\n'
578
- func.JS += ' */\n';
579
- }
580
-
581
- if (PRINT_SPLIT_FILE_MARKER) {
582
- func.JS += '\n//FUNCTION_BEGIN_MARKER\n'
583
- var associatedSourceFile = "NO_SOURCE";
584
- }
585
-
586
- if (DLOPEN_SUPPORT) Functions.getIndex(func.ident);
587
-
588
- func.JS += 'function ' + func.ident + '(' + paramIdents.join(',') + '){\n';
589
-
590
- if (PGO) {
591
- func.JS += INDENTATION + 'PGOMonitor.called["' + func.ident + '"] = 1;\n';
592
- }
593
-
594
- if (ASM_JS) {
595
- // spell out argument types
596
- func.params.forEach(function(param) {
597
- func.JS += INDENTATION + param.ident + '=' + deParen(asmCoercion(param.ident, param.type)) + ';\n';
598
- });
599
-
600
- addVariable('label', 'i32', func);
601
-
602
- if (func.setjmpTable) {
603
- addVariable('setjmpLabel', 'i32', func);
604
- addVariable('setjmpTable', 'i32', func);
605
- }
606
-
607
- // spell out local variables
608
- var vars = values(func.variables).filter(function(v) {
609
- return v.origin !== 'funcparam' &&
610
- (!isIllegalType(getImplementationType(v)) || v.ident.indexOf('$', 1) > 0); // not illegal, or a broken up illegal (we have illegal chunks explicitly anyhow)
611
- });
612
- if (vars.length > 0) {
613
- var chunkSize = 20;
614
- var chunks = [];
615
- var i = 0;
616
- while (i < vars.length) {
617
- chunks.push(vars.slice(i, i+chunkSize));
618
- i += chunkSize;
619
- }
620
- for (i = 0; i < chunks.length; i++) {
621
- func.JS += INDENTATION + 'var ' + chunks[i].map(function(v) {
622
- return v.ident + '=' + asmInitializer(getImplementationType(v)); //, func.variables[v.ident].impl);
623
- }).join(',') + ';\n';
624
- }
625
- }
626
- }
627
-
628
- if (!ASM_JS) {
629
- if (CLOSURE_ANNOTATIONS) func.JS += '/** @type {number} */';
630
- func.JS += INDENTATION + 'var label=0;\n';
631
- }
632
-
633
- if (ASM_JS) {
634
- var hasByVal = false;
635
- func.params.forEach(function(param) {
636
- hasByVal = hasByVal || param.byVal;
637
- });
638
- if (hasByVal) {
639
- func.JS += INDENTATION + 'var tempParam=0;\n';
640
- }
641
- }
642
-
643
- if (func.hasVarArgsCall) {
644
- func.JS += INDENTATION + 'var tempVarArgs=0;\n';
645
- }
646
-
647
- // Prepare the stack, if we need one. If we have other stack allocations, force the stack to be set up.
648
- func.JS += INDENTATION + RuntimeGenerator.stackEnter(func.initialStack, func.otherStackAllocations) + ';\n';
649
-
650
- // Make copies of by-value params
651
- // XXX It is not clear we actually need this. While without this we fail, it does look like
652
- // Clang normally does the copy itself, in the calling function. We only need this code
653
- // when Clang optimizes the code and passes the original, not the copy, to the other
654
- // function. But Clang still copies, the copy is just unused! Need to figure out if that
655
- // is caused by our running just some optimizations (the safe ones), or if its a bug
656
- // in Clang, or a bug in our understanding of the IR.
657
- func.params.forEach(function(param) {
658
- if (param.byVal) {
659
- var type = removePointing(param.type);
660
- var typeInfo = Types.types[type];
661
- func.JS += INDENTATION + (ASM_JS ? '' : 'var ') + 'tempParam = ' + param.ident + '; ' + param.ident + '=' + RuntimeGenerator.stackAlloc(typeInfo.flatSize) + ';' +
662
- makeCopyValues(param.ident, 'tempParam', typeInfo.flatSize, 'null', null, param.byVal) + ';\n';
663
- }
664
- });
665
-
666
- if (LABEL_DEBUG && functionNameFilterTest(func.ident)) func.JS += " Module.print(INDENT + ' Entering: " + func.ident + ": ' + Array.prototype.slice.call(arguments)); INDENT += ' ';\n";
667
-
668
- // Walk function blocks and generate JS
669
- function walkBlock(block, indent) {
670
- if (!block) return '';
671
- dprint('relooping', 'walking block: ' + block.type + ',' + block.entries + ' : ' + block.labels.length);
672
- function getLabelLines(label, relooping) {
673
- if (!label) return '';
674
- var ret = '';
675
- if ((LABEL_DEBUG >= 2) && functionNameFilterTest(func.ident)) {
676
- ret += INDENTATION + "Module.print(INDENT + '" + func.ident + ":" + label.ident + "');\n";
677
- }
678
- if (EXECUTION_TIMEOUT > 0) {
679
- ret += INDENTATION + 'if (Date.now() - START_TIME >= ' + (EXECUTION_TIMEOUT*1000) + ') throw "Timed out!" + (new Error().stack);\n';
680
- }
681
-
682
- if (PRINT_SPLIT_FILE_MARKER && Debugging.on && Debugging.getAssociatedSourceFile(label.lines[label.lines.length-1].lineNum)) {
683
- // Overwrite the associated source file for every line. The last line should contain the source file associated to
684
- // the return value/address of outer most block (the marked function).
685
- associatedSourceFile = Debugging.getAssociatedSourceFile(label.lines[label.lines.length-1].lineNum);
686
- }
687
-
688
- // for special labels we care about (for phi), mark that we visited them
689
- var i = 0;
690
- return ret + label.lines.map(function(line) {
691
- var JS = line.JS;
692
- if (!relooping) JS = INDENTATION + JS;
693
- if (relooping && i == label.lines.length-1) {
694
- if (line.intertype == 'branch' || line.intertype == 'switch') {
695
- JS = ''; // just branching operations - done in the relooper, so nothing need be done here
696
- } else if (line.intertype == 'invoke') {
697
- JS = line.reloopingJS; // invokes have code that is not rendered in the relooper (the call inside a try-catch)
698
- }
699
- }
700
- i++;
701
- // invoke instructions span two lines, and the debug info is located
702
- // on the second line, hence the +1
703
- if (Debugging.on) JS += Debugging.getComment(line.lineNum + (line.intertype === 'invoke' ? 1 : 0));
704
- //assert(JS.indexOf('\n') < 0, JS);
705
- return JS;
706
- }).join('\n');
707
- }
708
- var ret = '';
709
- if (!RELOOP || func.forceEmulated) { // TODO: also if just 1 label?
710
- if (block.labels.length > 1) {
711
- if (block.entries.length == 1) {
712
- ret += indent + 'label = ' + getLabelId(block.entries[0]) + '; ' + (SHOW_LABELS ? '/* ' + getOriginalLabelId(block.entries[0]) + ' */' : '') + '\n';
713
- } // otherwise, should have been set before!
714
- if (func.setjmpTable) {
715
- if (!ASM_JS) {
716
- var setjmpTable = {};
717
- ret += indent + 'var mySetjmpIds = {};\n';
718
- ret += indent + 'var setjmpTable = {';
719
- func.setjmpTable.forEach(function(triple) { // original label, label we created for right after the setjmp, variable setjmp result goes into
720
- ret += '"' + getLabelId(triple.oldLabel) + '": ' + 'function(value) { label = ' + getLabelId(triple.newLabel) + '; ' + triple.assignTo + ' = value },';
721
- });
722
- ret += 'dummy: 0';
723
- ret += '};\n';
724
- } else {
725
- ret += makeVarDef('setjmpLabel') + '=0;\n';
726
- ret += makeVarDef('setjmpTable') + '=' + RuntimeGenerator.stackAlloc(4 * (MAX_SETJMPS + 1) * 2) + ';\n';
727
- ret += makeSetValue('setjmpTable', '0', '0', 'i32') + ';'; // initialize first entry to 0
728
- }
729
- }
730
- ret += indent + 'while(1)';
731
- if (func.setjmpTable && !ASM_JS) {
732
- ret += 'try { ';
733
- }
734
- ret += 'switch(' + asmCoercion('label', 'i32') + '){\n';
735
- ret += block.labels.map(function(label) {
736
- return INDENTATION + 'case ' + getLabelId(label.ident) + ': ' + (SHOW_LABELS ? '// ' + getOriginalLabelId(label.ident) : '') + '\n'
737
- + getLabelLines(label);
738
- }).join('\n') + '\n';
739
- if (func.setjmpTable && ASM_JS) {
740
- // emit a label in which we write to the proper local variable, before jumping to the actual label
741
- ret += INDENTATION + 'case ' + SETJMP_LABEL + ': ';
742
- ret += func.setjmpTable.map(function(triple) { // original label, label we created for right after the setjmp, variable setjmp result goes into
743
- return 'if ((setjmpLabel|0) == ' + getLabelId(triple.oldLabel) + ') { ' + triple.assignTo + ' = threwValue; label = ' + triple.newLabel + ' }\n';
744
- }).join(' else ');
745
- if (ASSERTIONS) ret += 'else abort(-3);\n';
746
- ret += '__THREW__ = threwValue = 0;\n';
747
- ret += 'break;\n';
748
- }
749
- if (ASSERTIONS) ret += indent + INDENTATION + 'default: assert(0' + (ASM_JS ? '' : ', "bad label: " + label') + ');\n';
750
- ret += indent + '}\n';
751
- if (func.setjmpTable && !ASM_JS) {
752
- ret += ' } catch(e) { if (!e.longjmp || !(e.id in mySetjmpIds)) throw(e); setjmpTable[setjmpLabels[e.id]](e.value) }';
753
- }
754
- if (ASM_JS && func.returnType !== 'void') ret += ' return ' + asmInitializer(func.returnType) + ';\n'; // Add a return
755
- } else {
756
- ret += (SHOW_LABELS ? indent + '/* ' + block.entries[0] + ' */' : '') + '\n' + getLabelLines(block.labels[0]);
757
- }
758
- ret += '\n';
759
- } else {
760
- // Reloop multiple blocks using the compiled relooper
761
- //B.start('jsifier-reloop');
762
-
763
- //Relooper.setDebug(1);
764
- Relooper.init();
765
-
766
- if (ASM_JS) Relooper.setAsmJSMode(1);
767
-
768
- var blockMap = {};
769
- // add blocks
770
- for (var i = 0; i < block.labels.length; i++) {
771
- var label = block.labels[i];
772
- var content = getLabelLines(label, true);
773
- //printErr(func.ident + ' : ' + label.ident + ' : ' + content + '\n');
774
- var last = label.lines[label.lines.length-1];
775
- if (!last.signedIdent) {
776
- blockMap[label.ident] = Relooper.addBlock(content);
777
- } else {
778
- assert(last.intertype == 'switch');
779
- blockMap[label.ident] = Relooper.addBlock(content, last.signedIdent);
780
- }
781
- }
782
- // add branchings
783
- function relevant(x) { return x && x.length > 2 ? x : 0 } // ignores ';' which valueJS and label*JS can be if empty
784
- for (var i = 0; i < block.labels.length; i++) {
785
- var label = block.labels[i];
786
- var ident = label.ident;
787
- var last = label.lines[label.lines.length-1];
788
- //printErr('zz last ' + dump(last));
789
- if (last.intertype == 'branch') {
790
- if (last.label) { // 1 target
791
- Relooper.addBranch(blockMap[ident], blockMap[last.label], 0, relevant(last.labelJS));
792
- } else { // 2 targets
793
- Relooper.addBranch(blockMap[ident], blockMap[last.labelTrue], last.valueJS, relevant(last.labelTrueJS));
794
- Relooper.addBranch(blockMap[ident], blockMap[last.labelFalse], 0, relevant(last.labelFalseJS));
795
- }
796
- } else if (last.intertype == 'switch') {
797
- last.groupedLabels.forEach(function(switchLabel) {
798
- Relooper.addBranch(blockMap[ident], blockMap[switchLabel.label], switchLabel.value, relevant(switchLabel.labelJS));
799
- });
800
- Relooper.addBranch(blockMap[ident], blockMap[last.defaultLabel], 0, relevant(last.defaultLabelJS));
801
- } else if (last.intertype == 'invoke') {
802
- Relooper.addBranch(blockMap[ident], blockMap[last.toLabel], '!__THREW__', relevant(last.toLabelJS));
803
- Relooper.addBranch(blockMap[ident], blockMap[last.unwindLabel], 0, relevant(last.unwindLabelJS));
804
- } else if (last.intertype in RELOOP_IGNORED_LASTS) {
805
- } else {
806
- throw 'unknown reloop last line: ' + last.intertype;
807
- }
808
- }
809
- ret += Relooper.render(blockMap[block.entries[0]]);
810
- Relooper.cleanup();
811
- //B.stop('jsifier-reloop');
812
- }
813
- return ret;
814
- }
815
- func.JS += walkBlock(func.block, INDENTATION);
816
- // Finalize function
817
- if (LABEL_DEBUG && functionNameFilterTest(func.ident)) func.JS += " INDENT = INDENT.substr(0, INDENT.length-2);\n";
818
- // Ensure a return in a function with a type that returns, even if it lacks a return (e.g., if it aborts())
819
- if (RELOOP && ASM_JS && func.lines.length > 0 && func.returnType != 'void') {
820
- var lastCurly = func.JS.lastIndexOf('}');
821
- var lastReturn = func.JS.lastIndexOf('return ');
822
- if ((lastCurly < 0 && lastReturn < 0) || // no control flow, no return
823
- (lastCurly >= 0 && lastReturn < lastCurly)) { // control flow, no return past last join
824
- func.JS += ' return ' + asmInitializer(func.returnType) + ';\n';
825
- }
826
- }
827
- func.JS += '}\n';
828
-
829
- if (PRINT_SPLIT_FILE_MARKER) {
830
- func.JS += '\n//FUNCTION_END_MARKER_OF_SOURCE_FILE_' + associatedSourceFile + '\n';
831
- }
832
-
833
- if (!ASM_JS && (EXPORT_ALL || (func.ident in EXPORTED_FUNCTIONS))) {
834
- func.JS += 'Module["' + func.ident + '"] = ' + func.ident + ';';
835
- }
836
-
837
- if (!ASM_JS && INLINING_LIMIT && func.lines.length >= INLINING_LIMIT) {
838
- func.JS += func.ident + '["X"]=1;';
839
- }
840
-
841
- if (BUILD_AS_SHARED_LIB == 2) {
842
- // TODO: make the assert conditional on ASSERTIONS
843
- func.JS += 'if (globalScope) { assert(!globalScope["' + func.ident + '"]); globalScope["' + func.ident + '"] = ' + func.ident + ' }';
844
- }
845
-
846
- func.JS = func.JS.replace(/\n *;/g, '\n'); // remove unneeded lines
847
-
848
- if (MAIN_MODULE || SIDE_MODULE) {
849
- // Clone the function for each of its aliases. We do not know which name it will be used by in another module,
850
- // and we do not have a heavyweight metadata system to resolve aliases during linking
851
- var aliases = Functions.aliases[func.ident];
852
- if (aliases) {
853
- var body = func.JS.substr(func.JS.indexOf('('));
854
- aliases.forEach(function(alias) {
855
- func.JS += '\n' + 'function ' + alias + body;
856
- });
857
- }
858
- }
859
- itemsDict.function.push(func);
860
- }
861
-
862
- function getVarData(funcData, ident) {
863
- var local = funcData.variables[ident];
864
- if (local) return local;
865
- var global = Variables.globals[ident];
866
- return global || null;
867
- }
868
-
869
- function getVarImpl(funcData, ident) {
870
- if (ident === 'null' || isNumber(ident)) return VAR_NATIVIZED; // like nativized, in that we have the actual value right here
871
- var data = getVarData(funcData, ident);
872
- assert(data, 'What variable is this? |' + ident + '|');
873
- return data.impl;
874
- }
875
-
876
- // An interitem that has |assignTo| is an assign to that item. They call this function which
877
- // generates the actual assignment.
878
- function makeAssign(item) {
879
- var valueJS = item.JS;
880
- item.JS = '';
881
- if (!ASM_JS || item.intertype != 'alloca' || item.funcData.variables[item.assignTo].impl == VAR_EMULATED) { // asm only needs non-allocas
882
- if (CLOSURE_ANNOTATIONS) item.JS += '/** @type {number} */ ';
883
- item.JS += ((ASM_JS || item.overrideSSA) ? '' : 'var ') + toNiceIdent(item.assignTo);
884
- }
885
- var value = parseNumerical(valueJS);
886
- var impl = getVarImpl(item.funcData, item.assignTo);
887
- switch (impl) {
888
- case VAR_NATIVE: {
889
- break;
890
- }
891
- case VAR_NATIVIZED: {
892
- // SSA, so this must be the alloca. No need for a value
893
- if (!item.overrideSSA) value = '';
894
- break;
895
- }
896
- case VAR_EMULATED: {
897
- break;
898
- }
899
- default: throw 'zz unknown impl: ' + impl;
900
- }
901
- if (value && value != ';') {
902
- item.JS += '=' + value;
903
- }
904
- if (item.JS[item.JS.length-1] != ';') {
905
- item.JS += ';';
906
- }
907
- }
908
-
909
- // Function lines
910
- function valueHandler(item) {
911
- if (item.vars) {
912
- item.vars.forEach(function(v) {
913
- addVariable(v[0], v[1]);
914
- });
915
- }
916
- return item.ident;
917
- }
918
- function noopHandler(item) {
919
- return ';';
920
- }
921
- function varHandler(item) { // assigns into phis become simple vars
922
- return ASM_JS ? ';' : ('var ' + item.ident + ';');
923
- }
924
- function storeHandler(item) {
925
- var value = finalizeLLVMParameter(item.value);
926
- if (pointingLevels(item.pointerType) == 1) {
927
- value = parseNumerical(value, item.valueType);
928
- }
929
- var impl = VAR_EMULATED;
930
- if (item.pointer.intertype == 'value') {
931
- impl = getVarImpl(item.funcData, item.ident);
932
- }
933
- if (item.valueType[item.valueType.length-1] === '>') {
934
- // vector store TODO: move to makeSetValue?
935
- var native = getVectorNativeType(item.valueType);
936
- var base = getSIMDName(native);
937
- return '(' + makeSetValue(item.ident, 0, value + '.x', native, 0, 0, item.align) + ',' +
938
- makeSetValue(item.ident, 4, value + '.y', native, 0, 0, item.align) + ',' +
939
- makeSetValue(item.ident, 8, value + '.z', native, 0, 0, item.align) + ',' +
940
- makeSetValue(item.ident, 12, value + '.w', native, 0, 0, item.align) + ');';
941
- }
942
- switch (impl) {
943
- case VAR_NATIVIZED:
944
- if (isNumber(item.ident)) {
945
- // Direct write to a memory address; this may be an intentional segfault, if not, it is a bug in the source
946
- if (ASM_JS) {
947
- return 'abort(' + item.ident + ')';
948
- } else {
949
- return 'throw "fault on write to ' + item.ident + '";';
950
- }
951
- }
952
- return item.ident + '=' + value + ';'; // We have the actual value here
953
- break;
954
- case VAR_EMULATED:
955
- if (item.pointer.intertype == 'value') {
956
- return makeSetValue(makeGlobalUse(item.ident), 0, value, item.valueType, 0, 0, item.align) + ';';
957
- } else {
958
- return makeSetValue(0, finalizeLLVMParameter(item.pointer), value, item.valueType, 0, 0, item.align) + ';';
959
- }
960
- break;
961
- default:
962
- throw 'unknown [store] impl: ' + impl;
963
- }
964
- return null;
965
- }
966
-
967
- function deletedHandler(item) { return ';' }
968
-
969
- function getOriginalLabelId(label) {
970
- var funcData = Framework.currItem.funcData;
971
- var labelIdsInverse = funcData.labelIdsInverse;
972
- return labelIdsInverse[label];
973
- }
974
-
975
- function getLabelId(label) {
976
- return label;
977
- }
978
-
979
- function makeBranch(label, lastLabel, labelIsVariable) { // lastLabel is deprecated
980
- var pre = '';
981
- if (label[0] == 'B') {
982
- assert(!labelIsVariable, 'Cannot handle branches to variables with special branching options');
983
- var parts = label.split('|');
984
- var trueLabel = parts[1] || '';
985
- var oldLabel = parts[2] || '';
986
- var labelSetting = oldLabel ? 'label=' + getLabelId(oldLabel) + ';' +
987
- (SHOW_LABELS ? ' /* to: ' + getOriginalLabelId(cleanLabel(oldLabel)) + ' */' : '') : ''; // TODO: optimize away the setting
988
- if (label[1] == 'R') {
989
- if (label[2] == 'N') { // BRNOL: break, no label setting
990
- labelSetting = '';
991
- }
992
- return pre + labelSetting + 'break ' + trueLabel + ';';
993
- } else if (label[1] == 'C') { // CONT
994
- if (label[2] == 'N') { // BCNOL: continue, no label setting
995
- labelSetting = '';
996
- }
997
- return pre + labelSetting + 'continue ' + trueLabel + ';';
998
- } else if (label[1] == 'N') { // NOPP
999
- return pre + ';'; // Returning no text might confuse this parser
1000
- } else if (label[1] == 'J') { // JSET
1001
- return pre + labelSetting + ';';
1002
- } else {
1003
- throw 'Invalid B-op in branch: ' + trueLabel + ',' + oldLabel;
1004
- }
1005
- } else {
1006
- if (!labelIsVariable) label = getLabelId(label);
1007
- return pre + 'label=' + label + ';' + (SHOW_LABELS ? ' /* to: ' + getOriginalLabelId(cleanLabel(label)) + ' */' : '') + 'break;';
1008
- }
1009
- }
1010
-
1011
- function calcPhiSets(item) {
1012
- if (!item.phi) return null;
1013
- var phiSets = {};
1014
- item.dependent.params.forEach(function(param) {
1015
- if (!phiSets[param.targetLabel]) phiSets[param.targetLabel] = [];
1016
- phiSets[param.targetLabel].push(param);
1017
- param.valueJS = finalizeLLVMParameter(param.value);
1018
- });
1019
- return phiSets;
1020
- }
1021
-
1022
- function getPhiSetsForLabel(phiSets, label) {
1023
- if (!phiSets) return '';
1024
- label = getOldLabel(label);
1025
- if (!phiSets[label]) return '';
1026
- var labelSets = phiSets[label];
1027
- // FIXME: Many of the |var |s here are not needed, but without them we get slowdowns with closure compiler. TODO: remove this workaround.
1028
- if (labelSets.length == 1) {
1029
- return (ASM_JS ? '' : 'var ') + labelSets[0].ident + '=' + labelSets[0].valueJS + ';';
1030
- }
1031
- // TODO: eliminate unneeded sets (to undefined etc.)
1032
- var deps = {}; // for each ident we will set, which others it depends on
1033
- var map = {};
1034
- labelSets.forEach(function(labelSet) {
1035
- deps[labelSet.ident] = {};
1036
- map[labelSet.ident] = labelSet;
1037
- });
1038
- labelSets.forEach(function(labelSet) {
1039
- walkInterdata(labelSet.value, function mark(item) {
1040
- if (item.intertype == 'value' && item.ident in deps && labelSet.ident != item.ident) {
1041
- deps[labelSet.ident][item.ident] = true;
1042
- }
1043
- });
1044
- });
1045
- var pre = '', post = '', idents;
1046
- mainLoop: while ((idents = keys(deps)).length > 0) {
1047
- var remove = function(ident) {
1048
- for (var i = 0; i < idents.length; i++) {
1049
- delete deps[idents[i]][ident];
1050
- }
1051
- delete deps[ident];
1052
- }
1053
- for (var i = 0; i < idents.length; i++) {
1054
- if (keys(deps[idents[i]]).length == 0) {
1055
- post = idents[i] + '=' + map[idents[i]].valueJS + ';' + post;
1056
- if (!ASM_JS) post = 'var ' + post;
1057
- else addVariable(idents[i], map[idents[i]].value.type);
1058
- remove(idents[i]);
1059
- continue mainLoop;
1060
- }
1061
- }
1062
- // If we got here, we have circular dependencies, and must break at least one.
1063
- pre += makeVarDef(idents[0]) + '$phi=' + map[idents[0]].valueJS + ';';
1064
- post += makeVarDef(idents[0]) + '=' + idents[0] + '$phi;';
1065
- addVariable(idents[0] + '$phi', map[idents[0]].value.type);
1066
- addVariable(idents[0], map[idents[0]].value.type);
1067
- remove(idents[0]);
1068
- }
1069
- return pre + post;
1070
-
1071
- /* // Safe, unoptimized copying
1072
- var ret = '';
1073
- for (var i = 0; i < labelSets.length-1; i++) {
1074
- ret += 'var ' + labelSets[i].ident + '$phi = ' + labelSets[i].valueJS + ';';
1075
- }
1076
- ret += labelSets[labelSets.length-1].ident + ' = ' + labelSets[labelSets.length-1].valueJS + ';';
1077
- for (var i = 0; i < labelSets.length-1; i++) {
1078
- ret += labelSets[i].ident + ' = ' + labelSets[i].ident + '$phi;';
1079
- }
1080
- return ret;
1081
- */
1082
- }
1083
-
1084
- function branchHandler(item) {
1085
- var phiSets = calcPhiSets(item);
1086
- if (!item.value) {
1087
- return (item.labelJS = getPhiSetsForLabel(phiSets, item.label)) + makeBranch(item.label, item.currLabelId);
1088
- } else {
1089
- var condition = item.valueJS = finalizeLLVMParameter(item.value);
1090
- var labelTrue = (item.labelTrueJS = getPhiSetsForLabel(phiSets, item.labelTrue)) + makeBranch(item.labelTrue, item.currLabelId);
1091
- var labelFalse = (item.labelFalseJS = getPhiSetsForLabel(phiSets, item.labelFalse)) + makeBranch(item.labelFalse, item.currLabelId);
1092
- if (labelTrue == ';' && labelFalse == ';') return ';';
1093
- var head = 'if(' + condition + '){';
1094
- var head2 = 'if(!(' + condition + ')){';
1095
- var else_ = '}else{';
1096
- var tail = '}';
1097
- if (labelTrue == ';') {
1098
- return head2 + labelFalse + tail;
1099
- } else if (labelFalse == ';') {
1100
- return head + labelTrue + tail;
1101
- } else {
1102
- return head + labelTrue + else_ + labelFalse + tail;
1103
- }
1104
- }
1105
- }
1106
- function switchHandler(item) {
1107
- // use a switch if the range is not too big or sparse
1108
- var minn = Infinity, maxx = -Infinity;
1109
- item.switchLabels.forEach(function(switchLabel) {
1110
- var curr = Math.abs(parseInt(switchLabel.value));
1111
- minn = Math.min(minn, curr);
1112
- maxx = Math.max(maxx, curr);
1113
- });
1114
- var range = maxx - minn;
1115
- var useIfs = (item.switchLabels.length+1) < 6 || range > 10*1024 || (range/item.switchLabels.length) > 1024; // heuristics
1116
- if (VERBOSE && useIfs && item.switchLabels.length >= 6) {
1117
- warn('not optimizing llvm switch into js switch because range of values is ' + range + ', density is ' + range/item.switchLabels.length);
1118
- }
1119
- if (!useIfs && isIllegalType(item.type)) {
1120
- useIfs = true;
1121
- if (VERBOSE) warn('not optimizing llvm switch because illegal type ' + item.type);
1122
- }
1123
-
1124
- var phiSets = calcPhiSets(item);
1125
- // Consolidate checks that go to the same label. This is important because it makes the relooper simpler and faster.
1126
- var targetLabels = {}; // for each target label, the list of values going to it
1127
- var switchLabelMap = {};
1128
- item.switchLabels.forEach(function(switchLabel) {
1129
- switchLabelMap[switchLabel.label] = switchLabel;
1130
- if (!targetLabels[switchLabel.label]) {
1131
- targetLabels[switchLabel.label] = [];
1132
- }
1133
- targetLabels[switchLabel.label].push(switchLabel.value);
1134
- });
1135
- var ret = '';
1136
- var first = true;
1137
- signedIdent = makeSignOp(item.ident, item.type, 're'); // we need to standardize for purpose of comparison
1138
- if (!useIfs) item.signedIdent = signedIdent;
1139
- if (RELOOP) {
1140
- item.groupedLabels = [];
1141
- }
1142
- if (!useIfs) {
1143
- ret += 'switch(' + signedIdent + '){';
1144
- }
1145
- // process target labels, sorting them so output is consistently ordered
1146
- keys(targetLabels).sort().forEach(function(targetLabel) {
1147
- if (!first && useIfs) {
1148
- ret += 'else ';
1149
- } else {
1150
- first = false;
1151
- }
1152
- var value;
1153
- if (useIfs) {
1154
- value = targetLabels[targetLabel].map(function(value) {
1155
- return makeComparison(signedIdent, '==', makeSignOp(value, item.type, 're'), item.type)
1156
- }).join('|');
1157
- ret += 'if(' + value + '){';
1158
- } else {
1159
- value = targetLabels[targetLabel].map(function(value) {
1160
- return 'case ' + makeSignOp(value, item.type, 're') + ':';
1161
- }).join('');
1162
- ret += value + '{';
1163
- }
1164
- var phiSet = getPhiSetsForLabel(phiSets, targetLabel);
1165
- ret += INDENTATION + '' + phiSet + makeBranch(targetLabel, item.currLabelId || null);
1166
- ret += '}';
1167
- if (RELOOP) {
1168
- item.groupedLabels.push({
1169
- label: targetLabel,
1170
- value: value,
1171
- labelJS: phiSet
1172
- });
1173
- }
1174
- });
1175
- var phiSet = item.defaultLabelJS = getPhiSetsForLabel(phiSets, item.defaultLabel);
1176
- if (useIfs) {
1177
- if (item.switchLabels.length > 0) ret += 'else{';
1178
- ret += phiSet + makeBranch(item.defaultLabel, item.currLabelId) + '';
1179
- if (item.switchLabels.length > 0) ret += '}';
1180
- } else {
1181
- ret += 'default:{';
1182
- ret += phiSet + makeBranch(item.defaultLabel, item.currLabelId) + '';
1183
- ret += '}';
1184
-
1185
- ret += '}break;'; // finish switch and break, to move control flow properly (breaks from makeBranch just broke out of the switch)
1186
- }
1187
- if (item.value) {
1188
- ret += ' ' + toNiceIdent(item.value);
1189
- }
1190
- return ret;
1191
- }
1192
- function returnHandler(item) {
1193
- var ret = RuntimeGenerator.stackExit(item.funcData.initialStack, item.funcData.otherStackAllocations);
1194
- if (ret.length > 0) ret += ';';
1195
- if (LABEL_DEBUG && functionNameFilterTest(item.funcData.ident)) {
1196
- ret += "Module.print(INDENT + 'Exiting: " + item.funcData.ident + "');"
1197
- + "INDENT = INDENT.substr(0, INDENT.length-2);";
1198
- }
1199
- ret += 'return';
1200
- var value = item.value ? finalizeLLVMParameter(item.value) : null;
1201
- if (!value && item.funcData.returnType != 'void') value = '0'; // no-value returns must become value returns if function returns
1202
- if (value) {
1203
- ret += ' ' + asmCoercion(value, item.type);
1204
- }
1205
- return ret + ';';
1206
- }
1207
- function resumeHandler(item) {
1208
- if (DISABLE_EXCEPTION_CATCHING && !(item.funcData.ident in EXCEPTION_CATCHING_WHITELIST)) return 'abort()';
1209
- if (item.ident == 0) {
1210
- // No exception to resume, so we can just bail.
1211
- // This is related to issue #917 and http://llvm.org/PR15518
1212
- return (EXCEPTION_DEBUG ? 'Module.print("no exception to resume")' : '') + ';';
1213
- }
1214
- // If there is no current exception, set this one as it (during a resume, the current exception can be wiped out)
1215
- var ptr = makeStructuralAccess(item.ident, 0);
1216
- return '___resumeException(' + asmCoercion(ptr, 'i32') + ')';
1217
- }
1218
- function invokeHandler(item) {
1219
- // Wrapping in a function lets us easily return values if we are
1220
- // in an assignment
1221
- var disabled = DISABLE_EXCEPTION_CATCHING == 2 && !(item.funcData.ident in EXCEPTION_CATCHING_WHITELIST);
1222
- var phiSets = calcPhiSets(item);
1223
- var call_ = makeFunctionCall(item, item.params, item.funcData, item.type, ASM_JS && !disabled, !!item.assignTo || !item.standalone, true);
1224
-
1225
- var ret;
1226
-
1227
- if (disabled) {
1228
- ret = call_ + ';';
1229
- } else if (ASM_JS) {
1230
- if (item.type != 'void') call_ = asmCoercion(call_, item.type); // ensure coercion to ffi in comma operator
1231
- call_ = call_.replace('; return', ''); // we auto-add returns when aborting, but do not need them here
1232
- if (item.type == 'void') {
1233
- ret = '__THREW__ = 0;' + call_ + ';';
1234
- } else {
1235
- ret = '(__THREW__ = 0,' + call_ + ');';
1236
- }
1237
- } else {
1238
- ret = '(function() { try { __THREW__ = 0; return '
1239
- + call_ + ' '
1240
- + '} catch(e) { '
1241
- + 'if (typeof e != "number") throw e; '
1242
- + 'if (ABORT) throw e; __THREW__ = 1; '
1243
- + (EXCEPTION_DEBUG ? 'Module.print("Exception: " + e + ", currently at: " + (new Error().stack)); ' : '')
1244
- + 'return null } })();';
1245
- }
1246
- ret = makeVarArgsCleanup(ret);
1247
-
1248
- if (item.assignTo) {
1249
- var illegal = USE_TYPED_ARRAYS == 2 && isIllegalType(item.type);
1250
- var assignTo = illegal ? item.assignTo + '$r' : item.assignTo;
1251
- ret = makeVarDef(assignTo) + '=' + ret;
1252
- if (ASM_JS) addVariable(assignTo, item.type);
1253
- if (illegal) {
1254
- var bits = getBits(item.type);
1255
- for (var i = 0; i < bits/32; i++) {
1256
- var v = item.assignTo + '$' + i;
1257
- ret += makeVarDef(v) + '=' + (i == 0 ? assignTo : 'tempRet' + (i-1)) + ';'
1258
- if (ASM_JS) addVariable(v, 'i32');
1259
- }
1260
- }
1261
- item.assignTo = null;
1262
- }
1263
- item.reloopingJS = ret; // everything but the actual branching (which the relooper will do for us)
1264
- item.toLabelJS = getPhiSetsForLabel(phiSets, item.toLabel);
1265
- item.unwindLabelJS = (ASM_JS ? '__THREW__ = 0;' : '') + getPhiSetsForLabel(phiSets, item.unwindLabel);
1266
- ret += 'if (!__THREW__) { ' + item.toLabelJS + makeBranch(item.toLabel, item.currLabelId)
1267
- + ' } else { ' + item.unwindLabelJS + makeBranch(item.unwindLabel, item.currLabelId) + ' }';
1268
- return ret;
1269
- }
1270
- function atomicHandler(item) {
1271
- var type = item.params[0].type;
1272
- var param1 = finalizeLLVMParameter(item.params[0]);
1273
- var param2 = finalizeLLVMParameter(item.params[1]);
1274
- switch (item.op) {
1275
- case 'add': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, asmCoercion('tempValue+' + param2, type), type, null, null, null, null, ',') + ',tempValue)';
1276
- case 'sub': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, asmCoercion('tempValue-' + param2, type), type, null, null, null, null, ',') + ',tempValue)';
1277
- case 'or': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, 'tempValue|' + param2, type, null, null, null, null, ',') + ',tempValue)';
1278
- case 'and': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, 'tempValue&' + param2, type, null, null, null, null, ',') + ',tempValue)';
1279
- case 'xor': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, 'tempValue^' + param2, type, null, null, null, null, ',') + ',tempValue)';
1280
- case 'xchg': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, param2, type, null, null, null, null, ',') + ',tempValue)';
1281
- case 'cmpxchg': {
1282
- var param3 = finalizeLLVMParameter(item.params[2]);
1283
- return '(tempValue=' + makeGetValue(param1, 0, type) + ',(' + makeGetValue(param1, 0, type) + '==(' + param2 + '|0) ? ' + asmCoercion(makeSetValue(param1, 0, param3, type, null, null, null, null, ','), 'i32') + ' : 0),tempValue)';
1284
- }
1285
- default: throw 'unhandled atomic op: ' + item.op;
1286
- }
1287
- }
1288
- function landingpadHandler(item) {
1289
- if (ASM_JS) {
1290
- addVariable(item.assignTo + '$0', 'i32');
1291
- addVariable(item.assignTo + '$1', 'i32');
1292
- }
1293
- if (DISABLE_EXCEPTION_CATCHING && !(item.funcData.ident in EXCEPTION_CATCHING_WHITELIST) && USE_TYPED_ARRAYS == 2) {
1294
- ret = makeVarDef(item.assignTo) + '$0 = 0; ' + makeVarDef(item.assignTo) + '$1 = 0;';
1295
- item.assignTo = null;
1296
- if (VERBOSE) warnOnce('landingpad, but exceptions are disabled!');
1297
- return ret;
1298
- }
1299
- var catchTypeArray = item.catchables.map(finalizeLLVMParameter).map(function(element) { return asmCoercion(element, 'i32') }).join(',');
1300
- var ret = asmCoercion('___cxa_find_matching_catch(-1, -1' + (catchTypeArray.length > 0 ? ',' + catchTypeArray : '') +')', 'i32');
1301
- if (USE_TYPED_ARRAYS == 2) {
1302
- ret = makeVarDef(item.assignTo) + '$0 = ' + ret + '; ' + makeVarDef(item.assignTo) + '$1 = tempRet0;';
1303
- item.assignTo = null;
1304
- }
1305
- return ret;
1306
- }
1307
- function loadHandler(item) {
1308
- var value = finalizeLLVMParameter(item.pointer);
1309
- if (item.valueType[item.valueType.length-1] === '>') {
1310
- // vector load
1311
- var native = getVectorNativeType(item.valueType);
1312
- var base = getSIMDName(native);
1313
- return base + '32x4(' + makeGetValue(value, 0, native, 0, item.unsigned, 0, item.align) + ',' +
1314
- makeGetValue(value, 4, native, 0, item.unsigned, 0, item.align) + ',' +
1315
- makeGetValue(value, 8, native, 0, item.unsigned, 0, item.align) + ',' +
1316
- makeGetValue(value, 12, native, 0, item.unsigned, 0, item.align) + ');';
1317
- }
1318
- var impl = item.ident ? getVarImpl(item.funcData, item.ident) : VAR_EMULATED;
1319
- switch (impl) {
1320
- case VAR_NATIVIZED: {
1321
- if (isNumber(item.ident)) {
1322
- // Direct read from a memory address; this may be an intentional segfault, if not, it is a bug in the source
1323
- if (ASM_JS) {
1324
- return asmFFICoercion('abort(' + item.ident + ')', item.type);
1325
- } else {
1326
- item.assignTo = null;
1327
- return 'throw "fault on read from ' + item.ident + '";';
1328
- }
1329
- }
1330
- return value; // We have the actual value here
1331
- }
1332
- case VAR_EMULATED: return makeGetValue(value, 0, item.type, 0, item.unsigned, 0, item.align);
1333
- default: throw "unknown [load] impl: " + impl;
1334
- }
1335
- }
1336
- function extractvalueHandler(item) {
1337
- assert(item.indexes.length == 1); // TODO: use getelementptr parsing stuff, for depth. For now, we assume that LLVM aggregates are flat,
1338
- // and we emulate them using simple JS objects { f1: , f2: , } etc., for speed
1339
- var index = item.indexes[0][0].text;
1340
- var valueType = Types.types[item.type].fields[index];
1341
- if (USE_TYPED_ARRAYS != 2 || valueType != 'i64') {
1342
- return item.ident + '.f' + index;
1343
- } else {
1344
- var assignTo = item.assignTo;
1345
- item.assignTo = null;
1346
- return 'var ' + assignTo + '$0 = ' + item.ident + '.f' + index + '[0];' +
1347
- 'var ' + assignTo + '$1 = ' + item.ident + '.f' + index + '[1];';
1348
- }
1349
- }
1350
- function insertvalueHandler(item) {
1351
- assert(item.indexes.length == 1); // TODO: see extractvalue
1352
- var ret = '(', ident;
1353
- if (item.ident === '0') {
1354
- item.ident = 'tempValue';
1355
- ret += item.ident + ' = [' + makeEmptyStruct(item.type) + '], ';
1356
- }
1357
- return ret + item.ident + '.f' + item.indexes[0][0].text + '=' + finalizeLLVMParameter(item.value) + ', ' + item.ident + ')';
1358
- }
1359
- function insertelementHandler(item) {
1360
- var base = getVectorBaseType(item.type);
1361
- var ident = ensureVector(item.ident, base);
1362
- var laneOp = ((base == 'float') ? 'SIMD.float32x4.with' : 'SIMD.int32x4.with');
1363
- //return ident + '.with' + SIMDLane[finalizeLLVMParameter(item.index)] + '(' + finalizeLLVMParameter(item.value) + ')';
1364
- return laneOp + SIMDLane[finalizeLLVMParameter(item.index)] + '(' + ident + ',' + finalizeLLVMParameter(item.value) + ')';
1365
- }
1366
- function extractelementHandler(item) {
1367
- var base = getVectorBaseType(item.type);
1368
- var ident = ensureVector(item.ident, base);
1369
- var index = finalizeLLVMParameter(item.value);
1370
- assert(isNumber(index));
1371
- return ident + '.' + simdLane[index];
1372
- }
1373
- function shufflevectorHandler(item) {
1374
- var base = getVectorBaseType(item.type);
1375
- var first = ensureVector(item.ident, base);
1376
- var second = ensureVector(finalizeLLVMParameter(item.value), base);
1377
- var mask;
1378
- if (item.mask.intertype === 'value') {
1379
- assert(item.mask.ident === 'zeroinitializer');
1380
- mask = [0, 0, 0, 0];
1381
- } else {
1382
- assert(item.mask.intertype === 'vector');
1383
- mask = item.mask.idents;
1384
- }
1385
- for (var i = 0; i < 4; i++) assert(mask[0] == 0 || mask == 1);
1386
- i = 0;
1387
- return base + '32x4(' + mask.map(function(m) {
1388
- return (m == 1 ? second : first) + '.' + simdLane[i++];
1389
- }).join(',') + ')';
1390
- }
1391
- function indirectbrHandler(item) {
1392
- var phiSets = calcPhiSets(item);
1393
- var js = makeVarDef('ibr') + '=' + finalizeLLVMParameter(item.value) + ';';
1394
- if (ASM_JS) addVariable('ibr', 'i32');
1395
- for (var targetLabel in phiSets) {
1396
- js += 'if(' + makeComparison('ibr', '==', targetLabel, 'i32') + '){' + getPhiSetsForLabel(phiSets, targetLabel) + '}';
1397
- }
1398
- return js + makeBranch('ibr', item.currLabelId, true);
1399
- }
1400
- function allocaHandler(item) {
1401
- if (typeof item.allocatedIndex === 'number') {
1402
- if (item.allocatedSize === 0) return ''; // This will not actually be shown - it's nativized
1403
- return asmCoercion(getFastValue('sp', '+', item.allocatedIndex.toString()), 'i32');
1404
- } else {
1405
- return RuntimeGenerator.stackAlloc(getFastValue(calcAllocatedSize(item.allocatedType), '*', item.ident));
1406
- }
1407
- }
1408
- function va_argHandler(item) {
1409
- assert(TARGET_LE32);
1410
- var ident = item.value.ident;
1411
- var move = Runtime.STACK_ALIGN;
1412
-
1413
- // store current list offset in tempInt, advance list offset by STACK_ALIGN, return list entry stored at tempInt
1414
- return '(tempInt=' + makeGetValue(ident, Runtime.QUANTUM_SIZE, '*') + ',' +
1415
- makeSetValue(ident, Runtime.QUANTUM_SIZE, 'tempInt + ' + move, '*', null, null, null, null, ',') + ',' +
1416
- makeGetValue(makeGetValue(ident, 0, '*'), 'tempInt', item.type) + ')';
1417
- }
1418
-
1419
- var mathopHandler = processMathop;
1420
-
1421
- function bitcastHandler(item) {
1422
- var temp = {
1423
- op: 'bitcast', variant: null, type: item.type,
1424
- assignTo: item.assignTo,
1425
- params: [item.params[0]] // XXX
1426
- };
1427
- var ret = processMathop(temp);
1428
- if (!temp.assignTo) item.assignTo = null; // If the assign was stolen, propagate that
1429
- return ret;
1430
- }
1431
-
1432
- function makeFunctionCall(item, params, funcData, type, forceByPointer, hasReturn, invoke) {
1433
- var ident = item.ident;
1434
-
1435
- // We cannot compile assembly. See comment in intertyper.js:'Call'
1436
- assert(ident != 'asm', 'Inline assembly cannot be compiled to JavaScript!');
1437
-
1438
- var extCall = false;
1439
-
1440
- if (ASM_JS && funcData.setjmpTable) forceByPointer = true; // in asm.js mode, we must do an invoke for each call
1441
- if (ASM_JS && DLOPEN_SUPPORT && !invoke && !funcData.setjmpTable) extCall = true; // go out, to be able to access other modules TODO: optimize
1442
-
1443
- ident = Variables.resolveAliasToIdent(ident);
1444
- var shortident = ident.slice(1);
1445
- var simpleIdent = shortident;
1446
- if (isLocalVar(ident)) {
1447
- var callIdent = ident;
1448
- } else {
1449
- // Not a local var, check if in library
1450
- var callIdent = LibraryManager.getRootIdent(simpleIdent);
1451
- if (callIdent) {
1452
- simpleIdent = callIdent; // ident may not be in library, if all there is is ident__inline, but in this case it is
1453
- if (callIdent.indexOf('Math_') !== 0) {
1454
- callIdent = '_' + callIdent; // Not Math.*, so add the normal prefix
1455
- }
1456
- } else {
1457
- callIdent = ident;
1458
- }
1459
- if (callIdent == '0') return 'abort(-2)';
1460
- }
1461
-
1462
- var args = [];
1463
- var argsTypes = [];
1464
- var varargs = [];
1465
- var varargsTypes = [];
1466
- var varargsByVals = {};
1467
- var ignoreFunctionIndexizing = [];
1468
- var useJSArgs = (simpleIdent + '__jsargs') in LibraryManager.library;
1469
- var hasVarArgs = isVarArgsFunctionType(type);
1470
- var normalArgs = (hasVarArgs && !useJSArgs) ? countNormalArgs(type, null, true) : -1;
1471
- var byPointer = getVarData(funcData, ident);
1472
- var byPointerForced = false;
1473
-
1474
- if (forceByPointer && !byPointer) {
1475
- byPointer = byPointerForced = true;
1476
- }
1477
-
1478
- params.forEach(function(param, i) {
1479
- var val = finalizeLLVMParameter(param);
1480
- if (!hasVarArgs || useJSArgs || i < normalArgs) {
1481
- args.push(val);
1482
- argsTypes.push(param.type);
1483
- } else {
1484
- var size;
1485
- if (param.byVal) {
1486
- varargsByVals[varargs.length] = param.byVal;
1487
- size = calcAllocatedSize(removeAllPointing(param.type));
1488
- } else {
1489
- size = Runtime.getNativeFieldSize(param.type);
1490
- }
1491
- size = Runtime.alignMemory(size, Runtime.STACK_ALIGN);
1492
- varargs.push(val);
1493
- varargs = varargs.concat(zeros(size-1));
1494
- // TODO: replace concats like this with push
1495
- varargsTypes.push(param.type);
1496
- varargsTypes = varargsTypes.concat(zeros(size-1));
1497
- }
1498
- });
1499
-
1500
- args = args.map(function(arg, i) { return indexizeFunctions(arg, argsTypes[i]) });
1501
- if (ASM_JS) {
1502
- var ffiCall = (shortident in Functions.libraryFunctions || simpleIdent in Functions.libraryFunctions || byPointerForced || invoke || extCall || funcData.setjmpTable) &&
1503
- !(simpleIdent in JS_MATH_BUILTINS);
1504
- if (ffiCall) {
1505
- args = args.map(function(arg, i) { return asmCoercion(arg, ensureValidFFIType(argsTypes[i])) });
1506
- } else {
1507
- args = args.map(function(arg, i) { return asmEnsureFloat(arg, argsTypes[i]) });
1508
- }
1509
- }
1510
-
1511
- varargs = varargs.map(function(vararg, i) {
1512
- if (ignoreFunctionIndexizing.indexOf(i) >= 0) return vararg;
1513
- return vararg === 0 ? 0 : indexizeFunctions(vararg, varargsTypes[i])
1514
- });
1515
-
1516
- if (hasVarArgs && !useJSArgs) {
1517
- funcData.hasVarArgsCall = true;
1518
- if (varargs.length === 0) {
1519
- varargs = [0];
1520
- varargsTypes = ['i32'];
1521
- }
1522
- var offset = 0;
1523
- varargs = '(tempVarArgs=' + RuntimeGenerator.stackAlloc(varargs.length, ',') + ',' +
1524
- varargs.map(function(arg, i) {
1525
- var type = varargsTypes[i];
1526
- if (type == 0) return null;
1527
- arg = asmEnsureFloat(arg, type);
1528
- var ret;
1529
- assert(offset % Runtime.STACK_ALIGN == 0); // varargs must be aligned
1530
- if (!varargsByVals[i]) {
1531
- ret = makeSetValue(getFastValue('tempVarArgs', '+', offset), 0, arg, type, null, null, Runtime.STACK_ALIGN, null, ',');
1532
- offset += Runtime.alignMemory(Runtime.getNativeFieldSize(type), Runtime.STACK_ALIGN);
1533
- } else {
1534
- var size = calcAllocatedSize(removeAllPointing(type));
1535
- ret = makeCopyValues(getFastValue('tempVarArgs', '+', offset), arg, size, null, null, varargsByVals[i], ',');
1536
- offset += Runtime.forceAlign(size, Runtime.STACK_ALIGN);
1537
- }
1538
- return ret;
1539
- }).filter(function(arg) {
1540
- return arg !== null;
1541
- }).join(',') + ',tempVarArgs)';
1542
- varargs = asmCoercion(varargs, 'i32');
1543
- }
1544
-
1545
- args = args.concat(varargs);
1546
-
1547
- // Inline if either we inline whenever we can (and we can), or if there is no noninlined version
1548
- var inline = LibraryManager.library[simpleIdent + '__inline'];
1549
- var nonInlined = simpleIdent in LibraryManager.library;
1550
- if (inline && (INLINE_LIBRARY_FUNCS || !nonInlined)) {
1551
- return inline.apply(null, args); // Warning: inlining does not prevent recalculation of the arguments. They should be simple identifiers
1552
- }
1553
-
1554
- if (ASM_JS && ident.indexOf('llvm_') >= 0) {
1555
- // remove unneeded arguments in llvm intrinsic functions, which the asm sig can show us. this lets us alias memset with llvm.memset, we just
1556
- // drop the final 2 args so things validate properly in asm
1557
- var libsig = LibraryManager.library[simpleIdent + '__sig'];
1558
- if (libsig) {
1559
- assert(!hasVarArgs);
1560
- while (libsig.length - 1 < args.length) {
1561
- args.pop();
1562
- argsTypes.pop();
1563
- }
1564
- }
1565
- }
1566
-
1567
- if (callIdent in Functions.implementedFunctions) {
1568
- // LLVM sometimes bitcasts for no reason. We must call using the exact same type as the actual function is generated as.
1569
- var numArgs = Functions.implementedFunctions[callIdent].length - 1;
1570
- if (numArgs !== args.length) {
1571
- if (VERBOSE) warnOnce('Fixing function call arguments based on signature, on ' + [callIdent, args.length, numArgs]);
1572
- while (args.length > numArgs) { args.pop(); argsTypes.pop() }
1573
- while (args.length < numArgs) { args.push('0'); argsTypes.push('i32') }
1574
- }
1575
- }
1576
-
1577
- var returnType = 'void';
1578
- if ((byPointer || ASM_JS) && hasReturn) {
1579
- returnType = getReturnType(type);
1580
- if (callIdent in Functions.implementedFunctions) {
1581
- // LLVM sometimes bitcasts for no reason. We must call using the exact same type as the actual function is generated as
1582
- var trueType = Functions.getSignatureType(Functions.implementedFunctions[callIdent][0]);
1583
- if (trueType !== returnType && !isIdenticallyImplemented(trueType, returnType)) {
1584
- if (VERBOSE) warnOnce('Fixing function call based on return type from signature, on ' + [callIdent, returnType, trueType]);
1585
- returnType = trueType;
1586
- if (trueType === 'void') {
1587
- item.assignTo = null;
1588
- }
1589
- }
1590
- }
1591
- }
1592
-
1593
- // we alias llvm memset and such to normal memset. The target has a return value, while the original
1594
- // does not, so we need to fix that for the actual call target
1595
- if (ASM_JS) {
1596
- var sig = LibraryManager.library[simpleIdent + '__sig'];
1597
- if (sig && sig[0] !== 'v') {
1598
- returnType = Functions.getSignatureType(sig[0]);
1599
- }
1600
- }
1601
-
1602
- if (byPointer) {
1603
- var sig = Functions.getSignature(returnType, argsTypes, hasVarArgs);
1604
- if (ASM_JS) {
1605
- assert(returnType.search(/\("'\[,/) == -1); // XXX need isFunctionType(type, out)
1606
- Functions.neededTables[sig] = 1;
1607
- var functionTableCall = !byPointerForced && !funcData.setjmpTable && !invoke && !extCall;
1608
- if (functionTableCall) {
1609
- // normal asm function pointer call
1610
- callIdent = '(' + callIdent + ')&{{{ FTM_' + sig + ' }}}'; // the function table mask is set in emscripten.py
1611
- } else {
1612
- // This is a call through an invoke_* or extCall, either a forced one, or a setjmp-required one
1613
- // note: no need to update argsTypes at this point
1614
- if (byPointerForced) Functions.unimplementedFunctions[callIdent] = sig;
1615
- args.unshift(byPointerForced ? Functions.getIndex(callIdent, sig) : asmCoercion(callIdent, 'i32'));
1616
- callIdent = (extCall ? 'extCall' : 'invoke') + '_' + sig;
1617
- }
1618
- } else if (SAFE_DYNCALLS) {
1619
- assert(!ASM_JS, 'cannot emit safe dyncalls in asm');
1620
- callIdent = '(tempInt=' + callIdent + ',tempInt < 0 || tempInt >= FUNCTION_TABLE.length-1 || !FUNCTION_TABLE[tempInt] ? abort("dyncall error: ' + sig + ' " + FUNCTION_TABLE_NAMES[tempInt]) : tempInt)';
1621
- }
1622
- if (!ASM_JS || functionTableCall) callIdent = Functions.getTable(sig) + '[' + callIdent + ']';
1623
- }
1624
-
1625
- var ret = callIdent + '(' + args.join(',') + ')';
1626
- if (ASM_JS) { // TODO: do only when needed (library functions and Math.*?) XXX && simpleIdent in Functions.libraryFunctions) {
1627
- if (ffiCall) {
1628
- ret = asmFFICoercion(ret, returnType);
1629
- } else {
1630
- ret = asmCoercion(ret, returnType);
1631
- }
1632
- if (simpleIdent == 'abort' && funcData.returnType != 'void') {
1633
- ret += '; return ' + asmCoercion('0', funcData.returnType); // special case: abort() can happen without return, breaking the return type of asm functions. ensure a return
1634
- }
1635
- }
1636
-
1637
- if (ASM_JS && funcData.setjmpTable) {
1638
- // check if a longjmp was done. If a setjmp happened, check if ours. If ours, go to a special label to handle it.
1639
- // otherwise, just return - the call to us must also have been an invoke, so the setjmp propagates that way
1640
- ret += '; if (((__THREW__|0) != 0) & ((threwValue|0) != 0)) { setjmpLabel = ' + asmCoercion('_testSetjmp(' + makeGetValue('__THREW__', 0, 'i32') + ', setjmpTable)', 'i32') + '; if ((setjmpLabel|0) > 0) { label = ' + SETJMP_LABEL + '; break } else return ' + (funcData.returnType != 'void' ? asmCoercion('0', funcData.returnType) : '') + ' } __THREW__ = threwValue = 0;';
1641
- }
1642
-
1643
- return ret;
1644
- }
1645
-
1646
- function makeVarArgsCleanup(js) {
1647
- if (js.indexOf('(tempVarArgs=') >= 0) {
1648
- if (js[js.length-1] == ';') {
1649
- return js + ' STACKTOP=tempVarArgs;';
1650
- } else {
1651
- assert(js.indexOf(';') < 0);
1652
- return '((' + js + '), STACKTOP=tempVarArgs)';
1653
- }
1654
- }
1655
- return js;
1656
- }
1657
-
1658
- function getelementptrHandler(item) { return finalizeLLVMFunctionCall(item) }
1659
- function callHandler(item) {
1660
- if (item.standalone && LibraryManager.isStubFunction(item.ident)) return ';';
1661
- var ret = makeFunctionCall(item, item.params, item.funcData, item.type, false, !!item.assignTo || !item.standalone) + (item.standalone ? ';' : '');
1662
- return makeVarArgsCleanup(ret);
1663
- }
1664
-
1665
- function unreachableHandler(item) {
1666
- var ret = '';
1667
- if (ASM_JS && item.funcData.returnType != 'void') ret = 'return ' + asmCoercion('0', item.funcData.returnType) + ';';
1668
- if (ASSERTIONS) {
1669
- ret = (ASM_JS ? 'abort()' : 'throw "Reached an unreachable!"') + ';' + ret;
1670
- }
1671
- return ret || ';';
1672
- }
1673
-
1674
- // Final combiner
1675
-
1676
- function finalCombiner() {
1677
- dprint('unparsedFunctions', 'Starting finalCombiner');
1678
-
1679
- var splitPostSets = splitter(itemsDict.GlobalVariablePostSet, function(x) { return x.ident && x.dependencies });
1680
- itemsDict.GlobalVariablePostSet = splitPostSets.leftIn;
1681
- var orderedPostSets = splitPostSets.splitOut;
1682
-
1683
- var limit = orderedPostSets.length * orderedPostSets.length;
1684
- for (var i = 0; i < orderedPostSets.length; i++) {
1685
- for (var j = i+1; j < orderedPostSets.length; j++) {
1686
- if (orderedPostSets[j].ident in orderedPostSets[i].dependencies) {
1687
- var temp = orderedPostSets[i];
1688
- orderedPostSets[i] = orderedPostSets[j];
1689
- orderedPostSets[j] = temp;
1690
- i--;
1691
- limit--;
1692
- assert(limit > 0, 'Could not sort postsets!');
1693
- break;
1694
- }
1695
- }
1696
- }
1697
-
1698
- itemsDict.GlobalVariablePostSet = itemsDict.GlobalVariablePostSet.concat(orderedPostSets);
1699
-
1700
- //
1701
-
1702
- if (!mainPass) {
1703
- if ((phase == 'pre' || phase == 'glue') && !Variables.generatedGlobalBase && !BUILD_AS_SHARED_LIB) {
1704
- Variables.generatedGlobalBase = true;
1705
- // Globals are done, here is the rest of static memory
1706
- assert((TARGET_LE32 && Runtime.GLOBAL_BASE == 8) || (TARGET_X86 && Runtime.GLOBAL_BASE == 4)); // this is assumed in e.g. relocations for linkable modules
1707
- if (!SIDE_MODULE) {
1708
- print('STATIC_BASE = ' + Runtime.GLOBAL_BASE + ';\n');
1709
- print('STATICTOP = STATIC_BASE + ' + Runtime.alignMemory(Variables.nextIndexedOffset) + ';\n');
1710
- } else {
1711
- print('H_BASE = parentModule["_malloc"](' + Runtime.alignMemory(Variables.nextIndexedOffset) + ' + Runtime.GLOBAL_BASE);\n');
1712
- print('// STATICTOP = STATIC_BASE + ' + Runtime.alignMemory(Variables.nextIndexedOffset) + ';\n'); // comment as metadata only
1713
- }
1714
- }
1715
- var generated = itemsDict.function.concat(itemsDict.type).concat(itemsDict.GlobalVariableStub).concat(itemsDict.GlobalVariable);
1716
- print(generated.map(function(item) { return item.JS; }).join('\n'));
1717
-
1718
- if (phase == 'pre' || phase == 'glue') {
1719
- if (memoryInitialization.length > 0) {
1720
- // apply postsets directly into the big memory initialization
1721
- itemsDict.GlobalVariablePostSet = itemsDict.GlobalVariablePostSet.filter(function(item) {
1722
- var m;
1723
- if (m = /^HEAP([\dFU]+)\[([()>\d]+)\] *= *([()|\d{}\w_' ]+);?$/.exec(item.JS)) {
1724
- var type = getTypeFromHeap(m[1]);
1725
- var bytes = Runtime.getNativeTypeSize(type);
1726
- var target = eval(m[2]) << log2(bytes);
1727
- var value = m[3];
1728
- try {
1729
- value = eval(value);
1730
- } catch(e) {
1731
- // possibly function table {{{ FT_* }}} etc.
1732
- if (value.indexOf('{{ ') < 0) return true;
1733
- }
1734
- writeInt8s(memoryInitialization, target - Runtime.GLOBAL_BASE, value, type);
1735
- return false;
1736
- }
1737
- return true;
1738
- });
1739
- // write out the singleton big memory initialization value
1740
- print('/* memory initializer */ ' + makePointer(memoryInitialization, null, 'ALLOC_NONE', 'i8', 'Runtime.GLOBAL_BASE' + (SIDE_MODULE ? '+H_BASE' : ''), true));
1741
- } else if (phase !== 'glue') {
1742
- print('/* no memory initializer */'); // test purposes
1743
- }
1744
-
1745
- if (phase !== 'glue') {
1746
- // Define postsets. These will be run in ATINIT, right before global initializers (which might need the postsets). We cannot
1747
- // run them now because the memory initializer might not have been applied yet.
1748
- print('function runPostSets() {\n');
1749
- print(itemsDict.GlobalVariablePostSet.map(function(item) { return item.JS }).join('\n'));
1750
- print('}\n');
1751
- }
1752
-
1753
- if (USE_TYPED_ARRAYS == 2) {
1754
- if (!BUILD_AS_SHARED_LIB && !SIDE_MODULE) {
1755
- print('var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8);\n');
1756
- print('assert(tempDoublePtr % 8 == 0);\n');
1757
- print('function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much\n');
1758
- print(' HEAP8[tempDoublePtr] = HEAP8[ptr];\n');
1759
- print(' HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];\n');
1760
- print(' HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];\n');
1761
- print(' HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];\n');
1762
- print('}\n');
1763
- print('function copyTempDouble(ptr) {\n');
1764
- print(' HEAP8[tempDoublePtr] = HEAP8[ptr];\n');
1765
- print(' HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];\n');
1766
- print(' HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];\n');
1767
- print(' HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];\n');
1768
- print(' HEAP8[tempDoublePtr+4] = HEAP8[ptr+4];\n');
1769
- print(' HEAP8[tempDoublePtr+5] = HEAP8[ptr+5];\n');
1770
- print(' HEAP8[tempDoublePtr+6] = HEAP8[ptr+6];\n');
1771
- print(' HEAP8[tempDoublePtr+7] = HEAP8[ptr+7];\n');
1772
- print('}\n');
1773
- }
1774
- }
1775
- }
1776
-
1777
- return;
1778
- }
1779
-
1780
- // Print out global variables and postsets TODO: batching
1781
- if (phase == 'pre' || phase == 'glue') {
1782
- var legalizedI64sDefault = legalizedI64s;
1783
- legalizedI64s = false;
1784
-
1785
- var globalsData = analyzer(intertyper(data.unparsedGlobalss[0].lines, true), true);
1786
-
1787
- if (!NAMED_GLOBALS) {
1788
- sortGlobals(globalsData.globalVariables).forEach(function(g) {
1789
- var ident = g.ident;
1790
- if (!isIndexableGlobal(ident)) return;
1791
- assert(Variables.nextIndexedOffset % Runtime.STACK_ALIGN == 0);
1792
- Variables.indexedGlobals[ident] = Variables.nextIndexedOffset;
1793
- Variables.nextIndexedOffset += Runtime.alignMemory(calcAllocatedSize(Variables.globals[ident].type));
1794
- if (ident.substr(0, 5) == '__ZTV') { // leave room for null-terminating the vtable
1795
- Variables.nextIndexedOffset += Runtime.alignMemory(QUANTUM_SIZE);
1796
- }
1797
- });
1798
- }
1799
- JSify(globalsData, true);
1800
- globalsData = null;
1801
- data.unparsedGlobalss = null;
1802
-
1803
- var generated = itemsDict.functionStub.concat(itemsDict.GlobalVariablePostSet);
1804
- generated.forEach(function(item) { print(indentify(item.JS || '', 2)); });
1805
-
1806
- legalizedI64s = legalizedI64sDefault;
1807
-
1808
- if (!BUILD_AS_SHARED_LIB && !SIDE_MODULE) {
1809
- print('STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP);\n');
1810
- print('staticSealed = true; // seal the static portion of memory\n');
1811
- print('STACK_MAX = STACK_BASE + ' + TOTAL_STACK + ';\n');
1812
- print('DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX);\n');
1813
- print('assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack");\n');
1814
- }
1815
-
1816
- if (asmLibraryFunctions.length > 0) {
1817
- print('// ASM_LIBRARY FUNCTIONS');
1818
- function fix(f) { // fix indenting to not confuse js optimizer
1819
- f = f.substr(f.indexOf('f')); // remove initial spaces before 'function'
1820
- f = f.substr(0, f.lastIndexOf('\n')+1); // remove spaces and last } XXX assumes function has multiple lines
1821
- return f + '}'; // add unindented } to match function
1822
- }
1823
- print(asmLibraryFunctions.map(fix).join('\n'));
1824
- }
1825
-
1826
- } else {
1827
- if (singlePhase) {
1828
- assert(data.unparsedGlobalss[0].lines.length == 0, dump([phase, data.unparsedGlobalss]));
1829
- assert(itemsDict.functionStub.length == 0, dump([phase, itemsDict.functionStub]));
1830
- }
1831
- }
1832
-
1833
- if (abortExecution) throw 'Aborting compilation due to previous errors';
1834
-
1835
- if (phase == 'pre' || phase == 'funcs') {
1836
- PassManager.serialize();
1837
- return;
1838
- }
1839
-
1840
- // This is the main 'post' pass. Print out the generated code that we have here, together with the
1841
- // rest of the output that we started to print out earlier (see comment on the
1842
- // "Final shape that will be created").
1843
- if (PRECISE_I64_MATH && Types.preciseI64MathUsed) {
1844
- if (!INCLUDE_FULL_LIBRARY) {
1845
- // first row are utilities called from generated code, second are needed from fastLong
1846
- ['i64Add', 'i64Subtract', 'bitshift64Shl', 'bitshift64Lshr', 'bitshift64Ashr',
1847
- 'llvm_ctlz_i32', 'llvm_cttz_i32'].forEach(function(func) {
1848
- if (!Functions.libraryFunctions[func] || (phase == 'glue' && func[0] === 'l' && !addedLibraryItems[func])) { // TODO: one-by-one in fastcomp glue mode
1849
- print(processLibraryFunction(LibraryManager.library[func], func)); // must be first to be close to generated code
1850
- Functions.implementedFunctions['_' + func] = LibraryManager.library[func + '__sig'];
1851
- Functions.libraryFunctions[func] = phase == 'glue' ? 2 : 1; // XXX
1852
- // limited dependency handling
1853
- var deps = LibraryManager.library[func + '__deps'];
1854
- if (deps) {
1855
- deps.forEach(function(dep) {
1856
- assert(typeof dep == 'function');
1857
- var text = dep();
1858
- assert(text.indexOf('\n') < 0);
1859
- text = text.replace('ALLOC_STATIC', 'ALLOC_DYNAMIC');
1860
- print('/* PRE_ASM */ ' + text + '\n');
1861
- });
1862
- }
1863
- }
1864
- });
1865
- }
1866
- print(read('fastLong.js'));
1867
- print('// EMSCRIPTEN_END_FUNCS\n');
1868
- print(read('long.js'));
1869
- } else {
1870
- print('// EMSCRIPTEN_END_FUNCS\n');
1871
- print('// Warning: printing of i64 values may be slightly rounded! No deep i64 math used, so precise i64 code not included');
1872
- print('var i64Math = null;');
1873
- }
1874
- if (Types.usesSIMD || SIMD) {
1875
- print(read('simd.js'));
1876
- }
1877
-
1878
- if (CORRUPTION_CHECK) {
1879
- assert(!ASM_JS, 'corruption checker is not compatible with asm.js');
1880
- print(processMacros(read('corruptionCheck.js')));
1881
- }
1882
- if (HEADLESS) {
1883
- print('if (!ENVIRONMENT_IS_WEB) {');
1884
- print(read('headlessCanvas.js'));
1885
- print('\n');
1886
- print(read('headless.js').replace("'%s'", "'http://emscripten.org'").replace("'?%s'", "''").replace("'?%s'", "'/'").replace('%s,', 'null,').replace('%d', '0'));
1887
- print('}');
1888
- }
1889
- if (PROXY_TO_WORKER) {
1890
- print(read('proxyWorker.js'));
1891
- }
1892
- if (RUNTIME_TYPE_INFO) {
1893
- Types.cleanForRuntime();
1894
- print('Runtime.typeInfo = ' + JSON.stringify(Types.types));
1895
- print('Runtime.structMetadata = ' + JSON.stringify(Types.structMetadata));
1896
- }
1897
- var postFile = BUILD_AS_SHARED_LIB || SIDE_MODULE ? 'postamble_sharedlib.js' : 'postamble.js';
1898
- var postParts = processMacros(preprocess(read(postFile))).split('{{GLOBAL_VARS}}');
1899
- print(postParts[0]);
1900
-
1901
- Functions.generateIndexing(); // done last, as it may rely on aliases set in postsets
1902
-
1903
- // Load runtime-linked libraries
1904
- RUNTIME_LINKED_LIBS.forEach(function(lib) {
1905
- print('eval(Module["read"]("' + lib + '"))(' + Functions.getTable('x') + '.length, this);');
1906
- });
1907
-
1908
- print(postParts[1]);
1909
-
1910
- var shellParts = read(shellFile).split('{{BODY}}');
1911
- print(processMacros(preprocess(shellParts[1])));
1912
- // Print out some useful metadata
1913
- if (RUNNING_JS_OPTS || PGO) {
1914
- var generatedFunctions = JSON.stringify(keys(Functions.implementedFunctions).filter(function(func) {
1915
- return IGNORED_FUNCTIONS.indexOf(func.ident) < 0;
1916
- }));
1917
- if (PGO) {
1918
- print('PGOMonitor.allGenerated = ' + generatedFunctions + ';\nremoveRunDependency("pgo");\n');
1919
- }
1920
- if (RUNNING_JS_OPTS) {
1921
- print('// EMSCRIPTEN_GENERATED_FUNCTIONS: ' + generatedFunctions + '\n');
1922
- }
1923
- }
1924
-
1925
- PassManager.serialize();
1926
- }
1927
-
1928
- // Data
1929
-
1930
- if (mainPass) {
1931
- if (phase == 'pre') {
1932
- // types have been parsed, so we can figure out function signatures (which can use types)
1933
- data.unparsedFunctions.forEach(function(func) {
1934
- Functions.implementedFunctions[func.ident] = Functions.getSignature(func.returnType, func.params.map(function(param) { return param.type }));
1935
- });
1936
- }
1937
- data.functionStubs.forEach(functionStubHandler);
1938
- assert(data.functions.length == 0);
1939
- } else {
1940
- if (phase == 'pre') {
1941
- // ensure there is a global ctors, for runPostSets
1942
- if ('_llvm_global_ctors' in data.globalVariables) {
1943
- data.globalVariables._llvm_global_ctors.ctors.unshift('runPostSets'); // run postsets right before global initializers
1944
- hasCtors = true;
1945
- } else {
1946
- globalVariableHandler({
1947
- intertype: 'GlobalVariableStub',
1948
- ident: '_llvm_global_ctors',
1949
- type: '[1 x { i32, void ()* }]',
1950
- ctors: ["runPostSets"],
1951
- });
1952
- }
1953
- }
1954
-
1955
- //B.start('jsifier-handle-gv');
1956
- sortGlobals(data.globalVariables).forEach(globalVariableHandler);
1957
- //B.stop('jsifier-handle-gv');
1958
- data.aliass.forEach(aliasHandler);
1959
- data.functions.forEach(functionSplitter);
1960
- }
1961
-
1962
- //B.start('jsifier-fc');
1963
- finalCombiner();
1964
- //B.stop('jsifier-fc');
1965
-
1966
- dprint('framework', 'Big picture: Finishing JSifier, main pass=' + mainPass);
1967
- //B.stop('jsifier');
1968
- }
1969
-