Răsfoiți Sursa

* Replaced tai_ent and tai_ent_end classes with tai_directive subtypes. Having separate classes for them is unnecessary complication.

git-svn-id: trunk@25338 -
sergei 12 ani în urmă
părinte
comite
bfcdf6b825
4 a modificat fișierele cu 12 adăugiri și 63 ștergeri
  1. 7 40
      compiler/aasmtai.pas
  2. 1 17
      compiler/aggas.pas
  3. 4 4
      compiler/hlcgobj.pas
  4. 0 2
      compiler/psystem.pas

+ 7 - 40
compiler/aasmtai.pas

@@ -68,10 +68,6 @@ interface
           ait_stab,
           ait_force_line,
           ait_function_name,
-		  { Used for .ent .end pair used for .dpr section in MIPS
-		    and probably also for Alpha }
-          ait_ent,
-		  ait_ent_end,
 {$ifdef alpha}
           { the follow is for the DEC Alpha }
           ait_frame,
@@ -187,8 +183,6 @@ interface
           'stab',
           'force_line',
           'function_name',
-          'ent',
-          'ent_end',
 {$ifdef alpha}
           { the follow is for the DEC Alpha }
           'frame',
@@ -298,7 +292,7 @@ interface
       SkipInstr = [ait_comment, ait_symbol,ait_section
                    ,ait_stab, ait_function_name, ait_force_line
                    ,ait_regalloc, ait_tempalloc, ait_symbol_end
-                   ,ait_ent, ait_ent_end, ait_directive
+                   ,ait_directive
                    ,ait_varloc,
 {$ifdef JVM}
                    ait_jvar, ait_jcatch,
@@ -312,7 +306,6 @@ interface
                      ait_stab,ait_function_name,
                      ait_cutobject,ait_marker,ait_varloc,ait_align,ait_section,ait_comment,
                      ait_const,ait_directive,
-                     ait_ent, ait_ent_end,
 {$ifdef arm}
                      ait_thumb_func,
                      ait_thumb_set,
@@ -358,7 +351,9 @@ interface
         asd_reference,asd_no_dead_strip,asd_weak_reference,asd_lazy_reference,
         asd_weak_definition,
         { for Jasmin }
-        asd_jclass,asd_jinterface,asd_jsuper,asd_jfield,asd_jlimit,asd_jline
+        asd_jclass,asd_jinterface,asd_jsuper,asd_jfield,asd_jlimit,asd_jline,
+        { .ent/.end for MIPS and Alpha }
+        asd_ent,asd_ent_end
       );
 
       TAsmSehDirective=(
@@ -385,7 +380,9 @@ interface
         'extern','nasm_import', 'tc', 'reference',
         'no_dead_strip','weak_reference','lazy_reference','weak_definition',
         { for Jasmin }
-        'class','interface','super','field','limit','line'
+        'class','interface','super','field','limit','line',
+        { .ent/.end for MIPS and Alpha }
+        'ent','end'
       );
       sehdirectivestr : array[TAsmSehDirective] of string[16]=(
         '.seh_proc','.seh_endproc',
@@ -465,16 +462,6 @@ interface
           procedure derefimpl;override;
        end;
 
-       tai_ent = class(tai)
-          Name : string;
-          Constructor Create (const ProcName : String);
-       end;
-
-       tai_ent_end = class(tai)
-          Name : string;
-          Constructor Create (const ProcName : String);
-       end;
-
        tai_directive = class(tailineinfo)
           name : ansistring;
           directive : TAsmDirective;
@@ -1432,26 +1419,6 @@ implementation
         ppufile.putbyte(byte(directive));
       end;
 
-{****************************************************************************
-                               TAI_ENT / TAI_ENT_END
- ****************************************************************************}
-
-    Constructor tai_ent.Create (const ProcName : String);
-
-    begin
-      Inherited Create;
-	  Name:=ProcName;
-      typ:=ait_ent;
-    end;
-
-    Constructor tai_ent_end.Create (const ProcName : String);
-
-    begin
-      Inherited Create;
-	  Name:=ProcName;
-      typ:=ait_ent_end;
-    end;
-
 
 {****************************************************************************
                                TAI_CONST

+ 1 - 17
compiler/aggas.pas

@@ -1342,23 +1342,7 @@ implementation
              begin
                AsmWriteLn(#9'.weak '+tai_weak(hp).sym^);
              end;
-           ait_ent:
-             begin
-               AsmWrite(#9'.ent'#9);
-			   if replaceforbidden then
-                 AsmWriteLn(ReplaceForbiddenAsmSymbolChars(tai_ent(hp).Name))
-               else
-                 AsmWriteLn(tai_ent(hp).Name);
-             end;
-           ait_ent_end:
-             begin
-               AsmWrite(#9'.end'#9);
-			   if replaceforbidden then
-                 AsmWriteLn(ReplaceForbiddenAsmSymbolChars(tai_ent_end(hp).Name))
-               else
-  			     AsmWriteLn(tai_ent_end(hp).Name);
-             end;
-            ait_symbol_end :
+           ait_symbol_end :
              begin
                if tf_needs_symbol_size in target_info.flags then
                 begin

+ 4 - 4
compiler/hlcgobj.pas

@@ -3911,15 +3911,15 @@ implementation
           previtem:=item;
           item := TCmdStrListItem(item.next);
         end;
-	  if (use_ent) then
-	    list.concat(Tai_ent.create(current_procinfo.procdef.mangledname));
+      if (use_ent) then
+        list.concat(Tai_directive.create(asd_ent,current_procinfo.procdef.mangledname));
       current_procinfo.procdef.procstarttai:=tai(list.last);
     end;
 
   procedure thlcgobj.gen_proc_symbol_end(list: TAsmList);
     begin
-	  if (use_ent) then
-	    list.concat(Tai_ent_end.create(current_procinfo.procdef.mangledname));
+      if (use_ent) then
+        list.concat(Tai_directive.create(asd_ent_end,current_procinfo.procdef.mangledname));
       list.concat(Tai_symbol_end.Createname(current_procinfo.procdef.mangledname));
 
       current_procinfo.procdef.procendtai:=tai(list.last);

+ 0 - 2
compiler/psystem.pas

@@ -683,8 +683,6 @@ implementation
         aiclass[ait_stab]:=tai_stab;
         aiclass[ait_force_line]:=tai_force_line;
         aiclass[ait_function_name]:=tai_function_name;
-        aiclass[ait_ent]:=tai_ent;
-        aiclass[ait_ent_end]:=tai_ent_end;
 {$ifdef alpha}
           { the follow is for the DEC Alpha }
         aiclass[ait_frame]:=tai_frame;