ncgbas.pas 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. {
  2. $Id$
  3. Copyright (c) 2000 by Florian Klaempfl
  4. This unit implements some basic 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 ncgbas;
  19. interface
  20. uses
  21. node;
  22. type
  23. tcgnothingnode = class(tnoethingnode)
  24. procedure pass_2;override;
  25. end;
  26. tcgerrornode = class(terrornode)
  27. procedure pass_2;override;
  28. end;
  29. tcgasmnode = class(tasmnode)
  30. procedure pass_2;override;
  31. end;
  32. tcgstatementnode = class(tstatementnode)
  33. procedure pass_2;override;
  34. end;
  35. tcgblocknode = class(tblocknode)
  36. procedure pass_2;override;
  37. end;
  38. implementation
  39. uses
  40. globtype,systems,
  41. cutils,cobjects,verbose,globals,
  42. aasm,symtable,types,
  43. htypechk,
  44. cpubase,cpuasm,
  45. nflw
  46. {$ifdef newcg}
  47. ,cgbase
  48. ,tgcpu
  49. {$else newcg}
  50. ,hcodegen
  51. {$ifdef i386}
  52. ,tgeni386
  53. {$endif}
  54. {$ifdef m68k}
  55. ,tgen68k
  56. {$endif}
  57. {$endif}
  58. ;
  59. {*****************************************************************************
  60. TFIRSTNOTHING
  61. *****************************************************************************}
  62. procedure tnothingnode.pass_2;
  63. begin
  64. end;
  65. {*****************************************************************************
  66. TFIRSTERROR
  67. *****************************************************************************}
  68. {*****************************************************************************
  69. TSTATEMENTNODE
  70. *****************************************************************************}
  71. {*****************************************************************************
  72. TBLOCKNODE
  73. *****************************************************************************}
  74. procedure tblocknode.pass_2;
  75. begin
  76. { do second pass on left node }
  77. if assigned(p^.left) then
  78. secondpass(p^.left);
  79. end;
  80. begin
  81. cnothingnode:=tcgnothingnode;
  82. cerrornode:=tcgerrornode;
  83. casmnode:=tcgasmnode;
  84. cstatementnode:=tcgstatementnode;
  85. cblocknode:=tcgblocknode;
  86. end.
  87. {
  88. $Log$
  89. Revision 1.1 2000-10-14 10:14:50 peter
  90. * moehrendorf oct 2000 rewrite
  91. }