@yeyelailou/co 0.0.0-stage → 0.0.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 (335) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +982 -2
  3. package/bin/cocn.js +72 -0
  4. package/bin/install.js +276 -0
  5. package/bin//345/205/245/345/217/243.js +287 -0
  6. package/index.js +84 -0
  7. package/install.js +259 -0
  8. package/install.sh +86 -0
  9. package/package.json +103 -4
  10. package/src/repl.co +93 -0
  11. package/src//345/272/223//345/210/227/350/241/250.co +2455 -0
  12. package/src//345/272/223//345/212/240/345/257/206.co +996 -0
  13. package/src//345/272/223//345/255/227/345/205/270.co +1697 -0
  14. package/src//345/272/223//345/255/227/347/254/246/344/270/262.co +2278 -0
  15. package/src//345/272/223//346/225/260/345/255/246.co +3084 -0
  16. package/src//345/272/223//346/225/260/346/215/256/347/273/223/346/236/204.co +3032 -0
  17. package/src//345/272/223//346/226/207/344/273/266/347/263/273/347/273/237.co +1084 -0
  18. package/src//345/272/223//346/227/245/346/234/237/346/227/266/351/227/264.co +1003 -0
  19. package/src//345/272/223//347/256/227/346/263/225.co +2378 -0
  20. package/src//345/272/223//347/263/273/347/273/237.co +1019 -0
  21. package/src//345/272/223//347/274/226/347/240/201.co +1044 -0
  22. package/src//346/240/207/345/207/206/345/272/223.co +1897 -0
  23. package/src//346/261/202/345/200/274/345/231/250.co +6577 -0
  24. package/src//347/275/221/347/273/234.co +251 -0
  25. package/src//350/231/232/346/213/237/346/234/272.co +3563 -0
  26. package/src//350/247/243/351/207/212/345/231/250.co +59 -0
  27. package/src//350/257/215/346/263/225/345/210/206/346/236/220/345/231/250.co +606 -0
  28. package/src//350/257/255/346/263/225/345/210/206/346/236/220/345/231/250.co +1840 -0
  29. package/src//350/260/203/350/257/225/345/231/250.co +1526 -0
  30. package//345/267/245/345/205/267/lsp/server.js +419 -0
  31. package//345/267/245/345/205/267/lsp//346/265/213/350/257/225.sh +81 -0
  32. package//345/267/245/345/205/267/vscode-cocn/extension.js +203 -0
  33. package//345/267/245/345/205/267/vscode-cocn/package.json +58 -0
  34. package//345/267/245/345/205/267/vscode-cocn/syntaxes/coCN.tmLanguage.json +130 -0
  35. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250/elf.js +127 -0
  36. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/273/243/347/240/201/347/224/237/346/210/220/345/231/250.js +2284 -0
  37. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/analysis.js +116 -0
  38. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/benchmark_demo.js +75 -0
  39. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/dominance.js +158 -0
  40. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/gvn.js +45 -0
  41. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/index.js +121 -0
  42. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/ir.js +237 -0
  43. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/passes/constProp.js +126 -0
  44. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/passes/copyProp.js +57 -0
  45. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/passes/cse.js +62 -0
  46. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/passes/dce.js +68 -0
  47. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/passes/devirt.js +38 -0
  48. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/passes/escape.js +67 -0
  49. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/passes/inline.js +142 -0
  50. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/passes/loopOpt.js +215 -0
  51. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/peephole.js +42 -0
  52. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/regalloc.js +212 -0
  53. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/scheduler.js +86 -0
  54. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/spill.js +78 -0
  55. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/ssa.js +235 -0
  56. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/traceSched.js +47 -0
  57. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250/unroll.js +46 -0
  58. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250//346/265/213/350/257/225/harness.js +33 -0
  59. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250//346/265/213/350/257/225/run_all.js +11 -0
  60. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250//346/265/213/350/257/225/test_constfold.js +58 -0
  61. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250//346/265/213/350/257/225/test_dce.js +49 -0
  62. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250//346/265/213/350/257/225/test_e2e.js +57 -0
  63. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250//346/265/213/350/257/225/test_gvn_spill.js +45 -0
  64. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250//346/265/213/350/257/225/test_loop.js +46 -0
  65. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250//346/265/213/350/257/225/test_regalloc.js +51 -0
  66. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250//346/265/213/350/257/225/test_ssa.js +65 -0
  67. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//345/205/245/345/217/243.c +9 -0
  68. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//345/205/245/345/217/243.js +38 -0
  69. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//345/220/257/345/212/250/345/231/250.c +414 -0
  70. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/234/272/345/231/250/347/240/201/347/224/237/346/210/220/345/231/250.js +2332 -0
  71. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/01_hello.co +1 -0
  72. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/02_/347/256/227/346/234/257.co +7 -0
  73. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/03_/347/264/257/345/212/240.co +5 -0
  74. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/04_/346/226/220/346/263/242/351/202/243/345/245/221.co +9 -0
  75. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/05_/345/210/227/350/241/250.co +9 -0
  76. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/06_/345/255/227/345/205/270.co +5 -0
  77. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/07_/351/230/266/344/271/230.co +8 -0
  78. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/perf_fib.co +7 -0
  79. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/perf_loop.co +5 -0
  80. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225//346/200/247/350/203/275_/346/226/220/346/263/242.co +11 -0
  81. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237/AST/345/267/245/345/205/267.js +126 -0
  82. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237/index.js +103 -0
  83. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//345/206/205/350/201/224.js +194 -0
  84. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//345/207/275/346/225/260/347/211/271/345/214/226.js +168 -0
  85. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//346/243/200/346/237/245/346/266/210/351/231/244.js +166 -0
  86. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//346/265/213/350/257/225//345/206/205/350/201/224/346/265/213/350/257/225.js +53 -0
  87. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//346/265/213/350/257/225//345/207/275/346/225/260/347/211/271/345/214/226/346/265/213/350/257/225.js +67 -0
  88. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//346/265/213/350/257/225//347/253/257/345/210/260/347/253/257/346/265/213/350/257/225.js +104 -0
  89. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//346/265/213/350/257/225//347/261/273/345/236/213/346/216/250/346/226/255/346/265/213/350/257/225.js +87 -0
  90. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//346/265/213/350/257/225//350/277/220/350/241/214/346/265/213/350/257/225.js +43 -0
  91. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//346/265/213/350/257/225//351/200/203/351/200/270/345/210/206/346/236/220/346/265/213/350/257/225.js +58 -0
  92. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//347/211/271/345/214/226/347/274/223/345/255/230.js +83 -0
  93. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//347/216/257/345/242/203.js +126 -0
  94. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//347/261/273/345/236/213.js +294 -0
  95. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//347/261/273/345/236/213/346/216/250/346/226/255.js +461 -0
  96. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//350/260/203/347/224/250/345/233/276.js +119 -0
  97. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237//351/200/203/351/200/270/345/210/206/346/236/220.js +184 -0
  98. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/274/226/350/257/221.sh +45 -0
  99. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//347/274/226/350/257/221/345/231/250/345/220/210/345/271/266.co +4818 -0
  100. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/257/215/346/263/225/345/210/206/346/236/220/345/231/250.js +193 -0
  101. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/257/255/346/263/225/345/210/206/346/236/220/345/231/250.js +661 -0
  102. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266/alloc.c +206 -0
  103. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266/build.sh +70 -0
  104. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266/dict.c +143 -0
  105. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266/list.c +148 -0
  106. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266/math.c +129 -0
  107. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266/print.c +135 -0
  108. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266/rt.h +177 -0
  109. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266/string.c +288 -0
  110. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266/syscall.asm +153 -0
  111. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266/test.c +228 -0
  112. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266//344/270/264/346/227/266.c +379 -0
  113. package//345/267/245/345/205/267//345/216/237/347/224/237/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266.c +441 -0
  114. package//345/267/245/345/205/267//347/224/237/346/200/201/cli.js +443 -0
  115. package//345/267/245/345/205/267//347/224/237/346/200/201/docgen.js +113 -0
  116. package//345/267/245/345/205/267//347/224/237/346/200/201//346/263/250/345/206/214/350/241/250/346/234/215/345/212/241.js +200 -0
  117. package//345/267/245/345/205/267//347/224/237/346/200/201//350/247/204/350/214/203.js +125 -0
  118. package//345/267/245/345/205/267//347/224/237/346/200/201//351/252/214/350/257/201/344/270/211/351/200/232/351/201/223.js +94 -0
  119. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250/AST/351/252/214/350/257/201.co +214 -0
  120. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250/elf.co +105 -0
  121. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//344/270/273.co +29 -0
  122. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//344/273/243/347/240/201/347/224/237/346/210/220/345/231/250.co +3669 -0
  123. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//344/274/230/345/214/226/345/231/250.co +1994 -0
  124. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//345/216/237/347/224/237/351/251/261/345/212/250.co +11 -0
  125. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/212/245/351/224/231/350/241/245/344/270/201.co +7 -0
  126. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/234/272/345/231/250/347/240/201/347/224/237/346/210/220/345/231/250.co +2921 -0
  127. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/01_/345/217/230/351/207/217/345/243/260/346/230/216.co +2 -0
  128. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/02_/347/256/227/346/234/257/350/241/250/350/276/276/345/274/217.co +4 -0
  129. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/03_/345/246/202/346/236/234/350/257/255/345/217/245.co +6 -0
  130. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/04_/345/275/223/345/276/252/347/216/257.co +7 -0
  131. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/05_/345/207/275/346/225/260/345/256/232/344/271/211/350/260/203/347/224/250.co +8 -0
  132. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/06_/345/210/227/350/241/250/345/255/227/345/205/270.co +4 -0
  133. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/07_/346/226/220/346/263/242/351/202/243/345/245/221.co +7 -0
  134. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/08_/345/257/271/344/272/216/345/276/252/347/216/257.co +5 -0
  135. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/09_/345/255/227/347/254/246/344/270/262/346/213/274/346/216/245.co +5 -0
  136. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/10_/345/265/214/345/245/227/347/273/223/346/236/204.co +4 -0
  137. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/11_/344/270/200/345/205/203/350/277/220/347/256/227.co +6 -0
  138. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/12_/351/200/273/350/276/221/350/277/220/347/256/227.co +8 -0
  139. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/13_/351/230/266/344/271/230.co +7 -0
  140. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/14_/345/265/214/345/245/227/345/207/275/346/225/260.co +7 -0
  141. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/15_/346/257/224/350/276/203/350/277/220/347/256/227.co +8 -0
  142. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/16_/345/270/203/345/260/224/345/200/274.co +7 -0
  143. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/t_arith.co +2 -0
  144. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/t_fact.co +7 -0
  145. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/t_fib.co +7 -0
  146. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/t_hello.co +1 -0
  147. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/t_sum.co +5 -0
  148. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225OOP.co +121 -0
  149. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225Web.co +224 -0
  150. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/344/273/243/347/240/201/347/224/237/346/210/220/345/231/250.co +24 -0
  151. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/344/274/230/345/214/226/345/231/250.co +257 -0
  152. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/345/205/203/347/274/226/347/250/213.co +223 -0
  153. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/345/271/266/345/217/221.co +121 -0
  154. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/345/274/202/346/255/245.co +276 -0
  155. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/346/211/251/345/261/225/350/257/255/346/263/225.co +67 -0
  156. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/346/212/245/345/221/212.co +60 -0
  157. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/346/234/272/345/231/250/347/240/201.co +73 -0
  158. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/347/261/273/345/236/213/347/263/273/347/273/237.co +222 -0
  159. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/350/277/220/350/241/214/346/227/266.co +497 -0
  160. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/265/213/350/257/225/351/253/230/347/272/247/347/211/271/346/200/247.co +339 -0
  161. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//346/267/261/345/272/246/346/257/224/350/276/203.js +51 -0
  162. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//347/261/273/345/236/213/347/263/273/347/273/237.co +1966 -0
  163. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//347/274/226/350/257/221.sh +47 -0
  164. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/base.co +42 -0
  165. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/compound.co +30 -0
  166. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/crypto.co +33 -0
  167. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/fibtab.co +24 -0
  168. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/guess.co +33 -0
  169. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/linecount.co +53 -0
  170. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/primgen.co +30 -0
  171. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/temp.co +23 -0
  172. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/timer.co +29 -0
  173. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/wordcount.co +39 -0
  174. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267//345/267/245/345/205/267/351/251/261/345/212/250.co +29 -0
  175. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267//347/274/226/350/257/221/345/267/245/345/205/267.sh +89 -0
  176. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/351/223/276//344/270/273.co +64 -0
  177. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/351/223/276//346/226/207/346/241/243/347/224/237/346/210/220/345/231/250.co +234 -0
  178. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/351/223/276//346/240/274/345/274/217/345/214/226/345/231/250.co +254 -0
  179. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/351/223/276//346/265/213/350/257/225.co +71 -0
  180. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/351/223/276//346/265/213/350/257/225/346/241/206/346/236/266.co +201 -0
  181. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/345/267/245/345/205/267/351/223/276//347/274/226/350/257/221/345/267/245/345/205/267/351/223/276.sh +127 -0
  182. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//345/210/227/350/241/250.co +274 -0
  183. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//345/212/250/346/200/201/350/247/204/345/210/222.co +230 -0
  184. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//345/233/276.co +270 -0
  185. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//345/255/227/345/205/270.co +151 -0
  186. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//345/255/227/347/254/246/344/270/262.co +257 -0
  187. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//345/267/245/345/205/267.co +218 -0
  188. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//346/216/222/345/272/217.co +217 -0
  189. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//346/220/234/347/264/242.co +160 -0
  190. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//346/225/260/345/255/246.co +282 -0
  191. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//346/225/260/346/215/256/347/273/223/346/236/204.co +350 -0
  192. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/346/240/207/345/207/206/345/272/223//347/274/226/350/257/221/346/240/207/345/207/206/345/272/223.sh +100 -0
  193. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/350/247/243/351/207/212/345/231/250//344/270/273.co +46 -0
  194. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/350/247/243/351/207/212/345/231/250//346/261/202/345/200/274.co +264 -0
  195. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/350/247/243/351/207/212/345/231/250//346/265/213/350/257/225.co +66 -0
  196. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/350/247/243/351/207/212/345/231/250//347/274/226/350/257/221/350/247/243/351/207/212/345/231/250.sh +128 -0
  197. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/350/247/243/351/207/212/345/231/250//350/257/215/346/263/225.co +139 -0
  198. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/350/247/243/351/207/212/345/231/250//350/257/255/346/263/225.co +322 -0
  199. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201/binary.co +58 -0
  200. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201/bubble.co +113 -0
  201. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201/calc.co +32 -0
  202. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201/factorial.co +15 -0
  203. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201/fib.co +25 -0
  204. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201/hanoi.co +17 -0
  205. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201/multable.co +9 -0
  206. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201/prime.co +32 -0
  207. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201/reverse.co +26 -0
  208. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201/wordcount.co +48 -0
  209. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201//347/274/226/350/257/221/351/251/261/345/212/250.co +24 -0
  210. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/207/252/344/270/276/351/252/214/350/257/201//347/274/226/350/257/221/351/252/214/350/257/201.sh +103 -0
  211. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/257/215/346/263/225/345/210/206/346/236/220/345/231/250.co +252 -0
  212. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/257/215/346/263/225/350/260/203/350/257/225.co +63 -0
  213. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/257/255/346/263/225/345/210/206/346/236/220/345/231/250.co +779 -0
  214. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/267/221/346/265/213/350/257/225.sh +47 -0
  215. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/267/221/346/265/213/350/257/225/344/273/243/347/240/201/347/224/237/346/210/220.sh +49 -0
  216. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/276/223/345/207/272JSON.co +107 -0
  217. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/276/223/345/207/272JSON/347/276/216/345/214/226.co +81 -0
  218. package//345/267/245/345/205/267//350/207/252/344/270/276/347/274/226/350/257/221/345/231/250//350/277/220/350/241/214/346/227/266.co +2012 -0
  219. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/Empty.java +1 -0
  220. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/bench.c +53 -0
  221. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/bench.co +42 -0
  222. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/bench.go +43 -0
  223. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/bench.java +29 -0
  224. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/bench.js +24 -0
  225. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/bench.py +36 -0
  226. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/bench.rs +35 -0
  227. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/empty.co +0 -0
  228. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/empty_c.c +1 -0
  229. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/empty_go.go +2 -0
  230. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224/empty_rs.rs +1 -0
  231. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/257/271C/350/257/255/350/250/200_/346/213/274/346/216/245.c +32 -0
  232. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/257/271C/350/257/255/350/250/200_/346/213/274/346/216/245.co +10 -0
  233. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/257/271C/350/257/255/350/250/200_/346/216/222/345/272/217.c +23 -0
  234. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/257/271C/350/257/255/350/250/200_/346/216/222/345/272/217.co +31 -0
  235. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/257/271C/350/257/255/350/250/200_/346/226/220/346/263/242/351/202/243/345/245/221.c +17 -0
  236. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/257/271C/350/257/255/350/250/200_/346/226/220/346/263/242/351/202/243/345/245/221.co +10 -0
  237. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/257/271C/350/257/255/350/250/200_/346/226/220/346/263/242/351/202/243/345/245/22120.co +10 -0
  238. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/257/271C/350/257/255/350/250/200_/347/264/257/345/212/240.c +14 -0
  239. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/257/271C/350/257/255/350/250/200_/347/264/257/345/212/240.co +10 -0
  240. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/257/271C/350/257/255/350/250/200/345/257/271/346/257/224/347/273/223/346/236/234.txt +164 -0
  241. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/276/256/345/237/272/345/207/206/fib.c +9 -0
  242. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/276/256/345/237/272/345/207/206/fib.co +2 -0
  243. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/276/256/345/237/272/345/207/206/sum.c +10 -0
  244. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/276/256/345/237/272/345/207/206/sum.co +3 -0
  245. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/276/256/345/237/272/345/207/206//350/256/241/346/265/213.sh +32 -0
  246. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//345/276/256/345/237/272/345/207/206//350/256/241/346/265/213/347/273/223/346/236/234.txt +7 -0
  247. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//350/241/245/346/265/213.sh +45 -0
  248. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//350/256/241/346/265/213.sh +163 -0
  249. package//345/267/245/345/205/267//350/257/255/350/250/200/345/257/271/346/257/224//350/256/241/346/265/213/347/273/223/346/236/234.txt +29 -0
  250. package//347/244/272/344/276/213/JSON/346/237/245/347/234/213/345/231/250.co +55 -0
  251. package//347/244/272/344/276/213//344/273/243/347/240/201/346/240/274/345/274/217/345/214/226/345/231/250.co +109 -0
  252. package//347/244/272/344/276/213//344/273/243/347/240/201/347/273/237/350/256/241.co +58 -0
  253. package//347/244/272/344/276/213//344/276/235/350/265/226/345/210/206/346/236/220.co +46 -0
  254. package//347/244/272/344/276/213//346/226/207/344/273/266/347/256/241/347/220/206/345/231/250.co +55 -0
  255. package//347/244/272/344/276/213//346/226/207/346/241/243/347/224/237/346/210/220/345/231/250.co +55 -0
  256. package//347/244/272/344/276/213//346/255/243/345/210/231/346/265/213/350/257/225/345/231/250.co +39 -0
  257. package//347/244/272/344/276/213//347/256/227/346/263/225/345/217/257/350/247/206/345/214/226.co +53 -0
  258. package//347/244/272/344/276/213//347/275/221/347/273/234/345/267/245/345/205/267.co +46 -0
  259. package//347/244/272/344/276/213//350/277/233/347/250/213/347/233/221/346/216/247.co +40 -0
  260. package//347/244/272/344/276/213/345/214/205/cocn-cli/co.toml +13 -0
  261. package//347/244/272/344/276/213/345/214/205/cocn-cli//345/272/223.co +63 -0
  262. package//347/244/272/344/276/213/345/214/205/cocn-cli//346/265/213/350/257/225.co +31 -0
  263. package//347/244/272/344/276/213/345/214/205/cocn-cli//347/250/213/345/272/217.co +10 -0
  264. package//347/244/272/344/276/213/345/214/205/cocn-collections/co.toml +13 -0
  265. package//347/244/272/344/276/213/345/214/205/cocn-collections//345/272/223.co +56 -0
  266. package//347/244/272/344/276/213/345/214/205/cocn-collections//346/265/213/350/257/225.co +48 -0
  267. package//347/244/272/344/276/213/345/214/205/cocn-collections//347/250/213/345/272/217.co +11 -0
  268. package//347/244/272/344/276/213/345/214/205/cocn-config/co.toml +13 -0
  269. package//347/244/272/344/276/213/345/214/205/cocn-config//345/272/223.co +46 -0
  270. package//347/244/272/344/276/213/345/214/205/cocn-config//346/265/213/350/257/225.co +38 -0
  271. package//347/244/272/344/276/213/345/214/205/cocn-config//347/250/213/345/272/217.co +8 -0
  272. package//347/244/272/344/276/213/345/214/205/cocn-datetime/co.toml +13 -0
  273. package//347/244/272/344/276/213/345/214/205/cocn-datetime//345/272/223.co +56 -0
  274. package//347/244/272/344/276/213/345/214/205/cocn-datetime//346/265/213/350/257/225.co +30 -0
  275. package//347/244/272/344/276/213/345/214/205/cocn-datetime//347/250/213/345/272/217.co +10 -0
  276. package//347/244/272/344/276/213/345/214/205/cocn-encoding/co.toml +13 -0
  277. package//347/244/272/344/276/213/345/214/205/cocn-encoding//345/272/223.co +415 -0
  278. package//347/244/272/344/276/213/345/214/205/cocn-encoding//346/265/213/350/257/225.co +87 -0
  279. package//347/244/272/344/276/213/345/214/205/cocn-encoding//347/250/213/345/272/217.co +15 -0
  280. package//347/244/272/344/276/213/345/214/205/cocn-fs/co.toml +13 -0
  281. package//347/244/272/344/276/213/345/214/205/cocn-fs//345/272/223.co +337 -0
  282. package//347/244/272/344/276/213/345/214/205/cocn-fs//346/265/213/350/257/225.co +169 -0
  283. package//347/244/272/344/276/213/345/214/205/cocn-fs//347/250/213/345/272/217.co +13 -0
  284. package//347/244/272/344/276/213/345/214/205/cocn-hash/co.toml +13 -0
  285. package//347/244/272/344/276/213/345/214/205/cocn-hash//345/272/223.co +234 -0
  286. package//347/244/272/344/276/213/345/214/205/cocn-hash//346/265/213/350/257/225.co +79 -0
  287. package//347/244/272/344/276/213/345/214/205/cocn-hash//347/250/213/345/272/217.co +11 -0
  288. package//347/244/272/344/276/213/345/214/205/cocn-hello/co.toml +14 -0
  289. package//347/244/272/344/276/213/345/214/205/cocn-hello//346/265/213/350/257/225.co +14 -0
  290. package//347/244/272/344/276/213/345/214/205/cocn-hello//347/250/213/345/272/217.co +6 -0
  291. package//347/244/272/344/276/213/345/214/205/cocn-hello//351/227/256/345/200/231.co +16 -0
  292. package//347/244/272/344/276/213/345/214/205/cocn-json/co.toml +13 -0
  293. package//347/244/272/344/276/213/345/214/205/cocn-json//345/272/223.co +42 -0
  294. package//347/244/272/344/276/213/345/214/205/cocn-json//346/265/213/350/257/225.co +31 -0
  295. package//347/244/272/344/276/213/345/214/205/cocn-json//347/250/213/345/272/217.co +10 -0
  296. package//347/244/272/344/276/213/345/214/205/cocn-log/co.toml +13 -0
  297. package//347/244/272/344/276/213/345/214/205/cocn-log//345/272/223.co +43 -0
  298. package//347/244/272/344/276/213/345/214/205/cocn-log//346/265/213/350/257/225.co +32 -0
  299. package//347/244/272/344/276/213/345/214/205/cocn-log//347/250/213/345/272/217.co +11 -0
  300. package//347/244/272/344/276/213/345/214/205/cocn-math/co.toml +13 -0
  301. package//347/244/272/344/276/213/345/214/205/cocn-math//345/272/223.co +323 -0
  302. package//347/244/272/344/276/213/345/214/205/cocn-math//346/265/213/350/257/225.co +143 -0
  303. package//347/244/272/344/276/213/345/214/205/cocn-math//347/250/213/345/272/217.co +11 -0
  304. package//347/244/272/344/276/213/345/214/205/cocn-path/co.toml +13 -0
  305. package//347/244/272/344/276/213/345/214/205/cocn-path//345/272/223.co +358 -0
  306. package//347/244/272/344/276/213/345/214/205/cocn-path//346/265/213/350/257/225.co +124 -0
  307. package//347/244/272/344/276/213/345/214/205/cocn-path//347/250/213/345/272/217.co +15 -0
  308. package//347/244/272/344/276/213/345/214/205/cocn-rand/co.toml +13 -0
  309. package//347/244/272/344/276/213/345/214/205/cocn-rand//345/272/223.co +50 -0
  310. package//347/244/272/344/276/213/345/214/205/cocn-rand//346/265/213/350/257/225.co +33 -0
  311. package//347/244/272/344/276/213/345/214/205/cocn-rand//347/250/213/345/272/217.co +10 -0
  312. package//347/244/272/344/276/213/345/214/205/cocn-regex/co.toml +13 -0
  313. package//347/244/272/344/276/213/345/214/205/cocn-regex//345/272/223.co +37 -0
  314. package//347/244/272/344/276/213/345/214/205/cocn-regex//346/265/213/350/257/225.co +28 -0
  315. package//347/244/272/344/276/213/345/214/205/cocn-regex//347/250/213/345/272/217.co +9 -0
  316. package//347/244/272/344/276/213/345/214/205/cocn-result/co.toml +13 -0
  317. package//347/244/272/344/276/213/345/214/205/cocn-result//345/272/223.co +231 -0
  318. package//347/244/272/344/276/213/345/214/205/cocn-result//346/265/213/350/257/225.co +237 -0
  319. package//347/244/272/344/276/213/345/214/205/cocn-result//347/250/213/345/272/217.co +13 -0
  320. package//347/244/272/344/276/213/345/214/205/cocn-semver/co.toml +13 -0
  321. package//347/244/272/344/276/213/345/214/205/cocn-semver//345/272/223.co +365 -0
  322. package//347/244/272/344/276/213/345/214/205/cocn-semver//346/265/213/350/257/225.co +116 -0
  323. package//347/244/272/344/276/213/345/214/205/cocn-semver//347/250/213/345/272/217.co +11 -0
  324. package//347/244/272/344/276/213/345/214/205/cocn-test/co.toml +13 -0
  325. package//347/244/272/344/276/213/345/214/205/cocn-test//345/272/223.co +95 -0
  326. package//347/244/272/344/276/213/345/214/205/cocn-test//346/265/213/350/257/225.co +92 -0
  327. package//347/244/272/344/276/213/345/214/205/cocn-test//347/250/213/345/272/217.co +7 -0
  328. package//347/244/272/344/276/213/345/214/205/cocn-text/co.toml +13 -0
  329. package//347/244/272/344/276/213/345/214/205/cocn-text//345/272/223.co +80 -0
  330. package//347/244/272/344/276/213/345/214/205/cocn-text//346/265/213/350/257/225.co +38 -0
  331. package//347/244/272/344/276/213/345/214/205/cocn-text//347/250/213/345/272/217.co +11 -0
  332. package//347/244/272/344/276/213/345/214/205/cocn-url/co.toml +13 -0
  333. package//347/244/272/344/276/213/345/214/205/cocn-url//345/272/223.co +69 -0
  334. package//347/244/272/344/276/213/345/214/205/cocn-url//346/265/213/350/257/225.co +25 -0
  335. package//347/244/272/344/276/213/345/214/205/cocn-url//347/250/213/345/272/217.co +11 -0
