Граф коммитов

75 Коммитов

Автор SHA1 Сообщение Дата
卜部昌平 ce2c97d738 internal/symbol.h rework
Some declatations are moved from internal/parse.h, to reflect the fact
that they are defined in symbol.c.
2019-12-26 20:45:12 +09:00
卜部昌平 1a80d7bcda internal/string.h rework
Reduced the number of macros defined in the file.  Also made it explicit
for MJIT_FUNC_EXPORTTED functions to be so.
2019-12-26 20:45:12 +09:00
卜部昌平 797c46917e internal/range.h rework
Eliminate macros for better readability.
2019-12-26 20:45:12 +09:00
卜部昌平 719efe72b0 internal/process.h rework
Eliminated the macro to convert into an inline function.
2019-12-26 20:45:12 +09:00
卜部昌平 c524df0780 internal/proc.h rework
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.
2019-12-26 20:45:12 +09:00
卜部昌平 d0e0c884bb internal/object.h rework
Eliminated macros.  As a side effect struct RBasicRaw is no longer
required because we can now define anonymous structs inside of inline
functions.
2019-12-26 20:45:12 +09:00
卜部昌平 c27bcd7057 internal/gc.h rework
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.
2019-12-26 20:45:12 +09:00
卜部昌平 adc49f0f9a internal/sanitizers.h rework
Rearrange macro orders for better readability.
2019-12-26 20:45:12 +09:00
卜部昌平 ec6f6b53d8 internal/error.h rework
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.
2019-12-26 20:45:12 +09:00
卜部昌平 23c2a27bf6 internal/compile.h rework
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.
2019-12-26 20:45:12 +09:00
卜部昌平 0723db6c39 internal/array.h rework
Rearrange contents for better readability, reduce macros for the same
reason, and mark MJIT_FUNC_EXPORTED functions as such.
2019-12-26 20:45:12 +09:00
卜部昌平 f3a229fe2d internal/variable.h rework
Eliminated macros.  Also marked MJIT_FUNC_EXPORTED functions as such.
Some of them are declared in constant.h so edited that file also.
2019-12-26 20:45:12 +09:00
卜部昌平 989068cf70 internal/imemo.h rework
Arrange contents and eliminate macros, to make them readable.

Macro IFUNC_NEW was deleted because there was only one usage.
2019-12-26 20:45:12 +09:00
卜部昌平 63c9f620cf internal/class.h rework
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.
2019-12-26 20:45:12 +09:00
卜部昌平 7d71d916a2 internal/struct.h rework
Replace macros with inline functions of equivalent contents, for much
improved readability.
2019-12-26 20:45:12 +09:00
卜部昌平 e72b8592d9 internal/hash.h rework
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.
2019-12-26 20:45:12 +09:00
卜部昌平 f0c02a0949 internal/numeric.h rework
Marked MJIT_FUNC_EXPORTED functions as such.  Other changes are rather
cosmetic.
2019-12-26 20:45:12 +09:00
卜部昌平 099778a6da internal/bingnum.h rework
Turn macros into inline functions for better readability.  Also add
rb_int128t2big delcaration, which was missing.
2019-12-26 20:45:12 +09:00
卜部昌平 f6dc053faf internal/fixnum.h rework
Add #include lines, move FIXNUM_POSITIVE_P etc. from numeric.h.
2019-12-26 20:45:12 +09:00
卜部昌平 68c0dc8d36 internal/static_assert.h rework
ISO/IEC 9899:2011 section 7.2 states that <assert.h> must define
static_assert.  Use it when available.
2019-12-26 20:45:12 +09:00
卜部昌平 6581db2187 internal/warnings.h rework
Not a big rewrite.  Just to make those macros readable.
2019-12-26 20:45:12 +09:00
卜部昌平 64ec438b5b internal/bits.h rework
Improving readability by converting some macros into inline functions.
Also improved support for recent x86_64 processors, which have better
instructions for the purposes.
2019-12-26 20:45:12 +09:00
卜部昌平 0958e19ffb add several __has_something macro
With these macros implemented we can write codes just like we can assume
the compiler being clang.  MSC_VERSION_SINCE is defined to implement
those macros, but turned out to be handy for other places.  The -fdeclspec
compiler flag is necessary for clang to properly handle __has_declspec().
2019-12-26 20:45:12 +09:00
卜部昌平 863dbb21d8 assume C99
Now that we no longer support old compilers, we can safely delete
several obsolete #ifdef gurads.  Also because (as of writing) it is
impossible to compile the program using C++ compilers, lets just
entirely prohibit __cplusplus to reduce # of LOCs.

Note however that we still cannot eliminate __STDC_VERSION__ checks,
because MSVC does not define it, saying its C99 support is partial.
See also https://social.msdn.microsoft.com/Forums/vstudio/en-US/53a4fd75-9f97-48b2-aa63-2e2e5a15efa3
2019-12-26 20:45:12 +09:00
卜部昌平 b739a63eb4 split internal.h into files
One day, I could not resist the way it was written.  I finally started
to make the code clean.  This changeset is the beginning of a series of
housekeeping commits.  It is a simple refactoring; split internal.h into
files, so that we can divide and concur in the upcoming commits.  No
lines of codes are either added or removed, except the obvious file
headers/footers.  The generated binary is identical to the one before.
2019-12-26 20:45:12 +09:00