From stes at telenet.be Thu Apr 1 17:32:49 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Thu, 1 Apr 2021 19:32:49 +0200 (CEST) Subject: [Vm-dev] Squeak on OpenIndiana Message-ID: <657653155.110276222.1617298369538.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 News from the OpenIndiana builds ... squeak-4 is currently available in both 32bit and 64bit at version 4.19.6 This version of squeak can run 6504 and 68000 Squeak images. http://pkg.openindiana.org/hipster/en/search.shtml?token=squeak-4&action=Search squeak-5 (stack vm) and squeak-5c (cog vm) are at version 5.0.2948. Those are recent opensmalltalk VM's (built with epoll(5) support enabled). They can run 68021 amd 6521 Squeak images. http://pkg.openindiana.org/hipster/en/search.shtml?token=squeak-5&action=Search So the OpenSmalltalk latest sources are compiling OK on OpenIndiana. More info at http://docs.openindiana.org/handbook/community/squeak/index.html Note that it is possible to install all plugins, or run squeak in a minimal "hardened" zone with the -nodisplay option. In that case only the -nodisplay package can be installed (without plugins). Regards, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJgZgNRAAoJEAwpOKXMq1Ma6e8IAKhkQGRdZl9bXXPRtEjkqOWt p0nz17yOUhmu/DjHHucd+J6i+Ob9AW7GWC2Z1WiBs1KcxGwTkJQXmcVDnTiBAyLq 30XdIDRkVuM13HEcST6ldJzqg7xkyR/lPmPXLEUGpc+JmXbdm03c1jQJl/uQrmyo THgrTthYEk2IutJxSuU2eRDo1CcFXoH9Qjm2ZHt4DEPpMYZg6tvrNx53I05OzAeI fT6uCHgNiW8dC8ZEq5MQYWucwNdKYGjIN19nU143lXLPOvdvNFO4xEi7ktLEq35s cZnAHd0q/Fgh4gfskAmYTd4Py1+fVIErcLPdIE7ZmEsLS5+l5vjjORZyIk0npkQ= =uQBF -----END PGP SIGNATURE----- From tim at rowledge.org Thu Apr 1 20:16:02 2021 From: tim at rowledge.org (tim Rowledge) Date: Thu, 1 Apr 2021 13:16:02 -0700 Subject: [Vm-dev] Building Ubuntu x64 vm; did I drop a clang-er? Message-ID: <6ACCB1CA-52FB-4C39-836F-43D65EB0A070@rowledge.org> For reasons, I tried compiling a Ubuntu cog/spur/x64 vm yesterday. It hasn't been very successful thus far. First problem was that it simply wouldn't compile *anything* according to the config log. The system has the usual gcc stuff, so I was a bit surprised. It appeared to want 'clang' which I've never needed to take note of before; so I installed it - what could go wrong, eh? Is this an expected thing? Is it just another infuriating bit of Ubuntuism? After that it did a build but we seem to be suffering two somewhat familiar problems; - our old friend "/usr/include/glib-2.0/glib/gtypes.h:32:10: fatal error: 'glibconfig.h' file not found" appeared and again it is the architecture specific path in platforms/unix/plugins/UnicodePlugin/acinclude.m4 not being there. I have now tried manually adding the extra include path "/usr/lib/x86_64-linux-gnu/glib2.0/include" to the acinclude.m4 and even the Makefile.inc and it *still* doesn't appear in the cmdline used to make the plugin test - so no plugin is made. I'd swear that was enough when building it for AARM64 a few months ago? Damned autoconf... - the rtprio stuff, yet again. One can add the squeak.conf file do the reboot and ... no change. If I actually run the vm with sudo there are no complaints but that isn't really very practical. Annoyingly this seems to be sometihng that is not 'reliable' - a colleague with the same version of Ubuntu installed simply changed the permissions to 755 (which I've tried too) and it was fine. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Cashtration (n.): The act of buying a house, which renders the subject financially impotent for an indefinite period. From stes at telenet.be Fri Apr 2 07:15:35 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Fri, 2 Apr 2021 09:15:35 +0200 (CEST) Subject: [Vm-dev] Building Ubuntu x64 vm; did I drop a clang-er? Message-ID: <1600690379.111470682.1617347735108.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 The message that the OpenSmalltalk VM emits when it cannot pthread_setsched(), has multiple solutions depending on the setup. According to https://packages.ubuntu.com/groovy/util-linux the package util-linux for ubuntu has a command /usr/bin/prlimit A method which you could try: prlimit --rtprio=99 --pid= So you could try to raise/change the rtprio using prlimit. Perhaps even the prlimit method is not working for you, but it is something that you could try to troubleshoot the issue. If the prlimit method is not working , there may be some other software that disallows changing the rtprio. David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJgZsRTAAoJEAwpOKXMq1ManScH/2yFAx+fzDVYlHXLjWgDprYo mSYQfWs5aZ+FFoPmmdMzZivOZNoY/I6r9iR4FExqwi70puSGnDdRuacQBRPoabW7 mrT5Y9+zaFjFgMIJXHjd0TkUTpzBP3P7xFs6C+dakpXOHimFutDDvoa+RzKCGY1c 5XhE0CXur8FRK8PUJKXa97xYBhR+50bJ4fZkVEP6IHsnJzI1vIzZGzTX62SOsfm+ w18B0sTOgvTJmfcUPUrUK3HorpvMrwXZ89usI/x0Gghbc5XQFmEUb1/dcW9/fMiD 5gc2p6H9eUXexfQp6CoxGagcUW+nsuHNj6hDOXfQ1FV+/uIwnhR93mqCE16nWvc= =6IMJ -----END PGP SIGNATURE----- From tim at rowledge.org Fri Apr 2 17:28:44 2021 From: tim at rowledge.org (tim Rowledge) Date: Fri, 2 Apr 2021 10:28:44 -0700 Subject: [Vm-dev] Building Ubuntu x64 vm; did I drop a clang-er? In-Reply-To: <1600690379.111470682.1617347735108.JavaMail.zimbra@telenet.be> References: <1600690379.111470682.1617347735108.JavaMail.zimbra@telenet.be> Message-ID: <7F2A6B90-A270-4B20-BF21-C0DCD10CE450@rowledge.org> > On 2021-04-02, at 12:15 AM, stes at PANDORA.BE wrote: > The message that the OpenSmalltalk VM emits when it cannot pthread_setsched(), > has multiple solutions depending on the setup. > That's what I was afraid of; yet more complication in making a system decently portable. > According to https://packages.ubuntu.com/groovy/util-linux > the package util-linux for ubuntu has a command /usr/bin/prlimit > > A method which you could try: > > prlimit --rtprio=99 --pid= OK, so my Ubuntu does have that command installed, so a good start, thanks. I have no idea how one might find that pid and use it within any of the shell scripts etc we have. Fire up the Bash Signal! (Obviously this is the unix equivalent of the Windows(™) Bat Signal, which gets Batman to help with your .bat files) tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim All programmers are playwrights and all computers are lousy actors. From noreply at github.com Sat Apr 3 01:12:10 2021 From: noreply at github.com (Eliot Miranda) Date: Fri, 02 Apr 2021 18:12:10 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 27b632: Allow a build Makefile to override CXXVERFLAGS, in... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 27b632d09cbca67d940f8d8db73e4f4883375c71 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/27b632d09cbca67d940f8d8db73e4f4883375c71 Author: Eliot Miranda Date: 2021-04-02 (Fri, 02 Apr 2021) Changed paths: M build.macos64x64/common/Makefile.rules M build.macos64x64/common/Makefile.vm Log Message: ----------- Allow a build Makefile to override CXXVERFLAGS, including when building plugins. [ci skip] From noreply at github.com Sat Apr 3 23:09:13 2021 From: noreply at github.com (Tobias Pape) Date: Sat, 03 Apr 2021 16:09:13 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 7f69e4: Listen to feature_test_macros(7) with a guard. Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 7f69e44dd9cdf5d1fe2d838e824e86f7503abe93 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/7f69e44dd9cdf5d1fe2d838e824e86f7503abe93 Author: Tobias Pape Date: 2021-04-04 (Sun, 04 Apr 2021) Changed paths: M platforms/Cross/vm/sq.h Log Message: ----------- Listen to feature_test_macros(7) with a guard. If HAVE_CONFIG_H is given (most presumably on the command line) it is safe to include the (#define-only) config.h. On prominent platforms, these defines must precede any inlcudes. To quote feature_test_macros(7) on Linux: > NOTE: In order to be effective, a feature test macro must be defined before including any header files. config.h provides these macros, either manually specified or through means of configuration (eg. autoconf/configure). Having these defines early does not hurt platforms not using this system but is vital on platforms using it. From no-reply at appveyor.com Sat Apr 3 23:28:22 2021 From: no-reply at appveyor.com (AppVeyor) Date: Sat, 03 Apr 2021 23:28:22 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2421 Message-ID: <20210403232822.1.67B17E970CE01048@appveyor.com> An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Sun Apr 4 23:38:23 2021 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sun, 04 Apr 2021 23:38:23 +0000 Subject: [Vm-dev] aarch64 + config.h Message-ID: <1c4e69a8bdc9d38b19dc54adcc0ddcbf@whidbey.com> Greetings, I disclaim any knowledge of C or Makefiles, but if I comment out the check for _FEATURES_H in config.h (as below), the vm builds fine on and for Aarch64 Linux. /* @#ifdef _FEATURES_H @#error This file was included too late. Please make sure it is included earlier @#endif */ I have no idea what this is checking for or who sets it. The diagnostic output is: vvv===vvv gcc -Wall -march=armv8-a -mtune=cortex-a72 -g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -DCOGMTVM=0 -DDUAL_MAPPED_CODE_ZONE=1 -pthread -DLSB_FIRST=1 -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -DHAVE_CONFIG_H -DSQUEAK_BUILTIN_PLUGIN -I/home/kend/OpenSmalltalk/oscogvm/build.linux64ARMv8/squeak.cog.spur/build -I/home/kend/OpenSmalltalk/oscogvm/build.linux64ARMv8/squeak.cog.spur/build -I/home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm -I/home/kend/OpenSmalltalk/oscogvm/platforms/Cross/vm -I/home/kend/OpenSmalltalk/oscogvm/spur64src/vm -I/usr/local/include -I/home/kend/OpenSmalltalk/oscogvm/platforms/Cross/vm -I/home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm -I/home/kend/OpenSmalltalk/oscogvm/spur64src/vm -I/home/kend/OpenSmalltalk/oscogvm/platforms/Cross/plugins/FilePlugin -I/home/kend/OpenSmalltalk/oscogvm/platforms/unix/plugins/B3DAcceleratorPlugin -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -c -o gcc3x-cointerp.o /home/kend/OpenSmalltalk/oscogvm/spur64src/vm/gcc3x-cointerp.c In file included from /home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm/sqConfig.h:5, from /home/kend/OpenSmalltalk/oscogvm/platforms/Cross/vm/sq.h:18, from /home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm/sqGnu.h:37, from /home/kend/OpenSmalltalk/oscogvm/spur64src/vm/gcc3x-cointerp.c:29: /home/kend/OpenSmalltalk/oscogvm/build.linux64ARMv8/squeak.cog.spur/build/config.h:40:2: error: #error This file was included too late. Please make sure it is included earlier 40 | #error This file was included too late. Please make sure it is included earlier | ^~~~~ ^^^===^^^ ?!? -KenD From stes at telenet.be Mon Apr 5 08:13:44 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Mon, 5 Apr 2021 10:13:44 +0200 (CEST) Subject: [Vm-dev] Building Ubuntu x64 vm; did I drop a clang-er? In-Reply-To: <1600690379.111470682.1617347735108.JavaMail.zimbra@telenet.be> References: <1600690379.111470682.1617347735108.JavaMail.zimbra@telenet.be> Message-ID: <483975820.120040580.1617610424625.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi Tim, I'm following the OpenSmalltalk VM efforts with interest and hopefully the following contributes something. On Linux systems that have 'prlimit' one can do: $ prlimit --rtprio RESOURCE DESCRIPTION SOFT HARD UNITS RTPRIO max real-time priority 0 0 $ sudo prlimit --rtprio=99 --pid=$$ Assuming that the user is in the sudoers file (see visudo) possibly the above, results in the following change: $ prlimit --rtprio RESOURCE DESCRIPTION SOFT HARD UNITS RTPRIO max real-time priority 99 99 My impression is that the pthread_setschedparam() issue has multiple solutions. In the case of your Ubuntu system, what is the output of "prlimit --rtprio" ? You can also just run "prlimit" without arguments to see the RTPRIO values. The above is not necessarily an alternative to the squeak.conf file /etc/security/limits.d/squeak.conf may be the "right" file for you to use, but perhaps you can troubleshoot with 'prlimit' why it's not working. On my system (not Linux but using PAM) one of the possibilities is /etc/security/policy.conf so there exist variations out there on the /etc/security/limit.d directory. Regards, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJgasX3AAoJEAwpOKXMq1Ma24IH/2QeX9MUml/juXxpijKdyaxy d8k6GMPMLHFbFdoodd1wLJqiy+1Dx9Bj/aP8Lx4wTZG/B7IpkbferlM10E/7HXxO yzYYDf89tydFdDqHhfx9tTvjAqKl1lkmSJl2g/XD6QDgqQW7jrSNWlr7G6IW7njb r+xLvyOIWMbs97A0Rya+ju9uHLaTdQx5NPx8Ctz+JHPeEGVShjqrz2q9fmrkMl9y cS+ru4Fu+KSXR/c7pVeGfqv2QrM9BucXI5CBJULADlaTUwY6B5hSjMgSMWSJ7DbC qRe2PGbkrTZr7Cj4wHhu1ly1jY5KHcEUZqeEYauaZpiqtegiz54PAMOFgQxFRSo= =IdQf -----END PGP SIGNATURE----- From bruce.oneel at pckswarms.ch Mon Apr 5 10:05:55 2021 From: bruce.oneel at pckswarms.ch (Bruce O'Neel) Date: Mon, 05 Apr 2021 12:05:55 +0200 Subject: [Vm-dev] Workload on assorted people Message-ID: <1617617155-68961a2d954c6b0e8ba64534228f8a7e@pckswarms.ch> Hi, It is my impression, and I could be wrong, that Eliot and other VM maintainers are getting burned out with the load of maintaining the open smalltalk VM development.  This is a bad plan since we are critically dependent on the current maintainers of the VM.  No VM, no Squeak et al. So here is my small proposal to help out. There must be a set of people on this list who can build the VM regularly on assorted systems.  As a group we can cover the important systems.  I can do Linux x86, ArmV6, and ArmV8 in assorted flavors.  Others I sure can do Windows and Mac. Step one is then to have people build AND use the VM on the systems that they work on.  Let's call this the build community.   This will help us track bugs as quickly as possible.  Build failures can be reported as GIT issues.  In my mind this is better than some CI system because just building is only have of the problem.  And tests only find so many things. Now having 100 git issues per day does not help the current maintainers.  So... Step 2 is that there another set of people that can not only look at build git issues, but, repeat those builds and propose fixes.  Let's call those curated GIT issues.  That should be a smaller number.  And once we have a git issue with a proposed patch that can be tested by others in the build community to make sure that some patch I propose on Linux does not kill the carefully constructed windows build.  That way when we get to... Step 3 is that Eliot and other current VM maintainers have a small set of patches that at least are known to build and not break a VM to review.  This should be a much less frustrating piece of work. Finally if no one can be convinced to step up and build/test a particular combo then maybe that build can be just archived.  Git won't forget and if someone pops up a few years later and needs a particular build then we can restore it.  And this way we can have a small set of builds to run that might be less confusing to those outside of the community that might be interested in joining up but are put off by too much complexity. I think to go forward we have to match the workload with people's time and abilities or we are in trouble. I know *I* greatly appreciate the work that has been done.  And I would love to see it continue in a way that is rewarding and sustainable for those doing that work. Thanks bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From Das.Linux at gmx.de Mon Apr 5 13:34:52 2021 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon, 5 Apr 2021 15:34:52 +0200 Subject: [Vm-dev] aarch64 + config.h In-Reply-To: <1c4e69a8bdc9d38b19dc54adcc0ddcbf@whidbey.com> References: <1c4e69a8bdc9d38b19dc54adcc0ddcbf@whidbey.com> Message-ID: Hi Ken > On 5. Apr 2021, at 01:38, ken.dickey at whidbey.com wrote: > > Greetings, > > I disclaim any knowledge of C or Makefiles, but if I comment out the check for _FEATURES_H in config.h (as below), the vm builds fine on and for Aarch64 Linux. > > /* > @#ifdef _FEATURES_H > @#error This file was included too late. Please make sure it is included earlier > @#endif > */ > > I have no idea what this is checking for or who sets it. Please have a look whether the latest commit https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/7f69e44dd9cdf5d1fe2d838e824e86f7503abe93 fixes your problem. Best regards -Tobias > > The diagnostic output is: > > vvv===vvv > gcc -Wall -march=armv8-a -mtune=cortex-a72 -g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -DCOGMTVM=0 -DDUAL_MAPPED_CODE_ZONE=1 -pthread -DLSB_FIRST=1 -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -DHAVE_CONFIG_H -DSQUEAK_BUILTIN_PLUGIN -I/home/kend/OpenSmalltalk/oscogvm/build.linux64ARMv8/squeak.cog.spur/build -I/home/kend/OpenSmalltalk/oscogvm/build.linux64ARMv8/squeak.cog.spur/build -I/home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm -I/home/kend/OpenSmalltalk/oscogvm/platforms/Cross/vm -I/home/kend/OpenSmalltalk/oscogvm/spur64src/vm -I/usr/local/include -I/home/kend/OpenSmalltalk/oscogvm/platforms/Cross/vm -I/home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm -I/home/kend/OpenSmalltalk/oscogvm/spur64src/vm -I/home/kend/OpenSmalltalk/oscogvm/platforms/Cross/plugins/FilePlugin -I/home/kend/OpenSmalltalk/oscogvm/platforms/unix/plugins/B3DAcceleratorPlugin -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -c -o gcc3x-cointerp.o /home/kend/OpenSmalltalk/oscogvm/spur64src/vm/gcc3x-cointerp.c > In file included from /home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm/sqConfig.h:5, > from /home/kend/OpenSmalltalk/oscogvm/platforms/Cross/vm/sq.h:18, > from /home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm/sqGnu.h:37, > from /home/kend/OpenSmalltalk/oscogvm/spur64src/vm/gcc3x-cointerp.c:29: > /home/kend/OpenSmalltalk/oscogvm/build.linux64ARMv8/squeak.cog.spur/build/config.h:40:2: error: #error This file was included too late. Please make sure it is included earlier > 40 | #error This file was included too late. Please make sure it is included earlier > | ^~~~~ > ^^^===^^^ > > ?!? > -KenD From Das.Linux at gmx.de Mon Apr 5 13:59:29 2021 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon, 5 Apr 2021 15:59:29 +0200 Subject: [Vm-dev] aarch64 + config.h In-Reply-To: References: <1c4e69a8bdc9d38b19dc54adcc0ddcbf@whidbey.com> Message-ID: <4D2904BB-662C-4C0C-AE0A-DD6C057300B5@gmx.de> > On 5. Apr 2021, at 15:34, Tobias Pape wrote: > > > Hi Ken > >> On 5. Apr 2021, at 01:38, ken.dickey at whidbey.com wrote: >> >> Greetings, >> >> I disclaim any knowledge of C or Makefiles, but if I comment out the check for _FEATURES_H in config.h (as below), the vm builds fine on and for Aarch64 Linux. >> >> /* >> @#ifdef _FEATURES_H >> @#error This file was included too late. Please make sure it is included earlier >> @#endif >> */ >> >> I have no idea what this is checking for or who sets it. > > > Please have a look whether the latest commit > https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/7f69e44dd9cdf5d1fe2d838e824e86f7503abe93 > > fixes your problem. > Disregard that, it does not. Sorry. -t > Best regards > -Tobias > >> >> The diagnostic output is: >> >> vvv===vvv >> gcc -Wall -march=armv8-a -mtune=cortex-a72 -g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV -DCOGMTVM=0 -DDUAL_MAPPED_CODE_ZONE=1 -pthread -DLSB_FIRST=1 -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -DHAVE_CONFIG_H -DSQUEAK_BUILTIN_PLUGIN -I/home/kend/OpenSmalltalk/oscogvm/build.linux64ARMv8/squeak.cog.spur/build -I/home/kend/OpenSmalltalk/oscogvm/build.linux64ARMv8/squeak.cog.spur/build -I/home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm -I/home/kend/OpenSmalltalk/oscogvm/platforms/Cross/vm -I/home/kend/OpenSmalltalk/oscogvm/spur64src/vm -I/usr/local/include -I/home/kend/OpenSmalltalk/oscogvm/platforms/Cross/vm -I/home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm -I/home/kend/OpenSmalltalk/oscogvm/spur64src/vm -I/home/kend/OpenSmalltalk/oscogvm/platforms/Cross/plugins/FilePlugin -I/home/kend/OpenSmalltalk/oscogvm/platforms/unix/plugins/B3DAcceleratorPlugin -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -c -o gcc3x-cointerp.o /home/kend/OpenSmalltalk/oscogvm/spur64src/vm/gcc3x-cointerp.c >> In file included from /home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm/sqConfig.h:5, >> from /home/kend/OpenSmalltalk/oscogvm/platforms/Cross/vm/sq.h:18, >> from /home/kend/OpenSmalltalk/oscogvm/platforms/unix/vm/sqGnu.h:37, >> from /home/kend/OpenSmalltalk/oscogvm/spur64src/vm/gcc3x-cointerp.c:29: >> /home/kend/OpenSmalltalk/oscogvm/build.linux64ARMv8/squeak.cog.spur/build/config.h:40:2: error: #error This file was included too late. Please make sure it is included earlier >> 40 | #error This file was included too late. Please make sure it is included earlier >> | ^~~~~ >> ^^^===^^^ >> >> ?!? >> -KenD > > From commits at source.squeak.org Mon Apr 5 20:11:36 2021 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 5 Apr 2021 20:11:36 0000 Subject: [Vm-dev] VM Maker: VMMaker-dtl.424.mcz Message-ID: David T. Lewis uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker-dtl.424.mcz ==================== Summary ==================== Name: VMMaker-dtl.424 Author: dtl Time: 5 April 2021, 4:11:26.362 pm UUID: 4bdf5efb-f2f2-47b9-a80f-93e9c910412b Ancestors: VMMaker-dtl.423 VMMaker 4.19.7 Fix unit tests and C code generation for #cppIf:ifTrue:ifFalse: #cppIf:ifTrue: oscog compatibility methods. Tests were incorrectly written to specify #ifdef generation instead of the intended #if directives. =============== Diff against VMMaker-dtl.423 =============== Item was changed: ----- Method: CCodeGenerator>>generateOscogInlineCppIf:on:indent: (in category 'C translation') ----- generateOscogInlineCppIf: msgNode on: aStream indent: level "Generate the C code for this message onto the given stream." + "Translate cppIf:ifTrue: as if it was isDefinedTrueExpression:inSmalltalk:comment:ifTrue:ifFalse: - "Translate cppIf:ifTrue: as if it was isDefined:inSmalltalk:comment:ifTrue: by adding nil argument entries for the comment node and the Smalltalk expression node. Compatibility for externally maintained plugins." msgNode args size = 2 + ifTrue: [| newArgs emptyStatementList | - ifTrue: [| newArgs | "Expand the arguments array to match that of cppIf:ifTrue:ifFalse: " + emptyStatementList := TStmtListNode + readFrom: '(TStmtListNode basicNew instVarAt: 1 put: nil; instVarAt: 2 put: #(); instVarAt: 3 put: ((OrderedCollection new)); yourself)'. + newArgs := Array new: 5. - newArgs := Array new: 4. newArgs at: 1 put: (msgNode args at: 1). newArgs at: 4 put: (msgNode args at: 2). + newArgs at: 5 put: emptyStatementList. "empty #else clause" msgNode setSelector: msgNode selector receiver: msgNode receiver arguments: newArgs]. self + generateInlineCppIfElse: msgNode - generateInlineCppIfDef: msgNode on: aStream indent: level ! Item was changed: ----- Method: CCodeGenerator>>generateOscogInlineCppIfElse:on:indent: (in category 'C translation') ----- generateOscogInlineCppIfElse: msgNode on: aStream indent: level "Generate the C code for this message onto the given stream." + "Translate cppIf:ifTrue:ifFalse: as if it was isDefinedTrueExpression:inSmalltalk:comment:ifTrue:ifFalse: + by adding dummy or nil argument entries for the comment node and the Smalltalk - "Translate cppIf:ifTrue:ifFalse: as if it was isDefined:inSmalltalk:comment:ifTrue:ifFalse: - by adding nil argument entries for the comment node and the Smalltalk expression node. Compatibility for externally maintained plugins." msgNode args size = 3 ifTrue: [| newArgs | "Expand the arguments array to match that of cppIf:ifTrue:ifFalse: " newArgs := Array new: 5. newArgs at: 1 put: (msgNode args at: 1). newArgs at: 4 put: (msgNode args at: 2). newArgs at: 5 put: (msgNode args at: 3). msgNode setSelector: msgNode selector receiver: msgNode receiver arguments: newArgs]. self + generateInlineCppIfElse: msgNode - generateInlineCppIfDefElse: msgNode on: aStream indent: level ! Item was changed: ----- Method: SlangTest>>testCppIfIfTrue (in category 'testing preprocessor directives - oscog compatibility') ----- testCppIfIfTrue "Test the oscog variant of isDefined:inSmalltalk:comment:ifTrue: Same as isDefined:inSmalltalk:comment:ifTrue: but does not support the comment and Smalltalk block." "(SlangTest selector: #testCppIfIfTrue) run" | stssi cString stringWithoutWhiteSpace lines expected | stssi := SlangTestSupportInterpreter inline: false. "verify that the default Smalltalk block that is evaluated in simulation" self assert: stssi ifdefElseEndif = #defaultBlockForSimulation. "verify generated C string" cString := stssi asCString: #cppIfIfTrue. lines := (cString findTokens: Character cr) select: [:e | { + '# if (HAVE_FOO)' . - '# ifdef HAVE_FOO' . ' return 1;' . '# else' . ' return 0;' . '# endif // HAVE_FOO' } includes: e ]. self should: lines size = 3. self should: ('*return 1*' match: lines second). "check the rest of the method, ignoring whitespace and ignoring the leading method comment" stringWithoutWhiteSpace := cString reject: [:e | e isSeparator]. + expected := 'sqIntcppIfIfTrue(void){#if(HAVE_FOO)return1;#endif//HAVE_FOOreturnnull;}'. - expected := 'sqIntcppIfIfTrue(void){#ifdefHAVE_FOOreturn1;#endif//HAVE_FOOreturnnull;}'. self should: expected = (stringWithoutWhiteSpace last: expected size). ! Item was changed: ----- Method: SlangTest>>testCppIfIfTrueIfFalse (in category 'testing preprocessor directives - oscog compatibility') ----- testCppIfIfTrueIfFalse "Test the oscog variant of isDefined:inSmalltalk:comment:ifTrue:ifFalse: Same as isDefined:inSmalltalk:comment:ifTrue:ifFalse: but does not support the comment and Smalltalk block." "(SlangTest selector: #testCppIfIfTrueIfFalse) run" | stssi cString stringWithoutWhiteSpace lines expected | stssi := SlangTestSupportInterpreter inline: false. "verify that the default Smalltalk block that is evaluated in simulation" self assert: stssi ifdefElseEndif = #defaultBlockForSimulation. "verify generated C string" cString := stssi asCString: #cppIfIfTrueIfFalse. lines := (cString findTokens: Character cr) select: [:e | { + '# if (HAVE_FOO)' . - '# ifdef HAVE_FOO' . ' return 1;' . '# else' . ' return 0;' . '# endif // HAVE_FOO' } includes: e ]. self should: lines size = 5. self should: ('*return 1*' match: lines second). self should: ('*return 0*' match: lines fourth). "check the rest of the method, ignoring whitespace and ignoring the leading method comment" stringWithoutWhiteSpace := cString reject: [:e | e isSeparator]. + expected := 'sqIntcppIfIfTrueIfFalse(void){#if(HAVE_FOO)return1;#elsereturn0;#endif//HAVE_FOOreturnnull;}'. - expected := 'sqIntcppIfIfTrueIfFalse(void){#ifdefHAVE_FOOreturn1;#elsereturn0;#endif//HAVE_FOOreturnnull;}'. self should: expected = (stringWithoutWhiteSpace last: expected size). ! Item was changed: ----- Method: VMMaker class>>versionString (in category 'version testing') ----- versionString "VMMaker versionString" + ^'4.19.7'! - ^'4.19.6'! From notifications at github.com Wed Apr 7 21:42:23 2021 From: notifications at github.com (Christoph Thiede) Date: Wed, 07 Apr 2021 14:42:23 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] X11 Event Handling: Keystroke events are not recognized for Numpad Enter Key (#556) Message-ID: Setup: Win 2004 + WSL (Ubuntu) + VcXsrv When I press the right enter key (part of the numpad), only keyDown and keyUp events are recorded by the VM, but not any keystroke event. The left enter key, however, works fine, and so does the right enter key on Windows do. Using `HandMorph >> #showEvents:`, the keyUp and keyDown events look the same for both enter keys (character code 13). I don't have a real Linux machine available at the moment. Can someone tell whether the issue also exists without VcXsrv? In general, running Squeak works fine with this setup. However, some keys are not mapped correctly. First, I thought this would be a problem of VcXsrv (and [partially](https://sourceforge.net/p/vcxsrv/bugs/134/), this is also true), but then I recognized that gedit recognizes the right enter key correctly through VcXsrv, so this appears to be a problem of OSVM indeed. --- In sqUnixX11.c, apparently EventKeyDown and EventKeyChar events are always generated together with one exception: https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/7f69e44dd9cdf5d1fe2d838e824e86f7503abe93/platforms/unix/vm-display-X11/sqUnixX11.c#L3749 So either `x2sqKey()` or `xkeysym2ucs4()` must be responsible for the bug. However, I have never read these sources before, so probably, I'm completely on the wrong track ... How can I enable `DEBUG_KEYBOARD_EVENTS`? Looking forward to your help, Christoph -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/556 -------------- next part -------------- An HTML attachment was scrubbed... URL: From florin.mateoc at gmail.com Wed Apr 7 22:06:23 2021 From: florin.mateoc at gmail.com (Florin Mateoc) Date: Wed, 7 Apr 2021 18:06:23 -0400 Subject: [Vm-dev] [SqueakJS] Faster JIT ideas In-Reply-To: References: Message-ID: Small update: I can now see the UI, and even interact with it a little (before it breaks with various bugs :)) - woohoo! Anyway, while debugging my various bugs, I found a small bug in the SqueakJS primitive 53 - I do consult them regularly :) Squeak uses the IEEE 754 specification for exponent (significand between 1 and 2), frexp does not (significand between 0.5 and 1), so the result is off by one. It should not matter much, as the significand is computed based on the exponent, but e.g. the code executed when the primitive fails gives a different result from the primitive itself On Wed, Mar 17, 2021 at 5:01 AM Vanessa Freudenberg wrote: > > On Tue, Mar 16, 2021 at 1:38 AM Vanessa Freudenberg > wrote: > >> Meanwhile, I made a little scheduler just to learn how to use yield*. >> Works nicely: >> https://codepen.io/codefrau/pen/jOVRmxm >> > > And here is a JIT mockup using that scheduler: > https://codepen.io/codefrau/pen/LYbopBV > > It's executing "5 benchFib", "4 benchFib", and "3 benchFib" in three > separate processes, switching every 3 sends just for testing, and printing > all contexts. > > No benchmarks yet. > > Vanessa > > >> Vanessa >> >> >>> On Mon, Mar 15, 2021 at 10:28 PM Vanessa Freudenberg < >>> vanessa at codefrau.net> wrote: >> >> >>>> Thanks for that Florin, very helpful! >>>> >>>> I'm curious why you need to make every send into a generator call, and >>>> not just rely on the one in your GlobalCheckForInterrupts()? >>>> >>>> My implementation is intended to allow context switching that way: >>>> >>>> if (--vm.interruptCheckCounter <= 0 && vm.handleDepthAndInterrupts(depth, thisProxy) === true) return false; >>>> >>>> >>>> This is the same technique as in other VMs, where the actual check for >>>> context switch is not done for every send, but only when >>>> the interruptCheckCounter goes below zero. In the first mockup on codepen, >>>> vm.handleDepthAndInterrupts prints the contents of all the contexts, >>>> proving that the information is accessible in case we need to context >>>> switch or reify the stack. My hope was that inside of >>>> handleDepthAndInterrupts() I could use *yield to do the actual context >>>> switching. >>>> >>>> My second, exception based mockup on codepen uses the same approach, >>>> except that when a context switch is needed it would throw, unwinding the >>>> stack fully, and creating actual context objects along the way. I have not >>>> mocked up that part yet (because it would need a mockup interpreter too, to >>>> continue after unwind), but you can see the unwind working correctly by >>>> uncommenting the line with >>>> // throw Error("unwind") >>>> >>>> I tried your benchFib vs benchFiby on Chrome, which seems to >>>> optimize generators a lot better than Firefox. On Chrome the overhead is >>>> just 50% or so, vs 300% on Firefox. Safari appears to be between the two. >>>> >>>> I will need to make more complete mockups before deciding on a design. >>>> Especially how closures would be handled. Does anyone have a tiny >>>> one-method benchmark that would highlight closure performance? >>>> >>>> Vanessa >>>> >>>> On Mon, Mar 15, 2021 at 6:20 PM Florin Mateoc >>>> wrote: >>>> >>>>> >>>>> I don't think the numbers could be meaningfully compared. The whole >>>>> purpose of the yield* invocations is to enable process switching, which I >>>>> don't think your jitted methods allow for. But then are you merely >>>>> comparing yield* invocations against direct invocations? For sure, the >>>>> yield* ones will be much slower. >>>>> Let alone my implementation, which also uses yield* for #< , #- and >>>>> #+, so it would be much slower than below as operators are surely well >>>>> optimized by JS, we can just measure direct vs yield* for the main >>>>> recursive invocation: >>>>> >>>>> Number.prototype.benchFib = function benchFib() { >>>>> return this < 2 ? 1 : (this - 1).benchFib() + (this - 2).benchFib() >>>>> + 1 >>>>> } >>>>> >>>>> var t = performance.now(); >>>>> (30).benchFib(); >>>>> performance.now() - t >>>>> >>>>> gives on my laptop in Firefox 920, 911, 919, 898 >>>>> >>>>> Versus >>>>> >>>>> Number.prototype.benchFiby = function* benchFiby() { >>>>> return this < 2 ? 1 : (yield* (this - 1).benchFiby()) + (yield* ( >>>>> this - 2).benchFiby()) + 1 >>>>> } >>>>> >>>>> var t = performance.now(); >>>>> (30).benchFiby().next(); >>>>> performance.now() - t >>>>> >>>>> gives 2998, 3125, 3116, 3140 >>>>> >>>>> >>>>> On Mon, Mar 15, 2021 at 3:41 PM Vanessa Freudenberg < >>>>> vanessa at codefrau.net> wrote: >>>>> >>>>>> >>>>>> Hi Florin, >>>>>> >>>>>> wow, that looks exciting! >>>>>> >>>>>> This is indeed a much more thorough Squeak-to-JS mapping, where mine >>>>>> is more of a "traditional" VM. I love it! >>>>>> >>>>>> Since my original post I implemented a mockup of "my" new JIT scheme: >>>>>> >>>>>> >>>>>> https://squeak.js.org/docs/jit.md.html#sketch:contextproxieswithintrospectionandinlinecaching/newjitsketch/performanceestimate >>>>>> [image: image.png] >>>>>> You can play with it here: https://codepen.io/codefrau/pen/JjbmVGw >>>>>> >>>>>> Could you share the performance numbers you are seeing for your >>>>>> benchFib, in comparison to SqueakJS or my mockup? I am curious if >>>>>> yield* is the way to go. >>>>>> >>>>>> Thanks for sharing! And congrats on your new job. My progress is slow >>>>>> too, I only work on it some weekends. But then, I'm not in a hurry :) >>>>>> >>>>>> Vanessa >>>>>> >>>>>> On Sun, Mar 14, 2021 at 6:18 PM Florin Mateoc < >>>>>> florin.mateoc at gmail.com> wrote: >>>>>> >>>>>>> >>>>>>> Hi Vanessa, >>>>>>> >>>>>>> Sorry for the delay in responding - as somebody who has been >>>>>>> inspired by your SqueakJS project, I think I should mention that I am >>>>>>> working on a related project, for now tentatively called JsSqueak. >>>>>>> In addition to the inspiration provided by SqueakJS, it also >>>>>>> scratches my longstanding itch about compiling (transpiling) Squeak. >>>>>>> >>>>>>> I hesitated to talk about it, as it is still a work in progress - >>>>>>> after small bits and pieces that I worked on over a long period, I had the >>>>>>> opportunity to spend a significant and uninterrupted chunk of time on it >>>>>>> last summer, when I was unemployed for 3 months, and I was able to make >>>>>>> good progress. I was optimistically thinking of releasing a first version >>>>>>> before the end of last year, but after I started working on my new job, >>>>>>> progress on JsSqueak has slowed down significantly. I must confess that I >>>>>>> (and especially my wife) hesitate in recreating that productive unemployed >>>>>>> situation :) >>>>>>> >>>>>>> I started with Squeak 4.5 - I already had code transforming >>>>>>> Smalltalk code to a form more suitable for translation - and I also started >>>>>>> with VMMakerJS-dtl.18 for the plugin generation part. Of course, I had to >>>>>>> heavily modify it, since I have to get rid of the stack usage for >>>>>>> arguments/receiver and returns. >>>>>>> Both of these big parts are working. I also implemented most >>>>>>> numbered primitives by hand - they are inlined at generation time in the >>>>>>> methods calling them. >>>>>>> I am also taking advantage of the latest and greatest additions to >>>>>>> JavaScript. I am, of course, using classes, and the parallel class-side >>>>>>> hierarchy is implemented using statics. To implement green threads/process >>>>>>> switching, all translated methods are implemented as generator functions, >>>>>>> and all calls are through yield* expressions. The preemption/interrupt >>>>>>> check points are inlined. With this, a process switch is achieved by simply >>>>>>> yield-ing (in the process/semaphore primitives). >>>>>>> With this, the Integer>>#benchFib method is translated (as a method >>>>>>> in Number.prototype, there is one more, simpler, implementation in BigInt) >>>>>>> as: >>>>>>> >>>>>>> *_benchFib() { >>>>>>> if (Number.isSafeInteger(this.valueOf())) { // Effective (inherited or local) source for #benchFib in SmallInteger >>>>>>> /*Handy send-heavy benchmark*/ >>>>>>> /*(result // seconds to run) = approx calls per second*/ >>>>>>> /* | r t | >>>>>>> t := Time millisecondsToRun: [r := 26 benchFib]. >>>>>>> (r // 1000) // t*/ >>>>>>> /*138000 on a Mac 8100//100*/ >>>>>>> if (GlobalActivationCounter-- < 0) yield* GlobalCheckForInterrupts(); >>>>>>> >>>>>>> return (yield* this._lt( 2)).booleanValueOf("questionMark:colon:") ? (1) : (yield* (yield* (yield* (yield* this._sub( 1))._benchFib())._add( yield* (yield* this._sub( 2))._benchFib()))._add( 1)); >>>>>>> } else // No implementation for #benchFib in Float hierarchy, trigger a DNU >>>>>>> return yield* super._benchFib() >>>>>>> } >>>>>>> >>>>>>> The top-level check for smallIntegers is because both SmallInteger and Float are mapped to Number. >>>>>>> >>>>>>> The booleanValueOf call is for implementing the mustBeBoolean machinery (it actually translates directly to DNU, like it is done nowadays in Squeak). >>>>>>> >>>>>>> Of course, in Boolean, booleanValueOf is just an alias for valueOf >>>>>>> >>>>>>> As you can see, though, this is not terribly efficient, but there is room for improvement/optimizations. With more work, in this case, the _lt call could be replaced by the < operator, and even the _sub and _add calls could be optimized, >>>>>>> although not completely, since their result can morph into LargeInteger (mapped to BigInt). >>>>>>> >>>>>>> As hinted above, SmallInteger is mapped to Number (in the safeInteger range), Float is mapped to Number as well, and LargeInteger is mapped to BigInt. >>>>>>> >>>>>>> BlockClosure is mapped to Function, Boolean is mapped to Boolean, Character is mapped to String, weak references are implemented via WeakRef. >>>>>>> I have briefly considered also doing slightly higher-level mappings, for IdentitySet to Set and IdentityDictionary to Map, but this is not a priority. >>>>>>> >>>>>>> The image is serialized sort of like a JavaScript storeString. No processes or contexts though, or rather they are not brought back in on the JavaScript side. Blocks are both stored and loaded. >>>>>>> >>>>>>> Non-local returns, unwind blocks, resumable and restartable exceptions are implemented via JavaScript exception handling plus explicit handler block chains associated with the processes. >>>>>>> >>>>>>> The "image" starts with the global state loaded, but all processes are started from scratch instead of resumed. A non-UI image is thus trivially started. >>>>>>> >>>>>>> One major todo left is hooking up the UI/browser. I did take vm.display.browser.js from SqueakJS and adapted the code in order to implement its numbered primitives, but I still have to work through squeak.js from the same to initialize >>>>>>> and hook up the display. >>>>>>> >>>>>>> Florin >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Sun, Mar 7, 2021 at 11:17 PM Vanessa Freudenberg < >>>>>>> vanessa at codefrau.net> wrote: >>>>>>> >>>>>>>> >>>>>>>> Hi all, >>>>>>>> >>>>>>>> ideas for a faster SqueakJS JIT have been swirling around in my >>>>>>>> head for many years. This weekend I took the time to write some of them >>>>>>>> down: >>>>>>>> >>>>>>>> https://squeak.js.org/docs/jit.md.html >>>>>>>> >>>>>>>> Feedback welcome! >>>>>>>> >>>>>>>> Vanessa >>>>>>>> >>>>>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 42124 bytes Desc: not available URL: From notifications at github.com Wed Apr 7 22:23:22 2021 From: notifications at github.com (Christoph Thiede) Date: Wed, 07 Apr 2021 15:23:22 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] X11 Event Handling: Keystroke events are not recognized for Numpad Enter Key (#556) In-Reply-To: References: Message-ID: Hey all, just another issue in connection with VcXsrv: On my German QWERTZ keyboard, the circumflex key (`^/°`) is a dead key, i.e. I need to press space after this key in order to actually type a circumflex. This works fine for Squeak in Windows, but in VcXsrv, it doesn't ... Instead of `^`, ` ̂` (sic: `16r20` `16r302`) will be typed. Again, gedit recognizes this key correctly, so I think this could be an issue with `sqUnixX11.c`. I recorded the following keyboard event trace when pressing "dead_circumflex , space" in Squeak/VcXsrv: ``` keyUp (94) keyDown (32) keystroke '' (32) keyDown (770) keystroke '̂' (770) keyUp (32) ``` For comparison, in Squeak on Windows, the same keyboard input looks like this: ``` keyDown (220) keyUp (220) keyDown (32) keystroke '^' (94) keyUp (32) ``` `220` appears to be the dead circumflex key code, I could reproduce this in a browser. It looks as if VcXsrv does not respect this protocol but sends a single undelayed circumflex key down. Or could this be an issue with the `dead_key_case` handling in `sqUnixX11.c`? gedit handles this input correctly. Under Linux, who is responsible for handling dead keys? The X11 server or the X11 client? Again, it would be great if someone else with a native Linux installation could give some feedback about the behavior with a Qwertz keyboard without VcXrvc emulation. 😅 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/556#issuecomment-815301271 -------------- next part -------------- An HTML attachment was scrubbed... URL: From vanessa at codefrau.net Thu Apr 8 00:45:18 2021 From: vanessa at codefrau.net (Vanessa Freudenberg) Date: Wed, 7 Apr 2021 17:45:18 -0700 Subject: [Vm-dev] [SqueakJS] Faster JIT ideas In-Reply-To: References: Message-ID: On Wed, Apr 7, 2021 at 3:07 PM Florin Mateoc wrote: > > Small update: I can now see the UI, and even interact with it a little > (before it breaks with various bugs :)) - woohoo! > Awesome! And thanks for the bug report! I think you might have missed that SqueakJS does in fact subtract 1 from the frexp() result: case 53: return this.popNandPushIntIfOK(argCount+1, this.frexp_exponent(this.stackFloat(0)) - 1); I'm almost certain it is correct. I wrote a whole blockpost about emulating frexp in JavaScript 7 years ago: https://croquetweak.blogspot.com/2014/08/deconstructing-floats-frexp-and-ldexp.html Btw, I determined that yield* is incredibly slow, because (as you were saying) every send now needs to return a generator function. So I had to scrap my initial plan for the new SqueakJS JIT. I'm going with regular function calls now, and reifying the stack via exception unwinding when needed, rather than trying to keep multiple call stacks alive. See this twitter thread: https://twitter.com/codefrau/status/1378455847055941635 Vanessa On Wed, Apr 7, 2021 at 3:07 PM Florin Mateoc wrote: > > Small update: I can now see the UI, and even interact with it a little > (before it breaks with various bugs :)) - woohoo! > > Anyway, while debugging my various bugs, I found a small bug in the > SqueakJS primitive 53 - I do consult them regularly :) > Squeak uses the IEEE 754 specification for exponent (significand between 1 > and 2), frexp does not (significand between 0.5 and 1), so the result is > off by one. > It should not matter much, as the significand is computed based on the > exponent, but e.g. the code executed when the primitive fails gives a > different result from the primitive itself > > On Wed, Mar 17, 2021 at 5:01 AM Vanessa Freudenberg > wrote: > >> >> On Tue, Mar 16, 2021 at 1:38 AM Vanessa Freudenberg >> wrote: >> >>> Meanwhile, I made a little scheduler just to learn how to use yield*. >>> Works nicely: >>> https://codepen.io/codefrau/pen/jOVRmxm >>> >> >> And here is a JIT mockup using that scheduler: >> https://codepen.io/codefrau/pen/LYbopBV >> >> It's executing "5 benchFib", "4 benchFib", and "3 benchFib" in three >> separate processes, switching every 3 sends just for testing, and printing >> all contexts. >> >> No benchmarks yet. >> >> Vanessa >> >> >>> Vanessa >>> >>> >>>> On Mon, Mar 15, 2021 at 10:28 PM Vanessa Freudenberg < >>>> vanessa at codefrau.net> wrote: >>> >>> >>>>> Thanks for that Florin, very helpful! >>>>> >>>>> I'm curious why you need to make every send into a generator call, and >>>>> not just rely on the one in your GlobalCheckForInterrupts()? >>>>> >>>>> My implementation is intended to allow context switching that way: >>>>> >>>>> if (--vm.interruptCheckCounter <= 0 && vm.handleDepthAndInterrupts(depth, thisProxy) === true) return false; >>>>> >>>>> >>>>> This is the same technique as in other VMs, where the actual check for >>>>> context switch is not done for every send, but only when >>>>> the interruptCheckCounter goes below zero. In the first mockup on codepen, >>>>> vm.handleDepthAndInterrupts prints the contents of all the contexts, >>>>> proving that the information is accessible in case we need to context >>>>> switch or reify the stack. My hope was that inside of >>>>> handleDepthAndInterrupts() I could use *yield to do the actual context >>>>> switching. >>>>> >>>>> My second, exception based mockup on codepen uses the same approach, >>>>> except that when a context switch is needed it would throw, unwinding the >>>>> stack fully, and creating actual context objects along the way. I have not >>>>> mocked up that part yet (because it would need a mockup interpreter too, to >>>>> continue after unwind), but you can see the unwind working correctly by >>>>> uncommenting the line with >>>>> // throw Error("unwind") >>>>> >>>>> I tried your benchFib vs benchFiby on Chrome, which seems to >>>>> optimize generators a lot better than Firefox. On Chrome the overhead is >>>>> just 50% or so, vs 300% on Firefox. Safari appears to be between the two. >>>>> >>>>> I will need to make more complete mockups before deciding on a design. >>>>> Especially how closures would be handled. Does anyone have a tiny >>>>> one-method benchmark that would highlight closure performance? >>>>> >>>>> Vanessa >>>>> >>>>> On Mon, Mar 15, 2021 at 6:20 PM Florin Mateoc >>>>> wrote: >>>>> >>>>>> >>>>>> I don't think the numbers could be meaningfully compared. The whole >>>>>> purpose of the yield* invocations is to enable process switching, which I >>>>>> don't think your jitted methods allow for. But then are you merely >>>>>> comparing yield* invocations against direct invocations? For sure, the >>>>>> yield* ones will be much slower. >>>>>> Let alone my implementation, which also uses yield* for #< , #- and >>>>>> #+, so it would be much slower than below as operators are surely well >>>>>> optimized by JS, we can just measure direct vs yield* for the main >>>>>> recursive invocation: >>>>>> >>>>>> Number.prototype.benchFib = function benchFib() { >>>>>> return this < 2 ? 1 : (this - 1).benchFib() + (this - 2).benchFib() >>>>>> + 1 >>>>>> } >>>>>> >>>>>> var t = performance.now(); >>>>>> (30).benchFib(); >>>>>> performance.now() - t >>>>>> >>>>>> gives on my laptop in Firefox 920, 911, 919, 898 >>>>>> >>>>>> Versus >>>>>> >>>>>> Number.prototype.benchFiby = function* benchFiby() { >>>>>> return this < 2 ? 1 : (yield* (this - 1).benchFiby()) + (yield* ( >>>>>> this - 2).benchFiby()) + 1 >>>>>> } >>>>>> >>>>>> var t = performance.now(); >>>>>> (30).benchFiby().next(); >>>>>> performance.now() - t >>>>>> >>>>>> gives 2998, 3125, 3116, 3140 >>>>>> >>>>>> >>>>>> On Mon, Mar 15, 2021 at 3:41 PM Vanessa Freudenberg < >>>>>> vanessa at codefrau.net> wrote: >>>>>> >>>>>>> >>>>>>> Hi Florin, >>>>>>> >>>>>>> wow, that looks exciting! >>>>>>> >>>>>>> This is indeed a much more thorough Squeak-to-JS mapping, where mine >>>>>>> is more of a "traditional" VM. I love it! >>>>>>> >>>>>>> Since my original post I implemented a mockup of "my" new JIT scheme: >>>>>>> >>>>>>> >>>>>>> https://squeak.js.org/docs/jit.md.html#sketch:contextproxieswithintrospectionandinlinecaching/newjitsketch/performanceestimate >>>>>>> [image: image.png] >>>>>>> You can play with it here: https://codepen.io/codefrau/pen/JjbmVGw >>>>>>> >>>>>>> Could you share the performance numbers you are seeing for your >>>>>>> benchFib, in comparison to SqueakJS or my mockup? I am curious if >>>>>>> yield* is the way to go. >>>>>>> >>>>>>> Thanks for sharing! And congrats on your new job. My progress is >>>>>>> slow too, I only work on it some weekends. But then, I'm not in a hurry :) >>>>>>> >>>>>>> Vanessa >>>>>>> >>>>>>> On Sun, Mar 14, 2021 at 6:18 PM Florin Mateoc < >>>>>>> florin.mateoc at gmail.com> wrote: >>>>>>> >>>>>>>> >>>>>>>> Hi Vanessa, >>>>>>>> >>>>>>>> Sorry for the delay in responding - as somebody who has been >>>>>>>> inspired by your SqueakJS project, I think I should mention that I am >>>>>>>> working on a related project, for now tentatively called JsSqueak. >>>>>>>> In addition to the inspiration provided by SqueakJS, it also >>>>>>>> scratches my longstanding itch about compiling (transpiling) Squeak. >>>>>>>> >>>>>>>> I hesitated to talk about it, as it is still a work in progress - >>>>>>>> after small bits and pieces that I worked on over a long period, I had the >>>>>>>> opportunity to spend a significant and uninterrupted chunk of time on it >>>>>>>> last summer, when I was unemployed for 3 months, and I was able to make >>>>>>>> good progress. I was optimistically thinking of releasing a first version >>>>>>>> before the end of last year, but after I started working on my new job, >>>>>>>> progress on JsSqueak has slowed down significantly. I must confess that I >>>>>>>> (and especially my wife) hesitate in recreating that productive unemployed >>>>>>>> situation :) >>>>>>>> >>>>>>>> I started with Squeak 4.5 - I already had code transforming >>>>>>>> Smalltalk code to a form more suitable for translation - and I also started >>>>>>>> with VMMakerJS-dtl.18 for the plugin generation part. Of course, I had to >>>>>>>> heavily modify it, since I have to get rid of the stack usage for >>>>>>>> arguments/receiver and returns. >>>>>>>> Both of these big parts are working. I also implemented most >>>>>>>> numbered primitives by hand - they are inlined at generation time in the >>>>>>>> methods calling them. >>>>>>>> I am also taking advantage of the latest and greatest additions to >>>>>>>> JavaScript. I am, of course, using classes, and the parallel class-side >>>>>>>> hierarchy is implemented using statics. To implement green threads/process >>>>>>>> switching, all translated methods are implemented as generator functions, >>>>>>>> and all calls are through yield* expressions. The preemption/interrupt >>>>>>>> check points are inlined. With this, a process switch is achieved by simply >>>>>>>> yield-ing (in the process/semaphore primitives). >>>>>>>> With this, the Integer>>#benchFib method is translated (as a method >>>>>>>> in Number.prototype, there is one more, simpler, implementation in BigInt) >>>>>>>> as: >>>>>>>> >>>>>>>> *_benchFib() { >>>>>>>> if (Number.isSafeInteger(this.valueOf())) { // Effective (inherited or local) source for #benchFib in SmallInteger >>>>>>>> /*Handy send-heavy benchmark*/ >>>>>>>> /*(result // seconds to run) = approx calls per second*/ >>>>>>>> /* | r t | >>>>>>>> t := Time millisecondsToRun: [r := 26 benchFib]. >>>>>>>> (r // 1000) // t*/ >>>>>>>> /*138000 on a Mac 8100//100*/ >>>>>>>> if (GlobalActivationCounter-- < 0) yield* GlobalCheckForInterrupts(); >>>>>>>> >>>>>>>> return (yield* this._lt( 2)).booleanValueOf("questionMark:colon:") ? (1) : (yield* (yield* (yield* (yield* this._sub( 1))._benchFib())._add( yield* (yield* this._sub( 2))._benchFib()))._add( 1)); >>>>>>>> } else // No implementation for #benchFib in Float hierarchy, trigger a DNU >>>>>>>> return yield* super._benchFib() >>>>>>>> } >>>>>>>> >>>>>>>> The top-level check for smallIntegers is because both SmallInteger and Float are mapped to Number. >>>>>>>> >>>>>>>> The booleanValueOf call is for implementing the mustBeBoolean machinery (it actually translates directly to DNU, like it is done nowadays in Squeak). >>>>>>>> >>>>>>>> Of course, in Boolean, booleanValueOf is just an alias for valueOf >>>>>>>> >>>>>>>> As you can see, though, this is not terribly efficient, but there is room for improvement/optimizations. With more work, in this case, the _lt call could be replaced by the < operator, and even the _sub and _add calls could be optimized, >>>>>>>> although not completely, since their result can morph into LargeInteger (mapped to BigInt). >>>>>>>> >>>>>>>> As hinted above, SmallInteger is mapped to Number (in the safeInteger range), Float is mapped to Number as well, and LargeInteger is mapped to BigInt. >>>>>>>> >>>>>>>> BlockClosure is mapped to Function, Boolean is mapped to Boolean, Character is mapped to String, weak references are implemented via WeakRef. >>>>>>>> I have briefly considered also doing slightly higher-level mappings, for IdentitySet to Set and IdentityDictionary to Map, but this is not a priority. >>>>>>>> >>>>>>>> The image is serialized sort of like a JavaScript storeString. No processes or contexts though, or rather they are not brought back in on the JavaScript side. Blocks are both stored and loaded. >>>>>>>> >>>>>>>> Non-local returns, unwind blocks, resumable and restartable exceptions are implemented via JavaScript exception handling plus explicit handler block chains associated with the processes. >>>>>>>> >>>>>>>> The "image" starts with the global state loaded, but all processes are started from scratch instead of resumed. A non-UI image is thus trivially started. >>>>>>>> >>>>>>>> One major todo left is hooking up the UI/browser. I did take vm.display.browser.js from SqueakJS and adapted the code in order to implement its numbered primitives, but I still have to work through squeak.js from the same to initialize >>>>>>>> and hook up the display. >>>>>>>> >>>>>>>> Florin >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Sun, Mar 7, 2021 at 11:17 PM Vanessa Freudenberg < >>>>>>>> vanessa at codefrau.net> wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> Hi all, >>>>>>>>> >>>>>>>>> ideas for a faster SqueakJS JIT have been swirling around in my >>>>>>>>> head for many years. This weekend I took the time to write some of them >>>>>>>>> down: >>>>>>>>> >>>>>>>>> https://squeak.js.org/docs/jit.md.html >>>>>>>>> >>>>>>>>> Feedback welcome! >>>>>>>>> >>>>>>>>> Vanessa >>>>>>>>> >>>>>>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 42124 bytes Desc: not available URL: From florin.mateoc at gmail.com Thu Apr 8 02:15:41 2021 From: florin.mateoc at gmail.com (Florin Mateoc) Date: Wed, 7 Apr 2021 22:15:41 -0400 Subject: [Vm-dev] [SqueakJS] Faster JIT ideas In-Reply-To: References: Message-ID: Blush. I did miss the - 1, sorry for the noise. With regards to yield*, I am sure the engines will continue to improve the performance - it is relatively new, so I assume there might be some low hanging fruit. We'll see. I am trying to concentrate on correctness first, I also have a lot of room for optimizations Florin On Wed, Apr 7, 2021 at 8:46 PM Vanessa Freudenberg wrote: > > On Wed, Apr 7, 2021 at 3:07 PM Florin Mateoc > wrote: > >> >> Small update: I can now see the UI, and even interact with it a little >> (before it breaks with various bugs :)) - woohoo! >> > > Awesome! > > And thanks for the bug report! I think you might have missed that SqueakJS > does in fact subtract 1 from the frexp() result: > > case 53: return this.popNandPushIntIfOK(argCount+1, > this.frexp_exponent(this.stackFloat(0)) - 1); > > I'm almost certain it is correct. I wrote a whole > blockpost about emulating frexp in JavaScript 7 years ago: > > https://croquetweak.blogspot.com/2014/08/deconstructing-floats-frexp-and-ldexp.html > > Btw, I determined that yield* is incredibly slow, because (as you were > saying) every send now needs to return a generator function. So I had to > scrap my initial plan for the new SqueakJS JIT. I'm going with regular > function calls now, and reifying the stack via exception unwinding when > needed, rather than trying to keep multiple call stacks alive. See this > twitter thread: > https://twitter.com/codefrau/status/1378455847055941635 > > Vanessa > > On Wed, Apr 7, 2021 at 3:07 PM Florin Mateoc > wrote: > >> >> Small update: I can now see the UI, and even interact with it a little >> (before it breaks with various bugs :)) - woohoo! >> >> Anyway, while debugging my various bugs, I found a small bug in the >> SqueakJS primitive 53 - I do consult them regularly :) >> Squeak uses the IEEE 754 specification for exponent (significand between >> 1 and 2), frexp does not (significand between 0.5 and 1), so the result is >> off by one. >> It should not matter much, as the significand is computed based on the >> exponent, but e.g. the code executed when the primitive fails gives a >> different result from the primitive itself >> >> On Wed, Mar 17, 2021 at 5:01 AM Vanessa Freudenberg >> wrote: >> >>> >>> On Tue, Mar 16, 2021 at 1:38 AM Vanessa Freudenberg < >>> vanessa at codefrau.net> wrote: >>> >>>> Meanwhile, I made a little scheduler just to learn how to use yield*. >>>> Works nicely: >>>> https://codepen.io/codefrau/pen/jOVRmxm >>>> >>> >>> And here is a JIT mockup using that scheduler: >>> https://codepen.io/codefrau/pen/LYbopBV >>> >>> It's executing "5 benchFib", "4 benchFib", and "3 benchFib" in three >>> separate processes, switching every 3 sends just for testing, and printing >>> all contexts. >>> >>> No benchmarks yet. >>> >>> Vanessa >>> >>> >>>> Vanessa >>>> >>>> >>>>> On Mon, Mar 15, 2021 at 10:28 PM Vanessa Freudenberg < >>>>> vanessa at codefrau.net> wrote: >>>> >>>> >>>>>> Thanks for that Florin, very helpful! >>>>>> >>>>>> I'm curious why you need to make every send into a generator call, >>>>>> and not just rely on the one in your GlobalCheckForInterrupts()? >>>>>> >>>>>> My implementation is intended to allow context switching that way: >>>>>> >>>>>> if (--vm.interruptCheckCounter <= 0 && vm.handleDepthAndInterrupts(depth, thisProxy) === true) return false; >>>>>> >>>>>> >>>>>> This is the same technique as in other VMs, where the actual check >>>>>> for context switch is not done for every send, but only when >>>>>> the interruptCheckCounter goes below zero. In the first mockup on codepen, >>>>>> vm.handleDepthAndInterrupts prints the contents of all the contexts, >>>>>> proving that the information is accessible in case we need to context >>>>>> switch or reify the stack. My hope was that inside of >>>>>> handleDepthAndInterrupts() I could use *yield to do the actual context >>>>>> switching. >>>>>> >>>>>> My second, exception based mockup on codepen uses the same approach, >>>>>> except that when a context switch is needed it would throw, unwinding the >>>>>> stack fully, and creating actual context objects along the way. I have not >>>>>> mocked up that part yet (because it would need a mockup interpreter too, to >>>>>> continue after unwind), but you can see the unwind working correctly by >>>>>> uncommenting the line with >>>>>> // throw Error("unwind") >>>>>> >>>>>> I tried your benchFib vs benchFiby on Chrome, which seems to >>>>>> optimize generators a lot better than Firefox. On Chrome the overhead is >>>>>> just 50% or so, vs 300% on Firefox. Safari appears to be between the two. >>>>>> >>>>>> I will need to make more complete mockups before deciding on a >>>>>> design. Especially how closures would be handled. Does anyone have a tiny >>>>>> one-method benchmark that would highlight closure performance? >>>>>> >>>>>> Vanessa >>>>>> >>>>>> On Mon, Mar 15, 2021 at 6:20 PM Florin Mateoc < >>>>>> florin.mateoc at gmail.com> wrote: >>>>>> >>>>>>> >>>>>>> I don't think the numbers could be meaningfully compared. The whole >>>>>>> purpose of the yield* invocations is to enable process switching, which I >>>>>>> don't think your jitted methods allow for. But then are you merely >>>>>>> comparing yield* invocations against direct invocations? For sure, the >>>>>>> yield* ones will be much slower. >>>>>>> Let alone my implementation, which also uses yield* for #< , #- and >>>>>>> #+, so it would be much slower than below as operators are surely well >>>>>>> optimized by JS, we can just measure direct vs yield* for the main >>>>>>> recursive invocation: >>>>>>> >>>>>>> Number.prototype.benchFib = function benchFib() { >>>>>>> return this < 2 ? 1 : (this - 1).benchFib() + (this - >>>>>>> 2).benchFib() + 1 >>>>>>> } >>>>>>> >>>>>>> var t = performance.now(); >>>>>>> (30).benchFib(); >>>>>>> performance.now() - t >>>>>>> >>>>>>> gives on my laptop in Firefox 920, 911, 919, 898 >>>>>>> >>>>>>> Versus >>>>>>> >>>>>>> Number.prototype.benchFiby = function* benchFiby() { >>>>>>> return this < 2 ? 1 : (yield* (this - 1).benchFiby()) + (yield* ( >>>>>>> this - 2).benchFiby()) + 1 >>>>>>> } >>>>>>> >>>>>>> var t = performance.now(); >>>>>>> (30).benchFiby().next(); >>>>>>> performance.now() - t >>>>>>> >>>>>>> gives 2998, 3125, 3116, 3140 >>>>>>> >>>>>>> >>>>>>> On Mon, Mar 15, 2021 at 3:41 PM Vanessa Freudenberg < >>>>>>> vanessa at codefrau.net> wrote: >>>>>>> >>>>>>>> >>>>>>>> Hi Florin, >>>>>>>> >>>>>>>> wow, that looks exciting! >>>>>>>> >>>>>>>> This is indeed a much more thorough Squeak-to-JS mapping, >>>>>>>> where mine is more of a "traditional" VM. I love it! >>>>>>>> >>>>>>>> Since my original post I implemented a mockup of "my" new JIT >>>>>>>> scheme: >>>>>>>> >>>>>>>> >>>>>>>> https://squeak.js.org/docs/jit.md.html#sketch:contextproxieswithintrospectionandinlinecaching/newjitsketch/performanceestimate >>>>>>>> [image: image.png] >>>>>>>> You can play with it here: https://codepen.io/codefrau/pen/JjbmVGw >>>>>>>> >>>>>>>> Could you share the performance numbers you are seeing for your >>>>>>>> benchFib, in comparison to SqueakJS or my mockup? I am curious if >>>>>>>> yield* is the way to go. >>>>>>>> >>>>>>>> Thanks for sharing! And congrats on your new job. My progress is >>>>>>>> slow too, I only work on it some weekends. But then, I'm not in a hurry :) >>>>>>>> >>>>>>>> Vanessa >>>>>>>> >>>>>>>> On Sun, Mar 14, 2021 at 6:18 PM Florin Mateoc < >>>>>>>> florin.mateoc at gmail.com> wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> Hi Vanessa, >>>>>>>>> >>>>>>>>> Sorry for the delay in responding - as somebody who has been >>>>>>>>> inspired by your SqueakJS project, I think I should mention that I am >>>>>>>>> working on a related project, for now tentatively called JsSqueak. >>>>>>>>> In addition to the inspiration provided by SqueakJS, it also >>>>>>>>> scratches my longstanding itch about compiling (transpiling) Squeak. >>>>>>>>> >>>>>>>>> I hesitated to talk about it, as it is still a work in progress - >>>>>>>>> after small bits and pieces that I worked on over a long period, I had the >>>>>>>>> opportunity to spend a significant and uninterrupted chunk of time on it >>>>>>>>> last summer, when I was unemployed for 3 months, and I was able to make >>>>>>>>> good progress. I was optimistically thinking of releasing a first version >>>>>>>>> before the end of last year, but after I started working on my new job, >>>>>>>>> progress on JsSqueak has slowed down significantly. I must confess that I >>>>>>>>> (and especially my wife) hesitate in recreating that productive unemployed >>>>>>>>> situation :) >>>>>>>>> >>>>>>>>> I started with Squeak 4.5 - I already had code transforming >>>>>>>>> Smalltalk code to a form more suitable for translation - and I also started >>>>>>>>> with VMMakerJS-dtl.18 for the plugin generation part. Of course, I had to >>>>>>>>> heavily modify it, since I have to get rid of the stack usage for >>>>>>>>> arguments/receiver and returns. >>>>>>>>> Both of these big parts are working. I also implemented most >>>>>>>>> numbered primitives by hand - they are inlined at generation time in the >>>>>>>>> methods calling them. >>>>>>>>> I am also taking advantage of the latest and greatest additions to >>>>>>>>> JavaScript. I am, of course, using classes, and the parallel class-side >>>>>>>>> hierarchy is implemented using statics. To implement green threads/process >>>>>>>>> switching, all translated methods are implemented as generator functions, >>>>>>>>> and all calls are through yield* expressions. The preemption/interrupt >>>>>>>>> check points are inlined. With this, a process switch is achieved by simply >>>>>>>>> yield-ing (in the process/semaphore primitives). >>>>>>>>> With this, the Integer>>#benchFib method is translated (as a >>>>>>>>> method in Number.prototype, there is one more, simpler, implementation in >>>>>>>>> BigInt) as: >>>>>>>>> >>>>>>>>> *_benchFib() { >>>>>>>>> if (Number.isSafeInteger(this.valueOf())) { // Effective (inherited or local) source for #benchFib in SmallInteger >>>>>>>>> /*Handy send-heavy benchmark*/ >>>>>>>>> /*(result // seconds to run) = approx calls per second*/ >>>>>>>>> /* | r t | >>>>>>>>> t := Time millisecondsToRun: [r := 26 benchFib]. >>>>>>>>> (r // 1000) // t*/ >>>>>>>>> /*138000 on a Mac 8100//100*/ >>>>>>>>> if (GlobalActivationCounter-- < 0) yield* GlobalCheckForInterrupts(); >>>>>>>>> >>>>>>>>> return (yield* this._lt( 2)).booleanValueOf("questionMark:colon:") ? (1) : (yield* (yield* (yield* (yield* this._sub( 1))._benchFib())._add( yield* (yield* this._sub( 2))._benchFib()))._add( 1)); >>>>>>>>> } else // No implementation for #benchFib in Float hierarchy, trigger a DNU >>>>>>>>> return yield* super._benchFib() >>>>>>>>> } >>>>>>>>> >>>>>>>>> The top-level check for smallIntegers is because both SmallInteger and Float are mapped to Number. >>>>>>>>> >>>>>>>>> The booleanValueOf call is for implementing the mustBeBoolean machinery (it actually translates directly to DNU, like it is done nowadays in Squeak). >>>>>>>>> >>>>>>>>> Of course, in Boolean, booleanValueOf is just an alias for valueOf >>>>>>>>> >>>>>>>>> As you can see, though, this is not terribly efficient, but there is room for improvement/optimizations. With more work, in this case, the _lt call could be replaced by the < operator, and even the _sub and _add calls could be optimized, >>>>>>>>> although not completely, since their result can morph into LargeInteger (mapped to BigInt). >>>>>>>>> >>>>>>>>> As hinted above, SmallInteger is mapped to Number (in the safeInteger range), Float is mapped to Number as well, and LargeInteger is mapped to BigInt. >>>>>>>>> >>>>>>>>> BlockClosure is mapped to Function, Boolean is mapped to Boolean, Character is mapped to String, weak references are implemented via WeakRef. >>>>>>>>> I have briefly considered also doing slightly higher-level mappings, for IdentitySet to Set and IdentityDictionary to Map, but this is not a priority. >>>>>>>>> >>>>>>>>> The image is serialized sort of like a JavaScript storeString. No processes or contexts though, or rather they are not brought back in on the JavaScript side. Blocks are both stored and loaded. >>>>>>>>> >>>>>>>>> Non-local returns, unwind blocks, resumable and restartable exceptions are implemented via JavaScript exception handling plus explicit handler block chains associated with the processes. >>>>>>>>> >>>>>>>>> The "image" starts with the global state loaded, but all processes are started from scratch instead of resumed. A non-UI image is thus trivially started. >>>>>>>>> >>>>>>>>> One major todo left is hooking up the UI/browser. I did take vm.display.browser.js from SqueakJS and adapted the code in order to implement its numbered primitives, but I still have to work through squeak.js from the same to initialize >>>>>>>>> and hook up the display. >>>>>>>>> >>>>>>>>> Florin >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Sun, Mar 7, 2021 at 11:17 PM Vanessa Freudenberg < >>>>>>>>> vanessa at codefrau.net> wrote: >>>>>>>>> >>>>>>>>>> >>>>>>>>>> Hi all, >>>>>>>>>> >>>>>>>>>> ideas for a faster SqueakJS JIT have been swirling around in my >>>>>>>>>> head for many years. This weekend I took the time to write some of them >>>>>>>>>> down: >>>>>>>>>> >>>>>>>>>> https://squeak.js.org/docs/jit.md.html >>>>>>>>>> >>>>>>>>>> Feedback welcome! >>>>>>>>>> >>>>>>>>>> Vanessa >>>>>>>>>> >>>>>>>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 42124 bytes Desc: not available URL: From notifications at github.com Thu Apr 8 13:22:52 2021 From: notifications at github.com (Christoph Thiede) Date: Thu, 08 Apr 2021 06:22:52 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] primitiveSSLCreate fails sporadically on Windows (#554) In-Reply-To: References: Message-ID: Update: Because it seemed very strange to me that such a problem would only occur with a specific image, I gradually cleaned up a copy of my affected image today. Despite multiple attempts, I can't really tell in detail what was the problem, but somewhere in my image I had a months-old object explorer on DependentsFields open, and when I close it as well as a few other browsers/workspaces, the problem suddenly disappeared at the next VM restart and module loading works again. This solves my concrete problem, but not the bug in general, so I would like to continue to investigate. However, after a number of attempts, my debug build of the VM does not any longer fail to find the module (though the release VM still does), so, unfortunately, I cannot continue my experiments right now. @marceltaeumel I already did some research on this error but did not really find something interesting. Circular dependencies could be a reason, but from what I could find out, the ordered list of loaded modules does not differ between my defect and my cleaned-up image, so this would not make sense. There were also mentioned some other points such as security limitations (memory protection/DEP/ESP, never heard of that before), but I would be surprised if such a mechanism would only take effect sporadically. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/554#issuecomment-815820215 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Thu Apr 8 13:28:46 2021 From: notifications at github.com (Christoph Thiede) Date: Thu, 08 Apr 2021 06:28:46 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] primitiveSSLCreate fails sporadically on Windows (#554) In-Reply-To: References: Message-ID: Forget most of the above, I just made a very interesting observation! :-) Currently, the RAM size/disk size of my repaired image is only a couple of megabytes below 2^27 bytes. The defect image is 10 MB larger than this threshold. After loading a 100 MB file into the repaired image and restarting it, the module loading fails again. After freeing the file in the image and restarting it again, the module loading works again. So the next question is: How could this happen? Are there any RAM size limits that I should be aware of? Or could this even be a bug in the `LoadModule()` function because its error message (E_NOACCESS) does not mention exceeded size limits in any way? I have never dealt with such issues before, maybe you have some tips for me. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/554#issuecomment-815824577 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Thu Apr 8 15:02:34 2021 From: notifications at github.com (Christoph Thiede) Date: Thu, 08 Apr 2021 08:02:34 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] primitiveSSLCreate fails sporadically on Windows (#554) In-Reply-To: References: Message-ID: Got it! I managed to reproduce the issue! Steps to reproduce: 1. Open a fresh Trunk image 2. Evaluate in a workspace: ```smalltalk large := Array new: 200000000. ``` 3. Save and quit the image (don't close the workspace) 4. Reopen the image 5. Evaluate: ```smalltalk SqueakSSL new. ``` E voilá, `primitiveSSLCreate` fails. Can anyone else reproduce this? My config is: Windows 2004, 64-bit VM, 16 GB RAM, could there be more relevant parameters? -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/554#issuecomment-815896715 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Thu Apr 8 23:25:27 2021 From: noreply at github.com (Eliot Miranda) Date: Thu, 08 Apr 2021 16:25:27 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 5a7aa3: macOS CameraPlugin. Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 5a7aa38b22195577364a3c5ccdabbe36d33effeb https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/5a7aa38b22195577364a3c5ccdabbe36d33effeb Author: Eliot Miranda Date: 2021-04-08 (Thu, 08 Apr 2021) Changed paths: M platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m Log Message: ----------- macOS CameraPlugin. Fix a slip in commit a6fd91e98f0d3e51c45a1a66611483abdc4c7156/ commit 4d8cc8d71eb254f3eb687a4486819c13ac04d0ba. The test for the pixel buffer being large enough not to need reallocating is thw wrong way around. From no-reply at appveyor.com Thu Apr 8 23:45:35 2021 From: no-reply at appveyor.com (AppVeyor) Date: Thu, 08 Apr 2021 23:45:35 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2422 Message-ID: <20210408234535.1.12DA628302BC65B7@appveyor.com> An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Fri Apr 9 02:31:34 2021 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Thu, 08 Apr 2021 19:31:34 -0700 Subject: [Vm-dev] For Vassili Bykov Message-ID: <52f1a251f23b9dde684ab6a8d2a4cdb8@whidbey.com> Greetings, Sorry to burden vm-dev with this, but I have been unable to find a current email address for Vassili Bykov. So, Vassili, I have found several code references to "THE HITCH HIKER'S GUIDE TO THE SMALLTALK COMPILER", which is now only available via the Wayback Machine: https://web.archive.org/web/20071213195813/http://www.whysmalltalk.com/articles/bykov/HitchHiker.htm Would you give permission to host this on a web page in the Cuis Smalltalk web site? I would be happy to do the markup and have a page in the https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev Documentation directory. OK with you? Thanks in either case, -KenD From notifications at github.com Fri Apr 9 07:45:17 2021 From: notifications at github.com (Marcel Taeumel) Date: Fri, 09 Apr 2021 00:45:17 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] primitiveSSLCreate fails sporadically on Windows (#554) In-Reply-To: References: Message-ID: Well, I wouldn't immediately celebrate "Got it!" 😄 but yes, I can reproduce this in Squeak 5.3 (64-bit) with the VM 202003021730. So, what does this behavior tell us? At least, it is releated to some kind of memory management. Renaming "Squeak.exe" to something else or using "SqueakConsole.exe" or changing the VM to 202011120327 ... all options still show that bug in that "broken" image. There is something wrong with module loading. Is there some interference between Squeak's object memory and how modules are loaded? Maybe take a look at how primitive 571 is implemented. (`SmalltalkImage >> #unloadModule:`) -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/554#issuecomment-816486966 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Mon Apr 12 09:39:35 2021 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 12 Apr 2021 11:39:35 +0200 Subject: [Vm-dev] How to convert 32-bit images to 64-bit images? Message-ID: Hi all! How would one convert a 32-bit image into a 64-bit one? Is there a tool or tutorial? Best, Marcel -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rowledge.org Mon Apr 12 16:49:50 2021 From: tim at rowledge.org (tim Rowledge) Date: Mon, 12 Apr 2021 09:49:50 -0700 Subject: [Vm-dev] How to convert 32-bit images to 64-bit images? In-Reply-To: References: Message-ID: > On 2021-04-12, at 2:39 AM, Marcel Taeumel wrote: > > Hi all! > > How would one convert a 32-bit image into a 64-bit one? Is there a tool or tutorial? There's a very good tool; part of the VMMaker package. Load VMMaker and use `Spur64to32BitImageConverter new bootstrapImage: 'My64bit.image'` or indeed the Spur32to64BitImageConverter. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Strange OpCodes: XER: Exclusive ERror From stes at telenet.be Mon Apr 12 17:18:46 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Mon, 12 Apr 2021 19:18:46 +0200 (CEST) Subject: [Vm-dev] How to convert 32-bit images to 64-bit images? Message-ID: <846286085.13618176.1618247926366.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, One document that I've found interesting is : http://wiki.squeak.org/squeak/769 "FAQ: How can I bootstrap a Squeak image?" It discusses technologies that I'm personally NOT familiar with such as KernelImage and SystemTracer. This is not really an answer to your question but the subject is similar, namely how to build or convert an image. As to Tim Rowledge answer to check out Spur32to64BitImageConverter, this is probably a much better answer. Regards, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJgdIC0AAoJENdFDkXGicizcuEIAKPKWKmOpfew7n25Kvz7My+Z ZbRXRiM8RxePA+mZg8r+CHqlgFL6D+PvCGyNkqmdJsvZyaiaiuu5uI8OOUTVsD0F xjsRBY8XcDpiQel5M/5qyn5pV1D69ev9phCN+mwl+UPTluU7FNXJJ2zeZ1qeTDpe gpwzSxErPN1PfhwJJPax55eJehIX6MVd6mPqT2Grqc7aldZ249N5rElRhgeWEfSi dyoa/EvI3r3Cwrfwz7YQPHwlIYTAw4pKtk91/nG0d8L2S6ptbyr60lwuNb8Ama9o XddZiQSnOid9beeiTWG+PGvTIZYGymVAlm98A7ARVjoksXJoP7JlGoy/XeNqrno= =nK9F -----END PGP SIGNATURE----- From commits at source.squeak.org Mon Apr 12 21:46:41 2021 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 12 Apr 2021 21:46:41 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2949.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2949.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2949 Author: eem Time: 12 April 2021, 2:46:31.537712 pm UUID: 2fd2c871-435a-4312-ac4c-79c95820c5a4 Ancestors: VMMaker.oscog-eem.2948 Add CameraPlugin primSetCameraBuffers to avoid a copy when reading a frame. =============== Diff against VMMaker.oscog-eem.2948 =============== Item was changed: ----- Method: CameraPlugin>>primGetFrame (in category 'primitives') ----- primGetFrame "Copy a camera frame into the given Bitmap. The Bitmap should be for a Form of depth 32 that is the same width and height as the current camera frame. Fail if the camera is not open or if the bitmap is not the right size. If successful, answer the number of frames received from the camera since the last call. If this is zero, then there has been no change." | cameraNum bitmapOop bitmap pixCount result | cameraNum := interpreterProxy stackIntegerValue: 1. bitmapOop := interpreterProxy stackValue: 0. interpreterProxy success: (interpreterProxy isWords: bitmapOop). interpreterProxy failed ifTrue: [^ 0]. bitmap := self cCoerce: (interpreterProxy firstIndexableField: bitmapOop) to: #'unsigned char *'. pixCount := interpreterProxy stSizeOf: bitmapOop. result := self Camera: cameraNum Get: bitmap Frame: pixCount. result < 0 ifTrue: + [^interpreterProxy primitiveFailFor: result negated]. - [^interpreterProxy primitiveFail]. interpreterProxy methodReturnInteger: result! Item was added: + ----- Method: CameraPlugin>>primSetCameraBuffers (in category 'primitives') ----- + primSetCameraBuffers + "Sets one or two frame buffers to receive camera frames. The buffer(s) must be big enough and pinned. + Provides these two interfaces: + camera: cameraNum setFrameBuffer: pinnedNonPointers + camera: cameraNum setFrameBufferA: pinnedNonPointers B: pinnedNonPointersOrNil" + + + | cameraNum failCode bufferOne bufferTwo | + interpreterProxy methodArgumentCount + caseOf: { + [3] -> [cameraNum := interpreterProxy stackValue: 2. + bufferOne := interpreterProxy stackValue: 1. + bufferTwo := interpreterProxy stackValue: 0]. + [2] -> [cameraNum := interpreterProxy stackValue: 1. + bufferOne := interpreterProxy stackValue: 0. + bufferTwo := nil] } + otherwise: + [^interpreterProxy primitiveFailFor: PrimErrBadNumArgs]. + + ((interpreterProxy isIntegerObject: cameraNum) + and: [(interpreterProxy isWordsOrBytes: bufferOne) + and: [(interpreterProxy isPinned: bufferOne) + and: [bufferTwo isNil + or: [bufferTwo = interpreterProxy nilObject + or: [(interpreterProxy isWordsOrBytes: bufferTwo) + and: [interpreterProxy isPinned: bufferTwo]]]]]]) ifFalse: + [^interpreterProxy primitiveFailFor: PrimErrBadArgument]. + + failCode := self Camera: (interpreterProxy integerValueOf: cameraNum) + SetFrame: bufferOne + Buffers: (bufferTwo = interpreterProxy nilObject ifFalse: [bufferTwo]). "coerce nilObject to nil" + failCode ~= 0 ifTrue: [^interpreterProxy primitiveFailFor: failCode]. + + interpreterProxy methodReturnReceiver! From noreply at github.com Mon Apr 12 21:49:37 2021 From: noreply at github.com (Eliot Miranda) Date: Mon, 12 Apr 2021 14:49:37 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] effa97: CogVM source as per VMMaker.oscog-eem.2949 Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: effa97f75ee6bd216a482c3983b401feba1de05c https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/effa97f75ee6bd216a482c3983b401feba1de05c Author: Eliot Miranda Date: 2021-04-12 (Mon, 12 Apr 2021) Changed paths: M platforms/Cross/plugins/CameraPlugin/CameraPlugin.h M platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m M platforms/unix/plugins/CameraPlugin/sqCamera-linux.c M platforms/win32/plugins/CameraPlugin/winCameraOps.cpp M src/plugins/CameraPlugin/CameraPlugin.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2949 Add CameraPlugin primSetCameraBuffers to avoid a copy when reading a frame. Provide an implementation for macOS. From no-reply at appveyor.com Mon Apr 12 22:08:48 2021 From: no-reply at appveyor.com (AppVeyor) Date: Mon, 12 Apr 2021 22:08:48 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2423 Message-ID: <20210412220848.1.192B2F64D0739C3A@appveyor.com> An HTML attachment was scrubbed... URL: From commits at source.squeak.org Tue Apr 13 05:38:13 2021 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 13 Apr 2021 05:38:13 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2950.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2950.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2950 Author: eem Time: 12 April 2021, 10:38:04.402462 pm UUID: dbcba85e-dc26-495f-9ce8-aa01633f6aa5 Ancestors: VMMaker.oscog-eem.2949 Fix huge horrible win32 Spur VM bug. Plugins must export accessor depths (via the EXPORT macro) otherwise the external primitive loading machinery will silently compute their accessor depths as -1 (no accessor depth), and so no primitives will be scanned for forwarders, and hence none will retry when given forwarders, breaking the while Spur transparent forwarding mechanism for primitives on win32. The bug showed up with the new CameraPlugin primSetCameraBuffers primitive which is given a newly becomed forwarder to a pinned bitmap. The primitive doesn't retry and hence always fails. =============== Diff against VMMaker.oscog-eem.2949 =============== Item was changed: ----- Method: VMPluginCodeGenerator>>emitAccessorDepthsOn: (in category 'C code generator') ----- emitAccessorDepthsOn: aStream "Output accessor depth bytes for all primitives in the plugin. This is for external primitives in Spur." self sortedExportMethods do: [:method| | primName | primName := self cFunctionNameFor: method selector. (self accessorDepthForSelector: primName asSymbol) ifNotNil: [:depth| "store the accessor depth in a byte variable; save a little space by omitting depths < 0; support code supplies the default." self assert: depth < 128. depth >= 0 ifTrue: [self withOptionalConditionalDefineFor: method on: aStream do: [aStream + nextPutAll: 'EXPORT(signed char) '; - nextPutAll: 'signed char '; nextPutAll: primName; nextPutAll: 'AccessorDepth = '; nextPutAll: (self cLiteralFor: depth); nextPut: $;; cr]]]]! From noreply at github.com Tue Apr 13 05:47:28 2021 From: noreply at github.com (Eliot Miranda) Date: Mon, 12 Apr 2021 22:47:28 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 56635f: CogVM source as per VMMaker.oscog-eem.2950 Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 56635fc325bfb9bc9188b11a450723992ae35f8c https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/56635fc325bfb9bc9188b11a450723992ae35f8c Author: Eliot Miranda Date: 2021-04-12 (Mon, 12 Apr 2021) Changed paths: M src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c M src/plugins/AioPlugin/AioPlugin.c M src/plugins/AsynchFilePlugin/AsynchFilePlugin.c M src/plugins/B2DPlugin/B2DPlugin.c M src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c M src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c M src/plugins/BitBltPlugin/BitBltPlugin.c M src/plugins/BochsIA32Plugin/BochsIA32Plugin.c M src/plugins/BochsX64Plugin/BochsX64Plugin.c M src/plugins/CameraPlugin/CameraPlugin.c M src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c M src/plugins/CroquetPlugin/CroquetPlugin.c M src/plugins/DESPlugin/DESPlugin.c M src/plugins/DSAPrims/DSAPrims.c M src/plugins/DropPlugin/DropPlugin.c M src/plugins/FFTPlugin/FFTPlugin.c M src/plugins/FileAttributesPlugin/FileAttributesPlugin.c M src/plugins/FilePlugin/FilePlugin.c M src/plugins/Float64ArrayPlugin/Float64ArrayPlugin.c M src/plugins/FloatArrayPlugin/FloatArrayPlugin.c M src/plugins/FloatMathPlugin/FloatMathPlugin.c M src/plugins/GdbARMPlugin/GdbARMPlugin.c M src/plugins/GdbARMv8Plugin/GdbARMv8Plugin.c M src/plugins/GeniePlugin/GeniePlugin.c M src/plugins/HostWindowPlugin/HostWindowPlugin.c M src/plugins/IA32ABI/IA32ABI.c M src/plugins/ImmX11Plugin/ImmX11Plugin.c M src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c M src/plugins/JPEGReaderPlugin/JPEGReaderPlugin.c M src/plugins/JoystickTabletPlugin/JoystickTabletPlugin.c M src/plugins/Klatt/Klatt.c M src/plugins/LargeIntegers/LargeIntegers.c M src/plugins/MD5Plugin/MD5Plugin.c M src/plugins/MIDIPlugin/MIDIPlugin.c M src/plugins/MacMenubarPlugin/MacMenubarPlugin.c M src/plugins/Matrix2x3Plugin/Matrix2x3Plugin.c M src/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c M src/plugins/Mpeg3Plugin/Mpeg3Plugin.c M src/plugins/QuicktimePlugin/QuicktimePlugin.c M src/plugins/RePlugin/RePlugin.c M src/plugins/SHA2Plugin/SHA2Plugin.c M src/plugins/ScratchPlugin/ScratchPlugin.c M src/plugins/SerialPlugin/SerialPlugin.c M src/plugins/SocketPlugin/SocketPlugin.c M src/plugins/SoundCodecPrims/SoundCodecPrims.c M src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c M src/plugins/SoundPlugin/SoundPlugin.c M src/plugins/Squeak3D/Squeak3D.c M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c M src/plugins/SqueakSSL/SqueakSSL.c M src/plugins/StarSqueakPlugin/StarSqueakPlugin.c M src/plugins/UUIDPlugin/UUIDPlugin.c M src/plugins/UnicodePlugin/UnicodePlugin.c M src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c M src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c M src/plugins/VMProfileMacSupportPlugin/VMProfileMacSupportPlugin.c M src/plugins/WeDoPlugin/WeDoPlugin.c M src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c M src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c M src/plugins/ZipPlugin/ZipPlugin.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2950 Fix huge horrible win32 Spur VM bug. Plugins must export accessor depths (via the EXPORT macro) otherwise the external primitive loading machinery will silently compute their accessor depths as -1 (no accessor depth), and so no primitives will be scanned for forwarders, and hence none will retry when given forwarders, breaking the while Spur transparent forwarding mechanism for primitives on win32. The bug showed up with the new CameraPlugin primSetCameraBuffers primitive which is given a newly becomed forwarder to a pinned bitmap. The primitive doesn't retry and hence always fails. From notifications at github.com Tue Apr 13 06:01:45 2021 From: notifications at github.com (Eliot Miranda) Date: Mon, 12 Apr 2021 23:01:45 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] primitiveSSLCreate fails sporadically on Windows (#554) In-Reply-To: References: Message-ID: Hi win32 folks, coincidentally I found a huge bug with external primitives on win32 Spur VMs. The bug was the VM code generator not using the EXPORT macro to export primitive accessor depths. This macro does nothing on unix & macos (hence I didn't notice the bug), but is required on win32. The transparent forwarding mechanism for primitives is broken by this bug. Hence any external primitive that needs to retry to follow a forwarder (e.g. after a pin operation or a become to grow something, etc) won't retry on win32. I fon't know if this will fix the SSL issue on win32. But it is certainly a smoking gun. The bug is fixed in my most recent commit. On Fri, Apr 9, 2021 at 12:45 AM Marcel Taeumel ***@***.***> wrote: > Well, I wouldn't immediately celebrate "Got it!" 😄 but yes, I can > reproduce this in Squeak 5.3 (64-bit) with the VM 202003021730. So, what > does this behavior tell us? At least, it is releated to some kind of memory > management. Renaming "Squeak.exe" to something else or using > "SqueakConsole.exe" or changing the VM to 202011120327 ... all options > still show that bug in that "broken" image. > > There is something wrong with module loading. Is there some interference > between Squeak's object memory and how modules are loaded? Maybe take a > look at how primitive 571 is implemented. (SmalltalkImage >> > #unloadModule:) > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . > -- _,,,^..^,,,_ best, Eliot -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/554#issuecomment-818462338 -------------- next part -------------- An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 13 06:06:27 2021 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 13 Apr 2021 06:06:27 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2424 Message-ID: <20210413060627.1.DFEF13615FC513A0@appveyor.com> An HTML attachment was scrubbed... URL: From notifications at github.com Tue Apr 13 06:35:42 2021 From: notifications at github.com (Tobias Pape) Date: Mon, 12 Apr 2021 23:35:42 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] primitiveSSLCreate fails sporadically on Windows (#554) In-Reply-To: References: Message-ID: Sounds reasonable! -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/554#issuecomment-818479399 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 13 20:44:55 2021 From: noreply at github.com (Eliot Miranda) Date: Tue, 13 Apr 2021 13:44:55 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] db6bf0: Implement the frame buffer interface for the win32... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: db6bf0a073da280322088d6ad7defdee60a95c89 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/db6bf0a073da280322088d6ad7defdee60a95c89 Author: Eliot Miranda Date: 2021-04-13 (Tue, 13 Apr 2021) Changed paths: M build.win64x64/common/Makefile.msvc.flags M platforms/win32/plugins/CameraPlugin/winCameraOps.cpp Log Message: ----------- Implement the frame buffer interface for the win32 CameraPlugin. Filter out some warnings from the win32 MSVC compile (CRT_SECURE). [ci ckip] From no-reply at appveyor.com Tue Apr 13 21:03:33 2021 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 13 Apr 2021 21:03:33 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2425 Message-ID: <20210413210333.1.BDD957D13C1A2ACC@appveyor.com> An HTML attachment was scrubbed... URL: From commits at source.squeak.org Wed Apr 14 01:11:38 2021 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 14 Apr 2021 01:11:38 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2951.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2951.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2951 Author: eem Time: 13 April 2021, 6:11:29.780025 pm UUID: 5ebb0375-9fe1-4133-b602-5f607dd20f3e Ancestors: VMMaker.oscog-eem.2950 All debug printing routines must use not to be accessible on win32. =============== Diff against VMMaker.oscog-eem.2950 =============== Item was changed: ----- Method: CoInterpreter>>printCogMethod: (in category 'debug printing') ----- printCogMethod: cogMethod + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | address primitive | self cCode: '' inSmalltalk: [self transcript ensureCr. cogMethod isInteger ifTrue: [^self printCogMethod: (self cCoerceSimple: cogMethod to: #'CogMethod *')]]. address := cogMethod asInteger. self printHex: address; print: ' <-> '; printHex: address + cogMethod blockSize. cogMethod cmType = CMMethod ifTrue: [self print: ': method: '; printHex: cogMethod methodObject. primitive := self primitiveIndexOfMethod: cogMethod methodObject header: cogMethod methodHeader. primitive ~= 0 ifTrue: [self print: ' prim '; printNum: primitive]. ((objectMemory addressCouldBeObj: cogMethod methodObject) and: [objectMemory addressCouldBeObj: (self methodClassOf: cogMethod methodObject)]) ifTrue: [self space; printNameOfClass: (self methodClassOf: cogMethod methodObject) count: 2]]. cogMethod cmType = CMBlock ifTrue: [self print: ': block home: '; printHex: (self cCoerceSimple: cogMethod to: #'CogBlockMethod *') cmHomeMethod asUnsignedInteger]. cogMethod cmType = CMClosedPIC ifTrue: [self print: ': Closed PIC N: '; printHex: cogMethod cPICNumCases]. cogMethod cmType = CMOpenPIC ifTrue: [self print: ': Open PIC ']. self print: ' selector: '; printHex: cogMethod selector. cogMethod selector = objectMemory nilObject ifTrue: [| s | (cogMethod cmType = CMMethod and: [(s := self maybeSelectorOfMethod: cogMethod methodObject) notNil]) ifTrue: [self print: ' (nil: '; printStringOf: s; print: ')'] ifFalse: [self print: ' (nil)']] ifFalse: [self space; printStringOf: cogMethod selector]. self cr! Item was changed: ----- Method: CoInterpreter>>printFrame:WithSP: (in category 'debug printing') ----- printFrame: theFP WithSP: theSP + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | theMethod theMethodEnd numArgs numTemps rcvrAddress topThing | self cCode: '' inSmalltalk: [self transcript ensureCr]. (stackPages couldBeFramePointer: theFP) ifNil: [self printHexPtr: theFP; print: ' is not in the stack zone?!!'; cr. ^nil]. (self isMachineCodeFrame: theFP) ifTrue: [| cogMethod homeMethod | cogMethod := self mframeCogMethod: theFP. homeMethod := self mframeHomeMethod: theFP. theMethod := homeMethod asInteger. theMethodEnd := homeMethod asInteger + homeMethod blockSize. numArgs := cogMethod cmNumArgs. numTemps := self temporaryCountOfMethodHeader: homeMethod methodHeader] ifFalse: [theMethod := self frameMethodObject: theFP. theMethodEnd := theMethod + (objectMemory sizeBitsOfSafe: theMethod). numArgs := self iframeNumArgs: theFP. numTemps := self tempCountOf: theMethod]. (self frameIsBlockActivation: theFP) ifTrue: [| rcvrOrClosure | "No BlockLocalTempCounter in the Cogit's C code, so quick hack is to use numCopied + numArgs" rcvrOrClosure := self pushedReceiverOrClosureOfFrame: theFP. ((objectMemory isNonImmediate: rcvrOrClosure) and: [(objectMemory addressCouldBeObj: rcvrOrClosure) and: [(objectMemory fetchClassOfNonImm: rcvrOrClosure) = (objectMemory splObj: ClassBlockClosure)]]) ifTrue: [numTemps := numArgs + (self stSizeOf: rcvrOrClosure)] ifFalse: [numTemps := numArgs]]. self shortPrintFrame: theFP. (self isBaseFrame: theFP) ifTrue: [self printFrameOop: '(caller ctxt' at: theFP + (self frameStackedReceiverOffset: theFP) + (2 * objectMemory wordSize). self printFrameOop: '(saved ctxt' at: theFP + (self frameStackedReceiverOffset: theFP) + (1 * objectMemory wordSize)]. self printFrameOop: 'rcvr/clsr' at: theFP + FoxCallerSavedIP + ((numArgs + 1) * objectMemory wordSize). numArgs to: 1 by: -1 do: [:i| self printFrameOop: 'arg' index: numArgs - i at: theFP + FoxCallerSavedIP + (i * objectMemory wordSize)]. self printFrameThing: 'caller ip' at: theFP + FoxCallerSavedIP extraString: ((stackPages longAt: theFP + FoxCallerSavedIP) = cogit ceReturnToInterpreterPC ifTrue: ['ceReturnToInterpreter']). self printFrameThing: 'saved fp' at: theFP + FoxSavedFP. self printFrameMethodFor: theFP. (self isMachineCodeFrame: theFP) ifTrue: [self printFrameFlagsForFP: theFP]. self printFrameOop: 'context' at: theFP + FoxThisContext. (self isMachineCodeFrame: theFP) ifFalse: [self printFrameFlagsForFP: theFP]. (self isMachineCodeFrame: theFP) ifTrue: [rcvrAddress := theFP + FoxMFReceiver] ifFalse: [self printFrameThing: 'saved ip' at: theFP + FoxIFSavedIP extra: ((self iframeSavedIP: theFP) = 0 ifTrue: [0] ifFalse: [(self iframeSavedIP: theFP) - theMethod + 2 - objectMemory baseHeaderSize]). rcvrAddress := theFP + FoxIFReceiver]. self printFrameOop: 'receiver' at: rcvrAddress. topThing := stackPages longAt: theSP. (self oop: topThing isGreaterThanOrEqualTo: theMethod andLessThan: theMethodEnd) ifTrue: [rcvrAddress - objectMemory wordSize to: theSP + objectMemory wordSize by: objectMemory wordSize negated do: [:addr| | index | index := rcvrAddress - addr / objectMemory wordSize + numArgs. index <= numTemps ifTrue: [self printFrameOop: 'temp' index: index - 1 at: addr] ifFalse: [self printFrameOop: ((self frameIsBlockActivation: theFP) ifTrue: ['temp/stck'] ifFalse: ['stck']) at: addr]]. self printFrameThing: 'frame ip' at: theSP extra: ((self isMachineCodeFrame: theFP) ifTrue: [topThing - theMethod] ifFalse: [topThing - theMethod + 2 - objectMemory baseHeaderSize])] ifFalse: [rcvrAddress - objectMemory wordSize to: theSP by: objectMemory wordSize negated do: [:addr| | index | index := rcvrAddress - addr / objectMemory wordSize + numArgs. index <= numTemps ifTrue: [self printFrameOop: 'temp' index: index - 1 at: addr] ifFalse: [self printFrameOop: ((self frameIsBlockActivation: theFP) ifTrue: ['temp/stck'] ifFalse: ['stck']) at: addr]]]! Item was changed: ----- Method: CoInterpreter>>printMethodCacheFor: (in category 'debug printing') ----- printMethodCacheFor: thing + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | n | n := 0. 0 to: MethodCacheSize - 1 by: MethodCacheEntrySize do: [:i | | s c m p | s := methodCache at: i + MethodCacheSelector. c := methodCache at: i + MethodCacheClass. m := methodCache at: i + MethodCacheMethod. p := methodCache at: i + MethodCachePrimFunction. ((thing = -1 or: [s = thing or: [c = thing or: [p = thing or: [m = thing or: [(objectMemory addressCouldBeObj: m) and: [(self maybeMethodHasCogMethod: m) and: [(self cogMethodOf: m) asInteger = thing]]]]]]]) and: [(objectMemory addressCouldBeOop: s) and: [c ~= 0 and: [(self addressCouldBeClassObj: c) or: [self addressCouldBeClassObj: (objectMemory classForClassTag: c)]]]]) ifTrue: [n := n + 1. self cCode: [] inSmalltalk: [self transcript ensureCr]. self printNum: i; space; printHexnp: i; cr; tab. (objectMemory isBytesNonImm: s) ifTrue: [self cCode: 'printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s))' inSmalltalk: [self printHex: s; space; print: (self stringOf: s); cr]] ifFalse: [self shortPrintOop: s]. self tab. (self addressCouldBeClassObj: c) ifTrue: [self shortPrintOop: c] ifFalse: [self printNum: c; space; printHexnp: c; space; shortPrintOop: (objectMemory classForClassTag: c)]. self tab; shortPrintOop: m; tab. self cCode: [p > 1024 ifTrue: [self printHexnp: p] ifFalse: [self printNum: p]] inSmalltalk: [p isSymbol ifTrue: [self print: p] ifFalse: [self printNum: p]]. self cr]]. n > 1 ifTrue: [self printNum: n; cr]! Item was changed: ----- Method: CogMethodZone>>whereIsMaybeCodeThing: (in category 'debug printing') ----- whereIsMaybeCodeThing: anOop + "useful for VM debugging; use export: not api, so it will be accessible on win32" + - - (self oop: anOop isGreaterThanOrEqualTo: cogit cogCodeBase andLessThan: limitAddress) ifTrue: [(self oop: anOop isLessThan: cogit minCogMethodAddress) ifTrue: [^' is in generated runtime']. (self oop: anOop isLessThan: mzFreeStart) ifTrue: [^' is in generated methods']. (self oop: anOop isLessThan: youngReferrers) ifTrue: [^' is in code zone']. ^' is in young referrers']. ^nil! Item was changed: ----- Method: NewObjectMemory>>longPrintReferencesTo: (in category 'debug printing') ----- longPrintReferencesTo: anOop "Scan the heap long printing the oops of any and all objects that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | oop i prntObj | - prntObj := false. oop := self firstAccessibleObject. [oop = nil] whileFalse: [((self isPointersNonImm: oop) or: [self isCompiledMethod: oop]) ifTrue: [(self isCompiledMethod: oop) ifTrue: [i := (self literalCountOf: oop) + LiteralStart] ifFalse: [(self isContextNonImm: oop) ifTrue: [i := CtxtTempFrameStart + (coInterpreter fetchStackPointerOf: oop)] ifFalse: [i := self lengthOf: oop]]. [(i := i - 1) >= 0] whileTrue: [anOop = (self fetchPointer: i ofObject: oop) ifTrue: [self printHex: oop; print: ' @ '; printNum: i; cr. prntObj := true. i := 0]]. prntObj ifTrue: [prntObj := false. coInterpreter longPrintOop: oop]]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: NewObjectMemory>>printActivationsOf: (in category 'debug printing') ----- printActivationsOf: aMethodObj "Scan the heap printing the oops of any and all contexts that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | oop | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [((self isContextNonImm: oop) and: [aMethodObj = (self fetchPointer: MethodIndex ofObject: oop)]) ifTrue: [coInterpreter printHex: oop; space; printOopShort: oop; print: ' pc '; printHex: (self fetchPointer: InstructionPointerIndex ofObject: oop); cr]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: NewObjectMemory>>printContextReferencesTo: (in category 'debug printing') ----- printContextReferencesTo: anOop "Scan the heap printing the oops of any and all contexts that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | oop i | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [(self isContextNonImm: oop) ifTrue: [i := CtxtTempFrameStart + (coInterpreter fetchStackPointerOf: oop)]. [(i := i - 1) >= 0] whileTrue: [anOop = (self fetchPointer: i ofObject: oop) ifTrue: [coInterpreter printHex: oop; print: ' @ '; printNum: i; space; printOopShort: oop; print: ' pc '; printHex: (self fetchPointer: InstructionPointerIndex ofObject: oop); cr. i := 0]]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: NewObjectMemory>>printObjectsFrom:to: (in category 'debug printing') ----- printObjectsFrom: startAddress to: endAddress + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | oop | oop := startAddress. [self oop: oop isLessThan: endAddress] whileTrue: [(self isFreeObject: oop) ifFalse: [coInterpreter printOop: oop]. oop := self objectAfter: oop].! Item was changed: ----- Method: NewObjectMemory>>printReferencesTo: (in category 'debug printing') ----- printReferencesTo: anOop "Scan the heap printing the oops of any and all objects that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | oop i | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [((self isPointersNonImm: oop) or: [self isCompiledMethod: oop]) ifTrue: [(self isCompiledMethod: oop) ifTrue: [i := (self literalCountOf: oop) + LiteralStart] ifFalse: [(self isContextNonImm: oop) ifTrue: [i := CtxtTempFrameStart + (coInterpreter fetchStackPointerOf: oop)] ifFalse: [i := self lengthOf: oop]]. [(i := i - 1) >= 0] whileTrue: [anOop = (self fetchPointer: i ofObject: oop) ifTrue: [coInterpreter printHex: oop; print: ' @ '; printNum: i; space; printOopShort: oop; cr. i := 0]]]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: NewObjectMemory>>printWronglySizedContexts: (in category 'debug printing') ----- printWronglySizedContexts: printContexts "Scan the heap printing the oops of any and all contexts whose size is not either SmallContextSize or LargeContextSize" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | oop | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [((self isContextNonImm: oop) and: [self badContextSize: oop]) ifTrue: [self printHex: oop; space; printNum: (self numBytesOf: oop); cr. printContexts ifTrue: [coInterpreter printContext: oop]]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: ObjectMemory>>longPrintInstancesOf: (in category 'debug printing') ----- longPrintInstancesOf: aClassOop "Scan the heap printing the oops of any and all objects that are instances of aClassOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32" | oop | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [(self fetchClassOfNonImm: oop) = aClassOop ifTrue: [self longPrintOop: oop; cr]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: ObjectMemory>>printActivationsOf: (in category 'debug printing') ----- printActivationsOf: aMethodObj "Scan the heap printing the oops of any and all contexts that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32" | oop | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [((self isContextNonImm: oop) and: [aMethodObj = (self fetchPointer: MethodIndex ofObject: oop)]) ifTrue: [self interpreter printHex: oop; space; printOopShort: oop; print: ' pc '; printHex: (self fetchPointer: InstructionPointerIndex ofObject: oop); cr]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: ObjectMemory>>printContextReferencesTo: (in category 'debug printing') ----- printContextReferencesTo: anOop "Scan the heap printing the oops of any and all contexts that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32" | oop i | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [(self isContextNonImm: oop) ifTrue: [i := CtxtTempFrameStart + (self fetchStackPointerOf: oop)]. [(i := i - 1) >= 0] whileTrue: [anOop = (self fetchPointer: i ofObject: oop) ifTrue: [self interpreter printHex: oop; print: ' @ '; printNum: i; space; printOopShort: oop; cr. i := 0]]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: ObjectMemory>>printInstancesOf: (in category 'debug printing') ----- printInstancesOf: aClassOop "Scan the heap printing the oops of any and all objects that are instances of aClassOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32" | oop | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [(self fetchClassOfNonImm: oop) = aClassOop ifTrue: [self printHex: oop; cr]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: ObjectMemory>>printMethodImplementorsOf: (in category 'debug printing') ----- printMethodImplementorsOf: anOop "Scan the heap printing the oops of any and all methods that implement anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32" - | obj | obj := self firstAccessibleObject. [obj = nil] whileFalse: [((self isCompiledMethod: obj) and: [(self maybeSelectorOfMethod: obj) = anOop]) ifTrue: [self printHex: obj; space; printOopShort: obj; cr]]! Item was changed: ----- Method: ObjectMemory>>printMethodReferencesTo: (in category 'debug printing') ----- printMethodReferencesTo: anOop "Scan the heap printing the oops of any and all objects that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32" | oop i | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [(self isCompiledMethod: oop) ifTrue: [i := (self literalCountOf: oop) + LiteralStart - 1. [i >= 0] whileTrue: [anOop = (self fetchPointer: i ofObject: oop) ifTrue: [self printHex: oop; print: ' @ '; printNum: i; cr. i := 0]. i := i - 1]]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: ObjectMemory>>printReferencesTo: (in category 'debug printing') ----- printReferencesTo: anOop "Scan the heap printing the oops of any and all objects that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32" | oop i | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [((self isPointersNonImm: oop) or: [self isCompiledMethod: oop]) ifTrue: [(self isCompiledMethod: oop) ifTrue: [i := (self literalCountOf: oop) + LiteralStart] ifFalse: [(self isContextNonImm: oop) ifTrue: [i := CtxtTempFrameStart + (self fetchStackPointerOf: oop)] ifFalse: [i := self lengthOf: oop]]. [(i := i - 1) >= 0] whileTrue: [anOop = (self fetchPointer: i ofObject: oop) ifTrue: [self interpreter printHex: oop; print: ' @ '; printNum: i; space; printOopShort: oop; cr. i := 0]]]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: ObjectMemory>>printWronglySizedContexts (in category 'debug printing') ----- printWronglySizedContexts "Scan the heap printing the oops of any and all contexts whose size is not either SmallContextSize or LargeContextSize" + "useful for VM debugging; use export: not api, so it will be accessible on win32" | oop | - oop := self firstAccessibleObject. [oop = nil] whileFalse: [((self isContextNonImm: oop) and: [self badContextSize: oop]) ifTrue: [self printHex: oop; space; printNum: (self numBytesOf: oop); cr]. oop := self accessibleObjectAfter: oop]! Item was changed: ----- Method: SpurMemoryManager>>inOrderPrintFreeTree:printList: (in category 'debug printing') ----- inOrderPrintFreeTree: freeChunk printList: printNextList "print free chunks in freeTree in order." + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | next | (next := self fetchPointer: self freeChunkSmallerIndex ofFreeChunk: freeChunk) ~= 0 ifTrue: [self inOrderPrintFreeTree: next printList: printNextList]. self printFreeChunk: freeChunk printAsTreeNode: true. printNextList ifTrue: [next := freeChunk. [(next := self fetchPointer: self freeChunkNextIndex ofFreeChunk: next) ~= 0] whileTrue: [coInterpreter tab. self printFreeChunk: next printAsTreeNode: false]]. (next := self fetchPointer: self freeChunkLargerIndex ofFreeChunk: freeChunk) ~= 0 ifTrue: [self inOrderPrintFreeTree: next printList: printNextList]! Item was changed: ----- Method: SpurMemoryManager>>longPrintInstancesOf: (in category 'debug printing') ----- longPrintInstancesOf: aClassOop "Scan the heap printing the oops of any and all objects that are instances of aClassOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | classIndex | classIndex := self rawHashBitsOf: aClassOop. classIndex ~= self isFreeObjectClassIndexPun ifTrue: [self longPrintInstancesWithClassIndex: classIndex]! Item was changed: ----- Method: SpurMemoryManager>>longPrintInstancesWithClassIndex: (in category 'debug printing') ----- longPrintInstancesWithClassIndex: classIndex "Scan the heap printing any and all objects whose classIndex equals the argument." + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self allHeapEntitiesDo: [:obj| (self classIndexOf: obj) = classIndex ifTrue: [coInterpreter longPrintOop: obj; cr]]! Item was changed: ----- Method: SpurMemoryManager>>longPrintReferencesTo: (in category 'debug printing') ----- longPrintReferencesTo: anOop "Scan the heap long printing the oops of any and all objects that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | prntObj | - prntObj := false. self allObjectsDo: [:obj| | i | ((self isPointersNonImm: obj) or: [self isCompiledMethod: obj]) ifTrue: [(self isCompiledMethod: obj) ifTrue: [i := (self literalCountOf: obj) + LiteralStart] ifFalse: [(self isContextNonImm: obj) ifTrue: [i := CtxtTempFrameStart + (coInterpreter fetchStackPointerOf: obj)] ifFalse: [i := self numSlotsOf: obj]]. [(i := i - 1) >= 0] whileTrue: [anOop = (self fetchPointer: i ofObject: obj) ifTrue: [coInterpreter printHex: obj; print: ' @ '; printNum: i; cr. prntObj := true. i := 0]]. prntObj ifTrue: [prntObj := false. coInterpreter longPrintOop: obj]]]! Item was changed: ----- Method: SpurMemoryManager>>printActivationsOf: (in category 'debug printing') ----- printActivationsOf: aMethodObj "Scan the heap printing the oops of any and all contexts that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self allObjectsDo: [:obj| ((self isContextNonImm: obj) and: [aMethodObj = (self fetchPointer: MethodIndex ofObject: obj)]) ifTrue: [coInterpreter printHex: obj; space; printOopShort: obj; print: ' pc '; printHex: (self fetchPointer: InstructionPointerIndex ofObject: obj); cr]]! Item was changed: ----- Method: SpurMemoryManager>>printBogons (in category 'debug printing') ----- printBogons + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - compactor printTheBogons: bogon! Item was changed: ----- Method: SpurMemoryManager>>printContextReferencesTo: (in category 'debug printing') ----- printContextReferencesTo: anOop "Scan the heap printing the oops of any and all contexts that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self allObjectsDo: [:obj| | i | (self isContextNonImm: obj) ifTrue: [i := CtxtTempFrameStart + (coInterpreter fetchStackPointerOf: obj). [(i := i - 1) >= 0] whileTrue: [anOop = (self fetchPointer: i ofObject: obj) ifTrue: [coInterpreter printHex: obj; print: ' @ '; printNum: i; space; printOopShort: obj; print: ' pc '; printHex: (self fetchPointer: InstructionPointerIndex ofObject: obj); cr. i := 0]]]]! Item was changed: ----- Method: SpurMemoryManager>>printEntity: (in category 'debug printing') ----- printEntity: oop + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | printFlags | printFlags := false. coInterpreter printHex: oop; space. (self addressCouldBeObj: oop) ifFalse: [^coInterpreter print: ((self isImmediate: oop) ifTrue: ['immediate'] ifFalse: ['unknown'])]. coInterpreter print: ((self isFreeObject: oop) ifTrue: ['free'] ifFalse: [(self isSegmentBridge: oop) ifTrue: ['bridge'] ifFalse: [(self isForwarded: oop) ifTrue: ['forwarder'] ifFalse: [(self classIndexOf: oop) <= self lastClassIndexPun ifTrue: [printFlags := true. 'pun/obj stack'] ifFalse: [printFlags := true. 'object']]]]); space; printHexnpnp: (self rawNumSlotsOf: oop); print: '/'; printHexnpnp: (self bytesInObject: oop); print: '/'; printNum: (self bytesInObject: oop). printFlags ifTrue: [coInterpreter space; print: ((self formatOf: oop) <= 16rF ifTrue: ['f:0'] ifFalse: ['f:']); printHexnpnp: (self formatOf: oop); print: ((self isGrey: oop) ifTrue: [' g'] ifFalse: [' .']); print: ((self isImmutable: oop) ifTrue: ['i'] ifFalse: ['.']); print: ((self isMarked: oop) ifTrue: ['m'] ifFalse: ['.']); print: ((self isPinned: oop) ifTrue: ['p'] ifFalse: ['.']); print: ((self isRemembered: oop) ifTrue: ['r'] ifFalse: ['.'])]. coInterpreter cr! Item was changed: ----- Method: SpurMemoryManager>>printForwarders (in category 'debug printing') ----- printForwarders + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self allHeapEntitiesDo: [:objOop| (self isUnambiguouslyForwarder: objOop) ifTrue: [coInterpreter printHex: objOop; cr]]! Item was changed: ----- Method: SpurMemoryManager>>printFreeChunk: (in category 'debug printing') ----- printFreeChunk: freeChunk + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self printFreeChunk: freeChunk printAsTreeNode: true! Item was changed: ----- Method: SpurMemoryManager>>printFreeList: (in category 'debug printing') ----- printFreeList: chunkOrIndex + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | freeChunk | (chunkOrIndex >= 0 and: [chunkOrIndex < self numFreeLists]) ifTrue: [^self printFreeList: (freeLists at: chunkOrIndex)]. freeChunk := chunkOrIndex. [freeChunk ~= 0] whileTrue: [self printFreeChunk: freeChunk. freeChunk := self fetchPointer: self freeChunkNextIndex ofFreeChunk: freeChunk]! Item was changed: ----- Method: SpurMemoryManager>>printFreeListHeads (in category 'debug printing') ----- printFreeListHeads + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | expectedMask | expectedMask := 0. 0 to: self numFreeLists - 1 do: [:i| coInterpreter printHex: (freeLists at: i). (freeLists at: i) ~= 0 ifTrue: [expectedMask := expectedMask + (1 << i)]. i + 1 \\ (32 >> self logBytesPerOop) = 0 ifTrue: [coInterpreter cr] ifFalse: [coInterpreter print: ' ']]. coInterpreter cr; print: 'mask: '; printHexnp: freeListsMask; print: ' expected: '; printHexnp: expectedMask; cr! Item was changed: ----- Method: SpurMemoryManager>>printFreeTree (in category 'debug printing') ----- printFreeTree + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self printFreeTreeChunk: (freeLists at: 0)! Item was changed: ----- Method: SpurMemoryManager>>printHeaderOf: (in category 'debug printing') ----- printHeaderOf: objOop + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - "N.B. No safety bounds checks!!!! We need to look e.g. at corpses." coInterpreter printHexnp: objOop. (self numSlotsOfAny: objOop) >= self numSlotsMask ifTrue: [coInterpreter print: ' hdr16 slotf '; printHexnp: (self numSlotsOfAny: objOop - self allocationUnit); print: ' slotc '; printHexnp: (self rawOverflowSlotsOf: objOop); space] ifFalse: [coInterpreter print: ' hdr8 slots '; printHexnp: (self numSlotsOfAny: objOop)]. coInterpreter space; printChar: ((self isMarked: objOop) ifTrue: [$M] ifFalse: [$m]); printChar: ((self isGrey: objOop) ifTrue: [$G] ifFalse: [$g]); printChar: ((self isPinned: objOop) ifTrue: [$P] ifFalse: [$p]); printChar: ((self isRemembered: objOop) ifTrue: [$R] ifFalse: [$r]); printChar: ((self isImmutable: objOop) ifTrue: [$I] ifFalse: [$i]); print: ' hash '; printHexnp: (self rawHashBitsOf: objOop); print: ' fmt '; printHexnp: (self formatOf: objOop); print: ' cidx '; printHexnp: (self classIndexOf: objOop); cr! Item was changed: ----- Method: SpurMemoryManager>>printInstancesOf: (in category 'debug printing') ----- printInstancesOf: aClassOop "Scan the heap printing the oops of any and all objects that are instances of aClassOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | classIndex | classIndex := self rawHashBitsOf: aClassOop. classIndex ~= self isFreeObjectClassIndexPun ifTrue: [self printInstancesWithClassIndex: classIndex]! Item was changed: ----- Method: SpurMemoryManager>>printInstancesWithClassIndex: (in category 'debug printing') ----- printInstancesWithClassIndex: classIndex "Scan the heap printing the oops of any and all objects whose classIndex equals the argument." + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self allHeapEntitiesDo: [:obj| (self classIndexOf: obj) = classIndex ifTrue: [coInterpreter printHex: obj; cr]]! Item was changed: ----- Method: SpurMemoryManager>>printMarkedOops (in category 'debug printing') ----- printMarkedOops + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self printOopsSuchThat: #isMarked! Item was changed: ----- Method: SpurMemoryManager>>printMethodImplementorsOf: (in category 'debug printing') ----- printMethodImplementorsOf: anOop "Scan the heap printing the oops of any and all methods that implement anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self allObjectsDo: [:obj| ((self isCompiledMethod: obj) and: [(coInterpreter maybeSelectorOfMethod: obj) = anOop]) ifTrue: [coInterpreter printHex: obj; space; printOopShort: obj; cr]]! Item was changed: ----- Method: SpurMemoryManager>>printMethodReferencesTo: (in category 'debug printing') ----- printMethodReferencesTo: anOop "Scan the heap printing the oops of any and all methods that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self allObjectsDo: [:obj| | i | (self isCompiledMethod: obj) ifTrue: [i := (self literalCountOf: obj) + LiteralStart - 1. [(i := i - 1) >= 0] whileTrue: [anOop = (self fetchPointer: i ofObject: obj) ifTrue: [coInterpreter printHex: obj; print: ' @ '; printNum: i; space; printOopShort: obj; cr. i := 0]]]]! Item was changed: ----- Method: SpurMemoryManager>>printObjectsFrom:to: (in category 'debug printing') ----- printObjectsFrom: startAddress to: endAddress + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | oop | oop := self objectBefore: startAddress. oop := oop ifNil: [startAddress] ifNotNil: [(self objectAfter: oop) = startAddress ifTrue: [startAddress] ifFalse: [oop]]. [self oop: oop isLessThan: endAddress] whileTrue: [((self isFreeObject: oop) or: [self isSegmentBridge: oop]) ifFalse: [coInterpreter printOop: oop]. oop := self objectAfter: oop]! Item was changed: ----- Method: SpurMemoryManager>>printObjectsWithHash: (in category 'debug printing') ----- printObjectsWithHash: hash "Scan the heap printing the oops of any and all objects whose hash equals the argument." + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self allHeapEntitiesDo: [:obj| (self rawHashBitsOf: obj) = hash ifTrue: [coInterpreter shortPrintOop: obj; cr]]! Item was changed: ----- Method: SpurMemoryManager>>printOopsExcept: (in category 'debug printing') ----- printOopsExcept: function + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | n | n := 0. self allHeapEntitiesDo: [:o| (self perform: function with: o) ifFalse: [n := n + 1. self printEntity: o]]. n > 4 ifTrue: "rabbits" [self printNum: n; print: ' objects'; cr]! Item was changed: ----- Method: SpurMemoryManager>>printOopsFrom:to: (in category 'debug printing') ----- printOopsFrom: startAddress to: endAddress + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | oop limit firstNonEntity inEmptySpace lastNonEntity | oop := self objectBefore: startAddress. limit := endAddress asUnsignedIntegerPtr min: endOfMemory. oop := oop ifNil: [startAddress] ifNotNil: [(self objectAfter: oop) = startAddress ifTrue: [startAddress] ifFalse: [oop]]. inEmptySpace := false. [self oop: oop isLessThan: limit] whileTrue: [self printEntity: oop. [oop := self objectAfter: oop. (self long64At: oop) = 0] whileTrue: [inEmptySpace ifFalse: [inEmptySpace := true. firstNonEntity := oop]. lastNonEntity := oop]. inEmptySpace ifTrue: [inEmptySpace := false. coInterpreter print: 'skipped empty space from '; printHexPtrnp: firstNonEntity; print:' to '; printHexPtrnp: lastNonEntity; cr. oop := self objectStartingAt: oop]]! Item was changed: ----- Method: SpurMemoryManager>>printOopsSuchThat: (in category 'debug printing') ----- printOopsSuchThat: function + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | n | n := 0. self allHeapEntitiesDo: [:o| (self perform: function with: o) ifTrue: [n := n + 1. self printEntity: o]]. n > 4 ifTrue: "rabbits" [self printNum: n; print: ' objects'; cr]! Item was changed: ----- Method: SpurMemoryManager>>printReferencesTo: (in category 'debug printing') ----- printReferencesTo: anOop "Scan the heap printing the oops of any and all objects that refer to anOop" + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self allObjectsDo: [:obj| | i | i := self numPointerSlotsOf: obj. [(i := i - 1) >= 0] whileTrue: [anOop = (self fetchPointer: i ofMaybeForwardedObject: obj) ifTrue: [coInterpreter printHex: obj; print: ' @ '; printNum: i; space; printOopShort: obj; cr. i := 0]]]! Item was changed: ----- Method: SpurMemoryManager>>printUnmarkedOops (in category 'debug printing') ----- printUnmarkedOops + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self printOopsExcept: #isMarked! Item was changed: ----- Method: SpurMemoryManager>>shortPrintObjectsFrom:to: (in category 'debug printing') ----- shortPrintObjectsFrom: startAddress to: endAddress + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | oop | oop := self objectBefore: startAddress. oop := oop ifNil: [startAddress] ifNotNil: [(self objectAfter: oop) = startAddress ifTrue: [startAddress] ifFalse: [oop]]. [self oop: oop isLessThan: endAddress] whileTrue: [(self isFreeObject: oop) ifFalse: [coInterpreter shortPrintOop: oop]. oop := self objectAfter: oop]! Item was changed: ----- Method: StackInterpreter class>>requiredMethodNames: (in category 'translation') ----- requiredMethodNames: options "Answer the list of method names that should be retained for export or other support reasons" | requiredList | "A number of methods required by VM support code, specific platforms, etc" requiredList := #( assertValidExecutionPointe:r:s: characterForAscii: findClassOfMethod:forReceiver: findSelectorOfMethod: forceInterruptCheck forceInterruptCheckFromHeartbeat fullDisplayUpdate getCurrentBytecode getFullScreenFlag getInterruptKeycode getInterruptPending getSavedWindowSize getThisSessionID interpret loadInitialContext primitiveFail primitiveFailFor: primitiveFlushExternalPrimitives printAllStacks printCallStack printContext: + printExternalHeadFrame printFramesInPage: printFrame: printMemory printOop: - printExternalHeadFrame printFramesInPage: printFrame: printHeadFrame printMemory printOop: printStackPages printStackPageList printStackPagesInUse printStackPageListInUse readImageFromFile:HeapSize:StartingAt: setFullScreenFlag: setInterruptKeycode: setInterruptPending: setInterruptCheckChain: setSavedWindowSize: success: validInstructionPointer:inMethod:framePointer:) asSet. "Nice to actually have all the primitives available" requiredList addAll: (self primitiveTable select: [:each| each isSymbol]). "InterpreterProxy is the internal analogue of sqVirtualMachine.c, so make sure to keep all those" InterpreterProxy organization categories do: [:cat | ((cat ~= 'initialize') and: [cat ~= 'private']) ifTrue: [requiredList addAll: (InterpreterProxy organization listAtCategoryNamed: cat)]]. ^requiredList! Item was changed: ----- Method: StackInterpreter>>activeProcess (in category 'process primitive support') ----- activeProcess "Answer the current activeProcess." + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - "useful for VM debugging" ^objectMemory fetchPointer: ActiveProcessIndex ofObject: self schedulerPointer! Item was changed: ----- Method: StackInterpreter>>checkAllAccessibleObjectsOkay (in category 'debug support') ----- checkAllAccessibleObjectsOkay "Ensure that all accessible objects in the heap are okay." + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | ok | ok := true. objectMemory allObjectsDoSafely: [:oop| ok := ok & (self checkOkayFields: oop)]. ^ok! Item was changed: ----- Method: StackInterpreter>>checkOkayInterpreterObjects: (in category 'debug support') ----- checkOkayInterpreterObjects: writeBack + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | ok oopOrZero oop | ok := true. ok := ok & (self checkOkayFields: objectMemory nilObject). ok := ok & (self checkOkayFields: objectMemory falseObject). ok := ok & (self checkOkayFields: objectMemory trueObject). ok := ok & (self checkOkayFields: objectMemory specialObjectsOop). ok := ok & (self checkOkayFields: messageSelector). ok := ok & (self checkOkayFields: newMethod). ok := ok & (self checkOkayFields: lkupClass). 0 to: MethodCacheEntries - 1 by: MethodCacheEntrySize do: [ :i | oopOrZero := methodCache at: i + MethodCacheSelector. oopOrZero = 0 ifFalse: [ok := ok & (self checkOkayFields: (methodCache at: i + MethodCacheSelector)). objectMemory hasSpurMemoryManagerAPI ifFalse: [ok := ok & (self checkOkayFields: (methodCache at: i + MethodCacheClass))]. ok := ok & (self checkOkayFields: (methodCache at: i + MethodCacheMethod))]]. 1 to: objectMemory remapBufferCount do: [ :i | oop := objectMemory remapBuffer at: i. (objectMemory isImmediate: oop) ifFalse: [ok := ok & (self checkOkayFields: oop)]]. ok := ok & (self checkOkayStackZone: writeBack). ^ok! Item was changed: ----- Method: StackInterpreter>>longPrintOop: (in category 'debug printing') ----- longPrintOop: oop + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | fmt lastIndex startIP bytecodesPerLine column | ((objectMemory isImmediate: oop) or: [(objectMemory addressCouldBeObj: oop) not or: [(oop bitAnd: objectMemory allocationUnit - 1) ~= 0 or: [(objectMemory isFreeObject: oop) or: [objectMemory isForwarded: oop]]]]) ifTrue: [self printOop: oop. ^self]. self printHex: oop. (objectMemory fetchClassOfNonImm: oop) ifNil: [self print: ' has a nil class!!!!'] ifNotNil: [:class| self print: ': a(n) '; printNameOfClass: class count: 5; print: ' ('. objectMemory hasSpurMemoryManagerAPI ifTrue: [self printHexnp: (objectMemory compactClassIndexOf: oop); print: '=>']. self printHexnp: class; print: ')']. fmt := objectMemory formatOf: oop. self print: ' format '; printHexnp: fmt. fmt > objectMemory lastPointerFormat ifTrue: [self print: ' nbytes '; printNum: (objectMemory numBytesOf: oop)] ifFalse: [(objectMemory isIndexableFormat: fmt) ifTrue: [| len | len := objectMemory lengthOf: oop. self print: ' size '; printNum: len - (objectMemory fixedFieldsOf: oop format: fmt length: len)]]. objectMemory printHeaderTypeOf: oop. self print: ' hash '; printHexnp: (objectMemory rawHashBitsOf: oop). self cr. (fmt between: objectMemory firstByteFormat and: objectMemory firstCompiledMethodFormat - 1) ifTrue: [^self printStringOf: oop; cr]. (fmt between: objectMemory firstLongFormat and: objectMemory firstByteFormat - 1) ifTrue: [0 to: ((objectMemory num32BitUnitsOf: oop) min: 256) - 1 do: [:i| | field32 | field32 := objectMemory fetchLong32: i ofObject: oop. self space; printNum: i; space; printHex: field32; space; cr]. ^self]. objectMemory hasSpurMemoryManagerAPI ifTrue: [fmt = objectMemory sixtyFourBitIndexableFormat ifTrue: [0 to: ((objectMemory num64BitUnitsOf: oop) min: 256) - 1 do: [:i| | field64 | field64 := objectMemory fetchLong64: i ofObject: oop. self space; printNum: i; space; printHex: field64; space; cr]. ^self]. (fmt between: objectMemory firstShortFormat and: objectMemory firstShortFormat + 1) ifTrue: [0 to: ((objectMemory num16BitUnitsOf: oop) min: 256) - 1 do: [:i| | field16 | field16 := objectMemory fetchShort16: i ofObject: oop. self space; printNum: i; space; printHex: field16; space; cr]. ^self]]. "this is nonsense. apologies." startIP := (objectMemory lastPointerOf: oop) + objectMemory bytesPerOop - objectMemory baseHeaderSize / objectMemory bytesPerOop. lastIndex := 256 min: startIP. lastIndex > 0 ifTrue: [1 to: lastIndex do: [:i| | fieldOop | fieldOop := objectMemory fetchPointer: i - 1 ofObject: oop. self space; printNum: i - 1; space; printHex: fieldOop; space. (i = 1 and: [objectMemory isCompiledMethod: oop]) ifTrue: [self printMethodHeaderOop: fieldOop] ifFalse: [self cCode: [self printOopShort: fieldOop] inSmalltalk: [self print: (self shortPrint: fieldOop)]]. self cr]]. (objectMemory isCompiledMethod: oop) ifFalse: [startIP > lastIndex ifTrue: [self print: '...'; cr]] ifTrue: [startIP := startIP * objectMemory wordSize + 1. lastIndex := objectMemory lengthOf: oop. lastIndex - startIP > 100 ifTrue: [lastIndex := startIP + 100]. bytecodesPerLine := 8. column := 1. startIP to: lastIndex do: [:index| | byte | column = 1 ifTrue: [self cCode: 'printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1))' inSmalltalk: [self print: (oop+objectMemory baseHeaderSize+index-1) hex; print: ': ']]. byte := objectMemory fetchByte: index - 1 ofObject: oop. self cCode: 'printf(" %02x/%-3d", (int)byte,(int)byte)' inSmalltalk: [self space; print: (byte radix: 16); printChar: $/; printNum: byte]. column := column + 1. column > bytecodesPerLine ifTrue: [column := 1. self cr]]. column = 1 ifFalse: [self cr]]! Item was changed: ----- Method: StackInterpreter>>printAllStacks (in category 'debug printing') ----- printAllStacks "Print all the stacks of all running processes, including those that are currently suspended." + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | proc semaphoreClass mutexClass schedLists p processList | proc := self activeProcess. self printNameOfClass: (objectMemory fetchClassOf: proc) count: 5; space; printHex: proc. self print: ' priority '; printNum: (self quickFetchInteger: PriorityIndex ofObject: proc); cr. self printCallStackFP: framePointer. "first the current activation" schedLists := objectMemory fetchPointer: ProcessListsIndex ofObject: self schedulerPointer. "then the runnable processes" p := highestRunnableProcessPriority = 0 ifTrue: [objectMemory numSlotsOf: schedLists] ifFalse: [highestRunnableProcessPriority]. p - 1 to: 0 by: -1 do: [:pri| processList := objectMemory fetchPointer: pri ofObject: schedLists. (self isEmptyList: processList) ifFalse: [self cr; print: 'processes at priority '; printNum: pri + 1. self printProcsOnList: processList]]. self cr; print: 'suspended processes'. semaphoreClass := objectMemory classSemaphore. mutexClass := objectMemory classMutex. objectMemory hasSpurMemoryManagerAPI ifTrue: [semaphoreClass := objectMemory compactIndexOfClass: semaphoreClass. mutexClass := objectMemory compactIndexOfClass: mutexClass. objectMemory allHeapEntitiesDo: [:obj| | classIdx | classIdx := objectMemory classIndexOf: obj. (classIdx = semaphoreClass or: [classIdx = mutexClass]) ifTrue: [self printProcsOnList: obj]]] ifFalse: [objectMemory allObjectsDoSafely: [:obj| | classObj | classObj := objectMemory fetchClassOfNonImm: obj. (classObj = semaphoreClass or: [classObj = mutexClass]) ifTrue: [self printProcsOnList: obj]]]! Item was changed: ----- Method: StackInterpreter>>printCallStack (in category 'debug printing') ----- printCallStack + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" framePointer = nil ifTrue: [self printCallStackOf: (objectMemory fetchPointer: SuspendedContextIndex ofObject: self activeProcess)] ifFalse: [self printCallStackFP: framePointer]! Item was changed: ----- Method: StackInterpreter>>printCallStackOf: (in category 'debug printing') ----- printCallStackOf: aContextOrProcessOrFrame + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | context | (stackPages couldBeFramePointer: aContextOrProcessOrFrame) ifTrue: [^self printCallStackFP: (self cCoerceSimple: aContextOrProcessOrFrame to: #'char *')]. aContextOrProcessOrFrame = self activeProcess ifTrue: [^self printCallStackOf: (self cCode: [framePointer asInteger] inSmalltalk: [self headFramePointer])]. (self couldBeProcess: aContextOrProcessOrFrame) ifTrue: [^self printCallStackOf: (objectMemory fetchPointer: SuspendedContextIndex ofObject: aContextOrProcessOrFrame)]. context := aContextOrProcessOrFrame. [context = objectMemory nilObject] whileFalse: [(self isMarriedOrWidowedContext: context) ifTrue: [(self checkIsStillMarriedContext: context currentFP: framePointer) ifFalse: [self shortPrintContext: context. ^nil]. context := self shortReversePrintFrameAndCallers: (self frameOfMarriedContext: context)] ifFalse: [context := self printContextCallStackOf: context]]! Item was changed: ----- Method: StackInterpreter>>printContext: (in category 'debug printing') ----- printContext: aContext + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | sender ip sp | self shortPrintContext: aContext. sender := objectMemory fetchPointer: SenderIndex ofObject: aContext. ip := objectMemory fetchPointer: InstructionPointerIndex ofObject: aContext. (objectMemory isIntegerObject: sender) ifTrue: [(self checkIsStillMarriedContext: aContext currentFP: framePointer) ifTrue: [self print: 'married (assuming framePointer valid)'; cr] ifFalse: [self print: 'widowed (assuming framePointer valid)'; cr]. self print: 'sender '; printNum: sender; print: ' ('; printHexPtr: (self withoutSmallIntegerTags: sender); printChar: $); cr. self print: 'ip '; printNum: ip; print: ' ('; printHexPtr: (self withoutSmallIntegerTags: ip); printChar: $); cr] ifFalse: [self print: 'sender '; shortPrintOop: sender. self print: 'ip '. ip = objectMemory nilObject ifTrue: [self shortPrintOop: ip] ifFalse: [self printNum: ip; print: ' ('; printNum: (objectMemory integerValueOf: ip); space; printHex: (objectMemory integerValueOf: ip); printChar: $); cr]]. sp := objectMemory fetchPointer: StackPointerIndex ofObject: aContext. self print: 'sp '; printNum: (objectMemory integerValueOf: sp); print: ' ('; printHex: sp; printChar: $); cr. self print: 'method '; printMethodFieldForPrintContext: aContext. self print: 'closure '; shortPrintOop: (objectMemory fetchPointer: ClosureIndex ofObject: aContext). self print: 'receiver '; shortPrintOop: (objectMemory fetchPointer: ReceiverIndex ofObject: aContext). sp := objectMemory integerValueOf: sp. sp := sp min: (objectMemory lengthOf: aContext) - ReceiverIndex. 1 to: sp do: [:i| self print: ' '; printNum: i; space; shortPrintOop: (objectMemory fetchPointer: ReceiverIndex + i ofObject: aContext)]! Item was changed: ----- Method: StackInterpreter>>printExternalHeadFrame (in category 'debug printing') ----- printExternalHeadFrame + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" self printFrame: framePointer WithSP: stackPointer! Item was changed: ----- Method: StackInterpreter>>printFrame: (in category 'debug printing') ----- printFrame: theFP + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | thePage frameAbove theSP | (stackPages couldBeFramePointer: theFP) ifFalse: [((objectMemory addressCouldBeObj: theFP asInteger) and: [(objectMemory isInMemory: theFP asInteger) and: [(objectMemory isContextNonImm: theFP asInteger) and: [(self checkIsStillMarriedContext: theFP asInteger currentFP: framePointer)]]]) ifTrue: [^self printFrame: (self frameOfMarriedContext: theFP asInteger)]. self printHexPtr: theFP; print: ' is not in the stack zone?!!'; cr. ^nil]. frameAbove := nil. theFP = framePointer ifTrue: [theSP := stackPointer] ifFalse: [thePage := stackPages stackPageFor: theFP. (stackPages isFree: thePage) ifTrue: [self printHexPtr: theFP; print: ' is on a free page?!!'; cr. ^nil]. (thePage ~= stackPage and: [theFP = thePage headFP]) ifTrue: [theSP := thePage headSP] ifFalse: [frameAbove := self safeFindFrameAbove: theFP on: thePage startingFrom: ((thePage = stackPage and: [framePointer between: thePage realStackLimit and: thePage baseAddress]) ifTrue: [framePointer] ifFalse: [thePage headFP]). theSP := frameAbove ifNotNil: [self frameCallerSP: frameAbove]]]. theSP ifNil: [self print: 'could not find sp; using bogus value'; cr. theSP := self frameReceiverLocation: theFP]. self printFrame: theFP WithSP: theSP. frameAbove ifNotNil: [self printFrameThing: 'frame pc' at: frameAbove + FoxCallerSavedIP]! Item was changed: ----- Method: StackInterpreter>>printFrame:WithSP: (in category 'debug printing') ----- printFrame: theFP WithSP: theSP + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | theMethod numArgs topThing | self cCode: '' inSmalltalk: [self transcript ensureCr]. (stackPages couldBeFramePointer: theFP) ifFalse: [self printHexPtr: theFP; print: ' is not in the stack zone?!!'; cr. ^nil]. theMethod := self frameMethod: theFP. numArgs := self frameNumArgs: theFP. self shortPrintFrame: theFP. self printFrameOop: 'rcvr/clsr' at: theFP + FoxCallerSavedIP + ((numArgs + 1) * objectMemory wordSize). numArgs to: 1 by: -1 do: [:i| self printFrameOop: 'arg' at: theFP + FoxCallerSavedIP + (i * objectMemory wordSize)]. self printFrameThing: 'cllr ip/ctxt' at: theFP + FoxCallerSavedIP. self printFrameThing: 'saved fp' at: theFP + FoxSavedFP. self printFrameOop: 'method' at: theFP + FoxMethod. self printFrameFlagsForFP: theFP. self printFrameThing: 'context' at: theFP + FoxThisContext. self printFrameOop: 'receiver' at: theFP + FoxReceiver. topThing := stackPages longAt: theSP. (topThing >= theMethod and: [topThing <= (theMethod + (objectMemory sizeBitsOfSafe: theMethod))]) ifTrue: [theFP + FoxReceiver - objectMemory wordSize to: theSP + objectMemory wordSize by: objectMemory wordSize negated do: [:addr| self printFrameOop: 'temp/stck' at: addr]. self printFrameThing: 'frame ip' at: theSP] ifFalse: [theFP + FoxReceiver - objectMemory wordSize to: theSP by: objectMemory wordSize negated do: [:addr| self printFrameOop: 'temp/stck' at: addr]]! Item was changed: ----- Method: StackInterpreter>>printLikelyImplementorsOfSelector: (in category 'debug printing') ----- printLikelyImplementorsOfSelector: selector "Print all methods whose penultimate literal is either selector, or an object whose first inst var is the method and whose second is selector (e.g. an AdditionalMethodState)." + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - objectMemory allObjectsDo: [:obj| | methodClassAssociation | ((objectMemory isCompiledMethod: obj) and: [(self maybeSelectorOfMethod: obj) = selector]) ifTrue: ["try and print the key of the method class association (the name of the implementing class)" methodClassAssociation := self methodClassAssociationOf: obj. self printHexnp: obj; space; printOopShortInner: (((objectMemory isPointers: methodClassAssociation) and: [(objectMemory numSlotsOf: methodClassAssociation) >= 2]) ifTrue: [objectMemory fetchPointer: 0 ofObject: methodClassAssociation] ifFalse: [methodClassAssociation]); cr]]! Item was changed: ----- Method: StackInterpreter>>printMethodCache (in category 'debug printing') ----- printMethodCache + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self printMethodCacheFor: -1! Item was changed: ----- Method: StackInterpreter>>printMethodCacheFor: (in category 'debug printing') ----- printMethodCacheFor: thing + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | n | n := 0. 0 to: MethodCacheSize - 1 by: MethodCacheEntrySize do: [:i | | s c m p | s := methodCache at: i + MethodCacheSelector. c := methodCache at: i + MethodCacheClass. m := methodCache at: i + MethodCacheMethod. p := methodCache at: i + MethodCachePrimFunction. ((thing = -1 or: [s = thing or: [c = thing or: [p = thing or: [m = thing]]]]) and: [(objectMemory addressCouldBeOop: s) and: [c ~= 0 and: [(self addressCouldBeClassObj: c) or: [self addressCouldBeClassObj: (objectMemory classForClassTag: c)]]]]) ifTrue: [self cCode: [] inSmalltalk: [self transcript ensureCr]. self printNum: i; space; printHexnp: i; cr; tab. (objectMemory isBytesNonImm: s) ifTrue: [self cCode: 'printf("%" PRIxSQPTR " %.*s\n", s, (int)(numBytesOf(s)), (char *)firstIndexableField(s))' inSmalltalk: [self printHex: s; space; print: (self stringOf: s); cr]] ifFalse: [self shortPrintOop: s]. self tab. (self addressCouldBeClassObj: c) ifTrue: [self shortPrintOop: c] ifFalse: [self printNum: c; space; shortPrintOop: (objectMemory classForClassTag: c)]. self tab; shortPrintOop: m; tab. self cCode: [p > 1024 ifTrue: [self printHexnp: p] ifFalse: [self printNum: p]] inSmalltalk: [p isSymbol ifTrue: [self print: p] ifFalse: [self printNum: p]]. self cr]]. n > 1 ifTrue: [self printNum: n; cr]! Item was changed: ----- Method: StackInterpreter>>printMethodDictionary: (in category 'debug printing') ----- printMethodDictionary: dictionary + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | methodArray | methodArray := objectMemory fetchPointer: MethodArrayIndex ofObject: dictionary. SelectorStart to: (objectMemory numSlotsOf: dictionary) - 1 do: [:index | | selector meth | selector := objectMemory fetchPointer: index ofObject: dictionary. selector ~= objectMemory nilObject ifTrue: [meth := objectMemory fetchPointer: index - SelectorStart ofObject: methodArray. self printOopShort: selector; print: ' => '; printOopShort: meth; print: ' ('; printHex: selector; print: ' => '; printHex: meth; putchar: $); cr]]! Item was changed: ----- Method: StackInterpreter>>printMethodDictionaryOf: (in category 'debug printing') ----- printMethodDictionaryOf: behavior + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - self printMethodDictionary: (objectMemory fetchPointer: MethodDictionaryIndex ofObject: behavior)! Item was changed: ----- Method: StackInterpreter>>printOop: (in category 'debug printing') ----- printOop: oop + "use export: not api, so it won't be written to cointerp.h" | cls fmt lastIndex startIP bytecodesPerLine column | (objectMemory isImmediate: oop) ifTrue: [^self shortPrintOop: oop]. self printHex: oop. (objectMemory addressCouldBeObj: oop) ifFalse: [(oop bitAnd: objectMemory allocationUnit - 1) ~= 0 ifTrue: [^self print: ' is misaligned'; cr]. ((objectMemory isInNewSpace: oop) and: [objectMemory isForwarded: oop]) ifTrue: [self printForwarder: oop]. ^self print: (self whereIs: oop); cr]. (objectMemory isFreeObject: oop) ifTrue: [self print: ' is a free chunk of size '; printNum: (objectMemory sizeOfFree: oop). objectMemory hasSpurMemoryManagerAPI ifTrue: [self print: ' 0th: '; printHex: (objectMemory fetchPointer: 0 ofFreeChunk: oop). objectMemory printHeaderTypeOf: oop]. ^self cr]. (objectMemory isForwarded: oop) ifTrue: [^self printForwarder: oop]. self print: ': a(n) '. self printNameOfClass: (cls := objectMemory fetchClassOfNonImm: oop) count: 5. cls = (objectMemory splObj: ClassFloat) ifTrue: [^self cr; printFloat: (objectMemory dbgFloatValueOf: oop); cr]. fmt := objectMemory formatOf: oop. fmt > objectMemory lastPointerFormat ifTrue: [self print: ' nbytes '; printNum: (objectMemory numBytesOf: oop)]. self cr. (fmt between: objectMemory firstLongFormat and: objectMemory firstCompiledMethodFormat - 1) ifTrue: ["This will answer false if splObj: ClassAlien is nilObject" (self is: oop KindOfClass: (objectMemory splObj: ClassAlien)) ifTrue: [self print: ' datasize '; printNum: (objectMemory sizeFieldOfAlien: oop). self print: ((self isIndirectAlien: oop) ifTrue: [' indirect @ '] ifFalse: [(self isPointerAlien: oop) ifTrue: [' pointer @ '] ifFalse: [' direct @ ']]). ^self printHex: (self startOfAlienData: oop) asUnsignedInteger; cr]. (objectMemory isWordsNonImm: oop) ifTrue: [lastIndex := 64 min: ((objectMemory numBytesOf: oop) / objectMemory wordSize). lastIndex > 0 ifTrue: [1 to: lastIndex do: [:index| self space; printHex: (self cCoerceSimple: (objectMemory fetchLong32: index - 1 ofObject: oop) to: #'unsigned int'). (index \\ self elementsPerPrintOopLine) = 0 ifTrue: [self cr]]. (lastIndex \\ self elementsPerPrintOopLine) = 0 ifFalse: [self cr]]. ^self]. ^self printStringOf: oop; cr]. "this is nonsense. apologies." startIP := (objectMemory lastPointerOf: oop) + objectMemory bytesPerOop - objectMemory baseHeaderSize / objectMemory bytesPerOop. lastIndex := 256 min: startIP. lastIndex > 0 ifTrue: [1 to: lastIndex do: [:index| self cCode: [self printHex: (objectMemory fetchPointer: index - 1 ofObject: oop); space] inSmalltalk: [self space; printHex: (objectMemory fetchPointer: index - 1 ofObject: oop); space. self print: (self shortPrint: (objectMemory fetchPointer: index - 1 ofObject: oop))]. (index \\ self elementsPerPrintOopLine) = 0 ifTrue: [self cr]]. (lastIndex \\ self elementsPerPrintOopLine) = 0 ifFalse: [self cr]]. (objectMemory isCompiledMethod: oop) ifFalse: [startIP > 64 ifTrue: [self print: '...'; cr]] ifTrue: [startIP := startIP * objectMemory wordSize + 1. lastIndex := objectMemory lengthOf: oop. lastIndex - startIP > 100 ifTrue: [lastIndex := startIP + 100]. bytecodesPerLine := 8. column := 1. startIP to: lastIndex do: [:index| | byte | column = 1 ifTrue: [self cCode: 'printf("0x%08" PRIxSQPTR ": ", (usqIntptr_t)(oop+BaseHeaderSize+index-1))' inSmalltalk: [self print: (oop+objectMemory baseHeaderSize+index-1) hex; print: ': ']]. byte := objectMemory fetchByte: index - 1 ofObject: oop. self cCode: 'printf(" %02x/%-3d", (int)byte,(int)byte)' inSmalltalk: [self space; print: (byte radix: 16); printChar: $/; printNum: byte]. column := column + 1. column > bytecodesPerLine ifTrue: [column := 1. self cr]]. column = 1 ifFalse: [self cr]]! Item was changed: ----- Method: StackInterpreter>>printProcessStack: (in category 'debug printing') ----- printProcessStack: aProcess + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | ctx | self cr; printNameOfClass: (objectMemory fetchClassOf: aProcess) count: 5; space; printHex: aProcess. self print: ' priority '; printNum: (self quickFetchInteger: PriorityIndex ofObject: aProcess); cr. ctx := objectMemory followField: SuspendedContextIndex ofObject: aProcess. ctx = objectMemory nilObject ifFalse: [self printCallStackOf: ctx currentFP: framePointer]! Item was changed: ----- Method: StackInterpreter>>printProcsOnList: (in category 'debug printing') ----- printProcsOnList: procList + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | proc firstProc | proc := firstProc := objectMemory followField: FirstLinkIndex ofObject: procList. [proc = objectMemory nilObject] whileFalse: [self printProcessStack: proc. proc := objectMemory followField: NextLinkIndex ofObject: proc. proc = firstProc ifTrue: [self warning: 'circular process list!!!!'. ^nil]]! Item was changed: ----- Method: StackInterpreter>>printStackCallStackOf: (in category 'debug printing') ----- printStackCallStackOf: aContextOrProcessOrFrame + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - | theFP context | (self cCode: [false] "In the stack simulator, frame pointers are negative which upsets addressCouldBeObj:" inSmalltalk: [stackPages couldBeFramePointer: aContextOrProcessOrFrame]) ifFalse: [(objectMemory addressCouldBeObj: aContextOrProcessOrFrame) ifTrue: [((objectMemory isContext: aContextOrProcessOrFrame) and: [self checkIsStillMarriedContext: aContextOrProcessOrFrame currentFP: nil]) ifTrue: [^self printStackCallStackOf: (self frameOfMarriedContext: aContextOrProcessOrFrame) asInteger]. aContextOrProcessOrFrame = self activeProcess ifTrue: [^self printStackCallStackOf: (self cCode: [framePointer asInteger] inSmalltalk: [self headFramePointer])]. (self couldBeProcess: aContextOrProcessOrFrame) ifTrue: [^self printCallStackOf: (objectMemory fetchPointer: SuspendedContextIndex ofObject: aContextOrProcessOrFrame)]. ^nil]]. theFP := aContextOrProcessOrFrame asVoidPointer. [context := self shortReversePrintFrameAndCallers: theFP. ((self isMarriedOrWidowedContext: context) and: [theFP := self frameOfMarriedContext: context. self checkIsStillMarriedContext: context currentFP: theFP]) ifFalse: [^nil]] repeat! Item was changed: ----- Method: StackInterpreter>>printStackPageList (in category 'debug printing') ----- printStackPageList + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | page | page := stackPages mostRecentlyUsedPage. [self printStackPage: page. self cr. (page := page prevPage) ~= stackPages mostRecentlyUsedPage] whileTrue! Item was changed: ----- Method: StackInterpreter>>printStackPageListInUse (in category 'debug printing') ----- printStackPageListInUse + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | page n | page := stackPages mostRecentlyUsedPage. n := 0. [(stackPages isFree: page) ifFalse: [self printStackPage: page useCount: (n := n + 1); cr]. (page := page prevPage) ~= stackPages mostRecentlyUsedPage] whileTrue! Item was changed: ----- Method: StackInterpreter>>printStackPages (in category 'debug printing') ----- printStackPages + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" 0 to: numStackPages - 1 do: [:i| self printStackPage: (stackPages stackPageAt: i). self cr]! Item was changed: ----- Method: StackInterpreter>>printStackPagesInUse (in category 'debug printing') ----- printStackPagesInUse + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | n | n := 0. 0 to: numStackPages - 1 do: [:i| (stackPages isFree: (stackPages stackPageAt: i)) ifFalse: [self printStackPage: (stackPages stackPageAt: i) useCount: (n := n + 1); cr]]! Item was changed: ----- Method: StackInterpreter>>printStackReferencesTo: (in category 'object memory support') ----- printStackReferencesTo: oop + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - - - - - 0 to: numStackPages - 1 do: [:i| | thePage theSP theFP callerFP | thePage := stackPages stackPageAt: i. thePage isFree ifFalse: [theSP := thePage headSP. theFP := thePage headFP. "Skip the instruction pointer on top of stack of inactive pages." thePage = stackPage ifFalse: [theSP := theSP + objectMemory wordSize]. [[theSP <= (self frameReceiverLocation: theFP)] whileTrue: [oop = (stackPages longAt: theSP) ifTrue: [self print: 'FP: '; printHexnp: theFP; print: ' @ '; printHexnp: theSP; cr]. theSP := theSP + objectMemory wordSize]. (self frameHasContext: theFP) ifTrue: [oop = (self frameContext: theFP) ifTrue: [self print: 'FP: '; printHexnp: theFP; print: ' CTXT'; cr]]. oop = (self frameMethod: theFP) ifTrue: [self print: 'FP: '; printHexnp: theFP; print: ' MTHD'; cr]. (callerFP := self frameCallerFP: theFP) ~= 0] whileTrue: [theSP := (theFP + FoxCallerSavedIP) + objectMemory wordSize. theFP := callerFP]. theSP := theFP + FoxCallerSavedIP. "a.k.a. FoxCallerContext" [theSP <= thePage baseAddress] whileTrue: [oop = (stackPages longAt: theSP) ifTrue: [self print: 'FP: '; printHexnp: theFP; print: ' @ '; printHexnp: theSP; cr]. theSP := theSP + objectMemory wordSize]]]! Item was changed: ----- Method: StackInterpreter>>setBreakMNUSelector: (in category 'debug support') ----- setBreakMNUSelector: aString + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - (breakSelector := aString) ifNil: [breakSelectorLength := objectMemory minSmallInteger "nil's effective length is zero"] ifNotNil: [breakSelectorLength := (self strlen: aString) negated]! Item was changed: ----- Method: StackInterpreter>>setBreakSelector: (in category 'debug support') ----- setBreakSelector: aString + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - (breakSelector := aString) ifNil: [breakSelectorLength := objectMemory minSmallInteger "nil's effective length is zero"] ifNotNil: [breakSelectorLength := self strlen: aString]! Item was changed: ----- Method: StackInterpreter>>shortPrintFrame:AndNCallers: (in category 'debug printing') ----- shortPrintFrame: theFP AndNCallers: n + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" - (n ~= 0 and: [stackPages couldBeFramePointer: theFP]) ifTrue: [self shortPrintFrame: theFP. self shortPrintFrame: (self frameCallerFP: theFP) AndNCallers: n - 1]! Item was changed: ----- Method: StackInterpreter>>whereIs: (in category 'debug printing') ----- whereIs: anOop + "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" + - - (objectMemory whereIsMaybeHeapThing: anOop) ifNotNil: [:where| ^where]. (stackPages whereIsMaybeStackThing: anOop) ifNotNil: [:where| ^where]. ^' is no where obvious'! From commits at source.squeak.org Wed Apr 14 01:17:27 2021 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 14 Apr 2021 01:17:27 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2952.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2952.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2952 Author: eem Time: 13 April 2021, 6:17:17.283582 pm UUID: 5c7088cc-0ef4-4266-ba50-b043fdce40f0 Ancestors: VMMaker.oscog-eem.2951 And no longer waste time generating the NEwspeak configurations. =============== Diff against VMMaker.oscog-eem.2951 =============== Item was changed: ----- Method: VMMaker class>>generateAllCogConfigurationsUnderVersionControl (in category 'configurations') ----- generateAllCogConfigurationsUnderVersionControl self executeDisplayingProgress: (OrderedDictionary new - add: 'Generate newspeak spur cog 32bits' -> [ self generateNewspeakSpurCogVM ]; - add: 'Generate newspeak spur cog 64bits' -> [ self generateNewspeakSpurCog64VM ]; add: 'Generate squeak cog' -> [ self generateSqueakCogVM ]; add: 'Generate squeak spur cog 32bits' -> [ self generateSqueakSpurCogVM ]; add: 'Generate squeak spur cog 64bits' -> [ self generateSqueakSpurCog64VM ]; add: 'Generate squeak spur cog sista 32bits' -> [ self generateSqueakSpurCogSistaVM ]; add: 'Generate squeak spur cog sista 64bits' -> [ self generateSqueakSpurCogSista64VM ]; yourself)! Item was changed: ----- Method: VMMaker class>>generateAllConfigurationsUnderVersionControl (in category 'configurations') ----- generateAllConfigurationsUnderVersionControl self executeDisplayingProgress: (OrderedDictionary - with: 'Generate all newspeak configurations under VCS' -> [ self generateAllNewspeakConfigurationsUnderVersionControl ] with: 'Generate all squeak configurations under VCS' -> [ self generateAllSqueakConfigurationsUnderVersionControl ] with: 'Generate all spur lowcode configurations' -> [ self generateAllSpurLowcodeConfigurations ] with: 'Generate VM plugins' -> [ self generateVMPlugins ] with: 'Generate utilities' -> [ self generateSpur32LeakChecker; generateSpur64LeakChecker; generateUtilityPrograms ])! Item was added: + ----- Method: VMMaker class>>generateAllNewspeakConfigurations (in category 'configurations') ----- + generateAllNewspeakConfigurations + self + executeDisplayingProgress: + (OrderedDictionary + with: 'Generate newspeak spur stack 32bits' -> [ self generateNewspeakSpurStackVM ] + with: 'Generate newspeak spur stack 64bits' -> [ self generateNewspeakSpurStack64VM ] + with: 'Generate newspeak spur cog 32bits' -> [ self generateNewspeakSpurCogVM ] + with: 'Generate newspeak spur cog 64bits' -> [ self generateNewspeakSpurCog64VM ])! Item was removed: - ----- Method: VMMaker class>>generateAllNewspeakConfigurationsUnderVersionControl (in category 'configurations') ----- - generateAllNewspeakConfigurationsUnderVersionControl - self - executeDisplayingProgress: - (OrderedDictionary - with: 'Generate newspeak spur stack 32bits' -> [ self generateNewspeakSpurStackVM ] - with: 'Generate newspeak spur stack 64bits' -> [ self generateNewspeakSpurStack64VM ] - with: 'Generate newspeak spur cog 32bits' -> [ self generateNewspeakSpurCogVM ] - with: 'Generate newspeak spur cog 64bits' -> [ self generateNewspeakSpurCog64VM ])! Item was changed: ----- Method: VMMaker class>>generateAllSpurConfigurations (in category 'configurations') ----- generateAllSpurConfigurations self executeDisplayingProgress: (OrderedDictionary new - add: 'Generate all newspeak configurations under VCS' -> [ self generateAllNewspeakConfigurationsUnderVersionControl ]; add: 'Generate squeak spur cog 32bits' -> [ self generateSqueakSpurCogVM ]; add: 'Generate squeak spur cog 64bits' -> [ self generateSqueakSpurCog64VM ]; add: 'Generate squeak spur cog sista 32bits' -> [ self generateSqueakSpurCogSistaVM ]; add: 'Generate squeak spur cog sista 64bits' -> [ self generateSqueakSpurCogSista64VM ]; add: 'Generate squeak spur stack 32bits' -> [ self generateSqueakSpurStackVM ]; add: 'Generate squeak spur stack 64bits' -> [ self generateSqueakSpurStack64VM ]; add: 'Generate all spur lowcode configurations' -> [ self generateAllSpurLowcodeConfigurations ]; add: 'Generate spur leak checkers' -> [ self generateSpur32LeakChecker; generateSpur64LeakChecker ]; yourself) ! Item was changed: ----- Method: VMMaker class>>generateAllSpurConfigurationsUnderVersionControl (in category 'configurations') ----- generateAllSpurConfigurationsUnderVersionControl self executeDisplayingProgress: (OrderedDictionary new - add: 'Generate newspeak spur stack 32bits' -> [ self generateNewspeakSpurStackVM ]; - add: 'Generate newspeak spur cog 64bits' -> [ self generateNewspeakSpurCog64VM ]; add: 'Generate squeak spur stack 32bits' -> [ self generateSqueakSpurStackVM ]; + add: 'Generate squeak spur stack 64bits' -> [ self generateSqueakSpurStack64VM ]; - add: 'Generate squeak spur stack 64bits' -> [ self generateSqueakSpurStack64VM ]; - add: 'Generate newspeak spur cog 32bits' -> [ self generateNewspeakSpurCogVM ]; add: 'Generate squeak spur cog 32bits' -> [ self generateSqueakSpurCogVM ]; add: 'Generate squeak spur cog 64bits' -> [ self generateSqueakSpurCog64VM ]; add: 'Generate squeak spur cog multi-threaded 32bits' -> [ self generateSqueakSpurCogMTVM ]; add: 'Generate squeak spur cog multi-threaded 64bits' -> [ self generateSqueakSpurCog64MTVM ]; add: 'Generate squeak spur cog sista 32bits' -> [ self generateSqueakSpurCogSistaVM ]; add: 'Generate squeak spur cog sista 64bits' -> [ self generateSqueakSpurCogSista64VM ]; add: 'Generate spur leak checkers' -> [ self generateSpur32LeakChecker; generateSpur64LeakChecker ]; yourself) ! From commits at source.squeak.org Wed Apr 14 01:44:31 2021 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 14 Apr 2021 01:44:31 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2953.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2953.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2953 Author: eem Time: 13 April 2021, 6:44:22.159805 pm UUID: 9f3d924e-9226-4242-9b6f-3dad93c7a837 Ancestors: VMMaker.oscog-eem.2952 ...and fix an edge case. =============== Diff against VMMaker.oscog-eem.2952 =============== Item was changed: ----- Method: CogMethodZone>>whereIsMaybeCodeThing: (in category 'debug printing') ----- whereIsMaybeCodeThing: anOop + "useful for VM debugging; use export: so it will be accessible on win32" + - "useful for VM debugging; use export: not api, so it will be accessible on win32" (self oop: anOop isGreaterThanOrEqualTo: cogit cogCodeBase andLessThan: limitAddress) ifTrue: [(self oop: anOop isLessThan: cogit minCogMethodAddress) ifTrue: [^' is in generated runtime']. (self oop: anOop isLessThan: mzFreeStart) ifTrue: [^' is in generated methods']. (self oop: anOop isLessThan: youngReferrers) ifTrue: [^' is in code zone']. ^' is in young referrers']. ^nil! From commits at source.squeak.org Wed Apr 14 01:48:58 2021 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 14 Apr 2021 01:48:58 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2954.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2954.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2954 Author: eem Time: 13 April 2021, 6:48:47.997234 pm UUID: 31c86357-3c1c-44c7-ac85-45f677829dc8 Ancestors: VMMaker.oscog-eem.2953 ...and fix another edge case. =============== Diff against VMMaker.oscog-eem.2953 =============== Item was changed: ----- Method: CoInterpreter>>printCogMethod: (in category 'debug printing') ----- printCogMethod: cogMethod + "useful for VM debugging; use export: so it will be accessible on win32" + - "useful for VM debugging; use export: not api, so it will be accessible on win32 and won't be written to cointerp.h" | address primitive | self cCode: '' inSmalltalk: [self transcript ensureCr. cogMethod isInteger ifTrue: [^self printCogMethod: (self cCoerceSimple: cogMethod to: #'CogMethod *')]]. address := cogMethod asInteger. self printHex: address; print: ' <-> '; printHex: address + cogMethod blockSize. cogMethod cmType = CMMethod ifTrue: [self print: ': method: '; printHex: cogMethod methodObject. primitive := self primitiveIndexOfMethod: cogMethod methodObject header: cogMethod methodHeader. primitive ~= 0 ifTrue: [self print: ' prim '; printNum: primitive]. ((objectMemory addressCouldBeObj: cogMethod methodObject) and: [objectMemory addressCouldBeObj: (self methodClassOf: cogMethod methodObject)]) ifTrue: [self space; printNameOfClass: (self methodClassOf: cogMethod methodObject) count: 2]]. cogMethod cmType = CMBlock ifTrue: [self print: ': block home: '; printHex: (self cCoerceSimple: cogMethod to: #'CogBlockMethod *') cmHomeMethod asUnsignedInteger]. cogMethod cmType = CMClosedPIC ifTrue: [self print: ': Closed PIC N: '; printHex: cogMethod cPICNumCases]. cogMethod cmType = CMOpenPIC ifTrue: [self print: ': Open PIC ']. self print: ' selector: '; printHex: cogMethod selector. cogMethod selector = objectMemory nilObject ifTrue: [| s | (cogMethod cmType = CMMethod and: [(s := self maybeSelectorOfMethod: cogMethod methodObject) notNil]) ifTrue: [self print: ' (nil: '; printStringOf: s; print: ')'] ifFalse: [self print: ' (nil)']] ifFalse: [self space; printStringOf: cogMethod selector]. self cr! From noreply at github.com Wed Apr 14 02:02:36 2021 From: noreply at github.com (Eliot Miranda) Date: Tue, 13 Apr 2021 19:02:36 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] b6f0ec: CogVM source as per VMMaker.oscog-eem.2952 Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: b6f0ec4a8ddafea69470e3cf1114a517a6ad82be https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b6f0ec4a8ddafea69470e3cf1114a517a6ad82be Author: Eliot Miranda Date: 2021-04-13 (Tue, 13 Apr 2021) Changed paths: M README.md M spur64src/vm/cogit.h M spur64src/vm/cogitARMv8.c M spur64src/vm/cogitX64SysV.c M spur64src/vm/cogitX64WIN64.c M spur64src/vm/cointerp.c M spur64src/vm/cointerp.h M spur64src/vm/cointerpmt.c M spur64src/vm/cointerpmt.h M spur64src/vm/gcc3x-cointerp.c M spur64src/vm/gcc3x-cointerpmt.c M spurlowcode64src/vm/cogit.h M spurlowcode64src/vm/cogitARMv8.c M spurlowcode64src/vm/cogitX64SysV.c M spurlowcode64src/vm/cogitX64WIN64.c M spurlowcode64src/vm/cointerp.c M spurlowcode64src/vm/cointerp.h M spurlowcode64src/vm/gcc3x-cointerp.c M spurlowcodesrc/vm/cogit.h M spurlowcodesrc/vm/cogitARMv5.c M spurlowcodesrc/vm/cogitIA32.c M spurlowcodesrc/vm/cogitMIPSEL.c M spurlowcodesrc/vm/cointerp.c M spurlowcodesrc/vm/cointerp.h M spurlowcodesrc/vm/gcc3x-cointerp.c M spurlowcodestack64src/vm/gcc3x-interp.c M spurlowcodestack64src/vm/interp.c M spurlowcodestacksrc/vm/gcc3x-interp.c M spurlowcodestacksrc/vm/interp.c M spursista64src/vm/cogit.h M spursista64src/vm/cogitARMv8.c M spursista64src/vm/cogitX64SysV.c M spursista64src/vm/cogitX64WIN64.c M spursista64src/vm/cointerp.c M spursista64src/vm/cointerp.h M spursista64src/vm/gcc3x-cointerp.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cogitARMv5.c M spursistasrc/vm/cogitIA32.c M spursistasrc/vm/cogitMIPSEL.c M spursistasrc/vm/cointerp.c M spursistasrc/vm/cointerp.h M spursistasrc/vm/gcc3x-cointerp.c M spursrc/vm/cogit.h M spursrc/vm/cogitARMv5.c M spursrc/vm/cogitIA32.c M spursrc/vm/cogitMIPSEL.c M spursrc/vm/cointerp.c M spursrc/vm/cointerp.h M spursrc/vm/cointerpmt.c M spursrc/vm/cointerpmt.h M spursrc/vm/gcc3x-cointerp.c M spursrc/vm/gcc3x-cointerpmt.c M spurstack64src/vm/gcc3x-interp.c M spurstack64src/vm/interp.c M spurstack64src/vm/validImage.c M spurstacksrc/vm/gcc3x-interp.c M spurstacksrc/vm/interp.c M spurstacksrc/vm/validImage.c M src/vm/cogit.h M src/vm/cogitARMv5.c M src/vm/cogitIA32.c M src/vm/cogitMIPSEL.c M src/vm/cointerp.c M src/vm/cointerp.h M src/vm/gcc3x-cointerp.c M stacksrc/vm/gcc3x-interp.c M stacksrc/vm/interp.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2952 All debug printing routines must use to be accessible on win32. No longer waste time generating the Newspeak configurations. Update README.md. From no-reply at appveyor.com Wed Apr 14 02:23:40 2021 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 14 Apr 2021 02:23:40 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2426 Message-ID: <20210414022340.1.D50407500515AE03@appveyor.com> An HTML attachment was scrubbed... URL: From noreply at github.com Wed Apr 14 18:35:40 2021 From: noreply at github.com (Eliot Miranda) Date: Wed, 14 Apr 2021 11:35:40 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] e76dab: Mac camera plugin. Add missing AVCaptureSessionPr... Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: e76dab1ddc52fd8aad790903ac8f0cb001c6a622 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/e76dab1ddc52fd8aad790903ac8f0cb001c6a622 Author: Eliot Miranda Date: 2021-04-14 (Wed, 14 Apr 2021) Changed paths: M platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m Log Message: ----------- Mac camera plugin. Add missing AVCaptureSessionPreset960x540. Make sure that h1 is larger than h2 always. Comment the 1920x1080 preset (it's available in 10.15; we build for 10.13). From no-reply at appveyor.com Wed Apr 14 18:54:10 2021 From: no-reply at appveyor.com (AppVeyor) Date: Wed, 14 Apr 2021 18:54:10 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2427 Message-ID: <20210414185410.1.8560BE1D38B78A64@appveyor.com> An HTML attachment was scrubbed... URL: From commits at source.squeak.org Thu Apr 15 19:16:18 2021 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 15 Apr 2021 19:16:18 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2955.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2955.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2955 Author: eem Time: 15 April 2021, 12:16:07.352617 pm UUID: 78e7e549-0939-41bc-bea3-d2e5d0625870 Ancestors: VMMaker.oscog-eem.2954 Settle on Global Incremental GC for the name of the Spur incremental collector/compactor. =============== Diff against VMMaker.oscog-eem.2954 =============== Item was changed: CogClass subclass: #SpurMemoryManager (excessive size, no diff calculated) Item was changed: ----- Method: SpurMemoryManager>>incrementalGC (in category 'gc - global') ----- incrementalGC + "The selector incrementalGC refers to the V3 incremental collector, which is the collector for young objects, equivalent in function to the scavenger. + The Spur incremental collector is called the global incremental garbage collector or globalIGC for short." self shouldNotImplement! Item was changed: ----- Method: SpurMemoryManager>>markObjects: (in category 'gc - global') ----- markObjects: objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged "for profiling" "Mark all accessible objects. objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged is true if all objects are unmarked and/or if unmarked classes shoud be removed from the class table." "If the incremental collector is running mark bits may be set; stop it and clear them if necessary." self cCode: '' inSmalltalk: [coInterpreter transcript nextPutAll: 'marking...'; flush]. self runLeakCheckerFor: GCModeFull. + self shutDownGlobalIncrementalGC: objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged. - self shutDownIncrementalGC: objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged. self initializeUnscannedEphemerons. self initializeMarkStack. self initializeWeaklingStack. marking := true. self markAccessibleObjectsAndFireEphemerons. self expungeDuplicateAndUnmarkedClasses: objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged. self nilUnmarkedWeaklingSlots. marking := false! Item was added: + ----- Method: SpurMemoryManager>>shutDownGlobalIncrementalGC: (in category 'gc - incremental') ----- + shutDownGlobalIncrementalGC: objectsShouldBeUnmarked + "If the incremental collector is running mark bits may be set; stop it and clear them if necessary." + self flag: 'need to implement the global inc GC first...'. + objectsShouldBeUnmarked ifTrue: + [self assert: self allObjectsUnmarked]! Item was removed: - ----- Method: SpurMemoryManager>>shutDownIncrementalGC: (in category 'gc - incremental') ----- - shutDownIncrementalGC: objectsShouldBeUnmarked - "If the incremental collector is running mark bits may be set; stop it and clear them if necessary." - self flag: 'need to implement the inc GC first...'. - objectsShouldBeUnmarked ifTrue: - [self assert: self allObjectsUnmarked]! Item was changed: ----- Method: SpurMemoryManager>>tenuringIncrementalGC (in category 'plugin support') ----- tenuringIncrementalGC + "Do an incremental GC that tenures all surviving young objects to old space. + The selector tenuringIncrementalGC refers to the V3 incremental collector, which is the collector for young objects, equivalent in function to the scavenger. + The Spur incremental collector is called the global incremental garbage collector or globalIGC for short." - "Do an incremental GC that tenures all surviving young objects to old space." self flushNewSpace! From stes at telenet.be Sun Apr 18 19:36:54 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Sun, 18 Apr 2021 21:36:54 +0200 (CEST) Subject: [Vm-dev] Cuis VectorEnginePlugin for squeak-4 for OpenIndiana Message-ID: <1078978680.41282731.1618774614233.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, I've added the Cuis "VectorEnginePlugin" to Squeak 4.19.6 for OpenIndiana. (for cuis smalltalk http://cuis-smalltalk.org/ which uses the Squeak VM). The package is at: http://pkg.openindiana.org/hipster/en/search.shtml?token=squeak-4&action=Search This is delivered as a patch (no change to the upstream subversion repository), where the following generated VectorEnginePlugin.c is used: /* Smalltalk from Cuis 5.0 with VMMaker 4.19.5 translated as C source on 17 April 2021 8:50:35.484957 pm */ /* Automatically generated by PluginMaker (VMMaker) from VectorEnginePlugin */ The VectorEnginePlugin compiles OK for both 32bit and 64bit on OpenIndiana, but only the 32bit plugin is tested with the Cuis5.0-4567-v3.image. The plugin loads file and rendering/resizing SVG (Scalable Vector Graphics) is much faster with the plugin loaded (although that the SVG package also works without plugin, which is nice as a fallback method). Perhaps it could be considered to add the VectorEnginePlugin to the subversion repository and/or to the git opensmalltalk repo as well ? Regards, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJgfIn/AAoJENdFDkXGiciz0fcH/RMGhj2WrMSh9pLsHF2J5cI4 m91ktJXmvxHaJtHp5ehJt7jPk/47AQqe8r9Uzp6TFqT9PX7gNc+0ZYwk1LJ3NOGg 9ng2U+oLa4Kn2Lx8el/RjwYUcb26FyEhGuHan8fsiMtsC4wm28ls3jBzxp0Lz1Ax 6pZf9o8DpsfTXyKI+Kqz/dEsG+wVwCa3jN2TmujXpLzMNNWJ7lC6n1uwTu5NUu6v 2aUDuVGs7Be1y+LCskhN9tha0+Ren9Aip1+DakW9nQzSpP6NeO4lvmCPgiqHCPvB VJQPvdvFU0KSHqrsHWHUV0vMcyB2eapaKj5xT1DVWYufpIK+UBXDdO4G2HoMWL8= =Pgkr -----END PGP SIGNATURE----- From commits at source.squeak.org Sun Apr 18 23:31:52 2021 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 18 Apr 2021 23:31:52 0000 Subject: [Vm-dev] VM Maker: VMMaker.oscog-eem.2956.mcz Message-ID: Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2956.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2956 Author: eem Time: 18 April 2021, 4:31:24.673307 pm UUID: e051588b-16be-45e6-b68e-c95c85a3db6f Ancestors: VMMaker.oscog-eem.2955 CameraPlugin: add primAcknowledgeFrame for simple use of the primSetCameraBuffers interface. =============== Diff against VMMaker.oscog-eem.2955 =============== Item was added: + ----- Method: CameraPlugin>>primAcknowledgeFrame (in category 'primitives') ----- + primAcknowledgeFrame + "Acknowledge the receipt of one or more buffered frames, installed via primSetCameraBuffers. + Answer the number of times a buffer was filled since the last invocation. This is a version of + primGetFrame that does not need to supply a buffer to receiver the result." + + | cameraNum result | + + cameraNum := interpreterProxy stackValue: 0. + (interpreterProxy isIntegerObject: cameraNum) ifFalse: + [^interpreterProxy primitiveFailFor: PrimErrBadArgument]. + + result := self Camera: cameraNum Get: 0 Frame: 0. + result < 0 ifTrue: + [^interpreterProxy primitiveFailFor: result negated]. + + interpreterProxy methodReturnInteger: result! Item was changed: ----- Method: CameraPlugin>>primOpenCamera (in category 'primitives') ----- primOpenCamera + "Open a camera. Takes one argument, the index of the device to open. + CameraOpen should choose the default size for the device if both desiredFrameWidth + and desiredFrameHeight are zero, and the closest to the non-zero value(s) if either or both + of desiredFrameWidth and desiredFrameHeight are non-zero." - "Open a camera. Takes one argument, the index of the device to open." | cameraNum desiredFrameWidth desiredFrameHeight ok | cameraNum := interpreterProxy stackIntegerValue: 2. desiredFrameWidth := interpreterProxy stackIntegerValue: 1. desiredFrameHeight := interpreterProxy stackIntegerValue: 0. interpreterProxy failed ifTrue: [^0]. ok := self CameraOpen: cameraNum _: desiredFrameWidth _: desiredFrameHeight. ok <= 0 ifTrue: [interpreterProxy success: false. ^0]. interpreterProxy methodReturnReceiver! From noreply at github.com Sun Apr 18 23:36:54 2021 From: noreply at github.com (Eliot Miranda) Date: Sun, 18 Apr 2021 16:36:54 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 4e791b: CogVM source as per VMMaker.oscog-eem.2956 Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 4e791b82c5a20d1c1468daa02b01f9774e0ed062 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/4e791b82c5a20d1c1468daa02b01f9774e0ed062 Author: Eliot Miranda Date: 2021-04-18 (Sun, 18 Apr 2021) Changed paths: M platforms/unix/plugins/CameraPlugin/sqCamera-linux.c M src/plugins/CameraPlugin/CameraPlugin.c Log Message: ----------- CogVM source as per VMMaker.oscog-eem.2956 CameraPlugin: add primAcknowledgeFrame for simple use of the primSetCameraBuffers interface. Tweak format conversion in some of the linux format conversion functions. From no-reply at appveyor.com Sun Apr 18 23:56:32 2021 From: no-reply at appveyor.com (AppVeyor) Date: Sun, 18 Apr 2021 23:56:32 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2428 Message-ID: <20210418235632.1.77E38F805E976D2C@appveyor.com> An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 20 13:46:24 2021 From: noreply at github.com (Fabio Niephaus) Date: Tue, 20 Apr 2021 06:46:24 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/tags/202102090434 Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From no-reply at appveyor.com Tue Apr 20 13:54:27 2021 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 20 Apr 2021 13:54:27 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2429 Message-ID: <20210420135427.1.13ABF717C176AF4D@appveyor.com> An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 20 14:19:57 2021 From: noreply at github.com (GitHub) Date: Tue, 20 Apr 2021 07:19:57 -0700 Subject: [Vm-dev] [GitHub] Please verify your device Message-ID: <607ee30d479ee_1024c5a810665d@lowworker-6d45cd68-dw728.mail> Hey OpenSmalltalk-Bot! A sign in attempt requires further verification because we did not recognize your device. To complete the sign in, enter the verification code on the unrecognized device. Device: Safari on macOS Verification code: 664567 If you did not attempt to sign in to your account, your password may be compromised. Visit https://github.com/settings/security to create a new, strong password for your GitHub account. If you'd like to automatically verify devices in the future, consider enabling two-factor authentication on your account. Visit https://docs.github.com/articles/configuring-two-factor-authentication to learn about two-factor authentication. If you decide to enable two-factor authentication, ensure you retain access to one or more account recovery methods. See https://docs.github.com/articles/configuring-two-factor-authentication-recovery-methods in the GitHub Help. Thanks, The GitHub Team From noreply at github.com Tue Apr 20 14:20:28 2021 From: noreply at github.com (GitHub) Date: Tue, 20 Apr 2021 07:20:28 -0700 Subject: [Vm-dev] [GitHub] Please review this sign in Message-ID: <607ee32c366f0_4ac5a83020ba@lowworker-6d45cd68-bfvrb.mail> Hey OpenSmalltalk-Bot! Your GitHub account was successfully signed in to but we did not recognize the location of the sign in. You can review this sign in attempt by visiting https://github.com/settings/sessions/authentications/1101551597. If you recently signed in to your account, you do not need to take any further action. If you did not sign in to your account, your password may be compromised. Visit https://github.com/settings/security to create a new, strong password for your GitHub account. For more information, see "https://docs.github.com/articles/keeping-your-account-and-data-secure/" in the GitHub Help. To see this and other security events for your account, visit https://github.com/settings/security-log If you run into problems, please contact support by visiting https://github.com/contact Thanks, The GitHub Team From noreply at github.com Tue Apr 20 14:22:06 2021 From: noreply at github.com (Fabio Niephaus) Date: Tue, 20 Apr 2021 07:22:06 -0700 Subject: [Vm-dev] fniephaus invited you to OpenSmalltalk/opensmalltalk-vm Message-ID: <607ee38ed2466_55c5a8406879@lowworker-6d45cd68-zhwcx.mail> @fniephaus has invited you to collaborate on the OpenSmalltalk/opensmalltalk-vm repository. Visit https://github.com/OpenSmalltalk/opensmalltalk-vm/invitations to accept or decline this invitation. You can also head over to https://github.com/OpenSmalltalk/opensmalltalk-vm to check out the repository or visit https://github.com/fniephaus to learn a bit more about @fniephaus. This invitation will expire in 7 days. Some helpful tips: - If you get a 404 page, make sure you’re signed in as OpenSmalltalk-Bot. - Too many emails from @fniephaus? You can block them by visiting https://github.com/settings/blocked_users?block_user=fniephaus or report abuse at https://github.com/contact/report-abuse?report=fniephaus --- View it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 20 14:23:29 2021 From: noreply at github.com (GitHub) Date: Tue, 20 Apr 2021 14:23:29 +0000 (UTC) Subject: [Vm-dev] [GitHub] A personal access token has been added to your account Message-ID: <607ee3e16b74_58c5a8892eb@lowworker-canary-77986f9df4-llsvg.mail> Hey OpenSmalltalk-Bot! A personal access token (OpenSmalltalk GitHub Releases Deploy) with public_repo scope was recently added to your account. Visit https://github.com/settings/tokens for more information. To see this and other security events for your account, visit https://github.com/settings/security-log If you run into problems, please contact support by visiting https://github.com/contact Thanks, The GitHub Team From noreply at github.com Tue Apr 20 14:26:34 2021 From: noreply at github.com (Fabio Niephaus) Date: Tue, 20 Apr 2021 07:26:34 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/tags/202102090434 Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From noreply at github.com Tue Apr 20 14:26:46 2021 From: noreply at github.com (Fabio Niephaus) Date: Tue, 20 Apr 2021 07:26:46 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/tags/202102090434 Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From noreply at github.com Tue Apr 20 14:28:35 2021 From: noreply at github.com (Fabio Niephaus) Date: Tue, 20 Apr 2021 07:28:35 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/tags/202102090434 Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From noreply at github.com Tue Apr 20 14:28:46 2021 From: noreply at github.com (Fabio Niephaus) Date: Tue, 20 Apr 2021 07:28:46 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/tags/202102090434 Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From no-reply at appveyor.com Tue Apr 20 14:33:34 2021 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 20 Apr 2021 14:33:34 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2430 Message-ID: <20210420143334.1.CEDEC31DCBF02BCE@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 20 14:40:40 2021 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 20 Apr 2021 14:40:40 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2431 Message-ID: <20210420144040.1.2F209DC24300AA99@appveyor.com> An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 20 15:04:49 2021 From: noreply at github.com (Fabio Niephaus) Date: Tue, 20 Apr 2021 08:04:49 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/tags/202101260417 Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From noreply at github.com Tue Apr 20 15:05:05 2021 From: noreply at github.com (Fabio Niephaus) Date: Tue, 20 Apr 2021 08:05:05 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/tags/202102090434 Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From notifications at github.com Tue Apr 20 15:08:52 2021 From: notifications at github.com (Fabio Niephaus) Date: Tue, 20 Apr 2021 08:08:52 -0700 Subject: [Vm-dev] =?utf-8?q?=5BOpenSmalltalk/opensmalltalk-vm=5D_Pre-relea?= =?utf-8?q?se_202101260417_-_202101260417=3A_Abstract_the_shift_and_mask_f?= =?utf-8?q?or_mouse_button_event_processing_into_ma=E2=80=A6?= Message-ID: Intermediate release before deprecation of Bintray. Binaries copied over from Bintray. -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/202101260417 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Apr 20 15:57:26 2021 From: notifications at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 08:57:26 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Cannot build SqueakFFIPrims as internal plugin on windows (#557) Message-ID: This is because of a conflicting definition of error() in sqVirtualMachine.h and in sqAssert.h Since pharo is building FFI as internal plugin, this makes the build red on windows. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/557 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Apr 20 15:59:43 2021 From: notifications at github.com (Marcel Taeumel) Date: Tue, 20 Apr 2021 08:59:43 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Cannot build SqueakFFIPrims as internal plugin on windows (#557) In-Reply-To: References: Message-ID: FFI has an internal plugin would be nice. :-) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/557#issuecomment-823400049 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Apr 20 16:22:47 2021 From: notifications at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 09:22:47 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Cannot build SqueakFFIPrims as internal plugin on windows (#557) In-Reply-To: References: Message-ID: > x86_64-w64-mingw32-clang -x c -MT build/SqueakFFIPrims/SqueakFFIPrims.o -MMD -MP -MF deps/SqueakFFIPrims.Td -fdeclspec -msse2 -ggdb2 -m64 -mno-rtd -mms-bitfields -O1 -momit-leaf-frame-pointer -funroll-loops -D_MT -fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprintf -Wall -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label -Wno-unused-function -DPharoVM=1 -DCOGMTVM=0 -DDEBUGVM=0 -fno-stack-protector -DSQUEAK_BUILTIN_PLUGIN -I. -I../../spur64src/vm -I../../platforms/win32/vm -I../../platforms/Cross/vm -I../../src/plugins/SqueakFFIPrims -I../../platforms/win32/plugins/SqueakFFIPrims -I../../platforms/Cross/plugins/SqueakFFIPrims -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DWIN64=1 -DNO_ISNAN -DNO_SERVICE -DNDEBUG -DLSB_FIRST -DVM_NAME=\"Pharo\" -c ../../src/plugins/SqueakFFIPrims/SqueakFFIPrims.c -o build/SqueakFFIPrims/SqueakFFIPrims.o > In file included from ../../src/plugins/SqueakFFIPrims/SqueakFFIPrims.c:28: > In file included from ../../src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c:38: > ../../platforms/Cross/vm/sqAssert.h:27:14: error: static declaration of 'error' follows non-static declaration > EXPORT(void) error(const char *); > ^ > ../../platforms/Cross/vm/sqVirtualMachine.h:547:7: note: previous declaration is here > void error(const char *); > ^ -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/557#issuecomment-823416261 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 20 16:37:56 2021 From: noreply at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 09:37:56 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] ce7f66: Fix issue #557 (workaround?) Message-ID: Branch: refs/heads/issue_557_export_conflict_on_windows Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: ce7f664825a5640bdf45a94f83357827f25353e6 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/ce7f664825a5640bdf45a94f83357827f25353e6 Author: Nicolas Cellier Date: 2021-04-20 (Tue, 20 Apr 2021) Changed paths: M platforms/Cross/vm/sqAssert.h Log Message: ----------- Fix issue #557 (workaround?) If we build an internal plugin `SQUEAK_BUILTIN_PLUGIN`, then we don't need to `EXPORT` the error/warning functions. There are still conflicting definitions in sqVirtualMachine.h which totally ignore IMPORT/EXPORT but these only generate warnings, not errors. From noreply at github.com Tue Apr 20 16:37:57 2021 From: noreply at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 09:37:57 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/tags/202102090434 Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From no-reply at appveyor.com Tue Apr 20 17:10:39 2021 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 20 Apr 2021 17:10:39 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2433 Message-ID: <20210420171039.1.289C8BFA328FA103@appveyor.com> An HTML attachment was scrubbed... URL: From no-reply at appveyor.com Tue Apr 20 17:17:57 2021 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 20 Apr 2021 17:17:57 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2434 Message-ID: <20210420171757.1.C21AC6273CB08113@appveyor.com> An HTML attachment was scrubbed... URL: From stes at telenet.be Tue Apr 20 17:27:27 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Tue, 20 Apr 2021 19:27:27 +0200 (CEST) Subject: [Vm-dev] patch for subversion (classical VM) primitiveLocalMicroseconds Message-ID: <1857423771.50743645.1618939647666.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, This is a patch for subversion squeakvm 4.19.6. It relates to the primitiveLocalMicrosecondClock. It does not affect OpenSmalltalk (I think the code in OpenSmalltalk is different and is not affected by the following problem). I'm not sure it is actually desired at all to implement primitiveLocalMicrosecondClock in the 32bit case in the classical SqueakVM, but if it is, there is an arithmetical overflow on my platform (Solaris 32bit). I don't think it affects the classical SqueakVM Solaris 64bit by the way, (for the 68000 type of Smalltalk images). The patch is for the file platforms/unix/vm/sqUnixMain.c function sqUnixUtcWithOffset(). This function is doing: time_t seconds= timeval.tv_sec; suseconds_t usec= timeval.tv_usec; *microSeconds= seconds * 1000000 + usec; unfortunately the multiplication (seconds * 1000000) is triggering overflow. The type time_t is defined for me as: typedef long time_t; typedef long suseconds_t; /* signed # of microseconds */ Note that I believe that in the 32bit case this has size 4 bytes and in the 64bit case this has size 8 bytes (for me on Solaris). So Solaris 64bit is not affected by the multiplication error, but 32bit is. I propose the following patch: Index: vm/sqUnixMain.c =================================================================== - --- vm/sqUnixMain.c (revision 3799) +++ vm/sqUnixMain.c (working copy) @@ -213,11 +213,13 @@ */ sqInt sqUnixUtcWithOffset(sqLong *microSeconds, int *offset) { + sqLong theMicroSeconds; struct timeval timeval; if (gettimeofday(&timeval, NULL) == -1) return -1; time_t seconds= timeval.tv_sec; suseconds_t usec= timeval.tv_usec; - - *microSeconds= seconds * 1000000 + usec; + theMicroSeconds = seconds; + *microSeconds= theMicroSeconds * 1000000 + usec; The rationale is that the function seems to assume anyway that it is possible to store the result in *microSeconds which is of type sqLong. So by defining a local variable theMicroSeconds and casting seconds to that type, and then multiplying (instead of 32bit multiply, on the 64bit), it may work ... at least it seems to work for me. Maybe an alternative could be simply NOT to implement primitiveLocalMicrosecondClock in the 32bit case ... If primitiveLocalMicrosecondClock would return nil (primitiveFail) in the 32bit case, it would also be a possible solution. The primitive assumes anyway that it returns the microseconds as LargeInteger. David Stes PS1: in attach the patch to apply if desired PS2: I've tested this on Solaris - all platforms are affected; it is hard to say for me how other platforms are affected, given their time_t definition and their sqLong definition. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJgfw4nAAoJENdFDkXGicizFVQH/3GhR/K0K9H9AyS4uBCeEIxg lv4rCq2w9tXWeLP8eUc50sJnAsK7UVnO6FUpdFmF0qauN0414C5KmrQcIivNoEvH kMiWduIWXfzX7VlHj56pyuYym73qOZDZowFOvnPjaVQfKcqC9yyabYrEF7THc8j3 F8bVwCy/oz1h9/Mi6VbCrjz1G+ePmowXiv5vkJFAwQDNGrc53OyhQm6Wfibdwb/8 6C2C/loPeStDf9f3Y3zhIkelp0RI4TL+h+D+REaf0kWV/TubIx648hcP4uvBhyQk 6hwD7OHHechkJLgYAni1ipGXfX03cAM2plLIgKHahypNz1mVcZhu/6SSMTQK1ik= =gf1g -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: primitiveLocalMicrosecondClock.patch Type: text/x-patch Size: 615 bytes Desc: not available URL: From nicolas.cellier.aka.nice at gmail.com Tue Apr 20 17:28:39 2021 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 19:28:39 +0200 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2433 In-Reply-To: <20210420171039.1.289C8BFA328FA103@appveyor.com> References: <20210420171039.1.289C8BFA328FA103@appveyor.com> Message-ID: Not, it worked, we got two supplementary green dots ;) It's just that we have multiple failures stacked since the shuffle of header order. Next turn: minheadless builds: /cygdrive/c/projects/vm/platforms/Cross/vm/sqVirtualMachine.c:96:6: error: no member named 'sqError' in 'struct VirtualMachine' VM->error = error; ~~ ^ /cygdrive/c/projects/vm/platforms/minheadless/common/sqPlatformSpecificCommon.h:46:15: note: expanded from macro 'error' #define error sqError ^ 1 error generated. Bah, Le mar. 20 avr. 2021 à 19:11, AppVeyor a écrit : > > > > Build opensmalltalk-vm 1.0.2433 failed > > Commit ce7f664825 by Nicolas Cellier on 4/20/2021 4:36 PM: > Fix issue #557 (workaround?) > > Configure your notification preferences From notifications at github.com Tue Apr 20 17:32:49 2021 From: notifications at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 10:32:49 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Fix issue #557 (workaround?) (#558) Message-ID: If we build an internal plugin `SQUEAK_BUILTIN_PLUGIN`, then we don't need to `EXPORT` the error/warning functions. There are still conflicting definitions in sqVirtualMachine.h which totally ignore IMPORT/EXPORT but these only generate warnings, not errors. You can view, comment on, or merge this pull request online at: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/558 -- Commit Summary -- * Fix issue #557 (workaround?) -- File Changes -- M platforms/Cross/vm/sqAssert.h (12) -- Patch Links -- https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/558.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/558.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/558 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 20 17:33:49 2021 From: noreply at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 10:33:49 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] ce7f66: Fix issue #557 (workaround?) Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: ce7f664825a5640bdf45a94f83357827f25353e6 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/ce7f664825a5640bdf45a94f83357827f25353e6 Author: Nicolas Cellier Date: 2021-04-20 (Tue, 20 Apr 2021) Changed paths: M platforms/Cross/vm/sqAssert.h Log Message: ----------- Fix issue #557 (workaround?) If we build an internal plugin `SQUEAK_BUILTIN_PLUGIN`, then we don't need to `EXPORT` the error/warning functions. There are still conflicting definitions in sqVirtualMachine.h which totally ignore IMPORT/EXPORT but these only generate warnings, not errors. Commit: 331b8cdcd21e09e16fd17def87becc1a542591d8 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/331b8cdcd21e09e16fd17def87becc1a542591d8 Author: Nicolas Cellier Date: 2021-04-20 (Tue, 20 Apr 2021) Changed paths: M platforms/Cross/vm/sqAssert.h Log Message: ----------- Merge pull request #558 from OpenSmalltalk/issue_557_export_conflict_on_windows Fix issue #557 (workaround?) [ci skip] we know we're red Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/4e791b82c5a2...331b8cdcd21e From notifications at github.com Tue Apr 20 17:33:50 2021 From: notifications at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 10:33:50 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Fix issue #557 (workaround?) (#558) In-Reply-To: References: Message-ID: Merged #558 into Cog. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/558#event-4620626617 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 20 17:34:32 2021 From: noreply at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 10:34:32 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/heads/issue_557_export_conflict_on_windows Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From notifications at github.com Tue Apr 20 17:35:58 2021 From: notifications at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 10:35:58 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Cannot build SqueakFFIPrims as internal plugin on windows (#557) In-Reply-To: References: Message-ID: Closed #557. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/557#event-4620636703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 20 20:37:04 2021 From: noreply at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 13:37:04 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 001841: define erro(x) macro rather than error Message-ID: Branch: refs/heads/fix_minheadless_build Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 00184111ea909b2a19eba6aca05cd3136e249503 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/00184111ea909b2a19eba6aca05cd3136e249503 Author: Nicolas Cellier Date: 2021-04-20 (Tue, 20 Apr 2021) Changed paths: M platforms/minheadless/common/sqPlatformSpecificCommon.h Log Message: ----------- define erro(x) macro rather than error Due to a change in the order of headers, the former definition conflicts with the field error in virtual machine structure. Commit: 31f31918c6c6bde220e6dac648644993661f236c https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/31f31918c6c6bde220e6dac648644993661f236c Author: Nicolas Cellier Date: 2021-04-20 (Tue, 20 Apr 2021) Changed paths: M platforms/minheadless/common/sqWindow-Null.c Log Message: ----------- Finish the clean-up of the 4 unused functions getButtonState & co Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/00184111ea90%5E...31f31918c6c6 From notifications at github.com Tue Apr 20 21:14:58 2021 From: notifications at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 14:14:58 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Fix minheadless build (#559) Message-ID: At least one minheadless passes on appveyor, mission accomplished, time to merge (Who has two more hours to wait this evening?) You can view, comment on, or merge this pull request online at: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/559 -- Commit Summary -- * define erro(x) macro rather than error * Finish the clean-up of the 4 unused functions getButtonState & co -- File Changes -- M platforms/minheadless/common/sqPlatformSpecificCommon.h (7) M platforms/minheadless/common/sqWindow-Null.c (4) -- Patch Links -- https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/559.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/559.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/559 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 20 21:15:17 2021 From: noreply at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 14:15:17 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 001841: define erro(x) macro rather than error Message-ID: Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 00184111ea909b2a19eba6aca05cd3136e249503 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/00184111ea909b2a19eba6aca05cd3136e249503 Author: Nicolas Cellier Date: 2021-04-20 (Tue, 20 Apr 2021) Changed paths: M platforms/minheadless/common/sqPlatformSpecificCommon.h Log Message: ----------- define erro(x) macro rather than error Due to a change in the order of headers, the former definition conflicts with the field error in virtual machine structure. Commit: 31f31918c6c6bde220e6dac648644993661f236c https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/31f31918c6c6bde220e6dac648644993661f236c Author: Nicolas Cellier Date: 2021-04-20 (Tue, 20 Apr 2021) Changed paths: M platforms/minheadless/common/sqWindow-Null.c Log Message: ----------- Finish the clean-up of the 4 unused functions getButtonState & co Commit: ccf7efbcea6310b5574ba9195fb58facc310f94e https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/ccf7efbcea6310b5574ba9195fb58facc310f94e Author: Nicolas Cellier Date: 2021-04-20 (Tue, 20 Apr 2021) Changed paths: M platforms/minheadless/common/sqPlatformSpecificCommon.h M platforms/minheadless/common/sqWindow-Null.c Log Message: ----------- Merge pull request #559 from OpenSmalltalk/fix_minheadless_build Fix minheadless build Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/331b8cdcd21e...ccf7efbcea63 From notifications at github.com Tue Apr 20 21:15:17 2021 From: notifications at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 14:15:17 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Fix minheadless build (#559) In-Reply-To: References: Message-ID: Merged #559 into Cog. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/559#event-4621624545 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Tue Apr 20 21:15:21 2021 From: noreply at github.com (Nicolas Cellier) Date: Tue, 20 Apr 2021 14:15:21 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/heads/fix_minheadless_build Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From no-reply at appveyor.com Tue Apr 20 21:17:57 2021 From: no-reply at appveyor.com (AppVeyor) Date: Tue, 20 Apr 2021 21:17:57 +0000 Subject: [Vm-dev] Build failed: opensmalltalk-vm 1.0.2437 Message-ID: <20210420211757.1.E2402C2B8C46B16F@appveyor.com> An HTML attachment was scrubbed... URL: From florin.mateoc at gmail.com Tue Apr 20 23:16:38 2021 From: florin.mateoc at gmail.com (Florin Mateoc) Date: Tue, 20 Apr 2021 19:16:38 -0400 Subject: [Vm-dev] primitiveTranslateStringWithTable Message-ID: Hi, While looking at some of the more exotic primitives, I stumbled upon this little gem. I think it's bad enough that it modifies strings in place (some of those could be method literals), but it even modifies symbols in place, without adding them to the symbol table. I would say this is a bug, I don't think symbols should be modified in place (other than by the #intern: method), but this does not look unintentional - apparently ByteSymbol class >> #translate:from:to:table: was added specifically to make the primitive work on symbols too. Does anybody have any insight into this, is this functionality (modifying symbols in place) used anywhere? Thank you, Florin -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cellier.aka.nice at gmail.com Wed Apr 21 06:06:24 2021 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 08:06:24 +0200 Subject: [Vm-dev] primitiveTranslateStringWithTable In-Reply-To: References: Message-ID: Hi Florin, did you try it? It should fail if passing a literal (ModificationForbidden). I see that it's only ever sent to copy asString, for case translation or converting lineEndings... Le mer. 21 avr. 2021 à 01:17, Florin Mateoc a écrit : > > > Hi, > > While looking at some of the more exotic primitives, I stumbled upon this little gem. > I think it's bad enough that it modifies strings in place (some of those could be method literals), but it even modifies symbols in place, without adding them to the symbol table. > > I would say this is a bug, I don't think symbols should be modified in place (other than by the #intern: method), but this does not look unintentional - apparently ByteSymbol class >> #translate:from:to:table: was added specifically to make the primitive work on symbols too. > > Does anybody have any insight into this, is this functionality (modifying symbols in place) used anywhere? > > Thank you, > Florin > From florin.mateoc at gmail.com Wed Apr 21 12:53:45 2021 From: florin.mateoc at gmail.com (Florin Mateoc) Date: Wed, 21 Apr 2021 08:53:45 -0400 Subject: [Vm-dev] primitiveTranslateStringWithTable In-Reply-To: References: Message-ID: Hi Nicolas, I did try it. After making sure a string was not interned, ( "Symbol findInterned: 'test123'" return nil ), I did | s | s := #TEST123. s translateToLowercase. Symbol findInterned: s and the resulting s is a Symbol and it is not interned Florin On Wed, Apr 21, 2021 at 2:06 AM Nicolas Cellier < nicolas.cellier.aka.nice at gmail.com> wrote: > > Hi Florin, > did you try it? It should fail if passing a literal > (ModificationForbidden). > I see that it's only ever sent to copy asString, for case translation > or converting lineEndings... > > Le mer. 21 avr. 2021 à 01:17, Florin Mateoc a > écrit : > > > > > > Hi, > > > > While looking at some of the more exotic primitives, I stumbled upon > this little gem. > > I think it's bad enough that it modifies strings in place (some of those > could be method literals), but it even modifies symbols in place, without > adding them to the symbol table. > > > > I would say this is a bug, I don't think symbols should be modified in > place (other than by the #intern: method), but this does not look > unintentional - apparently ByteSymbol class >> #translate:from:to:table: > was added specifically to make the primitive work on symbols too. > > > > Does anybody have any insight into this, is this functionality > (modifying symbols in place) used anywhere? > > > > Thank you, > > Florin > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cellier.aka.nice at gmail.com Wed Apr 21 17:51:50 2021 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 19:51:50 +0200 Subject: [Vm-dev] primitiveTranslateStringWithTable In-Reply-To: References: Message-ID: Hmm OK, on a recently recompiled spur 64bits VM I've got errorNoModification, maybe because the optional primitive is missing? On 32 bits spur VM though, I get the behavior that you described. Le mer. 21 avr. 2021 à 14:54, Florin Mateoc a écrit : > > > Hi Nicolas, > > I did try it. After making sure a string was not interned, ( "Symbol findInterned: 'test123'" return nil ), I did > > | s | s := #TEST123. > s translateToLowercase. > Symbol findInterned: s > > and the resulting s is a Symbol and it is not interned > > Florin > > On Wed, Apr 21, 2021 at 2:06 AM Nicolas Cellier wrote: >> >> >> Hi Florin, >> did you try it? It should fail if passing a literal (ModificationForbidden). >> I see that it's only ever sent to copy asString, for case translation >> or converting lineEndings... >> >> Le mer. 21 avr. 2021 à 01:17, Florin Mateoc a écrit : >> > >> > >> > Hi, >> > >> > While looking at some of the more exotic primitives, I stumbled upon this little gem. >> > I think it's bad enough that it modifies strings in place (some of those could be method literals), but it even modifies symbols in place, without adding them to the symbol table. >> > >> > I would say this is a bug, I don't think symbols should be modified in place (other than by the #intern: method), but this does not look unintentional - apparently ByteSymbol class >> #translate:from:to:table: was added specifically to make the primitive work on symbols too. >> > >> > Does anybody have any insight into this, is this functionality (modifying symbols in place) used anywhere? >> > >> > Thank you, >> > Florin >> > From florin.mateoc at gmail.com Wed Apr 21 17:59:31 2021 From: florin.mateoc at gmail.com (Florin Mateoc) Date: Wed, 21 Apr 2021 13:59:31 -0400 Subject: [Vm-dev] primitiveTranslateStringWithTable In-Reply-To: References: Message-ID: Yes, you are most likely getting the errorNoModification only because of the primitive fallback code On Wed, Apr 21, 2021 at 1:52 PM Nicolas Cellier < nicolas.cellier.aka.nice at gmail.com> wrote: > > Hmm OK, > on a recently recompiled spur 64bits VM I've got errorNoModification, > maybe because the optional primitive is missing? > On 32 bits spur VM though, I get the behavior that you described. > > Le mer. 21 avr. 2021 à 14:54, Florin Mateoc a > écrit : > > > > > > Hi Nicolas, > > > > I did try it. After making sure a string was not interned, ( "Symbol > findInterned: 'test123'" return nil ), I did > > > > | s | s := #TEST123. > > s translateToLowercase. > > Symbol findInterned: s > > > > and the resulting s is a Symbol and it is not interned > > > > Florin > > > > On Wed, Apr 21, 2021 at 2:06 AM Nicolas Cellier < > nicolas.cellier.aka.nice at gmail.com> wrote: > >> > >> > >> Hi Florin, > >> did you try it? It should fail if passing a literal > (ModificationForbidden). > >> I see that it's only ever sent to copy asString, for case translation > >> or converting lineEndings... > >> > >> Le mer. 21 avr. 2021 à 01:17, Florin Mateoc > a écrit : > >> > > >> > > >> > Hi, > >> > > >> > While looking at some of the more exotic primitives, I stumbled upon > this little gem. > >> > I think it's bad enough that it modifies strings in place (some of > those could be method literals), but it even modifies symbols in place, > without adding them to the symbol table. > >> > > >> > I would say this is a bug, I don't think symbols should be modified > in place (other than by the #intern: method), but this does not look > unintentional - apparently ByteSymbol class >> #translate:from:to:table: > was added specifically to make the primitive work on symbols too. > >> > > >> > Does anybody have any insight into this, is this functionality > (modifying symbols in place) used anywhere? > >> > > >> > Thank you, > >> > Florin > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cellier.aka.nice at gmail.com Wed Apr 21 18:15:14 2021 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 20:15:14 +0200 Subject: [Vm-dev] clone: -> cloneObject: Message-ID: Hi all, Eliot, just to inform that I have uploaded a new version Balloon3D-Plugins-nice.17 to http://www.squeaksource.com/Balloon3D The old one did still use clone: Nicolas From nicolas.cellier.aka.nice at gmail.com Wed Apr 21 18:25:05 2021 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 20:25:05 +0200 Subject: [Vm-dev] clone: -> cloneObject: In-Reply-To: References: Message-ID: Ah, it seems that you already did the change in your image, but forgot to save the code. Current source shows a non-celan (unsaved) package... See https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/56635fc325bfb9bc9188b11a450723992ae35f8c/src/plugins/Squeak3D/Squeak3D.c#L6 Le mer. 21 avr. 2021 à 20:15, Nicolas Cellier a écrit : > > Hi all, Eliot, > just to inform that I have uploaded a new version > Balloon3D-Plugins-nice.17 to http://www.squeaksource.com/Balloon3D > The old one did still use clone: > > Nicolas From nicolas.cellier.aka.nice at gmail.com Wed Apr 21 18:37:59 2021 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 20:37:59 +0200 Subject: [Vm-dev] rescuing linux builds Message-ID: Hi all, may I suggest that we put a #ifdef HAVE_CONFIG_H # include "config.h" #endif ahead of a few strategic platforms (and src) files so as to rescue the linux build? Currently, the builds fail because of #error directive in config.h... For some files that already include sqConfig.h, just moving sqConfig.h ahead generally also solves the problem... I've tried it with some success... From nicolas.cellier.aka.nice at gmail.com Wed Apr 21 19:01:46 2021 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 21:01:46 +0200 Subject: [Vm-dev] primitiveTranslateStringWithTable In-Reply-To: References: Message-ID: Florin, would you mind opening an issue here? https://github.com/OpenSmalltalk/opensmalltalk-vm/issues Le mer. 21 avr. 2021 à 19:59, Florin Mateoc a écrit : > > > Yes, you are most likely getting the errorNoModification only because of the primitive fallback code > > On Wed, Apr 21, 2021 at 1:52 PM Nicolas Cellier wrote: >> >> >> Hmm OK, >> on a recently recompiled spur 64bits VM I've got errorNoModification, >> maybe because the optional primitive is missing? >> On 32 bits spur VM though, I get the behavior that you described. >> >> Le mer. 21 avr. 2021 à 14:54, Florin Mateoc a écrit : >> > >> > >> > Hi Nicolas, >> > >> > I did try it. After making sure a string was not interned, ( "Symbol findInterned: 'test123'" return nil ), I did >> > >> > | s | s := #TEST123. >> > s translateToLowercase. >> > Symbol findInterned: s >> > >> > and the resulting s is a Symbol and it is not interned >> > >> > Florin >> > >> > On Wed, Apr 21, 2021 at 2:06 AM Nicolas Cellier wrote: >> >> >> >> >> >> Hi Florin, >> >> did you try it? It should fail if passing a literal (ModificationForbidden). >> >> I see that it's only ever sent to copy asString, for case translation >> >> or converting lineEndings... >> >> >> >> Le mer. 21 avr. 2021 à 01:17, Florin Mateoc a écrit : >> >> > >> >> > >> >> > Hi, >> >> > >> >> > While looking at some of the more exotic primitives, I stumbled upon this little gem. >> >> > I think it's bad enough that it modifies strings in place (some of those could be method literals), but it even modifies symbols in place, without adding them to the symbol table. >> >> > >> >> > I would say this is a bug, I don't think symbols should be modified in place (other than by the #intern: method), but this does not look unintentional - apparently ByteSymbol class >> #translate:from:to:table: was added specifically to make the primitive work on symbols too. >> >> > >> >> > Does anybody have any insight into this, is this functionality (modifying symbols in place) used anywhere? >> >> > >> >> > Thank you, >> >> > Florin >> >> > From Das.Linux at gmx.de Wed Apr 21 19:03:23 2021 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed, 21 Apr 2021 21:03:23 +0200 Subject: [Vm-dev] rescuing linux builds In-Reply-To: References: Message-ID: Hai > On 21. Apr 2021, at 20:37, Nicolas Cellier wrote: > > > Hi all, > may I suggest that we put a > > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif > > ahead of a few strategic platforms (and src) files so as to rescue the > linux build? > Currently, the builds fail because of #error directive in config.h... I put it there because features.h depends on config.h > For some files that already include sqConfig.h, just moving sqConfig.h > ahead generally also solves the problem... I'm open to putting sqconfig.h back where it was, but it seems it broke the development of some windows features. It seems thats why https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e exists, which moved the .h's around. So you should wait for Eliot before moving on here, as he explicitly asks: "I ask anyone wishing to alter the system here to please contact me and discuss before making changes. " Best regards -Tobias > I've tried it with some success... From notifications at github.com Wed Apr 21 19:16:42 2021 From: notifications at github.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 12:16:42 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Failing linux build due to error directive in config.h (#560) Message-ID: The linux builds are failing for a while after some re-arrangement of header order. It happens that config.h cannot work after linux features.h, so the former should be included before the later. An #error directive checks and protect against this case. One possible workaround could be to move #include "config.h" ahead in a few files... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/560 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Apr 21 19:19:56 2021 From: notifications at github.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 12:19:56 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Failing linux build due to error directive in config.h (#560) In-Reply-To: References: Message-ID: This protection was introduced here: https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/25e4f4a834e6203d59f668d565e2b4d97d08bb65 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/560#issuecomment-824297951 -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cellier.aka.nice at gmail.com Wed Apr 21 19:35:18 2021 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 21:35:18 +0200 Subject: [Vm-dev] rescuing linux builds In-Reply-To: References: Message-ID: Hi Tobias, yes I remember this message, thanks for the links. My intention was to open a branch for fixing the issue and ask permission before merging. I'm pretty sure that the right thing would be to let the CI tell whether we broke the MSVC/LLVM windows build or not. That would be more efficient than requesting review from single person for every single change. Maybe someone can help Eliot setting this up. Constantly red builds cannot sustainably scale anyway. It would be great to integrate epoll fixes from David before they rot for example. Nicolas Le mer. 21 avr. 2021 à 21:03, Tobias Pape a écrit : > > > Hai > > > > On 21. Apr 2021, at 20:37, Nicolas Cellier wrote: > > > > > > Hi all, > > may I suggest that we put a > > > > #ifdef HAVE_CONFIG_H > > # include "config.h" > > #endif > > > > ahead of a few strategic platforms (and src) files so as to rescue the > > linux build? > > Currently, the builds fail because of #error directive in config.h... > > I put it there because features.h depends on config.h > > > For some files that already include sqConfig.h, just moving sqConfig.h > > ahead generally also solves the problem... > > I'm open to putting sqconfig.h back where it was, > but it seems it broke the development of some windows features. > It seems thats why > https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e > exists, which moved the .h's around. > > So you should wait for Eliot before moving on here, as he explicitly asks: > "I ask anyone wishing to alter the system here to please contact me and discuss > before making changes. " > > Best regards > -Tobias > > > I've tried it with some success... > > From notifications at github.com Wed Apr 21 19:52:48 2021 From: notifications at github.com (fmateoc) Date: Wed, 21 Apr 2021 12:52:48 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] primitiveTranslateStringWithTable modifies symbols in place, it should be reserved for non-literal strings only (#561) Message-ID: After making sure a string was not interned, ( "Symbol findInterned: 'test123'" returned nil ), I did | s | s := #TEST123. s translateToLowercase. s -> (Symbol findInterned: s) and the resulting s is a Symbol and it is not interned. To make sure that the primitive is invoked (and not its fallback code), put a halt in ByteString class >> #translate:from:to:table: -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/561 -------------- next part -------------- An HTML attachment was scrubbed... URL: From florin.mateoc at gmail.com Wed Apr 21 19:53:46 2021 From: florin.mateoc at gmail.com (Florin Mateoc) Date: Wed, 21 Apr 2021 15:53:46 -0400 Subject: [Vm-dev] primitiveTranslateStringWithTable In-Reply-To: References: Message-ID: Done https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/561 On Wed, Apr 21, 2021 at 3:02 PM Nicolas Cellier < nicolas.cellier.aka.nice at gmail.com> wrote: > > Florin, would you mind opening an issue here? > https://github.com/OpenSmalltalk/opensmalltalk-vm/issues > > Le mer. 21 avr. 2021 à 19:59, Florin Mateoc a > écrit : > > > > > > Yes, you are most likely getting the errorNoModification only because of > the primitive fallback code > > > > On Wed, Apr 21, 2021 at 1:52 PM Nicolas Cellier < > nicolas.cellier.aka.nice at gmail.com> wrote: > >> > >> > >> Hmm OK, > >> on a recently recompiled spur 64bits VM I've got errorNoModification, > >> maybe because the optional primitive is missing? > >> On 32 bits spur VM though, I get the behavior that you described. > >> > >> Le mer. 21 avr. 2021 à 14:54, Florin Mateoc > a écrit : > >> > > >> > > >> > Hi Nicolas, > >> > > >> > I did try it. After making sure a string was not interned, ( "Symbol > findInterned: 'test123'" return nil ), I did > >> > > >> > | s | s := #TEST123. > >> > s translateToLowercase. > >> > Symbol findInterned: s > >> > > >> > and the resulting s is a Symbol and it is not interned > >> > > >> > Florin > >> > > >> > On Wed, Apr 21, 2021 at 2:06 AM Nicolas Cellier < > nicolas.cellier.aka.nice at gmail.com> wrote: > >> >> > >> >> > >> >> Hi Florin, > >> >> did you try it? It should fail if passing a literal > (ModificationForbidden). > >> >> I see that it's only ever sent to copy asString, for case translation > >> >> or converting lineEndings... > >> >> > >> >> Le mer. 21 avr. 2021 à 01:17, Florin Mateoc > a écrit : > >> >> > > >> >> > > >> >> > Hi, > >> >> > > >> >> > While looking at some of the more exotic primitives, I stumbled > upon this little gem. > >> >> > I think it's bad enough that it modifies strings in place (some of > those could be method literals), but it even modifies symbols in place, > without adding them to the symbol table. > >> >> > > >> >> > I would say this is a bug, I don't think symbols should be > modified in place (other than by the #intern: method), but this does not > look unintentional - apparently ByteSymbol class >> > #translate:from:to:table: was added specifically to make the primitive work > on symbols too. > >> >> > > >> >> > Does anybody have any insight into this, is this functionality > (modifying symbols in place) used anywhere? > >> >> > > >> >> > Thank you, > >> >> > Florin > >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cellier.aka.nice at gmail.com Wed Apr 21 20:12:45 2021 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 22:12:45 +0200 Subject: [Vm-dev] primitiveTranslateStringWithTable In-Reply-To: References: Message-ID: thanks! Le mer. 21 avr. 2021 à 21:54, Florin Mateoc a écrit : > > > Done > https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/561 > > On Wed, Apr 21, 2021 at 3:02 PM Nicolas Cellier wrote: >> >> >> Florin, would you mind opening an issue here? >> https://github.com/OpenSmalltalk/opensmalltalk-vm/issues >> >> Le mer. 21 avr. 2021 à 19:59, Florin Mateoc a écrit : >> > >> > >> > Yes, you are most likely getting the errorNoModification only because of the primitive fallback code >> > >> > On Wed, Apr 21, 2021 at 1:52 PM Nicolas Cellier wrote: >> >> >> >> >> >> Hmm OK, >> >> on a recently recompiled spur 64bits VM I've got errorNoModification, >> >> maybe because the optional primitive is missing? >> >> On 32 bits spur VM though, I get the behavior that you described. >> >> >> >> Le mer. 21 avr. 2021 à 14:54, Florin Mateoc a écrit : >> >> > >> >> > >> >> > Hi Nicolas, >> >> > >> >> > I did try it. After making sure a string was not interned, ( "Symbol findInterned: 'test123'" return nil ), I did >> >> > >> >> > | s | s := #TEST123. >> >> > s translateToLowercase. >> >> > Symbol findInterned: s >> >> > >> >> > and the resulting s is a Symbol and it is not interned >> >> > >> >> > Florin >> >> > >> >> > On Wed, Apr 21, 2021 at 2:06 AM Nicolas Cellier wrote: >> >> >> >> >> >> >> >> >> Hi Florin, >> >> >> did you try it? It should fail if passing a literal (ModificationForbidden). >> >> >> I see that it's only ever sent to copy asString, for case translation >> >> >> or converting lineEndings... >> >> >> >> >> >> Le mer. 21 avr. 2021 à 01:17, Florin Mateoc a écrit : >> >> >> > >> >> >> > >> >> >> > Hi, >> >> >> > >> >> >> > While looking at some of the more exotic primitives, I stumbled upon this little gem. >> >> >> > I think it's bad enough that it modifies strings in place (some of those could be method literals), but it even modifies symbols in place, without adding them to the symbol table. >> >> >> > >> >> >> > I would say this is a bug, I don't think symbols should be modified in place (other than by the #intern: method), but this does not look unintentional - apparently ByteSymbol class >> #translate:from:to:table: was added specifically to make the primitive work on symbols too. >> >> >> > >> >> >> > Does anybody have any insight into this, is this functionality (modifying symbols in place) used anywhere? >> >> >> > >> >> >> > Thank you, >> >> >> > Florin >> >> >> > From Das.Linux at gmx.de Wed Apr 21 20:13:17 2021 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed, 21 Apr 2021 22:13:17 +0200 Subject: [Vm-dev] rescuing linux builds In-Reply-To: References: Message-ID: > On 21. Apr 2021, at 21:35, Nicolas Cellier wrote: > > > Constantly red builds cannot sustainably scale anyway. true. -t From notifications at github.com Wed Apr 21 20:36:05 2021 From: notifications at github.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 13:36:05 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Failing linux build due to error directive in config.h (#560) In-Reply-To: References: Message-ID: The solution shall take this commit message into account https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e Unfortunately, the TERF VM is not build here, so it's uneasy to tell whether we break it or not... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/560#issuecomment-824340466 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Apr 21 21:03:26 2021 From: notifications at github.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 14:03:26 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Changes to sq.h and sqAssert.h to accompany commit (aafcb78) In-Reply-To: References: Message-ID: I'm amazed to not find the IMPORT/EXPORT directives in sqVirtualMachine.h IMO, the right solution is already sketched in minheadless: ``` $ grep -r VM_FUNCTION_EXPORT platforms/ platforms/minheadless/windows/sqPlatformSpecific-Win32.h:# undef VM_FUNCTION_EXPORT platforms/minheadless/windows/sqPlatformSpecific-Win32.h:# define VM_FUNCTION_EXPORT(returnType) __declspec( dllexport ) returnType platforms/minheadless/windows/sqPlatformSpecific-Win32.h:# undef VM_FUNCTION_EXPORT platforms/minheadless/windows/sqPlatformSpecific-Win32.h:# define VM_FUNCTION_EXPORT(returnType) __declspec( dllimport ) returnType ``` The relevant section is: ``` # if defined(BUILD_VM_CORE) && !defined(VM_CORE_STATIC) # undef VM_FUNCTION_EXPORT # define VM_FUNCTION_EXPORT(returnType) __declspec( dllexport ) returnType # else # undef VM_FUNCTION_EXPORT # define VM_FUNCTION_EXPORT(returnType) __declspec( dllimport ) returnType # endif # ``` then we would just have to declare `VM_FUNCTION_EXPORT(some_return_type) some_foo_func( some_arg_type );` in sqVirtualMachine.h. then at compile time, we just use `-DBUILD_VM_CORE` for compiling the VM, but omit it for compiling external plugins. Or maybe we can just use `#if !defined(SQUEAK_BUILTIN_PLUGIN)` in the platform specific file, instead of if defined(BUILD_VM_CORE) && !defined(VM_CORE_STATIC) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e#commitcomment-49821048 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Apr 21 21:09:33 2021 From: notifications at github.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 14:09:33 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Changes to sq.h and sqAssert.h to accompany commit (aafcb78) In-Reply-To: References: Message-ID: If sqConfig.h WANTS to #define fseek/ftell as fseeko and ftello, then it just has to first #include . Then any other .c including first "sqConfig.h", then should just work. This is because will not be included twice (it is protected by some #ifndef) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e#commitcomment-49821302 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Apr 21 21:10:48 2021 From: notifications at github.com (Tobias Pape) Date: Wed, 21 Apr 2021 14:10:48 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Changes to sq.h and sqAssert.h to accompany commit (aafcb78) In-Reply-To: References: Message-ID: Problem is that stdio might include features.h -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e#commitcomment-49821371 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Apr 21 21:11:18 2021 From: notifications at github.com (Tobias Pape) Date: Wed, 21 Apr 2021 14:11:18 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Changes to sq.h and sqAssert.h to accompany commit (aafcb78) In-Reply-To: References: Message-ID: and sqConfig should no define fseek/ftell. sqPlatformSpecific should… -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e#commitcomment-49821392 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Apr 21 21:12:29 2021 From: notifications at github.com (Nicolas Cellier) Date: Wed, 21 Apr 2021 14:12:29 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Changes to sq.h and sqAssert.h to accompany commit (aafcb78) In-Reply-To: References: Message-ID: Agree -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e#commitcomment-49821435 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Thu Apr 22 14:53:36 2021 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Thu, 22 Apr 2021 07:53:36 -0700 Subject: [Vm-dev] [Cuis-dev] Cuis 68000 64bit V3 image ? In-Reply-To: <568193919.50776493.1618940323994.JavaMail.zimbra@telenet.be> References: <568193919.50776493.1618940323994.JavaMail.zimbra@telenet.be> Message-ID: David, Sorry for the delay. Busy life. I was hoping someone else would repond to this. There are only the 3 supported Cuis image structure variants. With a virtual machine, 68K is not an "image kind exists" problem as much as a "VM support kind" of problem. I suggest you ask the OpenSmalltalk folks on the vm-dev list (CC'ed) about a 68K VM which supports one or more of the currently available image formats. BTW, what OS are you running on? [E.g. "uname -a" on Linux/Unix] Good luck. -KenD ====== On 2021-04-20 10:38, stes--- via Cuis-dev wrote: > For the v3 image I have: > > $ /usr/lib/squeak/4.19.6-3799/ckformat src/cuis/Cuis5.0-4567-v3.image > 6505 > > 6505: a 32-bit V3 image with closure support and float words stored in > native platform order > > Question: does there exist a 64bit 68000 type of image for Cuis ? > > 68000: a 64-bit V3 image with no closure support and no native > platform float word order requirement > > The 2 other Cuis images I see are: Cuis5.0-4567.image and > Cuis5.0-4567-32.image > > 68021 > 6521 > > those are Spur images: > > 6521: a 32-bit Spur image with closure support and float words stored > in native platform order using Spur object format > 68021: a 64-bit Spur image with closure support and float words stored > in native platform order using Spur object format > > > My understanding is that there are very few Squeak images out there > that use the 68000 format. > I'm just curious whether there exists a Cuis image for that V3 68000 > format. > > Thanks, > David Stes From stes at telenet.be Thu Apr 22 15:49:19 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Thu, 22 Apr 2021 17:49:19 +0200 (CEST) Subject: [Vm-dev] How to convert 32-bit images to 64-bit images? In-Reply-To: <846286085.13618176.1618247926366.JavaMail.zimbra@telenet.be> References: <846286085.13618176.1618247926366.JavaMail.zimbra@telenet.be> Message-ID: <1833355593.58822196.1619106559611.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 According to http://wiki.squeak.org/squeak/2315 using the package from http://www.squeaksource.com/SystemTracing an old (but potentially interesting) method would be : SystemTracer64 writeImage: 'clone-64bit.image' et voila ... image cloned to a 64bit image. In practice it may be a little bit more complex. For example I open Squeak4.6-15102.image, then fileIn the SystemTracing package (Monticello) that works. Loading SystemTracingV3-dtl.29.mcz works It has an interesting looking script : traceTo64Script "This is a script that can be filed into a 32bit image to trace that image to 64bit format ..." But the above method creates for me the error Tracing and writing 421965 objects ... MessageNotUnderstood:isCompiledCode If you manage to do this, I'd be interested in your experiences. David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJggZqcAAoJENdFDkXGicizciwH+wW9tq5OO+c8GWM83VDXA6Hr jqAUFZzjuEZQ0nciosSXSou09xfJZCQJHsoHVG95XjWrAK+n3oIR/Z/sPcYs+h8K 4mFdPAGoDp9Jr8eVslRhA5LODLNz7dl+B3v3xbw0tVspJcsiUYIe/gMoxAmVIgfW 2tzJtDozs3Ux+ai0Tg96Nn1K3xk03887WgfDlRqbP3GeQ4hGhlg4CMs5wC80w7Mw tmhXOmrHQpc8F+V9THmVXoyiC6hIT0Ng41yLH++Sxo8AX2HBiP+yn2rALKHoYMFQ 8FfA2hGDhI7bbSOxMa8jZrnhdXUieCeg8+vLLFL8KRqr7jyVTUUcW8sn3VzIi/Y= =c3Fh -----END PGP SIGNATURE----- From stes at telenet.be Thu Apr 22 16:02:14 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Thu, 22 Apr 2021 18:02:14 +0200 (CEST) Subject: [Vm-dev] How to convert 32-bit images to 64-bit images? In-Reply-To: <1833355593.58822196.1619106559611.JavaMail.zimbra@telenet.be> References: <846286085.13618176.1618247926366.JavaMail.zimbra@telenet.be> <1833355593.58822196.1619106559611.JavaMail.zimbra@telenet.be> Message-ID: <1945868006.58922557.1619107334257.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 When I use an older version of the SystemTracing package, it is fast, and it converts from 32bit to 64bit, so it works ! In my case for Squeak4.6-15102.image I used SystemTracing-dtl.21.mcz instead of the latest SystemTracing-dtl.29.mcz. The 21 version seems to be OK. It's very fast and says after a few seconds: "Done tracing!" I'm impressed: $ ckformat test-64bit.image 68002 it effectively seems to clone the $ ckformat test.image 6505 to a 64bit format image. Unfortunately when I open the 68002 image, it works, the image opens, but it seems it's still displaying the "Tracing and writing" message. I think I probably have to follow the SystemTracing instructions to do this without first filing in the package ... David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJggZ2iAAoJENdFDkXGicizm3wIAKnGRr5wjwxDBKohd9usq289 bkAIEWuj0njn8WDluOFtpPu17UZM5EMs4Gi47eKnFxvrBsLiQK7PTSvucn3rIync yCMSMQEchbPo4ClzmpSYv14WG8ypyR3YrPQnoTrYpGx7F/nfOC3LHkUq6ln90dPV viZX/+etXRtlDsq0nIABo/LCVVrO0JvT89egfxr3Hg2M1QYkIFlcoVswFZ2FNNO8 AomZu5jMFziGPP0UGpFJpg5HbU77ILkxJn0S8efDLGB8iEH+IQGzzo3DJ+C4tFBh BrVCZLUvpDnYL7m4qUtkk1zaQJrJhZE8m7v91tLn/cHHYc2TsmfSvYSBuw9Kjno= =xd5k -----END PGP SIGNATURE----- From stes at telenet.be Thu Apr 22 16:22:20 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Thu, 22 Apr 2021 18:22:20 +0200 (CEST) Subject: [Vm-dev] patch for subversion (classical VM) primitiveLocalMicroseconds In-Reply-To: <1857423771.50743645.1618939647666.JavaMail.zimbra@telenet.be> References: <1857423771.50743645.1618939647666.JavaMail.zimbra@telenet.be> Message-ID: <1287333613.59085849.1619108540200.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, Is it please possible to add (to subversion SVN repo) the patch for time_t arithmetic in primitiveLocalMicrosecondClock. See patch in attach. Basically there is a bug with arithmetic on "signed long" (time_t). I think it is meant to be arithmetic (multiplication) on "signed long long". Note that for me the 64bit VM is NOT affected by this bug. $ cc -m32 sizeoftime.c $ ./a.out sizeof time_t is 4 sizeof long is 4 sizeof long long is 8 $ cc -m64 sizeoftime.c $ ./a.out sizeof time_t is 8 sizeof long is 8 sizeof long long is 8 The problem on the 32bit VM is for me that primitiveLocalMicrosecondClock, is trying to assign to a sqLong (long long) but it is first doing arithmetic on the long type (which causes overflow). David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJggaI7AAoJENdFDkXGicizjosH/jHA/28NE/jKuuo3gZQYZeLQ Auhb/gWP8xSVDFCEJvMEvH7x+p8LhqDNWxk/F/pKgdQypnu2i/cwTHYJTLr0Knk/ mFqoNrPCk2n6Z4fFBf2YX5JyDZ9ifPO3tb+vOStypR9bf3IP5o0cmLH2JAoQ22hp y3uZSe12JBZ6yMu3JTxrsWOZPV3rKVIeupSeA9cK7k7IL50iFOYYD+an3xqfzHVz 6ByE7VeWuTbLFdKuANndqR+xdv4ZMgmn2/EB2consfYHI5o4RRXlWhTqgvevlLNG 0ubFpKG39u26Fy+ACjD3O3e5JkiJe2U3TgvBkC3nUpxqga78ZN8IROOa+qHyEUs= =D7S9 -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: primitiveLocalMicrosecondClock.patch Type: text/x-patch Size: 615 bytes Desc: not available URL: From noreply at github.com Thu Apr 22 20:20:01 2021 From: noreply at github.com (Nicolas Cellier) Date: Thu, 22 Apr 2021 13:20:01 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] efb8df: always include **BEFORE** defining fseek... Message-ID: Branch: refs/heads/fix_include_order Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: efb8df9a094dc7d4a072ca11de6a0a8f549d06f8 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/efb8df9a094dc7d4a072ca11de6a0a8f549d06f8 Author: Nicolas Cellier Date: 2021-04-22 (Thu, 22 Apr 2021) Changed paths: M platforms/win32/vm/sqPlatformSpecific.h Log Message: ----------- always include **BEFORE** defining fseeko/ftello This other way around creates a compilation error. This way, we can include sqConfig.h and in whatever order we wish. Commit: df03d843cd045c07a8e4b94b86e571ed47fe5fd7 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/df03d843cd045c07a8e4b94b86e571ed47fe5fd7 Author: Nicolas Cellier Date: 2021-04-22 (Thu, 22 Apr 2021) Changed paths: M platforms/Cross/vm/sqAssert.h Log Message: ----------- Discard the EXPORT from sqAssert.h for declaring VM functions If we don't need to define the EXPORT in sqVirtaulMachine.h, then we don't need it either in sqAssert.h Otherwise, it's a recipe for creating conflicting declarations and make some compilation fail (for example building a plugin whishing to sqAssert as SQUEAK_BUILTIN_PLUGIN) Only keep IMPORT for the case of SQUEAK_EXTERNAL_PLUGIN. Commit: 681219a6d830e5be94e5e2035d0f78504d8b33e6 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/681219a6d830e5be94e5e2035d0f78504d8b33e6 Author: Nicolas Cellier Date: 2021-04-22 (Thu, 22 Apr 2021) Changed paths: M platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c M platforms/Cross/plugins/IA32ABI/xabicc.c M platforms/Cross/plugins/SoundCodecPrims/sqSoundCodecPluginBasicPrims.c M platforms/Cross/plugins/Squeak3D/b3dInit.c M platforms/Cross/plugins/Squeak3D/b3dMain.c M platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c M platforms/Cross/vm/sqHeapMap.c M platforms/Cross/vm/sqVirtualMachine.c M platforms/unix/config/getversion.c M platforms/unix/plugins/FileAttributesPlugin/faSupport.c M platforms/unix/vm/aio.c M platforms/unix/vm/sqUnixVMProfile.c Log Message: ----------- Make sure that config.h is included first This is mandatory for linux builds. config.h is included first by sqConfig.h sqConfig.h was included in top positions previously. But due to compilation order problems on windows, it has been moved further. We can remove those `#include "config.h"` if `#include "sqConfig.h"` is moved toward top again That is once the windows problem is resolved Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/efb8df9a094d%5E...681219a6d830 From lewis at mail.msen.com Thu Apr 22 21:35:52 2021 From: lewis at mail.msen.com (David T. Lewis) Date: Thu, 22 Apr 2021 17:35:52 -0400 Subject: [Vm-dev] patch for subversion (classical VM) primitiveLocalMicroseconds In-Reply-To: <1857423771.50743645.1618939647666.JavaMail.zimbra@telenet.be> References: <1857423771.50743645.1618939647666.JavaMail.zimbra@telenet.be> Message-ID: <20210422213552.GB333@shell.msen.com> Hi David, Sorry have not had time to respond to this yet, but I'm definitely interested in the fix. Thanks, Dave On Tue, Apr 20, 2021 at 07:27:27PM +0200, stes at PANDORA.BE wrote: > > Hi, > > This is a patch for subversion squeakvm 4.19.6. > > It relates to the primitiveLocalMicrosecondClock. > > It does not affect OpenSmalltalk (I think the code in OpenSmalltalk > is different and is not affected by the following problem). > > I'm not sure it is actually desired at all to implement > primitiveLocalMicrosecondClock in the 32bit case in the classical SqueakVM, > but if it is, there is an arithmetical overflow on my platform (Solaris 32bit). > > I don't think it affects the classical SqueakVM Solaris 64bit by the way, > (for the 68000 type of Smalltalk images). > > The patch is for the file platforms/unix/vm/sqUnixMain.c > function sqUnixUtcWithOffset(). > > This function is doing: > > time_t seconds= timeval.tv_sec; > suseconds_t usec= timeval.tv_usec; > *microSeconds= seconds * 1000000 + usec; > > unfortunately the multiplication (seconds * 1000000) is triggering overflow. > > The type time_t is defined for me as: > typedef long time_t; > typedef long suseconds_t; /* signed # of microseconds */ > > Note that I believe that in the 32bit case this has size 4 bytes > and in the 64bit case this has size 8 bytes (for me on Solaris). > > So Solaris 64bit is not affected by the multiplication error, but 32bit is. > > I propose the following patch: > > Index: vm/sqUnixMain.c > =================================================================== > - --- vm/sqUnixMain.c (revision 3799) > +++ vm/sqUnixMain.c (working copy) > @@ -213,11 +213,13 @@ > */ > sqInt sqUnixUtcWithOffset(sqLong *microSeconds, int *offset) > { > + sqLong theMicroSeconds; > struct timeval timeval; > if (gettimeofday(&timeval, NULL) == -1) return -1; > time_t seconds= timeval.tv_sec; > suseconds_t usec= timeval.tv_usec; > - - *microSeconds= seconds * 1000000 + usec; > + theMicroSeconds = seconds; > + *microSeconds= theMicroSeconds * 1000000 + usec; > > The rationale is that the function seems to assume anyway that it is possible > to store the result in *microSeconds which is of type sqLong. > > So by defining a local variable theMicroSeconds and casting seconds to that > type, and then multiplying (instead of 32bit multiply, on the 64bit), > it may work ... at least it seems to work for me. > > Maybe an alternative could be simply NOT to implement > primitiveLocalMicrosecondClock in the 32bit case ... > > If primitiveLocalMicrosecondClock would return nil (primitiveFail) in the 32bit > case, it would also be a possible solution. > > The primitive assumes anyway that it returns the microseconds as LargeInteger. > > David Stes > > PS1: in attach the patch to apply if desired > > PS2: I've tested this on Solaris - all platforms are affected; > it is hard to say for me how other platforms are affected, > given their time_t definition and their sqLong definition. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQEcBAEBCAAGBQJgfw4nAAoJENdFDkXGicizFVQH/3GhR/K0K9H9AyS4uBCeEIxg > lv4rCq2w9tXWeLP8eUc50sJnAsK7UVnO6FUpdFmF0qauN0414C5KmrQcIivNoEvH > kMiWduIWXfzX7VlHj56pyuYym73qOZDZowFOvnPjaVQfKcqC9yyabYrEF7THc8j3 > F8bVwCy/oz1h9/Mi6VbCrjz1G+ePmowXiv5vkJFAwQDNGrc53OyhQm6Wfibdwb/8 > 6C2C/loPeStDf9f3Y3zhIkelp0RI4TL+h+D+REaf0kWV/TubIx648hcP4uvBhyQk > 6hwD7OHHechkJLgYAni1ipGXfX03cAM2plLIgKHahypNz1mVcZhu/6SSMTQK1ik= > =gf1g > -----END PGP SIGNATURE----- From lewis at mail.msen.com Thu Apr 22 21:57:11 2021 From: lewis at mail.msen.com (David T. Lewis) Date: Thu, 22 Apr 2021 17:57:11 -0400 Subject: [Vm-dev] patch for subversion (classical VM) primitiveLocalMicroseconds In-Reply-To: <20210422213552.GB333@shell.msen.com> References: <1857423771.50743645.1618939647666.JavaMail.zimbra@telenet.be> <20210422213552.GB333@shell.msen.com> Message-ID: <20210422215711.GA3291@shell.msen.com> Thanks David, updated in SVN: ------------------------------------------------------------------------ r3800 | lewis | 2021-04-22 17:53:06 -0400 (Thu, 22 Apr 2021) | 3 lines Integer arithmetic fix for sqUnixUtcWithOffset by David Stes http://lists.squeakfoundation.org/pipermail/vm-dev/2021-April/036189.html Dave On Thu, Apr 22, 2021 at 05:35:52PM -0400, David T. Lewis wrote: > > Hi David, > > Sorry have not had time to respond to this yet, but I'm definitely > interested in the fix. > > Thanks, > Dave > > > On Tue, Apr 20, 2021 at 07:27:27PM +0200, stes at PANDORA.BE wrote: > > > > Hi, > > > > This is a patch for subversion squeakvm 4.19.6. > > > > It relates to the primitiveLocalMicrosecondClock. > > > > It does not affect OpenSmalltalk (I think the code in OpenSmalltalk > > is different and is not affected by the following problem). > > > > I'm not sure it is actually desired at all to implement > > primitiveLocalMicrosecondClock in the 32bit case in the classical SqueakVM, > > but if it is, there is an arithmetical overflow on my platform (Solaris 32bit). > > > > I don't think it affects the classical SqueakVM Solaris 64bit by the way, > > (for the 68000 type of Smalltalk images). > > > > The patch is for the file platforms/unix/vm/sqUnixMain.c > > function sqUnixUtcWithOffset(). > > > > This function is doing: > > > > time_t seconds= timeval.tv_sec; > > suseconds_t usec= timeval.tv_usec; > > *microSeconds= seconds * 1000000 + usec; > > > > unfortunately the multiplication (seconds * 1000000) is triggering overflow. > > > > The type time_t is defined for me as: > > typedef long time_t; > > typedef long suseconds_t; /* signed # of microseconds */ > > > > Note that I believe that in the 32bit case this has size 4 bytes > > and in the 64bit case this has size 8 bytes (for me on Solaris). > > > > So Solaris 64bit is not affected by the multiplication error, but 32bit is. > > > > I propose the following patch: > > > > Index: vm/sqUnixMain.c > > =================================================================== > > - --- vm/sqUnixMain.c (revision 3799) > > +++ vm/sqUnixMain.c (working copy) > > @@ -213,11 +213,13 @@ > > */ > > sqInt sqUnixUtcWithOffset(sqLong *microSeconds, int *offset) > > { > > + sqLong theMicroSeconds; > > struct timeval timeval; > > if (gettimeofday(&timeval, NULL) == -1) return -1; > > time_t seconds= timeval.tv_sec; > > suseconds_t usec= timeval.tv_usec; > > - - *microSeconds= seconds * 1000000 + usec; > > + theMicroSeconds = seconds; > > + *microSeconds= theMicroSeconds * 1000000 + usec; > > > > The rationale is that the function seems to assume anyway that it is possible > > to store the result in *microSeconds which is of type sqLong. > > > > So by defining a local variable theMicroSeconds and casting seconds to that > > type, and then multiplying (instead of 32bit multiply, on the 64bit), > > it may work ... at least it seems to work for me. > > > > Maybe an alternative could be simply NOT to implement > > primitiveLocalMicrosecondClock in the 32bit case ... > > > > If primitiveLocalMicrosecondClock would return nil (primitiveFail) in the 32bit > > case, it would also be a possible solution. > > > > The primitive assumes anyway that it returns the microseconds as LargeInteger. > > > > David Stes > > > > PS1: in attach the patch to apply if desired > > > > PS2: I've tested this on Solaris - all platforms are affected; > > it is hard to say for me how other platforms are affected, > > given their time_t definition and their sqLong definition. > > > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v2 > > > > iQEcBAEBCAAGBQJgfw4nAAoJENdFDkXGicizFVQH/3GhR/K0K9H9AyS4uBCeEIxg > > lv4rCq2w9tXWeLP8eUc50sJnAsK7UVnO6FUpdFmF0qauN0414C5KmrQcIivNoEvH > > kMiWduIWXfzX7VlHj56pyuYym73qOZDZowFOvnPjaVQfKcqC9yyabYrEF7THc8j3 > > F8bVwCy/oz1h9/Mi6VbCrjz1G+ePmowXiv5vkJFAwQDNGrc53OyhQm6Wfibdwb/8 > > 6C2C/loPeStDf9f3Y3zhIkelp0RI4TL+h+D+REaf0kWV/TubIx648hcP4uvBhyQk > > 6hwD7OHHechkJLgYAni1ipGXfX03cAM2plLIgKHahypNz1mVcZhu/6SSMTQK1ik= > > =gf1g > > -----END PGP SIGNATURE----- > From commits at source.squeak.org Thu Apr 22 22:34:19 2021 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 22 Apr 2021 22:34:19 0000 Subject: [Vm-dev] VM Maker Inbox: VMMaker.oscog-nice.2957.mcz Message-ID: Nicolas Cellier uploaded a new version of VMMaker to project VM Maker Inbox: http://source.squeak.org/VMMakerInbox/VMMaker.oscog-nice.2957.mcz ==================== Summary ==================== Name: VMMaker.oscog-nice.2957 Author: nice Time: 23 April 2021, 12:34:08.871623 am UUID: e820d3f1-42f7-4e56-a91f-1d4961d2a2c5 Ancestors: VMMaker.oscog-eem.2956 Use prescribed order for including headers. Put sqConfig.h back as top header. This is required on linux, config.h must be included before stdio.h. On windows, putting sqConfig.h before stdio.h should work again after fix in git branch fix_include_order. =============== Diff against VMMaker.oscog-eem.2956 =============== Item was changed: ----- Method: CCodeGenerator>>emitCHeaderOn: (in category 'C code generator') ----- emitCHeaderOn: aStream "Emit the initial part of a source file on aStream, comprising the version stamp, the global struct usage flags, the header files and preamble code." | headerClass | headerClass := [vmClass coreInterpreterClass] on: MessageNotUnderstood do: [:ex| vmClass]. aStream nextPutAll: (self fileHeaderVersionStampForSourceClass: headerClass); cr; cr. self emitGlobalStructFlagOn: aStream. (vmClass isNil or: [vmClass wantsSqDotH]) ifTrue: [self addHeaderFileFirst: '"sq.h"']. + "Additional header files; use the prescribed order." + self emitHeaderFiles: headerFiles on: aStream. - "Additional header files; include C library ones first." - self emitHeaderFiles: (headerFiles select: [:hdr| hdr includes: $<]) on: aStream. - "Additional header files; include squeak VM ones last" - self emitHeaderFiles: (headerFiles reject: [:hdr| hdr includes: $<]) on: aStream. self maybePutPreambleFor: vmClass on: aStream. aStream cr! Item was changed: ----- Method: Cogit class>>declareCVarsIn: (in category 'translation') ----- declareCVarsIn: aCCodeGenerator | backEnd | backEnd := CogCompilerClass basicNew. #( 'coInterpreter' 'objectMemory' 'methodZone' 'objectRepresentation' 'cogBlockMethodSurrogateClass' 'cogMethodSurrogateClass' 'nsSendCacheSurrogateClass' 'threadManager' 'processor' 'lastNInstructions' 'simulatedAddresses' 'simulatedTrampolines' 'simulatedVariableGetters' 'simulatedVariableSetters' 'processorFrameValid' 'printRegisters' 'printInstructions' 'clickConfirm' 'singleStep') do: [:simulationVariableNotNeededForRealVM| aCCodeGenerator removeVariable: simulationVariableNotNeededForRealVM]. NewspeakVM ifFalse: [#( 'selfSendTrampolines' 'dynamicSuperSendTrampolines' 'implicitReceiverSendTrampolines' 'outerSendTrampolines' 'ceEnclosingObjectTrampoline' 'numIRCs' 'indexOfIRC' 'theIRCs') do: [:variableNotNeededInNormalVM| aCCodeGenerator removeVariable: variableNotNeededInNormalVM]]. aCCodeGenerator removeConstant: #COGMTVM. "this should be defined at compile time" "N.B. We *do not* include sq.h; it pulls in conflicting definitions now that sqVirtualMachine.h declares cointerp's functions, and declares some of them inaccurately for histrical reasons. We pull in CoInterpreter's api via cointerp.h which is accurate." aCCodeGenerator + addHeaderFile:'"sqConfig.h"'; "config.h must be first on linux" addHeaderFile:''; "for e.g. offsetof" addHeaderFile:''; addHeaderFile:''; addHeaderFile:''; - addHeaderFile:'"sqConfig.h"'; addHeaderFile:'"sqPlatformSpecific.h"'; "e.g. solaris overrides things for sqCogStackAlignment.h" addHeaderFile:'"sqMemoryAccess.h"'; addHeaderFile:'"sqCogStackAlignment.h"'; addHeaderFile:'"dispdbg.h"'; "must precede cointerp.h & cogit.h otherwise NoDbgRegParms gets screwed up" addHeaderFile:'"cogmethod.h"'. NewspeakVM ifTrue: [aCCodeGenerator addHeaderFile:'"nssendcache.h"']. aCCodeGenerator addHeaderFile:'#if COGMTVM'; addHeaderFile:'"cointerpmt.h"'; addHeaderFile:'#else'; addHeaderFile:'"cointerp.h"'; addHeaderFile:'#endif'; addHeaderFile:'"cogit.h"'. aCCodeGenerator var: #ceGetFP declareC: 'usqIntptr_t (*ceGetFP)(void)'; var: #ceGetSP declareC: 'usqIntptr_t (*ceGetSP)(void)'; var: #ceCaptureCStackPointers declareC: 'void (*ceCaptureCStackPointers)(void)'; var: #ceInvokeInterpret declareC: 'void (*ceInvokeInterpret)(void)'; var: #ceEnterCogCodePopReceiverReg declareC: 'void (*ceEnterCogCodePopReceiverReg)(void)'; var: #realCEEnterCogCodePopReceiverReg declareC: 'void (*realCEEnterCogCodePopReceiverReg)(void)'; var: #ceCallCogCodePopReceiverReg declareC: 'void (*ceCallCogCodePopReceiverReg)(void)'; var: #realCECallCogCodePopReceiverReg declareC: 'void (*realCECallCogCodePopReceiverReg)(void)'; var: #ceCallCogCodePopReceiverAndClassRegs declareC: 'void (*ceCallCogCodePopReceiverAndClassRegs)(void)'; var: #realCECallCogCodePopReceiverAndClassRegs declareC: 'void (*realCECallCogCodePopReceiverAndClassRegs)(void)'; var: #postCompileHook declareC: 'void (*postCompileHook)(CogMethod *)'; var: #openPICList declareC: 'CogMethod *openPICList = 0'; var: #maxMethodBefore type: #'CogBlockMethod *'; var: 'enumeratingCogMethod' type: #'CogMethod *'. aCCodeGenerator var: #ceTryLockVMOwner declareC: '#if COGMTVM\usqIntptr_t (*ceTryLockVMOwner)(usqIntptr_t)\#endif'. backEnd numICacheFlushOpcodes > 0 ifTrue: [aCCodeGenerator var: #ceFlushICache declareC: 'static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to)']. aCCodeGenerator var: #ceFlushDCache declareC: '#if DUAL_MAPPED_CODE_ZONE\static void (*ceFlushDCache)(usqIntptr_t from, usqIntptr_t to)\#endif'; var: #codeToDataDelta declareC: '#if DUAL_MAPPED_CODE_ZONE\static sqInt codeToDataDelta\#else\# define codeToDataDelta 0\#endif'. aCCodeGenerator declareVar: 'aMethodLabel' type: #'AbstractInstruction'; "Has to come lexicographically before backEnd & methodLabel" var: #backEnd declareC: 'AbstractInstruction * const backEnd = &aMethodLabel'; var: #methodLabel declareC: 'AbstractInstruction * const methodLabel = &aMethodLabel'. self declareC: #(abstractOpcodes stackCheckLabel blockEntryLabel blockEntryNoContextSwitch stackOverflowCall sendMiss entry noCheckEntry selfSendEntry dynSuperEntry fullBlockNoContextSwitchEntry fullBlockEntry picMNUAbort picInterpretAbort endCPICCase0 endCPICCase1 cPICEndOfCodeLabel) as: #'AbstractInstruction *' in: aCCodeGenerator. aCCodeGenerator declareVar: #cPICPrototype type: #'CogMethod *'; declareVar: #blockStarts type: #'BlockStart *'; declareVar: #fixups type: #'BytecodeFixup *'; declareVar: #methodZoneBase type: #usqInt. aCCodeGenerator var: #ordinarySendTrampolines declareC: 'sqInt ordinarySendTrampolines[NumSendTrampolines]'; var: #superSendTrampolines declareC: 'sqInt superSendTrampolines[NumSendTrampolines]'. BytecodeSetHasDirectedSuperSend ifTrue: [aCCodeGenerator var: #directedSuperSendTrampolines declareC: 'sqInt directedSuperSendTrampolines[NumSendTrampolines]'; var: #directedSuperBindingSendTrampolines declareC: 'sqInt directedSuperBindingSendTrampolines[NumSendTrampolines]']. NewspeakVM ifTrue: [aCCodeGenerator var: #selfSendTrampolines declareC: 'sqInt selfSendTrampolines[NumSendTrampolines]'; var: #dynamicSuperSendTrampolines declareC: 'sqInt dynamicSuperSendTrampolines[NumSendTrampolines]'; var: #implicitReceiverSendTrampolines declareC: 'sqInt implicitReceiverSendTrampolines[NumSendTrampolines]'; var: #outerSendTrampolines declareC: 'sqInt outerSendTrampolines[NumSendTrampolines]']. aCCodeGenerator addConstantForBinding: self bindingForNumTrampolines; var: #trampolineAddresses declareC: 'static char *trampolineAddresses[NumTrampolines*2]'; var: #objectReferencesInRuntime declareC: 'static usqInt objectReferencesInRuntime[NumObjRefsInRuntime+1]'; var: #labelCounter type: #int; var: #traceFlags declareC: 'int traceFlags = 8 /* prim trace log on by default */'; var: #cStackAlignment declareC: 'const int cStackAlignment = STACK_ALIGN_BYTES'. aCCodeGenerator declareVar: #minValidCallAddress type: #'usqIntptr_t'. aCCodeGenerator vmClass generatorTable ifNotNil: [:bytecodeGenTable| aCCodeGenerator var: #generatorTable declareC: 'static BytecodeDescriptor generatorTable[', bytecodeGenTable size printString, ']', (self tableInitializerFor: bytecodeGenTable in: aCCodeGenerator)]. "In C the abstract opcode names clash with the Smalltalk generator syntactic sugar. Most of the syntactic sugar is inlined, but alas some remains. Rename the syntactic sugar to avoid the clash." (self organization listAtCategoryNamed: #'abstract instructions') do: [:s| aCCodeGenerator addSelectorTranslation: s to: 'g', (aCCodeGenerator cFunctionNameFor: s)]. aCCodeGenerator addSelectorTranslation: #halt: to: 'haltmsg'. self declareFlagVarsAsByteIn: aCCodeGenerator! From noreply at github.com Thu Apr 22 23:24:19 2021 From: noreply at github.com (Nicolas Cellier) Date: Thu, 22 Apr 2021 16:24:19 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 6dd8df: Generate source with VMMaker.oscog-nice.2957 so a... Message-ID: Branch: refs/heads/fix_include_order Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 6dd8dfabec5b354ee1e05fe890f4ba7f22437013 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/6dd8dfabec5b354ee1e05fe890f4ba7f22437013 Author: Nicolas Cellier Date: 2021-04-23 (Fri, 23 Apr 2021) Changed paths: M spur64src/vm/cogit.h M spur64src/vm/cogitARMv8.c M spur64src/vm/cogitX64SysV.c M spur64src/vm/cogitX64WIN64.c M spur64src/vm/cointerp.c M spur64src/vm/cointerp.h M spur64src/vm/cointerpmt.c M spur64src/vm/cointerpmt.h M spur64src/vm/gcc3x-cointerp.c M spur64src/vm/gcc3x-cointerpmt.c M spurlowcode64src/vm/cogit.h M spurlowcode64src/vm/cogitARMv8.c M spurlowcode64src/vm/cogitX64SysV.c M spurlowcode64src/vm/cogitX64WIN64.c M spurlowcode64src/vm/cointerp.c M spurlowcode64src/vm/cointerp.h M spurlowcode64src/vm/gcc3x-cointerp.c M spurlowcodesrc/vm/cogit.h M spurlowcodesrc/vm/cogitARMv5.c M spurlowcodesrc/vm/cogitIA32.c M spurlowcodesrc/vm/cogitMIPSEL.c M spurlowcodesrc/vm/cointerp.c M spurlowcodesrc/vm/cointerp.h M spurlowcodesrc/vm/gcc3x-cointerp.c M spurlowcodestack64src/vm/gcc3x-interp.c M spurlowcodestack64src/vm/interp.c M spurlowcodestacksrc/vm/gcc3x-interp.c M spurlowcodestacksrc/vm/interp.c M spursista64src/vm/cogit.h M spursista64src/vm/cogitARMv8.c M spursista64src/vm/cogitX64SysV.c M spursista64src/vm/cogitX64WIN64.c M spursista64src/vm/cointerp.c M spursista64src/vm/cointerp.h M spursista64src/vm/gcc3x-cointerp.c M spursistasrc/vm/cogit.h M spursistasrc/vm/cogitARMv5.c M spursistasrc/vm/cogitIA32.c M spursistasrc/vm/cogitMIPSEL.c M spursistasrc/vm/cointerp.c M spursistasrc/vm/cointerp.h M spursistasrc/vm/gcc3x-cointerp.c M spursrc/vm/cogit.h M spursrc/vm/cogitARMv5.c M spursrc/vm/cogitIA32.c M spursrc/vm/cogitMIPSEL.c M spursrc/vm/cointerp.c M spursrc/vm/cointerp.h M spursrc/vm/cointerpmt.c M spursrc/vm/cointerpmt.h M spursrc/vm/gcc3x-cointerp.c M spursrc/vm/gcc3x-cointerpmt.c M spurstack64src/vm/gcc3x-interp.c M spurstack64src/vm/interp.c M spurstack64src/vm/validImage.c M spurstacksrc/vm/gcc3x-interp.c M spurstacksrc/vm/interp.c M spurstacksrc/vm/validImage.c M src/plugins/Squeak3D/Squeak3D.c M src/vm/cogit.h M src/vm/cogitARMv5.c M src/vm/cogitIA32.c M src/vm/cogitMIPSEL.c M src/vm/cointerp.c M src/vm/cointerp.h M src/vm/gcc3x-cointerp.c M stacksrc/vm/gcc3x-interp.c M stacksrc/vm/interp.c Log Message: ----------- Generate source with VMMaker.oscog-nice.2957 so as to restore sqConfig.h inclusion at top This is an attempt at fixing linux builds Hopefully, windows builds should be safe, thanks to earlier workaround. Commit: 1ecf39032a7f11f8de6147dc4687434487bf0eaf https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1ecf39032a7f11f8de6147dc4687434487bf0eaf Author: Nicolas Cellier Date: 2021-04-23 (Fri, 23 Apr 2021) Changed paths: M platforms/Cross/vm/sqSCCSVersion.h M platforms/unix/config/getversion.c Log Message: ----------- try and omit HAVE_CONFIG_H for compiling getVersion Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/681219a6d830...1ecf39032a7f From marcel.taeumel at hpi.de Fri Apr 23 06:28:37 2021 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Fri, 23 Apr 2021 08:28:37 +0200 Subject: [Vm-dev] How to convert 32-bit images to 64-bit images? In-Reply-To: <1945868006.58922557.1619107334257.JavaMail.zimbra@telenet.be> References: <846286085.13618176.1618247926366.JavaMail.zimbra@telenet.be> <1833355593.58822196.1619106559611.JavaMail.zimbra@telenet.be> <1945868006.58922557.1619107334257.JavaMail.zimbra@telenet.be> Message-ID: Hi David, thanks for the info. I suppose that converting non-Spur 32-bit to Spur 64-bit would be a little bit more tricky. At least there are no 64-bit VMs for the pre-Spur (e.g. V3) object format on Windows. Also, I think, converting pre-Spur to Spur requires in-image changes such as to Character, which is then immediate. Best, Marcel Am 22.04.2021 18:02:23 schrieb stes at PANDORA.BE : -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 When I use an older version of the SystemTracing package, it is fast, and it converts from 32bit to 64bit, so it works ! In my case for Squeak4.6-15102.image I used SystemTracing-dtl.21.mcz instead of the latest SystemTracing-dtl.29.mcz. The 21 version seems to be OK. It's very fast and says after a few seconds: "Done tracing!" I'm impressed: $ ckformat test-64bit.image 68002 it effectively seems to clone the $ ckformat test.image 6505 to a 64bit format image. Unfortunately when I open the 68002 image, it works, the image opens, but it seems it's still displaying the "Tracing and writing" message. I think I probably have to follow the SystemTracing instructions to do this without first filing in the package ... David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJggZ2iAAoJENdFDkXGicizm3wIAKnGRr5wjwxDBKohd9usq289 bkAIEWuj0njn8WDluOFtpPu17UZM5EMs4Gi47eKnFxvrBsLiQK7PTSvucn3rIync yCMSMQEchbPo4ClzmpSYv14WG8ypyR3YrPQnoTrYpGx7F/nfOC3LHkUq6ln90dPV viZX/+etXRtlDsq0nIABo/LCVVrO0JvT89egfxr3Hg2M1QYkIFlcoVswFZ2FNNO8 AomZu5jMFziGPP0UGpFJpg5HbU77ILkxJn0S8efDLGB8iEH+IQGzzo3DJ+C4tFBh BrVCZLUvpDnYL7m4qUtkk1zaQJrJhZE8m7v91tLn/cHHYc2TsmfSvYSBuw9Kjno= =xd5k -----END PGP SIGNATURE----- -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at github.com Fri Apr 23 07:18:58 2021 From: noreply at github.com (Nicolas Cellier) Date: Fri, 23 Apr 2021 00:18:58 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Message-ID: Branch: refs/heads/upgrade_libpng Home: https://github.com/OpenSmalltalk/opensmalltalk-vm From nicolas.cellier.aka.nice at gmail.com Fri Apr 23 07:23:40 2021 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri, 23 Apr 2021 09:23:40 +0200 Subject: [Vm-dev] Fixing linux builds Message-ID: Hi all, the branch https://github.com/OpenSmalltalk/opensmalltalk-vm/tree/fix_include_order tries to fix the linux builds. Eliot, could you review if compatible with TERF VM build? I succeeded in building the linux and macos VM. Travis status is still red, because there are random failures on macos 32bits spur during tests. Either the tests result in SEGV or they stale... Of course, when running all 5.1 tests with self compiled 32 bits VM, I could not reproduce... From notifications at github.com Fri Apr 23 16:17:00 2021 From: notifications at github.com (Nicolas Cellier) Date: Fri, 23 Apr 2021 09:17:00 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Changes to sq.h and sqAssert.h to accompany commit (aafcb78) In-Reply-To: References: Message-ID: I've tried adding EXPORT/IMPORT declarations in sqVirtualMachine.h, but it's not such a good idea - many function prototypes are duplicated in various win32/vm/*.c without the EXPORT, so it breaks in many places - most external plugins won't need the IMPORT, because they call functions through the VirtualMachine structure rather than attempt to directly link them. I've sketched a lightweight solution in branch https://github.com/OpenSmalltalk/opensmalltalk-vm/tree/fix_include_order. The branch can build the VM for the 3 major OSes (linux, macos, windows). It remains to know if the solution is compatible with TERF. Before I emit a pull request, Eliot, your comments are welcome. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e#commitcomment-49915530 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stes at telenet.be Sat Apr 24 05:50:54 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Sat, 24 Apr 2021 07:50:54 +0200 (CEST) Subject: [Vm-dev] How to convert 32-bit images to 64-bit images? In-Reply-To: <1945868006.58922557.1619107334257.JavaMail.zimbra@telenet.be> References: <846286085.13618176.1618247926366.JavaMail.zimbra@telenet.be> <1833355593.58822196.1619106559611.JavaMail.zimbra@telenet.be> <1945868006.58922557.1619107334257.JavaMail.zimbra@telenet.be> Message-ID: <1851357607.64232781.1619243454263.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi Marcel, The reference in http://wiki.squeak.org/squeak/2315 (last paragraph), I read the info in the "The Interactive Programming Environment" red book, by Adele Goldberg: it says in 23.4 page 487 "To initiate the VMem-write, evaluate the expression SystemTracer writeClone" Anyway I have not yet been succesful in running converted 64bit images, but if you have done it, I'd be interested in this. Also the above SystemTracer writeClone which according to the red book, worked in old Smalltalk systems, does not work for me nowadays. I get the error: SmalltalkImage allBehaviorsDo: message not understood. in Squeak4.6. In Squeak6.0 with the Cog VM I get a subscript out of bounds in clamp: I think writeClone and clamp: are messages from the SystemTracer package. David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJgg7F0AAoJENdFDkXGiciz6h8IAKQaWa/BMMyZcHfa/lHpgLS5 ZFUkNeTNLMOq+qJ0BW5gT0pxH0R/HYoeCT+F9L7OVpbGO0txUIJrRhhTpOmUzrjS kwm9iExGUIhOgwfGGRAeo2lzTArgG+to+5beG7vA5i/rqOR4lrgBGrQF4FVgJ9ws EeGhJS06tkdILQ752FiUIUcT/YNB9MSFwfgMt7+Ca6FVNuWKiPtlQWHAo3wZ5kJc JytH19C8Ka0orxK6dVCe/4phKYKcK9fO6bo7jHBLo8/CSbGel0PoIcniJGN2NnmT P81MlfI9mtvK2xvcZZL249Fm5dV204yY+O19mDl1Rn2635XDcd/6MiJFK1k7ghc= =a3c7 -----END PGP SIGNATURE----- From johnmci at smalltalkconsulting.com Sat Apr 24 06:06:21 2021 From: johnmci at smalltalkconsulting.com (John M McIntosh) Date: Sat, 24 Apr 2021 06:06:21 +0000 Subject: [Vm-dev] How to convert 32-bit images to 64-bit images? In-Reply-To: <1851357607.64232781.1619243454263.JavaMail.zimbra@telenet.be> References: <846286085.13618176.1618247926366.JavaMail.zimbra@telenet.be> <1833355593.58822196.1619106559611.JavaMail.zimbra@telenet.be> <1945868006.58922557.1619107334257.JavaMail.zimbra@telenet.be> <1851357607.64232781.1619243454263.JavaMail.zimbra@telenet.be> Message-ID: 10 Years back Dan provided a system tracer to convert Squeak images from 32 bit PowerPC to 64 bit intel. I recall spending a few days resolving an issue where the floating point endian wasn’t correct for some FP situations. So check the archives for a post from him with regard to 64 bit. I also built a number of vm variations, perhaps an image from there is useful? ftp://smalltalkconsulting.com/experimental/64bit/ Sent from ProtonMail for iOS On Fri, Apr 23, 2021 at 22:50, stes at PANDORA.BE wrote: > Hi Marcel, > > The reference in http://wiki.squeak.org/squeak/2315 (last paragraph), > I read the info in the "The Interactive Programming Environment" red book, > by Adele Goldberg: it says in 23.4 page 487 > > "To initiate the VMem-write, evaluate the expression > > SystemTracer writeClone" > > Anyway I have not yet been succesful in running converted 64bit images, > but if you have done it, I'd be interested in this. > > Also the above SystemTracer writeClone which according to the red book, > worked in old Smalltalk systems, does not work for me nowadays. > > I get the error: SmalltalkImage allBehaviorsDo: message not understood. > in Squeak4.6. > > In Squeak6.0 with the Cog VM I get a subscript out of bounds in clamp: > > I think writeClone and clamp: are messages from the SystemTracer package. > > David Stes -------------- next part -------------- An HTML attachment was scrubbed... URL: From stes at telenet.be Sun Apr 25 15:29:37 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Sun, 25 Apr 2021 17:29:37 +0200 (CEST) Subject: [Vm-dev] openindiana 2954 cog vm Message-ID: <612454033.69834611.1619364577096.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hello, Update about the OpenSmalltalk VM and classical VM Squeak on "OpenIndiana". Current upgrades in the repository, http://pkg.openindiana.org/hipster/en/index.shtml squeak-4 : version 4.19.6 (32bit + 64bit) squeak-5 : version 5.0.2952 (Stack 32bit + 64bit) squeak-5c : version 5.0.2954 (COG 32bit + 64bit) There are packages for 'headless' (-nodisplay) operation and with GUI. Special thanks to everybody in the "Squeak" and "opensmalltalk-vm" team; the OpenSmalltalk VM configures and builds OK in both 32bit and 64bit. Thanks, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJghYpYAAoJENdFDkXGicizGqEH/0s5T1BMibKN4zQyGUltLo4z KxscFLSAD3AFL6naNdaxbnpPkefoa5OGcdIjCaWsihw//W32LVOqdThsVqdeS08F Kg6/60JdD644IGjXLZf56E/OXIitOWa9Cf1YYROgfagEVm9GimftksEITWSwUSDk mm69Ko5j6446H9a5sMYbZyLrMKG/9DzaRLq7/vOpcVPIQuoGRazbOWdgK3zZhu9j ihUMc3BJX7s21FjOMaxr+0RsJDycUny94S1Gq7nw7ZagcUpJEEOJg94mzuC3J2dW 0+uY5brgQwVPottp85iHnHABcNkBoKtvDaXVN/j8Q0KJtBhgjiX93YHwGJelQ8o= =jXQf -----END PGP SIGNATURE----- From stes at telenet.be Sun Apr 25 18:09:56 2021 From: stes at telenet.be (stes@PANDORA.BE) Date: Sun, 25 Apr 2021 20:09:56 +0200 (CEST) Subject: [Vm-dev] classic VM: timezone correction in sqUnixUtcWithOffset() Message-ID: <909613826.70266308.1619374196461.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, Here's another fix for sqUnixMain.c in the SVN (subversion) repository. This is for timezone correction in sqUnixUtcWithOffset(). Basically there is code for the Linux/glibc case which is correct: #if defined(HAVE_TM_GMTOFF) *offset= localtime(&seconds)->tm_gmtoff; #else The above code is correct but it depends on tm_gmtoff (glibc) as on Linux. The incorrect code is for platforms that use the plain standard C library, without the glibc extension (the #else clause). The timezone (HAVE_TIMEZONE) is itself also extension which is enabled by default for Solaris because it is _XOPEN_SOURCE but not _STRICT_STDC. - - { - - struct tm *local= localtime(&seconds); - - struct tm *gmt= gmtime(&seconds); - - int d= local->tm_yday - gmt->tm_yday; - - int h= ((d < -1 ? 24 : 1 < d ? -24 : d * 24) + local->tm_hour - gmt->tm_hour); - - int m= h * 60 + local->tm_min - gmt->tm_min; - - *offset= m * 60; - - } The above is incorrect because localtime() and gmtime() will overwrite the same buffer, so the gmtime() call erases the value of localtime(). I have a patch in attach that uses the same logic as plugins/LocalePlugin/sqLocalePlugin.c and as in convertToSqueakTime() which is doing it right. +#ifdef HAVE_TIMEZONE + *offset = ((daylight) * 60 * 60) - timezone; +#else +#error: cannot determine timezone correction #endif +#endif return 0; } Please apply the patch in attach to subversion ... I think it is safe to apply this patch because (1) it does not change the #if HAVE_TM_GMTOFF case (the Linux case is unchanged) and (2) it is consistent with plugins/LocalePlugin/sqLocalePlugin.c and convertToSqueakTime() and (3) the code with the difference between localtime() and gmtime() is certainly wrong. Thanks, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJgha+cAAoJENdFDkXGicizymEIAIqI8cicPesACVW3zXFzWWl9 m1L8BU8CAlgP4omO+scOtza+rj7Fy4I5tg+XFNX8u1cEtJIgYj2fvEpoOqUsYkbv /kzlQX850TGWKYFA5ya3RE7XRI3fx5hqqP2ntEd3Nb0Ve9yFsmlo3KxKRSkJMKfm 9Jwgrpu549AqwR+Hl+XkJxIiJ5xBotJyzipyB6ySXGqpCYs4qVJl0nM00ozVNY7n W7AhNh6mWX1pbvZLH9xPVO0qSRLNewQ9sGBbaGIAaQm7HScSHpM9DtDE3jY/FF0J CdNH84hKYdN7z8am1C1IDX95V4sILORyFaaa0F+QnOBFASMW1ltfkx+up6yHzXU= =4EbY -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: sqUnixMain-timezone.patch Type: text/x-patch Size: 684 bytes Desc: not available URL: From notifications at github.com Mon Apr 26 18:54:16 2021 From: notifications at github.com (Nicolas Cellier) Date: Mon, 26 Apr 2021 11:54:16 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Fix include order (#562) Message-ID: This enables the linux builds again, while preserving windows and macos builds. That is a fix for https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/560 If this is compatible with TERF VM, then it should be merged ASAP, the builds are red for too long. (we'll have to inquire next point of failure...) You can view, comment on, or merge this pull request online at: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562 -- Commit Summary -- * always include <stdio.h> **BEFORE** defining fseeko/ftello * Discard the EXPORT from sqAssert.h for declaring VM functions * Make sure that config.h is included first * Generate source with VMMaker.oscog-nice.2957 so as to restore sqConfig.h inclusion at top * try and omit HAVE_CONFIG_H for compiling getVersion -- File Changes -- M platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c (3) M platforms/Cross/plugins/IA32ABI/xabicc.c (5) M platforms/Cross/plugins/SoundCodecPrims/sqSoundCodecPluginBasicPrims.c (4) M platforms/Cross/plugins/Squeak3D/b3dInit.c (3) M platforms/Cross/plugins/Squeak3D/b3dMain.c (3) M platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c (4) M platforms/Cross/vm/sqAssert.h (11) M platforms/Cross/vm/sqHeapMap.c (4) M platforms/Cross/vm/sqSCCSVersion.h (2) M platforms/Cross/vm/sqVirtualMachine.c (3) M platforms/unix/config/getversion.c (1) M platforms/unix/plugins/FileAttributesPlugin/faSupport.c (3) M platforms/unix/vm/aio.c (12) M platforms/unix/vm/sqUnixVMProfile.c (5) M platforms/win32/vm/sqPlatformSpecific.h (1) M spur64src/vm/cogit.h (2) M spur64src/vm/cogitARMv8.c (8) M spur64src/vm/cogitX64SysV.c (8) M spur64src/vm/cogitX64WIN64.c (8) M spur64src/vm/cointerp.c (49) M spur64src/vm/cointerp.h (4) M spur64src/vm/cointerpmt.c (31) M spur64src/vm/cointerpmt.h (3) M spur64src/vm/gcc3x-cointerp.c (49) M spur64src/vm/gcc3x-cointerpmt.c (31) M spurlowcode64src/vm/cogit.h (3) M spurlowcode64src/vm/cogitARMv8.c (16) M spurlowcode64src/vm/cogitX64SysV.c (12) M spurlowcode64src/vm/cogitX64WIN64.c (12) M spurlowcode64src/vm/cointerp.c (53) M spurlowcode64src/vm/cointerp.h (5) M spurlowcode64src/vm/gcc3x-cointerp.c (53) M spurlowcodesrc/vm/cogit.h (3) M spurlowcodesrc/vm/cogitARMv5.c (12) M spurlowcodesrc/vm/cogitIA32.c (12) M spurlowcodesrc/vm/cogitMIPSEL.c (16) M spurlowcodesrc/vm/cointerp.c (57) M spurlowcodesrc/vm/cointerp.h (5) M spurlowcodesrc/vm/gcc3x-cointerp.c (57) M spurlowcodestack64src/vm/gcc3x-interp.c (25) M spurlowcodestack64src/vm/interp.c (25) M spurlowcodestacksrc/vm/gcc3x-interp.c (25) M spurlowcodestacksrc/vm/interp.c (25) M spursista64src/vm/cogit.h (2) M spursista64src/vm/cogitARMv8.c (12) M spursista64src/vm/cogitX64SysV.c (8) M spursista64src/vm/cogitX64WIN64.c (8) M spursista64src/vm/cointerp.c (49) M spursista64src/vm/cointerp.h (4) M spursista64src/vm/gcc3x-cointerp.c (49) M spursistasrc/vm/cogit.h (2) M spursistasrc/vm/cogitARMv5.c (8) M spursistasrc/vm/cogitIA32.c (8) M spursistasrc/vm/cogitMIPSEL.c (14) M spursistasrc/vm/cointerp.c (49) M spursistasrc/vm/cointerp.h (2) M spursistasrc/vm/gcc3x-cointerp.c (49) M spursrc/vm/cogit.h (2) M spursrc/vm/cogitARMv5.c (8) M spursrc/vm/cogitIA32.c (8) M spursrc/vm/cogitMIPSEL.c (10) M spursrc/vm/cointerp.c (57) M spursrc/vm/cointerp.h (4) M spursrc/vm/cointerpmt.c (81) M spursrc/vm/cointerpmt.h (5) M spursrc/vm/gcc3x-cointerp.c (57) M spursrc/vm/gcc3x-cointerpmt.c (81) M spurstack64src/vm/gcc3x-interp.c (25) M spurstack64src/vm/interp.c (25) M spurstack64src/vm/validImage.c (17) M spurstacksrc/vm/gcc3x-interp.c (25) M spurstacksrc/vm/interp.c (25) M spurstacksrc/vm/validImage.c (17) M src/plugins/Squeak3D/Squeak3D.c (8) M src/vm/cogit.h (2) M src/vm/cogitARMv5.c (8) M src/vm/cogitIA32.c (8) M src/vm/cogitMIPSEL.c (12) M src/vm/cointerp.c (10) M src/vm/cointerp.h (2) M src/vm/gcc3x-cointerp.c (10) M stacksrc/vm/gcc3x-interp.c (12) M stacksrc/vm/interp.c (12) -- Patch Links -- https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Mon Apr 26 22:02:12 2021 From: lewis at mail.msen.com (David T. Lewis) Date: Mon, 26 Apr 2021 18:02:12 -0400 Subject: [Vm-dev] classic VM: timezone correction in sqUnixUtcWithOffset() In-Reply-To: <909613826.70266308.1619374196461.JavaMail.zimbra@telenet.be> References: <909613826.70266308.1619374196461.JavaMail.zimbra@telenet.be> Message-ID: <20210426220212.GA45695@shell.msen.com> Hi David, Thanks for the fix and for the clear explanation of the problem. I pushed your patch to SVN r3801: http://squeakvm.org/cgi-bin/viewvc.cgi/squeak/trunk/platforms/unix/vm/sqUnixMain.c?r1=3800&r2=3801 Dave On Sun, Apr 25, 2021 at 08:09:56PM +0200, stes at PANDORA.BE wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > > Hi, > > Here's another fix for sqUnixMain.c in the SVN (subversion) repository. > > This is for timezone correction in sqUnixUtcWithOffset(). > > Basically there is code for the Linux/glibc case which is correct: > > #if defined(HAVE_TM_GMTOFF) > *offset= localtime(&seconds)->tm_gmtoff; > #else > > The above code is correct but it depends on tm_gmtoff (glibc) as on Linux. > > The incorrect code is for platforms that use the plain standard C library, > without the glibc extension (the #else clause). > > The timezone (HAVE_TIMEZONE) is itself also extension which is enabled > by default for Solaris because it is _XOPEN_SOURCE but not _STRICT_STDC. > > - - { > - - struct tm *local= localtime(&seconds); > - - struct tm *gmt= gmtime(&seconds); > - - int d= local->tm_yday - gmt->tm_yday; > - - int h= ((d < -1 ? 24 : 1 < d ? -24 : d * 24) + local->tm_hour - gmt->tm_hour); > - - int m= h * 60 + local->tm_min - gmt->tm_min; > - - *offset= m * 60; > - - } > > The above is incorrect because localtime() and gmtime() will overwrite the > same buffer, so the gmtime() call erases the value of localtime(). > > I have a patch in attach that uses the same logic as plugins/LocalePlugin/sqLocalePlugin.c and as in convertToSqueakTime() which is doing it right. > > +#ifdef HAVE_TIMEZONE > + *offset = ((daylight) * 60 * 60) - timezone; > +#else > +#error: cannot determine timezone correction > #endif > +#endif > return 0; > } > > Please apply the patch in attach to subversion ... > > I think it is safe to apply this patch because (1) it does not change > the #if HAVE_TM_GMTOFF case (the Linux case is unchanged) and (2) it is > consistent with plugins/LocalePlugin/sqLocalePlugin.c and convertToSqueakTime() and (3) the code with the difference between localtime() and gmtime() is certainly wrong. > > Thanks, > David Stes > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQEcBAEBCAAGBQJgha+cAAoJENdFDkXGicizymEIAIqI8cicPesACVW3zXFzWWl9 > m1L8BU8CAlgP4omO+scOtza+rj7Fy4I5tg+XFNX8u1cEtJIgYj2fvEpoOqUsYkbv > /kzlQX850TGWKYFA5ya3RE7XRI3fx5hqqP2ntEd3Nb0Ve9yFsmlo3KxKRSkJMKfm > 9Jwgrpu549AqwR+Hl+XkJxIiJ5xBotJyzipyB6ySXGqpCYs4qVJl0nM00ozVNY7n > W7AhNh6mWX1pbvZLH9xPVO0qSRLNewQ9sGBbaGIAaQm7HScSHpM9DtDE3jY/FF0J > CdNH84hKYdN7z8am1C1IDX95V4sILORyFaaa0F+QnOBFASMW1ltfkx+up6yHzXU= > =4EbY > -----END PGP SIGNATURE----- From notifications at github.com Tue Apr 27 15:21:20 2021 From: notifications at github.com (Fabio Niephaus) Date: Tue, 27 Apr 2021 08:21:20 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Fix include order (#562) In-Reply-To: References: Message-ID: @fniephaus approved this pull request. LGTM, don't know about TERF. Thanks, @nicolas-cellier-aka-nice! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/562#pullrequestreview-645999910 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Apr 30 01:53:16 2021 From: notifications at github.com (jdougan) Date: Thu, 29 Apr 2021 18:53:16 -0700 Subject: [Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Fix UDP binding in Windows sockets (#563) Message-ID: Changed sqSocketListenOnPortBacklogSizeInterface() to match general behavior of Unix socket version. Previously was always incorrectly binding UDP sockets to INADDR_ANY instead of the specified IPv4 address. You can view, comment on, or merge this pull request online at: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/563 -- Commit Summary -- * Changed sqSocketListenOnPortBacklogSizeInterface() to match general -- File Changes -- M platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c (2) -- Patch Links -- https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/563.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/563.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/563 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rowledge.org Fri Apr 30 04:38:24 2021 From: tim at rowledge.org (tim Rowledge) Date: Thu, 29 Apr 2021 21:38:24 -0700 Subject: [Vm-dev] ARMv8 BitBLT speedups provided by RPi/Ben Avison Message-ID: <7041C30C-0679-4B39-8694-B3A4FC2FF05E@rowledge.org> Our friends in Cambridge (Real Cambridge, not Backup Cambridge) have spent a nice chunk of money to bring the ARM32 bitblt speedups they provided in '14/5/6 into the ARMv8 world. Quite a few microbenchmarks covering the tests Ben did (and he wrote a testing framework that ran some 10s of thousands of tests) are improved by an order of magnitude, some by 30X and one by 57X ! All the code to date is pushed to https://github.com/bavison/opensmalltalk-vm/tree/Ben with the latest version of the test harnesses at https://github.com/bavison/SqueakBitBltTest Look for items changed in the last few days ie 25th april or later. I haven't had a chance to do more than glance as yet. I *suspect* Ben has manually edited the generated BitBltPlugin.c file, which will mean doing some diffing and back-porting into Slang. Maybe. I, for one, welcome our new v8 blit overlords. tim tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim "#define QUESTION ((bb) || !(bb)) - Shakespeare." From marcel.taeumel at hpi.de Fri Apr 30 06:16:43 2021 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Fri, 30 Apr 2021 08:16:43 +0200 Subject: [Vm-dev] ARMv8 BitBLT speedups provided by RPi/Ben Avison In-Reply-To: <7041C30C-0679-4B39-8694-B3A4FC2FF05E@rowledge.org> References: <7041C30C-0679-4B39-8694-B3A4FC2FF05E@rowledge.org> Message-ID: :-O +1 !!! :-) I haven't looked into it. Would be nice if it remained compatible with upstream. There is no pull request yet. Best, Marcel Am 30.04.2021 06:38:37 schrieb tim Rowledge : Our friends in Cambridge (Real Cambridge, not Backup Cambridge) have spent a nice chunk of money to bring the ARM32 bitblt speedups they provided in '14/5/6 into the ARMv8 world. Quite a few microbenchmarks covering the tests Ben did (and he wrote a testing framework that ran some 10s of thousands of tests) are improved by an order of magnitude, some by 30X and one by 57X ! All the code to date is pushed to https://github.com/bavison/opensmalltalk-vm/tree/Ben with the latest version of the test harnesses at https://github.com/bavison/SqueakBitBltTest Look for items changed in the last few days ie 25th april or later. I haven't had a chance to do more than glance as yet. I *suspect* Ben has manually edited the generated BitBltPlugin.c file, which will mean doing some diffing and back-porting into Slang. Maybe. I, for one, welcome our new v8 blit overlords. tim tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim "#define QUESTION ((bb) || !(bb)) - Shakespeare." -------------- next part -------------- An HTML attachment was scrubbed... URL: From Das.Linux at gmx.de Fri Apr 30 06:29:49 2021 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri, 30 Apr 2021 08:29:49 +0200 Subject: [Vm-dev] ARMv8 BitBLT speedups provided by RPi/Ben Avison In-Reply-To: <7041C30C-0679-4B39-8694-B3A4FC2FF05E@rowledge.org> References: <7041C30C-0679-4B39-8694-B3A4FC2FF05E@rowledge.org> Message-ID: <0D9B33DC-0B97-4003-9DD5-F729B428A188@gmx.de> Blimey, what a nice surprise! Thanks! -Tobias > On 30. Apr 2021, at 06:38, tim Rowledge wrote: > > > Our friends in Cambridge (Real Cambridge, not Backup Cambridge) have spent a nice chunk of money to bring the ARM32 bitblt speedups they provided in '14/5/6 into the ARMv8 world. Quite a few microbenchmarks covering the tests Ben did (and he wrote a testing framework that ran some 10s of thousands of tests) are improved by an order of magnitude, some by 30X and one by 57X ! > > All the code to date is pushed to > https://github.com/bavison/opensmalltalk-vm/tree/Ben > with the latest version of the test harnesses at > https://github.com/bavison/SqueakBitBltTest > > Look for items changed in the last few days ie 25th april or later. I haven't had a chance to do more than glance as yet. I *suspect* Ben has manually edited the generated BitBltPlugin.c file, which will mean doing some diffing and back-porting into Slang. Maybe. > > I, for one, welcome our new v8 blit overlords. > > tim > tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim > "#define QUESTION ((bb) || !(bb)) - Shakespeare." > > From tim at rowledge.org Fri Apr 30 17:14:25 2021 From: tim at rowledge.org (tim Rowledge) Date: Fri, 30 Apr 2021 10:14:25 -0700 Subject: [Vm-dev] ARMv8 BitBLT speedups provided by RPi/Ben Avison In-Reply-To: References: <7041C30C-0679-4B39-8694-B3A4FC2FF05E@rowledge.org> Message-ID: <953FF696-71E9-45E4-8B9F-FA68C559A622@rowledge.org> > On 2021-04-29, at 11:16 PM, Marcel Taeumel wrote: > > :-O > > +1 !!! :-) > > I haven't looked into it. Would be nice if it remained compatible with upstream. There is no pull request yet. Yeah, nice eh? A couple of months of Ben's time is a lot of money to gift us. I'm not sure about this pull request stuff but I'll nudge Ben about. In the meantime, if anyone has spare time to actually build from his tree and try it, that would be interesting. I won't have a chance to do that for at least a week, I think, and then my time starts to get very tight as explained at the board meeting. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Strange OpCodes: SARTRE: (Statement has no purpose)