示例#1
0
        public StackState Copy()
        {
            var copy = new StackState();

            foreach (var value in _slots)
            {
                copy._slots.Add(value.Copy());
            }
            return(copy);
        }
示例#2
0
        public bool MergeWith(StackState other)
        {
            if (other._slots.Count != _slots.Count)
            {
                throw new DisassemblyException("Stack states are not the same size.");
            }

            bool changed = false;

            for (int i = 0; i < _slots.Count; i++)
            {
                changed |= _slots[i].MergeWith(other._slots[i]);
            }
            return(changed);
        }