; x = x + 1; return x;}int x = 10为变量 x 申请一块内存,返回内存指针 ptr将常量 10 赋值给 ptr// 1let ptr = builder.build_alloca...const_int(v, false);builder.build_store(ptr, v);将变量 x 添加到作用域列表中,无 IRint x = 10 生成的 LLVM IR:// 1%x = alloca...;退出作用域:compiler.scopes.pop();生成的 LLVM IR:define i32 @half(i32 %x1) {entry: %x = alloca i32, align 4...i32, align 4store i32 1, ptr %e, align 4%g = alloca [2 x i32], align 4%e1 = load i32, ptr %e, align...i32, align 4 store i32 1, ptr %e, align 4 %g = alloca [2 x i32], align 4 %e1 = load i32, ptr %e,