powerlang / egg

Egg Smalltalk
https://eggsmalltalk.org
MIT License
16 stars 3 forks source link

Move building and nativization out of Powerlang into Powertalk/DMR #4

Open melkyades opened 2 years ago

melkyades commented 2 years ago

Currently, Powerlang contains a lot of code used for nativization of the DMR, which is used for generating a runnable nativized image segment. This code is very similar to the nativizer that will be used by the DMR.

Instead of doing things like described above, to generate a DMR the system should:

1 - Generate a minimal Powertalk virtual image with the kernel (nil, true, false, classes, methods) 2 - Execute (by simulation) a bootstrap method, which itself loads both the nativizer and the image segment builder into de virtual image, and generates a nativized image segment.

This has a few benefits, as it makes Powerlang much smaller and decouples bootstrap from nativization and from image segment building. Powertalk-Building is mostly gone (migrated to Powertalk). Powertalk-Assembler-*, Powerlang-Nativizer and Powerlang-OCompiler too. The nativization stuff, used only by the Powertalk DMR, goes to only one place (the Powertalk/DMR source), and non-DMR vms do not need to care about it.

melkyades commented 2 years ago

The code has been already moved to the powerlang/bee-dmr repo. The glue code that makes the kernel module write itself as an image segment is still missing (and should be placed in the powerlang/bee-dmr repo too)