Torsten Ruger
165036ea39
misc
2018-07-30 10:26:47 +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
b00b0cf064
fixed some interpreter tests
...
hoisting is slightly more simple and that adds a couple insstructions
2018-07-20 21:00:47 +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
69385c863f
some more addresses
2018-07-15 15:13:25 +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
2485f7e9eb
misc fixes and (finally, sigh) green again
...
deeeep dive, almost 40 commits
2018-07-04 09:18:55 +03:00
Torsten Ruger
cab6bc389f
misc little test fixes
2018-07-03 10:12:40 +03:00
Torsten Ruger
55b5884c4e
minor test fixes
2018-07-02 23:03:33 +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
ce79617875
fix the exit sequence
...
was returning wrong register (1, not 0)
also saving the message for test, which changes order as the return value destroys the message
2018-06-19 19:52:06 +03:00
Torsten Ruger
5f7683efcf
pass return integer back out through exit
...
for testing of binaries later (and off course general correctness)
Some tests were using the fact that the interpreter was used, changed those to return ints rather than strings
2018-06-19 18:55:47 +03:00
Torsten Ruger
5ec235d049
fixes outstanding misc, All green
...
Well. it's been a while, positioning is fixed (again)
apart from the upcoming BranchListener
2018-06-10 13:19:55 +03:00
Torsten Ruger
e39e96f646
create return address as own class to hold return addresses
...
to distinguish from integer, which does not need adjusting
2018-05-30 23:49:01 +03:00
Torsten Ruger
e86ca5ae9d
integer was wrong padded§ length
...
or rather right (2 as should be and will be)
but currently we use next AND value + type means 3, rounded 4
because we can’t swap types at compile time (as is planned at runtime,
we use next OR value)
2018-05-30 14:55:17 +03:00
Torsten Ruger
53107d3ef8
reducing the label's int for return
...
placing the raw address in the register to jump to
puts the extra instruction at the risc level (not arm), thus changing a
lot of (brittle?) tests
2018-05-30 12:54:40 +03:00
Torsten Ruger
01a2911483
using label int in interpreter
2018-05-30 11:49:29 +03:00
Torsten Ruger
f9a89db10c
use fake memory
...
fix integer offset bug
(which only didn’t cause errors as fixnums are still an order too big
and the famous +1 error hit the empty space)
2018-05-28 15:09:59 +03:00
Torsten Ruger
1c09d4202f
fix all test
...
and thus all green, two weeks of side branch positioning done
(luckily not on arm, but interpreter)
2018-05-25 20:40:39 +03:00
Torsten Ruger
8d8cc4b016
more test fixing
...
only one bug to go
2018-05-24 21:20:56 +03:00
Torsten Ruger
bf23883270
busy fixing tests
2018-05-24 19:38:48 +03:00
Torsten Ruger
183d4152d5
loading label must translate the labels too
...
(psst: like arm translator already did. duh)
2018-05-24 19:20:06 +03:00
Torsten Ruger
f5d1090c39
no-ops really
2018-05-23 18:06:55 +03:00
Torsten Ruger
8966a50a8a
getter by position
...
extract and expand position testing
never return labels (that have the same position as their target)
2018-05-17 20:13:33 +03:00
Torsten Ruger
ab4bc370ed
another +1 bug
2018-05-15 16:25:55 +03:00
Torsten Ruger
e237bc625a
remove unused methods
...
and a whole lot more index fixes
2018-05-14 20:50:52 +03:00
Torsten Ruger
3c00239f36
another million index fixes
2018-05-14 15:17:04 +03:00
Torsten Ruger
30ba626cf9
fix knock ons
2018-04-24 20:16:50 +03:00
Torsten Ruger
6fc84d2f98
bit of renaming and a string test
2018-04-24 20:12:49 +03:00
Torsten Ruger
ee28d12429
bit more comparison testing
2018-04-24 19:57:14 +03:00
Torsten Ruger
2bd39bd3dd
renaming
2018-04-24 19:46:22 +03:00
Torsten Ruger
7a2160e9b4
fix comparison operator
...
< implemented <=
2018-04-23 19:39:16 +03:00
Torsten Ruger
1907574c60
bit of organising
2018-04-23 13:16:46 +03:00
Torsten Ruger
020bce740a
more complex while test
...
that works, but does leave one wondering what is tested apart from the
result (1)
2018-04-20 19:38:33 +03:00
Torsten Ruger
6a8bb90704
test multiple assigns
2018-04-20 13:13:09 +03:00
Torsten Ruger
04359546b7
implement greater than
2018-04-19 22:57:31 +03:00
Torsten Ruger
9e21719aeb
generalise the operator handling
...
ie passing them through
implementing more
2018-04-19 22:13:52 +03:00
Torsten Ruger
1741ad540e
move test helper code to support
...
to be reused
2018-04-19 19:33:40 +03:00
Torsten Ruger
13d8a65e07
add while interpreter test
2018-04-19 19:23:12 +03:00
Torsten Ruger
1849522a54
fix TruthCheck
...
mixing up the false and true, such a basic human mistake
2018-04-19 10:34:15 +03:00
Torsten Ruger
3a50b7dd0e
fix mod4 name
...
really did div4
2018-04-19 10:00:55 +03:00
Torsten Ruger
d19bd5f98d
fix dynamic jump
...
which gets dynamic resolve and call to work.
FIRST DYNAMIC CALL working
2018-04-09 15:06:46 +03:00
Torsten Ruger
59e6298879
first resolved call running though
...
and returning an int, as it should
just the value . . .
2018-04-08 23:45:23 +03:00
Torsten Ruger
580c53cdae
fix the resolve
...
without return and not being a function
2018-04-08 22:30:18 +03:00
Torsten Ruger
33ffcf1d88
move resolve_method code from word to mom
...
rather make resolve an instruction.
Since it was coded in risc anyway, we not only save the setup and call
But also makes the mom instruction flow clearer
The method really came from not wanting to code it in risc, but with
the Builder, that is now surprisingly painless
2018-04-08 18:55:17 +03:00
Torsten Ruger
26cf911a5c
change build names a little and document
2018-04-07 22:35:40 +03:00
Torsten Ruger
6d1beec407
fixing the interpreter tests
2018-04-07 18:58:44 +03:00
Torsten Ruger
3c90eb31c6
fixes all but interpreter tests
2018-04-06 23:37:41 +03:00
Torsten Ruger
ee0a1ca823
renaming methods args and frame
...
to arguments_type and frame_type, because that is what they are
In honour of setup bug, where the types of those types were loaded,
instead of just them types
2018-04-05 12:22:14 +03:00
Torsten Ruger
c51fc67ba5
make interpreter tests less brittle
...
by factoring __init code away
just counting main
2018-04-04 20:05:09 +03:00
Torsten Ruger
4a2a1da3ff
little spring clean
2018-04-03 15:23:19 +03:00
Torsten Ruger
17b52d4e80
fix dynamic resolution
...
was loading self, when it needs to load receiver
some more test (up to the resolve) start working
2018-04-03 12:55:28 +03:00
Torsten Ruger
c304ad67c6
load space twice in init , messagesetup overwrites first
...
lots of interpreter test changes, brittle, must factor __initi out
2018-04-02 23:25:52 +03:00
Torsten Ruger
576ae9261d
recode resolve method as assembler
...
definitely needs some refactoring
in fact i was hoping to code this in ruby (with compiler tweeks)
but there it is: goes through the linked list of methods of the type
and compares their name with self (method on word)
if not found ends in sys exit for now
2018-04-02 19:32:59 +03:00
Torsten Ruger
fb29fb6431
linked list of methods instead of list of methods
...
api changes slightly, especially for each, but mostly sama sama
2018-04-02 16:36:43 +03:00
Torsten Ruger
ad497b34f1
test interpreters event firing
2018-04-01 22:50:15 +03:00
Torsten Ruger
599679d6e8
simplest if
...
without true/false or logic
2018-04-01 22:42:27 +03:00
Torsten Ruger
48e4e3de9a
add returns to tests so program ends in syscall exit
2018-04-01 22:19:21 +03:00
Torsten Ruger
9efeb58061
fix ret_to_byte
...
by the now familiar unwrapping of args and wrapping of return
2018-04-01 22:16:17 +03:00
Torsten Ruger
1a19683e7d
fix RegToByte
...
seems to work, but does not end in syscall
2018-04-01 21:59:06 +03:00
Torsten Ruger
3a9539a071
adds multiplication
...
without overflow testing, like the others
2018-04-01 21:18:08 +03:00
Torsten Ruger
1d57c59dab
fix putstring
...
mainly returning an integer object rather than fixnum
2018-04-01 18:57:43 +03:00
Torsten Ruger
b1376e83bd
add integer minus
...
rework plus to make that easy
2018-04-01 15:26:53 +03:00
Torsten Ruger
972cf47c8b
adding returns to all builtins
2018-04-01 15:17:16 +03:00
Torsten Ruger
def67205f0
fix mod4
...
which is just shift right by 2 after all
2018-04-01 15:13:12 +03:00
Torsten Ruger
10fa61aa9f
fix integer plus
...
mostly forgot the return sequence
2018-04-01 14:56:01 +03:00
Torsten Ruger
8acfda457f
fix div10
...
by reducing the incoming integer to fixnum
and then pushing the fixnum result into a new integer
2018-04-01 14:50:13 +03:00
Torsten Ruger
168c2e862f
move wip tests
2018-04-01 14:01:17 +03:00
Torsten Ruger
727069a306
perfectly adding two numbers
...
with only 7k lines of code :-)
2018-04-01 12:00:59 +03:00
Torsten Ruger
4725b81270
get those integers crated and used
2018-03-31 20:21:27 +03:00
Torsten Ruger
5b92b6b785
get plus (+) working
...
alas, new integer is not created yet
2018-03-31 19:37:24 +03:00
Torsten Ruger
a5189570c6
fix remaining constant issues
...
all but integer creation
and integer builtins off course
2018-03-31 13:58:08 +03:00
Torsten Ruger
6e941ebcb7
introduce load_data instruction
...
which just loads data to a register (used internally)
as opposed to integers, which are objects
2018-03-31 12:38:30 +03:00
Torsten Ruger
e68b28d66d
fix helper
...
and start on arg test
2018-03-30 18:05:38 +03:00
Torsten Ruger
1956f18faa
add an integer plus
...
not correctly handling integer objects yet
2018-03-30 17:09:02 +03:00
Torsten Ruger
3bd23cee28
also separate risc and cpu inits for the machine
...
interpreter works on risc, but assembler off cpu
2018-03-25 19:36:00 +03:00
Torsten Ruger
a407601f5c
fix tests from NotSame removal
2018-03-24 18:33:19 +02:00
Torsten Ruger
ad3e73d931
start on dynamic call test
...
fix cache entry being not loaded
test incomplete because of missing resolve_method
2018-03-24 17:55:01 +02:00
Torsten Ruger
3ceb2c2f69
fix div10 return sequence
...
did not return at all before
2018-03-24 16:51:26 +02:00
Torsten Ruger
267237b776
fix init method message setup
...
was causing errors in interpreter
(that may have gone unnoticed in arm, as the interpreter checks stuff)
2018-03-24 15:59:54 +02:00
Torsten Ruger
65d3d5f1c9
fix tests from interpreter load change
...
loading values, not Constants
2018-03-24 12:24:53 +02:00
Torsten Ruger
2c137e8c97
div10 test for interpreter
2018-03-24 12:21:46 +02:00
Torsten Ruger
0f183b3a74
fix value return and test
...
slot load was wrong way around
2018-03-23 20:02:17 +02:00
Torsten Ruger
c51e593335
test return in interpreter
...
passes but does not return. dodgy
2018-03-23 11:36:20 +02:00
Torsten Ruger
55832315eb
more fix for multilevel constant load
...
was ignoring first level which is already the second for a constant
as the constant is the first load.
first interpreter test working but looking dodgy
2018-03-22 19:14:22 +02:00
Torsten Ruger
34903829ca
fix interpreter test harness and start testing
...
interpreter on debug for now
2018-03-22 18:54:40 +02:00
Torsten Ruger
b4489b1093
rename RiscTransfer to Transfer
2018-03-21 15:48:04 +05:30
Torsten Ruger
5fe0ba06ab
stash old vm
...
moving on to getting mom to work and can’t have both
interpreter and elf broke, about 100 tests went
2018-03-11 17:02:42 +05:30
Torsten Ruger
73b7e2b22f
remove all test_all
...
Stop manually creating the list of tests (and searching missing).
Main level test_all does a search for all test_*
also possible to run by command line with starts
2017-04-13 17:00:56 +03:00
Torsten Ruger
0d96f5e35f
rearranges test helper modules
2017-04-10 16:12:15 +03:00
Torsten Ruger
ffbe39d571
order test requires
...
easier to spot missed tests (when guard and cmd-line differ)
2017-04-02 22:42:51 +03:00
Torsten Ruger
aa79e41d1c
rename register to risc
...
seems to fit the layer much better as we really have a very reduced
instruction set
2017-01-19 09:02:29 +02:00