Permalink
Browse files

Remove now-dead code generation for static field access

  • Loading branch information...
1 parent f1ac9af commit 3a9759ef6da6916baa4e85bb9d220b4a7297a02c @sorear committed Sep 14, 2012
Showing with 0 additions and 41 deletions.
  1. +0 −41 lib/CodeGen.cs
View
@@ -869,38 +869,6 @@ class ClrGetConst : ClrOp {
}
}
- // RETIREME
- class ClrGetSField : ClrOp {
- public readonly FieldInfo f;
-
- public override ClrOp Sink() { return ClrNoop.Instance; }
- public override void CodeGen(CgContext cx) {
- cx.il.Emit(OpCodes.Ldsfld, f);
- }
-
- public ClrGetSField(FieldInfo f) {
- Returns = f.FieldType;
- this.f = f;
- }
- }
-
- class ClrSetSField : ClrOp {
- public readonly FieldInfo f;
- public readonly ClrOp zyg;
-
- public override void CodeGen(CgContext cx) {
- zyg.CodeGen(cx);
- cx.il.Emit(OpCodes.Stsfld, f);
- }
-
- public ClrSetSField(FieldInfo f, ClrOp zyg) {
- TypeCheck(zyg.Returns, f.FieldType);
- Returns = Tokens.Void;
- this.f = f;
- this.zyg = zyg;
- }
- }
-
class ClrPadGet : ClrOp {
public readonly int up;
public readonly int index;
@@ -2058,9 +2026,6 @@ class CpsOp {
});
}
- public static CpsOp GetSField(FieldInfo fi) {
- return new CpsOp(new ClrGetSField(fi));
- }
public static CpsOp GetConst(FieldInfo fi) {
return new CpsOp(new ClrGetConst(fi));
}
@@ -2071,12 +2036,6 @@ class CpsOp {
});
}
- public static CpsOp SetSField(FieldInfo fi, CpsOp zyg) {
- return Primitive(new CpsOp[1] { zyg }, delegate(ClrOp[] heads) {
- return new CpsOp(new ClrSetSField(fi, heads[0]));
- });
- }
-
public static CpsOp Sink(CpsOp zyg) {
return new CpsOp(zyg.stmts, zyg.head.Sink());
}

0 comments on commit 3a9759e

Please sign in to comment.