浏览代码

* moved generation of procsymbol after allocation of parasymtable and
localsymtable for debuginfo

git-svn-id: branches/fixes_2_0@2025 -

Jonas Maebe 20 年之前
父节点
当前提交
7ae8772895
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      compiler/psub.pas

+ 6 - 6
compiler/psub.pas

@@ -682,12 +682,6 @@ implementation
             set_first_temp_offset;
             generate_parameter_info;
 
-            { allocate the symbol associated with the procedure, so that }
-            { references to itself are not treated as references to      }
-            { externals                                                  }
-            aktfilepos:=entrypos;
-            gen_proc_symbol(symlist);
-          
             { Allocate space in temp/registers for parast and localst }
             aktfilepos:=entrypos;
             gen_alloc_symtable(aktproccode,procdef.parast);
@@ -715,6 +709,12 @@ implementation
                 procdef.has_paraloc_info:=true;
               end;
 
+            { allocate the symbol associated with the procedure, so that }
+            { references to itself are not treated as references to      }
+            { externals                                                  }
+            aktfilepos:=entrypos;
+            gen_proc_symbol(symlist);
+          
             { generate code for the node tree }
             do_secondpass(code);
             aktproccode.concatlist(exprasmlist);