pdecl.pas 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Does declaration (but not type) parsing for Free Pascal
  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 pdecl;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. { global }
  23. globals,
  24. { symtable }
  25. symsym,
  26. { pass_1 }
  27. node;
  28. function readconstant(const orgname:string;const filepos:tfileposinfo):tconstsym;
  29. procedure const_dec;
  30. procedure label_dec;
  31. procedure type_dec;
  32. procedure var_dec;
  33. procedure threadvar_dec;
  34. procedure resourcestring_dec;
  35. implementation
  36. uses
  37. { common }
  38. cutils,cclasses,
  39. { global }
  40. globtype,tokens,verbose,
  41. systems,
  42. { aasm }
  43. aasmbase,aasmtai,aasmcpu,fmodule,
  44. { symtable }
  45. symconst,symbase,symtype,symdef,symtable,paramgr,
  46. { pass 1 }
  47. nmat,nadd,ncal,nset,ncnv,ninl,ncon,nld,nflw,nobj,
  48. { parser }
  49. scanner,
  50. pbase,pexpr,ptype,ptconst,pdecsub,pdecvar,pdecobj,
  51. { cpu-information }
  52. cpuinfo
  53. ;
  54. function readconstant(const orgname:string;const filepos:tfileposinfo):tconstsym;
  55. var
  56. hp : tconstsym;
  57. p : tnode;
  58. ps : pconstset;
  59. pd : pbestreal;
  60. pg : pguid;
  61. sp : pchar;
  62. storetokenpos : tfileposinfo;
  63. begin
  64. readconstant:=nil;
  65. if orgname='' then
  66. internalerror(9584582);
  67. hp:=nil;
  68. p:=comp_expr(true);
  69. storetokenpos:=akttokenpos;
  70. akttokenpos:=filepos;
  71. case p.nodetype of
  72. ordconstn:
  73. begin
  74. if is_constintnode(p) then
  75. hp:=tconstsym.create_ord_typed(orgname,constint,tordconstnode(p).value,tordconstnode(p).resulttype)
  76. else if is_constcharnode(p) then
  77. hp:=tconstsym.create_ord(orgname,constchar,tordconstnode(p).value)
  78. else if is_constboolnode(p) then
  79. hp:=tconstsym.create_ord(orgname,constbool,tordconstnode(p).value)
  80. else if is_constwidecharnode(p) then
  81. hp:=tconstsym.create_ord(orgname,constwchar,tordconstnode(p).value)
  82. else if p.resulttype.def.deftype=enumdef then
  83. hp:=tconstsym.create_ord_typed(orgname,constord,tordconstnode(p).value,p.resulttype)
  84. else if p.resulttype.def.deftype=pointerdef then
  85. hp:=tconstsym.create_ordptr_typed(orgname,constpointer,tordconstnode(p).value,p.resulttype)
  86. else internalerror(111);
  87. end;
  88. stringconstn:
  89. begin
  90. getmem(sp,tstringconstnode(p).len+1);
  91. move(tstringconstnode(p).value_str^,sp^,tstringconstnode(p).len+1);
  92. hp:=tconstsym.create_string(orgname,conststring,sp,tstringconstnode(p).len);
  93. end;
  94. realconstn :
  95. begin
  96. new(pd);
  97. pd^:=trealconstnode(p).value_real;
  98. hp:=tconstsym.create_ptr(orgname,constreal,pd);
  99. end;
  100. setconstn :
  101. begin
  102. new(ps);
  103. ps^:=tsetconstnode(p).value_set^;
  104. hp:=tconstsym.create_ptr_typed(orgname,constset,ps,p.resulttype);
  105. end;
  106. pointerconstn :
  107. begin
  108. hp:=tconstsym.create_ordptr_typed(orgname,constpointer,tpointerconstnode(p).value,p.resulttype);
  109. end;
  110. niln :
  111. begin
  112. hp:=tconstsym.create_ord_typed(orgname,constnil,0,p.resulttype);
  113. end;
  114. typen :
  115. begin
  116. if is_interface(p.resulttype.def) then
  117. begin
  118. if assigned(tobjectdef(p.resulttype.def).iidguid) then
  119. begin
  120. new(pg);
  121. pg^:=tobjectdef(p.resulttype.def).iidguid^;
  122. hp:=tconstsym.create_ptr(orgname,constguid,pg);
  123. end
  124. else
  125. Message1(parser_e_interface_has_no_guid,tobjectdef(p.resulttype.def).objrealname^);
  126. end
  127. else
  128. Message(cg_e_illegal_expression);
  129. end;
  130. else
  131. Message(cg_e_illegal_expression);
  132. end;
  133. akttokenpos:=storetokenpos;
  134. p.free;
  135. readconstant:=hp;
  136. end;
  137. procedure const_dec;
  138. var
  139. orgname : stringid;
  140. tt : ttype;
  141. sym : tsym;
  142. storetokenpos,filepos : tfileposinfo;
  143. old_block_type : tblock_type;
  144. skipequal : boolean;
  145. begin
  146. consume(_CONST);
  147. old_block_type:=block_type;
  148. block_type:=bt_const;
  149. repeat
  150. orgname:=orgpattern;
  151. filepos:=akttokenpos;
  152. consume(_ID);
  153. case token of
  154. _EQUAL:
  155. begin
  156. consume(_EQUAL);
  157. sym:=readconstant(orgname,filepos);
  158. if assigned(sym) then
  159. symtablestack.insert(sym);
  160. try_consume_hintdirective(sym.symoptions);
  161. consume(_SEMICOLON);
  162. end;
  163. _COLON:
  164. begin
  165. { set the blocktype first so a consume also supports a
  166. caret, to support const s : ^string = nil }
  167. block_type:=bt_type;
  168. consume(_COLON);
  169. ignore_equal:=true;
  170. read_type(tt,'');
  171. ignore_equal:=false;
  172. block_type:=bt_const;
  173. skipequal:=false;
  174. { create symbol }
  175. storetokenpos:=akttokenpos;
  176. akttokenpos:=filepos;
  177. sym:=ttypedconstsym.createtype(orgname,tt,(cs_typed_const_writable in aktlocalswitches));
  178. akttokenpos:=storetokenpos;
  179. symtablestack.insert(sym);
  180. symtablestack.insertconstdata(sym);
  181. { procvar can have proc directives }
  182. if (tt.def.deftype=procvardef) then
  183. begin
  184. { support p : procedure;stdcall=nil; }
  185. if (token=_SEMICOLON) then
  186. begin
  187. consume(_SEMICOLON);
  188. if is_proc_directive(token) then
  189. parse_var_proc_directives(sym)
  190. else
  191. begin
  192. Message(parser_e_proc_directive_expected);
  193. skipequal:=true;
  194. end;
  195. end
  196. else
  197. { support p : procedure stdcall=nil; }
  198. begin
  199. if is_proc_directive(token) then
  200. parse_var_proc_directives(sym);
  201. end;
  202. { add default calling convention }
  203. handle_calling_convention(nil,tabstractprocdef(tt.def));
  204. paramanager.create_param_loc_info(tabstractprocdef(tt.def));
  205. end;
  206. if not skipequal then
  207. begin
  208. { get init value }
  209. consume(_EQUAL);
  210. readtypedconst(tt,ttypedconstsym(sym),(cs_typed_const_writable in aktlocalswitches));
  211. try_consume_hintdirective(sym.symoptions);
  212. consume(_SEMICOLON);
  213. end;
  214. end;
  215. else
  216. { generate an error }
  217. consume(_EQUAL);
  218. end;
  219. until token<>_ID;
  220. block_type:=old_block_type;
  221. end;
  222. procedure label_dec;
  223. var
  224. hl : tasmlabel;
  225. begin
  226. consume(_LABEL);
  227. if not(cs_support_goto in aktmoduleswitches) then
  228. Message(sym_e_goto_and_label_not_supported);
  229. repeat
  230. if not(token in [_ID,_INTCONST]) then
  231. consume(_ID)
  232. else
  233. begin
  234. if (cs_create_smart in aktmoduleswitches) then
  235. begin
  236. objectlibrary.getdatalabel(hl);
  237. { we still want a warning if unused }
  238. hl.decrefs;
  239. end
  240. else
  241. objectlibrary.getlabel(hl);
  242. if token=_ID then
  243. symtablestack.insert(tlabelsym.create(orgpattern,hl))
  244. else
  245. symtablestack.insert(tlabelsym.create(pattern,hl));
  246. consume(token);
  247. end;
  248. if token<>_SEMICOLON then consume(_COMMA);
  249. until not(token in [_ID,_INTCONST]);
  250. consume(_SEMICOLON);
  251. end;
  252. { search in symtablestack used, but not defined type }
  253. procedure resolve_type_forward(p : tnamedindexitem;arg:pointer);
  254. var
  255. hpd,pd : tdef;
  256. stpos : tfileposinfo;
  257. again : boolean;
  258. srsym : tsym;
  259. srsymtable : tsymtable;
  260. begin
  261. { Check only typesyms or record/object fields }
  262. case tsym(p).typ of
  263. typesym :
  264. pd:=ttypesym(p).restype.def;
  265. varsym :
  266. if (tsym(p).owner.symtabletype in [objectsymtable,recordsymtable]) then
  267. pd:=tvarsym(p).vartype.def
  268. else
  269. exit;
  270. else
  271. exit;
  272. end;
  273. repeat
  274. again:=false;
  275. case pd.deftype of
  276. arraydef :
  277. begin
  278. { elementtype could also be defined using a forwarddef }
  279. pd:=tarraydef(pd).elementtype.def;
  280. again:=true;
  281. end;
  282. pointerdef,
  283. classrefdef :
  284. begin
  285. { classrefdef inherits from pointerdef }
  286. hpd:=tpointerdef(pd).pointertype.def;
  287. { still a forward def ? }
  288. if hpd.deftype=forwarddef then
  289. begin
  290. { try to resolve the forward }
  291. { get the correct position for it }
  292. stpos:=akttokenpos;
  293. akttokenpos:=tforwarddef(hpd).forwardpos;
  294. resolving_forward:=true;
  295. make_ref:=false;
  296. if not assigned(tforwarddef(hpd).tosymname) then
  297. internalerror(20021120);
  298. searchsym(tforwarddef(hpd).tosymname^,srsym,srsymtable);
  299. make_ref:=true;
  300. resolving_forward:=false;
  301. akttokenpos:=stpos;
  302. { we don't need the forwarddef anymore, dispose it }
  303. hpd.free;
  304. tpointerdef(pd).pointertype.def:=nil; { if error occurs }
  305. { was a type sym found ? }
  306. if assigned(srsym) and
  307. (srsym.typ=typesym) then
  308. begin
  309. tpointerdef(pd).pointertype.setsym(srsym);
  310. { avoid wrong unused warnings web bug 801 PM }
  311. inc(tstoredsym(srsym).refs);
  312. {$ifdef GDB}
  313. if (cs_debuginfo in aktmoduleswitches) and assigned(debuglist) and
  314. (tsym(p).owner.symtabletype in [globalsymtable,staticsymtable]) then
  315. begin
  316. ttypesym(p).isusedinstab := true;
  317. ttypesym(p).concatstabto(debuglist);
  318. end;
  319. {$endif GDB}
  320. { we need a class type for classrefdef }
  321. if (pd.deftype=classrefdef) and
  322. not(is_class(ttypesym(srsym).restype.def)) then
  323. Message1(type_e_class_type_expected,ttypesym(srsym).restype.def.typename);
  324. end
  325. else
  326. begin
  327. MessagePos1(tsym(p).fileinfo,sym_e_forward_type_not_resolved,tsym(p).realname);
  328. { try to recover }
  329. tpointerdef(pd).pointertype:=generrortype;
  330. end;
  331. end;
  332. end;
  333. recorddef :
  334. trecorddef(pd).symtable.foreach_static({$ifdef FPCPROCVAR}@{$endif}resolve_type_forward,nil);
  335. objectdef :
  336. begin
  337. if not(m_fpc in aktmodeswitches) and
  338. (oo_is_forward in tobjectdef(pd).objectoptions) then
  339. begin
  340. { only give an error as the implementation may follow in an
  341. other type block which is allowed by FPC modes }
  342. MessagePos1(tsym(p).fileinfo,sym_e_forward_type_not_resolved,tsym(p).realname);
  343. end
  344. else
  345. begin
  346. { Check all fields of the object declaration, but don't
  347. check objectdefs in objects/records, because these
  348. can't exist (anonymous objects aren't allowed) }
  349. if not(tsym(p).owner.symtabletype in [objectsymtable,recordsymtable]) then
  350. tobjectdef(pd).symtable.foreach_static({$ifdef FPCPROCVAR}@{$endif}resolve_type_forward,nil);
  351. end;
  352. end;
  353. end;
  354. until not again;
  355. end;
  356. { reads a type declaration to the symbol table }
  357. procedure type_dec;
  358. var
  359. typename,orgtypename : stringid;
  360. newtype : ttypesym;
  361. sym : tsym;
  362. srsymtable : tsymtable;
  363. tt : ttype;
  364. oldfilepos,
  365. defpos,storetokenpos : tfileposinfo;
  366. old_block_type : tblock_type;
  367. ch : tclassheader;
  368. unique,istyperenaming : boolean;
  369. begin
  370. old_block_type:=block_type;
  371. block_type:=bt_type;
  372. consume(_TYPE);
  373. typecanbeforward:=true;
  374. repeat
  375. typename:=pattern;
  376. orgtypename:=orgpattern;
  377. defpos:=akttokenpos;
  378. istyperenaming:=false;
  379. consume(_ID);
  380. consume(_EQUAL);
  381. { support 'ttype=type word' syntax }
  382. if token=_TYPE then
  383. begin
  384. Consume(_TYPE);
  385. unique:=true;
  386. end
  387. else
  388. unique:=false;
  389. { is the type already defined? }
  390. searchsym(typename,sym,srsymtable);
  391. newtype:=nil;
  392. { found a symbol with this name? }
  393. if assigned(sym) then
  394. begin
  395. if (sym.typ=typesym) then
  396. begin
  397. if ((token=_CLASS) or
  398. (token=_INTERFACE)) and
  399. (assigned(ttypesym(sym).restype.def)) and
  400. is_class_or_interface(ttypesym(sym).restype.def) and
  401. (oo_is_forward in tobjectdef(ttypesym(sym).restype.def).objectoptions) then
  402. begin
  403. { we can ignore the result }
  404. { the definition is modified }
  405. object_dec(orgtypename,tobjectdef(ttypesym(sym).restype.def));
  406. newtype:=ttypesym(sym);
  407. tt:=newtype.restype;
  408. end;
  409. message1(parser_h_type_redef,typename);
  410. end;
  411. end;
  412. { no old type reused ? Then insert this new type }
  413. if not assigned(newtype) then
  414. begin
  415. { insert the new type first with an errordef, so that
  416. referencing the type before it's really set it
  417. will give an error (PFV) }
  418. tt:=generrortype;
  419. storetokenpos:=akttokenpos;
  420. newtype:=ttypesym.create(orgtypename,tt);
  421. symtablestack.insert(newtype);
  422. akttokenpos:=defpos;
  423. akttokenpos:=storetokenpos;
  424. { read the type definition }
  425. read_type(tt,orgtypename);
  426. { update the definition of the type }
  427. newtype.restype:=tt;
  428. if assigned(tt.sym) then
  429. istyperenaming:=true
  430. else
  431. tt.sym:=newtype;
  432. if assigned(tt.def) and not assigned(tt.def.typesym) then
  433. tt.def.typesym:=newtype;
  434. { KAZ: handle TGUID declaration in system unit }
  435. if (cs_compilesystem in aktmoduleswitches) and not assigned(rec_tguid) and
  436. (typename='TGUID') and { name: TGUID and size=16 bytes that is 128 bits }
  437. assigned(tt.def) and (tt.def.deftype=recorddef) and (tt.def.size=16) then
  438. rec_tguid:=trecorddef(tt.def);
  439. end;
  440. if assigned(tt.def) then
  441. begin
  442. case tt.def.deftype of
  443. pointerdef :
  444. begin
  445. consume(_SEMICOLON);
  446. if try_to_consume(_FAR) then
  447. begin
  448. tpointerdef(tt.def).is_far:=true;
  449. consume(_SEMICOLON);
  450. end;
  451. end;
  452. procvardef :
  453. begin
  454. { in case of type renaming, don't parse proc directives }
  455. if istyperenaming then
  456. consume(_SEMICOLON)
  457. else
  458. begin
  459. if not is_proc_directive(token) then
  460. consume(_SEMICOLON);
  461. parse_var_proc_directives(tsym(newtype));
  462. end;
  463. paramanager.create_param_loc_info(tabstractprocdef(tt.def));
  464. end;
  465. objectdef,
  466. recorddef :
  467. begin
  468. try_consume_hintdirective(newtype.symoptions);
  469. consume(_SEMICOLON);
  470. end;
  471. else
  472. consume(_SEMICOLON);
  473. end;
  474. end;
  475. { Write tables if we are the typesym that defines
  476. this type. This will not be done for simple type renamings }
  477. if (tt.def.typesym=newtype) then
  478. begin
  479. { file position }
  480. oldfilepos:=aktfilepos;
  481. aktfilepos:=newtype.fileinfo;
  482. { generate persistent init/final tables when it's declared in the interface so it can
  483. be reused in other used }
  484. if current_module.in_interface and
  485. ((is_class(tt.def) and
  486. tobjectdef(tt.def).members_need_inittable) or
  487. tt.def.needs_inittable) then
  488. generate_inittable(newtype);
  489. { for objects we should write the vmt and interfaces.
  490. This need to be done after the rtti has been written, because
  491. it can contain a reference to that data (PFV)
  492. This is not for forward classes }
  493. if (tt.def.deftype=objectdef) and
  494. not(oo_is_forward in tobjectdef(tt.def).objectoptions) then
  495. begin
  496. ch:=cclassheader.create(tobjectdef(tt.def));
  497. { generate and check virtual methods, must be done
  498. before RTTI is written }
  499. ch.genvmt;
  500. { generate rtti info if published items are available }
  501. if (oo_can_have_published in tobjectdef(tt.def).objectoptions) then
  502. generate_rtti(newtype);
  503. if is_interface(tobjectdef(tt.def)) then
  504. ch.writeinterfaceids;
  505. if (oo_has_vmt in tobjectdef(tt.def).objectoptions) then
  506. ch.writevmt;
  507. ch.free;
  508. end;
  509. aktfilepos:=oldfilepos;
  510. end;
  511. until token<>_ID;
  512. typecanbeforward:=false;
  513. symtablestack.foreach_static({$ifdef FPCPROCVAR}@{$endif}resolve_type_forward,nil);
  514. block_type:=old_block_type;
  515. end;
  516. procedure var_dec;
  517. { parses variable declarations and inserts them in }
  518. { the top symbol table of symtablestack }
  519. begin
  520. consume(_VAR);
  521. read_var_decs(false,false,false);
  522. end;
  523. procedure threadvar_dec;
  524. { parses thread variable declarations and inserts them in }
  525. { the top symbol table of symtablestack }
  526. begin
  527. consume(_THREADVAR);
  528. if not(symtablestack.symtabletype in [staticsymtable,globalsymtable]) then
  529. message(parser_e_threadvars_only_sg);
  530. if not(cs_threading in aktmoduleswitches) and
  531. not(cs_compilesystem in aktmoduleswitches) then
  532. Comment(V_Error,'Threading is turned off');
  533. read_var_decs(false,false,true);
  534. end;
  535. procedure resourcestring_dec;
  536. var
  537. orgname : stringid;
  538. p : tnode;
  539. storetokenpos,filepos : tfileposinfo;
  540. old_block_type : tblock_type;
  541. sp : pchar;
  542. begin
  543. consume(_RESOURCESTRING);
  544. if not(symtablestack.symtabletype in [staticsymtable,globalsymtable]) then
  545. message(parser_e_resourcestring_only_sg);
  546. old_block_type:=block_type;
  547. block_type:=bt_const;
  548. repeat
  549. orgname:=orgpattern;
  550. filepos:=akttokenpos;
  551. consume(_ID);
  552. case token of
  553. _EQUAL:
  554. begin
  555. consume(_EQUAL);
  556. p:=comp_expr(true);
  557. storetokenpos:=akttokenpos;
  558. akttokenpos:=filepos;
  559. case p.nodetype of
  560. ordconstn:
  561. begin
  562. if is_constcharnode(p) then
  563. begin
  564. getmem(sp,2);
  565. sp[0]:=chr(tordconstnode(p).value);
  566. sp[1]:=#0;
  567. symtablestack.insert(tconstsym.create_string(orgname,constresourcestring,sp,1));
  568. end
  569. else
  570. Message(cg_e_illegal_expression);
  571. end;
  572. stringconstn:
  573. begin
  574. getmem(sp,tstringconstnode(p).len+1);
  575. move(tstringconstnode(p).value_str^,sp^,tstringconstnode(p).len+1);
  576. symtablestack.insert(tconstsym.create_string(orgname,constresourcestring,sp,tstringconstnode(p).len));
  577. end;
  578. else
  579. Message(cg_e_illegal_expression);
  580. end;
  581. akttokenpos:=storetokenpos;
  582. consume(_SEMICOLON);
  583. p.free;
  584. end;
  585. else consume(_EQUAL);
  586. end;
  587. until token<>_ID;
  588. block_type:=old_block_type;
  589. end;
  590. end.
  591. {
  592. $Log$
  593. Revision 1.63 2002-12-29 14:57:50 peter
  594. * unit loading changed to first register units and load them
  595. afterwards. This is needed to support uses xxx in yyy correctly
  596. * unit dependency check fixed
  597. Revision 1.62 2002/12/05 19:27:40 carl
  598. - remove lower in hint
  599. Revision 1.61 2002/11/25 18:43:32 carl
  600. - removed the invalid if <> checking (Delphi is strange on this)
  601. + implemented abstract warning on instance creation of class with
  602. abstract methods.
  603. * some error message cleanups
  604. Revision 1.60 2002/11/23 22:50:06 carl
  605. * some small speed optimizations
  606. + added several new warnings/hints
  607. Revision 1.59 2002/11/17 16:31:56 carl
  608. * memory optimization (3-4%) : cleanup of tai fields,
  609. cleanup of tdef and tsym fields.
  610. * make it work for m68k
  611. Revision 1.58 2002/11/15 16:29:30 peter
  612. * made tasmsymbol.refs private (merged)
  613. Revision 1.57 2002/10/20 15:34:16 peter
  614. * removed df_unique flag. It breaks code. For a good type=type <id>
  615. a def copy is required
  616. Revision 1.56 2002/10/19 15:09:25 peter
  617. + tobjectdef.members_need_inittable that is used to generate only the
  618. inittable when it is really used. This saves a lot of useless calls
  619. to fpc_finalize when destroying classes
  620. Revision 1.55 2002/10/14 19:45:02 peter
  621. * only allow threadvar when threading switch is defined
  622. Revision 1.54 2002/10/06 12:25:05 florian
  623. + proper support of type <id> = type <another id>;
  624. Revision 1.53 2002/08/25 19:25:19 peter
  625. * sym.insert_in_data removed
  626. * symtable.insertvardata/insertconstdata added
  627. * removed insert_in_data call from symtable.insert, it needs to be
  628. called separatly. This allows to deref the address calculation
  629. * procedures now calculate the parast addresses after the procedure
  630. directives are parsed. This fixes the cdecl parast problem
  631. * push_addr_param has an extra argument that specifies if cdecl is used
  632. or not
  633. Revision 1.52 2002/08/12 15:08:40 carl
  634. + stab register indexes for powerpc (moved from gdb to cpubase)
  635. + tprocessor enumeration moved to cpuinfo
  636. + linker in target_info is now a class
  637. * many many updates for m68k (will soon start to compile)
  638. - removed some ifdef or correct them for correct cpu
  639. Revision 1.51 2002/08/11 14:32:27 peter
  640. * renamed current_library to objectlibrary
  641. Revision 1.50 2002/08/11 13:24:12 peter
  642. * saving of asmsymbols in ppu supported
  643. * asmsymbollist global is removed and moved into a new class
  644. tasmlibrarydata that will hold the info of a .a file which
  645. corresponds with a single module. Added librarydata to tmodule
  646. to keep the library info stored for the module. In the future the
  647. objectfiles will also be stored to the tasmlibrarydata class
  648. * all getlabel/newasmsymbol and friends are moved to the new class
  649. Revision 1.49 2002/07/29 21:23:43 florian
  650. * more fixes for the ppc
  651. + wrappers for the tcnvnode.first_* stuff introduced
  652. Revision 1.48 2002/07/01 18:46:25 peter
  653. * internal linker
  654. * reorganized aasm layer
  655. Revision 1.47 2002/06/12 13:20:29 jonas
  656. * fix from Florian for init/final info of forward classes
  657. Revision 1.46 2002/05/18 13:34:12 peter
  658. * readded missing revisions
  659. Revision 1.45 2002/05/16 19:46:42 carl
  660. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  661. + try to fix temp allocation (still in ifdef)
  662. + generic constructor calls
  663. + start of tassembler / tmodulebase class cleanup
  664. Revision 1.43 2002/05/12 16:53:08 peter
  665. * moved entry and exitcode to ncgutil and cgobj
  666. * foreach gets extra argument for passing local data to the
  667. iterator function
  668. * -CR checks also class typecasts at runtime by changing them
  669. into as
  670. * fixed compiler to cycle with the -CR option
  671. * fixed stabs with elf writer, finally the global variables can
  672. be watched
  673. * removed a lot of routines from cga unit and replaced them by
  674. calls to cgobj
  675. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  676. u32bit then the other is typecasted also to u32bit without giving
  677. a rangecheck warning/error.
  678. * fixed pascal calling method with reversing also the high tree in
  679. the parast, detected by tcalcst3 test
  680. Revision 1.42 2002/04/19 15:46:02 peter
  681. * mangledname rewrite, tprocdef.mangledname is now created dynamicly
  682. in most cases and not written to the ppu
  683. * add mangeledname_prefix() routine to generate the prefix of
  684. manglednames depending on the current procedure, object and module
  685. * removed static procprefix since the mangledname is now build only
  686. on demand from tprocdef.mangledname
  687. Revision 1.41 2002/03/04 17:54:59 peter
  688. * allow oridinal labels again
  689. }