about summary refs log tree commit diff stats
path: root/020run.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-22 08:57:42 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-22 08:59:04 -0700
commit43781c7b694030078aa00c69668ed06a0c911624 (patch)
treefe01009f2ee9bc32172f2c8319c34b2f8adae413 /020run.cc
parent2d7131670e771af8bac13c315ba262cb3a321505 (diff)
downloadmu-43781c7b694030078aa00c69668ed06a0c911624.tar.gz
3245 - refuse to run programs with errors
I started out incredibly lax about running past errors (I even used to
call them 'warnings' when I started Mu), but I've been gradually seeing
the wisdom of Go and Racket in refusing to run code if it doesn't pass
basic integrity checks (such as using a literal as an address).

Go is right to have no warnings, only errors. But where Go goes wrong is
in even caring about unused variables.

Racket and other languages perform more aggressive integrity checks so
that the can optimize more aggressively, and I'm starting to realize I
don't know enough to disagree with them.
Diffstat (limited to '020run.cc')
-rw-r--r--020run.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/020run.cc b/020run.cc
index 5d511d66..8cd7c41c 100644
--- a/020run.cc
+++ b/020run.cc
@@ -162,6 +162,7 @@ if (argc > 1) {
 transform_all();
 //? DUMP("");
 //? exit(0);
+if (Trace_errors) return 1;
 save_snapshots();
 
 //: Step 3: if we aren't running tests, locate a recipe called 'main' and