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.