示例#1
0
static Code
multifileSupervisor(Definition def)
{ if ( true(def, (P_DYNAMIC|P_MULTIFILE)) )
  { if ( true(def, P_DYNAMIC) )
      return SUPERVISOR(dynamic);
    else
      return SUPERVISOR(multifile);
  }

  return NULL;
}
示例#2
0
static Code
undefSupervisor(Definition def)
{ if ( def->impl.clauses.number_of_clauses == 0 && false(def, PROC_DEFINED) )
    return SUPERVISOR(undef);

  return NULL;
}
示例#3
0
void
freeCodesDefinition(Definition def, int do_linger)
{ Code codes;

  if ( (codes=def->codes) != SUPERVISOR(virgin) )
  { if ( (codes = def->codes) )
    { if ( unlikely(codes[0] == encode(S_CALLWRAPPER)) )
      { resetWrappedSupervisor(def);
      } else
      { def->codes = SUPERVISOR(virgin);
	freeSupervisor(def, codes, do_linger);
      }
    } else
      def->codes = SUPERVISOR(virgin);
  }
}
示例#4
0
void
freeCodesDefinition(Definition def)
{ Code codes;

  if ( (codes=def->codes) != SUPERVISOR(virgin) )
  { if ( (codes = def->codes) )
    { size_t size = (size_t)codes[-1];

      def->codes = SUPERVISOR(virgin);
      if ( size > 0 )		/* 0: built-in, see initSupervisors() */
      { GET_LD
	freeHeap(&codes[-1], (size+1)*sizeof(code));
      }
    } else
      def->codes = SUPERVISOR(virgin);
  }
}
示例#5
0
int
createUndefSupervisor(Definition def)
{ if ( def->number_of_clauses == 0 && false(def, PROC_DEFINED) )
  { def->codes = SUPERVISOR(undef);

    succeed;
  }

  fail;
}
示例#6
0
static Code
staticSupervisor(Definition def)
{ (void)def;

  return SUPERVISOR(staticp);
}