We are planning to upgrade GitLab to the latest version this Friday morning. Expect some downtime!

Commit 193dd782 authored by John van Groningen's avatar John van Groningen

Merge branch 'check-dates-for-opt-abc-and-bytecode' into 'master'

Only generate new optimised ABC and bytecode when the source file is newer

See merge request !11
parents 77053aa3 2f25118c
Pipeline #20778 passed with stage
in 1 minute and 1 second
......@@ -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 +++ ")"])
......
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