Remove a useless declaration: preload_characters cannot be > 4 as we have a Min() above
Bug: Change-Id: I553d6481a485a87c0246424270d63297400ceabe Reviewed-on: https://chromium-review.googlesource.com/579909 Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#49476}
This commit is contained in:
parent
e755191397
commit
e9d602250f
1
AUTHORS
1
AUTHORS
@ -131,6 +131,7 @@ Sandro Santilli <strk@keybit.net>
|
||||
Sanjoy Das <sanjoy@playingwithpointers.com>
|
||||
Seo Sanghyeon <sanxiyn@gmail.com>
|
||||
Stefan Penner <stefan.penner@gmail.com>
|
||||
Sylvestre Ledru <sledru@mozilla.com>
|
||||
Tobias Burnus <burnus@net-b.de>
|
||||
Victor Costan <costan@gmail.com>
|
||||
Vlad Burlik <vladbph@gmail.com>
|
||||
|
@ -3469,10 +3469,10 @@ void LoopChoiceNode::Emit(RegExpCompiler* compiler, Trace* trace) {
|
||||
int ChoiceNode::CalculatePreloadCharacters(RegExpCompiler* compiler,
|
||||
int eats_at_least) {
|
||||
int preload_characters = Min(4, eats_at_least);
|
||||
DCHECK_LE(preload_characters, 4);
|
||||
if (compiler->macro_assembler()->CanReadUnaligned()) {
|
||||
bool one_byte = compiler->one_byte();
|
||||
if (one_byte) {
|
||||
if (preload_characters > 4) preload_characters = 4;
|
||||
// We can't preload 3 characters because there is no machine instruction
|
||||
// to do that. We can't just load 4 because we could be reading
|
||||
// beyond the end of the string, which could cause a memory fault.
|
||||
|
Loading…
Reference in New Issue
Block a user