pdecvar.pas 28 KB

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