[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Lowcode fixup (#111)

Ronie Salgado roniesalg at gmail.com
Wed Jan 11 23:26:39 UTC 2017


Hi Eliot,

Can you describe what a Locoed callback is in relation to Alien callback
> machinery?  Does the Locoed callback come in through thunkEntry or by
> another route?
>
I am using the standard Alien Callback machinery. I have not started to
debug completely this problem, but I have my suspicious: The full sequence
is something like this:

- Smalltalk method with a ffi callout
- Argument marshalling using Lowcode
- Actual callout: Switch from the Smalltalk Stack to the C stack via a
special trampoline. The trampoline is used for storing the return
instruction pointer. Probably I am also adding a reverse trampoline. This
is the part where I have my suspicious
- Some C code that invokes the callback in some time
- The smalltalk callback

During the rest of the week I will try to fix this problem. However, my
priority right now is in supporting 64 bits with Lowcode.

The build directly names break the naming convention.  Since the VMs below
> are Spur perhaps we should call them pharo.cog.spur.lowcode?  e.g. when I
> build immutability VMs I call the directory e.g.
> squeak.cog.spur.immutability.  So maybe we can use some convention like
> dialect.[sista|cog|stack].[spur|v3].[option1+...optionN].  Or, if lowcode
> always implies Sista support then pharo.lowcode.spur would work.
>
Fixed. pharo.cog.spur.lowcode . The actual Sista Cogit is not mandatory for
supporting Lowcode. Only StackToRegisterMappingCogit with the LowcodeVM and
the SistaVM flags is required. Probably, I should try to remove the
requirement on the SistaVM option.

Best regards,
Ronie

2017-01-11 13:36 GMT-03:00 Eliot Miranda <eliot.miranda at gmail.com>:

>
> Hi Ronie,
>
> On Wed, Jan 11, 2017 at 12:12 AM, Ronie Salgado <notifications at github.com>
> wrote:
>
>> Fixing Lowcode to work in 32 bits Linux, OS X and Windows.
>>
>> This pull request includes the adaptation of normal OpenSmalltalk VM
>> building scripts to build some Pharo VMs with the Lowcode inline primitives
>> in Linux and OS X. In Windows I failed to build a Pharo VM due to the
>> dependencies, so I tested using a Squeak VM with the Lowcode instructions
>> and a Pharo image ( http://ronie.cl/files/images/Pharo-lowcode.zip ).
>>
>> What is changed:
>>
>>    - More build scripts
>>    - Fixing the LowcodeFFI callout interpreter trampolines for building
>>    in OS X and Windows
>>    - Some missing memory accessors.
>>
>> What is working with these changes:
>>
>>    - All WodenMath tests are passing. WodenMath uses the Lowcode type
>>    system for generating Lowcode instructions at compile time.
>>    - UnifiedFFI callouts using Lowcode (Need to install the Lowcode uFFI
>>    backend by calling LowcodeFFICalloutAPI install, otherwise the SqueakFFI
>>    backend will be used).
>>
>> Woot!
>
>>
>>
>> What is not working(yet):
>>
>>    - UnifiedFFI callbacks using Lowcode. Crashing immediately in
>>    Windows. In Linux, does not crash all of the time, which seems to be some
>>    difference between the Interpreter and the Cogit
>>
>>
> Can you describe what a Locoed callback is in relation to Alien callback
> machinery?  Does the Locoed callback come in through thunkEntry or by
> another route?
>
>
> and below...
>
>> You can view, comment on, or merge this pull request online at:
>>
>>   https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/111
>> Commit Summary
>>
>>    - I am adding some building scripts for Pharo with Lowcode.
>>    - Newer version of the Lowcode callout trampoline.
>>    - Building scripts for a pharo VM with Lowcode.
>>    - Missing premissions from the latest commit.
>>    - Oops
>>    - I added the building scripts for a Pharo Lowcode VM in OS X.
>>    - Oops, missing permissions from the last commit.
>>    - Adding the generated Lowcode sources.
>>    - Build scripts for the Lowcode Pharo VM in Windows.
>>    - More building scripts for the Windows Lowcode VM.
>>    - Adding missing accessors for Lowcode.
>>    - Merge branch 'LowcodeFixup' of github.com:ronsaldo/opensmalltalk-vm
>>    into LowcodeFixup
>>    - Merge branch 'LowcodeFixup' of github.com:ronsaldo/opensmalltalk-vm
>>    into LowcodeFixup
>>    - Trying to fix GCC crash when building a Lowcode VM in Windows.
>>    - Merge branch 'LowcodeFixup' of github.com:ronsaldo/opensmalltalk-vm
>>    into LowcodeFixup
>>    - Newer version of the Lowcode sources.
>>    - Merge branch 'LowcodeFixup' of github.com:ronsaldo/opensmalltalk-vm
>>    into LowcodeFixup
>>    - Minor changes to the Lowcode build scripts for Windows.
>>    - Merge branch 'Cog' into LowcodeFixup
>>
>> File Changes
>>
>>    - *A* build.linux32x86/pharo.cog.lowcode/build.assert.itimerheartb
>>    eat/mvm
>>    <https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/111/files#diff-0>
>>    (37)
>>
>>
> The build directly names break the naming convention.  Since the VMs below
> are Spur perhaps we should call them pharo.cog.spur.lowcode?  e.g. when I
> build immutability VMs I call the directory e.g.
> squeak.cog.spur.immutability.  So maybe we can use some convention like
> dialect.[sista|cog|stack].[spur|v3].[option1+...optionN].  Or, if lowcode
> always implies Sista support then pharo.lowcode.spur would work.
>
>
>
>>
>> [snip]
>
> _,,,^..^,,,_
> best, Eliot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170111/fb6f1b22/attachment-0001.html>


More information about the Vm-dev mailing list