From aff782c4293e0c471505743575a1a0683a7ed096 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 6 Jan 2019 12:51:49 -0800 Subject: 4911 --- subx/066allocate.subx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'subx/066allocate.subx') diff --git a/subx/066allocate.subx b/subx/066allocate.subx index a4ea687c..37b01d21 100644 --- a/subx/066allocate.subx +++ b/subx/066allocate.subx @@ -183,6 +183,12 @@ allocate-region: # ad : (address allocation-descriptor), n : int -> new-ad : (a 5d/pop-to-EBP c3/return +# We could create a more general '$abort' jump target, but then we'd need to do +# a conditional jump followed by loading the error message and an unconditional +# jump. Or we'd need to unconditionally load the error message before a +# conditional jump, even if it's unused the vast majority of the time. This way +# we bloat a potentially cold segment in RAM so we can abort with a single +# instruction. $allocate-region:abort: # . _write(2/stderr, error) # . . push args -- cgit 1.4.1-2-gfad0