hotspot/src/share/vm/compiler/compileBroker.cpp
Print this page
@@ -520,10 +520,11 @@
//
// Initialize the Compilation object
void CompileBroker::compilation_init() {
_last_method_compiled[0] = '\0';
+#ifndef SHARK
// Set the interface to the current compiler(s).
int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple);
int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization);
#ifdef COMPILER1
if (c1_count > 0) {
@@ -535,17 +536,16 @@
if (c2_count > 0) {
_compilers[1] = new C2Compiler();
}
#endif // COMPILER2
-#ifdef SHARK
-#if defined(COMPILER1) || defined(COMPILER2)
-#error "Can't use COMPILER1 or COMPILER2 with shark"
-#endif
- _compilers[0] = new SharkCompiler();
- _compilers[1] = _compilers[0];
-#endif
+#else // SHARK
+ int c1_count = 0;
+ int c2_count = 1;
+
+ _compilers[1] = new SharkCompiler();
+#endif // SHARK
// Initialize the CompileTask free list
_task_free_list = NULL;
// Start the CompilerThreads