Commit Graph

2503 Commits

Author SHA1 Message Date
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
0dc89c772a get the label int to work consistently
still need to use it in the return
2018-05-30 10:54:18 +03:00
Torsten Ruger
074ec34659 wip, fixed some label, need more fixing 2018-05-30 10:29:38 +03:00
Torsten Ruger
c55b41afae sort objects by class before positioning
since we don’t have pages yet, but want consistent layout
2018-05-29 20:52:58 +03:00
Torsten Ruger
e94c9ea37b add failfast
tired of waiting for the almost 1000 tests to run through, just to get
an error message
2018-05-29 20:40:02 +03:00
Torsten Ruger
296617cbaf set label integer to position 2018-05-29 20:30:02 +03:00
Torsten Ruger
8322fca7b3 give labels an integer that will end up being the position at runtime
Since integers are first class objects, we need to use an integer object
as the return address. The actual address can not be stored in an
instance variable since it is not an object.
The address is unique to the label and never changes after positioning
(using the int is next up)
2018-05-29 20:26:00 +03:00
Torsten Ruger
7847420d49 make ints compile time mutable
to change the label value and use the allocated stubs
2018-05-29 17:03:55 +03:00
Torsten Ruger
b81d9565de fix binary code offset when calling
in other words, remember the arm pipeline being 8
2018-05-29 17:03:20 +03:00
Torsten Ruger
4b34546c11 fixing the binary code indexes
AGAIN, that third of all bugs, the off by one
2018-05-28 18:20:09 +03:00
Torsten Ruger
8ef1a471a4 finally change List to derive from data object
can’t derive from data16 as some lists are longer
have to get the delegation to work first
2018-05-28 15:45: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
6c06f61ab8 start on fake memory
get index checks on the array access of parfait
2018-05-28 14:46:26 +03:00
Torsten Ruger
be1bc63ff2 jump was written off the end of binary code, fixed 2018-05-28 11:45:04 +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
c0cd1e0740 fix an issue where instruction was in wrong code
embarrassingly used instance variable where it should have been local
2018-05-25 19:16:13 +03:00
Torsten Ruger
6f0fad0957 dragging the extra through resets
as the binary the instruction is in may change when repositioning
2018-05-25 19:04:48 +03:00
Torsten Ruger
ddd408e245 trying to fix the darn jump over object header 2018-05-25 19:03:46 +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
dae8e88b7a recurring bug, don't save label positions
labels are ethereal, no length, so they don’t get to occupy a position
2018-05-24 16:26:56 +03:00
Torsten Ruger
8d510c2e7e getting instruction repositioning right
big bug hunt, involving complicated maths (%)
2018-05-24 14:27:53 +03:00
Torsten Ruger
0293320bb8 use a constant for the binary code offset
where the instructions start
2018-05-23 21:35:22 +03:00
Torsten Ruger
8ca70a6835 Steamline objectPosition init
check for resetting on the same position with different class, which
should not happen
Ie it’s ok for an object to push another object up,
but not for an instruction to land on code
2018-05-23 21:34:49 +03:00
Torsten Ruger
f5d1090c39 no-ops really 2018-05-23 18:06:55 +03:00
Torsten Ruger
a2e7d7c469 give interpreter a clock and pc
where the pc, like in cpu’s is the memory position.
That is what the interpreter works on.
But for humans, the clock is a simpler way to count where the program
is at, no. of instructions executed
2018-05-23 18:05:22 +03:00
Torsten Ruger
ef2dc932ad use positions in interpreter 2018-05-20 15:52:13 +03:00
Torsten Ruger
c0f10bb42b fix opal error 2018-05-20 15:51:36 +03:00
Torsten Ruger
a7a62d53b2 use modified opal logger
logger was having bizarre format errors
copied and simplified (to get on)
2018-05-20 14:45:48 +03:00
Torsten Ruger
a350325b6b fix function call and simple call logic
Before creating DynamicJump, the FunctionCall got a register for a
possible jump address. Now that is handled by DynamicJump and
FunctionCall just needs the method, from which it determines the
binaryCode address
2018-05-19 12:21:20 +03:00
Torsten Ruger
15e4533a2f fix interpreter to use positions
tick from one (simulated memory) position to the next
(not from one instruction to the next)
2018-05-17 20:14:59 +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
37d62d298e assemble risc to it's position (not itself)
So in the next step the interpreter can use positions as program counter
and would be much more like the real thing
2018-05-17 09:49:01 +03:00
Torsten Ruger
49c4d170ce make the interpreter platform
but still using the risc_instruction stream
2018-05-17 09:31:36 +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
dc8afce444 use existing constant 2018-05-16 12:55:51 +03:00
Torsten Ruger
9597fc5756 more slot tests, also in separate files 2018-05-16 12:49:46 +03:00
Torsten Ruger
36e59ebdea some slot load tests 2018-05-16 12:35:44 +03:00
Torsten Ruger
473866e76b start with some slot definition tests 2018-05-15 19:29:27 +03:00
Torsten Ruger
000bf0a9b3 separate SlotDefinition into own file
what started as three lines has grown up to demand it’s own file and
tests
2018-05-15 19:29:06 +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
5d3c70da89 fix type api
tests were using methods that were only used in tests.
2018-05-14 16:13:50 +03:00
Torsten Ruger
3c00239f36 another million index fixes 2018-05-14 15:17:04 +03:00
Torsten Ruger
4a88f342d3 random checkin
still suffering -1 trauma
2018-05-14 12:38:44 +03:00
Torsten Ruger
ab01fa3862 switch to 0 based indexing
the world rocked for a moment (and more fixes to follow)
also the crumbling of idealism was heard
2018-05-14 11:55:01 +03:00