Fix SpringCoat setting non-static fields with constant values where they are now...
[SquirrelJME.git] / modules / cldc-compact / src / test / resources / lang / bytecode / field / TestInstanceFieldConst.j
blob8e9be23299c06262233557fa977fb0fce3951aaa
1 ; -*- Mode: Jasmin; indent-tabs-mode: t; tab-width: 4 -*-
2 ; ---------------------------------------------------------------------------
3 ; Multi-Phasic Applications: SquirrelJME
4 ; Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 ; ---------------------------------------------------------------------------
6 ; SquirrelJME is under the GNU General Public License v3+, or later.
7 ; See license.mkd for licensing and copyright information.
8 ; ---------------------------------------------------------------------------
10 .class public lang/bytecode/field/TestInstanceFieldConst
11 .super net/multiphasicapps/tac/TestSupplier
13 ; Even though this would be ignored, Jasmin Sable adds a ConstantValue
14 ; attribute for any field value so we can take advantage of it here
15 .field "test" I = 42
17 .method public <init>()V
18 aload 0
19 invokenonvirtual net/multiphasicapps/tac/TestSupplier/<init>()V
20 return
21 .end method
23 .method public test()Ljava/lang/Object;
24 .limit stack 2
25 ; Load in field
26 aload 0
27 getfield lang/bytecode/field/TestInstanceFieldConst/test I
29 ; Box and return it
30 invokestatic java/lang/Integer/valueOf(I)Ljava/lang/Integer;
31 areturn
32 .end method