|
@@ -28,7 +28,7 @@ interface
|
|
uses
|
|
uses
|
|
cclasses,constexp,
|
|
cclasses,constexp,
|
|
aasmbase,aasmcnst,
|
|
aasmbase,aasmcnst,
|
|
- symbase,symconst,symtype,symdef;
|
|
|
|
|
|
+ symbase,symconst,symtype,symdef,symsym;
|
|
|
|
|
|
type
|
|
type
|
|
|
|
|
|
@@ -60,6 +60,7 @@ interface
|
|
procedure write_header(tcb: ttai_typedconstbuilder; def: tdef; typekind: byte);
|
|
procedure write_header(tcb: ttai_typedconstbuilder; def: tdef; typekind: byte);
|
|
function write_methodkind(tcb:ttai_typedconstbuilder;def:tabstractprocdef):byte;
|
|
function write_methodkind(tcb:ttai_typedconstbuilder;def:tabstractprocdef):byte;
|
|
procedure write_callconv(tcb:ttai_typedconstbuilder;def:tabstractprocdef);
|
|
procedure write_callconv(tcb:ttai_typedconstbuilder;def:tabstractprocdef);
|
|
|
|
+ procedure write_paralocs(tcb:ttai_typedconstbuilder;parasym:tparavarsym);
|
|
public
|
|
public
|
|
constructor create;
|
|
constructor create;
|
|
procedure write_rtti(def:tdef;rt:trttitype);
|
|
procedure write_rtti(def:tdef;rt:trttitype);
|
|
@@ -81,9 +82,10 @@ implementation
|
|
cutils,
|
|
cutils,
|
|
globals,globtype,verbose,systems,
|
|
globals,globtype,verbose,systems,
|
|
fmodule, procinfo,
|
|
fmodule, procinfo,
|
|
- symtable,symsym,
|
|
|
|
|
|
+ symtable,
|
|
aasmtai,aasmdata,
|
|
aasmtai,aasmdata,
|
|
defutil,
|
|
defutil,
|
|
|
|
+ parabase,paramgr,
|
|
wpobase
|
|
wpobase
|
|
;
|
|
;
|
|
|
|
|
|
@@ -237,6 +239,27 @@ implementation
|
|
tcb.emit_ord_const(ProcCallOptionToCallConv[def.proccalloption],u8inttype);
|
|
tcb.emit_ord_const(ProcCallOptionToCallConv[def.proccalloption],u8inttype);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+
|
|
|
|
+ procedure TRTTIWriter.write_paralocs(tcb:ttai_typedconstbuilder;parasym:tparavarsym);
|
|
|
|
+ var
|
|
|
|
+ locs : trttiparalocs;
|
|
|
|
+ i : longint;
|
|
|
|
+ begin
|
|
|
|
+ locs:=paramanager.cgparalocs_to_rttiparalocs(parasym.paraloc[callerside].location);
|
|
|
|
+ if length(locs)>high(byte) then
|
|
|
|
+ internalerror(2017010601);
|
|
|
|
+ tcb.emit_ord_const(length(locs),u8inttype);
|
|
|
|
+ for i:=low(locs) to high(locs) do
|
|
|
|
+ begin
|
|
|
|
+ tcb.emit_ord_const(locs[i].loctype,u8inttype);
|
|
|
|
+ tcb.emit_ord_const(locs[i].regsub,u8inttype);
|
|
|
|
+ tcb.emit_ord_const(locs[i].regindex,u16inttype);
|
|
|
|
+ { the corresponding type for aint is alusinttype }
|
|
|
|
+ tcb.emit_ord_const(locs[i].offset,alusinttype);
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
procedure TRTTIWriter.write_rtti_name(tcb: ttai_typedconstbuilder; def: tdef);
|
|
procedure TRTTIWriter.write_rtti_name(tcb: ttai_typedconstbuilder; def: tdef);
|
|
begin
|
|
begin
|
|
if is_open_array(def) then
|
|
if is_open_array(def) then
|