-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Split internal.h into files #2711
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
Merged
Merged
Conversation
This file contains hidden or 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
8f88417
to
0a495e0
Compare
Turn macros into inline functions for better readability. Also add rb_int128t2big delcaration, which was missing.
Marked MJIT_FUNC_EXPORTED functions as such. Other changes are rather cosmetic.
Reduce macros to make them inline functions, as well as mark MJIT_FUNC_EXPORTED functions explicitly as such. Definition of ar_hint_t is simplified. This has been the only possible definition so far.
Replace macros with inline functions of equivalent contents, for much improved readability.
This file has almost nothing to do. Added some #ifdef lines and rearranged file contents. Those macros are unable to translate into inline functions, because they are used as lvalues of assignments.
Arrange contents and eliminate macros, to make them readable. Macro IFUNC_NEW was deleted because there was only one usage.
Eliminated macros. Also marked MJIT_FUNC_EXPORTED functions as such. Some of them are declared in constant.h so edited that file also.
Rearrange contents for better readability, reduce macros for the same reason, and mark MJIT_FUNC_EXPORTED functions as such.
This file containes other materials than in compile.c. I could perhaps split them into files, but felt overkill. Just add comments that describe the situations.
Reduce macros for readability. Also transplanted some part of internal/file.h into here because the delcared functions are in fact defined in error.c.
Rearrange macro orders for better readability.
Improved readability by reducing the use of macros. Also moved some part of internal/compilers.h into this file, because it seems to be the right place for them.
Eliminated macros. As a side effect struct RBasicRaw is no longer required because we can now define anonymous structs inside of inline functions.
Annotated MJIT_FUNC_EXPORTED functions as such. Declaration of rb_sym_to_proc is moved into this file because the function is defined in proc.c rather than string.c.
Eliminated the macro to convert into an inline function.
Eliminate macros for better readability.
Reduced the number of macros defined in the file. Also made it explicit for MJIT_FUNC_EXPORTTED functions to be so.
Some declatations are moved from internal/parse.h, to reflect the fact that they are defined in symbol.c.
Rather trivial, added missed MJIT_FUNC_EXPORTED function declaration.
Rearranged contents, then added MJIT_FUNC_EXPORTED function declarations.
These headers need no rewrite. Just add some minor tweaks, like addition of #include lines. Mainly cosmetic. TIMET_MAX_PLUS_ONE was deleted because the macro was used from only one place (directly write expression there).
The same as 41bc766. Read that commit for what is happening.
Saves comitters' daily life by avoid #include-ing everything from internal.h to make each file do so instead. This would significantly speed up incremental builds. We take the following inclusion order in this changeset: 1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very first thing among everything). 2. RUBY_EXTCONF_H if any. 3. Standard C headers, sorted alphabetically. 4. Other system headers, maybe guarded by #ifdef 5. Everything else, sorted alphabetically. Exceptions are those win32-related headers, which tend not be self- containing (headers have inclusion order dependencies).
Noticed that internal/stdbool.h and addr2line.c are the only two place where missing/stdbool.h is included. Why not delete the file so that we can merge internal/stdbool.h and missing/stdbool.h into one.
I now think it's safe. I would like to merge this. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Current
internal.h
is too large, too dirty. Let's house keep.