From noreply at github.com Fri Nov 3 06:30:00 2017 From: noreply at github.com (GitHub) Date: Thu, 02 Nov 2017 22:30:00 -0700 Subject: [M3commit] [modula3/cm3] ce93dc: Add needed protocal response for HTTP Message-ID: <59fbfed85ef43_63443fb51db4fc3c793b3@hookshot-fe2-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: ce93dcb1b2c2dc3be5dbfdc6eed7f4d869200135 https://github.com/modula3/cm3/commit/ce93dcb1b2c2dc3be5dbfdc6eed7f4d869200135 Author: peter mckinna Date: 2017-10-30 (Mon, 30 Oct 2017) Changed paths: M examples/httpd/src/HTTPD.m3 Log Message: ----------- Add needed protocal response for HTTP Commit: c9017791ad2c4797eb9e83c60ed7a496bf89fac0 https://github.com/modula3/cm3/commit/c9017791ad2c4797eb9e83c60ed7a496bf89fac0 Author: peter mckinna Date: 2017-11-03 (Fri, 03 Nov 2017) Changed paths: M m3-sys/cm3/src/Makefile.m3 Log Message: ----------- Add command line support for disabling debugger output and extend optimization levels Added support for -g0 to disable debugger information being built by the backend this is primarily to enable developers to read the generated assembly and compare output from cmc3g and llvm. The option is available for both gcc and clang. Also added is support for -O0 -O1 -O2 -O3 optimisation levels which are passed to the backend. O0 disables optimisation and the other levels are in line with gcc and llvm llc and opt tools. Commit: e75323be621b836083a495b01b1f0dcc383632eb https://github.com/modula3/cm3/commit/e75323be621b836083a495b01b1f0dcc383632eb Author: peter mckinna Date: 2017-11-03 (Fri, 03 Nov 2017) Changed paths: M m3-sys/cminstall/src/config-no-install/Unix.common Log Message: ----------- Allow llvm optimzation pass opt to be called at various optimization levels The llvm opt tool does various IR to IR optimization transformations. This tool is only invoked if -O (or -O0-3) is specified on the command line. The file generated is basefile_opt.(mb|ib) and is deleted unless -keep is also specified. Commit: 11c5dbb060c9e5075d76e1b7f8a5703a6ec46908 https://github.com/modula3/cm3/commit/11c5dbb060c9e5075d76e1b7f8a5703a6ec46908 Author: peter mckinna Date: 2017-11-03 (Fri, 03 Nov 2017) Changed paths: M m3-sys/llvm3.6.1/src/M3CG_LLVM.m3 Log Message: ----------- Add source line info to abort procedure llvm was not passing the source line to ReportFault to aid in runtime error diagnosis. Also removed a couple of warnings for unused vars. Commit: 7c7fa0d716d965bcb76d6d5dcac14d12f42de4fd https://github.com/modula3/cm3/commit/7c7fa0d716d965bcb76d6d5dcac14d12f42de4fd Author: peter mckinna Date: 2017-11-03 (Fri, 03 Nov 2017) Changed paths: M m3-sys/m3tests/src/m3makefile Log Message: ----------- Pass nodebug to cm3 for llvm tests Currently M3CG_LLVM has problems with debugging. Passing -g0 in cm3 command avoids the problem and allows proper testing using the llvm backend. Note there may be another way to do this. It also allows us to pass an optimisation level to the test if needed. Compare: https://github.com/modula3/cm3/compare/c951d2fd5fad...7c7fa0d716d9 From noreply at github.com Sun Nov 5 02:46:32 2017 From: noreply at github.com (GitHub) Date: Sat, 04 Nov 2017 18:46:32 -0700 Subject: [M3commit] [modula3/cm3] 48584a: Document a peculiarity in CM3 IR that reflects cal... Message-ID: <59fe6d78cdc60_21533f8a953bbc3010328a@hookshot-fe2-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 48584a745d69d37f43b1ee4b8b5fab47682f7d50 https://github.com/modula3/cm3/commit/48584a745d69d37f43b1ee4b8b5fab47682f7d50 Author: Rodney Bates Date: 2017-11-04 (Sat, 04 Nov 2017) Changed paths: M m3-sys/m3middle/src/M3CG_Ops.i3 Log Message: ----------- Document a peculiarity in CM3 IR that reflects call-site copy. For parameters of struct types, (which could be any static sized in-memory aggregate, but used only for records and arrays), only the call site has IR operators that indicate that a copy should be made, thus effectively passing by value. There is no IR indication of by-value passing at procedure entry, making it easy for a back end to do call site copy and, at best, subtle to do it at procedure entry. Document this is M3CG_Ops.i3. From noreply at github.com Sun Nov 5 21:52:39 2017 From: noreply at github.com (GitHub) Date: Sun, 05 Nov 2017 12:52:39 -0800 Subject: [M3commit] [modula3/cm3] 14cb0b: Fix a bug passing records by value in indirect cal... Message-ID: <59ff7a17ab0a8_16f93fe26e319c3863743@hookshot-fe2-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 14cb0b59b638273fdcdad745d5d9a68980959e37 https://github.com/modula3/cm3/commit/14cb0b59b638273fdcdad745d5d9a68980959e37 Author: Rodney Bates Date: 2017-11-05 (Sun, 05 Nov 2017) Changed paths: M m3-sys/llvm3.6.1/src/M3CG_LLVM.m3 Log Message: ----------- Fix a bug passing records by value in indirect calls. For indirect calls, structs (static-sized records & arrays) passed by value didn't get the llvm byval attribute, which causes llvm to insert call-site copy. Worked for direct calls. Indirect calls in cm3 IR do not have enough information to know when to add byval. Changed to do away altogether with the byval attribute and instead generate explicit call-site code to make the copy, in pop_struct. From noreply at github.com Mon Nov 6 17:45:52 2017 From: noreply at github.com (GitHub) Date: Mon, 06 Nov 2017 08:45:52 -0800 Subject: [M3commit] [modula3/cm3] 083f50: Allocate VALUE struct copies in entry block. Message-ID: <5a0091c086581_5df63ffac26b5c2c304cb@hookshot-fe1-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 083f5064e0e9f09ad6d319ce2b335e26289f6f02 https://github.com/modula3/cm3/commit/083f5064e0e9f09ad6d319ce2b335e26289f6f02 Author: Rodney Bates Date: 2017-11-06 (Mon, 06 Nov 2017) Changed paths: M m3-sys/llvm3.6.1/src/M3CG_LLVM.m3 Log Message: ----------- Allocate VALUE struct copies in entry block. Move temps used for copying structs passed by VALUE into the entry block. Also, inline and partially evaluate call on copy, for cleaner code. From noreply at github.com Thu Nov 9 06:55:07 2017 From: noreply at github.com (GitHub) Date: Wed, 08 Nov 2017 21:55:07 -0800 Subject: [M3commit] [modula3/cm3] 33987a: Typo Message-ID: <5a03edbb6d307_7b133fea81a0dc2c25561@hookshot-fe1-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 33987a1b225263fe0f363e68d373e9b4b3371884 https://github.com/modula3/cm3/commit/33987a1b225263fe0f363e68d373e9b4b3371884 Author: peter mckinna Date: 2017-11-09 (Thu, 09 Nov 2017) Changed paths: M m3-libs/m3core/src/runtime/common/RuntimeError.m3 Log Message: ----------- Typo Commit: 10a0c3ac7e65d19a64d70534788316dc06f0a53b https://github.com/modula3/cm3/commit/10a0c3ac7e65d19a64d70534788316dc06f0a53b Author: peter mckinna Date: 2017-11-09 (Thu, 09 Nov 2017) Changed paths: R m3-db/mysql/src/class/MySQLMaps.i3 R m3-db/mysql/src/class/MySQLMaps.m3 R m3-db/mysql/src/class/m3makefile Log Message: ----------- New version doesnt need maps Commit: 05227a22add113c371f38cc0bd5be766eb28e670 https://github.com/modula3/cm3/commit/05227a22add113c371f38cc0bd5be766eb28e670 Author: peter mckinna Date: 2017-11-09 (Thu, 09 Nov 2017) Changed paths: M m3-sys/m3front/src/types/ArrayType.m3 M m3-sys/m3front/src/types/RecordType.m3 M m3-sys/m3front/src/types/SetType.m3 Log Message: ----------- Set mem_type to Struct as per the comment Array, Record and (Set types greater than word size) generate pop_struct operators for their calls by value. This results in a declare_param for each of these types in the case of directly callable functions from imported procedures. These params were being declared as Addr resulting in a type mismatch. Also the declaration in the Interface was Addr but in the Module was Struct resulting in some ambiguity. Compare: https://github.com/modula3/cm3/compare/083f5064e0e9...05227a22add1 From noreply at github.com Fri Nov 10 17:56:57 2017 From: noreply at github.com (GitHub) Date: Fri, 10 Nov 2017 08:56:57 -0800 Subject: [M3commit] [modula3/cm3] 89f779: More versatile interface to CopyOpenArray. Message-ID: <5a05da59c99c5_58ea3f9d37109c3011747@hookshot-fe3-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 89f77958fc54511387e3fa8257e43960113c0206 https://github.com/modula3/cm3/commit/89f77958fc54511387e3fa8257e43960113c0206 Author: Rodney Bates Date: 2017-11-10 (Fri, 10 Nov 2017) Changed paths: M m3-sys/m3front/src/types/Type.i3 M m3-sys/m3front/src/types/Type.m3 M m3-sys/m3front/src/values/Formal.m3 M m3-sys/m3front/src/values/Variable.i3 M m3-sys/m3front/src/values/Variable.m3 Log Message: ----------- More versatile interface to CopyOpenArray. Also misc comments. NOTE: It turns out that a call site open array copy is not needed. For a READONLY array formal, the only time a call site copy is required is when the actual is a nondesignator. This can only be an array constructor or function result. In either case, the size is statically known, so CG's GenCopy can be used, even when the formal and/or actual is open. This is very fortunate, because CopyOpenArray needs to generate a call to RTS' NewTracedArray, and that would be a nested call, which would be quite unpleasant to avoid. NOTE2: Except for prolog-located copy of an open array, (which happens when the formal is VALUE open array), all by-value copying of in-memory types is done at the call site. This is unfortunate from a performance standpoint, because it can make for poor use of temp space, not to mention duplication of copy code at multiple calls to the same procedure. But changing this would upset binary compatability with previously compiled code and such things as C bindings. From noreply at github.com Sat Nov 11 22:27:26 2017 From: noreply at github.com (GitHub) Date: Sat, 11 Nov 2017 13:27:26 -0800 Subject: [M3commit] [modula3/cm3] 137e18: Comments, remove unneeded IMPORT. Message-ID: <5a076b3e68528_440a3fd104db1c34125521@hookshot-fe5-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 137e1843ccabb13676c7ea2ff33ef414f49ebda1 https://github.com/modula3/cm3/commit/137e1843ccabb13676c7ea2ff33ef414f49ebda1 Author: Rodney Bates Date: 2017-11-11 (Sat, 11 Nov 2017) Changed paths: M m3-sys/m3front/src/values/Formal.m3 Log Message: ----------- Comments, remove unneeded IMPORT. From noreply at github.com Tue Nov 14 17:53:47 2017 From: noreply at github.com (GitHub) Date: Tue, 14 Nov 2017 08:53:47 -0800 Subject: [M3commit] [modula3/cm3] b9c1b9: Add test p032, passing of array parameters. Message-ID: <5a0b1f9b9fe95_9ed3fdcb7487c306594e@hookshot-fe-92cdb05.cp1-iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: b9c1b9c8075ee8fb06f6cbdd7020be3f6136e244 https://github.com/modula3/cm3/commit/b9c1b9c8075ee8fb06f6cbdd7020be3f6136e244 Author: Rodney Bates Date: 2017-11-14 (Tue, 14 Nov 2017) Changed paths: M m3-sys/m3tests/src/m3makefile A m3-sys/m3tests/src/p0/p032/Main.m3 A m3-sys/m3tests/src/p0/p032/m3makefile A m3-sys/m3tests/src/p0/p032/stderr.build A m3-sys/m3tests/src/p0/p032/stderr.pgm A m3-sys/m3tests/src/p0/p032/stdout.build A m3-sys/m3tests/src/p0/p032/stdout.pgm Log Message: ----------- Add test p032, passing of array parameters. Test passing of array parameters, fixed and open, in all three modes. For READONLY mode, this is subtle. According to Modula3, only nondesignators passed by value in READONLY mode. (Anything that is assignable is passed by reference, and anything not assignable is statically illegal.) The only array nondesignators are constants and function results, neither of which is aliasable, so they are regarded as already being copies and passed by reference at the low level. From noreply at github.com Tue Nov 14 19:05:48 2017 From: noreply at github.com (GitHub) Date: Tue, 14 Nov 2017 10:05:48 -0800 Subject: [M3commit] [modula3/cm3] 14ba58: Add compiler test p031, parameter modes, except ar... Message-ID: <5a0b307cdf8f8_24323ffbaf42fc3025770@hookshot-fe6-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 14ba58ad9c4e56ff6c2d74ce5bb8b1031ddc3858 https://github.com/modula3/cm3/commit/14ba58ad9c4e56ff6c2d74ce5bb8b1031ddc3858 Author: Rodney Bates Date: 2017-11-14 (Tue, 14 Nov 2017) Changed paths: M m3-sys/m3tests/src/m3makefile A m3-sys/m3tests/src/p0/p031/FloatInst.i3 A m3-sys/m3tests/src/p0/p031/Main.m3 A m3-sys/m3tests/src/p0/p031/OrdInst.i3 A m3-sys/m3tests/src/p0/p031/ProcInst.i3 A m3-sys/m3tests/src/p0/p031/ProcInst.m3 A m3-sys/m3tests/src/p0/p031/RecInst.i3 A m3-sys/m3tests/src/p0/p031/RefInst.i3 A m3-sys/m3tests/src/p0/p031/RefInst.m3 A m3-sys/m3tests/src/p0/p031/SetsInst.i3 A m3-sys/m3tests/src/p0/p031/Support.i3 A m3-sys/m3tests/src/p0/p031/Support.m3 A m3-sys/m3tests/src/p0/p031/Tests.ig A m3-sys/m3tests/src/p0/p031/Tests.mg A m3-sys/m3tests/src/p0/p031/m3makefile A m3-sys/m3tests/src/p0/p031/stderr.build A m3-sys/m3tests/src/p0/p031/stderr.pgm A m3-sys/m3tests/src/p0/p031/stdout.build A m3-sys/m3tests/src/p0/p031/stdout.pgm Log Message: ----------- Add compiler test p031, parameter modes, except arrays. From noreply at github.com Tue Nov 14 19:09:12 2017 From: noreply at github.com (GitHub) Date: Tue, 14 Nov 2017 10:09:12 -0800 Subject: [M3commit] [modula3/cm3] 423dce: Prevent irrelevant compile-time diff output on com... Message-ID: <5a0b314872d30_1e273ff9f3105c3431419@hookshot-fe6-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 423dce2f53cc8cfe2ab794f89ffedf73bf3f0256 https://github.com/modula3/cm3/commit/423dce2f53cc8cfe2ab794f89ffedf73bf3f0256 Author: Rodney Bates Date: 2017-11-14 (Tue, 14 Nov 2017) Changed paths: M m3-sys/m3tests/src/p0/p032/stderr.build Log Message: ----------- Prevent irrelevant compile-time diff output on compiler test p032. From noreply at github.com Thu Nov 16 20:26:03 2017 From: noreply at github.com (GitHub) Date: Thu, 16 Nov 2017 11:26:03 -0800 Subject: [M3commit] [modula3/cm3] ff761b: Refactor parameter passing. Message-ID: <5a0de64b44373_2a433fa653451c2495931@hookshot-fe6-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: ff761bc8e45ff4be03925038a34f7c575d9c3734 https://github.com/modula3/cm3/commit/ff761bc8e45ff4be03925038a34f7c575d9c3734 Author: Rodney Bates Date: 2017-11-16 (Thu, 16 Nov 2017) Changed paths: M m3-sys/m3front/src/values/Formal.m3 Log Message: ----------- Refactor parameter passing. This is a pure refactor. It was very confusing, with multiple paths merging, then diverging again, based on different tests of some of the same conditions on the first divergence. From noreply at github.com Tue Nov 21 23:35:40 2017 From: noreply at github.com (GitHub) Date: Tue, 21 Nov 2017 14:35:40 -0800 Subject: [M3commit] [modula3/cm3] f77161: Fix CG internal error, when passing bitpacked arra... Message-ID: <5a14aa3c55cd5_7e393fe79191bc44159511@hookshot-fe5-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: f771611139da4f195e1ce02d894c4dbcf9eab33c https://github.com/modula3/cm3/commit/f771611139da4f195e1ce02d894c4dbcf9eab33c Author: Rodney Bates Date: 2017-11-21 (Tue, 21 Nov 2017) Changed paths: M m3-sys/m3front/src/misc/CG.i3 M m3-sys/m3front/src/misc/CG.m3 M m3-sys/m3front/src/values/Formal.m3 Log Message: ----------- Fix CG internal error, when passing bitpacked array by value.