aboutsummaryrefslogtreecommitdiff
path: root/src/ssa
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-22 00:59:49 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commitd6f368a3f400fea3e89280262a8147e7ce5d855c (patch)
tree4eb64eb0d18dad1e40c70a5bff974fe8033fe389 /src/ssa
parentdf640dc7f55fef962b598562e10d8dd4d60fedc0 (diff)
Move thread work from compiler/parser to thread_work file, fix use after free bug in multithreaded parser allocator
Diffstat (limited to 'src/ssa')
-rw-r--r--src/ssa/ssa.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ssa/ssa.c b/src/ssa/ssa.c
index 39b5a80..500555a 100644
--- a/src/ssa/ssa.c
+++ b/src/ssa/ssa.c
@@ -551,10 +551,8 @@ static CHECK_RESULT SsaRegister funccall_generate_ssa(FunctionCall *self, AstRes
LhsExpr *func_lhs_expr;
{
- Ast **arg;
- Ast **arg_end;
- arg = buffer_begin(&self->args);
- arg_end = buffer_end(&self->args);
+ Ast **arg = buffer_begin(&self->args);
+ Ast **arg_end = buffer_end(&self->args);
for(; arg != arg_end; ++arg) {
SsaRegister arg_reg;
arg_reg = ast_generate_ssa(*arg, context);
@@ -781,10 +779,8 @@ CHECK_RESULT SsaRegister scope_named_object_generate_ssa(ScopeNamedObject *self,
}
void scope_generate_ssa(Scope *self, SsaCompilerContext *context) {
- Ast **ast;
- Ast **ast_end;
- ast = buffer_begin(&self->ast_objects);
- ast_end = buffer_end(&self->ast_objects);
+ Ast **ast = buffer_begin(&self->ast_objects);
+ Ast **ast_end = buffer_end(&self->ast_objects);
for(; ast != ast_end; ++ast) {
ignore_result_int(ast_generate_ssa(*ast, context));
}