PushArguments() private method

Copies args to a arguments position for the next stack frame.
private PushArguments ( IList args ) : void
args IList
return void
コード例 #1
0
        internal IEnumerable <CutState> Prove(object[] args, PrologContext context)
        {
            var myFrame = context.CurrentFrame;

            if (KnowledgeBase.Trace || Trace)
            {
                context.TraceOutput("Goal: {0}", new Structure(Name, args));
            }
            if (Compiled)
            {
                context.PushArguments(args);
                return(StackCall(context));
            }
            if (context.Randomize && Randomizable && Entries.Count > 1)
            {
                return(TestShuffledClauses(args, context, myFrame));
            }
            return(TestClausesInOrder(args, context, myFrame));
        }
コード例 #2
0
ファイル: PredicateInfo.cs プロジェクト: rzubek/UnityProlog
 internal IEnumerable<CutState> Prove(object[] args, PrologContext context)
 {
     var myFrame = context.CurrentFrame;
     if (KnowledgeBase.Trace || Trace)
         context.TraceOutput("Goal: {0}", new Structure(Name, args));
     if (Compiled)
     {
         context.PushArguments(args);
         return StackCall(context);
     }
     if (context.Randomize && Randomizable && Entries.Count > 1)
         return TestShuffledClauses(args, context, myFrame);
     return TestClausesInOrder(args, context, myFrame);
 }