Skip to content

Commit d341cb2

Browse files
committed
Update explanation for named_arg
1 parent 2fabb67 commit d341cb2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tests/failing_tests/named_arg.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55
from ctypes import c_void_p, c_int64
66

77
# NOTE: This example exposes the problems with our typing system.
8-
# We assign every variable the type i64* by default.
9-
# lookup() return type is ptr, which can't be loaded.
10-
# So we can't do steps on line 25 and 27.
11-
# To counter this, we should allocate vars by speculating their type.
12-
# And in the assign pass, we should have something like a
13-
# recursive_dereferencer() that dereferences a ptr until it hits a non-ptr type.
14-
# And a recursive_wrapper() that does the opposite.
8+
# We can't do steps on line 25 and 27.
9+
# prev is of type i64**. For prev + 1, we deref it down to i64
10+
# To assign it back to prev, we need to go back to i64**.
11+
# We cannot allocate space for the intermediate type now.
12+
# We probably need to track the ref/deref chain for each variable.
1513

1614
@bpf
1715
@map

0 commit comments

Comments
 (0)