Esempio n. 1
0
        public void Initialize(GenTypes genTypes, StringsTable stringsTable)
        {
            var expectedLength = genTypes[TypeIds.Code].Values.Length;

            if (defs.Length != expectedLength)
            {
                throw new InvalidOperationException($"Found {defs.Length} elements, expected {expectedLength}");
            }
            for (int i = 0; i < defs.Length; i++)
            {
                var def = defs[i];
                stringsTable.Add((uint)i, def.Mnemonic, true);
                foreach (var o in def.Args)
                {
                    if (o is string s)
                    {
                        stringsTable.Add((uint)i, s, false);
                    }
                }
            }
        }
Esempio n. 2
0
 protected void Initialize(StringsTable stringsTable, object[][] infos)
 {
     foreach (var info in infos)
     {
         bool ignoreVPrefix = true;
         foreach (var o in info)
         {
             if (o is string s)
             {
                 stringsTable.Add(s, ignoreVPrefix);
                 ignoreVPrefix = false;
             }
         }
     }
 }
Esempio n. 3
0
        public void Initialize(StringsTable stringsTable)
        {
            var expectedLength = CodeEnum.Instance.Values.Length;

            if (infos.Length != expectedLength)
            {
                throw new InvalidOperationException($"Found {infos.Length} elements, expected {expectedLength}");
            }
            foreach (var info in infos)
            {
                bool ignoreVPrefix = true;
                foreach (var o in info)
                {
                    if (o is string s)
                    {
                        stringsTable.Add(s, ignoreVPrefix);
                        ignoreVPrefix = false;
                    }
                }
            }
        }
Esempio n. 4
0
        public void Initialize(GenTypes genTypes, StringsTable stringsTable)
        {
            var expectedLength = genTypes[TypeIds.Code].Values.Length;

            if (infos.Length != expectedLength)
            {
                throw new InvalidOperationException($"Found {infos.Length} elements, expected {expectedLength}");
            }
            for (int i = 0; i < infos.Length; i++)
            {
                var  info          = infos[i];
                bool ignoreVPrefix = true;
                foreach (var o in info)
                {
                    if (o is string s)
                    {
                        stringsTable.Add((uint)i, s, ignoreVPrefix);
                        ignoreVPrefix = false;
                    }
                }
            }
        }