Mercurial > hg > graal-jvmci-8
diff src/share/vm/graal/graalCodeInstaller.cpp @ 3011:f00918f35c7f
inlining and runtime interface related changes:
added codeSize() and compilerStorage() to RiMethod
HotSpotMethodResolved uses reflective methods instead of vmIds and survives compilations
HotSpotResolvedType.isInitialized not represented as field (can change)
inlining stores graphs into method objects and reuses them
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 16 Jun 2011 20:36:17 +0200 |
parents | 0c0e407faa39 |
children | 5857923e563c |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp Thu Jun 16 12:09:54 2011 +0200 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Thu Jun 16 20:36:17 2011 +0200 @@ -25,6 +25,7 @@ #include "graal/graalCompiler.hpp" #include "graal/graalCodeInstaller.hpp" #include "graal/graalJavaAccess.hpp" +#include "graal/graalVMEntries.hpp" #include "graal/graalVmIds.hpp" #include "c1/c1_Runtime1.hpp" #include "classfile/vmSymbols.hpp" @@ -200,7 +201,7 @@ assert(_hotspot_method != NULL && _name == NULL, "installMethod needs NON-NULL method and NULL name"); assert(_hotspot_method->is_a(HotSpotMethodResolved::klass()), "installMethod needs a HotSpotMethodResolved"); - methodOop method = VmIds::get<methodOop>(HotSpotMethodResolved::vmId(_hotspot_method)); + methodOop method = getMethodFromHotSpotMethod(_hotspot_method); ciMethodObject = (ciMethod *) _env->get_object(method); _parameter_count = method->size_of_parameters(); } @@ -346,10 +347,8 @@ void CodeInstaller::assumption_ConcreteMethod(oop assumption) { oop context_oop = CiAssumptions_ConcreteMethod::context(assumption); oop method_oop = CiAssumptions_ConcreteMethod::method(assumption); - jlong context_oop_id = HotSpotMethodResolved::vmId(context_oop); - jlong method_oop_id = HotSpotMethodResolved::vmId(method_oop); - methodOop method = VmIds::get<methodOop>(method_oop_id); - methodOop context = VmIds::get<methodOop>(context_oop_id); + methodOop method = getMethodFromHotSpotMethod(method_oop); + methodOop context = getMethodFromHotSpotMethod(context_oop); ciMethod* m = (ciMethod*) CURRENT_ENV->get_object(method); ciMethod* c = (ciMethod*) CURRENT_ENV->get_object(context); @@ -433,8 +432,7 @@ } oop hotspot_method = CiCodePos::method(code_pos); - assert(hotspot_method != NULL && hotspot_method->is_a(HotSpotMethodResolved::klass()), "unexpected hotspot method"); - methodOop method = VmIds::get<methodOop>(HotSpotMethodResolved::vmId(hotspot_method)); + methodOop method = getMethodFromHotSpotMethod(hotspot_method); ciMethod *cimethod = (ciMethod *) _env->get_object(method); jint bci = CiCodePos::bci(code_pos); bool reexecute; @@ -594,7 +592,10 @@ assert(debug_info != NULL, "debug info expected"); methodOop method = NULL; - if (hotspot_method->is_a(HotSpotMethodResolved::klass())) method = VmIds::get<methodOop>(HotSpotMethodResolved::vmId(hotspot_method)); + // we need to check, this might also be an unresolved method + if (hotspot_method->is_a(HotSpotMethodResolved::klass())) { + method = getMethodFromHotSpotMethod(hotspot_method); + } assert(debug_info != NULL, "debug info expected");