Mercurial > hg > truffle
comparison src/share/vm/graal/graalVMToCompiler.cpp @ 5062:5e9f38419819
Adjust C++ part according to the renaming.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 08 Mar 2012 19:24:41 +0100 |
parents | bf63d72879aa |
children | 227aa994f058 |
comparison
equal
deleted
inserted
replaced
5061:e808627bd16f | 5062:5e9f38419819 |
---|---|
29 jobject VMToCompiler::_vmExitsPermObject = NULL; | 29 jobject VMToCompiler::_vmExitsPermObject = NULL; |
30 jobject VMToCompiler::_vmExitsPermKlass = NULL; | 30 jobject VMToCompiler::_vmExitsPermKlass = NULL; |
31 | 31 |
32 KlassHandle VMToCompiler::vmExitsKlass() { | 32 KlassHandle VMToCompiler::vmExitsKlass() { |
33 if (JNIHandles::resolve(_vmExitsPermKlass) == NULL) { | 33 if (JNIHandles::resolve(_vmExitsPermKlass) == NULL) { |
34 klassOop result = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_max_graal_hotspot_bridge_VMToCompiler(), SystemDictionary::java_system_loader(), NULL, Thread::current()); | 34 klassOop result = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_graal_hotspot_bridge_VMToCompiler(), SystemDictionary::java_system_loader(), NULL, Thread::current()); |
35 check_not_null(result, "Couldn't find class com.oracle.max.graal.hotspot.bridge.VMToCompiler"); | 35 check_not_null(result, "Couldn't find class com.oracle.max.graal.hotspot.bridge.VMToCompiler"); |
36 _vmExitsPermKlass = JNIHandles::make_global(result); | 36 _vmExitsPermKlass = JNIHandles::make_global(result); |
37 } | 37 } |
38 return KlassHandle((klassOop)JNIHandles::resolve_non_null(_vmExitsPermKlass)); | 38 return KlassHandle((klassOop)JNIHandles::resolve_non_null(_vmExitsPermKlass)); |
39 } | 39 } |
40 | 40 |
41 Handle VMToCompiler::compilerInstance() { | 41 Handle VMToCompiler::compilerInstance() { |
42 if (JNIHandles::resolve(_compilerPermObject) == NULL) { | 42 if (JNIHandles::resolve(_compilerPermObject) == NULL) { |
43 KlassHandle compilerImplKlass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_max_graal_hotspot_CompilerImpl(), SystemDictionary::java_system_loader(), NULL, Thread::current()); | 43 KlassHandle compilerImplKlass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_graal_hotspot_CompilerImpl(), SystemDictionary::java_system_loader(), NULL, Thread::current()); |
44 check_not_null(compilerImplKlass(), "Couldn't find class com.sun.hotspot.graal.CompilerImpl"); | 44 check_not_null(compilerImplKlass(), "Couldn't find class com.sun.hotspot.graal.CompilerImpl"); |
45 | 45 |
46 JavaValue result(T_OBJECT); | 46 JavaValue result(T_OBJECT); |
47 JavaCalls::call_static(&result, compilerImplKlass, vmSymbols::getInstance_name(), vmSymbols::getInstance_signature(), Thread::current()); | 47 JavaCalls::call_static(&result, compilerImplKlass, vmSymbols::getInstance_name(), vmSymbols::getInstance_signature(), Thread::current()); |
48 check_pending_exception("Couldn't get Compiler"); | 48 check_pending_exception("Couldn't get Compiler"); |
51 return Handle(JNIHandles::resolve_non_null(_compilerPermObject)); | 51 return Handle(JNIHandles::resolve_non_null(_compilerPermObject)); |
52 } | 52 } |
53 | 53 |
54 Handle VMToCompiler::instance() { | 54 Handle VMToCompiler::instance() { |
55 if (JNIHandles::resolve(_vmExitsPermObject) == NULL) { | 55 if (JNIHandles::resolve(_vmExitsPermObject) == NULL) { |
56 KlassHandle compilerKlass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_max_graal_hotspot_Compiler(), SystemDictionary::java_system_loader(), NULL, Thread::current()); | 56 KlassHandle compilerKlass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_graal_hotspot_Compiler(), SystemDictionary::java_system_loader(), NULL, Thread::current()); |
57 check_not_null(compilerKlass(), "Couldn't find class com.sun.hotspot.graal.Compiler"); | 57 check_not_null(compilerKlass(), "Couldn't find class com.sun.hotspot.graal.Compiler"); |
58 | 58 |
59 JavaValue result(T_OBJECT); | 59 JavaValue result(T_OBJECT); |
60 JavaCallArguments args; | 60 JavaCallArguments args; |
61 args.set_receiver(compilerInstance()); | 61 args.set_receiver(compilerInstance()); |
65 } | 65 } |
66 return Handle(JNIHandles::resolve_non_null(_vmExitsPermObject)); | 66 return Handle(JNIHandles::resolve_non_null(_vmExitsPermObject)); |
67 } | 67 } |
68 | 68 |
69 void VMToCompiler::initializeCompiler() { | 69 void VMToCompiler::initializeCompiler() { |
70 KlassHandle compilerImplKlass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_max_graal_hotspot_CompilerImpl(), SystemDictionary::java_system_loader(), NULL, Thread::current()); | 70 KlassHandle compilerImplKlass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_graal_hotspot_CompilerImpl(), SystemDictionary::java_system_loader(), NULL, Thread::current()); |
71 check_not_null(compilerImplKlass(), "Couldn't find class com.sun.hotspot.graal.CompilerImpl"); | 71 check_not_null(compilerImplKlass(), "Couldn't find class com.sun.hotspot.graal.CompilerImpl"); |
72 | 72 |
73 JavaValue result(T_VOID); | 73 JavaValue result(T_VOID); |
74 JavaCalls::call_static(&result, compilerImplKlass, vmSymbols::initialize_name(), vmSymbols::void_method_signature(), Thread::current()); | 74 JavaCalls::call_static(&result, compilerImplKlass, vmSymbols::initialize_name(), vmSymbols::void_method_signature(), Thread::current()); |
75 check_pending_exception("Couldn't initialize compiler"); | 75 check_pending_exception("Couldn't initialize compiler"); |
76 } | 76 } |
77 | 77 |
78 jboolean VMToCompiler::setOption(Handle option) { | 78 jboolean VMToCompiler::setOption(Handle option) { |
79 assert(!option.is_null(), ""); | 79 assert(!option.is_null(), ""); |
80 KlassHandle compilerKlass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_max_graal_hotspot_HotSpotOptions(), SystemDictionary::java_system_loader(), NULL, Thread::current()); | 80 KlassHandle compilerKlass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_graal_hotspot_HotSpotOptions(), SystemDictionary::java_system_loader(), NULL, Thread::current()); |
81 check_not_null(compilerKlass(), "Couldn't find class com.sun.hotspot.graal.HotSpotOptions"); | 81 check_not_null(compilerKlass(), "Couldn't find class com.sun.hotspot.graal.HotSpotOptions"); |
82 | 82 |
83 Thread* THREAD = Thread::current(); | 83 Thread* THREAD = Thread::current(); |
84 JavaValue result(T_BOOLEAN); | 84 JavaValue result(T_BOOLEAN); |
85 JavaCalls::call_static(&result, compilerKlass, vmSymbols::setOption_name(), vmSymbols::setOption_signature(), option, THREAD); | 85 JavaCalls::call_static(&result, compilerKlass, vmSymbols::setOption_name(), vmSymbols::setOption_signature(), option, THREAD); |
86 check_pending_exception("Error while calling setOption"); | 86 check_pending_exception("Error while calling setOption"); |
87 return result.get_jboolean(); | 87 return result.get_jboolean(); |
88 } | 88 } |
89 | 89 |
90 void VMToCompiler::setDefaultOptions() { | 90 void VMToCompiler::setDefaultOptions() { |
91 KlassHandle compilerKlass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_max_graal_hotspot_HotSpotOptions(), SystemDictionary::java_system_loader(), NULL, Thread::current()); | 91 KlassHandle compilerKlass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_graal_hotspot_HotSpotOptions(), SystemDictionary::java_system_loader(), NULL, Thread::current()); |
92 check_not_null(compilerKlass(), "Couldn't find class com.sun.hotspot.graal.HotSpotOptions"); | 92 check_not_null(compilerKlass(), "Couldn't find class com.sun.hotspot.graal.HotSpotOptions"); |
93 | 93 |
94 Thread* THREAD = Thread::current(); | 94 Thread* THREAD = Thread::current(); |
95 JavaValue result(T_VOID); | 95 JavaValue result(T_VOID); |
96 JavaCalls::call_static(&result, compilerKlass, vmSymbols::setDefaultOptions_name(), vmSymbols::void_method_signature(), THREAD); | 96 JavaCalls::call_static(&result, compilerKlass, vmSymbols::setDefaultOptions_name(), vmSymbols::void_method_signature(), THREAD); |