From 40f304392e71588f30efd519dc445c2834e7cd78 Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Thu, 2 Feb 2023 17:41:31 +0000 Subject: [PATCH] [aliasing] Alias object loads to it's lvalue as well This doesn't change codegen as the lvalue is unused but it lets us make this pass be semantically the same across all instructions -- "alias lvalue and operands of an instr". --- compiler/forget/src/Inference/InferAliasForStores.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/forget/src/Inference/InferAliasForStores.ts b/compiler/forget/src/Inference/InferAliasForStores.ts index 4e5d4908de..b258303f81 100644 --- a/compiler/forget/src/Inference/InferAliasForStores.ts +++ b/compiler/forget/src/Inference/InferAliasForStores.ts @@ -44,7 +44,8 @@ export function inferAliasForStores( } case "ComputedStore": case "PropertyStore": { - maybeAlias(aliases, value.object, value.value, instr.id); + maybeAlias(aliases, lvalue.place, value.value, instr.id); + maybeAlias(aliases, lvalue.place, value.object, instr.id); break; } case "FunctionExpression": {