private static dynamic Function1(ScriptExecutionContext context, dynamic[] captures) { context.PushStackFrame("foo"); bool isError = false; try { Invoke(context, context["bar"]); return null; } catch(Exception) { isError = true; throw; } finally { if (!isError) { context.PopStackFrame(); } } }
private static dynamic Function2(ScriptExecutionContext context, dynamic[] captures) { context.PushStackFrame("bar"); bool isError = false; try { context["Console"].WriteLine("bar"); return null; } catch(Exception) { isError = true; throw; } finally { if (!isError) { context.PopStackFrame(); } } }
private static dynamic Function4(ScriptExecutionContext context, dynamic[] captures, dynamic v21) { context.PushStackFrame("buildMultiplier"); context.DeclareVariable("x", v21); bool isError = false; try { return new ScriptFunction(new Func<ScriptExecutionContext, dynamic[], dynamic, dynamic>(Function5), new dynamic[] { null }, new dynamic[] { context["x"] }); } catch(Exception) { isError = true; throw; } finally { if (!isError) { context.PopStackFrame(); } } }
private static dynamic Function5(ScriptExecutionContext context, dynamic[] captures, dynamic v22) { context.PushStackFrame("<anonymous>"); context.DeclareVariable("y", v22); context.DeclareVariable("x", captures[0]); bool isError = false; try { return (context["x"] * context["y"]); } catch(Exception) { isError = true; throw; } finally { if (!isError) { context.PopStackFrame(); } } }
private static dynamic Function3(ScriptExecutionContext context, dynamic[] captures) { context.PushStackFrame("<anonymous>"); context.DeclareVariable("System", captures[0]); context.DeclareVariable("string", captures[1]); context.DeclareVariable("int", captures[2]); bool isError = false; try { return ScriptType.FromValue(context["System"].Tuple, ScriptType.FromValue(context["string"]), ScriptType.FromValue(context["int"])); } catch(Exception) { isError = true; throw; } finally { if (!isError) { context.PopStackFrame(); } } }