Verified Commit 8a6d8935 authored by Camil Staps's avatar Camil Staps 🚀

Rename eq_desc_b0 to eq_desc_b; implement for arity other than 0

parent f83b260a
Pipeline #18971 passed with stages
in 8 minutes and 59 seconds
......@@ -181,7 +181,7 @@ const char *instruction_type (BC_WORD i) {
case CeqR: return "";
case CeqR_b: return "nr";
case Ceq_desc: return "nl";
case Ceq_desc_b0: return "l";
case Ceq_desc_b: return "l";
case Ceq_nulldesc: return "nl";
case CexpR: return "";
case Cfill: return "nnl";
......
......@@ -162,7 +162,7 @@ enum {
INSTRUCTION(eqC_b)
INSTRUCTION(eqD_b)
INSTRUCTION(eq_desc)
INSTRUCTION(eq_desc_b0)
INSTRUCTION(eq_desc_b)
INSTRUCTION(eq_nulldesc)
INSTRUCTION(eqI)
INSTRUCTION(eqI_a)
......
......@@ -1487,13 +1487,8 @@ void code_eq_desc(char descriptor_name[],int arity,int a_offset) {
}
void code_eq_desc_b(char descriptor_name[],int arity) {
if (arity == 0) {
add_instruction_label_offset(Ceq_desc_b0,descriptor_name,2);
return;
}
fprintf(stderr, "Error: eq_desc_b %d\n", arity);
exit(1);
add_instruction_label_offset(Ceq_desc_b,descriptor_name,(arity<<3)+2);
return;
}
void code_eq_nulldesc(char descriptor_name[], int a_offset) {
......
......@@ -2175,7 +2175,7 @@ INSTRUCTION_BLOCK(eq_desc):
pc+=3;
END_INSTRUCTION_BLOCK;
}
INSTRUCTION_BLOCK(eq_desc_b0):
INSTRUCTION_BLOCK(eq_desc_b):
{
bsp[0] = bsp[0]==pc[1];
pc+=2;
......
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