From a855e764945ccc75f50c8c176528c77db13580ee Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Mon, 5 Dec 2022 22:27:01 +0000 Subject: [PATCH] [hir] Introduce AliasSet type Starting to get wonky typing out the entire type. This typedef is better for typing and readability. --- compiler/forget/src/HIR/BuildAliasSets.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/forget/src/HIR/BuildAliasSets.ts b/compiler/forget/src/HIR/BuildAliasSets.ts index 12d20884df..49a9a344b4 100644 --- a/compiler/forget/src/HIR/BuildAliasSets.ts +++ b/compiler/forget/src/HIR/BuildAliasSets.ts @@ -13,6 +13,7 @@ type AbstractPrimitive = { value: number | boolean | string | null | undefined; }; +export type AliasSet = Set; class AbstractState { aliases = new DisjointSet(); #values = new Map(); @@ -135,7 +136,7 @@ class AbstractState { } } -export function buildAliasSets(func: HIRFunction): Array> { +export function buildAliasSets(func: HIRFunction): Array { const state = new AbstractState(); for (const [_, block] of func.body.blocks) { for (const instr of block.instructions) {