From 6e7af46fc78f9b75e9ea685c39a99206ebab9376 Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Mon, 8 Oct 2012 10:28:17 +0000 Subject: [PATCH] when building a project, pass the module name to the compiler instead of the full path name --- Pm/PmDriver.icl | 31 ++++++++++++++++--------------- Win/PmCleanSystem.dcl | 1 - Win/PmCleanSystem.icl | 9 +++++---- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Pm/PmDriver.icl b/Pm/PmDriver.icl index 1156392..fdf42c4 100644 --- a/Pm/PmDriver.icl +++ b/Pm/PmDriver.icl @@ -1115,11 +1115,11 @@ where compile_module Sync mdn impname rest co dircache ds ps = UpdateSyncDependencies mdn rest impname co dircache ds ps compile_module (Async current async_compiling_info) mdn impname rest co dircache ds ps - = UpdateAsyncDependencies current async_compiling_info mdn impname rest co dircache ds ps + = UpdateAsyncDependencies current async_compiling_info mdn rest co dircache ds ps compile_module (AsyncWin current win_compiling_info) mdn impname rest co dircache ds ps - = UpdateAsyncDependenciesWin current win_compiling_info mdn impname rest co dircache ds ps + = UpdateAsyncDependenciesWin current win_compiling_info mdn rest co dircache ds ps compile_module (Pers info) mdn impname rest co dircache ds ps - = UpdatePersDependencies mdn info rest impname co dircache ds ps + = UpdatePersDependencies mdn info rest co dircache ds ps UpdateSyncDependencies mdn rest impname co dircache ds ps # (fileinfo,abccache,project,ok,newpaths,_,deps,dircache,ps) @@ -1127,10 +1127,10 @@ UpdateSyncDependencies mdn rest impname co dircache ds ps # ds = {ds & fileinfo = fileinfo, abccache = abccache, project = project} = (ps,dircache,ok,newpaths,deps++|rest,Sync,ds,ok) -UpdateAsyncDependencies current {max_n_processes,compiler_process_ids,unknown_finished_processors} mdn imp_pathname rest co dircache ds ps +UpdateAsyncDependencies current {max_n_processes,compiler_process_ids,unknown_finished_processors} mdn rest co dircache ds ps # free_slot = get_free_slot current # (compileStarted, fileinfo, dircache, abccache,compiler_process_ids,ps) - = CompileTheProjectModuleStart Compilation mdn imp_pathname free_slot ds.fileinfo dircache ds.abccache ds.project compiler_process_ids ps + = CompileTheProjectModuleStart Compilation mdn free_slot ds.fileinfo dircache ds.abccache ds.project compiler_process_ids ps # ds = {ds & fileinfo = fileinfo, abccache = abccache} | compileStarted # current = [{iclModule = mdn, options = co, slot = free_slot} : current] @@ -1144,10 +1144,10 @@ UpdateAsyncDependencies current {max_n_processes,compiler_process_ids,unknown_fi # async = Async current {max_n_processes=max_n_processes,compiler_process_ids=compiler_process_ids,unknown_finished_processors=unknown_finished_processors} = (ps,dircache,False,False,rest,async,ds,False) -UpdateAsyncDependenciesWin current {win_max_n_processes,win_compiler_process_ids} mdn imp_pathname rest co dircache ds ps +UpdateAsyncDependenciesWin current {win_max_n_processes,win_compiler_process_ids} mdn rest co dircache ds ps # free_slot = get_free_slot current # (compileStarted, fileinfo, dircache, abccache,win_compiler_process_ids,ps) - = CompileTheProjectModuleStart Compilation mdn imp_pathname free_slot ds.fileinfo dircache ds.abccache ds.project win_compiler_process_ids ps; + = CompileTheProjectModuleStart Compilation mdn free_slot ds.fileinfo dircache ds.abccache ds.project win_compiler_process_ids ps; # ds = {ds & fileinfo = fileinfo, abccache = abccache} | compileStarted # current = [{iclModule = mdn, options = co, slot = free_slot} : current] @@ -1165,9 +1165,9 @@ get_free_slot :: [CurrentlyCompiled] -> Int get_free_slot current = hd (removeMembers [0..] [slot \\ {slot} <- current]) -UpdatePersDependencies mdn cstate rest impname co dircache ds ps +UpdatePersDependencies mdn cstate rest co dircache ds ps # (cstate,(fileinfo,abccache,project,ok,newpaths,_,deps,dircache,ps)) - = PersistentCompile cstate Compilation mdn impname ds.fileinfo dircache ds.abccache ds.project ps + = PersistentCompile cstate Compilation mdn ds.fileinfo dircache ds.abccache ds.project ps # ds = {ds & fileinfo = fileinfo, abccache = abccache, project = project} = (ps,dircache,ok,newpaths,deps++|rest,Pers cstate,ds,ok) @@ -1193,24 +1193,25 @@ get_use_compiler_process_ids_and_compiler_process_ids ps # (compiler_process_ids,ps) = getCompilerProcessIds ps = (use_compiler_process_ids,compiler_process_ids,ps) -CompileTheProjectModuleStart :: !CompileOrCheckSyntax !ModuleDirAndName !Pathname !Int !FileInfoCache !*DirCache !*ABCCache !Project !CompilerProcessIds !*GeneralSt +CompileTheProjectModuleStart :: !CompileOrCheckSyntax !ModuleDirAndName !Int !FileInfoCache !*DirCache !*ABCCache !Project !CompilerProcessIds !*GeneralSt -> *(!Bool, FileInfoCache, *DirCache, *ABCCache, CompilerProcessIds, *GeneralSt) -CompileTheProjectModuleStart compileOrCheckSyntax mdn imp_pathname slot fileinfo dircache abccache project compiler_process_ids ps +CompileTheProjectModuleStart compileOrCheckSyntax mdn slot fileinfo dircache abccache project compiler_process_ids ps # (ok,ccstring,write_module_times,errwin,_,srcpaths,mp,tp,eod,co,startupdir,ps) = CTPMcommon mdn.mdn_name project ps | not ok = (False, fileinfo, dircache, abccache,compiler_process_ids,ps) - # (compileStarted,compiler_process_ids,ps) = CompileStartCommand ccstring write_module_times errwin compileOrCheckSyntax imp_pathname srcpaths slot mp tp eod co startupdir compiler_process_ids ps + # (compileStarted,compiler_process_ids,ps) + = CompileStartCommand ccstring write_module_times errwin compileOrCheckSyntax mdn.mdn_name srcpaths slot mp tp eod co startupdir compiler_process_ids ps = (compileStarted, fileinfo, dircache, abccache,compiler_process_ids,ps) -PersistentCompile :: !*CompilingInfo !CompileOrCheckSyntax !ModuleDirAndName !Pathname !FileInfoCache !*DirCache !*ABCCache !Project !*GeneralSt +PersistentCompile :: !*CompilingInfo !CompileOrCheckSyntax !ModuleDirAndName !FileInfoCache !*DirCache !*ABCCache !Project !*GeneralSt -> (*CompilingInfo,*(FileInfoCache,*ABCCache,Project,Bool,Bool,Pathname,[!ModuleDirAndName],*DirCache,*GeneralSt)) -PersistentCompile cstate compileOrCheckSyntax mdn imp_pathname fileinfo dircache abccache project ps +PersistentCompile cstate compileOrCheckSyntax mdn fileinfo dircache abccache project ps # (ok,ccstring,write_module_times,errwin,typwin,srcpaths,mp,tp,eod,co,startupdir,ps) = ShowInfoAndCompile compileOrCheckSyntax mdn.mdn_name project ps | not ok = (cstate,(fileinfo,abccache,project,False,False,"",[!],dircache,ps)) - # (cstate,(ps,abcpath,res)) = CompilePersistent ccstring write_module_times errwin typwin compileOrCheckSyntax mdn imp_pathname srcpaths mp tp eod co startupdir cstate ps + # (cstate,(ps,abcpath,res)) = CompilePersistent ccstring write_module_times errwin typwin compileOrCheckSyntax mdn srcpaths mp tp eod co startupdir cstate ps # (Just cstate,rest) = ProcessCompilerMsg (Just cstate) compileOrCheckSyntax co mdn abcpath res fileinfo dircache abccache project ps = (cstate,rest) diff --git a/Win/PmCleanSystem.dcl b/Win/PmCleanSystem.dcl index 200fab2..a7045dd 100644 --- a/Win/PmCleanSystem.dcl +++ b/Win/PmCleanSystem.dcl @@ -174,7 +174,6 @@ CompilePersistent :: !(WindowFun *env) // typewin !CompileOrCheckSyntax // compileOrCheckSyntax !ModuleDirAndName - !Pathname // path !(List Pathname) // paths !Bool // projectHeapProfiling !Bool // projectTimeProfiling diff --git a/Win/PmCleanSystem.icl b/Win/PmCleanSystem.icl index 8cdacff..a600f50 100644 --- a/Win/PmCleanSystem.icl +++ b/Win/PmCleanSystem.icl @@ -327,12 +327,12 @@ get_finished_compiler_id_and_exit_code = code { //-- Persistent compilation stuff...synchronous for now... CompilePersistent :: - !String !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !ModuleDirAndName !Pathname + !String !Bool !(WindowFun *env) !(WindowFun *env) !CompileOrCheckSyntax !ModuleDirAndName !(List Pathname) !Bool !Bool !Bool !CompilerOptions !Pathname !*CompilingInfo !*env -> (!*CompilingInfo,!(!*env, !Pathname, !CompilerMsg)) | FileEnv env CompilePersistent - cocl` write_module_times errwin typewin compileOrCheckSyntax mdn path paths projectHeapProfiling + cocl` write_module_times errwin typewin compileOrCheckSyntax mdn paths projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co=:{CompilerOptions | listTypes} startupdir cstate env @@ -344,8 +344,9 @@ CompilePersistent # out_file_name = out_file_path tooltempdir dummy_slot errors_file_name = errors_file_path tooltempdir dummy_slot # cocl_arguments - = options +++ write_module_times_string +++. CompileBuildCommand out_file_name errors_file_name compileOrCheckSyntax path paths - projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co + = options +++ write_module_times_string +++. + CompileBuildCommand out_file_name errors_file_name compileOrCheckSyntax mdn.mdn_name paths + projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co // # cstate = NotCompiling // # cocl = startupdir+++toString dirseparator +++"cocl.exe"; # (compile_ok,exitcode,(cstate,env)) = compile_with_cache cocl cocl_dir cocl_startup cocl_arguments (cstate,env); -- GitLab