PRIM_DECL_2(behaviorPrimitives::allocate3, oop receiver, oop tenured) {
  PROLOGUE_2("allocate3", receiver, tenured)
  ASSERT_RECEIVER;
  if (tenured != Universe::trueObj() && tenured != Universe::falseObj())
    return markSymbol(vmSymbols::second_argument_has_wrong_type());
  oop result = receiver->primitive_allocate(false, tenured == Universe::trueObj());
  if (NULL == result)
    return markSymbol(vmSymbols::failed_allocation());
  return result;
}
Example #2
0
PRIM_DECL_1(behaviorPrimitives::allocate, oop receiver) {
  PROLOGUE_1("allocate", receiver)
  ASSERT_RECEIVER;
  return receiver->primitive_allocate();
}