summaryrefslogtreecommitdiff
path: root/compiler/ghci/ByteCodeInstr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ghci/ByteCodeInstr.hs')
-rw-r--r--compiler/ghci/ByteCodeInstr.hs15
1 files changed, 10 insertions, 5 deletions
diff --git a/compiler/ghci/ByteCodeInstr.hs b/compiler/ghci/ByteCodeInstr.hs
index 43444321de..525280290f 100644
--- a/compiler/ghci/ByteCodeInstr.hs
+++ b/compiler/ghci/ByteCodeInstr.hs
@@ -132,7 +132,11 @@ data BCInstr
-- For doing calls to C (via glue code generated by libffi)
| CCALL Word16 -- stack frame size
(RemotePtr C_ffi_cif) -- addr of the glue code
- Word16 -- whether or not the call is interruptible
+ Word16 -- flags.
+ --
+ -- 0x1: call is interruptible
+ -- 0x2: call is unsafe
+ --
-- (XXX: inefficient, but I don't know
-- what the alignment constraints are.)
@@ -235,12 +239,13 @@ instance Outputable BCInstr where
ppr (TESTEQ_P i lab) = text "TESTEQ_P" <+> ppr i <+> text "__" <> ppr lab
ppr CASEFAIL = text "CASEFAIL"
ppr (JMP lab) = text "JMP" <+> ppr lab
- ppr (CCALL off marshall_addr int) = text "CCALL " <+> ppr off
+ ppr (CCALL off marshall_addr flags) = text "CCALL " <+> ppr off
<+> text "marshall code at"
<+> text (show marshall_addr)
- <+> (if int == 1
- then text "(interruptible)"
- else empty)
+ <+> (case flags of
+ 0x1 -> text "(interruptible)"
+ 0x2 -> text "(unsafe)"
+ _ -> empty)
ppr (SWIZZLE stkoff n) = text "SWIZZLE " <+> text "stkoff" <+> ppr stkoff
<+> text "by" <+> ppr n
ppr ENTER = text "ENTER"