Commit Graph
100 Commits
Author SHA1 Message Date
Patrick Pelissier a043c379c0 Update user code as per new liberty 2023-06-11 23:32:02 +02:00
Patrick Pelissier 92bb380117 Rewrite order in preprocessing if to simplify user code 2023-06-11 23:32:02 +02:00
Patrick Pelissier 6bb7a184db Fix compil rules 2023-06-11 23:32:02 +02:00
Patrick Pelissier fa9163be9d Make linker options optional 2023-06-11 23:32:02 +02:00
Patrick Pelissier 0bade1563c Also build exn.exe by default 2023-06-11 23:32:02 +02:00
Patrick Pelissier 1278d2f8a0 Implement noinline another way 2023-06-11 23:32:02 +02:00
Patrick Pelissier 53af2aae68 Add example of separating inline & function code 2023-06-11 23:32:02 +02:00
Patrick Pelissier 17ded6fcc8 Update M_USE_EXTERN_FINE_GRAINED to avoid warnings 2023-06-11 23:32:02 +02:00
Patrick Pelissier 19ce371533 Add support for M_USE_EXTERN_FINE_GRAINED to enable / disable inline semantics alongside the translation unit by redefining it when needed 2023-06-11 23:32:02 +02:00
Patrick Pelissier 0bd1bcb68e Another way to request the desired semantics, compatible with clang 2023-06-11 23:32:02 +02:00
Patrick Pelissier b50813713a Define internal M_INLINE:
it is used to control the inline semantics.
By combining it with optimize option "-fno-inline"
for the internal M*LIB function (using _Pragma optimize)
we can control easily if we want to use an inline version
or call of an external function.

