示例#1
0
int InterpretedPrim_Cache::number_of_parameters() const {
  int result = name()->number_of_arguments()
             + (has_receiver()     ? 1 : 0)
	     - (has_failure_code() ? 1 : 0);
  assert(pdesc() == NULL || pdesc()->number_of_parameters() == result, "checking result");
  return result;
}
int PrimitiveCallNode::number_of_parameters() const {
  int result = name()->number_of_arguments()
    + (has_receiver() ? 1 : 0)
    - (failure_code() ? 1 : 0);
  assert(_pdesc == NULL || pdesc()->number_of_parameters() == result, "checking result");
  return result;
}
示例#3
0
void primitive_desc::print() {
  std->print("%48s %d %s%s%s%s%s%s%s%s%s",
             name(), 
             number_of_parameters(),
	     has_receiver()           ? "R" : "_",
             can_fail()               ? "F" : "_",
	     can_scavenge()           ? "S" : "_",
	     can_walk_stack()         ? "W" : "_",
	     can_perform_NLR()        ? "N" : "_",
	     can_be_constant_folded() ? "C" : "_",
	     can_invoke_delta()       ? "D" : "_",
	     is_internal()            ? "I" : "_",
	     needs_delta_fp_code()    ? "P" : "_");
  switch(group()) {
    case IntComparisonPrimitive:   std->print(", smi compare");           break;
    case IntArithmeticPrimitive:   std->print(", smi arith");             break;
    case FloatComparisonPrimitive: std->print(", double compare");        break;
    case FloatArithmeticPrimitive: std->print(", double arith");          break;
    case ByteArrayPrimitive:       std->print(", byte array op.");        break;
    case DoubleByteArrayPrimitive: std->print(", double-byte array op."); break;
    case ObjArrayPrimitive:        std->print(", array op.");             break;
    case BlockPrimitive: 	   std->print(", block/context");         break;
    case NormalPrimitive:                                                 break;
    default: fatal("Unknown primitive group");
  }
  std->cr();
}