comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMEntriesNative.java @ 1423:760213a60e8b

* rewrite of the code installation * partial support for safepoints * macro-based CiTargetMethod interface * code stub support
author Lukas Stadler <lukas.stadler@oracle.com>
date Mon, 16 Aug 2010 18:59:36 -0700
parents 3483ec571caf
children 98fffb304868
comparison
equal deleted inserted replaced
1422:3483ec571caf 1423:760213a60e8b
1 /*
2 * Copyright (c) 2009-2010 Sun Microsystems, Inc. All rights reserved.
3 *
4 * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is
5 * described in this document. In particular, and without limitation, these intellectual property rights may include one
6 * or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent
7 * applications in the U.S. and in other countries.
8 *
9 * U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard
10 * license agreement and applicable provisions of the FAR and its supplements.
11 *
12 * Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or registered
13 * trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and
14 * are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries.
15 *
16 * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd.
17 */
18
1 package com.sun.hotspot.c1x; 19 package com.sun.hotspot.c1x;
2 20
3 import java.lang.reflect.*; 21 import com.sun.cri.ci.*;
4
5 import com.sun.cri.ri.*; 22 import com.sun.cri.ri.*;
6 23
24 /**
25 * Entries into the HotSpot VM from Java code.
26 *
27 * @author Thomas Wuerthinger, Lukas Stadler
28 */
7 public class VMEntriesNative implements VMEntries { 29 public class VMEntriesNative implements VMEntries {
8 30
9 @Override 31 @Override
10 public native byte[] RiMethod_code(Method methodOop); 32 public native byte[] RiMethod_code(long vmId);
11 33
12 @Override 34 @Override
13 public native int RiMethod_maxStackSize(Method methodOop); 35 public native int RiMethod_maxStackSize(long vmId);
14 36
15 @Override 37 @Override
16 public native int RiMethod_maxLocals(Method methodOop); 38 public native int RiMethod_maxLocals(long vmId);
17 39
18 @Override 40 @Override
19 public native RiType RiMethod_holder(Method methodOop); 41 public native RiType RiMethod_holder(long vmId);
20 42
21 @Override 43 @Override
22 public native String RiMethod_signature(Method methodOop); 44 public native String RiMethod_signature(long vmId);
23 45
24 @Override 46 @Override
25 public native String RiMethod_name(Method methodOop); 47 public native int RiMethod_accessFlags(long vmId);
26 48
27 @Override 49 @Override
28 public native int RiMethod_accessFlags(Method methodOop); 50 public native RiType RiSignature_lookupType(String returnType, long accessingClassVmId);
29 51
30 @Override 52 @Override
31 public native RiType RiSignature_lookupType(String returnType, Class<?> accessingClass); 53 public native CiConstant RiConstantPool_lookupConstant(long vmId, int cpi);
32 54
33 @Override 55 @Override
34 public native Object RiConstantPool_lookupConstant(Class<?> constantPoolOop, int cpi); 56 public native RiMethod RiConstantPool_lookupMethod(long vmId, int cpi, byte byteCode);
35 57
36 @Override 58 @Override
37 public native RiMethod RiConstantPool_lookupMethod(Class<?> constantPoolOop, int cpi, byte byteCode); 59 public native RiSignature RiConstantPool_lookupSignature(long vmId, int cpi);
38 60
39 @Override 61 @Override
40 public native RiSignature RiConstantPool_lookupSignature(Class<?> constantPoolOop, int cpi); 62 public native RiType RiConstantPool_lookupType(long vmId, int cpi);
41 63
42 @Override 64 @Override
43 public native RiType RiConstantPool_lookupType(Class<?> constantPoolOop, int cpi); 65 public native RiField RiConstantPool_lookupField(long vmId, int cpi);
44 66
45 @Override 67 @Override
46 public native RiField RiConstantPool_lookupField(Class<?> constantPoolOop, int cpi); 68 public native boolean RiType_isArrayClass(long vmId);
47 69
48 @Override 70 @Override
49 public native String RiType_name(Class<?> klassOop); 71 public native boolean RiType_isInstanceClass(long vmId);
50 72
51 @Override 73 @Override
52 public native boolean RiType_isArrayClass(Class<?> klassOop); 74 public native boolean RiType_isInterface(long vmId);
53 75
54 @Override 76 @Override
55 public native boolean RiType_isInstanceClass(Class<?> klassOop); 77 public native RiConstantPool RiType_constantPool(long vmId);
56 78
57 @Override 79 @Override
58 public native boolean RiType_isInterface(Class<?> klassOop); 80 public native void installMethod(HotSpotTargetMethod targetMethod);
59 81
60 @Override 82 @Override
61 public native void installCode(HotSpotTargetMethod targetMethod); 83 public native long installStub(HotSpotTargetMethod targetMethod);
62 84
63 @Override 85 @Override
64 public native HotSpotVMConfig getConfiguration(); 86 public native HotSpotVMConfig getConfiguration();
87
65 } 88 }