예제 #1
0
void InterpretedIC::set(Bytecodes::Code send_code, oop first_word, oop second_word) {
  // Remember pics are allocated in new space and
  // require a store check when saved in the InlineCache
  // Note: If the second_word is a PIC, it has to be deallocated
  //       before using set!
  *send_code_addr() = send_code;
  Universe::store(first_word_addr(), first_word, first_word->is_new());
  Universe::store(second_word_addr(), second_word, second_word->is_new());
}
예제 #2
0
oop objVectorMap::cloneSize(oop obj, fint len, bool mustAllocate, oop filler) {
  assert_objVector(obj, "not an obj vector");
  fint l = objVectorOop(obj)->length();
  objVectorOop v;
  if (l < len) {
    // growing array
    v= objVectorOop(obj)->grow(len - l, mustAllocate);
    if (oop(v) != failedAllocationOop) {
      set_oops(v->objs(l), len - l, filler);
      if (v->is_old()) {
        if (filler->is_new()) {
          // do all of object
          Memory->remembered_set->record_multistores(v->oops(), v->objs(len));
        } else {
          // just do beginning of object; filler isn't new
          Memory->remembered_set->record_multistores(v->oops(), v->objs(l));
        }
      }
    }
  } else if (l > len) {
    // shrinking array
    v= objVectorOop(obj)->shrink(l - len, mustAllocate);
  } else {
    // copying array
    v= objVectorOop(obj)->copy(mustAllocate);
  }
  if (oop(v) != failedAllocationOop) v->init_mark();
  return v;
}
예제 #3
0
inline bool WeakArrayRegister::scavenge_is_near_death(oop obj) {
  // must be memOop and unmarked (no forward pointer)
  return obj->is_new() && !memOop(obj)->is_forwarded();
}