public void Execute(ExecutionNodes nodes, ref Memory memory)
        {
            ExecutionNode en;
            if (nodes.TryGetValue(Label, out en) == false)
            {
                throw new ArgumentException("Jump: Label " + Label + " does not exist.");
            }

            en.Execute(nodes, ref memory);
        }
        public void Execute(ExecutionNodes nodes, ref Memory memory)
        {
            ExecutionNode en;

            if (nodes.TryGetValue(Label, out en) == false)
            {
                throw new ArgumentException("Jump: Label " + Label + " does not exist.");
            }

            en.Execute(nodes, ref memory);
        }
        public void Execute(ExecutionNodes nodes, ref Memory memory)
        {
            ExecutionNode en;
            if (nodes.TryGetValue(Label, out en) == false)
            {
                throw new ArgumentException("JumpZ: Label " + Label + " does not exist.");
            }

            int? localMaybe = (int?)memory.Local.GetValue(MemoryType.Int);
            if (localMaybe.HasValue)
            {
                int local = localMaybe.GetValueOrDefault();
                if (local == 0)
                {
                    en.Execute(nodes, ref memory);
                }
            }
        }
Exemplo n.º 4
0
        public void Execute(ExecutionNodes nodes, ref Memory memory)
        {
            ExecutionNode en;

            if (nodes.TryGetValue(Label, out en) == false)
            {
                throw new ArgumentException("JumpN: Label " + Label + " does not exist.");
            }

            int?localMaybe = (int?)memory.Local.GetValue(MemoryType.Int);

            if (localMaybe.HasValue)
            {
                int local = localMaybe.GetValueOrDefault();
                if (local < 0)
                {
                    en.Execute(nodes, ref memory);
                }
            }
        }