File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -22773,22 +22773,26 @@ int eval_sexp(int cur_node, int referenced_node)
2277322773 // trap known true and known false sexpressions. We don't trap on SEXP_NAN sexpressions since
2277422774 // they may yet evaluate to true or false.
2277522775
22776+ // we want to log event values for KNOWN_X or FOREVER_X before returning
22777+ if (Log_event && ((Sexp_nodes[cur_node].value == SEXP_KNOWN_TRUE) || (Sexp_nodes[cur_node].value == SEXP_KNOWN_FALSE) || (Sexp_nodes[cur_node].value == SEXP_NAN_FOREVER))) {
22778+ // if this is a node that has been assigned the value by short-circuiting,
22779+ // it might not be the operator that returned the value
22780+ int op_index = get_operator_index(cur_node);
22781+ if (op_index < 0)
22782+ op_index = get_operator_index(CAR(cur_node));
22783+
22784+ // log the known value
22785+ add_to_event_log_buffer(op_index, Sexp_nodes[cur_node].value);
22786+ }
22787+
22788+ // now do a quick return whether or not we log, per the comment above about trapping known sexpressions
2277622789 if (Sexp_nodes[cur_node].value == SEXP_KNOWN_TRUE) {
22777- if (Log_event) {
22778- add_to_event_log_buffer(get_operator_index(cur_node), SEXP_KNOWN_TRUE);
22779- }
2278022790 return SEXP_TRUE;
2278122791 }
2278222792 else if (Sexp_nodes[cur_node].value == SEXP_KNOWN_FALSE) {
22783- if (Log_event) {
22784- add_to_event_log_buffer(get_operator_index(cur_node), SEXP_KNOWN_FALSE);
22785- }
2278622793 return SEXP_FALSE;
2278722794 }
2278822795 else if (Sexp_nodes[cur_node].value == SEXP_NAN_FOREVER) {
22789- if (Log_event) {
22790- add_to_event_log_buffer(get_operator_index(cur_node), SEXP_NAN_FOREVER);
22791- }
2279222796 return SEXP_FALSE;
2279322797 }
2279422798
You can’t perform that action at this time.
0 commit comments