summaryrefslogtreecommitdiffstats
path: root/test/800-smali/smali/sameFieldNames.smali
blob: 107161b538d8237e09d8005002dbf571c3caf20b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.class public LsameFieldNames;
.super Ljava/lang/Object;

# Test multiple fields with the same name and different types.
# (Invalid in Java language but valid in bytecode.)
.field static public a:D
.field static public a:S
.field static public a:J
.field static public a:F
.field static public a:Z
.field static public a:I
.field static public a:B
.field static public a:C
.field static public a:Ljava/lang/Integer;
.field static public a:Ljava/lang/Long;
.field static public a:Ljava/lang/Float;
.field static public a:Ljava/lang/Double;
.field static public a:Ljava/lang/Boolean;
.field static public a:Ljava/lang/Void;
.field static public a:Ljava/lang/Short;
.field static public a:Ljava/lang/Char;
.field static public a:Ljava/lang/Byte;

# Add some more fields to stress test the sorting for offset assignment.
.field static public b:C
.field static public c:J
.field static public d:C
.field static public e:B
.field static public f:C
.field static public g:J
.field static public h:C
.field static public i:J
.field static public j:I
.field static public k:J
.field static public l:J
.field static public m:I
.field static public n:J
.field static public o:I
.field static public p:Ljava/lang/Integer;
.field static public q:I
.field static public r:J
.field static public s:I
.field static public t:Ljava/lang/Integer;
.field static public u:I
.field static public v:J
.field static public w:I
.field static public x:Ljava/lang/Integer;
.field static public y:I
.field static public z:Ljava/lang/Integer;

.method public static getInt()I
    .locals 2
    const/4 v0, 2
    sput v0, LsameFieldNames;->a:I
    sget-object v1, LsameFieldNames;->a:Ljava/lang/Integer;
    const/4 v1, 0
    if-nez v1, :fail
    const/4 v0, 7
    :ret
    return v0
    :fail
    const/4 v0, 0
    goto :ret
.end method