< prev index next >
src/share/vm/ci/ciObjectFactory.hpp
Print this page
@@ -25,10 +25,11 @@
#ifndef SHARE_VM_CI_CIOBJECTFACTORY_HPP
#define SHARE_VM_CI_CIOBJECTFACTORY_HPP
#include "ci/ciClassList.hpp"
#include "ci/ciObject.hpp"
+#include "gc/shared/barrierSet.hpp"
#include "utilities/growableArray.hpp"
// ciObjectFactory
//
// This class handles requests for the creation of new instances
@@ -76,10 +77,15 @@
ciMetadata* create_new_metadata(Metadata* o);
void ensure_metadata_alive(ciMetadata* m);
static bool is_equal(NonPermObject* p, oop key) {
+ // Shenandoah: We already force-forwarded the key earlier.
+ // The oop in the object should always point to to-space.
+ assert(key == oopDesc::bs()->read_barrier(key), "should be forwarded");
+ assert(p->object()->get_oop() == oopDesc::bs()->read_barrier(p->object()->get_oop()),
+ "should be forwarded");
return p->object()->get_oop() == key;
}
NonPermObject* &find_non_perm(oop key);
void insert_non_perm(NonPermObject* &where, oop key, ciObject* obj);
< prev index next >