symcpu.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. {
  2. Copyright (c) 2014 by Florian Klaempfl
  3. Symbol table overrides for WebAssembly
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. unit symcpu;
  18. {$i fpcdefs.inc}
  19. interface
  20. uses
  21. globtype,
  22. aasmdata,
  23. symtype,
  24. symdef,symsym,
  25. cgutils;
  26. type
  27. { defs }
  28. tcpufiledef = class(tfiledef)
  29. end;
  30. tcpufiledefclass = class of tcpufiledef;
  31. tcpuvariantdef = class(tvariantdef)
  32. end;
  33. tcpuvariantdefclass = class of tcpuvariantdef;
  34. tcpuformaldef = class(tformaldef)
  35. end;
  36. tcpuformaldefclass = class of tcpuformaldef;
  37. tcpuforwarddef = class(tforwarddef)
  38. end;
  39. tcpuforwarddefclass = class of tcpuforwarddef;
  40. tcpuundefineddef = class(tundefineddef)
  41. end;
  42. tcpuundefineddefclass = class of tcpuundefineddef;
  43. tcpuerrordef = class(terrordef)
  44. end;
  45. tcpuerrordefclass = class of tcpuerrordef;
  46. tcpupointerdef = class(tpointerdef)
  47. end;
  48. tcpupointerdefclass = class of tcpupointerdef;
  49. tcpurecorddef = class(trecorddef)
  50. end;
  51. tcpurecorddefclass = class of tcpurecorddef;
  52. tcpuimplementedinterface = class(timplementedinterface)
  53. end;
  54. tcpuimplementedinterfaceclass = class of tcpuimplementedinterface;
  55. tcpuobjectdef = class(tobjectdef)
  56. end;
  57. tcpuobjectdefclass = class of tcpuobjectdef;
  58. tcpuclassrefdef = class(tclassrefdef)
  59. end;
  60. tcpuclassrefdefclass = class of tcpuclassrefdef;
  61. tcpuarraydef = class(tarraydef)
  62. end;
  63. tcpuarraydefclass = class of tcpuarraydef;
  64. tcpuorddef = class(torddef)
  65. end;
  66. tcpuorddefclass = class of tcpuorddef;
  67. tcpufloatdef = class(tfloatdef)
  68. end;
  69. tcpufloatdefclass = class of tcpufloatdef;
  70. { tcpuprocvardef }
  71. tcpuprocvardef = class(tprocvardef)
  72. end;
  73. tcpuprocvardefclass = class of tcpuprocvardef;
  74. { tcpuprocdef }
  75. tcpuprocdef = class(tprocdef)
  76. frame_pointer_ref,
  77. base_pointer_ref: treference;
  78. { generated assembler code; used by WebAssembly backend so it can afterwards
  79. easily write out all methods grouped per class }
  80. exprasmlist : TAsmList;
  81. destructor destroy; override;
  82. end;
  83. tcpuprocdefclass = class of tcpuprocdef;
  84. tcpustringdef = class(tstringdef)
  85. end;
  86. tcpustringdefclass = class of tcpustringdef;
  87. tcpuenumdef = class(tenumdef)
  88. protected
  89. procedure ppuload_platform(ppufile: tcompilerppufile); override;
  90. procedure ppuwrite_platform(ppufile: tcompilerppufile); override;
  91. public
  92. { class representing this enum on the Java side }
  93. classdef : tobjectdef;
  94. classdefderef : tderef;
  95. function getcopy: tstoreddef; override;
  96. procedure buildderef; override;
  97. procedure deref; override;
  98. end;
  99. tcpuenumdefclass = class of tcpuenumdef;
  100. tcpusetdef = class(tsetdef)
  101. end;
  102. tcpusetdefclass = class of tcpusetdef;
  103. { syms }
  104. tcpulabelsym = class(tlabelsym)
  105. end;
  106. tcpulabelsymclass = class of tcpulabelsym;
  107. tcpuunitsym = class(tunitsym)
  108. end;
  109. tcpuunitsymclass = class of tcpuunitsym;
  110. tcpuprogramparasym = class(tprogramparasym)
  111. end;
  112. tcpuprogramparasymclass = class(tprogramparasym);
  113. tcpunamespacesym = class(tnamespacesym)
  114. end;
  115. tcpunamespacesymclass = class of tcpunamespacesym;
  116. { tcpuprocsym }
  117. tcpuprocsym = class(tprocsym)
  118. end;
  119. tcpuprocsymclass = class of tcpuprocsym;
  120. tcputypesym = class(ttypesym)
  121. end;
  122. tcpuypesymclass = class of tcputypesym;
  123. tcpufieldvarsym = class(tfieldvarsym)
  124. end;
  125. tcpufieldvarsymclass = class of tcpufieldvarsym;
  126. tcpulocalvarsym = class(tlocalvarsym)
  127. end;
  128. tcpulocalvarsymclass = class of tcpulocalvarsym;
  129. tcpuparavarsym = class(tparavarsym)
  130. end;
  131. tcpuparavarsymclass = class of tcpuparavarsym;
  132. tcpustaticvarsym = class(tstaticvarsym)
  133. end;
  134. tcpustaticvarsymclass = class of tcpustaticvarsym;
  135. tcpuabsolutevarsym = class(tabsolutevarsym)
  136. end;
  137. tcpuabsolutevarsymclass = class of tcpuabsolutevarsym;
  138. tcpupropertysym = class(tpropertysym)
  139. protected
  140. { when a private/protected field is exposed via a property with a higher
  141. visibility, then we have to create a getter and/or setter with that same
  142. higher visibility to make sure that using the property does not result
  143. in JVM verification errors }
  144. procedure create_getter_or_setter_for_property(orgaccesspd: tprocdef; getter: boolean);
  145. procedure finalize_getter_or_setter_for_sym(getset: tpropaccesslisttypes; sym: tsym; fielddef: tdef; accessordef: tprocdef); override;
  146. procedure maybe_create_overridden_getter_or_setter(getset: tpropaccesslisttypes);
  147. public
  148. procedure inherit_accessor(getset: tpropaccesslisttypes); override;
  149. end;
  150. tcpupropertysymclass = class of tcpupropertysym;
  151. tcpuconstsym = class(tconstsym)
  152. end;
  153. tcpuconstsymclass = class of tcpuconstsym;
  154. tcpuenumsym = class(tenumsym)
  155. end;
  156. tcpuenumsymclass = class of tcpuenumsym;
  157. tcpusyssym = class(tsyssym)
  158. end;
  159. tcpusyssymclass = class of tcpusyssym;
  160. const
  161. pbestrealtype : ^tdef = @s64floattype;
  162. implementation
  163. uses
  164. verbose,cutils,cclasses,globals,
  165. symconst,symbase,symtable,symcreat,wasmdef,
  166. pdecsub,pparautl,paramgr,
  167. // high-level code generator is needed to get access to type index for ncall
  168. hlcgobj,hlcgcpu
  169. ;
  170. {****************************************************************************
  171. tcpuproptertysym
  172. ****************************************************************************}
  173. procedure tcpupropertysym.create_getter_or_setter_for_property(orgaccesspd: tprocdef; getter: boolean);
  174. var
  175. obj: tabstractrecorddef;
  176. ps: tprocsym;
  177. pvs: tparavarsym;
  178. sym: tsym;
  179. pd, parentpd, accessorparapd: tprocdef;
  180. tmpaccesslist: tpropaccesslist;
  181. callthroughpropname,
  182. accessorname: string;
  183. callthroughprop: tpropertysym;
  184. accesstyp: tpropaccesslisttypes;
  185. accessortyp: tprocoption;
  186. procoptions: tprocoptions;
  187. paranr: word;
  188. explicitwrapper: boolean;
  189. begin
  190. obj:=current_structdef;
  191. { if someone gets the idea to add a property to an external class
  192. definition, don't try to wrap it since we cannot add methods to
  193. external classes }
  194. if oo_is_external in obj.objectoptions then
  195. exit;
  196. symtablestack.push(obj.symtable);
  197. try
  198. if getter then
  199. accesstyp:=palt_read
  200. else
  201. accesstyp:=palt_write;
  202. { we can't use str_parse_method_dec here because the type of the field
  203. may not be visible at the Pascal level }
  204. explicitwrapper:=
  205. { private methods are not visibile outside the current class, so
  206. no use in making life harder for us by introducing potential
  207. (future or current) naming conflicts }
  208. (visibility<>vis_private) and
  209. (getter and
  210. (prop_auto_getter_prefix<>'')) or
  211. (not getter and
  212. (prop_auto_setter_prefix<>''));
  213. sym:=nil;
  214. if getter then
  215. accessortyp:=po_is_auto_getter
  216. else
  217. accessortyp:=po_is_auto_setter;
  218. procoptions:=[accessortyp];
  219. if explicitwrapper then
  220. begin
  221. if getter then
  222. accessorname:=prop_auto_getter_prefix+realname
  223. else
  224. accessorname:=prop_auto_setter_prefix+realname;
  225. sym:=search_struct_member_no_helper(obj,upper(accessorname));
  226. if assigned(sym) then
  227. begin
  228. if ((sym.typ<>procsym) or
  229. (tprocsym(sym).procdeflist.count<>1) or
  230. not(accessortyp in tprocdef(tprocsym(sym).procdeflist[0]).procoptions)) and
  231. (not assigned(orgaccesspd) or
  232. (sym<>orgaccesspd.procsym)) then
  233. begin
  234. MessagePos2(fileinfo,parser_e_cannot_generate_property_getter_setter,accessorname,FullTypeName(tdef(sym.owner.defowner),nil)+'.'+accessorname);
  235. exit;
  236. end
  237. else
  238. begin
  239. if accessorname<>sym.realname then
  240. MessagePos2(fileinfo,parser_w_case_difference_auto_property_getter_setter_prefix,sym.realname,accessorname);
  241. { is the specified getter/setter defined in the current
  242. struct and was it originally specified as the getter/
  243. setter for this property? If so, simply adjust its
  244. visibility if necessary.
  245. }
  246. if assigned(orgaccesspd) then
  247. parentpd:=orgaccesspd
  248. else
  249. parentpd:=tprocdef(tprocsym(sym).procdeflist[0]);
  250. if parentpd.owner.defowner=owner.defowner then
  251. begin
  252. if parentpd.visibility<visibility then
  253. begin
  254. parentpd.visibility:=visibility;
  255. include(parentpd.procoptions,po_auto_raised_visibility);
  256. end;
  257. { we are done, no need to create a wrapper }
  258. exit
  259. end
  260. { a parent already included this getter/setter -> try to
  261. override it }
  262. else if parentpd.visibility<>vis_private then
  263. begin
  264. if po_virtualmethod in parentpd.procoptions then
  265. begin
  266. procoptions:=procoptions+[po_virtualmethod,po_overridingmethod];
  267. if not(parentpd.synthetickind in [tsk_field_getter,tsk_field_setter]) then
  268. Message2(parser_w_overriding_property_getter_setter,accessorname,FullTypeName(tdef(parentpd.owner.defowner),nil));
  269. end;
  270. { otherwise we can't do anything, and
  271. proc_add_definition will give an error }
  272. end;
  273. { add method with the correct visibility }
  274. pd:=tprocdef(parentpd.getcopyas(procdef,pc_normal_no_hidden,''));
  275. { get rid of the import accessorname for inherited virtual class methods,
  276. it has to be regenerated rather than amended }
  277. if [po_classmethod,po_virtualmethod]<=pd.procoptions then
  278. begin
  279. stringdispose(pd.import_name);
  280. exclude(pd.procoptions,po_has_importname);
  281. end;
  282. pd.visibility:=visibility;
  283. pd.procoptions:=pd.procoptions+procoptions;
  284. { ignore this artificially added procdef when looking for overloads }
  285. include(pd.procoptions,po_ignore_for_overload_resolution);
  286. finish_copied_procdef(pd,parentpd.procsym.realname,obj.symtable,obj);
  287. exclude(pd.procoptions,po_external);
  288. pd.synthetickind:=tsk_anon_inherited;
  289. { set the accessor in the property }
  290. propaccesslist[accesstyp].clear;
  291. propaccesslist[accesstyp].addsym(sl_call,pd.procsym);
  292. propaccesslist[accesstyp].procdef:=pd;
  293. exit;
  294. end;
  295. end;
  296. { make the artificial getter/setter virtual so we can override it in
  297. children if necessary }
  298. if not(sp_static in symoptions) and
  299. (obj.typ=objectdef) then
  300. include(procoptions,po_virtualmethod);
  301. { prevent problems in Delphi mode }
  302. include(procoptions,po_overload);
  303. end
  304. else
  305. begin
  306. { construct procsym accessorname (unique for this access; reusing the same
  307. helper for multiple accesses to the same field is hard because the
  308. propacesslist can contain subscript nodes etc) }
  309. accessorname:=visibilityName[visibility];
  310. replace(accessorname,' ','_');
  311. if getter then
  312. accessorname:=accessorname+'$getter'
  313. else
  314. accessorname:=accessorname+'$setter';
  315. end;
  316. { create procdef }
  317. if not assigned(orgaccesspd) then
  318. begin
  319. pd:=cprocdef.create(normal_function_level,true);
  320. if df_generic in obj.defoptions then
  321. include(pd.defoptions,df_generic);
  322. { method of this objectdef }
  323. pd.struct:=obj;
  324. { can only construct the artificial accessorname now, because it requires
  325. pd.unique_id_str }
  326. if not explicitwrapper then
  327. accessorname:='$'+obj.symtable.realname^+'$'+realname+'$'+accessorname+'$'+pd.unique_id_str;
  328. end
  329. else
  330. begin
  331. { getter/setter could have parameters in case of indexed access
  332. -> copy original procdef }
  333. pd:=tprocdef(orgaccesspd.getcopyas(procdef,pc_normal_no_hidden,''));
  334. exclude(pd.procoptions,po_abstractmethod);
  335. exclude(pd.procoptions,po_overridingmethod);
  336. { can only construct the artificial accessorname now, because it requires
  337. pd.unique_id_str }
  338. if not explicitwrapper then
  339. accessorname:='$'+obj.symtable.realname^+'$'+realname+'$'+accessorname+'$'+pd.unique_id_str;
  340. finish_copied_procdef(pd,accessorname,obj.symtable,obj);
  341. sym:=pd.procsym;
  342. end;
  343. { add previously collected procoptions }
  344. pd.procoptions:=pd.procoptions+procoptions;
  345. { visibility }
  346. pd.visibility:=visibility;
  347. { new procsym? }
  348. if not assigned(sym) or
  349. (sym.owner<>owner) then
  350. begin
  351. ps:=cprocsym.create(accessorname);
  352. obj.symtable.insert(ps);
  353. end
  354. else
  355. ps:=tprocsym(sym);
  356. { associate procsym with procdef}
  357. pd.procsym:=ps;
  358. { function/procedure }
  359. accessorparapd:=nil;
  360. if getter then
  361. begin
  362. pd.proctypeoption:=potype_function;
  363. pd.synthetickind:=tsk_field_getter;
  364. { result type }
  365. pd.returndef:=propdef;
  366. if (ppo_hasparameters in propoptions) and
  367. not assigned(orgaccesspd) then
  368. accessorparapd:=pd;
  369. end
  370. else
  371. begin
  372. pd.proctypeoption:=potype_procedure;
  373. pd.synthetickind:=tsk_field_setter;
  374. pd.returndef:=voidtype;
  375. if not assigned(orgaccesspd) then
  376. begin
  377. { parameter with value to set }
  378. pvs:=cparavarsym.create('__fpc_newval__',10,vs_const,propdef,[]);
  379. pd.parast.insert(pvs);
  380. end;
  381. if (ppo_hasparameters in propoptions) and
  382. not assigned(orgaccesspd) then
  383. accessorparapd:=pd;
  384. end;
  385. { create a property for the old symaccesslist with a new accessorname, so that
  386. we can reuse it in the implementation (rather than having to
  387. translate the symaccesslist back to Pascal code) }
  388. callthroughpropname:='__fpc__'+realname;
  389. if getter then
  390. callthroughpropname:=callthroughpropname+'__getter_wrapper'
  391. else
  392. callthroughpropname:=callthroughpropname+'__setter_wrapper';
  393. callthroughprop:=cpropertysym.create(callthroughpropname);
  394. callthroughprop.visibility:=visibility;
  395. if getter then
  396. makeduplicate(callthroughprop,accessorparapd,nil,paranr)
  397. else
  398. makeduplicate(callthroughprop,nil,accessorparapd,paranr);
  399. callthroughprop.default:=longint($80000000);
  400. callthroughprop.default:=0;
  401. callthroughprop.propoptions:=callthroughprop.propoptions-[ppo_stored,ppo_enumerator_current,ppo_overrides,ppo_defaultproperty];
  402. if sp_static in symoptions then
  403. include(callthroughprop.symoptions, sp_static);
  404. { copy original property target to callthrough property (and replace
  405. original one with the new empty list; will be filled in later) }
  406. tmpaccesslist:=callthroughprop.propaccesslist[accesstyp];
  407. callthroughprop.propaccesslist[accesstyp]:=propaccesslist[accesstyp];
  408. propaccesslist[accesstyp]:=tmpaccesslist;
  409. owner.insert(callthroughprop);
  410. pd.skpara:=callthroughprop;
  411. { needs to be exported }
  412. include(pd.procoptions,po_global);
  413. { class property -> static class method }
  414. if sp_static in symoptions then
  415. pd.procoptions:=pd.procoptions+[po_classmethod,po_staticmethod];
  416. { in case we made a copy of the original accessor, this has all been
  417. done already }
  418. if not assigned(orgaccesspd) then
  419. begin
  420. { calling convention }
  421. handle_calling_convention(pd,hcc_default_actions_intf_struct);
  422. { register forward declaration with procsym }
  423. proc_add_definition(pd);
  424. end;
  425. { make the property call this new function }
  426. propaccesslist[accesstyp].addsym(sl_call,ps);
  427. propaccesslist[accesstyp].procdef:=pd;
  428. finally
  429. symtablestack.pop(obj.symtable);
  430. end;
  431. end;
  432. procedure tcpupropertysym.finalize_getter_or_setter_for_sym(getset: tpropaccesslisttypes; sym: tsym; fielddef: tdef; accessordef: tprocdef);
  433. var
  434. orgaccesspd: tprocdef;
  435. pprefix: pshortstring;
  436. wrongvisibility: boolean;
  437. begin
  438. inherited;
  439. if getset=palt_read then
  440. pprefix:=@prop_auto_getter_prefix
  441. else
  442. pprefix:=@prop_auto_setter_prefix;
  443. case sym.typ of
  444. procsym:
  445. begin
  446. orgaccesspd:=tprocdef(propaccesslist[getset].procdef);
  447. wrongvisibility:=tprocdef(propaccesslist[getset].procdef).visibility<visibility;
  448. { if the visibility of the accessor is lower than
  449. the visibility of the property, wrap it so that
  450. we can call it from all contexts in which the
  451. property is visible }
  452. if wrongvisibility or
  453. ((pprefix^<>'') and
  454. (sym.RealName<>pprefix^+RealName)) then
  455. create_getter_or_setter_for_property(orgaccesspd,getset=palt_read)
  456. end;
  457. fieldvarsym:
  458. begin
  459. { if the visibility of the field is lower than the
  460. visibility of the property, wrap it in a getter
  461. so that we can access it from all contexts in
  462. which the property is visibile }
  463. if (pprefix^<>'') or
  464. (tfieldvarsym(sym).visibility<visibility) then
  465. create_getter_or_setter_for_property(nil,getset=palt_read);
  466. end;
  467. else
  468. internalerror(2014061101);
  469. end;
  470. end;
  471. procedure tcpupropertysym.maybe_create_overridden_getter_or_setter(getset: tpropaccesslisttypes);
  472. var
  473. sym: tsym;
  474. accessordef: tprocdef;
  475. psym: tpropertysym;
  476. begin
  477. { find the last defined getter/setter/field accessed by an inherited
  478. property }
  479. psym:=overriddenpropsym;
  480. while not assigned(psym.propaccesslist[getset].firstsym) do
  481. begin
  482. psym:=psym.overriddenpropsym;
  483. { if there is simply no getter/setter for this property, we're done }
  484. if not assigned(psym) then
  485. exit;
  486. end;
  487. sym:=psym.propaccesslist[getset].firstsym^.sym;
  488. case sym.typ of
  489. procsym:
  490. begin
  491. accessordef:=tprocdef(psym.propaccesslist[getset].procdef);
  492. if accessordef.visibility>=visibility then
  493. exit;
  494. end;
  495. fieldvarsym:
  496. begin
  497. if sym.visibility>=visibility then
  498. exit;
  499. accessordef:=nil;
  500. end;
  501. else
  502. internalerror(2014061102);
  503. end;
  504. propaccesslist[getset]:=psym.propaccesslist[getset].getcopy;
  505. finalize_getter_or_setter_for_sym(getset,sym,propdef,accessordef);
  506. end;
  507. procedure tcpupropertysym.inherit_accessor(getset: tpropaccesslisttypes);
  508. begin
  509. inherited;
  510. { new property has higher visibility than previous one -> maybe override
  511. the getters/setters }
  512. if assigned(overriddenpropsym) and
  513. (overriddenpropsym.visibility<visibility) then
  514. maybe_create_overridden_getter_or_setter(getset);
  515. end;
  516. {****************************************************************************
  517. tcpuenumdef
  518. ****************************************************************************}
  519. procedure tcpuenumdef.ppuload_platform(ppufile: tcompilerppufile);
  520. begin
  521. inherited;
  522. ppufile.getderef(classdefderef);
  523. end;
  524. procedure tcpuenumdef.ppuwrite_platform(ppufile: tcompilerppufile);
  525. begin
  526. inherited;
  527. ppufile.putderef(classdefderef);
  528. end;
  529. function tcpuenumdef.getcopy: tstoreddef;
  530. begin
  531. result:=inherited;
  532. tcpuenumdef(result).classdef:=classdef;
  533. end;
  534. procedure tcpuenumdef.buildderef;
  535. begin
  536. inherited;
  537. classdefderef.build(classdef);
  538. end;
  539. procedure tcpuenumdef.deref;
  540. begin
  541. inherited;
  542. classdef:=tobjectdef(classdefderef.resolve);
  543. end;
  544. {****************************************************************************
  545. tcpuprocdef
  546. ****************************************************************************}
  547. destructor tcpuprocdef.destroy;
  548. begin
  549. exprasmlist.free;
  550. inherited destroy;
  551. end;
  552. {****************************************************************************
  553. tcpuprocvardef
  554. ****************************************************************************}
  555. {****************************************************************************
  556. tcpuprocsym
  557. ****************************************************************************}
  558. {****************************************************************************
  559. tcpustaticvarsym
  560. ****************************************************************************}
  561. {****************************************************************************
  562. tcpufieldvarsym
  563. ****************************************************************************}
  564. initialization
  565. { used tdef classes }
  566. cfiledef:=tcpufiledef;
  567. cvariantdef:=tcpuvariantdef;
  568. cformaldef:=tcpuformaldef;
  569. cforwarddef:=tcpuforwarddef;
  570. cundefineddef:=tcpuundefineddef;
  571. cerrordef:=tcpuerrordef;
  572. cpointerdef:=tcpupointerdef;
  573. crecorddef:=tcpurecorddef;
  574. cimplementedinterface:=tcpuimplementedinterface;
  575. cobjectdef:=tcpuobjectdef;
  576. cclassrefdef:=tcpuclassrefdef;
  577. carraydef:=tcpuarraydef;
  578. corddef:=tcpuorddef;
  579. cfloatdef:=tcpufloatdef;
  580. cprocvardef:=tcpuprocvardef;
  581. cprocdef:=tcpuprocdef;
  582. cstringdef:=tcpustringdef;
  583. cenumdef:=tcpuenumdef;
  584. csetdef:=tcpusetdef;
  585. { used tsym classes }
  586. clabelsym:=tcpulabelsym;
  587. cunitsym:=tcpuunitsym;
  588. cprogramparasym:=tcpuprogramparasym;
  589. cnamespacesym:=tcpunamespacesym;
  590. cprocsym:=tcpuprocsym;
  591. ctypesym:=tcputypesym;
  592. cfieldvarsym:=tcpufieldvarsym;
  593. clocalvarsym:=tcpulocalvarsym;
  594. cparavarsym:=tcpuparavarsym;
  595. cstaticvarsym:=tcpustaticvarsym;
  596. cabsolutevarsym:=tcpuabsolutevarsym;
  597. cpropertysym:=tcpupropertysym;
  598. cconstsym:=tcpuconstsym;
  599. cenumsym:=tcpuenumsym;
  600. csyssym:=tcpusyssym;
  601. end.