Exemple #1
0
        public void EmitArrayNew(ArrayContainer ac)
        {
            if (ac.Rank == 1)
            {
                var type = IsAnonymousStoreyMutateRequired ?
                           CurrentAnonymousMethod.Storey.Mutator.Mutate(ac.Element) :
                           ac.Element;

                ig.Emit(OpCodes.Newarr, type.GetMetaInfo());
            }
            else
            {
                if (IsAnonymousStoreyMutateRequired)
                {
                    ac = (ArrayContainer)ac.Mutate(CurrentAnonymousMethod.Storey.Mutator);
                }

                ig.Emit(OpCodes.Newobj, ac.GetConstructor());
            }

            if (TrackStackTypes)
            {
                SetStackType(ac);
            }
        }
Exemple #2
0
        public void EmitArrayNew(ArrayContainer ac)
        {
            if (ac.Rank == 1)
            {
                Emit(OpCodes.Newarr, ac.Element);
            }
            else
            {
                if (IsAnonymousStoreyMutateRequired)
                {
                    ac = (ArrayContainer)ac.Mutate(CurrentAnonymousMethod.Storey.Mutator);
                }

                ig.Emit(OpCodes.Newobj, ac.GetConstructor());
            }
        }