Commit Graph

419 Commits

Author SHA1 Message Date
fc6aa4e28b rework operator with builder 2018-08-08 15:49:47 +03:00
78466090b3 add reduce_int and fix bug
hardcoded operator, buh
reduce_int to avoid that long constant
2018-08-08 15:49:07 +03:00
f5ea51c4d0 new test to run out of ints 2018-08-08 12:03:17 +03:00
6200a35562 add shortcut for class_name
for when type is not set
2018-08-08 12:02:59 +03:00
c63e55c2bc add an operator function
to be able to use the builder more
also add ability to load fixnums (for the int functions)
2018-08-07 20:48:36 +03:00
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
595e032edf add function_return helper to risc_value
create a function_return from within builder
2018-08-06 13:03:33 +03:00
c9d8f750e5 extend type inference for dsl
and finally test it
2018-08-06 10:11:12 +03:00
308996bf8e fix all tests accordingly to new return 2018-08-02 17:37:27 +03:00
050659ea12 block tests for if and while
bundle update too
2018-08-01 20:17:41 +03:00
4f3c0d8b08 more block tests working
dynamic calls and operators on block args
(giant strides)
2018-08-01 16:31:16 +03:00
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
81cc109d1e more block tests
instance and arg access
2018-07-31 19:44:40 +03:00
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
4fe0edd1e3 first risc level block test working
assign was not executing yield
baecause it was just testing for send, instead of callable
2018-07-30 20:11:52 +03:00
9c6a099cde block test
working on return semanitcs
(still avoiding the implicit return)
2018-07-30 14:10:24 +03:00
165036ea39 misc 2018-07-30 10:26:47 +03:00
285a88b59f generalize assemblers to use callables
not just methods,  they are almost the same anyway
2018-07-30 10:23:42 +03:00
f5c284b3a0 bring the blocks down to mom level
reusing message_setup, but adding yield specific instructions
2018-07-24 11:35:49 +03:00
d80ef4bf4e store method, not name, in message
changes the calling and thus too many test
2018-07-22 22:29:32 +03:00
f620f0fd74 last test fixed, ruby layer complete 2018-07-20 21:27:55 +03:00
b00b0cf064 fixed some interpreter tests
hoisting is slightly more simple and that adds a couple insstructions
2018-07-20 21:00:47 +03:00
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
3343017dba move type resolution to compiler
from risc_value.
also unite mock compilers
2018-07-16 11:46:18 +03:00
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
f31d22d901 use real type in register, not symbol
this has some more consequences, upcoming
2018-07-15 15:16:12 +03:00
69385c863f some more addresses 2018-07-15 15:13:25 +03:00
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
2f07cc34f3 add parfait block 2018-07-07 15:50:43 +03:00
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
acd5cd8f30 rename for_type to self_type
and split a base class off TypedMethod
2018-07-06 20:01:17 +03:00
2485f7e9eb misc fixes and (finally, sigh) green again
deeeep dive, almost 40 commits
2018-07-04 09:18:55 +03:00
6f936f190d misc to_s and small fixes 2018-07-04 08:28:29 +03:00
cab6bc389f misc little test fixes 2018-07-03 10:12:40 +03:00
63dfee0978 move some tests around (and fix them) 2018-07-02 23:20:54 +03:00
55b5884c4e minor test fixes 2018-07-02 23:03:33 +03:00
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
a1197fb70c interpreter tests working again 2018-07-02 17:29:26 +03:00
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
474cd4b348 linker and collector test work again
had to give space a fixed number of addresses
2018-07-02 16:19:01 +03:00
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
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
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
f4b1290e58 position tests working 2018-07-02 09:35:57 +03:00
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
5f2a256608 fix platform derivation and some tests 2018-07-01 21:27:27 +03:00
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
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
35b10c46a3 adds the risc instructions to the compiler
since they are not in the method anymore
2018-07-01 11:59:52 +03:00
1505df894a remove translation
from machine, which is quickly becoming a linker
2018-07-01 11:58:06 +03:00