style: improve index var names, keep indentation

This commit is contained in:
ernisto 2025-03-15 11:47:19 -03:00
parent da154877da
commit a37d5fb0df

View file

@ -36,7 +36,7 @@ local function efn(err: string)
end end
trace ..= "\nsource update stacktrace:" trace ..= "\nsource update stacktrace:"
return trace return trace
end end
local function ycall<T, U>(fn: (T) -> U, arg: T): (boolean, string|U) local function ycall<T, U>(fn: (T) -> U, arg: T): (boolean, string|U)
@ -204,24 +204,24 @@ end
local function queue_children_for_update<T>(node: SourceNode<T>) local function queue_children_for_update<T>(node: SourceNode<T>)
node.needs_queue_children = false node.needs_queue_children = false
local i = update_queue.n local queue_index = update_queue.n
local j = 1 local child_index = 1
repeat repeat
local child = node[j] local child = node[child_index]
if not child then break end if not child then break end
if child.last_eval_update_id == update_id then j += 1; continue end if child.last_eval_update_id == update_id then child_index += 1; continue end
if update_id > child.higher_parent_update_id then if update_id > child.higher_parent_update_id then
child.higher_parent_update_id = update_id child.higher_parent_update_id = update_id
end end
i += 1 queue_index += 1
update_queue[i] = child update_queue[queue_index] = child
unparent(child) unparent(child)
until false until false
update_queue.n = i update_queue.n = queue_index
end end
local function get_update_queue_length() local function get_update_queue_length()