Torsten Ruger
5346077a72
use the return jump to jump to the return sequence
...
thus every method only has one exit
should make multi return messages smaller
especially when we have escape analisis
(maybe will help with inlining too)
2018-08-02 17:36:39 +03:00
Torsten Ruger
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
Torsten Ruger
1d2ec8e8ac
abstract CallStatement base class, just like in ruby
...
to_mom differs much more than the to_vool in ruby,
but data and base functionality still warrent unification
also we can check for CallStatement now
2018-07-30 14:45:37 +03:00
Torsten Ruger
2dc03f8d1b
push the callable into the callable compiler
...
thus generalizing for .callable access
keep block and method aliases for destinction in derived classes
2018-07-30 10:26:11 +03:00
Torsten Ruger
1cb07a4164
block arg access was off by one
2018-07-27 12:16:06 +03:00
Torsten Ruger
4839e0d245
minor naming and spaces
2018-07-27 10:46:22 +03:00
Torsten Ruger
f5c284b3a0
bring the blocks down to mom level
...
reusing message_setup, but adding yield specific instructions
2018-07-24 11:35:49 +03:00
Torsten Ruger
b6c85cd4a4
callable as base for yield and send
...
more yield tests
2018-07-21 14:34:39 +03:00
Torsten Ruger
0238874c20
fx ruby send args
2018-07-20 20:06:14 +03:00
Torsten Ruger
98788b52d3
fix ruby variables
2018-07-20 14:22:26 +03:00
Torsten Ruger
f4402ba30f
fix local assignment
...
was missing a method that got lost in copy/paste
also renaming to get guard to pick up tests
2018-07-20 14:16:29 +03:00
Torsten Ruger
ae3d64eb53
moved all the normalize stuff over to the ruby layer
...
Which is how it should have been from the start
2018-07-19 14:47:29 +03:00
Torsten Ruger
29363e7f72
split compilers resolve_type into the three possibilities
...
cleaner code, though temporary it shifts some dirt
into the index method. up next
2018-07-16 12:03:40 +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
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
0d900de695
block creation and insertion with correct types
2018-07-07 22:42:00 +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
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
6f936f190d
misc to_s and small fixes
2018-07-04 08:28:29 +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
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
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
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
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
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
606c7bf906
remove booted flag
...
just boot if needed
2018-06-29 11:36:14 +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
07ed16d765
groundwork for interpreter platform
...
especially positioning makes the previous interpreter approach to
fragile (too far off the real thing)
Interpreter should be it’s own platform (still use the risc
instructions),
get a translator and use positions
2018-05-16 21:00:14 +03:00
Torsten Ruger
ab4bc370ed
another +1 bug
2018-05-15 16:25:55 +03:00
Torsten Ruger
1c52ab6b67
use hex for labels
...
idea was to be able to compare to positions
(but they are different positions)
2018-05-01 19:20:16 +03:00
Torsten Ruger
dd2c2cb975
fix init jump bug
...
the label for the jump was not translated correctly
call needs to go through to_cpu to create single instance
on the way init order slightly changed
2018-05-01 19:19:04 +03:00
Torsten Ruger
d84d208192
implement assignment normalisation
...
especially when the value is a send that needs normalising
fixes several broken tests
2018-04-27 21:56:41 +03:00
Torsten Ruger
1685ba5a44
fix send normalisation
2018-04-27 21:55:41 +03:00
Torsten Ruger
672ccb351d
fix argument hoisting
...
arguments in vool must be simple variables
finally did the hoisting to do that
2018-04-27 09:59:01 +03:00
Torsten Ruger
bf6e0853ce
fix while back jump
...
while normalising the condition had gone before the
jump target accidentally
2018-04-20 09:56:06 +03:00