Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalCodeInstaller.cpp @ 3636:c7d4198a9bce
Use GraalEnv for installing code.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 15 Nov 2011 22:06:02 +0100 |
parents | 5e9645341ec3 |
children | 0e8a2a629afb |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp Tue Nov 15 21:15:26 2011 +0100 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Tue Nov 15 22:06:02 2011 +0100 @@ -27,6 +27,7 @@ #include "graal/graalJavaAccess.hpp" #include "graal/graalVMEntries.hpp" #include "graal/graalVmIds.hpp" +#include "graal/graalEnv.hpp" #include "c1/c1_Runtime1.hpp" #include "classfile/vmSymbols.hpp" #include "vmreg_x86.inline.hpp" @@ -232,10 +233,9 @@ // constructor used to create a method CodeInstaller::CodeInstaller(Handle target_method, nmethod*& nm, bool install_code) { _env = CURRENT_ENV; - ciMethod *ciMethodObject = NULL; + methodOop method = NULL; { - methodOop method = getMethodFromHotSpotMethod(HotSpotTargetMethod::method(target_method)); - ciMethodObject = (ciMethod *) _env->get_object(method); + method = getMethodFromHotSpotMethod(HotSpotTargetMethod::method(target_method)); _parameter_count = method->size_of_parameters(); No_Safepoint_Verifier no_safepoint; @@ -255,8 +255,8 @@ int stack_slots = (_frame_size / HeapWordSize) + 2; // conversion to words, need to add two slots for ret address and frame pointer ThreadToNativeFromVM t((JavaThread*) Thread::current()); - nm = _env->register_method(ciMethodObject, -1, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, - &_implicit_exception_table, GraalCompiler::instance(), _env->comp_level(), false, false, install_code); + nm = GraalEnv::register_method(method, -1, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, + &_implicit_exception_table, GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, false, false, install_code); } // constructor used to create a stub