Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix LIPackage.Get code generation
  • Loading branch information
sorear committed Oct 3, 2011
1 parent 6c3002f commit 7bea562
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Kernel.cs
Expand Up @@ -329,7 +329,7 @@ class IdentityComparer : IEqualityComparer<object> {
return CpsOp.Null(nty);
FieldBuilder fi;
if (!constants.TryGetValue(val, out fi))
constants[val] = fi = NewField(name, val.GetType());
constants[val] = fi = NewField(name, val is Variable ? typeof(Variable) : val.GetType());
return CpsOp.IsConst(CpsOp.GetSField(fi));
}

Expand Down Expand Up @@ -1234,7 +1234,8 @@ public class LIPackage : LexInfo {
public override object Get(Frame f) { return pkg.typeVar; }
public override void Init(Frame f) { }
internal override ClrOp GetCode(int up) {
return Backend.currentUnit.TypeConstant(pkg).head;
return Backend.currentUnit.RefConstant(pkg.name + "V",
pkg.typeVar, typeof(Variable)).head;
}
}

Expand Down

0 comments on commit 7bea562

Please sign in to comment.