@grain/stdlib 0.5.7 → 0.5.8
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/CHANGELOG.md +13 -0
- package/array.gr +0 -2
- package/immutablearray.gr +929 -0
- package/immutablearray.md +1038 -0
- package/number.gr +3 -21
- package/number.md +1 -2
- package/package.json +1 -1
- package/runtime/compare.gr +1 -1
- package/runtime/debugPrint.gr +51 -0
- package/runtime/debugPrint.md +30 -0
- package/runtime/numbers.gr +64 -30
- package/runtime/numbers.md +7 -1
- package/stack.gr +13 -0
- package/stack.md +42 -0
- package/runtime/unsafe/printWasm.gr +0 -41
- package/runtime/unsafe/printWasm.md +0 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
### [0.5.8](https://github.com/grain-lang/grain/compare/stdlib-v0.5.7...stdlib-v0.5.8) (2022-12-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **runtime:** Optimize simple number comparison ([f7ceae7](https://github.com/grain-lang/grain/commit/f7ceae729260bc3c5eee017954aa7e242c3f8cb5))
|
|
9
|
+
* **stdlib:** Add `ImmutableArray` module ([#1477](https://github.com/grain-lang/grain/issues/1477)) ([a34d8b9](https://github.com/grain-lang/grain/commit/a34d8b9e8ce629c40d65b99561c0f41fa400542e))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **stdlib:** Fix NaN comparisons ([#1543](https://github.com/grain-lang/grain/issues/1543)) ([f7ceae7](https://github.com/grain-lang/grain/commit/f7ceae729260bc3c5eee017954aa7e242c3f8cb5))
|
|
15
|
+
|
|
3
16
|
### [0.5.7](https://github.com/grain-lang/grain/compare/stdlib-v0.5.6...stdlib-v0.5.7) (2022-12-06)
|
|
4
17
|
|
|
5
18
|
|
package/array.gr
CHANGED
|
@@ -110,8 +110,6 @@ export let init: (Number, Number -> a) -> Array<a> =
|
|
|
110
110
|
let array = allocateArray(length)
|
|
111
111
|
let mut index = 0n
|
|
112
112
|
for (let mut i = 0n; WasmI32.ltS(i, byteLength); i = WasmI32.add(i, 4n)) {
|
|
113
|
-
// [FIXME] This line fails the array/map test suite (#815)
|
|
114
|
-
// assert !WasmI32.eqz(WasmI32.and(WasmI32.fromGrain(index), 1n)) // must be a simple int for next line to be correct
|
|
115
113
|
WasmI32.store(
|
|
116
114
|
WasmI32.add(array, i),
|
|
117
115
|
Memory.incRef(WasmI32.fromGrain(fn(tagSimpleNumber(index)))),
|