Commit 3c0e946d authored by dbarbera's avatar dbarbera
Browse files

Added basic process-level var generation

parent e1b18b30
......@@ -93,9 +93,16 @@ def _process(process):
cons = core.Constant.int(core.Type.int(), len(LLVM['states']))
LLVM['states'][name] = cons
# Declare global state var
# Generate state var
LLVM['module'].add_global_variable(core.Type.int(), 'state')
# Generare process-level vars
for var_name, (var_type, def_value) in process.variables.viewitems():
#TODO: Use ASN.1 type instead of hardcoded int type
var_ptr = LLVM['module'].add_global_variable(core.Type.int(), str(var_name))
if def_value:
pass
# Generate process functions
runtr_func = _generate_runtr_func(process)
_generate_startup_func(process, process_name, runtr_func)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment