Closed GlowingScrewdriver closed 5 months ago
Ik I forgot to apply Black :grimacing: Will do for the next commit
Added test: mem_id
Also implemented the id
instruction (which is actually a core BRIL instruction)
Do run black
Included two new tests that aren't from BRIL: arr_sum
and transpose
.
These are two programs that actually make use of the arrays to solve problems.
This is a great PR. Clean code, lot of tests! Great job!
The goal is to have support for multi-dimensional arrays and pointers.
alloc
andload
are implemented as value instructionsstore
instruction takes two arguments and returns nothingThe following tests are ported and passing from BRIL:
ptr_call
-- pointer as a function parameterptr_ret
-- pointer as a return valueaccess
access_many
access_ptr
-- multi-dimensional pointersalloc
fib
-- computing the Fibonacci sequenceThe following tests will not be ported:
alloc_large
,alloc_many
-- repeated allocation and freeing. Not applicable since we don't have the concept of freeing.