From 8db9a4d39410480b179dd6f0a5227facf728c70c Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Fri, 11 Sep 2020 15:10:49 -0700 Subject: [PATCH] u3: only perform road stack checks in +stir jet if necessary --- pkg/urbit/jets/e/parse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/urbit/jets/e/parse.c b/pkg/urbit/jets/e/parse.c index c59d496de..67293dc41 100644 --- a/pkg/urbit/jets/e/parse.c +++ b/pkg/urbit/jets/e/parse.c @@ -975,10 +975,6 @@ u3j_gate_lose(&fel_u); } - // check for stack overflow - // - u3a_pile_sane(&pil_u); - // unwind the stack, folding parse results into [wag] by way of [raq] // if ( len_w ) { @@ -986,6 +982,10 @@ u3j_site raq_u; u3j_gate_prep(&raq_u, u3k(raq)); + // check for stack overflow + // + u3a_pile_sane(&pil_u); + while ( len_w-- > 0 ) { p_vex = *top; top = u3a_pop(&pil_u); @@ -996,11 +996,11 @@ puq_wag = u3j_gate_slam(&raq_u, u3nc(puq_vex, puq_wag)); } + c3_assert( c3y == u3a_pile_done(&pil_u) ); + u3j_gate_lose(&raq_u); } - c3_assert( c3y == u3a_pile_done(&pil_u) ); - return u3nq(p_wag, u3_nul, puq_wag, quq_wag); }