[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 81cb7e: Cog Processor Simulator Plugins as per Cog-eem.369...

Eliot Miranda noreply at github.com
Fri Nov 22 21:29:11 UTC 2019

  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 81cb7e9083cdb053d1ee8ee77fee9618ce0e88d2
  Author: Eliot Miranda <eliot.miranda at gmail.com>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M src/plugins/BochsIA32Plugin/BochsIA32Plugin.c
    M src/plugins/BochsX64Plugin/BochsX64Plugin.c
    M src/plugins/GdbARMPlugin/GdbARMPlugin.c
    M src/plugins/GdbARMv8Plugin/GdbARMv8Plugin.c

  Log Message:
  Cog Processor Simulator Plugins as per Cog-eem.369/VMMaker.oscog-eem.2589

Speed up marshalling for the ProcessorSimulatorPlugins by using SmallInteger for
the memory range arguments instead of Unsigned.  Using the latest Slang changes
this inlines a lot of code and reduces function calls to decode the range
arguments.  Given that the memory range arguments are always within the range of
the memory byte array, SmallIntegers provide more than enough range.

More substantively use primitiveFailForOSError: to answer the failure error
code, if any, on simulating.

Slang for plugins.

Fix resultSendAlwaysFails: to include the two new failure sends,
primitiveFailForFFIException:at: primitiveFailForOSError:.

As a micro optimization, if the enclosing method has type #sqInt then return the
falures directly, as they're all typed as sqInt.  Should save an instruction :-)

Generate more efficient code for dereferencing SmallInteger type parameters in
SmartSyntaxPlugins.  Avoid a stack variable access by assigning to the target
variable in the validation expression, and referring to the variable in the
conversion expression, e.g. instead of

    sqInt v;

	if (!(isIntegerObject(stackValue(0))))
		return primitiveFailFor(PrimErrBadArgument);
	v = stackIntegerValue(0);


    sqInt v;

	if (!(isIntegerObject(v = stackValue(0))))
		return primitiveFailFor(PrimErrBadArgument);
	v = integerValueOf(v);

Allow the Cog ProcessorSimulationPlugins to use the inlined macro definitions
for isIntegerObject:, integerObjectOf: & integerValueOf: even though they're
external plugins (since in single steppng, marshalling performance is at a

  Commit: 7c2325bcb858e52e19296a4f0a8092c1d4f5d54e
  Author: Eliot Miranda <eliot.miranda at gmail.com>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M src/plugins/BitBltPlugin/BitBltPlugin.c

  Log Message:
  Merge Nicolas' BitBltPlugin work with my ProessorSimulatorPlugin work.
Merge branch 'Cog' of https://github.com/OpenSmalltalk/opensmalltalk-vm into Cog

Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/c812fbc619c2...7c2325bcb858

More information about the Vm-dev mailing list