I am writing a scripting languages that has local variables living in only a particular scope. I use JIT to compile to machine code.
I wonder how a C block like the following is represented in JIT: { int outer_scope = 8; { int inner_scope = 9; ... } // inner_scope is now discarded } It seems like I can only add variables to functions but not to blocks. Would I need to use gcc_jit_function_new_temp() with a map from char* to gcc_jit_lvalue*? I have another related question: When calling gcc_jit_function_new_local() twice with the same arguments, will the same lvalue pointer be returned? Regards TheProgrammingSauce