Commit 1ad6899c authored by John van Groningen's avatar John van Groningen

add getCurrent64BitProcessor, getCurrentProc, getCompilerProcessIds and setCompilerProcessIds

parent 90f02ec9
...@@ -9,6 +9,7 @@ import PmCompilerOptions ...@@ -9,6 +9,7 @@ import PmCompilerOptions
import typewin import typewin
import PmEnvironment import PmEnvironment
from PmFileInfo import :: FileInfoCache from PmFileInfo import :: FileInfoCache
from PmCleanSystem import ::CompilerProcessIds,NoCompilerProcessIds
:: *General :: *General
...@@ -60,8 +61,13 @@ getCurrentCgen :: !*(PSt *General) -> (!String,!*PSt *General) ...@@ -60,8 +61,13 @@ getCurrentCgen :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentLink :: !*(PSt *General) -> (!String,!*PSt *General) getCurrentLink :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentDynl :: !*(PSt *General) -> (!String,!*PSt *General) getCurrentDynl :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentVers :: !*(PSt *General) -> (!Int,!*PSt *General) getCurrentVers :: !*(PSt *General) -> (!Int,!*PSt *General)
getCurrent64BitProcessor :: !*(PSt *General) -> (!Bool,!*PSt *General)
getCurrentProc :: !*(PSt *General) -> (!Processor,!*PSt *General)
getCurrentMeth :: !*(PSt *General) -> (!CompileMethod,!*PSt *General) getCurrentMeth :: !*(PSt *General) -> (!CompileMethod,!*PSt *General)
getCompilerProcessIds :: !*(PSt *General) -> (!CompilerProcessIds,!*(PSt *General))
setCompilerProcessIds :: !CompilerProcessIds !*(PSt *General) -> *(PSt *General)
//-- boolean that indicates if user interaction is allowed //-- boolean that indicates if user interaction is allowed
getInteract :: !*(PSt *General) -> (!Bool,!*PSt *General) getInteract :: !*(PSt *General) -> (!Bool,!*PSt *General)
......
...@@ -11,6 +11,7 @@ import PmEnvironment ...@@ -11,6 +11,7 @@ import PmEnvironment
import logfile import logfile
import set_return_code import set_return_code
import PmFileInfo import PmFileInfo
from PmCleanSystem import ::CompilerProcessIds,NoCompilerProcessIds
:: *General = :: *General =
{ prefs :: !Prefs { prefs :: !Prefs
...@@ -19,6 +20,7 @@ import PmFileInfo ...@@ -19,6 +20,7 @@ import PmFileInfo
, fi_cache :: !(Maybe FileInfoCache) , fi_cache :: !(Maybe FileInfoCache)
, pr_path :: !Pathname // proj_path , pr_path :: !Pathname // proj_path
, stup :: !Pathname // appl_path , stup :: !Pathname // appl_path
, g_compiler_process_ids :: !CompilerProcessIds
, pm_targets :: ![Target] , pm_targets :: ![Target]
, pm_curtarg :: !Int , pm_curtarg :: !Int
, logfile :: !*File , logfile :: !*File
...@@ -35,6 +37,7 @@ initGeneral be_verb comp_opts application_path project_path project targets logf ...@@ -35,6 +37,7 @@ initGeneral be_verb comp_opts application_path project_path project targets logf
, fi_cache = Just FI_EmptyCache , fi_cache = Just FI_EmptyCache
, pr_path = project_path , pr_path = project_path
, stup = application_path , stup = application_path
, g_compiler_process_ids=NoCompilerProcessIds
, pm_targets = targets , pm_targets = targets
, pm_curtarg = fromJust target_index , pm_curtarg = fromJust target_index
, logfile = logfile , logfile = logfile
...@@ -169,11 +172,27 @@ getCurrentVers ps ...@@ -169,11 +172,27 @@ getCurrentVers ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps # (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_vers,ps) = (ct.target_vers,ps)
getCurrent64BitProcessor :: !*(PSt *General) -> (!Bool,!*PSt *General)
getCurrent64BitProcessor ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.env_64_bit_processor,ps)
getCurrentProc :: !*(PSt *General) -> (!Processor,!*PSt *General)
getCurrentProc ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_proc,ps)
getCurrentMeth :: !*(PSt *General) -> (!CompileMethod,!*PSt *General) getCurrentMeth :: !*(PSt *General) -> (!CompileMethod,!*PSt *General)
getCurrentMeth ps getCurrentMeth ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps # (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_meth,ps) = (ct.target_meth,ps)
getCompilerProcessIds :: !*(PSt *General) -> (!CompilerProcessIds,!*(PSt *General))
getCompilerProcessIds ps = accPLoc (\l -> l!g_compiler_process_ids) ps
setCompilerProcessIds :: !CompilerProcessIds !*(PSt *General) -> *(PSt *General)
setCompilerProcessIds compiler_project_ids ps = appPLoc (\l -> {l & g_compiler_process_ids = compiler_project_ids}) ps
getInteract :: !*(PSt *General) -> (!Bool,!*PSt *General) getInteract :: !*(PSt *General) -> (!Bool,!*PSt *General)
getInteract ps = (False,ps) getInteract ps = (False,ps)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment