Torsten Ruger
4cc04787e9
remove Risc.resolve_to_index
...
mostly by using better typed registers,
which cleans up the code where it was used
2018-07-16 19:00:04 +03:00
Torsten Ruger
3343017dba
move type resolution to compiler
...
from risc_value.
also unite mock compilers
2018-07-16 11:46:18 +03:00
Torsten Ruger
e3673e579c
pass extra info into register init, not just value
...
extra info may be hash, maybe just type info
2018-07-16 11:23:09 +03:00
Torsten Ruger
b410538d07
uups, forgot to check that in
2018-07-15 17:44:26 +03:00
Torsten Ruger
3bc85805a4
must pass registers to slot_to_reg and reg_to_slot
...
as they are typed, those functions don't resolve on Risc, but the register type
miscother changes from previous commits
2018-07-15 16:30:50 +03:00
Torsten Ruger
f31d22d901
use real type in register, not symbol
...
this has some more consequences, upcoming
2018-07-15 15:16:12 +03:00
Torsten Ruger
69385c863f
some more addresses
2018-07-15 15:13:25 +03:00
Torsten Ruger
eaeea29e38
helper erro handling
2018-07-15 12:32:02 +03:00
Torsten Ruger
648ec772ec
direct index access helper for type
2018-07-15 12:30:50 +03:00
Torsten Ruger
581f457119
type helper for class name
2018-07-14 11:03:16 +03:00
Torsten Ruger
61c840c023
start to move slot_load code to register_value
...
the iea is to iterate through register_values while reducing the slot_load to a number of Slot_to_regs
wip
2018-07-13 21:56:55 +03:00
Torsten Ruger
21009b0e9b
delegate resolve to compiler when needed
...
and forgotten space test
2018-07-13 21:55:27 +03:00
Torsten Ruger
a095515b0e
new get_type_by_class_name helper for space
...
sorely needed, with 36 occurences replaced
2018-07-13 21:50:40 +03:00
Torsten Ruger
27a142f2a3
use compiler base class for blocks too
...
can now go to mom level and add
test harness still looks overly complicated, but works
first block tests at mom level
2018-07-10 22:03:32 +03:00
Torsten Ruger
edea9ac080
makeing the method of the compiler more or less private
...
in preparation for using the same code for bocks
2018-07-09 19:32:17 +03:00
Torsten Ruger
63b55f2aa4
refactor a bit for upcoming delegations
...
must get method to be private
more tell, not ask
2018-07-09 18:16:51 +03:00
Torsten Ruger
06e78a7326
fix locals scope in method and blocks
...
methods used to gobble up any locals of included scope. fixed
Blocks now create frame_type correctly and don't include and locals that are in fact method scope
2018-07-09 17:55:45 +03:00
Torsten Ruger
dd544214b3
start with block_compiler
...
as a copy of method_compiler
re-merge later, when we know what's needed
2018-07-09 16:48:23 +03:00
Torsten Ruger
7231f301ba
move tests with mom_compile to mom
2018-07-07 22:45:48 +03:00
Torsten Ruger
0d900de695
block creation and insertion with correct types
2018-07-07 22:42:00 +03:00
Torsten Ruger
1913848910
fix conflicting test class names
...
why the fail didn't show locall, even with the same seed, i do not know
2018-07-07 17:57:46 +03:00
Torsten Ruger
f2af763f14
update readme
2018-07-07 17:34:08 +03:00
Torsten Ruger
2f07cc34f3
add parfait block
2018-07-07 15:50:43 +03:00
Torsten Ruger
9005513368
rename typed_method to callable_method
...
seems to make the essence clearer
also extracted base class
2018-07-07 09:11:09 +03:00
Torsten Ruger
acd5cd8f30
rename for_type to self_type
...
and split a base class off TypedMethod
2018-07-06 20:01:17 +03:00
Torsten Ruger
3f80953385
passing compiler to to_mom, not method
...
To be able to delegate scope (block/method) things later
2018-07-05 14:02:38 +03:00
Torsten Ruger
16d91f24ce
start to test block_statement
2018-07-04 23:21:11 +03:00
Torsten Ruger
2485f7e9eb
misc fixes and (finally, sigh) green again
...
deeeep dive, almost 40 commits
2018-07-04 09:18:55 +03:00
Torsten Ruger
d8b58d8da6
fix inital main (again)
...
stop even compiling a fake main if a real exists (in builtin)
previous version was still buggy: using builting methods types (especially locals) even comiled version had different
2018-07-04 09:17:30 +03:00
Torsten Ruger
6f936f190d
misc to_s and small fixes
2018-07-04 08:28:29 +03:00
Torsten Ruger
8b9fd29ce9
Only add Builtin methods that are not in the current compilation
...
Current bug looks like the original main is used in parts
(not the compiled one, but the builtin on)
2018-07-04 08:28:05 +03:00
Torsten Ruger
cab6bc389f
misc little test fixes
2018-07-03 10:12:40 +03:00
Torsten Ruger
bb1d1495db
fix constant propagation through the layers
...
so they can end up in the binary
2018-07-03 10:12:22 +03:00
Torsten Ruger
63dfee0978
move some tests around (and fix them)
2018-07-02 23:20:54 +03:00
Torsten Ruger
55b5884c4e
minor test fixes
2018-07-02 23:03:33 +03:00
Torsten Ruger
56f2742e89
fix code listener logic bug
...
next's position was only updated initially
previous logic relied on pushing everything long rightly
but it wasn't right, and no harm in setting position twice,
as events only fire if there is real change
2018-07-02 23:03:00 +03:00
Torsten Ruger
a1197fb70c
interpreter tests working again
2018-07-02 17:29:26 +03:00
Torsten Ruger
4b33d1c056
fix many a test especially whole mom
...
but some positioning bug still in there preventing
binary to work
2018-07-02 17:01:07 +03:00
Torsten Ruger
474cd4b348
linker and collector test work again
...
had to give space a fixed number of addresses
2018-07-02 16:19:01 +03:00
Torsten Ruger
4e49c0469c
fix compiling support
...
which makes all the vool tests pass again
2018-07-02 15:52:51 +03:00
Torsten Ruger
1132309f6a
unify space collection attribute naming
...
currently space is still acting as a sort of memory manager.
For proper linking, all objects must be reachable from space, hence the plural versions like messages and addresses (even they are instances, it is the list that is important)
To dish out instance to use, the head must be kept, ie next_XXX for intergers, return addresses and messages
2018-07-02 15:49:51 +03:00
Torsten Ruger
07a154be70
code listener now get platform explicitly
...
used to grab it from global machine.
Now passed in from linker
tests fixed accordingly
2018-07-02 09:39:07 +03:00
Torsten Ruger
8952b39446
linker goes through assemblers, not space
...
used to traverse all methods in space
now "just" use the passed assemblers, which usually should be compiled and builtin (but for testing . . .)
tests fixed accordingly
2018-07-02 09:37:58 +03:00
Torsten Ruger
f4b1290e58
position tests working
2018-07-02 09:35:57 +03:00
Torsten Ruger
22408b86c6
return the linker from mom_compiler
...
linker holds assemblers
assemblers come from method compilation
and so the layers come into focus
2018-07-01 21:51:48 +03:00
Torsten Ruger
5f2a256608
fix platform derivation and some tests
2018-07-01 21:27:27 +03:00
Torsten Ruger
bb49f1be78
rename ClassCompiler to MomComplier
...
ended up not even using the class, it just came from there
It actually compiles methods, and it turns out is the point where builtin comes into the picture as it's boot process also returns method compilers
2018-07-01 21:26:45 +03:00
Torsten Ruger
c947c27a14
clean up booting
...
many machine boot became obsolete
or just neede parfait to boot
actual linker functionality pending
2018-07-01 14:12:42 +03:00
Torsten Ruger
e10092a4be
rename machine to linker
...
even work is not quite finished, but helps root out offenders
(needless to say this is wip, deep red wip)
2018-07-01 13:45:14 +03:00
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