remove references to soml

This commit is contained in:
Torsten Ruger
2016-12-11 12:55:03 +02:00
parent 3715eb94ed
commit f3248462cc
16 changed files with 25 additions and 57 deletions

View File

@ -1,9 +1,9 @@
### Compiling
The Ast (abstract syntax tree) is created by [salama-reader](https://github.com/salama/salama-reader)
gem and the classes defined there
The typed syntax tree is created by the ruby compiler.
The code in this directory compiles the AST to the virtual machine code, and Parfait object structure.
The code in this directory compiles the typed tree to the register machine code, and
Parfait object structure.
If this were an interpreter, we would just walk the tree and do what it says.
Since it's not things are a little more difficult, especially in time.
@ -19,13 +19,11 @@ Similarly, the result of compiling is two-fold: a static and a dynamic part.
Too make things a little simpler, we create a very high level instruction stream at first and then
run transformation and optimization passes on the stream to improve it.
The compiler has a method for each type for ast, named along on_xxx with xxx as the type
The compiler has a method for each class of typed tree, named along on_xxx with xxx as the type
#### Compiler holds scope
The Compiler instance can hold arbitrary scope needed during the compilation. Since we compile Soml
(a static language) things have become more simple.
The Compiler instance can hold arbitrary scope needed during the compilation.
A class statement sets the current @clazz scope , a method definition the @method.
If either are not set when needed compile errors will follow. So easy, so nice.
@ -42,7 +40,7 @@ The general structure of the instructions is a graph
#### Messages and frames
Since the machine is virtual, we have to define it, and since it is oo we define it in objects.
Since the machine is oo we define it in objects.
Also it is important to define how instructions operate, which is is in a physical machine would
be by changing the contents of registers or some stack.
@ -57,13 +55,3 @@ When a Method needs to make a call, it creates a NewMessage object.
Messages contain return addresses (yes, plural) and arguments.
The important thing here is that Messages and Frames are normal objects.
### Distinctly future proof
Soml is designed to be used as an implementation language for a higher oo language. Some, or
even many, features may not make sense on their own. But these features, like several return
addresses, are important to implement the higher language.
In fact, Soml's main purpose is not even to be written. The main purpose is to have a language to
compile ruby to. In the same way that the assembler layer in salama is not designed to be written,
we just need it to create our layers.

View File

@ -1,15 +1,7 @@
## Notice of change
The stuff below, like the whole of Parfait, was written before soml. Ie before there was a seperate
language to compile a higher language to. Soml is not so dynamic, could do without much of the
ObjectSpace that is the core of Parfait.
So things will change. How will become clear when soml is finished.
### Parfait: a thin layer
Parfait is the run-time of the **vm**.
To be more precise, it is that part of the run-time needed to boot soml.
Parfait is the run-time of the object system.
To be more precise, it is that part of the run-time needed to boot.
The run-time needs to contain quite a lot of functionality for a dynamic system.
And a large part of that functionality must actually be used at compile time too.
@ -17,9 +9,6 @@ And a large part of that functionality must actually be used at compile time too
We reuse the Parfait code at compile-time, to create the data for the compiled vm.
To do this the vm (re) defines the object memory (in parfait_adapter).
To do the actual compiling we parse and compile the parfait code and inline it to
appropriate places.
A work in progress that started from here : http://salama.github.io/2014/06/10/more-clarity.html
went on here http://salama.github.io/2014/07/05/layers-vs-passes.html