Selaa lähdekoodia

Local symbols and defs that are needed for packages need to be registered as well => register the symbols and defs for the init and finalize functions.

pmodules.pas:
  * create_main_proc: register the proc's symbol
ngenutil.pas, tnodeutils:
  * create_main_procdef: register the proc's def

git-svn-id: trunk@33507 -
svenbarth 9 vuotta sitten
vanhempi
commit
e2b1f70ac6
2 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 2 0
      compiler/ngenutil.pas
  2. 2 0
      compiler/pmodules.pas

+ 2 - 0
compiler/ngenutil.pas

@@ -653,6 +653,8 @@ implementation
         pd:=cprocdef.create(main_program_level,true)
       else
         pd:=cprocdef.create(normal_function_level,true);
+      { always register the def }
+      pd.register_def;
       pd.procsym:=ps;
       ps.ProcdefList.Add(pd);
       include(pd.procoptions,po_global);

+ 2 - 0
compiler/pmodules.pas

@@ -605,6 +605,8 @@ implementation
          internalerror(200304275);
         {Generate a procsym for main}
         ps:=cprocsym.create('$'+name);
+        { always register the symbol }
+        ps.register_sym;
         { main are allways used }
         inc(ps.refs);
         st.insert(ps);