pdecl.pas 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 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. interface
  20. uses
  21. globtype,tokens,globals,symtable;
  22. procedure parameter_dec(aktprocdef:pabstractprocdef);
  23. procedure read_var_decs(is_record,is_object,is_threadvar:boolean);
  24. { reads the declaration blocks }
  25. procedure read_declarations(islibrary : boolean);
  26. { reads declarations in the interface part of a unit }
  27. procedure read_interface_declarations;
  28. implementation
  29. uses
  30. cobjects,scanner,
  31. symconst,aasm,tree,pass_1,strings,
  32. files,types,verbose,systems,import,
  33. cpubase
  34. {$ifndef newcg}
  35. ,tccnv
  36. {$endif newcg}
  37. {$ifdef GDB}
  38. ,gdb
  39. {$endif GDB}
  40. { parser specific stuff }
  41. ,pbase,ptconst,pexpr,ptype,psub,pexports
  42. { processor specific stuff }
  43. { codegen }
  44. {$ifdef newcg}
  45. ,cgbase
  46. {$else}
  47. ,hcodegen
  48. {$endif}
  49. ,hcgdata
  50. ;
  51. procedure parameter_dec(aktprocdef:pabstractprocdef);
  52. {
  53. handle_procvar needs the same changes
  54. }
  55. var
  56. is_procvar : boolean;
  57. sc : Pstringcontainer;
  58. s : string;
  59. storetokenpos : tfileposinfo;
  60. tt : ttype;
  61. hsym : psym;
  62. hvs,
  63. vs : Pvarsym;
  64. hs1,hs2 : string;
  65. varspez : Tvarspez;
  66. inserthigh : boolean;
  67. begin
  68. { parsing a proc or procvar ? }
  69. is_procvar:=(aktprocdef^.deftype=procvardef);
  70. consume(_LKLAMMER);
  71. inc(testcurobject);
  72. repeat
  73. if try_to_consume(_VAR) then
  74. varspez:=vs_var
  75. else
  76. if try_to_consume(_CONST) then
  77. varspez:=vs_const
  78. else
  79. varspez:=vs_value;
  80. inserthigh:=false;
  81. tt.reset;
  82. if idtoken=_SELF then
  83. begin
  84. { only allowed in procvars and class methods }
  85. if is_procvar or
  86. (assigned(procinfo^._class) and procinfo^._class^.is_class) then
  87. begin
  88. if not is_procvar then
  89. begin
  90. {$ifndef UseNiceNames}
  91. hs2:=hs2+'$'+'self';
  92. {$else UseNiceNames}
  93. hs2:=hs2+tostr(length('self'))+'self';
  94. {$endif UseNiceNames}
  95. vs:=new(Pvarsym,initdef('@',procinfo^._class));
  96. vs^.varspez:=vs_var;
  97. { insert the sym in the parasymtable }
  98. pprocdef(aktprocdef)^.parast^.insert(vs);
  99. {$ifdef INCLUDEOK}
  100. include(aktprocdef^.procoptions,po_containsself);
  101. {$else}
  102. aktprocdef^.procoptions:=aktprocdef^.procoptions+[po_containsself];
  103. {$endif}
  104. inc(procinfo^.selfpointer_offset,vs^.address);
  105. end;
  106. consume(idtoken);
  107. consume(_COLON);
  108. single_type(tt,hs1,false);
  109. aktprocdef^.concatpara(tt,vs_value);
  110. { check the types for procedures only }
  111. if not is_procvar then
  112. CheckTypes(tt.def,procinfo^._class);
  113. end
  114. else
  115. consume(_ID);
  116. end
  117. else
  118. begin
  119. { read identifiers }
  120. sc:=idlist;
  121. { read type declaration, force reading for value and const paras }
  122. if (token=_COLON) or (varspez=vs_value) then
  123. begin
  124. consume(_COLON);
  125. { check for an open array }
  126. if token=_ARRAY then
  127. begin
  128. consume(_ARRAY);
  129. consume(_OF);
  130. { define range and type of range }
  131. tt.setdef(new(Parraydef,init(0,-1,s32bitdef)));
  132. { array of const ? }
  133. if (token=_CONST) and (m_objpas in aktmodeswitches) then
  134. begin
  135. consume(_CONST);
  136. srsym:=nil;
  137. getsymonlyin(systemunit,'TVARREC');
  138. if not assigned(srsym) then
  139. InternalError(1234124);
  140. Parraydef(tt.def)^.elementtype:=ptypesym(srsym)^.restype;
  141. Parraydef(tt.def)^.IsArrayOfConst:=true;
  142. hs1:='array_of_const';
  143. end
  144. else
  145. begin
  146. { define field type }
  147. single_type(parraydef(tt.def)^.elementtype,hs1,false);
  148. hs1:='array_of_'+hs1;
  149. end;
  150. inserthigh:=true;
  151. end
  152. { open string ? }
  153. else if (varspez=vs_var) and
  154. (
  155. (
  156. ((token=_STRING) or (idtoken=_SHORTSTRING)) and
  157. (cs_openstring in aktmoduleswitches) and
  158. not(cs_ansistrings in aktlocalswitches)
  159. ) or
  160. (idtoken=_OPENSTRING)) then
  161. begin
  162. consume(token);
  163. tt.setdef(openshortstringdef);
  164. hs1:='openstring';
  165. inserthigh:=true;
  166. end
  167. { everything else }
  168. else
  169. single_type(tt,hs1,false);
  170. end
  171. else
  172. begin
  173. {$ifndef UseNiceNames}
  174. hs1:='$$$';
  175. {$else UseNiceNames}
  176. hs1:='var';
  177. {$endif UseNiceNames}
  178. tt.setdef(cformaldef);
  179. end;
  180. if not is_procvar then
  181. hs2:=pprocdef(aktprocdef)^.mangledname;
  182. storetokenpos:=tokenpos;
  183. while not sc^.empty do
  184. begin
  185. s:=sc^.get_with_tokeninfo(tokenpos);
  186. aktprocdef^.concatpara(tt,varspez);
  187. { For proc vars we only need the definitions }
  188. if not is_procvar then
  189. begin
  190. {$ifndef UseNiceNames}
  191. hs2:=hs2+'$'+hs1;
  192. {$else UseNiceNames}
  193. hs2:=hs2+tostr(length(hs1))+hs1;
  194. {$endif UseNiceNames}
  195. vs:=new(pvarsym,init(s,tt));
  196. vs^.varspez:=varspez;
  197. { we have to add this to avoid var param to be in registers !!!}
  198. if (varspez in [vs_var,vs_const]) and push_addr_param(tt.def) then
  199. {$ifdef INCLUDEOK}
  200. include(vs^.varoptions,vo_regable);
  201. {$else}
  202. vs^.varoptions:=vs^.varoptions+[vo_regable];
  203. {$endif}
  204. { search for duplicate ids in object members/methods }
  205. { but only the current class, I don't know why ... }
  206. { at least TP and Delphi do it in that way (FK) }
  207. if assigned(procinfo^._class) and
  208. (lexlevel=normal_function_level) then
  209. begin
  210. hsym:=procinfo^._class^.symtable^.search(vs^.name);
  211. if assigned(hsym) then
  212. DuplicateSym(hsym);
  213. end;
  214. { do we need a local copy? }
  215. if (varspez=vs_value) and
  216. push_addr_param(tt.def) and
  217. not(is_open_array(tt.def) or is_array_of_const(tt.def)) then
  218. vs^.setname('val'+vs^.name);
  219. { insert the sym in the parasymtable }
  220. pprocdef(aktprocdef)^.parast^.insert(vs);
  221. { also need to push a high value? }
  222. if inserthigh then
  223. begin
  224. hvs:=new(Pvarsym,initdef('high'+s,s32bitdef));
  225. hvs^.varspez:=vs_const;
  226. pprocdef(aktprocdef)^.parast^.insert(hvs);
  227. end;
  228. end;
  229. end;
  230. dispose(sc,done);
  231. tokenpos:=storetokenpos;
  232. end;
  233. { set the new mangled name }
  234. if not is_procvar then
  235. pprocdef(aktprocdef)^.setmangledname(hs2);
  236. until not try_to_consume(_SEMICOLON);
  237. dec(testcurobject);
  238. consume(_RKLAMMER);
  239. end;
  240. const
  241. variantrecordlevel : longint = 0;
  242. procedure read_var_decs(is_record,is_object,is_threadvar:boolean);
  243. { reads the filed of a record into a }
  244. { symtablestack, if record=false }
  245. { variants are forbidden, so this procedure }
  246. { can be used to read object fields }
  247. { if absolute is true, ABSOLUTE and file }
  248. { types are allowed }
  249. { => the procedure is also used to read }
  250. { a sequence of variable declaration }
  251. procedure insert_syms(st : psymtable;sc : pstringcontainer;tt : ttype;is_threadvar : boolean);
  252. { inserts the symbols of sc in st with def as definition or sym as ptypesym, sc is disposed }
  253. var
  254. s : string;
  255. filepos : tfileposinfo;
  256. ss : pvarsym;
  257. begin
  258. filepos:=tokenpos;
  259. while not sc^.empty do
  260. begin
  261. s:=sc^.get_with_tokeninfo(tokenpos);
  262. ss:=new(pvarsym,init(s,tt));
  263. if is_threadvar then
  264. {$ifdef INCLUDEOK}
  265. include(ss^.varoptions,vo_is_thread_var);
  266. {$else}
  267. ss^.varoptions:=ss^.varoptions+[vo_is_thread_var];
  268. {$endif}
  269. st^.insert(ss);
  270. { static data fields are inserted in the globalsymtable }
  271. if (st^.symtabletype=objectsymtable) and
  272. (sp_static in current_object_option) then
  273. begin
  274. s:=lower(st^.name^)+'_'+s;
  275. st^.defowner^.owner^.insert(new(pvarsym,init(s,tt)));
  276. end;
  277. end;
  278. dispose(sc,done);
  279. tokenpos:=filepos;
  280. end;
  281. var
  282. sc : pstringcontainer;
  283. s : stringid;
  284. old_block_type : tblock_type;
  285. declarepos,storetokenpos : tfileposinfo;
  286. symdone : boolean;
  287. { to handle absolute }
  288. abssym : pabsolutesym;
  289. l : longint;
  290. code : integer;
  291. { c var }
  292. newtype : ptypesym;
  293. is_dll,
  294. is_gpc_name,is_cdecl,extern_aktvarsym,export_aktvarsym : boolean;
  295. old_current_object_option : tsymoptions;
  296. dll_name,
  297. C_name : string;
  298. tt,casetype : ttype;
  299. { Delphi initialized vars }
  300. pconstsym : ptypedconstsym;
  301. { maxsize contains the max. size of a variant }
  302. { startvarrec contains the start of the variant part of a record }
  303. maxsize,startvarrec : longint;
  304. pt : ptree;
  305. begin
  306. old_block_type:=block_type;
  307. block_type:=bt_type;
  308. is_gpc_name:=false;
  309. { Force an expected ID error message }
  310. if not (token in [_ID,_CASE,_END]) then
  311. consume(_ID);
  312. { read vars }
  313. while (token=_ID) and
  314. not(is_object and (idtoken in [_PUBLIC,_PRIVATE,_PUBLISHED,_PROTECTED])) do
  315. begin
  316. C_name:=orgpattern;
  317. sc:=idlist;
  318. consume(_COLON);
  319. if (m_gpc in aktmodeswitches) and
  320. not(is_record or is_object or is_threadvar) and
  321. (token=_ID) and (orgpattern='__asmname__') then
  322. begin
  323. consume(_ID);
  324. C_name:=pattern;
  325. if token=_CCHAR then
  326. consume(_CCHAR)
  327. else
  328. consume(_CSTRING);
  329. Is_gpc_name:=true;
  330. end;
  331. { this is needed for Delphi mode at least
  332. but should be OK for all modes !! (PM) }
  333. ignore_equal:=true;
  334. read_type(tt,'');
  335. if (variantrecordlevel>0) and tt.def^.needs_inittable then
  336. Message(parser_e_cant_use_inittable_here);
  337. ignore_equal:=false;
  338. symdone:=false;
  339. if is_gpc_name then
  340. begin
  341. storetokenpos:=tokenpos;
  342. s:=sc^.get_with_tokeninfo(tokenpos);
  343. if not sc^.empty then
  344. Message(parser_e_absolute_only_one_var);
  345. dispose(sc,done);
  346. aktvarsym:=new(pvarsym,init_C(s,target_os.Cprefix+C_name,tt));
  347. {$ifdef INCLUDEOK}
  348. include(aktvarsym^.varoptions,vo_is_external);
  349. {$else}
  350. aktvarsym^.varoptions:=aktvarsym^.varoptions+[vo_is_external];
  351. {$endif}
  352. symtablestack^.insert(aktvarsym);
  353. tokenpos:=storetokenpos;
  354. symdone:=true;
  355. end;
  356. { check for absolute }
  357. if not symdone and
  358. (idtoken=_ABSOLUTE) and not(is_record or is_object or is_threadvar) then
  359. begin
  360. consume(_ABSOLUTE);
  361. { only allowed for one var }
  362. s:=sc^.get_with_tokeninfo(declarepos);
  363. if not sc^.empty then
  364. Message(parser_e_absolute_only_one_var);
  365. dispose(sc,done);
  366. { parse the rest }
  367. if token=_ID then
  368. begin
  369. getsym(pattern,true);
  370. consume(_ID);
  371. { support unit.variable }
  372. if srsym^.typ=unitsym then
  373. begin
  374. consume(_POINT);
  375. getsymonlyin(punitsym(srsym)^.unitsymtable,pattern);
  376. consume(_ID);
  377. end;
  378. { we should check the result type of srsym }
  379. if not (srsym^.typ in [varsym,typedconstsym]) then
  380. Message(parser_e_absolute_only_to_var_or_const);
  381. storetokenpos:=tokenpos;
  382. tokenpos:=declarepos;
  383. abssym:=new(pabsolutesym,init(s,tt));
  384. abssym^.abstyp:=tovar;
  385. abssym^.ref:=srsym;
  386. symtablestack^.insert(abssym);
  387. tokenpos:=storetokenpos;
  388. end
  389. else
  390. if (token=_CSTRING) or (token=_CCHAR) then
  391. begin
  392. storetokenpos:=tokenpos;
  393. tokenpos:=declarepos;
  394. abssym:=new(pabsolutesym,init(s,tt));
  395. s:=pattern;
  396. consume(token);
  397. abssym^.abstyp:=toasm;
  398. abssym^.asmname:=stringdup(s);
  399. symtablestack^.insert(abssym);
  400. tokenpos:=storetokenpos;
  401. end
  402. else
  403. { absolute address ?!? }
  404. if token=_INTCONST then
  405. begin
  406. if (target_info.target=target_i386_go32v2) then
  407. begin
  408. storetokenpos:=tokenpos;
  409. tokenpos:=declarepos;
  410. abssym:=new(pabsolutesym,init(s,tt));
  411. abssym^.abstyp:=toaddr;
  412. abssym^.absseg:=false;
  413. s:=pattern;
  414. consume(_INTCONST);
  415. val(s,abssym^.address,code);
  416. if token=_COLON then
  417. begin
  418. consume(token);
  419. s:=pattern;
  420. consume(_INTCONST);
  421. val(s,l,code);
  422. abssym^.address:=abssym^.address shl 4+l;
  423. abssym^.absseg:=true;
  424. end;
  425. symtablestack^.insert(abssym);
  426. tokenpos:=storetokenpos;
  427. end
  428. else
  429. Message(parser_e_absolute_only_to_var_or_const);
  430. end
  431. else
  432. Message(parser_e_absolute_only_to_var_or_const);
  433. symdone:=true;
  434. end;
  435. { Handling of Delphi typed const = initialized vars ! }
  436. { When should this be rejected ?
  437. - in parasymtable
  438. - in record or object
  439. - ... (PM) }
  440. if (m_delphi in aktmodeswitches) and (token=_EQUAL) and
  441. not (symtablestack^.symtabletype in [parasymtable]) and
  442. not is_record and not is_object then
  443. begin
  444. storetokenpos:=tokenpos;
  445. s:=sc^.get_with_tokeninfo(tokenpos);
  446. if not sc^.empty then
  447. Message(parser_e_initialized_only_one_var);
  448. pconstsym:=new(ptypedconstsym,inittype(s,tt,false));
  449. symtablestack^.insert(pconstsym);
  450. tokenpos:=storetokenpos;
  451. consume(_EQUAL);
  452. readtypedconst(tt.def,pconstsym,false);
  453. symdone:=true;
  454. end;
  455. { for a record there doesn't need to be a ; before the END or ) }
  456. if not((is_record or is_object) and (token in [_END,_RKLAMMER])) then
  457. consume(_SEMICOLON);
  458. { procvar handling }
  459. if (tt.def^.deftype=procvardef) and (tt.def^.typesym=nil) then
  460. begin
  461. newtype:=new(ptypesym,init('unnamed',tt));
  462. parse_var_proc_directives(psym(newtype));
  463. newtype^.restype.def:=nil;
  464. tt.def^.typesym:=nil;
  465. dispose(newtype,done);
  466. end;
  467. { Check for variable directives }
  468. if not symdone and (token=_ID) then
  469. begin
  470. { Check for C Variable declarations }
  471. if (m_cvar_support in aktmodeswitches) and
  472. not(is_record or is_object or is_threadvar) and
  473. (idtoken in [_EXPORT,_EXTERNAL,_PUBLIC,_CVAR]) then
  474. begin
  475. { only allowed for one var }
  476. s:=sc^.get_with_tokeninfo(declarepos);
  477. if not sc^.empty then
  478. Message(parser_e_absolute_only_one_var);
  479. dispose(sc,done);
  480. { defaults }
  481. is_dll:=false;
  482. is_cdecl:=false;
  483. extern_aktvarsym:=false;
  484. export_aktvarsym:=false;
  485. { cdecl }
  486. if idtoken=_CVAR then
  487. begin
  488. consume(_CVAR);
  489. consume(_SEMICOLON);
  490. is_cdecl:=true;
  491. C_name:=target_os.Cprefix+C_name;
  492. end;
  493. { external }
  494. if idtoken=_EXTERNAL then
  495. begin
  496. consume(_EXTERNAL);
  497. extern_aktvarsym:=true;
  498. end;
  499. { export }
  500. if idtoken in [_EXPORT,_PUBLIC] then
  501. begin
  502. consume(_ID);
  503. if extern_aktvarsym then
  504. Message(parser_e_not_external_and_export)
  505. else
  506. export_aktvarsym:=true;
  507. end;
  508. { external and export need a name after when no cdecl is used }
  509. if not is_cdecl then
  510. begin
  511. { dll name ? }
  512. if (extern_aktvarsym) and (idtoken<>_NAME) then
  513. begin
  514. is_dll:=true;
  515. dll_name:=get_stringconst;
  516. end;
  517. consume(_NAME);
  518. C_name:=get_stringconst;
  519. end;
  520. { consume the ; when export or external is used }
  521. if extern_aktvarsym or export_aktvarsym then
  522. consume(_SEMICOLON);
  523. { insert in the symtable }
  524. storetokenpos:=tokenpos;
  525. tokenpos:=declarepos;
  526. if is_dll then
  527. aktvarsym:=new(pvarsym,init_dll(s,tt))
  528. else
  529. aktvarsym:=new(pvarsym,init_C(s,C_name,tt));
  530. { set some vars options }
  531. if export_aktvarsym then
  532. inc(aktvarsym^.refs);
  533. if extern_aktvarsym then
  534. {$ifdef INCLUDEOK}
  535. include(aktvarsym^.varoptions,vo_is_external);
  536. {$else}
  537. aktvarsym^.varoptions:=aktvarsym^.varoptions+[vo_is_external];
  538. {$endif}
  539. { insert in the stack/datasegment }
  540. symtablestack^.insert(aktvarsym);
  541. tokenpos:=storetokenpos;
  542. { now we can insert it in the import lib if its a dll, or
  543. add it to the externals }
  544. if extern_aktvarsym then
  545. begin
  546. if is_dll then
  547. begin
  548. if not(current_module^.uses_imports) then
  549. begin
  550. current_module^.uses_imports:=true;
  551. importlib^.preparelib(current_module^.modulename^);
  552. end;
  553. importlib^.importvariable(aktvarsym^.mangledname,dll_name,C_name)
  554. end
  555. end;
  556. symdone:=true;
  557. end
  558. else
  559. if (is_object) and (cs_static_keyword in aktmoduleswitches) and (idtoken=_STATIC) then
  560. begin
  561. {$ifdef INCLUDEOK}
  562. include(current_object_option,sp_static);
  563. {$else}
  564. current_object_option:=current_object_option+[sp_static];
  565. {$endif}
  566. insert_syms(symtablestack,sc,tt,false);
  567. {$ifdef INCLUDEOK}
  568. exclude(current_object_option,sp_static);
  569. {$else}
  570. current_object_option:=current_object_option-[sp_static];
  571. {$endif}
  572. consume(_STATIC);
  573. consume(_SEMICOLON);
  574. symdone:=true;
  575. end;
  576. end;
  577. { insert it in the symtable, if not done yet }
  578. if not symdone then
  579. begin
  580. { save object option, because we can turn of the sp_published }
  581. old_current_object_option:=current_object_option;
  582. if (sp_published in current_object_option) and
  583. (not((tt.def^.deftype=objectdef) and (pobjectdef(tt.def)^.is_class))) then
  584. begin
  585. Message(parser_e_cant_publish_that);
  586. exclude(current_object_option,sp_published);
  587. end
  588. else
  589. if (sp_published in current_object_option) and
  590. not(oo_can_have_published in pobjectdef(tt.def)^.objectoptions) then
  591. begin
  592. Message(parser_e_only_publishable_classes_can__be_published);
  593. exclude(current_object_option,sp_published);
  594. end;
  595. insert_syms(symtablestack,sc,tt,is_threadvar);
  596. current_object_option:=old_current_object_option;
  597. end;
  598. end;
  599. { Check for Case }
  600. if is_record and (token=_CASE) then
  601. begin
  602. maxsize:=0;
  603. consume(_CASE);
  604. s:=pattern;
  605. getsym(s,false);
  606. { may be only a type: }
  607. if assigned(srsym) and (srsym^.typ in [typesym,unitsym]) then
  608. read_type(casetype,'')
  609. else
  610. begin
  611. consume(_ID);
  612. consume(_COLON);
  613. read_type(casetype,'');
  614. symtablestack^.insert(new(pvarsym,init(s,casetype)));
  615. end;
  616. if not(is_ordinal(casetype.def)) or is_64bitint(casetype.def) then
  617. Message(type_e_ordinal_expr_expected);
  618. consume(_OF);
  619. startvarrec:=symtablestack^.datasize;
  620. repeat
  621. repeat
  622. pt:=comp_expr(true);
  623. do_firstpass(pt);
  624. if not(pt^.treetype=ordconstn) then
  625. Message(cg_e_illegal_expression);
  626. disposetree(pt);
  627. if token=_COMMA then
  628. consume(_COMMA)
  629. else
  630. break;
  631. until false;
  632. consume(_COLON);
  633. { read the vars }
  634. consume(_LKLAMMER);
  635. inc(variantrecordlevel);
  636. if token<>_RKLAMMER then
  637. read_var_decs(true,false,false);
  638. dec(variantrecordlevel);
  639. consume(_RKLAMMER);
  640. { calculates maximal variant size }
  641. maxsize:=max(maxsize,symtablestack^.datasize);
  642. { the items of the next variant are overlayed }
  643. symtablestack^.datasize:=startvarrec;
  644. if (token<>_END) and (token<>_RKLAMMER) then
  645. consume(_SEMICOLON)
  646. else
  647. break;
  648. until (token=_END) or (token=_RKLAMMER);
  649. { at last set the record size to that of the biggest variant }
  650. symtablestack^.datasize:=maxsize;
  651. end;
  652. block_type:=old_block_type;
  653. end;
  654. procedure const_dec;
  655. var
  656. name : stringid;
  657. p : ptree;
  658. tt : ttype;
  659. sym : psym;
  660. storetokenpos,filepos : tfileposinfo;
  661. old_block_type : tblock_type;
  662. ps : pconstset;
  663. pd : pbestreal;
  664. sp : pchar;
  665. skipequal : boolean;
  666. begin
  667. consume(_CONST);
  668. old_block_type:=block_type;
  669. block_type:=bt_const;
  670. repeat
  671. name:=pattern;
  672. filepos:=tokenpos;
  673. consume(_ID);
  674. case token of
  675. _EQUAL:
  676. begin
  677. consume(_EQUAL);
  678. p:=comp_expr(true);
  679. do_firstpass(p);
  680. storetokenpos:=tokenpos;
  681. tokenpos:=filepos;
  682. case p^.treetype of
  683. ordconstn:
  684. begin
  685. if is_constintnode(p) then
  686. symtablestack^.insert(new(pconstsym,init_def(name,constint,p^.value,nil)))
  687. else if is_constcharnode(p) then
  688. symtablestack^.insert(new(pconstsym,init_def(name,constchar,p^.value,nil)))
  689. else if is_constboolnode(p) then
  690. symtablestack^.insert(new(pconstsym,init_def(name,constbool,p^.value,nil)))
  691. else if p^.resulttype^.deftype=enumdef then
  692. symtablestack^.insert(new(pconstsym,init_def(name,constord,p^.value,p^.resulttype)))
  693. else if p^.resulttype^.deftype=pointerdef then
  694. symtablestack^.insert(new(pconstsym,init_def(name,constord,p^.value,p^.resulttype)))
  695. else internalerror(111);
  696. end;
  697. stringconstn:
  698. begin
  699. getmem(sp,p^.length+1);
  700. move(p^.value_str^,sp^,p^.length+1);
  701. symtablestack^.insert(new(pconstsym,init_string(name,conststring,sp,p^.length)));
  702. end;
  703. realconstn :
  704. begin
  705. new(pd);
  706. pd^:=p^.value_real;
  707. symtablestack^.insert(new(pconstsym,init(name,constreal,longint(pd))));
  708. end;
  709. setconstn :
  710. begin
  711. new(ps);
  712. ps^:=p^.value_set^;
  713. symtablestack^.insert(new(pconstsym,init_def(name,constset,longint(ps),p^.resulttype)));
  714. end;
  715. pointerconstn :
  716. begin
  717. symtablestack^.insert(new(pconstsym,init_def(name,constpointer,p^.value,p^.resulttype)))
  718. end;
  719. niln :
  720. begin
  721. symtablestack^.insert(new(pconstsym,init_def(name,constnil,0,p^.resulttype)));
  722. end;
  723. else
  724. Message(cg_e_illegal_expression);
  725. end;
  726. tokenpos:=storetokenpos;
  727. consume(_SEMICOLON);
  728. disposetree(p);
  729. end;
  730. _COLON:
  731. begin
  732. { set the blocktype first so a consume also supports a
  733. caret, to support const s : ^string = nil }
  734. block_type:=bt_type;
  735. consume(_COLON);
  736. ignore_equal:=true;
  737. read_type(tt,'');
  738. ignore_equal:=false;
  739. block_type:=bt_const;
  740. skipequal:=false;
  741. { create symbol }
  742. storetokenpos:=tokenpos;
  743. tokenpos:=filepos;
  744. {$ifdef DELPHI_CONST_IN_RODATA}
  745. if m_delphi in aktmodeswitches then
  746. begin
  747. if assigned(readtypesym) then
  748. sym:=new(ptypedconstsym,initsym(name,readtypesym,true))
  749. else
  750. sym:=new(ptypedconstsym,init(name,def,true))
  751. end
  752. else
  753. {$endif DELPHI_CONST_IN_RODATA}
  754. begin
  755. sym:=new(ptypedconstsym,inittype(name,tt,false))
  756. end;
  757. tokenpos:=storetokenpos;
  758. symtablestack^.insert(sym);
  759. { procvar can have proc directives }
  760. if (tt.def^.deftype=procvardef) then
  761. begin
  762. { support p : procedure;stdcall=nil; }
  763. if (token=_SEMICOLON) then
  764. begin
  765. consume(_SEMICOLON);
  766. if is_proc_directive(token) then
  767. parse_var_proc_directives(sym)
  768. else
  769. begin
  770. Message(parser_e_proc_directive_expected);
  771. skipequal:=true;
  772. end;
  773. end
  774. else
  775. { support p : procedure stdcall=nil; }
  776. begin
  777. if is_proc_directive(token) then
  778. parse_var_proc_directives(sym);
  779. end;
  780. end;
  781. if not skipequal then
  782. begin
  783. { get init value }
  784. consume(_EQUAL);
  785. {$ifdef DELPHI_CONST_IN_RODATA}
  786. if m_delphi in aktmodeswitches then
  787. readtypedconst(tt.def,ptypedconstsym(sym),true)
  788. else
  789. {$endif DELPHI_CONST_IN_RODATA}
  790. readtypedconst(tt.def,ptypedconstsym(sym),false);
  791. consume(_SEMICOLON);
  792. end;
  793. end;
  794. else
  795. { generate an error }
  796. consume(_EQUAL);
  797. end;
  798. until token<>_ID;
  799. block_type:=old_block_type;
  800. end;
  801. procedure label_dec;
  802. var
  803. hl : pasmlabel;
  804. begin
  805. consume(_LABEL);
  806. if not(cs_support_goto in aktmoduleswitches) then
  807. Message(sym_e_goto_and_label_not_supported);
  808. repeat
  809. if not(token in [_ID,_INTCONST]) then
  810. consume(_ID)
  811. else
  812. begin
  813. getlabel(hl);
  814. symtablestack^.insert(new(plabelsym,init(pattern,hl)));
  815. consume(token);
  816. end;
  817. if token<>_SEMICOLON then consume(_COMMA);
  818. until not(token in [_ID,_INTCONST]);
  819. consume(_SEMICOLON);
  820. end;
  821. { search in symtablestack used, but not defined type }
  822. procedure resolve_type_forward(p : pnamedindexobject);{$ifndef FPC}far;{$endif}
  823. var
  824. hpd,pd : pdef;
  825. stpos : tfileposinfo;
  826. again : boolean;
  827. begin
  828. { Check only typesyms or record/object fields }
  829. case psym(p)^.typ of
  830. typesym :
  831. pd:=ptypesym(p)^.restype.def;
  832. varsym :
  833. if (psym(p)^.owner^.symtabletype in [objectsymtable,recordsymtable]) then
  834. pd:=pvarsym(p)^.vartype.def
  835. else
  836. exit;
  837. else
  838. exit;
  839. end;
  840. repeat
  841. again:=false;
  842. case pd^.deftype of
  843. arraydef :
  844. begin
  845. { elementtype could also be defined using a forwarddef }
  846. pd:=parraydef(pd)^.elementtype.def;
  847. again:=true;
  848. end;
  849. pointerdef,
  850. classrefdef :
  851. begin
  852. { classrefdef inherits from pointerdef }
  853. hpd:=ppointerdef(pd)^.pointertype.def;
  854. { still a forward def ? }
  855. if hpd^.deftype=forwarddef then
  856. begin
  857. { try to resolve the forward }
  858. { get the correct position for it }
  859. stpos:=tokenpos;
  860. tokenpos:=pforwarddef(hpd)^.forwardpos;
  861. resolving_forward:=true;
  862. make_ref:=false;
  863. getsym(pforwarddef(hpd)^.tosymname,false);
  864. make_ref:=true;
  865. resolving_forward:=false;
  866. tokenpos:=stpos;
  867. { we don't need the forwarddef anymore, dispose it }
  868. dispose(hpd,done);
  869. { was a type sym found ? }
  870. if assigned(srsym) and
  871. (srsym^.typ=typesym) then
  872. begin
  873. ppointerdef(pd)^.pointertype:=ptypesym(srsym)^.restype;
  874. {$ifdef GDB}
  875. if (cs_debuginfo in aktmoduleswitches) and assigned(debuglist) and
  876. (psym(p)^.owner^.symtabletype in [globalsymtable,staticsymtable]) then
  877. begin
  878. ptypesym(p)^.isusedinstab := true;
  879. psym(p)^.concatstabto(debuglist);
  880. end;
  881. {$endif GDB}
  882. { we need a class type for classrefdef }
  883. if (pd^.deftype=classrefdef) and
  884. not((ptypesym(srsym)^.restype.def^.deftype=objectdef) and
  885. pobjectdef(ptypesym(srsym)^.restype.def)^.is_class) then
  886. Message1(type_e_class_type_expected,ptypesym(srsym)^.restype.def^.typename);
  887. end
  888. else
  889. begin
  890. MessagePos1(psym(p)^.fileinfo,sym_e_forward_type_not_resolved,p^.name);
  891. { try to recover }
  892. ppointerdef(pd)^.pointertype.def:=generrordef;
  893. end;
  894. end;
  895. end;
  896. recorddef :
  897. precorddef(pd)^.symtable^.foreach({$ifndef TP}@{$endif}resolve_type_forward);
  898. objectdef :
  899. { Don't check objectdefs in objects/records, because these can't
  900. exist (anonymous objects aren't allowed) }
  901. if not(psym(p)^.owner^.symtabletype in [objectsymtable,recordsymtable]) then
  902. pobjectdef(pd)^.symtable^.foreach({$ifndef TP}@{$endif}resolve_type_forward);
  903. end;
  904. until not again;
  905. end;
  906. { reads a type declaration to the symbol table }
  907. procedure type_dec;
  908. var
  909. typename : stringid;
  910. newtype : ptypesym;
  911. sym : psym;
  912. tt : ttype;
  913. defpos,storetokenpos : tfileposinfo;
  914. old_block_type : tblock_type;
  915. begin
  916. old_block_type:=block_type;
  917. block_type:=bt_type;
  918. consume(_TYPE);
  919. typecanbeforward:=true;
  920. repeat
  921. typename:=pattern;
  922. defpos:=tokenpos;
  923. consume(_ID);
  924. consume(_EQUAL);
  925. { support 'ttype=type word' syntax }
  926. if token=_TYPE then
  927. Consume(_TYPE);
  928. { is the type already defined? }
  929. getsym(typename,false);
  930. sym:=srsym;
  931. newtype:=nil;
  932. { found a symbol with this name? }
  933. if assigned(sym) then
  934. begin
  935. if (sym^.typ=typesym) then
  936. begin
  937. if (token=_CLASS) and
  938. (assigned(ptypesym(sym)^.restype.def)) and
  939. (ptypesym(sym)^.restype.def^.deftype=objectdef) and
  940. pobjectdef(ptypesym(sym)^.restype.def)^.is_class and
  941. (oo_is_forward in pobjectdef(ptypesym(sym)^.restype.def)^.objectoptions) then
  942. begin
  943. { we can ignore the result }
  944. { the definition is modified }
  945. object_dec(typename,pobjectdef(ptypesym(sym)^.restype.def));
  946. newtype:=ptypesym(sym);
  947. end;
  948. end;
  949. end;
  950. { no old type reused ? Then insert this new type }
  951. if not assigned(newtype) then
  952. begin
  953. read_type(tt,typename);
  954. storetokenpos:=tokenpos;
  955. tokenpos:=defpos;
  956. newtype:=new(ptypesym,init(typename,tt));
  957. newtype:=ptypesym(symtablestack^.insert(newtype));
  958. tokenpos:=storetokenpos;
  959. end;
  960. consume(_SEMICOLON);
  961. if assigned(newtype^.restype.def) and
  962. (newtype^.restype.def^.deftype=procvardef) then
  963. parse_var_proc_directives(psym(newtype));
  964. until token<>_ID;
  965. typecanbeforward:=false;
  966. symtablestack^.foreach({$ifndef TP}@{$endif}resolve_type_forward);
  967. block_type:=old_block_type;
  968. end;
  969. procedure var_dec;
  970. { parses variable declarations and inserts them in }
  971. { the top symbol table of symtablestack }
  972. begin
  973. consume(_VAR);
  974. read_var_decs(false,false,false);
  975. end;
  976. procedure threadvar_dec;
  977. { parses thread variable declarations and inserts them in }
  978. { the top symbol table of symtablestack }
  979. begin
  980. consume(_THREADVAR);
  981. if not(symtablestack^.symtabletype in [staticsymtable,globalsymtable]) then
  982. message(parser_e_threadvars_only_sg);
  983. read_var_decs(false,false,true);
  984. end;
  985. procedure resourcestring_dec;
  986. var
  987. name : stringid;
  988. p : ptree;
  989. storetokenpos,filepos : tfileposinfo;
  990. old_block_type : tblock_type;
  991. sp : pchar;
  992. begin
  993. consume(_RESOURCESTRING);
  994. if not(symtablestack^.symtabletype in [staticsymtable,globalsymtable]) then
  995. message(parser_e_resourcestring_only_sg);
  996. old_block_type:=block_type;
  997. block_type:=bt_const;
  998. repeat
  999. name:=pattern;
  1000. filepos:=tokenpos;
  1001. consume(_ID);
  1002. case token of
  1003. _EQUAL:
  1004. begin
  1005. consume(_EQUAL);
  1006. p:=comp_expr(true);
  1007. do_firstpass(p);
  1008. storetokenpos:=tokenpos;
  1009. tokenpos:=filepos;
  1010. case p^.treetype of
  1011. ordconstn:
  1012. begin
  1013. if is_constcharnode(p) then
  1014. begin
  1015. getmem(sp,2);
  1016. sp[0]:=chr(p^.value);
  1017. sp[1]:=#0;
  1018. symtablestack^.insert(new(pconstsym,init_string(name,constresourcestring,sp,1)));
  1019. end
  1020. else
  1021. Message(cg_e_illegal_expression);
  1022. end;
  1023. stringconstn:
  1024. begin
  1025. getmem(sp,p^.length+1);
  1026. move(p^.value_str^,sp^,p^.length+1);
  1027. symtablestack^.insert(new(pconstsym,init_string(name,constresourcestring,sp,p^.length)));
  1028. end;
  1029. else
  1030. Message(cg_e_illegal_expression);
  1031. end;
  1032. tokenpos:=storetokenpos;
  1033. consume(_SEMICOLON);
  1034. disposetree(p);
  1035. end;
  1036. else consume(_EQUAL);
  1037. end;
  1038. until token<>_ID;
  1039. block_type:=old_block_type;
  1040. end;
  1041. procedure Not_supported_for_inline(t : ttoken);
  1042. begin
  1043. if assigned(aktprocsym) and
  1044. (pocall_inline in aktprocsym^.definition^.proccalloptions) then
  1045. Begin
  1046. Message1(parser_w_not_supported_for_inline,tokenstring(t));
  1047. Message(parser_w_inlining_disabled);
  1048. {$ifdef INCLUDEOK}
  1049. exclude(aktprocsym^.definition^.proccalloptions,pocall_inline);
  1050. {$else}
  1051. aktprocsym^.definition^.proccalloptions:=aktprocsym^.definition^.proccalloptions-[pocall_inline];
  1052. {$endif}
  1053. End;
  1054. end;
  1055. procedure read_declarations(islibrary : boolean);
  1056. begin
  1057. repeat
  1058. case token of
  1059. _LABEL:
  1060. begin
  1061. Not_supported_for_inline(token);
  1062. label_dec;
  1063. end;
  1064. _CONST:
  1065. begin
  1066. Not_supported_for_inline(token);
  1067. const_dec;
  1068. end;
  1069. _TYPE:
  1070. begin
  1071. Not_supported_for_inline(token);
  1072. type_dec;
  1073. end;
  1074. _VAR:
  1075. var_dec;
  1076. _THREADVAR:
  1077. threadvar_dec;
  1078. _CONSTRUCTOR,_DESTRUCTOR,
  1079. _FUNCTION,_PROCEDURE,_OPERATOR,_CLASS:
  1080. begin
  1081. Not_supported_for_inline(token);
  1082. read_proc;
  1083. end;
  1084. _RESOURCESTRING:
  1085. resourcestring_dec;
  1086. _EXPORTS:
  1087. begin
  1088. Not_supported_for_inline(token);
  1089. { here we should be at lexlevel 1, no ? PM }
  1090. if (lexlevel<>main_program_level) or
  1091. (current_module^.is_unit) then
  1092. begin
  1093. Message(parser_e_syntax_error);
  1094. consume_all_until(_SEMICOLON);
  1095. end
  1096. else if islibrary or (target_info.target=target_i386_WIN32) then
  1097. read_exports;
  1098. end
  1099. else break;
  1100. end;
  1101. until false;
  1102. end;
  1103. procedure read_interface_declarations;
  1104. begin
  1105. {Since the body is now parsed at lexlevel 1, and the declarations
  1106. must be parsed at the same lexlevel we increase the lexlevel.}
  1107. inc(lexlevel);
  1108. repeat
  1109. case token of
  1110. _CONST : const_dec;
  1111. _TYPE : type_dec;
  1112. _VAR : var_dec;
  1113. _THREADVAR : threadvar_dec;
  1114. _RESOURCESTRING:
  1115. resourcestring_dec;
  1116. _FUNCTION,
  1117. _PROCEDURE,
  1118. _OPERATOR : read_proc;
  1119. else
  1120. break;
  1121. end;
  1122. until false;
  1123. dec(lexlevel);
  1124. end;
  1125. end.
  1126. {
  1127. $Log$
  1128. Revision 1.177 2000-01-10 11:14:19 peter
  1129. * fixed memory leak with options, you must use StopOptions instead of
  1130. Stop
  1131. * fixed memory leak with forward resolving, make_ref is now false
  1132. Revision 1.176 2000/01/07 01:14:28 peter
  1133. * updated copyright to 2000
  1134. Revision 1.175 1999/12/10 10:04:21 peter
  1135. * also check elementtype of arraydef for forwarddef
  1136. Revision 1.174 1999/12/01 12:42:32 peter
  1137. * fixed bug 698
  1138. * removed some notes about unused vars
  1139. Revision 1.173 1999/11/30 10:40:44 peter
  1140. + ttype, tsymlist
  1141. Revision 1.172 1999/11/29 15:18:27 pierre
  1142. + allow exports in win32 executables
  1143. Revision 1.171 1999/11/09 23:43:08 pierre
  1144. * better browser info
  1145. Revision 1.170 1999/11/09 23:06:45 peter
  1146. * esi_offset -> selfpointer_offset to be newcg compatible
  1147. * hcogegen -> cgbase fixes for newcg
  1148. Revision 1.169 1999/11/09 12:58:29 peter
  1149. * support absolute unit.variable
  1150. Revision 1.168 1999/11/06 14:34:21 peter
  1151. * truncated log to 20 revs
  1152. Revision 1.167 1999/10/26 12:30:44 peter
  1153. * const parameter is now checked
  1154. * better and generic check if a node can be used for assigning
  1155. * export fixes
  1156. * procvar equal works now (it never had worked at least from 0.99.8)
  1157. * defcoll changed to linkedlist with pparaitem so it can easily be
  1158. walked both directions
  1159. Revision 1.166 1999/10/22 10:39:34 peter
  1160. * split type reading from pdecl to ptype unit
  1161. * parameter_dec routine is now used for procedure and procvars
  1162. Revision 1.165 1999/10/21 16:41:41 florian
  1163. * problems with readln fixed: esi wasn't restored correctly when
  1164. reading ordinal fields of objects futher the register allocation
  1165. didn't take care of the extra register when reading ordinal values
  1166. * enumerations can now be used in constant indexes of properties
  1167. Revision 1.164 1999/10/14 14:57:52 florian
  1168. - removed the hcodegen use in the new cg, use cgbase instead
  1169. Revision 1.163 1999/10/06 17:39:14 peter
  1170. * fixed stabs writting for forward types
  1171. Revision 1.162 1999/10/03 19:44:42 peter
  1172. * removed objpasunit reference, tvarrec is now searched in systemunit
  1173. where it already was located
  1174. Revision 1.161 1999/10/01 11:18:02 peter
  1175. * class/record type forward checking fixed
  1176. Revision 1.159 1999/10/01 10:05:42 peter
  1177. + procedure directive support in const declarations, fixes bug 232
  1178. Revision 1.158 1999/10/01 08:02:46 peter
  1179. * forward type declaration rewritten
  1180. Revision 1.157 1999/09/27 23:44:53 peter
  1181. * procinfo is now a pointer
  1182. * support for result setting in sub procedure
  1183. Revision 1.156 1999/09/26 21:30:19 peter
  1184. + constant pointer support which can happend with typecasting like
  1185. const p=pointer(1)
  1186. * better procvar parsing in typed consts
  1187. Revision 1.155 1999/09/20 16:38:59 peter
  1188. * cs_create_smart instead of cs_smartlink
  1189. * -CX is create smartlink
  1190. * -CD is create dynamic, but does nothing atm.
  1191. Revision 1.154 1999/09/15 22:09:24 florian
  1192. + rtti is now automatically generated for published classes, i.e.
  1193. they are handled like an implicit property
  1194. Revision 1.153 1999/09/14 11:09:08 florian
  1195. * per default a property is stored, fixed
  1196. Revision 1.152 1999/09/12 14:50:50 florian
  1197. + implemented creation of methodname/address tables
  1198. Revision 1.151 1999/09/12 08:48:09 florian
  1199. * bugs 593 and 607 fixed
  1200. * some other potential bugs with array constructors fixed
  1201. * for classes compiled in $M+ and it's childs, the default access method
  1202. is now published
  1203. * fixed copyright message (it is now 1998-2000)
  1204. Revision 1.150 1999/09/10 20:57:33 florian
  1205. * some more fixes for stored properties
  1206. Revision 1.149 1999/09/10 18:48:07 florian
  1207. * some bug fixes (e.g. must_be_valid and procinfo^.funcret_is_valid)
  1208. * most things for stored properties fixed
  1209. Revision 1.148 1999/09/08 21:06:06 michael
  1210. * Stored specifier for properties is now correctly parsed
  1211. Revision 1.147 1999/09/02 09:23:51 peter
  1212. * fixed double dispose of propsymlist
  1213. }