Skip to content

Commit

Permalink
Fix off-by-one error when constructing a PAP in generic stack apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Trinkle authored and luite committed Apr 8, 2016
1 parent 7aa7bae commit 689c775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gen2/RtsApply.hs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ genericStackApply dflags s =
var p = h$paps[myRegs];
var dat = [`R1`,(((`arity` >> 8)-myRegs))*256+ar-myAr];
for(var i=0;i<myRegs;i++) {
dat.push(`Stack`[`Sp`-i-1]);
dat.push(`Stack`[`Sp`-i-2]);
}
`Sp` = `Sp` - myRegs - 2;
`R1` = `initClosure dflags p dat jCurrentCCS`;
Expand Down

0 comments on commit 689c775

Please sign in to comment.