@shd101wyy/yo 0.1.23 → 0.1.25

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 (88) hide show
  1. package/.github/skills/yo-async-effects/async-effects-recipes.md +74 -1
  2. package/.github/skills/yo-core-patterns/core-patterns-cheatsheet.md +115 -0
  3. package/.github/skills/yo-syntax/syntax-cheatsheet.md +626 -6
  4. package/out/cjs/index.cjs +563 -564
  5. package/out/cjs/yo-cli.cjs +722 -715
  6. package/out/cjs/yo-lsp.cjs +601 -602
  7. package/out/esm/index.mjs +506 -507
  8. package/out/types/src/codegen/utils/index.d.ts +1 -0
  9. package/out/types/src/expr.d.ts +1 -0
  10. package/out/types/src/parser.d.ts +1 -0
  11. package/out/types/src/test-runner.d.ts +1 -0
  12. package/out/types/tsconfig.tsbuildinfo +1 -1
  13. package/package.json +1 -1
  14. package/std/build.yo +2 -2
  15. package/std/collections/array_list.yo +26 -0
  16. package/std/imm/map.yo +15 -15
  17. package/std/imm/sorted_map.yo +14 -14
  18. package/std/imm/string.yo +4 -4
  19. package/std/prelude.yo +18 -23
  20. package/std/process/command.yo +8 -8
  21. package/std/string/string.yo +76 -55
  22. package/std/string/unicode.yo +6 -6
  23. package/std/sys/signal.yo +6 -6
  24. package/vendor/mimalloc/.github/workflows/release.yaml +55 -0
  25. package/vendor/mimalloc/.github/workflows/stale.yaml +27 -0
  26. package/vendor/mimalloc/.github/workflows/test.yaml +163 -0
  27. package/vendor/mimalloc/CMakeLists.txt +52 -33
  28. package/vendor/mimalloc/azure-pipelines.yml +4 -3
  29. package/vendor/mimalloc/bin/bundle.bat +74 -0
  30. package/vendor/mimalloc/bin/bundle.sh +232 -0
  31. package/vendor/mimalloc/cmake/mimalloc-config-version.cmake +2 -2
  32. package/vendor/mimalloc/contrib/docker/alpine/Dockerfile +1 -1
  33. package/vendor/mimalloc/contrib/docker/alpine-arm32v7/Dockerfile +2 -2
  34. package/vendor/mimalloc/contrib/docker/alpine-x86/Dockerfile +1 -1
  35. package/vendor/mimalloc/contrib/docker/manylinux-x64/Dockerfile +1 -1
  36. package/vendor/mimalloc/contrib/vcpkg/portfile.cmake +4 -3
  37. package/vendor/mimalloc/contrib/vcpkg/vcpkg.json +1 -1
  38. package/vendor/mimalloc/doc/mimalloc-doc.h +42 -4
  39. package/vendor/mimalloc/doc/release-notes.md +15 -0
  40. package/vendor/mimalloc/ide/vs2022/mimalloc-lib.vcxproj +3 -3
  41. package/vendor/mimalloc/ide/vs2022/mimalloc-override-static-lib.vcxproj +511 -0
  42. package/vendor/mimalloc/ide/vs2022/mimalloc-override-static-lib.vcxproj.filters +117 -0
  43. package/vendor/mimalloc/ide/vs2022/mimalloc-test-dep.vcxproj +360 -0
  44. package/vendor/mimalloc/ide/vs2022/mimalloc-test-override-static.vcxproj +310 -0
  45. package/vendor/mimalloc/ide/vs2022/mimalloc.sln +92 -35
  46. package/vendor/mimalloc/include/mimalloc/atomic.h +178 -182
  47. package/vendor/mimalloc/include/mimalloc/bits.h +8 -10
  48. package/vendor/mimalloc/include/mimalloc/internal.h +76 -32
  49. package/vendor/mimalloc/include/mimalloc/prim.h +25 -18
  50. package/vendor/mimalloc/include/mimalloc/track.h +7 -2
  51. package/vendor/mimalloc/include/mimalloc/types.h +57 -29
  52. package/vendor/mimalloc/include/mimalloc-override.h +10 -10
  53. package/vendor/mimalloc/include/mimalloc-stats.h +18 -6
  54. package/vendor/mimalloc/include/mimalloc.h +22 -12
  55. package/vendor/mimalloc/readme.md +42 -17
  56. package/vendor/mimalloc/src/alloc-aligned.c +13 -11
  57. package/vendor/mimalloc/src/alloc-override.c +97 -17
  58. package/vendor/mimalloc/src/alloc-posix.c +44 -27
  59. package/vendor/mimalloc/src/alloc.c +73 -23
  60. package/vendor/mimalloc/src/arena-meta.c +3 -3
  61. package/vendor/mimalloc/src/arena.c +380 -192
  62. package/vendor/mimalloc/src/bitmap.c +68 -18
  63. package/vendor/mimalloc/src/bitmap.h +8 -4
  64. package/vendor/mimalloc/src/free.c +83 -47
  65. package/vendor/mimalloc/src/heap.c +94 -40
  66. package/vendor/mimalloc/src/init.c +273 -102
  67. package/vendor/mimalloc/src/libc.c +53 -8
  68. package/vendor/mimalloc/src/options.c +43 -40
  69. package/vendor/mimalloc/src/os.c +110 -45
  70. package/vendor/mimalloc/src/page-map.c +14 -8
  71. package/vendor/mimalloc/src/page-queue.c +9 -6
  72. package/vendor/mimalloc/src/page.c +26 -16
  73. package/vendor/mimalloc/src/prim/emscripten/prim.c +10 -1
  74. package/vendor/mimalloc/src/prim/osx/alloc-override-zone.c +35 -16
  75. package/vendor/mimalloc/src/prim/unix/prim.c +26 -22
  76. package/vendor/mimalloc/src/prim/wasi/prim.c +7 -4
  77. package/vendor/mimalloc/src/prim/windows/prim.c +247 -44
  78. package/vendor/mimalloc/src/random.c +8 -3
  79. package/vendor/mimalloc/src/stats.c +59 -48
  80. package/vendor/mimalloc/src/theap.c +85 -44
  81. package/vendor/mimalloc/src/threadlocal.c +102 -41
  82. package/vendor/mimalloc/test/main-override-static.c +31 -2
  83. package/vendor/mimalloc/test/main-override.c +27 -14
  84. package/vendor/mimalloc/test/main-static-dep.cpp +46 -0
  85. package/vendor/mimalloc/test/main-static-dep.h +11 -0
  86. package/vendor/mimalloc/test/test-api-fill.c +2 -2
  87. package/vendor/mimalloc/test/test-stress.c +3 -3
  88. package/vendor/mimalloc/test/test-wrong.c +11 -7
