Mercurial > hg > truffle
comparison src/share/vm/compiler/compileBroker.cpp @ 1970:b675ff1ca7a3
7002129: Zero and Shark fixes, 3rd
Summary: 6970683 and 6953144 introduced changes that need to be implemented for Zero and Shark.
Reviewed-by: twisti
Contributed-by: Gary Benson <gbenson@redhat.com>
author | twisti |
---|---|
date | Tue, 23 Nov 2010 04:33:42 -0800 |
parents | 22ef3370343b |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1966:4110c3e0c50d | 1970:b675ff1ca7a3 |
---|---|
520 // | 520 // |
521 // Initialize the Compilation object | 521 // Initialize the Compilation object |
522 void CompileBroker::compilation_init() { | 522 void CompileBroker::compilation_init() { |
523 _last_method_compiled[0] = '\0'; | 523 _last_method_compiled[0] = '\0'; |
524 | 524 |
525 #ifndef SHARK | |
525 // Set the interface to the current compiler(s). | 526 // Set the interface to the current compiler(s). |
526 int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple); | 527 int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple); |
527 int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization); | 528 int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization); |
528 #ifdef COMPILER1 | 529 #ifdef COMPILER1 |
529 if (c1_count > 0) { | 530 if (c1_count > 0) { |
535 if (c2_count > 0) { | 536 if (c2_count > 0) { |
536 _compilers[1] = new C2Compiler(); | 537 _compilers[1] = new C2Compiler(); |
537 } | 538 } |
538 #endif // COMPILER2 | 539 #endif // COMPILER2 |
539 | 540 |
540 #ifdef SHARK | 541 #else // SHARK |
541 #if defined(COMPILER1) || defined(COMPILER2) | 542 int c1_count = 0; |
542 #error "Can't use COMPILER1 or COMPILER2 with shark" | 543 int c2_count = 1; |
543 #endif | 544 |
544 _compilers[0] = new SharkCompiler(); | 545 _compilers[1] = new SharkCompiler(); |
545 _compilers[1] = _compilers[0]; | 546 #endif // SHARK |
546 #endif | |
547 | 547 |
548 // Initialize the CompileTask free list | 548 // Initialize the CompileTask free list |
549 _task_free_list = NULL; | 549 _task_free_list = NULL; |
550 | 550 |
551 // Start the CompilerThreads | 551 // Start the CompilerThreads |