Torsten
0ce14bdfd1
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. |
||
---|---|---|
.. | ||
arm | ||
bench | ||
elf | ||
lib | ||
mains | ||
parfait | ||
risc | ||
ruby | ||
rubyx | ||
slot_machine | ||
sol | ||
support | ||
util | ||
helper.rb | ||
README.md | ||
test_all.rb |
Testing
Tdd, Bdd , Xdd, whatever you call it, i have come to the point where it is a way not only to write software, but to think about software. Ie:
- if it's not tested, we don't know it works
- test first makes me think about the software from the outside. (good perspective)
I used minitest as the framework, just because it is lighter and thus when the time comes to move to rubyx, less work.
All
'''' ruby test/test_all.rb ''''
Parfait, Risc , Arm , SlotMachine
Follow the directory structure of the source and may be called unit tests
Risc/Interpreter
Contains many system tests that rely on everything else working. Should be hoisted i guess.
Main
Much like the Interpreter test, but for Arm. This is where the currently few executables are generated and there is an automatic way of running them remotely.
The plan is to integrate this with the interpreter directory