Browse Source

* applied several fixes to get the DD8 Delphi Unit compiled
e.g. "forward"-interfaces are working now

florian 24 years ago
parent
commit
64d7d5682e
8 changed files with 59 additions and 19 deletions
  1. 6 2
      compiler/globals.pas
  2. 6 2
      compiler/hcgdata.pas
  3. 6 2
      compiler/ninl.pas
  4. 8 3
      compiler/pdecl.pas
  5. 10 2
      compiler/pdecobj.pas
  6. 10 3
      compiler/pdecvar.pas
  7. 7 3
      compiler/symdef.pas
  8. 6 2
      compiler/types.pas

+ 6 - 2
compiler/globals.pas

@@ -1158,7 +1158,7 @@ implementation
            ishexstr(copy(s,2,8)) and ishexstr(copy(s,11,4)) and
            ishexstr(copy(s,2,8)) and ishexstr(copy(s,11,4)) and
            ishexstr(copy(s,16,4)) and ishexstr(copy(s,21,4)) and
            ishexstr(copy(s,16,4)) and ishexstr(copy(s,21,4)) and
            ishexstr(copy(s,26,12)) then begin
            ishexstr(copy(s,26,12)) then begin
-          GUID.D1:=hexstr2longint(copy(s,2,8));
+          GUID.D1:=dword(hexstr2longint(copy(s,2,8)));
           GUID.D2:=hexstr2longint(copy(s,11,4));
           GUID.D2:=hexstr2longint(copy(s,11,4));
           GUID.D3:=hexstr2longint(copy(s,16,4));
           GUID.D3:=hexstr2longint(copy(s,16,4));
           for i:=0 to 1 do
           for i:=0 to 1 do
@@ -1341,7 +1341,11 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.28  2001-02-20 21:41:16  peter
+  Revision 1.29  2001-04-04 21:30:42  florian
+    * applied several fixes to get the DD8 Delphi Unit compiled
+     e.g. "forward"-interfaces are working now
+
+  Revision 1.28  2001/02/20 21:41:16  peter
     * new fixfilename, findfile for unix. Look first for lowercase, then
     * new fixfilename, findfile for unix. Look first for lowercase, then
       NormalCase and last for UPPERCASE names.
       NormalCase and last for UPPERCASE names.
 
 

+ 6 - 2
compiler/hcgdata.pas

@@ -1054,7 +1054,7 @@ implementation
           if (cs_create_smart in aktmoduleswitches) then
           if (cs_create_smart in aktmoduleswitches) then
             dataSegment.concat(Tai_cut.Create);
             dataSegment.concat(Tai_cut.Create);
           dataSegment.concat(Tai_symbol.Createname_global('IID$_'+s1,0));
           dataSegment.concat(Tai_symbol.Createname_global('IID$_'+s1,0));
-          dataSegment.concat(Tai_const.Create_32bit(c^.iidguid.D1));
+          dataSegment.concat(Tai_const.Create_32bit(longint(c^.iidguid.D1)));
           dataSegment.concat(Tai_const.Create_16bit(c^.iidguid.D2));
           dataSegment.concat(Tai_const.Create_16bit(c^.iidguid.D2));
           dataSegment.concat(Tai_const.Create_16bit(c^.iidguid.D3));
           dataSegment.concat(Tai_const.Create_16bit(c^.iidguid.D3));
           for i:=Low(c^.iidguid.D4) to High(c^.iidguid.D4) do
           for i:=Low(c^.iidguid.D4) to High(c^.iidguid.D4) do
@@ -1070,7 +1070,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.17  2000-12-25 00:07:26  peter
+  Revision 1.18  2001-04-04 21:30:43  florian
+    * applied several fixes to get the DD8 Delphi Unit compiled
+     e.g. "forward"-interfaces are working now
+
+  Revision 1.17  2000/12/25 00:07:26  peter
     + new tlinkedlist class (merge of old tstringqueue,tcontainer and
     + new tlinkedlist class (merge of old tstringqueue,tcontainer and
       tlinkedlist objects)
       tlinkedlist objects)
 
 

+ 6 - 2
compiler/ninl.pas

