Commit 01ef3e1f authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan Committed by Marge Bot

Interpreter: initialize arity fields of AP_NOUPDs

AP_NOUPD entry code doesn't use the arity field, but not initializing
this field confuses printers/debuggers, and also makes testing harder as
the field's value changes randomly.
parent 260e2379
Pipeline #11968 failed with stages
in 954 minutes and 5 seconds
......@@ -1423,11 +1423,11 @@ run_BCO:
}
case bci_ALLOC_AP: {
StgAP* ap;
int n_payload = BCO_NEXT;
ap = (StgAP*)allocate(cap, AP_sizeW(n_payload));
StgAP *ap = (StgAP*)allocate(cap, AP_sizeW(n_payload));
SpW(-1) = (W_)ap;
ap->n_args = n_payload;
ap->arity = 0;
// No write barrier is needed here as this is a new allocation
// visible only from our stack
SET_HDR(ap, &stg_AP_info, cap->r.rCCCS)
......@@ -1436,11 +1436,11 @@ run_BCO:
}
case bci_ALLOC_AP_NOUPD: {
StgAP* ap;
int n_payload = BCO_NEXT;
ap = (StgAP*)allocate(cap, AP_sizeW(n_payload));
StgAP *ap = (StgAP*)allocate(cap, AP_sizeW(n_payload));
SpW(-1) = (W_)ap;
ap->n_args = n_payload;
ap->arity = 0;
// No write barrier is needed here as this is a new allocation
// visible only from our stack
SET_HDR(ap, &stg_AP_NOUPD_info, cap->r.rCCCS)
......
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