Fix gen-keywords-gen-h.py

Commit 84f3877c15 moved IsInRange to
base::IsInRange and updated src/parsing/keywords-gen.h, but did not
update tools/gen-keywords-gen-h.py.

Bug: v8:12507
Change-Id: I914ba73feac3bac6fd5d08d14d17149faf6c5c76
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3356200
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78467}
This commit is contained in:
Anton Bershanskiy 2022-01-03 17:44:42 +02:00 committed by V8 LUCI CQ
parent 2ffc79b7d4
commit f3214885ec
2 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,7 @@ Andrei Kashcha <anvaka@gmail.com>
Andrew Paprocki <andrew@ishiboo.com>
Anna Henningsen <anna@addaleax.net>
Antoine du Hamel <duhamelantoine1995@gmail.com>
Anton Bershanskiy <8knots@protonmail.com>
Anton Bikineev <ant.bikineev@gmail.com>
Archil Sharashenidze <achosharashenidze@gmail.com>
Bangfu Tao <bangfu.tao@samsung.com>

View File

@ -83,7 +83,8 @@ def trim_and_dcheck_char_table(out):
def use_isinrange(out):
# Our IsInRange method is more efficient than checking for min/max length
return checked_sub(r'if \(len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH\)',
r'if (IsInRange(len, MIN_WORD_LENGTH, MAX_WORD_LENGTH))',
r'if (base::IsInRange(len, MIN_WORD_LENGTH, '
+ r'MAX_WORD_LENGTH))',
out)