comparison src/share/vm/c1x/c1x_VmIds.hpp @ 1434:72cfb36c6bb2

* enabled all jtt tests * added proxy that counts jni calls * honor hotspot stackshadowpages * constant pool caching * monitor enter/exit * arithmetic stubs (frem, drem, ...) * create stack values for debug info * some doc
author Lukas Stadler <lukas.stadler@oracle.com>
date Thu, 30 Sep 2010 17:19:48 -0700
parents abc670a709dc
children 9569fdf936ff
comparison
equal deleted inserted replaced
1433:efba53f86c4f 1434:72cfb36c6bb2
41 CONSTANT = 0x600000000000000l, // oop 41 CONSTANT = 0x600000000000000l, // oop
42 TYPE_MASK = 0xf00000000000000l, 42 TYPE_MASK = 0xf00000000000000l,
43 DUMMY_CONSTANT = 0x6ffffffffffffffl 43 DUMMY_CONSTANT = 0x6ffffffffffffffl
44 }; 44 };
45 45
46 // Initializes the VmIds for a compilation, by creating the arrays
46 static void initializeObjects(); 47 static void initializeObjects();
48 // Cleans up after a compilation, by deallocating the arrays
47 static void cleanupLocalObjects(); 49 static void cleanupLocalObjects();
48 50
49 // Adds a stub address, and returns the corresponding vmId (which is of type STUB) 51 // Adds a stub address, and returns the corresponding vmId (which is of type STUB)
50 static jlong addStub(address stub); 52 static jlong addStub(address stub);
51 53
69 template <typename T> static T toString(symbolOop symbol, TRAPS); 71 template <typename T> static T toString(symbolOop symbol, TRAPS);
70 72
71 // Helper function to convert a java.lang.String object to a symbolOop (this will return NULL if the symbol doesn't exist in the system) 73 // Helper function to convert a java.lang.String object to a symbolOop (this will return NULL if the symbol doesn't exist in the system)
72 static symbolOop toSymbol(jstring string); 74 static symbolOop toSymbol(jstring string);
73 75
76 // Helper function to get the contents of a java.lang.Long
74 static jlong getBoxedLong(oop obj); 77 static jlong getBoxedLong(oop obj);
75 }; 78 };
79
76 80
77 template <> inline jlong VmIds::add<methodOop>(methodOop obj){ 81 template <> inline jlong VmIds::add<methodOop>(methodOop obj){
78 assert(obj != NULL, "trying to add NULL<methodOop>"); 82 assert(obj != NULL, "trying to add NULL<methodOop>");
79 assert(obj->is_method(), "trying to add mistyped object"); 83 assert(obj->is_method(), "trying to add mistyped object");
80 return add(Handle(obj), METHOD); 84 return add(Handle(obj), METHOD);
97 template <> inline jlong VmIds::add<oop>(oop obj) { 101 template <> inline jlong VmIds::add<oop>(oop obj) {
98 assert(obj != NULL, "trying to add NULL<oop>"); 102 assert(obj != NULL, "trying to add NULL<oop>");
99 assert(obj->is_oop(), "trying to add mistyped object"); 103 assert(obj->is_oop(), "trying to add mistyped object");
100 return add(Handle(obj), CONSTANT); 104 return add(Handle(obj), CONSTANT);
101 } 105 }
106
102 107
103 template <> inline methodOop VmIds::get<methodOop>(jlong id){ 108 template <> inline methodOop VmIds::get<methodOop>(jlong id){
104 assert((id & TYPE_MASK) == METHOD, "METHOD expected"); 109 assert((id & TYPE_MASK) == METHOD, "METHOD expected");
105 assert(getObject(id)->is_method(), "methodOop expected"); 110 assert(getObject(id)->is_method(), "methodOop expected");
106 return (methodOop)getObject(id); 111 return (methodOop)getObject(id);