Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / benchmark / inline3.cs
1 using System;
2
3 public class Test {
4
5         public static int test0 ()
6         {
7                 return test1 (1);
8         }
9         public static int test1 (int a)
10         {
11                 return test2 (a, 2);
12         }
13         
14         public static int test2 (int a, int b)
15         {
16                 return test3 (a, b, 3);
17         }
18         
19         public static int test3 (int a, int b, int c)
20         {
21                 return test4 (a, b, c, 4);
22         }
23         
24         public static int test4 (int a, int b, int c, int d)
25         {
26                 return a + b + c + d;
27         }
28
29         public static int run ()
30         {
31                 return test0 ();
32         }
33
34         public static int Main (string[] args) {
35                 int repeat = 1;
36                 
37                 if (args.Length == 1)
38                         repeat = Convert.ToInt32 (args [0]);
39                 
40                 Console.WriteLine ("Repeat = " + repeat);
41
42                 for (int i = 0; i < repeat; i++)
43                         for (int j = 0; j < 500000000; j++)
44                                 if (test0 () != 10)
45                                         return 1;
46                 
47                 
48                 return 0;
49         }
50 }
51
52