hotspot/src/share/vm/interpreter/oopMapCache.cpp

Print this page




 264 #endif
 265     if (is_oop(i)) tty->print("%d ", i);
 266   }
 267   tty->print_cr("}");
 268 }
 269 
 270 class MaskFillerForNative: public NativeSignatureIterator {
 271  private:
 272   uintptr_t * _mask;                             // the bit mask to be filled
 273   int         _size;                             // the mask size in bits
 274 
 275   void set_one(int i) {
 276     i *= InterpreterOopMap::bits_per_entry;
 277     assert(0 <= i && i < _size, "offset out of bounds");
 278     _mask[i / BitsPerWord] |= (((uintptr_t) 1 << InterpreterOopMap::oop_bit_number) << (i % BitsPerWord));
 279   }
 280 
 281  public:
 282   void pass_int()                                { /* ignore */ }
 283   void pass_long()                               { /* ignore */ }
 284 #ifdef _LP64
 285   void pass_float()                              { /* ignore */ }
 286 #endif
 287   void pass_double()                             { /* ignore */ }
 288   void pass_object()                             { set_one(offset()); }
 289 
 290   MaskFillerForNative(methodHandle method, uintptr_t* mask, int size) : NativeSignatureIterator(method) {
 291     _mask   = mask;
 292     _size   = size;
 293     // initialize with 0
 294     int i = (size + BitsPerWord - 1) / BitsPerWord;
 295     while (i-- > 0) _mask[i] = 0;
 296   }
 297 
 298   void generate() {
 299     NativeSignatureIterator::iterate();
 300   }
 301 };
 302 
 303 bool OopMapCacheEntry::verify_mask(CellTypeState* vars, CellTypeState* stack, int max_locals, int stack_top) {
 304   // Check mask includes map




 264 #endif
 265     if (is_oop(i)) tty->print("%d ", i);
 266   }
 267   tty->print_cr("}");
 268 }
 269 
 270 class MaskFillerForNative: public NativeSignatureIterator {
 271  private:
 272   uintptr_t * _mask;                             // the bit mask to be filled
 273   int         _size;                             // the mask size in bits
 274 
 275   void set_one(int i) {
 276     i *= InterpreterOopMap::bits_per_entry;
 277     assert(0 <= i && i < _size, "offset out of bounds");
 278     _mask[i / BitsPerWord] |= (((uintptr_t) 1 << InterpreterOopMap::oop_bit_number) << (i % BitsPerWord));
 279   }
 280 
 281  public:
 282   void pass_int()                                { /* ignore */ }
 283   void pass_long()                               { /* ignore */ }
 284 #if defined(_LP64) || defined(ZERO)
 285   void pass_float()                              { /* ignore */ }
 286 #endif
 287   void pass_double()                             { /* ignore */ }
 288   void pass_object()                             { set_one(offset()); }
 289 
 290   MaskFillerForNative(methodHandle method, uintptr_t* mask, int size) : NativeSignatureIterator(method) {
 291     _mask   = mask;
 292     _size   = size;
 293     // initialize with 0
 294     int i = (size + BitsPerWord - 1) / BitsPerWord;
 295     while (i-- > 0) _mask[i] = 0;
 296   }
 297 
 298   void generate() {
 299     NativeSignatureIterator::iterate();
 300   }
 301 };
 302 
 303 bool OopMapCacheEntry::verify_mask(CellTypeState* vars, CellTypeState* stack, int max_locals, int stack_top) {
 304   // Check mask includes map