1 /*
2  * Copyright (C) 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 import java.lang.reflect.Method;
18 
19 // An interface with enough methods to trigger a conflict.
20 interface Itf {
method0a()21   public void method0a();
method0b()22   public void method0b();
method0c()23   public void method0c();
method0d()24   public void method0d();
method0e()25   public void method0e();
method0f()26   public void method0f();
method0g()27   public void method0g();
method0h()28   public void method0h();
method0i()29   public void method0i();
method0j()30   public void method0j();
method0k()31   public void method0k();
method0l()32   public void method0l();
method0m()33   public void method0m();
method0n()34   public void method0n();
method0o()35   public void method0o();
method0p()36   public void method0p();
method0q()37   public void method0q();
method0r()38   public void method0r();
method0s()39   public void method0s();
method0t()40   public void method0t();
method0u()41   public void method0u();
method0v()42   public void method0v();
method0w()43   public void method0w();
method0x()44   public void method0x();
method0y()45   public void method0y();
method0z()46   public void method0z();
method1a()47   public void method1a();
method1b()48   public void method1b();
method1c()49   public void method1c();
method1d()50   public void method1d();
method1e()51   public void method1e();
method1f()52   public void method1f();
method1g()53   public void method1g();
method1h()54   public void method1h();
method1i()55   public void method1i();
method1j()56   public void method1j();
method1k()57   public void method1k();
method1l()58   public void method1l();
method1m()59   public void method1m();
method1n()60   public void method1n();
method1o()61   public void method1o();
method1p()62   public void method1p();
method1q()63   public void method1q();
method1r()64   public void method1r();
method1s()65   public void method1s();
method1t()66   public void method1t();
method1u()67   public void method1u();
method1v()68   public void method1v();
method1w()69   public void method1w();
method1x()70   public void method1x();
method1y()71   public void method1y();
method1z()72   public void method1z();
method2a()73   public void method2a();
method2b()74   public void method2b();
method2c()75   public void method2c();
method2d()76   public void method2d();
method2e()77   public void method2e();
method2f()78   public void method2f();
method2g()79   public void method2g();
method2h()80   public void method2h();
method2i()81   public void method2i();
method2j()82   public void method2j();
method2k()83   public void method2k();
method2l()84   public void method2l();
method2m()85   public void method2m();
method2n()86   public void method2n();
method2o()87   public void method2o();
method2p()88   public void method2p();
method2q()89   public void method2q();
method2r()90   public void method2r();
method2s()91   public void method2s();
method2t()92   public void method2t();
method2u()93   public void method2u();
method2v()94   public void method2v();
method2w()95   public void method2w();
method2x()96   public void method2x();
method2y()97   public void method2y();
method2z()98   public void method2z();
99 }
100 
101 public class Main implements Itf {
102   public static Itf main;
main(String[] args)103   public static void main(String[] args) throws Exception {
104     System.loadLibrary(args[0]);
105     ensureJitCompiled(Main.class, "$noinline$callInterfaceMethods");
106     $noinline$callInterfaceMethods(new Main());
107   }
108 
ensureJitCompiled(Class<?> cls, String name)109   public static native void ensureJitCompiled(Class<?> cls, String name);
110 
$noinline$callInterfaceMethods(Itf itf)111   public static void $noinline$callInterfaceMethods(Itf itf) {
112     itf.method0a();
113     itf.method0b();
114     itf.method0c();
115     itf.method0d();
116     itf.method0e();
117     itf.method0f();
118     itf.method0g();
119     itf.method0h();
120     itf.method0i();
121     itf.method0j();
122     itf.method0k();
123     itf.method0l();
124     itf.method0m();
125     itf.method0n();
126     itf.method0o();
127     itf.method0p();
128     itf.method0q();
129     itf.method0r();
130     itf.method0s();
131     itf.method0t();
132     itf.method0u();
133     itf.method0v();
134     itf.method0w();
135     itf.method0x();
136     itf.method0y();
137     itf.method0z();
138 
139     itf.method1a();
140     itf.method1b();
141     itf.method1c();
142     itf.method1d();
143     itf.method1e();
144     itf.method1f();
145     itf.method1g();
146     itf.method1h();
147     itf.method1i();
148     itf.method1j();
149     itf.method1k();
150     itf.method1l();
151     itf.method1m();
152     itf.method1n();
153     itf.method1o();
154     itf.method1p();
155     itf.method1q();
156     itf.method1r();
157     itf.method1s();
158     itf.method1t();
159     itf.method1u();
160     itf.method1v();
161     itf.method1w();
162     itf.method1x();
163     itf.method1y();
164     itf.method1z();
165   }
166 
method0a()167   public void method0a() {}
method0b()168   public void method0b() {}
method0c()169   public void method0c() {}
method0d()170   public void method0d() {}
method0e()171   public void method0e() {}
method0f()172   public void method0f() {}
method0g()173   public void method0g() {}
method0h()174   public void method0h() {}
method0i()175   public void method0i() {}
method0j()176   public void method0j() {}
method0k()177   public void method0k() {}
method0l()178   public void method0l() {}
method0m()179   public void method0m() {}
method0n()180   public void method0n() {}
method0o()181   public void method0o() {}
method0p()182   public void method0p() {}
method0q()183   public void method0q() {}
method0r()184   public void method0r() {}
method0s()185   public void method0s() {}
method0t()186   public void method0t() {}
method0u()187   public void method0u() {}
method0v()188   public void method0v() {}
method0w()189   public void method0w() {}
method0x()190   public void method0x() {}
method0y()191   public void method0y() {}
method0z()192   public void method0z() {}
method1a()193   public void method1a() {}
method1b()194   public void method1b() {}
method1c()195   public void method1c() {}
method1d()196   public void method1d() {}
method1e()197   public void method1e() {}
method1f()198   public void method1f() {}
method1g()199   public void method1g() {}
method1h()200   public void method1h() {}
method1i()201   public void method1i() {}
method1j()202   public void method1j() {}
method1k()203   public void method1k() {}
method1l()204   public void method1l() {}
method1m()205   public void method1m() {}
method1n()206   public void method1n() {}
method1o()207   public void method1o() {}
method1p()208   public void method1p() {}
method1q()209   public void method1q() {}
method1r()210   public void method1r() {}
method1s()211   public void method1s() {}
method1t()212   public void method1t() {}
method1u()213   public void method1u() {}
method1v()214   public void method1v() {}
method1w()215   public void method1w() {}
method1x()216   public void method1x() {}
method1y()217   public void method1y() {}
method1z()218   public void method1z() {}
method2a()219   public void method2a() {}
method2b()220   public void method2b() {}
method2c()221   public void method2c() {}
method2d()222   public void method2d() {}
method2e()223   public void method2e() {}
method2f()224   public void method2f() {}
method2g()225   public void method2g() {}
method2h()226   public void method2h() {}
method2i()227   public void method2i() {}
method2j()228   public void method2j() {}
method2k()229   public void method2k() {}
method2l()230   public void method2l() {}
method2m()231   public void method2m() {}
method2n()232   public void method2n() {}
method2o()233   public void method2o() {}
method2p()234   public void method2p() {}
method2q()235   public void method2q() {}
method2r()236   public void method2r() {}
method2s()237   public void method2s() {}
method2t()238   public void method2t() {}
method2u()239   public void method2u() {}
method2v()240   public void method2v() {}
method2w()241   public void method2w() {}
method2x()242   public void method2x() {}
method2y()243   public void method2y() {}
method2z()244   public void method2z() {}
245 }
246