public static MSA.Expression /*!*/ MakeArrayOpCall(IList <MSA.Expression> /*!*/ args) { Assert.NotNull(args); switch (args.Count) { case 0: return(Methods.MakeArray0.OpCall()); case 1: return(Methods.MakeArray1.OpCall(AstUtils.Box(args[0]))); case 2: return(Methods.MakeArray2.OpCall(AstUtils.Box(args[0]), AstUtils.Box(args[1]))); case 3: return(Methods.MakeArray3.OpCall(AstUtils.Box(args[0]), AstUtils.Box(args[1]), AstUtils.Box(args[2]))); case 4: return(Methods.MakeArray4.OpCall(AstUtils.Box(args[0]), AstUtils.Box(args[1]), AstUtils.Box(args[2]), AstUtils.Box(args[3]))); case 5: return(Methods.MakeArray5.OpCall(new AstExpressions { AstUtils.Box(args[0]), AstUtils.Box(args[1]), AstUtils.Box(args[2]), AstUtils.Box(args[3]), AstUtils.Box(args[4]) })); default: Debug.Assert(args.Count > Runtime.RubyOps.OptimizedOpCallParamCount); return(Methods.MakeArrayN.OpCall(AstUtils.NewArrayHelper(typeof(object), args))); } }
internal MSA.Expression /*!*/ MakeHashOpCall(List <MSA.Expression> /*!*/ expressions) { return(Methods.MakeHash.OpCall(CurrentScopeVariable, AstUtils.NewArrayHelper(typeof(object), expressions))); }