MyC.Var.getClassId C# (CSharp) Method

getClassId() public method

public getClassId ( ) : int
return int
  public int getClassId() { return vclass; }
  public void setClassId(int v) { vclass = v; }

Usage Example

コード例 #1
0
        void genLoad(Var e)
        {
            int id = e.getClassId();

            if (e == null)
            {
                Io.ICE("Load instruction with no variable ptr");
            }
            if (e.getLocalToken() != null)
            {
                //    LocalToken lt = (LocalToken) e.getLocalToken();
                LocalBuilder lt = (LocalBuilder)e.getLocalToken();
                il.Emit(OpCodes.Ldloc, lt);
            }
            else if (e.getFieldBuilder() != null)
            {
                FieldBuilder fb = (FieldBuilder)e.getFieldBuilder();
                if (id == Tok.T_STATIC)
                {
                    il.Emit(OpCodes.Ldsfld, fb);
                }
                else
                {
                    il.Emit(OpCodes.Ldfld, fb);
                }
            }
            else
            {
                int index = e.getIndex();
                if (id == Tok.T_PARAM)
                {
                    if (index <= 256)
                    {
                        il.Emit(OpCodes.Ldarg_S, index);
                    }
                    else
                    {
                        il.Emit(OpCodes.Ldarg, index);
                    }
                }
                else if (id == Tok.T_AUTO || id == Tok.T_DEFCLASS)
                {
                    if (index <= 256)
                    {
                        il.Emit(OpCodes.Ldloc_S, e.getIndex());
                    }
                    else
                    {
                        il.Emit(OpCodes.Ldloc, e.getIndex());
                    }
                }
                else
                {
                    Io.ICE("Instruction load of unknown class ("
                           + e.getClassId() + ")");
                }
            }
        }
All Usage Examples Of MyC.Var::getClassId