comparison src/share/vm/runtime/handles.hpp @ 12355:cefad50507d8

Merge with hs25-b53
author Gilles Duboscq <duboscq@ssw.jku.at>
date Fri, 11 Oct 2013 10:38:03 +0200
parents 4f9a42c33738
children 63a4eb8bcd23 833b0f92429a
comparison
equal deleted inserted replaced
12058:ccb4f2af2319 12355:cefad50507d8
134 // from being reclaimed by RedefineClasses. 134 // from being reclaimed by RedefineClasses.
135 135
136 // Specific Handles for different oop types 136 // Specific Handles for different oop types
137 #define DEF_METADATA_HANDLE(name, type) \ 137 #define DEF_METADATA_HANDLE(name, type) \
138 class name##Handle; \ 138 class name##Handle; \
139 class name##Handle { \ 139 class name##Handle : public StackObj { \
140 type* _value; \ 140 type* _value; \
141 Thread* _thread; \ 141 Thread* _thread; \
142 protected: \ 142 protected: \
143 type* obj() const { return _value; } \ 143 type* obj() const { return _value; } \
144 type* non_null_obj() const { assert(_value != NULL, "resolving NULL _value"); return _value; } \ 144 type* non_null_obj() const { assert(_value != NULL, "resolving NULL _value"); return _value; } \
173 DEF_METADATA_HANDLE(constantPool, ConstantPool) 173 DEF_METADATA_HANDLE(constantPool, ConstantPool)
174 174
175 // Writing this class explicitly, since DEF_METADATA_HANDLE(klass) doesn't 175 // Writing this class explicitly, since DEF_METADATA_HANDLE(klass) doesn't
176 // provide the necessary Klass* <-> Klass* conversions. This Klass 176 // provide the necessary Klass* <-> Klass* conversions. This Klass
177 // could be removed when we don't have the Klass* typedef anymore. 177 // could be removed when we don't have the Klass* typedef anymore.
178 class KlassHandle { 178 class KlassHandle : public StackObj {
179 Klass* _value; 179 Klass* _value;
180 protected: 180 protected:
181 Klass* obj() const { return _value; } 181 Klass* obj() const { return _value; }
182 Klass* non_null_obj() const { assert(_value != NULL, "resolving NULL _value"); return _value; } 182 Klass* non_null_obj() const { assert(_value != NULL, "resolving NULL _value"); return _value; }
183 183
307 // called in the constructor of HandleMarkCleaner 307 // called in the constructor of HandleMarkCleaner
308 void push(); 308 void push();
309 // called in the destructor of HandleMarkCleaner 309 // called in the destructor of HandleMarkCleaner
310 void pop_and_restore(); 310 void pop_and_restore();
311 // overloaded operators 311 // overloaded operators
312 void* operator new(size_t size); 312 void* operator new(size_t size) throw();
313 void* operator new [](size_t size); 313 void* operator new [](size_t size) throw();
314 void operator delete(void* p); 314 void operator delete(void* p);
315 void operator delete[](void* p); 315 void operator delete[](void* p);
316 }; 316 };
317 317
318 //------------------------------------------------------------------------------------------------------------------------ 318 //------------------------------------------------------------------------------------------------------------------------