Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ RewriteInvocationExpression()

Result System.Linq.Expressions.Compiler.StackSpiller.RewriteInvocationExpression ( Expression expr,
Stack stack )
inlineprivate

Definition at line 778 of file StackSpiller.cs.

779 {
780 InvocationExpression invocationExpression = (InvocationExpression)expr;
781 LambdaExpression lambdaOperand = invocationExpression.LambdaOperand;
782 ChildRewriter childRewriter;
783 if (lambdaOperand != null)
784 {
785 childRewriter = new ChildRewriter(this, stack, invocationExpression.ArgumentCount);
787 if (childRewriter.Action == RewriteAction.SpillStack)
788 {
789 childRewriter.MarkRefArgs(Expression.GetInvokeMethod(invocationExpression.Expression), 0);
790 }
793 if (childRewriter.Rewrite || stackSpiller._lambdaRewrite != 0)
794 {
795 invocationExpression = new InvocationExpressionN(lambdaOperand, childRewriter[0, -1], invocationExpression.Type);
796 }
797 Result result = childRewriter.Finish(invocationExpression);
798 return new Result(result.Action | stackSpiller._lambdaRewrite, result.Node);
799 }
800 childRewriter = new ChildRewriter(this, stack, invocationExpression.ArgumentCount + 1);
803 if (childRewriter.Action == RewriteAction.SpillStack)
804 {
805 childRewriter.MarkRefArgs(Expression.GetInvokeMethod(invocationExpression.Expression), 1);
806 }
807 return childRewriter.Finish(childRewriter.Rewrite ? new InvocationExpressionN(childRewriter[0], childRewriter[1, -1], invocationExpression.Type) : expr);
808 }
void Add(TKey key, TValue value)

References System.Linq.Expressions.Compiler.StackSpiller.StackSpiller(), System.Linq.Expressions.Compiler.StackSpiller.Result.Action, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Linq.Expressions.Expression< TDelegate >.GetInvokeMethod(), and System.Linq.Expressions.Compiler.StackSpiller.Result.Node.

Referenced by System.Linq.Expressions.Compiler.StackSpiller.RewriteExpression().