@@ -988,7 +988,7 @@ implementation
                        firstpass(hp);
                        firstpass(hp);
                        result:=hp;
                        result:=hp;
                     end
                     end
-                  { length of char is one allways }
+                  { length of char is one always }
                   else if is_constcharnode(left) then
                   else if is_constcharnode(left) then
                     begin
                     begin
                        hp:=cordconstnode.create(1,s32bittype);
                        hp:=cordconstnode.create(1,s32bittype);
@@ -1764,7 +1764,11 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.32  2001-04-02 21:20:31  peter
+  Revision 1.33  2001-04-04 21:30:43  florian
+    * applied several fixes to get the DD8 Delphi Unit compiled
+     e.g. "forward"-interfaces are working now
+
+  Revision 1.32  2001/04/02 21:20:31  peter
     * resulttype rewrite
     * resulttype rewrite
 
 
   Revision 1.31  2001/03/23 00:16:07  florian
   Revision 1.31  2001/03/23 00:16:07  florian

+ 8 - 3
compiler/pdecl.pas

@@ -398,9 +398,10 @@ implementation
             begin
             begin
               if (sym^.typ=typesym) then
               if (sym^.typ=typesym) then
                begin
                begin
-                 if (token=_CLASS) and
+                 if ((token=_CLASS) or
+                     (token=_INTERFACE)) and
                     (assigned(ptypesym(sym)^.restype.def)) and
                     (assigned(ptypesym(sym)^.restype.def)) and
-                    is_class(ptypesym(sym)^.restype.def) and
+                    is_class_or_interface(ptypesym(sym)^.restype.def) and
                     (oo_is_forward in pobjectdef(ptypesym(sym)^.restype.def)^.objectoptions) then
                     (oo_is_forward in pobjectdef(ptypesym(sym)^.restype.def)^.objectoptions) then
                   begin
                   begin
                     { we can ignore the result   }
                     { we can ignore the result   }
@@ -545,7 +546,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.26  2001-04-02 21:20:31  peter
+  Revision 1.27  2001-04-04 21:30:43  florian
+    * applied several fixes to get the DD8 Delphi Unit compiled
+     e.g. "forward"-interfaces are working now
+
+  Revision 1.26  2001/04/02 21:20:31  peter
     * resulttype rewrite
     * resulttype rewrite
 
 
   Revision 1.25  2001/03/11 22:58:49  peter
   Revision 1.25  2001/03/11 22:58:49  peter

+ 10 - 2
compiler/pdecobj.pas

@@ -769,7 +769,11 @@ implementation
                        if (cs_compilesystem in aktmoduleswitches) and
                        if (cs_compilesystem in aktmoduleswitches) and
                           (classtype=odt_interfacecom) and (upper(n)='IUNKNOWN') then
                           (classtype=odt_interfacecom) and (upper(n)='IUNKNOWN') then
                          interface_iunknown:=aktclass;
                          interface_iunknown:=aktclass;
-                       aktclass^.objectoptions:=aktclass^.objectoptions+[oo_is_forward];
+                       include(aktclass^.objectoptions,oo_is_forward);
+                       object_dec:=aktclass;
+                       typecanbeforward:=storetypecanbeforward;
+                       readobjecttype:=false;
+                       exit;
                      end;
                      end;
                 end;
                 end;
               _CLASS:
               _CLASS:
@@ -1165,7 +1169,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.18  2001-04-02 21:20:31  peter
+  Revision 1.19  2001-04-04 21:30:43  florian
+    * applied several fixes to get the DD8 Delphi Unit compiled
+     e.g. "forward"-interfaces are working now
+
+  Revision 1.18  2001/04/02 21:20:31  peter
     * resulttype rewrite
     * resulttype rewrite
 
 
   Revision 1.17  2001/03/16 14:56:38  marco
   Revision 1.17  2001/03/16 14:56:38  marco

+ 10 - 3
compiler/pdecvar.pas

@@ -239,7 +239,9 @@ implementation
                 { absolute address ?!? }
                 { absolute address ?!? }
                  if token=_INTCONST then
                  if token=_INTCONST then
                   begin
                   begin
