You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In collect_variable_defuse pars=(var, stmt, input) the output is (_res_before,_res_after,_found_stmt,_stop), the case for handling CODE.Assign#(lhs, rhs) updates found_stmt with the output of the rhs and the updated value of found_stmt could affect the result lhs by changing if it is in _res_before or _res_after.
Example:
calling XFORM.collect_variable_uses(js_ctx->depth, (js_ctx->depth++), Function find_next()) to get the use of js_ctx->depth, defined in statement js_ctx->depth++.
static struct jsontree_value * find_next(struct jsontree_context *js_ctx)
{
...
js_ctx->depth++; /* step down to value... */
js_ctx->index[js_ctx->depth] = 0; /* and init index */
js_ctx->values[js_ctx->depth] = ov;
/* Continue on this new level */
return ov;
...
}
Output:
( NULL ) i.e. the use of js_ctx->depth not found in js_ctx->index[js_ctx->depth] and js_ctx->values[js_ctx->depth] because they will be in _res_before .
On Fri, May 17, 2024 at 2:07 PM Samuel-Oglegba ***@***.***> wrote:
In collect_variable_defuse pars=(var, stmt, input) the output is
(_res_before,_res_after,_found_stmt,_stop), the case for handling CODE.Assign#(lhs,
rhs) updates found_stmt with the output of the rhs and the updated value
of found_stmt could affect the result lhs by changing if it is in
_res_before or _res_after.
Example:
calling XFORM.collect_variable_uses(js_ctx->depth, (js_ctx->depth++),
Function find_next()) to get the use of js_ctx->depth, defined in
statement js_ctx->depth++.
static struct jsontree_value * find_next(struct jsontree_context *js_ctx)
{
...
js_ctx->depth++; /* step down to value... */
js_ctx->index[js_ctx->depth] = 0; /* and init index */
js_ctx->values[js_ctx->depth] = ov;
/* Continue on this new level */
return ov;
...
}
Output:
( NULL ) i.e. the use of js_ctx->depth not found in
js_ctx->index[js_ctx->depth] and js_ctx->values[js_ctx->depth] .
Expected Output:
(
js_ctx->index[js_ctx->depth] = 0; ,
js_ctx->values[js_ctx->depth] = ov;
)
—
Reply to this email directly, view it on GitHub
<#46>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4A2JSREJNH7KLRYJMTO23ZCZWQRAVCNFSM6AAAAABH4ZCYA6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDGNJXHA4DCMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
In
collect_variable_defuse pars=(var, stmt, input)
the output is(_res_before,_res_after,_found_stmt,_stop)
, the case for handlingCODE.Assign#(lhs, rhs)
updatesfound_stmt
with the output of therhs
and the updated value offound_stmt
could affect the resultlhs
by changing if it is in _res_before or _res_after.Example:
calling
XFORM.collect_variable_uses(js_ctx->depth, (js_ctx->depth++), Function find_next())
to get the use ofjs_ctx->depth
, defined in statementjs_ctx->depth++
.Output:
( NULL ) i.e. the use of
js_ctx->depth
not found injs_ctx->index[js_ctx->depth]
andjs_ctx->values[js_ctx->depth]
because they will be in _res_before .Expected Output:
(
js_ctx->index[js_ctx->depth] = 0; ,
js_ctx->values[js_ctx->depth] = ov;
)
The text was updated successfully, but these errors were encountered: