ptconst.pas 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. {
  2. $Id$
  3. Copyright (c) 1998 by Florian Klaempfl
  4. Reads typed constants
  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 ptconst;
  19. interface
  20. uses symtable;
  21. { this procedure reads typed constants }
  22. { sym is only needed for ansi strings }
  23. { the assembler label is in the middle (PM) }
  24. procedure readtypedconst(def : pdef;sym : ptypedconstsym);
  25. implementation
  26. uses
  27. cobjects,globals,scanner,aasm,tree,pass_1,
  28. hcodegen,types,verbose
  29. { parser specific stuff }
  30. ,pbase,pexpr
  31. { processor specific stuff }
  32. {$ifdef i386}
  33. ,i386
  34. {$endif}
  35. {$ifdef m68k}
  36. ,m68k
  37. {$endif}
  38. ;
  39. { this procedure reads typed constants }
  40. procedure readtypedconst(def : pdef;sym : ptypedconstsym);
  41. var
  42. {$ifdef m68k}
  43. j : longint;
  44. {$endif m68k}
  45. {$ifdef useansistring}
  46. len : longint;
  47. {$endif}
  48. p,hp : ptree;
  49. i,l,offset,
  50. strlength : longint;
  51. lsym : pvarsym;
  52. ll : plabel;
  53. s : string;
  54. ca : pchar;
  55. aktpos : longint;
  56. pd : pprocdef;
  57. obj : pobjectdef;
  58. symt : psymtable;
  59. hp1,hp2 : pdefcoll;
  60. value : bestreal;
  61. procedure check_range;
  62. begin
  63. if ((p^.value>porddef(def)^.high) or
  64. (p^.value<porddef(def)^.low)) then
  65. begin
  66. if (cs_check_range in aktlocalswitches) then
  67. Message(parser_e_range_check_error)
  68. else
  69. Message(parser_w_range_check_error);
  70. end;
  71. end;
  72. function is_po_equal(o1,o2:longint):boolean;
  73. begin
  74. { assembler does not affect }
  75. is_po_equal:=(o1 and not(poassembler))=
  76. (o2 and not(poassembler));
  77. end;
  78. {$R-} {Range check creates problem with init_8bit(-1) !!}
  79. begin
  80. case def^.deftype of
  81. orddef:
  82. begin
  83. p:=comp_expr(true);
  84. do_firstpass(p);
  85. case porddef(def)^.typ of
  86. s8bit,
  87. u8bit : begin
  88. if not is_constintnode(p) then
  89. { is't an int expected }
  90. Message(cg_e_illegal_expression)
  91. else
  92. begin
  93. datasegment^.concat(new(pai_const,init_8bit(p^.value)));
  94. check_range;
  95. end;
  96. end;
  97. s32bit : begin
  98. if not is_constintnode(p) then
  99. Message(cg_e_illegal_expression)
  100. else
  101. begin
  102. datasegment^.concat(new(pai_const,init_32bit(p^.value)));
  103. check_range;
  104. end;
  105. end;
  106. u32bit : begin
  107. if not is_constintnode(p) then
  108. Message(cg_e_illegal_expression)
  109. else
  110. datasegment^.concat(new(pai_const,init_32bit(p^.value)));
  111. end;
  112. bool8bit : begin
  113. if not is_constboolnode(p) then
  114. Message(cg_e_illegal_expression);
  115. datasegment^.concat(new(pai_const,init_8bit(p^.value)));
  116. end;
  117. uchar : begin
  118. if not is_constcharnode(p) then
  119. Message(cg_e_illegal_expression);
  120. datasegment^.concat(new(pai_const,init_8bit(p^.value)));
  121. end;
  122. u16bit,
  123. s16bit : begin
  124. if not is_constintnode(p) then
  125. Message(cg_e_illegal_expression);
  126. datasegment^.concat(new(pai_const,init_16bit(p^.value)));
  127. check_range;
  128. end;
  129. end;
  130. disposetree(p);
  131. end;
  132. floatdef:
  133. begin
  134. p:=comp_expr(true);
  135. do_firstpass(p);
  136. if is_constrealnode(p) then
  137. value:=p^.value_real
  138. else if is_constintnode(p) then
  139. value:=p^.value
  140. else
  141. Message(cg_e_illegal_expression);
  142. case pfloatdef(def)^.typ of
  143. s64real : datasegment^.concat(new(pai_double,init(value)));
  144. s32real : datasegment^.concat(new(pai_single,init(value)));
  145. s80real : datasegment^.concat(new(pai_extended,init(value)));
  146. s64bit : datasegment^.concat(new(pai_comp,init(value)));
  147. f32bit : datasegment^.concat(new(pai_const,init_32bit(trunc(value*65536))));
  148. else internalerror(18);
  149. end;
  150. disposetree(p);
  151. end;
  152. pointerdef:
  153. begin
  154. p:=comp_expr(true);
  155. do_firstpass(p);
  156. { allows horrible ofs(typeof(TButton)^) code !! }
  157. if (p^.treetype=addrn) and (p^.left^.treetype=derefn) then
  158. begin
  159. hp:=p^.left^.left;
  160. p^.left^.left:=nil;
  161. disposetree(p);
  162. p:=hp;
  163. end;
  164. { nil pointer ? }
  165. if p^.treetype=niln then
  166. datasegment^.concat(new(pai_const,init_32bit(0)))
  167. { maybe pchar ? }
  168. else
  169. if (ppointerdef(def)^.definition^.deftype=orddef) and
  170. (porddef(ppointerdef(def)^.definition)^.typ=uchar) then
  171. begin
  172. getdatalabel(ll);
  173. datasegment^.concat(new(pai_const,init_symbol(strpnew(lab2str(ll)))));
  174. consts^.concat(new(pai_label,init(ll)));
  175. if p^.treetype=stringconstn then
  176. consts^.concat(new(pai_string,init(p^.value_str^+#0)))
  177. else
  178. if is_constcharnode(p) then
  179. consts^.concat(new(pai_string,init(char(byte(p^.value))+#0)))
  180. else
  181. Message(cg_e_illegal_expression);
  182. { insert label }
  183. end
  184. else
  185. if p^.treetype=addrn then
  186. begin
  187. if (is_equal(ppointerdef(p^.resulttype)^.definition,ppointerdef(def)^.definition) or
  188. (is_equal(ppointerdef(p^.resulttype)^.definition,voiddef)) or
  189. (is_equal(ppointerdef(def)^.definition,voiddef))) and
  190. (p^.left^.treetype = loadn) then
  191. begin
  192. if token=POINT then
  193. begin
  194. offset:=0;
  195. while token=POINT do
  196. begin
  197. consume(POINT);
  198. lsym:=pvarsym(precdef(
  199. ppointerdef(p^.resulttype)^.definition)^.symtable^.search(pattern));
  200. if assigned(sym) then
  201. offset:=offset+lsym^.address
  202. else
  203. begin
  204. Message1(sym_e_illegal_field,pattern);
  205. end;
  206. consume(ID);
  207. end;
  208. datasegment^.concat(new(pai_const_symbol_offset,init(
  209. strpnew(p^.left^.symtableentry^.mangledname),offset)));
  210. end
  211. else
  212. begin
  213. datasegment^.concat(new(pai_const,init_symbol(
  214. strpnew(p^.left^.symtableentry^.mangledname))));
  215. end;
  216. maybe_concat_external(p^.left^.symtableentry^.owner,
  217. p^.left^.symtableentry^.mangledname);
  218. end
  219. else
  220. Message(cg_e_illegal_expression);
  221. end
  222. else
  223. { allow typeof(Object type)}
  224. if (p^.treetype=inlinen) and
  225. (p^.inlinenumber=in_typeof_x) then
  226. begin
  227. if (p^.left^.treetype=typen) then
  228. begin
  229. datasegment^.concat(new(pai_const,init_symbol(
  230. strpnew(pobjectdef(p^.left^.resulttype)^.vmt_mangledname))));
  231. if pobjectdef(p^.left^.resulttype)^.owner^.symtabletype=unitsymtable then
  232. concat_external(pobjectdef(p^.left^.resulttype)^.vmt_mangledname,EXT_NEAR);
  233. end
  234. else
  235. Message(cg_e_illegal_expression);
  236. end
  237. else
  238. Message(cg_e_illegal_expression);
  239. disposetree(p);
  240. end;
  241. setdef:
  242. begin
  243. p:=comp_expr(true);
  244. do_firstpass(p);
  245. if p^.treetype=setconstn then
  246. begin
  247. { we only allow const sets }
  248. if assigned(p^.left) then
  249. Message(cg_e_illegal_expression)
  250. else
  251. begin
  252. {$ifdef i386}
  253. for l:=0 to def^.savesize-1 do
  254. datasegment^.concat(new(pai_const,init_8bit(p^.value_set^[l])));
  255. {$endif}
  256. {$ifdef m68k}
  257. j:=0;
  258. for l:=0 to ((def^.savesize-1) div 4) do
  259. { HORRIBLE HACK because of endian }
  260. { now use intel endian for constant sets }
  261. begin
  262. datasegment^.concat(new(pai_const,init_8bit(p^.value_set^[j+3])));
  263. datasegment^.concat(new(pai_const,init_8bit(p^.value_set^[j+2])));
  264. datasegment^.concat(new(pai_const,init_8bit(p^.value_set^[j+1])));
  265. datasegment^.concat(new(pai_const,init_8bit(p^.value_set^[j])));
  266. Inc(j,4);
  267. end;
  268. {$endif}
  269. end;
  270. end
  271. else
  272. Message(cg_e_illegal_expression);
  273. disposetree(p);
  274. end;
  275. enumdef:
  276. begin
  277. p:=comp_expr(true);
  278. do_firstpass(p);
  279. if p^.treetype=ordconstn then
  280. begin
  281. if is_equal(p^.resulttype,def) then
  282. datasegment^.concat(new(pai_const,init_32bit(p^.value)))
  283. else
  284. Message(cg_e_illegal_expression);
  285. end
  286. else
  287. Message(cg_e_illegal_expression);
  288. disposetree(p);
  289. end;
  290. stringdef:
  291. begin
  292. p:=comp_expr(true);
  293. do_firstpass(p);
  294. { first take care of prefixes for long and ansi strings }
  295. case pstringdef(def)^.string_typ of
  296. st_shortstring:
  297. begin
  298. if p^.treetype=stringconstn then
  299. begin
  300. {$ifdef UseAnsiString}
  301. if p^.length>=def^.size then
  302. strlength:=def^.size-1
  303. else
  304. strlength:=p^.length;
  305. datasegment^.concat(new(pai_const,init_8bit(strlength)));
  306. { this can also handle longer strings }
  307. getmem(ca,strlength+1);
  308. move(p^.value_str^,ca^,strlength);
  309. ca[strlength]:=#0;
  310. generate_pascii(datasegment,ca,strlength);
  311. {$else UseAnsiString}
  312. if length(p^.value_str^)>=def^.size then
  313. begin
  314. strlength:=def^.size-1;
  315. generate_ascii(datasegment,char(strlength)+copy(p^.value_str^,1,strlength));
  316. end
  317. else
  318. begin
  319. strlength:=length(p^.value_str^);
  320. generate_ascii(datasegment,char(strlength)+p^.value_str^);
  321. end;
  322. {$endif UseAnsiString}
  323. end
  324. else if is_constcharnode(p) then
  325. begin
  326. datasegment^.concat(new(pai_string,init(#1+char(byte(p^.value)))));
  327. strlength:=1;
  328. end
  329. else Message(cg_e_illegal_expression);
  330. if def^.size>strlength then
  331. begin
  332. getmem(ca,def^.size-strlength);
  333. { def^.size contains also the leading length, so we }
  334. { we have to subtract one }
  335. fillchar(ca[0],def^.size-strlength-1,' ');
  336. ca[def^.size-strlength-1]:=#0;
  337. {$ifdef UseAnsiString}
  338. { this can also handle longer strings }
  339. generate_pascii(datasegment,ca,def^.size-strlength-1);
  340. {$else UseAnsiString}
  341. datasegment^.concat(new(pai_string,init_pchar(ca)));
  342. {$endif UseAnsiString}
  343. end;
  344. end;
  345. {$ifdef UseLongString}
  346. st_longstring:
  347. begin
  348. if is_constcharnode(p) then
  349. strlength:=1
  350. else
  351. strlength:=p^.length;
  352. { first write the maximum size }
  353. datasegment^.concat(new(pai_const,init_32bit(strlength)))));
  354. { fill byte }
  355. datasegment^.concat(new(pai_const,init_8bit(0)));
  356. if p^.treetype=stringconstn then
  357. begin
  358. getmem(ca,strlength+1);
  359. move(p^.value_str^,ca^,strlength);
  360. ca[strlength]:=#0;
  361. generate_pascii(consts,ca,strlength);
  362. end
  363. else if is_constcharnode(p) then
  364. begin
  365. consts^.concat(new(pai_const,init_8bit(p^.value)));
  366. end
  367. else Message(cg_e_illegal_expression);
  368. datasegment^.concat(new(pai_const,init_8bit(0)));
  369. end;
  370. {$endif UseLongString}
  371. {$ifdef UseAnsiString}
  372. st_ansistring:
  373. begin
  374. { an empty ansi string is nil! }
  375. if (p^.treetype=stringconstn) and (p^.length=0) then
  376. datasegment^.concat(new(pai_const,init_32bit(0)))
  377. else
  378. begin
  379. if is_constcharnode(p) then
  380. strlength:=1
  381. else
  382. strlength:=p^.length;
  383. getdatalabel(ll);
  384. datasegment^.concat(new(pai_const,init_symbol(strpnew(lab2str(ll)))));
  385. { first write the maximum size }
  386. consts^.concat(new(pai_const,init_32bit(strlength)));
  387. { second write the real length }
  388. consts^.concat(new(pai_const,init_32bit(strlength)));
  389. { redondent with maxlength but who knows ... (PM) }
  390. { third write use count (set to -1 for safety ) }
  391. consts^.concat(new(pai_const,init_32bit(-1)));
  392. { not longer necessary, because it insert_indata
  393. if assigned(sym) then
  394. sym^.really_insert_in_data;
  395. }
  396. consts^.concat(new(pai_label,init(ll)));
  397. if p^.treetype=stringconstn then
  398. begin
  399. getmem(ca,strlength+1);
  400. move(p^.value_str^,ca^,strlength);
  401. ca[strlength]:=#0;
  402. generate_pascii(consts,ca,strlength);
  403. end
  404. else if is_constcharnode(p) then
  405. begin
  406. consts^.concat(new(pai_const,init_8bit(p^.value)));
  407. end
  408. else Message(cg_e_illegal_expression);
  409. consts^.concat(new(pai_const,init_8bit(0)));
  410. end;
  411. end;
  412. {$endif UseAnsiString}
  413. end;
  414. disposetree(p);
  415. end;
  416. arraydef:
  417. begin
  418. if token=LKLAMMER then
  419. begin
  420. consume(LKLAMMER);
  421. for l:=parraydef(def)^.lowrange to parraydef(def)^.highrange-1 do
  422. begin
  423. readtypedconst(parraydef(def)^.definition,nil);
  424. consume(COMMA);
  425. end;
  426. readtypedconst(parraydef(def)^.definition,nil);
  427. consume(RKLAMMER);
  428. end
  429. else
  430. begin
  431. p:=comp_expr(true);
  432. do_firstpass(p);
  433. if p^.treetype=stringconstn then
  434. begin
  435. {$ifdef useansistring}
  436. if p^.length>255 then
  437. len:=255
  438. else
  439. len:=p^.length;
  440. s[0]:=chr(len);
  441. move(p^.value_str^,s[1],len);
  442. {$else}
  443. s:=p^.value_str^
  444. {$endif}
  445. end
  446. else
  447. if is_constcharnode(p) then
  448. s:=char(byte(p^.value))
  449. else
  450. Message(cg_e_illegal_expression);
  451. disposetree(p);
  452. l:=length(s);
  453. for i:=Parraydef(def)^.lowrange to Parraydef(def)^.highrange do
  454. begin
  455. if i+1-Parraydef(def)^.lowrange<=l then
  456. begin
  457. datasegment^.concat(new(pai_const,init_8bit(byte(s[1]))));
  458. delete(s,1,1);
  459. end
  460. else
  461. {Fill the remaining positions with #0.}
  462. datasegment^.concat(new(pai_const,init_8bit(0)));
  463. end;
  464. if length(s)>0 then
  465. Message(parser_e_string_too_long);
  466. end;
  467. end;
  468. procvardef:
  469. begin
  470. { Procvars and pointers are no longer compatible. }
  471. { under tp: =nil or =var under fpc: =nil or =@var }
  472. if token=_NIL then
  473. begin
  474. datasegment^.concat(new(pai_const,init_32bit(0)));
  475. consume(_NIL);
  476. exit;
  477. end
  478. else
  479. if not(m_tp_procvar in aktmodeswitches) then
  480. if token=KLAMMERAFFE then
  481. consume(KLAMMERAFFE);
  482. getsym(pattern,true);
  483. consume(ID);
  484. if srsym^.typ=unitsym then
  485. begin
  486. consume(POINT);
  487. getsymonlyin(punitsym(srsym)^.unitsymtable,pattern);
  488. consume(ID);
  489. end;
  490. if srsym^.typ<>procsym then
  491. Message(cg_e_illegal_expression)
  492. else
  493. begin
  494. pd:=pprocsym(srsym)^.definition;
  495. if assigned(pd^.nextoverloaded) then
  496. Message(parser_e_no_overloaded_procvars);
  497. if is_po_equal(pprocvardef(def)^.options,pd^.options) and
  498. is_equal(pprocvardef(def)^.retdef,pd^.retdef) then
  499. begin
  500. hp1:=pprocvardef(def)^.para1;
  501. hp2:=pd^.para1;
  502. while assigned(hp1) and assigned(hp2) do
  503. begin
  504. if not(is_equal(hp1^.data,hp2^.data)) or
  505. not(hp1^.paratyp=hp2^.paratyp) then
  506. begin
  507. Message(type_e_mismatch);
  508. break;
  509. end;
  510. hp1:=hp1^.next;
  511. hp2:=hp2^.next;
  512. end;
  513. if not((hp1=nil) and (hp2=nil)) then
  514. Message(type_e_mismatch);
  515. end
  516. else
  517. Message(type_e_mismatch);
  518. datasegment^.concat(new(pai_const,init_symbol(strpnew(pd^.mangledname))));
  519. if pd^.owner^.symtabletype=unitsymtable then
  520. concat_external(pd^.mangledname,EXT_NEAR);
  521. end;
  522. end;
  523. { reads a typed constant record }
  524. recorddef:
  525. begin
  526. consume(LKLAMMER);
  527. aktpos:=0;
  528. while token<>RKLAMMER do
  529. begin
  530. s:=pattern;
  531. consume(ID);
  532. consume(COLON);
  533. srsym:=precdef(def)^.symtable^.search(s);
  534. if srsym=nil then
  535. begin
  536. Message1(sym_e_id_not_found,s);
  537. consume_all_until(SEMICOLON);
  538. end
  539. else
  540. begin
  541. { check position }
  542. if pvarsym(srsym)^.address<aktpos then
  543. Message(parser_e_invalid_record_const);
  544. { if needed fill }
  545. if pvarsym(srsym)^.address>aktpos then
  546. for i:=1 to pvarsym(srsym)^.address-aktpos do
  547. datasegment^.concat(new(pai_const,init_8bit(0)));
  548. { new position }
  549. aktpos:=pvarsym(srsym)^.address+pvarsym(srsym)^.definition^.size;
  550. { read the data }
  551. readtypedconst(pvarsym(srsym)^.definition,nil);
  552. if token=SEMICOLON then
  553. consume(SEMICOLON)
  554. else break;
  555. end;
  556. end;
  557. for i:=1 to def^.size-aktpos do
  558. datasegment^.concat(new(pai_const,init_8bit(0)));
  559. consume(RKLAMMER);
  560. end;
  561. { reads a typed object }
  562. objectdef:
  563. begin
  564. if (pobjectdef(def)^.options and (oo_hasvmt or oo_is_class))<>0 then
  565. begin
  566. Message(parser_e_type_const_not_possible);
  567. consume_all_until(RKLAMMER);
  568. end
  569. else
  570. begin
  571. consume(LKLAMMER);
  572. aktpos:=0;
  573. while token<>RKLAMMER do
  574. begin
  575. s:=pattern;
  576. consume(ID);
  577. consume(COLON);
  578. srsym:=nil;
  579. obj:=pobjectdef(def);
  580. symt:=obj^.publicsyms;
  581. while (srsym=nil) and assigned(symt) do
  582. begin
  583. srsym:=symt^.search(s);
  584. if assigned(obj) then
  585. obj:=obj^.childof;
  586. if assigned(obj) then
  587. symt:=obj^.publicsyms
  588. else
  589. symt:=nil;
  590. end;
  591. if srsym=nil then
  592. begin
  593. Message1(sym_e_id_not_found,s);
  594. consume_all_until(SEMICOLON);
  595. end
  596. else
  597. begin
  598. { check position }
  599. if pvarsym(srsym)^.address<aktpos then
  600. Message(parser_e_invalid_record_const);
  601. { if needed fill }
  602. if pvarsym(srsym)^.address>aktpos then
  603. for i:=1 to pvarsym(srsym)^.address-aktpos do
  604. datasegment^.concat(new(pai_const,init_8bit(0)));
  605. { new position }
  606. aktpos:=pvarsym(srsym)^.address+pvarsym(srsym)^.definition^.size;
  607. { read the data }
  608. readtypedconst(pvarsym(srsym)^.definition,nil);
  609. if token=SEMICOLON then
  610. consume(SEMICOLON)
  611. else break;
  612. end;
  613. end;
  614. for i:=1 to def^.size-aktpos do
  615. datasegment^.concat(new(pai_const,init_8bit(0)));
  616. consume(RKLAMMER);
  617. end;
  618. end;
  619. else Message(parser_e_type_const_not_possible);
  620. end;
  621. end;
  622. end.
  623. {
  624. $Log$
  625. Revision 1.23 1998-11-04 10:11:45 peter
  626. * ansistring fixes
  627. Revision 1.22 1998/10/20 08:06:56 pierre
  628. * several memory corruptions due to double freemem solved
  629. => never use p^.loc.location:=p^.left^.loc.location;
  630. + finally I added now by default
  631. that ra386dir translates global and unit symbols
  632. + added a first field in tsymtable and
  633. a nextsym field in tsym
  634. (this allows to obtain ordered type info for
  635. records and objects in gdb !)
  636. Revision 1.21 1998/10/19 08:55:03 pierre
  637. * wrong stabs info corrected once again !!
  638. + variable vmt offset with vmt field only if required
  639. implemented now !!!
  640. Revision 1.20 1998/10/16 08:51:49 peter
  641. + target_os.stackalignment
  642. + stack can be aligned at 2 or 4 byte boundaries
  643. Revision 1.19 1998/10/12 12:20:58 pierre
  644. + added tai_const_symbol_offset
  645. for r : pointer = @var.field;
  646. * better message for different arg names on implementation
  647. of function
  648. Revision 1.18 1998/10/12 09:50:05 florian
  649. + support of <procedure var type>:=<pointer> in delphi mode added
  650. Revision 1.17 1998/10/09 08:56:29 pierre
  651. * several memory leaks fixed
  652. Revision 1.16 1998/09/24 23:49:18 peter
  653. + aktmodeswitches
  654. Revision 1.15 1998/09/07 18:46:11 peter
  655. * update smartlinking, uses getdatalabel
  656. * renamed ptree.value vars to value_str,value_real,value_set
  657. Revision 1.14 1998/09/04 08:42:07 peter
  658. * updated some error messages
  659. Revision 1.13 1998/09/01 09:05:36 peter
  660. * fixed string[4]='.library'
  661. Revision 1.12 1998/08/31 12:26:32 peter
  662. * m68k and palmos updates from surebugfixes
  663. Revision 1.11 1998/08/10 14:50:20 peter
  664. + localswitches, moduleswitches, globalswitches splitting
  665. Revision 1.10 1998/07/21 11:16:25 florian
  666. * bug0147 fixed
  667. Revision 1.9 1998/07/20 22:17:16 florian
  668. * hex constants in numeric char (#$54#$43 ...) are now allowed
  669. * there was a bug in record_var_dec which prevents the used
  670. of nested variant records (for example drivers.tevent of tv)
  671. Revision 1.8 1998/07/20 18:40:15 florian
  672. * handling of ansi string constants should now work
  673. Revision 1.7 1998/07/18 22:54:29 florian
  674. * some ansi/wide/longstring support fixed:
  675. o parameter passing
  676. o returning as result from functions
  677. Revision 1.6 1998/06/08 22:59:52 peter
  678. * smartlinking works for win32
  679. * some defines to exclude some compiler parts
  680. Revision 1.5 1998/06/03 22:49:01 peter
  681. + wordbool,longbool
  682. * rename bis,von -> high,low
  683. * moved some systemunit loading/creating to psystem.pas
  684. Revision 1.4 1998/05/05 12:05:42 florian
  685. * problems with properties fixed
  686. * crash fixed: i:=l when i and l are undefined, was a problem with
  687. implementation of private/protected
  688. Revision 1.3 1998/04/29 10:34:00 pierre
  689. + added some code for ansistring (not complete nor working yet)
  690. * corrected operator overloading
  691. * corrected nasm output
  692. + started inline procedures
  693. + added starstarn : use ** for exponentiation (^ gave problems)
  694. + started UseTokenInfo cond to get accurate positions
  695. }