Skip to content

Commit 68849ad

Browse files
committed
update changes
1 parent 52d7294 commit 68849ad

File tree

1 file changed

+75
-2
lines changed

1 file changed

+75
-2
lines changed

Changes.md

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,80 @@
11
`*` means potential break changes
2-
# 8.4.0
32

4-
- #4848 #4847 #4844 #4836 #4826 #4824
3+
# 8.4.1
4+
5+
- #4856 #4858
6+
Improve code generation for pattern match:
7+
Input:
8+
```res
9+
type t =
10+
| A
11+
| B
12+
| C
13+
| D (int )
14+
| E (int)
15+
16+
let f = x => {
17+
switch x {
18+
| A => 0
19+
| B => 1
20+
| C => 2
21+
| D (x) => x
22+
| E (x) => x + 1
23+
}
24+
}
25+
```
26+
Output was:
27+
```js
28+
function f(x) {
29+
if (typeof x !== "number") {
30+
if (x.TAG) {
31+
return x._0 + 1 | 0;
32+
} else {
33+
return x._0;
34+
}
35+
36+
switch (x) {
37+
case /* A */0 :
38+
return 0;
39+
case /* B */1 :
40+
return 1;
41+
case /* C */2 :
42+
return 2;
43+
}
44+
}
45+
```
46+
47+
Now:
48+
```js
49+
function f(x) {
50+
if (typeof x !== "number") {
51+
if (x.TAG === /* D */0) {
52+
return x._0;
53+
} else {
54+
return x._0 + 1 | 0;
55+
}
56+
}
57+
switch (x) {
58+
case /* A */0 :
59+
return 0;
60+
case /* B */1 :
61+
return 1;
62+
case /* C */2 :
63+
return 2;
64+
65+
}
66+
}
67+
```
68+
69+
70+
71+
- #4855 *internal changes*
72+
changes to compiler-libs will trigger a rebuild of the compiler, this allows us to
73+
see how changes of compiler-libs affect bsc.exe quickly
74+
75+
- #4850 replace ocp-ocamlres with a lightweight nodejs script, get rid of such dev dependency
76+
77+
- #4854 #4848 #4847 #4844 #4836 #4826 #4824
578
679
Pinned packages support and `-make-world` respect changes of dependencies
780

0 commit comments

Comments
 (0)