projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git]
/
mono
/
benchmark
/
initlocals.cs
1
// Foo() benefits from definite assignment analysis
2
3
using System;
4
5
class Test {
6
static void Foo () {
7
int a, b, c, d, e, f, g;
8
int h, i, j, k, l, m, n;
9
10
for (int x = 0; x < 2; ++x) {
11
a = 0;
12
b = a;
13
c = a;
14
d = b;
15
e = c;
16
f = 1;
17
g = 2;
18
h = a + b;
19
i = h + h;
20
j = 1 + b + c;
21
k = i + j;
22
l = f + g;
23
m = k + l;
24
n = l + l;
25
}
26
}
27
28
29
static void Main () {
30
for (int i = 0; i < 100000000; ++ i)
31
Foo ();
32
}
33
}