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,4226 +0,0 @@
1
- #include <string.h>
2
- #include <stdlib.h>
3
- #define IN_LIBGCC2
4
-
5
- /* Demangler for g++ V3 ABI.
6
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
7
- Written by Ian Lance Taylor <ian@wasabisystems.com>.
8
-
9
- This file is part of the libiberty library, which is part of GCC.
10
-
11
- This file is free software; you can redistribute it and/or modify
12
- it under the terms of the GNU General Public License as published by
13
- the Free Software Foundation; either version 2 of the License, or
14
- (at your option) any later version.
15
-
16
- In addition to the permissions in the GNU General Public License, the
17
- Free Software Foundation gives you unlimited permission to link the
18
- compiled version of this file into combinations with other programs,
19
- and to distribute those combinations without any restriction coming
20
- from the use of this file. (The General Public License restrictions
21
- do apply in other respects; for example, they cover modification of
22
- the file, and distribution when not linked into a combined
23
- executable.)
24
-
25
- This program is distributed in the hope that it will be useful,
26
- but WITHOUT ANY WARRANTY; without even the implied warranty of
27
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
- GNU General Public License for more details.
29
-
30
- You should have received a copy of the GNU General Public License
31
- along with this program; if not, write to the Free Software
32
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
33
- */
34
-
35
- /* This code implements a demangler for the g++ V3 ABI. The ABI is
36
- described on this web page:
37
- http://www.codesourcery.com/cxx-abi/abi.html#mangling
38
-
39
- This code was written while looking at the demangler written by
40
- Alex Samuel <samuel@codesourcery.com>.
41
-
42
- This code first pulls the mangled name apart into a list of
43
- components, and then walks the list generating the demangled
44
- name.
45
-
46
- This file will normally define the following functions, q.v.:
47
- char *cplus_demangle_v3(const char *mangled, int options)
48
- char *java_demangle_v3(const char *mangled)
49
- enum gnu_v3_ctor_kinds is_gnu_v3_mangled_ctor (const char *name)
50
- enum gnu_v3_dtor_kinds is_gnu_v3_mangled_dtor (const char *name)
51
-
52
- Also, the interface to the component list is public, and defined in
53
- demangle.h. The interface consists of these types, which are
54
- defined in demangle.h:
55
- enum demangle_component_type
56
- struct demangle_component
57
- and these functions defined in this file:
58
- cplus_demangle_fill_name
59
- cplus_demangle_fill_extended_operator
60
- cplus_demangle_fill_ctor
61
- cplus_demangle_fill_dtor
62
- cplus_demangle_print
63
- and other functions defined in the file cp-demint.c.
64
-
65
- This file also defines some other functions and variables which are
66
- only to be used by the file cp-demint.c.
67
-
68
- Preprocessor macros you can define while compiling this file:
69
-
70
- IN_LIBGCC2
71
- If defined, this file defines the following function, q.v.:
72
- char *__cxa_demangle (const char *mangled, char *buf, size_t *len,
73
- int *status)
74
- instead of cplus_demangle_v3() and java_demangle_v3().
75
-
76
- IN_GLIBCPP_V3
77
- If defined, this file defines only __cxa_demangle(), and no other
78
- publically visible functions or variables.
79
-
80
- STANDALONE_DEMANGLER
81
- If defined, this file defines a main() function which demangles
82
- any arguments, or, if none, demangles stdin.
83
-
84
- CP_DEMANGLE_DEBUG
85
- If defined, turns on debugging mode, which prints information on
86
- stdout about the mangled string. This is not generally useful.
87
- */
88
-
89
- #ifdef HAVE_CONFIG_H
90
- #include "config.h"
91
- #endif
92
-
93
- #include <stdio.h>
94
-
95
- #ifdef HAVE_STDLIB_H
96
- #include <stdlib.h>
97
- #endif
98
- #ifdef HAVE_STRING_H
99
- #include <string.h>
100
- #endif
101
-
102
- #include "ansidecl.h"
103
- #include "libiberty.h"
104
- #include "demangle.h"
105
- #include "cp-demangle.h"
106
-
107
- /* If IN_GLIBCPP_V3 is defined, some functions are made static. We
108
- also rename them via #define to avoid compiler errors when the
109
- static definition conflicts with the extern declaration in a header
110
- file. */
111
- #ifdef IN_GLIBCPP_V3
112
-
113
- #define CP_STATIC_IF_GLIBCPP_V3 static
114
-
115
- #define cplus_demangle_fill_name d_fill_name
116
- static int d_fill_name (struct demangle_component *, const char *, int);
117
-
118
- #define cplus_demangle_fill_extended_operator d_fill_extended_operator
119
- static int
120
- d_fill_extended_operator (struct demangle_component *, int,
121
- struct demangle_component *);
122
-
123
- #define cplus_demangle_fill_ctor d_fill_ctor
124
- static int
125
- d_fill_ctor (struct demangle_component *, enum gnu_v3_ctor_kinds,
126
- struct demangle_component *);
127
-
128
- #define cplus_demangle_fill_dtor d_fill_dtor
129
- static int
130
- d_fill_dtor (struct demangle_component *, enum gnu_v3_dtor_kinds,
131
- struct demangle_component *);
132
-
133
- #define cplus_demangle_mangled_name d_mangled_name
134
- static struct demangle_component *d_mangled_name (struct d_info *, int);
135
-
136
- #define cplus_demangle_type d_type
137
- static struct demangle_component *d_type (struct d_info *);
138
-
139
- #define cplus_demangle_print d_print
140
- static char *d_print (int, const struct demangle_component *, int, size_t *);
141
-
142
- #define cplus_demangle_init_info d_init_info
143
- static void d_init_info (const char *, int, size_t, struct d_info *);
144
-
145
- #else /* ! defined(IN_GLIBCPP_V3) */
146
- #define CP_STATIC_IF_GLIBCPP_V3
147
- #endif /* ! defined(IN_GLIBCPP_V3) */
148
-
149
- /* See if the compiler supports dynamic arrays. */
150
-
151
- #ifdef __GNUC__
152
- #define CP_DYNAMIC_ARRAYS
153
- #else
154
- #ifdef __STDC__
155
- #ifdef __STDC_VERSION__
156
- #if __STDC_VERSION__ >= 199901L
157
- #define CP_DYNAMIC_ARRAYS
158
- #endif /* __STDC__VERSION >= 199901L */
159
- #endif /* defined (__STDC_VERSION__) */
160
- #endif /* defined (__STDC__) */
161
- #endif /* ! defined (__GNUC__) */
162
-
163
- /* We avoid pulling in the ctype tables, to prevent pulling in
164
- additional unresolved symbols when this code is used in a library.
165
- FIXME: Is this really a valid reason? This comes from the original
166
- V3 demangler code.
167
-
168
- As of this writing this file has the following undefined references
169
- when compiled with -DIN_GLIBCPP_V3: malloc, realloc, free, memcpy,
170
- strcpy, strcat, strlen. */
171
-
172
- #define IS_DIGIT(c) ((c) >= '0' && (c) <= '9')
173
- #define IS_UPPER(c) ((c) >= 'A' && (c) <= 'Z')
174
- #define IS_LOWER(c) ((c) >= 'a' && (c) <= 'z')
175
-
176
- /* The prefix prepended by GCC to an identifier represnting the
177
- anonymous namespace. */
178
- #define ANONYMOUS_NAMESPACE_PREFIX "_GLOBAL_"
179
- #define ANONYMOUS_NAMESPACE_PREFIX_LEN \
180
- (sizeof (ANONYMOUS_NAMESPACE_PREFIX) - 1)
181
-
182
- /* Information we keep for the standard substitutions. */
183
-
184
- struct d_standard_sub_info
185
- {
186
- /* The code for this substitution. */
187
- char code;
188
- /* The simple string it expands to. */
189
- const char *simple_expansion;
190
- /* The length of the simple expansion. */
191
- int simple_len;
192
- /* The results of a full, verbose, expansion. This is used when
193
- qualifying a constructor/destructor, or when in verbose mode. */
194
- const char *full_expansion;
195
- /* The length of the full expansion. */
196
- int full_len;
197
- /* What to set the last_name field of d_info to; NULL if we should
198
- not set it. This is only relevant when qualifying a
199
- constructor/destructor. */
200
- const char *set_last_name;
201
- /* The length of set_last_name. */
202
- int set_last_name_len;
203
- };
204
-
205
- /* Accessors for subtrees of struct demangle_component. */
206
-
207
- #define d_left(dc) ((dc)->u.s_binary.left)
208
- #define d_right(dc) ((dc)->u.s_binary.right)
209
-
210
- /* A list of templates. This is used while printing. */
211
-
212
- struct d_print_template
213
- {
214
- /* Next template on the list. */
215
- struct d_print_template *next;
216
- /* This template. */
217
- const struct demangle_component *template_decl;
218
- };
219
-
220
- /* A list of type modifiers. This is used while printing. */
221
-
222
- struct d_print_mod
223
- {
224
- /* Next modifier on the list. These are in the reverse of the order
225
- in which they appeared in the mangled string. */
226
- struct d_print_mod *next;
227
- /* The modifier. */
228
- const struct demangle_component *mod;
229
- /* Whether this modifier was printed. */
230
- int printed;
231
- /* The list of templates which applies to this modifier. */
232
- struct d_print_template *templates;
233
- };
234
-
235
- /* We use this structure to hold information during printing. */
236
-
237
- struct d_print_info
238
- {
239
- /* The options passed to the demangler. */
240
- int options;
241
- /* Buffer holding the result. */
242
- char *buf;
243
- /* Current length of data in buffer. */
244
- size_t len;
245
- /* Allocated size of buffer. */
246
- size_t alc;
247
- /* The current list of templates, if any. */
248
- struct d_print_template *templates;
249
- /* The current list of modifiers (e.g., pointer, reference, etc.),
250
- if any. */
251
- struct d_print_mod *modifiers;
252
- /* Set to 1 if we had a memory allocation failure. */
253
- int allocation_failure;
254
- };
255
-
256
- #define d_print_saw_error(dpi) ((dpi)->buf == NULL)
257
-
258
- #define d_append_char(dpi, c) \
259
- do \
260
- { \
261
- if ((dpi)->buf != NULL && (dpi)->len < (dpi)->alc) \
262
- (dpi)->buf[(dpi)->len++] = (c); \
263
- else \
264
- d_print_append_char ((dpi), (c)); \
265
- } \
266
- while (0)
267
-
268
- #define d_append_buffer(dpi, s, l) \
269
- do \
270
- { \
271
- if ((dpi)->buf != NULL && (dpi)->len + (l) <= (dpi)->alc) \
272
- { \
273
- memcpy ((dpi)->buf + (dpi)->len, (s), (l)); \
274
- (dpi)->len += l; \
275
- } \
276
- else \
277
- d_print_append_buffer ((dpi), (s), (l)); \
278
- } \
279
- while (0)
280
-
281
- #define d_append_string_constant(dpi, s) \
282
- d_append_buffer (dpi, (s), sizeof (s) - 1)
283
-
284
- #define d_last_char(dpi) \
285
- ((dpi)->buf == NULL || (dpi)->len == 0 ? '\0' : (dpi)->buf[(dpi)->len - 1])
286
-
287
- #ifdef CP_DEMANGLE_DEBUG
288
- static void d_dump (struct demangle_component *, int);
289
- #endif
290
-
291
- static struct demangle_component *
292
- d_make_empty (struct d_info *);
293
-
294
- static struct demangle_component *
295
- d_make_comp (struct d_info *, enum demangle_component_type,
296
- struct demangle_component *,
297
- struct demangle_component *);
298
-
299
- static struct demangle_component *
300
- d_make_name (struct d_info *, const char *, int);
301
-
302
- static struct demangle_component *
303
- d_make_builtin_type (struct d_info *,
304
- const struct demangle_builtin_type_info *);
305
-
306
- static struct demangle_component *
307
- d_make_operator (struct d_info *,
308
- const struct demangle_operator_info *);
309
-
310
- static struct demangle_component *
311
- d_make_extended_operator (struct d_info *, int,
312
- struct demangle_component *);
313
-
314
- static struct demangle_component *
315
- d_make_ctor (struct d_info *, enum gnu_v3_ctor_kinds,
316
- struct demangle_component *);
317
-
318
- static struct demangle_component *
319
- d_make_dtor (struct d_info *, enum gnu_v3_dtor_kinds,
320
- struct demangle_component *);
321
-
322
- static struct demangle_component *
323
- d_make_template_param (struct d_info *, long);
324
-
325
- static struct demangle_component *
326
- d_make_sub (struct d_info *, const char *, int);
327
-
328
- static int
329
- has_return_type (struct demangle_component *);
330
-
331
- static int
332
- is_ctor_dtor_or_conversion (struct demangle_component *);
333
-
334
- static struct demangle_component *d_encoding (struct d_info *, int);
335
-
336
- static struct demangle_component *d_name (struct d_info *);
337
-
338
- static struct demangle_component *d_nested_name (struct d_info *);
339
-
340
- static struct demangle_component *d_prefix (struct d_info *);
341
-
342
- static struct demangle_component *d_unqualified_name (struct d_info *);
343
-
344
- static struct demangle_component *d_source_name (struct d_info *);
345
-
346
- static long d_number (struct d_info *);
347
-
348
- static struct demangle_component *d_identifier (struct d_info *, int);
349
-
350
- static struct demangle_component *d_operator_name (struct d_info *);
351
-
352
- static struct demangle_component *d_special_name (struct d_info *);
353
-
354
- static int d_call_offset (struct d_info *, int);
355
-
356
- static struct demangle_component *d_ctor_dtor_name (struct d_info *);
357
-
358
- static struct demangle_component **
359
- d_cv_qualifiers (struct d_info *, struct demangle_component **, int);
360
-
361
- static struct demangle_component *
362
- d_function_type (struct d_info *);
363
-
364
- static struct demangle_component *
365
- d_bare_function_type (struct d_info *, int);
366
-
367
- static struct demangle_component *
368
- d_class_enum_type (struct d_info *);
369
-
370
- static struct demangle_component *d_array_type (struct d_info *);
371
-
372
- static struct demangle_component *
373
- d_pointer_to_member_type (struct d_info *);
374
-
375
- static struct demangle_component *
376
- d_template_param (struct d_info *);
377
-
378
- static struct demangle_component *d_template_args (struct d_info *);
379
-
380
- static struct demangle_component *
381
- d_template_arg (struct d_info *);
382
-
383
- static struct demangle_component *d_expression (struct d_info *);
384
-
385
- static struct demangle_component *d_expr_primary (struct d_info *);
386
-
387
- static struct demangle_component *d_local_name (struct d_info *);
388
-
389
- static int d_discriminator (struct d_info *);
390
-
391
- static int
392
- d_add_substitution (struct d_info *, struct demangle_component *);
393
-
394
- static struct demangle_component *d_substitution (struct d_info *, int);
395
-
396
- static void d_print_resize (struct d_print_info *, size_t);
397
-
398
- static void d_print_append_char (struct d_print_info *, int);
399
-
400
- static void
401
- d_print_append_buffer (struct d_print_info *, const char *, size_t);
402
-
403
- static void d_print_error (struct d_print_info *);
404
-
405
- static void
406
- d_print_comp (struct d_print_info *, const struct demangle_component *);
407
-
408
- static void
409
- d_print_java_identifier (struct d_print_info *, const char *, int);
410
-
411
- static void
412
- d_print_mod_list (struct d_print_info *, struct d_print_mod *, int);
413
-
414
- static void
415
- d_print_mod (struct d_print_info *, const struct demangle_component *);
416
-
417
- static void
418
- d_print_function_type (struct d_print_info *,
419
- const struct demangle_component *,
420
- struct d_print_mod *);
421
-
422
- static void
423
- d_print_array_type (struct d_print_info *,
424
- const struct demangle_component *,
425
- struct d_print_mod *);
426
-
427
- static void
428
- d_print_expr_op (struct d_print_info *, const struct demangle_component *);
429
-
430
- static void
431
- d_print_cast (struct d_print_info *, const struct demangle_component *);
432
-
433
- static char *d_demangle (const char *, int, size_t *);
434
-
435
- #ifdef CP_DEMANGLE_DEBUG
436
-
437
- static void
438
- d_dump (struct demangle_component *dc, int indent)
439
- {
440
- int i;
441
-
442
- if (dc == NULL)
443
- return;
444
-
445
- for (i = 0; i < indent; ++i)
446
- putchar (' ');
447
-
448
- switch (dc->type)
449
- {
450
- case DEMANGLE_COMPONENT_NAME:
451
- printf ("name '%.*s'\n", dc->u.s_name.len, dc->u.s_name.s);
452
- return;
453
- case DEMANGLE_COMPONENT_TEMPLATE_PARAM:
454
- printf ("template parameter %ld\n", dc->u.s_number.number);
455
- return;
456
- case DEMANGLE_COMPONENT_CTOR:
457
- printf ("constructor %d\n", (int) dc->u.s_ctor.kind);
458
- d_dump (dc->u.s_ctor.name, indent + 2);
459
- return;
460
- case DEMANGLE_COMPONENT_DTOR:
461
- printf ("destructor %d\n", (int) dc->u.s_dtor.kind);
462
- d_dump (dc->u.s_dtor.name, indent + 2);
463
- return;
464
- case DEMANGLE_COMPONENT_SUB_STD:
465
- printf ("standard substitution %s\n", dc->u.s_string.string);
466
- return;
467
- case DEMANGLE_COMPONENT_BUILTIN_TYPE:
468
- printf ("builtin type %s\n", dc->u.s_builtin.type->name);
469
- return;
470
- case DEMANGLE_COMPONENT_OPERATOR:
471
- printf ("operator %s\n", dc->u.s_operator.op->name);
472
- return;
473
- case DEMANGLE_COMPONENT_EXTENDED_OPERATOR:
474
- printf ("extended operator with %d args\n",
475
- dc->u.s_extended_operator.args);
476
- d_dump (dc->u.s_extended_operator.name, indent + 2);
477
- return;
478
-
479
- case DEMANGLE_COMPONENT_QUAL_NAME:
480
- printf ("qualified name\n");
481
- break;
482
- case DEMANGLE_COMPONENT_LOCAL_NAME:
483
- printf ("local name\n");
484
- break;
485
- case DEMANGLE_COMPONENT_TYPED_NAME:
486
- printf ("typed name\n");
487
- break;
488
- case DEMANGLE_COMPONENT_TEMPLATE:
489
- printf ("template\n");
490
- break;
491
- case DEMANGLE_COMPONENT_VTABLE:
492
- printf ("vtable\n");
493
- break;
494
- case DEMANGLE_COMPONENT_VTT:
495
- printf ("VTT\n");
496
- break;
497
- case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE:
498
- printf ("construction vtable\n");
499
- break;
500
- case DEMANGLE_COMPONENT_TYPEINFO:
501
- printf ("typeinfo\n");
502
- break;
503
- case DEMANGLE_COMPONENT_TYPEINFO_NAME:
504
- printf ("typeinfo name\n");
505
- break;
506
- case DEMANGLE_COMPONENT_TYPEINFO_FN:
507
- printf ("typeinfo function\n");
508
- break;
509
- case DEMANGLE_COMPONENT_THUNK:
510
- printf ("thunk\n");
511
- break;
512
- case DEMANGLE_COMPONENT_VIRTUAL_THUNK:
513
- printf ("virtual thunk\n");
514
- break;
515
- case DEMANGLE_COMPONENT_COVARIANT_THUNK:
516
- printf ("covariant thunk\n");
517
- break;
518
- case DEMANGLE_COMPONENT_JAVA_CLASS:
519
- printf ("java class\n");
520
- break;
521
- case DEMANGLE_COMPONENT_GUARD:
522
- printf ("guard\n");
523
- break;
524
- case DEMANGLE_COMPONENT_REFTEMP:
525
- printf ("reference temporary\n");
526
- break;
527
- case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
528
- printf ("hidden alias\n");
529
- break;
530
- case DEMANGLE_COMPONENT_RESTRICT:
531
- printf ("restrict\n");
532
- break;
533
- case DEMANGLE_COMPONENT_VOLATILE:
534
- printf ("volatile\n");
535
- break;
536
- case DEMANGLE_COMPONENT_CONST:
537
- printf ("const\n");
538
- break;
539
- case DEMANGLE_COMPONENT_RESTRICT_THIS:
540
- printf ("restrict this\n");
541
- break;
542
- case DEMANGLE_COMPONENT_VOLATILE_THIS:
543
- printf ("volatile this\n");
544
- break;
545
- case DEMANGLE_COMPONENT_CONST_THIS:
546
- printf ("const this\n");
547
- break;
548
- case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
549
- printf ("vendor type qualifier\n");
550
- break;
551
- case DEMANGLE_COMPONENT_POINTER:
552
- printf ("pointer\n");
553
- break;
554
- case DEMANGLE_COMPONENT_REFERENCE:
555
- printf ("reference\n");
556
- break;
557
- case DEMANGLE_COMPONENT_COMPLEX:
558
- printf ("complex\n");
559
- break;
560
- case DEMANGLE_COMPONENT_IMAGINARY:
561
- printf ("imaginary\n");
562
- break;
563
- case DEMANGLE_COMPONENT_VENDOR_TYPE:
564
- printf ("vendor type\n");
565
- break;
566
- case DEMANGLE_COMPONENT_FUNCTION_TYPE:
567
- printf ("function type\n");
568
- break;
569
- case DEMANGLE_COMPONENT_ARRAY_TYPE:
570
- printf ("array type\n");
571
- break;
572
- case DEMANGLE_COMPONENT_PTRMEM_TYPE:
573
- printf ("pointer to member type\n");
574
- break;
575
- case DEMANGLE_COMPONENT_ARGLIST:
576
- printf ("argument list\n");
577
- break;
578
- case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST:
579
- printf ("template argument list\n");
580
- break;
581
- case DEMANGLE_COMPONENT_CAST:
582
- printf ("cast\n");
583
- break;
584
- case DEMANGLE_COMPONENT_UNARY:
585
- printf ("unary operator\n");
586
- break;
587
- case DEMANGLE_COMPONENT_BINARY:
588
- printf ("binary operator\n");
589
- break;
590
- case DEMANGLE_COMPONENT_BINARY_ARGS:
591
- printf ("binary operator arguments\n");
592
- break;
593
- case DEMANGLE_COMPONENT_TRINARY:
594
- printf ("trinary operator\n");
595
- break;
596
- case DEMANGLE_COMPONENT_TRINARY_ARG1:
597
- printf ("trinary operator arguments 1\n");
598
- break;
599
- case DEMANGLE_COMPONENT_TRINARY_ARG2:
600
- printf ("trinary operator arguments 1\n");
601
- break;
602
- case DEMANGLE_COMPONENT_LITERAL:
603
- printf ("literal\n");
604
- break;
605
- case DEMANGLE_COMPONENT_LITERAL_NEG:
606
- printf ("negative literal\n");
607
- break;
608
- }
609
-
610
- d_dump (d_left (dc), indent + 2);
611
- d_dump (d_right (dc), indent + 2);
612
- }
613
-
614
- #endif /* CP_DEMANGLE_DEBUG */
615
-
616
- /* Fill in a DEMANGLE_COMPONENT_NAME. */
617
-
618
- CP_STATIC_IF_GLIBCPP_V3
619
- int
620
- cplus_demangle_fill_name (struct demangle_component *p, const char *s, int len)
621
- {
622
- if (p == NULL || s == NULL || len == 0)
623
- return 0;
624
- p->type = DEMANGLE_COMPONENT_NAME;
625
- p->u.s_name.s = s;
626
- p->u.s_name.len = len;
627
- return 1;
628
- }
629
-
630
- /* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR. */
631
-
632
- CP_STATIC_IF_GLIBCPP_V3
633
- int
634
- cplus_demangle_fill_extended_operator (struct demangle_component *p, int args,
635
- struct demangle_component *name)
636
- {
637
- if (p == NULL || args < 0 || name == NULL)
638
- return 0;
639
- p->type = DEMANGLE_COMPONENT_EXTENDED_OPERATOR;
640
- p->u.s_extended_operator.args = args;
641
- p->u.s_extended_operator.name = name;
642
- return 1;
643
- }
644
-
645
- /* Fill in a DEMANGLE_COMPONENT_CTOR. */
646
-
647
- CP_STATIC_IF_GLIBCPP_V3
648
- int
649
- cplus_demangle_fill_ctor (struct demangle_component *p,
650
- enum gnu_v3_ctor_kinds kind,
651
- struct demangle_component *name)
652
- {
653
- if (p == NULL
654
- || name == NULL
655
- || (kind < gnu_v3_complete_object_ctor
656
- && kind > gnu_v3_complete_object_allocating_ctor))
657
- return 0;
658
- p->type = DEMANGLE_COMPONENT_CTOR;
659
- p->u.s_ctor.kind = kind;
660
- p->u.s_ctor.name = name;
661
- return 1;
662
- }
663
-
664
- /* Fill in a DEMANGLE_COMPONENT_DTOR. */
665
-
666
- CP_STATIC_IF_GLIBCPP_V3
667
- int
668
- cplus_demangle_fill_dtor (struct demangle_component *p,
669
- enum gnu_v3_dtor_kinds kind,
670
- struct demangle_component *name)
671
- {
672
- if (p == NULL
673
- || name == NULL
674
- || (kind < gnu_v3_deleting_dtor
675
- && kind > gnu_v3_base_object_dtor))
676
- return 0;
677
- p->type = DEMANGLE_COMPONENT_DTOR;
678
- p->u.s_dtor.kind = kind;
679
- p->u.s_dtor.name = name;
680
- return 1;
681
- }
682
-
683
- /* Add a new component. */
684
-
685
- static struct demangle_component *
686
- d_make_empty (struct d_info *di)
687
- {
688
- struct demangle_component *p;
689
-
690
- if (di->next_comp >= di->num_comps)
691
- return NULL;
692
- p = &di->comps[di->next_comp];
693
- ++di->next_comp;
694
- return p;
695
- }
696
-
697
- /* Add a new generic component. */
698
-
699
- static struct demangle_component *
700
- d_make_comp (struct d_info *di, enum demangle_component_type type,
701
- struct demangle_component *left,
702
- struct demangle_component *right)
703
- {
704
- struct demangle_component *p;
705
-
706
- /* We check for errors here. A typical error would be a NULL return
707
- from a subroutine. We catch those here, and return NULL
708
- upward. */
709
- switch (type)
710
- {
711
- /* These types require two parameters. */
712
- case DEMANGLE_COMPONENT_QUAL_NAME:
713
- case DEMANGLE_COMPONENT_LOCAL_NAME:
714
- case DEMANGLE_COMPONENT_TYPED_NAME:
715
- case DEMANGLE_COMPONENT_TEMPLATE:
716
- case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE:
717
- case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
718
- case DEMANGLE_COMPONENT_PTRMEM_TYPE:
719
- case DEMANGLE_COMPONENT_UNARY:
720
- case DEMANGLE_COMPONENT_BINARY:
721
- case DEMANGLE_COMPONENT_BINARY_ARGS:
722
- case DEMANGLE_COMPONENT_TRINARY:
723
- case DEMANGLE_COMPONENT_TRINARY_ARG1:
724
- case DEMANGLE_COMPONENT_TRINARY_ARG2:
725
- case DEMANGLE_COMPONENT_LITERAL:
726
- case DEMANGLE_COMPONENT_LITERAL_NEG:
727
- if (left == NULL || right == NULL)
728
- return NULL;
729
- break;
730
-
731
- /* These types only require one parameter. */
732
- case DEMANGLE_COMPONENT_VTABLE:
733
- case DEMANGLE_COMPONENT_VTT:
734
- case DEMANGLE_COMPONENT_TYPEINFO:
735
- case DEMANGLE_COMPONENT_TYPEINFO_NAME:
736
- case DEMANGLE_COMPONENT_TYPEINFO_FN:
737
- case DEMANGLE_COMPONENT_THUNK:
738
- case DEMANGLE_COMPONENT_VIRTUAL_THUNK:
739
- case DEMANGLE_COMPONENT_COVARIANT_THUNK:
740
- case DEMANGLE_COMPONENT_JAVA_CLASS:
741
- case DEMANGLE_COMPONENT_GUARD:
742
- case DEMANGLE_COMPONENT_REFTEMP:
743
- case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
744
- case DEMANGLE_COMPONENT_POINTER:
745
- case DEMANGLE_COMPONENT_REFERENCE:
746
- case DEMANGLE_COMPONENT_COMPLEX:
747
- case DEMANGLE_COMPONENT_IMAGINARY:
748
- case DEMANGLE_COMPONENT_VENDOR_TYPE:
749
- case DEMANGLE_COMPONENT_ARGLIST:
750
- case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST:
751
- case DEMANGLE_COMPONENT_CAST:
752
- if (left == NULL)
753
- return NULL;
754
- break;
755
-
756
- /* This needs a right parameter, but the left parameter can be
757
- empty. */
758
- case DEMANGLE_COMPONENT_ARRAY_TYPE:
759
- if (right == NULL)
760
- return NULL;
761
- break;
762
-
763
- /* These are allowed to have no parameters--in some cases they
764
- will be filled in later. */
765
- case DEMANGLE_COMPONENT_FUNCTION_TYPE:
766
- case DEMANGLE_COMPONENT_RESTRICT:
767
- case DEMANGLE_COMPONENT_VOLATILE:
768
- case DEMANGLE_COMPONENT_CONST:
769
- case DEMANGLE_COMPONENT_RESTRICT_THIS:
770
- case DEMANGLE_COMPONENT_VOLATILE_THIS:
771
- case DEMANGLE_COMPONENT_CONST_THIS:
772
- break;
773
-
774
- /* Other types should not be seen here. */
775
- default:
776
- return NULL;
777
- }
778
-
779
- p = d_make_empty (di);
780
- if (p != NULL)
781
- {
782
- p->type = type;
783
- p->u.s_binary.left = left;
784
- p->u.s_binary.right = right;
785
- }
786
- return p;
787
- }
788
-
789
- /* Add a new name component. */
790
-
791
- static struct demangle_component *
792
- d_make_name (struct d_info *di, const char *s, int len)
793
- {
794
- struct demangle_component *p;
795
-
796
- p = d_make_empty (di);
797
- if (! cplus_demangle_fill_name (p, s, len))
798
- return NULL;
799
- return p;
800
- }
801
-
802
- /* Add a new builtin type component. */
803
-
804
- static struct demangle_component *
805
- d_make_builtin_type (struct d_info *di,
806
- const struct demangle_builtin_type_info *type)
807
- {
808
- struct demangle_component *p;
809
-
810
- if (type == NULL)
811
- return NULL;
812
- p = d_make_empty (di);
813
- if (p != NULL)
814
- {
815
- p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE;
816
- p->u.s_builtin.type = type;
817
- }
818
- return p;
819
- }
820
-
821
- /* Add a new operator component. */
822
-
823
- static struct demangle_component *
824
- d_make_operator (struct d_info *di, const struct demangle_operator_info *op)
825
- {
826
- struct demangle_component *p;
827
-
828
- p = d_make_empty (di);
829
- if (p != NULL)
830
- {
831
- p->type = DEMANGLE_COMPONENT_OPERATOR;
832
- p->u.s_operator.op = op;
833
- }
834
- return p;
835
- }
836
-
837
- /* Add a new extended operator component. */
838
-
839
- static struct demangle_component *
840
- d_make_extended_operator (struct d_info *di, int args,
841
- struct demangle_component *name)
842
- {
843
- struct demangle_component *p;
844
-
845
- p = d_make_empty (di);
846
- if (! cplus_demangle_fill_extended_operator (p, args, name))
847
- return NULL;
848
- return p;
849
- }
850
-
851
- /* Add a new constructor component. */
852
-
853
- static struct demangle_component *
854
- d_make_ctor (struct d_info *di, enum gnu_v3_ctor_kinds kind,
855
- struct demangle_component *name)
856
- {
857
- struct demangle_component *p;
858
-
859
- p = d_make_empty (di);
860
- if (! cplus_demangle_fill_ctor (p, kind, name))
861
- return NULL;
862
- return p;
863
- }
864
-
865
- /* Add a new destructor component. */
866
-
867
- static struct demangle_component *
868
- d_make_dtor (struct d_info *di, enum gnu_v3_dtor_kinds kind,
869
- struct demangle_component *name)
870
- {
871
- struct demangle_component *p;
872
-
873
- p = d_make_empty (di);
874
- if (! cplus_demangle_fill_dtor (p, kind, name))
875
- return NULL;
876
- return p;
877
- }
878
-
879
- /* Add a new template parameter. */
880
-
881
- static struct demangle_component *
882
- d_make_template_param (struct d_info *di, long i)
883
- {
884
- struct demangle_component *p;
885
-
886
- p = d_make_empty (di);
887
- if (p != NULL)
888
- {
889
- p->type = DEMANGLE_COMPONENT_TEMPLATE_PARAM;
890
- p->u.s_number.number = i;
891
- }
892
- return p;
893
- }
894
-
895
- /* Add a new standard substitution component. */
896
-
897
- static struct demangle_component *
898
- d_make_sub (struct d_info *di, const char *name, int len)
899
- {
900
- struct demangle_component *p;
901
-
902
- p = d_make_empty (di);
903
- if (p != NULL)
904
- {
905
- p->type = DEMANGLE_COMPONENT_SUB_STD;
906
- p->u.s_string.string = name;
907
- p->u.s_string.len = len;
908
- }
909
- return p;
910
- }
911
-
912
- /* <mangled-name> ::= _Z <encoding>
913
-
914
- TOP_LEVEL is non-zero when called at the top level. */
915
-
916
- CP_STATIC_IF_GLIBCPP_V3
917
- struct demangle_component *
918
- cplus_demangle_mangled_name (struct d_info *di, int top_level)
919
- {
920
- if (d_next_char (di) != '_')
921
- return NULL;
922
- if (d_next_char (di) != 'Z')
923
- return NULL;
924
- return d_encoding (di, top_level);
925
- }
926
-
927
- /* Return whether a function should have a return type. The argument
928
- is the function name, which may be qualified in various ways. The
929
- rules are that template functions have return types with some
930
- exceptions, function types which are not part of a function name
931
- mangling have return types with some exceptions, and non-template
932
- function names do not have return types. The exceptions are that
933
- constructors, destructors, and conversion operators do not have
934
- return types. */
935
-
936
- static int
937
- has_return_type (struct demangle_component *dc)
938
- {
939
- if (dc == NULL)
940
- return 0;
941
- switch (dc->type)
942
- {
943
- default:
944
- return 0;
945
- case DEMANGLE_COMPONENT_TEMPLATE:
946
- return ! is_ctor_dtor_or_conversion (d_left (dc));
947
- case DEMANGLE_COMPONENT_RESTRICT_THIS:
948
- case DEMANGLE_COMPONENT_VOLATILE_THIS:
949
- case DEMANGLE_COMPONENT_CONST_THIS:
950
- return has_return_type (d_left (dc));
951
- }
952
- }
953
-
954
- /* Return whether a name is a constructor, a destructor, or a
955
- conversion operator. */
956
-
957
- static int
958
- is_ctor_dtor_or_conversion (struct demangle_component *dc)
959
- {
960
- if (dc == NULL)
961
- return 0;
962
- switch (dc->type)
963
- {
964
- default:
965
- return 0;
966
- case DEMANGLE_COMPONENT_QUAL_NAME:
967
- case DEMANGLE_COMPONENT_LOCAL_NAME:
968
- return is_ctor_dtor_or_conversion (d_right (dc));
969
- case DEMANGLE_COMPONENT_CTOR:
970
- case DEMANGLE_COMPONENT_DTOR:
971
- case DEMANGLE_COMPONENT_CAST:
972
- return 1;
973
- }
974
- }
975
-
976
- /* <encoding> ::= <(function) name> <bare-function-type>
977
- ::= <(data) name>
978
- ::= <special-name>
979
-
980
- TOP_LEVEL is non-zero when called at the top level, in which case
981
- if DMGL_PARAMS is not set we do not demangle the function
982
- parameters. We only set this at the top level, because otherwise
983
- we would not correctly demangle names in local scopes. */
984
-
985
- static struct demangle_component *
986
- d_encoding (struct d_info *di, int top_level)
987
- {
988
- char peek = d_peek_char (di);
989
-
990
- if (peek == 'G' || peek == 'T')
991
- return d_special_name (di);
992
- else
993
- {
994
- struct demangle_component *dc;
995
-
996
- dc = d_name (di);
997
-
998
- if (dc != NULL && top_level && (di->options & DMGL_PARAMS) == 0)
999
- {
1000
- /* Strip off any initial CV-qualifiers, as they really apply
1001
- to the `this' parameter, and they were not output by the
1002
- v2 demangler without DMGL_PARAMS. */
1003
- while (dc->type == DEMANGLE_COMPONENT_RESTRICT_THIS
1004
- || dc->type == DEMANGLE_COMPONENT_VOLATILE_THIS
1005
- || dc->type == DEMANGLE_COMPONENT_CONST_THIS)
1006
- dc = d_left (dc);
1007
-
1008
- /* If the top level is a DEMANGLE_COMPONENT_LOCAL_NAME, then
1009
- there may be CV-qualifiers on its right argument which
1010
- really apply here; this happens when parsing a class
1011
- which is local to a function. */
1012
- if (dc->type == DEMANGLE_COMPONENT_LOCAL_NAME)
1013
- {
1014
- struct demangle_component *dcr;
1015
-
1016
- dcr = d_right (dc);
1017
- while (dcr->type == DEMANGLE_COMPONENT_RESTRICT_THIS
1018
- || dcr->type == DEMANGLE_COMPONENT_VOLATILE_THIS
1019
- || dcr->type == DEMANGLE_COMPONENT_CONST_THIS)
1020
- dcr = d_left (dcr);
1021
- dc->u.s_binary.right = dcr;
1022
- }
1023
-
1024
- return dc;
1025
- }
1026
-
1027
- peek = d_peek_char (di);
1028
- if (peek == '\0' || peek == 'E')
1029
- return dc;
1030
- return d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME, dc,
1031
- d_bare_function_type (di, has_return_type (dc)));
1032
- }
1033
- }
1034
-
1035
- /* <name> ::= <nested-name>
1036
- ::= <unscoped-name>
1037
- ::= <unscoped-template-name> <template-args>
1038
- ::= <local-name>
1039
-
1040
- <unscoped-name> ::= <unqualified-name>
1041
- ::= St <unqualified-name>
1042
-
1043
- <unscoped-template-name> ::= <unscoped-name>
1044
- ::= <substitution>
1045
- */
1046
-
1047
- static struct demangle_component *
1048
- d_name (struct d_info *di)
1049
- {
1050
- char peek = d_peek_char (di);
1051
- struct demangle_component *dc;
1052
-
1053
- switch (peek)
1054
- {
1055
- case 'N':
1056
- return d_nested_name (di);
1057
-
1058
- case 'Z':
1059
- return d_local_name (di);
1060
-
1061
- /* APPLE LOCAL begin mainline 2007-05-09 5173149 */ \
1062
- case 'L':
1063
- return d_unqualified_name (di);
1064
-
1065
- /* APPLE LOCAL end mainline 2007-05-09 5173149 */ \
1066
- case 'S':
1067
- {
1068
- int subst;
1069
-
1070
- if (d_peek_next_char (di) != 't')
1071
- {
1072
- dc = d_substitution (di, 0);
1073
- subst = 1;
1074
- }
1075
- else
1076
- {
1077
- d_advance (di, 2);
1078
- dc = d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME,
1079
- d_make_name (di, "std", 3),
1080
- d_unqualified_name (di));
1081
- di->expansion += 3;
1082
- subst = 0;
1083
- }
1084
-
1085
- if (d_peek_char (di) != 'I')
1086
- {
1087
- /* The grammar does not permit this case to occur if we
1088
- called d_substitution() above (i.e., subst == 1). We
1089
- don't bother to check. */
1090
- }
1091
- else
1092
- {
1093
- /* This is <template-args>, which means that we just saw
1094
- <unscoped-template-name>, which is a substitution
1095
- candidate if we didn't just get it from a
1096
- substitution. */
1097
- if (! subst)
1098
- {
1099
- if (! d_add_substitution (di, dc))
1100
- return NULL;
1101
- }
1102
- dc = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, dc,
1103
- d_template_args (di));
1104
- }
1105
-
1106
- return dc;
1107
- }
1108
-
1109
- default:
1110
- dc = d_unqualified_name (di);
1111
- if (d_peek_char (di) == 'I')
1112
- {
1113
- /* This is <template-args>, which means that we just saw
1114
- <unscoped-template-name>, which is a substitution
1115
- candidate. */
1116
- if (! d_add_substitution (di, dc))
1117
- return NULL;
1118
- dc = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, dc,
1119
- d_template_args (di));
1120
- }
1121
- return dc;
1122
- }
1123
- }
1124
-
1125
- /* <nested-name> ::= N [<CV-qualifiers>] <prefix> <unqualified-name> E
1126
- ::= N [<CV-qualifiers>] <template-prefix> <template-args> E
1127
- */
1128
-
1129
- static struct demangle_component *
1130
- d_nested_name (struct d_info *di)
1131
- {
1132
- struct demangle_component *ret;
1133
- struct demangle_component **pret;
1134
-
1135
- if (d_next_char (di) != 'N')
1136
- return NULL;
1137
-
1138
- pret = d_cv_qualifiers (di, &ret, 1);
1139
- if (pret == NULL)
1140
- return NULL;
1141
-
1142
- *pret = d_prefix (di);
1143
- if (*pret == NULL)
1144
- return NULL;
1145
-
1146
- if (d_next_char (di) != 'E')
1147
- return NULL;
1148
-
1149
- return ret;
1150
- }
1151
-
1152
- /* <prefix> ::= <prefix> <unqualified-name>
1153
- ::= <template-prefix> <template-args>
1154
- ::= <template-param>
1155
- ::=
1156
- ::= <substitution>
1157
-
1158
- <template-prefix> ::= <prefix> <(template) unqualified-name>
1159
- ::= <template-param>
1160
- ::= <substitution>
1161
- */
1162
-
1163
- static struct demangle_component *
1164
- d_prefix (struct d_info *di)
1165
- {
1166
- struct demangle_component *ret = NULL;
1167
-
1168
- while (1)
1169
- {
1170
- char peek;
1171
- enum demangle_component_type comb_type;
1172
- struct demangle_component *dc;
1173
-
1174
- peek = d_peek_char (di);
1175
- if (peek == '\0')
1176
- return NULL;
1177
-
1178
- /* The older code accepts a <local-name> here, but I don't see
1179
- that in the grammar. The older code does not accept a
1180
- <template-param> here. */
1181
-
1182
- comb_type = DEMANGLE_COMPONENT_QUAL_NAME;
1183
- if (IS_DIGIT (peek)
1184
- || IS_LOWER (peek)
1185
- || peek == 'C'
1186
- /* APPLE LOCAL begin mainline 2007-05-09 5173149 */ \
1187
- || peek == 'D'
1188
- || peek == 'L')
1189
- /* APPLE LOCAL end mainline 2007-05-09 5173149 */ \
1190
- dc = d_unqualified_name (di);
1191
- else if (peek == 'S')
1192
- dc = d_substitution (di, 1);
1193
- else if (peek == 'I')
1194
- {
1195
- if (ret == NULL)
1196
- return NULL;
1197
- comb_type = DEMANGLE_COMPONENT_TEMPLATE;
1198
- dc = d_template_args (di);
1199
- }
1200
- else if (peek == 'T')
1201
- dc = d_template_param (di);
1202
- else if (peek == 'E')
1203
- return ret;
1204
- else
1205
- return NULL;
1206
-
1207
- if (ret == NULL)
1208
- ret = dc;
1209
- else
1210
- ret = d_make_comp (di, comb_type, ret, dc);
1211
-
1212
- if (peek != 'S' && d_peek_char (di) != 'E')
1213
- {
1214
- if (! d_add_substitution (di, ret))
1215
- return NULL;
1216
- }
1217
- }
1218
- }
1219
-
1220
- /* <unqualified-name> ::= <operator-name>
1221
- ::= <ctor-dtor-name>
1222
- ::= <source-name>
1223
- APPLE LOCAL begin mainline 2007-05-09 5173149
1224
- ::= <local-source-name>
1225
-
1226
- <local-source-name> ::= L <source-name> <discriminator>
1227
- APPLE LOCAL end mainline 2007-05-09 5173149
1228
- */
1229
-
1230
- static struct demangle_component *
1231
- d_unqualified_name (struct d_info *di)
1232
- {
1233
- char peek;
1234
-
1235
- peek = d_peek_char (di);
1236
- if (IS_DIGIT (peek))
1237
- return d_source_name (di);
1238
- else if (IS_LOWER (peek))
1239
- {
1240
- struct demangle_component *ret;
1241
-
1242
- ret = d_operator_name (di);
1243
- if (ret != NULL && ret->type == DEMANGLE_COMPONENT_OPERATOR)
1244
- di->expansion += sizeof "operator" + ret->u.s_operator.op->len - 2;
1245
- return ret;
1246
- }
1247
- else if (peek == 'C' || peek == 'D')
1248
- return d_ctor_dtor_name (di);
1249
- /* APPLE LOCAL begin mainline 2007-05-09 5173149 */ \
1250
- else if (peek == 'L')
1251
- {
1252
- struct demangle_component * ret;
1253
-
1254
- d_advance (di, 1);
1255
-
1256
- ret = d_source_name (di);
1257
- if (ret == NULL)
1258
- return NULL;
1259
- if (! d_discriminator (di))
1260
- return NULL;
1261
- return ret;
1262
- }
1263
- /* APPLE LOCAL end mainline 2007-05-09 5173149 */ \
1264
- else
1265
- return NULL;
1266
- }
1267
-
1268
- /* <source-name> ::= <(positive length) number> <identifier> */
1269
-
1270
- static struct demangle_component *
1271
- d_source_name (struct d_info *di)
1272
- {
1273
- long len;
1274
- struct demangle_component *ret;
1275
-
1276
- len = d_number (di);
1277
- if (len <= 0)
1278
- return NULL;
1279
- ret = d_identifier (di, len);
1280
- di->last_name = ret;
1281
- return ret;
1282
- }
1283
-
1284
- /* number ::= [n] <(non-negative decimal integer)> */
1285
-
1286
- static long
1287
- d_number (struct d_info *di)
1288
- {
1289
- int negative;
1290
- char peek;
1291
- long ret;
1292
-
1293
- negative = 0;
1294
- peek = d_peek_char (di);
1295
- if (peek == 'n')
1296
- {
1297
- negative = 1;
1298
- d_advance (di, 1);
1299
- peek = d_peek_char (di);
1300
- }
1301
-
1302
- ret = 0;
1303
- while (1)
1304
- {
1305
- if (! IS_DIGIT (peek))
1306
- {
1307
- if (negative)
1308
- ret = - ret;
1309
- return ret;
1310
- }
1311
- ret = ret * 10 + peek - '0';
1312
- d_advance (di, 1);
1313
- peek = d_peek_char (di);
1314
- }
1315
- }
1316
-
1317
- /* identifier ::= <(unqualified source code identifier)> */
1318
-
1319
- static struct demangle_component *
1320
- d_identifier (struct d_info *di, int len)
1321
- {
1322
- const char *name;
1323
-
1324
- name = d_str (di);
1325
-
1326
- if (di->send - name < len)
1327
- return NULL;
1328
-
1329
- d_advance (di, len);
1330
-
1331
- /* A Java mangled name may have a trailing '$' if it is a C++
1332
- keyword. This '$' is not included in the length count. We just
1333
- ignore the '$'. */
1334
- if ((di->options & DMGL_JAVA) != 0
1335
- && d_peek_char (di) == '$')
1336
- d_advance (di, 1);
1337
-
1338
- /* Look for something which looks like a gcc encoding of an
1339
- anonymous namespace, and replace it with a more user friendly
1340
- name. */
1341
- if (len >= (int) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
1342
- && memcmp (name, ANONYMOUS_NAMESPACE_PREFIX,
1343
- ANONYMOUS_NAMESPACE_PREFIX_LEN) == 0)
1344
- {
1345
- const char *s;
1346
-
1347
- s = name + ANONYMOUS_NAMESPACE_PREFIX_LEN;
1348
- if ((*s == '.' || *s == '_' || *s == '$')
1349
- && s[1] == 'N')
1350
- {
1351
- di->expansion -= len - sizeof "(anonymous namespace)";
1352
- return d_make_name (di, "(anonymous namespace)",
1353
- sizeof "(anonymous namespace)" - 1);
1354
- }
1355
- }
1356
-
1357
- return d_make_name (di, name, len);
1358
- }
1359
-
1360
- /* operator_name ::= many different two character encodings.
1361
- ::= cv <type>
1362
- ::= v <digit> <source-name>
1363
- */
1364
-
1365
- #define NL(s) s, (sizeof s) - 1
1366
-
1367
- CP_STATIC_IF_GLIBCPP_V3
1368
- const struct demangle_operator_info cplus_demangle_operators[] =
1369
- {
1370
- { "aN", NL ("&="), 2 },
1371
- { "aS", NL ("="), 2 },
1372
- { "aa", NL ("&&"), 2 },
1373
- { "ad", NL ("&"), 1 },
1374
- { "an", NL ("&"), 2 },
1375
- { "cl", NL ("()"), 0 },
1376
- { "cm", NL (","), 2 },
1377
- { "co", NL ("~"), 1 },
1378
- { "dV", NL ("/="), 2 },
1379
- { "da", NL ("delete[]"), 1 },
1380
- { "de", NL ("*"), 1 },
1381
- { "dl", NL ("delete"), 1 },
1382
- { "dv", NL ("/"), 2 },
1383
- { "eO", NL ("^="), 2 },
1384
- { "eo", NL ("^"), 2 },
1385
- { "eq", NL ("=="), 2 },
1386
- { "ge", NL (">="), 2 },
1387
- { "gt", NL (">"), 2 },
1388
- { "ix", NL ("[]"), 2 },
1389
- { "lS", NL ("<<="), 2 },
1390
- { "le", NL ("<="), 2 },
1391
- { "ls", NL ("<<"), 2 },
1392
- { "lt", NL ("<"), 2 },
1393
- { "mI", NL ("-="), 2 },
1394
- { "mL", NL ("*="), 2 },
1395
- { "mi", NL ("-"), 2 },
1396
- { "ml", NL ("*"), 2 },
1397
- { "mm", NL ("--"), 1 },
1398
- { "na", NL ("new[]"), 1 },
1399
- { "ne", NL ("!="), 2 },
1400
- { "ng", NL ("-"), 1 },
1401
- { "nt", NL ("!"), 1 },
1402
- { "nw", NL ("new"), 1 },
1403
- { "oR", NL ("|="), 2 },
1404
- { "oo", NL ("||"), 2 },
1405
- { "or", NL ("|"), 2 },
1406
- { "pL", NL ("+="), 2 },
1407
- { "pl", NL ("+"), 2 },
1408
- { "pm", NL ("->*"), 2 },
1409
- { "pp", NL ("++"), 1 },
1410
- { "ps", NL ("+"), 1 },
1411
- { "pt", NL ("->"), 2 },
1412
- { "qu", NL ("?"), 3 },
1413
- { "rM", NL ("%="), 2 },
1414
- { "rS", NL (">>="), 2 },
1415
- { "rm", NL ("%"), 2 },
1416
- { "rs", NL (">>"), 2 },
1417
- { "st", NL ("sizeof "), 1 },
1418
- { "sz", NL ("sizeof "), 1 },
1419
- { NULL, NULL, 0, 0 }
1420
- };
1421
-
1422
- static struct demangle_component *
1423
- d_operator_name (struct d_info *di)
1424
- {
1425
- char c1;
1426
- char c2;
1427
-
1428
- c1 = d_next_char (di);
1429
- c2 = d_next_char (di);
1430
- if (c1 == 'v' && IS_DIGIT (c2))
1431
- return d_make_extended_operator (di, c2 - '0', d_source_name (di));
1432
- else if (c1 == 'c' && c2 == 'v')
1433
- return d_make_comp (di, DEMANGLE_COMPONENT_CAST,
1434
- cplus_demangle_type (di), NULL);
1435
- else
1436
- {
1437
- /* LOW is the inclusive lower bound. */
1438
- int low = 0;
1439
- /* HIGH is the exclusive upper bound. We subtract one to ignore
1440
- the sentinel at the end of the array. */
1441
- int high = ((sizeof (cplus_demangle_operators)
1442
- / sizeof (cplus_demangle_operators[0]))
1443
- - 1);
1444
-
1445
- while (1)
1446
- {
1447
- int i;
1448
- const struct demangle_operator_info *p;
1449
-
1450
- i = low + (high - low) / 2;
1451
- p = cplus_demangle_operators + i;
1452
-
1453
- if (c1 == p->code[0] && c2 == p->code[1])
1454
- return d_make_operator (di, p);
1455
-
1456
- if (c1 < p->code[0] || (c1 == p->code[0] && c2 < p->code[1]))
1457
- high = i;
1458
- else
1459
- low = i + 1;
1460
- if (low == high)
1461
- return NULL;
1462
- }
1463
- }
1464
- }
1465
-
1466
- /* <special-name> ::= TV <type>
1467
- ::= TT <type>
1468
- ::= TI <type>
1469
- ::= TS <type>
1470
- ::= GV <(object) name>
1471
- ::= T <call-offset> <(base) encoding>
1472
- ::= Tc <call-offset> <call-offset> <(base) encoding>
1473
- Also g++ extensions:
1474
- ::= TC <type> <(offset) number> _ <(base) type>
1475
- ::= TF <type>
1476
- ::= TJ <type>
1477
- ::= GR <name>
1478
- ::= GA <encoding>
1479
- */
1480
-
1481
- static struct demangle_component *
1482
- d_special_name (struct d_info *di)
1483
- {
1484
- char c;
1485
-
1486
- di->expansion += 20;
1487
- c = d_next_char (di);
1488
- if (c == 'T')
1489
- {
1490
- switch (d_next_char (di))
1491
- {
1492
- case 'V':
1493
- di->expansion -= 5;
1494
- return d_make_comp (di, DEMANGLE_COMPONENT_VTABLE,
1495
- cplus_demangle_type (di), NULL);
1496
- case 'T':
1497
- di->expansion -= 10;
1498
- return d_make_comp (di, DEMANGLE_COMPONENT_VTT,
1499
- cplus_demangle_type (di), NULL);
1500
- case 'I':
1501
- return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO,
1502
- cplus_demangle_type (di), NULL);
1503
- case 'S':
1504
- return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO_NAME,
1505
- cplus_demangle_type (di), NULL);
1506
-
1507
- case 'h':
1508
- if (! d_call_offset (di, 'h'))
1509
- return NULL;
1510
- return d_make_comp (di, DEMANGLE_COMPONENT_THUNK,
1511
- d_encoding (di, 0), NULL);
1512
-
1513
- case 'v':
1514
- if (! d_call_offset (di, 'v'))
1515
- return NULL;
1516
- return d_make_comp (di, DEMANGLE_COMPONENT_VIRTUAL_THUNK,
1517
- d_encoding (di, 0), NULL);
1518
-
1519
- case 'c':
1520
- if (! d_call_offset (di, '\0'))
1521
- return NULL;
1522
- if (! d_call_offset (di, '\0'))
1523
- return NULL;
1524
- return d_make_comp (di, DEMANGLE_COMPONENT_COVARIANT_THUNK,
1525
- d_encoding (di, 0), NULL);
1526
-
1527
- case 'C':
1528
- {
1529
- struct demangle_component *derived_type;
1530
- long offset;
1531
- struct demangle_component *base_type;
1532
-
1533
- derived_type = cplus_demangle_type (di);
1534
- offset = d_number (di);
1535
- if (offset < 0)
1536
- return NULL;
1537
- if (d_next_char (di) != '_')
1538
- return NULL;
1539
- base_type = cplus_demangle_type (di);
1540
- /* We don't display the offset. FIXME: We should display
1541
- it in verbose mode. */
1542
- di->expansion += 5;
1543
- return d_make_comp (di, DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE,
1544
- base_type, derived_type);
1545
- }
1546
-
1547
- case 'F':
1548
- return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO_FN,
1549
- cplus_demangle_type (di), NULL);
1550
- case 'J':
1551
- return d_make_comp (di, DEMANGLE_COMPONENT_JAVA_CLASS,
1552
- cplus_demangle_type (di), NULL);
1553
-
1554
- default:
1555
- return NULL;
1556
- }
1557
- }
1558
- else if (c == 'G')
1559
- {
1560
- switch (d_next_char (di))
1561
- {
1562
- case 'V':
1563
- return d_make_comp (di, DEMANGLE_COMPONENT_GUARD, d_name (di), NULL);
1564
-
1565
- case 'R':
1566
- return d_make_comp (di, DEMANGLE_COMPONENT_REFTEMP, d_name (di),
1567
- NULL);
1568
-
1569
- case 'A':
1570
- return d_make_comp (di, DEMANGLE_COMPONENT_HIDDEN_ALIAS,
1571
- d_encoding (di, 0), NULL);
1572
-
1573
- default:
1574
- return NULL;
1575
- }
1576
- }
1577
- else
1578
- return NULL;
1579
- }
1580
-
1581
- /* <call-offset> ::= h <nv-offset> _
1582
- ::= v <v-offset> _
1583
-
1584
- <nv-offset> ::= <(offset) number>
1585
-
1586
- <v-offset> ::= <(offset) number> _ <(virtual offset) number>
1587
-
1588
- The C parameter, if not '\0', is a character we just read which is
1589
- the start of the <call-offset>.
1590
-
1591
- We don't display the offset information anywhere. FIXME: We should
1592
- display it in verbose mode. */
1593
-
1594
- static int
1595
- d_call_offset (struct d_info *di, int c)
1596
- {
1597
- if (c == '\0')
1598
- c = d_next_char (di);
1599
-
1600
- if (c == 'h')
1601
- d_number (di);
1602
- else if (c == 'v')
1603
- {
1604
- d_number (di);
1605
- if (d_next_char (di) != '_')
1606
- return 0;
1607
- d_number (di);
1608
- }
1609
- else
1610
- return 0;
1611
-
1612
- if (d_next_char (di) != '_')
1613
- return 0;
1614
-
1615
- return 1;
1616
- }
1617
-
1618
- /* <ctor-dtor-name> ::= C1
1619
- ::= C2
1620
- ::= C3
1621
- ::= D0
1622
- ::= D1
1623
- ::= D2
1624
- */
1625
-
1626
- static struct demangle_component *
1627
- d_ctor_dtor_name (struct d_info *di)
1628
- {
1629
- if (di->last_name != NULL)
1630
- {
1631
- if (di->last_name->type == DEMANGLE_COMPONENT_NAME)
1632
- di->expansion += di->last_name->u.s_name.len;
1633
- else if (di->last_name->type == DEMANGLE_COMPONENT_SUB_STD)
1634
- di->expansion += di->last_name->u.s_string.len;
1635
- }
1636
- switch (d_next_char (di))
1637
- {
1638
- case 'C':
1639
- {
1640
- enum gnu_v3_ctor_kinds kind;
1641
-
1642
- switch (d_next_char (di))
1643
- {
1644
- case '1':
1645
- kind = gnu_v3_complete_object_ctor;
1646
- break;
1647
- case '2':
1648
- kind = gnu_v3_base_object_ctor;
1649
- break;
1650
- case '3':
1651
- kind = gnu_v3_complete_object_allocating_ctor;
1652
- break;
1653
- default:
1654
- return NULL;
1655
- }
1656
- return d_make_ctor (di, kind, di->last_name);
1657
- }
1658
-
1659
- case 'D':
1660
- {
1661
- enum gnu_v3_dtor_kinds kind;
1662
-
1663
- switch (d_next_char (di))
1664
- {
1665
- case '0':
1666
- kind = gnu_v3_deleting_dtor;
1667
- break;
1668
- case '1':
1669
- kind = gnu_v3_complete_object_dtor;
1670
- break;
1671
- case '2':
1672
- kind = gnu_v3_base_object_dtor;
1673
- break;
1674
- default:
1675
- return NULL;
1676
- }
1677
- return d_make_dtor (di, kind, di->last_name);
1678
- }
1679
-
1680
- default:
1681
- return NULL;
1682
- }
1683
- }
1684
-
1685
- /* <type> ::= <builtin-type>
1686
- ::= <function-type>
1687
- ::= <class-enum-type>
1688
- ::= <array-type>
1689
- ::= <pointer-to-member-type>
1690
- ::= <template-param>
1691
- ::= <template-template-param> <template-args>
1692
- ::= <substitution>
1693
- ::= <CV-qualifiers> <type>
1694
- ::= P <type>
1695
- ::= R <type>
1696
- ::= C <type>
1697
- ::= G <type>
1698
- ::= U <source-name> <type>
1699
-
1700
- <builtin-type> ::= various one letter codes
1701
- ::= u <source-name>
1702
- */
1703
-
1704
- CP_STATIC_IF_GLIBCPP_V3
1705
- const struct demangle_builtin_type_info
1706
- cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT] =
1707
- {
1708
- /* a */ { NL ("signed char"), NL ("signed char"), D_PRINT_DEFAULT },
1709
- /* b */ { NL ("bool"), NL ("boolean"), D_PRINT_BOOL },
1710
- /* c */ { NL ("char"), NL ("byte"), D_PRINT_DEFAULT },
1711
- /* d */ { NL ("double"), NL ("double"), D_PRINT_FLOAT },
1712
- /* e */ { NL ("long double"), NL ("long double"), D_PRINT_FLOAT },
1713
- /* f */ { NL ("float"), NL ("float"), D_PRINT_FLOAT },
1714
- /* g */ { NL ("__float128"), NL ("__float128"), D_PRINT_FLOAT },
1715
- /* h */ { NL ("unsigned char"), NL ("unsigned char"), D_PRINT_DEFAULT },
1716
- /* i */ { NL ("int"), NL ("int"), D_PRINT_INT },
1717
- /* j */ { NL ("unsigned int"), NL ("unsigned"), D_PRINT_UNSIGNED },
1718
- /* k */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT },
1719
- /* l */ { NL ("long"), NL ("long"), D_PRINT_LONG },
1720
- /* m */ { NL ("unsigned long"), NL ("unsigned long"), D_PRINT_UNSIGNED_LONG },
1721
- /* n */ { NL ("__int128"), NL ("__int128"), D_PRINT_DEFAULT },
1722
- /* o */ { NL ("unsigned __int128"), NL ("unsigned __int128"),
1723
- D_PRINT_DEFAULT },
1724
- /* p */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT },
1725
- /* q */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT },
1726
- /* r */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT },
1727
- /* s */ { NL ("short"), NL ("short"), D_PRINT_DEFAULT },
1728
- /* t */ { NL ("unsigned short"), NL ("unsigned short"), D_PRINT_DEFAULT },
1729
- /* u */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT },
1730
- /* v */ { NL ("void"), NL ("void"), D_PRINT_VOID },
1731
- /* w */ { NL ("wchar_t"), NL ("char"), D_PRINT_DEFAULT },
1732
- /* x */ { NL ("long long"), NL ("long"), D_PRINT_LONG_LONG },
1733
- /* y */ { NL ("unsigned long long"), NL ("unsigned long long"),
1734
- D_PRINT_UNSIGNED_LONG_LONG },
1735
- /* z */ { NL ("..."), NL ("..."), D_PRINT_DEFAULT },
1736
- };
1737
-
1738
- CP_STATIC_IF_GLIBCPP_V3
1739
- struct demangle_component *
1740
- cplus_demangle_type (struct d_info *di)
1741
- {
1742
- char peek;
1743
- struct demangle_component *ret;
1744
- int can_subst;
1745
-
1746
- /* The ABI specifies that when CV-qualifiers are used, the base type
1747
- is substitutable, and the fully qualified type is substitutable,
1748
- but the base type with a strict subset of the CV-qualifiers is
1749
- not substitutable. The natural recursive implementation of the
1750
- CV-qualifiers would cause subsets to be substitutable, so instead
1751
- we pull them all off now.
1752
-
1753
- FIXME: The ABI says that order-insensitive vendor qualifiers
1754
- should be handled in the same way, but we have no way to tell
1755
- which vendor qualifiers are order-insensitive and which are
1756
- order-sensitive. So we just assume that they are all
1757
- order-sensitive. g++ 3.4 supports only one vendor qualifier,
1758
- __vector, and it treats it as order-sensitive when mangling
1759
- names. */
1760
-
1761
- peek = d_peek_char (di);
1762
- if (peek == 'r' || peek == 'V' || peek == 'K')
1763
- {
1764
- struct demangle_component **pret;
1765
-
1766
- pret = d_cv_qualifiers (di, &ret, 0);
1767
- if (pret == NULL)
1768
- return NULL;
1769
- *pret = cplus_demangle_type (di);
1770
- if (! d_add_substitution (di, ret))
1771
- return NULL;
1772
- return ret;
1773
- }
1774
-
1775
- can_subst = 1;
1776
-
1777
- switch (peek)
1778
- {
1779
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g':
1780
- case 'h': case 'i': case 'j': case 'l': case 'm': case 'n':
1781
- case 'o': case 's': case 't':
1782
- case 'v': case 'w': case 'x': case 'y': case 'z':
1783
- ret = d_make_builtin_type (di,
1784
- &cplus_demangle_builtin_types[peek - 'a']);
1785
- di->expansion += ret->u.s_builtin.type->len;
1786
- can_subst = 0;
1787
- d_advance (di, 1);
1788
- break;
1789
-
1790
- case 'u':
1791
- d_advance (di, 1);
1792
- ret = d_make_comp (di, DEMANGLE_COMPONENT_VENDOR_TYPE,
1793
- d_source_name (di), NULL);
1794
- break;
1795
-
1796
- case 'F':
1797
- ret = d_function_type (di);
1798
- break;
1799
-
1800
- case '0': case '1': case '2': case '3': case '4':
1801
- case '5': case '6': case '7': case '8': case '9':
1802
- case 'N':
1803
- case 'Z':
1804
- ret = d_class_enum_type (di);
1805
- break;
1806
-
1807
- case 'A':
1808
- ret = d_array_type (di);
1809
- break;
1810
-
1811
- case 'M':
1812
- ret = d_pointer_to_member_type (di);
1813
- break;
1814
-
1815
- case 'T':
1816
- ret = d_template_param (di);
1817
- if (d_peek_char (di) == 'I')
1818
- {
1819
- /* This is <template-template-param> <template-args>. The
1820
- <template-template-param> part is a substitution
1821
- candidate. */
1822
- if (! d_add_substitution (di, ret))
1823
- return NULL;
1824
- ret = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, ret,
1825
- d_template_args (di));
1826
- }
1827
- break;
1828
-
1829
- case 'S':
1830
- /* If this is a special substitution, then it is the start of
1831
- <class-enum-type>. */
1832
- {
1833
- char peek_next;
1834
-
1835
- peek_next = d_peek_next_char (di);
1836
- if (IS_DIGIT (peek_next)
1837
- || peek_next == '_'
1838
- || IS_UPPER (peek_next))
1839
- {
1840
- ret = d_substitution (di, 0);
1841
- /* The substituted name may have been a template name and
1842
- may be followed by tepmlate args. */
1843
- if (d_peek_char (di) == 'I')
1844
- ret = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, ret,
1845
- d_template_args (di));
1846
- else
1847
- can_subst = 0;
1848
- }
1849
- else
1850
- {
1851
- ret = d_class_enum_type (di);
1852
- /* If the substitution was a complete type, then it is not
1853
- a new substitution candidate. However, if the
1854
- substitution was followed by template arguments, then
1855
- the whole thing is a substitution candidate. */
1856
- if (ret != NULL && ret->type == DEMANGLE_COMPONENT_SUB_STD)
1857
- can_subst = 0;
1858
- }
1859
- }
1860
- break;
1861
-
1862
- case 'P':
1863
- d_advance (di, 1);
1864
- ret = d_make_comp (di, DEMANGLE_COMPONENT_POINTER,
1865
- cplus_demangle_type (di), NULL);
1866
- break;
1867
-
1868
- case 'R':
1869
- d_advance (di, 1);
1870
- ret = d_make_comp (di, DEMANGLE_COMPONENT_REFERENCE,
1871
- cplus_demangle_type (di), NULL);
1872
- break;
1873
-
1874
- case 'C':
1875
- d_advance (di, 1);
1876
- ret = d_make_comp (di, DEMANGLE_COMPONENT_COMPLEX,
1877
- cplus_demangle_type (di), NULL);
1878
- break;
1879
-
1880
- case 'G':
1881
- d_advance (di, 1);
1882
- ret = d_make_comp (di, DEMANGLE_COMPONENT_IMAGINARY,
1883
- cplus_demangle_type (di), NULL);
1884
- break;
1885
-
1886
- case 'U':
1887
- d_advance (di, 1);
1888
- ret = d_source_name (di);
1889
- ret = d_make_comp (di, DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL,
1890
- cplus_demangle_type (di), ret);
1891
- break;
1892
-
1893
- default:
1894
- return NULL;
1895
- }
1896
-
1897
- if (can_subst)
1898
- {
1899
- if (! d_add_substitution (di, ret))
1900
- return NULL;
1901
- }
1902
-
1903
- return ret;
1904
- }
1905
-
1906
- /* <CV-qualifiers> ::= [r] [V] [K] */
1907
-
1908
- static struct demangle_component **
1909
- d_cv_qualifiers (struct d_info *di,
1910
- struct demangle_component **pret, int member_fn)
1911
- {
1912
- char peek;
1913
-
1914
- peek = d_peek_char (di);
1915
- while (peek == 'r' || peek == 'V' || peek == 'K')
1916
- {
1917
- enum demangle_component_type t;
1918
-
1919
- d_advance (di, 1);
1920
- if (peek == 'r')
1921
- {
1922
- t = (member_fn
1923
- ? DEMANGLE_COMPONENT_RESTRICT_THIS
1924
- : DEMANGLE_COMPONENT_RESTRICT);
1925
- di->expansion += sizeof "restrict";
1926
- }
1927
- else if (peek == 'V')
1928
- {
1929
- t = (member_fn
1930
- ? DEMANGLE_COMPONENT_VOLATILE_THIS
1931
- : DEMANGLE_COMPONENT_VOLATILE);
1932
- di->expansion += sizeof "volatile";
1933
- }
1934
- else
1935
- {
1936
- t = (member_fn
1937
- ? DEMANGLE_COMPONENT_CONST_THIS
1938
- : DEMANGLE_COMPONENT_CONST);
1939
- di->expansion += sizeof "const";
1940
- }
1941
-
1942
- *pret = d_make_comp (di, t, NULL, NULL);
1943
- if (*pret == NULL)
1944
- return NULL;
1945
- pret = &d_left (*pret);
1946
-
1947
- peek = d_peek_char (di);
1948
- }
1949
-
1950
- return pret;
1951
- }
1952
-
1953
- /* <function-type> ::= F [Y] <bare-function-type> E */
1954
-
1955
- static struct demangle_component *
1956
- d_function_type (struct d_info *di)
1957
- {
1958
- struct demangle_component *ret;
1959
-
1960
- if (d_next_char (di) != 'F')
1961
- return NULL;
1962
- if (d_peek_char (di) == 'Y')
1963
- {
1964
- /* Function has C linkage. We don't print this information.
1965
- FIXME: We should print it in verbose mode. */
1966
- d_advance (di, 1);
1967
- }
1968
- ret = d_bare_function_type (di, 1);
1969
- if (d_next_char (di) != 'E')
1970
- return NULL;
1971
- return ret;
1972
- }
1973
-
1974
- /* <bare-function-type> ::= [J]<type>+ */
1975
-
1976
- static struct demangle_component *
1977
- d_bare_function_type (struct d_info *di, int has_return_type)
1978
- {
1979
- struct demangle_component *return_type;
1980
- struct demangle_component *tl;
1981
- struct demangle_component **ptl;
1982
- char peek;
1983
-
1984
- /* Detect special qualifier indicating that the first argument
1985
- is the return type. */
1986
- peek = d_peek_char (di);
1987
- if (peek == 'J')
1988
- {
1989
- d_advance (di, 1);
1990
- has_return_type = 1;
1991
- }
1992
-
1993
- return_type = NULL;
1994
- tl = NULL;
1995
- ptl = &tl;
1996
- while (1)
1997
- {
1998
- struct demangle_component *type;
1999
-
2000
- peek = d_peek_char (di);
2001
- if (peek == '\0' || peek == 'E')
2002
- break;
2003
- type = cplus_demangle_type (di);
2004
- if (type == NULL)
2005
- return NULL;
2006
- if (has_return_type)
2007
- {
2008
- return_type = type;
2009
- has_return_type = 0;
2010
- }
2011
- else
2012
- {
2013
- *ptl = d_make_comp (di, DEMANGLE_COMPONENT_ARGLIST, type, NULL);
2014
- if (*ptl == NULL)
2015
- return NULL;
2016
- ptl = &d_right (*ptl);
2017
- }
2018
- }
2019
-
2020
- /* There should be at least one parameter type besides the optional
2021
- return type. A function which takes no arguments will have a
2022
- single parameter type void. */
2023
- if (tl == NULL)
2024
- return NULL;
2025
-
2026
- /* If we have a single parameter type void, omit it. */
2027
- if (d_right (tl) == NULL
2028
- && d_left (tl)->type == DEMANGLE_COMPONENT_BUILTIN_TYPE
2029
- && d_left (tl)->u.s_builtin.type->print == D_PRINT_VOID)
2030
- {
2031
- di->expansion -= d_left (tl)->u.s_builtin.type->len;
2032
- tl = NULL;
2033
- }
2034
-
2035
- return d_make_comp (di, DEMANGLE_COMPONENT_FUNCTION_TYPE, return_type, tl);
2036
- }
2037
-
2038
- /* <class-enum-type> ::= <name> */
2039
-
2040
- static struct demangle_component *
2041
- d_class_enum_type (struct d_info *di)
2042
- {
2043
- return d_name (di);
2044
- }
2045
-
2046
- /* <array-type> ::= A <(positive dimension) number> _ <(element) type>
2047
- ::= A [<(dimension) expression>] _ <(element) type>
2048
- */
2049
-
2050
- static struct demangle_component *
2051
- d_array_type (struct d_info *di)
2052
- {
2053
- char peek;
2054
- struct demangle_component *dim;
2055
-
2056
- if (d_next_char (di) != 'A')
2057
- return NULL;
2058
-
2059
- peek = d_peek_char (di);
2060
- if (peek == '_')
2061
- dim = NULL;
2062
- else if (IS_DIGIT (peek))
2063
- {
2064
- const char *s;
2065
-
2066
- s = d_str (di);
2067
- do
2068
- {
2069
- d_advance (di, 1);
2070
- peek = d_peek_char (di);
2071
- }
2072
- while (IS_DIGIT (peek));
2073
- dim = d_make_name (di, s, d_str (di) - s);
2074
- if (dim == NULL)
2075
- return NULL;
2076
- }
2077
- else
2078
- {
2079
- dim = d_expression (di);
2080
- if (dim == NULL)
2081
- return NULL;
2082
- }
2083
-
2084
- if (d_next_char (di) != '_')
2085
- return NULL;
2086
-
2087
- return d_make_comp (di, DEMANGLE_COMPONENT_ARRAY_TYPE, dim,
2088
- cplus_demangle_type (di));
2089
- }
2090
-
2091
- /* <pointer-to-member-type> ::= M <(class) type> <(member) type> */
2092
-
2093
- static struct demangle_component *
2094
- d_pointer_to_member_type (struct d_info *di)
2095
- {
2096
- struct demangle_component *cl;
2097
- struct demangle_component *mem;
2098
- struct demangle_component **pmem;
2099
-
2100
- if (d_next_char (di) != 'M')
2101
- return NULL;
2102
-
2103
- cl = cplus_demangle_type (di);
2104
-
2105
- /* The ABI specifies that any type can be a substitution source, and
2106
- that M is followed by two types, and that when a CV-qualified
2107
- type is seen both the base type and the CV-qualified types are
2108
- substitution sources. The ABI also specifies that for a pointer
2109
- to a CV-qualified member function, the qualifiers are attached to
2110
- the second type. Given the grammar, a plain reading of the ABI
2111
- suggests that both the CV-qualified member function and the
2112
- non-qualified member function are substitution sources. However,
2113
- g++ does not work that way. g++ treats only the CV-qualified
2114
- member function as a substitution source. FIXME. So to work
2115
- with g++, we need to pull off the CV-qualifiers here, in order to
2116
- avoid calling add_substitution() in cplus_demangle_type(). But
2117
- for a CV-qualified member which is not a function, g++ does
2118
- follow the ABI, so we need to handle that case here by calling
2119
- d_add_substitution ourselves. */
2120
-
2121
- pmem = d_cv_qualifiers (di, &mem, 1);
2122
- if (pmem == NULL)
2123
- return NULL;
2124
- *pmem = cplus_demangle_type (di);
2125
-
2126
- if (pmem != &mem && (*pmem)->type != DEMANGLE_COMPONENT_FUNCTION_TYPE)
2127
- {
2128
- if (! d_add_substitution (di, mem))
2129
- return NULL;
2130
- }
2131
-
2132
- return d_make_comp (di, DEMANGLE_COMPONENT_PTRMEM_TYPE, cl, mem);
2133
- }
2134
-
2135
- /* <template-param> ::= T_
2136
- ::= T <(parameter-2 non-negative) number> _
2137
- */
2138
-
2139
- static struct demangle_component *
2140
- d_template_param (struct d_info *di)
2141
- {
2142
- long param;
2143
-
2144
- if (d_next_char (di) != 'T')
2145
- return NULL;
2146
-
2147
- if (d_peek_char (di) == '_')
2148
- param = 0;
2149
- else
2150
- {
2151
- param = d_number (di);
2152
- if (param < 0)
2153
- return NULL;
2154
- param += 1;
2155
- }
2156
-
2157
- if (d_next_char (di) != '_')
2158
- return NULL;
2159
-
2160
- ++di->did_subs;
2161
-
2162
- return d_make_template_param (di, param);
2163
- }
2164
-
2165
- /* <template-args> ::= I <template-arg>+ E */
2166
-
2167
- static struct demangle_component *
2168
- d_template_args (struct d_info *di)
2169
- {
2170
- struct demangle_component *hold_last_name;
2171
- struct demangle_component *al;
2172
- struct demangle_component **pal;
2173
-
2174
- /* Preserve the last name we saw--don't let the template arguments
2175
- clobber it, as that would give us the wrong name for a subsequent
2176
- constructor or destructor. */
2177
- hold_last_name = di->last_name;
2178
-
2179
- if (d_next_char (di) != 'I')
2180
- return NULL;
2181
-
2182
- al = NULL;
2183
- pal = &al;
2184
- while (1)
2185
- {
2186
- struct demangle_component *a;
2187
-
2188
- a = d_template_arg (di);
2189
- if (a == NULL)
2190
- return NULL;
2191
-
2192
- *pal = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, a, NULL);
2193
- if (*pal == NULL)
2194
- return NULL;
2195
- pal = &d_right (*pal);
2196
-
2197
- if (d_peek_char (di) == 'E')
2198
- {
2199
- d_advance (di, 1);
2200
- break;
2201
- }
2202
- }
2203
-
2204
- di->last_name = hold_last_name;
2205
-
2206
- return al;
2207
- }
2208
-
2209
- /* <template-arg> ::= <type>
2210
- ::= X <expression> E
2211
- ::= <expr-primary>
2212
- */
2213
-
2214
- static struct demangle_component *
2215
- d_template_arg (struct d_info *di)
2216
- {
2217
- struct demangle_component *ret;
2218
-
2219
- switch (d_peek_char (di))
2220
- {
2221
- case 'X':
2222
- d_advance (di, 1);
2223
- ret = d_expression (di);
2224
- if (d_next_char (di) != 'E')
2225
- return NULL;
2226
- return ret;
2227
-
2228
- case 'L':
2229
- return d_expr_primary (di);
2230
-
2231
- default:
2232
- return cplus_demangle_type (di);
2233
- }
2234
- }
2235
-
2236
- /* <expression> ::= <(unary) operator-name> <expression>
2237
- ::= <(binary) operator-name> <expression> <expression>
2238
- ::= <(trinary) operator-name> <expression> <expression> <expression>
2239
- ::= st <type>
2240
- ::= <template-param>
2241
- ::= sr <type> <unqualified-name>
2242
- ::= sr <type> <unqualified-name> <template-args>
2243
- ::= <expr-primary>
2244
- */
2245
-
2246
- static struct demangle_component *
2247
- d_expression (struct d_info *di)
2248
- {
2249
- char peek;
2250
-
2251
- peek = d_peek_char (di);
2252
- if (peek == 'L')
2253
- return d_expr_primary (di);
2254
- else if (peek == 'T')
2255
- return d_template_param (di);
2256
- else if (peek == 's' && d_peek_next_char (di) == 'r')
2257
- {
2258
- struct demangle_component *type;
2259
- struct demangle_component *name;
2260
-
2261
- d_advance (di, 2);
2262
- type = cplus_demangle_type (di);
2263
- name = d_unqualified_name (di);
2264
- if (d_peek_char (di) != 'I')
2265
- return d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, type, name);
2266
- else
2267
- return d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, type,
2268
- d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, name,
2269
- d_template_args (di)));
2270
- }
2271
- else
2272
- {
2273
- struct demangle_component *op;
2274
- int args;
2275
-
2276
- op = d_operator_name (di);
2277
- if (op == NULL)
2278
- return NULL;
2279
-
2280
- if (op->type == DEMANGLE_COMPONENT_OPERATOR)
2281
- di->expansion += op->u.s_operator.op->len - 2;
2282
-
2283
- if (op->type == DEMANGLE_COMPONENT_OPERATOR
2284
- && strcmp (op->u.s_operator.op->code, "st") == 0)
2285
- return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
2286
- cplus_demangle_type (di));
2287
-
2288
- switch (op->type)
2289
- {
2290
- default:
2291
- return NULL;
2292
- case DEMANGLE_COMPONENT_OPERATOR:
2293
- args = op->u.s_operator.op->args;
2294
- break;
2295
- case DEMANGLE_COMPONENT_EXTENDED_OPERATOR:
2296
- args = op->u.s_extended_operator.args;
2297
- break;
2298
- case DEMANGLE_COMPONENT_CAST:
2299
- args = 1;
2300
- break;
2301
- }
2302
-
2303
- switch (args)
2304
- {
2305
- case 1:
2306
- return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
2307
- d_expression (di));
2308
- case 2:
2309
- {
2310
- struct demangle_component *left;
2311
-
2312
- left = d_expression (di);
2313
- return d_make_comp (di, DEMANGLE_COMPONENT_BINARY, op,
2314
- d_make_comp (di,
2315
- DEMANGLE_COMPONENT_BINARY_ARGS,
2316
- left,
2317
- d_expression (di)));
2318
- }
2319
- case 3:
2320
- {
2321
- struct demangle_component *first;
2322
- struct demangle_component *second;
2323
-
2324
- first = d_expression (di);
2325
- second = d_expression (di);
2326
- return d_make_comp (di, DEMANGLE_COMPONENT_TRINARY, op,
2327
- d_make_comp (di,
2328
- DEMANGLE_COMPONENT_TRINARY_ARG1,
2329
- first,
2330
- d_make_comp (di,
2331
- DEMANGLE_COMPONENT_TRINARY_ARG2,
2332
- second,
2333
- d_expression (di))));
2334
- }
2335
- default:
2336
- return NULL;
2337
- }
2338
- }
2339
- }
2340
-
2341
- /* <expr-primary> ::= L <type> <(value) number> E
2342
- ::= L <type> <(value) float> E
2343
- ::= L <mangled-name> E
2344
- */
2345
-
2346
- static struct demangle_component *
2347
- d_expr_primary (struct d_info *di)
2348
- {
2349
- struct demangle_component *ret;
2350
-
2351
- if (d_next_char (di) != 'L')
2352
- return NULL;
2353
- if (d_peek_char (di) == '_')
2354
- ret = cplus_demangle_mangled_name (di, 0);
2355
- else
2356
- {
2357
- struct demangle_component *type;
2358
- enum demangle_component_type t;
2359
- const char *s;
2360
-
2361
- type = cplus_demangle_type (di);
2362
- if (type == NULL)
2363
- return NULL;
2364
-
2365
- /* If we have a type we know how to print, we aren't going to
2366
- print the type name itself. */
2367
- if (type->type == DEMANGLE_COMPONENT_BUILTIN_TYPE
2368
- && type->u.s_builtin.type->print != D_PRINT_DEFAULT)
2369
- di->expansion -= type->u.s_builtin.type->len;
2370
-
2371
- /* Rather than try to interpret the literal value, we just
2372
- collect it as a string. Note that it's possible to have a
2373
- floating point literal here. The ABI specifies that the
2374
- format of such literals is machine independent. That's fine,
2375
- but what's not fine is that versions of g++ up to 3.2 with
2376
- -fabi-version=1 used upper case letters in the hex constant,
2377
- and dumped out gcc's internal representation. That makes it
2378
- hard to tell where the constant ends, and hard to dump the
2379
- constant in any readable form anyhow. We don't attempt to
2380
- handle these cases. */
2381
-
2382
- t = DEMANGLE_COMPONENT_LITERAL;
2383
- if (d_peek_char (di) == 'n')
2384
- {
2385
- t = DEMANGLE_COMPONENT_LITERAL_NEG;
2386
- d_advance (di, 1);
2387
- }
2388
- s = d_str (di);
2389
- while (d_peek_char (di) != 'E')
2390
- {
2391
- if (d_peek_char (di) == '\0')
2392
- return NULL;
2393
- d_advance (di, 1);
2394
- }
2395
- ret = d_make_comp (di, t, type, d_make_name (di, s, d_str (di) - s));
2396
- }
2397
- if (d_next_char (di) != 'E')
2398
- return NULL;
2399
- return ret;
2400
- }
2401
-
2402
- /* <local-name> ::= Z <(function) encoding> E <(entity) name> [<discriminator>]
2403
- ::= Z <(function) encoding> E s [<discriminator>]
2404
- */
2405
-
2406
- static struct demangle_component *
2407
- d_local_name (struct d_info *di)
2408
- {
2409
- struct demangle_component *function;
2410
-
2411
- if (d_next_char (di) != 'Z')
2412
- return NULL;
2413
-
2414
- function = d_encoding (di, 0);
2415
-
2416
- if (d_next_char (di) != 'E')
2417
- return NULL;
2418
-
2419
- if (d_peek_char (di) == 's')
2420
- {
2421
- d_advance (di, 1);
2422
- if (! d_discriminator (di))
2423
- return NULL;
2424
- return d_make_comp (di, DEMANGLE_COMPONENT_LOCAL_NAME, function,
2425
- d_make_name (di, "string literal",
2426
- sizeof "string literal" - 1));
2427
- }
2428
- else
2429
- {
2430
- struct demangle_component *name;
2431
-
2432
- name = d_name (di);
2433
- if (! d_discriminator (di))
2434
- return NULL;
2435
- return d_make_comp (di, DEMANGLE_COMPONENT_LOCAL_NAME, function, name);
2436
- }
2437
- }
2438
-
2439
- /* <discriminator> ::= _ <(non-negative) number>
2440
-
2441
- We demangle the discriminator, but we don't print it out. FIXME:
2442
- We should print it out in verbose mode. */
2443
-
2444
- static int
2445
- d_discriminator (struct d_info *di)
2446
- {
2447
- long discrim;
2448
-
2449
- if (d_peek_char (di) != '_')
2450
- return 1;
2451
- d_advance (di, 1);
2452
- discrim = d_number (di);
2453
- if (discrim < 0)
2454
- return 0;
2455
- return 1;
2456
- }
2457
-
2458
- /* Add a new substitution. */
2459
-
2460
- static int
2461
- d_add_substitution (struct d_info *di, struct demangle_component *dc)
2462
- {
2463
- if (dc == NULL)
2464
- return 0;
2465
- if (di->next_sub >= di->num_subs)
2466
- return 0;
2467
- di->subs[di->next_sub] = dc;
2468
- ++di->next_sub;
2469
- return 1;
2470
- }
2471
-
2472
- /* <substitution> ::= S <seq-id> _
2473
- ::= S_
2474
- ::= St
2475
- ::= Sa
2476
- ::= Sb
2477
- ::= Ss
2478
- ::= Si
2479
- ::= So
2480
- ::= Sd
2481
-
2482
- If PREFIX is non-zero, then this type is being used as a prefix in
2483
- a qualified name. In this case, for the standard substitutions, we
2484
- need to check whether we are being used as a prefix for a
2485
- constructor or destructor, and return a full template name.
2486
- Otherwise we will get something like std::iostream::~iostream()
2487
- which does not correspond particularly well to any function which
2488
- actually appears in the source.
2489
- */
2490
-
2491
- static const struct d_standard_sub_info standard_subs[] =
2492
- {
2493
- { 't', NL ("std"),
2494
- NL ("std"),
2495
- NULL, 0 },
2496
- { 'a', NL ("std::allocator"),
2497
- NL ("std::allocator"),
2498
- NL ("allocator") },
2499
- { 'b', NL ("std::basic_string"),
2500
- NL ("std::basic_string"),
2501
- NL ("basic_string") },
2502
- { 's', NL ("std::string"),
2503
- NL ("std::basic_string<char, std::char_traits<char>, std::allocator<char> >"),
2504
- NL ("basic_string") },
2505
- { 'i', NL ("std::istream"),
2506
- NL ("std::basic_istream<char, std::char_traits<char> >"),
2507
- NL ("basic_istream") },
2508
- { 'o', NL ("std::ostream"),
2509
- NL ("std::basic_ostream<char, std::char_traits<char> >"),
2510
- NL ("basic_ostream") },
2511
- { 'd', NL ("std::iostream"),
2512
- NL ("std::basic_iostream<char, std::char_traits<char> >"),
2513
- NL ("basic_iostream") }
2514
- };
2515
-
2516
- static struct demangle_component *
2517
- d_substitution (struct d_info *di, int prefix)
2518
- {
2519
- char c;
2520
-
2521
- if (d_next_char (di) != 'S')
2522
- return NULL;
2523
-
2524
- c = d_next_char (di);
2525
- if (c == '_' || IS_DIGIT (c) || IS_UPPER (c))
2526
- {
2527
- int id;
2528
-
2529
- id = 0;
2530
- if (c != '_')
2531
- {
2532
- do
2533
- {
2534
- if (IS_DIGIT (c))
2535
- id = id * 36 + c - '0';
2536
- else if (IS_UPPER (c))
2537
- id = id * 36 + c - 'A' + 10;
2538
- else
2539
- return NULL;
2540
- if (id < 0)
2541
- return NULL;
2542
- c = d_next_char (di);
2543
- }
2544
- while (c != '_');
2545
-
2546
- ++id;
2547
- }
2548
-
2549
- if (id >= di->next_sub)
2550
- return NULL;
2551
-
2552
- ++di->did_subs;
2553
-
2554
- return di->subs[id];
2555
- }
2556
- else
2557
- {
2558
- int verbose;
2559
- const struct d_standard_sub_info *p;
2560
- const struct d_standard_sub_info *pend;
2561
-
2562
- verbose = (di->options & DMGL_VERBOSE) != 0;
2563
- if (! verbose && prefix)
2564
- {
2565
- char peek;
2566
-
2567
- peek = d_peek_char (di);
2568
- if (peek == 'C' || peek == 'D')
2569
- verbose = 1;
2570
- }
2571
-
2572
- pend = (&standard_subs[0]
2573
- + sizeof standard_subs / sizeof standard_subs[0]);
2574
- for (p = &standard_subs[0]; p < pend; ++p)
2575
- {
2576
- if (c == p->code)
2577
- {
2578
- const char *s;
2579
- int len;
2580
-
2581
- if (p->set_last_name != NULL)
2582
- di->last_name = d_make_sub (di, p->set_last_name,
2583
- p->set_last_name_len);
2584
- if (verbose)
2585
- {
2586
- s = p->full_expansion;
2587
- len = p->full_len;
2588
- }
2589
- else
2590
- {
2591
- s = p->simple_expansion;
2592
- len = p->simple_len;
2593
- }
2594
- di->expansion += len;
2595
- return d_make_sub (di, s, len);
2596
- }
2597
- }
2598
-
2599
- return NULL;
2600
- }
2601
- }
2602
-
2603
- /* Resize the print buffer. */
2604
-
2605
- static void
2606
- d_print_resize (struct d_print_info *dpi, size_t add)
2607
- {
2608
- size_t need;
2609
-
2610
- if (dpi->buf == NULL)
2611
- return;
2612
- need = dpi->len + add;
2613
- while (need > dpi->alc)
2614
- {
2615
- size_t newalc;
2616
- char *newbuf;
2617
-
2618
- newalc = dpi->alc * 2;
2619
- newbuf = (char *) realloc (dpi->buf, newalc);
2620
- if (newbuf == NULL)
2621
- {
2622
- free (dpi->buf);
2623
- dpi->buf = NULL;
2624
- dpi->allocation_failure = 1;
2625
- return;
2626
- }
2627
- dpi->buf = newbuf;
2628
- dpi->alc = newalc;
2629
- }
2630
- }
2631
-
2632
- /* Append a character to the print buffer. */
2633
-
2634
- static void
2635
- d_print_append_char (struct d_print_info *dpi, int c)
2636
- {
2637
- if (dpi->buf != NULL)
2638
- {
2639
- if (dpi->len >= dpi->alc)
2640
- {
2641
- d_print_resize (dpi, 1);
2642
- if (dpi->buf == NULL)
2643
- return;
2644
- }
2645
-
2646
- dpi->buf[dpi->len] = c;
2647
- ++dpi->len;
2648
- }
2649
- }
2650
-
2651
- /* Append a buffer to the print buffer. */
2652
-
2653
- static void
2654
- d_print_append_buffer (struct d_print_info *dpi, const char *s, size_t l)
2655
- {
2656
- if (dpi->buf != NULL)
2657
- {
2658
- if (dpi->len + l > dpi->alc)
2659
- {
2660
- d_print_resize (dpi, l);
2661
- if (dpi->buf == NULL)
2662
- return;
2663
- }
2664
-
2665
- memcpy (dpi->buf + dpi->len, s, l);
2666
- dpi->len += l;
2667
- }
2668
- }
2669
-
2670
- /* Indicate that an error occurred during printing. */
2671
-
2672
- static void
2673
- d_print_error (struct d_print_info *dpi)
2674
- {
2675
- free (dpi->buf);
2676
- dpi->buf = NULL;
2677
- }
2678
-
2679
- /* Turn components into a human readable string. OPTIONS is the
2680
- options bits passed to the demangler. DC is the tree to print.
2681
- ESTIMATE is a guess at the length of the result. This returns a
2682
- string allocated by malloc, or NULL on error. On success, this
2683
- sets *PALC to the size of the allocated buffer. On failure, this
2684
- sets *PALC to 0 for a bad parse, or to 1 for a memory allocation
2685
- failure. */
2686
-
2687
- CP_STATIC_IF_GLIBCPP_V3
2688
- char *
2689
- cplus_demangle_print (int options, const struct demangle_component *dc,
2690
- int estimate, size_t *palc)
2691
- {
2692
- struct d_print_info dpi;
2693
-
2694
- dpi.options = options;
2695
-
2696
- dpi.alc = estimate + 1;
2697
- dpi.buf = (char *) malloc (dpi.alc);
2698
- if (dpi.buf == NULL)
2699
- {
2700
- *palc = 1;
2701
- return NULL;
2702
- }
2703
-
2704
- dpi.len = 0;
2705
- dpi.templates = NULL;
2706
- dpi.modifiers = NULL;
2707
-
2708
- dpi.allocation_failure = 0;
2709
-
2710
- d_print_comp (&dpi, dc);
2711
-
2712
- d_append_char (&dpi, '\0');
2713
-
2714
- if (dpi.buf != NULL)
2715
- *palc = dpi.alc;
2716
- else
2717
- *palc = dpi.allocation_failure;
2718
-
2719
- return dpi.buf;
2720
- }
2721
-
2722
- /* Subroutine to handle components. */
2723
-
2724
- static void
2725
- d_print_comp (struct d_print_info *dpi,
2726
- const struct demangle_component *dc)
2727
- {
2728
- if (dc == NULL)
2729
- {
2730
- d_print_error (dpi);
2731
- return;
2732
- }
2733
- if (d_print_saw_error (dpi))
2734
- return;
2735
-
2736
- switch (dc->type)
2737
- {
2738
- case DEMANGLE_COMPONENT_NAME:
2739
- if ((dpi->options & DMGL_JAVA) == 0)
2740
- d_append_buffer (dpi, dc->u.s_name.s, dc->u.s_name.len);
2741
- else
2742
- d_print_java_identifier (dpi, dc->u.s_name.s, dc->u.s_name.len);
2743
- return;
2744
-
2745
- case DEMANGLE_COMPONENT_QUAL_NAME:
2746
- case DEMANGLE_COMPONENT_LOCAL_NAME:
2747
- d_print_comp (dpi, d_left (dc));
2748
- if ((dpi->options & DMGL_JAVA) == 0)
2749
- d_append_string_constant (dpi, "::");
2750
- else
2751
- d_append_char (dpi, '.');
2752
- d_print_comp (dpi, d_right (dc));
2753
- return;
2754
-
2755
- case DEMANGLE_COMPONENT_TYPED_NAME:
2756
- {
2757
- struct d_print_mod *hold_modifiers;
2758
- struct demangle_component *typed_name;
2759
- struct d_print_mod adpm[4];
2760
- unsigned int i;
2761
- struct d_print_template dpt;
2762
-
2763
- /* Pass the name down to the type so that it can be printed in
2764
- the right place for the type. We also have to pass down
2765
- any CV-qualifiers, which apply to the this parameter. */
2766
- hold_modifiers = dpi->modifiers;
2767
- i = 0;
2768
- typed_name = d_left (dc);
2769
- while (typed_name != NULL)
2770
- {
2771
- if (i >= sizeof adpm / sizeof adpm[0])
2772
- {
2773
- d_print_error (dpi);
2774
- return;
2775
- }
2776
-
2777
- adpm[i].next = dpi->modifiers;
2778
- dpi->modifiers = &adpm[i];
2779
- adpm[i].mod = typed_name;
2780
- adpm[i].printed = 0;
2781
- adpm[i].templates = dpi->templates;
2782
- ++i;
2783
-
2784
- if (typed_name->type != DEMANGLE_COMPONENT_RESTRICT_THIS
2785
- && typed_name->type != DEMANGLE_COMPONENT_VOLATILE_THIS
2786
- && typed_name->type != DEMANGLE_COMPONENT_CONST_THIS)
2787
- break;
2788
-
2789
- typed_name = d_left (typed_name);
2790
- }
2791
-
2792
- /* If typed_name is a template, then it applies to the
2793
- function type as well. */
2794
- if (typed_name->type == DEMANGLE_COMPONENT_TEMPLATE)
2795
- {
2796
- dpt.next = dpi->templates;
2797
- dpi->templates = &dpt;
2798
- dpt.template_decl = typed_name;
2799
- }
2800
-
2801
- /* If typed_name is a DEMANGLE_COMPONENT_LOCAL_NAME, then
2802
- there may be CV-qualifiers on its right argument which
2803
- really apply here; this happens when parsing a class which
2804
- is local to a function. */
2805
- if (typed_name->type == DEMANGLE_COMPONENT_LOCAL_NAME)
2806
- {
2807
- struct demangle_component *local_name;
2808
-
2809
- local_name = d_right (typed_name);
2810
- while (local_name->type == DEMANGLE_COMPONENT_RESTRICT_THIS
2811
- || local_name->type == DEMANGLE_COMPONENT_VOLATILE_THIS
2812
- || local_name->type == DEMANGLE_COMPONENT_CONST_THIS)
2813
- {
2814
- if (i >= sizeof adpm / sizeof adpm[0])
2815
- {
2816
- d_print_error (dpi);
2817
- return;
2818
- }
2819
-
2820
- adpm[i] = adpm[i - 1];
2821
- adpm[i].next = &adpm[i - 1];
2822
- dpi->modifiers = &adpm[i];
2823
-
2824
- adpm[i - 1].mod = local_name;
2825
- adpm[i - 1].printed = 0;
2826
- adpm[i - 1].templates = dpi->templates;
2827
- ++i;
2828
-
2829
- local_name = d_left (local_name);
2830
- }
2831
- }
2832
-
2833
- d_print_comp (dpi, d_right (dc));
2834
-
2835
- if (typed_name->type == DEMANGLE_COMPONENT_TEMPLATE)
2836
- dpi->templates = dpt.next;
2837
-
2838
- /* If the modifiers didn't get printed by the type, print them
2839
- now. */
2840
- while (i > 0)
2841
- {
2842
- --i;
2843
- if (! adpm[i].printed)
2844
- {
2845
- d_append_char (dpi, ' ');
2846
- d_print_mod (dpi, adpm[i].mod);
2847
- }
2848
- }
2849
-
2850
- dpi->modifiers = hold_modifiers;
2851
-
2852
- return;
2853
- }
2854
-
2855
- case DEMANGLE_COMPONENT_TEMPLATE:
2856
- {
2857
- struct d_print_mod *hold_dpm;
2858
-
2859
- /* Don't push modifiers into a template definition. Doing so
2860
- could give the wrong definition for a template argument.
2861
- Instead, treat the template essentially as a name. */
2862
-
2863
- hold_dpm = dpi->modifiers;
2864
- dpi->modifiers = NULL;
2865
-
2866
- d_print_comp (dpi, d_left (dc));
2867
- if (d_last_char (dpi) == '<')
2868
- d_append_char (dpi, ' ');
2869
- d_append_char (dpi, '<');
2870
- d_print_comp (dpi, d_right (dc));
2871
- /* Avoid generating two consecutive '>' characters, to avoid
2872
- the C++ syntactic ambiguity. */
2873
- if (d_last_char (dpi) == '>')
2874
- d_append_char (dpi, ' ');
2875
- d_append_char (dpi, '>');
2876
-
2877
- dpi->modifiers = hold_dpm;
2878
-
2879
- return;
2880
- }
2881
-
2882
- case DEMANGLE_COMPONENT_TEMPLATE_PARAM:
2883
- {
2884
- long i;
2885
- struct demangle_component *a;
2886
- struct d_print_template *hold_dpt;
2887
-
2888
- if (dpi->templates == NULL)
2889
- {
2890
- d_print_error (dpi);
2891
- return;
2892
- }
2893
- i = dc->u.s_number.number;
2894
- for (a = d_right (dpi->templates->template_decl);
2895
- a != NULL;
2896
- a = d_right (a))
2897
- {
2898
- if (a->type != DEMANGLE_COMPONENT_TEMPLATE_ARGLIST)
2899
- {
2900
- d_print_error (dpi);
2901
- return;
2902
- }
2903
- if (i <= 0)
2904
- break;
2905
- --i;
2906
- }
2907
- if (i != 0 || a == NULL)
2908
- {
2909
- d_print_error (dpi);
2910
- return;
2911
- }
2912
-
2913
- /* While processing this parameter, we need to pop the list of
2914
- templates. This is because the template parameter may
2915
- itself be a reference to a parameter of an outer
2916
- template. */
2917
-
2918
- hold_dpt = dpi->templates;
2919
- dpi->templates = hold_dpt->next;
2920
-
2921
- d_print_comp (dpi, d_left (a));
2922
-
2923
- dpi->templates = hold_dpt;
2924
-
2925
- return;
2926
- }
2927
-
2928
- case DEMANGLE_COMPONENT_CTOR:
2929
- d_print_comp (dpi, dc->u.s_ctor.name);
2930
- return;
2931
-
2932
- case DEMANGLE_COMPONENT_DTOR:
2933
- d_append_char (dpi, '~');
2934
- d_print_comp (dpi, dc->u.s_dtor.name);
2935
- return;
2936
-
2937
- case DEMANGLE_COMPONENT_VTABLE:
2938
- d_append_string_constant (dpi, "vtable for ");
2939
- d_print_comp (dpi, d_left (dc));
2940
- return;
2941
-
2942
- case DEMANGLE_COMPONENT_VTT:
2943
- d_append_string_constant (dpi, "VTT for ");
2944
- d_print_comp (dpi, d_left (dc));
2945
- return;
2946
-
2947
- case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE:
2948
- d_append_string_constant (dpi, "construction vtable for ");
2949
- d_print_comp (dpi, d_left (dc));
2950
- d_append_string_constant (dpi, "-in-");
2951
- d_print_comp (dpi, d_right (dc));
2952
- return;
2953
-
2954
- case DEMANGLE_COMPONENT_TYPEINFO:
2955
- d_append_string_constant (dpi, "typeinfo for ");
2956
- d_print_comp (dpi, d_left (dc));
2957
- return;
2958
-
2959
- case DEMANGLE_COMPONENT_TYPEINFO_NAME:
2960
- d_append_string_constant (dpi, "typeinfo name for ");
2961
- d_print_comp (dpi, d_left (dc));
2962
- return;
2963
-
2964
- case DEMANGLE_COMPONENT_TYPEINFO_FN:
2965
- d_append_string_constant (dpi, "typeinfo fn for ");
2966
- d_print_comp (dpi, d_left (dc));
2967
- return;
2968
-
2969
- case DEMANGLE_COMPONENT_THUNK:
2970
- d_append_string_constant (dpi, "non-virtual thunk to ");
2971
- d_print_comp (dpi, d_left (dc));
2972
- return;
2973
-
2974
- case DEMANGLE_COMPONENT_VIRTUAL_THUNK:
2975
- d_append_string_constant (dpi, "virtual thunk to ");
2976
- d_print_comp (dpi, d_left (dc));
2977
- return;
2978
-
2979
- case DEMANGLE_COMPONENT_COVARIANT_THUNK:
2980
- d_append_string_constant (dpi, "covariant return thunk to ");
2981
- d_print_comp (dpi, d_left (dc));
2982
- return;
2983
-
2984
- case DEMANGLE_COMPONENT_JAVA_CLASS:
2985
- d_append_string_constant (dpi, "java Class for ");
2986
- d_print_comp (dpi, d_left (dc));
2987
- return;
2988
-
2989
- case DEMANGLE_COMPONENT_GUARD:
2990
- d_append_string_constant (dpi, "guard variable for ");
2991
- d_print_comp (dpi, d_left (dc));
2992
- return;
2993
-
2994
- case DEMANGLE_COMPONENT_REFTEMP:
2995
- d_append_string_constant (dpi, "reference temporary for ");
2996
- d_print_comp (dpi, d_left (dc));
2997
- return;
2998
-
2999
- case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
3000
- d_append_string_constant (dpi, "hidden alias for ");
3001
- d_print_comp (dpi, d_left (dc));
3002
- return;
3003
-
3004
- case DEMANGLE_COMPONENT_SUB_STD:
3005
- d_append_buffer (dpi, dc->u.s_string.string, dc->u.s_string.len);
3006
- return;
3007
-
3008
- case DEMANGLE_COMPONENT_RESTRICT:
3009
- case DEMANGLE_COMPONENT_VOLATILE:
3010
- case DEMANGLE_COMPONENT_CONST:
3011
- {
3012
- struct d_print_mod *pdpm;
3013
-
3014
- /* When printing arrays, it's possible to have cases where the
3015
- same CV-qualifier gets pushed on the stack multiple times.
3016
- We only need to print it once. */
3017
-
3018
- for (pdpm = dpi->modifiers; pdpm != NULL; pdpm = pdpm->next)
3019
- {
3020
- if (! pdpm->printed)
3021
- {
3022
- if (pdpm->mod->type != DEMANGLE_COMPONENT_RESTRICT
3023
- && pdpm->mod->type != DEMANGLE_COMPONENT_VOLATILE
3024
- && pdpm->mod->type != DEMANGLE_COMPONENT_CONST)
3025
- break;
3026
- if (pdpm->mod->type == dc->type)
3027
- {
3028
- d_print_comp (dpi, d_left (dc));
3029
- return;
3030
- }
3031
- }
3032
- }
3033
- }
3034
- /* Fall through. */
3035
- case DEMANGLE_COMPONENT_RESTRICT_THIS:
3036
- case DEMANGLE_COMPONENT_VOLATILE_THIS:
3037
- case DEMANGLE_COMPONENT_CONST_THIS:
3038
- case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
3039
- case DEMANGLE_COMPONENT_POINTER:
3040
- case DEMANGLE_COMPONENT_REFERENCE:
3041
- case DEMANGLE_COMPONENT_COMPLEX:
3042
- case DEMANGLE_COMPONENT_IMAGINARY:
3043
- {
3044
- /* We keep a list of modifiers on the stack. */
3045
- struct d_print_mod dpm;
3046
-
3047
- dpm.next = dpi->modifiers;
3048
- dpi->modifiers = &dpm;
3049
- dpm.mod = dc;
3050
- dpm.printed = 0;
3051
- dpm.templates = dpi->templates;
3052
-
3053
- d_print_comp (dpi, d_left (dc));
3054
-
3055
- /* If the modifier didn't get printed by the type, print it
3056
- now. */
3057
- if (! dpm.printed)
3058
- d_print_mod (dpi, dc);
3059
-
3060
- dpi->modifiers = dpm.next;
3061
-
3062
- return;
3063
- }
3064
-
3065
- case DEMANGLE_COMPONENT_BUILTIN_TYPE:
3066
- if ((dpi->options & DMGL_JAVA) == 0)
3067
- d_append_buffer (dpi, dc->u.s_builtin.type->name,
3068
- dc->u.s_builtin.type->len);
3069
- else
3070
- d_append_buffer (dpi, dc->u.s_builtin.type->java_name,
3071
- dc->u.s_builtin.type->java_len);
3072
- return;
3073
-
3074
- case DEMANGLE_COMPONENT_VENDOR_TYPE:
3075
- d_print_comp (dpi, d_left (dc));
3076
- return;
3077
-
3078
- case DEMANGLE_COMPONENT_FUNCTION_TYPE:
3079
- {
3080
- if ((dpi->options & DMGL_RET_POSTFIX) != 0)
3081
- d_print_function_type (dpi, dc, dpi->modifiers);
3082
-
3083
- /* Print return type if present */
3084
- if (d_left (dc) != NULL)
3085
- {
3086
- struct d_print_mod dpm;
3087
-
3088
- /* We must pass this type down as a modifier in order to
3089
- print it in the right location. */
3090
- dpm.next = dpi->modifiers;
3091
- dpi->modifiers = &dpm;
3092
- dpm.mod = dc;
3093
- dpm.printed = 0;
3094
- dpm.templates = dpi->templates;
3095
-
3096
- d_print_comp (dpi, d_left (dc));
3097
-
3098
- dpi->modifiers = dpm.next;
3099
-
3100
- if (dpm.printed)
3101
- return;
3102
-
3103
- /* In standard prefix notation, there is a space between the
3104
- return type and the function signature. */
3105
- if ((dpi->options & DMGL_RET_POSTFIX) == 0)
3106
- d_append_char (dpi, ' ');
3107
- }
3108
-
3109
- if ((dpi->options & DMGL_RET_POSTFIX) == 0)
3110
- d_print_function_type (dpi, dc, dpi->modifiers);
3111
-
3112
- return;
3113
- }
3114
-
3115
- case DEMANGLE_COMPONENT_ARRAY_TYPE:
3116
- {
3117
- struct d_print_mod *hold_modifiers;
3118
- struct d_print_mod adpm[4];
3119
- unsigned int i;
3120
- struct d_print_mod *pdpm;
3121
-
3122
- /* We must pass this type down as a modifier in order to print
3123
- multi-dimensional arrays correctly. If the array itself is
3124
- CV-qualified, we act as though the element type were
3125
- CV-qualified. We do this by copying the modifiers down
3126
- rather than fiddling pointers, so that we don't wind up
3127
- with a d_print_mod higher on the stack pointing into our
3128
- stack frame after we return. */
3129
-
3130
- hold_modifiers = dpi->modifiers;
3131
-
3132
- adpm[0].next = hold_modifiers;
3133
- dpi->modifiers = &adpm[0];
3134
- adpm[0].mod = dc;
3135
- adpm[0].printed = 0;
3136
- adpm[0].templates = dpi->templates;
3137
-
3138
- i = 1;
3139
- pdpm = hold_modifiers;
3140
- while (pdpm != NULL
3141
- && (pdpm->mod->type == DEMANGLE_COMPONENT_RESTRICT
3142
- || pdpm->mod->type == DEMANGLE_COMPONENT_VOLATILE
3143
- || pdpm->mod->type == DEMANGLE_COMPONENT_CONST))
3144
- {
3145
- if (! pdpm->printed)
3146
- {
3147
- if (i >= sizeof adpm / sizeof adpm[0])
3148
- {
3149
- d_print_error (dpi);
3150
- return;
3151
- }
3152
-
3153
- adpm[i] = *pdpm;
3154
- adpm[i].next = dpi->modifiers;
3155
- dpi->modifiers = &adpm[i];
3156
- pdpm->printed = 1;
3157
- ++i;
3158
- }
3159
-
3160
- pdpm = pdpm->next;
3161
- }
3162
-
3163
- d_print_comp (dpi, d_right (dc));
3164
-
3165
- dpi->modifiers = hold_modifiers;
3166
-
3167
- if (adpm[0].printed)
3168
- return;
3169
-
3170
- while (i > 1)
3171
- {
3172
- --i;
3173
- d_print_mod (dpi, adpm[i].mod);
3174
- }
3175
-
3176
- d_print_array_type (dpi, dc, dpi->modifiers);
3177
-
3178
- return;
3179
- }
3180
-
3181
- case DEMANGLE_COMPONENT_PTRMEM_TYPE:
3182
- {
3183
- struct d_print_mod dpm;
3184
-
3185
- dpm.next = dpi->modifiers;
3186
- dpi->modifiers = &dpm;
3187
- dpm.mod = dc;
3188
- dpm.printed = 0;
3189
- dpm.templates = dpi->templates;
3190
-
3191
- d_print_comp (dpi, d_right (dc));
3192
-
3193
- /* If the modifier didn't get printed by the type, print it
3194
- now. */
3195
- if (! dpm.printed)
3196
- {
3197
- d_append_char (dpi, ' ');
3198
- d_print_comp (dpi, d_left (dc));
3199
- d_append_string_constant (dpi, "::*");
3200
- }
3201
-
3202
- dpi->modifiers = dpm.next;
3203
-
3204
- return;
3205
- }
3206
-
3207
- case DEMANGLE_COMPONENT_ARGLIST:
3208
- case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST:
3209
- d_print_comp (dpi, d_left (dc));
3210
- if (d_right (dc) != NULL)
3211
- {
3212
- d_append_string_constant (dpi, ", ");
3213
- d_print_comp (dpi, d_right (dc));
3214
- }
3215
- return;
3216
-
3217
- case DEMANGLE_COMPONENT_OPERATOR:
3218
- {
3219
- char c;
3220
-
3221
- d_append_string_constant (dpi, "operator");
3222
- c = dc->u.s_operator.op->name[0];
3223
- if (IS_LOWER (c))
3224
- d_append_char (dpi, ' ');
3225
- d_append_buffer (dpi, dc->u.s_operator.op->name,
3226
- dc->u.s_operator.op->len);
3227
- return;
3228
- }
3229
-
3230
- case DEMANGLE_COMPONENT_EXTENDED_OPERATOR:
3231
- d_append_string_constant (dpi, "operator ");
3232
- d_print_comp (dpi, dc->u.s_extended_operator.name);
3233
- return;
3234
-
3235
- case DEMANGLE_COMPONENT_CAST:
3236
- d_append_string_constant (dpi, "operator ");
3237
- d_print_cast (dpi, dc);
3238
- return;
3239
-
3240
- case DEMANGLE_COMPONENT_UNARY:
3241
- if (d_left (dc)->type != DEMANGLE_COMPONENT_CAST)
3242
- d_print_expr_op (dpi, d_left (dc));
3243
- else
3244
- {
3245
- d_append_char (dpi, '(');
3246
- d_print_cast (dpi, d_left (dc));
3247
- d_append_char (dpi, ')');
3248
- }
3249
- d_append_char (dpi, '(');
3250
- d_print_comp (dpi, d_right (dc));
3251
- d_append_char (dpi, ')');
3252
- return;
3253
-
3254
- case DEMANGLE_COMPONENT_BINARY:
3255
- if (d_right (dc)->type != DEMANGLE_COMPONENT_BINARY_ARGS)
3256
- {
3257
- d_print_error (dpi);
3258
- return;
3259
- }
3260
-
3261
- /* We wrap an expression which uses the greater-than operator in
3262
- an extra layer of parens so that it does not get confused
3263
- with the '>' which ends the template parameters. */
3264
- if (d_left (dc)->type == DEMANGLE_COMPONENT_OPERATOR
3265
- && d_left (dc)->u.s_operator.op->len == 1
3266
- && d_left (dc)->u.s_operator.op->name[0] == '>')
3267
- d_append_char (dpi, '(');
3268
-
3269
- d_append_char (dpi, '(');
3270
- d_print_comp (dpi, d_left (d_right (dc)));
3271
- d_append_string_constant (dpi, ") ");
3272
- d_print_expr_op (dpi, d_left (dc));
3273
- d_append_string_constant (dpi, " (");
3274
- d_print_comp (dpi, d_right (d_right (dc)));
3275
- d_append_char (dpi, ')');
3276
-
3277
- if (d_left (dc)->type == DEMANGLE_COMPONENT_OPERATOR
3278
- && d_left (dc)->u.s_operator.op->len == 1
3279
- && d_left (dc)->u.s_operator.op->name[0] == '>')
3280
- d_append_char (dpi, ')');
3281
-
3282
- return;
3283
-
3284
- case DEMANGLE_COMPONENT_BINARY_ARGS:
3285
- /* We should only see this as part of DEMANGLE_COMPONENT_BINARY. */
3286
- d_print_error (dpi);
3287
- return;
3288
-
3289
- case DEMANGLE_COMPONENT_TRINARY:
3290
- if (d_right (dc)->type != DEMANGLE_COMPONENT_TRINARY_ARG1
3291
- || d_right (d_right (dc))->type != DEMANGLE_COMPONENT_TRINARY_ARG2)
3292
- {
3293
- d_print_error (dpi);
3294
- return;
3295
- }
3296
- d_append_char (dpi, '(');
3297
- d_print_comp (dpi, d_left (d_right (dc)));
3298
- d_append_string_constant (dpi, ") ");
3299
- d_print_expr_op (dpi, d_left (dc));
3300
- d_append_string_constant (dpi, " (");
3301
- d_print_comp (dpi, d_left (d_right (d_right (dc))));
3302
- d_append_string_constant (dpi, ") : (");
3303
- d_print_comp (dpi, d_right (d_right (d_right (dc))));
3304
- d_append_char (dpi, ')');
3305
- return;
3306
-
3307
- case DEMANGLE_COMPONENT_TRINARY_ARG1:
3308
- case DEMANGLE_COMPONENT_TRINARY_ARG2:
3309
- /* We should only see these are part of DEMANGLE_COMPONENT_TRINARY. */
3310
- d_print_error (dpi);
3311
- return;
3312
-
3313
- case DEMANGLE_COMPONENT_LITERAL:
3314
- case DEMANGLE_COMPONENT_LITERAL_NEG:
3315
- {
3316
- enum d_builtin_type_print tp;
3317
-
3318
- /* For some builtin types, produce simpler output. */
3319
- tp = D_PRINT_DEFAULT;
3320
- if (d_left (dc)->type == DEMANGLE_COMPONENT_BUILTIN_TYPE)
3321
- {
3322
- tp = d_left (dc)->u.s_builtin.type->print;
3323
- switch (tp)
3324
- {
3325
- case D_PRINT_INT:
3326
- case D_PRINT_UNSIGNED:
3327
- case D_PRINT_LONG:
3328
- case D_PRINT_UNSIGNED_LONG:
3329
- case D_PRINT_LONG_LONG:
3330
- case D_PRINT_UNSIGNED_LONG_LONG:
3331
- if (d_right (dc)->type == DEMANGLE_COMPONENT_NAME)
3332
- {
3333
- if (dc->type == DEMANGLE_COMPONENT_LITERAL_NEG)
3334
- d_append_char (dpi, '-');
3335
- d_print_comp (dpi, d_right (dc));
3336
- switch (tp)
3337
- {
3338
- default:
3339
- break;
3340
- case D_PRINT_UNSIGNED:
3341
- d_append_char (dpi, 'u');
3342
- break;
3343
- case D_PRINT_LONG:
3344
- d_append_char (dpi, 'l');
3345
- break;
3346
- case D_PRINT_UNSIGNED_LONG:
3347
- d_append_string_constant (dpi, "ul");
3348
- break;
3349
- case D_PRINT_LONG_LONG:
3350
- d_append_string_constant (dpi, "ll");
3351
- break;
3352
- case D_PRINT_UNSIGNED_LONG_LONG:
3353
- d_append_string_constant (dpi, "ull");
3354
- break;
3355
- }
3356
- return;
3357
- }
3358
- break;
3359
-
3360
- case D_PRINT_BOOL:
3361
- if (d_right (dc)->type == DEMANGLE_COMPONENT_NAME
3362
- && d_right (dc)->u.s_name.len == 1
3363
- && dc->type == DEMANGLE_COMPONENT_LITERAL)
3364
- {
3365
- switch (d_right (dc)->u.s_name.s[0])
3366
- {
3367
- case '0':
3368
- d_append_string_constant (dpi, "false");
3369
- return;
3370
- case '1':
3371
- d_append_string_constant (dpi, "true");
3372
- return;
3373
- default:
3374
- break;
3375
- }
3376
- }
3377
- break;
3378
-
3379
- default:
3380
- break;
3381
- }
3382
- }
3383
-
3384
- d_append_char (dpi, '(');
3385
- d_print_comp (dpi, d_left (dc));
3386
- d_append_char (dpi, ')');
3387
- if (dc->type == DEMANGLE_COMPONENT_LITERAL_NEG)
3388
- d_append_char (dpi, '-');
3389
- if (tp == D_PRINT_FLOAT)
3390
- d_append_char (dpi, '[');
3391
- d_print_comp (dpi, d_right (dc));
3392
- if (tp == D_PRINT_FLOAT)
3393
- d_append_char (dpi, ']');
3394
- }
3395
- return;
3396
-
3397
- default:
3398
- d_print_error (dpi);
3399
- return;
3400
- }
3401
- }
3402
-
3403
- /* Print a Java dentifier. For Java we try to handle encoded extended
3404
- Unicode characters. The C++ ABI doesn't mention Unicode encoding,
3405
- so we don't it for C++. Characters are encoded as
3406
- __U<hex-char>+_. */
3407
-
3408
- static void
3409
- d_print_java_identifier (struct d_print_info *dpi, const char *name, int len)
3410
- {
3411
- const char *p;
3412
- const char *end;
3413
-
3414
- end = name + len;
3415
- for (p = name; p < end; ++p)
3416
- {
3417
- if (end - p > 3
3418
- && p[0] == '_'
3419
- && p[1] == '_'
3420
- && p[2] == 'U')
3421
- {
3422
- unsigned long c;
3423
- const char *q;
3424
-
3425
- c = 0;
3426
- for (q = p + 3; q < end; ++q)
3427
- {
3428
- int dig;
3429
-
3430
- if (IS_DIGIT (*q))
3431
- dig = *q - '0';
3432
- else if (*q >= 'A' && *q <= 'F')
3433
- dig = *q - 'A' + 10;
3434
- else if (*q >= 'a' && *q <= 'f')
3435
- dig = *q - 'a' + 10;
3436
- else
3437
- break;
3438
-
3439
- c = c * 16 + dig;
3440
- }
3441
- /* If the Unicode character is larger than 256, we don't try
3442
- to deal with it here. FIXME. */
3443
- if (q < end && *q == '_' && c < 256)
3444
- {
3445
- d_append_char (dpi, c);
3446
- p = q;
3447
- continue;
3448
- }
3449
- }
3450
-
3451
- d_append_char (dpi, *p);
3452
- }
3453
- }
3454
-
3455
- /* Print a list of modifiers. SUFFIX is 1 if we are printing
3456
- qualifiers on this after printing a function. */
3457
-
3458
- static void
3459
- d_print_mod_list (struct d_print_info *dpi,
3460
- struct d_print_mod *mods, int suffix)
3461
- {
3462
- struct d_print_template *hold_dpt;
3463
-
3464
- if (mods == NULL || d_print_saw_error (dpi))
3465
- return;
3466
-
3467
- if (mods->printed
3468
- || (! suffix
3469
- && (mods->mod->type == DEMANGLE_COMPONENT_RESTRICT_THIS
3470
- || mods->mod->type == DEMANGLE_COMPONENT_VOLATILE_THIS
3471
- || mods->mod->type == DEMANGLE_COMPONENT_CONST_THIS)))
3472
- {
3473
- d_print_mod_list (dpi, mods->next, suffix);
3474
- return;
3475
- }
3476
-
3477
- mods->printed = 1;
3478
-
3479
- hold_dpt = dpi->templates;
3480
- dpi->templates = mods->templates;
3481
-
3482
- if (mods->mod->type == DEMANGLE_COMPONENT_FUNCTION_TYPE)
3483
- {
3484
- d_print_function_type (dpi, mods->mod, mods->next);
3485
- dpi->templates = hold_dpt;
3486
- return;
3487
- }
3488
- else if (mods->mod->type == DEMANGLE_COMPONENT_ARRAY_TYPE)
3489
- {
3490
- d_print_array_type (dpi, mods->mod, mods->next);
3491
- dpi->templates = hold_dpt;
3492
- return;
3493
- }
3494
- else if (mods->mod->type == DEMANGLE_COMPONENT_LOCAL_NAME)
3495
- {
3496
- struct d_print_mod *hold_modifiers;
3497
- struct demangle_component *dc;
3498
-
3499
- /* When this is on the modifier stack, we have pulled any
3500
- qualifiers off the right argument already. Otherwise, we
3501
- print it as usual, but don't let the left argument see any
3502
- modifiers. */
3503
-
3504
- hold_modifiers = dpi->modifiers;
3505
- dpi->modifiers = NULL;
3506
- d_print_comp (dpi, d_left (mods->mod));
3507
- dpi->modifiers = hold_modifiers;
3508
-
3509
- if ((dpi->options & DMGL_JAVA) == 0)
3510
- d_append_string_constant (dpi, "::");
3511
- else
3512
- d_append_char (dpi, '.');
3513
-
3514
- dc = d_right (mods->mod);
3515
- while (dc->type == DEMANGLE_COMPONENT_RESTRICT_THIS
3516
- || dc->type == DEMANGLE_COMPONENT_VOLATILE_THIS
3517
- || dc->type == DEMANGLE_COMPONENT_CONST_THIS)
3518
- dc = d_left (dc);
3519
-
3520
- d_print_comp (dpi, dc);
3521
-
3522
- dpi->templates = hold_dpt;
3523
- return;
3524
- }
3525
-
3526
- d_print_mod (dpi, mods->mod);
3527
-
3528
- dpi->templates = hold_dpt;
3529
-
3530
- d_print_mod_list (dpi, mods->next, suffix);
3531
- }
3532
-
3533
- /* Print a modifier. */
3534
-
3535
- static void
3536
- d_print_mod (struct d_print_info *dpi,
3537
- const struct demangle_component *mod)
3538
- {
3539
- switch (mod->type)
3540
- {
3541
- case DEMANGLE_COMPONENT_RESTRICT:
3542
- case DEMANGLE_COMPONENT_RESTRICT_THIS:
3543
- d_append_string_constant (dpi, " restrict");
3544
- return;
3545
- case DEMANGLE_COMPONENT_VOLATILE:
3546
- case DEMANGLE_COMPONENT_VOLATILE_THIS:
3547
- d_append_string_constant (dpi, " volatile");
3548
- return;
3549
- case DEMANGLE_COMPONENT_CONST:
3550
- case DEMANGLE_COMPONENT_CONST_THIS:
3551
- d_append_string_constant (dpi, " const");
3552
- return;
3553
- case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
3554
- d_append_char (dpi, ' ');
3555
- d_print_comp (dpi, d_right (mod));
3556
- return;
3557
- case DEMANGLE_COMPONENT_POINTER:
3558
- /* There is no pointer symbol in Java. */
3559
- if ((dpi->options & DMGL_JAVA) == 0)
3560
- d_append_char (dpi, '*');
3561
- return;
3562
- case DEMANGLE_COMPONENT_REFERENCE:
3563
- d_append_char (dpi, '&');
3564
- return;
3565
- case DEMANGLE_COMPONENT_COMPLEX:
3566
- d_append_string_constant (dpi, "complex ");
3567
- return;
3568
- case DEMANGLE_COMPONENT_IMAGINARY:
3569
- d_append_string_constant (dpi, "imaginary ");
3570
- return;
3571
- case DEMANGLE_COMPONENT_PTRMEM_TYPE:
3572
- if (d_last_char (dpi) != '(')
3573
- d_append_char (dpi, ' ');
3574
- d_print_comp (dpi, d_left (mod));
3575
- d_append_string_constant (dpi, "::*");
3576
- return;
3577
- case DEMANGLE_COMPONENT_TYPED_NAME:
3578
- d_print_comp (dpi, d_left (mod));
3579
- return;
3580
- default:
3581
- /* Otherwise, we have something that won't go back on the
3582
- modifier stack, so we can just print it. */
3583
- d_print_comp (dpi, mod);
3584
- return;
3585
- }
3586
- }
3587
-
3588
- /* Print a function type, except for the return type. */
3589
-
3590
- static void
3591
- d_print_function_type (struct d_print_info *dpi,
3592
- const struct demangle_component *dc,
3593
- struct d_print_mod *mods)
3594
- {
3595
- int need_paren;
3596
- int saw_mod;
3597
- int need_space;
3598
- struct d_print_mod *p;
3599
- struct d_print_mod *hold_modifiers;
3600
-
3601
- need_paren = 0;
3602
- saw_mod = 0;
3603
- need_space = 0;
3604
- for (p = mods; p != NULL; p = p->next)
3605
- {
3606
- if (p->printed)
3607
- break;
3608
-
3609
- saw_mod = 1;
3610
- switch (p->mod->type)
3611
- {
3612
- case DEMANGLE_COMPONENT_POINTER:
3613
- case DEMANGLE_COMPONENT_REFERENCE:
3614
- need_paren = 1;
3615
- break;
3616
- case DEMANGLE_COMPONENT_RESTRICT:
3617
- case DEMANGLE_COMPONENT_VOLATILE:
3618
- case DEMANGLE_COMPONENT_CONST:
3619
- case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
3620
- case DEMANGLE_COMPONENT_COMPLEX:
3621
- case DEMANGLE_COMPONENT_IMAGINARY:
3622
- case DEMANGLE_COMPONENT_PTRMEM_TYPE:
3623
- need_space = 1;
3624
- need_paren = 1;
3625
- break;
3626
- case DEMANGLE_COMPONENT_RESTRICT_THIS:
3627
- case DEMANGLE_COMPONENT_VOLATILE_THIS:
3628
- case DEMANGLE_COMPONENT_CONST_THIS:
3629
- break;
3630
- default:
3631
- break;
3632
- }
3633
- if (need_paren)
3634
- break;
3635
- }
3636
-
3637
- if (d_left (dc) != NULL && ! saw_mod)
3638
- need_paren = 1;
3639
-
3640
- if (need_paren)
3641
- {
3642
- if (! need_space)
3643
- {
3644
- if (d_last_char (dpi) != '('
3645
- && d_last_char (dpi) != '*')
3646
- need_space = 1;
3647
- }
3648
- if (need_space && d_last_char (dpi) != ' ')
3649
- d_append_char (dpi, ' ');
3650
- d_append_char (dpi, '(');
3651
- }
3652
-
3653
- hold_modifiers = dpi->modifiers;
3654
- dpi->modifiers = NULL;
3655
-
3656
- d_print_mod_list (dpi, mods, 0);
3657
-
3658
- if (need_paren)
3659
- d_append_char (dpi, ')');
3660
-
3661
- d_append_char (dpi, '(');
3662
-
3663
- if (d_right (dc) != NULL)
3664
- d_print_comp (dpi, d_right (dc));
3665
-
3666
- d_append_char (dpi, ')');
3667
-
3668
- d_print_mod_list (dpi, mods, 1);
3669
-
3670
- dpi->modifiers = hold_modifiers;
3671
- }
3672
-
3673
- /* Print an array type, except for the element type. */
3674
-
3675
- static void
3676
- d_print_array_type (struct d_print_info *dpi,
3677
- const struct demangle_component *dc,
3678
- struct d_print_mod *mods)
3679
- {
3680
- int need_space;
3681
-
3682
- need_space = 1;
3683
- if (mods != NULL)
3684
- {
3685
- int need_paren;
3686
- struct d_print_mod *p;
3687
-
3688
- need_paren = 0;
3689
- for (p = mods; p != NULL; p = p->next)
3690
- {
3691
- if (! p->printed)
3692
- {
3693
- if (p->mod->type == DEMANGLE_COMPONENT_ARRAY_TYPE)
3694
- {
3695
- need_space = 0;
3696
- break;
3697
- }
3698
- else
3699
- {
3700
- need_paren = 1;
3701
- need_space = 1;
3702
- break;
3703
- }
3704
- }
3705
- }
3706
-
3707
- if (need_paren)
3708
- d_append_string_constant (dpi, " (");
3709
-
3710
- d_print_mod_list (dpi, mods, 0);
3711
-
3712
- if (need_paren)
3713
- d_append_char (dpi, ')');
3714
- }
3715
-
3716
- if (need_space)
3717
- d_append_char (dpi, ' ');
3718
-
3719
- d_append_char (dpi, '[');
3720
-
3721
- if (d_left (dc) != NULL)
3722
- d_print_comp (dpi, d_left (dc));
3723
-
3724
- d_append_char (dpi, ']');
3725
- }
3726
-
3727
- /* Print an operator in an expression. */
3728
-
3729
- static void
3730
- d_print_expr_op (struct d_print_info *dpi,
3731
- const struct demangle_component *dc)
3732
- {
3733
- if (dc->type == DEMANGLE_COMPONENT_OPERATOR)
3734
- d_append_buffer (dpi, dc->u.s_operator.op->name,
3735
- dc->u.s_operator.op->len);
3736
- else
3737
- d_print_comp (dpi, dc);
3738
- }
3739
-
3740
- /* Print a cast. */
3741
-
3742
- static void
3743
- d_print_cast (struct d_print_info *dpi,
3744
- const struct demangle_component *dc)
3745
- {
3746
- if (d_left (dc)->type != DEMANGLE_COMPONENT_TEMPLATE)
3747
- d_print_comp (dpi, d_left (dc));
3748
- else
3749
- {
3750
- struct d_print_mod *hold_dpm;
3751
- struct d_print_template dpt;
3752
-
3753
- /* It appears that for a templated cast operator, we need to put
3754
- the template parameters in scope for the operator name, but
3755
- not for the parameters. The effect is that we need to handle
3756
- the template printing here. */
3757
-
3758
- hold_dpm = dpi->modifiers;
3759
- dpi->modifiers = NULL;
3760
-
3761
- dpt.next = dpi->templates;
3762
- dpi->templates = &dpt;
3763
- dpt.template_decl = d_left (dc);
3764
-
3765
- d_print_comp (dpi, d_left (d_left (dc)));
3766
-
3767
- dpi->templates = dpt.next;
3768
-
3769
- if (d_last_char (dpi) == '<')
3770
- d_append_char (dpi, ' ');
3771
- d_append_char (dpi, '<');
3772
- d_print_comp (dpi, d_right (d_left (dc)));
3773
- /* Avoid generating two consecutive '>' characters, to avoid
3774
- the C++ syntactic ambiguity. */
3775
- if (d_last_char (dpi) == '>')
3776
- d_append_char (dpi, ' ');
3777
- d_append_char (dpi, '>');
3778
-
3779
- dpi->modifiers = hold_dpm;
3780
- }
3781
- }
3782
-
3783
- /* Initialize the information structure we use to pass around
3784
- information. */
3785
-
3786
- CP_STATIC_IF_GLIBCPP_V3
3787
- void
3788
- cplus_demangle_init_info (const char *mangled, int options, size_t len,
3789
- struct d_info *di)
3790
- {
3791
- di->s = mangled;
3792
- di->send = mangled + len;
3793
- di->options = options;
3794
-
3795
- di->n = mangled;
3796
-
3797
- /* We can not need more components than twice the number of chars in
3798
- the mangled string. Most components correspond directly to
3799
- chars, but the ARGLIST types are exceptions. */
3800
- di->num_comps = 2 * len;
3801
- di->next_comp = 0;
3802
-
3803
- /* Similarly, we can not need more substitutions than there are
3804
- chars in the mangled string. */
3805
- di->num_subs = len;
3806
- di->next_sub = 0;
3807
- di->did_subs = 0;
3808
-
3809
- di->last_name = NULL;
3810
-
3811
- di->expansion = 0;
3812
- }
3813
-
3814
- /* Entry point for the demangler. If MANGLED is a g++ v3 ABI mangled
3815
- name, return a buffer allocated with malloc holding the demangled
3816
- name. OPTIONS is the usual libiberty demangler options. On
3817
- success, this sets *PALC to the allocated size of the returned
3818
- buffer. On failure, this sets *PALC to 0 for a bad name, or 1 for
3819
- a memory allocation failure. On failure, this returns NULL. */
3820
-
3821
- static char *
3822
- d_demangle (const char* mangled, int options, size_t *palc)
3823
- {
3824
- size_t len;
3825
- int type;
3826
- struct d_info di;
3827
- struct demangle_component *dc;
3828
- int estimate;
3829
- char *ret;
3830
-
3831
- *palc = 0;
3832
-
3833
- len = strlen (mangled);
3834
-
3835
- if (mangled[0] == '_' && mangled[1] == 'Z')
3836
- type = 0;
3837
- else if (strncmp (mangled, "_GLOBAL_", 8) == 0
3838
- && (mangled[8] == '.' || mangled[8] == '_' || mangled[8] == '$')
3839
- && (mangled[9] == 'D' || mangled[9] == 'I')
3840
- && mangled[10] == '_')
3841
- {
3842
- char *r;
3843
-
3844
- r = (char *) malloc (40 + len - 11);
3845
- if (r == NULL)
3846
- *palc = 1;
3847
- else
3848
- {
3849
- if (mangled[9] == 'I')
3850
- strcpy (r, "global constructors keyed to ");
3851
- else
3852
- strcpy (r, "global destructors keyed to ");
3853
- strcat (r, mangled + 11);
3854
- }
3855
- return r;
3856
- }
3857
- else
3858
- {
3859
- if ((options & DMGL_TYPES) == 0)
3860
- return NULL;
3861
- type = 1;
3862
- }
3863
-
3864
- cplus_demangle_init_info (mangled, options, len, &di);
3865
-
3866
- {
3867
- #ifdef CP_DYNAMIC_ARRAYS
3868
- __extension__ struct demangle_component comps[di.num_comps];
3869
- __extension__ struct demangle_component *subs[di.num_subs];
3870
-
3871
- di.comps = &comps[0];
3872
- di.subs = &subs[0];
3873
- #else
3874
- di.comps = ((struct demangle_component *)
3875
- malloc (di.num_comps * sizeof (struct demangle_component)));
3876
- di.subs = ((struct demangle_component **)
3877
- malloc (di.num_subs * sizeof (struct demangle_component *)));
3878
- if (di.comps == NULL || di.subs == NULL)
3879
- {
3880
- if (di.comps != NULL)
3881
- free (di.comps);
3882
- if (di.subs != NULL)
3883
- free (di.subs);
3884
- *palc = 1;
3885
- return NULL;
3886
- }
3887
- #endif
3888
-
3889
- if (! type)
3890
- dc = cplus_demangle_mangled_name (&di, 1);
3891
- else
3892
- dc = cplus_demangle_type (&di);
3893
-
3894
- /* If DMGL_PARAMS is set, then if we didn't consume the entire
3895
- mangled string, then we didn't successfully demangle it. If
3896
- DMGL_PARAMS is not set, we didn't look at the trailing
3897
- parameters. */
3898
- if (((options & DMGL_PARAMS) != 0) && d_peek_char (&di) != '\0')
3899
- dc = NULL;
3900
-
3901
- #ifdef CP_DEMANGLE_DEBUG
3902
- if (dc == NULL)
3903
- printf ("failed demangling\n");
3904
- else
3905
- d_dump (dc, 0);
3906
- #endif
3907
-
3908
- /* We try to guess the length of the demangled string, to minimize
3909
- calls to realloc during demangling. */
3910
- estimate = len + di.expansion + 10 * di.did_subs;
3911
- estimate += estimate / 8;
3912
-
3913
- ret = NULL;
3914
- if (dc != NULL)
3915
- ret = cplus_demangle_print (options, dc, estimate, palc);
3916
-
3917
- #ifndef CP_DYNAMIC_ARRAYS
3918
- free (di.comps);
3919
- free (di.subs);
3920
- #endif
3921
-
3922
- #ifdef CP_DEMANGLE_DEBUG
3923
- if (ret != NULL)
3924
- {
3925
- int rlen;
3926
-
3927
- rlen = strlen (ret);
3928
- if (rlen > 2 * estimate)
3929
- printf ("*** Length %d much greater than estimate %d\n",
3930
- rlen, estimate);
3931
- else if (rlen > estimate)
3932
- printf ("*** Length %d greater than estimate %d\n",
3933
- rlen, estimate);
3934
- else if (rlen < estimate / 2)
3935
- printf ("*** Length %d much less than estimate %d\n",
3936
- rlen, estimate);
3937
- }
3938
- #endif
3939
- }
3940
-
3941
- return ret;
3942
- }
3943
-
3944
- #if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3)
3945
-
3946
- extern char *__cxa_demangle (const char *, char *, size_t *, int *);
3947
-
3948
- /* ia64 ABI-mandated entry point in the C++ runtime library for
3949
- performing demangling. MANGLED_NAME is a NUL-terminated character
3950
- string containing the name to be demangled.
3951
-
3952
- OUTPUT_BUFFER is a region of memory, allocated with malloc, of
3953
- *LENGTH bytes, into which the demangled name is stored. If
3954
- OUTPUT_BUFFER is not long enough, it is expanded using realloc.
3955
- OUTPUT_BUFFER may instead be NULL; in that case, the demangled name
3956
- is placed in a region of memory allocated with malloc.
3957
-
3958
- If LENGTH is non-NULL, the length of the buffer conaining the
3959
- demangled name, is placed in *LENGTH.
3960
-
3961
- The return value is a pointer to the start of the NUL-terminated
3962
- demangled name, or NULL if the demangling fails. The caller is
3963
- responsible for deallocating this memory using free.
3964
-
3965
- *STATUS is set to one of the following values:
3966
- 0: The demangling operation succeeded.
3967
- -1: A memory allocation failure occurred.
3968
- -2: MANGLED_NAME is not a valid name under the C++ ABI mangling rules.
3969
- -3: One of the arguments is invalid.
3970
-
3971
- The demangling is performed using the C++ ABI mangling rules, with
3972
- GNU extensions. */
3973
-
3974
- char *
3975
- __cxa_demangle (const char *mangled_name, char *output_buffer,
3976
- size_t *length, int *status)
3977
- {
3978
- char *demangled;
3979
- size_t alc;
3980
-
3981
- if (mangled_name == NULL)
3982
- {
3983
- if (status != NULL)
3984
- *status = -3;
3985
- return NULL;
3986
- }
3987
-
3988
- if (output_buffer != NULL && length == NULL)
3989
- {
3990
- if (status != NULL)
3991
- *status = -3;
3992
- return NULL;
3993
- }
3994
-
3995
- demangled = d_demangle (mangled_name, DMGL_PARAMS | DMGL_TYPES, &alc);
3996
-
3997
- if (demangled == NULL)
3998
- {
3999
- if (status != NULL)
4000
- {
4001
- if (alc == 1)
4002
- *status = -1;
4003
- else
4004
- *status = -2;
4005
- }
4006
- return NULL;
4007
- }
4008
-
4009
- if (output_buffer == NULL)
4010
- {
4011
- if (length != NULL)
4012
- *length = alc;
4013
- }
4014
- else
4015
- {
4016
- if (strlen (demangled) < *length)
4017
- {
4018
- strcpy (output_buffer, demangled);
4019
- free (demangled);
4020
- demangled = output_buffer;
4021
- }
4022
- else
4023
- {
4024
- free (output_buffer);
4025
- *length = alc;
4026
- }
4027
- }
4028
-
4029
- if (status != NULL)
4030
- *status = 0;
4031
-
4032
- return demangled;
4033
- }
4034
-
4035
- #else /* ! (IN_LIBGCC2 || IN_GLIBCPP_V3) */
4036
-
4037
- /* Entry point for libiberty demangler. If MANGLED is a g++ v3 ABI
4038
- mangled name, return a buffer allocated with malloc holding the
4039
- demangled name. Otherwise, return NULL. */
4040
-
4041
- char *
4042
- cplus_demangle_v3 (const char* mangled, int options)
4043
- {
4044
- size_t alc;
4045
-
4046
- return d_demangle (mangled, options, &alc);
4047
- }
4048
-
4049
- /* Demangle a Java symbol. Java uses a subset of the V3 ABI C++ mangling
4050
- conventions, but the output formatting is a little different.
4051
- This instructs the C++ demangler not to emit pointer characters ("*"), and
4052
- to use Java's namespace separator symbol ("." instead of "::"). It then
4053
- does an additional pass over the demangled output to replace instances
4054
- of JArray<TYPE> with TYPE[]. */
4055
-
4056
- char *
4057
- java_demangle_v3 (const char* mangled)
4058
- {
4059
- size_t alc;
4060
- char *demangled;
4061
- int nesting;
4062
- char *from;
4063
- char *to;
4064
-
4065
- demangled = d_demangle (mangled, DMGL_JAVA | DMGL_PARAMS | DMGL_RET_POSTFIX,
4066
- &alc);
4067
-
4068
- if (demangled == NULL)
4069
- return NULL;
4070
-
4071
- nesting = 0;
4072
- from = demangled;
4073
- to = from;
4074
- while (*from != '\0')
4075
- {
4076
- if (strncmp (from, "JArray<", 7) == 0)
4077
- {
4078
- from += 7;
4079
- ++nesting;
4080
- }
4081
- else if (nesting > 0 && *from == '>')
4082
- {
4083
- while (to > demangled && to[-1] == ' ')
4084
- --to;
4085
- *to++ = '[';
4086
- *to++ = ']';
4087
- --nesting;
4088
- ++from;
4089
- }
4090
- else
4091
- *to++ = *from++;
4092
- }
4093
-
4094
- *to = '\0';
4095
-
4096
- return demangled;
4097
- }
4098
-
4099
- #endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */
4100
-
4101
- #ifndef IN_GLIBCPP_V3
4102
-
4103
- /* Demangle a string in order to find out whether it is a constructor
4104
- or destructor. Return non-zero on success. Set *CTOR_KIND and
4105
- *DTOR_KIND appropriately. */
4106
-
4107
- static int
4108
- is_ctor_or_dtor (const char *mangled,
4109
- enum gnu_v3_ctor_kinds *ctor_kind,
4110
- enum gnu_v3_dtor_kinds *dtor_kind)
4111
- {
4112
- struct d_info di;
4113
- struct demangle_component *dc;
4114
- int ret;
4115
-
4116
- *ctor_kind = (enum gnu_v3_ctor_kinds) 0;
4117
- *dtor_kind = (enum gnu_v3_dtor_kinds) 0;
4118
-
4119
- cplus_demangle_init_info (mangled, DMGL_GNU_V3, strlen (mangled), &di);
4120
-
4121
- {
4122
- #ifdef CP_DYNAMIC_ARRAYS
4123
- __extension__ struct demangle_component comps[di.num_comps];
4124
- __extension__ struct demangle_component *subs[di.num_subs];
4125
-
4126
- di.comps = &comps[0];
4127
- di.subs = &subs[0];
4128
- #else
4129
- di.comps = ((struct demangle_component *)
4130
- malloc (di.num_comps * sizeof (struct demangle_component)));
4131
- di.subs = ((struct demangle_component **)
4132
- malloc (di.num_subs * sizeof (struct demangle_component *)));
4133
- if (di.comps == NULL || di.subs == NULL)
4134
- {
4135
- if (di.comps != NULL)
4136
- free (di.comps);
4137
- if (di.subs != NULL)
4138
- free (di.subs);
4139
- return 0;
4140
- }
4141
- #endif
4142
-
4143
- dc = cplus_demangle_mangled_name (&di, 1);
4144
-
4145
- /* Note that because we did not pass DMGL_PARAMS, we don't expect
4146
- to demangle the entire string. */
4147
-
4148
- ret = 0;
4149
- while (dc != NULL)
4150
- {
4151
- switch (dc->type)
4152
- {
4153
- default:
4154
- dc = NULL;
4155
- break;
4156
- case DEMANGLE_COMPONENT_TYPED_NAME:
4157
- case DEMANGLE_COMPONENT_TEMPLATE:
4158
- case DEMANGLE_COMPONENT_RESTRICT_THIS:
4159
- case DEMANGLE_COMPONENT_VOLATILE_THIS:
4160
- case DEMANGLE_COMPONENT_CONST_THIS:
4161
- dc = d_left (dc);
4162
- break;
4163
- case DEMANGLE_COMPONENT_QUAL_NAME:
4164
- case DEMANGLE_COMPONENT_LOCAL_NAME:
4165
- dc = d_right (dc);
4166
- break;
4167
- case DEMANGLE_COMPONENT_CTOR:
4168
- *ctor_kind = dc->u.s_ctor.kind;
4169
- ret = 1;
4170
- dc = NULL;
4171
- break;
4172
- case DEMANGLE_COMPONENT_DTOR:
4173
- *dtor_kind = dc->u.s_dtor.kind;
4174
- ret = 1;
4175
- dc = NULL;
4176
- break;
4177
- }
4178
- }
4179
-
4180
- #ifndef CP_DYNAMIC_ARRAYS
4181
- free (di.subs);
4182
- free (di.comps);
4183
- #endif
4184
- }
4185
-
4186
- return ret;
4187
- }
4188
-
4189
- /* Return whether NAME is the mangled form of a g++ V3 ABI constructor
4190
- name. A non-zero return indicates the type of constructor. */
4191
-
4192
- enum gnu_v3_ctor_kinds
4193
- is_gnu_v3_mangled_ctor (const char *name)
4194
- {
4195
- enum gnu_v3_ctor_kinds ctor_kind;
4196
- enum gnu_v3_dtor_kinds dtor_kind;
4197
-
4198
- if (! is_ctor_or_dtor (name, &ctor_kind, &dtor_kind))
4199
- return (enum gnu_v3_ctor_kinds) 0;
4200
- return ctor_kind;
4201
- }
4202
-
4203
-
4204
- /* Return whether NAME is the mangled form of a g++ V3 ABI destructor
4205
- name. A non-zero return indicates the type of destructor. */
4206
-
4207
- enum gnu_v3_dtor_kinds
4208
- is_gnu_v3_mangled_dtor (const char *name)
4209
- {
4210
- enum gnu_v3_ctor_kinds ctor_kind;
4211
- enum gnu_v3_dtor_kinds dtor_kind;
4212
-
4213
- if (! is_ctor_or_dtor (name, &ctor_kind, &dtor_kind))
4214
- return (enum gnu_v3_dtor_kinds) 0;
4215
- return dtor_kind;
4216
- }
4217
-
4218
- #endif /* IN_GLIBCPP_V3 */
4219
-
4220
- int main(int argc, char **argv)
4221
- {
4222
- int status;
4223
- printf("*%s*\n", __cxa_demangle(argv[1], 0, 0, &status));
4224
- return 1;
4225
- }
4226
-