本文整理汇总了C++中oop::is_new方法的典型用法代码示例。如果您正苦于以下问题:C++ oop::is_new方法的具体用法?C++ oop::is_new怎么用?C++ oop::is_new使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oop
的用法示例。
在下文中一共展示了oop::is_new方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: set
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: cloneSize
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: scavenge_is_near_death
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();
}