Commit 523c0039 authored by Diederik van Arkel's avatar Diederik van Arkel

small changes towards Mac compatibility;

parent 328918cb
......@@ -71,7 +71,7 @@ System :== "_system"
// Compile /Check Syntax of the designated module
CompileProjectModule :: !CompileOrCheckSyntax !Pathname !Project !SetMadeProjectFun !*(PSt General) -> *(PSt General)
CompileProjectModule compilerOrCheckSyntax path project setproject ps
#! (_,ps) = ClearCompilerCache ps
# ps = ClearCompilerCache` ps
# (syspaths,ps) = getCurrentPaths ps
# prjpaths = PR_GetPaths project
# srcpaths = AppendLists prjpaths syspaths
......@@ -89,7 +89,7 @@ CompileProjectModule compilerOrCheckSyntax path project setproject ps
GenAsmProjectModule :: !.Pathname !Project !SetMadeProjectFun !*(PSt General) -> *(PSt *General)
GenAsmProjectModule path project setproject ps
#! (_,ps) = ClearCompilerCache ps
# ps = ClearCompilerCache` ps
# (syspaths,ps) = getCurrentPaths ps
# prjpaths = PR_GetPaths project
# srcpaths = AppendLists prjpaths syspaths
......@@ -123,7 +123,7 @@ BringProjectUptoDate force continuation ps
# ps = PrecompileFase project ps
# ps = showInfo (Level1 "Bring up to date...") ps
#! (_,ps) = ClearCompilerCache ps
# ps = ClearCompilerCache` ps
#! (intr_info,ps) = getInterrupt ps
// (interact,ps) = getInteract ps
......@@ -152,7 +152,7 @@ where
cleanup ok newpaths linked fileinfo libsinfo modpaths project intr (abccache,ps)
| newpaths && not intr // if paths have changed -> try again
# ps = showInfo (Level1 "Paths have changed: remaking.") ps
# (_,ps) = ClearCompilerCache ps
# ps = ClearCompilerCache` ps
= MakeTheProject False fileinfo libsinfo abccache project cleanup` ps
# ps = PostlinkFase project ps
......@@ -314,7 +314,7 @@ step intr (DComp force dircache compinfo=:(Pers _) (next :! rest) ds) ps
# modname = GetModuleName next
| isProjLibraryModule modname ds.libsinfo
// instead of testing explicitly put libmodules in done <= conflicts with other administration
= step intr (DComp force dircache Sync rest ds) ps
= step intr (DComp force dircache compinfo rest ds) ps
# ps = trace_n ("update",next) ps
# (ps,dircache,ok,newpaths`,rest,compinfo,ds,_)
= UpdateDependencies force next rest compinfo dircache ds ps
......@@ -347,15 +347,15 @@ step intr (DComp force dircache (AsyncWin _ []) Nil ds) ps
# (paths,ds) = ds!modpaths
= step intr (DGene paths SyncCodeGeneration ds) ps
step intr state=:(DComp force dircache compinfo=:(Async _ _ _ _) rest ds) ps
step intr state=:(DComp force _ (Async _ _ _ _) _ _) ps
# ps = traceInfo (Level3 ["check_completed..."]) ps
# (state, ps) = check_completed state ps
# (state, ps) = check_completed state ps
# ps = traceInfo (Level3 ["start_compilations..."]) ps
# (state, ps) = start_compilations state ps
# (state, ps) = start_compilations state ps
= cont (state, ps)
where
check_completed :: !*DriverState !*(PSt General) -> !(!*DriverState,!*PSt General)
check_completed state=:(DComp _ _ (Async current=:[_:_] cmax _ _) _ _) ps
check_completed :: !*DriverState !*(PSt General) -> (!*DriverState,!*PSt General)
check_completed state=:(DComp force _ (Async current=:[_:_] cmax _ _) _ _) ps
= case (CompilePollCompleted ps) of
(NoFinishedCompiler,ps)
-> check_unknow_processors_are_known state ps
......@@ -393,17 +393,17 @@ step intr state=:(DComp force dircache compinfo=:(Async _ _ _ _) rest ds) ps
check_unknow_processors_are_known state ps
= (state, ps)
process_completed :: !Int !Int !*DriverState !*(PSt General) -> !(!*DriverState,!*PSt General)
process_completed :: !Int !Int !*DriverState !*(PSt General) -> (!*DriverState,!*PSt General)
process_completed completedSlot exitcode (DComp force dircache (Async current cmax n_used_processors unknown_finished_processors) todo ds) ps
# (completed, current) = removeFromCurrent completedSlot current
# unknown_finished_processors = remove_from_unknown_finished_processors completedSlot unknown_finished_processors
# (startupdir,ps) = getStup ps
typewin = updateTypeWindow (GetModuleName completed.iclModule) [typeWinKeyboard, typeWinMouse]
typewin = updateTypeWindow True (GetModuleName completed.iclModule) [typeWinKeyboard, typeWinMouse]
# ccstring = "dummy ccstring for now.."
# (ps,abcpath,res) = CompileHandleExitCode exitcode ccstring startupdir completedSlot updateErrorWindow typewin
completed.iclModule completed.options.listTypes ps // types param
# (ps,fileinfo,dircache,abccache,project,ok,newpaths`,_,deps)
= ProcessCompilerMsg Compilation completed.options completed.iclModule abcpath res ds.fileinfo dircache ds.abccache ds.project ps
# (_,(ps,fileinfo,dircache,abccache,project,ok,newpaths`,_,deps))
= ProcessCompilerMsg Nothing Compilation completed.options completed.iclModule abcpath res ds.fileinfo dircache ds.abccache ds.project ps
# ds = {ds & newpaths = ds.newpaths || newpaths`, fileinfo = fileinfo, abccache = abccache, project = project, ok = ok}
| ok
# ds = {ds & modpaths = completed.iclModule :! ds.modpaths}
......@@ -559,14 +559,14 @@ step intr (DGene paths (ASyncCodeGeneration busy_processes max_n_processes unkno
// # ps = trace ("f "+++toString finished_cg_slot_n+++" "+++toString exit_code+++" ") ps
# unknown_finished_processors = remove_from_unknown_finished_processors finished_cg_slot_n unknown_finished_processors
# (abc_path,obj_path,busy_processes) = get_paths_and_remove_process_from_list busy_processes
# (abc_path,obj_path,busy_processes) = get_paths_and_remove_process_from_list finished_cg_slot_n busy_processes
with
get_paths_and_remove_process_from_list [busy_process=:(slot,abc_path,obj_path) : rest]
get_paths_and_remove_process_from_list finished_cg_slot_n [busy_process=:(slot,abc_path,obj_path) : rest]
| finished_cg_slot_n==slot
= (abc_path,obj_path,rest)
# (abc_path,obj_path,rest) = get_paths_and_remove_process_from_list rest
# (abc_path,obj_path,rest) = get_paths_and_remove_process_from_list finished_cg_slot_n rest
= (abc_path,obj_path,[busy_process:rest])
get_paths_and_remove_process_from_list []
get_paths_and_remove_process_from_list finished_cg_slot_n []
= abort "driver.icl: unknown code generator id"
| exit_code==0
# (fileinfo,ps) = accFiles (FI_UpdateObjDate abc_path obj_path fileinfo) ps
......@@ -588,14 +588,14 @@ step intr (DGene paths (ASyncCodeGeneration busy_processes max_n_processes unkno
# (_,ps) = SendRepeatResult process_n ps
/*
# unknown_finished_processors = remove_from_unknown_finished_processors finished_cg_slot_n unknown_finished_processors
# (abc_path,obj_path,busy_processes) = get_paths_and_remove_process_from_list busy_processes
# (abc_path,obj_path,busy_processes) = get_paths_and_remove_process_from_list finished_cg_slot_n busy_processes
with
get_paths_and_remove_process_from_list [busy_process=:(slot,abc_path,obj_path) : rest]
get_paths_and_remove_process_from_list finished_cg_slot_n [busy_process=:(slot,abc_path,obj_path) : rest]
| process_n==slot
= (abc_path,obj_path,rest)
# (abc_path,obj_path,rest) = get_paths_and_remove_process_from_list rest
# (abc_path,obj_path,rest) = get_paths_and_remove_process_from_list finished_cg_slot_n rest
= (abc_path,obj_path,[busy_process:rest])
get_paths_and_remove_process_from_list []
get_paths_and_remove_process_from_list finished_cg_slot_n []
= abort "driver.icl: unknown code generator id"
# (fileinfo,ps) = accFiles (FI_UpdateObjDate abc_path obj_path fileinfo) ps
# project = PR_SetCodeGenerated (GetModuleName abc_path) project
......@@ -898,12 +898,8 @@ remove_from_unknown_finished_processors completedSlot unknown_finished_processor
:: *DriverState
= DInit !Bool !Project !MTPContinuation
// | DComp !(List String) !DriverCompilingInfo !(List String) !FileInfoCache !*DirCache !*ABCCache !StaticLibInfo !Project !Bool !MTPContinuation
| DComp !Bool !*DirCache !DriverCompilingInfo !(List String) !DriverStateRecord
//XXX | DGene !Bool !Bool !FileInfoCache !StaticLibInfo !(List String) !(List String) !*ABCCache !Project !MTPContinuation
// | DGene !Bool !Bool !FileInfoCache !StaticLibInfo !(List String) !(List String) !DriverCodeGenerationInfo !*ABCCache !Project !MTPContinuation
| DGene !(List String) !DriverCodeGenerationInfo !DriverStateRecord
// | DLink !Bool !Bool !FileInfoCache !StaticLibInfo !(List String) !*ABCCache !Project !MTPContinuation
| DLink !DriverStateRecord
| DDone
......@@ -1167,15 +1163,10 @@ CompileTheProjectModuleStart compileOrCheckSyntax path slot fileinfo dircache ab
# (compileStarted,ps) = CompileStartCommand ccstring write_module_times errwin compileOrCheckSyntax path srcpaths slot mp tp eod co startupdir ps
= (compileStarted, fileinfo, dircache, abccache, ps)
PersistentCompile :: !*CompilingInfo /*!Bool*/ !CompileOrCheckSyntax !Pathname !FileInfoCache !*DirCache !*ABCCache !Project !*(PSt *General)
PersistentCompile :: !*CompilingInfo !CompileOrCheckSyntax !Pathname !FileInfoCache !*DirCache !*ABCCache !Project !*(PSt *General)
-> (*CompilingInfo,*(*PSt *General,FileInfoCache,*DirCache,*ABCCache,Project,Bool,Bool,Pathname,List Pathname))
PersistentCompile cstate /*outofdate*/ compileOrCheckSyntax path fileinfo dircache abccache project ps
/* | not outofdate
# proc = PR_GetProcessor project
# ((abccache,fileinfo,info), ps)
= FI_GetFileInfo proc path abccache fileinfo ps // so that its added to FileInfo cache...
= (cstate,(ps,fileinfo,dircache,abccache,project,True,False,info.abcpath,Nil))
*/ # (ok,ccstring,write_module_times,errwin,typwin,srcpaths,mp,tp,eod,co,startupdir,fileinfo,abccache,ps)
PersistentCompile cstate compileOrCheckSyntax path fileinfo dircache abccache project ps
# (ok,ccstring,write_module_times,errwin,typwin,srcpaths,mp,tp,eod,co,startupdir,fileinfo,abccache,ps)
= ShowInfoAndCompile compileOrCheckSyntax path fileinfo abccache project ps
| not ok
= (cstate,(ps,fileinfo,dircache,abccache,project,False,False,"",Nil))
......@@ -1243,15 +1234,14 @@ ProcessCompilerMsg cstate compileOrCheckSyntax _ path abcpath (Patherror pathnam
= accFiles (DC_Setup srcpaths) ps
# (prefs,ps) = getPrefs ps
# ps = HandleDCErrors prefs.be_verbose errs warns ps
= case cstate of
# (cstate,ps) = case cstate of
Nothing
// RWS: this compile is still blocking...
= (cstate,CompileTheProjectModule True compileOrCheckSyntax path fileinfo dircache abccache project ps)
-> (cstate,ps)
Just pinfo
# (pinfo,ps) = ExitCleanCompiler (pinfo, ps)
// RWS: this compile is still blocking...
= (Just pinfo,CompileTheProjectModule True compileOrCheckSyntax path fileinfo dircache abccache project ps)
-> (Just pinfo, ps)
// RWS: this compile is still blocking...
= (cstate,CompileTheProjectModule True compileOrCheckSyntax path fileinfo dircache abccache project ps)
= (cstate,(ps,fileinfo,dircache,abccache,project,False,new,abcpath,Nil))
where
NewPathsDialog :: !String !String !Project !*(PSt General) -> *(*PSt General,Project,Bool)
......@@ -1597,3 +1587,13 @@ HandleDCErrors verbose [] warns ps
HandleDCErrors verbose errs _ ps
# line = Level3 ["Warning: Unable to setup directory cache: '" +++ err +++ "'." \\ err <- errs]
= verboseInfo verbose line ps
//--
ClearCompilerCache` ps = PlatformDependant ps (clear ps)
where
clear ps
# (ccstring,ps) = getCurrentComp ps
# (startupdir,ps) = getStup ps
#! (_,ps) = ClearCompilerCache ccstring startupdir ps
= ps
\ No newline at end of file
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