Browse Source

* modifications for the new code generator

florian 26 years ago
parent
commit
7e74642b02
5 changed files with 42 additions and 12 deletions
  1. 6 2
      compiler/ag386bin.pas
  2. 6 2
      compiler/ag386nsm.pas
  3. 17 2
      compiler/pdecl.pas
  4. 9 3
      compiler/pexpr.pas
  5. 4 3
      compiler/tcflw.pas

+ 6 - 2
compiler/ag386bin.pas

@@ -501,7 +501,8 @@ unit ag386bin;
                        else if l>1 then
                          objectalloc^.sectionalign(2);
                        pai_datablock(hp)^.sym^.typ:=AS_LOCAL;
-                       pai_datablock(hp)^.sym^.setaddress(objectalloc^.currsec,objectalloc^.sectionsize,pai_datablock(hp)^.size);
+                       pai_datablock(hp)^.sym^.setaddress(objectalloc^.currsec,objectalloc^.sectionsize,
+                         pai_datablock(hp)^.size);
                        objectalloc^.sectionalloc(pai_datablock(hp)^.size);
                      end;
                    end
@@ -905,7 +906,10 @@ unit ag386bin;
 end.
 {
   $Log$
-  Revision 1.20  1999-07-31 12:33:11  peter
+  Revision 1.21  1999-08-01 18:28:09  florian
+    * modifications for the new code generator
+
+  Revision 1.20  1999/07/31 12:33:11  peter
     * fixed smartlinking
 
   Revision 1.19  1999/07/22 09:37:30  florian

+ 6 - 2
compiler/ag386nsm.pas

@@ -499,7 +499,8 @@ unit ag386nsm;
                                  sep:=#9
                                 else
                                  sep:=',';
-                                s:=s+sep+getopstr(pai386(hp)^.oper[i],pai386(hp)^.opsize,pai386(hp)^.opcode,pai386(hp)^.ops,(i=2));
+                                s:=s+sep+getopstr(pai386(hp)^.oper[i],pai386(hp)^.opsize,pai386(hp)^.opcode,
+                                  pai386(hp)^.ops,(i=2));
                               end;
                            end;
                         end;
@@ -602,7 +603,10 @@ ait_stab_function_name : ;
 end.
 {
   $Log$
-  Revision 1.46  1999-07-22 09:37:33  florian
+  Revision 1.47  1999-08-01 18:28:10  florian
+    * modifications for the new code generator
+
+  Revision 1.46  1999/07/22 09:37:33  florian
     + resourcestring implemented
     + start of longstring support
 

+ 17 - 2
compiler/pdecl.pas

@@ -57,7 +57,10 @@ unit pdecl;
 
     uses
        cobjects,scanner,aasm,tree,pass_1,strings,
-       files,types,verbose,systems,import,tccnv
+       files,types,verbose,systems,import
+{$ifndef newcg}
+       ,tccnv
+{$endif newcg}
 {$ifdef GDB}
        ,gdb
 {$endif GDB}
@@ -1129,7 +1132,10 @@ unit pdecl;
                      do_firstpass(pt);
                      if p^.proptype^.deftype=setdef then
                        begin
+{$ifndef newcg}
+                         {!!!!!!!!!!}
                          arrayconstructor_to_set(pt);
+{$endif newcg}
                          do_firstpass(pt);
                        end;
                      pt:=gentypeconvnode(pt,p^.proptype);
@@ -1439,7 +1445,9 @@ unit pdecl;
                       oldparse_only:=parse_only;
                       parse_only:=true;
                       parse_proc_dec;
+{$ifndef newcg}
                       parse_object_proc_directives(aktprocsym);
+{$endif newcg}
                       if (aktprocsym^.definition^.options and pomsgint)<>0 then
                                 aktclass^.options:=aktclass^.options or oo_hasmsgint;
                       if (aktprocsym^.definition^.options and pomsgstr)<>0 then
@@ -1454,7 +1462,9 @@ unit pdecl;
                       oldparse_only:=parse_only;
                       parse_only:=true;
                       constructor_head;
+{$ifndef newcg}
                       parse_object_proc_directives(aktprocsym);
+{$endif newcg}
                       if (aktprocsym^.definition^.options and povirtualmethod)<>0 then
                         aktclass^.options:=aktclass^.options or oo_hasvirtual;
                       parse_only:=oldparse_only;
@@ -1468,7 +1478,9 @@ unit pdecl;
                       oldparse_only:=parse_only;
                       parse_only:=true;
                       destructor_head;
+{$ifndef newcg}
                       parse_object_proc_directives(aktprocsym);
+{$endif newcg}
                       if (aktprocsym^.definition^.options and povirtualmethod)<>0 then
                         aktclass^.options:=aktclass^.options or oo_hasvirtual;
                       parse_only:=oldparse_only;
@@ -2291,7 +2303,10 @@ unit pdecl;
 end.
 {
   $Log$
-  Revision 1.137  1999-07-29 20:54:02  peter
+  Revision 1.138  1999-08-01 18:28:11  florian
+    * modifications for the new code generator
+
+  Revision 1.137  1999/07/29 20:54:02  peter
     * write .size also
 
   Revision 1.136  1999/07/27 23:42:11  peter

+ 9 - 3
compiler/pexpr.pas

@@ -48,7 +48,10 @@ unit pexpr;
     uses
        globtype,systems,tokens,
        cobjects,globals,scanner,aasm,pass_1,
-       hcodegen,types,verbose,strings,tccal
+       hcodegen,types,verbose,strings
+{$ifndef newcg}
+       ,tccal
+{$endif newcg}
        { parser specific stuff }
        ,pbase,pdecl
        { processor specific stuff }
@@ -125,7 +128,7 @@ unit pexpr;
                { support if procvar then for tp7 and many other expression like this }
                Store_valid:=Must_be_valid;
                Must_be_valid:=false;
-               firstpass(p);
+               do_firstpass(p);
                Must_be_valid:=Store_valid;
                if not(getprocvar) and (p^.resulttype^.deftype=procvardef) then
                  begin
@@ -2061,7 +2064,10 @@ unit pexpr;
 end.
 {
   $Log$
-  Revision 1.126  1999-07-30 12:28:40  peter
+  Revision 1.127  1999-08-01 18:28:13  florian
+    * modifications for the new code generator
+
+  Revision 1.126  1999/07/30 12:28:40  peter
     * fixed crash with unknown id and colon parameter in write
 
   Revision 1.125  1999/07/27 23:42:14  peter

+ 4 - 3
compiler/tcflw.pas

@@ -236,7 +236,6 @@ implementation
          old_t_times:=t_times;
          if not(cs_littlesize in aktglobalswitches) then
            t_times:=t_times*8;
-
          cleartempgen;
          if assigned(p^.t1) then
           begin
@@ -244,7 +243,6 @@ implementation
             if codegenerror then
              exit;
           end;
-
          { save counter var }
          p^.t2:=getcopy(p^.left^.left);
 
@@ -495,7 +493,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.12  1999-06-30 22:16:25  florian
+  Revision 1.13  1999-08-01 18:28:15  florian
+    * modifications for the new code generator
+
+  Revision 1.12  1999/06/30 22:16:25  florian
     * use of is_ordinal checked: often a qword/int64 isn't allowed (case/for ...)
     * small qword problems fixed