[M3commit] CVS Update: cm3
Jay K
jay.krell at cornell.edu
Sat Jan 8 09:38:09 CET 2011
Index: src/M3CG_Check.m3
===================================================================
RCS file: /usr/cvs/cm3/m3-sys/m3middle/src/M3CG_Check.m3,v
retrieving revision 1.13
diff -u -r1.13 M3CG_Check.m3
--- src/M3CG_Check.m3 1 Nov 2010 09:37:23 -0000 1.13
+++ src/M3CG_Check.m3 8 Jan 2011 08:36:01 -0000
@@ -57,6 +57,7 @@
s_push (t: Type) := Stack_Push;
s_repush () := Stack_Repush;
s_empty () := Stack_Empty;
+ PutErr (a, b, c: TEXT) := PutErr;
OVERRIDES
set_error_handler := set_error_handler;
begin_unit := begin_unit;
@@ -185,10 +186,11 @@
(*--------------------------------------------------------- low level I/O ---*)
-PROCEDURE PutErr (u: U; a, b, c: TEXT := NIL) =
+PROCEDURE PutErr (self: U; a, b, c: TEXT := NIL) =
BEGIN
- u.child.comment ("********* M3CG_Check ERROR *********** ", a, b, c);
- INC (u.n_errors);
+ self.note_error ("********* M3CG_Check ERROR *********** " & a & b & c);
+ self.child.comment ("********* M3CG_Check ERROR *********** ", a, b, c);
+ INC (self.n_errors);
END PutErr;
(*-------------------------------------------------------- stack checking ---*)
Hm. I think I could have left "self" named "u". I'll try that...
- Jay
----------------------------------------
> Date: Sat, 8 Jan 2011 09:37:05 +0000
> To: m3commit at elegosoft.com
> From: jkrell at elego.de
> Subject: [M3commit] CVS Update: cm3
>
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 11/01/08 09:37:05
>
> Modified files:
> cm3/m3-sys/m3middle/src/: M3CG_Check.m3
>
> Log message:
> make errors visible on stdout or stderr, much better
> now we get:
> jbook2:p250 jay$ /dev2/cm3/m3-sys/cm3/I386_DARWIN/cm3
> --- building in I386_DARWIN ---
>
> new source -> compiling Main.m3
> "../Main.m3", line 6: ********* M3CG_Check ERROR *********** bad stack: expected [ Int32 ] got [ Int64 ]
> "../Main.m3", line 11: ********* M3CG_Check ERROR *********** bad stack: expected [ Int32 ] got [ Int64 ]
> "../Main.m3", line 13: ********* M3CG_Check ERROR *********** bad stack: expected [ Int64 ] got [ Int32 ]
> "../Main.m3", line 1: 3 code generation errors (this line seems unnecessary now!)
> 4 errors encountered (this should probably say 3)
> compilation failed => not building program "pgm"
> Fatal Error: package build failed
>
More information about the M3commit
mailing list