--- old/src/share/vm/compiler/compilerDirectives.cpp 2016-04-15 18:41:23.671610400 -0700 +++ new/src/share/vm/compiler/compilerDirectives.cpp 2016-04-15 18:41:23.244585900 -0700 @@ -410,6 +410,32 @@ 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));