]> ocean-lang.org Git - ocean/commitdiff
oceani: rename Enoconst to Eruntime
authorNeilBrown <neil@brown.name>
Wed, 15 Dec 2021 09:20:26 +0000 (20:20 +1100)
committerNeilBrown <neil@brown.name>
Wed, 15 Dec 2021 09:20:26 +0000 (20:20 +1100)
I think Eruntime is clearer - it can only be evaluated at runtime.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/oceani.mdc

index f1c337fd688f2c94fafdfdf6389851cffa0dd252..dca205570c9af2c1ae704e0a58c04f01bdd96782 100644 (file)
@@ -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
 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.
 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};
 ###### 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
                       Emaycopy = 1<<3};
 
 ###### forward decls
@@ -2289,7 +2289,7 @@ correctly.
                                 v->type, rules, NULL);
                }
                if (!v->global || v->frame_pos < 0)
                                 v->type, rules, NULL);
                }
                if (!v->global || v->frame_pos < 0)
-                       *perr |= Enoconst;
+                       *perr |= Eruntime;
                if (!type)
                        return v->type;
                return type;
                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;
                }
                                 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;
                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;
                                } 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);
                                        progress = some;
                                        struct value res = interp_exec(
                                                c, vb->right, &v->var->type);