@shd101wyy/yo 0.0.2

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 (339) hide show
  1. package/LICENSE.md +17 -0
  2. package/README.md +80 -0
  3. package/out/cjs/index.cjs +51 -0
  4. package/out/cjs/yo-cli.cjs +2158 -0
  5. package/out/esm/index.mjs +51 -0
  6. package/out/types/src/codegen/async/runtime.d.ts +2 -0
  7. package/out/types/src/codegen/async/state-code-gen.d.ts +10 -0
  8. package/out/types/src/codegen/async/state-machine.d.ts +13 -0
  9. package/out/types/src/codegen/c/collection.d.ts +3 -0
  10. package/out/types/src/codegen/codegen-c.d.ts +12 -0
  11. package/out/types/src/codegen/constants.d.ts +3 -0
  12. package/out/types/src/codegen/expressions/array.d.ts +4 -0
  13. package/out/types/src/codegen/expressions/generation.d.ts +11 -0
  14. package/out/types/src/codegen/expressions/index.d.ts +2 -0
  15. package/out/types/src/codegen/functions/collection.d.ts +5 -0
  16. package/out/types/src/codegen/functions/context.d.ts +57 -0
  17. package/out/types/src/codegen/functions/generation.d.ts +25 -0
  18. package/out/types/src/codegen/functions/index.d.ts +2 -0
  19. package/out/types/src/codegen/index.d.ts +20 -0
  20. package/out/types/src/codegen/parallelism/runtime.d.ts +2 -0
  21. package/out/types/src/codegen/types/collection.d.ts +8 -0
  22. package/out/types/src/codegen/types/generation.d.ts +13 -0
  23. package/out/types/src/codegen/types/index.d.ts +2 -0
  24. package/out/types/src/codegen/utils/fixup.d.ts +2 -0
  25. package/out/types/src/codegen/utils/index.d.ts +77 -0
  26. package/out/types/src/codegen/values/index.d.ts +1 -0
  27. package/out/types/src/emitter.d.ts +11 -0
  28. package/out/types/src/env.d.ts +85 -0
  29. package/out/types/src/error.d.ts +45 -0
  30. package/out/types/src/evaluator/async/await-analysis-types.d.ts +23 -0
  31. package/out/types/src/evaluator/async/await-analysis.d.ts +5 -0
  32. package/out/types/src/evaluator/builtins/alignof.d.ts +8 -0
  33. package/out/types/src/evaluator/builtins/and_or.d.ts +8 -0
  34. package/out/types/src/evaluator/builtins/arc_fns.d.ts +58 -0
  35. package/out/types/src/evaluator/builtins/array_fns.d.ts +0 -0
  36. package/out/types/src/evaluator/builtins/as.d.ts +8 -0
  37. package/out/types/src/evaluator/builtins/async_fns.d.ts +8 -0
  38. package/out/types/src/evaluator/builtins/compt_assert.d.ts +8 -0
  39. package/out/types/src/evaluator/builtins/compt_boolean_fns.d.ts +8 -0
  40. package/out/types/src/evaluator/builtins/compt_expect_error.d.ts +8 -0
  41. package/out/types/src/evaluator/builtins/compt_list_fns.d.ts +33 -0
  42. package/out/types/src/evaluator/builtins/compt_print.d.ts +8 -0
  43. package/out/types/src/evaluator/builtins/compt_string_fns.d.ts +8 -0
  44. package/out/types/src/evaluator/builtins/consume.d.ts +8 -0
  45. package/out/types/src/evaluator/builtins/drop.d.ts +8 -0
  46. package/out/types/src/evaluator/builtins/dup.d.ts +8 -0
  47. package/out/types/src/evaluator/builtins/expr_fns.d.ts +33 -0
  48. package/out/types/src/evaluator/builtins/future_fns.d.ts +8 -0
  49. package/out/types/src/evaluator/builtins/gc.d.ts +8 -0
  50. package/out/types/src/evaluator/builtins/gensym.d.ts +8 -0
  51. package/out/types/src/evaluator/builtins/impl_constraint.d.ts +8 -0
  52. package/out/types/src/evaluator/builtins/macro_expand.d.ts +8 -0
  53. package/out/types/src/evaluator/builtins/numeric_fns.d.ts +8 -0
  54. package/out/types/src/evaluator/builtins/panic.d.ts +8 -0
  55. package/out/types/src/evaluator/builtins/ptr_fns.d.ts +8 -0
  56. package/out/types/src/evaluator/builtins/quote.d.ts +13 -0
  57. package/out/types/src/evaluator/builtins/rc.d.ts +8 -0
  58. package/out/types/src/evaluator/builtins/sizeof.d.ts +8 -0
  59. package/out/types/src/evaluator/builtins/the.d.ts +8 -0
  60. package/out/types/src/evaluator/builtins/type_fns.d.ts +28 -0
  61. package/out/types/src/evaluator/builtins/va_start.d.ts +8 -0
  62. package/out/types/src/evaluator/builtins/var_fns.d.ts +18 -0
  63. package/out/types/src/evaluator/calls/array.d.ts +13 -0
  64. package/out/types/src/evaluator/calls/array_type.d.ts +11 -0
  65. package/out/types/src/evaluator/calls/closure_type.d.ts +11 -0
  66. package/out/types/src/evaluator/calls/compt_function.d.ts +19 -0
  67. package/out/types/src/evaluator/calls/compt_list_type.d.ts +11 -0
  68. package/out/types/src/evaluator/calls/function.d.ts +16 -0
  69. package/out/types/src/evaluator/calls/function_type.d.ts +15 -0
  70. package/out/types/src/evaluator/calls/helper.d.ts +42 -0
  71. package/out/types/src/evaluator/calls/iso.d.ts +15 -0
  72. package/out/types/src/evaluator/calls/module_type.d.ts +11 -0
  73. package/out/types/src/evaluator/calls/numeric_type.d.ts +15 -0
  74. package/out/types/src/evaluator/calls/pointer.d.ts +8 -0
  75. package/out/types/src/evaluator/calls/pointer_type.d.ts +14 -0
  76. package/out/types/src/evaluator/calls/type.d.ts +12 -0
  77. package/out/types/src/evaluator/context.d.ts +169 -0
  78. package/out/types/src/evaluator/exprs/_expr.d.ts +8 -0
  79. package/out/types/src/evaluator/exprs/assignment.d.ts +9 -0
  80. package/out/types/src/evaluator/exprs/begin.d.ts +10 -0
  81. package/out/types/src/evaluator/exprs/binding.d.ts +12 -0
  82. package/out/types/src/evaluator/exprs/c_include.d.ts +8 -0
  83. package/out/types/src/evaluator/exprs/cond.d.ts +8 -0
  84. package/out/types/src/evaluator/exprs/destructuring_assignment.d.ts +33 -0
  85. package/out/types/src/evaluator/exprs/exists.d.ts +0 -0
  86. package/out/types/src/evaluator/exprs/expr.d.ts +9 -0
  87. package/out/types/src/evaluator/exprs/extern.d.ts +8 -0
  88. package/out/types/src/evaluator/exprs/identifer_and_operator.d.ts +9 -0
  89. package/out/types/src/evaluator/exprs/import.d.ts +9 -0
  90. package/out/types/src/evaluator/exprs/initialization_assignment.d.ts +8 -0
  91. package/out/types/src/evaluator/exprs/match.d.ts +8 -0
  92. package/out/types/src/evaluator/exprs/open.d.ts +8 -0
  93. package/out/types/src/evaluator/exprs/property_access.d.ts +8 -0
  94. package/out/types/src/evaluator/exprs/recur.d.ts +8 -0
  95. package/out/types/src/evaluator/exprs/subtype_of.d.ts +21 -0
  96. package/out/types/src/evaluator/exprs/test.d.ts +8 -0
  97. package/out/types/src/evaluator/exprs/typeof.d.ts +8 -0
  98. package/out/types/src/evaluator/exprs/while.d.ts +8 -0
  99. package/out/types/src/evaluator/index.d.ts +26 -0
  100. package/out/types/src/evaluator/types/array.d.ts +8 -0
  101. package/out/types/src/evaluator/types/closure.d.ts +8 -0
  102. package/out/types/src/evaluator/types/compt_list.d.ts +8 -0
  103. package/out/types/src/evaluator/types/concrete_module.d.ts +8 -0
  104. package/out/types/src/evaluator/types/dyn.d.ts +8 -0
  105. package/out/types/src/evaluator/types/enum.d.ts +8 -0
  106. package/out/types/src/evaluator/types/expr_synthesizer.d.ts +14 -0
  107. package/out/types/src/evaluator/types/field.d.ts +14 -0
  108. package/out/types/src/evaluator/types/fn_module.d.ts +8 -0
  109. package/out/types/src/evaluator/types/function.d.ts +58 -0
  110. package/out/types/src/evaluator/types/future_module.d.ts +8 -0
  111. package/out/types/src/evaluator/types/module.d.ts +19 -0
  112. package/out/types/src/evaluator/types/newtype.d.ts +8 -0
  113. package/out/types/src/evaluator/types/object.d.ts +8 -0
  114. package/out/types/src/evaluator/types/proofs.d.ts +0 -0
  115. package/out/types/src/evaluator/types/slice.d.ts +8 -0
  116. package/out/types/src/evaluator/types/struct.d.ts +8 -0
  117. package/out/types/src/evaluator/types/synthesizer.d.ts +16 -0
  118. package/out/types/src/evaluator/types/tuple.d.ts +18 -0
  119. package/out/types/src/evaluator/types/union.d.ts +8 -0
  120. package/out/types/src/evaluator/types/utils.d.ts +71 -0
  121. package/out/types/src/evaluator/types/validation.d.ts +3 -0
  122. package/out/types/src/evaluator/utils/array-utils.d.ts +15 -0
  123. package/out/types/src/evaluator/utils/closure.d.ts +35 -0
  124. package/out/types/src/evaluator/utils.d.ts +4 -0
  125. package/out/types/src/evaluator/values/anonymous_function.d.ts +8 -0
  126. package/out/types/src/evaluator/values/anonymous_module.d.ts +17 -0
  127. package/out/types/src/evaluator/values/anonymous_struct.d.ts +8 -0
  128. package/out/types/src/evaluator/values/array.d.ts +8 -0
  129. package/out/types/src/evaluator/values/boolean.d.ts +3 -0
  130. package/out/types/src/evaluator/values/char.d.ts +3 -0
  131. package/out/types/src/evaluator/values/compt_list.d.ts +8 -0
  132. package/out/types/src/evaluator/values/dyn.d.ts +8 -0
  133. package/out/types/src/evaluator/values/float.d.ts +4 -0
  134. package/out/types/src/evaluator/values/integer.d.ts +4 -0
  135. package/out/types/src/evaluator/values/module.d.ts +58 -0
  136. package/out/types/src/evaluator/values/string.d.ts +3 -0
  137. package/out/types/src/evaluator/values/tuple.d.ts +32 -0
  138. package/out/types/src/expr.d.ts +456 -0
  139. package/out/types/src/function-value.d.ts +42 -0
  140. package/out/types/src/index.d.ts +4 -0
  141. package/out/types/src/lexer.d.ts +2 -0
  142. package/out/types/src/logger.d.ts +1 -0
  143. package/out/types/src/module-manager.d.ts +30 -0
  144. package/out/types/src/naming-checker.d.ts +4 -0
  145. package/out/types/src/parser.d.ts +33 -0
  146. package/out/types/src/test-runner.d.ts +30 -0
  147. package/out/types/src/tests/codegen.test.d.ts +1 -0
  148. package/out/types/src/tests/fixme.test.d.ts +1 -0
  149. package/out/types/src/tests/module-manager.test.d.ts +1 -0
  150. package/out/types/src/tests/parser.test.d.ts +1 -0
  151. package/out/types/src/tests/sample.test.d.ts +0 -0
  152. package/out/types/src/tests/std.test.d.ts +1 -0
  153. package/out/types/src/token.d.ts +40 -0
  154. package/out/types/src/type-value.d.ts +7 -0
  155. package/out/types/src/types/compatibility.d.ts +16 -0
  156. package/out/types/src/types/creators.d.ts +73 -0
  157. package/out/types/src/types/definitions.d.ts +218 -0
  158. package/out/types/src/types/guards.d.ts +70 -0
  159. package/out/types/src/types/hierarchy.d.ts +4 -0
  160. package/out/types/src/types/index.d.ts +7 -0
  161. package/out/types/src/types/module_field.d.ts +2 -0
  162. package/out/types/src/types/tags.d.ts +45 -0
  163. package/out/types/src/types/utils.d.ts +50 -0
  164. package/out/types/src/unit-value.d.ts +7 -0
  165. package/out/types/src/utils.d.ts +6 -0
  166. package/out/types/src/value-tag.d.ts +29 -0
  167. package/out/types/src/value.d.ts +110 -0
  168. package/out/types/src/yo-cli.d.ts +1 -0
  169. package/out/types/tsconfig.tsbuildinfo +1 -0
  170. package/package.json +57 -0
  171. package/scripts/check-liburing.js +76 -0
  172. package/std/alg/hash.yo +50 -0
  173. package/std/allocator.yo +113 -0
  174. package/std/allocators/c_allocator.yo +118 -0
  175. package/std/async.yo +13 -0
  176. package/std/collections/array_list.yo +415 -0
  177. package/std/collections/hash_map.yo +482 -0
  178. package/std/collections/hash_set.yo +706 -0
  179. package/std/collections/index.yo +11 -0
  180. package/std/collections/linked_list.yo +439 -0
  181. package/std/error.yo +0 -0
  182. package/std/gc.yo +10 -0
  183. package/std/index.yo +12 -0
  184. package/std/io/file.yo +191 -0
  185. package/std/io/index.yo +5 -0
  186. package/std/libc/assert.yo +39 -0
  187. package/std/libc/ctype.yo +57 -0
  188. package/std/libc/errno.yo +182 -0
  189. package/std/libc/float.yo +87 -0
  190. package/std/libc/index.yo +29 -0
  191. package/std/libc/limits.yo +65 -0
  192. package/std/libc/math.yo +679 -0
  193. package/std/libc/signal.yo +101 -0
  194. package/std/libc/stdatomic.yo +213 -0
  195. package/std/libc/stdint.yo +214 -0
  196. package/std/libc/stdio.yo +225 -0
  197. package/std/libc/stdlib.yo +204 -0
  198. package/std/libc/string.yo +151 -0
  199. package/std/libc/time.yo +92 -0
  200. package/std/libc/unistd.yo +130 -0
  201. package/std/monad.yo +152 -0
  202. package/std/prelude.yo +3094 -0
  203. package/std/string/index.yo +8 -0
  204. package/std/string/rune.yo +82 -0
  205. package/std/string/string.yo +288 -0
  206. package/std/sync.yo +95 -0
  207. package/std/thread.yo +36 -0
  208. package/std/time.yo +13 -0
  209. package/std/worker.yo +36 -0
  210. package/vendor/mimalloc/.gitattributes +12 -0
  211. package/vendor/mimalloc/CMakeLists.txt +763 -0
  212. package/vendor/mimalloc/LICENSE +21 -0
  213. package/vendor/mimalloc/SECURITY.md +41 -0
  214. package/vendor/mimalloc/azure-pipelines.yml +251 -0
  215. package/vendor/mimalloc/bin/mimalloc-redirect-arm64.dll +0 -0
  216. package/vendor/mimalloc/bin/mimalloc-redirect-arm64.lib +0 -0
  217. package/vendor/mimalloc/bin/mimalloc-redirect-arm64ec.dll +0 -0
  218. package/vendor/mimalloc/bin/mimalloc-redirect-arm64ec.lib +0 -0
  219. package/vendor/mimalloc/bin/mimalloc-redirect.dll +0 -0
  220. package/vendor/mimalloc/bin/mimalloc-redirect.lib +0 -0
  221. package/vendor/mimalloc/bin/mimalloc-redirect32.dll +0 -0
  222. package/vendor/mimalloc/bin/mimalloc-redirect32.lib +0 -0
  223. package/vendor/mimalloc/bin/minject-arm64.exe +0 -0
  224. package/vendor/mimalloc/bin/minject.exe +0 -0
  225. package/vendor/mimalloc/bin/minject32.exe +0 -0
  226. package/vendor/mimalloc/bin/readme.md +118 -0
  227. package/vendor/mimalloc/cmake/JoinPaths.cmake +23 -0
  228. package/vendor/mimalloc/cmake/mimalloc-config-version.cmake +19 -0
  229. package/vendor/mimalloc/cmake/mimalloc-config.cmake +14 -0
  230. package/vendor/mimalloc/contrib/docker/alpine/Dockerfile +23 -0
  231. package/vendor/mimalloc/contrib/docker/alpine-arm32v7/Dockerfile +28 -0
  232. package/vendor/mimalloc/contrib/docker/alpine-x86/Dockerfile +28 -0
  233. package/vendor/mimalloc/contrib/docker/manylinux-x64/Dockerfile +23 -0
  234. package/vendor/mimalloc/contrib/docker/readme.md +10 -0
  235. package/vendor/mimalloc/contrib/vcpkg/portfile.cmake +64 -0
  236. package/vendor/mimalloc/contrib/vcpkg/readme.md +40 -0
  237. package/vendor/mimalloc/contrib/vcpkg/usage +20 -0
  238. package/vendor/mimalloc/contrib/vcpkg/vcpkg-cmake-wrapper.cmake +20 -0
  239. package/vendor/mimalloc/contrib/vcpkg/vcpkg.json +48 -0
  240. package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-a.svg +887 -0
  241. package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-b.svg +1185 -0
  242. package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-a.svg +757 -0
  243. package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-b.svg +1028 -0
  244. package/vendor/mimalloc/doc/bench-2020/bench-r5a-1.svg +769 -0
  245. package/vendor/mimalloc/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg +868 -0
  246. package/vendor/mimalloc/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg +1157 -0
  247. package/vendor/mimalloc/doc/bench-2020/bench-r5a-2.svg +983 -0
  248. package/vendor/mimalloc/doc/bench-2020/bench-r5a-rss-1.svg +683 -0
  249. package/vendor/mimalloc/doc/bench-2020/bench-r5a-rss-2.svg +854 -0
  250. package/vendor/mimalloc/doc/bench-2020/bench-spec-rss.svg +713 -0
  251. package/vendor/mimalloc/doc/bench-2020/bench-spec.svg +713 -0
  252. package/vendor/mimalloc/doc/bench-2020/bench-z4-1.svg +890 -0
  253. package/vendor/mimalloc/doc/bench-2020/bench-z4-2.svg +1146 -0
  254. package/vendor/mimalloc/doc/bench-2020/bench-z4-rss-1.svg +796 -0
  255. package/vendor/mimalloc/doc/bench-2020/bench-z4-rss-2.svg +974 -0
  256. package/vendor/mimalloc/doc/bench-2021/bench-amd5950x-2021-01-30-a.svg +952 -0
  257. package/vendor/mimalloc/doc/bench-2021/bench-amd5950x-2021-01-30-b.svg +1255 -0
  258. package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-a.svg +955 -0
  259. package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-b.svg +1269 -0
  260. package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-a.svg +836 -0
  261. package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-b.svg +1131 -0
  262. package/vendor/mimalloc/doc/bench-2021/bench-macmini-2021-01-30.svg +766 -0
  263. package/vendor/mimalloc/doc/doxyfile +2895 -0
  264. package/vendor/mimalloc/doc/ds-logo.jpg +0 -0
  265. package/vendor/mimalloc/doc/ds-logo.png +0 -0
  266. package/vendor/mimalloc/doc/mimalloc-doc.h +1452 -0
  267. package/vendor/mimalloc/doc/mimalloc-doxygen.css +60 -0
  268. package/vendor/mimalloc/doc/mimalloc-logo-100.png +0 -0
  269. package/vendor/mimalloc/doc/mimalloc-logo.png +0 -0
  270. package/vendor/mimalloc/doc/mimalloc-logo.svg +161 -0
  271. package/vendor/mimalloc/doc/spades-logo.png +0 -0
  272. package/vendor/mimalloc/doc/unreal-logo.svg +43 -0
  273. package/vendor/mimalloc/ide/vs2022/mimalloc-lib.vcxproj +500 -0
  274. package/vendor/mimalloc/ide/vs2022/mimalloc-lib.vcxproj.filters +108 -0
  275. package/vendor/mimalloc/ide/vs2022/mimalloc-override-dll.vcxproj +508 -0
  276. package/vendor/mimalloc/ide/vs2022/mimalloc-override-dll.vcxproj.filters +111 -0
  277. package/vendor/mimalloc/ide/vs2022/mimalloc-override-test-dep.vcxproj +355 -0
  278. package/vendor/mimalloc/ide/vs2022/mimalloc-override-test.vcxproj +360 -0
  279. package/vendor/mimalloc/ide/vs2022/mimalloc-test-api.vcxproj +295 -0
  280. package/vendor/mimalloc/ide/vs2022/mimalloc-test-stress.vcxproj +292 -0
  281. package/vendor/mimalloc/ide/vs2022/mimalloc-test.vcxproj +289 -0
  282. package/vendor/mimalloc/ide/vs2022/mimalloc.sln +151 -0
  283. package/vendor/mimalloc/include/mimalloc/atomic.h +557 -0
  284. package/vendor/mimalloc/include/mimalloc/internal.h +1153 -0
  285. package/vendor/mimalloc/include/mimalloc/prim.h +421 -0
  286. package/vendor/mimalloc/include/mimalloc/track.h +145 -0
  287. package/vendor/mimalloc/include/mimalloc/types.h +685 -0
  288. package/vendor/mimalloc/include/mimalloc-new-delete.h +66 -0
  289. package/vendor/mimalloc/include/mimalloc-override.h +68 -0
  290. package/vendor/mimalloc/include/mimalloc-stats.h +103 -0
  291. package/vendor/mimalloc/include/mimalloc.h +612 -0
  292. package/vendor/mimalloc/mimalloc.pc.in +11 -0
  293. package/vendor/mimalloc/readme.md +946 -0
  294. package/vendor/mimalloc/src/alloc-aligned.c +360 -0
  295. package/vendor/mimalloc/src/alloc-override.c +316 -0
  296. package/vendor/mimalloc/src/alloc-posix.c +185 -0
  297. package/vendor/mimalloc/src/alloc.c +692 -0
  298. package/vendor/mimalloc/src/arena-abandon.c +346 -0
  299. package/vendor/mimalloc/src/arena.c +1043 -0
  300. package/vendor/mimalloc/src/bitmap.c +441 -0
  301. package/vendor/mimalloc/src/bitmap.h +119 -0
  302. package/vendor/mimalloc/src/free.c +572 -0
  303. package/vendor/mimalloc/src/heap.c +733 -0
  304. package/vendor/mimalloc/src/init.c +714 -0
  305. package/vendor/mimalloc/src/libc.c +334 -0
  306. package/vendor/mimalloc/src/options.c +663 -0
  307. package/vendor/mimalloc/src/os.c +770 -0
  308. package/vendor/mimalloc/src/page-queue.c +390 -0
  309. package/vendor/mimalloc/src/page.c +1049 -0
  310. package/vendor/mimalloc/src/prim/emscripten/prim.c +249 -0
  311. package/vendor/mimalloc/src/prim/osx/alloc-override-zone.c +461 -0
  312. package/vendor/mimalloc/src/prim/osx/prim.c +9 -0
  313. package/vendor/mimalloc/src/prim/prim.c +76 -0
  314. package/vendor/mimalloc/src/prim/readme.md +9 -0
  315. package/vendor/mimalloc/src/prim/unix/prim.c +934 -0
  316. package/vendor/mimalloc/src/prim/wasi/prim.c +284 -0
  317. package/vendor/mimalloc/src/prim/windows/etw-mimalloc.wprp +61 -0
  318. package/vendor/mimalloc/src/prim/windows/etw.h +905 -0
  319. package/vendor/mimalloc/src/prim/windows/etw.man +0 -0
  320. package/vendor/mimalloc/src/prim/windows/prim.c +878 -0
  321. package/vendor/mimalloc/src/prim/windows/readme.md +17 -0
  322. package/vendor/mimalloc/src/random.c +258 -0
  323. package/vendor/mimalloc/src/segment-map.c +142 -0
  324. package/vendor/mimalloc/src/segment.c +1702 -0
  325. package/vendor/mimalloc/src/static.c +41 -0
  326. package/vendor/mimalloc/src/stats.c +635 -0
  327. package/vendor/mimalloc/test/CMakeLists.txt +56 -0
  328. package/vendor/mimalloc/test/main-override-dep.cpp +51 -0
  329. package/vendor/mimalloc/test/main-override-dep.h +11 -0
  330. package/vendor/mimalloc/test/main-override-static.c +539 -0
  331. package/vendor/mimalloc/test/main-override.c +36 -0
  332. package/vendor/mimalloc/test/main-override.cpp +497 -0
  333. package/vendor/mimalloc/test/main.c +46 -0
  334. package/vendor/mimalloc/test/readme.md +16 -0
  335. package/vendor/mimalloc/test/test-api-fill.c +343 -0
  336. package/vendor/mimalloc/test/test-api.c +466 -0
  337. package/vendor/mimalloc/test/test-stress.c +428 -0
  338. package/vendor/mimalloc/test/test-wrong.c +92 -0
  339. package/vendor/mimalloc/test/testhelper.h +49 -0
