New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
vlib, tools: make minor improvements #19950
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ttytm
force-pushed
the
misc/perf-refactor
branch
2 times, most recently
from
November 20, 2023 17:15
9d1acf6
to
39ad28a
Compare
JalonSolov
reviewed
Nov 20, 2023
Co-authored-by: JalonSolov <JalonSolov@gmail.com>
JalonSolov
reviewed
Nov 21, 2023
spytheman
reviewed
Nov 21, 2023
spytheman
approved these changes
Nov 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains some accumulated changes. Cleaning stashes, I thought they can be grouped in a PR with minor improvements.
E.g.,
馃[deprecated] Generated by Copilot at aa560c2
This pull request improves the code quality, performance, and readability of various modules in the v compiler and tools, such as
vdoc
,vvet
,checker
,parser
, andcomptime
. It mainly involves reordering, simplifying, or removing some if statements, using match statements, and fixing typos and formatting issues. It also affects the html generation ofvdoc
by escaping script tags in markdown comments.馃[deprecated] Generated by Copilot at aa560c2
cmd/tools/vdoc/html.v
(link, link, link)markdown_escape_script_tags
function fromcmd/tools/vdoc/markdown.v
(link)term_colors
constant fromcmd/tools/vvet/vvet.v
tocmd/tools/vdoc/html.v
and add a new constantclean_seq
to clean the tags from the comments (link, link)ssl_do
,http_do
, andproxy.http_do
methods invlib/net/http/request.v
by using range-based for loops instead of manual counters and while loops (link, link, link)vlib/v/checker/checker.v
,vlib/v/checker/errors.v
,vlib/v/checker/fn.v
,vlib/v/checker/struct.v
,vlib/v/parser/comptime.v
, andvlib/v/parser/expr.v
to make them more consistent and avoid unnecessary checks (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)vlib/v/parser/comptime.v
by using a match statement instead of multiple if statements (link)vlib/v/parser/parser.v
by using a match statement instead of multiple if statements (link)