comparison src/share/vm/graal/graalVmIds.hpp @ 3634:076542d505cd

Remove the need for a global stub array.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 14 Nov 2011 22:38:54 +0100
parents 136ea96eb7f8
children 50a1d38cd7ac
comparison
equal deleted inserted replaced
3633:fc07cf6848fb 3634:076542d505cd
29 #include "classfile/javaClasses.hpp" 29 #include "classfile/javaClasses.hpp"
30 #include "runtime/jniHandles.hpp" 30 #include "runtime/jniHandles.hpp"
31 31
32 class VmIds : public AllStatic { 32 class VmIds : public AllStatic {
33 33
34 private:
35 static GrowableArray<address>* _stubs;
36
37 static oop getObject(jlong id);
38
39 public: 34 public:
40 // these constants needs to have the same values as the one in HotSpotProxy.java
41 static const jlong STUB = 0x100000000000000LL; // address
42 static const jlong METHOD = 0x200000000000000LL; // methodOop
43 static const jlong CLASS = 0x300000000000000LL; // klassOop
44 static const jlong CONSTANT_POOL = 0x500000000000000LL; // constantPoolOop
45 static const jlong CONSTANT = 0x600000000000000LL; // oop
46 static const jlong TYPE_MASK = 0xf00000000000000LL;
47 static const jlong DUMMY_CONSTANT = 0x6ffffffffffffffLL;
48
49 // Initializes the VmIds for a compilation, by creating the arrays
50 static void initializeObjects();
51
52 // Adds a stub address, and returns the corresponding vmId (which is of type STUB) 35 // Adds a stub address, and returns the corresponding vmId (which is of type STUB)
53 static jlong addStub(address stub); 36 static jlong addStub(address stub);
54 37
55 // Returns the stub address with the given vmId 38 // Returns the stub address with the given vmId
56 static address getStub(jlong id); 39 static address getStub(jlong id);