File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 55from 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
You can’t perform that action at this time.
0 commit comments