[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 9d4e68: CogVM source as per VMMaker.oscog-eem.2030

GitHub noreply at github.com
Thu Dec 8 00:05:13 UTC 2016


  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 9d4e68e555ba7b712a8c92047c95a78e840048cd
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/9d4e68e555ba7b712a8c92047c95a78e840048cd
  Author: Eliot Miranda <eliot.miranda at gmail.com>
  Date:   2016-12-07 (Wed, 07 Dec 2016)

  Changed paths:
    M .gitignore
    M build.macos32x86/pharo.stack.spur/plugins.ext
    M build.macos32x86/pharo.stack.spur/plugins.int
    M nsspur64src/vm/cogit.h
    M nsspur64src/vm/cogitX64.c
    M nsspur64src/vm/cointerp.c
    M nsspur64src/vm/cointerp.h
    M nsspur64src/vm/gcc3x-cointerp.c
    M nsspursrc/vm/cogit.h
    M nsspursrc/vm/cogitARMv5.c
    M nsspursrc/vm/cogitIA32.c
    M nsspursrc/vm/cogitMIPSEL.c
    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/cogitX64.c
    M spur64src/vm/cointerp.c
    M spur64src/vm/cointerp.h
    M spur64src/vm/gcc3x-cointerp.c
    M spursista64src/vm/cogit.h
    M spursista64src/vm/cogitX64.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/gcc3x-cointerp.c
    M spurstack64src/vm/gcc3x-interp.c
    M spurstack64src/vm/interp.c
    M spurstacksrc/vm/gcc3x-interp.c
    M spurstacksrc/vm/interp.c
    M src/plugins/AsynchFilePlugin/AsynchFilePlugin.c
    M src/plugins/B2DPlugin/B2DPlugin.c
    M src/plugins/BitBltPlugin/BitBltPlugin.c
    M src/plugins/FilePlugin/FilePlugin.c
    M src/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c
    M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
    M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
    M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c
    M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.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/cointerpmt.c
    M src/vm/cointerpmt.h
    M src/vm/gcc3x-cointerp.c
    M src/vm/gcc3x-cointerpmt.c
    M stacksrc/vm/gcc3x-interp.c
    M stacksrc/vm/interp.c

  Log Message:
  -----------
  CogVM source as per VMMaker.oscog-eem.2030

Interpreter:
Improve debugging of stack imbalances on primitive invocation by restoring the
stack pointer after calling failUnbalancedPrimitive.

Add a variable to help debug the crashes in callbacks due to stack imbalance
experienced in the Pharo VM.  The variable is a set of bit flags tracing the
path through returnAs:ThroughCallback:Context:.

Fix a compilation warning with the definition of sigsetjump & siglongjmp in the
interpreter.

Do to signed32BitValueOf: what has been done to signed32BitIntegerFor:, i.e.
only invoke noInlineSigned32BitValueGutsOf: for the case of LargeInteger
deciphering.  When the oop is a 31bits SmallInteger, don't bother entering
such function - just inline.

Cogit:
Fix occasional start-up crashes on linux x64.  The choice of 16rBADA550 for a
constant in closed PIC prototype generation (used to compute offsets in PICs)
occasionally coincides with the address for code chosen by address space
randomization, and so confuses the Cogit into generating pc-relative addressing
to create this address, hence causing mayhem later on when the wrong sizes for
instructions are used to decode closed PIC contents.  Hence also beef up the
asserts regarding distinguishing constants planted in code on X64 for
MoveCwR PushCw and ArithCwR.

Fix the order of generating fixups and pushing the dummyValue when no deadCode
in genSpecialSelectorEqalsEquals:.  This didn't matter with the
StackToRegisterMappingCogit but in the RegisterAllocatingCogit now that teh
stack is not flushed on conditional branch, it is critical; the fixup must be
established before the dummyValue is pushed.

Fix a slip in genSubConstant:R: which always used TempReg and didn't use its
argument.

Abstract away voiding the optStatus into voidReceiverOptStatus so that
RegisterAllocatingCogit can override to clear the liveRegister on simSelf.

Add voidReceiverResultRegContainsSelf that scans the stack for occurrences of
simSelf in a register on stack and to either flush (StackToRegisterMappingCogit)
or void liveRegister (RegisterAllocatingCogit).

Improve Spur genGetClassObjectOf:into:scratchReg:instRegIsReceiver: to avoid
reg-reg copies.

Make #~~ a special selector instead of #blockCopy:.  If the bytecode compiler
compiles #~~ using the special selector bytecode, then the pointer comparison
with #~~ is inlined as it is with #==.  This leads #~~ to have the same
performance as #==. It also means #~~ is not a primitive call, as #==.  To
integrate that in the Squeak / Pharo image, one needs to add #~~ instead of
if not already the case.

SistaCogit:
Added a setting so that subclasses of cogit can choose to refuse early openPIC
promotion.  This leads to much, much, *much* better type information on PICs in
the Sista VM. No changes in the normal VM.

Plugins/Primitives:
Fix an unused value warning in Balloon/Bezier.  I (NC) think that the intention
was to use 2nd derivative to decide direction when 1st derivative is null.

Fix primitiveBeCursor - generated code could dereference a null pointer
offsetObj due to misplaced block end.  Also a null pointer cursorObj could be
dereferenced if 2 arguments or more were passed to the primitive.

Make pharo.stack.spur's plugins agree with pharo.cog.spur's

git:
Ignore zip files in image directory.




More information about the Vm-dev mailing list