Commit Graph

2504 Commits

Author SHA1 Message Date
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
a71a6d34fb use message reg not message
for upcoming change
2018-07-15 15:14:38 +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
ab8b574e9c also recode the slot_definition resolution
much like in the slot_load. In fact suspiciously so.
wip, as also changing to storing type (not sym) in reg
2018-07-14 22:39:00 +03:00
Torsten Ruger
58c7294abd finish the loop in slot_load
thus rewrite of that old nested if thing is done
2018-07-14 11:04:21 +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
a3e758357c extract base class from method_compiler
to be used for blocks too
2018-07-10 22:02:11 +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
4ac89ece66 start delegating scope matters to the compiler(s)
slot_type_for to return the slot way to access variable
this is off course version 0.0.1 alpha, no types are checked or errors handled
2018-07-09 17:53:56 +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
7c4faf7b2a fix broken test
guard was green before i pushed, i swear
No really
2018-07-07 17:34:48 +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
2ad24ab0bb add to_s for statements 2018-07-03 22:18:19 +03:00
Torsten Ruger
e099014d63 fix dunamic jump in interpreter and misc 2018-07-03 19:15:36 +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
6af651a886 text writer working
adjusted ordering as psoitioning, ie
methods in order of the assemblers of the linker
(not the object space)
2018-07-02 17:05:02 +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
6a4c90e2bd fix the cpu_init for linker
cpu_init still translates from risc_init
but since interpreter is a platform risc_init is a private thing
and the cpu_init does not need to be lazily created, so it's done in the init
2018-07-02 15:51:50 +03:00
Torsten Ruger
9bd8eab999 remove class attribute that was left dangling
not used, which prompted rename. just forgot to delete it
2018-07-02 15:50:54 +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