Commit Graph

2682 Commits

Author SHA1 Message Date
0ce14bdfd1 moving to SA register names (wip)
starting to implement register allocation by first creating SA
Single Assignment means a register is only every assigned a value once. Hence for any operation involving another register, a new register is created.
We do this with a naming scheme for the registers in dot notation (as it would be in c) which means 2 registers with the same name, should have the same contents. This does not apply to temporaries, but that is another day.
Starting WIP now, and will create many red commits before merging when green.
2020-03-22 14:31:43 +02:00
f2c853821c First version of BeginnersGuide and other doc changes 2020-03-21 19:02:02 +02:00
a40d8f2e8c update ffi for 2.7 2020-03-21 12:41:56 +02:00
887d7b9bbb replace fake compiler with real
less room for error
2020-02-28 12:54:17 +02:00
393f0d9a60 fix argument transfer (to be logical) 2020-02-27 18:19:27 +02:00
685022a6e0 Externalise register allocation into own class
On the way to the register allocation
2020-02-27 11:57:18 +02:00
fa144784fa cleaning 2020-02-26 19:31:41 +02:00
8832df3221 Add number of registers to platform 2020-02-26 19:01:01 +02:00
8df2e4bf08 SlotLanguage reborn in the Machine
Just added the compiler, that can parse Slot directly into SlotMachine code (no language layer in between)
Still unclear wheather the Maker is a thing, but since it was in the Language layer i did not remove it (yet)
Otherwise just the compiler and all the tests, moved from the slot_language.
2020-02-19 02:19:14 +07:00
d751c53d1d Add a SameCheck and rename the label
SameCheck is very similar to NotSameCheck, but only used from the language
Label was named jump, fixed that
2020-02-19 02:16:44 +07:00
b88c5ff498 Removing the SlotLanguage
I turned out that that layer did not provide benefit. Data was being shuffled, without gain, so i moved the compiler to the SlotMachine
2020-02-19 02:14:34 +07:00
2d11078a37 Slotted constructor cleanup 2020-02-17 14:45:54 +07:00
c1679bd6ff Makes slots linked list
slots used to ba an array of symbols
Now we have an object for each slot, that holds the name and the next_slot
relatively easy change, though quite broad
2020-02-17 14:29:45 +07:00
93103d551f Fixes for all test of next commit 2020-02-17 14:27:42 +07:00
21817b182e Start to make slots recursive 2020-02-17 14:26:50 +07:00
b7df6f66f9 rename the XX_slot classes to SlottedXX
move to slotted and slots (wip)
2020-02-15 21:05:04 +07:00
8b29326957 moving know_object out of the base class
object is only common to constant and object slots (which should be unified)
On the way to making the array recursive
2020-02-15 15:32:22 +07:00
6aa6b32c50 move slot out of instruction dir
since it is not an instruction, just a helper
also doing this before rewriting slot recursively
2020-02-15 14:52:44 +07:00
24ceb20281 cleaned up chained assignment and conditional
Making this almost usable
2020-02-13 19:45:47 +07:00
a153fde3f0 Fix variables to chain recursively 2020-02-13 19:09:00 +07:00
6194148fc5 Rename SlotMaker to Variable
Feels like now with better names, i can start to work.
2020-02-13 13:10:04 +07:00
c194d373fb rename LoadMaker to Assignment 2020-02-13 13:02:23 +07:00
99d2868400 Rename check_maker to equal_goto
will have different classes for different checks, started that
2020-02-13 12:53:41 +07:00
0342df41c7 introduce goto instead of using machines jump
fix labels so compiler does not return duplicates
2020-02-13 11:59:00 +07:00
0e3a8bb859 cleaning, docs 2020-02-12 15:41:16 +07:00
3c762c4fe7 Rename SlotDefinition to Slot
And the derived XXDefinitions to XXSlot

