Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1x/c1x_Compiler.cpp @ 1437:9e5e83ca2259
Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Mon, 25 Oct 2010 16:47:52 +0200 |
parents | 72cfb36c6bb2 |
children | 1b7acf75f900 |
comparison
equal
deleted
inserted
replaced
1436:9dae1aae168a | 1437:9e5e83ca2259 |
---|---|
34 } | 34 } |
35 | 35 |
36 // Initialization | 36 // Initialization |
37 void C1XCompiler::initialize() { | 37 void C1XCompiler::initialize() { |
38 if (_initialized) return; | 38 if (_initialized) return; |
39 Thread* THREAD = Thread::current(); | |
39 _initialized = true; | 40 _initialized = true; |
40 TRACE_C1X_1("C1XCompiler::initialize"); | 41 TRACE_C1X_1("C1XCompiler::initialize"); |
41 | 42 |
42 JNIEnv *env = ((JavaThread *) Thread::current())->jni_environment(); | 43 JNIEnv *env = ((JavaThread *) Thread::current())->jni_environment(); |
43 jclass klass = env->FindClass("com/sun/hotspot/c1x/VMEntriesNative"); | 44 jclass klass = env->FindClass("com/sun/hotspot/c1x/VMEntriesNative"); |
45 env->RegisterNatives(klass, VMEntries_methods, VMEntries_methods_count()); | 46 env->RegisterNatives(klass, VMEntries_methods, VMEntries_methods_count()); |
46 | 47 |
47 check_pending_exception("Could not register natives"); | 48 check_pending_exception("Could not register natives"); |
48 | 49 |
49 c1x_compute_offsets(); | 50 c1x_compute_offsets(); |
51 | |
52 { | |
53 VM_ENTRY_MARK; | |
54 HandleMark hm; | |
55 for (int i = 0; i < Arguments::num_c1x_args(); ++i) { | |
56 const char* arg = Arguments::c1x_args_array()[i]; | |
57 Handle option = java_lang_String::create_from_str(arg, THREAD); | |
58 VMExits::setOption(option); | |
59 } | |
60 } | |
50 } | 61 } |
51 | 62 |
52 // Compilation entry point for methods | 63 // Compilation entry point for methods |
53 void C1XCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) { | 64 void C1XCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) { |
54 initialize(); | 65 initialize(); |