typeRef() public method

public typeRef ( int index ) : FTypeRef
index int
return FTypeRef
コード例 #1
0
ファイル: FCodeEmit.cs プロジェクト: nomit007/f4
 /// <summary>
 /// Map to .NET register info for the given Fantom local variables.
 /// </summary>
 internal static Reg[] initRegs(FPod pod, bool isStatic, FMethodVar[] vars)
 {
     Reg[] regs = new Reg[isStatic ? vars.Length : vars.Length+1];
       int nindex = 0;
       for (int i=0; i<regs.Length; ++i)
       {
     Reg r = new Reg();
     if (i == 0 && !isStatic)
     {
       // this pointer
       r.stackType = FTypeRef.OBJ;
       r.nindex = nindex;
       ++nindex;
     }
     else
     {
       FTypeRef typeRef = pod.typeRef(vars[isStatic ? i : i - 1].type);
       r.stackType = typeRef.stackType;
       r.nindex = nindex;
       nindex += 1; //nindex += typeRef.isWide() ? 2 : 1;
     }
     regs[i] = r;
       }
       return regs;
 }