scryer-prolog icon indicating copy to clipboard operation
scryer-prolog copied to clipboard

rebis-dev: Superfluous condition?

Open triska opened this issue 8 months ago • 2 comments

We have:

https://github.com/mthom/scryer-prolog/blob/35495880ad62b2074766f37575400eccf5cfdec9/src/atom_table.rs#L226

For the special case of the atom \0\.

On the other hand, atoms containing \0\ are not inlined:

https://github.com/mthom/scryer-prolog/blob/35495880ad62b2074766f37575400eccf5cfdec9/src/atom_table.rs#L470

?

triska avatar Apr 12 '25 07:04 triska

Yes. Good catch

mthom avatar Apr 13 '25 00:04 mthom

Hm, I overlooked fn new_char_inline, which I think did create such atoms, but now no longer does.

The intention of this issue was to remove an unnecessary conditional, but now the condition arises in new_char_inlined instead.

triska avatar Apr 13 '25 06:04 triska