Exemple #1
0
        internal override void StaticInitializerGen()
        {
            Class.Fields.TryGetValue("Empty", out Field field);
            Constructor.AddNew(Class.ConstantPoolIndex);
            Constructor.AddDup(Class.ObjectType);
            Constructor.AddConst(Constructor.StringPool.TryAdd(string.Empty));
            AbstractMethod abstractMethod = Methods.Find(m => m is StringInit);

            Constructor.AddCall(abstractMethod.Method.ConstantPoolIndex);
            Constructor.AddStoreStatic(field.ConstantPoolIndex);
            Constructor.AddPop(Class.ObjectType);

            Constructor.AddRet();
        }