[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] DO NOT INTEGRATE - FOR DISCUSSION ONLY Minimalistic headless x64 msvc2017 (#312)

Ronie Salgado notifications at github.com
Sat Dec 1 04:10:58 UTC 2018


Hi Ben,

On a quick glance, some of these changes are still required, particularly the FPU one, probably the alloca one.

Other changes, such as the #define BUILD_VM_CORE is actually wrong. The minheadless builds the VM itself in a separate library (currently a static library) that can actually be embedded in any application. The public interface for this library is in include/OpenSmalltalkVM.h The problem in windows here was that BUILD_OSVM_STATIC in a previous version was BUILD_SQUEAK_STATIC . After a commentary from @estebanlm I changed the squeak_ prefix for the osvm_ in this public interface.

The public interface file is intended as an stable standalone interface to the vm. So, dependencies on sq.h or similar should not be allowed in this file (In my opinion). The implementation for this interface is in platforms/minheadless/common/sqVirtualMachineInterface.c . This header should be something that an user can copy to /usr/include . osvm_main can be used as an example on how to embed the VM in an application:

> OSVM_VM_CORE_PUBLIC OSVMError
> osvm_main(int argc, const char **argv)
> {
>     OSVMError error;
> 
>     /* Global initialization */
>     error = osvm_initialize();
>     if(error)
>         return error;
> 
>     /* Parse the command line*/
>     error = osvm_parseCommandLineArguments(argc, argv);
>     if(error)
>         return error;
> 
>     /* Initialize the VM */
>     error = osvm_initializeVM();
>     if(error)
>         return error;
> 
>     /* Load the command line image or the default one. */
>     error = osvm_loadDefaultImage();
>     if(error)
>         return error;
> 
>     /* Run Squeak */
>     error = osvm_run();
> 
>     /* Shutdown*/
>     osvm_shutdown();
> 
>     return error;
> }

A part of the better 32 bits detection and configuration should also be integrated. When I started the minheadless VM two years ago, there was no stable win64 version of the VM.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/312#issuecomment-443397814
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181130/f884bdb5/attachment-0001.html>


More information about the Vm-dev mailing list