Define new user API:
* M_USE_EXTERN_DECL : define it before including any MLIB header to requests to call the M*LIB functions and don't inline then.
* M_USE_EXTERN_DEF  : define it once in a translation unit to define the M*LIB functions. This translation unit shall contain all templated macro too.
If you use one option, you need to use the other one too for another translation unit.
2023-06-11 23:32:02 +02:00
Patrick Pelissier 2628536d20 Add +m_string_it_set_ref 2023-06-10 01:50:14 +02:00
Patrick Pelissier ecfa4a9152 Add new function string_pop_u
to pop the last unicode code point
of a string.
2023-06-03 00:59:34 +02:00
Patrick Pelissier dafe4bcec5 Add basic test for M_DEFAULT_ARGS
Print hint to developper in case of incorrect usage
2023-06-03 00:56:13 +02:00
Patrick Pelissier 8544a7f289 Update example 2023-05-30 14:01:30 +02:00
Patrick Pelissier aa18915d61 Fix overflow computation 2023-05-21 00:15:58 +02:00
Patrick Pelissier df4bc0a56c Remove alloc warning for analyzer:
it is not able to track allocations correctly and only give false warnings.
valgraind or memory sanitizer are much more reliable to track memory errors.
2023-05-13 00:52:06 +02:00
Patrick Pelissier b6046e5e23 Fix new warnings with GCC13 2023-05-13 00:52:06 +02:00
Patrick Pelissier b487bfe5ad Adding missing inline 2023-05-08 23:54:16 +02:00
PpHd 408272c810 Merge pull request
Add m_string_cat_vprintf
2023-05-08 23:35:54 +02:00
Patrick Pelissier b1b0927e9f Update examples 2023-05-06 21:54:08 +02:00
Patrick Pelissier 37770365a1 Fix several bugs:
* in case of some invalid format starting with ']' directly it wrongly assume that the parsing was valid.
* incase of exception handling, and an exception was raised during the internal parsing, some destructors wern't called.
2023-05-05 22:16:39 +02:00
Patrick Pelissier 82bdcc685a Add internal macro MQLET for internal M_LET use 2023-05-05 22:15:13 +02:00
Patrick Pelissier 26fa733f70 Fix format 2023-05-05 22:14:41 +02:00
Patrick Pelissier cd2fc05573 Add FIXED_SIZE property 2023-05-05 21:41:05 +02:00
Patrick Pelissier 33430d4359 Update 2023-04-29 18:46:09 +02:00
Patrick Pelissier dc95b49f05 Update 2023-04-29 12:07:10 +02:00
Patrick Pelissier 3ec24cfa40 Update 2023-04-29 11:41:08 +02:00
Patrick Pelissier 12b099dcf8 Update 2023-04-29 11:25:56 +02:00
Patrick Pelissier b885d6136c Update 2023-04-29 11:20:00 +02:00
Patrick Pelissier b51c4bea2b Update 2023-04-29 11:19:54 +02:00
Patrick Pelissier 302c5eb300 Remove export passthrough of NEW/DEL/REALLOC/FREE interface
from the container oplist.
It has no real practical purpose.
NEW/DEL/REALLOC/FREE shall be a property of the container
to be defined, and not a property for an already defined container.
2023-04-29 10:50:04 +02:00
Patrick Pelissier 6d2900a2bd Improve coverage of test suite. 2023-04-27 00:04:44 +02:00
Patrick Pelissier 573e09c56e Remove variable number of elements support which was not working.
Request an explicit number of elements.
2023-04-27 00:04:03 +02:00
Patrick Pelissier 0a39a17d36 The undefined number of element value of serial _array_start
is now (size_t)-1 and no longer 0.
Moreoever, a serialization interface may refuse outputting data
if it doesn't know the number of elements.
In which case, the container shall explictly compute the number
of elements and recall the serial object _array_start method.
2023-04-27 00:01:50 +02:00
Patrick Pelissier a913d0947c Rewrite code to fix coverage 2023-04-26 23:34:13 +02:00
Patrick Pelissier abbd8ad6ce Update 2023-04-26 22:56:23 +02:00
Patrick Pelissier a09c9fe1c3 Update 2023-04-26 22:56:23 +02:00
Patrick Pelissier 219c62ff5d Provide a way to alter the standard naming convention for the functions
Close #72
2023-04-22 09:33:08 +02:00
Patrick Pelissier 272a326375 Fix warning issue for coverage 2023-04-22 09:23:18 +02:00
Patrick Pelissier eca79f2c80 Improve coverage of test suite 2023-04-21 22:44:34 +02:00
Patrick Pelissier 2feda4059f Fix issue in case of invalid IO 2023-04-21 22:44:23 +02:00
Patrick Pelissier de0ef67cf2 Fix build issue with VC++ 2023-04-19 23:06:23 +02:00
Patrick Pelissier 95762a058c Fix const attribute of _get_emplace 2023-04-19 22:42:21 +02:00
Patrick Pelissier acd8671017 Fix test case according to contract. 2023-04-19 22:37:54 +02:00
Patrick Pelissier a6c1688f23 Fix issue in remove root node for tree (part 2) 2023-04-19 22:37:40 +02:00
Patrick Pelissier f6ed549ce5 Fix issue in tree_remove for root node index (Part 2)
Enable support of removing root node
In this case, it considers the first child of the root as the new root (breaking symetry)
2023-04-18 23:24:48 +02:00
Patrick Pelissier 8639fdbd98 Fix issue in tree_remove when it is root node (part 1) 2023-04-18 22:56:56 +02:00
Patrick Pelissier 693b09387f Improve coverage of test suite. 2023-04-18 22:19:41 +02:00
Patrick Pelissier 4052d3794b Tree: Transform runtime tests into assertion
as it is proven that it cannot happen.
2023-04-18 22:19:28 +02:00
Patrick Pelissier 044e9c3bf7 Fix benchmark 2023-04-17 16:56:57 +02:00
Patrick Pelissier 45a2a1afb2 Add bench for CC 2023-04-16 21:16:04 +02:00
Patrick Pelissier b44e4e09dd Don't use builtin for clang as they are not properly supported. 2023-04-16 20:11:56 +02:00
Patrick Pelissier 5158059ec4 Make m_throw a classic "cold" function rather than a static inline function.
Since the function shall be rarely called, there is no point in inlining/duplicating it
in several units.
2023-04-16 19:26:15 +02:00
Patrick Pelissier 7279011f0a Use of the builtin versions of setjmp /longjmp for GCC / CLANG
They are more than twice faster on extreme bench of M\_LET / M\_TRY scenario
(and still twice slower than C++).
They also use less stack usage.
2023-04-16 19:18:04 +02:00
Patrick Pelissier 79369e9b05 Update README 2023-04-16 19:16:08 +02:00
Patrick Pelissier 58a7a7c214 Add gene TRY 2023-04-16 19:15:54 +02:00
Patrick Pelissier e3e94ca238 Add M_ATTR_COLD_FUNCTION attribute 2023-04-16 19:15:22 +02:00
Patrick Pelissier ae81271b2a Fix name of internal variable for M_DEFER 2023-04-16 08:33:45 +02:00
Patrick Pelissier d9c3724cff Compatiblity with C++ 2023-04-15 23:18:45 +02:00
Patrick Pelissier 1ff9848384 Update test so that it tests also the case of throwing without any try section (override M_RAISE_FATAL) 2023-04-15 22:51:57 +02:00
Patrick Pelissier 83e7f2a641 Use of new M_ATTR_NO_RETURN attribute 2023-04-15 22:50:47 +02:00
Patrick Pelissier 6580601969 Add M_ATTR_NO_RETURN attribute support (not C23 compatible yet) 2023-04-15 22:50:27 +02:00
Patrick Pelissier ad023bb09d Improve coverage of the test suite 2023-04-13 23:27:01 +02:00
Patrick Pelissier b5df21f9c5 Simplify function: for LCA both iterators shall be in the same tree 2023-04-13 23:26:12 +02:00
Patrick Pelissier d2dccbf514 Add table of contents 2023-04-12 20:35:22 +02:00
Patrick Pelissier a8075cbb05 Transform runtime test into assertion
as it is proven that it cannot happen.
2023-04-11 21:57:56 +02:00
Patrick Pelissier 1322afc4c9 Improve coverage of test suite 2023-04-11 21:53:14 +02:00
Patrick Pelissier 0f885fb158 Fix coverage source for m-core 2023-04-11 21:32:57 +02:00
Patrick Pelissier 25a2eb0875 Correct syntax 2023-04-11 21:32:38 +02:00
Patrick Pelissier 6bcd51f10f Complete coverage synthesis
with branch coverage information
2023-04-11 21:09:40 +02:00
Patrick Pelissier 9c1cb9c835 Update doc 2023-04-11 00:07:33 +02:00
Patrick Pelissier 19cb329ae6 Simplfy example 2023-04-11 00:05:41 +02:00
Patrick Pelissier 8099e6a94f Update doc 2023-04-11 00:04:46 +02:00
Patrick Pelissier ce6cc080d6 Improve coverage of test suite 2023-04-10 23:09:18 +02:00
Patrick Pelissier a27b0b4014 Fix wrong parsing of malformed dict. 2023-04-10 23:08:51 +02:00
Patrick Pelissier e74f80cc59 Update doc 2023-04-08 11:32:15 +02:00
Patrick Pelissier bafd307247 Update performance chapter 2023-04-08 11:27:37 +02:00
Patrick Pelissier 6bed3ac697 Print time with 2 digits after the decimal 2023-04-08 11:25:59 +02:00
Patrick Pelissier b8a9073fc9 Fix issue to generate graph without any repetition 2023-04-08 11:25:05 +02:00
Patrick Pelissier da3e71c676 Fix introduced warning in release mode 2023-04-08 11:23:32 +02:00
Patrick Pelissier 4ea83e129e Improve coverage of test suite 2023-04-08 00:17:33 +02:00
Patrick Pelissier fc34fa80b5 Properly mark condition for entering memory failure. 2023-04-07 23:50:03 +02:00
Patrick Pelissier 4f608ec266 Fix target of run 2023-04-06 22:02:49 +02:00
Patrick Pelissier ccaa54d2a5 Improve coverage of the tet suite 2023-04-06 21:55:21 +02:00
Patrick Pelissier 095bf7070d Rewrite loop to avoid final assert(0) 2023-04-06 21:55:06 +02:00
Patrick Pelissier 676b12d5d2 Fix warnings 2023-04-05 23:15:39 +02:00
Patrick Pelissier f858aa2cb5 Improve coverage of the test suite. 2023-04-05 23:07:52 +02:00
Patrick Pelissier 9d77448a25 Reduce optimization level to 0
Otherwise the coverage results are not reliable:
* some uncovered lines are not reported as uncovered
* some covered lines are reported as uncovered (!)
2023-04-05 23:04:22 +02:00
Patrick Pelissier 8babc33b91 Rewrite code differently to be more robust
and improve coverage of the test suite
2023-04-05 22:41:33 +02:00
Patrick Pelissier 352d7cf725 Improve coverage of the test suite 2023-04-05 22:22:49 +02:00
Patrick Pelissier a6993ab758 Overload assert in coverage mode
to avoid polluting the report with untaken branch by the assert macro.
2023-04-05 22:22:01 +02:00
Patrick Pelissier 48260ac2a6 Ignore temporary coverage files 2023-04-05 22:21:23 +02:00
Patrick Pelissier e4afb024b9 Improve coverage of test suite 2023-04-05 00:38:44 +02:00
Patrick Pelissier 63008af30f Add assertions 2023-04-05 00:38:32 +02:00
Patrick Pelissier 1828aca65e Fix preprocessing 2023-04-05 00:38:16 +02:00
Patrick Pelissier 9354e9717d Remove unused test function 2023-04-04 01:06:32 +02:00
Patrick Pelissier 100c0f22fe Improve test coverage 2023-04-04 00:48:03 +02:00
Patrick Pelissier ff778528f8 Improve coverage of the test suite 2023-04-04 00:22:49 +02:00
Patrick Pelissier 8f1a1df617 Improve coverage of test suite 2023-04-03 16:38:54 +02:00