rubydesign
fb4fa598f2
fix get_internal_byte
...
improved operators and tests
some logic errors still
2020-03-22 14:31:43 +02:00
rubydesign
a70f63e7bb
fix remaining slot instruction tests
2020-03-22 14:31:43 +02:00
rubydesign
07873ce068
fix not same logic
...
caused by assert logic error, also fixed
2020-03-22 14:31:43 +02:00
rubydesign
c1cfc12a1c
converted resolve_method
...
Big, left till last, but surprisingly painless
2020-03-22 14:31:43 +02:00
rubydesign
12fe0b9a10
add constants automatically
2020-03-22 14:31:43 +02:00
rubydesign
28e9cd335a
still fixing instruction tests
2020-03-22 14:31:43 +02:00
rubydesign
e6729b8b60
fixing instruction tests
2020-03-22 14:31:43 +02:00
rubydesign
22d513d895
fix div4 and tests
...
also bug in reduce_int, compiler not carried through
2020-03-22 14:31:43 +02:00
rubydesign
eed9ba082f
Fix div10 and test
...
fix and use load_data (similar to load_constant)
and integrate into load_object when appropriate (ie for integers)
2020-03-22 14:31:43 +02:00
rubydesign
bd02f69824
reduce_int was overwriting register
...
No more. But the type question is open, ie what type does the resulting register have
2020-03-22 14:31:43 +02:00
rubydesign
53eb28fff4
load constant to create register names with class
...
Just the id_ did give no clue to the contents, just took care of the uniqueness.
Better for debugging
2020-03-22 14:31:43 +02:00
rubydesign
3ec5557ddb
fix builder logic error
...
and tests
2020-03-22 14:31:43 +02:00
rubydesign
1760b5b203
fix comparison test and helpers
...
moving to passing the instruction number, not the instruction
so in the error message we can say where the error is
(otherwise minitest is good enough to supress the trace of asserts calling asserts)
2020-03-22 14:31:43 +02:00
rubydesign
3575aada17
tests for all macros
...
generated on master (know to work)
but with rXX registers, needs fixing
2020-03-22 14:31:43 +02:00
rubydesign
9c5d17a3bb
Fix div10 without method_missing
...
but reanimate infer_type to auto create the needed regsiters
also some helpers
2020-03-22 14:31:43 +02:00
rubydesign
9a5e0f15cd
reannimate infer_type
...
now with a _purpose_
2020-03-22 14:31:43 +02:00
rubydesign
3688c967d3
Fix comparison macro
...
which leaves a definite need for instruction level testing
2020-03-22 14:31:43 +02:00
rubydesign
2af953e1d2
last instruciton, dynamic_call
...
next macros
2020-03-22 14:31:43 +02:00
rubydesign
7f5ebab800
did block yield
2020-03-22 14:31:43 +02:00
rubydesign
a4c0b8e5f9
did return sequence
...
surprisingly easy. also some check polish
2020-03-22 14:31:43 +02:00
rubydesign
fd43fc9e5c
finally fixes the builder
2020-03-22 14:31:43 +02:00
rubydesign
db5a59f735
Unify instruction namings also dirs
...
Was getting confused myself, where it was instruction or instructions, when if the base class was inside or out of dir.
Now dirs are plural, and base class is inside.
2020-03-22 14:31:43 +02:00
rubydesign
f3d299208e
fix message_setup with new builder
2020-03-22 14:31:43 +02:00
rubydesign
d0036ed95b
better way to test object registers
...
also some cleaning, by using more helpers
2020-03-22 14:31:43 +02:00
rubydesign
ece1e8c87b
fix some more of builder
...
but still not all. removed some and fixed the register allocation in allocate_int
2020-03-22 14:31:43 +02:00
rubydesign
ff49ff50c0
Convert SimpleCall to new regs
...
Also fix bug in RegsiterValue/Slot with chain, where logic was dodgy and compiler not set
2020-03-22 14:31:43 +02:00
rubydesign
4b303977a7
Fix first Slot instruction that uses builder
...
now without method_missing and names
but still with instance_eval, hmm. Tried without, makes code much less readable
2020-03-22 14:31:43 +02:00
rubydesign
4888b3b6db
Starting to rework slot instructions that create risc
...
have to go through all and all macros and all thems tests. What did the wise man say: one step at a time
2020-03-22 14:31:43 +02:00
rubydesign
4643be0ae6
codong RegisterSlot with reg and slot
2020-03-22 14:31:43 +02:00
rubydesign
64d860b2bf
create a load on the compiler
...
thus removing the need for << with objects on RegisterValue
2020-03-22 14:31:43 +02:00
rubydesign
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
rubydesign
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
rubydesign
d22da1ab97
SA for slot_to_reg
2020-03-22 14:31:43 +02:00
rubydesign
77003eed06
remove use_reg on compiler and SA for load
2020-03-22 14:31:43 +02:00
rubydesign
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
rubydesign
f2c853821c
First version of BeginnersGuide and other doc changes
2020-03-21 19:02:02 +02:00
rubydesign
a40d8f2e8c
update ffi for 2.7
2020-03-21 12:41:56 +02:00
rubydesign
887d7b9bbb
replace fake compiler with real
...
less room for error
2020-02-28 12:54:17 +02:00
rubydesign
393f0d9a60
fix argument transfer (to be logical)
2020-02-27 18:19:27 +02:00
rubydesign
685022a6e0
Externalise register allocation into own class
...
On the way to the register allocation
2020-02-27 11:57:18 +02:00
rubydesign
fa144784fa
cleaning
2020-02-26 19:31:41 +02:00
rubydesign
8832df3221
Add number of registers to platform
2020-02-26 19:01:01 +02:00
rubydesign
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
rubydesign
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
rubydesign
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
rubydesign
2d11078a37
Slotted constructor cleanup
2020-02-17 14:45:54 +07:00
rubydesign
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
rubydesign
93103d551f
Fixes for all test of next commit
2020-02-17 14:27:42 +07:00
rubydesign
21817b182e
Start to make slots recursive
2020-02-17 14:26:50 +07:00
rubydesign
b7df6f66f9
rename the XX_slot classes to SlottedXX
...
move to slotted and slots (wip)
2020-02-15 21:05:04 +07:00