ncal.pas 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 by Florian Klaempfl
  4. Type checking and register allocation for add nodes
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. unit ncal;
  19. interface
  20. uses
  21. node,symtable;
  22. type
  23. tcallnode = class(tbinarynode)
  24. { the symbol containing the definition of the procedure }
  25. { to call }
  26. symtableprocentry : pprocsym;
  27. { the symtable containing symtableprocentry }
  28. symtableproc : psymtable;
  29. { the definition of the procedure to call }
  30. procdefinition : pabstractprocdef;
  31. methodpointer : tnode;
  32. constructor create(v : pprocsym;st : psymtable);
  33. end;
  34. function gencallnode(v : pprocsym;st : psymtable) : tnode;
  35. var
  36. ccallnode : class of tcallnode;
  37. implementation
  38. function gencallnode(v : pprocsym;st : psymtable) : tnode;
  39. begin
  40. gencallnode:=ccallnode.create(v,st);
  41. end;
  42. constructor tcallnode.create(v : pprocsym;st : psymtable);
  43. begin
  44. inherited create(calln,nil,nil);
  45. symtableprocentry:=v;
  46. symtableproc:=st;
  47. include(flags,nf_return_value_used);
  48. methodpointer:=nil;
  49. procdefinition:=nil;
  50. end;
  51. begin
  52. ccallnode:=tcallnode;
  53. end.
  54. {
  55. $Log$
  56. Revision 1.1 2000-09-20 20:52:16 florian
  57. * initial revision
  58. }