Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions Parser/grammar1.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,10 @@ dfa *
PyGrammar_FindDFA(grammar *g, int type)
{
dfa *d;
#if 1
/* Massive speed-up */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this comment was really only useful in relation to the dead code.

d = &g->g_dfa[type - NT_OFFSET];
assert(d->d_type == type);
return d;
#else
/* Old, slow version */
int i;

for (i = g->g_ndfas, d = g->g_dfa; --i >= 0; d++) {
if (d->d_type == type)
return d;
}
Py_UNREACHABLE();
#endif
}

const char *
Expand Down