@@ -1,6 +1,6 @@
1
1
  set(mi_version_major 3)
2
- set(mi_version_minor 2)
3
- set(mi_version_patch 8)
2
+ set(mi_version_minor 3)
3
+ set(mi_version_patch 2)
4
4
  set(mi_version ${mi_version_major}.${mi_version_minor})
5
5
 
6
6
  set(PACKAGE_VERSION ${mi_version})
@@ -10,7 +10,7 @@ RUN mkdir -p /home/dev
10
10
  WORKDIR /home/dev
11
11
 
12
12
  # Get mimalloc
13
- RUN git clone https://github.com/microsoft/mimalloc -b dev2
13
+ RUN git clone https://github.com/microsoft/mimalloc -b dev3
14
14
  RUN mkdir -p mimalloc/out/release
15
15
  RUN mkdir -p mimalloc/out/debug
16
16
 
@@ -4,7 +4,7 @@
4
4
  FROM scratch
5
5
 
6
6
  # Substitute the image name that was downloaded
7
- ADD alpine-minirootfs-20240329-armv7.tar.gz /
7
+ ADD alpine-minirootfs-20260127-armv7.tar.gz /
8
8
 
9
9
  # Install tools
10
10
  RUN apk add build-base make cmake
@@ -15,7 +15,7 @@ RUN mkdir -p /home/dev
15
15
  WORKDIR /home/dev
16
16
 
17
17
  # Get mimalloc
18
- RUN git clone https://github.com/microsoft/mimalloc -b dev2
18
+ RUN git clone https://github.com/microsoft/mimalloc -b dev3
19
19
  RUN mkdir -p mimalloc/out/release
20
20
  RUN mkdir -p mimalloc/out/debug
21
21
 
@@ -15,7 +15,7 @@ RUN mkdir -p /home/dev
15
15
  WORKDIR /home/dev
16
16
 
17
17
  # Get mimalloc
18
- RUN git clone https://github.com/microsoft/mimalloc -b dev2
18
+ RUN git clone https://github.com/microsoft/mimalloc -b dev3
19
19
  RUN mkdir -p mimalloc/out/release
20
20
  RUN mkdir -p mimalloc/out/debug
21
21
 
@@ -10,7 +10,7 @@ RUN mkdir -p /home/dev
10
10
  WORKDIR /home/dev
11
11
 
12
12
  # Get mimalloc
13
- RUN git clone https://github.com/microsoft/mimalloc -b dev2
13
+ RUN git clone https://github.com/microsoft/mimalloc -b dev3
14
14
  RUN mkdir -p mimalloc/out/release
15
15
  RUN mkdir -p mimalloc/out/debug
