Skip to content

Commit

Permalink
Eliminate output executable name from compile-time specified "@MLton"…
Browse files Browse the repository at this point in the history
… arguments.

Partly fixes #50.
  • Loading branch information
MatthewFluet committed Jun 8, 2015
1 parent 4881c41 commit 07afa54
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions mlton/main/main.fun
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(* Copyright (C) 2010-2011,2013-2014 Matthew Fluet.
(* Copyright (C) 2010-2011,2013-2015 Matthew Fluet.
* Copyright (C) 1999-2009 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
* Copyright (C) 1997-2000 NEC Research Institute.
Expand Down Expand Up @@ -1272,7 +1272,7 @@ fun commandLine (args: string list): unit =
val _ =
atMLtons :=
Vector.fromList
(maybeOut "" :: tokenize (rev ("--" :: (!runtimeArgs))))
(tokenize (rev ("--" :: (!runtimeArgs))))
(* The -Wa,--gstabs says to pass the --gstabs option to the
* assembler. This tells the assembler to generate stabs
* debugging information for each assembler line.
Expand Down
10 changes: 5 additions & 5 deletions runtime/gc/init.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2009,2012 Matthew Fluet.
/* Copyright (C) 2009,2012,2015 Matthew Fluet.
* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
* Copyright (C) 1997-2000 NEC Research Institute.
Expand Down Expand Up @@ -71,11 +71,11 @@ static size_t stringToBytes (char *s) {
/* GC_init */
/* ---------------------------------------------------------------- */

int processAtMLton (GC_state s, int argc, char **argv,
int processAtMLton (GC_state s, int start, int argc, char **argv,
char **worldFile) {
int i;

i = 1;
i = start;
while (s->controls.mayProcessAtMLton
and i < argc
and (0 == strcmp (argv [i], "@MLton"))) {
Expand Down Expand Up @@ -337,8 +337,8 @@ int GC_init (GC_state s, int argc, char **argv) {

unless (isAligned (s->sysvals.pageSize, CARD_SIZE))
die ("Page size must be a multiple of card size.");
processAtMLton (s, s->atMLtonsLength, s->atMLtons, &worldFile);
res = processAtMLton (s, argc, argv, &worldFile);
processAtMLton (s, 0, s->atMLtonsLength, s->atMLtons, &worldFile);
res = processAtMLton (s, 1, argc, argv, &worldFile);
if (s->controls.fixedHeap > 0 and s->controls.maxHeap > 0)
die ("Cannot use both fixed-heap and max-heap.");
unless (s->controls.ratios.markCompact <= s->controls.ratios.copy
Expand Down
5 changes: 3 additions & 2 deletions runtime/gc/init.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
/* Copyright (C) 2015 Matthew Fluet.
* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
* Copyright (C) 1997-2000 NEC Research Institute.
*
Expand All @@ -8,7 +9,7 @@

#if (defined (MLTON_GC_INTERNAL_FUNCS))

static int processAtMLton (GC_state s, int argc,
static int processAtMLton (GC_state s, int start, int argc,
char **argv, char **worldFile);

#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */
Expand Down

0 comments on commit 07afa54

Please sign in to comment.