Sfoglia il codice sorgente

* tabstractprocdef.address_type i8086-specific code moved to symcpu, ifdef i8086 removed

git-svn-id: trunk@27548 -
nickysn 11 anni fa
parent
commit
0a515311e6
2 ha cambiato i file con 12 aggiunte e 9 eliminazioni
  1. 10 0
      compiler/i8086/symcpu.pas
  2. 2 9
      compiler/symdef.pas

+ 10 - 0
compiler/i8086/symcpu.pas

@@ -99,6 +99,7 @@ type
 
   tcpuprocdef = class(tprocdef)
     constructor create(level:byte);override;
+    function address_type:tdef;override;
   end;
   tcpuprocdefclass = class of tcpuprocdef;
 
@@ -198,6 +199,15 @@ implementation
         procoptions:=procoptions+[po_far];
     end;
 
+
+  function tcpuprocdef.address_type: tdef;
+    begin
+      if po_far in procoptions then
+        result:=voidfarpointertype
+      else
+        result:=voidnearpointertype;
+    end;
+
 {****************************************************************************
                              tcpuprocvardef
 ****************************************************************************}

+ 2 - 9
compiler/symdef.pas

@@ -574,7 +574,7 @@ interface
           procedure init_paraloc_info(side: tcallercallee);
           function stack_tainting_parameter(side: tcallercallee): boolean;
           function is_pushleftright: boolean;
-          function address_type:tdef;
+          function address_type:tdef;virtual;
           procedure declared_far;virtual;
           procedure declared_near;virtual;
        private
@@ -4486,14 +4486,7 @@ implementation
 
     function tabstractprocdef.address_type: tdef;
       begin
-{$ifdef i8086}
-        if po_far in procoptions then
-          result:=voidfarpointertype
-        else
-          result:=voidnearpointertype;
-{$else i8086}
-          result:=voidpointertype;
-{$endif i8086}
+        result:=voidcodepointertype;
       end;