From d1fd0449eeb5207649e0d202081d971bf486cab8 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Wed, 15 Feb 2023 15:22:01 -0500 Subject: [PATCH] [be] Linter fixes for LeaveSSA --- compiler/forget/src/SSA/LeaveSSA.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/forget/src/SSA/LeaveSSA.ts b/compiler/forget/src/SSA/LeaveSSA.ts index 532d84e8d9..cec4eb19bc 100644 --- a/compiler/forget/src/SSA/LeaveSSA.ts +++ b/compiler/forget/src/SSA/LeaveSSA.ts @@ -86,7 +86,7 @@ import { * ) * ``` */ -export function leaveSSA(fn: HIRFunction) { +export function leaveSSA(fn: HIRFunction): void { // For "memoizable" phis (see docblock), this maps the original identifiers to the identifier they // should be reassigned to. The keys are phi operands, and the values are the phi id to which // they are being explicitly reassigned. @@ -101,7 +101,7 @@ export function leaveSSA(fn: HIRFunction) { phi: Phi; block: BasicBlock; }; - function pushPhis(arr: Array, block: BasicBlock) { + function pushPhis(arr: Array, block: BasicBlock): void { for (const phi of block.phis) { arr.push({ phi, block }); } @@ -335,7 +335,10 @@ export function leaveSSA(fn: HIRFunction) { // Rewrite @param place's identifier based on the given rewrite mapping, if the identifier // is present. Also expands the mutable range of the target identifier to include the // place's range. -function rewritePlace(place: Place, rewrites: Map) { +function rewritePlace( + place: Place, + rewrites: Map +): void { const prevIdentifier = place.identifier; const nextIdentifier = rewrites.get(prevIdentifier); if (nextIdentifier === undefined || nextIdentifier === prevIdentifier) {