pdecvar.pas 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Parses variable declarations. Used for var statement and record
  5. definitions
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. ****************************************************************************
  18. }
  19. unit pdecvar;
  20. {$i fpcdefs.inc}
  21. interface
  22. procedure read_var_decs(is_record,is_object,is_threadvar:boolean);
  23. implementation
  24. uses
  25. { common }
  26. cutils,cclasses,
  27. { global }
  28. globtype,globals,tokens,verbose,
  29. systems,
  30. { symtable }
  31. symconst,symbase,symtype,symdef,symsym,symtable,defutil,
  32. fmodule,paramgr,
  33. { pass 1 }
  34. node,
  35. nmat,nadd,ncal,nset,ncnv,ninl,ncon,nld,nflw,
  36. { parser }
  37. scanner,
  38. pbase,pexpr,ptype,ptconst,pdecsub,
  39. { link }
  40. import
  41. {$ifdef Delphi}
  42. ,dmisc
  43. ,sysutils
  44. {$endif}
  45. ;
  46. const
  47. variantrecordlevel : longint = 0;
  48. procedure read_var_decs(is_record,is_object,is_threadvar:boolean);
  49. { reads the filed of a record into a }
  50. { symtablestack, if record=false }
  51. { variants are forbidden, so this procedure }
  52. { can be used to read object fields }
  53. { if absolute is true, ABSOLUTE and file }
  54. { types are allowed }
  55. { => the procedure is also used to read }
  56. { a sequence of variable declaration }
  57. procedure insert_syms(sc : tsinglelist;tt : ttype;is_threadvar : boolean; addsymopts : tsymoptions);
  58. { inserts the symbols of sc in st with def as definition or sym as ttypesym, sc is disposed }
  59. var
  60. vs,vs2 : tvarsym;
  61. begin
  62. vs:=tvarsym(sc.first);
  63. while assigned(vs) do
  64. begin
  65. vs.vartype:=tt;
  66. { insert any additional hint directives }
  67. vs.symoptions := vs.symoptions + addsymopts;
  68. if (sp_static in current_object_option) then
  69. include(vs.symoptions,sp_static);
  70. if is_threadvar then
  71. include(vs.varoptions,vo_is_thread_var);
  72. { static data fields are inserted in the globalsymtable }
  73. if (symtablestack.symtabletype=objectsymtable) and
  74. (sp_static in current_object_option) then
  75. begin
  76. vs2:=tvarsym.create('$'+lower(symtablestack.name^)+'_'+vs.name,tt);
  77. symtablestack.defowner.owner.insert(vs2);
  78. symtablestack.defowner.owner.insertvardata(vs2);
  79. end
  80. else
  81. begin
  82. { external data is not possible here }
  83. symtablestack.insertvardata(vs);
  84. end;
  85. vs:=tvarsym(vs.listnext);
  86. end;
  87. end;
  88. var
  89. sc : tsinglelist;
  90. old_block_type : tblock_type;
  91. declarepos,storetokenpos : tfileposinfo;
  92. oldsymtablestack : tsymtable;
  93. symdone : boolean;
  94. { to handle absolute }
  95. abssym : tabsolutesym;
  96. { c var }
  97. newtype : ttypesym;
  98. is_dll,
  99. is_gpc_name,is_cdecl,
  100. extern_var,export_var : boolean;
  101. old_current_object_option : tsymoptions;
  102. hs,sorg,C_name,dll_name : string;
  103. tt,casetype : ttype;
  104. { Delphi initialized vars }
  105. tconstsym : ttypedconstsym;
  106. { maxsize contains the max. size of a variant }
  107. { startvarrec contains the start of the variant part of a record }
  108. maxsize, startvarrecsize : longint;
  109. usedalign,
  110. minalignment,maxalignment,startvarrecalign : byte;
  111. pt : tnode;
  112. vs : tvarsym;
  113. srsym : tsym;
  114. srsymtable : tsymtable;
  115. unionsymtable : tsymtable;
  116. offset : longint;
  117. uniondef : trecorddef;
  118. unionsym : tvarsym;
  119. uniontype : ttype;
  120. dummysymoptions : tsymoptions;
  121. begin
  122. old_current_object_option:=current_object_option;
  123. { all variables are public if not in a object declaration }
  124. if not is_object then
  125. current_object_option:=[sp_public];
  126. old_block_type:=block_type;
  127. block_type:=bt_type;
  128. is_gpc_name:=false;
  129. { Force an expected ID error message }
  130. if not (token in [_ID,_CASE,_END]) then
  131. consume(_ID);
  132. { read vars }
  133. sc:=tsinglelist.create;
  134. while (token=_ID) and
  135. not(is_object and (idtoken in [_PUBLIC,_PRIVATE,_PUBLISHED,_PROTECTED])) do
  136. begin
  137. sorg:=orgpattern;
  138. sc.reset;
  139. repeat
  140. vs:=tvarsym.create(orgpattern,generrortype);
  141. symtablestack.insert(vs);
  142. sc.insert(vs);
  143. consume(_ID);
  144. until not try_to_consume(_COMMA);
  145. consume(_COLON);
  146. if (m_gpc in aktmodeswitches) and
  147. not(is_record or is_object or is_threadvar) and
  148. (token=_ID) and (orgpattern='__asmname__') then
  149. begin
  150. consume(_ID);
  151. C_name:=get_stringconst;
  152. Is_gpc_name:=true;
  153. end;
  154. { this is needed for Delphi mode at least
  155. but should be OK for all modes !! (PM) }
  156. ignore_equal:=true;
  157. if is_record then
  158. begin
  159. { for records, don't search the recordsymtable for
  160. the symbols of the types }
  161. oldsymtablestack:=symtablestack;
  162. symtablestack:=symtablestack.next;
  163. read_type(tt,'');
  164. symtablestack:=oldsymtablestack;
  165. end
  166. else
  167. read_type(tt,'');
  168. { types that use init/final are not allowed in variant parts, but
  169. classes are allowed }
  170. if (variantrecordlevel>0) and
  171. (tt.def.needs_inittable and not is_class(tt.def)) then
  172. Message(parser_e_cant_use_inittable_here);
  173. ignore_equal:=false;
  174. symdone:=false;
  175. if is_gpc_name then
  176. begin
  177. vs:=tvarsym(sc.first);
  178. if assigned(vs.listnext) then
  179. Message(parser_e_absolute_only_one_var);
  180. vs.vartype:=tt;
  181. include(vs.varoptions,vo_is_C_var);
  182. vs.set_mangledname(target_info.Cprefix+sorg);
  183. include(vs.varoptions,vo_is_external);
  184. symdone:=true;
  185. end;
  186. { check for absolute }
  187. if not symdone and
  188. (idtoken=_ABSOLUTE) and not(is_record or is_object or is_threadvar) then
  189. begin
  190. consume(_ABSOLUTE);
  191. { only allowed for one var }
  192. vs:=tvarsym(sc.first);
  193. if assigned(vs.listnext) then
  194. Message(parser_e_absolute_only_one_var);
  195. { parse the rest }
  196. pt:=expr;
  197. if (pt.nodetype=stringconstn) or
  198. (is_constcharnode(pt)) then
  199. begin
  200. abssym:=tabsolutesym.create(vs.realname,tt);
  201. abssym.fileinfo:=vs.fileinfo;
  202. if pt.nodetype=stringconstn then
  203. hs:=strpas(tstringconstnode(pt).value_str)
  204. else
  205. hs:=chr(tordconstnode(pt).value);
  206. consume(token);
  207. abssym.abstyp:=toasm;
  208. abssym.asmname:=stringdup(hs);
  209. { replace the varsym }
  210. symtablestack.replace(vs,abssym);
  211. vs.free;
  212. end
  213. { variable }
  214. else if (pt.nodetype=loadn) then
  215. begin
  216. { we should check the result type of srsym }
  217. if not (tloadnode(pt).symtableentry.typ in [varsym,typedconstsym,funcretsym]) then
  218. Message(parser_e_absolute_only_to_var_or_const);
  219. abssym:=tabsolutesym.create(vs.realname,tt);
  220. abssym.fileinfo:=vs.fileinfo;
  221. abssym.abstyp:=tovar;
  222. abssym.ref:=tstoredsym(tloadnode(pt).symtableentry);
  223. symtablestack.replace(vs,abssym);
  224. vs.free;
  225. { the variable cannot be put into a register
  226. if the size definition is not the same.
  227. }
  228. if tloadnode(pt).symtableentry.typ = varsym then
  229. begin
  230. if abssym.vartype.def <>
  231. tvarsym(tloadnode(pt).symtableentry).vartype.def then
  232. tvarsym(tloadnode(pt).symtableentry).varoptions:=
  233. tvarsym(tloadnode(pt).symtableentry).varoptions-[vo_regable,vo_fpuregable]
  234. end;
  235. end
  236. { funcret }
  237. else if (pt.nodetype=funcretn) then
  238. begin
  239. abssym:=tabsolutesym.create(vs.realname,tt);
  240. abssym.fileinfo:=vs.fileinfo;
  241. abssym.abstyp:=tovar;
  242. abssym.ref:=tstoredsym(tfuncretnode(pt).funcretsym);
  243. symtablestack.replace(vs,abssym);
  244. vs.free;
  245. end
  246. { address }
  247. else if is_constintnode(pt) and
  248. ((target_info.system=system_i386_go32v2) or
  249. (m_objfpc in aktmodeswitches) or
  250. (m_delphi in aktmodeswitches)) then
  251. begin
  252. abssym:=tabsolutesym.create(vs.realname,tt);
  253. abssym.fileinfo:=vs.fileinfo;
  254. abssym.abstyp:=toaddr;
  255. abssym.absseg:=false;
  256. abssym.address:=tordconstnode(pt).value;
  257. if (target_info.system=system_i386_go32v2) and
  258. try_to_consume(_COLON) then
  259. begin
  260. pt.free;
  261. pt:=expr;
  262. if is_constintnode(pt) then
  263. begin
  264. abssym.address:=abssym.address shl 4+tordconstnode(pt).value;
  265. abssym.absseg:=true;
  266. end
  267. else
  268. Message(type_e_ordinal_expr_expected);
  269. end;
  270. symtablestack.replace(vs,abssym);
  271. vs.free;
  272. end
  273. else
  274. Message(parser_e_absolute_only_to_var_or_const);
  275. { try to consume the hint directives with absolute symbols }
  276. dummysymoptions:=[];
  277. try_consume_hintdirective(dummysymoptions);
  278. abssym.symoptions := abssym.symoptions + dummysymoptions;
  279. pt.free;
  280. symdone:=true;
  281. end;
  282. { Handling of Delphi typed const = initialized vars ! }
  283. { When should this be rejected ?
  284. - in parasymtable
  285. - in record or object
  286. - ... (PM) }
  287. if (token=_EQUAL) and
  288. not(m_tp7 in aktmodeswitches) and
  289. not(symtablestack.symtabletype in [parasymtable]) and
  290. not is_record and
  291. not is_object then
  292. begin
  293. vs:=tvarsym(sc.first);
  294. if assigned(vs.listnext) then
  295. Message(parser_e_initialized_only_one_var);
  296. tconstsym:=ttypedconstsym.createtype(vs.realname,tt,true);
  297. tconstsym.fileinfo:=vs.fileinfo;
  298. symtablestack.replace(vs,tconstsym);
  299. vs.free;
  300. symtablestack.insertconstdata(tconstsym);
  301. consume(_EQUAL);
  302. readtypedconst(tt,tconstsym,true);
  303. symdone:=true;
  304. end;
  305. { if the symbol is not completely handled, then try to parse the
  306. hint directives }
  307. if not symdone then
  308. begin
  309. dummysymoptions:=[];
  310. try_consume_hintdirective(dummysymoptions);
  311. end;
  312. { for a record there doesn't need to be a ; before the END or ) }
  313. if not((is_record or is_object) and (token in [_END,_RKLAMMER])) then
  314. consume(_SEMICOLON);
  315. { procvar handling }
  316. if (tt.def.deftype=procvardef) and (tt.def.typesym=nil) then
  317. begin
  318. newtype:=ttypesym.create('unnamed',tt);
  319. parse_var_proc_directives(tsym(newtype));
  320. paramanager.create_param_loc_info(tabstractprocdef(tt.def));
  321. newtype.restype.def:=nil;
  322. tt.def.typesym:=nil;
  323. newtype.free;
  324. end;
  325. { Check for variable directives }
  326. if not symdone and (token=_ID) then
  327. begin
  328. { Check for C Variable declarations }
  329. if (m_cvar_support in aktmodeswitches) and
  330. not(is_record or is_object or is_threadvar) and
  331. (idtoken in [_EXPORT,_EXTERNAL,_PUBLIC,_CVAR]) then
  332. begin
  333. { only allowed for one var }
  334. vs:=tvarsym(sc.first);
  335. if assigned(vs.listnext) then
  336. Message(parser_e_absolute_only_one_var);
  337. { set type of the var }
  338. vs.vartype:=tt;
  339. vs.symoptions := vs.symoptions + dummysymoptions;
  340. { defaults }
  341. is_dll:=false;
  342. is_cdecl:=false;
  343. extern_var:=false;
  344. export_var:=false;
  345. C_name:=sorg;
  346. { cdecl }
  347. if idtoken=_CVAR then
  348. begin
  349. consume(_CVAR);
  350. consume(_SEMICOLON);
  351. is_cdecl:=true;
  352. C_name:=target_info.Cprefix+sorg;
  353. end;
  354. { external }
  355. if idtoken=_EXTERNAL then
  356. begin
  357. consume(_EXTERNAL);
  358. extern_var:=true;
  359. end;
  360. { export }
  361. if idtoken in [_EXPORT,_PUBLIC] then
  362. begin
  363. consume(_ID);
  364. if extern_var or
  365. (symtablestack.symtabletype in [parasymtable,localsymtable]) then
  366. Message(parser_e_not_external_and_export)
  367. else
  368. export_var:=true;
  369. end;
  370. { external and export need a name after when no cdecl is used }
  371. if not is_cdecl then
  372. begin
  373. { dll name ? }
  374. if (extern_var) and (idtoken<>_NAME) then
  375. begin
  376. is_dll:=true;
  377. dll_name:=get_stringconst;
  378. end;
  379. consume(_NAME);
  380. C_name:=get_stringconst;
  381. end;
  382. { consume the ; when export or external is used }
  383. if extern_var or export_var then
  384. consume(_SEMICOLON);
  385. { set some vars options }
  386. if is_dll then
  387. include(vs.varoptions,vo_is_dll_var)
  388. else
  389. include(vs.varoptions,vo_is_C_var);
  390. vs.set_mangledname(C_Name);
  391. if export_var then
  392. begin
  393. inc(vs.refs);
  394. include(vs.varoptions,vo_is_exported);
  395. end;
  396. if extern_var then
  397. include(vs.varoptions,vo_is_external);
  398. { insert in the datasegment when it is not external }
  399. if not extern_var then
  400. symtablestack.insertvardata(vs);
  401. { now we can insert it in the import lib if its a dll, or
  402. add it to the externals }
  403. if extern_var then
  404. begin
  405. if is_dll then
  406. begin
  407. if not(current_module.uses_imports) then
  408. begin
  409. current_module.uses_imports:=true;
  410. importlib.preparelib(current_module.modulename^);
  411. end;
  412. importlib.importvariable(vs,C_name,dll_name);
  413. end
  414. else
  415. if target_info.DllScanSupported then
  416. current_module.Externals.insert(tExternalsItem.create(vs.mangledname));
  417. end;
  418. symdone:=true;
  419. end
  420. else
  421. if (is_object) and (cs_static_keyword in aktmoduleswitches) and (idtoken=_STATIC) then
  422. begin
  423. include(current_object_option,sp_static);
  424. insert_syms(sc,tt,false,dummysymoptions);
  425. exclude(current_object_option,sp_static);
  426. consume(_STATIC);
  427. consume(_SEMICOLON);
  428. symdone:=true;
  429. end;
  430. end;
  431. { insert it in the symtable, if not done yet }
  432. if not symdone then
  433. begin
  434. { save object option, because we can turn of the sp_published }
  435. if (sp_published in current_object_option) and
  436. not(is_class(tt.def)) then
  437. begin
  438. Message(parser_e_cant_publish_that);
  439. exclude(current_object_option,sp_published);
  440. end
  441. else
  442. if (sp_published in current_object_option) and
  443. not(oo_can_have_published in tobjectdef(tt.def).objectoptions) then
  444. begin
  445. Message(parser_e_only_publishable_classes_can__be_published);
  446. exclude(current_object_option,sp_published);
  447. end;
  448. insert_syms(sc,tt,is_threadvar,dummysymoptions);
  449. current_object_option:=old_current_object_option;
  450. end;
  451. end;
  452. { Check for Case }
  453. if is_record and (token=_CASE) then
  454. begin
  455. maxsize:=0;
  456. maxalignment:=0;
  457. consume(_CASE);
  458. sorg:=orgpattern;
  459. hs:=pattern;
  460. searchsym(hs,srsym,srsymtable);
  461. { may be only a type: }
  462. if assigned(srsym) and (srsym.typ in [typesym,unitsym]) then
  463. begin
  464. { for records, don't search the recordsymtable for
  465. the symbols of the types }
  466. oldsymtablestack:=symtablestack;
  467. symtablestack:=symtablestack.next;
  468. read_type(casetype,'');
  469. symtablestack:=oldsymtablestack;
  470. end
  471. else
  472. begin
  473. consume(_ID);
  474. consume(_COLON);
  475. { for records, don't search the recordsymtable for
  476. the symbols of the types }
  477. oldsymtablestack:=symtablestack;
  478. symtablestack:=symtablestack.next;
  479. read_type(casetype,'');
  480. symtablestack:=oldsymtablestack;
  481. vs:=tvarsym.create(sorg,casetype);
  482. symtablestack.insert(vs);
  483. symtablestack.insertvardata(vs);
  484. end;
  485. if not(is_ordinal(casetype.def)) or is_64bitint(casetype.def) then
  486. Message(type_e_ordinal_expr_expected);
  487. consume(_OF);
  488. UnionSymtable:=trecordsymtable.create;
  489. Unionsymtable.next:=symtablestack;
  490. registerdef:=false;
  491. UnionDef:=trecorddef.create(unionsymtable);
  492. uniondef.isunion:=true;
  493. if assigned(symtablestack.defowner) then
  494. Uniondef.owner:=symtablestack.defowner.owner;
  495. registerdef:=true;
  496. symtablestack:=UnionSymtable;
  497. startvarrecsize:=symtablestack.datasize;
  498. startvarrecalign:=symtablestack.dataalignment;
  499. repeat
  500. repeat
  501. pt:=comp_expr(true);
  502. if not(pt.nodetype=ordconstn) then
  503. Message(cg_e_illegal_expression);
  504. pt.free;
  505. if token=_COMMA then
  506. consume(_COMMA)
  507. else
  508. break;
  509. until false;
  510. consume(_COLON);
  511. { read the vars }
  512. consume(_LKLAMMER);
  513. inc(variantrecordlevel);
  514. if token<>_RKLAMMER then
  515. read_var_decs(true,false,false);
  516. dec(variantrecordlevel);
  517. consume(_RKLAMMER);
  518. { calculates maximal variant size }
  519. maxsize:=max(maxsize,symtablestack.datasize);
  520. maxalignment:=max(maxalignment,symtablestack.dataalignment);
  521. { the items of the next variant are overlayed }
  522. symtablestack.datasize:=startvarrecsize;
  523. symtablestack.dataalignment:=startvarrecalign;
  524. if (token<>_END) and (token<>_RKLAMMER) then
  525. consume(_SEMICOLON)
  526. else
  527. break;
  528. until (token=_END) or (token=_RKLAMMER);
  529. { at last set the record size to that of the biggest variant }
  530. symtablestack.datasize:=maxsize;
  531. symtablestack.dataalignment:=maxalignment;
  532. uniontype.def:=uniondef;
  533. uniontype.sym:=nil;
  534. UnionSym:=tvarsym.create('case',uniontype);
  535. symtablestack:=symtablestack.next;
  536. { we do NOT call symtablestack.insert
  537. on purpose PM }
  538. if aktalignment.recordalignmax=-1 then
  539. begin
  540. {$ifdef i386}
  541. if maxalignment>2 then
  542. minalignment:=4
  543. else if maxalignment>1 then
  544. minalignment:=2
  545. else
  546. minalignment:=1;
  547. {$else}
  548. {$ifdef m68k}
  549. minalignment:=2;
  550. {$endif}
  551. minalignment:=1;
  552. {$endif}
  553. end
  554. else
  555. minalignment:=maxalignment;
  556. usedalign:=used_align(maxalignment,minalignment,maxalignment);
  557. offset:=align(symtablestack.datasize,usedalign);
  558. symtablestack.datasize:=offset+unionsymtable.datasize;
  559. if maxalignment>symtablestack.dataalignment then
  560. symtablestack.dataalignment:=maxalignment;
  561. trecordsymtable(Unionsymtable).Insert_in(symtablestack,offset);
  562. Unionsym.owner:=nil;
  563. unionsym.free;
  564. uniondef.owner:=nil;
  565. uniondef.free;
  566. end;
  567. block_type:=old_block_type;
  568. current_object_option:=old_current_object_option;
  569. { free the list }
  570. sc.free;
  571. end;
  572. end.
  573. {
  574. $Log$
  575. Revision 1.42 2002-12-07 14:04:59 carl
  576. * convert some vars from longint -> byte
  577. Revision 1.41 2002/11/29 22:31:19 carl
  578. + unimplemented hint directive added
  579. * hint directive parsing implemented
  580. * warning on these directives
  581. Revision 1.40 2002/11/25 17:43:21 peter
  582. * splitted defbase in defutil,symutil,defcmp
  583. * merged isconvertable and is_equal into compare_defs(_ext)
  584. * made operator search faster by walking the list only once
  585. Revision 1.39 2002/11/15 16:29:31 peter
  586. * made tasmsymbol.refs private (merged)
  587. Revision 1.38 2002/11/15 01:58:53 peter
  588. * merged changes from 1.0.7 up to 04-11
  589. - -V option for generating bug report tracing
  590. - more tracing for option parsing
  591. - errors for cdecl and high()
  592. - win32 import stabs
  593. - win32 records<=8 are returned in eax:edx (turned off by default)
  594. - heaptrc update
  595. - more info for temp management in .s file with EXTDEBUG
  596. Revision 1.37 2002/10/05 15:18:43 carl
  597. * fix heap leaks
  598. Revision 1.36 2002/10/05 12:43:26 carl
  599. * fixes for Delphi 6 compilation
  600. (warning : Some features do not work under Delphi)
  601. Revision 1.35 2002/10/04 20:53:05 carl
  602. * bugfix of crash
  603. Revision 1.34 2002/10/03 21:22:01 carl
  604. * don't make the vars regable if they are absolute and their definitions
  605. are not the same.
  606. Revision 1.33 2002/09/16 18:08:45 peter
  607. * fix setting of sp_static
  608. Revision 1.32 2002/09/09 17:34:15 peter
  609. * tdicationary.replace added to replace and item in a dictionary. This
  610. is only allowed for the same name
  611. * varsyms are inserted in symtable before the types are parsed. This
  612. fixes the long standing "var longint : longint" bug
  613. - consume_idlist and idstringlist removed. The loops are inserted
  614. at the callers place and uses the symtable for duplicate id checking
  615. Revision 1.31 2002/08/25 19:25:20 peter
  616. * sym.insert_in_data removed
  617. * symtable.insertvardata/insertconstdata added
  618. * removed insert_in_data call from symtable.insert, it needs to be
  619. called separatly. This allows to deref the address calculation
  620. * procedures now calculate the parast addresses after the procedure
  621. directives are parsed. This fixes the cdecl parast problem
  622. * push_addr_param has an extra argument that specifies if cdecl is used
  623. or not
  624. Revision 1.30 2002/07/29 21:23:44 florian
  625. * more fixes for the ppc
  626. + wrappers for the tcnvnode.first_* stuff introduced
  627. Revision 1.29 2002/07/26 21:15:40 florian
  628. * rewrote the system handling
  629. Revision 1.28 2002/07/20 11:57:55 florian
  630. * types.pas renamed to defbase.pas because D6 contains a types
  631. unit so this would conflicts if D6 programms are compiled
  632. + Willamette/SSE2 instructions to assembler added
  633. Revision 1.27 2002/06/10 13:41:26 jonas
  634. * fixed bug 1985
  635. Revision 1.26 2002/05/18 13:34:12 peter
  636. * readded missing revisions
  637. Revision 1.25 2002/05/16 19:46:43 carl
  638. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  639. + try to fix temp allocation (still in ifdef)
  640. + generic constructor calls
  641. + start of tassembler / tmodulebase class cleanup
  642. Revision 1.23 2002/04/21 18:57:24 peter
  643. * fixed memleaks when file can't be opened
  644. }