ソースを参照

* small updates for ag386bin

peter 26 年 前
コミット
e25d934e2f
4 ファイル変更60 行追加22 行削除
  1. 10 1
      compiler/assemble.pas
  2. 22 14
      compiler/cobjects.pas
  3. 6 3
      compiler/pdecl.pas
  4. 22 4
      compiler/systems.pas

+ 10 - 1
compiler/assemble.pas

@@ -27,6 +27,12 @@ interface
 uses
   dos,cobjects,globtype,globals,aasm;
 
+{$ifdef Ag386Bin}
+  {$define NoAg386Att}
+  {$define NoAg386Int}
+  {$define NoAg386Nsm}
+{$endif}
+
 const
 {$ifdef tp}
   AsmOutSize=1024;
@@ -562,7 +568,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.36  1999-02-22 02:15:01  peter
+  Revision 1.37  1999-02-24 00:59:11  peter
+    * small updates for ag386bin
+
+  Revision 1.36  1999/02/22 02:15:01  peter
     * updates for ag386bin
 
   Revision 1.35  1999/02/17 10:16:26  peter

+ 22 - 14
compiler/cobjects.pas

@@ -174,12 +174,13 @@ unit cobjects;
         end;
 
         Tnamed_object=object
-            name:Pstring;
+            _name:Pstring;
             left,right:Pnamed_object;
             speedvalue:longint;
             owner:Pdictionary;
             constructor init(const n:string);
             destructor done;virtual;
+            function name:string;
         end;
 
 {$ifdef BUFFEREDFILE}
@@ -831,23 +832,27 @@ end;
  ****************************************************************************}
 
 constructor Tnamed_object.init(const n:string);
-
 begin
-    left:=nil;
-    right:=nil;
-    name:=stringdup(n);
-    speedvalue:=getspeedvalue(n);
+  left:=nil;
+  right:=nil;
+  _name:=stringdup(n);
+  speedvalue:=getspeedvalue(n);
 end;
 
 destructor Tnamed_object.done;
+begin
+  stringdispose(_name);
+end;
 
+function Tnamed_object.name:string;
 begin
-    stringdispose(name);
+  name:=_name^;
 end;
 
+
 {****************************************************************************
                                TDICTIONARY
- ****************************************************************************}
+****************************************************************************}
 
 constructor Tdictionary.init(usehash:boolean);
 
@@ -938,8 +943,8 @@ function Tdictionary.insert(obj:Pnamed_object):Pnamed_object;
                     begin
                         new(s1);
                         new(s2);
-                        s1^:=osym^.name^;
-                        s2^:=obj^.name^;
+                        s1^:=osym^._name^;
+                        s2^:=obj^._name^;
                         if s1^>s2^ then
                             begin
                                 dispose(s2);
@@ -964,7 +969,7 @@ function Tdictionary.insert(obj:Pnamed_object):Pnamed_object;
 
 begin
     obj^.owner:=@self;
-    obj^.speedvalue:=getspeedvalue(obj^.name^);
+    obj^.speedvalue:=getspeedvalue(obj^._name^);
     if assigned(hasharray) then
         insert:=_insert(hasharray^[obj^.speedvalue mod hasharraysize])
     else
@@ -997,13 +1002,13 @@ begin
                         hp:=hp^.right
                     else
                         begin
-                            if (hp^.name^=s) then
+                            if (hp^._name^=s) then
                                 begin
                                     speedsearch:=hp;
                                     exit;
                                 end
                             else
-                                if s>hp^.name^ then
+                                if s>hp^._name^ then
                                     hp:=hp^.left
                                 else
                                     hp:=hp^.right;
@@ -1408,7 +1413,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.17  1999-01-19 11:00:33  daniel
+  Revision 1.18  1999-02-24 00:59:13  peter
+    * small updates for ag386bin
+
+  Revision 1.17  1999/01/19 11:00:33  daniel
   + Tdictionary object:  Tsymtable will become object(TTdictionary) in the
     future
   + Tnamed_item object:  Tsym will become object(Tnamed_item) in the future

+ 6 - 3
compiler/pdecl.pas

@@ -315,7 +315,7 @@ unit pdecl;
                   aktvarsym:=new(pvarsym,init_C(s,target_os.Cprefix+C_name,p));
                   tokenpos:=storetokenpos;
                   aktvarsym^.var_options:=aktvarsym^.var_options or vo_is_external;
-                  externals^.concat(new(pai_external,init(aktvarsym^.mangledname,EXT_NEAR)));
+                  concat_external(aktvarsym^.mangledname,EXT_NEAR);
                   symtablestack^.insert(aktvarsym);
                   symdone:=true;
                end;
@@ -494,7 +494,7 @@ unit pdecl;
                          importlib^.importvariable(aktvarsym^.mangledname,dll_name,C_name)
                        end
                       else
-                      externals^.concat(new(pai_external,init(aktvarsym^.mangledname,EXT_NEAR)));
+                       concat_external(aktvarsym^.mangledname,EXT_NEAR);
                     end;
                    symdone:=true;
                  end
@@ -2193,7 +2193,10 @@ unit pdecl;
 end.
 {
   $Log$
-  Revision 1.99  1999-02-22 23:33:29  florian
+  Revision 1.100  1999-02-24 00:59:14  peter
+    * small updates for ag386bin
+
+  Revision 1.99  1999/02/22 23:33:29  florian
     + message directive for integers added
 
   Revision 1.98  1999/02/22 20:13:36  florian

+ 22 - 4
compiler/systems.pas

@@ -525,15 +525,30 @@ implementation
           )
           ,(
             id     : as_i386_dbg;
-            idtxt  : 'DBG'
+            idtxt  : 'DBG';
+            asmbin : '';
+            asmcmd : '';
+            externals : true;
+            labelprefix : '';
+            comment : ''
           )
           ,(
             id     : as_i386_coff;
-            idtxt  : 'COFF'
+            idtxt  : 'COFF';
+            asmbin : '';
+            asmcmd : '';
+            externals : true;
+            labelprefix : '';
+            comment : ''
           )
           ,(
             id     : as_i386_pecoff;
-            idtxt  : 'PECOFF'
+            idtxt  : 'PECOFF';
+            asmbin : '';
+            asmcmd : '';
+            externals : true;
+            labelprefix : '';
+            comment : ''
           )
 {$endif i386}
 {$ifdef m68k}
@@ -1327,7 +1342,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.57  1999-02-22 02:15:42  peter
+  Revision 1.58  1999-02-24 00:59:16  peter
+    * small updates for ag386bin
+
+  Revision 1.57  1999/02/22 02:15:42  peter
     * updates for ag386bin
 
   Revision 1.56  1999/01/10 15:38:01  peter