Пример #1
0
Code
createSupervisor(Definition def)
{ Code codes;
  int has_codes;

  has_codes = ((codes = undefSupervisor(def)) ||
	       (codes = multifileSupervisor(def)) ||
	       (codes = singleClauseSupervisor(def)) ||
	       (codes = listSupervisor(def)) ||
	       (codes = staticSupervisor(def)));
  assert(has_codes);
  codes = chainMetaPredicateSupervisor(def, codes);

  return codes;
}
Пример #2
0
int
createSupervisor(Definition def)
{ Code codes;
  int has_codes;

  PL_LOCK(L_PREDICATE);
  has_codes = ((codes = undefSupervisor(def)) ||
	       (codes = multifileSupervisor(def)) ||
	       (codes = singleClauseSupervisor(def)) ||
	       (codes = listSupervisor(def)) ||
	       (codes = staticSupervisor(def)));
  assert(has_codes);
  def->codes = chainMetaPredicateSupervisor(def, codes);
  PL_UNLOCK(L_PREDICATE);

  succeed;
}
Пример #3
0
int
createSupervisor(Definition def)
{ Code codes;

  if ( createUndefSupervisor(def))
    succeed;

  if ( !((codes = multifileSupervisor(def)) ||
	 (codes = singleClauseSupervisor(def)) ||
	 (codes = listSupervisor(def)) ||
	 (codes = staticSupervisor(def))) )
  { fatalError("Failed to create supervisor for %s\n",
	       predicateName(def));
  }
  def->codes = chainMetaPredicateSupervisor(def, codes);

  succeed;
}