Torsten Ruger
57fc67ddf6
move address list to object_space
...
where i guess it should have been from the start
2018-07-01 13:43:53 +03:00
Torsten Ruger
35b10c46a3
adds the risc instructions to the compiler
...
since they are not in the method anymore
2018-07-01 11:59:52 +03:00
Torsten Ruger
22b1fea587
use rubyc_compiler as instance
...
not as before class methods
so we can carry the state around
2018-07-01 11:59:07 +03:00
Torsten Ruger
1505df894a
remove translation
...
from machine, which is quickly becoming a linker
2018-07-01 11:58:06 +03:00
Torsten Ruger
1a97408e22
return compiler, not generated mom
...
does make the tests more verbose, but the code cleaner
2018-07-01 11:57:17 +03:00
Torsten Ruger
f7dfa1c45e
return assemblers from translation
...
result of translate is cpu instructions, our equivalent of assembly.
So return Assemblers for next stage
2018-07-01 11:56:09 +03:00
Torsten Ruger
3813de19fc
finally removing instruction from parfait method
...
instructions are intermediate results on the way down
and as such never should have been in there
2018-07-01 11:54:44 +03:00
Torsten Ruger
2d83473d74
add assembler
...
getting the layers better
2018-07-01 11:53:18 +03:00
Torsten Ruger
05669065ca
back to method_compiler
...
it is what it is
2018-06-30 23:26:28 +03:00
Torsten Ruger
91a99b1239
let boot_functions return the compilers
...
methods are still added, but this is a good step to removing the risc/cpu level from the methods
2018-06-30 23:16:17 +03:00
Torsten Ruger
208b98d709
start to move translate code
2018-06-30 22:53:32 +03:00
Torsten Ruger
daf1b56062
start on class compiler
...
idea is to get cleaner layer seperation
reduce machine and rework builtin boot
2018-06-30 19:20:17 +03:00
Torsten Ruger
4a7cc72732
always list of methods in class
...
improve vool test dirs
2018-06-30 10:08:18 +03:00
Torsten Ruger
46d8f5002f
hoist parfait boot out of the machine boot
2018-06-30 00:39:23 +03:00
Torsten Ruger
8d7a2fe4d6
fix mom tests
...
and always have a list inside a class
2018-06-29 23:29:10 +03:00
Torsten Ruger
c8451d0048
create rubyx dir and move previous vool_compiler there
2018-06-29 22:46:39 +03:00
Torsten Ruger
63dd6d9039
moved statements up one dir
2018-06-29 22:46:00 +03:00
Torsten Ruger
7377522417
fix test ripples and minor parfait naming
...
Parfait ruby and boot names desynced, fixed that
2018-06-29 21:03:06 +03:00
Torsten Ruger
ae35fed0ab
fix list to expand
...
prevously fixed max length list
now expanding on demand, using next
quite like binary_code, a pattern is emerging
2018-06-29 20:58:59 +03:00
Torsten Ruger
5036dd68df
remove to_mom from ruby_to_vool
...
must have slipped in
affects mosty tests
2018-06-29 14:57:48 +03:00
Torsten Ruger
6bd01fd55f
rename method_compiler
...
in line with other compiler XX_Compiler being the compiler for that layer
remove type from compiler as it is in method available
2018-06-29 14:48:52 +03:00
Torsten Ruger
114dc95b60
move parfait boot into parfait
...
and out of risc
2018-06-29 14:36:11 +03:00
Torsten Ruger
e6f01748ff
move adapter stuff around
2018-06-29 14:26:25 +03:00
Torsten Ruger
86b1edb40c
add seperate builders
...
remove if with polymorphism for different builders
(easier to understand by naming)
2018-06-29 13:27:57 +03:00
Torsten Ruger
3dffebed3f
rename a bit
2018-06-29 13:03:19 +03:00
Torsten Ruger
d50893bb0f
rename risc_value to register_value
...
almost to register, but it still carries that value
2018-06-29 11:39:07 +03:00
Torsten Ruger
606c7bf906
remove booted flag
...
just boot if needed
2018-06-29 11:36:14 +03:00
Torsten Ruger
f1b09ac58d
move builtin boot to builtin module
2018-06-29 11:23:26 +03:00
Torsten Ruger
18994d2b4b
start on yield statement
2018-06-28 20:15:24 +03:00
Torsten Ruger
2e086a78e2
bit of refactoring
2018-06-27 17:09:50 +03:00
Torsten Ruger
f0ba863721
remove to_mom / create_objects dichotomy
...
wsa supposed to be clearer, but even to me seems confusing now.
2018-06-26 20:46:58 +03:00
Torsten Ruger
c6a903073a
start on blocks
2018-06-26 20:28:27 +03:00
Torsten Ruger
67a6ef9f67
add rewriting of operator assignment
...
foo += 1 becomes foo = foo + 1 in vool
2018-06-25 16:32:20 +03:00
Torsten Ruger
b804be5f70
fix dynamic call
...
which had the method in the regsiter, not the binary.
Single SlotToReg added (and some tests)
Which amazingly fixed all broken binary tests
2018-06-25 00:19:43 +03:00
Torsten Ruger
068bda492c
implement DynamicJump for Arm
...
which is in fact the same as return (moving address into pc)
2018-06-24 19:13:55 +03:00
Torsten Ruger
ce79617875
fix the exit sequence
...
was returning wrong register (1, not 0)
also saving the message for test, which changes order as the return value destroys the message
2018-06-19 19:52:06 +03:00
Torsten Ruger
5f7683efcf
pass return integer back out through exit
...
for testing of binaries later (and off course general correctness)
Some tests were using the fact that the interpreter was used, changed those to return ints rather than strings
2018-06-19 18:55:47 +03:00
Torsten Ruger
db459fcd3d
fix label loading in arm
...
was still loading the integer address
instead of the return address's address
Hello World working
2018-06-19 17:35:00 +03:00
Torsten Ruger
956c2ebe54
make arm use branch_lsteners
2018-06-19 10:51:03 +03:00
Torsten Ruger
9fc7f9b528
fix arm write syscall
2018-06-19 10:49:53 +03:00
Torsten Ruger
046617f8dc
add branch listener functionaliy
...
have to store the branches and loop again as labels
dont neccessarily have positions yet
2018-06-17 22:25:38 +03:00
Torsten Ruger
3298651238
split create_binary into two phases
...
Which gives instructions a chance to check everything
and in Arms case check the constant loads/ instruction adding
So that during assembly no more change happens (and we don't have to reassemble)
2018-06-17 13:53:17 +03:00
Torsten Ruger
c94f6eaa78
small maintanance
2018-06-16 21:01:15 +03:00
Torsten Ruger
7543236f4f
objects didn't get positions
...
positions.empty? was wrong check
2018-06-16 10:58:54 +03:00
Torsten Ruger
698c845297
seperate position create and register
...
many test fixes
2018-06-15 22:00:49 +03:00
Torsten Ruger
9c93b38b8f
crete positions while collecting objects
...
clear two phase lifecycle for positions
always created invalid and set later
new does not auto add to cache
but create and get_or_create do
2018-06-15 21:54:21 +03:00
Torsten Ruger
2c765c8f14
rename the objects accessor
...
and move to object keys, not object_id
2018-06-15 09:18:39 +03:00
Torsten Ruger
3cc9175efa
start BranchListener
...
but on hold, since it needs positions before we have them
Must create them during collection phase
2018-06-14 21:29:34 +03:00
Torsten Ruger
5ec235d049
fixes outstanding misc, All green
...
Well. it's been a while, positioning is fixed (again)
apart from the upcoming BranchListener
2018-06-10 13:19:55 +03:00
Torsten Ruger
e1683938ed
fix label positioning bug
...
where a label at the end of a binary code resulted in the
label actually taking up a position, instead of sharing it with it's next
2018-06-10 13:18:56 +03:00