Hi All,
yesterday I released version 1.0 of SqueakJS, exactly 7 years after my
first public announcement on December 20, 2013.
https://squeak.js.org/
Arguably I should have done this back in 2016 when it could run Spur
images. What got it over the last hump was Fabio's interpreter for Sista
bytecodes and Erik's refactoring for Node.js.
SqueakJS is now the most compatible Squeak VM: it can run pre-release
images from 1996 as well as the latest Squeak 6.0 trunk image.
For production, you should still use non-Sista images, because no JIT has
been implemented yet.
A big Thank You to all the contributors over the years, and to Dan Ingalls
for the inspiration, and funding the initial development.
There are still many things to work on:
- a simple JIT for Sista bytecode to bring its speed at least up to par
with its pre-Sista speed
- a "real" JIT with context mapping (keeping temps in JS vars rather than
on the stack) and send optimizations (mapping sends to JS function
invocations)
- 64 bit support for pre-Spur images
- big-endian support for 64 bit images
Help is very welcome at https://github.com/codefrau/SqueakJS
Happy Holidays to Everyone!
Vanessa
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: ae03460c08772de94d1e55f9c81e74c726435920
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/ae03460c08772de94d…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-12-22 (Tue, 22 Dec 2020)
Changed paths:
M nsspur64src/vm/cogit.h
M nsspur64src/vm/cointerp.c
M nsspur64src/vm/cointerp.h
M nsspur64src/vm/gcc3x-cointerp.c
M nsspursrc/vm/cogit.h
M nsspursrc/vm/cointerp.c
M nsspursrc/vm/cointerp.h
M nsspursrc/vm/gcc3x-cointerp.c
M nsspurstack64src/vm/gcc3x-interp.c
M nsspurstack64src/vm/interp.c
M nsspurstacksrc/vm/gcc3x-interp.c
M nsspurstacksrc/vm/interp.c
M spur64src/vm/cogit.h
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/cointerp.c
M spursista64src/vm/cointerp.h
M spursista64src/vm/gcc3x-cointerp.c
M spursistasrc/vm/cogit.h
M spursistasrc/vm/cointerp.c
M spursistasrc/vm/cointerp.h
M spursistasrc/vm/gcc3x-cointerp.c
M spursrc/vm/cogit.h
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/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.2908
StackInterpreter:
Provide a selective event printing facility for primGetNextEvent:. Add vm
parameter 12 (also potentially settable via a command line argument) to
provide a mask of event types to print.
Slang:
Upgrade the f:printf: transformation to allow specifying stderr as the stream.
Upgrade literal array declararions to allow more than one (mangle the target
variable name).
Hi Vanessa, Hi Fabio, Hi David, Hi All,
> On Dec 20, 2020, at 10:24 PM, commits(a)source.squeak.org wrote:
>
> Vanessa Freudenberg uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-codefrau.1205.mcz
>
> ==================== Summary ====================
>
> Name: System-codefrau.1205
> Author: codefrau
> Time: 20 December 2020, 10:23:10.790782 pm
> UUID: f94486f3-3743-4300-a495-c2a89089e122
> Ancestors: System-dtl.1204
>
> Update platformName for SqueakJS 1.0
>
> =============== Diff against System-dtl.1204 ===============
>
> Item was changed:
> ----- Method: SmalltalkImage>>isLowerPerformance (in category 'system attributes') -----
> isLowerPerformance
> "Some operations - TestCases for example - need an idea of the typical performance of the system on which they are being performed. For now we will simply assert that running on an ARM cpu or as a SqueakJS instance is enough of a discriminator. Options for the future might also involve whether the vm is a full Cog or Sisata system, even actually measuring the performance at some point to be sure"
> ^ (self platformSubtype beginsWith: 'arm') "Raspberry PI for example"
> + or: [self platformName = 'JS'] "SqueakJS"!
> - or: [self platformName = 'Web'] "SqueakJS"!
this is interesting. The method is do crude, but potentially we have a much more rational basis upon which to derive its result. I would expect the effective performance to be the product of processor speed (mips), core execution engine architecture and object representation.
Mips varies hugely across the range from eg Raspberry Pi 2,3,4 to various Intel (i5,I7,i9 etc) and Apple Silicon. The range here is about one order of magnitude.
Execution architecture varies from pure context interpreter (the BTTF VM), Stack Interpreter, Squeak JS interpreter, Squeak JS generation one JIT, Squeak JS subsequent generation JITs (temps in JS vars, sends mapped to JS calls), Cog JIT, Sista JIT.
Very crudely Spur = 2 x v3 (actually about 1.7 and varies according to workflow).
Of the execution architectures Sista JIT is for practical purposes not yet implemented, a prototype, but may offer 2x to 4x of Cog. Of the Squeak JS JITs I think that the send mapping isn’t implemented (am I right?). But is the temp var mapping implemented? If so what difference does it make? Context to Stack is about 1.5. Stack to Cog is about 6.
So the notion is that if we can come up with crude numbers that rank the execution architectures and a measure of mips we can compute a meaningful numeric estimate of likely Smalltalk execution speed and answer isLowerPerformance if this number falls below a specific threshold. What we have now based on platformName is simply wrong. eg a Raspberry Pi 4 is way faster than a Pi 3.
One thing I did for visual works is estimate processor mips by timing the first invocation of the allInstances primitive and dividing by the number of objects. Basically the heuristic is that mips is roughly (inversely) proportional to how much time per object the first allInstances invocation spends. There is (almost) always an allInstances invocation at startup in VisualWorks (to clear font handles IIRC), and there may be in a Squeak image. Alternatives are measuring how long it takes to load and/or swizzle the image on load divided by the heap size. Basically we have the opportunity to introspection at startup cheaply measuring the time some costly primitive takes to run and this result can be cached, accessed via a primitive or vmParameter and perhaps updated as execution proceeds.
Does this sound like overkill? If not, what should we choose as our mips measurer? We want something that all VMs have to do somewhat similarly fairly early on system startup and we can correlate with stopwatches and macro benchmarks like the time taken for the Compiler package to recompile itself, etc.
Eliot
_,,,^..^,,,_ (phone)
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 683f3191c7a016bf4ee04667ac7c5619fea92ca7
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/683f3191c7a016bf4e…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-12-20 (Sun, 20 Dec 2020)
Changed paths:
M platforms/iOS/vm/Common/Classes/sqSqueakMainApp.m
Log Message:
-----------
On Mac allow the interested VM builder to specify that crash.dmp appears
in a specific directory relative to the preferences directory. Implement
register printing in crash.dmp for ARMv8.
[ci skip]
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: a6522a9e0f86a6832e0354a7e528a423f7f7e505
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/a6522a9e0f86a6832e…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-12-18 (Fri, 18 Dec 2020)
Changed paths:
M platforms/iOS/plugins/CameraPlugin/AVFoundationVideoGrabber.m
M platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m
Log Message:
-----------
MacOS: Make request for access to the camera & microphone
in Camera and Sound plugins block until the user responds.
[ci skip]
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 8464dc37c65f16016991ccb58219d2ac7c6d9f1f
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/8464dc37c65f160169…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-12-18 (Fri, 18 Dec 2020)
Changed paths:
M platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m
M platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m
M platforms/iOS/vm/SqueakPureObjc_Prefix.pch
R platforms/minheadless/common/sqExternalPrimitives.c.orig
Log Message:
-----------
Eliminate a deprecation and a non-effect warning on MacOS.
Eliminate an unnecessary copy and do some cleanup in NacOS
sqMacUnixExternalPrims.m. Nuke obsolete headless file.
[ci skip]