Andreas Gampe | 799681b | 2015-05-15 19:24:12 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 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 | #ifndef ART_RUNTIME_INTERPRETER_UNSTARTED_RUNTIME_LIST_H_ |
| 18 | #define ART_RUNTIME_INTERPRETER_UNSTARTED_RUNTIME_LIST_H_ |
| 19 | |
| 20 | // Methods that intercept available libcore implementations. |
| 21 | #define UNSTARTED_RUNTIME_DIRECT_LIST(V) \ |
| 22 | V(ClassForName, "java.lang.Class java.lang.Class.forName(java.lang.String)") \ |
| 23 | V(ClassForNameLong, "java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader)") \ |
| 24 | V(ClassClassForName, "java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader)") \ |
| 25 | V(ClassNewInstance, "java.lang.Object java.lang.Class.newInstance()") \ |
| 26 | V(ClassGetDeclaredField, "java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)") \ |
Andreas Gampe | bc4d218 | 2016-02-22 10:03:12 -0800 | [diff] [blame] | 27 | V(ClassGetDeclaredMethod, "java.lang.reflect.Method java.lang.Class.getDeclaredMethodInternal(java.lang.String, java.lang.Class[])") \ |
Andreas Gampe | 633750c | 2016-02-19 10:49:50 -0800 | [diff] [blame] | 28 | V(ClassGetEnclosingClass, "java.lang.Class java.lang.Class.getEnclosingClass()") \ |
Andreas Gampe | 799681b | 2015-05-15 19:24:12 -0700 | [diff] [blame] | 29 | V(VmClassLoaderFindLoadedClass, "java.lang.Class java.lang.VMClassLoader.findLoadedClass(java.lang.ClassLoader, java.lang.String)") \ |
| 30 | V(VoidLookupType, "java.lang.Class java.lang.Void.lookupType()") \ |
| 31 | V(SystemArraycopy, "void java.lang.System.arraycopy(java.lang.Object, int, java.lang.Object, int, int)") \ |
| 32 | V(SystemArraycopyChar, "void java.lang.System.arraycopy(char[], int, char[], int, int)") \ |
| 33 | V(SystemArraycopyInt, "void java.lang.System.arraycopy(int[], int, int[], int, int)") \ |
Narayan Kamath | 34a316f | 2016-03-30 13:11:18 +0100 | [diff] [blame] | 34 | V(SystemGetSecurityManager, "java.lang.SecurityManager java.lang.System.getSecurityManager()") \ |
Andreas Gampe | 799681b | 2015-05-15 19:24:12 -0700 | [diff] [blame] | 35 | V(ThreadLocalGet, "java.lang.Object java.lang.ThreadLocal.get()") \ |
| 36 | V(MathCeil, "double java.lang.Math.ceil(double)") \ |
Andreas Gampe | 799681b | 2015-05-15 19:24:12 -0700 | [diff] [blame] | 37 | V(ObjectHashCode, "int java.lang.Object.hashCode()") \ |
| 38 | V(DoubleDoubleToRawLongBits, "long java.lang.Double.doubleToRawLongBits(double)") \ |
| 39 | V(DexCacheGetDexNative, "com.android.dex.Dex java.lang.DexCache.getDexNative()") \ |
| 40 | V(MemoryPeekByte, "byte libcore.io.Memory.peekByte(long)") \ |
| 41 | V(MemoryPeekShort, "short libcore.io.Memory.peekShortNative(long)") \ |
| 42 | V(MemoryPeekInt, "int libcore.io.Memory.peekIntNative(long)") \ |
| 43 | V(MemoryPeekLong, "long libcore.io.Memory.peekLongNative(long)") \ |
| 44 | V(MemoryPeekByteArray, "void libcore.io.Memory.peekByteArray(long, byte[], int, int)") \ |
Andreas Gampe | bc4d218 | 2016-02-22 10:03:12 -0800 | [diff] [blame] | 45 | V(ReferenceGetReferent, "java.lang.Object java.lang.ref.Reference.getReferent()") \ |
| 46 | V(RuntimeAvailableProcessors, "int java.lang.Runtime.availableProcessors()") \ |
Andreas Gampe | 799681b | 2015-05-15 19:24:12 -0700 | [diff] [blame] | 47 | V(SecurityGetSecurityPropertiesReader, "java.io.Reader java.security.Security.getSecurityPropertiesReader()") \ |
| 48 | V(StringGetCharsNoCheck, "void java.lang.String.getCharsNoCheck(int, int, char[], int)") \ |
| 49 | V(StringCharAt, "char java.lang.String.charAt(int)") \ |
| 50 | V(StringSetCharAt, "void java.lang.String.setCharAt(int, char)") \ |
| 51 | V(StringFactoryNewStringFromChars, "java.lang.String java.lang.StringFactory.newStringFromChars(int, int, char[])") \ |
| 52 | V(StringFactoryNewStringFromString, "java.lang.String java.lang.StringFactory.newStringFromString(java.lang.String)") \ |
| 53 | V(StringFastSubstring, "java.lang.String java.lang.String.fastSubstring(int, int)") \ |
Andreas Gampe | bc4d218 | 2016-02-22 10:03:12 -0800 | [diff] [blame] | 54 | V(StringToCharArray, "char[] java.lang.String.toCharArray()") \ |
| 55 | V(UnsafeCompareAndSwapLong, "boolean sun.misc.Unsafe.compareAndSwapLong(java.lang.Object, long, long, long)") \ |
| 56 | V(UnsafeCompareAndSwapObject, "boolean sun.misc.Unsafe.compareAndSwapObject(java.lang.Object, long, java.lang.Object, java.lang.Object)") \ |
| 57 | V(UnsafeGetObjectVolatile, "java.lang.Object sun.misc.Unsafe.getObjectVolatile(java.lang.Object, long)") \ |
| 58 | V(UnsafePutOrderedObject, "void sun.misc.Unsafe.putOrderedObject(java.lang.Object, long, java.lang.Object)") |
Andreas Gampe | 799681b | 2015-05-15 19:24:12 -0700 | [diff] [blame] | 59 | |
| 60 | // Methods that are native. |
| 61 | #define UNSTARTED_RUNTIME_JNI_LIST(V) \ |
| 62 | V(VMRuntimeNewUnpaddedArray, "java.lang.Object dalvik.system.VMRuntime.newUnpaddedArray(java.lang.Class, int)") \ |
| 63 | V(VMStackGetCallingClassLoader, "java.lang.ClassLoader dalvik.system.VMStack.getCallingClassLoader()") \ |
| 64 | V(VMStackGetStackClass2, "java.lang.Class dalvik.system.VMStack.getStackClass2()") \ |
| 65 | V(MathLog, "double java.lang.Math.log(double)") \ |
| 66 | V(MathExp, "double java.lang.Math.exp(double)") \ |
Andreas Gampe | bc4d218 | 2016-02-22 10:03:12 -0800 | [diff] [blame] | 67 | V(AtomicLongVMSupportsCS8, "boolean java.util.concurrent.atomic.AtomicLong.VMSupportsCS8()") \ |
Andreas Gampe | 799681b | 2015-05-15 19:24:12 -0700 | [diff] [blame] | 68 | V(ClassGetNameNative, "java.lang.String java.lang.Class.getNameNative()") \ |
Andreas Gampe | bc4d218 | 2016-02-22 10:03:12 -0800 | [diff] [blame] | 69 | V(DoubleLongBitsToDouble, "double java.lang.Double.longBitsToDouble(long)") \ |
Andreas Gampe | 799681b | 2015-05-15 19:24:12 -0700 | [diff] [blame] | 70 | V(FloatFloatToRawIntBits, "int java.lang.Float.floatToRawIntBits(float)") \ |
| 71 | V(FloatIntBitsToFloat, "float java.lang.Float.intBitsToFloat(int)") \ |
| 72 | V(ObjectInternalClone, "java.lang.Object java.lang.Object.internalClone()") \ |
| 73 | V(ObjectNotifyAll, "void java.lang.Object.notifyAll()") \ |
| 74 | V(StringCompareTo, "int java.lang.String.compareTo(java.lang.String)") \ |
| 75 | V(StringIntern, "java.lang.String java.lang.String.intern()") \ |
| 76 | V(StringFastIndexOf, "int java.lang.String.fastIndexOf(int, int)") \ |
| 77 | V(ArrayCreateMultiArray, "java.lang.Object java.lang.reflect.Array.createMultiArray(java.lang.Class, int[])") \ |
| 78 | V(ArrayCreateObjectArray, "java.lang.Object java.lang.reflect.Array.createObjectArray(java.lang.Class, int)") \ |
| 79 | V(ThrowableNativeFillInStackTrace, "java.lang.Object java.lang.Throwable.nativeFillInStackTrace()") \ |
| 80 | V(SystemIdentityHashCode, "int java.lang.System.identityHashCode(java.lang.Object)") \ |
| 81 | V(ByteOrderIsLittleEndian, "boolean java.nio.ByteOrder.isLittleEndian()") \ |
| 82 | V(UnsafeCompareAndSwapInt, "boolean sun.misc.Unsafe.compareAndSwapInt(java.lang.Object, long, int, int)") \ |
Narayan Kamath | 34a316f | 2016-03-30 13:11:18 +0100 | [diff] [blame] | 83 | V(UnsafeGetIntVolatile, "int sun.misc.Unsafe.getIntVolatile(java.lang.Object, long)") \ |
Andreas Gampe | 799681b | 2015-05-15 19:24:12 -0700 | [diff] [blame] | 84 | V(UnsafePutObject, "void sun.misc.Unsafe.putObject(java.lang.Object, long, java.lang.Object)") \ |
| 85 | V(UnsafeGetArrayBaseOffsetForComponentType, "int sun.misc.Unsafe.getArrayBaseOffsetForComponentType(java.lang.Class)") \ |
| 86 | V(UnsafeGetArrayIndexScaleForComponentType, "int sun.misc.Unsafe.getArrayIndexScaleForComponentType(java.lang.Class)") |
| 87 | |
| 88 | #endif // ART_RUNTIME_INTERPRETER_UNSTARTED_RUNTIME_LIST_H_ |
| 89 | // the guard in this file is just for cpplint |
| 90 | #undef ART_RUNTIME_INTERPRETER_UNSTARTED_RUNTIME_LIST_H_ |