< prev index next >

src/hotspot/share/compiler/compilerDirectives.cpp

Print this page
rev 47445 : 8171853: Remove Shark compiler


 154 }
 155 
 156 void CompilerDirectives::dec_refcount() {
 157   assert(DirectivesStack_lock->owned_by_self(), "");
 158   _ref_count--;
 159 }
 160 
 161 int CompilerDirectives::refcount() {
 162   assert(DirectivesStack_lock->owned_by_self(), "");
 163   return _ref_count;
 164 }
 165 
 166 DirectiveSet* CompilerDirectives::get_for(AbstractCompiler *comp) {
 167   assert(DirectivesStack_lock->owned_by_self(), "");
 168   if (comp == NULL) { // Xint
 169     return _c1_store;
 170   } else  if (comp->is_c2()) {
 171     return _c2_store;
 172   } else {
 173     // use c1_store as default
 174     assert(comp->is_c1() || comp->is_jvmci() || comp->is_shark(), "");
 175     return _c1_store;
 176   }
 177 }
 178 
 179 // In the list of disabled intrinsics, the ID of the disabled intrinsics can separated:
 180 // - by ',' (if -XX:DisableIntrinsic is used once when invoking the VM) or
 181 // - by '\n' (if -XX:DisableIntrinsic is used multiple times when invoking the VM) or
 182 // - by ' ' (if DisableIntrinsic is used on a per-method level, e.g., with CompileCommand).
 183 //
 184 // To simplify the processing of the list, the canonicalize_disableintrinsic() method
 185 // returns a new copy of the list in which '\n' and ' ' is replaced with ','.
 186 ccstrlist DirectiveSet::canonicalize_disableintrinsic(ccstrlist option_value) {
 187   char* canonicalized_list = NEW_C_HEAP_ARRAY(char, strlen(option_value) + 1, mtCompiler);
 188   int i = 0;
 189   char current;
 190   while ((current = option_value[i]) != '\0') {
 191     if (current == '\n' || current == ' ') {
 192       canonicalized_list[i] = ',';
 193     } else {
 194       canonicalized_list[i] = current;




 154 }
 155 
 156 void CompilerDirectives::dec_refcount() {
 157   assert(DirectivesStack_lock->owned_by_self(), "");
 158   _ref_count--;
 159 }
 160 
 161 int CompilerDirectives::refcount() {
 162   assert(DirectivesStack_lock->owned_by_self(), "");
 163   return _ref_count;
 164 }
 165 
 166 DirectiveSet* CompilerDirectives::get_for(AbstractCompiler *comp) {
 167   assert(DirectivesStack_lock->owned_by_self(), "");
 168   if (comp == NULL) { // Xint
 169     return _c1_store;
 170   } else  if (comp->is_c2()) {
 171     return _c2_store;
 172   } else {
 173     // use c1_store as default
 174     assert(comp->is_c1() || comp->is_jvmci(), "");
 175     return _c1_store;
 176   }
 177 }
 178 
 179 // In the list of disabled intrinsics, the ID of the disabled intrinsics can separated:
 180 // - by ',' (if -XX:DisableIntrinsic is used once when invoking the VM) or
 181 // - by '\n' (if -XX:DisableIntrinsic is used multiple times when invoking the VM) or
 182 // - by ' ' (if DisableIntrinsic is used on a per-method level, e.g., with CompileCommand).
 183 //
 184 // To simplify the processing of the list, the canonicalize_disableintrinsic() method
 185 // returns a new copy of the list in which '\n' and ' ' is replaced with ','.
 186 ccstrlist DirectiveSet::canonicalize_disableintrinsic(ccstrlist option_value) {
 187   char* canonicalized_list = NEW_C_HEAP_ARRAY(char, strlen(option_value) + 1, mtCompiler);
 188   int i = 0;
 189   char current;
 190   while ((current = option_value[i]) != '\0') {
 191     if (current == '\n' || current == ' ') {
 192       canonicalized_list[i] = ',';
 193     } else {
 194       canonicalized_list[i] = current;


< prev index next >