Skip to content
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

main: rbtree based symbol table #2450

Merged
merged 15 commits into from Apr 4, 2020

Conversation

masatake
Copy link
Member

@masatake masatake commented Mar 1, 2020

This is the result of a study in #2427.
I removed code related to CPreProcessor and SystemVerilog.

The changes for entry.h in 81647c1 excite you, a parser developer.

06a1588 may also be interesting.

TODO:

  • write abot the new API to docs/*.rst.
  • unify the type representing cork indexes to "int", not "unsigned int".

Test cases are not included in this change.

@coveralls
Copy link

coveralls commented Mar 1, 2020

Coverage Status

Coverage decreased (-0.4%) to 86.301% when pulling f67e271 on masatake:rbtree-based-symbol-table into 6dd6c73 on universal-ctags:master.

@codecov
Copy link

codecov bot commented Mar 1, 2020

Codecov Report

Merging #2450 into master will decrease coverage by 0.43%.
The diff coverage is 50.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2450      +/-   ##
==========================================
- Coverage   86.61%   86.18%   -0.44%     
==========================================
  Files         177      179       +2     
  Lines       36796    37088     +292     
==========================================
+ Hits        31872    31964      +92     
- Misses       4924     5124     +200     
Impacted Files Coverage Δ
main/entry_p.h 100.00% <ø> (ø)
main/numarray.c 33.33% <ø> (ø)
main/rbtree.c 11.94% <11.94%> (ø)
main/entry.c 86.01% <76.76%> (-1.87%) ⬇️
main/rbtree.h 80.00% <80.00%> (ø)
main/parse.c 95.06% <100.00%> (+<0.01%) ⬆️
main/ptrarray.c 83.33% <100.00%> (+0.21%) ⬆️
optlib/cmake.c 100.00% <100.00%> (ø)
optlib/ctags-optlib.c 100.00% <100.00%> (ø)
optlib/elixir.c 100.00% <100.00%> (ø)
... and 51 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6dd6c73...f67e271. Read the comment docs.

@masatake
Copy link
Member Author

#2421 is a good target to apply the new symbol table feature to.
Applying it to CPreProcessor's macro is more ... fantastic but more changes are needed.

masatake and others added 15 commits April 4, 2020 08:11
…rrayAdd

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…ented dynamically growing array

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
To add more features to corkQueue, we need a way
to specify which feathres of corkQueue enable or not
from parsers.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…happy/rbtree (e1e984fcbc17d47a67652bbc6276afe948c7ad55)

The code is not built into ctags binary.
This commit is for just importing for implementing symbol tables in u-ctags in the future.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…attribute__((aligned(X)))

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
This one is true is the compiler supports `({...})'.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* provide portable container_of,
* rename the top-level ifdef conditoin guarding from including .h twice,
* use CTAGS_INLINE instead of inline for portability, and
* use CTAGA_ATTR_ALIGNED instead of __attribute__((aligned(sizeof(long)))).

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
`unsigned long` is 32-bit on 64-bit Windows.
`uintptr_t` should be used instead.
`uintptr_t` needs stdint.h.

(@masatake edited the commit log)
Just integrating into ctags binary.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…parsers

makeTexTag takes "kind" as an argument.
The implementation of the function assumes the kind is part of Tex
parser.  However, the assumption is wrong for the subparsers of Tex.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Close universal-ctags#2421.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake masatake marked this pull request as ready for review April 4, 2020 06:28
@masatake
Copy link
Member Author

masatake commented Apr 4, 2020

Though there are still two TODO items. However, I would like to use the symbol table for fixing #2421.
So I will merge this pull request in soon.

@masatake masatake merged commit e994ac0 into universal-ctags:master Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants