< prev index next >

src/share/vm/compiler/compilerDirectives.cpp

Print this page

        

*** 408,417 **** --- 408,443 ---- } return false; } + bool DirectiveSet::is_intrinsic_disabled(vmIntrinsics::ID id) { + assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); + + ResourceMark rm; + ccstr DisableIntrinsicString = canonicalize_disableintrinsic(DisableIntrinsic); + // Create a copy of the string that contains the list of disabled + // intrinsics. The copy is created because the string + // will be modified by strtok(). Then, the list is tokenized with + // ',' as a separator. + size_t length = strlen(DisableIntrinsicString); + char* local_list = NEW_RESOURCE_ARRAY(char, length + 1); + strncpy(local_list, DisableIntrinsicString, length + 1); + + char* token = strtok(local_list, ","); + while (token != NULL) { + if (strcmp(token, vmIntrinsics::name_at(id)) == 0) { + return true; + } + else { + token = strtok(NULL, ","); + } + } + + return false; + } + DirectiveSet* DirectiveSet::clone(DirectiveSet const* src) { DirectiveSet* set = new DirectiveSet(NULL); memcpy(set->_modified, src->_modified, sizeof(src->_modified)); InlineMatcher* tmp = src->_inlinematchers;
< prev index next >