Skip to content
This repository was archived by the owner on Nov 1, 2018. It is now read-only.

Commit

Permalink
fixed compilation + running of variant 8
Browse files Browse the repository at this point in the history
  • Loading branch information
atzedijkstra committed Jan 25, 2016
1 parent 0357a63 commit 3700860
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions EHC/src/ehc/EHC/CompilePhase/Semantics.chs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ cpFoldCore2Grin modNm
, Core2GrSem.importUsedModules_Inh_CodeAGItf = ecuImportUsedModules ecu
%%]]
})
; cpMsg modNm VerboseALot $ "cpFoldCore2Grin, has core " ++ show (isJust mbCore)
; when (isJust mbCore)
(cpUpdCU modNm ( ecuStoreCoreSem coreSem
))
Expand Down
4 changes: 3 additions & 1 deletion EHC/src/ehc/EHC/CompilePhase/TopLevelPhases.chs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,7 @@ cpEhcCorePerModulePart2 modNm
%%][50
earlyMerge = ehcOptOptimizationScope opts >= OptimizationScope_WholeCore
%%]]
; cpMsg modNm VerboseDebug $ "cpEhcCorePerModulePart2"
; cpSeq [ when earlyMerge $ cpProcessCoreRest modNm
%%[[(8 grin)
, when (ehcOptIsViaGrin opts) (cpProcessGrin modNm)
Expand Down Expand Up @@ -1319,7 +1320,7 @@ cpProcessCoreFold modNm
%%[[50
; cpFlowCoreSemBeforeFold modNm
%%]]
%%[[(50 grin)
%%[[(8 grin)
; when (targetIsViaGrin (ehcOptTarget opts)) $
cpFoldCore2Grin modNm
-- void $ bcall $ FoldCore2Grin (mkPrevFileSearchKeyWithName modNm)
Expand Down Expand Up @@ -1423,6 +1424,7 @@ cpProcessGrin :: EHCCompileRunner m => HsName -> EHCompilePhaseT m ()
cpProcessGrin modNm
= do { cr <- get
; let (_,_,opts,_) = crBaseInfo modNm cr
; cpMsg modNm VerboseALot $ "cpProcessGrin, emit bc " ++ show (ehcOptEmitBytecode opts)
; cpSeq ( (if ehcOptDumpGrinStages opts then [void $ cpOutputGrin ASTFileContent_Text "-000-initial" modNm] else [])
++ [cpTransformGrin modNm]
++ (if ehcOptDumpGrinStages opts then [void $ cpOutputGrin ASTFileContent_Text "-099-final" modNm] else [])
Expand Down
4 changes: 3 additions & 1 deletion EHC/src/ehc/EHC/CompilePhase/Translations.chs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ cpTranslateCore2Grin modNm
mbCoreSem = _ecuMbCoreSem ecu
coreSem = panicJust "cpTranslateCore2Grin" mbCoreSem
grin = Core2GrSem.grMod_Syn_CodeAGItf coreSem
; cpMsg modNm VerboseDebug $ "cpTranslateCore2Grin, has coresem " ++ show (isJust mbCoreSem) ++ ", via grin " ++ show (ehcOptIsViaGrin opts)
; when (isJust mbCoreSem && ehcOptIsViaGrin opts)
(cpUpdCU modNm $! ecuStoreGrin $! grin)
}
Expand Down Expand Up @@ -325,7 +326,7 @@ cpTranslateGrin2Bytecode modNm
(liftIO $ putStrLn ("expNmFldMp: " ++ show expNmFldMp))
%%]]

; cpMsg modNm VerboseDebug ("cpTranslateGrin2Bytecode: store bytecode")
; cpMsg modNm VerboseDebug $ "cpTranslateGrin2Bytecode: store bytecode, has grin " ++ show (isJust mbGrin)
; when (isJust mbGrin)
(cpUpdCU modNm $! ecuStoreBytecode bc)
; cpMsg modNm VerboseDebug ("cpTranslateGrin2Bytecode: stored bytecode")
Expand Down Expand Up @@ -373,6 +374,7 @@ cpTranslateByteCode modNm
}
%%]]
-- put back results: generated bytecode, new info about lambda's
; cpMsg modNm VerboseDebug $ "cpTranslateByteCode, has bytecode " ++ show (isJust mbBytecode)
; when (ehcOptEmitBytecode opts && isJust mbBytecode)
(do { cpUpdCU modNm
( ecuStoreBytecodeSem grinbcPP
Expand Down
4 changes: 2 additions & 2 deletions EHC/src/ehc/variant.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ EHCRUN_INSTALL_VARIANT_ASPECTS_EXEC := $(call FUN_EHCRUN_INSTALL_VARIANT_ASPEC
# code generation targets, leading to target dependend locations
###########################################################################################

EHC_VARIANT_TARGETS := $(shell if test -x $(EHC_INSTALL_VARIANT_ASPECTS_EXEC); then $(EHC_INSTALL_VARIANT_ASPECTS_EXEC) --meta-targets; else echo bc; fi)
EHC_VARIANT_TARGET := $(shell if test -x $(EHC_INSTALL_VARIANT_ASPECTS_EXEC); then $(EHC_INSTALL_VARIANT_ASPECTS_EXEC) --meta-target-default; else echo bc; fi)
EHC_VARIANT_TARGETS := $(shell if test "$(EHC_INSTALL_VARIANT_ASPECTS_EXEC)" -a -x $(EHC_INSTALL_VARIANT_ASPECTS_EXEC); then $(EHC_INSTALL_VARIANT_ASPECTS_EXEC) --meta-targets; else echo bc; fi)
EHC_VARIANT_TARGET := $(shell if test "$(EHC_INSTALL_VARIANT_ASPECTS_EXEC)" -a -x $(EHC_INSTALL_VARIANT_ASPECTS_EXEC); then $(EHC_INSTALL_VARIANT_ASPECTS_EXEC) --meta-target-default; else echo bc; fi)
EHC_VARIANT_TARGET_PREFIX := $(EHC_VARIANT_TARGET)/

# target info as passed as cpp flag
Expand Down

0 comments on commit 3700860

Please sign in to comment.