a simple hack to make caller apparent
commitf2d29c22f86a88bfa0d0cbd9141e6ae60f840cb0
authorKartik K. Agaram <vc@akkartik.com>
Sun, 6 Mar 2022 06:03:11 +0000 (5 22:03 -0800)
committerKartik K. Agaram <vc@akkartik.com>
Sun, 6 Mar 2022 06:38:00 +0000 (5 22:38 -0800)
tree4506091c47f15df46d8a86a3b34a1388e36626c3
parent52ae23784b5474298c6ada6252f5a785fc5e8c19
a simple hack to make caller apparent

Teliva isn't yet smart enough to know the caller of an indirect function
where the function being called goes through a local variable.

I'd expected fixing this to be a long death march. However, there's a
shockingly easy fix: just make every indirect call go through an
additional direct function call.

My policy for zet.tlv was that function 'main' could open any file. This
stopped working since I introduced spawn_main. But with this commit it's
working again.

I can also drop all my special-casing of 'main' since it's now a regular
Lua call.

We still can't rely on the caller of an indirect call. That affects
start_reading and start_writing, which really need to be part of the
framework.
src/task.lua
src/teliva.c