Commit Graph

2160 Commits

Author SHA1 Message Date
64d860b2bf create a load on the compiler
thus removing the need for << with objects on RegisterValue
2020-03-22 14:31:43 +02:00
95f3eec043 repurpose RValue as RegisterSlot
with the idea of the better name came also the one about not needing the builder anymore
2020-03-22 14:31:43 +02:00
088017bc05 SA for Slotted derivations
Object and Constant similarity are coming more into focus. Will unite after the merge
2020-03-22 14:31:43 +02:00
d22da1ab97 SA for slot_to_reg 2020-03-22 14:31:43 +02:00
77003eed06 remove use_reg on compiler and SA for load 2020-03-22 14:31:43 +02:00
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
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
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
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
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
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
1e5073200c Remove separate block_compiler lists
both in mom and risc method complers
alll just compilers now, all linked
Required to move some code down into callable_compiler but all in all quite little. cleaner
2019-09-28 17:24:10 +03:00
dcbc3e17be refactor risc_collection
move code that operates on compiler to the compiler class
this leaves the collection thin, very thin indeed
2019-09-28 15:37:02 +03:00
9f81d78767 Also make risc compilers a linked lists
also via util::compiler_ist
leave collection as much in place as possible
(though collections and seperate block_compilers are about to go)
2019-09-28 15:08:08 +03:00