[OpenSmalltalk/opensmalltalk-vm] 2a64f4: CogVM source as per VMMaker.oscog-eem.2381

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] 2a64f4: CogVM source as per VMMaker.oscog-eem.2381

GitHub
 
  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 2a64f480334f24aca3f48769b61d9989330ecf17
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/2a64f480334f24aca3f48769b61d9989330ecf17
  Author: Eliot Miranda <[hidden email]>
  Date:   2018-05-02 (Wed, 02 May 2018)

  Changed paths:
    M nsspur64src/vm/cogit.h
    M nsspur64src/vm/cogitX64SysV.c
    M nsspur64src/vm/cogitX64WIN64.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
    A scripts/modified
    A scripts/untracked
    M spur64src/vm/cogit.h
    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/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/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 spurstacksrc/vm/gcc3x-interp.c
    M spurstacksrc/vm/interp.c
    M src/plugins/Squeak3D/Squeak3D.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.2381

General:
** new primitive to compare strings (slang + JIT)
answers negative smi, 0 or positive smi (instead of 1, 2 or 3 in the MiscPlugin)

Spur:
Fix compiler bug with Apple LLVM version 7.0.0 (clang-700.1.76) for 64-bit Spur
segment loading where compiler bug eliminated second version check in segment
load when at -Os.  Fix is to never inline the 32-bit word byte reversal.

Fix sign extension in printOop: et al on 64-bit Spur.

FFI Plugin:
Correct a 32bit-hardcoded pointer size in FFI

Correct two copy/paste typos in num32BitUnitsOf:

Nicolas Cellier:
Note: I don't like the FFI code that I just corrected. IMO, it does the wrong
thing.

if I have an argument spec is
    MyLib>>foo: aFoo
  <cdecl: void foo(Foo *)>
where Foo is some ExternalStructure subclass
        (Foo class>>fields ^#((x 'ushort') (y 'ushort')))
and that I try to pass (MyLib new foo: Foo new), it seems to me that the
        Foo new getHandle will be (ByteArray new: 4).
What I understand from the code that I just corrected is that we are trying to
pass the contents of the ByteArray re-interpreted as a void pointer.
Scary and wrong...

If I instead pass (MyLib new foo: Foo externalNew), it seems that we don't even
bother to check if the (argSpec anyMask: FFIFlagPointer) and just force passing
the structure by value (thru a memcpy on stack). Scary and wrong...

In general, every one use <cdecl: void foo(void *)> to work around this
ill-behavior, and thus bypass type checks...

Also note that we can't even pass an ExternalData (think an Array of Foo),
because ffiArgument:Spec:Class:in: insists on having
        actualArg class inheritsFrom: argType referentClass.
ExternalData does not inherit from Foo, event if its type matches
(ExternalType structTypeNamed: #Foo). That's crazy...
Another reason while people use <cdecl: void foo(void *)>

It's high time to consider a rewrite IMO.

Git:
Add scripts to list modified and untracked files.



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.