Skip to content

Commit 0838a88

Browse files
committed
phi and garbage collection back to 100%
1 parent 6ba9bfc commit 0838a88

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

SRC/dev-type-move-linear.lsts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
let .move-linear(tt: Type): Type = (
3-
match tt {
3+
let return = match tt {
44
TAnd{conjugate=conjugate} => (
55
let new-conjugate = mk-vector(type(Type));
66
for vector c in conjugate {
@@ -12,10 +12,11 @@ let .move-linear(tt: Type): Type = (
1212
TGround{tag=tag, parameters=parameters} => (
1313
let new-parameters = mk-vector(type(Type));
1414
for vector p in parameters {
15-
new-parameters = new-parameters.push(p);
15+
new-parameters = new-parameters.push(p.move-linear);
1616
};
1717
ts(tag,new-parameters);
1818
);
1919
_ => tt;
20-
}
20+
};
21+
return
2122
);

SRC/tctx-phi-move.lsts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ let .phi-move(tctx: TypeContext?, tt: Type, blame: AST): TypeContext? = (
44
if not(tctx.get-or(mk-tctx()).is-blob) then {
55
let phi-id = tt.slot(c"Phi::Id",1).l1.simple-tag;
66
let phi-state = tt.slot(c"Phi::State",1).l1;
7-
print("Phi Move 1 \{phi-id} \{phi-state}\n");
87
if non-zero(phi-id) and non-zero(phi-state) {
98
tctx = tctx.bind-phi(phi-id, phi-state.move-linear, blame);
10-
print("Phi Move 2 \{phi-id} \{phi-state.move-linear}\n");
119
let pm = tctx.lookup-phi(phi-id);
12-
print("Phi Move 3 \{phi-id} \{pm.phi-tt-or-zero}\n");
1310
}
1411
};
1512
tctx

SRC/typecheck-infer-expr.lsts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ let std-infer-expr(tctx: Maybe<TypeContext>, term: AST, is-scoped: Bool, used: I
255255
if not(can-unify(return-type-after-alias, typeof-term(new-inner-rhs)))
256256
then exit-error("Return value does not match declared type:\nExpected \{return-type-after-alias}\nFound \{typeof-term(new-inner-rhs)}\n", term);
257257
};
258-
print("Move Return Type \{typeof-term(new-inner-rhs)}\n");
259258
tctx = tctx.phi-move(typeof-term(new-inner-rhs), term);
260259
if not(tctx.get-or(mk-tctx()).is-blob) {
261260
(tctx, new-inner-rhs) = release-locals(before-tctx, tctx, new-inner-rhs, misc-tt, true);
@@ -396,7 +395,6 @@ let std-infer-expr(tctx: Maybe<TypeContext>, term: AST, is-scoped: Bool, used: I
396395
tctx = tctx.phi-move(typeof-term(term),term);
397396
}
398397
}};
399-
print("Inferred \{term} : \{typeof-term(term)}\n");
400398
(tctx, term);
401399
);
402400

0 commit comments

Comments
 (0)