# -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.117 2000/11/22 10:13:43 sewardj Exp $
+# $Id: Makefile,v 1.118 2000/12/11 16:42:26 sewardj Exp $
TOP = ..
include $(TOP)/mk/boilerplate.mk
SRC_HC_OPTS += \
-cpp -fglasgow-exts \
- -Rghc-timing -I. -IcodeGen -InativeGen -Iparser \
+ -I. -IcodeGen -InativeGen -Iparser \
-i$(subst $(space),:,$(DIRS))
ghc_407_at_least = $(shell expr "$(GhcMinVersion)" \>= 7)
# We need -optC here because the driver before 3.02 didn't understand
# the -funfolding flags.
-utils/PrimPacked_HC_OPTS = -fvia-C -monly-3-regs -optC-funfolding-interface-threshold7
+utils/PrimPacked_HC_OPTS = -fvia-C -monly-3-regs -funfolding-interface-threshold7
# Strictness analyser misbehaving in 2.10, fails to terminate on
# UpdAnal.lhs due to weird recursive datatype. Bug was exposed by a
| PUSH_LL Int Int{-2 offsets-}
| PUSH_LLL Int Int Int{-3 offsets-}
| PUSH_G Name
- | PUSH_AS Name -- push alts and BCO_ptr_ret_info
- | PUSHT_I Int
- | PUSHT_F Float
- | PUSHT_D Double
- | PUSHU_I Int
- | PUSHU_F Float
- | PUSHU_D Double
+ | PUSH_AS Name Int -- push alts and BCO_ptr_ret_info
+ -- Int is lit pool offset for itbl
+ | PUSH_LIT Int -- push literal word from offset pool
+ | PUSH_TAG Int -- push this tag on the stack
+
+-- | PUSHT_I Int
+-- | PUSHT_F Float
+-- | PUSHT_D Double
+-- | PUSHU_I Int
+-- | PUSHU_F Float
+-- | PUSHU_D Double
| SLIDE Int{-this many-} Int{-down by this much-}
-- To do with the heap
- | ALLOC Int
- | MKAP Int{-place ptr to heap this far down stack-} Int{-# words-}
+ | ALLOC Int -- make an AP_UPD with this many payload words, zeroed
+ | MKAP Int{-ptr to AP_UPD is this far down stack-} Int{-# words-}
| UNPACK Int -- unpack N ptr words from t.o.s Constr
| UNPACK_I Int -- unpack and tag an Int, from t.o.s Constr @ offset
| UNPACK_F Int -- unpack and tag a Float, from t.o.s Constr @ offset
-#include "../rts/Bytecodes.h"
+#include "Bytecodes.h"
i_ARGCHECK = (bci_ARGCHECK :: Int)
i_PUSH_L = (bci_PUSH_L :: Int)
let c' = setDoubleOffClosure c off d#
in c' `seq` loop c' (off +# 2#) as }
-evalP (PrimOpP IntEqOp [e1,e2]) de = unsafeCoerce# (evalI e1 de ==# evalI e2 de)
+evalP (PrimOpP IntEqOp [e1,e2]) de
+ = case evalI e1 de of
+ i1# -> case evalI e2 de of
+ i2# -> unsafeCoerce# (i1# ==# i2#)
evalP (PrimOpP primop _) de
= error ("evalP: unhandled primop: " ++ showSDoc (ppr primop))
import Monad ( when )
import Maybe ( isJust )
import IO
+import List ( intersperse )
\end{code}
-- thoroughout code generation
--let bcos = byteCodeGen tidy_binds
- --putStrLn (showSDoc (vcat (map ppr bcos)))
+ --putStrLn ("\n\n" ++ showSDocDebug (vcat (intersperse (char ' ') (map ppr bcos))))
-- _scc_ "Core2Stg"
stg_binds <- coreToStg dflags this_mod tidy_binds
-{-# OPTIONS -W -fno-warn-incomplete-patterns #-}
+{-# OPTIONS -fno-warn-incomplete-patterns #-}
-----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.35 2000/11/24 17:09:52 simonmar Exp $
+-- $Id: Main.hs,v 1.36 2000/12/11 16:42:26 sewardj Exp $
--
-- GHC Driver program
--
``output.''
\begin{code}
-{-# OPTIONS -fno-prune-tydecls #-}
--- Hopefully temporary; 3.02 complained about not being able
--- to see the consructors for ForeignObj
module Outputable (
Outputable(..), -- Class
Buffers for scanning string input stored in external arrays.
\begin{code}
-{-# OPTIONS -fno-prune-tydecls #-}
+
module StringBuffer
(
StringBuffer,