Interpreter.c: use macros to access/modify Sp

Authored by michalt on Jul 16 2017, 5:03 AM.



This is another step in fixing Trac #13825 (based on D38 by Simon Marlow).

This commit adds a few macros for accessing and modifying Sp
(interpreter stack) and will be useful to allow sub-word
indexing/pushing. (but that will be a separate change, this commit
should introduce no changes in behavior)

Signed-off-by: Michal Terepeta <>

Test Plan


Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
michalt created this revision.Jul 16 2017, 5:03 AM
erikd accepted this revision.Jul 16 2017, 3:27 PM


This revision is now accepted and ready to land.Jul 16 2017, 3:27 PM
bgamari accepted this revision.Jul 19 2017, 2:03 PM

I suppose this is fine. The macros are arguably a bit harder to read, but oh well.

This revision was automatically updated to reflect the committed changes.