| Elliott Hughes | 2faa5f1 | 2012-01-30 14:42:07 -0800 | [diff] [blame] | 1 | /* |
| 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 Carlstrom | 9f30b38 | 2011-08-28 22:41:38 -0700 | [diff] [blame] | 16 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 17 | import dalvik.annotation.optimization.CriticalNative; |
| Igor Murashkin | 9d4b6da | 2016-07-29 09:51:58 -0700 | [diff] [blame] | 18 | import dalvik.annotation.optimization.FastNative; |
| 19 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 20 | /* |
| 21 | * AUTOMATICALLY GENERATED FROM art/tools/mako-source-generator/...../MyClassNatives.java.mako |
| 22 | * |
| Nicolas Geoffray | 5e82b18 | 2020-12-08 08:57:36 +0000 | [diff] [blame] | 23 | * The tool is however not available, so the changes now need to be done by hand. |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 24 | */ |
| Elliott Hughes | b264f08 | 2012-04-06 17:10:10 -0700 | [diff] [blame] | 25 | class MyClassNatives { |
| Elliott Hughes | b264f08 | 2012-04-06 17:10:10 -0700 | [diff] [blame] | 26 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 27 | // Normal native |
| 28 | native void throwException(); |
| 29 | // Normal native |
| 30 | native void foo(); |
| 31 | // Normal native |
| 32 | native int bar(int count); |
| 33 | // Normal native |
| 34 | static native int sbar(int count); |
| 35 | // Normal native |
| 36 | native int fooI(int x); |
| 37 | // Normal native |
| 38 | native int fooII(int x, int y); |
| 39 | // Normal native |
| 40 | native long fooJJ(long x, long y); |
| 41 | // Normal native |
| 42 | native Object fooO(Object x); |
| 43 | // Normal native |
| 44 | native double fooDD(double x, double y); |
| 45 | // Normal native |
| 46 | synchronized native long fooJJ_synchronized(long x, long y); |
| 47 | // Normal native |
| 48 | native Object fooIOO(int x, Object y, Object z); |
| 49 | // Normal native |
| 50 | static native Object fooSIOO(int x, Object y, Object z); |
| 51 | // Normal native |
| 52 | static native int fooSII(int x, int y); |
| 53 | // Normal native |
| 54 | static native double fooSDD(double x, double y); |
| 55 | // Normal native |
| 56 | static synchronized native Object fooSSIOO(int x, Object y, Object z); |
| 57 | // Normal native |
| 58 | static native void arraycopy(Object src, int src_pos, Object dst, int dst_pos, int length); |
| 59 | // Normal native |
| 60 | native boolean compareAndSwapInt(Object obj, long offset, int expected, int newval); |
| 61 | // Normal native |
| 62 | static native int getText(long val1, Object obj1, long val2, Object obj2); |
| 63 | // Normal native |
| 64 | synchronized native Object[] getSinkPropertiesNative(String path); |
| 65 | |
| 66 | // Normal native |
| Andreas Gampe | 166aaee | 2016-07-18 08:27:23 -0700 | [diff] [blame] | 67 | native Class<?> instanceMethodThatShouldReturnClass(); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 68 | // Normal native |
| Andreas Gampe | 166aaee | 2016-07-18 08:27:23 -0700 | [diff] [blame] | 69 | static native Class<?> staticMethodThatShouldReturnClass(); |
| Elliott Hughes | b264f08 | 2012-04-06 17:10:10 -0700 | [diff] [blame] | 70 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 71 | // Normal native |
| Andreas Gampe | 166aaee | 2016-07-18 08:27:23 -0700 | [diff] [blame] | 72 | native void instanceMethodThatShouldTakeClass(int i, Class<?> c); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 73 | // Normal native |
| Andreas Gampe | 166aaee | 2016-07-18 08:27:23 -0700 | [diff] [blame] | 74 | static native void staticMethodThatShouldTakeClass(int i, Class<?> c); |
| Andreas Gampe | 7a0e504 | 2014-03-07 13:03:19 -0800 | [diff] [blame] | 75 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 76 | // TODO: These 3 seem like they could work for @CriticalNative as well if they were static. |
| 77 | // Normal native |
| Andreas Gampe | 7a0e504 | 2014-03-07 13:03:19 -0800 | [diff] [blame] | 78 | native float checkFloats(float f1, float f2); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 79 | // Normal native |
| Andreas Gampe | 7a0e504 | 2014-03-07 13:03:19 -0800 | [diff] [blame] | 80 | native void forceStackParameters(int i1, int i2, int i3, int i4, int i5, int i6, int i8, int i9, |
| 81 | float f1, float f2, float f3, float f4, float f5, float f6, |
| 82 | float f7, float f8, float f9); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 83 | // Normal native |
| Andreas Gampe | 7a0e504 | 2014-03-07 13:03:19 -0800 | [diff] [blame] | 84 | native void checkParameterAlign(int i1, long l1); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 85 | |
| 86 | // Normal native |
| Andreas Gampe | 7a0e504 | 2014-03-07 13:03:19 -0800 | [diff] [blame] | 87 | native void maxParamNumber(Object o0, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, |
| 88 | Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15, |
| 89 | Object o16, Object o17, Object o18, Object o19, Object o20, Object o21, Object o22, Object o23, |
| 90 | Object o24, Object o25, Object o26, Object o27, Object o28, Object o29, Object o30, Object o31, |
| 91 | Object o32, Object o33, Object o34, Object o35, Object o36, Object o37, Object o38, Object o39, |
| 92 | Object o40, Object o41, Object o42, Object o43, Object o44, Object o45, Object o46, Object o47, |
| 93 | Object o48, Object o49, Object o50, Object o51, Object o52, Object o53, Object o54, Object o55, |
| 94 | Object o56, Object o57, Object o58, Object o59, Object o60, Object o61, Object o62, Object o63, |
| 95 | Object o64, Object o65, Object o66, Object o67, Object o68, Object o69, Object o70, Object o71, |
| 96 | Object o72, Object o73, Object o74, Object o75, Object o76, Object o77, Object o78, Object o79, |
| 97 | Object o80, Object o81, Object o82, Object o83, Object o84, Object o85, Object o86, Object o87, |
| 98 | Object o88, Object o89, Object o90, Object o91, Object o92, Object o93, Object o94, Object o95, |
| 99 | Object o96, Object o97, Object o98, Object o99, Object o100, Object o101, Object o102, Object o103, |
| 100 | Object o104, Object o105, Object o106, Object o107, Object o108, Object o109, Object o110, Object o111, |
| 101 | Object o112, Object o113, Object o114, Object o115, Object o116, Object o117, Object o118, Object o119, |
| 102 | Object o120, Object o121, Object o122, Object o123, Object o124, Object o125, Object o126, Object o127, |
| 103 | Object o128, Object o129, Object o130, Object o131, Object o132, Object o133, Object o134, Object o135, |
| 104 | Object o136, Object o137, Object o138, Object o139, Object o140, Object o141, Object o142, Object o143, |
| 105 | Object o144, Object o145, Object o146, Object o147, Object o148, Object o149, Object o150, Object o151, |
| 106 | Object o152, Object o153, Object o154, Object o155, Object o156, Object o157, Object o158, Object o159, |
| 107 | Object o160, Object o161, Object o162, Object o163, Object o164, Object o165, Object o166, Object o167, |
| 108 | Object o168, Object o169, Object o170, Object o171, Object o172, Object o173, Object o174, Object o175, |
| 109 | Object o176, Object o177, Object o178, Object o179, Object o180, Object o181, Object o182, Object o183, |
| 110 | Object o184, Object o185, Object o186, Object o187, Object o188, Object o189, Object o190, Object o191, |
| 111 | Object o192, Object o193, Object o194, Object o195, Object o196, Object o197, Object o198, Object o199, |
| 112 | Object o200, Object o201, Object o202, Object o203, Object o204, Object o205, Object o206, Object o207, |
| 113 | Object o208, Object o209, Object o210, Object o211, Object o212, Object o213, Object o214, Object o215, |
| 114 | Object o216, Object o217, Object o218, Object o219, Object o220, Object o221, Object o222, Object o223, |
| 115 | Object o224, Object o225, Object o226, Object o227, Object o228, Object o229, Object o230, Object o231, |
| 116 | Object o232, Object o233, Object o234, Object o235, Object o236, Object o237, Object o238, Object o239, |
| 117 | Object o240, Object o241, Object o242, Object o243, Object o244, Object o245, Object o246, Object o247, |
| 118 | Object o248, Object o249, Object o250, Object o251, Object o252, Object o253); |
| 119 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 120 | // Normal native |
| Andreas Gampe | ad61517 | 2014-04-04 16:20:13 -0700 | [diff] [blame] | 121 | native void withoutImplementation(); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 122 | // Normal native |
| Andreas Gampe | 48ee356 | 2015-04-10 19:57:29 -0700 | [diff] [blame] | 123 | native Object withoutImplementationRefReturn(); |
| Vladimir Marko | fa458ac | 2020-02-12 14:08:07 +0000 | [diff] [blame] | 124 | // Normal native |
| 125 | native static void staticWithoutImplementation(); |
| Nicolas Geoffray | 54accbc | 2014-08-13 03:40:45 +0100 | [diff] [blame] | 126 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 127 | // Normal native |
| Vladimir Kostyukov | 1dd61ba | 2014-04-02 18:42:20 +0700 | [diff] [blame] | 128 | native static void stackArgsIntsFirst(int i1, int i2, int i3, int i4, int i5, int i6, int i7, |
| 129 | int i8, int i9, int i10, float f1, float f2, float f3, float f4, float f5, float f6, |
| 130 | float f7, float f8, float f9, float f10); |
| Nicolas Geoffray | 54accbc | 2014-08-13 03:40:45 +0100 | [diff] [blame] | 131 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 132 | // Normal native |
| Vladimir Kostyukov | 1dd61ba | 2014-04-02 18:42:20 +0700 | [diff] [blame] | 133 | native static void stackArgsFloatsFirst(float f1, float f2, float f3, float f4, float f5, |
| 134 | float f6, float f7, float f8, float f9, float f10, int i1, int i2, int i3, int i4, int i5, |
| 135 | int i6, int i7, int i8, int i9, int i10); |
| Nicolas Geoffray | 54accbc | 2014-08-13 03:40:45 +0100 | [diff] [blame] | 136 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 137 | // Normal native |
| Vladimir Kostyukov | 1dd61ba | 2014-04-02 18:42:20 +0700 | [diff] [blame] | 138 | native static void stackArgsMixed(int i1, float f1, int i2, float f2, int i3, float f3, int i4, |
| 139 | float f4, int i5, float f5, int i6, float f6, int i7, float f7, int i8, float f8, int i9, |
| 140 | float f9, int i10, float f10); |
| Nicolas Geoffray | 54accbc | 2014-08-13 03:40:45 +0100 | [diff] [blame] | 141 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 142 | // Normal native |
| Nicolas Geoffray | 54accbc | 2014-08-13 03:40:45 +0100 | [diff] [blame] | 143 | static native double logD(double d); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 144 | // Normal native |
| Nicolas Geoffray | 54accbc | 2014-08-13 03:40:45 +0100 | [diff] [blame] | 145 | static native float logF(float f); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 146 | // Normal native |
| Nicolas Geoffray | 54accbc | 2014-08-13 03:40:45 +0100 | [diff] [blame] | 147 | static native boolean returnTrue(); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 148 | // Normal native |
| Nicolas Geoffray | 54accbc | 2014-08-13 03:40:45 +0100 | [diff] [blame] | 149 | static native boolean returnFalse(); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 150 | // Normal native |
| Nicolas Geoffray | 54accbc | 2014-08-13 03:40:45 +0100 | [diff] [blame] | 151 | static native int returnInt(); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 152 | // Normal native |
| 153 | static native double returnDouble(); |
| 154 | // Normal native |
| 155 | static native long returnLong(); |
| Igor Murashkin | 9d4b6da | 2016-07-29 09:51:58 -0700 | [diff] [blame] | 156 | |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 157 | |
| 158 | |
| 159 | @FastNative |
| 160 | native void throwException_Fast(); |
| 161 | @FastNative |
| 162 | native void foo_Fast(); |
| 163 | @FastNative |
| 164 | native int bar_Fast(int count); |
| 165 | @FastNative |
| 166 | static native int sbar_Fast(int count); |
| 167 | @FastNative |
| 168 | native int fooI_Fast(int x); |
| 169 | @FastNative |
| 170 | native int fooII_Fast(int x, int y); |
| 171 | @FastNative |
| 172 | native long fooJJ_Fast(long x, long y); |
| 173 | @FastNative |
| 174 | native Object fooO_Fast(Object x); |
| 175 | @FastNative |
| 176 | native double fooDD_Fast(double x, double y); |
| 177 | @FastNative |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 178 | native Object fooIOO_Fast(int x, Object y, Object z); |
| 179 | @FastNative |
| 180 | static native Object fooSIOO_Fast(int x, Object y, Object z); |
| 181 | @FastNative |
| 182 | static native int fooSII_Fast(int x, int y); |
| 183 | @FastNative |
| 184 | static native double fooSDD_Fast(double x, double y); |
| 185 | @FastNative |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 186 | static native void arraycopy_Fast(Object src, int src_pos, Object dst, int dst_pos, int length); |
| 187 | @FastNative |
| 188 | native boolean compareAndSwapInt_Fast(Object obj, long offset, int expected, int newval); |
| 189 | @FastNative |
| 190 | static native int getText_Fast(long val1, Object obj1, long val2, Object obj2); |
| 191 | @FastNative |
| Nicolas Geoffray | 5e82b18 | 2020-12-08 08:57:36 +0000 | [diff] [blame] | 192 | native Object[] getSinkPropertiesNative_Fast(String path); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 193 | |
| 194 | @FastNative |
| 195 | native Class<?> instanceMethodThatShouldReturnClass_Fast(); |
| 196 | @FastNative |
| 197 | static native Class<?> staticMethodThatShouldReturnClass_Fast(); |
| 198 | |
| 199 | @FastNative |
| 200 | native void instanceMethodThatShouldTakeClass_Fast(int i, Class<?> c); |
| 201 | @FastNative |
| 202 | static native void staticMethodThatShouldTakeClass_Fast(int i, Class<?> c); |
| 203 | |
| 204 | // TODO: These 3 seem like they could work for @CriticalNative as well if they were static. |
| 205 | @FastNative |
| 206 | native float checkFloats_Fast(float f1, float f2); |
| 207 | @FastNative |
| 208 | native void forceStackParameters_Fast(int i1, int i2, int i3, int i4, int i5, int i6, int i8, int i9, |
| 209 | float f1, float f2, float f3, float f4, float f5, float f6, |
| 210 | float f7, float f8, float f9); |
| 211 | @FastNative |
| 212 | native void checkParameterAlign_Fast(int i1, long l1); |
| 213 | |
| 214 | @FastNative |
| 215 | native void maxParamNumber_Fast(Object o0, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, |
| 216 | Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15, |
| 217 | Object o16, Object o17, Object o18, Object o19, Object o20, Object o21, Object o22, Object o23, |
| 218 | Object o24, Object o25, Object o26, Object o27, Object o28, Object o29, Object o30, Object o31, |
| 219 | Object o32, Object o33, Object o34, Object o35, Object o36, Object o37, Object o38, Object o39, |
| 220 | Object o40, Object o41, Object o42, Object o43, Object o44, Object o45, Object o46, Object o47, |
| 221 | Object o48, Object o49, Object o50, Object o51, Object o52, Object o53, Object o54, Object o55, |
| 222 | Object o56, Object o57, Object o58, Object o59, Object o60, Object o61, Object o62, Object o63, |
| 223 | Object o64, Object o65, Object o66, Object o67, Object o68, Object o69, Object o70, Object o71, |
| 224 | Object o72, Object o73, Object o74, Object o75, Object o76, Object o77, Object o78, Object o79, |
| 225 | Object o80, Object o81, Object o82, Object o83, Object o84, Object o85, Object o86, Object o87, |
| 226 | Object o88, Object o89, Object o90, Object o91, Object o92, Object o93, Object o94, Object o95, |
| 227 | Object o96, Object o97, Object o98, Object o99, Object o100, Object o101, Object o102, Object o103, |
| 228 | Object o104, Object o105, Object o106, Object o107, Object o108, Object o109, Object o110, Object o111, |
| 229 | Object o112, Object o113, Object o114, Object o115, Object o116, Object o117, Object o118, Object o119, |
| 230 | Object o120, Object o121, Object o122, Object o123, Object o124, Object o125, Object o126, Object o127, |
| 231 | Object o128, Object o129, Object o130, Object o131, Object o132, Object o133, Object o134, Object o135, |
| 232 | Object o136, Object o137, Object o138, Object o139, Object o140, Object o141, Object o142, Object o143, |
| 233 | Object o144, Object o145, Object o146, Object o147, Object o148, Object o149, Object o150, Object o151, |
| 234 | Object o152, Object o153, Object o154, Object o155, Object o156, Object o157, Object o158, Object o159, |
| 235 | Object o160, Object o161, Object o162, Object o163, Object o164, Object o165, Object o166, Object o167, |
| 236 | Object o168, Object o169, Object o170, Object o171, Object o172, Object o173, Object o174, Object o175, |
| 237 | Object o176, Object o177, Object o178, Object o179, Object o180, Object o181, Object o182, Object o183, |
| 238 | Object o184, Object o185, Object o186, Object o187, Object o188, Object o189, Object o190, Object o191, |
| 239 | Object o192, Object o193, Object o194, Object o195, Object o196, Object o197, Object o198, Object o199, |
| 240 | Object o200, Object o201, Object o202, Object o203, Object o204, Object o205, Object o206, Object o207, |
| 241 | Object o208, Object o209, Object o210, Object o211, Object o212, Object o213, Object o214, Object o215, |
| 242 | Object o216, Object o217, Object o218, Object o219, Object o220, Object o221, Object o222, Object o223, |
| 243 | Object o224, Object o225, Object o226, Object o227, Object o228, Object o229, Object o230, Object o231, |
| 244 | Object o232, Object o233, Object o234, Object o235, Object o236, Object o237, Object o238, Object o239, |
| 245 | Object o240, Object o241, Object o242, Object o243, Object o244, Object o245, Object o246, Object o247, |
| 246 | Object o248, Object o249, Object o250, Object o251, Object o252, Object o253); |
| 247 | |
| 248 | @FastNative |
| 249 | native void withoutImplementation_Fast(); |
| 250 | @FastNative |
| 251 | native Object withoutImplementationRefReturn_Fast(); |
| Vladimir Marko | fa458ac | 2020-02-12 14:08:07 +0000 | [diff] [blame] | 252 | @FastNative |
| 253 | native static void staticWithoutImplementation_Fast(); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 254 | |
| 255 | @FastNative |
| 256 | native static void stackArgsIntsFirst_Fast(int i1, int i2, int i3, int i4, int i5, int i6, int i7, |
| 257 | int i8, int i9, int i10, float f1, float f2, float f3, float f4, float f5, float f6, |
| 258 | float f7, float f8, float f9, float f10); |
| 259 | |
| 260 | @FastNative |
| 261 | native static void stackArgsFloatsFirst_Fast(float f1, float f2, float f3, float f4, float f5, |
| 262 | float f6, float f7, float f8, float f9, float f10, int i1, int i2, int i3, int i4, int i5, |
| 263 | int i6, int i7, int i8, int i9, int i10); |
| 264 | |
| 265 | @FastNative |
| 266 | native static void stackArgsMixed_Fast(int i1, float f1, int i2, float f2, int i3, float f3, int i4, |
| 267 | float f4, int i5, float f5, int i6, float f6, int i7, float f7, int i8, float f8, int i9, |
| 268 | float f9, int i10, float f10); |
| 269 | |
| 270 | @FastNative |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 271 | static native double logD_Fast(double d); |
| 272 | @FastNative |
| 273 | static native float logF_Fast(float f); |
| 274 | @FastNative |
| 275 | static native boolean returnTrue_Fast(); |
| 276 | @FastNative |
| 277 | static native boolean returnFalse_Fast(); |
| 278 | @FastNative |
| 279 | static native int returnInt_Fast(); |
| 280 | @FastNative |
| 281 | static native double returnDouble_Fast(); |
| 282 | @FastNative |
| 283 | static native long returnLong_Fast(); |
| 284 | |
| 285 | |
| 286 | |
| 287 | @CriticalNative |
| 288 | static native int sbar_Critical(int count); |
| 289 | @CriticalNative |
| 290 | static native int fooSII_Critical(int x, int y); |
| 291 | @CriticalNative |
| 292 | static native double fooSDD_Critical(double x, double y); |
| 293 | |
| 294 | @CriticalNative |
| Vladimir Marko | fa458ac | 2020-02-12 14:08:07 +0000 | [diff] [blame] | 295 | native static void staticWithoutImplementation_Critical(); |
| 296 | |
| 297 | @CriticalNative |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 298 | native static void stackArgsIntsFirst_Critical(int i1, int i2, int i3, int i4, int i5, int i6, int i7, |
| 299 | int i8, int i9, int i10, float f1, float f2, float f3, float f4, float f5, float f6, |
| 300 | float f7, float f8, float f9, float f10); |
| 301 | |
| 302 | @CriticalNative |
| 303 | native static void stackArgsFloatsFirst_Critical(float f1, float f2, float f3, float f4, float f5, |
| 304 | float f6, float f7, float f8, float f9, float f10, int i1, int i2, int i3, int i4, int i5, |
| 305 | int i6, int i7, int i8, int i9, int i10); |
| 306 | |
| 307 | @CriticalNative |
| 308 | native static void stackArgsMixed_Critical(int i1, float f1, int i2, float f2, int i3, float f3, int i4, |
| 309 | float f4, int i5, float f5, int i6, float f6, int i7, float f7, int i8, float f8, int i9, |
| 310 | float f9, int i10, float f10); |
| 311 | |
| 312 | @CriticalNative |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 313 | static native double logD_Critical(double d); |
| 314 | @CriticalNative |
| 315 | static native float logF_Critical(float f); |
| 316 | @CriticalNative |
| 317 | static native boolean returnTrue_Critical(); |
| 318 | @CriticalNative |
| 319 | static native boolean returnFalse_Critical(); |
| 320 | @CriticalNative |
| 321 | static native int returnInt_Critical(); |
| 322 | @CriticalNative |
| 323 | static native double returnDouble_Critical(); |
| 324 | @CriticalNative |
| 325 | static native long returnLong_Critical(); |
| 326 | |
| 327 | |
| 328 | |
| 329 | // Check for @FastNative/@CriticalNative annotation presence [or lack of presence]. |
| Igor Murashkin | 9d4b6da | 2016-07-29 09:51:58 -0700 | [diff] [blame] | 330 | public static native void normalNative(); |
| 331 | @FastNative |
| 332 | public static native void fastNative(); |
| Igor Murashkin | 367f3dd | 2016-09-01 17:00:24 -0700 | [diff] [blame] | 333 | @CriticalNative |
| 334 | public static native void criticalNative(); |
| Elliott Hughes | 3e778f7 | 2012-05-21 15:29:52 -0700 | [diff] [blame] | 335 | } |