mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
remove fixed TODOs
This commit is contained in:
@ -242,21 +242,12 @@ def _allocate_for_attribute(builder, var_name, rval, local_sym_tab, structs_sym_
|
|||||||
)
|
)
|
||||||
field_ir, field = field_type
|
field_ir, field = field_type
|
||||||
# TODO: For now, we only support integer type allocations.
|
# TODO: For now, we only support integer type allocations.
|
||||||
|
# This always assumes first argument of function to be the context struct
|
||||||
# loaded_value = builder.load(field_ir, align=8)
|
|
||||||
# #TODO: fatal flaw that this always assumes first argument of function to be the context of what this gets.
|
|
||||||
base_ptr = builder.function.args[0]
|
base_ptr = builder.function.args[0]
|
||||||
local_sym_tab[
|
local_sym_tab[
|
||||||
struct_var
|
struct_var
|
||||||
].var = base_ptr # This is repurposing of var to store the pointer of the base type
|
].var = base_ptr # This is repurposing of var to store the pointer of the base type
|
||||||
local_sym_tab[struct_var].ir_type = field_ir
|
local_sym_tab[struct_var].ir_type = field_ir
|
||||||
# gep_result = builder.gep(
|
|
||||||
# base_ptr,
|
|
||||||
# [loaded_value],
|
|
||||||
# inbounds=False, # Not using inbounds GEP
|
|
||||||
# )
|
|
||||||
# print("DEBUG", loaded_value, base_ptr, gep_result)
|
|
||||||
# Use i64 for allocation since that's what the global variable contains
|
|
||||||
|
|
||||||
actual_ir_type = ir.IntType(64)
|
actual_ir_type = ir.IntType(64)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user