Exemplo n.º 1
0
        public ForeignAction Clone()
        {
            var result = new ForeignAction(Offset, ArgumentCount);

            result.Joint.AddAll(this.Joint);
            return(result);
        }
Exemplo n.º 2
0
 public ForeignAction Clone()
 {
     var result = new ForeignAction(Offset, ArgumentCount);
     result.Joint.AddAll(this.Joint);
     return result;
 }
        private static IActionCode GenerateActionCode(IActionCode code, ForeignAction action)
        {
            bool first = true;
            foreach (var binding in action.Joint.All<CilProduction>())
            {
                if (first)
                {
                    first = false;
                }
                else
                {
                    // Result of this rule supersedes result of the prvious one
                    code = code.Emit(il => il.Pop());
                }

                code = code
                    .Do(binding.Context.Load)
                    .Do(binding.ActionBuilder)
                    ;
            }

            return code;
        }