Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dpelle
Copy link
Member

@dpelle dpelle commented Mar 21, 2017

This PR changes calls like (*mb_char2len)(c) into utf_char2len(c) wherever
we know that enc_utf8 is true. That's already done in Vim source code in
several places, but not systematically.

It should be a bit faster in theory. Admittedly, I did not see any measurable
difference in speed, so I hesitated to push this this change. But since I didn't
see any drawback, I created the PR. Perhaps it makes more difference
in speed when building vim with -fwhole-program as calling (*mb_char2len)(c)
with a function pointer should prevent interprocedural optimizations unlike
calling utf_char2len(c) directly.

@brammool brammool closed this in ace9598 Mar 29, 2017
desvp pushed a commit to desvp/vim that referenced this pull request May 30, 2017
Problem:    Using a function pointer instead of the actual function, which we
            know.
Solution:   Change mb_ functions to utf_ functions when already checked for
            Unicode. (Dominique Pelle, closes vim#1582)
justinmk pushed a commit to neovim/neovim that referenced this pull request Jun 10, 2018
…own (#8513)

Problem:    Using a function pointer instead of the actual function, which we
            know.
Solution:   Change mb_ functions to utf_ functions when already checked for
            Unicode. (Dominique Pelle, closes vim/vim#1582)
vim/vim@ace9598
ZviRackover added a commit to ZviRackover/neovim that referenced this pull request Jun 29, 2018
Problem:    Using a function pointer instead of the actual function, which we
            know.
Solution:   Change mb_ functions to utf_ functions when already checked for
            Unicode. (Dominique Pelle, closes vim/vim#1582)
vim/vim@ace9598

In addition to merging the above patch, entirely removed the mb_ptr2char macro
and its uses.
ZviRackover added a commit to ZviRackover/neovim that referenced this pull request Jun 29, 2018
… is known

Problem:    Using a function pointer instead of the actual function, which we
            know.
Solution:   Change mb_ functions to utf_ functions when already checked for
            Unicode. (Dominique Pelle, closes vim/vim#1582)
vim/vim@ace9598

In addition to merging the above patch, entirely removed the mb_ptr2char macro
and its uses.
ZviRackover added a commit to ZviRackover/neovim that referenced this pull request Jun 29, 2018
… is known

Problem:    Using a function pointer instead of the actual function, which we
            know.
Solution:   Change mb_ functions to utf_ functions when already checked for
            Unicode. (Dominique Pelle, closes vim/vim#1582)
vim/vim@ace9598

In addition to merging the above patch, entirely removed the mb_ptr2char macro
and its uses. The same can be done for all deprecated mb_ functions in follow-up
patches.
ZviRackover added a commit to ZviRackover/neovim that referenced this pull request Jun 30, 2018
… is known

Problem:    Using a function pointer instead of the actual function, which we
            know.
Solution:   Change mb_ functions to utf_ functions when already checked for
            Unicode. (Dominique Pelle, closes vim/vim#1582)
vim/vim@ace9598

In addition to merging the above patch, entirely removed the mb_ptr2char macro
and its uses. The same can be done for all deprecated mb_ functions in follow-up
patches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant