--- a/hotspot/src/share/vm/oops/oop.hpp Tue Feb 10 17:16:17 2015 +0100
+++ b/hotspot/src/share/vm/oops/oop.hpp Fri Feb 13 14:37:35 2015 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -108,7 +108,7 @@
// to be able to figure out the size of an object knowing its klass.
int size_given_klass(Klass* klass);
- // type test operations (inlined in oop.inline.h)
+ // type test operations (inlined in oop.inline.hpp)
bool is_instance() const;
bool is_instanceMirror() const;
bool is_instanceClassLoader() const;
@@ -117,6 +117,15 @@
bool is_objArray() const;
bool is_typeArray() const;
+ // type test operations that don't require inclusion of oop.inline.hpp.
+ bool is_instance_noinline() const;
+ bool is_instanceMirror_noinline() const;
+ bool is_instanceClassLoader_noline() const;
+ bool is_instanceRef_noline() const;
+ bool is_array_noinline() const;
+ bool is_objArray_noinline() const;
+ bool is_typeArray_noinline() const;
+
private:
// field addresses in oop
void* field_base(int offset) const;
@@ -370,10 +379,15 @@
markOop displaced_mark() const;
void set_displaced_mark(markOop m);
+ static bool has_klass_gap();
+
// for code generation
- static int mark_offset_in_bytes() { return offset_of(oopDesc, _mark); }
- static int klass_offset_in_bytes() { return offset_of(oopDesc, _metadata._klass); }
- static int klass_gap_offset_in_bytes();
+ static int mark_offset_in_bytes() { return offset_of(oopDesc, _mark); }
+ static int klass_offset_in_bytes() { return offset_of(oopDesc, _metadata._klass); }
+ static int klass_gap_offset_in_bytes() {
+ assert(has_klass_gap(), "only applicable to compressed klass pointers");
+ return klass_offset_in_bytes() + sizeof(narrowKlass);
+ }
};
#endif // SHARE_VM_OOPS_OOP_HPP