@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.
- package/LICENSE.md +17 -0
- package/README.md +80 -0
- package/out/cjs/index.cjs +51 -0
- package/out/cjs/yo-cli.cjs +2158 -0
- package/out/esm/index.mjs +51 -0
- package/out/types/src/codegen/async/runtime.d.ts +2 -0
- package/out/types/src/codegen/async/state-code-gen.d.ts +10 -0
- package/out/types/src/codegen/async/state-machine.d.ts +13 -0
- package/out/types/src/codegen/c/collection.d.ts +3 -0
- package/out/types/src/codegen/codegen-c.d.ts +12 -0
- package/out/types/src/codegen/constants.d.ts +3 -0
- package/out/types/src/codegen/expressions/array.d.ts +4 -0
- package/out/types/src/codegen/expressions/generation.d.ts +11 -0
- package/out/types/src/codegen/expressions/index.d.ts +2 -0
- package/out/types/src/codegen/functions/collection.d.ts +5 -0
- package/out/types/src/codegen/functions/context.d.ts +57 -0
- package/out/types/src/codegen/functions/generation.d.ts +25 -0
- package/out/types/src/codegen/functions/index.d.ts +2 -0
- package/out/types/src/codegen/index.d.ts +20 -0
- package/out/types/src/codegen/parallelism/runtime.d.ts +2 -0
- package/out/types/src/codegen/types/collection.d.ts +8 -0
- package/out/types/src/codegen/types/generation.d.ts +13 -0
- package/out/types/src/codegen/types/index.d.ts +2 -0
- package/out/types/src/codegen/utils/fixup.d.ts +2 -0
- package/out/types/src/codegen/utils/index.d.ts +77 -0
- package/out/types/src/codegen/values/index.d.ts +1 -0
- package/out/types/src/emitter.d.ts +11 -0
- package/out/types/src/env.d.ts +85 -0
- package/out/types/src/error.d.ts +45 -0
- package/out/types/src/evaluator/async/await-analysis-types.d.ts +23 -0
- package/out/types/src/evaluator/async/await-analysis.d.ts +5 -0
- package/out/types/src/evaluator/builtins/alignof.d.ts +8 -0
- package/out/types/src/evaluator/builtins/and_or.d.ts +8 -0
- package/out/types/src/evaluator/builtins/arc_fns.d.ts +58 -0
- package/out/types/src/evaluator/builtins/array_fns.d.ts +0 -0
- package/out/types/src/evaluator/builtins/as.d.ts +8 -0
- package/out/types/src/evaluator/builtins/async_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/compt_assert.d.ts +8 -0
- package/out/types/src/evaluator/builtins/compt_boolean_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/compt_expect_error.d.ts +8 -0
- package/out/types/src/evaluator/builtins/compt_list_fns.d.ts +33 -0
- package/out/types/src/evaluator/builtins/compt_print.d.ts +8 -0
- package/out/types/src/evaluator/builtins/compt_string_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/consume.d.ts +8 -0
- package/out/types/src/evaluator/builtins/drop.d.ts +8 -0
- package/out/types/src/evaluator/builtins/dup.d.ts +8 -0
- package/out/types/src/evaluator/builtins/expr_fns.d.ts +33 -0
- package/out/types/src/evaluator/builtins/future_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/gc.d.ts +8 -0
- package/out/types/src/evaluator/builtins/gensym.d.ts +8 -0
- package/out/types/src/evaluator/builtins/impl_constraint.d.ts +8 -0
- package/out/types/src/evaluator/builtins/macro_expand.d.ts +8 -0
- package/out/types/src/evaluator/builtins/numeric_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/panic.d.ts +8 -0
- package/out/types/src/evaluator/builtins/ptr_fns.d.ts +8 -0
- package/out/types/src/evaluator/builtins/quote.d.ts +13 -0
- package/out/types/src/evaluator/builtins/rc.d.ts +8 -0
- package/out/types/src/evaluator/builtins/sizeof.d.ts +8 -0
- package/out/types/src/evaluator/builtins/the.d.ts +8 -0
- package/out/types/src/evaluator/builtins/type_fns.d.ts +28 -0
- package/out/types/src/evaluator/builtins/va_start.d.ts +8 -0
- package/out/types/src/evaluator/builtins/var_fns.d.ts +18 -0
- package/out/types/src/evaluator/calls/array.d.ts +13 -0
- package/out/types/src/evaluator/calls/array_type.d.ts +11 -0
- package/out/types/src/evaluator/calls/closure_type.d.ts +11 -0
- package/out/types/src/evaluator/calls/compt_function.d.ts +19 -0
- package/out/types/src/evaluator/calls/compt_list_type.d.ts +11 -0
- package/out/types/src/evaluator/calls/function.d.ts +16 -0
- package/out/types/src/evaluator/calls/function_type.d.ts +15 -0
- package/out/types/src/evaluator/calls/helper.d.ts +42 -0
- package/out/types/src/evaluator/calls/iso.d.ts +15 -0
- package/out/types/src/evaluator/calls/module_type.d.ts +11 -0
- package/out/types/src/evaluator/calls/numeric_type.d.ts +15 -0
- package/out/types/src/evaluator/calls/pointer.d.ts +8 -0
- package/out/types/src/evaluator/calls/pointer_type.d.ts +14 -0
- package/out/types/src/evaluator/calls/type.d.ts +12 -0
- package/out/types/src/evaluator/context.d.ts +169 -0
- package/out/types/src/evaluator/exprs/_expr.d.ts +8 -0
- package/out/types/src/evaluator/exprs/assignment.d.ts +9 -0
- package/out/types/src/evaluator/exprs/begin.d.ts +10 -0
- package/out/types/src/evaluator/exprs/binding.d.ts +12 -0
- package/out/types/src/evaluator/exprs/c_include.d.ts +8 -0
- package/out/types/src/evaluator/exprs/cond.d.ts +8 -0
- package/out/types/src/evaluator/exprs/destructuring_assignment.d.ts +33 -0
- package/out/types/src/evaluator/exprs/exists.d.ts +0 -0
- package/out/types/src/evaluator/exprs/expr.d.ts +9 -0
- package/out/types/src/evaluator/exprs/extern.d.ts +8 -0
- package/out/types/src/evaluator/exprs/identifer_and_operator.d.ts +9 -0
- package/out/types/src/evaluator/exprs/import.d.ts +9 -0
- package/out/types/src/evaluator/exprs/initialization_assignment.d.ts +8 -0
- package/out/types/src/evaluator/exprs/match.d.ts +8 -0
- package/out/types/src/evaluator/exprs/open.d.ts +8 -0
- package/out/types/src/evaluator/exprs/property_access.d.ts +8 -0
- package/out/types/src/evaluator/exprs/recur.d.ts +8 -0
- package/out/types/src/evaluator/exprs/subtype_of.d.ts +21 -0
- package/out/types/src/evaluator/exprs/test.d.ts +8 -0
- package/out/types/src/evaluator/exprs/typeof.d.ts +8 -0
- package/out/types/src/evaluator/exprs/while.d.ts +8 -0
- package/out/types/src/evaluator/index.d.ts +26 -0
- package/out/types/src/evaluator/types/array.d.ts +8 -0
- package/out/types/src/evaluator/types/closure.d.ts +8 -0
- package/out/types/src/evaluator/types/compt_list.d.ts +8 -0
- package/out/types/src/evaluator/types/concrete_module.d.ts +8 -0
- package/out/types/src/evaluator/types/dyn.d.ts +8 -0
- package/out/types/src/evaluator/types/enum.d.ts +8 -0
- package/out/types/src/evaluator/types/expr_synthesizer.d.ts +14 -0
- package/out/types/src/evaluator/types/field.d.ts +14 -0
- package/out/types/src/evaluator/types/fn_module.d.ts +8 -0
- package/out/types/src/evaluator/types/function.d.ts +58 -0
- package/out/types/src/evaluator/types/future_module.d.ts +8 -0
- package/out/types/src/evaluator/types/module.d.ts +19 -0
- package/out/types/src/evaluator/types/newtype.d.ts +8 -0
- package/out/types/src/evaluator/types/object.d.ts +8 -0
- package/out/types/src/evaluator/types/proofs.d.ts +0 -0
- package/out/types/src/evaluator/types/slice.d.ts +8 -0
- package/out/types/src/evaluator/types/struct.d.ts +8 -0
- package/out/types/src/evaluator/types/synthesizer.d.ts +16 -0
- package/out/types/src/evaluator/types/tuple.d.ts +18 -0
- package/out/types/src/evaluator/types/union.d.ts +8 -0
- package/out/types/src/evaluator/types/utils.d.ts +71 -0
- package/out/types/src/evaluator/types/validation.d.ts +3 -0
- package/out/types/src/evaluator/utils/array-utils.d.ts +15 -0
- package/out/types/src/evaluator/utils/closure.d.ts +35 -0
- package/out/types/src/evaluator/utils.d.ts +4 -0
- package/out/types/src/evaluator/values/anonymous_function.d.ts +8 -0
- package/out/types/src/evaluator/values/anonymous_module.d.ts +17 -0
- package/out/types/src/evaluator/values/anonymous_struct.d.ts +8 -0
- package/out/types/src/evaluator/values/array.d.ts +8 -0
- package/out/types/src/evaluator/values/boolean.d.ts +3 -0
- package/out/types/src/evaluator/values/char.d.ts +3 -0
- package/out/types/src/evaluator/values/compt_list.d.ts +8 -0
- package/out/types/src/evaluator/values/dyn.d.ts +8 -0
- package/out/types/src/evaluator/values/float.d.ts +4 -0
- package/out/types/src/evaluator/values/integer.d.ts +4 -0
- package/out/types/src/evaluator/values/module.d.ts +58 -0
- package/out/types/src/evaluator/values/string.d.ts +3 -0
- package/out/types/src/evaluator/values/tuple.d.ts +32 -0
- package/out/types/src/expr.d.ts +456 -0
- package/out/types/src/function-value.d.ts +42 -0
- package/out/types/src/index.d.ts +4 -0
- package/out/types/src/lexer.d.ts +2 -0
- package/out/types/src/logger.d.ts +1 -0
- package/out/types/src/module-manager.d.ts +30 -0
- package/out/types/src/naming-checker.d.ts +4 -0
- package/out/types/src/parser.d.ts +33 -0
- package/out/types/src/test-runner.d.ts +30 -0
- package/out/types/src/tests/codegen.test.d.ts +1 -0
- package/out/types/src/tests/fixme.test.d.ts +1 -0
- package/out/types/src/tests/module-manager.test.d.ts +1 -0
- package/out/types/src/tests/parser.test.d.ts +1 -0
- package/out/types/src/tests/sample.test.d.ts +0 -0
- package/out/types/src/tests/std.test.d.ts +1 -0
- package/out/types/src/token.d.ts +40 -0
- package/out/types/src/type-value.d.ts +7 -0
- package/out/types/src/types/compatibility.d.ts +16 -0
- package/out/types/src/types/creators.d.ts +73 -0
- package/out/types/src/types/definitions.d.ts +218 -0
- package/out/types/src/types/guards.d.ts +70 -0
- package/out/types/src/types/hierarchy.d.ts +4 -0
- package/out/types/src/types/index.d.ts +7 -0
- package/out/types/src/types/module_field.d.ts +2 -0
- package/out/types/src/types/tags.d.ts +45 -0
- package/out/types/src/types/utils.d.ts +50 -0
- package/out/types/src/unit-value.d.ts +7 -0
- package/out/types/src/utils.d.ts +6 -0
- package/out/types/src/value-tag.d.ts +29 -0
- package/out/types/src/value.d.ts +110 -0
- package/out/types/src/yo-cli.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +57 -0
- package/scripts/check-liburing.js +76 -0
- package/std/alg/hash.yo +50 -0
- package/std/allocator.yo +113 -0
- package/std/allocators/c_allocator.yo +118 -0
- package/std/async.yo +13 -0
- package/std/collections/array_list.yo +415 -0
- package/std/collections/hash_map.yo +482 -0
- package/std/collections/hash_set.yo +706 -0
- package/std/collections/index.yo +11 -0
- package/std/collections/linked_list.yo +439 -0
- package/std/error.yo +0 -0
- package/std/gc.yo +10 -0
- package/std/index.yo +12 -0
- package/std/io/file.yo +191 -0
- package/std/io/index.yo +5 -0
- package/std/libc/assert.yo +39 -0
- package/std/libc/ctype.yo +57 -0
- package/std/libc/errno.yo +182 -0
- package/std/libc/float.yo +87 -0
- package/std/libc/index.yo +29 -0
- package/std/libc/limits.yo +65 -0
- package/std/libc/math.yo +679 -0
- package/std/libc/signal.yo +101 -0
- package/std/libc/stdatomic.yo +213 -0
- package/std/libc/stdint.yo +214 -0
- package/std/libc/stdio.yo +225 -0
- package/std/libc/stdlib.yo +204 -0
- package/std/libc/string.yo +151 -0
- package/std/libc/time.yo +92 -0
- package/std/libc/unistd.yo +130 -0
- package/std/monad.yo +152 -0
- package/std/prelude.yo +3094 -0
- package/std/string/index.yo +8 -0
- package/std/string/rune.yo +82 -0
- package/std/string/string.yo +288 -0
- package/std/sync.yo +95 -0
- package/std/thread.yo +36 -0
- package/std/time.yo +13 -0
- package/std/worker.yo +36 -0
- package/vendor/mimalloc/.gitattributes +12 -0
- package/vendor/mimalloc/CMakeLists.txt +763 -0
- package/vendor/mimalloc/LICENSE +21 -0
- package/vendor/mimalloc/SECURITY.md +41 -0
- package/vendor/mimalloc/azure-pipelines.yml +251 -0
- package/vendor/mimalloc/bin/mimalloc-redirect-arm64.dll +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect-arm64.lib +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect-arm64ec.dll +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect-arm64ec.lib +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect.dll +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect.lib +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect32.dll +0 -0
- package/vendor/mimalloc/bin/mimalloc-redirect32.lib +0 -0
- package/vendor/mimalloc/bin/minject-arm64.exe +0 -0
- package/vendor/mimalloc/bin/minject.exe +0 -0
- package/vendor/mimalloc/bin/minject32.exe +0 -0
- package/vendor/mimalloc/bin/readme.md +118 -0
- package/vendor/mimalloc/cmake/JoinPaths.cmake +23 -0
- package/vendor/mimalloc/cmake/mimalloc-config-version.cmake +19 -0
- package/vendor/mimalloc/cmake/mimalloc-config.cmake +14 -0
- package/vendor/mimalloc/contrib/docker/alpine/Dockerfile +23 -0
- package/vendor/mimalloc/contrib/docker/alpine-arm32v7/Dockerfile +28 -0
- package/vendor/mimalloc/contrib/docker/alpine-x86/Dockerfile +28 -0
- package/vendor/mimalloc/contrib/docker/manylinux-x64/Dockerfile +23 -0
- package/vendor/mimalloc/contrib/docker/readme.md +10 -0
- package/vendor/mimalloc/contrib/vcpkg/portfile.cmake +64 -0
- package/vendor/mimalloc/contrib/vcpkg/readme.md +40 -0
- package/vendor/mimalloc/contrib/vcpkg/usage +20 -0
- package/vendor/mimalloc/contrib/vcpkg/vcpkg-cmake-wrapper.cmake +20 -0
- package/vendor/mimalloc/contrib/vcpkg/vcpkg.json +48 -0
- package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-a.svg +887 -0
- package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-b.svg +1185 -0
- package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-a.svg +757 -0
- package/vendor/mimalloc/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-b.svg +1028 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-1.svg +769 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg +868 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg +1157 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-2.svg +983 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-rss-1.svg +683 -0
- package/vendor/mimalloc/doc/bench-2020/bench-r5a-rss-2.svg +854 -0
- package/vendor/mimalloc/doc/bench-2020/bench-spec-rss.svg +713 -0
- package/vendor/mimalloc/doc/bench-2020/bench-spec.svg +713 -0
- package/vendor/mimalloc/doc/bench-2020/bench-z4-1.svg +890 -0
- package/vendor/mimalloc/doc/bench-2020/bench-z4-2.svg +1146 -0
- package/vendor/mimalloc/doc/bench-2020/bench-z4-rss-1.svg +796 -0
- package/vendor/mimalloc/doc/bench-2020/bench-z4-rss-2.svg +974 -0
- package/vendor/mimalloc/doc/bench-2021/bench-amd5950x-2021-01-30-a.svg +952 -0
- package/vendor/mimalloc/doc/bench-2021/bench-amd5950x-2021-01-30-b.svg +1255 -0
- package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-a.svg +955 -0
- package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-b.svg +1269 -0
- package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-a.svg +836 -0
- package/vendor/mimalloc/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-b.svg +1131 -0
- package/vendor/mimalloc/doc/bench-2021/bench-macmini-2021-01-30.svg +766 -0
- package/vendor/mimalloc/doc/doxyfile +2895 -0
- package/vendor/mimalloc/doc/ds-logo.jpg +0 -0
- package/vendor/mimalloc/doc/ds-logo.png +0 -0
- package/vendor/mimalloc/doc/mimalloc-doc.h +1452 -0
- package/vendor/mimalloc/doc/mimalloc-doxygen.css +60 -0
- package/vendor/mimalloc/doc/mimalloc-logo-100.png +0 -0
- package/vendor/mimalloc/doc/mimalloc-logo.png +0 -0
- package/vendor/mimalloc/doc/mimalloc-logo.svg +161 -0
- package/vendor/mimalloc/doc/spades-logo.png +0 -0
- package/vendor/mimalloc/doc/unreal-logo.svg +43 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-lib.vcxproj +500 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-lib.vcxproj.filters +108 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-override-dll.vcxproj +508 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-override-dll.vcxproj.filters +111 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-override-test-dep.vcxproj +355 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-override-test.vcxproj +360 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-test-api.vcxproj +295 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-test-stress.vcxproj +292 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc-test.vcxproj +289 -0
- package/vendor/mimalloc/ide/vs2022/mimalloc.sln +151 -0
- package/vendor/mimalloc/include/mimalloc/atomic.h +557 -0
- package/vendor/mimalloc/include/mimalloc/internal.h +1153 -0
- package/vendor/mimalloc/include/mimalloc/prim.h +421 -0
- package/vendor/mimalloc/include/mimalloc/track.h +145 -0
- package/vendor/mimalloc/include/mimalloc/types.h +685 -0
- package/vendor/mimalloc/include/mimalloc-new-delete.h +66 -0
- package/vendor/mimalloc/include/mimalloc-override.h +68 -0
- package/vendor/mimalloc/include/mimalloc-stats.h +103 -0
- package/vendor/mimalloc/include/mimalloc.h +612 -0
- package/vendor/mimalloc/mimalloc.pc.in +11 -0
- package/vendor/mimalloc/readme.md +946 -0
- package/vendor/mimalloc/src/alloc-aligned.c +360 -0
- package/vendor/mimalloc/src/alloc-override.c +316 -0
- package/vendor/mimalloc/src/alloc-posix.c +185 -0
- package/vendor/mimalloc/src/alloc.c +692 -0
- package/vendor/mimalloc/src/arena-abandon.c +346 -0
- package/vendor/mimalloc/src/arena.c +1043 -0
- package/vendor/mimalloc/src/bitmap.c +441 -0
- package/vendor/mimalloc/src/bitmap.h +119 -0
- package/vendor/mimalloc/src/free.c +572 -0
- package/vendor/mimalloc/src/heap.c +733 -0
- package/vendor/mimalloc/src/init.c +714 -0
- package/vendor/mimalloc/src/libc.c +334 -0
- package/vendor/mimalloc/src/options.c +663 -0
- package/vendor/mimalloc/src/os.c +770 -0
- package/vendor/mimalloc/src/page-queue.c +390 -0
- package/vendor/mimalloc/src/page.c +1049 -0
- package/vendor/mimalloc/src/prim/emscripten/prim.c +249 -0
- package/vendor/mimalloc/src/prim/osx/alloc-override-zone.c +461 -0
- package/vendor/mimalloc/src/prim/osx/prim.c +9 -0
- package/vendor/mimalloc/src/prim/prim.c +76 -0
- package/vendor/mimalloc/src/prim/readme.md +9 -0
- package/vendor/mimalloc/src/prim/unix/prim.c +934 -0
- package/vendor/mimalloc/src/prim/wasi/prim.c +284 -0
- package/vendor/mimalloc/src/prim/windows/etw-mimalloc.wprp +61 -0
- package/vendor/mimalloc/src/prim/windows/etw.h +905 -0
- package/vendor/mimalloc/src/prim/windows/etw.man +0 -0
- package/vendor/mimalloc/src/prim/windows/prim.c +878 -0
- package/vendor/mimalloc/src/prim/windows/readme.md +17 -0
- package/vendor/mimalloc/src/random.c +258 -0
- package/vendor/mimalloc/src/segment-map.c +142 -0
- package/vendor/mimalloc/src/segment.c +1702 -0
- package/vendor/mimalloc/src/static.c +41 -0
- package/vendor/mimalloc/src/stats.c +635 -0
- package/vendor/mimalloc/test/CMakeLists.txt +56 -0
- package/vendor/mimalloc/test/main-override-dep.cpp +51 -0
- package/vendor/mimalloc/test/main-override-dep.h +11 -0
- package/vendor/mimalloc/test/main-override-static.c +539 -0
- package/vendor/mimalloc/test/main-override.c +36 -0
- package/vendor/mimalloc/test/main-override.cpp +497 -0
- package/vendor/mimalloc/test/main.c +46 -0
- package/vendor/mimalloc/test/readme.md +16 -0
- package/vendor/mimalloc/test/test-api-fill.c +343 -0
- package/vendor/mimalloc/test/test-api.c +466 -0
- package/vendor/mimalloc/test/test-stress.c +428 -0
- package/vendor/mimalloc/test/test-wrong.c +92 -0
- package/vendor/mimalloc/test/testhelper.h +49 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// C11 signal.h - Signal handling functions and constants
|
|
2
|
+
// Provides signal handling capabilities for process control
|
|
3
|
+
|
|
4
|
+
c_include "<signal.h>",
|
|
5
|
+
// Signal handler type
|
|
6
|
+
// Note: In C this is: void (*signal(int sig, void (*func)(int)))(int)
|
|
7
|
+
// We simplify this for Yo
|
|
8
|
+
signal :
|
|
9
|
+
fn(sig : int, func : (fn(signal_num : int) -> unit)) -> (fn(signal_num : int) -> unit),
|
|
10
|
+
|
|
11
|
+
// Raise a signal
|
|
12
|
+
raise :
|
|
13
|
+
fn(sig : int) -> int,
|
|
14
|
+
|
|
15
|
+
// Standard signal numbers (POSIX.1)
|
|
16
|
+
SIGHUP : int, // Hangup
|
|
17
|
+
SIGINT : int, // Interrupt (Ctrl+C)
|
|
18
|
+
SIGQUIT : int, // Quit (Ctrl+\)
|
|
19
|
+
SIGILL : int, // Illegal instruction
|
|
20
|
+
SIGTRAP : int, // Trace/breakpoint trap
|
|
21
|
+
SIGABRT : int, // Abort signal
|
|
22
|
+
SIGBUS : int, // Bus error
|
|
23
|
+
SIGFPE : int, // Floating point exception
|
|
24
|
+
SIGKILL : int, // Kill signal (cannot be caught)
|
|
25
|
+
SIGUSR1 : int, // User-defined signal 1
|
|
26
|
+
SIGSEGV : int, // Segmentation fault
|
|
27
|
+
SIGUSR2 : int, // User-defined signal 2
|
|
28
|
+
SIGPIPE : int, // Broken pipe
|
|
29
|
+
SIGALRM : int, // Alarm clock
|
|
30
|
+
SIGTERM : int, // Termination signal
|
|
31
|
+
SIGCHLD : int, // Child status changed
|
|
32
|
+
SIGCONT : int, // Continue if stopped
|
|
33
|
+
SIGSTOP : int, // Stop executing (cannot be caught)
|
|
34
|
+
SIGTSTP : int, // Terminal stop signal (Ctrl+Z)
|
|
35
|
+
SIGTTIN : int, // Background process attempting read
|
|
36
|
+
SIGTTOU : int, // Background process attempting write
|
|
37
|
+
SIGURG : int, // Urgent condition on socket
|
|
38
|
+
SIGXCPU : int, // CPU limit exceeded
|
|
39
|
+
SIGXFSZ : int, // File size limit exceeded
|
|
40
|
+
SIGVTALRM : int, // Virtual alarm clock
|
|
41
|
+
SIGPROF : int, // Profiling alarm clock
|
|
42
|
+
SIGWINCH : int, // Window resize signal
|
|
43
|
+
SIGIO : int, // I/O now possible
|
|
44
|
+
SIGPWR : int, // Power failure restart
|
|
45
|
+
SIGSYS : int, // Bad system call
|
|
46
|
+
|
|
47
|
+
// Signal handling constants
|
|
48
|
+
SIG_DFL : (fn(signal_num : int) -> unit), // Default signal handling
|
|
49
|
+
SIG_IGN : (fn(signal_num : int) -> unit), // Ignore signal
|
|
50
|
+
SIG_ERR : (fn(signal_num : int) -> unit), // Signal error return
|
|
51
|
+
|
|
52
|
+
// C11 - Additional signal handling (optional)
|
|
53
|
+
sig_atomic_t : Type // Type for atomic signal variables
|
|
54
|
+
;
|
|
55
|
+
|
|
56
|
+
// Export all signal functionality
|
|
57
|
+
export
|
|
58
|
+
// Signal functions
|
|
59
|
+
signal,
|
|
60
|
+
raise,
|
|
61
|
+
|
|
62
|
+
// Standard signals
|
|
63
|
+
SIGHUP,
|
|
64
|
+
SIGINT,
|
|
65
|
+
SIGQUIT,
|
|
66
|
+
SIGILL,
|
|
67
|
+
SIGTRAP,
|
|
68
|
+
SIGABRT,
|
|
69
|
+
SIGBUS,
|
|
70
|
+
SIGFPE,
|
|
71
|
+
SIGKILL,
|
|
72
|
+
SIGUSR1,
|
|
73
|
+
SIGSEGV,
|
|
74
|
+
SIGUSR2,
|
|
75
|
+
SIGPIPE,
|
|
76
|
+
SIGALRM,
|
|
77
|
+
SIGTERM,
|
|
78
|
+
SIGCHLD,
|
|
79
|
+
SIGCONT,
|
|
80
|
+
SIGSTOP,
|
|
81
|
+
SIGTSTP,
|
|
82
|
+
SIGTTIN,
|
|
83
|
+
SIGTTOU,
|
|
84
|
+
SIGURG,
|
|
85
|
+
SIGXCPU,
|
|
86
|
+
SIGXFSZ,
|
|
87
|
+
SIGVTALRM,
|
|
88
|
+
SIGPROF,
|
|
89
|
+
SIGWINCH,
|
|
90
|
+
SIGIO,
|
|
91
|
+
SIGPWR,
|
|
92
|
+
SIGSYS,
|
|
93
|
+
|
|
94
|
+
// Signal handling constants
|
|
95
|
+
SIG_DFL,
|
|
96
|
+
SIG_IGN,
|
|
97
|
+
SIG_ERR,
|
|
98
|
+
|
|
99
|
+
// Types
|
|
100
|
+
sig_atomic_t
|
|
101
|
+
;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
// C11 Atomic Operations and Types
|
|
2
|
+
// Corresponds to C's <stdatomic.h>
|
|
3
|
+
|
|
4
|
+
c_include "<stdatomic.h>",
|
|
5
|
+
// Atomic types
|
|
6
|
+
atomic_bool: Type,
|
|
7
|
+
atomic_char: Type,
|
|
8
|
+
atomic_schar: Type,
|
|
9
|
+
atomic_uchar: Type,
|
|
10
|
+
atomic_short: Type,
|
|
11
|
+
atomic_ushort: Type,
|
|
12
|
+
atomic_int: Type,
|
|
13
|
+
atomic_uint: Type,
|
|
14
|
+
atomic_long: Type,
|
|
15
|
+
atomic_ulong: Type,
|
|
16
|
+
atomic_llong: Type,
|
|
17
|
+
atomic_ullong: Type,
|
|
18
|
+
atomic_char16_t: Type,
|
|
19
|
+
atomic_char32_t: Type,
|
|
20
|
+
atomic_wchar_t: Type,
|
|
21
|
+
atomic_int_least8_t: Type,
|
|
22
|
+
atomic_uint_least8_t: Type,
|
|
23
|
+
atomic_int_least16_t: Type,
|
|
24
|
+
atomic_uint_least16_t: Type,
|
|
25
|
+
atomic_int_least32_t: Type,
|
|
26
|
+
atomic_uint_least32_t: Type,
|
|
27
|
+
atomic_int_least64_t: Type,
|
|
28
|
+
atomic_uint_least64_t: Type,
|
|
29
|
+
atomic_int_fast8_t: Type,
|
|
30
|
+
atomic_uint_fast8_t: Type,
|
|
31
|
+
atomic_int_fast16_t: Type,
|
|
32
|
+
atomic_uint_fast16_t: Type,
|
|
33
|
+
atomic_int_fast32_t: Type,
|
|
34
|
+
atomic_uint_fast32_t: Type,
|
|
35
|
+
atomic_int_fast64_t: Type,
|
|
36
|
+
atomic_uint_fast64_t: Type,
|
|
37
|
+
atomic_intptr_t: Type,
|
|
38
|
+
atomic_uintptr_t: Type,
|
|
39
|
+
atomic_size_t: Type,
|
|
40
|
+
atomic_ptrdiff_t: Type,
|
|
41
|
+
atomic_intmax_t: Type,
|
|
42
|
+
atomic_uintmax_t: Type,
|
|
43
|
+
|
|
44
|
+
// Memory order enumeration
|
|
45
|
+
memory_order: Type,
|
|
46
|
+
memory_order_relaxed: memory_order,
|
|
47
|
+
memory_order_consume: memory_order,
|
|
48
|
+
memory_order_acquire: memory_order,
|
|
49
|
+
memory_order_release: memory_order,
|
|
50
|
+
memory_order_acq_rel: memory_order,
|
|
51
|
+
memory_order_seq_cst: memory_order,
|
|
52
|
+
|
|
53
|
+
// Atomic flag type
|
|
54
|
+
atomic_flag: Type,
|
|
55
|
+
ATOMIC_FLAG_INIT: atomic_flag,
|
|
56
|
+
|
|
57
|
+
// Generic atomic operations
|
|
58
|
+
atomic_init:
|
|
59
|
+
fn(obj: *(atomic_bool), value: bool) -> unit,
|
|
60
|
+
atomic_load:
|
|
61
|
+
fn(obj: *(atomic_bool)) -> bool,
|
|
62
|
+
atomic_load_explicit:
|
|
63
|
+
fn(obj: *(atomic_bool), order: memory_order) -> bool,
|
|
64
|
+
atomic_store:
|
|
65
|
+
fn(obj: *(atomic_bool), desired: bool) -> unit,
|
|
66
|
+
atomic_store_explicit:
|
|
67
|
+
fn(obj: *(atomic_bool), desired: bool, order: memory_order) -> unit,
|
|
68
|
+
atomic_exchange:
|
|
69
|
+
fn(obj: *(atomic_bool), desired: bool) -> bool,
|
|
70
|
+
atomic_exchange_explicit:
|
|
71
|
+
fn(obj: *(atomic_bool), desired: bool, order: memory_order) -> bool,
|
|
72
|
+
atomic_compare_exchange_strong:
|
|
73
|
+
fn(obj: *(atomic_bool), expected: *(bool), desired: bool) -> bool,
|
|
74
|
+
atomic_compare_exchange_strong_explicit:
|
|
75
|
+
fn(obj: *(atomic_bool), expected: *(bool), desired: bool, success: memory_order, failure: memory_order) -> bool,
|
|
76
|
+
atomic_compare_exchange_weak:
|
|
77
|
+
fn(obj: *(atomic_bool), expected: *(bool), desired: bool) -> bool,
|
|
78
|
+
atomic_compare_exchange_weak_explicit:
|
|
79
|
+
fn(obj: *(atomic_bool), expected: *(bool), desired: bool, success: memory_order, failure: memory_order) -> bool,
|
|
80
|
+
|
|
81
|
+
// Integer atomic operations
|
|
82
|
+
atomic_fetch_add:
|
|
83
|
+
fn(obj: *(atomic_int), arg: int) -> int,
|
|
84
|
+
atomic_fetch_add_explicit:
|
|
85
|
+
fn(obj: *(atomic_int), arg: int, order: memory_order) -> int,
|
|
86
|
+
atomic_fetch_sub:
|
|
87
|
+
fn(obj: *(atomic_int), arg: int) -> int,
|
|
88
|
+
atomic_fetch_sub_explicit:
|
|
89
|
+
fn(obj: *(atomic_int), arg: int, order: memory_order) -> int,
|
|
90
|
+
atomic_fetch_or:
|
|
91
|
+
fn(obj: *(atomic_int), arg: int) -> int,
|
|
92
|
+
atomic_fetch_or_explicit:
|
|
93
|
+
fn(obj: *(atomic_int), arg: int, order: memory_order) -> int,
|
|
94
|
+
atomic_fetch_xor:
|
|
95
|
+
fn(obj: *(atomic_int), arg: int) -> int,
|
|
96
|
+
atomic_fetch_xor_explicit:
|
|
97
|
+
fn(obj: *(atomic_int), arg: int, order: memory_order) -> int,
|
|
98
|
+
atomic_fetch_and:
|
|
99
|
+
fn(obj: *(atomic_int), arg: int) -> int,
|
|
100
|
+
atomic_fetch_and_explicit:
|
|
101
|
+
fn(obj: *(atomic_int), arg: int, order: memory_order) -> int,
|
|
102
|
+
|
|
103
|
+
// Pointer atomic operations
|
|
104
|
+
atomic_load_ptr:
|
|
105
|
+
fn(obj: *(*(void))) -> *(void),
|
|
106
|
+
atomic_store_ptr:
|
|
107
|
+
fn(obj: *(*(void)), desired: *(void)) -> unit,
|
|
108
|
+
atomic_exchange_ptr:
|
|
109
|
+
fn(obj: *(*(void)), desired: *(void)) -> *(void),
|
|
110
|
+
atomic_compare_exchange_strong_ptr:
|
|
111
|
+
fn(obj: *(*(void)), expected: *(*(void)), desired: *(void)) -> bool,
|
|
112
|
+
atomic_compare_exchange_weak_ptr:
|
|
113
|
+
fn(obj: *(*(void)), expected: *(*(void)), desired: *(void)) -> bool,
|
|
114
|
+
|
|
115
|
+
// Atomic flag operations
|
|
116
|
+
atomic_flag_test_and_set:
|
|
117
|
+
fn(obj: *(atomic_flag)) -> bool,
|
|
118
|
+
atomic_flag_test_and_set_explicit:
|
|
119
|
+
fn(obj: *(atomic_flag), order: memory_order) -> bool,
|
|
120
|
+
atomic_flag_clear:
|
|
121
|
+
fn(obj: *(atomic_flag)) -> unit,
|
|
122
|
+
atomic_flag_clear_explicit:
|
|
123
|
+
fn(obj: *(atomic_flag), order: memory_order) -> unit,
|
|
124
|
+
|
|
125
|
+
// Memory fences
|
|
126
|
+
atomic_thread_fence:
|
|
127
|
+
fn(order: memory_order) -> unit,
|
|
128
|
+
atomic_signal_fence:
|
|
129
|
+
fn(order: memory_order) -> unit,
|
|
130
|
+
|
|
131
|
+
// Lock-free property query
|
|
132
|
+
atomic_is_lock_free:
|
|
133
|
+
fn(obj: *(atomic_bool)) -> bool,
|
|
134
|
+
|
|
135
|
+
// Kill dependency
|
|
136
|
+
kill_dependency:
|
|
137
|
+
fn(y: i32) -> i32,
|
|
138
|
+
|
|
139
|
+
// Lock-free constants
|
|
140
|
+
ATOMIC_BOOL_LOCK_FREE: i32,
|
|
141
|
+
ATOMIC_CHAR_LOCK_FREE: i32,
|
|
142
|
+
ATOMIC_CHAR16_T_LOCK_FREE: i32,
|
|
143
|
+
ATOMIC_CHAR32_T_LOCK_FREE: i32,
|
|
144
|
+
ATOMIC_WCHAR_T_LOCK_FREE: i32,
|
|
145
|
+
ATOMIC_SHORT_LOCK_FREE: i32,
|
|
146
|
+
ATOMIC_INT_LOCK_FREE: i32,
|
|
147
|
+
ATOMIC_LONG_LOCK_FREE: i32,
|
|
148
|
+
ATOMIC_LLONG_LOCK_FREE: i32,
|
|
149
|
+
ATOMIC_POINTER_LOCK_FREE: i32;
|
|
150
|
+
|
|
151
|
+
export
|
|
152
|
+
// Atomic types
|
|
153
|
+
atomic_bool, atomic_char, atomic_schar, atomic_uchar,
|
|
154
|
+
atomic_short, atomic_ushort, atomic_int, atomic_uint,
|
|
155
|
+
atomic_long, atomic_ulong, atomic_llong, atomic_ullong,
|
|
156
|
+
atomic_char16_t, atomic_char32_t, atomic_wchar_t,
|
|
157
|
+
atomic_int_least8_t, atomic_uint_least8_t,
|
|
158
|
+
atomic_int_least16_t, atomic_uint_least16_t,
|
|
159
|
+
atomic_int_least32_t, atomic_uint_least32_t,
|
|
160
|
+
atomic_int_least64_t, atomic_uint_least64_t,
|
|
161
|
+
atomic_int_fast8_t, atomic_uint_fast8_t,
|
|
162
|
+
atomic_int_fast16_t, atomic_uint_fast16_t,
|
|
163
|
+
atomic_int_fast32_t, atomic_uint_fast32_t,
|
|
164
|
+
atomic_int_fast64_t, atomic_uint_fast64_t,
|
|
165
|
+
atomic_intptr_t, atomic_uintptr_t,
|
|
166
|
+
atomic_size_t, atomic_ptrdiff_t,
|
|
167
|
+
atomic_intmax_t, atomic_uintmax_t,
|
|
168
|
+
|
|
169
|
+
// Memory order and flag types
|
|
170
|
+
memory_order, atomic_flag,
|
|
171
|
+
|
|
172
|
+
// Memory order constants
|
|
173
|
+
memory_order_relaxed, memory_order_consume,
|
|
174
|
+
memory_order_acquire, memory_order_release,
|
|
175
|
+
memory_order_acq_rel, memory_order_seq_cst,
|
|
176
|
+
|
|
177
|
+
// Generic atomic operations
|
|
178
|
+
atomic_init, atomic_load, atomic_load_explicit,
|
|
179
|
+
atomic_store, atomic_store_explicit,
|
|
180
|
+
atomic_exchange, atomic_exchange_explicit,
|
|
181
|
+
atomic_compare_exchange_strong, atomic_compare_exchange_strong_explicit,
|
|
182
|
+
atomic_compare_exchange_weak, atomic_compare_exchange_weak_explicit,
|
|
183
|
+
|
|
184
|
+
// Integer atomic operations
|
|
185
|
+
atomic_fetch_add, atomic_fetch_add_explicit,
|
|
186
|
+
atomic_fetch_sub, atomic_fetch_sub_explicit,
|
|
187
|
+
atomic_fetch_or, atomic_fetch_or_explicit,
|
|
188
|
+
atomic_fetch_xor, atomic_fetch_xor_explicit,
|
|
189
|
+
atomic_fetch_and, atomic_fetch_and_explicit,
|
|
190
|
+
|
|
191
|
+
// Pointer atomic operations
|
|
192
|
+
atomic_load_ptr, atomic_store_ptr, atomic_exchange_ptr,
|
|
193
|
+
atomic_compare_exchange_strong_ptr, atomic_compare_exchange_weak_ptr,
|
|
194
|
+
|
|
195
|
+
// Atomic flag operations
|
|
196
|
+
atomic_flag_test_and_set, atomic_flag_test_and_set_explicit,
|
|
197
|
+
atomic_flag_clear, atomic_flag_clear_explicit,
|
|
198
|
+
|
|
199
|
+
// Memory fences
|
|
200
|
+
atomic_thread_fence, atomic_signal_fence,
|
|
201
|
+
|
|
202
|
+
// Lock-free property
|
|
203
|
+
atomic_is_lock_free,
|
|
204
|
+
|
|
205
|
+
// Lock-free constants
|
|
206
|
+
ATOMIC_BOOL_LOCK_FREE, ATOMIC_CHAR_LOCK_FREE,
|
|
207
|
+
ATOMIC_CHAR16_T_LOCK_FREE, ATOMIC_CHAR32_T_LOCK_FREE,
|
|
208
|
+
ATOMIC_WCHAR_T_LOCK_FREE, ATOMIC_SHORT_LOCK_FREE,
|
|
209
|
+
ATOMIC_INT_LOCK_FREE, ATOMIC_LONG_LOCK_FREE,
|
|
210
|
+
ATOMIC_LLONG_LOCK_FREE, ATOMIC_POINTER_LOCK_FREE,
|
|
211
|
+
|
|
212
|
+
// Kill dependency
|
|
213
|
+
kill_dependency;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// C11 stdint.h - Fixed-width integer types and limits
|
|
2
|
+
// Note: Yo already has i8, i16, i32, i64, u8, u16, u32, u64
|
|
3
|
+
// This file provides C-compatible aliases and additional types/constants
|
|
4
|
+
|
|
5
|
+
// Type aliases for C compatibility (mapping Yo types to C stdint names)
|
|
6
|
+
int8_t :: i8;
|
|
7
|
+
int16_t :: i16;
|
|
8
|
+
int32_t :: i32;
|
|
9
|
+
int64_t :: i64;
|
|
10
|
+
uint8_t :: u8;
|
|
11
|
+
uint16_t :: u16;
|
|
12
|
+
uint32_t :: u32;
|
|
13
|
+
uint64_t :: u64;
|
|
14
|
+
|
|
15
|
+
c_include "<stdint.h>",
|
|
16
|
+
// Additional types needed for some limits
|
|
17
|
+
wint_t : Type,
|
|
18
|
+
|
|
19
|
+
// Least-width integer types (at least N bits)
|
|
20
|
+
int_least8_t : Type,
|
|
21
|
+
int_least16_t : Type,
|
|
22
|
+
int_least32_t : Type,
|
|
23
|
+
int_least64_t : Type,
|
|
24
|
+
uint_least8_t : Type,
|
|
25
|
+
uint_least16_t : Type,
|
|
26
|
+
uint_least32_t : Type,
|
|
27
|
+
uint_least64_t : Type,
|
|
28
|
+
|
|
29
|
+
// Fastest minimum-width integer types (fastest with at least N bits)
|
|
30
|
+
int_fast8_t : Type,
|
|
31
|
+
int_fast16_t : Type,
|
|
32
|
+
int_fast32_t : Type,
|
|
33
|
+
int_fast64_t : Type,
|
|
34
|
+
uint_fast8_t : Type,
|
|
35
|
+
uint_fast16_t : Type,
|
|
36
|
+
uint_fast32_t : Type,
|
|
37
|
+
uint_fast64_t : Type,
|
|
38
|
+
|
|
39
|
+
// Pointer-sized integers
|
|
40
|
+
intptr_t : Type,
|
|
41
|
+
uintptr_t : Type,
|
|
42
|
+
|
|
43
|
+
// Maximum-width integer types
|
|
44
|
+
intmax_t : Type,
|
|
45
|
+
uintmax_t : Type,
|
|
46
|
+
|
|
47
|
+
// Limits for exact-width integer types
|
|
48
|
+
INT8_MIN : i8,
|
|
49
|
+
INT8_MAX : i8,
|
|
50
|
+
INT16_MIN : i16,
|
|
51
|
+
INT16_MAX : i16,
|
|
52
|
+
INT32_MIN : i32,
|
|
53
|
+
INT32_MAX : i32,
|
|
54
|
+
INT64_MIN : i64,
|
|
55
|
+
INT64_MAX : i64,
|
|
56
|
+
UINT8_MAX : u8,
|
|
57
|
+
UINT16_MAX : u16,
|
|
58
|
+
UINT32_MAX : u32,
|
|
59
|
+
UINT64_MAX : u64,
|
|
60
|
+
|
|
61
|
+
// Limits for least-width integer types
|
|
62
|
+
INT_LEAST8_MIN : int_least8_t,
|
|
63
|
+
INT_LEAST8_MAX : int_least8_t,
|
|
64
|
+
INT_LEAST16_MIN : int_least16_t,
|
|
65
|
+
INT_LEAST16_MAX : int_least16_t,
|
|
66
|
+
INT_LEAST32_MIN : int_least32_t,
|
|
67
|
+
INT_LEAST32_MAX : int_least32_t,
|
|
68
|
+
INT_LEAST64_MIN : int_least64_t,
|
|
69
|
+
INT_LEAST64_MAX : int_least64_t,
|
|
70
|
+
UINT_LEAST8_MAX : uint_least8_t,
|
|
71
|
+
UINT_LEAST16_MAX : uint_least16_t,
|
|
72
|
+
UINT_LEAST32_MAX : uint_least32_t,
|
|
73
|
+
UINT_LEAST64_MAX : uint_least64_t,
|
|
74
|
+
|
|
75
|
+
// Limits for fastest minimum-width integer types
|
|
76
|
+
INT_FAST8_MIN : int_fast8_t,
|
|
77
|
+
INT_FAST8_MAX : int_fast8_t,
|
|
78
|
+
INT_FAST16_MIN : int_fast16_t,
|
|
79
|
+
INT_FAST16_MAX : int_fast16_t,
|
|
80
|
+
INT_FAST32_MIN : int_fast32_t,
|
|
81
|
+
INT_FAST32_MAX : int_fast32_t,
|
|
82
|
+
INT_FAST64_MIN : int_fast64_t,
|
|
83
|
+
INT_FAST64_MAX : int_fast64_t,
|
|
84
|
+
UINT_FAST8_MAX : uint_fast8_t,
|
|
85
|
+
UINT_FAST16_MAX : uint_fast16_t,
|
|
86
|
+
UINT_FAST32_MAX : uint_fast32_t,
|
|
87
|
+
UINT_FAST64_MAX : uint_fast64_t,
|
|
88
|
+
|
|
89
|
+
// Limits for pointer-sized integer types
|
|
90
|
+
INTPTR_MIN : intptr_t,
|
|
91
|
+
INTPTR_MAX : intptr_t,
|
|
92
|
+
UINTPTR_MAX : uintptr_t,
|
|
93
|
+
|
|
94
|
+
// Limits for maximum-width integer types
|
|
95
|
+
INTMAX_MIN : intmax_t,
|
|
96
|
+
INTMAX_MAX : intmax_t,
|
|
97
|
+
UINTMAX_MAX : uintmax_t,
|
|
98
|
+
|
|
99
|
+
// Limits for ptrdiff_t, size_t, and sig_atomic_t
|
|
100
|
+
PTRDIFF_MIN : isize,
|
|
101
|
+
PTRDIFF_MAX : isize,
|
|
102
|
+
SIZE_MAX : usize,
|
|
103
|
+
SIG_ATOMIC_MIN : int,
|
|
104
|
+
SIG_ATOMIC_MAX : int,
|
|
105
|
+
|
|
106
|
+
// Limits for wint_t (wide character input type)
|
|
107
|
+
WINT_MIN : wint_t,
|
|
108
|
+
WINT_MAX : wint_t
|
|
109
|
+
;
|
|
110
|
+
|
|
111
|
+
// Export all stdint functionality
|
|
112
|
+
export
|
|
113
|
+
// C-compatible type aliases
|
|
114
|
+
int8_t,
|
|
115
|
+
int16_t,
|
|
116
|
+
int32_t,
|
|
117
|
+
int64_t,
|
|
118
|
+
uint8_t,
|
|
119
|
+
uint16_t,
|
|
120
|
+
uint32_t,
|
|
121
|
+
uint64_t,
|
|
122
|
+
|
|
123
|
+
// Least-width types
|
|
124
|
+
int_least8_t,
|
|
125
|
+
int_least16_t,
|
|
126
|
+
int_least32_t,
|
|
127
|
+
int_least64_t,
|
|
128
|
+
uint_least8_t,
|
|
129
|
+
uint_least16_t,
|
|
130
|
+
uint_least32_t,
|
|
131
|
+
uint_least64_t,
|
|
132
|
+
|
|
133
|
+
// Fastest minimum-width types
|
|
134
|
+
int_fast8_t,
|
|
135
|
+
int_fast16_t,
|
|
136
|
+
int_fast32_t,
|
|
137
|
+
int_fast64_t,
|
|
138
|
+
uint_fast8_t,
|
|
139
|
+
uint_fast16_t,
|
|
140
|
+
uint_fast32_t,
|
|
141
|
+
uint_fast64_t,
|
|
142
|
+
|
|
143
|
+
// Pointer-sized types
|
|
144
|
+
intptr_t,
|
|
145
|
+
uintptr_t,
|
|
146
|
+
|
|
147
|
+
// Maximum-width types
|
|
148
|
+
intmax_t,
|
|
149
|
+
uintmax_t,
|
|
150
|
+
|
|
151
|
+
// Exact-width limits
|
|
152
|
+
INT8_MIN,
|
|
153
|
+
INT8_MAX,
|
|
154
|
+
INT16_MIN,
|
|
155
|
+
INT16_MAX,
|
|
156
|
+
INT32_MIN,
|
|
157
|
+
INT32_MAX,
|
|
158
|
+
INT64_MIN,
|
|
159
|
+
INT64_MAX,
|
|
160
|
+
UINT8_MAX,
|
|
161
|
+
UINT16_MAX,
|
|
162
|
+
UINT32_MAX,
|
|
163
|
+
UINT64_MAX,
|
|
164
|
+
|
|
165
|
+
// Least-width limits
|
|
166
|
+
INT_LEAST8_MIN,
|
|
167
|
+
INT_LEAST8_MAX,
|
|
168
|
+
INT_LEAST16_MIN,
|
|
169
|
+
INT_LEAST16_MAX,
|
|
170
|
+
INT_LEAST32_MIN,
|
|
171
|
+
INT_LEAST32_MAX,
|
|
172
|
+
INT_LEAST64_MIN,
|
|
173
|
+
INT_LEAST64_MAX,
|
|
174
|
+
UINT_LEAST8_MAX,
|
|
175
|
+
UINT_LEAST16_MAX,
|
|
176
|
+
UINT_LEAST32_MAX,
|
|
177
|
+
UINT_LEAST64_MAX,
|
|
178
|
+
|
|
179
|
+
// Fastest minimum-width limits
|
|
180
|
+
INT_FAST8_MIN,
|
|
181
|
+
INT_FAST8_MAX,
|
|
182
|
+
INT_FAST16_MIN,
|
|
183
|
+
INT_FAST16_MAX,
|
|
184
|
+
INT_FAST32_MIN,
|
|
185
|
+
INT_FAST32_MAX,
|
|
186
|
+
INT_FAST64_MIN,
|
|
187
|
+
INT_FAST64_MAX,
|
|
188
|
+
UINT_FAST8_MAX,
|
|
189
|
+
UINT_FAST16_MAX,
|
|
190
|
+
UINT_FAST32_MAX,
|
|
191
|
+
UINT_FAST64_MAX,
|
|
192
|
+
|
|
193
|
+
// Pointer-sized limits
|
|
194
|
+
INTPTR_MIN,
|
|
195
|
+
INTPTR_MAX,
|
|
196
|
+
UINTPTR_MAX,
|
|
197
|
+
|
|
198
|
+
// Maximum-width limits
|
|
199
|
+
INTMAX_MIN,
|
|
200
|
+
INTMAX_MAX,
|
|
201
|
+
UINTMAX_MAX,
|
|
202
|
+
|
|
203
|
+
// Other limits
|
|
204
|
+
PTRDIFF_MIN,
|
|
205
|
+
PTRDIFF_MAX,
|
|
206
|
+
SIZE_MAX,
|
|
207
|
+
SIG_ATOMIC_MIN,
|
|
208
|
+
SIG_ATOMIC_MAX,
|
|
209
|
+
WINT_MIN,
|
|
210
|
+
WINT_MAX,
|
|
211
|
+
|
|
212
|
+
// Additional types
|
|
213
|
+
wint_t
|
|
214
|
+
;
|