Exemple #1
0
 public Function(Instruction[] Instrs)
 {
     Src      = "CODE";
     IsVararg = true;
     if (Instrs != null)
     {
         Code = new InstrVector(Instrs);
     }
     else
     {
         Code = new InstrVector();
     }
     Constants = new Constants();
     DebugInfo = new DbgInfo();
 }
Exemple #2
0
        public Function(BinaryReader R)
        {
            Src             = R.ReadLuaString();
            LineDefined     = R.ReadInt32();
            LastLineDefined = R.ReadInt32();

            NUps         = R.ReadByte();
            NumParams    = R.ReadByte();
            IsVararg     = R.ReadBoolean();
            MaxStackSize = R.ReadByte();

            CodeOffset = (int)R.BaseStream.Position + sizeof(int);
            Code       = new InstrVector(R, sizeof(int));
            Constants  = new Constants(R);
            DebugInfo  = new DbgInfo(R);
        }