Browse Source

Change call of RealToStr in CodeR in IlasmUtil.cp to call RTS.RealToStrInvar to avoid problems with localizations that break ILASM.

k_john_gough_cp 12 years ago
parent
commit
f27609e7d7
2 changed files with 14 additions and 16 deletions
  1. 13 15
      gpcp/ExprDesc.cp
  2. 1 1
      gpcp/IlasmUtil.cp

+ 13 - 15
gpcp/ExprDesc.cp

@@ -2869,22 +2869,20 @@ MODULE ExprDesc;
     tmp.type := rQual.ident.type;
    (* 
     *  It is an essential requirement of the host execution systems
-    *  that the runtime type of the guarded variable may not be changed
-    *  within the guarded region.  In the case of pointer to record
-    *  types this is guaranteed by making the "tmp" copy immutable.
-    *  Note that making the pointer variable read-only does not prevent
-    *  the guarded region from mutating fields of the record.
-    *
-    *  In case that the guarded variable is an extensible record type.
-    *  no action is required.  Any attempt to perform an entire
-    *  assignment that changes the type of the guarded variable 
-    *  will be a type-error.
-    *  For an attempted widening ...
-    *    Error 83 (Expression not assignment compatible with destination), OR
-    *  For an attempted narrowing ...
-    *    Error 143 (Cannot assign entire extensible or abstract record). 
+	*  that the runtime type of the guarded variable may not be changed
+	*  within the guarded region.  In the case of pointer to record
+	*  types this is guaranteed by making the "tmp" copy immutable.
+	*  Note that making the pointer variable read-only does not prevent
+	*  the guarded region from mutating fields of the record.
+	*
+	*  In case the the guarded variable is an extensible record type.
+	*  no action is required.  Any attempt to perform an entire
+	*  assignment to the guarded variable will be a type-error.
+	*  Every assignment to the entire variable will be either - 
+	*  Error 83 (Expression not assignment compatible with destination), OR
+	*  Error 143 (Cannot assign entire extensible or abstract record). 
     *)
-    IF ~tmp.type.isRecordType() THEN tmp.SetKind(I.conId) END; (* mark immutable *)
+	IF ~tmp.type.isRecordType() THEN tmp.SetKind(I.conId) END; (* mark immutable *)
     oldI := tmp.dfScp.symTb.lookup(lHash);
     IF oldI = NIL THEN (* not local *)
       junk := tmp.dfScp.symTb.enter(lHash, tmp);

+ 1 - 1
gpcp/IlasmUtil.cp

@@ -1070,7 +1070,7 @@ MODULE IlasmUtil;
     VAR nam : ARRAY 64 OF CHAR;
   BEGIN
     os.Prefix(code);
-    RTS.RealToStr(real, nam);
+    RTS.RealToStrInvar(real, nam);
     os.Tstring(nam$);
     os.Suffix(code);
   END CodeR;