blob: c601e3e9bc6e30c745c6d6d24be80332612410bb [file] [log] [blame]
Elliott Hughes2faa5f12012-01-30 14:42:07 -08001/*
2 * Copyright (C) 2011 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 */
Brian Carlstrom9f30b382011-08-28 22:41:38 -070016
Igor Murashkin367f3dd2016-09-01 17:00:24 -070017import dalvik.annotation.optimization.CriticalNative;
Igor Murashkin9d4b6da2016-07-29 09:51:58 -070018import dalvik.annotation.optimization.FastNative;
19
Igor Murashkin367f3dd2016-09-01 17:00:24 -070020/*
21 * AUTOMATICALLY GENERATED FROM art/tools/mako-source-generator/...../MyClassNatives.java.mako
22 *
23 * !!! DO NOT EDIT DIRECTLY !!!
24 *
25 */
Elliott Hughesb264f082012-04-06 17:10:10 -070026class MyClassNatives {
Elliott Hughesb264f082012-04-06 17:10:10 -070027
Igor Murashkin367f3dd2016-09-01 17:00:24 -070028 // Normal native
29 native void throwException();
30 // Normal native
31 native void foo();
32 // Normal native
33 native int bar(int count);
34 // Normal native
35 static native int sbar(int count);
36 // Normal native
37 native int fooI(int x);
38 // Normal native
39 native int fooII(int x, int y);
40 // Normal native
41 native long fooJJ(long x, long y);
42 // Normal native
43 native Object fooO(Object x);
44 // Normal native
45 native double fooDD(double x, double y);
46 // Normal native
47 synchronized native long fooJJ_synchronized(long x, long y);
48 // Normal native
49 native Object fooIOO(int x, Object y, Object z);
50 // Normal native
51 static native Object fooSIOO(int x, Object y, Object z);
52 // Normal native
53 static native int fooSII(int x, int y);
54 // Normal native
55 static native double fooSDD(double x, double y);
56 // Normal native
57 static synchronized native Object fooSSIOO(int x, Object y, Object z);
58 // Normal native
59 static native void arraycopy(Object src, int src_pos, Object dst, int dst_pos, int length);
60 // Normal native
61 native boolean compareAndSwapInt(Object obj, long offset, int expected, int newval);
62 // Normal native
63 static native int getText(long val1, Object obj1, long val2, Object obj2);
64 // Normal native
65 synchronized native Object[] getSinkPropertiesNative(String path);
66
67 // Normal native
Andreas Gampe166aaee2016-07-18 08:27:23 -070068 native Class<?> instanceMethodThatShouldReturnClass();
Igor Murashkin367f3dd2016-09-01 17:00:24 -070069 // Normal native
Andreas Gampe166aaee2016-07-18 08:27:23 -070070 static native Class<?> staticMethodThatShouldReturnClass();
Elliott Hughesb264f082012-04-06 17:10:10 -070071
Igor Murashkin367f3dd2016-09-01 17:00:24 -070072 // Normal native
Andreas Gampe166aaee2016-07-18 08:27:23 -070073 native void instanceMethodThatShouldTakeClass(int i, Class<?> c);
Igor Murashkin367f3dd2016-09-01 17:00:24 -070074 // Normal native
Andreas Gampe166aaee2016-07-18 08:27:23 -070075 static native void staticMethodThatShouldTakeClass(int i, Class<?> c);
Andreas Gampe7a0e5042014-03-07 13:03:19 -080076
Igor Murashkin367f3dd2016-09-01 17:00:24 -070077 // TODO: These 3 seem like they could work for @CriticalNative as well if they were static.
78 // Normal native
Andreas Gampe7a0e5042014-03-07 13:03:19 -080079 native float checkFloats(float f1, float f2);
Igor Murashkin367f3dd2016-09-01 17:00:24 -070080 // Normal native
Andreas Gampe7a0e5042014-03-07 13:03:19 -080081 native void forceStackParameters(int i1, int i2, int i3, int i4, int i5, int i6, int i8, int i9,
82 float f1, float f2, float f3, float f4, float f5, float f6,
83 float f7, float f8, float f9);
Igor Murashkin367f3dd2016-09-01 17:00:24 -070084 // Normal native
Andreas Gampe7a0e5042014-03-07 13:03:19 -080085 native void checkParameterAlign(int i1, long l1);
Igor Murashkin367f3dd2016-09-01 17:00:24 -070086
87 // Normal native
Andreas Gampe7a0e5042014-03-07 13:03:19 -080088 native void maxParamNumber(Object o0, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7,
89 Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15,
90 Object o16, Object o17, Object o18, Object o19, Object o20, Object o21, Object o22, Object o23,
91 Object o24, Object o25, Object o26, Object o27, Object o28, Object o29, Object o30, Object o31,
92 Object o32, Object o33, Object o34, Object o35, Object o36, Object o37, Object o38, Object o39,
93 Object o40, Object o41, Object o42, Object o43, Object o44, Object o45, Object o46, Object o47,
94 Object o48, Object o49, Object o50, Object o51, Object o52, Object o53, Object o54, Object o55,
95 Object o56, Object o57, Object o58, Object o59, Object o60, Object o61, Object o62, Object o63,
96 Object o64, Object o65, Object o66, Object o67, Object o68, Object o69, Object o70, Object o71,
97 Object o72, Object o73, Object o74, Object o75, Object o76, Object o77, Object o78, Object o79,
98 Object o80, Object o81, Object o82, Object o83, Object o84, Object o85, Object o86, Object o87,
99 Object o88, Object o89, Object o90, Object o91, Object o92, Object o93, Object o94, Object o95,
100 Object o96, Object o97, Object o98, Object o99, Object o100, Object o101, Object o102, Object o103,
101 Object o104, Object o105, Object o106, Object o107, Object o108, Object o109, Object o110, Object o111,
102 Object o112, Object o113, Object o114, Object o115, Object o116, Object o117, Object o118, Object o119,
103 Object o120, Object o121, Object o122, Object o123, Object o124, Object o125, Object o126, Object o127,
104 Object o128, Object o129, Object o130, Object o131, Object o132, Object o133, Object o134, Object o135,
105 Object o136, Object o137, Object o138, Object o139, Object o140, Object o141, Object o142, Object o143,
106 Object o144, Object o145, Object o146, Object o147, Object o148, Object o149, Object o150, Object o151,
107 Object o152, Object o153, Object o154, Object o155, Object o156, Object o157, Object o158, Object o159,
108 Object o160, Object o161, Object o162, Object o163, Object o164, Object o165, Object o166, Object o167,
109 Object o168, Object o169, Object o170, Object o171, Object o172, Object o173, Object o174, Object o175,
110 Object o176, Object o177, Object o178, Object o179, Object o180, Object o181, Object o182, Object o183,
111 Object o184, Object o185, Object o186, Object o187, Object o188, Object o189, Object o190, Object o191,
112 Object o192, Object o193, Object o194, Object o195, Object o196, Object o197, Object o198, Object o199,
113 Object o200, Object o201, Object o202, Object o203, Object o204, Object o205, Object o206, Object o207,
114 Object o208, Object o209, Object o210, Object o211, Object o212, Object o213, Object o214, Object o215,
115 Object o216, Object o217, Object o218, Object o219, Object o220, Object o221, Object o222, Object o223,
116 Object o224, Object o225, Object o226, Object o227, Object o228, Object o229, Object o230, Object o231,
117 Object o232, Object o233, Object o234, Object o235, Object o236, Object o237, Object o238, Object o239,
118 Object o240, Object o241, Object o242, Object o243, Object o244, Object o245, Object o246, Object o247,
119 Object o248, Object o249, Object o250, Object o251, Object o252, Object o253);
120
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700121 // Normal native
Andreas Gampead615172014-04-04 16:20:13 -0700122 native void withoutImplementation();
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700123 // Normal native
Andreas Gampe48ee3562015-04-10 19:57:29 -0700124 native Object withoutImplementationRefReturn();
Nicolas Geoffray54accbc2014-08-13 03:40:45 +0100125
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700126 // Normal native
Vladimir Kostyukov1dd61ba2014-04-02 18:42:20 +0700127 native static void stackArgsIntsFirst(int i1, int i2, int i3, int i4, int i5, int i6, int i7,
128 int i8, int i9, int i10, float f1, float f2, float f3, float f4, float f5, float f6,
129 float f7, float f8, float f9, float f10);
Nicolas Geoffray54accbc2014-08-13 03:40:45 +0100130
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700131 // Normal native
Vladimir Kostyukov1dd61ba2014-04-02 18:42:20 +0700132 native static void stackArgsFloatsFirst(float f1, float f2, float f3, float f4, float f5,
133 float f6, float f7, float f8, float f9, float f10, int i1, int i2, int i3, int i4, int i5,
134 int i6, int i7, int i8, int i9, int i10);
Nicolas Geoffray54accbc2014-08-13 03:40:45 +0100135
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700136 // Normal native
Vladimir Kostyukov1dd61ba2014-04-02 18:42:20 +0700137 native static void stackArgsMixed(int i1, float f1, int i2, float f2, int i3, float f3, int i4,
138 float f4, int i5, float f5, int i6, float f6, int i7, float f7, int i8, float f8, int i9,
139 float f9, int i10, float f10);
Nicolas Geoffray54accbc2014-08-13 03:40:45 +0100140
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700141 // Normal native
Pavle Batuta837e72a2016-03-16 11:31:46 +0100142 native static long getStackArgSignExtendedMips64(int i1, int i2, int i3, int i4, int i5, int i6,
143 int stack_arg);
Lazar Trsicf652d602015-06-24 16:30:21 +0200144
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700145 // Normal native
Nicolas Geoffray54accbc2014-08-13 03:40:45 +0100146 static native double logD(double d);
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700147 // Normal native
Nicolas Geoffray54accbc2014-08-13 03:40:45 +0100148 static native float logF(float f);
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700149 // Normal native
Nicolas Geoffray54accbc2014-08-13 03:40:45 +0100150 static native boolean returnTrue();
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700151 // Normal native
Nicolas Geoffray54accbc2014-08-13 03:40:45 +0100152 static native boolean returnFalse();
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700153 // Normal native
Nicolas Geoffray54accbc2014-08-13 03:40:45 +0100154 static native int returnInt();
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700155 // Normal native
156 static native double returnDouble();
157 // Normal native
158 static native long returnLong();
Igor Murashkin9d4b6da2016-07-29 09:51:58 -0700159
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700160
161
162 @FastNative
163 native void throwException_Fast();
164 @FastNative
165 native void foo_Fast();
166 @FastNative
167 native int bar_Fast(int count);
168 @FastNative
169 static native int sbar_Fast(int count);
170 @FastNative
171 native int fooI_Fast(int x);
172 @FastNative
173 native int fooII_Fast(int x, int y);
174 @FastNative
175 native long fooJJ_Fast(long x, long y);
176 @FastNative
177 native Object fooO_Fast(Object x);
178 @FastNative
179 native double fooDD_Fast(double x, double y);
180 @FastNative
181 synchronized native long fooJJ_synchronized_Fast(long x, long y);
182 @FastNative
183 native Object fooIOO_Fast(int x, Object y, Object z);
184 @FastNative
185 static native Object fooSIOO_Fast(int x, Object y, Object z);
186 @FastNative
187 static native int fooSII_Fast(int x, int y);
188 @FastNative
189 static native double fooSDD_Fast(double x, double y);
190 @FastNative
191 static synchronized native Object fooSSIOO_Fast(int x, Object y, Object z);
192 @FastNative
193 static native void arraycopy_Fast(Object src, int src_pos, Object dst, int dst_pos, int length);
194 @FastNative
195 native boolean compareAndSwapInt_Fast(Object obj, long offset, int expected, int newval);
196 @FastNative
197 static native int getText_Fast(long val1, Object obj1, long val2, Object obj2);
198 @FastNative
199 synchronized native Object[] getSinkPropertiesNative_Fast(String path);
200
201 @FastNative
202 native Class<?> instanceMethodThatShouldReturnClass_Fast();
203 @FastNative
204 static native Class<?> staticMethodThatShouldReturnClass_Fast();
205
206 @FastNative
207 native void instanceMethodThatShouldTakeClass_Fast(int i, Class<?> c);
208 @FastNative
209 static native void staticMethodThatShouldTakeClass_Fast(int i, Class<?> c);
210
211 // TODO: These 3 seem like they could work for @CriticalNative as well if they were static.
212 @FastNative
213 native float checkFloats_Fast(float f1, float f2);
214 @FastNative
215 native void forceStackParameters_Fast(int i1, int i2, int i3, int i4, int i5, int i6, int i8, int i9,
216 float f1, float f2, float f3, float f4, float f5, float f6,
217 float f7, float f8, float f9);
218 @FastNative
219 native void checkParameterAlign_Fast(int i1, long l1);
220
221 @FastNative
222 native void maxParamNumber_Fast(Object o0, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7,
223 Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15,
224 Object o16, Object o17, Object o18, Object o19, Object o20, Object o21, Object o22, Object o23,
225 Object o24, Object o25, Object o26, Object o27, Object o28, Object o29, Object o30, Object o31,
226 Object o32, Object o33, Object o34, Object o35, Object o36, Object o37, Object o38, Object o39,
227 Object o40, Object o41, Object o42, Object o43, Object o44, Object o45, Object o46, Object o47,
228 Object o48, Object o49, Object o50, Object o51, Object o52, Object o53, Object o54, Object o55,
229 Object o56, Object o57, Object o58, Object o59, Object o60, Object o61, Object o62, Object o63,
230 Object o64, Object o65, Object o66, Object o67, Object o68, Object o69, Object o70, Object o71,
231 Object o72, Object o73, Object o74, Object o75, Object o76, Object o77, Object o78, Object o79,
232 Object o80, Object o81, Object o82, Object o83, Object o84, Object o85, Object o86, Object o87,
233 Object o88, Object o89, Object o90, Object o91, Object o92, Object o93, Object o94, Object o95,
234 Object o96, Object o97, Object o98, Object o99, Object o100, Object o101, Object o102, Object o103,
235 Object o104, Object o105, Object o106, Object o107, Object o108, Object o109, Object o110, Object o111,
236 Object o112, Object o113, Object o114, Object o115, Object o116, Object o117, Object o118, Object o119,
237 Object o120, Object o121, Object o122, Object o123, Object o124, Object o125, Object o126, Object o127,
238 Object o128, Object o129, Object o130, Object o131, Object o132, Object o133, Object o134, Object o135,
239 Object o136, Object o137, Object o138, Object o139, Object o140, Object o141, Object o142, Object o143,
240 Object o144, Object o145, Object o146, Object o147, Object o148, Object o149, Object o150, Object o151,
241 Object o152, Object o153, Object o154, Object o155, Object o156, Object o157, Object o158, Object o159,
242 Object o160, Object o161, Object o162, Object o163, Object o164, Object o165, Object o166, Object o167,
243 Object o168, Object o169, Object o170, Object o171, Object o172, Object o173, Object o174, Object o175,
244 Object o176, Object o177, Object o178, Object o179, Object o180, Object o181, Object o182, Object o183,
245 Object o184, Object o185, Object o186, Object o187, Object o188, Object o189, Object o190, Object o191,
246 Object o192, Object o193, Object o194, Object o195, Object o196, Object o197, Object o198, Object o199,
247 Object o200, Object o201, Object o202, Object o203, Object o204, Object o205, Object o206, Object o207,
248 Object o208, Object o209, Object o210, Object o211, Object o212, Object o213, Object o214, Object o215,
249 Object o216, Object o217, Object o218, Object o219, Object o220, Object o221, Object o222, Object o223,
250 Object o224, Object o225, Object o226, Object o227, Object o228, Object o229, Object o230, Object o231,
251 Object o232, Object o233, Object o234, Object o235, Object o236, Object o237, Object o238, Object o239,
252 Object o240, Object o241, Object o242, Object o243, Object o244, Object o245, Object o246, Object o247,
253 Object o248, Object o249, Object o250, Object o251, Object o252, Object o253);
254
255 @FastNative
256 native void withoutImplementation_Fast();
257 @FastNative
258 native Object withoutImplementationRefReturn_Fast();
259
260 @FastNative
261 native static void stackArgsIntsFirst_Fast(int i1, int i2, int i3, int i4, int i5, int i6, int i7,
262 int i8, int i9, int i10, float f1, float f2, float f3, float f4, float f5, float f6,
263 float f7, float f8, float f9, float f10);
264
265 @FastNative
266 native static void stackArgsFloatsFirst_Fast(float f1, float f2, float f3, float f4, float f5,
267 float f6, float f7, float f8, float f9, float f10, int i1, int i2, int i3, int i4, int i5,
268 int i6, int i7, int i8, int i9, int i10);
269
270 @FastNative
271 native static void stackArgsMixed_Fast(int i1, float f1, int i2, float f2, int i3, float f3, int i4,
272 float f4, int i5, float f5, int i6, float f6, int i7, float f7, int i8, float f8, int i9,
273 float f9, int i10, float f10);
274
275 @FastNative
Pavle Batuta837e72a2016-03-16 11:31:46 +0100276 native static long getStackArgSignExtendedMips64_Fast(int i1, int i2, int i3, int i4, int i5, int i6,
277 int stack_arg);
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700278
279 @FastNative
280 static native double logD_Fast(double d);
281 @FastNative
282 static native float logF_Fast(float f);
283 @FastNative
284 static native boolean returnTrue_Fast();
285 @FastNative
286 static native boolean returnFalse_Fast();
287 @FastNative
288 static native int returnInt_Fast();
289 @FastNative
290 static native double returnDouble_Fast();
291 @FastNative
292 static native long returnLong_Fast();
293
294
295
296 @CriticalNative
297 static native int sbar_Critical(int count);
298 @CriticalNative
299 static native int fooSII_Critical(int x, int y);
300 @CriticalNative
301 static native double fooSDD_Critical(double x, double y);
302
303 @CriticalNative
304 native static void stackArgsIntsFirst_Critical(int i1, int i2, int i3, int i4, int i5, int i6, int i7,
305 int i8, int i9, int i10, float f1, float f2, float f3, float f4, float f5, float f6,
306 float f7, float f8, float f9, float f10);
307
308 @CriticalNative
309 native static void stackArgsFloatsFirst_Critical(float f1, float f2, float f3, float f4, float f5,
310 float f6, float f7, float f8, float f9, float f10, int i1, int i2, int i3, int i4, int i5,
311 int i6, int i7, int i8, int i9, int i10);
312
313 @CriticalNative
314 native static void stackArgsMixed_Critical(int i1, float f1, int i2, float f2, int i3, float f3, int i4,
315 float f4, int i5, float f5, int i6, float f6, int i7, float f7, int i8, float f8, int i9,
316 float f9, int i10, float f10);
317
318 @CriticalNative
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700319 static native double logD_Critical(double d);
320 @CriticalNative
321 static native float logF_Critical(float f);
322 @CriticalNative
323 static native boolean returnTrue_Critical();
324 @CriticalNative
325 static native boolean returnFalse_Critical();
326 @CriticalNative
327 static native int returnInt_Critical();
328 @CriticalNative
329 static native double returnDouble_Critical();
330 @CriticalNative
331 static native long returnLong_Critical();
332
333
334
335 // Check for @FastNative/@CriticalNative annotation presence [or lack of presence].
Igor Murashkin9d4b6da2016-07-29 09:51:58 -0700336 public static native void normalNative();
337 @FastNative
338 public static native void fastNative();
Igor Murashkin367f3dd2016-09-01 17:00:24 -0700339 @CriticalNative
340 public static native void criticalNative();
Elliott Hughes3e778f72012-05-21 15:29:52 -0700341}