示例#1
0
        public void Unify(RootEnvironment rootEnv, InnerMachineState other, BoolRef changed)
        {
            if (Stack.Count != other.Stack.Count)
            {
                throw new InvalidOperationException("stacks must have the same depth");
            }

            for (var i = 0; i < Stack.Count; i++)
            {
                Stack[i].Unify(rootEnv, other.Stack[i], changed);
            }

            if (Ids != null || other.Ids != null)
            {
                throw new InvalidOperationException("stack slot identifiers cannot be unified");
            }

            ArgsLocalsState.Unify(other.ArgsLocalsState, changed);
        }