1 ; -*- Mode: Jasmin; indent-tabs-mode: t; tab-width: 4 -*-
2 ; ---------------------------------------------------------------------------
4 ; Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 ; ---------------------------------------------------------------------------
6 ; SquirrelJME is under the Mozilla Public License Version 2.0.
7 ; See license.mkd for licensing and copyright information.
8 ; ---------------------------------------------------------------------------
10 .
class public lang
/interfaces
/TestInvokeVirtualOnAbstractImplInterface
11 .
super net
/multiphasicapps
/tac
/TestInteger
13 .
method public <init
>()V
15 invokenonvirtual net
/multiphasicapps
/tac
/TestInteger
/<init
>()V
19 .
method public test
()I
21 ; Allocate and initialize an implementation
22 new lang
/interfaces
/ImplAbstractImplAWithMethod
24 invokespecial lang
/interfaces
/ImplAbstractImplAWithMethod
/<init
>()V
26 ; Duplicate for the second and third call
30 ; Call the first virtually, it should still be valid
31 invokevirtual lang
/interfaces
/AbstractImplANoMethod
/methodA
()I
33 ; Then call it on the sub-class
35 invokevirtual lang
/interfaces
/ImplAbstractImplAWithMethod
/methodA
()I
40 ; Call via interface next
42 invokeinterface lang
/interfaces
/InterfaceA
/methodA
()I
1
44 ; Add both values together which becomes the result