diff options
author | Son Ho | 2022-10-28 12:39:24 +0200 |
---|---|---|
committer | Son HO | 2022-10-28 17:41:04 +0200 |
commit | a261d407443faa4a95ee8f2b0fbf5e8e046d17ca (patch) | |
tree | 355565cb37842879af927a1f22f6d04ec7d552b0 /compiler/Substitute.ml | |
parent | b4e4e6f6776b2af9607438f6e4249b295c784608 (diff) |
Move the AssignGlobal case from statement to rvalue
Diffstat (limited to 'compiler/Substitute.ml')
-rw-r--r-- | compiler/Substitute.ml | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/Substitute.ml b/compiler/Substitute.ml index 5e5858de..bc5febdc 100644 --- a/compiler/Substitute.ml +++ b/compiler/Substitute.ml @@ -233,6 +233,7 @@ let rvalue_substitute (tsubst : T.TypeVarId.id -> T.ety) (rv : E.rvalue) : | E.BinaryOp (binop, op1, op2) -> E.BinaryOp (binop, op_subst op1, op_subst op2) | E.Discriminant p -> E.Discriminant (p_subst p) + | E.Global _ -> (* Globals don't have type parameters *) rv | E.Aggregate (kind, ops) -> let ops = List.map op_subst ops in let kind = @@ -285,9 +286,6 @@ and raw_statement_substitute (tsubst : T.TypeVarId.id -> T.ety) let p = place_substitute tsubst p in let rvalue = rvalue_substitute tsubst rvalue in A.Assign (p, rvalue) - | A.AssignGlobal g -> - (* Globals don't have type parameters *) - A.AssignGlobal g | A.FakeRead p -> let p = place_substitute tsubst p in A.FakeRead p |