Skip to content

Commit

Permalink
Revert "Allow for fate offsets when unique fates in use"
Browse files Browse the repository at this point in the history
This reverts commit e167934.
Gonna use a different approach eventually, which needs to be
figured out in a branch.
  • Loading branch information
TimToady committed Jan 20, 2017
1 parent 8c45c9d commit d7e286b
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/6model/reprs/NFA.c
Expand Up @@ -758,22 +758,8 @@ void MVM_nfa_run_alt(MVMThreadContext *tc, MVMObject *nfa, MVMString *target,
MVMint64 caps = cstack && IS_CONCRETE(cstack)
? MVM_repr_elems(tc, cstack)
: 0;

/* With unique fates, we have to subtract this NFA's offset, stored in fbeg. */
/* (Conveniently, fbeg was already stored as 0 for bootstraps of QRegex.) */
MVMObject *fatenames = ((MVMNFABody *)OBJECT_BODY(nfa))->fates;
MVMint64 fbegend = 0;
MVMint64 fbeg = 0;
MVMint64 fend = 0;

if (fatenames) {
fbegend = MVM_repr_get_int(tc, MVM_repr_at_pos_o(tc, fatenames, 0));
fbeg = fbegend & 0xffffffff;
fend = fbegend >> 32;
}

for (i = 0; i < total_fates; i++) {
MVM_repr_push_i(tc, bstack, MVM_repr_at_pos_i(tc, labels, fates[i] - fbeg));
MVM_repr_push_i(tc, bstack, MVM_repr_at_pos_i(tc, labels, fates[i]));
MVM_repr_push_i(tc, bstack, offset);
MVM_repr_push_i(tc, bstack, 0);
MVM_repr_push_i(tc, bstack, caps);
Expand Down

0 comments on commit d7e286b

Please sign in to comment.