From 63e4b945b7fcf3c2ccbf7fee64bc08ae9f0aecf0 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 15 Dec 2021 20:20:26 +1100 Subject: [PATCH] oceani: rename Enoconst to Eruntime I think Eruntime is clearer - it can only be evaluated at runtime. Signed-off-by: NeilBrown --- csrc/oceani.mdc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index f1c337f..dca2055 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -589,7 +589,7 @@ expected to return, and returns the type that it does return, either of which can be `NULL` signifying "unknown". A `prop_err` flag set is passed by reference. It has `Efail` set when an error is found, and `Eretry` when the type for some element is set via propagation. If -any expression cannot be evaluated immediately, `Enoconst` is set. +any expression cannot be evaluated a compile time, `Eruntime` is set. If the expression can be copied, `Emaycopy` is set. If it remains unchanged at `0`, then no more propagation is needed. @@ -597,7 +597,7 @@ If it remains unchanged at `0`, then no more propagation is needed. ###### ast enum val_rules {Rboolok = 1<<1, Rnoconstant = 1<<2}; - enum prop_err {Efail = 1<<0, Eretry = 1<<1, Enoconst = 1<<2, + enum prop_err {Efail = 1<<0, Eretry = 1<<1, Eruntime = 1<<2, Emaycopy = 1<<3}; ###### forward decls @@ -2289,7 +2289,7 @@ correctly. v->type, rules, NULL); } if (!v->global || v->frame_pos < 0) - *perr |= Enoconst; + *perr |= Eruntime; if (!type) return v->type; return type; @@ -3665,7 +3665,7 @@ it in the "SimpleStatement Grammar" which will be described later. prog, NULL, 0, NULL); return NULL; } - *perr |= Enoconst; + *perr |= Eruntime; v->var->type->check_args(c, perr, v->var->type, args); if (v->var->type->function.inline_result) *perr |= Emaycopy; @@ -5524,7 +5524,7 @@ constants. } while (perr & Eretry); if (perr & Efail) c->parse_error += 1; - else if (!(perr & Enoconst)) { + else if (!(perr & Eruntime)) { progress = some; struct value res = interp_exec( c, vb->right, &v->var->type); -- 2.43.0