From hosking at elego.de Mon Oct 1 19:04:06 2012 From: hosking at elego.de (Antony Hosking) Date: Mon, 1 Oct 2012 19:04:06 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121001170406.A91492474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/01 19:04:06 Modified files: cm3/m3-sys/llvm/src/: LLVM.i3 Log message: Need LLVM prefix. From jkrell at elego.de Wed Oct 3 08:58:33 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 3 Oct 2012 8:58:33 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121003065833.1BA4D2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/03 08:58:33 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: Another great use of the multi-pass infrastructure. (Granted, "buffering" per-function instead of per-unit would suffice. But the code structure here isn't bad.) Add a new "Locals" pass that handles: declare_segment (needed to detect exception handlers) declare_procedure end_procedure declare_param declare_local declare_temp pop_static_link (because it calls declare_temp) begin_block (needed in future for stack packing frame via unions) end_block (needed in future for stack packing frame via unions) and now uplevel locals in subblocks are correctly placed in the frame struct. This lets more code compile successfully. pop_static_link is split up -- early pass calls declare_temp later pass uses it The linkage between them -- how the later pass find the variable, is easy. pop_static_link_temp_vars: RefSeq is introduced. early pop_static_link does add hi later pop_static_link does get, increasing index each time. It is assumed that pop_static_link occurs the same number of times and in the same relative order in each pass, this is highly reasonable. A much fancier compiler might reorder things for optimization, but it would convert this first to another form. begin/end_block aren't taken advantage of yet. The intent is that each subblock with uplevel locals is unioned with subblocks at equal nesting levels, something like that. This construct isn't even all that common -- uplevel locals in nested blocks. Fix Var_FixName (for now) to more often change the names. In particular, locals/params with names like "int", that occured multiple times in a function (due to blocks) weren't being handled right. They were getting the same name. (The right fix is to have subblocks use braces, and rely on Modula-3 lexical scoping matching C lexical scoping. For non-uplevel. For uplevel, we have to create structs/unions within the struct for subblocks, or at least do this old renaming.) Also add in some hacks to deal with uplevel structs. They exist. (I need a small test case to cover this and other rare but valid constructs). They are kind of a special case. This probably needs more design/abstraction to clean it up. However, soon we will know struct return sizes and then pass and return structs by value in the C code, and uplevel structs will become maybe less of a special case. Maybe. Actually, probably still a special case -- the frame struct should probably have a pointer instead of a copied value, to avoid the copy. Unless the struct is smaller than a pointer, or something. With this change, m3tk-misc compiles. We get all the way to stubgen having problems at runtime. I'll have to step through working and non-working sidebyside. As well, the hacky ExtraScope_Open / ExtraScope_Close are now unused. Good. Also note that I was using gcc -O2 a while, no problem. I've undone that for now, just so I can better debug. From jkrell at elego.de Thu Oct 4 06:24:14 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:24:14 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004042414.A2BD32474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:24:14 Added files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 m3makefile Log message: There is a bug in my set_member and/or set_difference. This small program demonstrates it. From jkrell at elego.de Thu Oct 4 06:27:19 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:27:19 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004042719.1ADB62474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:27:19 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: copy in FindCharSet From jkrell at elego.de Thu Oct 4 06:29:49 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:29:49 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004042949.377C02474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:29:49 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce From jkrell at elego.de Thu Oct 4 06:43:57 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:43:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004044358.1BDE82474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:43:57 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: trim more -- set_difference + pass set as parameter -- not set_member From jkrell at elego.de Thu Oct 4 06:51:28 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:51:28 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004045129.3237B2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:51:28 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce From jkrell at elego.de Thu Oct 4 06:55:19 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:55:19 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004045519.ED6BD2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:55:19 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce From jkrell at elego.de Thu Oct 4 07:03:22 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:03:22 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004050322.B8E142474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:03:22 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce -- requires set that doesn't fit in a word From jkrell at elego.de Thu Oct 4 07:12:00 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:12:00 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004051201.227A62474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:12:00 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: reverse parameter order to set functions, that should help! optionally inline extract, it is annoying to step through.. From jkrell at elego.de Thu Oct 4 07:13:42 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:13:42 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004051342.A8B812474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:13:42 Added files: cm3/m3-sys/m3tests/src/c1/c140/: Main.m3 Log message: a program that we used to have trouble compiling -- multiple variables named 'int' From jkrell at elego.de Thu Oct 4 07:13:50 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:13:50 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004051350.7636F2474005@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:13:50 Added files: cm3/m3-sys/m3tests/src/c1/c140/: m3makefile Log message: a program that we used to have trouble compiling -- multiple variables named 'int' From jkrell at elego.de Thu Oct 4 07:46:30 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:46:30 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004054630.799EB2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:46:30 Modified files: cm3/m3-libs/m3core/src/Csupport/Common/: hand.c Log message: change i++ to ++i From jkrell at elego.de Thu Oct 4 08:58:55 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 8:58:55 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004065855.7FB082474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 08:58:55 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: assert that alignments are all ok If that fails, we'll round up in the backend. assert that size >= 0 (and not merely > 0) size := MAX(size, 1) (convert 0 to 1 -- 0 occurs) perhaps it should be size := MAX(size, aligment) Should alignment be rounded up to 4 or 8 for variables like M3x86 does? I have now compiled the entire system using the C backend targeting AMD64_DARWIN. This is a very big milestone. This last change has only been tested on a small part of the tree. (i.e. that which has zero-sized variables, and everything "after" it) I can bring up and interact with various gui apps -- tetris, BadBricks (somewhat), Juno, mentor (at least somehow). Juno doesn't come up centered, and I recall it always did before. That might be something to look into. As well, the compiler has long been compiling itself. From jkrell at elego.de Fri Oct 5 08:50:22 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 8:50:22 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005065022.7C5952474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 08:50:22 Added files: cm3/m3-sys/m3middle/src/: M3CG_AssertFalse.i3 M3CG_AssertFalse.m3 Log message: add forgotten files see http://hudson.modula3.com:8080/job/cm3-current-build-AMD64_FREEBSD/lastFailedBuild/console This would also explain Tony's cron failure, of course. From jkrell at elego.de Fri Oct 5 08:56:52 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 8:56:52 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005065652.5A92D2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 08:56:52 Modified files: cm3/m3-sys/m3middle/src/: CoffTime.c Log message: initialize locals From jkrell at elego.de Fri Oct 5 08:57:29 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 8:57:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005065729.58B662474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 08:57:29 Modified files: cm3/m3-sys/m3middle/src/: CoffTime.c Log message: initialize locals in 'generic' style with braces From jkrell at elego.de Fri Oct 5 09:25:50 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 9:25:50 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005072551.078BA2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 09:25:50 Modified files: cm3/m3-sys/m3middle/src/: M3CG_MultiPass.m3 Log message: just some work on the formatting for tonight still need to fix assigning op and think about making vars/procs always just be integers and not using a map From jkrell at elego.de Fri Oct 12 06:48:39 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 6:48:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012044840.0063CCC944@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 06:48:39 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 ./: M3C.m3 cm3/m3-sys/m3middle/src/: M3CG_BinRd.m3 M3CG_Binary.i3 M3CG_MultiPass.i3 M3CG_MultiPass.m3 ./: M3CG_BinRd.m3 M3CG_Binary.i3 M3CG_MultiPass.i3 M3CG_MultiPass.m3 cm3/m3-sys/m3cggen/src/: Main.m3 Log message: fill in the enums all correctly in M3CG_MultiPass add the missing ones to M3CG_Binary.Op Some cleanup in M3C.m3, including properly using the array indexed by said enums. From jay.krell at cornell.edu Fri Oct 12 06:52:49 2012 From: jay.krell at cornell.edu (Jay K) Date: Fri, 12 Oct 2012 04:52:49 +0000 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121012044840.0063CCC944@birch.elegosoft.com> References: <20121012044840.0063CCC944@birch.elegosoft.com> Message-ID: diff attached > Date: Fri, 12 Oct 2012 06:48:39 +0000 > To: m3commit at elegosoft.com > From: jkrell at elego.de > Subject: [M3commit] CVS Update: cm3 > > CVSROOT: /usr/cvs > Changes by: jkrell at birch. 12/10/12 06:48:39 > > Modified files: > cm3/m3-sys/m3back/src/: M3C.m3 > ./: M3C.m3 > cm3/m3-sys/m3middle/src/: M3CG_BinRd.m3 M3CG_Binary.i3 > M3CG_MultiPass.i3 M3CG_MultiPass.m3 > ./: M3CG_BinRd.m3 M3CG_Binary.i3 M3CG_MultiPass.i3 > M3CG_MultiPass.m3 > cm3/m3-sys/m3cggen/src/: Main.m3 > > Log message: > fill in the enums all correctly in M3CG_MultiPass > add the missing ones to M3CG_Binary.Op > Some cleanup in M3C.m3, including properly using the > array indexed by said enums. > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 5.txt URL: From jkrell at elego.de Fri Oct 12 08:53:01 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 8:53:01 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012065301.CAC8ACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 08:53:01 Modified files: cm3/m3-libs/libm3/src/sequence/: string.lsl Log message: ensure file ends with newline From jkrell at elego.de Fri Oct 12 08:53:39 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 8:53:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012065339.D4833CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 08:53:39 Modified files: cm3/m3-libs/libm3/src/table/: Table.ig Log message: file needs only one newline at end From jkrell at elego.de Fri Oct 12 08:59:56 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 8:59:56 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012065957.05ACECC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 08:59:56 Modified files: cm3/m3-libs/m3core/src/float/C99/: FloatModeC.c Log message: add #ifdef __cplusplus extern "C" { ... so the system can be compiled and linked successfully using a C++ compiler in place of a C compiler From jkrell at elego.de Fri Oct 12 09:00:57 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:00:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070057.83050CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:00:57 Modified files: cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c Log message: cast select parameters from "ADDRESS" to fd_set* so the system can be compiled using a C++ compiler in place of a C compiler From jkrell at elego.de Fri Oct 12 09:01:43 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:01:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070143.40534CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:01:43 Modified files: cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThreadC.c Log message: add "extern" to our "const" mutex/condition variables, so the system can be compiled using a C++ compiler in place of a C compiler From jkrell at elego.de Fri Oct 12 09:02:21 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:02:21 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070226.708EACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:02:21 Modified files: cm3/m3-libs/libm3/src/list/: ListSort.ig Log message: file needs only one newline at end, not two From jkrell at elego.de Fri Oct 12 09:03:42 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:03:42 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070342.EA647CC943@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:03:42 Modified files: cm3/m3-libs/m3core/src/: m3core.h Log message: along with M3EXTERNC_BEGIN and M3_EXTERNC_BEGIN, add also M3_EXTERN_C_BEGIN and line up columns just whitespace and add another style option -- that isn't currently used From jkrell at elego.de Fri Oct 12 09:04:58 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:04:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070459.2D9A3CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:04:58 Modified files: cm3/m3-libs/m3core/src/runtime/common/: RTLinker.i3 RTLinker.m3 RTLinkerC.c Log message: restore-but-it-is-disabled some debugging assistance code it has proven very useful multiple times From jay.krell at cornell.edu Fri Oct 12 09:07:19 2012 From: jay.krell at cornell.edu (Jay K) Date: Fri, 12 Oct 2012 07:07:19 +0000 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121012070459.2D9A3CC93F@birch.elegosoft.com> References: <20121012070459.2D9A3CC93F@birch.elegosoft.com> Message-ID: a few of the recent diffs: Index: m3core/src/m3core.h===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/m3core.h,vretrieving revision 1.76diff -r1.76 m3core.h154,157c154,160< #define M3EXTERNC_BEGIN extern "C" {< #define M3_EXTERNC_BEGIN extern "C" {< #define M3EXTERNC_END }< #define M3_EXTERNC_END }---> #define M3_EXTERN_C extern "C"> #define M3_EXTERN_C_BEGIN extern "C" {> #define M3_EXTERN_C_END }> #define M3EXTERNC_BEGIN extern "C" {> #define M3_EXTERNC_BEGIN extern "C" {> #define M3EXTERNC_END }> #define M3_EXTERNC_END }159,162c162,166< #define M3EXTERNC_BEGIN /* nothing */< #define M3_EXTERNC_BEGIN /* nothing */< #define M3EXTERNC_END /* nothing */< #define M3_EXTERNC_END /* nothing */---> #define M3_EXTERN_C /* nothing */> #define M3EXTERNC_BEGIN /* nothing */> #define M3_EXTERNC_BEGIN /* nothing */> #define M3EXTERNC_END /* nothing */> #define M3_EXTERNC_END /* nothing */Index: m3core/src/float/C99/FloatModeC.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/float/C99/FloatModeC.c,vretrieving revision 1.1diff -r1.1 FloatModeC.c23a24,27> #ifdef __cplusplus> extern "C" {> #endif> 56c60< we cant do that here so we have to wrap them ... */---> we cannot do that here so we have to wrap them. */71a76,79> > #ifdef __cplusplus> } /* extern "C" */> #endifIndex: m3core/src/runtime/common/RTLinker.i3===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/runtime/common/RTLinker.i3,vretrieving revision 1.6diff -r1.6 RTLinker.i345a46,52> <*EXTERNAL RTLinker__PrintString*> PROCEDURE PrintString (a : ADDRESS);> <*EXTERNAL RTLinker__PrintText*> PROCEDURE PrintText(a : TEXT);> <*EXTERNAL RTLinker__PrintInt*> PROCEDURE PrintInt(a : INTEGER);> <*EXTERNAL RTLinker__PrintModule*> PROCEDURE PrintModule(a : ADDRESS);> (* TYPE Trace_t = { None, M3, C };> <*EXTERNAL RTLinker__traceInit*> VAR traceInit : Trace_t; *)> Index: m3core/src/runtime/common/RTLinker.m3===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/runtime/common/RTLinker.m3,vretrieving revision 1.21diff -r1.21 RTLinker.m340a41,42> (* PrintModule(RTLinkerX.RTHooks_M3(0)); *)> Index: m3core/src/runtime/common/RTLinkerC.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/runtime/common/RTLinkerC.c,vretrieving revision 1.14diff -r1.14 RTLinkerC.c24a25,188> #if 1 /* debugging code */> > /*> see RT0.i3 for the types here> It would be good for the Modula-3 compiler to generate C headers.> */> > #include > > struct ModuleInfo_t; typedef struct ModuleInfo_t ModuleInfo_t;> struct ImportInfo_t; typedef struct ImportInfo_t ImportInfo_t;> #if 0> struct Text_t; typedef struct Text_t Text_t;> #endif> > struct ImportInfo_t> {> ModuleInfo_t* Import;> void* Binder; /* returns "import" pointer */> ImportInfo_t* Next;> };> > struct ModuleInfo_t> {> const char* File; /* 0 */> void* TypeCells; /* 4 8 */> void* TypeCellPointers; /* 8 16 */> void* FullRevelation; /* 12 24 */> void* PartialRevelation; /* 16 32 */> void* ProcedureInformation; /* 20 40 */> void* TryScopes; /* 24 48 */> void* VariableMap; /* 28 56 */> void* GarbageCollectionMap; /* 32 64 */> ImportInfo_t* Imports; /* 36 72 */> size_t LinkState; /* 40 80 */> void* Binder; /* 44 88 */> size_t GarbageCollectionFlags; /* 48 96 */> };> > #if 0> struct Text_t> {> void* Functions;> ptrdiff_t Length;> char Chars[1];> };> #endif> > #if 0> #define traceInit RTLinker__traceInit> enum Trace_t> {> Trace_None,> Trace_M3,> Trace_C,> };> size_t traceInit /* = Trace_C */;> > void> RTIO__PutString(const char* a);> > void> RTIO__PutText(Text_t* a);> > void> RTIO__PutInt(int a);> > static> void> RTIO__Flush(void);> > static> void> RTLinker__PrintFlush(void)> {> if (traceInit == Trace_M3)> RTIO__Flush();> }> > static> void> RTLinker__PrintString(const char* a)> {> if (a == NULL || a[0] == 0)> return;> switch (traceInit)> {> case Trace_None:> break;> case Trace_M3:> RTIO__PutString(a);> break;> case Trace_C:> printf("%s", a);> break;> }> }> > static> void> RTLinker__PrintText(Text_t* a)> {> if (a == NULL || a->Length < 1)> return;> switch (traceInit)> {> case Trace_None:> break;> case Trace_M3:> RTIO__PutText(a);> break;> case Trace_C:> printf("%.*s", ((int)a->Length), a->Chars);> break;> }> }> > static> void> RTLinker__PrintInt(int a)> {> switch (traceInit)> {> case Trace_None:> break;> case Trace_M3:> RTIO__PutInt(a);> break;> case Trace_C:> printf("%X", a);> break;> }> }> > #endif> > void> RTLinker__PrintModule(ModuleInfo_t* Module)> {> ImportInfo_t* Imports = { 0 };> > if ((Module == NULL) /*|| (traceInit != Trace_C)*/)> return;> Imports = Module->Imports;> while (Imports != NULL)> {> printf("Module %p %s Imports %p{Import %p, Binder %p, Next %p}",> Module,> Module->File,> Imports,> (Imports ? Imports->Import : NULL),> (Imports ? Imports->Binder : NULL),> (Imports ? Imports->Next : NULL));> fflush(0);> printf(" %p ", Imports && Imports->Import ? Imports->Import->File : "");> fflush(0);> printf(" %s\n", Imports && Imports->Import ? Imports->Import->File : "");> Imports = Imports->Next;> }> printf("\n");> }> > #endif> Index: m3core/src/thread/Common/ThreadInternal.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/Common/ThreadInternal.c,vretrieving revision 1.15diff -r1.15 ThreadInternal.c84c84< return select(nfds, read, write, xcept, NULL);---> return select(nfds, (fd_set*)read, (fd_set*)write, (fd_set*)xcept, NULL);89c89< return select(nfds, read, write, xcept, &timeout);---> return select(nfds, (fd_set*)read, (fd_set*)write, (fd_set*)xcept, &timeout);Index: m3core/src/thread/PTHREAD/ThreadPThreadC.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c,vretrieving revision 1.164diff -r1.164 ThreadPThreadC.c243c243< pthread_mutex_t * const ThreadPThread__##name##Mu = &name##Mu; \---> extern pthread_mutex_t * const ThreadPThread__##name##Mu = &name##Mu; \247c247< pthread_cond_t * const ThreadPThread__##name##Cond = &name##Cond; \---> extern pthread_cond_t * const ThreadPThread__##name##Cond = &name##Cond; \Index: libm3/src/list/ListSort.ig===================================================================RCS file: /usr/cvs/cm3/m3-libs/libm3/src/list/ListSort.ig,vretrieving revision 1.1.1.1diff -r1.1.1.1 ListSort.ig42d41< > Date: Fri, 12 Oct 2012 09:04:58 +0000 > To: m3commit at elegosoft.com > From: jkrell at elego.de > Subject: [M3commit] CVS Update: cm3 > > CVSROOT: /usr/cvs > Changes by: jkrell at birch. 12/10/12 09:04:58 > > Modified files: > cm3/m3-libs/m3core/src/runtime/common/: RTLinker.i3 RTLinker.m3 > RTLinkerC.c > > Log message: > restore-but-it-is-disabled some debugging assistance code > it has proven very useful multiple times > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkrell at elego.de Fri Oct 12 09:20:02 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:20:02 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012072002.69D6ACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:20:02 Modified files: cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThreadC.c Log message: try another approach because gcc is dumb extern type const foo; type const foo = init; really you want to say the perfectly correct and unambiguous etc. extern type const foo = init; but gcc warns for this. From jkrell at elego.de Fri Oct 12 09:24:41 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:24:41 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012072441.86FF3CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:24:41 Modified files: cm3/m3-libs/sysutils/src/POSIX/: FSUnixC.c Log message: add 'extern' on const so the system can be compiled with a C++ compiler in place of a C compiler..while avoiding the dumb gcc warning about 'extern const', which is a perfectly well defined and problem-free usage.. From jkrell at elego.de Fri Oct 12 09:53:42 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:53:42 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012075342.3C9A0CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:53:42 Modified files: cm3/m3-sys/m3linker/src/: MxGen.m3 Log message: fix _m3main.c so it can be compiled with a C++ compiler in place of a C compiler NOTE: We require at least an ANSI C compiler. I have fairly recently used systems with a K&R C compiler but no ANSI C compiler (Irix accidentally-looking-bundled compiler and HPUX/hppa bundled compiler that exists to compile data initialization and relink kernel). I'll revise this if/when I'm back at such a system. I doubt anyone else cares. (That is, _m3main.c should be valid K&R C, valid ANSI C, and valid C++.) From jkrell at elego.de Fri Oct 12 09:56:05 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:56:05 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012075605.DFE4BCC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:56:05 Modified files: cm3/m3-comm/tcp/src/POSIX/: HerrnoC.c Log message: add #ifdef __cplusplus extern "C" { #endif so a C++ compiler can be used instead of a C compiler From jkrell at elego.de Fri Oct 12 10:47:53 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 10:47:53 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012084753.E057FCC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 10:47:53 Modified files: cm3/m3-tools/pp/src/flex-bison/: m3makefile ./: m3makefile cm3/m3-tools/pp/src/lex-yacc-HPPA/: m3makefile ./: m3makefile cm3/m3-tools/pp/src/lex-yacc/: m3makefile Log message: one newline at end of file is enough From jkrell at elego.de Fri Oct 12 11:46:20 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 11:46:20 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012094620.F1E81CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 11:46:20 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: #ifdef __cplusplus typedef void* ADDRESS; #else typedef char* ADDRESS; #endif and then change just a few occurences of ADDRESS to char*, i.e. for math and then cast those to ADDRESS in another great application my multi-pass infrastructure, move declaration and initialization of segments (globals) up to the start -- thereby mostly fixing the validity of the code as C++ (declaration would suffice, initialization could still be later) There is still the matter that imported functions take structs as "ADDRESS" but local functions take them as a pointer to a struct with a specific size. I'll probably change that.. (Or did I already handle it? Anyway..progress toward valid C++, not sure if I'm there yet, got side tracked fixing the rest of the system, esp. the pp directory with lots of lex/flex output..) Might want to go back to char* for ADDRESS. From jkrell at elego.de Fri Oct 12 12:06:58 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 12:06:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012100658.3BFEACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 12:06:58 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: go back to ADDRESS is always char* and never use void*, even where we did before point partly being -- avoiding void* keeps us K&R valid the "fix" is to always pass/accept structs as ADDRESS, but when we copy a struct that is being passed by value, cast it of course, later, we will do better.. From dabenavidesd at yahoo.es Fri Oct 12 16:20:11 2012 From: dabenavidesd at yahoo.es (Daniel Alejandro Benavides D.) Date: Fri, 12 Oct 2012 15:20:11 +0100 (BST) Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121012070057.83050CC93F@birch.elegosoft.com> Message-ID: <1350051611.11127.YahooMailClassic@web29706.mail.ird.yahoo.com> Hi all: compiler wise code should not be in Common for portability reasons. Thanks in advance --- El vie, 12/10/12, Jay Krell escribi?: De: Jay Krell Asunto: [M3commit] CVS Update: cm3 Para: m3commit at elegosoft.com Fecha: viernes, 12 de octubre, 2012 04:00 CVSROOT:??? /usr/cvs Changes by:??? jkrell at birch.??? 12/10/12 09:00:57 Modified files: ??? cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c Log message: ??? cast select parameters from "ADDRESS" to fd_set* so the system can ??? be compiled using a C++ compiler in place of a C compiler -------------- next part -------------- An HTML attachment was scrubbed... URL: From hosking at cs.purdue.edu Fri Oct 12 16:35:30 2012 From: hosking at cs.purdue.edu (Antony Hosking) Date: Fri, 12 Oct 2012 10:35:30 -0400 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <1350051611.11127.YahooMailClassic@web29706.mail.ird.yahoo.com> References: <1350051611.11127.YahooMailClassic@web29706.mail.ird.yahoo.com> Message-ID: <143900A1-FE96-428C-AF55-3C356EFA4679@cs.purdue.edu> Jay?s change make it portable to both C and C++. Antony Hosking | Associate Professor | Computer Science | Purdue University 305 N. University Street | West Lafayette | IN 47907 | USA Mobile +1 765 427 5484 On Oct 12, 2012, at 10:20 AM, "Daniel Alejandro Benavides D." wrote: > > Hi all: > compiler wise code should not be in Common for portability reasons. > Thanks in advance > > --- El vie, 12/10/12, Jay Krell escribi?: > > De: Jay Krell > Asunto: [M3commit] CVS Update: cm3 > Para: m3commit at elegosoft.com > Fecha: viernes, 12 de octubre, 2012 04:00 > > CVSROOT: /usr/cvs > Changes by: jkrell at birch. 12/10/12 09:00:57 > > Modified files: > cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c > > Log message: > cast select parameters from "ADDRESS" to fd_set* so the system can > be compiled using a C++ compiler in place of a C compiler > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dabenavidesd at yahoo.es Fri Oct 12 17:07:25 2012 From: dabenavidesd at yahoo.es (Daniel Alejandro Benavides D.) Date: Fri, 12 Oct 2012 16:07:25 +0100 (BST) Subject: [M3commit] CVS Update: cm3 In-Reply-To: <143900A1-FE96-428C-AF55-3C356EFA4679@cs.purdue.edu> Message-ID: <1350054445.54642.YahooMailClassic@web29706.mail.ird.yahoo.com> Hi all: Downcasting is not allowed in Modula-3 in ADDRESS types, why to keep this specifc compiler thing here? Thanks in advance --- El vie, 12/10/12, Antony Hosking escribi?: De: Antony Hosking Asunto: Re: [M3commit] CVS Update: cm3 Para: "Daniel Alejandro Benavides D." CC: m3commit at elegosoft.com, jkrell at elego.de Fecha: viernes, 12 de octubre, 2012 09:35 Jay?s change make it portable to both C and C++. Antony Hosking?|?Associate Professor?| Computer Science | Purdue University305 N. University Street | West Lafayette | IN 47907 | USAMobile?+1 765 427 5484 On Oct 12, 2012, at 10:20 AM, "Daniel Alejandro Benavides D." wrote: Hi all: compiler wise code should not be in Common for portability reasons. Thanks in advance --- El vie, 12/10/12, Jay Krell escribi?: De: Jay Krell Asunto: [M3commit] CVS Update: cm3 Para: m3commit at elegosoft.com Fecha: viernes, 12 de octubre, 2012 04:00 CVSROOT:??? /usr/cvs Changes by:??? jkrell at birch.??? 12/10/12 09:00:57 Modified files: ??? cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c Log message: ??? cast select parameters from "ADDRESS" to fd_set* so the system can ??? be compiled using a C++ compiler in place of a C compiler -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkrell at elego.de Fri Oct 12 20:09:13 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 20:09:13 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012180913.726F5CC948@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 20:09:13 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: fix index_address since char* vs. void* gyrations and back to working? But why when I tried going back a few versions it was still broken? fix some search/replace errors: 't => " not" (don't, can't) T => U (suffixes on integer literals (unused?), vs. self/T/U) From jkrell at elego.de Sat Oct 13 07:38:56 2012 From: jkrell at elego.de (Jay Krell) Date: Sat, 13 Oct 2012 7:38:56 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121013053857.18747CC948@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/13 07:38:56 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: "cleanup" uplevels, record params by-value worse and better -- remove attempted abstractions, and sprinkle in special cases, at least saves us from inventing the right abstractions We are also more sure now to not declare variables after code. From jkrell at elego.de Sun Oct 14 00:31:39 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 0:31:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121013223143.83C77CC952@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 00:31:38 Added files: cm3/m3-sys/m3back/src/: experiment-bitfield2.c Log message: another experiemented..abandoned.. From jkrell at elego.de Sun Oct 14 12:23:04 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 12:23:04 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121014102304.D1769CC955@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 12:23:04 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: now that imports are earlier, remove ReportFault hack that caused us to use #ifdef to list all 64bit targets; much better! work in progress: only output helper functions that are used this helps gcc -Wall this is made easy by the multi-pass infrastructure remove our zero initialization of everything I think frontend generates it anyway optimize div and mod when input signs are known to match From jkrell at elego.de Sun Oct 14 23:35:12 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 23:35:12 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121014213513.0915BCC95E@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 23:35:12 Modified files: cm3/scripts/python/: upgrade.py Log message: add m3cgcat From jkrell at elego.de Sun Oct 14 23:36:14 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 23:36:14 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121014213614.8347FCC95E@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 23:36:14 Modified files: cm3/scripts/: pkginfo.txt Log message: add m3cgcat to base core front..unclear meanings those.. From jkrell at elego.de Wed Oct 17 12:24:27 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 17 Oct 2012 12:24:27 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121017102427.6AB96CC966@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/17 12:24:27 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: only declare/define helper functions that are used, mostly From jkrell at elego.de Wed Oct 17 12:44:58 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 17 Oct 2012 12:44:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121017104458.4A719CC967@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/17 12:44:58 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: only declare/define helper functions that are used -- handle ReportFault -- this reduces warnings from gcc/g++ -Wall, which I would like to eliminate (more to do) From jkrell at elego.de Wed Oct 17 21:56:20 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 17 Oct 2012 21:56:20 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121017195620.7E30DCC96C@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/17 21:56:20 Modified files: cm3/m3-sys/m3middle/src/: M3CG_MultiPass.i3 M3CG_MultiPass.m3 Log message: I forgot to commit these -- make op_counts public From jkrell at elego.de Thu Oct 18 21:18:22 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 18 Oct 2012 21:18:22 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121018191822.74911CC974@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/18 21:18:22 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: fully brace initializers to reduce gcc/g++ -Wall output fill in all zeros in initialized padding to reduce gcc/g++ -Wall output still to do: remove unused labels and unused locals From jkrell at elego.de Sat Oct 20 08:06:14 2012 From: jkrell at elego.de (Jay Krell) Date: Sat, 20 Oct 2012 8:06:14 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121020060614.61BEECC979@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/20 08:06:14 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: gcc -Wall work: remove unused variables -- would be nice if frontend didn't produce them.. remove unused labels -- would be nice if frontend didn't produce them.. mark a few functions as noreturn functions to quash gcc warnings including risky hack of removing exit_proc asserting that certain functions only have one..presumably/hopefully right before end_procedure.. small hardcoded list of no_functions..kind of hacky..but compiler is in bed with runtime is normal.. still to do -- warning: comparison is always false due to limited range of data type (this isn't gcc -Wall, but gcc default, like comparisons of unsigned numbers against 0...) give in and put some newlines in always so the code is more readable but still, no/little indentation From jkrell at elego.de Thu Oct 25 08:04:58 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 25 Oct 2012 8:04:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121025060459.59E85CC996@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/25 08:04:58 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: m3tohtml: Main.m3: In function ???Main__ReadFileList__AddFile__Add???: Main.m3:151: error: ???struct Main__ReadFileList__AddFile_Frame_t??? has no member named ???_static_link??? Main.m3:155: error: ???struct Main__ReadFileList__AddFile_Frame_t??? has no member named ???_static_link??? mark static_link parameter as always used, so that it always gets a place in the frame (fallout from removing unused variables -- at which time, I guess, I also optimized away other stuff..unused uplevel locals spot in frame?) From jkrell at elego.de Fri Oct 26 11:09:00 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 26 Oct 2012 11:09:00 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121026090900.BE2D6CC99F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/26 11:09:00 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: begin conversion from dealing with TEXT to a higher level "expression" type For now this is just a trivial tedious frequent wrapping/unwrapping, and TEXT concatenation, but it will change. This is a useful step along the way. Further developing this will enable us to: fold constants eliminate checks against subtranges/unsigned types in particular to fix gcc warnings we are getting eliminate unnecessary parens e.g. ((foo)) => (foo) eliminate unnecessary casts e.g. (ADDRESS)(*(ADDRESS*)foo) => (*(ADDRESS*)foo) From jkrell at elego.de Fri Oct 26 11:22:55 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 26 Oct 2012 11:22:55 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121026092255.C9A94CC99F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/26 11:22:55 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: continue to hack around bogus packing of M3CG.TypeUID From jkrell at elego.de Fri Oct 26 11:33:35 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 26 Oct 2012 11:33:35 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121026093335.82358CC99F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/26 11:33:35 Modified files: cm3/m3-sys/m3middle/src/: M3CG_MultiPass.i3 M3CG_MultiPass.m3 Log message: There is no value in recording/replaying calls to next_label. Backends that use this multipass infrastructure must simply be prepared to recieve fairly arbitrary labels at arbitrary times. Well, they can reasonably expect that M3CG_MultiPass.m3 has allocated labels densely..but I can't decide if starting at 0 or starting at 1 should be the interface -- if 0 should be a distinct invalid label, or simply the first one. Actually -1 is I think defined as invalid somewhere. From hosking at elego.de Sun Oct 28 17:20:19 2012 From: hosking at elego.de (Antony Hosking) Date: Sun, 28 Oct 2012 17:20:19 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121028162019.8464BCC9A7@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/28 17:20:19 Modified files: cm3/m3-sys/m3middle/src/: M3CG.i3 Log message: For Jay. From hosking at elego.de Sun Oct 28 17:22:31 2012 From: hosking at elego.de (Antony Hosking) Date: Sun, 28 Oct 2012 17:22:31 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121028162231.46D11CC9A7@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/28 17:22:31 Modified files: cm3/m3-sys/m3middle/src/: M3CG.i3 Log message: Plus the assertion. From jay.krell at cornell.edu Mon Oct 29 07:28:11 2012 From: jay.krell at cornell.edu (Jay K) Date: Mon, 29 Oct 2012 06:28:11 +0000 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121028162019.8464BCC9A7@birch.elegosoft.com> References: <20121028162019.8464BCC9A7@birch.elegosoft.com> Message-ID: Thank you. > Date: Sun, 28 Oct 2012 17:20:19 +0000 > To: m3commit at elegosoft.com > From: hosking at elego.de > Subject: [M3commit] CVS Update: cm3 > > CVSROOT: /usr/cvs > Changes by: hosking at birch. 12/10/28 17:20:19 > > Modified files: > cm3/m3-sys/m3middle/src/: M3CG.i3 > > Log message: > For Jay. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hosking at elego.de Tue Oct 30 02:56:53 2012 From: hosking at elego.de (Antony Hosking) Date: Tue, 30 Oct 2012 2:56:53 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121030015653.46CACCC9A9@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/30 02:56:53 Modified files: cm3/m3-sys/m3middle/src/: M3CG.i3 Log message: Oops. From jkrell at elego.de Wed Oct 31 19:14:52 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 31 Oct 2012 19:14:52 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121031181452.71C2ECC9B4@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/31 19:14:52 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: go back to using M3CG.TypeUID now that Tony accepted the fix work in progress on stack of "expressions" instead of stack of text eliminate casts from same type to same type (didn't verify yet by looking at the result, but did recompile entire system) From hosking at elego.de Mon Oct 1 19:04:06 2012 From: hosking at elego.de (Antony Hosking) Date: Mon, 1 Oct 2012 19:04:06 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121001170406.A91492474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/01 19:04:06 Modified files: cm3/m3-sys/llvm/src/: LLVM.i3 Log message: Need LLVM prefix. From jkrell at elego.de Wed Oct 3 08:58:33 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 3 Oct 2012 8:58:33 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121003065833.1BA4D2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/03 08:58:33 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: Another great use of the multi-pass infrastructure. (Granted, "buffering" per-function instead of per-unit would suffice. But the code structure here isn't bad.) Add a new "Locals" pass that handles: declare_segment (needed to detect exception handlers) declare_procedure end_procedure declare_param declare_local declare_temp pop_static_link (because it calls declare_temp) begin_block (needed in future for stack packing frame via unions) end_block (needed in future for stack packing frame via unions) and now uplevel locals in subblocks are correctly placed in the frame struct. This lets more code compile successfully. pop_static_link is split up -- early pass calls declare_temp later pass uses it The linkage between them -- how the later pass find the variable, is easy. pop_static_link_temp_vars: RefSeq is introduced. early pop_static_link does add hi later pop_static_link does get, increasing index each time. It is assumed that pop_static_link occurs the same number of times and in the same relative order in each pass, this is highly reasonable. A much fancier compiler might reorder things for optimization, but it would convert this first to another form. begin/end_block aren't taken advantage of yet. The intent is that each subblock with uplevel locals is unioned with subblocks at equal nesting levels, something like that. This construct isn't even all that common -- uplevel locals in nested blocks. Fix Var_FixName (for now) to more often change the names. In particular, locals/params with names like "int", that occured multiple times in a function (due to blocks) weren't being handled right. They were getting the same name. (The right fix is to have subblocks use braces, and rely on Modula-3 lexical scoping matching C lexical scoping. For non-uplevel. For uplevel, we have to create structs/unions within the struct for subblocks, or at least do this old renaming.) Also add in some hacks to deal with uplevel structs. They exist. (I need a small test case to cover this and other rare but valid constructs). They are kind of a special case. This probably needs more design/abstraction to clean it up. However, soon we will know struct return sizes and then pass and return structs by value in the C code, and uplevel structs will become maybe less of a special case. Maybe. Actually, probably still a special case -- the frame struct should probably have a pointer instead of a copied value, to avoid the copy. Unless the struct is smaller than a pointer, or something. With this change, m3tk-misc compiles. We get all the way to stubgen having problems at runtime. I'll have to step through working and non-working sidebyside. As well, the hacky ExtraScope_Open / ExtraScope_Close are now unused. Good. Also note that I was using gcc -O2 a while, no problem. I've undone that for now, just so I can better debug. From jkrell at elego.de Thu Oct 4 06:24:14 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:24:14 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004042414.A2BD32474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:24:14 Added files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 m3makefile Log message: There is a bug in my set_member and/or set_difference. This small program demonstrates it. From jkrell at elego.de Thu Oct 4 06:27:19 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:27:19 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004042719.1ADB62474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:27:19 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: copy in FindCharSet From jkrell at elego.de Thu Oct 4 06:29:49 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:29:49 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004042949.377C02474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:29:49 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce From jkrell at elego.de Thu Oct 4 06:43:57 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:43:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004044358.1BDE82474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:43:57 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: trim more -- set_difference + pass set as parameter -- not set_member From jkrell at elego.de Thu Oct 4 06:51:28 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:51:28 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004045129.3237B2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:51:28 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce From jkrell at elego.de Thu Oct 4 06:55:19 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:55:19 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004045519.ED6BD2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:55:19 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce From jkrell at elego.de Thu Oct 4 07:03:22 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:03:22 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004050322.B8E142474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:03:22 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce -- requires set that doesn't fit in a word From jkrell at elego.de Thu Oct 4 07:12:00 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:12:00 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004051201.227A62474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:12:00 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: reverse parameter order to set functions, that should help! optionally inline extract, it is annoying to step through.. From jkrell at elego.de Thu Oct 4 07:13:42 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:13:42 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004051342.A8B812474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:13:42 Added files: cm3/m3-sys/m3tests/src/c1/c140/: Main.m3 Log message: a program that we used to have trouble compiling -- multiple variables named 'int' From jkrell at elego.de Thu Oct 4 07:13:50 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:13:50 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004051350.7636F2474005@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:13:50 Added files: cm3/m3-sys/m3tests/src/c1/c140/: m3makefile Log message: a program that we used to have trouble compiling -- multiple variables named 'int' From jkrell at elego.de Thu Oct 4 07:46:30 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:46:30 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004054630.799EB2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:46:30 Modified files: cm3/m3-libs/m3core/src/Csupport/Common/: hand.c Log message: change i++ to ++i From jkrell at elego.de Thu Oct 4 08:58:55 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 8:58:55 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004065855.7FB082474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 08:58:55 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: assert that alignments are all ok If that fails, we'll round up in the backend. assert that size >= 0 (and not merely > 0) size := MAX(size, 1) (convert 0 to 1 -- 0 occurs) perhaps it should be size := MAX(size, aligment) Should alignment be rounded up to 4 or 8 for variables like M3x86 does? I have now compiled the entire system using the C backend targeting AMD64_DARWIN. This is a very big milestone. This last change has only been tested on a small part of the tree. (i.e. that which has zero-sized variables, and everything "after" it) I can bring up and interact with various gui apps -- tetris, BadBricks (somewhat), Juno, mentor (at least somehow). Juno doesn't come up centered, and I recall it always did before. That might be something to look into. As well, the compiler has long been compiling itself. From jkrell at elego.de Fri Oct 5 08:50:22 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 8:50:22 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005065022.7C5952474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 08:50:22 Added files: cm3/m3-sys/m3middle/src/: M3CG_AssertFalse.i3 M3CG_AssertFalse.m3 Log message: add forgotten files see http://hudson.modula3.com:8080/job/cm3-current-build-AMD64_FREEBSD/lastFailedBuild/console This would also explain Tony's cron failure, of course. From jkrell at elego.de Fri Oct 5 08:56:52 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 8:56:52 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005065652.5A92D2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 08:56:52 Modified files: cm3/m3-sys/m3middle/src/: CoffTime.c Log message: initialize locals From jkrell at elego.de Fri Oct 5 08:57:29 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 8:57:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005065729.58B662474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 08:57:29 Modified files: cm3/m3-sys/m3middle/src/: CoffTime.c Log message: initialize locals in 'generic' style with braces From jkrell at elego.de Fri Oct 5 09:25:50 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 9:25:50 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005072551.078BA2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 09:25:50 Modified files: cm3/m3-sys/m3middle/src/: M3CG_MultiPass.m3 Log message: just some work on the formatting for tonight still need to fix assigning op and think about making vars/procs always just be integers and not using a map From jkrell at elego.de Fri Oct 12 06:48:39 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 6:48:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012044840.0063CCC944@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 06:48:39 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 ./: M3C.m3 cm3/m3-sys/m3middle/src/: M3CG_BinRd.m3 M3CG_Binary.i3 M3CG_MultiPass.i3 M3CG_MultiPass.m3 ./: M3CG_BinRd.m3 M3CG_Binary.i3 M3CG_MultiPass.i3 M3CG_MultiPass.m3 cm3/m3-sys/m3cggen/src/: Main.m3 Log message: fill in the enums all correctly in M3CG_MultiPass add the missing ones to M3CG_Binary.Op Some cleanup in M3C.m3, including properly using the array indexed by said enums. From jay.krell at cornell.edu Fri Oct 12 06:52:49 2012 From: jay.krell at cornell.edu (Jay K) Date: Fri, 12 Oct 2012 04:52:49 +0000 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121012044840.0063CCC944@birch.elegosoft.com> References: <20121012044840.0063CCC944@birch.elegosoft.com> Message-ID: diff attached > Date: Fri, 12 Oct 2012 06:48:39 +0000 > To: m3commit at elegosoft.com > From: jkrell at elego.de > Subject: [M3commit] CVS Update: cm3 > > CVSROOT: /usr/cvs > Changes by: jkrell at birch. 12/10/12 06:48:39 > > Modified files: > cm3/m3-sys/m3back/src/: M3C.m3 > ./: M3C.m3 > cm3/m3-sys/m3middle/src/: M3CG_BinRd.m3 M3CG_Binary.i3 > M3CG_MultiPass.i3 M3CG_MultiPass.m3 > ./: M3CG_BinRd.m3 M3CG_Binary.i3 M3CG_MultiPass.i3 > M3CG_MultiPass.m3 > cm3/m3-sys/m3cggen/src/: Main.m3 > > Log message: > fill in the enums all correctly in M3CG_MultiPass > add the missing ones to M3CG_Binary.Op > Some cleanup in M3C.m3, including properly using the > array indexed by said enums. > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 5.txt URL: From jkrell at elego.de Fri Oct 12 08:53:01 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 8:53:01 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012065301.CAC8ACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 08:53:01 Modified files: cm3/m3-libs/libm3/src/sequence/: string.lsl Log message: ensure file ends with newline From jkrell at elego.de Fri Oct 12 08:53:39 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 8:53:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012065339.D4833CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 08:53:39 Modified files: cm3/m3-libs/libm3/src/table/: Table.ig Log message: file needs only one newline at end From jkrell at elego.de Fri Oct 12 08:59:56 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 8:59:56 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012065957.05ACECC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 08:59:56 Modified files: cm3/m3-libs/m3core/src/float/C99/: FloatModeC.c Log message: add #ifdef __cplusplus extern "C" { ... so the system can be compiled and linked successfully using a C++ compiler in place of a C compiler From jkrell at elego.de Fri Oct 12 09:00:57 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:00:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070057.83050CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:00:57 Modified files: cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c Log message: cast select parameters from "ADDRESS" to fd_set* so the system can be compiled using a C++ compiler in place of a C compiler From jkrell at elego.de Fri Oct 12 09:01:43 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:01:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070143.40534CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:01:43 Modified files: cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThreadC.c Log message: add "extern" to our "const" mutex/condition variables, so the system can be compiled using a C++ compiler in place of a C compiler From jkrell at elego.de Fri Oct 12 09:02:21 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:02:21 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070226.708EACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:02:21 Modified files: cm3/m3-libs/libm3/src/list/: ListSort.ig Log message: file needs only one newline at end, not two From jkrell at elego.de Fri Oct 12 09:03:42 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:03:42 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070342.EA647CC943@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:03:42 Modified files: cm3/m3-libs/m3core/src/: m3core.h Log message: along with M3EXTERNC_BEGIN and M3_EXTERNC_BEGIN, add also M3_EXTERN_C_BEGIN and line up columns just whitespace and add another style option -- that isn't currently used From jkrell at elego.de Fri Oct 12 09:04:58 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:04:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070459.2D9A3CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:04:58 Modified files: cm3/m3-libs/m3core/src/runtime/common/: RTLinker.i3 RTLinker.m3 RTLinkerC.c Log message: restore-but-it-is-disabled some debugging assistance code it has proven very useful multiple times From jay.krell at cornell.edu Fri Oct 12 09:07:19 2012 From: jay.krell at cornell.edu (Jay K) Date: Fri, 12 Oct 2012 07:07:19 +0000 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121012070459.2D9A3CC93F@birch.elegosoft.com> References: <20121012070459.2D9A3CC93F@birch.elegosoft.com> Message-ID: a few of the recent diffs: Index: m3core/src/m3core.h===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/m3core.h,vretrieving revision 1.76diff -r1.76 m3core.h154,157c154,160< #define M3EXTERNC_BEGIN extern "C" {< #define M3_EXTERNC_BEGIN extern "C" {< #define M3EXTERNC_END }< #define M3_EXTERNC_END }---> #define M3_EXTERN_C extern "C"> #define M3_EXTERN_C_BEGIN extern "C" {> #define M3_EXTERN_C_END }> #define M3EXTERNC_BEGIN extern "C" {> #define M3_EXTERNC_BEGIN extern "C" {> #define M3EXTERNC_END }> #define M3_EXTERNC_END }159,162c162,166< #define M3EXTERNC_BEGIN /* nothing */< #define M3_EXTERNC_BEGIN /* nothing */< #define M3EXTERNC_END /* nothing */< #define M3_EXTERNC_END /* nothing */---> #define M3_EXTERN_C /* nothing */> #define M3EXTERNC_BEGIN /* nothing */> #define M3_EXTERNC_BEGIN /* nothing */> #define M3EXTERNC_END /* nothing */> #define M3_EXTERNC_END /* nothing */Index: m3core/src/float/C99/FloatModeC.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/float/C99/FloatModeC.c,vretrieving revision 1.1diff -r1.1 FloatModeC.c23a24,27> #ifdef __cplusplus> extern "C" {> #endif> 56c60< we cant do that here so we have to wrap them ... */---> we cannot do that here so we have to wrap them. */71a76,79> > #ifdef __cplusplus> } /* extern "C" */> #endifIndex: m3core/src/runtime/common/RTLinker.i3===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/runtime/common/RTLinker.i3,vretrieving revision 1.6diff -r1.6 RTLinker.i345a46,52> <*EXTERNAL RTLinker__PrintString*> PROCEDURE PrintString (a : ADDRESS);> <*EXTERNAL RTLinker__PrintText*> PROCEDURE PrintText(a : TEXT);> <*EXTERNAL RTLinker__PrintInt*> PROCEDURE PrintInt(a : INTEGER);> <*EXTERNAL RTLinker__PrintModule*> PROCEDURE PrintModule(a : ADDRESS);> (* TYPE Trace_t = { None, M3, C };> <*EXTERNAL RTLinker__traceInit*> VAR traceInit : Trace_t; *)> Index: m3core/src/runtime/common/RTLinker.m3===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/runtime/common/RTLinker.m3,vretrieving revision 1.21diff -r1.21 RTLinker.m340a41,42> (* PrintModule(RTLinkerX.RTHooks_M3(0)); *)> Index: m3core/src/runtime/common/RTLinkerC.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/runtime/common/RTLinkerC.c,vretrieving revision 1.14diff -r1.14 RTLinkerC.c24a25,188> #if 1 /* debugging code */> > /*> see RT0.i3 for the types here> It would be good for the Modula-3 compiler to generate C headers.> */> > #include > > struct ModuleInfo_t; typedef struct ModuleInfo_t ModuleInfo_t;> struct ImportInfo_t; typedef struct ImportInfo_t ImportInfo_t;> #if 0> struct Text_t; typedef struct Text_t Text_t;> #endif> > struct ImportInfo_t> {> ModuleInfo_t* Import;> void* Binder; /* returns "import" pointer */> ImportInfo_t* Next;> };> > struct ModuleInfo_t> {> const char* File; /* 0 */> void* TypeCells; /* 4 8 */> void* TypeCellPointers; /* 8 16 */> void* FullRevelation; /* 12 24 */> void* PartialRevelation; /* 16 32 */> void* ProcedureInformation; /* 20 40 */> void* TryScopes; /* 24 48 */> void* VariableMap; /* 28 56 */> void* GarbageCollectionMap; /* 32 64 */> ImportInfo_t* Imports; /* 36 72 */> size_t LinkState; /* 40 80 */> void* Binder; /* 44 88 */> size_t GarbageCollectionFlags; /* 48 96 */> };> > #if 0> struct Text_t> {> void* Functions;> ptrdiff_t Length;> char Chars[1];> };> #endif> > #if 0> #define traceInit RTLinker__traceInit> enum Trace_t> {> Trace_None,> Trace_M3,> Trace_C,> };> size_t traceInit /* = Trace_C */;> > void> RTIO__PutString(const char* a);> > void> RTIO__PutText(Text_t* a);> > void> RTIO__PutInt(int a);> > static> void> RTIO__Flush(void);> > static> void> RTLinker__PrintFlush(void)> {> if (traceInit == Trace_M3)> RTIO__Flush();> }> > static> void> RTLinker__PrintString(const char* a)> {> if (a == NULL || a[0] == 0)> return;> switch (traceInit)> {> case Trace_None:> break;> case Trace_M3:> RTIO__PutString(a);> break;> case Trace_C:> printf("%s", a);> break;> }> }> > static> void> RTLinker__PrintText(Text_t* a)> {> if (a == NULL || a->Length < 1)> return;> switch (traceInit)> {> case Trace_None:> break;> case Trace_M3:> RTIO__PutText(a);> break;> case Trace_C:> printf("%.*s", ((int)a->Length), a->Chars);> break;> }> }> > static> void> RTLinker__PrintInt(int a)> {> switch (traceInit)> {> case Trace_None:> break;> case Trace_M3:> RTIO__PutInt(a);> break;> case Trace_C:> printf("%X", a);> break;> }> }> > #endif> > void> RTLinker__PrintModule(ModuleInfo_t* Module)> {> ImportInfo_t* Imports = { 0 };> > if ((Module == NULL) /*|| (traceInit != Trace_C)*/)> return;> Imports = Module->Imports;> while (Imports != NULL)> {> printf("Module %p %s Imports %p{Import %p, Binder %p, Next %p}",> Module,> Module->File,> Imports,> (Imports ? Imports->Import : NULL),> (Imports ? Imports->Binder : NULL),> (Imports ? Imports->Next : NULL));> fflush(0);> printf(" %p ", Imports && Imports->Import ? Imports->Import->File : "");> fflush(0);> printf(" %s\n", Imports && Imports->Import ? Imports->Import->File : "");> Imports = Imports->Next;> }> printf("\n");> }> > #endif> Index: m3core/src/thread/Common/ThreadInternal.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/Common/ThreadInternal.c,vretrieving revision 1.15diff -r1.15 ThreadInternal.c84c84< return select(nfds, read, write, xcept, NULL);---> return select(nfds, (fd_set*)read, (fd_set*)write, (fd_set*)xcept, NULL);89c89< return select(nfds, read, write, xcept, &timeout);---> return select(nfds, (fd_set*)read, (fd_set*)write, (fd_set*)xcept, &timeout);Index: m3core/src/thread/PTHREAD/ThreadPThreadC.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c,vretrieving revision 1.164diff -r1.164 ThreadPThreadC.c243c243< pthread_mutex_t * const ThreadPThread__##name##Mu = &name##Mu; \---> extern pthread_mutex_t * const ThreadPThread__##name##Mu = &name##Mu; \247c247< pthread_cond_t * const ThreadPThread__##name##Cond = &name##Cond; \---> extern pthread_cond_t * const ThreadPThread__##name##Cond = &name##Cond; \Index: libm3/src/list/ListSort.ig===================================================================RCS file: /usr/cvs/cm3/m3-libs/libm3/src/list/ListSort.ig,vretrieving revision 1.1.1.1diff -r1.1.1.1 ListSort.ig42d41< > Date: Fri, 12 Oct 2012 09:04:58 +0000 > To: m3commit at elegosoft.com > From: jkrell at elego.de > Subject: [M3commit] CVS Update: cm3 > > CVSROOT: /usr/cvs > Changes by: jkrell at birch. 12/10/12 09:04:58 > > Modified files: > cm3/m3-libs/m3core/src/runtime/common/: RTLinker.i3 RTLinker.m3 > RTLinkerC.c > > Log message: > restore-but-it-is-disabled some debugging assistance code > it has proven very useful multiple times > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkrell at elego.de Fri Oct 12 09:20:02 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:20:02 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012072002.69D6ACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:20:02 Modified files: cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThreadC.c Log message: try another approach because gcc is dumb extern type const foo; type const foo = init; really you want to say the perfectly correct and unambiguous etc. extern type const foo = init; but gcc warns for this. From jkrell at elego.de Fri Oct 12 09:24:41 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:24:41 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012072441.86FF3CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:24:41 Modified files: cm3/m3-libs/sysutils/src/POSIX/: FSUnixC.c Log message: add 'extern' on const so the system can be compiled with a C++ compiler in place of a C compiler..while avoiding the dumb gcc warning about 'extern const', which is a perfectly well defined and problem-free usage.. From jkrell at elego.de Fri Oct 12 09:53:42 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:53:42 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012075342.3C9A0CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:53:42 Modified files: cm3/m3-sys/m3linker/src/: MxGen.m3 Log message: fix _m3main.c so it can be compiled with a C++ compiler in place of a C compiler NOTE: We require at least an ANSI C compiler. I have fairly recently used systems with a K&R C compiler but no ANSI C compiler (Irix accidentally-looking-bundled compiler and HPUX/hppa bundled compiler that exists to compile data initialization and relink kernel). I'll revise this if/when I'm back at such a system. I doubt anyone else cares. (That is, _m3main.c should be valid K&R C, valid ANSI C, and valid C++.) From jkrell at elego.de Fri Oct 12 09:56:05 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:56:05 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012075605.DFE4BCC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:56:05 Modified files: cm3/m3-comm/tcp/src/POSIX/: HerrnoC.c Log message: add #ifdef __cplusplus extern "C" { #endif so a C++ compiler can be used instead of a C compiler From jkrell at elego.de Fri Oct 12 10:47:53 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 10:47:53 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012084753.E057FCC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 10:47:53 Modified files: cm3/m3-tools/pp/src/flex-bison/: m3makefile ./: m3makefile cm3/m3-tools/pp/src/lex-yacc-HPPA/: m3makefile ./: m3makefile cm3/m3-tools/pp/src/lex-yacc/: m3makefile Log message: one newline at end of file is enough From jkrell at elego.de Fri Oct 12 11:46:20 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 11:46:20 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012094620.F1E81CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 11:46:20 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: #ifdef __cplusplus typedef void* ADDRESS; #else typedef char* ADDRESS; #endif and then change just a few occurences of ADDRESS to char*, i.e. for math and then cast those to ADDRESS in another great application my multi-pass infrastructure, move declaration and initialization of segments (globals) up to the start -- thereby mostly fixing the validity of the code as C++ (declaration would suffice, initialization could still be later) There is still the matter that imported functions take structs as "ADDRESS" but local functions take them as a pointer to a struct with a specific size. I'll probably change that.. (Or did I already handle it? Anyway..progress toward valid C++, not sure if I'm there yet, got side tracked fixing the rest of the system, esp. the pp directory with lots of lex/flex output..) Might want to go back to char* for ADDRESS. From jkrell at elego.de Fri Oct 12 12:06:58 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 12:06:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012100658.3BFEACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 12:06:58 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: go back to ADDRESS is always char* and never use void*, even where we did before point partly being -- avoiding void* keeps us K&R valid the "fix" is to always pass/accept structs as ADDRESS, but when we copy a struct that is being passed by value, cast it of course, later, we will do better.. From dabenavidesd at yahoo.es Fri Oct 12 16:20:11 2012 From: dabenavidesd at yahoo.es (Daniel Alejandro Benavides D.) Date: Fri, 12 Oct 2012 15:20:11 +0100 (BST) Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121012070057.83050CC93F@birch.elegosoft.com> Message-ID: <1350051611.11127.YahooMailClassic@web29706.mail.ird.yahoo.com> Hi all: compiler wise code should not be in Common for portability reasons. Thanks in advance --- El vie, 12/10/12, Jay Krell escribi?: De: Jay Krell Asunto: [M3commit] CVS Update: cm3 Para: m3commit at elegosoft.com Fecha: viernes, 12 de octubre, 2012 04:00 CVSROOT:??? /usr/cvs Changes by:??? jkrell at birch.??? 12/10/12 09:00:57 Modified files: ??? cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c Log message: ??? cast select parameters from "ADDRESS" to fd_set* so the system can ??? be compiled using a C++ compiler in place of a C compiler -------------- next part -------------- An HTML attachment was scrubbed... URL: From hosking at cs.purdue.edu Fri Oct 12 16:35:30 2012 From: hosking at cs.purdue.edu (Antony Hosking) Date: Fri, 12 Oct 2012 10:35:30 -0400 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <1350051611.11127.YahooMailClassic@web29706.mail.ird.yahoo.com> References: <1350051611.11127.YahooMailClassic@web29706.mail.ird.yahoo.com> Message-ID: <143900A1-FE96-428C-AF55-3C356EFA4679@cs.purdue.edu> Jay?s change make it portable to both C and C++. Antony Hosking | Associate Professor | Computer Science | Purdue University 305 N. University Street | West Lafayette | IN 47907 | USA Mobile +1 765 427 5484 On Oct 12, 2012, at 10:20 AM, "Daniel Alejandro Benavides D." wrote: > > Hi all: > compiler wise code should not be in Common for portability reasons. > Thanks in advance > > --- El vie, 12/10/12, Jay Krell escribi?: > > De: Jay Krell > Asunto: [M3commit] CVS Update: cm3 > Para: m3commit at elegosoft.com > Fecha: viernes, 12 de octubre, 2012 04:00 > > CVSROOT: /usr/cvs > Changes by: jkrell at birch. 12/10/12 09:00:57 > > Modified files: > cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c > > Log message: > cast select parameters from "ADDRESS" to fd_set* so the system can > be compiled using a C++ compiler in place of a C compiler > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dabenavidesd at yahoo.es Fri Oct 12 17:07:25 2012 From: dabenavidesd at yahoo.es (Daniel Alejandro Benavides D.) Date: Fri, 12 Oct 2012 16:07:25 +0100 (BST) Subject: [M3commit] CVS Update: cm3 In-Reply-To: <143900A1-FE96-428C-AF55-3C356EFA4679@cs.purdue.edu> Message-ID: <1350054445.54642.YahooMailClassic@web29706.mail.ird.yahoo.com> Hi all: Downcasting is not allowed in Modula-3 in ADDRESS types, why to keep this specifc compiler thing here? Thanks in advance --- El vie, 12/10/12, Antony Hosking escribi?: De: Antony Hosking Asunto: Re: [M3commit] CVS Update: cm3 Para: "Daniel Alejandro Benavides D." CC: m3commit at elegosoft.com, jkrell at elego.de Fecha: viernes, 12 de octubre, 2012 09:35 Jay?s change make it portable to both C and C++. Antony Hosking?|?Associate Professor?| Computer Science | Purdue University305 N. University Street | West Lafayette | IN 47907 | USAMobile?+1 765 427 5484 On Oct 12, 2012, at 10:20 AM, "Daniel Alejandro Benavides D." wrote: Hi all: compiler wise code should not be in Common for portability reasons. Thanks in advance --- El vie, 12/10/12, Jay Krell escribi?: De: Jay Krell Asunto: [M3commit] CVS Update: cm3 Para: m3commit at elegosoft.com Fecha: viernes, 12 de octubre, 2012 04:00 CVSROOT:??? /usr/cvs Changes by:??? jkrell at birch.??? 12/10/12 09:00:57 Modified files: ??? cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c Log message: ??? cast select parameters from "ADDRESS" to fd_set* so the system can ??? be compiled using a C++ compiler in place of a C compiler -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkrell at elego.de Fri Oct 12 20:09:13 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 20:09:13 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012180913.726F5CC948@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 20:09:13 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: fix index_address since char* vs. void* gyrations and back to working? But why when I tried going back a few versions it was still broken? fix some search/replace errors: 't => " not" (don't, can't) T => U (suffixes on integer literals (unused?), vs. self/T/U) From jkrell at elego.de Sat Oct 13 07:38:56 2012 From: jkrell at elego.de (Jay Krell) Date: Sat, 13 Oct 2012 7:38:56 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121013053857.18747CC948@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/13 07:38:56 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: "cleanup" uplevels, record params by-value worse and better -- remove attempted abstractions, and sprinkle in special cases, at least saves us from inventing the right abstractions We are also more sure now to not declare variables after code. From jkrell at elego.de Sun Oct 14 00:31:39 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 0:31:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121013223143.83C77CC952@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 00:31:38 Added files: cm3/m3-sys/m3back/src/: experiment-bitfield2.c Log message: another experiemented..abandoned.. From jkrell at elego.de Sun Oct 14 12:23:04 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 12:23:04 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121014102304.D1769CC955@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 12:23:04 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: now that imports are earlier, remove ReportFault hack that caused us to use #ifdef to list all 64bit targets; much better! work in progress: only output helper functions that are used this helps gcc -Wall this is made easy by the multi-pass infrastructure remove our zero initialization of everything I think frontend generates it anyway optimize div and mod when input signs are known to match From jkrell at elego.de Sun Oct 14 23:35:12 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 23:35:12 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121014213513.0915BCC95E@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 23:35:12 Modified files: cm3/scripts/python/: upgrade.py Log message: add m3cgcat From jkrell at elego.de Sun Oct 14 23:36:14 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 23:36:14 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121014213614.8347FCC95E@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 23:36:14 Modified files: cm3/scripts/: pkginfo.txt Log message: add m3cgcat to base core front..unclear meanings those.. From jkrell at elego.de Wed Oct 17 12:24:27 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 17 Oct 2012 12:24:27 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121017102427.6AB96CC966@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/17 12:24:27 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: only declare/define helper functions that are used, mostly From jkrell at elego.de Wed Oct 17 12:44:58 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 17 Oct 2012 12:44:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121017104458.4A719CC967@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/17 12:44:58 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: only declare/define helper functions that are used -- handle ReportFault -- this reduces warnings from gcc/g++ -Wall, which I would like to eliminate (more to do) From jkrell at elego.de Wed Oct 17 21:56:20 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 17 Oct 2012 21:56:20 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121017195620.7E30DCC96C@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/17 21:56:20 Modified files: cm3/m3-sys/m3middle/src/: M3CG_MultiPass.i3 M3CG_MultiPass.m3 Log message: I forgot to commit these -- make op_counts public From jkrell at elego.de Thu Oct 18 21:18:22 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 18 Oct 2012 21:18:22 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121018191822.74911CC974@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/18 21:18:22 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: fully brace initializers to reduce gcc/g++ -Wall output fill in all zeros in initialized padding to reduce gcc/g++ -Wall output still to do: remove unused labels and unused locals From jkrell at elego.de Sat Oct 20 08:06:14 2012 From: jkrell at elego.de (Jay Krell) Date: Sat, 20 Oct 2012 8:06:14 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121020060614.61BEECC979@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/20 08:06:14 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: gcc -Wall work: remove unused variables -- would be nice if frontend didn't produce them.. remove unused labels -- would be nice if frontend didn't produce them.. mark a few functions as noreturn functions to quash gcc warnings including risky hack of removing exit_proc asserting that certain functions only have one..presumably/hopefully right before end_procedure.. small hardcoded list of no_functions..kind of hacky..but compiler is in bed with runtime is normal.. still to do -- warning: comparison is always false due to limited range of data type (this isn't gcc -Wall, but gcc default, like comparisons of unsigned numbers against 0...) give in and put some newlines in always so the code is more readable but still, no/little indentation From jkrell at elego.de Thu Oct 25 08:04:58 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 25 Oct 2012 8:04:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121025060459.59E85CC996@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/25 08:04:58 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: m3tohtml: Main.m3: In function ???Main__ReadFileList__AddFile__Add???: Main.m3:151: error: ???struct Main__ReadFileList__AddFile_Frame_t??? has no member named ???_static_link??? Main.m3:155: error: ???struct Main__ReadFileList__AddFile_Frame_t??? has no member named ???_static_link??? mark static_link parameter as always used, so that it always gets a place in the frame (fallout from removing unused variables -- at which time, I guess, I also optimized away other stuff..unused uplevel locals spot in frame?) From jkrell at elego.de Fri Oct 26 11:09:00 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 26 Oct 2012 11:09:00 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121026090900.BE2D6CC99F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/26 11:09:00 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: begin conversion from dealing with TEXT to a higher level "expression" type For now this is just a trivial tedious frequent wrapping/unwrapping, and TEXT concatenation, but it will change. This is a useful step along the way. Further developing this will enable us to: fold constants eliminate checks against subtranges/unsigned types in particular to fix gcc warnings we are getting eliminate unnecessary parens e.g. ((foo)) => (foo) eliminate unnecessary casts e.g. (ADDRESS)(*(ADDRESS*)foo) => (*(ADDRESS*)foo) From jkrell at elego.de Fri Oct 26 11:22:55 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 26 Oct 2012 11:22:55 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121026092255.C9A94CC99F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/26 11:22:55 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: continue to hack around bogus packing of M3CG.TypeUID From jkrell at elego.de Fri Oct 26 11:33:35 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 26 Oct 2012 11:33:35 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121026093335.82358CC99F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/26 11:33:35 Modified files: cm3/m3-sys/m3middle/src/: M3CG_MultiPass.i3 M3CG_MultiPass.m3 Log message: There is no value in recording/replaying calls to next_label. Backends that use this multipass infrastructure must simply be prepared to recieve fairly arbitrary labels at arbitrary times. Well, they can reasonably expect that M3CG_MultiPass.m3 has allocated labels densely..but I can't decide if starting at 0 or starting at 1 should be the interface -- if 0 should be a distinct invalid label, or simply the first one. Actually -1 is I think defined as invalid somewhere. From hosking at elego.de Sun Oct 28 17:20:19 2012 From: hosking at elego.de (Antony Hosking) Date: Sun, 28 Oct 2012 17:20:19 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121028162019.8464BCC9A7@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/28 17:20:19 Modified files: cm3/m3-sys/m3middle/src/: M3CG.i3 Log message: For Jay. From hosking at elego.de Sun Oct 28 17:22:31 2012 From: hosking at elego.de (Antony Hosking) Date: Sun, 28 Oct 2012 17:22:31 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121028162231.46D11CC9A7@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/28 17:22:31 Modified files: cm3/m3-sys/m3middle/src/: M3CG.i3 Log message: Plus the assertion. From jay.krell at cornell.edu Mon Oct 29 07:28:11 2012 From: jay.krell at cornell.edu (Jay K) Date: Mon, 29 Oct 2012 06:28:11 +0000 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121028162019.8464BCC9A7@birch.elegosoft.com> References: <20121028162019.8464BCC9A7@birch.elegosoft.com> Message-ID: Thank you. > Date: Sun, 28 Oct 2012 17:20:19 +0000 > To: m3commit at elegosoft.com > From: hosking at elego.de > Subject: [M3commit] CVS Update: cm3 > > CVSROOT: /usr/cvs > Changes by: hosking at birch. 12/10/28 17:20:19 > > Modified files: > cm3/m3-sys/m3middle/src/: M3CG.i3 > > Log message: > For Jay. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hosking at elego.de Tue Oct 30 02:56:53 2012 From: hosking at elego.de (Antony Hosking) Date: Tue, 30 Oct 2012 2:56:53 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121030015653.46CACCC9A9@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/30 02:56:53 Modified files: cm3/m3-sys/m3middle/src/: M3CG.i3 Log message: Oops. From jkrell at elego.de Wed Oct 31 19:14:52 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 31 Oct 2012 19:14:52 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121031181452.71C2ECC9B4@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/31 19:14:52 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: go back to using M3CG.TypeUID now that Tony accepted the fix work in progress on stack of "expressions" instead of stack of text eliminate casts from same type to same type (didn't verify yet by looking at the result, but did recompile entire system) From hosking at elego.de Mon Oct 1 19:04:06 2012 From: hosking at elego.de (Antony Hosking) Date: Mon, 1 Oct 2012 19:04:06 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121001170406.A91492474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/01 19:04:06 Modified files: cm3/m3-sys/llvm/src/: LLVM.i3 Log message: Need LLVM prefix. From jkrell at elego.de Wed Oct 3 08:58:33 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 3 Oct 2012 8:58:33 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121003065833.1BA4D2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/03 08:58:33 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: Another great use of the multi-pass infrastructure. (Granted, "buffering" per-function instead of per-unit would suffice. But the code structure here isn't bad.) Add a new "Locals" pass that handles: declare_segment (needed to detect exception handlers) declare_procedure end_procedure declare_param declare_local declare_temp pop_static_link (because it calls declare_temp) begin_block (needed in future for stack packing frame via unions) end_block (needed in future for stack packing frame via unions) and now uplevel locals in subblocks are correctly placed in the frame struct. This lets more code compile successfully. pop_static_link is split up -- early pass calls declare_temp later pass uses it The linkage between them -- how the later pass find the variable, is easy. pop_static_link_temp_vars: RefSeq is introduced. early pop_static_link does add hi later pop_static_link does get, increasing index each time. It is assumed that pop_static_link occurs the same number of times and in the same relative order in each pass, this is highly reasonable. A much fancier compiler might reorder things for optimization, but it would convert this first to another form. begin/end_block aren't taken advantage of yet. The intent is that each subblock with uplevel locals is unioned with subblocks at equal nesting levels, something like that. This construct isn't even all that common -- uplevel locals in nested blocks. Fix Var_FixName (for now) to more often change the names. In particular, locals/params with names like "int", that occured multiple times in a function (due to blocks) weren't being handled right. They were getting the same name. (The right fix is to have subblocks use braces, and rely on Modula-3 lexical scoping matching C lexical scoping. For non-uplevel. For uplevel, we have to create structs/unions within the struct for subblocks, or at least do this old renaming.) Also add in some hacks to deal with uplevel structs. They exist. (I need a small test case to cover this and other rare but valid constructs). They are kind of a special case. This probably needs more design/abstraction to clean it up. However, soon we will know struct return sizes and then pass and return structs by value in the C code, and uplevel structs will become maybe less of a special case. Maybe. Actually, probably still a special case -- the frame struct should probably have a pointer instead of a copied value, to avoid the copy. Unless the struct is smaller than a pointer, or something. With this change, m3tk-misc compiles. We get all the way to stubgen having problems at runtime. I'll have to step through working and non-working sidebyside. As well, the hacky ExtraScope_Open / ExtraScope_Close are now unused. Good. Also note that I was using gcc -O2 a while, no problem. I've undone that for now, just so I can better debug. From jkrell at elego.de Thu Oct 4 06:24:14 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:24:14 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004042414.A2BD32474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:24:14 Added files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 m3makefile Log message: There is a bug in my set_member and/or set_difference. This small program demonstrates it. From jkrell at elego.de Thu Oct 4 06:27:19 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:27:19 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004042719.1ADB62474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:27:19 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: copy in FindCharSet From jkrell at elego.de Thu Oct 4 06:29:49 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:29:49 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004042949.377C02474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:29:49 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce From jkrell at elego.de Thu Oct 4 06:43:57 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:43:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004044358.1BDE82474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:43:57 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: trim more -- set_difference + pass set as parameter -- not set_member From jkrell at elego.de Thu Oct 4 06:51:28 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:51:28 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004045129.3237B2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:51:28 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce From jkrell at elego.de Thu Oct 4 06:55:19 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 6:55:19 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004045519.ED6BD2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 06:55:19 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce From jkrell at elego.de Thu Oct 4 07:03:22 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:03:22 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004050322.B8E142474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:03:22 Modified files: cm3/m3-sys/m3tests/src/c1/c141/: Main.m3 Log message: further reduce -- requires set that doesn't fit in a word From jkrell at elego.de Thu Oct 4 07:12:00 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:12:00 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004051201.227A62474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:12:00 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: reverse parameter order to set functions, that should help! optionally inline extract, it is annoying to step through.. From jkrell at elego.de Thu Oct 4 07:13:42 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:13:42 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004051342.A8B812474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:13:42 Added files: cm3/m3-sys/m3tests/src/c1/c140/: Main.m3 Log message: a program that we used to have trouble compiling -- multiple variables named 'int' From jkrell at elego.de Thu Oct 4 07:13:50 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:13:50 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004051350.7636F2474005@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:13:50 Added files: cm3/m3-sys/m3tests/src/c1/c140/: m3makefile Log message: a program that we used to have trouble compiling -- multiple variables named 'int' From jkrell at elego.de Thu Oct 4 07:46:30 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 7:46:30 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004054630.799EB2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 07:46:30 Modified files: cm3/m3-libs/m3core/src/Csupport/Common/: hand.c Log message: change i++ to ++i From jkrell at elego.de Thu Oct 4 08:58:55 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 4 Oct 2012 8:58:55 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121004065855.7FB082474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/04 08:58:55 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: assert that alignments are all ok If that fails, we'll round up in the backend. assert that size >= 0 (and not merely > 0) size := MAX(size, 1) (convert 0 to 1 -- 0 occurs) perhaps it should be size := MAX(size, aligment) Should alignment be rounded up to 4 or 8 for variables like M3x86 does? I have now compiled the entire system using the C backend targeting AMD64_DARWIN. This is a very big milestone. This last change has only been tested on a small part of the tree. (i.e. that which has zero-sized variables, and everything "after" it) I can bring up and interact with various gui apps -- tetris, BadBricks (somewhat), Juno, mentor (at least somehow). Juno doesn't come up centered, and I recall it always did before. That might be something to look into. As well, the compiler has long been compiling itself. From jkrell at elego.de Fri Oct 5 08:50:22 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 8:50:22 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005065022.7C5952474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 08:50:22 Added files: cm3/m3-sys/m3middle/src/: M3CG_AssertFalse.i3 M3CG_AssertFalse.m3 Log message: add forgotten files see http://hudson.modula3.com:8080/job/cm3-current-build-AMD64_FREEBSD/lastFailedBuild/console This would also explain Tony's cron failure, of course. From jkrell at elego.de Fri Oct 5 08:56:52 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 8:56:52 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005065652.5A92D2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 08:56:52 Modified files: cm3/m3-sys/m3middle/src/: CoffTime.c Log message: initialize locals From jkrell at elego.de Fri Oct 5 08:57:29 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 8:57:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005065729.58B662474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 08:57:29 Modified files: cm3/m3-sys/m3middle/src/: CoffTime.c Log message: initialize locals in 'generic' style with braces From jkrell at elego.de Fri Oct 5 09:25:50 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 5 Oct 2012 9:25:50 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121005072551.078BA2474003@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/05 09:25:50 Modified files: cm3/m3-sys/m3middle/src/: M3CG_MultiPass.m3 Log message: just some work on the formatting for tonight still need to fix assigning op and think about making vars/procs always just be integers and not using a map From jkrell at elego.de Fri Oct 12 06:48:39 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 6:48:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012044840.0063CCC944@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 06:48:39 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 ./: M3C.m3 cm3/m3-sys/m3middle/src/: M3CG_BinRd.m3 M3CG_Binary.i3 M3CG_MultiPass.i3 M3CG_MultiPass.m3 ./: M3CG_BinRd.m3 M3CG_Binary.i3 M3CG_MultiPass.i3 M3CG_MultiPass.m3 cm3/m3-sys/m3cggen/src/: Main.m3 Log message: fill in the enums all correctly in M3CG_MultiPass add the missing ones to M3CG_Binary.Op Some cleanup in M3C.m3, including properly using the array indexed by said enums. From jay.krell at cornell.edu Fri Oct 12 06:52:49 2012 From: jay.krell at cornell.edu (Jay K) Date: Fri, 12 Oct 2012 04:52:49 +0000 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121012044840.0063CCC944@birch.elegosoft.com> References: <20121012044840.0063CCC944@birch.elegosoft.com> Message-ID: diff attached > Date: Fri, 12 Oct 2012 06:48:39 +0000 > To: m3commit at elegosoft.com > From: jkrell at elego.de > Subject: [M3commit] CVS Update: cm3 > > CVSROOT: /usr/cvs > Changes by: jkrell at birch. 12/10/12 06:48:39 > > Modified files: > cm3/m3-sys/m3back/src/: M3C.m3 > ./: M3C.m3 > cm3/m3-sys/m3middle/src/: M3CG_BinRd.m3 M3CG_Binary.i3 > M3CG_MultiPass.i3 M3CG_MultiPass.m3 > ./: M3CG_BinRd.m3 M3CG_Binary.i3 M3CG_MultiPass.i3 > M3CG_MultiPass.m3 > cm3/m3-sys/m3cggen/src/: Main.m3 > > Log message: > fill in the enums all correctly in M3CG_MultiPass > add the missing ones to M3CG_Binary.Op > Some cleanup in M3C.m3, including properly using the > array indexed by said enums. > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 5.txt URL: From jkrell at elego.de Fri Oct 12 08:53:01 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 8:53:01 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012065301.CAC8ACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 08:53:01 Modified files: cm3/m3-libs/libm3/src/sequence/: string.lsl Log message: ensure file ends with newline From jkrell at elego.de Fri Oct 12 08:53:39 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 8:53:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012065339.D4833CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 08:53:39 Modified files: cm3/m3-libs/libm3/src/table/: Table.ig Log message: file needs only one newline at end From jkrell at elego.de Fri Oct 12 08:59:56 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 8:59:56 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012065957.05ACECC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 08:59:56 Modified files: cm3/m3-libs/m3core/src/float/C99/: FloatModeC.c Log message: add #ifdef __cplusplus extern "C" { ... so the system can be compiled and linked successfully using a C++ compiler in place of a C compiler From jkrell at elego.de Fri Oct 12 09:00:57 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:00:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070057.83050CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:00:57 Modified files: cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c Log message: cast select parameters from "ADDRESS" to fd_set* so the system can be compiled using a C++ compiler in place of a C compiler From jkrell at elego.de Fri Oct 12 09:01:43 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:01:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070143.40534CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:01:43 Modified files: cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThreadC.c Log message: add "extern" to our "const" mutex/condition variables, so the system can be compiled using a C++ compiler in place of a C compiler From jkrell at elego.de Fri Oct 12 09:02:21 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:02:21 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070226.708EACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:02:21 Modified files: cm3/m3-libs/libm3/src/list/: ListSort.ig Log message: file needs only one newline at end, not two From jkrell at elego.de Fri Oct 12 09:03:42 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:03:42 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070342.EA647CC943@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:03:42 Modified files: cm3/m3-libs/m3core/src/: m3core.h Log message: along with M3EXTERNC_BEGIN and M3_EXTERNC_BEGIN, add also M3_EXTERN_C_BEGIN and line up columns just whitespace and add another style option -- that isn't currently used From jkrell at elego.de Fri Oct 12 09:04:58 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:04:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012070459.2D9A3CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:04:58 Modified files: cm3/m3-libs/m3core/src/runtime/common/: RTLinker.i3 RTLinker.m3 RTLinkerC.c Log message: restore-but-it-is-disabled some debugging assistance code it has proven very useful multiple times From jay.krell at cornell.edu Fri Oct 12 09:07:19 2012 From: jay.krell at cornell.edu (Jay K) Date: Fri, 12 Oct 2012 07:07:19 +0000 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121012070459.2D9A3CC93F@birch.elegosoft.com> References: <20121012070459.2D9A3CC93F@birch.elegosoft.com> Message-ID: a few of the recent diffs: Index: m3core/src/m3core.h===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/m3core.h,vretrieving revision 1.76diff -r1.76 m3core.h154,157c154,160< #define M3EXTERNC_BEGIN extern "C" {< #define M3_EXTERNC_BEGIN extern "C" {< #define M3EXTERNC_END }< #define M3_EXTERNC_END }---> #define M3_EXTERN_C extern "C"> #define M3_EXTERN_C_BEGIN extern "C" {> #define M3_EXTERN_C_END }> #define M3EXTERNC_BEGIN extern "C" {> #define M3_EXTERNC_BEGIN extern "C" {> #define M3EXTERNC_END }> #define M3_EXTERNC_END }159,162c162,166< #define M3EXTERNC_BEGIN /* nothing */< #define M3_EXTERNC_BEGIN /* nothing */< #define M3EXTERNC_END /* nothing */< #define M3_EXTERNC_END /* nothing */---> #define M3_EXTERN_C /* nothing */> #define M3EXTERNC_BEGIN /* nothing */> #define M3_EXTERNC_BEGIN /* nothing */> #define M3EXTERNC_END /* nothing */> #define M3_EXTERNC_END /* nothing */Index: m3core/src/float/C99/FloatModeC.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/float/C99/FloatModeC.c,vretrieving revision 1.1diff -r1.1 FloatModeC.c23a24,27> #ifdef __cplusplus> extern "C" {> #endif> 56c60< we cant do that here so we have to wrap them ... */---> we cannot do that here so we have to wrap them. */71a76,79> > #ifdef __cplusplus> } /* extern "C" */> #endifIndex: m3core/src/runtime/common/RTLinker.i3===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/runtime/common/RTLinker.i3,vretrieving revision 1.6diff -r1.6 RTLinker.i345a46,52> <*EXTERNAL RTLinker__PrintString*> PROCEDURE PrintString (a : ADDRESS);> <*EXTERNAL RTLinker__PrintText*> PROCEDURE PrintText(a : TEXT);> <*EXTERNAL RTLinker__PrintInt*> PROCEDURE PrintInt(a : INTEGER);> <*EXTERNAL RTLinker__PrintModule*> PROCEDURE PrintModule(a : ADDRESS);> (* TYPE Trace_t = { None, M3, C };> <*EXTERNAL RTLinker__traceInit*> VAR traceInit : Trace_t; *)> Index: m3core/src/runtime/common/RTLinker.m3===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/runtime/common/RTLinker.m3,vretrieving revision 1.21diff -r1.21 RTLinker.m340a41,42> (* PrintModule(RTLinkerX.RTHooks_M3(0)); *)> Index: m3core/src/runtime/common/RTLinkerC.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/runtime/common/RTLinkerC.c,vretrieving revision 1.14diff -r1.14 RTLinkerC.c24a25,188> #if 1 /* debugging code */> > /*> see RT0.i3 for the types here> It would be good for the Modula-3 compiler to generate C headers.> */> > #include > > struct ModuleInfo_t; typedef struct ModuleInfo_t ModuleInfo_t;> struct ImportInfo_t; typedef struct ImportInfo_t ImportInfo_t;> #if 0> struct Text_t; typedef struct Text_t Text_t;> #endif> > struct ImportInfo_t> {> ModuleInfo_t* Import;> void* Binder; /* returns "import" pointer */> ImportInfo_t* Next;> };> > struct ModuleInfo_t> {> const char* File; /* 0 */> void* TypeCells; /* 4 8 */> void* TypeCellPointers; /* 8 16 */> void* FullRevelation; /* 12 24 */> void* PartialRevelation; /* 16 32 */> void* ProcedureInformation; /* 20 40 */> void* TryScopes; /* 24 48 */> void* VariableMap; /* 28 56 */> void* GarbageCollectionMap; /* 32 64 */> ImportInfo_t* Imports; /* 36 72 */> size_t LinkState; /* 40 80 */> void* Binder; /* 44 88 */> size_t GarbageCollectionFlags; /* 48 96 */> };> > #if 0> struct Text_t> {> void* Functions;> ptrdiff_t Length;> char Chars[1];> };> #endif> > #if 0> #define traceInit RTLinker__traceInit> enum Trace_t> {> Trace_None,> Trace_M3,> Trace_C,> };> size_t traceInit /* = Trace_C */;> > void> RTIO__PutString(const char* a);> > void> RTIO__PutText(Text_t* a);> > void> RTIO__PutInt(int a);> > static> void> RTIO__Flush(void);> > static> void> RTLinker__PrintFlush(void)> {> if (traceInit == Trace_M3)> RTIO__Flush();> }> > static> void> RTLinker__PrintString(const char* a)> {> if (a == NULL || a[0] == 0)> return;> switch (traceInit)> {> case Trace_None:> break;> case Trace_M3:> RTIO__PutString(a);> break;> case Trace_C:> printf("%s", a);> break;> }> }> > static> void> RTLinker__PrintText(Text_t* a)> {> if (a == NULL || a->Length < 1)> return;> switch (traceInit)> {> case Trace_None:> break;> case Trace_M3:> RTIO__PutText(a);> break;> case Trace_C:> printf("%.*s", ((int)a->Length), a->Chars);> break;> }> }> > static> void> RTLinker__PrintInt(int a)> {> switch (traceInit)> {> case Trace_None:> break;> case Trace_M3:> RTIO__PutInt(a);> break;> case Trace_C:> printf("%X", a);> break;> }> }> > #endif> > void> RTLinker__PrintModule(ModuleInfo_t* Module)> {> ImportInfo_t* Imports = { 0 };> > if ((Module == NULL) /*|| (traceInit != Trace_C)*/)> return;> Imports = Module->Imports;> while (Imports != NULL)> {> printf("Module %p %s Imports %p{Import %p, Binder %p, Next %p}",> Module,> Module->File,> Imports,> (Imports ? Imports->Import : NULL),> (Imports ? Imports->Binder : NULL),> (Imports ? Imports->Next : NULL));> fflush(0);> printf(" %p ", Imports && Imports->Import ? Imports->Import->File : "");> fflush(0);> printf(" %s\n", Imports && Imports->Import ? Imports->Import->File : "");> Imports = Imports->Next;> }> printf("\n");> }> > #endif> Index: m3core/src/thread/Common/ThreadInternal.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/Common/ThreadInternal.c,vretrieving revision 1.15diff -r1.15 ThreadInternal.c84c84< return select(nfds, read, write, xcept, NULL);---> return select(nfds, (fd_set*)read, (fd_set*)write, (fd_set*)xcept, NULL);89c89< return select(nfds, read, write, xcept, &timeout);---> return select(nfds, (fd_set*)read, (fd_set*)write, (fd_set*)xcept, &timeout);Index: m3core/src/thread/PTHREAD/ThreadPThreadC.c===================================================================RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c,vretrieving revision 1.164diff -r1.164 ThreadPThreadC.c243c243< pthread_mutex_t * const ThreadPThread__##name##Mu = &name##Mu; \---> extern pthread_mutex_t * const ThreadPThread__##name##Mu = &name##Mu; \247c247< pthread_cond_t * const ThreadPThread__##name##Cond = &name##Cond; \---> extern pthread_cond_t * const ThreadPThread__##name##Cond = &name##Cond; \Index: libm3/src/list/ListSort.ig===================================================================RCS file: /usr/cvs/cm3/m3-libs/libm3/src/list/ListSort.ig,vretrieving revision 1.1.1.1diff -r1.1.1.1 ListSort.ig42d41< > Date: Fri, 12 Oct 2012 09:04:58 +0000 > To: m3commit at elegosoft.com > From: jkrell at elego.de > Subject: [M3commit] CVS Update: cm3 > > CVSROOT: /usr/cvs > Changes by: jkrell at birch. 12/10/12 09:04:58 > > Modified files: > cm3/m3-libs/m3core/src/runtime/common/: RTLinker.i3 RTLinker.m3 > RTLinkerC.c > > Log message: > restore-but-it-is-disabled some debugging assistance code > it has proven very useful multiple times > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkrell at elego.de Fri Oct 12 09:20:02 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:20:02 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012072002.69D6ACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:20:02 Modified files: cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThreadC.c Log message: try another approach because gcc is dumb extern type const foo; type const foo = init; really you want to say the perfectly correct and unambiguous etc. extern type const foo = init; but gcc warns for this. From jkrell at elego.de Fri Oct 12 09:24:41 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:24:41 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012072441.86FF3CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:24:41 Modified files: cm3/m3-libs/sysutils/src/POSIX/: FSUnixC.c Log message: add 'extern' on const so the system can be compiled with a C++ compiler in place of a C compiler..while avoiding the dumb gcc warning about 'extern const', which is a perfectly well defined and problem-free usage.. From jkrell at elego.de Fri Oct 12 09:53:42 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:53:42 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012075342.3C9A0CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:53:42 Modified files: cm3/m3-sys/m3linker/src/: MxGen.m3 Log message: fix _m3main.c so it can be compiled with a C++ compiler in place of a C compiler NOTE: We require at least an ANSI C compiler. I have fairly recently used systems with a K&R C compiler but no ANSI C compiler (Irix accidentally-looking-bundled compiler and HPUX/hppa bundled compiler that exists to compile data initialization and relink kernel). I'll revise this if/when I'm back at such a system. I doubt anyone else cares. (That is, _m3main.c should be valid K&R C, valid ANSI C, and valid C++.) From jkrell at elego.de Fri Oct 12 09:56:05 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 9:56:05 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012075605.DFE4BCC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 09:56:05 Modified files: cm3/m3-comm/tcp/src/POSIX/: HerrnoC.c Log message: add #ifdef __cplusplus extern "C" { #endif so a C++ compiler can be used instead of a C compiler From jkrell at elego.de Fri Oct 12 10:47:53 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 10:47:53 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012084753.E057FCC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 10:47:53 Modified files: cm3/m3-tools/pp/src/flex-bison/: m3makefile ./: m3makefile cm3/m3-tools/pp/src/lex-yacc-HPPA/: m3makefile ./: m3makefile cm3/m3-tools/pp/src/lex-yacc/: m3makefile Log message: one newline at end of file is enough From jkrell at elego.de Fri Oct 12 11:46:20 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 11:46:20 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012094620.F1E81CC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 11:46:20 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: #ifdef __cplusplus typedef void* ADDRESS; #else typedef char* ADDRESS; #endif and then change just a few occurences of ADDRESS to char*, i.e. for math and then cast those to ADDRESS in another great application my multi-pass infrastructure, move declaration and initialization of segments (globals) up to the start -- thereby mostly fixing the validity of the code as C++ (declaration would suffice, initialization could still be later) There is still the matter that imported functions take structs as "ADDRESS" but local functions take them as a pointer to a struct with a specific size. I'll probably change that.. (Or did I already handle it? Anyway..progress toward valid C++, not sure if I'm there yet, got side tracked fixing the rest of the system, esp. the pp directory with lots of lex/flex output..) Might want to go back to char* for ADDRESS. From jkrell at elego.de Fri Oct 12 12:06:58 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 12:06:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012100658.3BFEACC93F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 12:06:58 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: go back to ADDRESS is always char* and never use void*, even where we did before point partly being -- avoiding void* keeps us K&R valid the "fix" is to always pass/accept structs as ADDRESS, but when we copy a struct that is being passed by value, cast it of course, later, we will do better.. From dabenavidesd at yahoo.es Fri Oct 12 16:20:11 2012 From: dabenavidesd at yahoo.es (Daniel Alejandro Benavides D.) Date: Fri, 12 Oct 2012 15:20:11 +0100 (BST) Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121012070057.83050CC93F@birch.elegosoft.com> Message-ID: <1350051611.11127.YahooMailClassic@web29706.mail.ird.yahoo.com> Hi all: compiler wise code should not be in Common for portability reasons. Thanks in advance --- El vie, 12/10/12, Jay Krell escribi?: De: Jay Krell Asunto: [M3commit] CVS Update: cm3 Para: m3commit at elegosoft.com Fecha: viernes, 12 de octubre, 2012 04:00 CVSROOT:??? /usr/cvs Changes by:??? jkrell at birch.??? 12/10/12 09:00:57 Modified files: ??? cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c Log message: ??? cast select parameters from "ADDRESS" to fd_set* so the system can ??? be compiled using a C++ compiler in place of a C compiler -------------- next part -------------- An HTML attachment was scrubbed... URL: From hosking at cs.purdue.edu Fri Oct 12 16:35:30 2012 From: hosking at cs.purdue.edu (Antony Hosking) Date: Fri, 12 Oct 2012 10:35:30 -0400 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <1350051611.11127.YahooMailClassic@web29706.mail.ird.yahoo.com> References: <1350051611.11127.YahooMailClassic@web29706.mail.ird.yahoo.com> Message-ID: <143900A1-FE96-428C-AF55-3C356EFA4679@cs.purdue.edu> Jay?s change make it portable to both C and C++. Antony Hosking | Associate Professor | Computer Science | Purdue University 305 N. University Street | West Lafayette | IN 47907 | USA Mobile +1 765 427 5484 On Oct 12, 2012, at 10:20 AM, "Daniel Alejandro Benavides D." wrote: > > Hi all: > compiler wise code should not be in Common for portability reasons. > Thanks in advance > > --- El vie, 12/10/12, Jay Krell escribi?: > > De: Jay Krell > Asunto: [M3commit] CVS Update: cm3 > Para: m3commit at elegosoft.com > Fecha: viernes, 12 de octubre, 2012 04:00 > > CVSROOT: /usr/cvs > Changes by: jkrell at birch. 12/10/12 09:00:57 > > Modified files: > cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c > > Log message: > cast select parameters from "ADDRESS" to fd_set* so the system can > be compiled using a C++ compiler in place of a C compiler > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dabenavidesd at yahoo.es Fri Oct 12 17:07:25 2012 From: dabenavidesd at yahoo.es (Daniel Alejandro Benavides D.) Date: Fri, 12 Oct 2012 16:07:25 +0100 (BST) Subject: [M3commit] CVS Update: cm3 In-Reply-To: <143900A1-FE96-428C-AF55-3C356EFA4679@cs.purdue.edu> Message-ID: <1350054445.54642.YahooMailClassic@web29706.mail.ird.yahoo.com> Hi all: Downcasting is not allowed in Modula-3 in ADDRESS types, why to keep this specifc compiler thing here? Thanks in advance --- El vie, 12/10/12, Antony Hosking escribi?: De: Antony Hosking Asunto: Re: [M3commit] CVS Update: cm3 Para: "Daniel Alejandro Benavides D." CC: m3commit at elegosoft.com, jkrell at elego.de Fecha: viernes, 12 de octubre, 2012 09:35 Jay?s change make it portable to both C and C++. Antony Hosking?|?Associate Professor?| Computer Science | Purdue University305 N. University Street | West Lafayette | IN 47907 | USAMobile?+1 765 427 5484 On Oct 12, 2012, at 10:20 AM, "Daniel Alejandro Benavides D." wrote: Hi all: compiler wise code should not be in Common for portability reasons. Thanks in advance --- El vie, 12/10/12, Jay Krell escribi?: De: Jay Krell Asunto: [M3commit] CVS Update: cm3 Para: m3commit at elegosoft.com Fecha: viernes, 12 de octubre, 2012 04:00 CVSROOT:??? /usr/cvs Changes by:??? jkrell at birch.??? 12/10/12 09:00:57 Modified files: ??? cm3/m3-libs/m3core/src/thread/Common/: ThreadInternal.c Log message: ??? cast select parameters from "ADDRESS" to fd_set* so the system can ??? be compiled using a C++ compiler in place of a C compiler -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkrell at elego.de Fri Oct 12 20:09:13 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 12 Oct 2012 20:09:13 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121012180913.726F5CC948@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/12 20:09:13 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: fix index_address since char* vs. void* gyrations and back to working? But why when I tried going back a few versions it was still broken? fix some search/replace errors: 't => " not" (don't, can't) T => U (suffixes on integer literals (unused?), vs. self/T/U) From jkrell at elego.de Sat Oct 13 07:38:56 2012 From: jkrell at elego.de (Jay Krell) Date: Sat, 13 Oct 2012 7:38:56 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121013053857.18747CC948@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/13 07:38:56 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: "cleanup" uplevels, record params by-value worse and better -- remove attempted abstractions, and sprinkle in special cases, at least saves us from inventing the right abstractions We are also more sure now to not declare variables after code. From jkrell at elego.de Sun Oct 14 00:31:39 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 0:31:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121013223143.83C77CC952@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 00:31:38 Added files: cm3/m3-sys/m3back/src/: experiment-bitfield2.c Log message: another experiemented..abandoned.. From jkrell at elego.de Sun Oct 14 12:23:04 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 12:23:04 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121014102304.D1769CC955@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 12:23:04 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: now that imports are earlier, remove ReportFault hack that caused us to use #ifdef to list all 64bit targets; much better! work in progress: only output helper functions that are used this helps gcc -Wall this is made easy by the multi-pass infrastructure remove our zero initialization of everything I think frontend generates it anyway optimize div and mod when input signs are known to match From jkrell at elego.de Sun Oct 14 23:35:12 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 23:35:12 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121014213513.0915BCC95E@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 23:35:12 Modified files: cm3/scripts/python/: upgrade.py Log message: add m3cgcat From jkrell at elego.de Sun Oct 14 23:36:14 2012 From: jkrell at elego.de (Jay Krell) Date: Sun, 14 Oct 2012 23:36:14 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121014213614.8347FCC95E@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/14 23:36:14 Modified files: cm3/scripts/: pkginfo.txt Log message: add m3cgcat to base core front..unclear meanings those.. From jkrell at elego.de Wed Oct 17 12:24:27 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 17 Oct 2012 12:24:27 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121017102427.6AB96CC966@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/17 12:24:27 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: only declare/define helper functions that are used, mostly From jkrell at elego.de Wed Oct 17 12:44:58 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 17 Oct 2012 12:44:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121017104458.4A719CC967@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/17 12:44:58 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: only declare/define helper functions that are used -- handle ReportFault -- this reduces warnings from gcc/g++ -Wall, which I would like to eliminate (more to do) From jkrell at elego.de Wed Oct 17 21:56:20 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 17 Oct 2012 21:56:20 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121017195620.7E30DCC96C@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/17 21:56:20 Modified files: cm3/m3-sys/m3middle/src/: M3CG_MultiPass.i3 M3CG_MultiPass.m3 Log message: I forgot to commit these -- make op_counts public From jkrell at elego.de Thu Oct 18 21:18:22 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 18 Oct 2012 21:18:22 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121018191822.74911CC974@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/18 21:18:22 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: fully brace initializers to reduce gcc/g++ -Wall output fill in all zeros in initialized padding to reduce gcc/g++ -Wall output still to do: remove unused labels and unused locals From jkrell at elego.de Sat Oct 20 08:06:14 2012 From: jkrell at elego.de (Jay Krell) Date: Sat, 20 Oct 2012 8:06:14 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121020060614.61BEECC979@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/20 08:06:14 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: gcc -Wall work: remove unused variables -- would be nice if frontend didn't produce them.. remove unused labels -- would be nice if frontend didn't produce them.. mark a few functions as noreturn functions to quash gcc warnings including risky hack of removing exit_proc asserting that certain functions only have one..presumably/hopefully right before end_procedure.. small hardcoded list of no_functions..kind of hacky..but compiler is in bed with runtime is normal.. still to do -- warning: comparison is always false due to limited range of data type (this isn't gcc -Wall, but gcc default, like comparisons of unsigned numbers against 0...) give in and put some newlines in always so the code is more readable but still, no/little indentation From jkrell at elego.de Thu Oct 25 08:04:58 2012 From: jkrell at elego.de (Jay Krell) Date: Thu, 25 Oct 2012 8:04:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121025060459.59E85CC996@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/25 08:04:58 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: m3tohtml: Main.m3: In function ???Main__ReadFileList__AddFile__Add???: Main.m3:151: error: ???struct Main__ReadFileList__AddFile_Frame_t??? has no member named ???_static_link??? Main.m3:155: error: ???struct Main__ReadFileList__AddFile_Frame_t??? has no member named ???_static_link??? mark static_link parameter as always used, so that it always gets a place in the frame (fallout from removing unused variables -- at which time, I guess, I also optimized away other stuff..unused uplevel locals spot in frame?) From jkrell at elego.de Fri Oct 26 11:09:00 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 26 Oct 2012 11:09:00 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121026090900.BE2D6CC99F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/26 11:09:00 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: begin conversion from dealing with TEXT to a higher level "expression" type For now this is just a trivial tedious frequent wrapping/unwrapping, and TEXT concatenation, but it will change. This is a useful step along the way. Further developing this will enable us to: fold constants eliminate checks against subtranges/unsigned types in particular to fix gcc warnings we are getting eliminate unnecessary parens e.g. ((foo)) => (foo) eliminate unnecessary casts e.g. (ADDRESS)(*(ADDRESS*)foo) => (*(ADDRESS*)foo) From jkrell at elego.de Fri Oct 26 11:22:55 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 26 Oct 2012 11:22:55 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121026092255.C9A94CC99F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/26 11:22:55 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: continue to hack around bogus packing of M3CG.TypeUID From jkrell at elego.de Fri Oct 26 11:33:35 2012 From: jkrell at elego.de (Jay Krell) Date: Fri, 26 Oct 2012 11:33:35 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121026093335.82358CC99F@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/26 11:33:35 Modified files: cm3/m3-sys/m3middle/src/: M3CG_MultiPass.i3 M3CG_MultiPass.m3 Log message: There is no value in recording/replaying calls to next_label. Backends that use this multipass infrastructure must simply be prepared to recieve fairly arbitrary labels at arbitrary times. Well, they can reasonably expect that M3CG_MultiPass.m3 has allocated labels densely..but I can't decide if starting at 0 or starting at 1 should be the interface -- if 0 should be a distinct invalid label, or simply the first one. Actually -1 is I think defined as invalid somewhere. From hosking at elego.de Sun Oct 28 17:20:19 2012 From: hosking at elego.de (Antony Hosking) Date: Sun, 28 Oct 2012 17:20:19 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121028162019.8464BCC9A7@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/28 17:20:19 Modified files: cm3/m3-sys/m3middle/src/: M3CG.i3 Log message: For Jay. From hosking at elego.de Sun Oct 28 17:22:31 2012 From: hosking at elego.de (Antony Hosking) Date: Sun, 28 Oct 2012 17:22:31 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121028162231.46D11CC9A7@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/28 17:22:31 Modified files: cm3/m3-sys/m3middle/src/: M3CG.i3 Log message: Plus the assertion. From jay.krell at cornell.edu Mon Oct 29 07:28:11 2012 From: jay.krell at cornell.edu (Jay K) Date: Mon, 29 Oct 2012 06:28:11 +0000 Subject: [M3commit] CVS Update: cm3 In-Reply-To: <20121028162019.8464BCC9A7@birch.elegosoft.com> References: <20121028162019.8464BCC9A7@birch.elegosoft.com> Message-ID: Thank you. > Date: Sun, 28 Oct 2012 17:20:19 +0000 > To: m3commit at elegosoft.com > From: hosking at elego.de > Subject: [M3commit] CVS Update: cm3 > > CVSROOT: /usr/cvs > Changes by: hosking at birch. 12/10/28 17:20:19 > > Modified files: > cm3/m3-sys/m3middle/src/: M3CG.i3 > > Log message: > For Jay. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hosking at elego.de Tue Oct 30 02:56:53 2012 From: hosking at elego.de (Antony Hosking) Date: Tue, 30 Oct 2012 2:56:53 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121030015653.46CACCC9A9@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: hosking at birch. 12/10/30 02:56:53 Modified files: cm3/m3-sys/m3middle/src/: M3CG.i3 Log message: Oops. From jkrell at elego.de Wed Oct 31 19:14:52 2012 From: jkrell at elego.de (Jay Krell) Date: Wed, 31 Oct 2012 19:14:52 () Subject: [M3commit] CVS Update: cm3 Message-ID: <20121031181452.71C2ECC9B4@birch.elegosoft.com> CVSROOT: /usr/cvs Changes by: jkrell at birch. 12/10/31 19:14:52 Modified files: cm3/m3-sys/m3back/src/: M3C.m3 Log message: go back to using M3CG.TypeUID now that Tony accepted the fix work in progress on stack of "expressions" instead of stack of text eliminate casts from same type to same type (didn't verify yet by looking at the result, but did recompile entire system)