about summary refs log tree commit diff stats
path: root/subx/035labels.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-08-20 22:13:45 -0700
committerKartik Agaram <vc@akkartik.com>2018-08-20 22:19:41 -0700
commit10ad628f73a02697763ad82a69a91ffacf5edb47 (patch)
tree09058cc51441fa7af8b2a9a8dccb643982298ba6 /subx/035labels.cc
parenta754efc54223240c351d14869f32cd90ada958c1 (diff)
downloadmu-10ad628f73a02697763ad82a69a91ffacf5edb47.tar.gz
4523 - Give up on pass-through phases
I'm going to continue using them for now, but I'm fairly certain now
that they're just a temporary device to help rapidly-prototype ideas.

The reason: there's just too many ways to abuse low-level features, and
it ends up taking too much code to disallow things soon after you allow
them.

New plan: stop trying to write checks, just treat them as temporary
conventions for now. Goal is now to just get the core sequence of passes
nailed down. Then we'll start reimplementing them from the ground up.

First implication of this new plan: ripping out most existing checks.
I'm still going to eventually build type checks. But no degenerate
checks for code just being too low-level.

(This decision is the outcome of a few days of noodling over Forth and
https://mastodon.social/@akkartik/100549913519614800.)
Diffstat (limited to 'subx/035labels.cc')
-rw-r--r--subx/035labels.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/subx/035labels.cc b/subx/035labels.cc
index 236c8fa2..0d366d2e 100644
--- a/subx/035labels.cc
+++ b/subx/035labels.cc
@@ -1,5 +1,9 @@
 //: Labels are defined by ending names with a ':'. This layer will compute
 //: addresses for labels, and compute the offset for instructions using them.
+//:
+//: We won't check this, but our convention will be that jump targets will
+//: start with a '$', while functions will not. Function names will never be
+//: jumped to, and jump targets will never be called.
 
 //: We're introducing non-number names for the first time, so it's worth
 //: laying down some ground rules all transforms will follow, so things don't