From: Sam S. <sd...@gn...> - 2018-01-24 13:42:34
|
> * CLISP - an ANSI Common Lisp Mercurial repository <ab...@py...g> [2018-01-23 21:52:45 +0000]: > > ## Branch: default > > Fix initialization of modules in SINGLEMAP_MEMORY model, part 2. > > By Bruno Haible on 01/23/2018 21:52 > [**View > Changes**](https://sourceforge.net/p/clisp/clisp/ci/53a51b7cce4b0bad900608e463bb040640c5dedd/) it's weird that you need such an elaborate fix for the problem triggered by optimizations. care to say more? thanks! -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1561 http://steingoldpsychology.com http://www.childpsy.net https://jihadwatch.org http://islamexposedonline.com https://ffii.org Failure is not an option. It comes bundled with your Microsoft product. |
From: Bruno H. <br...@cl...> - 2018-01-24 18:29:15
|
Hi Sam, > > Fix initialization of modules in SINGLEMAP_MEMORY model, part 2. > > it's weird that you need such an elaborate fix for the problem triggered > by optimizations. The commit that you found by bisecting enabled various kinds of optimizations; in particular it disabled NO_ADDRESS_SPACE_ASSUMPTIONS. This made it possible to use GENERATIONAL_GC, with either TRIVIALMAP_MEMORY or SINGLEMAP_MEMORY. On Linux/x86_64, the heuristics choose SINGLEMAP_MEMORY. SINGLEMAP_MEMORY implies that all objects contain the typecode already in the address, and that this typecode does not need to be masked out. But this means that all "preallocated" objects, like the symbols from constsym.d and the SUBRs need to be allocated in mmap()ed memory. So, the subr_t records that we build up in subr.d and through the modprep- generated tables are not used at runtime; they only serve to _initialize_ the subr_t records that are using at runtime. The F() macro had made an assumption that the subr_t at runtime and the subr_t that contains its initialization data are identical. This assumption is no longer generally valid. In fact, the address of a SUBR such as REGEXP::REGEXP-FREE is no longer predictable: it depends on the number of SUBRs defined by subr.d and of the number of SUBRs defined by all prior modules. So spvw.d has to inform the module about the base address of the SUBRs of the module. This has to be done in init_function_2 and (maybe - better safe than sorry) also in init_function_1. And this means that the default implementation of the init_function_2 is no longer empty. Which required changes to all modules that define an init_function_2 of their own. Bruno |
From: Sam S. <sd...@gn...> - 2018-01-26 14:24:57
|
Hi Bruno, > * Bruno Haible <oe...@py...t> [2018-01-24 19:29:02 +0100]: > > The F() macro had made an assumption that the subr_t at runtime and > the subr_t that contains its initialization data are identical. This > assumption is no longer generally valid. In fact, the address of a > SUBR such as REGEXP::REGEXP-FREE is no longer predictable: it depends > on the number of SUBRs defined by subr.d and of the number of SUBRs > defined by all prior modules. I wonder if this has bearing on modules creating new stream types https://sourceforge.net/p/clisp/feature-requests/37/ https://sourceforge.net/p/clisp/mailman/message/14629441/ and thus a possibility to moving sockets (including secure sockets) to a module. Thanks. -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1561 http://steingoldpsychology.com http://www.childpsy.net http://think-israel.org https://jihadwatch.org http://honestreporting.com https://ffii.org There are no answers, only cross references. |
From: Bruno H. <br...@cl...> - 2018-01-27 10:25:51
|
Hi Sam, > > The F() macro had made an assumption that the subr_t at runtime and > > the subr_t that contains its initialization data are identical... > > I wonder if this has bearing on modules creating new stream types > https://sourceforge.net/p/clisp/feature-requests/37/ > https://sourceforge.net/p/clisp/mailman/message/14629441/ > and thus a possibility to moving sockets (including secure sockets) to a > module. It has no relation. The fixed issue is about the management of the table of SUBRs. The other issue, which we discussed in 2007, is that the table of Pseudofuns is not extensible. Moving the sockets to a separate module is very low priority (no benefit I can see). Bruno |
From: Sam S. <sd...@gn...> - 2018-01-29 14:42:52
|
Hi Bruno, > * Bruno Haible <oe...@py...t> [2018-01-27 11:25:39 +0100]: > > Moving the sockets to a separate module is very low priority (no > benefit I can see). Increased modularity should make code easier to maintain for us and contribute for others. You argued for making dirkey a module decades ago for the same reason. -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1561 http://steingoldpsychology.com http://www.childpsy.net http://mideasttruth.com http://no2bds.org https://ffii.org http://jij.org http://memri.org MS: Brain off-line, please wait. |