cella-lang 0.1.202611030113 → 0.1.202611030133

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/CHANGES.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ## 未發佈
7
7
 
8
- - 編出的 wasm:尾端的「建構子的最後一個欄位是對自己的呼叫」(`cons x (f …)`,像 `List.replicate`、`List.map`)轉成不佔堆疊的迴圈(目的地傳遞),瀏覽器上 10 萬個元素的串列也建得出來;之前 V8 七千多層就 `Maximum call stack size exceeded`。資料型別的欄位在模組裡改成可寫(自己讀模組的宿主不受影響)。遞迴的結果交給 Nat 的加法(`List.length` 的 `succ (length ys)`、`add n (sumTo k)`)同樣轉成累加的迴圈。尾端是字串的串接(`String.concat`、`String.repeat`)還沒有轉。
8
+ - 編出的 wasm:尾端的「建構子的最後一個欄位是對自己的呼叫」(`cons x (f …)`,像 `List.replicate`、`List.map`)轉成不佔堆疊的迴圈(目的地傳遞),瀏覽器上 10 萬個元素的串列也建得出來;之前 V8 七千多層就 `Maximum call stack size exceeded`。資料型別的欄位在模組裡改成可寫(自己讀模組的宿主不受影響)。遞迴的結果交給 Nat 的加法(`List.length` 的 `succ (length ys)`、`add n (sumTo k)`)同樣轉成累加的迴圈。尾端是字串的串接(`String.concat` 的 `String.append x (concat rest)`,`String.repeat` 用它)也轉成迴圈:rope 節點先接上、串完再補長度。
9
9
  - 編出的 wasm 不再有空的資料段:空字串的字面量改用 `array.new_default` 建 0 格的陣列。之前的 `array.new_data` 合乎規格,但 WAMR 2.4.3 的直譯器把「起點等於資料段長度」判成越界,`String.repeat 1 "a"` 這類走到空字串的程式在 WAMR 上中止。
10
10
  - 介面清單寫明外部函式邊界上整數的編碼:`Bool` 傳給宿主是 1/0、宿主回傳非零是 true,`Unit` 是 0,`Nat` 是非負的 i64。
11
11
  - 標準庫的 `Json.quote`(`Json.render` 的字串)改成迴圈:長字串在瀏覽器的淺堆疊上不再溢位(判決 JSON 的輸出八千多個字元就丟 Maximum call stack size exceeded)。
package/cella_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cella-lang",
3
- "version": "0.1.202611030113",
3
+ "version": "0.1.202611030133",
4
4
  "description": "Cella Lang: a formalization engine that says what it checked. The checker (cubical type theory with QTT) compiled to WebAssembly for browsers and Node; every check ends in Accept, Reject or Unknown, with the assumptions it rests on.",
5
5
  "type": "module",
6
6
  "main": "cella.js",
@@ -20,5 +20,5 @@
20
20
  "license": "Apache-2.0",
21
21
  "author": "SungYu Chang",
22
22
  "engines": { "node": ">=18" },
23
- "cella": { "checkerHash": "eac27d7a51e5e48b", "semanticsHash": "5a71ea88342da141", "filesHash": "4788307e8e092c5f", "commit": "ec42dd0bc3a7e2d34e20bdcd09040cd8bb641c96" }
23
+ "cella": { "checkerHash": "eac27d7a51e5e48b", "semanticsHash": "5a71ea88342da141", "filesHash": "a95ba270a75c6cb2", "commit": "675c4f804124d4237edd53289958daf2c5fe248c" }
24
24
  }