Ver Fonte

+ support for tabstractlocalsymtable.iscurrentunit(). Required so that we
don't generate imports for nested routines in the llvm code generator,
as we check whether we have to do this based on whether or not the
procdef's owner is in the current unit (and that owner is a localsymtable
in case of a nested routine)
o nested calls now work with the llvm code generator

git-svn-id: branches/hlcgllvm@27139 -

Jonas Maebe há 11 anos atrás
pai
commit
103414136d
1 ficheiros alterados com 8 adições e 0 exclusões
  1. 8 0
      compiler/symtable.pas

+ 8 - 0
compiler/symtable.pas

@@ -171,6 +171,7 @@ interface
        public
        public
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           function count_locals:longint;
           function count_locals:longint;
+          function iscurrentunit: boolean; override;
        end;
        end;
 
 
        tlocalsymtable = class(tabstractlocalsymtable)
        tlocalsymtable = class(tabstractlocalsymtable)
@@ -1925,6 +1926,13 @@ implementation
          end;
          end;
       end;
       end;
 
 
+    function tabstractlocalsymtable.iscurrentunit: boolean;
+      begin
+        Result:=
+          assigned(defowner) and
+          defowner.owner.iscurrentunit;
+      end;
+
 
 
 {****************************************************************************
 {****************************************************************************
                               TLocalSymtable
                               TLocalSymtable