equal
deleted
inserted
replaced
70 oop non_null_obj() const { assert(_handle != NULL, "resolving NULL handle"); return *_handle; } |
70 oop non_null_obj() const { assert(_handle != NULL, "resolving NULL handle"); return *_handle; } |
71 |
71 |
72 public: |
72 public: |
73 // Constructors |
73 // Constructors |
74 Handle() { _handle = NULL; } |
74 Handle() { _handle = NULL; } |
75 Handle(Thread* thread, oop obj); |
75 inline Handle(Thread* thread, oop obj); |
76 |
76 |
77 // General access |
77 // General access |
78 oop operator () () const { return obj(); } |
78 oop operator () () const { return obj(); } |
79 oop operator -> () const { return non_null_obj(); } |
79 oop operator -> () const { return non_null_obj(); } |
80 bool operator == (oop o) const { return obj() == o; } |
80 bool operator == (oop o) const { return obj() == o; } |
106 type##Oop non_null_obj() const { return (type##Oop)Handle::non_null_obj(); } \ |
106 type##Oop non_null_obj() const { return (type##Oop)Handle::non_null_obj(); } \ |
107 \ |
107 \ |
108 public: \ |
108 public: \ |
109 /* Constructors */ \ |
109 /* Constructors */ \ |
110 type##Handle () : Handle() {} \ |
110 type##Handle () : Handle() {} \ |
111 type##Handle (Thread* thread, type##Oop obj) : Handle(thread, (oop)obj) { \ |
111 inline type##Handle (Thread* thread, type##Oop obj); \ |
112 assert(is_null() || ((oop)obj)->is_a(), "illegal type"); \ |
|
113 } \ |
|
114 \ |
112 \ |
115 /* Operators for ease of use */ \ |
113 /* Operators for ease of use */ \ |
116 type##Oop operator () () const { return obj(); } \ |
114 type##Oop operator () () const { return obj(); } \ |
117 type##Oop operator -> () const { return non_null_obj(); } \ |
115 type##Oop operator -> () const { return non_null_obj(); } \ |
118 }; |
116 }; |