@@ -0,0 +1,679 @@
1
+ c_include "<math.h>",
2
+ // Mathematical constants (implementation-defined)
3
+ M_E : f64, // e (2.71828...)
4
+ M_LOG2E : f64, // log_2(e)
5
+ M_LOG10E : f64, // log_10(e)
6
+ M_LN2 : f64, // ln(2)
7
+ M_LN10 : f64, // ln(10)
8
+ M_PI : f64, // π (3.14159...)
9
+ M_PI_2 : f64, // π/2
10
+ M_PI_4 : f64, // π/4
11
+ M_1_PI : f64, // 1/π
12
+ M_2_PI : f64, // 2/π
13
+ M_2_SQRTPI : f64, // 2/√π
14
+ M_SQRT2 : f64, // √2
15
+ M_SQRT1_2 : f64, // 1/√2
16
+
17
+ // Special values
18
+ HUGE_VAL : f64,
19
+ HUGE_VALF : f32,
20
+ HUGE_VALL : longdouble,
21
+ INFINITY : f32,
22
+ NAN : f32,
23
+
24
+ // Trigonometric functions
25
+ sin :
26
+ fn(x : f64) -> f64,
27
+ cos :
28
+ fn(x : f64) -> f64,
29
+ tan :
30
+ fn(x : f64) -> f64,
31
+ asin :
32
+ fn(x : f64) -> f64,
33
+ acos :
34
+ fn(x : f64) -> f64,
35
+ atan :
36
+ fn(x : f64) -> f64,
37
+ atan2 :
38
+ fn(y : f64, x : f64) -> f64,
39
+
40
+ // Hyperbolic functions
41
+ sinh :
42
+ fn(x : f64) -> f64,
43
+ cosh :
44
+ fn(x : f64) -> f64,
45
+ tanh :
46
+ fn(x : f64) -> f64,
47
+ asinh :
48
+ fn(x : f64) -> f64,
49
+ acosh :
50
+ fn(x : f64) -> f64,
51
+ atanh :
52
+ fn(x : f64) -> f64,
53
+
54
+ // Exponential and logarithmic functions
55
+ exp :
56
+ fn(x : f64) -> f64,
57
+ exp2 :
58
+ fn(x : f64) -> f64,
59
+ expm1 :
60
+ fn(x : f64) -> f64, // exp(x) - 1
61
+ log :
62
+ fn(x : f64) -> f64, // natural logarithm
63
+ log2 :
64
+ fn(x : f64) -> f64,
65
+ log10 :
66
+ fn(x : f64) -> f64,
67
+ log1p :
68
+ fn(x : f64) -> f64, // log(1 + x)
69
+ logb :
70
+ fn(x : f64) -> f64,
71
+ ilogb :
72
+ fn(x : f64) -> int,
73
+
74
+ // Power functions
75
+ pow :
76
+ fn(x : f64, y : f64) -> f64,
77
+ sqrt :
78
+ fn(x : f64) -> f64,
79
+ cbrt :
80
+ fn(x : f64) -> f64, // cube root
81
+ hypot :
82
+ fn(x : f64, y : f64) -> f64, // sqrt(x^2 + y^2)
83
+
84
+ // Error and gamma functions
85
+ erf :
86
+ fn(x : f64) -> f64, // error function
87
+ erfc :
88
+ fn(x : f64) -> f64, // complementary error function
89
+ gamma :
90
+ fn(x : f64) -> f64, // gamma function
91
+ lgamma :
92
+ fn(x : f64) -> f64, // log gamma function
93
+
94
+ // Nearest integer functions
95
+ ceil :
96
+ fn(x : f64) -> f64,
97
+ floor :
98
+ fn(x : f64) -> f64,
99
+ trunc :
100
+ fn(x : f64) -> f64,
101
+ round :
102
+ fn(x : f64) -> f64,
103
+ lround :
104
+ fn(x : f64) -> long,
105
+ llround :
106
+ fn(x : f64) -> longlong,
107
+ rint :
108
+ fn(x : f64) -> f64,
109
+ lrint :
110
+ fn(x : f64) -> long,
111
+ llrint :
112
+ fn(x : f64) -> longlong,
113
+ nearbyint :
114
+ fn(x : f64) -> f64,
115
+
116
+ // Floating point manipulation functions
117
+ frexp :
118
+ fn(value : f64, exp : *(int)) -> f64,
119
+ ldexp :
120
+ fn(x : f64, exp : int) -> f64,
121
+ modf :
122
+ fn(value : f64, iptr : *(f64)) -> f64,
123
+ scalbn :
124
+ fn(x : f64, n : int) -> f64,
125
+ scalbln :
126
+ fn(x : f64, n : long) -> f64,
127
+
128
+ // Absolute value and remainder functions
129
+ fabs :
130
+ fn(x : f64) -> f64,
131
+ fmod :
132
+ fn(x : f64, y : f64) -> f64,
133
+ remainder :
134
+ fn(x : f64, y : f64) -> f64,
135
+ remquo :
136
+ fn(x : f64, y : f64, quo : *(int)) -> f64,
137
+
138
+ // Copying sign functions
139
+ copysign :
140
+ fn(x : f64, y : f64) -> f64,
141
+ nan :
142
+ fn(tagp : *(char)) -> f64,
143
+ nanf :
144
+ fn(tagp : *(char)) -> f32,
145
+ nanl :
146
+ fn(tagp : *(char)) -> longdouble,
147
+
148
+ // Maximum, minimum, and positive difference functions
149
+ fdim :
150
+ fn(x : f64, y : f64) -> f64, // positive difference
151
+ fmax :
152
+ fn(x : f64, y : f64) -> f64,
153
+ fmin :
154
+ fn(x : f64, y : f64) -> f64,
155
+
156
+ // Floating multiply-add
157
+ fma :
158
+ fn(x : f64, y : f64, z : f64) -> f64, // x*y + z
159
+
160
+ // Classification functions
161
+ fpclassify :
162
+ fn(x : f64) -> int,
163
+ isfinite :
164
+ fn(x : f64) -> int,
165
+ isinf :
166
+ fn(x : f64) -> int,
167
+ isnan :
168
+ fn(x : f64) -> int,
169
+ isnormal :
170
+ fn(x : f64) -> int,
171
+ signbit :
172
+ fn(x : f64) -> int,
173
+
174
+ // Comparison functions
175
+ isgreater :
176
+ fn(x : f64, y : f64) -> int,
177
+ isgreaterequal :
178
+ fn(x : f64, y : f64) -> int,
179
+ isless :
180
+ fn(x : f64, y : f64) -> int,
181
+ islessequal :
182
+ fn(x : f64, y : f64) -> int,
183
+ islessgreater :
184
+ fn(x : f64, y : f64) -> int,
185
+ isunordered :
186
+ fn(x : f64, y : f64) -> int,
187
+
188
+ // Float versions of functions
189
+ sinf :
190
+ fn(x : f32) -> f32,
191
+ cosf :
192
+ fn(x : f32) -> f32,
193
+ tanf :
194
+ fn(x : f32) -> f32,
195
+ asinf :
196
+ fn(x : f32) -> f32,
197
+ acosf :
198
+ fn(x : f32) -> f32,
199
+ atanf :
200
+ fn(x : f32) -> f32,
201
+ atan2f :
202
+ fn(y : f32, x : f32) -> f32,
203
+
204
+ sinhf :
205
+ fn(x : f32) -> f32,
206
+ coshf :
207
+ fn(x : f32) -> f32,
208
+ tanhf :
209
+ fn(x : f32) -> f32,
210
+ asinhf :
211
+ fn(x : f32) -> f32,
212
+ acoshf :
213
+ fn(x : f32) -> f32,
214
+ atanhf :
215
+ fn(x : f32) -> f32,
216
+
217
+ expf :
218
+ fn(x : f32) -> f32,
219
+ exp2f :
220
+ fn(x : f32) -> f32,
221
+ expm1f :
222
+ fn(x : f32) -> f32,
223
+ logf :
224
+ fn(x : f32) -> f32,
225
+ log2f :
226
+ fn(x : f32) -> f32,
227
+ log10f :
228
+ fn(x : f32) -> f32,
229
+ log1pf :
230
+ fn(x : f32) -> f32,
231
+ logbf :
232
+ fn(x : f32) -> f32,
233
+ ilogbf :
234
+ fn(x : f32) -> int,
235
+
236
+ powf :
237
+ fn(x : f32, y : f32) -> f32,
238
+ sqrtf :
239
+ fn(x : f32) -> f32,
240
+ cbrtf :
241
+ fn(x : f32) -> f32,
242
+ hypotf :
243
+ fn(x : f32, y : f32) -> f32,
244
+
245
+ erff :
246
+ fn(x : f32) -> f32,
247
+ erfcf :
248
+ fn(x : f32) -> f32,
249
+ gammaf :
250
+ fn(x : f32) -> f32,
251
+ lgammaf :
252
+ fn(x : f32) -> f32,
253
+
254
+ ceilf :
255
+ fn(x : f32) -> f32,
256
+ floorf :
257
+ fn(x : f32) -> f32,
258
+ truncf :
259
+ fn(x : f32) -> f32,
260
+ roundf :
261
+ fn(x : f32) -> f32,
262
+ lroundf :
263
+ fn(x : f32) -> long,
264
+ llroundf :
265
+ fn(x : f32) -> longlong,
266
+ rintf :
267
+ fn(x : f32) -> f32,
268
+ lrintf :
269
+ fn(x : f32) -> long,
270
+ llrintf :
271
+ fn(x : f32) -> longlong,
272
+ nearbyintf :
273
+ fn(x : f32) -> f32,
274
+
275
+ frexpf :
276
+ fn(value : f32, exp : *(int)) -> f32,
277
+ ldexpf :
278
+ fn(x : f32, exp : int) -> f32,
279
+ modff :
280
+ fn(value : f32, iptr : *(f32)) -> f32,
281
+ scalbnf :
282
+ fn(x : f32, n : int) -> f32,
283
+ scalblnf :
284
+ fn(x : f32, n : long) -> f32,
285
+
286
+ fabsf :
287
+ fn(x : f32) -> f32,
288
+ fmodf :
289
+ fn(x : f32, y : f32) -> f32,
290
+ remainderf :
291
+ fn(x : f32, y : f32) -> f32,
292
+ remquof :
293
+ fn(x : f32, y : f32, quo : *(int)) -> f32,
294
+
295
+ copysignf :
296
+ fn(x : f32, y : f32) -> f32,
297
+ fdimf :
298
+ fn(x : f32, y : f32) -> f32,
299
+ fmaxf :
300
+ fn(x : f32, y : f32) -> f32,
301
+ fminf :
302
+ fn(x : f32, y : f32) -> f32,
303
+ fmaf :
304
+ fn(x : f32, y : f32, z : f32) -> f32,
305
+
306
+ // Long f64 versions of functions
307
+ sinl :
308
+ fn(x : longdouble) -> longdouble,
309
+ cosl :
310
+ fn(x : longdouble) -> longdouble,
311
+ tanl :
312
+ fn(x : longdouble) -> longdouble,
313
+ asinl :
314
+ fn(x : longdouble) -> longdouble,
315
+ acosl :
316
+ fn(x : longdouble) -> longdouble,
317
+ atanl :
318
+ fn(x : longdouble) -> longdouble,
319
+ atan2l :
320
+ fn(x : longdouble, y : longdouble) -> longdouble,
321
+
322
+ sinhl :
323
+ fn(x : longdouble) -> longdouble,
324
+ coshl :
325
+ fn(x : longdouble) -> longdouble,
326
+ tanhl :
327
+ fn(x : longdouble) -> longdouble,
328
+ asinhl :
329
+ fn(x : longdouble) -> longdouble,
330
+ acoshl :
331
+ fn(x : longdouble) -> longdouble,
332
+ atanhl :
333
+ fn(x : longdouble) -> longdouble,
334
+
335
+ expl :
336
+ fn(x : longdouble) -> longdouble,
337
+ exp2l :
338
+ fn(x : longdouble) -> longdouble,
339
+ expm1l :
340
+ fn(x : longdouble) -> longdouble,
341
+ logl :
342
+ fn(x : longdouble) -> longdouble,
343
+ log2l :
344
+ fn(x : longdouble) -> longdouble,
345
+ log10l :
346
+ fn(x : longdouble) -> longdouble,
347
+ log1pl :
348
+ fn(x : longdouble) -> longdouble,
349
+ logbl :
350
+ fn(x : longdouble) -> longdouble,
351
+ ilogbl :
352
+ fn(x : longdouble) -> int,
353
+
354
+ powl :
355
+ fn(x : longdouble, y : longdouble) -> longdouble,
356
+ sqrtl :
357
+ fn(x : longdouble) -> longdouble,
358
+ cbrtl :
359
+ fn(x : longdouble) -> longdouble,
360
+ hypotl :
361
+ fn(x : longdouble, y : longdouble) -> longdouble,
362
+
363
+ erfl :
364
+ fn(x : longdouble) -> longdouble,
365
+ erfcl :
366
+ fn(x : longdouble) -> longdouble,
367
+ gammal :
368
+ fn(x : longdouble) -> longdouble,
369
+ lgammal :
370
+ fn(x : longdouble) -> longdouble,
371
+
372
+ ceill :
373
+ fn(x : longdouble) -> longdouble,
374
+ floorl :
375
+ fn(x : longdouble) -> longdouble,
376
+ truncl :
377
+ fn(x : longdouble) -> longdouble,
378
+ roundl :
379
+ fn(x : longdouble) -> longdouble,
380
+ lroundl :
381
+ fn(x : longdouble) -> long,
382
+ llroundl :
383
+ fn(x : longdouble) -> longlong,
384
+ rintl :
385
+ fn(x : longdouble) -> longdouble,
386
+ lrintl :
387
+ fn(x : longdouble) -> long,
388
+ llrintl :
389
+ fn(x : longdouble) -> longlong,
390
+ nearbyintl :
391
+ fn(x : longdouble) -> longdouble,
392
+
393
+ frexpl :
394
+ fn(value : longdouble, exp : *(int)) -> longdouble,
395
+ ldexpl :
396
+ fn(x : longdouble, exp : int) -> longdouble,
397
+ modfl :
398
+ fn(value : longdouble, iptr : *(longdouble)) -> longdouble,
399
+ scalbnl :
400
+ fn(x : longdouble, n : int) -> longdouble,
401
+ scalblnl :
402
+ fn(x : longdouble, n : long) -> longdouble,
403
+
404
+ fabsl :
405
+ fn(x : longdouble) -> longdouble,
406
+ fmodl :
407
+ fn(x : longdouble, y : longdouble) -> longdouble,
408
+ remainderl :
409
+ fn(x : longdouble, y : longdouble) -> longdouble,
410
+ remquol :
411
+ fn(x : longdouble, y : longdouble, quo : *(int)) -> longdouble,
412
+
413
+ copysignl :
414
+ fn(x : longdouble, y : longdouble) -> longdouble,
415
+ fdiml :
416
+ fn(x : longdouble, y : longdouble) -> longdouble,
417
+ fmaxl :
418
+ fn(x : longdouble, y : longdouble) -> longdouble,
419
+ fminl :
420
+ fn(x : longdouble, y : longdouble) -> longdouble,
421
+ fmal :
422
+ fn(x : longdouble, y : longdouble, z : longdouble) -> longdouble,
423
+
424
+ // Classification constants
425
+ FP_INFINITE : int,
426
+ FP_NAN : int,
427
+ FP_NORMAL : int,
428
+ FP_SUBNORMAL : int,
429
+ FP_ZERO : int,
430
+
431
+ // Math error handling
432
+ math_errhandling : int,
433
+ MATH_ERRNO : int,
434
+ MATH_ERREXCEPT : int
435
+ ;
436
+
437
+ // Export all math functionality
438
+ export
439
+ // Mathematical constants
440
+ M_E,
441
+ M_LOG2E,
442
+ M_LOG10E,
443
+ M_LN2,
444
+ M_LN10,
445
+ M_PI,
446
+ M_PI_2,
447
+ M_PI_4,
448
+ M_1_PI,
449
+ M_2_PI,
450
+ M_2_SQRTPI,
451
+ M_SQRT2,
452
+ M_SQRT1_2,
453
+
454
+ // Special values
455
+ HUGE_VAL,
456
+ HUGE_VALF,
457
+ HUGE_VALL,
458
+ INFINITY,
459
+ NAN,
460
+
461
+ // Trigonometric functions
462
+ sin,
463
+ cos,
464
+ tan,
465
+ asin,
466
+ acos,
467
+ atan,
468
+ atan2,
469
+
470
+ // Hyperbolic functions
471
+ sinh,
472
+ cosh,
473
+ tanh,
474
+ asinh,
475
+ acosh,
476
+ atanh,
477
+
478
+ // Exponential and logarithmic functions
479
+ exp,
480
+ exp2,
481
+ expm1,
482
+ log,
483
+ log2,
484
+ log10,
485
+ log1p,
486
+ logb,
487
+ ilogb,
488
+
489
+ // Power functions
490
+ pow,
491
+ sqrt,
492
+ cbrt,
493
+ hypot,
494
+
495
+ // Error and gamma functions
496
+ erf,
497
+ erfc,
498
+ gamma,
499
+ lgamma,
500
+
501
+ // Nearest integer functions
502
+ ceil,
503
+ floor,
504
+ trunc,
505
+ round,
506
+ lround,
507
+ llround,
508
+ rint,
509
+ lrint,
510
+ llrint,
511
+ nearbyint,
512
+
513
+ // Floating point manipulation functions
514
+ frexp,
515
+ ldexp,
516
+ modf,
517
+ scalbn,
518
+ scalbln,
519
+
520
+ // Absolute value and remainder functions
521
+ fabs,
522
+ fmod,
523
+ remainder,
524
+ remquo,
525
+
526
+ // Copying sign functions
527
+ copysign,
528
+ nan,
529
+ nanf,
530
+ nanl,
531
+
532
+ // Maximum, minimum, and positive difference functions
533
+ fdim,
534
+ fmax,
535
+ fmin,
536
+
537
+ // Floating multiply-add
538
+ fma,
539
+
540
+ // Classification functions
541
+ fpclassify,
542
+ isfinite,
543
+ isinf,
544
+ isnan,
545
+ isnormal,
546
+ signbit,
547
+
548
+ // Comparison functions
549
+ isgreater,
550
+ isgreaterequal,
551
+ isless,
552
+ islessequal,
553
+ islessgreater,
554
+ isunordered,
555
+
556
+ // Float versions
557
+ sinf,
558
+ cosf,
559
+ tanf,
560
+ asinf,
561
+ acosf,
562
+ atanf,
563
+ atan2f,
564
+ sinhf,
565
+ coshf,
566
+ tanhf,
567
+ asinhf,
568
+ acoshf,
569
+ atanhf,
570
+ expf,
571
+ exp2f,
572
+ expm1f,
573
+ logf,
574
+ log2f,
575
+ log10f,
576
+ log1pf,
577
+ logbf,
578
+ ilogbf,
579
+ powf,
580
+ sqrtf,
581
+ cbrtf,
582
+ hypotf,
583
+ erff,
584
+ erfcf,
585
+ gammaf,
586
+ lgammaf,
587
+ ceilf,
588
+ floorf,
589
+ truncf,
590
+ roundf,
591
+ lroundf,
592
+ llroundf,
593
+ rintf,
594
+ lrintf,
595
+ llrintf,
596
+ nearbyintf,
597
+ frexpf,
598
+ ldexpf,
599
+ modff,
600
+ scalbnf,
601
+ scalblnf,
602
+ fabsf,
603
+ fmodf,
604
+ remainderf,
605
+ remquof,
606
+ copysignf,
607
+ fdimf,
608
+ fmaxf,
609
+ fminf,
610
+ fmaf,
611
+
612
+ // Long f64 versions
613
+ sinl,
614
+ cosl,
615
+ tanl,
616
+ asinl,
617
+ acosl,
618
+ atanl,
619
+ atan2l,
620
+ sinhl,
621
+ coshl,
622
+ tanhl,
623
+ asinhl,
624
+ acoshl,
625
+ atanhl,
626
+ expl,
627
+ exp2l,
628
+ expm1l,
629
+ logl,
630
+ log2l,
631
+ log10l,
632
+ log1pl,
633
+ logbl,
634
+ ilogbl,
635
+ powl,
636
+ sqrtl,
637
+ cbrtl,
638
+ hypotl,
639
+ erfl,
640
+ erfcl,
641
+ gammal,
642
+ lgammal,
643
+ ceill,
644
+ floorl,
645
+ truncl,
646
+ roundl,
647
+ lroundl,
648
+ llroundl,
649
+ rintl,
650
+ lrintl,
651
+ llrintl,
652
+ nearbyintl,
653
+ frexpl,
654
+ ldexpl,
655
+ modfl,
656
+ scalbnl,
657
+ scalblnl,
658
+ fabsl,
659
+ fmodl,
660
+ remainderl,
661
+ remquol,
662
+ copysignl,
663
+ fdiml,
664
+ fmaxl,
665
+ fminl,
666
+ fmal,
667
+
668
+ // Classification constants
669
+ FP_INFINITE,
670
+ FP_NAN,
671
+ FP_NORMAL,
672
+ FP_SUBNORMAL,
673
+ FP_ZERO,
674
+
675
+ // Math error handling
676
+ math_errhandling,
677
+ MATH_ERRNO,
678
+ MATH_ERREXCEPT
679
+ ;