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
046617f8dc
add branch listener functionaliy
...
have to store the branches and loop again as labels
dont neccessarily have positions yet
2018-06-17 22:25:38 +03:00
3298651238
split create_binary into two phases
...
Which gives instructions a chance to check everything
and in Arms case check the constant loads/ instruction adding
So that during assembly no more change happens (and we don't have to reassemble)
2018-06-17 13:53:17 +03:00
7543236f4f
objects didn't get positions
...
positions.empty? was wrong check
2018-06-16 10:58:54 +03:00
698c845297
seperate position create and register
...
many test fixes
2018-06-15 22:00:49 +03:00
9c93b38b8f
crete positions while collecting objects
...
clear two phase lifecycle for positions
always created invalid and set later
new does not auto add to cache
but create and get_or_create do
2018-06-15 21:54:21 +03:00
2c765c8f14
rename the objects accessor
...
and move to object keys, not object_id
2018-06-15 09:18:39 +03:00
3cc9175efa
start BranchListener
...
but on hold, since it needs positions before we have them
Must create them during collection phase
2018-06-14 21:29:34 +03:00
eaaf61c117
fix position test
2018-06-14 21:19:22 +03:00
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
e1683938ed
fix label positioning bug
...
where a label at the end of a binary code resulted in the
label actually taking up a position, instead of sharing it with it's next
2018-06-10 13:18:56 +03:00
0513cd504f
update return address in label
...
so return jumps go to the right address
2018-06-10 09:15:57 +03:00
c7ad1d98ca
introduce the LabeListener to move instructions along when first code position changes
2018-06-09 22:13:43 +03:00
ec1d38f5a6
reimplement instruction listeners with indexes
...
easier to understand, as indexes map to Binarycode indexes, and can thus later be used to assemble directoy into the code
Almost no change in tests (now only multiples of 4 addresses allowed)
2018-06-09 17:41:39 +03:00
cf94227b2c
fix code init bug
...
where initial pos wasnt propagated
2018-06-09 09:16:23 +03:00
ad3040a846
add position_chaning to event interface
...
by reacting to the change _before it happens, we can move any BinaryCode out of the way
So when Instruction are inserted and code gets inserted, we don't need to set up the correct listener explicitly (which is tricky across mathods and changing chains), but instead just move anything that is in the way along
2018-06-09 08:10:41 +03:00
74c15d45a3
some more mocking worked
...
some didnt
2018-06-08 20:43:36 +03:00
5815d32bde
make the instructions jump over the BinaryCode end
2018-06-07 19:27:44 +03:00
2d218bbc48
work on jump insertion continues
...
Now registering CodeListener instead of PositionListener
Also instead of on the previous, in itself, which is simpler
and allows to react to insertion at end
2018-06-07 19:26:02 +03:00
7fa8397b56
insertion pushes, split position tests
2018-06-06 10:19:18 +03:00
c22aff4c4f
start on insertion events and handling
2018-06-06 10:00:07 +03:00
4789b63fcb
fix the gapping of instructions
...
so last binary stays empty and new starts at 8
2018-06-06 01:16:00 +03:00
4ab6d62acf
small arm fixes etc
2018-06-06 00:53:41 +03:00
d7b3368b28
fix some pesty errors
...
need to fix instruction overlap beofre interpreter starts again
2018-06-05 19:05:12 +03:00
8d953a619f
propagate instruction positions
...
still overlapping onto binaries, but a start
2018-06-05 18:11:25 +03:00
f35ee6425a
renaming and test fixing
2018-06-02 23:48:12 +03:00
1d1c7105b4
introduce some helper methods
2018-06-02 23:02:59 +03:00
c2d450f779
fold position module and object position
...
simpler that way, aslo code is moving to listners
2018-06-02 21:59:41 +03:00
24f6e30b54
start on redoing instruction positions
...
using insruction listeners (wip)
2018-06-02 21:20:15 +03:00
3bc35c2275
rework binary code positioning setup
...
dependency chain set up explicitly.
Next have to react to events correctly
2018-06-02 17:29:38 +03:00
91c7903848
start simple with code listner
2018-06-02 16:34:44 +03:00
aa6707337a
positioning wip
2018-06-02 16:12:01 +03:00
d1cc482f8f
bit of test refactoring
2018-06-01 19:13:53 +03:00
46fbfb7101
adds the simple object dependency
...
where the next object is dependent on the previous one
and just behind it, the padded_length away
2018-05-31 20:41:04 +03:00
21a9c56ba9
change position event code to use util
...
general purpose event fireing
can then be used for several event types
2018-05-31 19:05:53 +03:00
2544bc5a85
move position module to folder
2018-05-31 19:01:10 +03:00
49849939a1
little event mechanism for changed positions
2018-05-31 17:01:23 +03:00
67100a3ef8
write adjusted address
...
and rename integer to address in label
1k hurray
2018-05-31 00:07:58 +03:00
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
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
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
01a2911483
using label int in interpreter
2018-05-30 11:49:29 +03:00
0dc89c772a
get the label int to work consistently
...
still need to use it in the return
2018-05-30 10:54:18 +03:00
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
296617cbaf
set label integer to position
2018-05-29 20:30:02 +03:00
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
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
6c06f61ab8
start on fake memory
...
get index checks on the array access of parfait
2018-05-28 14:46:26 +03:00
be1bc63ff2
jump was written off the end of binary code, fixed
2018-05-28 11:45:04 +03:00
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