16
16
 
@@ -3,12 +3,13 @@ vcpkg_from_github(
3
3
  REPO microsoft/mimalloc
4
4
  HEAD_REF master
5
5
 
6
- # The "REF" can be a commit hash, branch name (dev3), or a version (v3.2.7).
6
+ # The "REF" can be a commit hash, branch name (dev3), or a version (v3.3.2).
7
7
  REF "v${VERSION}"
8
8
 
9
9
  # The sha512 is the hash of the tar.gz bundle.
10
- # (To get the sha512, run `vcpkg install "mimalloc[override]" --overlay-ports=./contrib/vcpkg` and copy the sha from the error message.)
11
- SHA512 616351e549707318c1f8b164251141684a73d5bf8205b905736f48ab21fbb19bfaa4d52c4e63642fcb144345b6a5331944b6c8e0827925000553e46f2c2c31e9
10
+ # (To get the sha512, run `vcpkg install "mimalloc[override]" --overlay-ports=<dir of this file>` and copy the sha from the error message.)
11
+ # (and maybe `vcpkg remove mimalloc` first to remove any previous install)
12
+ SHA512 601bdf622d0bc7521edf0cc73d1caec9d976bcd1faa689ff48cc18a9a6a3b2294b571fc71d3266b38907bc5aad10a41d92d03d2cdde139a30b08357ee7bc25c5
12
13
  )
13
14
 
14
15
  vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mimalloc",
3
- "version": "3.2.7",
3
+ "version": "3.3.2",
4
4
  "port-version": 0,
5
5
  "description": "Compact general purpose allocator with excellent performance",
6
6
  "homepage": "https://github.com/microsoft/mimalloc",
@@ -572,13 +572,18 @@ void* mi_heap_malloc(mi_heap_t* heap, size_t size);
572
572
 
573
573
  /// Allocate a small object in a specific heap.
574
574
  /// \a size must be smaller or equal to MI_SMALL_SIZE_MAX().
575
- /// @see mi_malloc()
575
+ /// @see mi_malloc_small()
576
576
  void* mi_heap_malloc_small(mi_heap_t* heap, size_t size);
577
577
 
578
578
  /// Allocate zero-initialized in a specific heap.
579
579
  /// @see mi_zalloc()
580
580
  void* mi_heap_zalloc(mi_heap_t* heap, size_t size);
581
581
 
582
+ /// Allocate a small object in a specific heap.
583
+ /// \a size must be smaller or equal to MI_SMALL_SIZE_MAX().
584
+ /// @see mi_zalloc_small()
585
+ void* mi_heap_zalloc_small(mi_heap_t* heap, size_t size);
586
+
582
587
  /// Allocate \a count zero-initialized elements in a specific heap.
583
588
  /// @see mi_calloc()
584
589
  void* mi_heap_calloc(mi_heap_t* heap, size_t count, size_t size);