-                    if (target_info.target=target_i386_go32v2) then
+                    if (target_info.target=target_i386_go32v2)
+                      or (m_objfpc in aktmodeswitches)
+                      or (m_delphi in aktmodeswitches) then
                      begin
                      begin
                        storetokenpos:=akttokenpos;
                        storetokenpos:=akttokenpos;
                        akttokenpos:=declarepos;
                        akttokenpos:=declarepos;
@@ -249,7 +251,8 @@ implementation
                        s:=pattern;
                        s:=pattern;
                        consume(_INTCONST);
                        consume(_INTCONST);
                        val(s,abssym^.address,code);
                        val(s,abssym^.address,code);
-                       if token=_COLON then
+                       if (token=_COLON) and
+                         (target_info.target=target_i386_go32v2) then
                         begin
                         begin
                           consume(token);
                           consume(token);
                           s:=pattern;
                           s:=pattern;
@@ -527,7 +530,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.12  2001-04-02 21:20:33  peter
+  Revision 1.13  2001-04-04 21:30:45  florian
+    * applied several fixes to get the DD8 Delphi Unit compiled
+     e.g. "forward"-interfaces are working now
+
+  Revision 1.12  2001/04/02 21:20:33  peter
     * resulttype rewrite
     * resulttype rewrite
 
 
   Revision 1.11  2001/03/11 22:58:50  peter
   Revision 1.11  2001/03/11 22:58:50  peter

+ 7 - 3
compiler/symdef.pas

@@ -4329,8 +4329,8 @@ Const local_symtable_index : longint = $8001;
 
 
    procedure tobjectdef.check_forwards;
    procedure tobjectdef.check_forwards;
      begin
      begin
-        if objecttype in [odt_interfacecom,odt_interfacecorba] then exit; { Kaz: ??? }
-        pstoredsymtable(symtable)^.check_forwards;
+        if not(objecttype in [odt_interfacecom,odt_interfacecorba]) then
+          pstoredsymtable(symtable)^.check_forwards;
         if (oo_is_forward in objectoptions) then
         if (oo_is_forward in objectoptions) then
           begin
           begin
              { ok, in future, the forward can be resolved }
              { ok, in future, the forward can be resolved }
@@ -5570,7 +5570,11 @@ Const local_symtable_index : longint = $8001;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.24  2001-04-02 21:20:34  peter
+  Revision 1.25  2001-04-04 21:30:45  florian
+    * applied several fixes to get the DD8 Delphi Unit compiled
+     e.g. "forward"-interfaces are working now
+
+  Revision 1.24  2001/04/02 21:20:34  peter
     * resulttype rewrite
     * resulttype rewrite
 
 
   Revision 1.23  2001/03/22 23:28:39  florian
   Revision 1.23  2001/03/22 23:28:39  florian

+ 6 - 2
compiler/types.pas

@@ -1028,7 +1028,7 @@ implementation
                   b:=((porddef(def1)^.typ=porddef(def2)^.typ) and
                   b:=((porddef(def1)^.typ=porddef(def2)^.typ) and
                    (porddef(def1)^.low=porddef(def2)^.low) and
                    (porddef(def1)^.low=porddef(def2)^.low) and
                    (porddef(def1)^.high=porddef(def2)^.high));
                    (porddef(def1)^.high=porddef(def2)^.high));
-                uvoid,uchar,
+                uvoid,uchar,uwidechar,
                 bool8bit,bool16bit,bool32bit:
                 bool8bit,bool16bit,bool32bit:
                   b:=(porddef(def1)^.typ=porddef(def2)^.typ);
                   b:=(porddef(def1)^.typ=porddef(def2)^.typ);
                 end;
                 end;
@@ -1733,7 +1733,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.37  2001-04-02 21:20:35  peter
+  Revision 1.38  2001-04-04 21:30:47  florian
+    * applied several fixes to get the DD8 Delphi Unit compiled
+     e.g. "forward"-interfaces are working now
+
+  Revision 1.37  2001/04/02 21:20:35  peter
     * resulttype rewrite
     * resulttype rewrite
 
 
   Revision 1.36  2001/03/23 00:16:07  florian
   Revision 1.36  2001/03/23 00:16:07  florian