1 // Compiler options: -t:library
7 // big enough that it won't be returned in registers
11 public Result (int val
) {
20 public static int AddABunchOfInts (__arglist
)
24 System
.ArgIterator iter
= new System
.ArgIterator (__arglist
);
25 int argCount
= iter
.GetRemainingCount();
27 for (int i
= 0; i
< argCount
; i
++) {
28 System
.TypedReference typedRef
= iter
.GetNextArg();
29 result
+= (int)TypedReference
.ToObject( typedRef
);
35 public static int AddASecondBunchOfInts (int a
, __arglist
)
39 System
.ArgIterator iter
= new System
.ArgIterator (__arglist
);
40 int argCount
= iter
.GetRemainingCount();
42 for (int i
= 0; i
< argCount
; i
++) {
43 System
.TypedReference typedRef
= iter
.GetNextArg();
44 result
+= (int)TypedReference
.ToObject( typedRef
);
50 public static Result
VtAddABunchOfInts (__arglist
)
54 System
.ArgIterator iter
= new System
.ArgIterator (__arglist
);
55 int argCount
= iter
.GetRemainingCount();
57 for (int i
= 0; i
< argCount
; i
++) {
58 System
.TypedReference typedRef
= iter
.GetNextArg();
59 result
+= (int)TypedReference
.ToObject( typedRef
);
62 return new Result (result
);
65 public static Result
VtAddASecondBunchOfInts (int a
, __arglist
)
69 System
.ArgIterator iter
= new System
.ArgIterator (__arglist
);
70 int argCount
= iter
.GetRemainingCount();
72 for (int i
= 0; i
< argCount
; i
++) {
73 System
.TypedReference typedRef
= iter
.GetNextArg();
74 result
+= (int)TypedReference
.ToObject( typedRef
);
77 return new Result (result
);
80 public int InstAddABunchOfInts (__arglist
)
84 System
.ArgIterator iter
= new System
.ArgIterator (__arglist
);
85 int argCount
= iter
.GetRemainingCount();
87 for (int i
= 0; i
< argCount
; i
++) {
88 System
.TypedReference typedRef
= iter
.GetNextArg();
89 result
+= (int)TypedReference
.ToObject( typedRef
);
95 public int InstAddASecondBunchOfInts (int a
, __arglist
)
99 System
.ArgIterator iter
= new System
.ArgIterator (__arglist
);
100 int argCount
= iter
.GetRemainingCount();
102 for (int i
= 0; i
< argCount
; i
++) {
103 System
.TypedReference typedRef
= iter
.GetNextArg();
104 result
+= (int)TypedReference
.ToObject( typedRef
);
110 public Result
InstVtAddABunchOfInts (__arglist
)
114 System
.ArgIterator iter
= new System
.ArgIterator (__arglist
);
115 int argCount
= iter
.GetRemainingCount();
117 for (int i
= 0; i
< argCount
; i
++) {
118 System
.TypedReference typedRef
= iter
.GetNextArg();
119 result
+= (int)TypedReference
.ToObject( typedRef
);
122 return new Result (result
);
125 public Result
InstVtAddASecondBunchOfInts (int a
, __arglist
)
129 System
.ArgIterator iter
= new System
.ArgIterator (__arglist
);
130 int argCount
= iter
.GetRemainingCount();
132 for (int i
= 0; i
< argCount
; i
++) {
133 System
.TypedReference typedRef
= iter
.GetNextArg();
134 result
+= (int)TypedReference
.ToObject( typedRef
);
137 return new Result (result
);