@samitouri / QOS-React-2 / commits / 7d43730319

[be] Remove stale global handling code

I forgot to remove this when i made globals explicit.

Joe Savona committed Mar 22, 2023 at 14:36 UTC 7d4373031930622ede219de532cc7ad8fe2479ec
1 file changed -23
compiler/forget/src/Inference/InferReferenceEffects.ts
-23
@@ -689,7 +689,6 @@ function inferBlock(
689 state.isDefined(instrValue.receiver),
690 "[InferReferenceEffects] Internal error: receiver of PropertyCall should have been defined by corresponding PropertyLoad"
691 );
692 -
692 state.reference(instrValue.property, Effect.Read);
693
694 const signature = getFunctionCallSignature(
@@ -744,17 +743,6 @@ function inferBlock(
743 break;
744 }
745 case "PropertyLoad": {
747 - if (!state.isDefined(instrValue.object)) {
748 - // TODO @josephsavona: improve handling of globals
749 - const value: InstructionValue = {
750 - kind: "Primitive",
751 - loc: instrValue.loc,
752 - value: undefined,
753 - };
754 - state.initialize(value, ValueKind.Frozen);
755 - state.define(instrValue.object, value);
756 - }
757 -
746 state.reference(instrValue.object, Effect.Read);
747 const lvalue = instr.lvalue;
748 lvalue.effect = Effect.Mutate;
@@ -784,17 +772,6 @@ function inferBlock(
772 continue;
773 }
774 case "ComputedLoad": {
787 - if (!state.isDefined(instrValue.object)) {
788 - // TODO @josephsavona: improve handling of globals
789 - const value: InstructionValue = {
790 - kind: "Primitive",
791 - loc: instrValue.loc,
792 - value: undefined,
793 - };
794 - state.initialize(value, ValueKind.Frozen);
795 - state.define(instrValue.object, value);
796 - }
797 -
775 state.reference(instrValue.object, Effect.Read);
776 state.reference(instrValue.property, Effect.Read);
777 const lvalue = instr.lvalue;