From e93660c17041c9226443a32509316293a2b7dd4a Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Thu, 30 Jul 2015 16:58:07 +0000 Subject: [PATCH] - removed ttai_lowleveltypedconstbuilder.queue_addrn(), as we are always implicitly taking the address of a complex expression in a typed constant (you cannot put the contents of another memory location in a typed constant) git-svn-id: trunk@31252 - --- compiler/aasmcnst.pas | 7 ------- compiler/llvm/nllvmtcon.pas | 1 - compiler/ngtcon.pas | 11 +++-------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/compiler/aasmcnst.pas b/compiler/aasmcnst.pas index f5164b8056..0b9cdfdd96 100644 --- a/compiler/aasmcnst.pas +++ b/compiler/aasmcnst.pas @@ -343,8 +343,6 @@ type function queue_subscriptn_multiple_by_name(def: tabstractrecorddef; const fields: array of TIDString): tdef; { queue a type conversion operation } procedure queue_typeconvn(fromdef, todef: tdef); virtual; - { queue an address taking operation } - procedure queue_addrn(fromdef, todef: tdef); virtual; { finalise the queue (so a new one can be created) and flush the previously queued operations, applying them in reverse order on a...} { ... procdef } @@ -1534,11 +1532,6 @@ implementation { do nothing } end; - procedure ttai_typedconstbuilder.queue_addrn(fromdef, todef: tdef); - begin - { do nothing } - end; - procedure ttai_typedconstbuilder.queue_emit_proc(pd: tprocdef); begin diff --git a/compiler/llvm/nllvmtcon.pas b/compiler/llvm/nllvmtcon.pas index 3d3bac2c24..e13b852edb 100644 --- a/compiler/llvm/nllvmtcon.pas +++ b/compiler/llvm/nllvmtcon.pas @@ -313,7 +313,6 @@ implementation { pointerdef to the string data array } dataptrdef:=cpointerdef.getreusable(field.vardef); queue_init(charptrdef); - queue_addrn(dataptrdef,charptrdef); queue_subscriptn(strrecdef,field); queue_emit_asmsym(ll.lab,strrecdef); end diff --git a/compiler/ngtcon.pas b/compiler/ngtcon.pas index 9f1b7327eb..a14e255162 100644 --- a/compiler/ngtcon.pas +++ b/compiler/ngtcon.pas @@ -851,9 +851,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis { we now emit the address of the first element of the array containing the string data } ftcb.queue_init(def); - { address of ... } - ftcb.queue_addrn(def.pointeddef,def); - { ... the first element ... } + { the first element ... } ftcb.queue_vecn(datadef,0); { ... of the string array } ftcb.queue_emit_asmsym(ll,datadef); @@ -888,9 +886,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis { we now emit the address of the first element of the array containing the string data } ftcb.queue_init(def); - { address of ... } - ftcb.queue_addrn(def.pointeddef,def); - { ... the first element ... } + { the first element ... } ftcb.queue_vecn(datadef,0); { ... of the string array } ftcb.queue_emit_asmsym(ll,datadef); @@ -932,7 +928,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis ftcb.queue_typeconvn(ttypeconvnode(hp).left.resultdef,hp.resultdef); end; addrn : - ftcb.queue_addrn(taddrnode(hp).left.resultdef,hp.resultdef); + { nothing, is implicit }; else Message(parser_e_illegal_expression); end; @@ -1357,7 +1353,6 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis { remove addrn which we also don't need here } if n.nodetype=addrn then begin - ftcb.queue_addrn(taddrnode(n).left.resultdef,n.resultdef); tmpn:=taddrnode(n).left; taddrnode(n).left:=nil; n.free;