Skip to content

Commit

Permalink
Remove --dump flag
Browse files Browse the repository at this point in the history
That flag only works when having moarvm files as input and so makes little
sense in the perl6 executable.
  • Loading branch information
PatZim committed Apr 24, 2019
1 parent 8b9297d commit 2d3a7fb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
1 change: 0 additions & 1 deletion docs/running.pod
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ compiled code.
--profile write profile information as HTML file (MoarVM) --profile write profile information as HTML file (MoarVM)
--profile-filename provide a different filename (also allows .json) --profile-filename provide a different filename (also allows .json)
--doc=[module] Use Pod::To::[module] to render inline documentation. --doc=[module] Use Pod::To::[module] to render inline documentation.
--dump dump the bytecode to stdout instead of executing (MoarVM)
--full-cleanup try to free all memory and exit cleanly (MoarVM) --full-cleanup try to free all memory and exit cleanly (MoarVM)
--debug-port=port listen for incoming debugger connections (MoarVM) --debug-port=port listen for incoming debugger connections (MoarVM)
--debug-suspend pause execution at the entry point (MoarVM) --debug-suspend pause execution at the entry point (MoarVM)
Expand Down
6 changes: 0 additions & 6 deletions src/Perl6/Compiler.nqp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ class Perl6::Compiler is HLL::Compiler {
--profile-stage=stage --profile-stage=stage
write profile information for the given compilation write profile information for the given compilation
stage to an HTML file stage to an HTML file
--dump dump the bytecode to stdout instead of executing
--full-cleanup try to free all memory and exit cleanly --full-cleanup try to free all memory and exit cleanly
--debug-port=port listen for incoming debugger connections --debug-port=port listen for incoming debugger connections
--debug-suspend pause execution at the entry point --debug-suspend pause execution at the entry point
Expand Down Expand Up @@ -138,7 +137,6 @@ and, by default, also executes the compiled code.
--stagestats display time spent in the compilation stages --stagestats display time spent in the compilation stages
--ll-exception display a low level backtrace on errors --ll-exception display a low level backtrace on errors
--doc=module use Pod::To::[module] to render inline documentation --doc=module use Pod::To::[module] to render inline documentation
--repl-mode=interactive|non-interactive --repl-mode=interactive|non-interactive
when running without "-e" or filename arguments, when running without "-e" or filename arguments,
a REPL is started. By default, if STDIN is a TTY, a REPL is started. By default, if STDIN is a TTY,
Expand All @@ -149,7 +147,6 @@ and, by default, also executes the compiled code.
loaded). This option allows to bypass TTY detection and loaded). This option allows to bypass TTY detection and
force one of the REPL modes. force one of the REPL modes.
$moar-options $moar-options
Note that only boolean single-letter options may be bundled. Note that only boolean single-letter options may be bundled.
The following environment variables are respected: The following environment variables are respected:
Expand All @@ -158,9 +155,6 @@ The following environment variables are respected:
PERL6_HOME Override the path of the Perl6 runtime files PERL6_HOME Override the path of the Perl6 runtime files
NQP_HOME Override the path of the NQP runtime files NQP_HOME Override the path of the NQP runtime files
); # end of usage statement ); # end of usage statement


nqp::exit(0); nqp::exit(0);
Expand Down
9 changes: 1 addition & 8 deletions src/vm/moar/runner/main.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@ enum {
UNKNOWN_FLAG = -1, UNKNOWN_FLAG = -1,


FLAG_SUSPEND, FLAG_SUSPEND,
FLAG_DUMP,
FLAG_TRACING, FLAG_TRACING,


OPT_DEBUGPORT OPT_DEBUGPORT
}; };


static const char *const FLAGS[] = { static const char *const FLAGS[] = {
"--debug-suspend", "--debug-suspend",
"--dump",
"--full-cleanup", "--full-cleanup",
"--tracing", "--tracing",
}; };
Expand Down Expand Up @@ -156,7 +154,6 @@ int wmain(int argc, wchar_t *wargv[])
char **argv = MVM_UnicodeToUTF8_argv(argc, wargv); char **argv = MVM_UnicodeToUTF8_argv(argc, wargv);
#endif #endif


int dump = 0;
int argi = 1; int argi = 1;
int flag; int flag;
int new_argc = 0; int new_argc = 0;
Expand All @@ -171,9 +168,6 @@ int wmain(int argc, wchar_t *wargv[])


for (; (flag = parse_flag(argv[argi])) != NOT_A_FLAG; ++argi) { for (; (flag = parse_flag(argv[argi])) != NOT_A_FLAG; ++argi) {
switch (flag) { switch (flag) {
case FLAG_DUMP:
dump = 1;
continue;


#if MVM_TRACING #if MVM_TRACING
case FLAG_TRACING: case FLAG_TRACING:
Expand Down Expand Up @@ -339,8 +333,7 @@ int wmain(int argc, wchar_t *wargv[])
} }
} }


if (dump) MVM_vm_dump_file(instance, perl6_file); MVM_vm_run_file(instance, perl6_file);
else MVM_vm_run_file(instance, perl6_file);


#ifdef HAVE_TELEMEH #ifdef HAVE_TELEMEH
if (getenv("MVM_TELEMETRY_LOG") && telemeh_inited) { if (getenv("MVM_TELEMETRY_LOG") && telemeh_inited) {
Expand Down

0 comments on commit 2d3a7fb

Please sign in to comment.