Commit Graph

153 Commits

Author SHA1 Message Date
31ae0a9670 Add support for unless
ifs without a true branch would crash before
Somewhat more verbose but unified
2019-08-14 22:24:35 +03:00
b2260d856d And we are green again
After having over 600 failing tests at one point, this does feel good.
Even better, most of the risc/interpreter tests where i didn't change anything came gree without changing the tests. ie we have binary compatibility.
2019-08-14 11:11:26 +03:00
c13a8ceb11 all of mom and vool
with working block tests this time
2019-08-13 20:35:27 +03:00
155c042009 Fix forgotten block compiler
Especially on the way down to risc
2019-08-13 19:32:17 +03:00
8036b23593 Fixed more disabled tests 2019-08-13 11:14:36 +03:00
aaf169ad8d Fixed almost all but Interpreter
150 only failing, seems only 1 bug though
and one in linker
2019-08-13 00:13:29 +03:00
9474932320 fixing risc collection tests 2019-08-12 16:12:17 +03:00
9a2716280c Extracting the mom instruction from builtin modules
Since they were embedded at first (easier copy/paste) they now got own files, like their brethren
also mini tests for each instruction , nice start
2019-08-12 13:16:15 +03:00
fa0aa30386 Move builtin wholesale to Mom
Since Builtin generates risc, just like mom instructions, it was a design mistake to put builtin into risc in the first place. Now that borders are coming more into focus, it make much more sense to have the builtin in mom.
In fact the instructions should be moved out and a seperate invocation mechanism used , so functions can be parsed, not generated (wip)
2019-08-12 12:38:29 +03:00
0b59c95218 more test fixes and more to do 2019-08-10 21:59:31 +03:00
213938075f fix most mom and risc apart
apart from things involving builtn, which is not yet conceptually solved (as it codes risc, not mom)
2019-08-10 21:30:00 +03:00
d5f89a4979 compile from mom compiler to risc 2019-08-10 12:42:47 +03:00
82c9f1d97f more and better tests
especially vool
2019-08-08 12:18:36 +03:00
Torsten Rüger
d5625a70d7 fix a whole bunch of vool to_mom
All but those requiring boot functions
2019-08-07 15:09:26 +03:00
Torsten Rüger
1237e079f7 Some vool starting to work again
disabling some rubyx compiler tests
2019-08-07 12:06:06 +03:00
Torsten Rüger
5d1d485565 move mom instruction up one
just like the risc one, also some basic tests
2019-08-06 20:44:39 +03:00
Torsten Rüger
66c2adda20 Copy risc compiler stuff to mom
Start to separate the layers. 
wip, just checkin in to see the following changes better
2019-08-06 18:33:27 +03:00
fdb940e43f stashing 2019-07-22 15:21:16 +03:00
Torsten Ruger
37eeb81f45 fix all tests for previous commit 2019-02-08 23:03:23 +02:00
Torsten Ruger
4d30727811 test and last fixes for previous commits (allocalte ints)
mostly just fixing the additional instructions
close #20
2018-11-24 22:40:22 +02:00
Torsten Ruger
4ff84133d2 add append to MomCompiler
also lazy init boot_function, so that compilers can be added up
before going to translate, where the boot_compilers are used
2018-11-02 15:54:30 -07:00
Torsten Ruger
8a81d41d5e Move booting to RubyXCompiler init
Also pass the source into the compile method.
This way compiler can be reused for subsequent compile.
Does remove some double boots, but no major time save
2018-09-02 13:57:19 +03:00
Torsten Ruger
f798173a09 change to_risc and builtin code according to last commit
Wherever space was loaded to get to the next_message
we now load the Message factory.
Otherwise much the same, only the attribute is next_object, not next_message
The binary is growing with 1k objects per factory, so i had to fix (hack) arm to handle bigger constants
close #14
2018-09-01 11:28:53 +03:00
Torsten Ruger
0a390cc5a9 shaves an instruction off resolve_method
by loading nil directly,  not space first
2018-09-01 11:20:59 +03:00
Torsten Ruger
dc12c1d70b add the addresses from labels as constants 2018-08-29 21:06:29 +03:00
Torsten Ruger
71ab369c71 use factory to generte intergers in space
start with just integer factory in space
change all the hand-out code
still #14
2018-08-24 18:49:21 +03:00
Torsten Ruger
9687d6611f avoid adding risc instructions twice
that causes loops in the chain
infinite loops in the code that are hard to debug
closes #11
2018-08-19 17:29:04 +03:00
Torsten Ruger
f85fe8a2cb fix bug in slot_load and definition
move parfait helper for reuse
2018-08-19 15:36:51 +03:00
Torsten Ruger
b294208025 continue with #11
slots are the most tricky, especially testing
2018-08-19 13:06:00 +03:00
Torsten Ruger
047a36178f start with #11
by adding striaght to compiler
2018-08-19 12:56:44 +03:00
Torsten Ruger
86462e238a large test changes due to change in cc
calling convention does affect
less than before, but still a LOT
2018-08-12 15:02:23 +03:00
Torsten Ruger
393ac873c9 change return sequence to return messages to space
as it was before blocks
(thought blocks would make reuse of messages impossible, but was wrong, this only appilies to lambdas)
(too) many tests affected
2018-08-06 14:07:17 +03:00
Torsten Ruger
fd25f997ce reqrote return sequence with builder
added test _before_ , same code, just much easier to read
in preparation for returning messages
2018-08-06 13:04:47 +03:00
Torsten Ruger
308996bf8e fix all tests accordingly to new return 2018-08-02 17:37:27 +03:00
Torsten Ruger
4b4528abb2 propagate constants from block_compiler up
up to method_compiler, where they are collected by mom_compiler
(and included in binary)
2018-08-01 16:27:34 +03:00
Torsten Ruger
04bcfea8ce fix scoping of blockcompiler
Was accessing caller scope, but must use caller's caller as the yield itself is a call.
2018-07-31 18:00:42 +03:00
Torsten Ruger
9c6a099cde block test
working on return semanitcs
(still avoiding the implicit return)
2018-07-30 14:10:24 +03:00
Torsten Ruger
285a88b59f generalize assemblers to use callables
not just methods,  they are almost the same anyway
2018-07-30 10:23:42 +03:00
Torsten Ruger
d80ef4bf4e store method, not name, in message
changes the calling and thus too many test
2018-07-22 22:29:32 +03:00
Torsten Ruger
3c1137066b more block tests reveal a compiler bug
copy/paste, args twice in switch
2018-07-18 10:13:19 +03:00
Torsten Ruger
ff8b95f21a get block resolution to use the extra
block_compiler puts in the extra, that we get out when resolving the type
Thus block args work, though only by assuming direct call
2018-07-17 10:37:33 +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
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
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
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