Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 0ca286139d26bfad7eb6d65979a33c19a29721f3 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0ca286139d26bfad7eb... Author: Eliot Miranda eliot.miranda@gmail.com Date: 2022-07-18 (Mon, 18 Jul 2022)
Changed paths: M src/plugins/AsynchFilePlugin/AsynchFilePlugin.c M src/plugins/BochsIA32Plugin/BochsIA32Plugin.c M src/plugins/BochsX64Plugin/BochsX64Plugin.c M src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c M src/plugins/FileAttributesPlugin/FileAttributesPlugin.c M src/plugins/FileCopyPlugin/FileCopyPlugin.c M src/plugins/FilePlugin/FilePlugin.c M src/plugins/GdbARMPlugin/GdbARMPlugin.c M src/plugins/GdbARMv8Plugin/GdbARMv8Plugin.c M src/plugins/HostWindowPlugin/HostWindowPlugin.c M src/plugins/InternetConfigPlugin/InternetConfigPlugin.c M src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c M src/plugins/MIDIPlugin/MIDIPlugin.c A src/plugins/MP4MediaFilePlugin M src/plugins/MacMenubarPlugin/MacMenubarPlugin.c M src/plugins/Mpeg3Plugin/Mpeg3Plugin.c M src/plugins/SerialPlugin/SerialPlugin.c M src/plugins/SocketPlugin/SocketPlugin.c M src/plugins/SoundPlugin/SoundPlugin.c M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c M src/plugins/SqueakFFIPrims/ARM64AppleFFIPlugin.c M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c M src/plugins/SqueakFFIPrims/RiscV64FFIPlugin.c M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c
Log Message: ----------- CogVM source as per VMMaker.oscog-eem.3216
SmartSyntaxInterpreterPlugins:
A flaw of the rather lovely SmartSyntaxInterpreterPlugin framework is that when simulating pointer type is determined by spec array (parameters: and/or reciever: in primitive:parameters:[receiver:]), not by the type of the variable assigned to. But this shouldn't be the case. The type of firstIndexableField: is intentionally #'void *', which in C can freely be assigned to any pointer type. Fix simulation so that the casts applied to firstIndexableField: reflect the type of the target variable, only defaulting to the type specified by the spec class if there is no declaration.
Hence significantly simplify the pointer API, removing ccgLoad:expr:asCharPtrFrom:andThen: et al, and keeping only ccgLoad:expr:asNullTerminatedCharPtrFrom:andThen:, ccgLoad:expr:asPtrFrom:andThen:ccgLoad:expr:asOopPtrFrom:andThen:.
The consequence for the generated C is that firstIndexbaleField: is not cast to a pointer, simply assigned to a variable (whose type will not have changed).
vm-dev@lists.squeakfoundation.org