-
Notifications
You must be signed in to change notification settings - Fork 47.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BuildReactiveBlocks to construct scopes in ReactiveFunction
The primary goal of this stack is to change HIRTreeVisitor to make it easier to handle value blocks. That's complicated by the fact that the visitor is a general-purpose visitor, used in several analysis passes including BuildReactiveFunction (which translates HIR->ReactiveFunction while also grouping instructions into scopes) and InferReactiveScopes (which is actually two passes, one to align scopes to block boundaries, one to merge overlapping scopes). The long-term goal then is as follows: 1. Make BuildReactiveFunction transform HIR->ReactiveFunction but _without_ reactive scopes. 2. Align scopes to block boundaries, but rewritten to operate on ReactiveFunction 3. Merge overlapping scopes, again rewritten to operate on ReactiveFunction 4. Group statements within ReactiveFunction into ReactiveScopeBlocks (today this occurs when constructing the ReactiveFunction). This PR implements 1 and 4. Because the implementation is incomplete this would break the whole compiler, so for now both versions are still around. By default compilation uses the old pipeline, but if a feature flag is enabled we use the new version. The plan is to incrementally fix up the new version of the passes in this stack, and then cutover: removing the flag and the old version of the passes.
- Loading branch information
1 parent
a4fc975
commit 87d70b9
Showing
12 changed files
with
617 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
type Flags = { | ||
enableNewReactiveFunctionBuilder: boolean; | ||
}; | ||
|
||
export const flags: Flags = { | ||
enableNewReactiveFunctionBuilder: false, | ||
}; |
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.