comparison src/share/vm/c1x/c1x_Compiler.hpp @ 1422:3483ec571caf

* using reflected objects instead of oops * removed scratch from allocatable registers * instanceof xir snippet * arraylength xir snippet * exceptionobject xir snippet * VMEntries and VMExits as interfaces * calls to VMEntries and VMExits are routet through logging proxies
author Lukas Stadler <lukas.stadler@oracle.com>
date Mon, 02 Aug 2010 15:44:38 -0700
parents 6223633ce7dd
children 760213a60e8b
comparison
equal deleted inserted replaced
1421:6223633ce7dd 1422:3483ec571caf
30 30
31 public: 31 public:
32 32
33 C1XCompiler() { _initialized = false; } 33 C1XCompiler() { _initialized = false; }
34 34
35 virtual const char* name() { return "C1X"; } 35 virtual const char* name() { return "C1X"; }
36 36
37 // Native / OSR not supported 37 // Native / OSR not supported
38 virtual bool supports_native() { return false; } 38 virtual bool supports_native() { return false; }
39 virtual bool supports_osr () { return false; } 39 virtual bool supports_osr () { return false; }
40 40
41 // Pretend to be C1 41 // Pretend to be C1
42 bool is_c1 () { return true; } 42 bool is_c1 () { return true; }
43 bool is_c2 () { return false; } 43 bool is_c2 () { return false; }
44 44
45 // Initialization 45 // Initialization
46 virtual void initialize(); 46 virtual void initialize();
47 47
48 // Compilation entry point for methods 48 // Compilation entry point for methods
49 virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci); 49 virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci);
50 50
51 // Print compilation timers and statistics 51 // Print compilation timers and statistics
52 virtual void print_timers(); 52 virtual void print_timers();
53 53
54 static oop get_RiMethod(ciMethod *ciMethod); 54 static oop get_RiType(oop klass, klassOop accessingType, TRAPS);
55 static oop get_RiField(ciField *ciField); 55 static oop get_RiType(ciType *klass, klassOop accessor, TRAPS);
56 static oop get_RiType(ciType *klass); 56 static oop get_RiField(ciField *ciField, TRAPS);
57 static oop get_RiType(klassOop klass); 57
58 static oop get_RiMethod(methodOop method); 58 /*
59 static oop get_RiType(symbolOop klass, klassOop accessingType); 59 static oop get_RiMethod(ciMethod *ciMethod, TRAPS);
60 static oop get_unresolved_RiType(symbolOop klass, klassOop accessingType); 60 static oop get_RiType(klassOop klass, TRAPS);
61 static oop get_RiConstantPool(constantPoolOop cpOop); 61 static oop get_RiMethod(methodOop method, TRAPS);
62 static oop get_unresolved_RiType(oop klass, klassOop accessingType, TRAPS);
63 static oop get_RiConstantPool(constantPoolOop cpOop, TRAPS);
64 */
65 };
66
67 class C1XObjects : public AllStatic {
68
69 public:
70 static oop getReflectedMethod(methodOop method, TRAPS);
71 static oop getReflectedClass(klassOop klass);
72 static oop getReflectedSymbol(symbolOop symbol, TRAPS);
73
74 static methodOop getInternalMethod(oop method);
75 static klassOop getInternalClass(oop klass);
76 static symbolOop getInternalSymbol(oop string);
77
78 static methodOop getInternalMethod(jobject method) {
79 return getInternalMethod(JNIHandles::resolve(method));
80 }
81 static klassOop getInternalClass(jobject klass) {
82 return getInternalClass(JNIHandles::resolve(klass));
83 }
84 static symbolOop getInternalSymbol(jobject string) {
85 return getInternalSymbol(JNIHandles::resolve(string));
86 }
62 }; 87 };
63 88
64 // Tracing macros 89 // Tracing macros
65 90
66 #define IF_TRACE_C1X_1 if (TraceC1X >= 1) 91 #define IF_TRACE_C1X_1 if (TraceC1X >= 1)