Rename function for clarity
Cleanup now that we use this for two things
Joe Savona committed
May 18, 2023 at 15:52 UTC
5008448d744002f91028059c1464a5a4e897c140
1 file changed
+3
-7
compiler/forget/src/Inference/InferReferenceEffects.ts
+3
-7
@@ -724,9 +724,7 @@ function inferBlock(
724
);
725
726
const effects =
727
- signature !== null
728
- ? getMethodCallEffects(instrValue, signature)
729
- : null;
727
+ signature !== null ? getFunctionEffects(instrValue, signature) : null;
728
for (let i = 0; i < instrValue.args.length; i++) {
729
const arg = instrValue.args[i];
730
const place = arg.kind === "Identifier" ? arg : arg.place;
@@ -765,9 +763,7 @@ function inferBlock(
763
);
764
765
const effects =
768
- signature !== null
769
- ? getMethodCallEffects(instrValue, signature)
770
- : null;
766
+ signature !== null ? getFunctionEffects(instrValue, signature) : null;
767
for (let i = 0; i < instrValue.args.length; i++) {
768
const arg = instrValue.args[i];
769
const place = arg.kind === "Identifier" ? arg : arg.place;
@@ -1035,7 +1031,7 @@ function getFunctionCallSignature(
1031
* @param sig
1032
* @returns Inferred effects of function arguments, or null if inference fails.
1033
*/
1038
-function getMethodCallEffects(
1034
+function getFunctionEffects(
1035
fn: MethodCall | CallExpression,
1036
sig: FunctionSignature
1037
): Array<Effect> | null {