コード例 #1
0
        public void EmitArrayAddress(ArrayContainer ac)
        {
            if (ac.Rank > 1)
            {
                if (IsAnonymousStoreyMutateRequired)
                {
                    ac = (ArrayContainer)ac.Mutate(CurrentAnonymousMethod.Storey.Mutator);
                }

                ig.Emit(OpCodes.Call, ac.GetAddressMethod());

                if (TrackStackTypes)
                {
                    SetStackType(ReferenceContainer.MakeType(Module, ac.Element));
                }
            }
            else
            {
                var type = IsAnonymousStoreyMutateRequired ?
                           CurrentAnonymousMethod.Storey.Mutator.Mutate(ac.Element) :
                           ac.Element;

                ig.Emit(OpCodes.Ldelema, type.GetMetaInfo());

                if (TrackStackTypes)
                {
                    SetStackType(ReferenceContainer.MakeType(Module, type));
                }
            }
        }
コード例 #2
0
ファイル: codegen.cs プロジェクト: mono-soc-2011/monodevelop
        public void EmitArrayAddress(ArrayContainer ac)
        {
            if (ac.Rank > 1)
            {
                if (IsAnonymousStoreyMutateRequired)
                {
                    ac = (ArrayContainer)ac.Mutate(CurrentAnonymousMethod.Storey.Mutator);
                }

                ig.Emit(OpCodes.Call, ac.GetAddressMethod());
            }
            else
            {
                Emit(OpCodes.Ldelema, ac.Element);
            }
        }