add add_global_variable in generate.c