private void intUnbox(bool cast) { PERWAPI.Method m = emitter.findMethod("Fan.Sys.Long", "longValue", new string[0], "System.Int64"); m.AddCallConv(CallConv.Instance); code.MethInst(MethodOp.call, m); }
private void floatUnbox(bool cast) { PERWAPI.Method m = emitter.findMethod("Fan.Sys.Double", "doubleValue", new string[0], "System.Double"); m.AddCallConv(CallConv.Instance); code.MethInst(MethodOp.call, m); }
private void boolUnbox(bool cast) { PERWAPI.Method m = emitter.findMethod("Fan.Sys.Boolean", "booleanValue", new string[0], "System.Boolean"); m.AddCallConv(CallConv.Instance); code.MethInst(MethodOp.call, m); }
////////////////////////////////////////////////////////////////////////// // Compare ////////////////////////////////////////////////////////////////////////// private void compareEQ() { FTypeRef lhs = pod.typeRef(u2()); FTypeRef rhs = pod.typeRef(u2()); // if this is a.equals(b) and we know a is non-null, then just call equals if (lhs.isRef() && !lhs.isNullable() && rhs.isRef()) { PERWAPI.Method m = emitter.findMethod("System.Object", "Equals", new string[] { "System.Object" }, "System.Boolean"); m.AddCallConv(CallConv.Instance); code.MethInst(MethodOp.callvirt, m); return; } doCompare("EQ", lhs, rhs); }