845 // CompileBroker::init_compiler_threads |
845 // CompileBroker::init_compiler_threads |
846 // |
846 // |
847 // Initialize the compilation queue |
847 // Initialize the compilation queue |
848 void CompileBroker::init_compiler_threads(int c1_compiler_count, int c2_compiler_count) { |
848 void CompileBroker::init_compiler_threads(int c1_compiler_count, int c2_compiler_count) { |
849 EXCEPTION_MARK; |
849 EXCEPTION_MARK; |
850 #ifndef ZERO |
850 #if !defined(ZERO) && !defined(SHARK) |
851 assert(c2_compiler_count > 0 || c1_compiler_count > 0, "No compilers?"); |
851 assert(c2_compiler_count > 0 || c1_compiler_count > 0, "No compilers?"); |
852 #endif // !ZERO |
852 #endif // !ZERO && !SHARK |
853 if (c2_compiler_count > 0) { |
853 if (c2_compiler_count > 0) { |
854 _c2_method_queue = new CompileQueue("C2MethodQueue", MethodCompileQueue_lock); |
854 _c2_method_queue = new CompileQueue("C2MethodQueue", MethodCompileQueue_lock); |
855 } |
855 } |
856 if (c1_compiler_count > 0) { |
856 if (c1_compiler_count > 0) { |
857 _c1_method_queue = new CompileQueue("C1MethodQueue", MethodCompileQueue_lock); |
857 _c1_method_queue = new CompileQueue("C1MethodQueue", MethodCompileQueue_lock); |
1116 if (method->is_not_osr_compilable()) return NULL; |
1116 if (method->is_not_osr_compilable()) return NULL; |
1117 } |
1117 } |
1118 |
1118 |
1119 assert(!HAS_PENDING_EXCEPTION, "No exception should be present"); |
1119 assert(!HAS_PENDING_EXCEPTION, "No exception should be present"); |
1120 // some prerequisites that are compiler specific |
1120 // some prerequisites that are compiler specific |
1121 if (compiler(comp_level)->is_c2()) { |
1121 if (compiler(comp_level)->is_c2() || compiler(comp_level)->is_shark()) { |
1122 method->constants()->resolve_string_constants(CHECK_0); |
1122 method->constants()->resolve_string_constants(CHECK_0); |
1123 // Resolve all classes seen in the signature of the method |
1123 // Resolve all classes seen in the signature of the method |
1124 // we are compiling. |
1124 // we are compiling. |
1125 methodOopDesc::load_signature_classes(method, CHECK_0); |
1125 methodOopDesc::load_signature_classes(method, CHECK_0); |
1126 } |
1126 } |