Add some comments and TODOs

This commit is contained in:
Brendan Hansknecht 2022-02-24 20:40:45 -08:00
parent ba2e8cd32b
commit 27b47713aa
2 changed files with 12 additions and 1 deletions

View file

@ -1301,6 +1301,10 @@ inline fn listReplaceInPlaceHelp(
element: Opaque,
element_width: usize,
) ?[*]u8 {
// TODO: figure out how to return an element and a List.
// We only know the elment size at runtime.
// This code is currently the same as listSet.
// the element we will replace
var element_at_index = (bytes orelse undefined) + (index * element_width);
@ -1321,6 +1325,10 @@ inline fn listReplaceImmutable(
element: Opaque,
element_width: usize,
) ?[*]u8 {
// TODO: figure out how to return an element and a List.
// We only know the elment size at runtime.
// This code is currently the same as listSet.
const data_bytes = length * element_width;
var new_bytes = utils.allocateWithRefcount(data_bytes, alignment);