chore: fix typos (#9747)

This commit is contained in:
Cameron Zwarich 2025-08-05 17:49:49 -07:00 committed by GitHub
parent 7fb72a0081
commit 31e05cd2bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,13 +107,13 @@ private def addIncBeforeAux (ctx : Context) (xs : Array Arg) (consumeParamPred :
let info := getVarInfo ctx x
if !info.type.isPossibleRef || !isFirstOcc xs i then b
else
let numConsuptions := getNumConsumptions x xs consumeParamPred -- number of times the argument is
let numConsumptions := getNumConsumptions x xs consumeParamPred
let numIncs :=
if !info.mustBeConsumed ||
liveVarsAfter.contains x || -- `x` is live after executing instruction
isBorrowParamAux x xs consumeParamPred -- `x` is used in a position that is passed as a borrow reference
then numConsuptions
else numConsuptions - 1
then numConsumptions
else numConsumptions - 1
addInc ctx x b numIncs
private def addIncBefore (ctx : Context) (xs : Array Arg) (ps : Array Param) (b : FnBody) (liveVarsAfter : LiveVarSet) : FnBody :=