blob: 72aed8563c9aea4c1ef20525273870ba06d9888a [file] [log] [blame]
Brian Carlstrom9f30b382011-08-28 22:41:38 -07001// Copyright 2011 Google Inc. All Rights Reserved.
2
3class StaticLeafMethods {
4 static void nop() {
5 }
6 static byte identity(byte x) {
7 return x;
8 }
9 static int identity(int x) {
10 return x;
11 }
12 static int sum(int a, int b) {
13 return a + b;
14 }
15 static int sum(int a, int b, int c) {
16 return a + b + c;
17 }
18 static int sum(int a, int b, int c, int d) {
19 return a + b + c + d;
20 }
21 static int sum(int a, int b, int c, int d, int e) {
22 return a + b + c + d + e;
23 }
24 static double identity(double x) {
25 return x;
26 }
27 static double sum(double a, double b) {
28 return a + b;
29 }
30 static double sum(double a, double b, double c) {
31 return a + b + c;
32 }
33 static double sum(double a, double b, double c, double d) {
34 return a + b + c + d;
35 }
36 static double sum(double a, double b, double c, double d, double e) {
37 return a + b + c + d + e;
38 }
39}