Browse Source

* small problems with DOM and excpetions fixed (code generation
of raise was wrong and self was sometimes destroyed :()

florian 27 years ago
parent
commit
39584dd9f6
3 changed files with 19 additions and 5 deletions
  1. 6 1
      compiler/cg386cal.pas
  2. 7 2
      compiler/cg386flw.pas
  3. 6 2
      compiler/tcmem.pas

+ 6 - 1
compiler/cg386cal.pas

@@ -895,6 +895,7 @@ implementation
                                       begin
                                       begin
                                          secondpass(p^.methodpointer);
                                          secondpass(p^.methodpointer);
                                          case p^.methodpointer^.location.loc of
                                          case p^.methodpointer^.location.loc of
+                                            LOC_CREGISTER,
                                             LOC_REGISTER:
                                             LOC_REGISTER:
                                               begin
                                               begin
                                                  ungetregister32(p^.methodpointer^.location.register);
                                                  ungetregister32(p^.methodpointer^.location.register);
@@ -1436,7 +1437,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.29  1998-09-25 00:04:00  florian
+  Revision 1.30  1998-09-26 15:03:02  florian
+    * small problems with DOM and excpetions fixed (code generation
+      of raise was wrong and self was sometimes destroyed :()
+
+  Revision 1.29  1998/09/25 00:04:00  florian
     * problems when calling class methods fixed
     * problems when calling class methods fixed
 
 
   Revision 1.28  1998/09/24 14:27:37  peter
   Revision 1.28  1998/09/24 14:27:37  peter

+ 7 - 2
compiler/cg386flw.pas

@@ -539,7 +539,8 @@ do_jmp:
 
 
               case p^.left^.location.loc of
               case p^.left^.location.loc of
                  LOC_MEM,LOC_REFERENCE:
                  LOC_MEM,LOC_REFERENCE:
-                   emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
+                   exprasmlist^.concat(new(pai386,op_ref(A_PUSH,S_L,
+                       newreference(p^.left^.location.reference))));
                  LOC_CREGISTER,LOC_REGISTER : exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,
                  LOC_CREGISTER,LOC_REGISTER : exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,
                        p^.left^.location.register)));
                        p^.left^.location.register)));
                  else CGMessage(type_e_mismatch);
                  else CGMessage(type_e_mismatch);
@@ -734,7 +735,11 @@ do_jmp:
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.17  1998-09-17 09:42:14  peter
+  Revision 1.18  1998-09-26 15:03:04  florian
+    * small problems with DOM and excpetions fixed (code generation
+      of raise was wrong and self was sometimes destroyed :()
+
+  Revision 1.17  1998/09/17 09:42:14  peter
     + pass_2 for cg386
     + pass_2 for cg386
     * Message() -> CGMessage() for pass_1/pass_2
     * Message() -> CGMessage() for pass_1/pass_2
 
 

+ 6 - 2
compiler/tcmem.pas

@@ -463,7 +463,7 @@ implementation
            ((p^.resulttype^.deftype=objectdef)
            ((p^.resulttype^.deftype=objectdef)
              and pobjectdef(p^.resulttype)^.isclass
              and pobjectdef(p^.resulttype)^.isclass
            ) then
            ) then
-           p^.location.loc:=LOC_REGISTER
+           p^.location.loc:=LOC_CREGISTER
          else
          else
            p^.location.loc:=LOC_REFERENCE;
            p^.location.loc:=LOC_REFERENCE;
       end;
       end;
@@ -500,7 +500,11 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1998-09-24 23:49:24  peter
+  Revision 1.3  1998-09-26 15:03:05  florian
+    * small problems with DOM and excpetions fixed (code generation
+      of raise was wrong and self was sometimes destroyed :()
+
+  Revision 1.2  1998/09/24 23:49:24  peter
     + aktmodeswitches
     + aktmodeswitches
 
 
   Revision 1.1  1998/09/23 20:42:24  peter
   Revision 1.1  1998/09/23 20:42:24  peter