start with register assigning

have to find a way to set them next
This commit is contained in:
2020-03-19 12:30:44 +02:00
parent 4f290ee246
commit 3f131a4018
3 changed files with 43 additions and 38 deletions

View File

@ -12,10 +12,11 @@ module Risc
assert_equal :main , @compiler.callable.name
end
def test_allocate_runs
assert @allocator.allocate_regs
assert_nil @allocator.allocate_regs
assert_equal 10 , @allocator.used_regs.length
end
def test_live_length
live = @allocator.determine_liveness
live = @allocator.walk_and_mark(@compiler.risc_instructions)
assert_equal 10 , live.length
end
end