To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 86fb91e0 authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano
Browse files

Fixed bug with exception paramater ids

parent 3b0d8ee8
...@@ -515,12 +515,13 @@ namespace C ...@@ -515,12 +515,13 @@ namespace C
::parent_names.push(::last_name); // the global name of the basic block ::parent_names.push(::last_name); // the global name of the basic block
auto nor_param_ids = accept_list("MuID", context->params); auto nor_param_ids = accept_list("MuID", context->params);
auto exc_param_id = try_accept<MuID>(context->exc, "MU_NO_ID"s);
auto nor_param_types = accept_list("MuTypeNode", context->param_tys); auto nor_param_types = accept_list("MuTypeNode", context->param_tys);
auto insts = accept_list("MuInstNode", context->inst()); auto insts = accept_list("MuInstNode", context->inst());
generate_call(irbuilder + "->new_bb"s, irbuilder, id, generate_call(irbuilder + "->new_bb"s, irbuilder, id,
nor_param_ids.value, nor_param_types.value, nor_param_ids.size, nor_param_ids.value, nor_param_types.value, nor_param_ids.size,
try_accept<MuID>(context->exc, "MU_NO_ID"s), exc_param_id,
insts.value, insts.size); insts.value, insts.size);
::parent_names.pop(); ::parent_names.pop();
...@@ -1366,4 +1367,4 @@ void c_compile(std::string ctx, std::string filename, std::ostream& output, std: ...@@ -1366,4 +1367,4 @@ void c_compile(std::string ctx, std::string filename, std::ostream& output, std:
::error = true; ::error = true;
else else
C::Visitor(ctx, output, irbuilder).accept(ir); C::Visitor(ctx, output, irbuilder).accept(ir);
} }
\ No newline at end of file
...@@ -450,12 +450,12 @@ namespace Runtime ...@@ -450,12 +450,12 @@ namespace Runtime
::parent_names.push(::last_name); // the global name of the basic block ::parent_names.push(::last_name); // the global name of the basic block
auto nor_param_ids = accept_list<MuID>(context->params); auto nor_param_ids = accept_list<MuID>(context->params);
auto exc_param_id = try_accept<MuID>(context->exc, MU_NO_ID);
auto nor_param_types = accept_list<MuTypeNode>(context->param_tys); auto nor_param_types = accept_list<MuTypeNode>(context->param_tys);
auto insts = accept_list<MuInstNode>(context->inst()); auto insts = accept_list<MuInstNode>(context->inst());
irbuilder->new_bb(irbuilder, id, irbuilder->new_bb(irbuilder, id,
&nor_param_ids[0], &nor_param_types[0], nor_param_ids.size(), &nor_param_ids[0], &nor_param_types[0], nor_param_ids.size(),
try_accept<MuID>(context->exc, MU_NO_ID), exc_param_id,
&insts[0], insts.size()); &insts[0], insts.size());
::parent_names.pop(); ::parent_names.pop();
......
Markdown is supported
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