Just to be more consistent
And possibly free the Definition for the Language side
2020-02-11 16:19:52 +07:00
ec8794191d update parser
remove pesty warnings
2020-02-11 16:04:19 +07:00
31c8a0aac5 refactored the SlotLoad into SlotDefs
That sort of removes the last horrible code.
Surely can still be improved, but mostly oo now
2020-02-11 16:03:51 +07:00
8d02d82ff2 now object slot , almost done 2020-02-10 19:28:48 +07:00
1da5cd16c3 more splitting of slot code
now constants, still wip
2020-02-10 19:07:12 +07:00
24d7fe25da first steps to defining specialised slot classes
getting rid of the mess in SlotDefinition (wip)
2020-02-10 18:36:21 +07:00
df4fd409c1 getting back into it 2020-02-09 21:33:34 +07:00
5b27ae7ddf use env, not class var aas compilation switch 2020-02-08 17:44:35 +07:00
6d950086e7 improve texts 2020-02-07 16:14:20 +07:00
b7902e6953 remove checks 2019-12-07 11:50:25 +02:00
61b6496029 misc 2019-12-01 12:17:54 +02:00
308670b90c Start to transform SL into SM 2019-10-07 20:14:40 +03:00
8cac5c064d Start nexr level p i SlotLanguage, calling it MacroMaker
Since we already have Macros. Macros are nothing more than a list of SlotMachine Instructions. This is what we are aiming to create (which is also what is created in Sol .to_slot)

So the idea came to slot the MacroMaker in there after its done
2019-10-06 19:49:53 +03:00
cbbb0c2f07 More on slot assignment
which turn into slot_load
2019-10-05 19:37:24 +03:00
2c7944af85 if and goto for slot_language 2019-10-05 14:49:45 +03:00
9885841eb4 SlotLanguageExploration 2019-10-04 21:06:22 +03:00
901f7b0132 Mini start to the new SlotLanguage 2019-10-04 17:38:51 +03:00
d1f8733623 Rename Vool to Sol
Simple is really the descriptive name for the layer
Sure, it is "virtual" but that is not as important as the fact that it is simple (or simplified)
Also objct (based really) is better, since orientated implies it is a little like that, but only orientated, not really it. Sol only has objects, nothing else
Just cause i was renaming anyway
2019-10-04 00:38:47 +03:00
aa9fc8bc81 More rename cleanp 2019-10-03 21:07:55 +03:00
c43436f35a Change Mom to SlotMachine
rather large commit, but essentially a simple rename
Rationale in docs and blogs
2019-10-03 20:55:41 +03:00
fd8a3e9cc5 some cc driven cleanup
bit anoying that the builtin engine is used
Even it is not as well configurable as preferred reek.
Still, found one minor bug
2019-10-02 17:54:42 +03:00
48e18ac9cd the superclass of a singleton class is the singleton class of the superclass
And i have tests to prove it!
That just rolls of the tongue, it had to be the commit message
2019-10-01 20:55:05 +03:00
2dcb2a9a72 Introduce singleton types
Just for future, as this gives us a way to know immediately in the type, which represent normal, and which singleton classes
Also instantiate singleton class lazily (with singleton type)
This makes the type of class single, ie unique, immediately when it is used, ie methods or variables defined.
Fixes a design mistake, where all singletonn classes shared the same type, and thus unique methods per class were impossible
(Also some misc in commit)
2019-10-01 19:42:16 +03:00
ba83affd8c fix resolve issue
the typed method has to be created in the to_pafait pass for it to work correctly, ie for the sends to have something to call

also means that when during compilation creating (raising?) a  method, not only vool. but also callable has to be created
2019-09-29 22:37:28 +03:00
17f87f7464 Starting to fix resolve mechanism
resolve had the wrong approach, sort of class based oo
It took methods from "derived" types and just used them
To be correct, those methods would have to be recompiled for the current type, rubyx is type, not class based.
Started on that, still soe strange hang though

Later, type and method analysis may reveal "compatible" types (down only off course) where one could use the exact same code, but that is phase 2
2019-09-29 12:06:37 +03:00