summaryrefslogtreecommitdiff
path: root/ccode
Commit message (Collapse)AuthorAgeFilesLines
* codegen: Use a special CCodeBinaryExpression for string comparisonsRico Tzschichholz2022-12-222-0/+64
| | | | | This preserves support for recursive replacement of arguments while this expression was actually transformed into a function call.
* codegen: Write array length of formal parameters with fixed lengthRico Tzschichholz2022-01-261-1/+13
| | | | "void foo (gint i[3]) { ... }" instead of "void foo (gint* i) { ... }"
* Revert "Make more use of native GLib.Regex syntax"Rico Tzschichholz2021-12-271-1/+4
| | | | This reverts commit b2ef0ed8d2c37a813f9ad8b35c7a7e4a1d639e1c.
* Make more use of native GLib.Regex syntaxRico Tzschichholz2021-12-221-4/+1
|
* Properly use [Flags] feature for ModifierFlags and CCodeModifiersRico Tzschichholz2021-12-171-16/+16
| | | | See 2afaae5e0755b2d8619808d2d148761b92c355b5
* ccode: Fix CCodeUnaryExpression.write() for PREFIX_INCREMENT/PREFIX_DECREMENTRico Tzschichholz2021-11-241-2/+2
| | | | Regression of 0f65d306f5a2eca7ea798e5c835cf66b6e327c8e
* codegen: Add and use CCodeConstantIdentifier for accessing constantsRico Tzschichholz2021-11-152-0/+36
| | | | | | | | | If an address to a constant value is required then its identifier needs to be used instead of referring to a temporary copy. Fixes a regression of f1a8f2a4c6771124abd61fd0ebfa991c846575fe Found by -fsanitize=address
* ccode: Avoid trailing space after #else of CCodeIfSectionRico Tzschichholz2021-06-241-1/+1
| | | | In addition to 994b4cb078643d9bb1842fa60ecb69891e1e7b87
* codegen: Introduce VALA_EXPORT for public symbols to improve portabilityPrinceton Ferro2021-05-202-1/+3
| | | | | | | Use it as replacement for "extern" and attribute every public symbol. We want to ensure that public symbols are exported, which isn't the default when generating a shared library in MSVC, for example.
* ccode: Allow appending `#elif`, `#else` cases to CCodeIfSectionPrinceton Ferro2021-05-201-7/+35
|
* ccode: Allow to add defines in a special sectionRico Tzschichholz2021-05-201-0/+9
|
* codegen: Use CCodeDeclaratorSuffix to emit array length of constantsRico Tzschichholz2021-02-011-6/+18
|
* ccode: Minor API cleaning and additionsRico Tzschichholz2021-02-017-15/+19
|
* ccode: Use __attribute__ replacements of G_GNUC_* for posix profileRico Tzschichholz2020-11-159-18/+78
|
* vala: Make use of new printf-like API of Report.*()Rico Tzschichholz2020-10-261-1/+1
|
* build: Stop passing obsolete --use-headerRico Tzschichholz2020-09-271-1/+0
|
* Use "str_equal" as equal_func for ArrayList<string> instancesRico Tzschichholz2020-05-081-1/+1
|
* codegen: Use specified indices to access multidimensional array constantsRico Tzschichholz2020-04-131-3/+16
| | | | | | | This fixes compile issues together with -Waggressive-loop-optimizations and warnings with -Warray-bounds. Fixes https://gitlab.gnome.org/GNOME/vala/issues/905
* vala: Drop --use-header compiler option and enable it by defaultMason Bogue2020-04-051-6/+4
| | | | | | Import definitions from generated header files if available Fixes https://gitlab.gnome.org/GNOME/vala/issues/713
* codegen: Use defintions of public header in internal header if availableMason Bogue2020-04-051-2/+12
| | | | | | Add CCode API to distinguish between public and internal header files. See https://gitlab.gnome.org/GNOME/vala/issues/713
* codegen: Improve *_get_type() fast path (requires glib >= 2.58)Rico Tzschichholz2019-12-052-1/+5
| | | | | | | | | | | Uses G_GNUC_NO_INLINE if glib >= 2.58 is targetted otherwise the compiler is free to inline the separate *_get_type_once() function. Follows the changes introduced in glib by https://gitlab.gnome.org/GNOME/glib/commit/e924f777369710221c3e0a9d7bf40392a27d1fa4 See https://gitlab.gnome.org/GNOME/glib/issues/541 and https://gitlab.gnome.org/GNOME/vala/issues/879
* ccode: Implicitly register declaration for added CCodeFunctionRico Tzschichholz2019-10-011-0/+8
| | | | | This will prevent the user's vala source to override implicitly defined functions of vala's boilerblate for a type.
* build: Pass some useful G_LOG_DOMAIN definitionsRico Tzschichholz2019-04-241-0/+1
|
* ccode: Rename CCodeFeatureTestMacro to CCodeDefine and generalize itRico Tzschichholz2019-03-224-40/+34
| | | | This now serves as base for CCodeMacroReplacement too.
* codegen: Allow to associate CCodeFile to actual SourceFileRico Tzschichholz2019-02-231-0/+6
|
* ccode: Add void to delegate typedef declarations without parametersRico Tzschichholz2018-11-191-0/+3
| | | | Found with -Werror=strict-prototypes
* ccode: Don't allow more than one consecutive empty lines in generated codeRico Tzschichholz2018-11-191-0/+9
|
* ccode: Fix typo and actually check "end_decls"Rico Tzschichholz2018-10-091-1/+1
| | | | | | Note both begin_decls and end_decls must be either not null or null. Fixes https://gitlab.gnome.org/GNOME/vala/issues/672
* Use dedicated version api of libvala internally as wellRico Tzschichholz2018-08-091-1/+1
|
* ccode: Properly depend on in-tree built libvalaRico Tzschichholz2018-05-141-0/+2
|
* Drop trailing spaces/tabsRico Tzschichholz2018-03-2738-129/+129
| | | | It was about time to do this.
* codegen: Add support for feature test macrosDr. Michael Lauer2018-02-203-0/+56
| | | | | | | | | This adds new CCode string attribute 'feature_test_macro = "VALUE"'. Such values will be added before the headers section as '#define VALUE'. https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html https://bugzilla.gnome.org/show_bug.cgi?id=793444
* ccode: Don't write trailing space in function declarations/definitionsRico Tzschichholz2018-01-081-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=688447
* ccode: Replace if-else-tree with switchRico Tzschichholz2017-12-051-24/+13
|
* ccode: Reformat function declaration and definition for better readabilityRico Tzschichholz2017-11-192-1/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=688447
* gee: Add some useful symbols from gee-0.8Rico Tzschichholz2017-06-271-5/+2
|
* codegen: Fix finally blocks with async yieldsLuca Bruno2017-05-091-1/+5
| | | | | | | The Method.yield_count is not correct because in C the finally blocks may be emitted twice. https://bugzilla.gnome.org/show_bug.cgi?id=741929
* codewriter: Update timestamps of generated c-files if neededRico Tzschichholz2017-04-301-0/+8
| | | | | | | | If a changed source-file produces the same ccode we currently leave existing files untouched. Although it is better to update the modification timestamp of those to at least meet the one of associated source-file. https://bugzilla.gnome.org/show_bug.cgi?id=683286
* build: Make sure to dist all generated headersRico Tzschichholz2017-04-261-1/+1
|
* build: Use --use-header for librariesRico Tzschichholz2017-04-251-0/+1
| | | | Reduces the size of generated c-sources while avoiding redefinitions.
* build: Make ccode and codegen private APIRico Tzschichholz2017-04-141-6/+1
| | | | valac is the only consumer and will statically link these libraries.
* Move writing of G_GNUC_DEPRECATED down to CCodeDeclarator implementationsRico Tzschichholz2017-01-042-4/+4
| | | | | Doing so in CCodeDeclaration is error-prone. CCodeVariableDeclarator still requires special handling which isn't done here.
* ccodefunction: Only add G_GNUC_DEPRECATED to declarationsRico Tzschichholz2017-01-041-4/+4
|
* ccode: Fix and disable deprecating EnumValueRico Tzschichholz2016-11-111-3/+5
| | | | | This still requires GCC 6.0 and later to work. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47043
* Transform CCode*'s "deprecated" into using CCodeNode's "modifiers"Rico Tzschichholz2016-11-114-23/+6
|
* Add G_GNUC_PRINTF/SCANF attribute for Printf/ScanfFormat functionsRico Tzschichholz2016-11-093-3/+31
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=710862
* Transform CCodeParameter's "format_arg" into CCodeNode's "modifiers"Rico Tzschichholz2016-11-084-5/+4
|
* Add CCodeNode "modifiers" and transform CCodeFunction's "attributes" to itRico Tzschichholz2016-11-084-17/+22
|
* codegen: Add G_GNUC_FORMAT attribute for FormatArg function-pointersRico Tzschichholz2016-11-071-4/+11
|
* codegen: Add G_GNUC_FORMAT attribute for FormatArg functionsJürg Billeter2016-11-072-5/+14
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=774060