소스 검색

* parse declarations before check _ASM token

peter 23 년 전
부모
커밋
8d6f26bf4f
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      compiler/psub.pas

+ 7 - 3
compiler/psub.pas

@@ -84,6 +84,9 @@ implementation
       var
       var
          storepos : tfileposinfo;
          storepos : tfileposinfo;
       begin
       begin
+         { parse const,types and vars }
+         read_declarations(islibrary);
+
          { do we have an assembler block without the po_assembler?
          { do we have an assembler block without the po_assembler?
            we should allow this for Delphi compatibility (PFV) }
            we should allow this for Delphi compatibility (PFV) }
          if (token=_ASM) and (m_delphi in aktmodeswitches) then
          if (token=_ASM) and (m_delphi in aktmodeswitches) then
@@ -92,7 +95,6 @@ implementation
          { Handle assembler block different }
          { Handle assembler block different }
          if (po_assembler in aktprocdef.procoptions) then
          if (po_assembler in aktprocdef.procoptions) then
           begin
           begin
-            read_declarations(false);
             block:=assembler_block;
             block:=assembler_block;
             exit;
             exit;
           end;
           end;
@@ -117,7 +119,6 @@ implementation
                  symtablestack.insert(aktprocdef.resultfuncretsym);
                  symtablestack.insert(aktprocdef.resultfuncretsym);
                end;
                end;
            end;
            end;
-         read_declarations(islibrary);
 
 
          procinfo.handle_body_start;
          procinfo.handle_body_start;
 
 
@@ -818,7 +819,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.83  2002-12-29 14:57:50  peter
+  Revision 1.84  2002-12-29 18:25:18  peter
+    * parse declarations before check _ASM token
+
+  Revision 1.83  2002/12/29 14:57:50  peter
     * unit loading changed to first register units and load them
     * unit loading changed to first register units and load them
       afterwards. This is needed to support uses xxx in yyy correctly
       afterwards. This is needed to support uses xxx in yyy correctly
     * unit dependency check fixed
     * unit dependency check fixed