@@ -877,7 +882,8 @@ bool mi_subproc_visit_heaps(mi_subproc_id_t subproc, mi_heap_visit_fun* visitor,
877
882
  /// \{
878
883
 
879
884
  /// Maximum size allowed for small allocations in
880
- /// #mi_malloc_small and #mi_zalloc_small (usually `128*sizeof(void*)` (= 1KB on 64-bit systems))
885
+ /// #mi_malloc_small, #mi_zalloc_small, #mi_heap_malloc_small, #mi_heap_zalloc_small,
886
+ /// #mi_theap_malloc_small, and #mi_theap_zalloc_small (usually `128*sizeof(void*)` (= 1KB on 64-bit systems))
881
887
  #define MI_SMALL_SIZE_MAX (128*sizeof(void*))
882
888
 
883
889
  /// @brief Return the mimalloc version.
@@ -1000,9 +1006,27 @@ void* mi_malloc_small(size_t size);
1000
1006
  /// with care!
1001
1007
  void* mi_zalloc_small(size_t size);
1002
1008
 
1009
+ /// __v3__: Can be used to free an object that was allocated with #mi_malloc_small et al.
1010
+ /// @param p Pointer that was returned from #mi_malloc_small et al.
1011
+ /// @details
1012
+ /// This function is meant for use in run-time systems for best
1013
+ /// performance and does not check if the pointer was _indeed_ allocated
1014
+ /// with #mi_malloc_small (et al) -- use with care!
1015
+ /// This function has a small perf benefit but only if mimalloc was built with `MI_PAGE_META_ALIGNED_FREE_SMALL=1`
1016
+ /// @see mi_malloc_small()
1017
+ /// @see mi_zalloc_small()
1018
+ /// @see mi_heap_malloc_small()
1019
+ /// @see mi_heap_zalloc_small()
1020
+ /// @see mi_theap_malloc_small()
1021
+ /// @see mi_theap_zalloc_small()
1022
+ void mi_free_small(void* p);
1023
+
1003
1024
  /// \}
1004
1025
 
1005
1026
 
1027
+
1028
+
1029
+
1006
1030
  // ------------------------------------------------------
1007
1031
  // Statistics
1008
1032
  // ------------------------------------------------------
@@ -1302,11 +1326,25 @@ mi_theap_t* mi_theap_set_default(mi_theap_t* theap);
1302
1326
  /// @returns The current default theap.
1303
1327
  mi_theap_t* mi_theap_get_default();
1304
1328
 
1305
-
1329
+ /// Allocate in a specific theap.
1330
+ /// @see mi_malloc()
1306
1331
  void* mi_theap_malloc(mi_theap_t* theap, size_t size);
1332
+
1333
+ /// Allocate a small object in a specific theap.
1334
+ /// \a size must be smaller or equal to MI_SMALL_SIZE_MAX().
1335
+ /// @see mi_malloc_small()
1336
+ void* mi_theap_malloc_small(mi_theap_t* theap, size_t size);
1337
+
1338
+ /// Allocate zero-initialized in a specific heap.
1339
+ /// @see mi_zalloc()
1307
1340
  void* mi_theap_zalloc(mi_theap_t* theap, size_t size);
1341
+
1342
+ /// Allocate a small object in a specific theap.
1343
+ /// \a size must be smaller or equal to MI_SMALL_SIZE_MAX().
1344
+ /// @see mi_zalloc_small()
1345
+ void* mi_theap_zalloc_small(mi_theap_t* theap, size_t size);
1346
+
1308
1347
  void* mi_theap_calloc(mi_theap_t* theap, size_t count, size_t size);
1309
- void* mi_theap_malloc_small(mi_theap_t* theap, size_t size);
1310
1348
  void* mi_theap_malloc_aligned(mi_theap_t* theap, size_t size, size_t alignment);
1311
1349
  void* mi_theap_realloc(mi_theap_t* theap, void* p, size_t newsize);
1312
1350
 
@@ -0,0 +1,15 @@
1
+ Binary and source releases for mimalloc.
2
+
3
+ - __v3__: recommended: latest mimalloc design that tends to use less memory then v2 but should perform similarly.
4
+ - __v2__: stable: most widely used.
5
+ - __v1__: legacy.
6
+
7
+ Notes:
8
+
9
+ - Release versions follow the v3 version (and v1 and v2 versions are incremented independently).
10
+ - Generally it is recommended to download sources (or use `vcpkg` etc.) and build mimalloc as
11
+ part of your project.
12
+ - Source releases can also be downloaded directly from github by the tag.
13
+ For example <https://github.com/microsoft/mimalloc/archive/v3.3.2.tar.gz>.
14
+ - Binary releases include a release-, debug-, and secure build.
15
+ - Linux binaries are built on Ubuntu 22.
@@ -194,7 +194,7 @@
194
194
  <SDLCheck>true</SDLCheck>
195
195
  <ConformanceMode>Default</ConformanceMode>
196
196
  <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>
197
- <PreprocessorDefinitions>MI_DEBUG=3;MI_GUARDED=0;%(PreprocessorDefinitions);</PreprocessorDefinitions>
197
+ <PreprocessorDefinitions>MI_DEBUG=3;%(PreprocessorDefinitions);</PreprocessorDefinitions>
198
198
  <CompileAs>CompileAsCpp</CompileAs>
199
199
  <SupportJustMyCode>false</SupportJustMyCode>
200
200
  <LanguageStandard>stdcpp20</LanguageStandard>
@@ -222,7 +222,7 @@
222
222
  <SDLCheck>true</SDLCheck>
223
223
  <ConformanceMode>Default</ConformanceMode>
224
224
  <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>
225
- <PreprocessorDefinitions>MI_DEBUG=3;MI_GUARDED=0;%(PreprocessorDefinitions);</PreprocessorDefinitions>
225
+ <PreprocessorDefinitions>MI_DEBUG=3;%(PreprocessorDefinitions);</PreprocessorDefinitions>
226
226
  <CompileAs>CompileAsCpp</CompileAs>
227
227
  <SupportJustMyCode>false</SupportJustMyCode>
228
228
  <LanguageStandard>stdcpp20</LanguageStandard>
@@ -307,7 +307,7 @@
307
307
  <FunctionLevelLinking>true</FunctionLevelLinking>
308
308
  <ConformanceMode>Default</ConformanceMode>
309
309
  <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>
310
- <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>
310
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG;MI_GUARDED=1</PreprocessorDefinitions>
311
311
  <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
312
312
  <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
313
313
  <WholeProgramOptimization>false</WholeProgramOptimization>