Torsten Ruger
9e21719aeb
generalise the operator handling
...
ie passing them through
implementing more
2018-04-19 22:13:52 +03:00
Torsten Ruger
7d9132ee36
test other int methods
...
harness for testing compiler in a method (before just in a case)
2018-04-19 19:59:48 +03:00
Torsten Ruger
a98d7630fb
start testing builtin seperately
...
in terms of output only
2018-04-19 19:47:35 +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
8e1efa3993
fix source for exit label
2018-04-18 20:10:07 +03:00
Torsten Ruger
75d5fff611
let builder pass the source down, but inly once
2018-04-18 19:27:46 +03:00
Torsten Ruger
059ff4a868
pass a source into the builder
...
for debugging
2018-04-18 19:12:30 +03:00
Torsten Ruger
df08cb78e2
adds a lot of to_ssss
2018-04-17 20:26:15 +03:00
Torsten Ruger
7c33f19bee
dont patch over existing string method
2018-04-16 21:24:27 +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
fabe4db4f6
fix logic error in vool dynamic send
...
using receiver of current method
instead of receiver of next message
2018-04-08 22:59:42 +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
e5d014b936
bit more regs, bit more resets
2018-04-08 22:29:08 +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
8c322329fb
fix builtin methods according to last commit
2018-04-08 18:52:17 +03:00
Torsten Ruger
9867234c38
move most code from method_compiler to builder
...
rather use builder in two ways, than sometimes compiler and sometimes
builder
Also makes it possible to reuse builtin code in mom’s to_risc, as both
use builder. The builtin code by directly adding to compiler, the mom
code not.
2018-04-08 18:51:20 +03:00
Torsten Ruger
c2860bef7a
fix interpreter operator args
...
as in binary strings words symbols will be same
2018-04-08 01:26:29 +03:00
Torsten Ruger
c30e461385
add operator to builder
...
just minus for now, easily extended
2018-04-08 01:01:24 +03:00
Torsten Ruger
5d4b9d4834
add branches to builder
2018-04-08 00:50:51 +03:00
Torsten Ruger
695ae5ad99
add label generation to builder
2018-04-08 00:39:35 +03:00
Torsten Ruger
6958fc31ab
rework resolve_method, using builder
2018-04-07 23:07:44 +03:00
Torsten Ruger
bf8e9e508b
opal hack
2018-04-07 22:35:48 +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
db55ec3fd6
slightly changing built return logic
...
very tempted to add immediately, but bigger change
2018-04-07 00:35:54 +03:00
Torsten Ruger
dd0d162ebf
fix the init also, was using first message twice
...
not advancing after first load
2018-04-07 00:14:02 +03:00
Torsten Ruger
3c90eb31c6
fixes all but interpreter tests
2018-04-06 23:37:41 +03:00
Torsten Ruger
eea92399ee
concludes static message setup
2018-04-06 23:11:08 +03:00
Torsten Ruger
1ddbde1191
return single message for "message" ie r0
...
other names, like next_message allocate a new register
2018-04-06 22:54:54 +03:00
Torsten Ruger
22409c93ee
remove >>, consistent use of <<
...
makes code easier to read, like assignments
does remind of Passengers
2018-04-06 22:40:58 +03:00
Torsten Ruger
c042dd9faa
allow reverse syntax for >> (ie <<)
...
slot >> reg makes sense, being a slot_to_reg
but . . .
consistently use of << (as meaning assignment , =) also makes sense
allow both and let time tell which makes more sense
2018-04-06 21:05:26 +03:00
Torsten Ruger
41d573d571
wrought one more instruction for message setup
...
now with dsl ready, should be faster
2018-04-06 20:58:58 +03:00
Torsten Ruger
c02576b239
reuse dished out names
...
so they become like variables
2018-04-06 20:55:21 +03:00
Torsten Ruger
29f43eba3b
fix capitalize
...
who knew that capitalise downcases everything else
2018-04-06 20:54:27 +03:00
Torsten Ruger
cae5e323ec
add reg to slot
2018-04-06 20:21:14 +03:00
Torsten Ruger
fe71ddc5ae
remove dead code
...
leave circle detection for now
2018-04-06 20:20:39 +03:00
Torsten Ruger
88dbc7c84f
slot to reg for builder
2018-04-06 16:35:27 +03:00
Torsten Ruger
c233bd82d6
implement [] for RiscValue for the dsl
2018-04-06 16:08:35 +03:00
Torsten Ruger
44d661fe56
progress on the builder front
...
mainly tests for now
2018-04-06 14:54:24 +03:00
Torsten Ruger
e396807ee5
start work on dsl
...
so i can read my own code
2018-04-06 14:21:38 +03:00
Torsten Ruger
d52e14d201
continue to rewrite message_setup
...
message come from space already.
next types
2018-04-05 20:37:03 +03:00
Torsten Ruger
f09086e524
unite the two resolve_to_index functions
2018-04-05 20:10:00 +03:00
Torsten Ruger
f4ce6d6253
starting to redo message_setup
...
apart from previous commits bug, it also needs to deal with
dynamic/static correctly
and while at it will do the getting from space
2018-04-05 12:24:49 +03:00
Torsten Ruger
ec31bde33a
fix use of messagesetup
...
which does setup for the method being called
not the one we’re in. duh
2018-04-05 12:23:43 +03:00
Torsten Ruger
5bb3ad03cc
some more safety tests
2018-04-05 12:22:40 +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