/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "code/oopRecorder.hpp"
#include "memory/allocation.inline.hpp"
#include "oops/oop.inline.hpp"
#ifdef ASSERT
#endif //ASSERT
_complete = false;
}
}
_complete = true;
}
maybe_initialize(); // get non-null handles, even if we have no oops
}
} else {
}
}
}
// there is always a NULL virtually present as first object
}
// Local definition. Used only in this module.
}
// indexing uses 1 as an origin--0 means null
// Support correct operation of find_index().
if (make_findable) {
// This index may be returned from find_index().
// Load the cache with pre-existing elements.
}
}
} else if (is_real_jobject(h)) {
// Remember that this index is not to be returned from find_index().
// This case is rare, because most or all uses of allocate_index pass
// a jobject argument of NULL or Universe::non_oop_word.
// Thus, the expected length of _no_finds is zero.
}
return index;
}
if (h == NULL) return null_index;
if (cindex == 0) {
return -1; // We know this handle is completely new.
}
return cindex;
}
return -1; // We know the current cache occupant is unique to that cloc.
}
}
// Not found in cache, due to a cache collision. (Or, no cache at all.)
// Do a linear search, most recent to oldest.
}
return findex;
}
}
return -1;
}