@samitouri / QOS-React-2 / commits / 40f304392e

[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".

Sathya Gunasekaran committed Feb 2, 2023 at 17:41 UTC 40f304392e71588f30efd519dc445c2834e7cd78
1 file changed +2 -1
compiler/forget/src/Inference/InferAliasForStores.ts
+2 -1
@@ -44,7 +44,8 @@ export function inferAliasForStores(
44 }
45 case "ComputedStore":
46 case "PropertyStore": {
47 - maybeAlias(aliases, value.object, value.value, instr.id);
47 + maybeAlias(aliases, lvalue.place, value.value, instr.id);
48 + maybeAlias(aliases, lvalue.place, value.object, instr.id);
49 break;
50 }
51 case "FunctionExpression": {