mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[hir] Introduce AliasSet type
Starting to get wonky typing out the entire type. This typedef is better for typing and readability.
This commit is contained in:
@@ -13,6 +13,7 @@ type AbstractPrimitive = {
|
||||
value: number | boolean | string | null | undefined;
|
||||
};
|
||||
|
||||
export type AliasSet = Set<Identifier>;
|
||||
class AbstractState {
|
||||
aliases = new DisjointSet<Identifier>();
|
||||
#values = new Map<Identifier, AbstractValue>();
|
||||
@@ -135,7 +136,7 @@ class AbstractState {
|
||||
}
|
||||
}
|
||||
|
||||
export function buildAliasSets(func: HIRFunction): Array<Set<Identifier>> {
|
||||
export function buildAliasSets(func: HIRFunction): Array<AliasSet> {
|
||||
const state = new AbstractState();
|
||||
for (const [_, block] of func.body.blocks) {
|
||||
for (const instr of block.instructions) {
|
||||
|
||||
Reference in New Issue
Block a user