Esempio n. 1
0
            internal override unsafe UIntPtr Visit(Object obj)
            {
                VTable      vtable = obj.vtable;
                RuntimeType rType  = vtable.vtableType;

                if (MultiUseWord.IsMarked(rType) != this.isVisitedFlag)
                {
                    this.Count++;
                    MultiUseWord.SetMark(rType, this.isVisitedFlag);
                }

                return(ObjectLayout.ObjectSize(Magic.addressOf(obj), vtable));
            }
Esempio n. 2
0
            internal override unsafe UIntPtr Visit(Object obj)
            {
                VTable      vtable = obj.vtable;
                RuntimeType rType  = vtable.vtableType;

                if (MultiUseWord.IsMarked(rType) != this.isVisitedFlag)
                {
                    VTable.Assert(this.tableIndex <
                                  this.accounts.Length,
                                  @"this.tableIndex <
                                  this.accounts.Length");

                    this.accounts[this.tableIndex].RuntimeTypeObject =
                        rType;
                    this.accounts[this.tableIndex].TotalSize =
                        UIntPtr.Zero;
                    this.accounts[this.tableIndex].Count = 0;
                    MultiUseWord.SetMark(rType, this.isVisitedFlag);
                    this.tableIndex++;
                }

                return(ObjectLayout.ObjectSize(Magic.addressOf(obj), vtable));
            }