-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cxx: scan the cork queue instead of the symtab to fill nth fields
Close #3634. If an enum has so many enumerators, the original code, counting enumerators for filling nth fields, takes a too long time. The new code looks up the last enumerator and calculates a new nth value by incrementing the last nth value. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
6 changed files
with
62 additions
and
9 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright: 2023 Masatake YAMATO | ||
# License: GPL-2 | ||
|
||
input=/tmp/c-large-enum.d-input.c | ||
CTAGS="$1 --quiet --options=NONE" | ||
|
||
i=0 | ||
{ | ||
echo "enum E {" | ||
while [ $i -lt 32770 ]; do | ||
printf "X%x," $i | ||
i=$(($i + 1)) | ||
done | ||
echo "};" | ||
} > $input | ||
|
||
${CTAGS} --sort=no -n --fields= --fields=+"{nth}" -x --_xformat='%{name} %{nth}' "$input" | tail -10 | ||
r=$? | ||
|
||
rm -f "$input" | ||
|
||
exit $r |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
X7ff8 32760 | ||
X7ff9 32761 | ||
X7ffa 32762 | ||
X7ffb 32763 | ||
X7ffc 32764 | ||
X7ffd 32765 | ||
X7ffe 32766 | ||
X7fff 32767 | ||
X8000 32767 | ||
X8001 32767 |
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