entry.red 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. module entry; % Table of entry points of self-loading modules.
  2. % Author: Anthony C. Hearn.
  3. % Using a modified version of the defautoload function of Eric Benson
  4. % and Martin L. Griss.
  5. global '(!*msg modules!* systemname!* system!*);
  6. symbolic procedure safe!-putd(name,type,body);
  7. % So that stubs will not clobber REAL entries preloaded.
  8. if getd name
  9. then !*msg
  10. and printf("%n*** Autoload stub for %p not defined%n",name)
  11. else putd(name,type,body);
  12. symbolic macro procedure defautoload u;
  13. % (defautoload name), (defautoload name loadname),
  14. % (defautoload name loadname fntype), or
  15. % (defautoload name loadname fntype numargs)
  16. % Default is 1 Arg EXPR in module of same name;
  17. begin scalar name,numargs,loadname,fntype,x;
  18. u := cdr u;
  19. name := car u;
  20. u := cdr u;
  21. if u then <<loadname := car u; u :=cdr u>> else loadname := name;
  22. if eqcar(name, 'quote) then name := cadr name;
  23. if atom loadname
  24. then if (x := get(loadname,'loadnames)) then loadname := x
  25. else loadname := list loadname
  26. else if car loadname eq 'quote then loadname := cadr loadname;
  27. if u then <<fntype := car u; u := cdr u>> else fntype := 'expr;
  28. if u then numargs := car u else numargs := 1;
  29. numargs := if numargs=0 then nil
  30. else if numargs=1 then '(x1)
  31. else if numargs=2 then '(x1 x2)
  32. else if numargs=3 then '(x1 x2 x3)
  33. else if numargs=4 then '(x1 x2 x3 x4)
  34. else error(99,list(numargs,"too large in defautoload"));
  35. return
  36. list('safe!-putd,
  37. mkquote name,
  38. mkquote fntype,
  39. list('function,
  40. list('lambda, numargs,
  41. 'progn .
  42. aconc(for each j in loadname
  43. collect list('load!-module,mkquote j),
  44. list('apply,
  45. mkquote name,
  46. 'list . numargs)))))
  47. end;
  48. COMMENT Actual Entry Point Definitions;
  49. % Bigfloat module entry point.
  50. put('bigfloat,'module!-name,'bfloat);
  51. % Compiler and LAP entry points.
  52. % defautoload(compd,compiler,expr,3);
  53. defautoload(compile,compiler);
  54. defautoload(lap,compiler);
  55. % Cross-reference module entry points.
  56. put('cref,'simpfg,'((t (crefon)) (nil (crefoff))));
  57. defautoload(crefon,rcref,expr,0);
  58. % Factorizer module entry points.
  59. remprop('factor,'stat);
  60. defautoload(ezgcdf,ezgcd,expr,2);
  61. defautoload(factorf,'(ezgcd factor));
  62. defautoload(factoreval,'(ezgcd factor));
  63. put('factorize,'psopfn,'factoreval);
  64. defautoload(pfactor,'(ezgcd factor),expr,2);
  65. % defautoload(simpnprimitive,'(ezgcd factor));
  66. % put('nprimitive,'simpfn,'simpnprimitive);
  67. defautoload(simpresultant,rsltnt);
  68. defautoload(resultant,rsltnt,expr,3);
  69. put('resultant,'simpfn,'simpresultant);
  70. put('factor,'stat,'rlis);
  71. % FASL module entry points.
  72. %defautoload(faslout,compiler);
  73. flag('(faslout),'opfn);
  74. put('faslend,'stat,'endstat);
  75. % High energy physics module entry points.
  76. remprop('index,'stat); remprop('mass,'stat);
  77. remprop('mshell,'stat); remprop('vecdim,'stat);
  78. remprop('vector,'stat);
  79. defautoload(index,hephys);
  80. defautoload(mass,hephys);
  81. defautoload(mshell,hephys);
  82. defautoload(vecdim,hephys);
  83. defautoload(vector,hephys);
  84. put('index,'stat,'rlis);
  85. put('mshell,'stat,'rlis);
  86. put('mass,'stat,'rlis);
  87. put('vecdim,'stat,'rlis);
  88. put('vector,'stat,'rlis);
  89. flagop nospur;
  90. % Input editor entry points.
  91. defautoload(cedit,util);
  92. defautoload(display,util);
  93. put('display,'stat,'rlis);
  94. defautoload(editdef,util);
  95. put('editdef,'stat,'rlis);
  96. % Integrator module entry point.
  97. defautoload(simpint,int);
  98. put('int,'simpfn,'simpint);
  99. % Matrix module entry points.
  100. defautoload(detq,matr);
  101. defautoload(generateident,matr);
  102. defautoload(matp,matr);
  103. defautoload(matrix,matr);
  104. put('matrix,'stat,'rlis);
  105. flag('(mat),'struct);
  106. put('mat,'formfn,'formmat);
  107. defautoload(formmat,matr,expr,3);
  108. defautoload(lnrsolve,matr,expr,2);
  109. % Prettyprint module entry point.
  110. defautoload(prettyprint,util);
  111. % Rprint module entry point.
  112. defautoload(rprint,util);
  113. % SOLVE module entry point.
  114. defautoload(solveeval,solve);
  115. defautoload(solve0,solve,expr,2);
  116. put('solve,'psopfn,'solveeval);
  117. % Debug module entry points.
  118. % defautoload(embfn,debug,expr,3);
  119. endmodule;
  120. end;