浏览代码

compiler: remove unneeded push/pop to symtablestack

git-svn-id: trunk@25518 -
paul 12 年之前
父节点
当前提交
2fa739f729
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      compiler/pmodules.pas

+ 1 - 2
compiler/pmodules.pas

@@ -875,7 +875,6 @@ type
          addmoduleclass;
          addmoduleclass;
 {$endif}
 {$endif}
          read_interface_declarations;
          read_interface_declarations;
-         symtablestack.pop(current_module.globalsymtable);
 
 
          { Export macros defined in the interface for macpas. The macros
          { Export macros defined in the interface for macpas. The macros
            are put in the globalmacrosymtable that will only be used by other
            are put in the globalmacrosymtable that will only be used by other
@@ -891,6 +890,7 @@ type
           begin
           begin
             Message1(unit_f_errors_in_unit,tostr(Errorcount));
             Message1(unit_f_errors_in_unit,tostr(Errorcount));
             status.skip_error:=true;
             status.skip_error:=true;
+            symtablestack.pop(current_module.globalsymtable);
             exit;
             exit;
           end;
           end;
 
 
@@ -920,7 +920,6 @@ type
          { Insert _GLOBAL_OFFSET_TABLE_ symbol if system uses it }
          { Insert _GLOBAL_OFFSET_TABLE_ symbol if system uses it }
          maybe_load_got;
          maybe_load_got;
 
 
-         symtablestack.push(current_module.globalsymtable);
          if not current_module.interface_only then
          if not current_module.interface_only then
            begin
            begin
              consume(_IMPLEMENTATION);
              consume(_IMPLEMENTATION);