예제 #1
0
파일: op.cs 프로젝트: zjmit/go2cs
                    public static ValAndOff addOffset64(this ValAndOff x, long off) => func((_, panic, __) =>
                    {
                        if (!x.canAdd(off))
                        {
                            panic("invalid ValAndOff.add");
                        }

                        return(ValAndOff(makeValAndOff(x.Val(), x.Off() + off)));
                    });
예제 #2
0
파일: op.cs 프로젝트: zjmit/go2cs
                    public static bool canAdd32(this ValAndOff x, int off)
                    {
                        var newoff = x.Off() + int64(off);

                        return(newoff == int64(int32(newoff)));
                    }
예제 #3
0
파일: op.cs 프로젝트: zjmit/go2cs
 public static @string String(this ValAndOff x)
 {
     return(fmt.Sprintf("val=%d,off=%d", x.Val(), x.Off()));
 }
예제 #4
0
파일: op.cs 프로젝트: zjmit/go2cs
                    public static bool canAdd(this ValAndOff x, long off)
                    {
                        var newoff = x.Off() + off;

                        return(newoff == int64(int32(newoff)));
                    }
예제 #5
0
파일: op.cs 프로젝트: zjmit/go2cs
 public static int Off32(this ValAndOff x)
 {
     return(int32(x));
 }
예제 #6
0
파일: op.cs 프로젝트: zjmit/go2cs
 public static long Int64(this ValAndOff x)
 {
     return(int64(x));
 }
예제 #7
0
파일: op.cs 프로젝트: zjmit/go2cs
 public static long Off(this ValAndOff x)
 {
     return(int64(int32(x)));
 }
예제 #8
0
파일: op.cs 프로젝트: zjmit/go2cs
 public static sbyte Val8(this ValAndOff x)
 {
     return(int8(int64(x) >> (int)(32L)));
 }
예제 #9
0
파일: op.cs 프로젝트: zjmit/go2cs
 public static short Val16(this ValAndOff x)
 {
     return(int16(int64(x) >> (int)(32L)));
 }
예제 #10
0
파일: op.cs 프로젝트: zjmit/go2cs
 public static int Val32(this ValAndOff x)
 {
     return(int32(int64(x) >> (int)(32L)));
 }
예제 #11
0
파일: op.cs 프로젝트: zjmit/go2cs
 public static long Val(this ValAndOff x)
 {
     return(int64(x) >> (int)(32L));
 }