瀏覽代碼

Fix the handling of imports of the init and finalize functions now that the symbols are correctly registered

ngenutil.pas, tnodeutils:
  * InsertInitFinalTable: the init and finalize functions are in the *local* symboltable not the global one
  * InsertInitFinalTable.add_initfinal_import: reenable the internal error

git-svn-id: trunk@33508 -
svenbarth 9 年之前
父節點
當前提交
86478fa781
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      compiler/ngenutil.pas

+ 3 - 3
compiler/ngenutil.pas

@@ -770,8 +770,8 @@ implementation
               if foundinit and foundfini then
                 break;
             end;
-          {if not foundinit or not foundfini then
-            internalerror(2016041401);}
+          if not foundinit or not foundfini then
+            internalerror(2016041401);
         end;
 
     begin
@@ -815,7 +815,7 @@ implementation
                end
              else
                unitinits.emit_tai(Tai_const.Create_nil_codeptr,voidcodepointertype);
-             add_initfinal_import(hp.u.globalsymtable);
+             add_initfinal_import(hp.u.localsymtable);
              inc(count);
            end;
          hp:=tused_unit(hp.next);