/// <summary> /// Add dynamic call that follows to given call /// </summary> /// <param name="call">Call which following call is added</param> /// <param name="followingCalls">Calls that will be invoked after call will be pushed</param> private void addFollowingDynamicCalls(CallContext call, DynamicCallEntry followingCalls) { var followedCalls = call.FollowingDynamicCalls; if (followedCalls == null) { call.FollowingDynamicCalls = followingCalls; } else { followedCalls.LastCall.NextDynamicCall = followingCalls; } }
/// <summary> /// Push dynamic call generated from given <see cref="GeneratorBase"/> /// </summary> /// <param name="methodNameHint">Hint for name of generated method</param> /// <param name="generator">Generator of instructions for dynamic call</param> /// <param name="argumentValues">Arguments of dynamic call</param> public void DynamicCall(string methodNameHint, GeneratorBase generator, params Instance[] argumentValues) { var dynamicCall = new DynamicCallEntry(new MethodID(methodNameHint, false), generator, argumentValues.ToArray()); if (CurrentCall.ContextsDynamicCalls == null) { CurrentCall.ContextsDynamicCalls = dynamicCall; } else { CurrentCall.ContextsDynamicCalls.LastCall.NextDynamicCall = dynamicCall; } }