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