# HG changeset patch # User Chris Seaton # Date 1380719968 -3600 # Node ID 952ecf32788afb555d484b5b9e220f359ab92a66 # Parent cdff87c89c5f972832c69466d9d5ba7ba6b24294 mx sl command. diff -r cdff87c89c5f -r 952ecf32788a mx/commands.py --- a/mx/commands.py Wed Oct 02 13:28:17 2013 +0200 +++ b/mx/commands.py Wed Oct 02 14:19:28 2013 +0100 @@ -1318,6 +1318,14 @@ mx.abort('jacocoreport takes only one argument : an output directory') mx.run_java(['-jar', jacocoreport.get_path(True), '-in', 'jacoco.exec', '-g', join(_graal_home, 'graal'), out]) +def sl(args): + """run an SL program + + VM args should have a @ prefix.""" + vmArgs = [a[1:] for a in args if a[0] == '@'] + slArgs = [a for a in args if a[0] != '@'] + vm(vmArgs + ['-cp', mx.classpath("com.oracle.truffle.sl"), "com.oracle.truffle.sl.SimpleLanguage"] + slArgs) + def isGraalEnabled(vm): return vm != 'original' and not vm.endswith('nograal') @@ -1361,7 +1369,8 @@ 'vmg': [vmg, '[-options] class [args...]'], 'vmfg': [vmfg, '[-options] class [args...]'], 'deoptalot' : [deoptalot, '[n]'], - 'longtests' : [longtests, ''] + 'longtests' : [longtests, ''], + 'sl' : [sl, '[SL args|@VM options]'] } mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append'])