Commit Graph

121 Commits

Author SHA1 Message Date
68fb9b1bdc rename Position get/set 2018-05-06 20:04:02 +03:00
415df49199 hand context into position 2018-05-06 00:34:59 +03:00
40f4bfc287 change to position objects complete 2018-05-05 20:25:10 +03:00
3244c7d633 add position tests
and refactor padding out
2018-05-05 20:11:08 +03:00
d65a982454 start by moving positioned(module) to position(class) 2018-05-05 19:47:18 +03:00
43d5521cfc debugging positions 2018-05-05 19:32:01 +03:00
d49d2665c5 reinit risc_init
fixes over 100 tests :-)
2018-05-01 22:36:46 +03:00
06f51da8f1 rename get_all_methods 2018-05-01 19:19:37 +03:00
1acd231a33 debugging binaries, initial jump issues 2018-04-30 13:28:55 +03:00
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
26fe77ed68 add some multi method tests 2018-04-26 12:33:33 +03:00
a8e7602193 extract setup for mains test 2018-04-26 12:33:19 +03:00
30ba626cf9 fix knock ons 2018-04-24 20:16:50 +03:00
6fc84d2f98 bit of renaming and a string test 2018-04-24 20:12:49 +03:00
ee28d12429 bit more comparison testing 2018-04-24 19:57:14 +03:00
2bd39bd3dd renaming 2018-04-24 19:46:22 +03:00
ec5a7f8a02 implement larger/smaller or equal 2018-04-24 19:45:58 +03:00
7a2160e9b4 fix comparison operator
< implemented <=
2018-04-23 19:39:16 +03:00
ef5854c4df start larger tests 2018-04-23 14:05:37 +03:00
1907574c60 bit of organising 2018-04-23 13:16:46 +03:00
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
6a8bb90704 test multiple assigns 2018-04-20 13:13:09 +03:00
98f3898acd fix while tests 2018-04-20 10:27:06 +03:00
04359546b7 implement greater than 2018-04-19 22:57:31 +03:00
be3d125b82 implement smaller than comparison
which is NOT an operator in the risc sense
rather a minus and a check for sign
(which _could be more efficient in arm, with conditional execution)
2018-04-19 22:41:40 +03:00
9e21719aeb generalise the operator handling
ie passing them through
implementing more
2018-04-19 22:13:52 +03:00
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
a98d7630fb start testing builtin seperately
in terms of output only
2018-04-19 19:47:35 +03:00
1741ad540e move test helper code to support
to be reused
2018-04-19 19:33:40 +03:00
13d8a65e07 add while interpreter test 2018-04-19 19:23:12 +03:00
1849522a54 fix TruthCheck
mixing up the false and true, such a basic human mistake
2018-04-19 10:34:15 +03:00
3a50b7dd0e fix mod4 name
really did div4
2018-04-19 10:00:55 +03:00
059ff4a868 pass a source into the builder
for debugging
2018-04-18 19:12:30 +03:00
d19bd5f98d fix dynamic jump
which gets dynamic resolve and call to work.
FIRST DYNAMIC CALL working
2018-04-09 15:06:46 +03:00
59e6298879 first resolved call running though
and returning an int, as it should
just the value .  .  .
2018-04-08 23:45:23 +03:00
580c53cdae fix the resolve
without return and not being a function
2018-04-08 22:30:18 +03:00
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
8c322329fb fix builtin methods according to last commit 2018-04-08 18:52:17 +03:00
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
c30e461385 add operator to builder
just minus for now, easily extended
2018-04-08 01:01:24 +03:00
5d4b9d4834 add branches to builder 2018-04-08 00:50:51 +03:00
695ae5ad99 add label generation to builder 2018-04-08 00:39:35 +03:00
6958fc31ab rework resolve_method, using builder 2018-04-07 23:07:44 +03:00
26cf911a5c change build names a little and document 2018-04-07 22:35:40 +03:00
6d1beec407 fixing the interpreter tests 2018-04-07 18:58:44 +03:00
db55ec3fd6 slightly changing built return logic
very tempted to add immediately, but bigger change
2018-04-07 00:35:54 +03:00
3c90eb31c6 fixes all but interpreter tests 2018-04-06 23:37:41 +03:00
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
22409c93ee remove >>, consistent use of <<
makes code easier to read, like assignments
does remind of Passengers
2018-04-06 22:40:58 +03:00
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