Skip to content

Commit c6bcaac

Browse files
authored
Merge pull request #4860 from rescript-lang/syncup
udpate chagnes for 8.4.1
2 parents b59b105 + 991ee92 commit c6bcaac

File tree

12 files changed

+444
-120
lines changed

12 files changed

+444
-120
lines changed

Changes.md

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

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
579
680
Pinned packages support and `-make-world` respect changes of dependencies
781

darwin/ninja.exe

-8.31 KB
Binary file not shown.

jscomp/artifacts.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,7 @@
10071007
"littlecase.js",
10081008
"ninja.js",
10091009
"ninjaFactory.js",
1010+
"pack.js",
10101011
"prebuilt.js",
10111012
"prepublish.js",
10121013
"release.js",

jscomp/common/bs_version.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* You should have received a copy of the GNU Lesser General Public License
2323
* along with this program; if not, write to the Free Software
2424
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
25-
let version = "8.4.0-dev.1"
25+
let version = "8.4.0"
2626
let header =
2727
"// Generated by ReScript, PLEASE EDIT WITH CARE"
2828
let package_name = "bs-platform"

lib/4.06.1/bsb.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ end = struct
5555
* You should have received a copy of the GNU Lesser General Public License
5656
* along with this program; if not, write to the Free Software
5757
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
58-
let version = "8.4.0-dev.1"
58+
let version = "8.4.0"
5959
let header =
6060
"// Generated by ReScript, PLEASE EDIT WITH CARE"
6161
let package_name = "bs-platform"

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18117,7 +18117,7 @@ end = struct
1811718117
* You should have received a copy of the GNU Lesser General Public License
1811818118
* along with this program; if not, write to the Free Software
1811918119
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
18120-
let version = "8.4.0-dev.1"
18120+
let version = "8.4.0"
1812118121
let header =
1812218122
"// Generated by ReScript, PLEASE EDIT WITH CARE"
1812318123
let package_name = "bs-platform"

lib/4.06.1/unstable/js_refmt_compiler.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18117,7 +18117,7 @@ end = struct
1811718117
* You should have received a copy of the GNU Lesser General Public License
1811818118
* along with this program; if not, write to the Free Software
1811918119
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
18120-
let version = "8.4.0-dev.1"
18120+
let version = "8.4.0"
1812118121
let header =
1812218122
"// Generated by ReScript, PLEASE EDIT WITH CARE"
1812318123
let package_name = "bs-platform"

0 commit comments

Comments
 (0)