From 9a4728fc6cef28fd5ec54328e14ab3f573896db6 Mon Sep 17 00:00:00 2001 From: Brian Dickens Date: Sun, 8 Oct 2023 23:48:42 -0400 Subject: [PATCH] Clarify decaying vs. non Meta_Unquotify() Many parts of the system cannot semantically deal with unstable isotopes. They must be handled in their unstable form, or decayed before any common tests are done against them (e.g. you wouldn't want to make a decision based on testing an isotopic error for IS_BLOCK() and then ignore the error...) This injects an assert to the VAL_TYPE() test to catch these semantically problematic checks. It also distinguishes the Meta_Unquotify() operations that want to enforce decay, vs. the ones that want to produce unstable isotopes, vs. the ones that are certain they will only produce stable isotopes. --- src/core/a-lib.c | 6 ++-- src/core/c-context.c | 4 ++- src/core/evaluator/c-action.c | 9 ++--- src/core/evaluator/c-eval.c | 6 ++-- src/core/functionals/c-typechecker.c | 21 ++++++++++-- src/core/functionals/n-function.c | 49 ++++++++++++---------------- src/core/n-control.c | 23 ++++++------- src/core/n-data.c | 42 +++++------------------- src/core/t-logic.c | 16 +++------ src/core/t-quoted.c | 32 ++++-------------- src/core/u-parse.c | 4 +-- src/include/datatypes/sys-action.h | 2 +- src/include/datatypes/sys-quoted.h | 14 +++++++- src/include/datatypes/sys-typeset.h | 2 +- src/include/datatypes/sys-value.h | 10 ++++-- src/include/sys-throw.h | 11 ++++--- src/mezz/uparse.r | 2 +- 17 files changed, 112 insertions(+), 141 deletions(-) diff --git a/src/core/a-lib.c b/src/core/a-lib.c index 5278d89fa3..ee4ce3153e 100644 --- a/src/core/a-lib.c +++ b/src/core/a-lib.c @@ -1146,8 +1146,7 @@ REBVAL *RL_rebEntrap(const void *p, va_list *vaptr) } if (Is_Meta_Of_Pack(v)) { - Meta_Unquotify(v); - Decay_If_Unstable(v); + Meta_Unquotify_Decayed(v); Meta_Quotify(v); } @@ -1178,8 +1177,7 @@ REBVAL *RL_rebEntrapInterruptible( } if (Is_Meta_Of_Pack(v)) { - Meta_Unquotify(v); - Decay_If_Unstable(v); + Meta_Unquotify_Decayed(v); Meta_Quotify(v); } diff --git a/src/core/c-context.c b/src/core/c-context.c index e38d92780e..06c4ca0f85 100755 --- a/src/core/c-context.c +++ b/src/core/c-context.c @@ -819,7 +819,9 @@ REBLEN Find_Symbol_In_Context( Symbol(const*) symbol, bool strict ){ - if (IS_MODULE(context)) { + Byte heart = HEART_BYTE(context); + + if (heart == REB_MODULE) { // // Modules hang their variables off the symbol itself, in a linked // list with other modules who also have variables of that name. diff --git a/src/core/evaluator/c-action.c b/src/core/evaluator/c-action.c index 6f4087c530..c7343d3aa8 100644 --- a/src/core/evaluator/c-action.c +++ b/src/core/evaluator/c-action.c @@ -205,15 +205,13 @@ Bounce Action_Executor(Frame(*) f) if (VAL_PARAM_CLASS(PARAM) == PARAM_CLASS_META) { if (Is_Meta_Of_Pack(ARG)) { if (NOT_PARAM_FLAG(PARAM, WANT_PACKS)) { - Meta_Unquotify(ARG); - Decay_If_Unstable(ARG); + Meta_Unquotify_Decayed(ARG); Meta_Quotify(ARG); } } if (Is_Meta_Of_Raised(ARG)) { if (NOT_PARAM_FLAG(PARAM, WANT_RAISED)) { - Meta_Unquotify(ARG); - Decay_If_Unstable(ARG); + Meta_Unquotify_Decayed(ARG); Meta_Quotify(ARG); } } @@ -848,8 +846,7 @@ Bounce Action_Executor(Frame(*) f) if (NOT_PARAM_FLAG(PARAM, WANT_PACKS)) { if (VAL_PARAM_CLASS(PARAM) == PARAM_CLASS_META) { if (Is_Meta_Of_Pack(ARG)) { // v-- inefficient, but works - Meta_Unquotify(ARG); - Decay_If_Unstable(ARG); + Meta_Unquotify_Decayed(ARG); Meta_Quotify(ARG); } } diff --git a/src/core/evaluator/c-eval.c b/src/core/evaluator/c-eval.c index 52e55a029b..d7f86ed449 100644 --- a/src/core/evaluator/c-eval.c +++ b/src/core/evaluator/c-eval.c @@ -1528,7 +1528,7 @@ Bounce Evaluator_Executor(Frame(*) f) goto circled_check; } - Meta_Unquotify(SPARE); + Meta_Unquotify_Undecayed(SPARE); if ( var_heart == REB_WORD @@ -1537,11 +1537,11 @@ Bounce Evaluator_Executor(Frame(*) f) goto circled_check; } - Decay_If_Unstable(SPARE); // if pack in slot, resolve it - if (Is_Raised(SPARE)) // don't hide raised errors if not @ fail (VAL_CONTEXT(SPARE)); + Decay_If_Unstable(SPARE); // if pack in slot, resolve it + if (var_heart == REB_BLANK) // [_ ...]: goto circled_check; diff --git a/src/core/functionals/c-typechecker.c b/src/core/functionals/c-typechecker.c index a3dd13f25f..ab9b31c3ab 100644 --- a/src/core/functionals/c-typechecker.c +++ b/src/core/functionals/c-typechecker.c @@ -264,7 +264,12 @@ bool Typecheck_Value( DETAILS_AT(ACT_DETAILS(action), IDX_TYPECHECKER_TYPE) ); REBU64 bits = Typesets[n]; - if (bits & FLAGIT_KIND(VAL_TYPE(v))) + enum Reb_Kind k; + if (Is_Isotope(v) and Is_Isotope_Unstable(v)) + k = REB_ISOTOPE; + else + k = VAL_TYPE(v); + if (bits & FLAGIT_KIND(k)) goto test_succeeded; goto test_failed; } @@ -274,7 +279,12 @@ bool Typecheck_Value( ACT_DETAILS(action), IDX_TYPECHECKER_TYPE ); - if (VAL_TYPE(v) == VAL_TYPE_KIND(type_word)) + enum Reb_Kind k; + if (Is_Isotope(v) and Is_Isotope_Unstable(v)) + k = REB_ISOTOPE; + else + k = VAL_TYPE(v); + if (k == VAL_TYPE_KIND(type_word)) goto test_succeeded; goto test_failed; } @@ -346,7 +356,12 @@ bool Typecheck_Value( break; } case REB_TYPE_WORD: { - if (VAL_TYPE_KIND(test) != VAL_TYPE(v)) + enum Reb_Kind k; + if (Is_Isotope(v) and Is_Isotope_Unstable(v)) + k = REB_ISOTOPE; + else + k = VAL_TYPE(v); + if (VAL_TYPE_KIND(test) != k) goto test_failed; break; } diff --git a/src/core/functionals/n-function.c b/src/core/functionals/n-function.c index a43ebb964d..029b40fe16 100644 --- a/src/core/functionals/n-function.c +++ b/src/core/functionals/n-function.c @@ -499,7 +499,7 @@ Bounce Init_Thrown_Unwind_Value( // level "Frame, action, or index to exit from" // [frame! action! integer!] // ^result "Result for enclosing state" -// [ any-value!] +// [ any-value!] // ] // DECLARE_NATIVE(unwind) @@ -520,11 +520,11 @@ DECLARE_NATIVE(unwind) INCLUDE_PARAMS_OF_UNWIND; REBVAL *level = ARG(level); - REBVAL *v = ARG(result); - Meta_Unquotify(v); + Copy_Cell(SPARE, ARG(result)); // SPARE can hold unstable isotopes + Meta_Unquotify_Undecayed(SPARE); - return Init_Thrown_Unwind_Value(FRAME, level, v, frame_); + return Init_Thrown_Unwind_Value(FRAME, level, SPARE, frame_); } @@ -553,8 +553,10 @@ DECLARE_NATIVE(definitional_return) { INCLUDE_PARAMS_OF_DEFINITIONAL_RETURN; - REBVAL *v = ARG(value); - Frame(*) f = frame_; // frame of this RETURN call (implicit DECLARE_NATIVE arg) + Value(*) atom = Copy_Cell(SPARE, ARG(value)); // SPARE for unstable atoms + Meta_Unquotify_Undecayed(atom); + + Frame(*) f = FRAME; // frame of this RETURN call // Each ACTION! cell for RETURN has a piece of information in it that can // can be unique (the binding). When invoked, that binding is held in the @@ -592,17 +594,12 @@ DECLARE_NATIVE(definitional_return) const REBPAR *param = ACT_PARAMS_HEAD(target_fun); assert(KEY_SYM(ACT_KEYS_HEAD(target_fun)) == SYM_RETURN); - if (Is_Meta_Of_Raised(v)) { - Unquasify(v); - Raisify(v); // Meta_Unquotify won't do this, it fail()'s - goto skip_type_check; - } + if (Is_Raised(atom)) + goto skip_type_check; // all functions allow returning errors - if (Is_Meta_Of_Nihil(v)) { // RETURN NIHIL - if (GET_PARAM_FLAG(param, VANISHABLE)) { - Init_Nihil(v); + if (Is_Nihil(atom)) { // RETURN NIHIL + if (GET_PARAM_FLAG(param, VANISHABLE)) goto skip_type_check; - } // !!! Treating a return of NIHIL as a return of NONE helps some // scenarios, for instance piping UPARSE combinators which do not @@ -610,11 +607,7 @@ DECLARE_NATIVE(definitional_return) // to see if VOID makes more sense...but start with a more "ornery" // value to see how it shapes up. // - Init_None(v); - } - else { - // Safe to unquotify for type checking - Meta_Unquotify(v); + Init_None(atom); } // Check type NOW instead of waiting and letting Eval_Core() @@ -627,13 +620,13 @@ DECLARE_NATIVE(definitional_return) // take [ any-value!] as its argument, and then report the error // itself...implicating the frame (in a way parallel to this native). // - if (GET_PARAM_FLAG(param, RETURN_NONE) and not Is_None(v)) + if (GET_PARAM_FLAG(param, RETURN_NONE) and not Is_None(atom)) fail ("If RETURN: is in a function spec, RETURN NONE only"); - if (not TYPE_CHECK(param, v)) { - Decay_If_Unstable(v); - if (not TYPE_CHECK(param, v)) - fail (Error_Bad_Return_Type(target_frame, v)); + if (not TYPE_CHECK(param, atom)) { + Decay_If_Unstable(atom); + if (not TYPE_CHECK(param, atom)) + fail (Error_Bad_Return_Type(target_frame, atom)); } skip_type_check: { //////////////////////////////////////////////////////// @@ -642,10 +635,10 @@ DECLARE_NATIVE(definitional_return) Copy_Cell(label, Lib(UNWIND)); // see Make_Thrown_Unwind_Value TG_Unwind_Frame = target_frame; - if (not Is_Raised(v) and not REF(only)) - Proxy_Multi_Returns_Core(target_frame, v); + if (not Is_Raised(atom) and not REF(only)) + Proxy_Multi_Returns_Core(target_frame, atom); - return Init_Thrown_With_Label(FRAME, v, label); + return Init_Thrown_With_Label(FRAME, atom, label); } } diff --git a/src/core/n-control.c b/src/core/n-control.c index 22054b20d3..6e364393d5 100755 --- a/src/core/n-control.c +++ b/src/core/n-control.c @@ -265,7 +265,7 @@ static Bounce Then_Else_Isotopic_Object_Helper( if (Is_Meta_Of_Nihil(in)) fail ("THEN/ELSE cannot operate on empty pack! input (e.g. NIHIL)"); - Meta_Unquotify(in); // see [1] + Meta_Unquotify_Undecayed(in); // see [1] if (Is_Raised(in)) { // definitional failure, skip STATE = ST_THENABLE_REJECTING_INPUT; @@ -294,7 +294,7 @@ static Bounce Then_Else_Isotopic_Object_Helper( FRAME_FLAG_META_RESULT )){ Copy_Cell(in, SPARE); // cheap reification... (e.g. quoted) - Meta_Unquotify(in); // see [1] + Meta_Unquotify_Stable(in); // see [1] assert(STATE == ST_THENABLE_INITIAL_ENTRY); assert(not Is_Isotope(in)); goto test_not_lazy; @@ -624,7 +624,7 @@ DECLARE_NATIVE(also) // see `tweak :also 'defer on` in %base-defs.r return Init_Heavy_Null(OUT); // telegraph null isotope STATE = ST_ALSO_RUNNING_BRANCH; - return CONTINUE(SPARE, branch, Meta_Unquotify(in)); + return CONTINUE(SPARE, branch, Meta_Unquotify_Undecayed(in)); } return_original_input: { ////////////////////////////////////////////////// @@ -1630,19 +1630,16 @@ DECLARE_NATIVE(throw) { INCLUDE_PARAMS_OF_THROW; - REBVAL *v = ARG(value); + Value(*) atom = Copy_Cell(SPARE, ARG(value)); - if (Is_Nulled(v)) - Init_Void(v); // CONTINUE and CONTINUE VOID act the same + if (Is_Meta_Of_Void(atom)) + Init_Heavy_Void(atom); + else if (Is_Meta_Of_Null(atom)) + Init_Heavy_Null(atom); else - Meta_Unquotify(v); + Meta_Unquotify_Undecayed(atom); - if (Is_Void(v)) - Init_Heavy_Void(v); - else if (Is_Nulled(v)) - Init_Heavy_Null(v); - - return Init_Thrown_With_Label(FRAME, v, ARG(name)); // name can be nulled + return Init_Thrown_With_Label(FRAME, atom, ARG(name)); // nulled name ok } diff --git a/src/core/n-data.c b/src/core/n-data.c index 3dfc854d7e..d2703c0e4b 100755 --- a/src/core/n-data.c +++ b/src/core/n-data.c @@ -1487,7 +1487,7 @@ void Set_Var_May_Fail( // [ any-value!] // target "Word or tuple, or calculated sequence steps (from GET)" // [ any-word! any-sequence! any-group! the-block!] -// ^value [ any-value!] ; tunnels failure +// ^value [ any-value!] ; tunnels failure // /any "Do not error on isotopes" // /groups "Allow GROUP! Evaluations" // ] @@ -1503,14 +1503,13 @@ DECLARE_NATIVE(set) REBVAL *target = ARG(target); REBVAL *v = ARG(value); - Meta_Unquotify(v); - if (Is_Raised(v)) - return COPY(v); // !!! Is this tunneling worthwhile? + // !!! Should SET look for isotopic objects specially, with a particular + // interaction distinct from DECAY? Review. - // !!! Isotopic objects may have a particular interaction with SET, that - // is distinct from its reification (which should probably be its DECAY) + if (Is_Meta_Of_Raised(v)) + return UNMETA(v); // !!! Is this tunneling worthwhile? - Decay_If_Unstable(v); + Meta_Unquotify_Stable(v); REBVAL *steps; if (REF(groups)) @@ -2514,8 +2513,8 @@ DECLARE_NATIVE(heavy) { DECLARE_NATIVE(light) { INCLUDE_PARAMS_OF_LIGHT; - Move_Cell(OUT, Meta_Unquotify(ARG(optional))); - Decay_If_Unstable(OUT); + Move_Cell(OUT, ARG(optional)); + Meta_Unquotify_Decayed(OUT); return OUT; } @@ -2557,31 +2556,6 @@ DECLARE_NATIVE(decay) } -// -// isotopify-if-falsey: native [ -// -// "Turn null and false into their corresponding isotopes" -// -// return: [ any-value!] -// ^optional [ any-value!] -// ] -// -DECLARE_NATIVE(isotopify_if_falsey) -{ - INCLUDE_PARAMS_OF_ISOTOPIFY_IF_FALSEY; - - REBVAL *v = ARG(optional); - - if (Is_Meta_Of_Void(v)) - return VOID; - - Meta_Unquotify(v); - Isotopify_If_Falsey(v); - - return Move_Cell(OUT, v); -} - - // // reify: native [ // diff --git a/src/core/t-logic.c b/src/core/t-logic.c index 6ee462cff8..ef06146d89 100644 --- a/src/core/t-logic.c +++ b/src/core/t-logic.c @@ -267,14 +267,13 @@ DECLARE_NATIVE(xor_1) // see TO-C-NAME // // unless: enfix native [ // -// {Variant of non-short-circuit OR which favors the right-hand side result} +// {Give left hand side when right hand side is not null or void} // -// return: "Conditionally true or false value (not coerced to LOGIC!)" -// [ any-value!] +// return: [ any-value!] // left "Expression which will always be evaluated" // [ any-value!] // ^right "Expression that's also always evaluated (can't short circuit)" -// [ any-value!] ; not a literal GROUP! as with XOR +// [ any-value!] ; not literal GROUP! as with XOR // ] // DECLARE_NATIVE(unless) @@ -288,15 +287,10 @@ DECLARE_NATIVE(unless) REBVAL *left = ARG(left); REBVAL *right = ARG(right); - if (Is_Meta_Of_Void(right)) // if right disappears (no branching), left + if (Is_Meta_Of_Void(right) or Is_Meta_Of_Null(right)) return COPY(left); - Meta_Unquotify(right); - - if (Is_Truthy(right)) - return COPY(right); - - return COPY(left); // preserve the exact truthy or falsey value + return UNMETA(right); // preserve packs } diff --git a/src/core/t-quoted.c b/src/core/t-quoted.c index e194fbe361..8073216eb9 100644 --- a/src/core/t-quoted.c +++ b/src/core/t-quoted.c @@ -464,7 +464,7 @@ DECLARE_NATIVE(unmeta) // {Variant of UNMETA that passes thru VOID and NULL} // // return: [ any-value!] -// ^value [ quoted! quasi!] +// value [ quoted! quasi!] // ] // DECLARE_NATIVE(unmeta_p) @@ -473,23 +473,12 @@ DECLARE_NATIVE(unmeta_p) REBVAL *v = ARG(value); - if (Is_Meta_Of_Void(v)) + if (Is_Void(v)) return VOID; - if (Is_Meta_Of_Null(v)) + if (Is_Nulled(v)) return nullptr; - if (IS_QUASI(v)) { - Meta_Unquotify(v); - fail (Error_Bad_Isotope(v)); // isotopes not allowed as input - } - - // handling the invisibility detour is done now... - - Unquotify(v, 1); // drop quote level caused by ^META parameter convention - - // Now remove the level of meta the user was asking for. - // return UNMETA(v); } @@ -795,11 +784,11 @@ DECLARE_NATIVE(unrun) // // maybe: native [ // -// {If argument is null or none, make it void (also pass through voids)} +// {If argument is null, make it void (also pass through voids)} // // return: "Value (if it's anything other than the states being checked)" // [ any-value!] -// ^optional [ any-value!] +// optional [ any-value!] // ] // DECLARE_NATIVE(maybe) @@ -811,16 +800,12 @@ DECLARE_NATIVE(maybe) // [a b]: maybe multi-return // // ...and leave the `b` element left untouched. Review. +// +// 2. !!! Should MAYBE of a raised error pass through the raised error? { INCLUDE_PARAMS_OF_MAYBE; REBVAL *v = ARG(optional); - Meta_Unquotify(v); - - if (Is_Nihil(v)) // !!! Should MAYBE be tolerant of NIHIL? - return VOID; - - Decay_If_Unstable(v); // question about decay, see [1] if (Is_Void(v)) return VOID; // passthru @@ -828,9 +813,6 @@ DECLARE_NATIVE(maybe) if (Is_Nulled(v)) return VOID; // main purpose of function: NULL => VOID - if (Is_Raised(v)) // !!! fold in TRY behavior as well? - return RAISE(VAL_CONTEXT(v)); // !!! e.g. should this be VOID ? - return COPY(v); } diff --git a/src/core/u-parse.c b/src/core/u-parse.c index 018cb5b53e..c20fd60857 100755 --- a/src/core/u-parse.c +++ b/src/core/u-parse.c @@ -1047,10 +1047,10 @@ static REBIXO To_Thru_Non_Block_Rule( Get_Var_May_Fail(temp, rule, P_RULE_SPECIFIER, any); rule = temp; } - else if (IS_TYPE_WORD(rule) or IS_PARAMETER(rule)) { + else if (IS_TYPE_WORD(rule) or IS_TYPE_GROUP(rule)) { Derelativize(temp, rule, P_RULE_SPECIFIER); Quasify(temp); - Meta_Unquotify(temp); + Meta_Unquotify_Stable(temp); rule = temp; } diff --git a/src/include/datatypes/sys-action.h b/src/include/datatypes/sys-action.h index 04811b8456..1fed6dc127 100644 --- a/src/include/datatypes/sys-action.h +++ b/src/include/datatypes/sys-action.h @@ -628,7 +628,7 @@ inline static Bounce Native_Void_Result_Untracked( inline static Bounce Native_Unmeta_Result(Frame(*) frame_, const REBVAL *v) { assert(not THROWING); - return Meta_Unquotify(Copy_Cell(frame_->out, v)); + return Meta_Unquotify_Undecayed(Copy_Cell(frame_->out, v)); } inline static Bounce Native_None_Result_Untracked( diff --git a/src/include/datatypes/sys-quoted.h b/src/include/datatypes/sys-quoted.h index f8c5fedf31..e19a259f72 100644 --- a/src/include/datatypes/sys-quoted.h +++ b/src/include/datatypes/sys-quoted.h @@ -257,10 +257,22 @@ inline static Value(*) Meta_Quotify(Value(*) v) { return Quotify(v, 1); // a non-isotope winds up quoted } -inline static Value(*) Meta_Unquotify(Value(*) v) { +inline static Value(*) Meta_Unquotify_Undecayed(Value(*) v) { if (QUOTE_BYTE(v) == QUASI_2) mutable_QUOTE_BYTE(v) = ISOTOPE_0; else Unquotify_Core(v, 1); // will assert the input is quoted return v; } + +inline static Value(*) Meta_Unquotify_Stable(Value(*) v) { + Meta_Unquotify_Undecayed(v); + assert(not Is_Isotope(v) or not Is_Isotope_Unstable(v)); + return v; +} + +inline static Value(*) Decay_If_Unstable(Value(*) v); + +inline static Value(*) Meta_Unquotify_Decayed(Value(*) v) { + return Decay_If_Unstable(Meta_Unquotify_Undecayed(v)); +} diff --git a/src/include/datatypes/sys-typeset.h b/src/include/datatypes/sys-typeset.h index 3502251596..6309267ae0 100644 --- a/src/include/datatypes/sys-typeset.h +++ b/src/include/datatypes/sys-typeset.h @@ -294,7 +294,7 @@ inline static bool Typecheck_Including_Constraints( if (not IS_QUASI(v) and not IS_QUOTED(v)) return false; - Meta_Unquotify(v); // temporary adjustment (easiest option) + Meta_Unquotify_Undecayed(v); // temporary adjustment (easiest option) unquoted = true; } else diff --git a/src/include/datatypes/sys-value.h b/src/include/datatypes/sys-value.h index b80123c6f2..6732948f7a 100755 --- a/src/include/datatypes/sys-value.h +++ b/src/include/datatypes/sys-value.h @@ -299,8 +299,14 @@ inline static option(SymId) VAL_WORD_ID(noquote(Cell(const*)) v); inline static enum Reb_Kind VAL_TYPE_UNCHECKED(Cell(const*) v) { switch (QUOTE_BYTE_UNCHECKED(v)) { - case ISOTOPE_0: - return REB_ISOTOPE; + case ISOTOPE_0: { + Byte heart = HEART_BYTE_UNCHECKED(v); + assert( // can't answer VAL_TYPE() for unstable isotopes + heart != REB_BLOCK + and heart != REB_ERROR + and heart != REB_OBJECT + ); + return REB_ISOTOPE; } case UNQUOTED_1: return cast(enum Reb_Kind, HEART_BYTE_UNCHECKED(v)); diff --git a/src/include/sys-throw.h b/src/include/sys-throw.h index 7e38393e85..09b7cf5341 100644 --- a/src/include/sys-throw.h +++ b/src/include/sys-throw.h @@ -137,16 +137,17 @@ inline static Value(*) Decay_If_Unstable(Value(*) v) { if (pack_meta_at == pack_meta_tail) fail (Error_No_Value_Raw()); // treat as void? Derelativize(v, pack_meta_at, VAL_SPECIFIER(v)); - Meta_Unquotify(v); - if (Is_Pack(v)) + Meta_Unquotify_Undecayed(v); + if (Is_Pack(v) or Is_Lazy(v)) fail (Error_Bad_Isotope(v)); // need more granular unpacking + if (Is_Raised(v)) + fail (VAL_CONTEXT(v)); + assert(not Is_Isotope(v) or Is_Isotope_Stable(v)); return v; } - if (Is_Raised(v)) { // !!! should this raise an error here? - mutable_QUOTE_BYTE(v) = UNQUOTED_1; + if (Is_Raised(v)) // !!! should this raise an error here? fail (VAL_CONTEXT(v)); - } return v; } diff --git a/src/mezz/uparse.r b/src/mezz/uparse.r index bcd617e1b6..dec824beca 100644 --- a/src/mezz/uparse.r +++ b/src/mezz/uparse.r @@ -516,7 +516,7 @@ default-combinators: make map! reduce [ ; we can't leave it as unset). Review. ; state.pending: null - state.return isotopify-if-falsey unmeta value' + state.return unmeta value' ] === INDEX and MEASUREMENT COMBINATORS ===