summaryrefslogtreecommitdiff
path: root/lib/rts.c
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-09-10 16:53:39 +0100
committerAlasdair Armstrong2018-09-10 16:58:00 +0100
commit11618832e390711c198f816c1b7fb38e8c79a6aa (patch)
treeb8079d00ae37abf4581ce3de07f0b7b9690f362e /lib/rts.c
parentba30f984f8fd98d9c35b9660d8e7db498369c2b9 (diff)
Various fixes
C: Don't print usage message and quit when called with no arguments, as this is used for testing C output OCaml: Fix generation of datatypes with multiple type arguments OCaml: Generate P_cons pattern correctly C: Fix constant propagation to not propagate letbindings with type annotations. This behaviour could cause type errors due to how type variables are introduced. Now we only propagate letbindings when the type of the propagated variable is guaranteed to be the same as the inferred type of the binding. Tests: Add OCaml tests to the C end-to-end tests (which really shouldn't be in test/c/ any more, something like test/compile might be better). Currently some issues with reals there like interpreter. Tests: Rename list.sail -> list_test.sail because ocaml doesn't want to compile files called list.ml.
Diffstat (limited to 'lib/rts.c')
-rw-r--r--lib/rts.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/rts.c b/lib/rts.c
index c2cd8e0d..1be10137 100644
--- a/lib/rts.c
+++ b/lib/rts.c
@@ -465,7 +465,6 @@ static void print_usage()
int process_arguments(int argc, char *argv[])
{
int c;
- bool exe_loaded = false;
bool elf_entry_set = false;
uint64_t elf_entry;
@@ -514,17 +513,14 @@ int process_arguments(int argc, char *argv[])
load_raw(addr, file);
free(file);
- exe_loaded = true;
break;
case 'i':
load_image(optarg);
- exe_loaded = true;
break;
case 'e':
load_elf(optarg);
- exe_loaded = true;
break;
case 'n':
@@ -560,8 +556,6 @@ int process_arguments(int argc, char *argv[])
}
}
- if (!exe_loaded) print_usage();
-
// assignment to g_elf_entry is deferred until the end of file so that an
// explicit command line flag will override the address read from the ELF
// file.