autoload.red 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. %
  2. % AUTOLOAD.RED - Autoloading entry stubs
  3. %
  4. % Author: Eric Benson
  5. % Symbolic Computation Group
  6. % Computer Science Dept.
  7. % University of Utah
  8. % Date: 25 March 1982
  9. % Copyright (c) 1982 University of Utah
  10. %
  11. % <PSL.KERNEL>AUTOLOAD.RED.3, 17-Sep-82 16:35:02, Edit by BENSON
  12. % Changed PrettyPrint to use PrettyPrint, not Pretty
  13. CompileTime <<
  14. macro procedure DefAutoload U;
  15. %
  16. % (DefAutoload name), (DefAutoload name loadname),
  17. % (DefAutoload name loadname fntype), or
  18. % (DefAutoload name loadname fntype numargs)
  19. %
  20. % Default is 1 Arg EXPR in module of same name
  21. %
  22. begin scalar Name, NumArgs, LoadName, FnType;
  23. U := rest U;
  24. Name := first U;
  25. U := rest U;
  26. if not null U then
  27. << LoadName := first U;
  28. U :=rest U >>
  29. else LoadName := Name;
  30. if EqCar(Name, 'QUOTE) then Name := second Name;
  31. if EqCar(LoadName, 'QUOTE) then LoadName := second LoadName;
  32. if not null U then
  33. << FnType := first U;
  34. U := rest U >>
  35. else FnType := 'EXPR;
  36. if not null U then
  37. NumArgs := first U
  38. else NumArgs := 1;
  39. NumArgs := MakeArgList NumArgs;
  40. return list('PutD, MkQuote Name,
  41. MkQuote FnType,
  42. list('function, list('lambda, NumArgs,
  43. list('load, LoadName),
  44. list('Apply, MkQuote Name,
  45. 'list . NumArgs))));
  46. end;
  47. lisp procedure MakeArgList N;
  48. GetV('[() (X1) (X1 X2) (X1 X2 X3) (X1 X2 X3 X4) (X1 X2 X3 X4 X5)],
  49. N);
  50. >>;
  51. DefAutoload PrettyPrint;
  52. DefAutoload(DefStruct, DefStruct, FEXPR);
  53. DefAutoload(Step);
  54. DefAutoload Mini;
  55. DefAutoload('Help, 'Help, FEXPR);
  56. DefAutoload(Emode, Emode, EXPR, 0);
  57. DefAutoload(Invoke, Mini);
  58. PUT('CREF ,'SIMPFG ,'((T (CREFON)) (NIL (CREFOFF))));
  59. DefAutoload(CrefOn, RCref, EXPR, 0);
  60. put('Syslisp,
  61. 'SimpFg,
  62. '((T (load Syslisp))));
  63. DefAutoload(CompD, Compiler, EXPR, 3);
  64. DefAutoload(FaslOUT, Compiler);
  65. if_system(Tops20, <<
  66. DefAutoload(Bug, Bug, EXPR, 0);
  67. DefAutoload(MM, Exec, EXPR, 0);
  68. DefAutoload(Exec, Exec, EXPR, 0);
  69. >>);
  70. END;