[be] Remove stale global handling code

I forgot to remove this when i made globals explicit.
This commit is contained in:
Joe Savona
2023-03-22 14:36:49 -07:00
parent 14c03b897f
commit 7d43730319
@@ -689,7 +689,6 @@ function inferBlock(
state.isDefined(instrValue.receiver),
"[InferReferenceEffects] Internal error: receiver of PropertyCall should have been defined by corresponding PropertyLoad"
);
state.reference(instrValue.property, Effect.Read);
const signature = getFunctionCallSignature(
@@ -744,17 +743,6 @@ function inferBlock(
break;
}
case "PropertyLoad": {
if (!state.isDefined(instrValue.object)) {
// TODO @josephsavona: improve handling of globals
const value: InstructionValue = {
kind: "Primitive",
loc: instrValue.loc,
value: undefined,
};
state.initialize(value, ValueKind.Frozen);
state.define(instrValue.object, value);
}
state.reference(instrValue.object, Effect.Read);
const lvalue = instr.lvalue;
lvalue.effect = Effect.Mutate;
@@ -784,17 +772,6 @@ function inferBlock(
continue;
}
case "ComputedLoad": {
if (!state.isDefined(instrValue.object)) {
// TODO @josephsavona: improve handling of globals
const value: InstructionValue = {
kind: "Primitive",
loc: instrValue.loc,
value: undefined,
};
state.initialize(value, ValueKind.Frozen);
state.define(instrValue.object, value);
}
state.reference(instrValue.object, Effect.Read);
state.reference(instrValue.property, Effect.Read);
const lvalue = instr.lvalue;