diff --git a/Pm/PmDriver.icl b/Pm/PmDriver.icl index 261d8978fe5fcba9e97c3060223b98929c8fcfbd..f102cf6a2ae2565a0a67da387ccaee8c005a4794 100644 --- a/Pm/PmDriver.icl +++ b/Pm/PmDriver.icl @@ -1673,6 +1673,11 @@ OptimiseABC mdn abc_path ps abcopt = startupdir +++ DirSeparatorString +++ abcopt # abcopt_path = abc_path % (0,size abc_path-4) +++ "opt.abc" + # (abc_date,ps) = accFiles (FModified abc_path) ps + # (abcopt_date,ps) = accFiles (FModified abcopt_path) ps + | abcopt_date.exists && Older_Date abc_date abcopt_date + = (True, ps) + # ps = showInfo (Level2 ("Optimising ABC for '" +++ mdn.mdn_name +++ "'.")) ps # (exitcode,err,ps) = RunExternalCommand abcopt [abc_path,"-o",abcopt_path] startupdir ps # err = if (exitcode == 0) @@ -1686,11 +1691,16 @@ ByteCodeGen use_optimised_abc mdn abc_path ps # (startupdir,ps) = getStup ps (bcgen,ps) = getCurrentBCgen ps bcgen = startupdir +++ DirSeparatorString +++ bcgen - # abcopt_path = abc_path % (0,size abc_path-4) +++ "opt.abc" - bc_path = abc_path % (0,size abc_path-4) +++ "bc" + # bc_path = abc_path % (0,size abc_path-4) +++ "bc" + abc_path = if use_optimised_abc (abc_path % (0,size abc_path-4) +++ "opt.abc") abc_path + + # (abc_date,ps) = accFiles (FModified abc_path) ps + (bc_date,ps) = accFiles (FModified bc_path) ps + | bc_date.exists && Older_Date abc_date bc_date + = (True, ps) # ps = showInfo (Level2 ("Generating bytecode for '" +++ mdn.mdn_name +++ "'.")) ps - # (exitcode,err,ps) = RunExternalCommand bcgen [if use_optimised_abc abcopt_path abc_path,"-o",bc_path] startupdir ps + # (exitcode,err,ps) = RunExternalCommand bcgen [abc_path,"-o",bc_path] startupdir ps # err = if (exitcode == 0) err (err ++ ["Bytecode generator failed for " +++ mdn.mdn_name +++ " (exit code: " +++ toString exitcode +++ ")"])