-
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a06d9a
commit 1c0a119
Showing
31 changed files
with
87 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ It's focused on type safety, performance and JS interop. It used to be called Bu | |
npm i [email protected] | ||
``` | ||
|
||
The changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#83), this is a large release, and we will go through some highlighted changes. | ||
The changes are listed [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#83), this is a large release, and we will go through some highlighted changes. | ||
|
||
|
||
|
||
|
@@ -122,7 +122,7 @@ Now user can pick up their js file extension support per module format: | |
|
||
## More flexible filename support | ||
|
||
To have better integration with other [JS infrastructures](https://github.com/rescript-lang/rescript-compiler/issues/4624), | ||
To have better integration with other [JS infrastructures](https://github.com/rescript-lang/rescript/issues/4624), | ||
for example, Next.js/React Native, we allow file names like `404.res`, | ||
`Button.Android.res` so that it can just be picked up by those tools | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ It's focused on type safety, performance and JS interop. It used to be called Bu | |
npm i [email protected] | ||
``` | ||
|
||
The changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#841). | ||
The changes are listed [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#841). | ||
|
||
We will go through some highlighted changes. | ||
|
||
|
@@ -33,11 +33,10 @@ In this release, we fix the integrity of `bsb -make-world` which allows user to | |
The fix is well implemented that people who don't do such modifications will not pay for it. | ||
|
||
This is one of the highest desired feature request based on the | ||
[user feedback](https://github.com/rescript-lang/rescript-compiler/issues/4361#issuecomment-739538789), so we will expand a bit here why it is tricky | ||
to implement it without compromising performance. | ||
[user feedback](https://github.com/rescript-lang/rescript/issues/4361#issuecomment-739538789), so we will expand a bit here why it is tricky to implement it without compromising performance. | ||
|
||
In ReScript compilation scheme, dependencies as packages are treated as a black box, | ||
changes of dependencies should be *transitive*. The is due to that we have cross module | ||
changes of dependencies should be _transitive_. The is due to that we have cross module | ||
optimizations and the binary interface itself is a hash of its dependencies. | ||
So for a package dependency chain: A -> B -> C, if A changes and B does not change, C still needs get rebuilt. | ||
Because the intermediate output of B may still change due to the change of A. | ||
|
@@ -68,6 +67,6 @@ of such stale outptu, such stale `List.cmi` file will break the integrity of the | |
In this release, we introduced a more robust algorithm that will always remove stale output before the build so | ||
that such integrity is not broken. | ||
|
||
Last but not the least, we continue improving the readability, debuggability of the [generated output](https://github.com/rescript-lang/rescript-compiler/pull/4858) : ) | ||
Last but not the least, we continue improving the readability, debuggability of the [generated output](https://github.com/rescript-lang/rescript/pull/4858) : ) | ||
|
||
Happy Hacking! -- Hongbo Zhang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,13 +22,13 @@ npm install [email protected] | |
|
||
You can also try our new release in the [Online Playground](/try). | ||
|
||
In this post we will highlight the most notable changes. The full changelog for this release can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#90). | ||
In this post we will highlight the most notable changes. The full changelog for this release can be found [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#90). | ||
|
||
## Compiler Improvements | ||
|
||
### New External Stdlib Configuration | ||
|
||
This is a long-awaited [feature request](https://github.com/rescript-lang/rescript-compiler/pull/2171). | ||
This is a long-awaited [feature request](https://github.com/rescript-lang/rescript/pull/2171). | ||
|
||
Our compiler comes with a set of stdlib modules (such as `Belt`, `Pervasives`, etc.) for core functionality. Compiled ReScript code relies on the JS runtime version of these stdlib modules. | ||
|
||
|
@@ -47,7 +47,7 @@ We made a small [demo repo](https://github.com/bobzhang/zero-cost-rescript) and | |
|
||
### Improved Code Generation for Pattern Matching | ||
|
||
We fine-tuned our pattern matching engine to optimize the JS output even more. Here is an example of a pretty substantial optimization, based on [this issue](https://github.com/rescript-lang/rescript-compiler/issues/4924): | ||
We fine-tuned our pattern matching engine to optimize the JS output even more. Here is an example of a pretty substantial optimization, based on [this issue](https://github.com/rescript-lang/rescript/issues/4924): | ||
|
||
```res | ||
type test = | ||
|
@@ -87,7 +87,7 @@ function test(x) { | |
|
||
As you can see, the 9.0 compiler removes all the unnecessary `typeof` checks! | ||
|
||
This is possible because our optimizer will try to analyze several predicates and get rid of redundant ones. More diffs can be found [here](https://github.com/rescript-lang/rescript-compiler/pull/4927/files?file-filters%5B%5D=.js). | ||
This is possible because our optimizer will try to analyze several predicates and get rid of redundant ones. More diffs can be found [here](https://github.com/rescript-lang/rescript/pull/4927/files?file-filters%5B%5D=.js). | ||
|
||
Another important improvement is that we fixed the pattern match offset issue, which lead to the consequence that magic numbers will not be generated for complex pattern matches anymore. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.