equal
deleted
inserted
replaced
651 private: |
651 private: |
652 enum { |
652 enum { |
653 hc_value_offset = 0 |
653 hc_value_offset = 0 |
654 }; |
654 }; |
655 static int value_offset; |
655 static int value_offset; |
|
656 static int long_value_offset; |
656 |
657 |
657 static oop initialize_and_allocate(BasicType type, TRAPS); |
658 static oop initialize_and_allocate(BasicType type, TRAPS); |
658 public: |
659 public: |
659 // Allocation. Returns a boxed value, or NULL for invalid type. |
660 // Allocation. Returns a boxed value, or NULL for invalid type. |
660 static oop create(BasicType type, jvalue* value, TRAPS); |
661 static oop create(BasicType type, jvalue* value, TRAPS); |
663 static BasicType set_value(oop box, jvalue* value); |
664 static BasicType set_value(oop box, jvalue* value); |
664 static BasicType basic_type(oop box); |
665 static BasicType basic_type(oop box); |
665 static bool is_instance(oop box) { return basic_type(box) != T_ILLEGAL; } |
666 static bool is_instance(oop box) { return basic_type(box) != T_ILLEGAL; } |
666 static bool is_instance(oop box, BasicType type) { return basic_type(box) == type; } |
667 static bool is_instance(oop box, BasicType type) { return basic_type(box) == type; } |
667 |
668 |
668 static int value_offset_in_bytes() { return value_offset; } |
669 static int value_offset_in_bytes(BasicType type) { |
|
670 return ( type == T_LONG || type == T_DOUBLE ) ? long_value_offset : |
|
671 value_offset; |
|
672 } |
669 |
673 |
670 // Debugging |
674 // Debugging |
671 friend class JavaClasses; |
675 friend class JavaClasses; |
672 }; |
676 }; |
673 |
677 |
745 |
749 |
746 class java_lang_ref_SoftReference: public java_lang_ref_Reference { |
750 class java_lang_ref_SoftReference: public java_lang_ref_Reference { |
747 public: |
751 public: |
748 enum { |
752 enum { |
749 // The timestamp is a long field and may need to be adjusted for alignment. |
753 // The timestamp is a long field and may need to be adjusted for alignment. |
750 hc_timestamp_offset = align_object_offset_(hc_discovered_offset + 1) |
754 hc_timestamp_offset = hc_discovered_offset + 1 |
751 }; |
755 }; |
752 enum { |
756 enum { |
753 hc_static_clock_offset = 0 |
757 hc_static_clock_offset = 0 |
754 }; |
758 }; |
755 |
759 |