src/share/vm/classfile/javaClasses.hpp
Print this page
rev 3 : [mq]: anonk.patch
*** 146,155 ****
--- 146,158 ----
static oop create_mirror(KlassHandle k, TRAPS);
static oop create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS);
// Conversion
static klassOop as_klassOop(oop java_class);
// Testing
+ static bool is_instance(oop obj) {
+ return obj != NULL && obj->klass() == SystemDictionary::class_klass();
+ }
static bool is_primitive(oop java_class);
static BasicType primitive_type(oop java_class);
static oop primitive_mirror(BasicType t);
// JVM_NewInstance support
static methodOop resolved_constructor(oop java_class);
*** 648,664 ****
enum {
hc_value_offset = 0
};
static int value_offset;
! static oop initialize_and_allocate(klassOop klass, TRAPS);
public:
// Allocation. Returns a boxed value, or NULL for invalid type.
static oop create(BasicType type, jvalue* value, TRAPS);
// Accessors. Returns the basic type being boxed, or T_ILLEGAL for invalid oop.
static BasicType get_value(oop box, jvalue* value);
static BasicType set_value(oop box, jvalue* value);
static int value_offset_in_bytes() { return value_offset; }
// Debugging
friend class JavaClasses;
--- 651,670 ----
enum {
hc_value_offset = 0
};
static int value_offset;
! static oop initialize_and_allocate(BasicType type, TRAPS);
public:
// Allocation. Returns a boxed value, or NULL for invalid type.
static oop create(BasicType type, jvalue* value, TRAPS);
// Accessors. Returns the basic type being boxed, or T_ILLEGAL for invalid oop.
static BasicType get_value(oop box, jvalue* value);
static BasicType set_value(oop box, jvalue* value);
+ static BasicType basic_type(oop box);
+ static bool is_instance(oop box) { return basic_type(box) != T_ILLEGAL; }
+ static bool is_instance(oop box, BasicType type) { return basic_type(box) == type; }
static int value_offset_in_bytes() { return value_offset; }
// Debugging
friend class JavaClasses;