Skip to content

Commit

Permalink
mp6.pl compiler: added option -Bspidermonkey (execute in SpiderMonkey…
Browse files Browse the repository at this point in the history
… Javascript)
  • Loading branch information
fglock committed Mar 18, 2010
1 parent 22746ae commit 2ae4e5e
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions mp6.pl
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,27 @@ package Main;
-e program one line of program (omit programfile)
-Ctarget compile to target backend: go, js, lisp, parrot, perl5
options:
-Cgo compile to Go source code
-Cjs compile to Javascript source code
-Clisp compile to Lisp source code
-Cparrot compile to PIR source code
-Cperl5 compile to Perl 5 source code
-Cast-perl6 dump the ast in Perl 6 format
-Cast-json dump the ast in JSON format
-Cast-perl5 dump the ast in Perl 5 format
-Cgo-bin create a binary executable file using Go (doesn't run it)
-Clisp-bin create a binary executable file using SBCL Lisp (doesn't run it)
-Cjava-class create a Java .class (doesn't run it)
-Cgo compile to Go source code
-Cjs compile to Javascript source code
-Clisp compile to Lisp source code
-Cparrot compile to PIR source code
-Cperl5 compile to Perl 5 source code
-Cast-perl6 dump the ast in Perl 6 format
-Cast-json dump the ast in JSON format
-Cast-perl5 dump the ast in Perl 5 format
-Cgo-bin create a binary executable file using Go (doesn't run it)
-Clisp-bin create a binary executable file using SBCL Lisp (doesn't run it)
-Cjava-class create a Java .class (doesn't run it)
-Btarget run in target backend: go, js, lisp, parrot, perl5
options:
-Bgo run in Go (this also creates a binary executable)
-Bjs run in V8 (Javascript)
-Blisp run in SBCL (Lisp)
-Bparrot run in Parrot
-Bperl5 run in Perl 5 source code
-Brhino run in Rhino (javascript)
-Bv8 run in V8 (javascript)
-Bgo run in Go (this also creates a binary executable)
-Bjs run in V8 (Javascript)
-Blisp run in SBCL (Lisp)
-Bparrot run in Parrot
-Bperl5 run in Perl 5 source code
-Brhino run in Rhino (Javascript)
-Bv8 run in V8 (Javascript)
-Bspidermonkey run in SpiderMonkey (Javascript)
";
exit;
}
Expand Down Expand Up @@ -115,6 +116,11 @@ package Main;
$backend = 'js';
$lib_spec = 'Javascript';
}
if ( $backend eq 'spidermonkey' ) {
@cmd = qw/spidermonkey/;
$backend = 'js';
$lib_spec = 'Javascript';
}
if ( $backend eq 'v8' ) {
@cmd = ('v8');
$backend = 'js';
Expand Down

0 comments on commit 2ae4e5e

Please sign in to comment.