-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct typos #11189
Closed
Closed
Correct typos #11189
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -238,7 +238,7 @@ inline const void* MemrchrFill(const void* haystack, uint8_t needle, | |
} | ||
|
||
|
||
// Finds the first occurence of *two-byte* character pattern[0] in the string | ||
// Finds the first occurrence of *two-byte* character pattern[0] in the string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this file comes from deps/v8/src/string-search.h with the typo ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's ok. |
||
// `subject`. Does not check that the whole pattern matches. | ||
template <typename Char> | ||
inline size_t FindFirstCharacter(Vector<const Char> pattern, | ||
|
@@ -284,7 +284,7 @@ inline size_t FindFirstCharacter(Vector<const Char> pattern, | |
} | ||
|
||
|
||
// Finds the first occurance of the byte pattern[0] in string `subject`. | ||
// Finds the first occurrence of the byte pattern[0] in string `subject`. | ||
// Does not verify that the whole pattern matches. | ||
template <> | ||
inline size_t FindFirstCharacter(Vector<const uint8_t> pattern, | ||
|
@@ -373,7 +373,7 @@ size_t StringSearch<Char>::BoyerMooreSearch( | |
// Only preprocess at most kBMMaxShift last characters of pattern. | ||
size_t start = search->start_; | ||
|
||
int* bad_char_occurence = search->bad_char_table(); | ||
int* bad_char_occurrence = search->bad_char_table(); | ||
int* good_suffix_shift = search->good_suffix_shift_table(); | ||
|
||
Char last_char = pattern[pattern_length - 1]; | ||
|
@@ -383,7 +383,7 @@ size_t StringSearch<Char>::BoyerMooreSearch( | |
size_t j = pattern_length - 1; | ||
int c; | ||
while (last_char != (c = subject[index + j])) { | ||
int shift = j - CharOccurrence(bad_char_occurence, c); | ||
int shift = j - CharOccurrence(bad_char_occurrence, c); | ||
index += shift; | ||
if (index > subject_length - pattern_length) { | ||
return subject.length(); | ||
|
@@ -399,11 +399,11 @@ size_t StringSearch<Char>::BoyerMooreSearch( | |
// we have matched more than our tables allow us to be smart about. | ||
// Fall back on BMH shift. | ||
index += pattern_length - 1 - | ||
CharOccurrence(bad_char_occurence, | ||
CharOccurrence(bad_char_occurrence, | ||
static_cast<Char>(last_char)); | ||
} else { | ||
int gs_shift = good_suffix_shift[j + 1]; | ||
int bc_occ = CharOccurrence(bad_char_occurence, c); | ||
int bc_occ = CharOccurrence(bad_char_occurrence, c); | ||
int shift = j - bc_occ; | ||
if (gs_shift > shift) { | ||
shift = gs_shift; | ||
|
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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.
This change should be fine I think since it was actually spelled correctly in the relevant commit message.