Mercurial > hg > truffle
diff src/share/vm/c1x/c1x_Compiler.cpp @ 1412:9195b99c841b
Added first VM entry method.
TODO: Check why initialization method of compiler is not called. Register native methods only once.
author | Thomas Wuerthinger <thomas.wuerthinger@gmail.com> |
---|---|
date | Mon, 17 May 2010 16:37:23 +0200 |
parents | b30a2cd5e3a2 |
children | 1ecc8f0aad00 |
line wrap: on
line diff
--- a/src/share/vm/c1x/c1x_Compiler.cpp Wed May 12 16:30:40 2010 +0200 +++ b/src/share/vm/c1x/c1x_Compiler.cpp Mon May 17 16:37:23 2010 +0200 @@ -30,11 +30,19 @@ // Initialization void C1XCompiler::initialize() { TRACE_C1X_1("initialize"); + + JNIEnv *env = ((JavaThread *)Thread::current())->jni_environment(); + jclass klass = env->FindClass("com/sun/hotspot/c1x/VMEntries"); + env->RegisterNatives(klass, VMEntries_methods, VMEntries_methods_count() ); } // Compilation entry point for methods void C1XCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) { + + initialize(); + VM_ENTRY_MARK; + ResourceMark rm; HandleMark hm;