+ override tabstractprocdef.getcopyas for i8086, so it preserves the po_far

option (so that for far procedures, a far procdef is created)

git-svn-id: trunk@38601 -
This commit is contained in:
nickysn 2018-03-22 23:22:26 +00:00
parent 64297e9c96
commit 3b70fc628c

View File

@ -110,6 +110,7 @@ type
tcpuprocvardef = class(ti86procvardef)
constructor create(level:byte);override;
function getcopyas(newtyp:tdeftyp;copytyp:tproccopytyp):tstoreddef;override;
function address_type:tdef;override;
function size:asizeint;override;
procedure declared_far;override;
@ -130,6 +131,7 @@ type
function default_far:boolean;
public
constructor create(level:byte;doregister:boolean);override;
function getcopyas(newtyp:tdeftyp;copytyp:tproccopytyp):tstoreddef;override;
function address_type:tdef;override;
function size:asizeint;override;
procedure declared_far;override;
@ -329,6 +331,16 @@ implementation
end;
function tcpuprocdef.getcopyas(newtyp:tdeftyp;copytyp:tproccopytyp):tstoreddef;
begin
result:=inherited;
if is_far then
include(tabstractprocdef(result).procoptions,po_far)
else
exclude(tabstractprocdef(result).procoptions,po_far);
end;
function tcpuprocdef.address_type: tdef;
begin
if is_far then
@ -398,6 +410,16 @@ implementation
end;
function tcpuprocvardef.getcopyas(newtyp:tdeftyp;copytyp:tproccopytyp):tstoreddef;
begin
result:=inherited;
if is_far then
include(tabstractprocdef(result).procoptions,po_far)
else
exclude(tabstractprocdef(result).procoptions,po_far);
end;
function tcpuprocvardef.address_type:tdef;
begin
if is_addressonly then