@@ -0,0 +1,135 @@
1
+ /* ============================================================
2
+ * coCN 运行时 —— 打印函数
3
+ * - 64KB 缓冲, 批量 write 系统调用
4
+ * - 查表法 itoa: 一次处理 2 位数字
5
+ * ============================================================ */
6
+ #include "rt.h"
7
+
8
+ #define BUF_SIZE 65536
9
+
10
+ static char pbuf[BUF_SIZE];
11
+ static int poff = 0;
12
+
13
+ void rt_flush(void) {
14
+ if (poff > 0) {
15
+ rt_write(1, pbuf, (size_t)poff);
16
+ poff = 0;
17
+ }
18
+ }
19
+
20
+ void rt_print_char(char c) {
21
+ if (poff >= BUF_SIZE) rt_flush();
22
+ pbuf[poff++] = c;
23
+ }
24
+
25
+ void rt_print_newline(void) {
26
+ rt_print_char('\n');
27
+ }
28
+
29
+ void rt_print_str(const char *s) {
30
+ while (*s) {
31
+ if (poff >= BUF_SIZE) rt_flush();
32
+ pbuf[poff++] = *s++;
33
+ }
34
+ }
35
+
36
+ /* ------------------------------------------------------------
37
+ * 查表: 00..99 的两位 ASCII 表示
38
+ * ------------------------------------------------------------ */
39
+ static const char digits[200] =
40
+ "00010203040506070809"
41
+ "10111213141516171819"
42
+ "20212223242526272829"
43
+ "30313233343536373839"
44
+ "40414243444546474849"
45
+ "50515253545556575859"
46
+ "60616263646566676869"
47
+ "70717273747576777879"
48
+ "80818283848586878889"
49
+ "90919293949596979899";
50
+
51
+ /* ------------------------------------------------------------
52
+ * 无符号长整型 -> 字符串 (查表法, 一次 2 位)
53
+ * ------------------------------------------------------------ */
54
+ static void append_ulong(unsigned long n) {
55
+ char tmp[24];
56
+ int len = 0;
57
+
58
+ if (n == 0) {
59
+ tmp[len++] = '0';
60
+ } else {
61
+ /* 一次处理 2 位数字 */
62
+ while (n >= 100) {
63
+ unsigned q = n / 100;
64
+ unsigned r = n - q * 100;
65
+ tmp[len++] = digits[r * 2 + 1];
66
+ tmp[len++] = digits[r * 2];
67
+ n = q;
68
+ }
69
+ /* 剩余 1-2 位 */
70
+ if (n >= 10) {
71
+ unsigned r = n;
72
+ tmp[len++] = digits[r * 2 + 1];
73
+ tmp[len++] = digits[r * 2];
74
+ } else {
75
+ tmp[len++] = '0' + (char)n;
76
+ }
77
+ }
78
+
79
+ /* 逆序输出 */
80
+ for (int i = len - 1; i >= 0; i--)
81
+ rt_print_char(tmp[i]);
82
+ }
83
+
84
+ void rt_print_uint(unsigned int n) {
85
+ append_ulong(n);
86
+ }
87
+
88
+ void rt_print_ulong(unsigned long n) {
89
+ append_ulong(n);
90
+ }
91
+
92
+ void rt_print_int(int n) {
93
+ if (n < 0) {
94
+ rt_print_char('-');
95
+ append_ulong((unsigned long)(-(unsigned int)n));
96
+ } else {
97
+ append_ulong((unsigned long)n);
98
+ }
99
+ }
100
+
101
+ void rt_print_long(long n) {
102
+ if (n < 0) {
103
+ rt_print_char('-');
104
+ append_ulong((unsigned long)(-(unsigned long)n));
105
+ } else {
106
+ append_ulong((unsigned long)n);
107
+ }
108
+ }
109
+
110
+ void rt_print_bool(int b) {
111
+ if (b) rt_print_str("真");
112
+ else rt_print_str("假");
113
+ }
114
+
115
+ /* ------------------------------------------------------------
116
+ * void rt_print_double(double d)
117
+ * 简单实现: 整数部分 + 6 位小数
118
+ * ------------------------------------------------------------ */
119
+ void rt_print_double(double d) {
120
+ if (d != d) { rt_print_str("NaN"); return; }
121
+ if (d < 0) { rt_print_char('-'); d = -d; }
122
+
123
+ long whole = (long)d;
124
+ double frac = d - (double)whole;
125
+
126
+ append_ulong((unsigned long)whole);
127
+ rt_print_char('.');
128
+
129
+ for (int i = 0; i < 6; i++) {
130
+ frac *= 10.0;
131
+ int digit = (int)frac;
132
+ rt_print_char('0' + (char)digit);
133
+ frac -= digit;
134
+ }
135
+ }
@@ -0,0 +1,177 @@
1
+ /* ============================================================
2
+ * coCN 轻量级原生运行时 —— 公共头文件
3
+ * 纯 freestanding 环境:不依赖 libc,直接系统调用
4
+ * 目标:比 glibc 更快的内存分配与字符串操作
5
+ * ============================================================ */
6
+ #ifndef RT_H
7
+ #define RT_H
8
+
9
+ /* ---------- 基础类型(freestanding,不引入 stddef.h/stdint.h) ---------- */
10
+ typedef unsigned long size_t;
11
+ typedef long ssize_t;
12
+ typedef unsigned long uintptr_t;
13
+ typedef unsigned char uint8_t;
14
+ typedef unsigned short uint16_t;
15
+ typedef unsigned int uint32_t;
16
+ typedef unsigned long long uint64_t;
17
+ /* int64_t 不自定义: SSE2 头文件会从系统 stdint 引入, 避免冲突 */
18
+
19
+ #ifndef NULL
20
+ #define NULL ((void *)0)
21
+ #endif
22
+
23
+ #define likely(x) __builtin_expect(!!(x), 1)
24
+ #define unlikely(x) __builtin_expect(!!(x), 0)
25
+
26
+ /* ---------- 系统调用封装(来自 syscall.asm) ---------- */
27
+ /* ssize_t rt_write(int fd, const void *buf, size_t count); */
28
+ long rt_write(int fd, const void *buf, size_t count);
29
+ /* void rt_exit(int code) __attribute__((noreturn)); */
30
+ void rt_exit(int code);
31
+ /* void *rt_mmap(void *addr, size_t len, int prot, int flags, int fd, long offset); */
32
+ void *rt_mmap(void *addr, size_t len, int prot, int flags, int fd, long offset);
33
+ /* void *rt_mremap(void *old_addr, size_t old_size, size_t new_size, int flags); */
34
+ void *rt_mremap(void *old_addr, size_t old_size, size_t new_size, int flags);
35
+ /* int rt_munmap(void *addr, size_t len); */
36
+ int rt_munmap(void *addr, size_t len);
37
+ /* int rt_brk(void *addr); */
38
+ long rt_brk(void *addr);
39
+ /* int rt_open(const char *path, int flags, int mode); */
40
+ int rt_open(const char *path, int flags, int mode);
41
+ /* ssize_t rt_read(int fd, void *buf, size_t count); */
42
+ long rt_read(int fd, void *buf, size_t count);
43
+ /* int rt_close(int fd); */
44
+ int rt_close(int fd);
45
+ /* long rt_gettimeofday(void); 返回微秒时间戳 */
46
+ long rt_gettimeofday(void);
47
+ /* long rt_monotonic_us(void); 返回单调时钟微秒(用于 benchmark) */
48
+ long rt_monotonic_us(void);
49
+
50
+ /* mmap 常量(x86-64 Linux) */
51
+ #define RT_PROT_READ 0x1
52
+ #define RT_PROT_WRITE 0x2
53
+ #define RT_MAP_PRIVATE 0x02
54
+ #define RT_MAP_ANON 0x20
55
+ #define RT_FD_ANON (-1)
56
+
57
+ /* ---------- 内存分配器(alloc.c) ---------- */
58
+ void *rt_alloc(size_t size);
59
+ void rt_free(void *ptr);
60
+ void *rt_realloc(void *ptr, size_t size);
61
+ void *rt_calloc(size_t nmemb, size_t size);
62
+
63
+ /* ---------- 字符串操作(string.c) ---------- */
64
+ size_t rt_strlen(const char *s);
65
+ char *rt_strcpy(char *dst, const char *src);
66
+ char *rt_strncpy(char *dst, const char *src, size_t n);
67
+ char *rt_strcat(char *dst, const char *src);
68
+ int rt_strcmp(const char *a, const char *b);
69
+ int rt_strncmp(const char *a, const char *b, size_t n);
70
+ char *rt_strdup(const char *s);
71
+ char *rt_str_concat(const char *a, const char *b);
72
+ char *rt_str_sub(const char *s, int start, int len);
73
+ int rt_str_index(const char *s, const char *needle);
74
+ char *rt_str_replace(const char *s, const char *from, const char *to);
75
+ char **rt_str_split(const char *s, char delim, int *out_count);
76
+ char *rt_str_join(char **parts, int count, const char *sep);
77
+
78
+ /* 编译器可能隐式调用的内存原语 */
79
+ void *rt_memset(void *dst, int c, size_t n);
80
+ void *rt_memcpy(void *dst, const void *src, size_t n);
81
+ void *rt_memmove(void *dst, const void *src, size_t n);
82
+ int rt_memcmp(const void *a, const void *b, size_t n);
83
+
84
+ /* ---------- 列表 list.c ---------- */
85
+ typedef struct {
86
+ int length;
87
+ int capacity;
88
+ void **items;
89
+ } rt_list_t;
90
+
91
+ rt_list_t *rt_list_create(void);
92
+ void rt_list_append(rt_list_t *l, void *val);
93
+ void *rt_list_get(rt_list_t *l, int idx);
94
+ void rt_list_set(rt_list_t *l, int idx, void *val);
95
+ int rt_list_length(rt_list_t *l);
96
+ void *rt_list_pop(rt_list_t *l);
97
+ void rt_list_insert(rt_list_t *l, int idx, void *val);
98
+ void rt_list_remove(rt_list_t *l, int idx);
99
+ rt_list_t *rt_list_concat(rt_list_t *a, rt_list_t *b);
100
+ rt_list_t *rt_list_slice(rt_list_t *l, int start, int end);
101
+ void rt_list_sort(rt_list_t *l, int (*cmp)(void *a, void *b));
102
+
103
+ /* 内部: 扩容 (list.c 中定义) */
104
+ void _rt_list_reserve(rt_list_t *l, int newcap);
105
+
106
+ /* 热点路径内联: append/get/set/length/pop 可被编译器内联 */
107
+ static inline void rt_list_append_inline(rt_list_t *l, void *val) {
108
+ if (unlikely(l->length >= l->capacity))
109
+ _rt_list_reserve(l, l->capacity * 2);
110
+ l->items[l->length++] = val;
111
+ }
112
+ static inline void *rt_list_get_inline(rt_list_t *l, int idx) {
113
+ if (idx < 0 || idx >= l->length) return NULL;
114
+ return l->items[idx];
115
+ }
116
+ static inline int rt_list_length_inline(rt_list_t *l) {
117
+ return l->length;
118
+ }
119
+ static inline void *rt_list_pop_inline(rt_list_t *l) {
120
+ if (l->length <= 0) return NULL;
121
+ return l->items[--l->length];
122
+ }
123
+
124
+ /* ---------- 字典 dict.c ---------- */
125
+ typedef struct {
126
+ char *key;
127
+ void *val;
128
+ int used; /* 1=占用, 0=空, -1=已删除(墓碑) */
129
+ } rt_entry_t;
130
+
131
+ typedef struct {
132
+ int size;
133
+ int capacity;
134
+ rt_entry_t *buckets;
135
+ } rt_dict_t;
136
+
137
+ rt_dict_t *rt_dict_create(void);
138
+ void *rt_dict_get(rt_dict_t *d, const char *key);
139
+ int rt_dict_set(rt_dict_t *d, const char *key, void *val);
140
+ void *rt_dict_remove(rt_dict_t *d, const char *key);
141
+ int rt_dict_contains(rt_dict_t *d, const char *key);
142
+ int rt_dict_size(rt_dict_t *d);
143
+ rt_list_t *rt_dict_keys(rt_dict_t *d);
144
+ rt_list_t *rt_dict_values(rt_dict_t *d);
145
+
146
+ /* ---------- 打印 print.c ---------- */
147
+ void rt_print_int(int n);
148
+ void rt_print_uint(unsigned int n);
149
+ void rt_print_long(long n);
150
+ void rt_print_ulong(unsigned long n);
151
+ void rt_print_double(double d);
152
+ void rt_print_str(const char *s);
153
+ void rt_print_bool(int b);
154
+ void rt_print_newline(void);
155
+ void rt_print_char(char c);
156
+ void rt_flush(void);
157
+
158
+ /* ---------- 数学 math.c ---------- */
159
+ int rt_abs(int n);
160
+ int rt_min(int a, int b);
161
+ int rt_max(int a, int b);
162
+ double rt_pow(double base, double exp);
163
+ double rt_sqrt(double x);
164
+ double rt_sin(double x);
165
+ double rt_cos(double x);
166
+ double rt_tan(double x);
167
+ double rt_log(double x);
168
+ double rt_log2(double x);
169
+ double rt_log10(double x);
170
+ double rt_exp(double x);
171
+ double rt_floor(double x);
172
+ double rt_ceil(double x);
173
+ double rt_round(double x);
174
+ int rt_rand(void);
175
+ void rt_srand(unsigned int seed);
176
+
177
+ #endif /* RT_H */
@@ -0,0 +1,288 @@
1
+ /* ============================================================
2
+ * coCN 运行时 —— 字符串操作 (优化)
3
+ * - strlen: 8 字节字读取, 去掉对齐前导循环
4
+ * - strcpy: 8 字节字复制
5
+ * - memcpy/memset/memmove/memcmp: AVX2 (大缓冲区安全)
6
+ * 目标: 比 glibc 更快
7
+ * ============================================================ */
8
+ #include "rt.h"
9
+ #include <immintrin.h>
10
+
11
+ /* 检测 64 位字中是否含零字节的魔数 */
12
+ #define HASZERO(x) (((x) - 0x0101010101010101ULL) & ~(x) & 0x8080808080808080ULL)
13
+
14
+ /* ------------------------------------------------------------
15
+ * size_t rt_strlen(const char *s)
16
+ * AVX2 非对齐加载, 一次 32 字节
17
+ * ------------------------------------------------------------ */
18
+ size_t rt_strlen(const char *s) {
19
+ const char *p = s;
20
+ __m256i zero = _mm256_setzero_si256();
21
+ for (;;) {
22
+ __m256i v = _mm256_loadu_si256((const __m256i *)p);
23
+ int mask = _mm256_movemask_epi8(_mm256_cmpeq_epi8(v, zero));
24
+ if (mask)
25
+ return (size_t)(p - s) + (size_t)__builtin_ctz(mask);
26
+ p += 32;
27
+ }
28
+ }
29
+
30
+ /* ------------------------------------------------------------
31
+ * char *rt_strcpy(char *dst, const char *src)
32
+ * AVX2 一次复制 32 字节, 尾部字节复制
33
+ * ------------------------------------------------------------ */
34
+ char *rt_strcpy(char *dst, const char *src) {
35
+ char *d = dst;
36
+ const char *s = src;
37
+ __m256i zero = _mm256_setzero_si256();
38
+ for (;;) {
39
+ __m256i v = _mm256_loadu_si256((const __m256i *)s);
40
+ int mask = _mm256_movemask_epi8(_mm256_cmpeq_epi8(v, zero));
41
+ if (mask) {
42
+ int z = __builtin_ctz(mask);
43
+ for (int i = 0; i <= z; i++) d[i] = s[i];
44
+ return dst;
45
+ }
46
+ _mm256_storeu_si256((__m256i *)d, v);
47
+ s += 32;
48
+ d += 32;
49
+ }
50
+ }
51
+
52
+ char *rt_strncpy(char *dst, const char *src, size_t n) {
53
+ size_t i;
54
+ for (i = 0; i < n && src[i]; i++) dst[i] = src[i];
55
+ for (; i < n; i++) dst[i] = 0;
56
+ return dst;
57
+ }
58
+
59
+ /* ------------------------------------------------------------
60
+ * char *rt_strcat(char *dst, const char *src)
61
+ * ------------------------------------------------------------ */
62
+ char *rt_strcat(char *dst, const char *src) {
63
+ char *p = dst + rt_strlen(dst);
64
+ rt_strcpy(p, src);
65
+ return dst;
66
+ }
67
+
68
+ /* ------------------------------------------------------------
69
+ * int rt_strcmp(const char *a, const char *b)
70
+ * 8 字节字比较, 正确处理 null 终止符
71
+ * ------------------------------------------------------------ */
72
+ int rt_strcmp(const char *a, const char *b) {
73
+ uint64_t wa, wb;
74
+ for (;;) {
75
+ wa = *(const uint64_t *)a;
76
+ wb = *(const uint64_t *)b;
77
+ if (wa == wb) {
78
+ /* 字相同: 检查是否含 null (字符串结束) */
79
+ if (HASZERO(wa)) return 0;
80
+ a += 8; b += 8;
81
+ } else {
82
+ /* 字不同: 找第一个不同字节, 但不超过 null */
83
+ for (int i = 0; i < 8; i++) {
84
+ if (a[i] == 0 || a[i] != b[i])
85
+ return (int)(unsigned char)a[i] - (int)(unsigned char)b[i];
86
+ }
87
+ /* 前8字节都相同(不含null) — 不应该到这里, 因为 wa!=wb */
88
+ a += 8; b += 8;
89
+ }
90
+ }
91
+ }
92
+
93
+ int rt_strncmp(const char *a, const char *b, size_t n) {
94
+ while (n-- && *a && (*a == *b)) { a++; b++; }
95
+ if (n == (size_t)-1) return 0;
96
+ return (int)(unsigned char)*a - (int)(unsigned char)*b;
97
+ }
98
+
99
+ /* ------------------------------------------------------------
100
+ * char *rt_strdup(const char *s)
101
+ * ------------------------------------------------------------ */
102
+ char *rt_strdup(const char *s) {
103
+ size_t n = rt_strlen(s) + 1;
104
+ char *p = (char *)rt_alloc(n);
105
+ if (!p) return NULL;
106
+ rt_memcpy(p, s, n);
107
+ return p;
108
+ }
109
+
110
+ /* ------------------------------------------------------------
111
+ * char *rt_str_concat(const char *a, const char *b)
112
+ * ------------------------------------------------------------ */
113
+ char *rt_str_concat(const char *a, const char *b) {
114
+ size_t la = rt_strlen(a), lb = rt_strlen(b);
115
+ char *out = (char *)rt_alloc(la + lb + 1);
116
+ if (!out) return NULL;
117
+ rt_memcpy(out, a, la);
118
+ rt_memcpy(out + la, b, lb + 1);
119
+ return out;
120
+ }
121
+
122
+ /* ------------------------------------------------------------
123
+ * char *rt_str_sub(const char *s, int start, int len)
124
+ * ------------------------------------------------------------ */
125
+ char *rt_str_sub(const char *s, int start, int len) {
126
+ if (start < 0) start = 0;
127
+ if (len < 0) len = 0;
128
+ char *out = (char *)rt_alloc(len + 1);
129
+ if (!out) return NULL;
130
+ rt_memcpy(out, s + start, len);
131
+ out[len] = 0;
132
+ return out;
133
+ }
134
+
135
+ /* ------------------------------------------------------------
136
+ * int rt_str_index(const char *s, const char *needle)
137
+ * ------------------------------------------------------------ */
138
+ int rt_str_index(const char *s, const char *needle) {
139
+ if (*needle == 0) return 0;
140
+ size_t nl = rt_strlen(needle);
141
+ for (size_t i = 0; s[i]; i++) {
142
+ size_t j = 0;
143
+ for (; j < nl && s[i + j] == needle[j]; j++);
144
+ if (j == nl) return (int)i;
145
+ }
146
+ return -1;
147
+ }
148
+
149
+ /* ------------------------------------------------------------
150
+ * char *rt_str_replace(const char *s, const char *from, const char *to)
151
+ * ------------------------------------------------------------ */
152
+ char *rt_str_replace(const char *s, const char *from, const char *to) {
153
+ size_t fl = rt_strlen(from), tl = rt_strlen(to);
154
+ int count = 0;
155
+ size_t slen = rt_strlen(s);
156
+ for (size_t i = 0; i + fl <= slen; i++) {
157
+ if (rt_strncmp(s + i, from, fl) == 0) { count++; i += fl - 1; }
158
+ }
159
+ size_t outlen = slen + count * (tl - fl);
160
+ char *out = (char *)rt_alloc(outlen + 1);
161
+ if (!out) return NULL;
162
+
163
+ size_t oi = 0;
164
+ for (size_t i = 0; i < slen;) {
165
+ if (i + fl <= slen && rt_strncmp(s + i, from, fl) == 0) {
166
+ rt_memcpy(out + oi, to, tl);
167
+ oi += tl; i += fl;
168
+ } else {
169
+ out[oi++] = s[i++];
170
+ }
171
+ }
172
+ out[oi] = 0;
173
+ return out;
174
+ }
175
+
176
+ /* ------------------------------------------------------------
177
+ * char **rt_str_split(const char *s, char delim, int *out_count)
178
+ * ------------------------------------------------------------ */
179
+ char **rt_str_split(const char *s, char delim, int *out_count) {
180
+ int cap = 8, cnt = 0;
181
+ char **parts = (char **)rt_alloc(cap * sizeof(char *));
182
+ if (!parts) { *out_count = 0; return NULL; }
183
+
184
+ const char *start = s;
185
+ for (;;) {
186
+ if (*s == delim || *s == 0) {
187
+ size_t l = (size_t)(s - start);
188
+ if (cnt + 1 >= cap) {
189
+ cap *= 2;
190
+ parts = (char **)rt_realloc(parts, cap * sizeof(char *));
191
+ }
192
+ parts[cnt] = rt_str_sub(start, 0, (int)l);
193
+ cnt++;
194
+ if (*s == 0) break;
195
+ start = s + 1;
196
+ }
197
+ s++;
198
+ }
199
+ *out_count = cnt;
200
+ return parts;
201
+ }
202
+
203
+ /* ------------------------------------------------------------
204
+ * char *rt_str_join(char **parts, int count, const char *sep)
205
+ * ------------------------------------------------------------ */
206
+ char *rt_str_join(char **parts, int count, const char *sep) {
207
+ size_t sl = rt_strlen(sep), total = 1;
208
+ for (int i = 0; i < count; i++) total += rt_strlen(parts[i]) + sl;
209
+ char *out = (char *)rt_alloc(total);
210
+ if (!out) return NULL;
211
+ out[0] = 0;
212
+ for (int i = 0; i < count; i++) {
213
+ if (i > 0) rt_strcat(out, sep);
214
+ rt_strcat(out, parts[i]);
215
+ }
216
+ return out;
217
+ }
218
+
219
+ /* ============================================================
220
+ * 内存原语 (AVX2 向量化)
221
+ * ============================================================ */
222
+
223
+ void *rt_memset(void *dst, int c, size_t n) {
224
+ unsigned char *d = (unsigned char *)dst;
225
+ if (n >= 128) {
226
+ __m256i v = _mm256_set1_epi8((char)(unsigned char)c);
227
+ while (n >= 32) {
228
+ _mm256_storeu_si256((__m256i *)d, v);
229
+ d += 32; n -= 32;
230
+ }
231
+ }
232
+ uint64_t w = (uint64_t)(unsigned char)c * 0x0101010101010101ULL;
233
+ while (n >= 8) {
234
+ *(uint64_t *)d = w;
235
+ d += 8; n -= 8;
236
+ }
237
+ while (n--) *d++ = (unsigned char)c;
238
+ return dst;
239
+ }
240
+
241
+ void *rt_memcpy(void *dst, const void *src, size_t n) {
242
+ unsigned char *d = (unsigned char *)dst;
243
+ const unsigned char *s = (const unsigned char *)src;
244
+ if (n >= 128) {
245
+ while (n >= 32) {
246
+ __m256i v = _mm256_loadu_si256((const __m256i *)s);
247
+ _mm256_storeu_si256((__m256i *)d, v);
248
+ d += 32; s += 32; n -= 32;
249
+ }
250
+ }
251
+ while (n >= 8) {
252
+ *(uint64_t *)d = *(const uint64_t *)s;
253
+ d += 8; s += 8; n -= 8;
254
+ }
255
+ while (n--) *d++ = *s++;
256
+ return dst;
257
+ }
258
+
259
+ void *rt_memmove(void *dst, const void *src, size_t n) {
260
+ unsigned char *d = (unsigned char *)dst;
261
+ const unsigned char *s = (const unsigned char *)src;
262
+ if (d == s) return dst;
263
+ if (d < s) {
264
+ while (n >= 8) {
265
+ *(uint64_t *)d = *(const uint64_t *)s;
266
+ d += 8; s += 8; n -= 8;
267
+ }
268
+ while (n--) *d++ = *s++;
269
+ } else {
270
+ d += n; s += n;
271
+ while (n >= 8) {
272
+ d -= 8; s -= 8; n -= 8;
273
+ *(uint64_t *)d = *(const uint64_t *)s;
274
+ }
275
+ while (n--) { *--d = *--s; }
276
+ }
277
+ return dst;
278
+ }
279
+
280
+ int rt_memcmp(const void *a, const void *b, size_t n) {
281
+ const unsigned char *pa = (const unsigned char *)a;
282
+ const unsigned char *pb = (const unsigned char *)b;
283
+ while (n--) {
284
+ if (*pa != *pb) return (int)*pa - (int)*pb;
285
+ pa++; pb++;
286
+ }
287
+ return 0;
288
+ }