57b0ad2c32
Fix super as statement
...
Super is a statement, a send really.
Not an expression (as maybe in c++)
The actual implementation will be a bit tricky, like raise, a bit of stack walking, but not impossible. Still, later
2019-08-19 18:48:13 +03:00
f87526f86f
Renaming Vool exppressions rightly
...
Class, Method and Lambda (was block) are expressions.
Just making things clearer, especially for the blocks (ahem, lambdas) is matters.
wip
2019-08-19 11:33:12 +03:00
5a43cbff15
Fixing tests for implicit return
...
previous commit affected rather many test, as the implicit returns add extra instructions
Also added some explicit returns, so as not to test the return logic too much. return (ie return nl) is a knonwn 3 risc operation.
2019-08-17 23:29:42 +03:00
4c76ff3388
Remove Padded module
...
Parfait was depending on it, ie it created a dependency out of Parfait. But Parfiat needs to be self contained.
Moved 2 methods into parfait object, and resolved single call from text_writer to third.
2019-08-17 21:07:07 +03:00
ae7f31381b
Fixing self type creation
...
When compiling a classs, we pick up all instance variables.
Now that conditions and returns can be calls, that was broken, now fixed
2019-08-17 15:58:27 +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
3c0ba4f2ab
Merge branch 'master' into new_mom
2019-08-01 09:20:34 +03:00
7daf015ed2
small refactor
2019-08-01 09:20:08 +03:00
fdb940e43f
stashing
2019-07-22 15:21:16 +03:00
Torsten Ruger
9bd2195a15
use cattr instead of metaclass
...
so we can catch it in the compiler, like also attr
define cattr in adapter, no change in tests !
2019-03-04 19:56:53 +02:00
Torsten Ruger
0ebb8e31c6
to_s for parfait list
2019-02-17 18:16:19 +02:00
Torsten Ruger
e430701645
Using MetaClass to compile class methods into
...
still #24 , still wip
2019-02-17 14:37:50 +02:00
Torsten Ruger
3db7707614
Get a basic MetaClass going
...
Does get created in new, but not in boot.
Also not yet used in compiling
2019-02-16 23:24:16 +02:00
Torsten Ruger
d24b6ee153
start writing parfait witout the module
...
Parfait classes must be unscoped. Now we start parsing Parfait, it must be without the module.
Luckily module_eval makes this a breeze.
Also remove string interpolation that is not yet processed
2019-02-10 21:00:25 +02:00
Torsten Ruger
74b790250a
use class variables instead of globals
...
and set page size from new argument
This closes #23 , though ripples will follow
2019-02-08 23:03:08 +02:00
Torsten Ruger
8d3a1954fa
close #21
...
Mostly replaced Fixnum with integer
also in the rx-file dependency
all travis and testing with 2.4+
2019-02-07 18:24:35 +02:00
Torsten Ruger
a8d1f070f1
replace add_new_int in most builtins
...
in integer and word mainly, replaced with allocate_int
(tests pending as syscalls are undone)
2018-11-21 20:29:22 +02:00
Torsten Ruger
d964e9ea9d
let spce keep the messages in a factory #14
...
Like Integers and addresses before, messages are now in a factory
Factories keep allocated (uninitialised) objects, had to make init public to call it
2018-09-01 11:24:16 +03:00
Torsten Ruger
ea7f3c9653
remove the last_object from chain
...
also tried to keep the first around as was done in space
partially to not have to add the consrtants seperately
didn't work, as chain gets broken
also this has to be redone anyway
2018-08-29 21:05:54 +03:00
Torsten Ruger
c983dcf0eb
move return address generation to factory
...
removes the list from space
adds a ReturnAddress factory instead
and uses these throughout
2018-08-29 21:02:49 +03:00
Torsten Ruger
f993ccefe3
litte bit of docs
2018-08-24 18:49:44 +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
d396da16e3
start with #14 by implementing factory
...
page was maybe a too low level name
pages may be the unit of the syscall, but after that objects desolve (maybe later to be added on from different pages)
Factory has the job of handing out a new instance of a type
it keeps a freelist for that and a reserve
2018-08-23 19:55:06 +03:00
Torsten Ruger
fee9e261a5
still some names that needed changing
2018-08-12 14:48:20 +03:00
Torsten Ruger
25d7b8bd83
chaning calling convention not to add frame/arg types
...
these types are only needed to debug and can be gotten from the method (also in the mesage)
just saving the 6 instructions for every call
This was made possible through previous commits on fake_memory access
2018-08-12 14:47:05 +03:00
Torsten Ruger
3d113b4d83
fix more of the changed names
...
add a few self.
2018-08-12 13:10:44 +03:00
Torsten Ruger
b0aefe31fe
make all instances attr read writers
...
unfortunately the writers have to have self.var =
otherwise it is just a local var
Also need to make the type explicit for all
Protocol included memory_length on the class for now
2018-08-11 19:15:34 +03:00
Torsten Ruger
7002956e81
redid get_set internal byte with builder
...
trying to change style, get rid of some of builders functions
2018-08-09 20:15:52 +03:00
Torsten Ruger
308996bf8e
fix all tests accordingly to new return
2018-08-02 17:37:27 +03:00
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
165036ea39
misc
2018-07-30 10:26:47 +03:00
Torsten Ruger
4055709529
push the name down into callable
...
blocks need a name too
if just for debug, and stacks
2018-07-30 10:21:43 +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
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
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
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
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
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
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
6f936f190d
misc to_s and small fixes
2018-07-04 08:28:29 +03:00