Mercurial > hg > truffle
diff mx.truffle/mx_truffle.py @ 22359:9a6f0c689576
SL: add "mx slcoverage <filename>" as a temporary demo showing line counts; not yet PolyglotEngine integrated
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Thu, 12 Nov 2015 11:35:19 -0800 |
parents | 2867e02e6fdb |
children | 3ed94f641d52 |
line wrap: on
line diff
--- a/mx.truffle/mx_truffle.py Thu Nov 05 18:42:36 2015 +0100 +++ b/mx.truffle/mx_truffle.py Thu Nov 12 11:35:19 2015 -0800 @@ -44,6 +44,11 @@ vmArgs, slArgs = mx.extract_VM_args(args) mx.run_java(vmArgs + ['-cp', mx.classpath(["TRUFFLE_API", "com.oracle.truffle.sl"]), "com.oracle.truffle.sl.SLLanguage"] + slArgs) +def slcoverage(args): + """Demo: run an SL program with coverage counts printed when done""" + vmArgs, slArgs = mx.extract_VM_args(args) + mx.run_java(vmArgs + ['-cp', mx.classpath("com.oracle.truffle.sl.tools"), "com.oracle.truffle.sl.tools.SLCoverage"] + slArgs) + def sldebug(args): """run a simple command line debugger for the Simple Language""" vmArgs, slArgs = mx.extract_VM_args(args, useDoubleDash=True) @@ -58,4 +63,5 @@ mx.update_commands(_suite, { 'sl' : [sl, '[SL args|@VM options]'], 'sldebug' : [sldebug, '[SL args|@VM options]'], + 'slcoverage' : [slcoverage, '[SL args|@VM options]'], })