]>
git.ipfire.org Git - thirdparty/vala.git/log
Rico Tzschichholz [Wed, 10 Mar 2021 11:12:06 +0000 (12:12 +0100)]
codegen: Drop inner casts before converting between generics and integers
Found by -Wpointer-to-int-cast
Rico Tzschichholz [Tue, 9 Mar 2021 14:52:30 +0000 (15:52 +0100)]
codegen: Don't add generics arguments/parameters to async finish method
Rico Tzschichholz [Tue, 9 Mar 2021 14:52:30 +0000 (15:52 +0100)]
codegen: Don't ever create null-aware free macro for GenericType
Rico Tzschichholz [Tue, 9 Mar 2021 14:52:30 +0000 (15:52 +0100)]
tests: Add "string concat" test for POSIX to increase coverage
Rico Tzschichholz [Tue, 9 Mar 2021 08:51:21 +0000 (09:51 +0100)]
codegen: Fix access to captured generics in async method of interfaces
Fixes https://gitlab.gnome.org/GNOME/vala/issues/537
Rico Tzschichholz [Tue, 9 Mar 2021 06:59:25 +0000 (07:59 +0100)]
codegen: Use the one available source_reference for internal error
This will at least provide some pointer to where things are going wrong.
In addition to
837d593e00d1a3ca8a6f2d13fb1514bed7672965
See https://gitlab.gnome.org/GNOME/vala/issues/436
Rico Tzschichholz [Tue, 9 Mar 2021 06:24:48 +0000 (07:24 +0100)]
codegen: Free intermediate temp-variables of postcondition expression
and not clearing "temp_ref_values" caused invalid references later.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/80
Rico Tzschichholz [Sun, 7 Mar 2021 16:19:01 +0000 (17:19 +0100)]
codegen: Report error for missing type-arguments of HashTable (de)serialization
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1147
Rico Tzschichholz [Sun, 7 Mar 2021 12:42:16 +0000 (13:42 +0100)]
vala: Check (optional) type-arguments of array creation expression
Rico Tzschichholz [Sun, 7 Mar 2021 13:20:43 +0000 (14:20 +0100)]
vala: Check array type of declarations for errornous type-arguments
Rico Tzschichholz [Sun, 7 Mar 2021 12:42:16 +0000 (13:42 +0100)]
vala: Move type-argument/-parameter count check to DataType.check_type_arguments()
Rico Tzschichholz [Sun, 7 Mar 2021 12:42:16 +0000 (13:42 +0100)]
gio-2.0: Add some missing type-arguments
Rico Tzschichholz [Sun, 7 Mar 2021 12:42:16 +0000 (13:42 +0100)]
glib-2.0: Add some missing type-arguments
Rico Tzschichholz [Sun, 7 Mar 2021 12:42:16 +0000 (13:42 +0100)]
vala: Add missing null-check in DataType.get_type_signature()
If an instance struct field can not be resolved to a valid
type-signature then bail.
This fixes criticals like:
g_string_insert_len: assertion 'len == 0 || val != NULL' failed
Rico Tzschichholz [Sat, 6 Mar 2021 15:49:49 +0000 (16:49 +0100)]
Release 0.51.90
Rico Tzschichholz [Sat, 6 Mar 2021 13:06:10 +0000 (14:06 +0100)]
gdbus: Don't leak memory of deserialized arguments on error in wrapper method
Found by -fsanitize=address
Rico Tzschichholz [Sat, 6 Mar 2021 11:38:01 +0000 (12:38 +0100)]
gtk4: Update to 4.1.1+
f8f90d85
Rico Tzschichholz [Sat, 6 Mar 2021 08:46:32 +0000 (09:46 +0100)]
vala: Fix ownership inheritance of "unowned var" in foreach statement
Rico Tzschichholz [Fri, 5 Mar 2021 18:32:38 +0000 (19:32 +0100)]
tests: Add more "gir" tests to increase coverage
Rico Tzschichholz [Fri, 5 Mar 2021 18:32:38 +0000 (19:32 +0100)]
testrunner: Include Gio-2.0/gio-2.0 for GIR tests too
Rico Tzschichholz [Fri, 5 Mar 2021 18:32:38 +0000 (19:32 +0100)]
Use pre-resolved symbol/type of SemanticAnalyzer if possible
Rico Tzschichholz [Fri, 5 Mar 2021 18:32:38 +0000 (19:32 +0100)]
codegen: More use of get_ccode_type_name()
Rico Tzschichholz [Fri, 5 Mar 2021 12:47:28 +0000 (13:47 +0100)]
codegen: Inherit GType from base struct of SimpleType structs
GValue functions and marshaller type are inherited from base structs
already.
This avoids invalid C code which referenced an unavailable GType.
Rico Tzschichholz [Thu, 4 Mar 2021 18:12:15 +0000 (19:12 +0100)]
tests: Add more "gir" tests to increase coverage
Rico Tzschichholz [Thu, 4 Mar 2021 18:12:15 +0000 (19:12 +0100)]
Regenerate GIR-based bindings to pick up missing class methods
Rico Tzschichholz [Thu, 4 Mar 2021 18:12:15 +0000 (19:12 +0100)]
girparser: Evaluate "glib:type-struct" twice to pick up reparented structs
Rico Tzschichholz [Tue, 2 Mar 2021 16:55:25 +0000 (17:55 +0100)]
codegen: "_first_array" parameter for params-array is variadic too
Not following this resulted in mismatching signature assumptions between
caller and callee if the callable throws an error.
Rico Tzschichholz [Wed, 3 Mar 2021 16:59:54 +0000 (17:59 +0100)]
tests: Extend "pre-post increment" test to increase coverage
Rico Tzschichholz [Wed, 3 Mar 2021 15:06:34 +0000 (16:06 +0100)]
tests: Add "target-glib=auto" tests to increase coverage
Rico Tzschichholz [Wed, 3 Mar 2021 15:06:34 +0000 (16:06 +0100)]
tests: Add some tests to increase coverage
Rico Tzschichholz [Wed, 3 Mar 2021 16:37:04 +0000 (17:37 +0100)]
vala: Fix build with valac < 0.44
Rico Tzschichholz [Wed, 3 Mar 2021 16:01:41 +0000 (17:01 +0100)]
vala: Report warning if --target-glib=auto was not evaluated successfully
and don't try to process the valid "auto" string any further.
Rico Tzschichholz [Wed, 3 Mar 2021 09:05:00 +0000 (10:05 +0100)]
codegen: More use of get_ccode_type_name()
Rico Tzschichholz [Wed, 3 Mar 2021 09:05:00 +0000 (10:05 +0100)]
Regenerate GIR-based bindings to pick up missing type_cname attributes
Rico Tzschichholz [Wed, 3 Mar 2021 09:05:00 +0000 (10:05 +0100)]
girparser: Reuse populated Node.gtype_struct_for instead of resolving again
This fixes the discovery of non-default type_cname for re-parented symbols.
Rico Tzschichholz [Sat, 27 Feb 2021 16:04:50 +0000 (17:04 +0100)]
Release 0.51.3
Rico Tzschichholz [Sat, 27 Feb 2021 16:04:50 +0000 (17:04 +0100)]
vapi: Update GIR-based bindings
Rico Tzschichholz [Sat, 27 Feb 2021 16:04:50 +0000 (17:04 +0100)]
glib-2.0: Add new symbols from 2.68
Rico Tzschichholz [Sat, 27 Feb 2021 16:04:50 +0000 (17:04 +0100)]
webkit2gtk-4.0: Update to 2.31.90
Rico Tzschichholz [Sat, 27 Feb 2021 11:23:56 +0000 (12:23 +0100)]
tests: Add some "unary expressions" tests to increase coverage
Rico Tzschichholz [Sat, 27 Feb 2021 11:23:56 +0000 (12:23 +0100)]
vala: Report error for invalid inner operand of unary expressions
This fixes criticals like:
vala_unary_expression_is_integer_type: assertion 'type != NULL' failed
Rico Tzschichholz [Sat, 27 Feb 2021 09:34:54 +0000 (10:34 +0100)]
vala: Set proper source_reference for implicit "this" and "result" variables
Rico Tzschichholz [Sat, 27 Feb 2021 09:34:54 +0000 (10:34 +0100)]
tests: Add more "unsupported creation method" tests to increase coverage
Rico Tzschichholz [Fri, 26 Feb 2021 18:19:54 +0000 (19:19 +0100)]
vala: Include "stdlib.h" for Enum.to_string() (POSIX)
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1143
Rico Tzschichholz [Fri, 26 Feb 2021 18:19:54 +0000 (19:19 +0100)]
codegen: Include "string.h" for strcmp() (POSIX)
Rico Tzschichholz [Fri, 26 Feb 2021 14:55:09 +0000 (15:55 +0100)]
vala: Improve context check whether property is writeable on assignments
Rico Tzschichholz [Wed, 24 Feb 2021 08:58:43 +0000 (09:58 +0100)]
codegen: Don't wrongly emit declaration for default-handler of signals
This is done in GTypeModule.generate_interface_declaration()
Rico Tzschichholz [Mon, 22 Feb 2021 11:12:29 +0000 (12:12 +0100)]
vapi: Update GIR-based bindings
Rico Tzschichholz [Sun, 21 Feb 2021 18:34:48 +0000 (19:34 +0100)]
tests: Add more "girparser" tests to increase coverage
Rico Tzschichholz [Sun, 21 Feb 2021 09:40:25 +0000 (10:40 +0100)]
vala: Don't allow "in" operation with different enum types
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1139
Rico Tzschichholz [Sun, 21 Feb 2021 09:40:25 +0000 (10:40 +0100)]
vala: Infer needle type for "in" expression on enum
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1138
Rico Tzschichholz [Sat, 20 Feb 2021 19:04:08 +0000 (20:04 +0100)]
tests/girwriter: Increase coverage
Rico Tzschichholz [Sat, 20 Feb 2021 19:04:08 +0000 (20:04 +0100)]
girwriter: Output default handler of signals
Rico Tzschichholz [Fri, 19 Feb 2021 15:29:24 +0000 (16:29 +0100)]
codegen: CCodeBaseModule.get_type_id_expression () won't return null
Rico Tzschichholz [Fri, 19 Feb 2021 13:22:20 +0000 (14:22 +0100)]
vala: Generics value holding struct pointer requires casting on access
Fixes https://gitlab.gnome.org/GNOME/vala/issues/347
Rico Tzschichholz [Fri, 19 Feb 2021 13:22:20 +0000 (14:22 +0100)]
codegen: Don't use volatile modifier in glib API when targetting >= 2.68
See https://gitlab.gnome.org/GNOME/glib/merge_requests/1719
Rico Tzschichholz [Thu, 18 Feb 2021 09:27:57 +0000 (10:27 +0100)]
Release 0.51.2
Rico Tzschichholz [Tue, 16 Feb 2021 21:42:00 +0000 (22:42 +0100)]
vala: Properly parse and handle chained initialization of members
Make MemberInitializer an Expression, so it is possible to descibe
nested/chained member initializers in the AST.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1137
Rico Tzschichholz [Tue, 16 Feb 2021 21:42:00 +0000 (22:42 +0100)]
vala: Move SemanticAnalyzer.vist_member_initializer() to MemberInitializer
Rico Tzschichholz [Tue, 16 Feb 2021 21:42:00 +0000 (22:42 +0100)]
vala: Simplify Expression.parent_statement
Rico Tzschichholz [Tue, 16 Feb 2021 21:42:00 +0000 (22:42 +0100)]
codegen: Report error for unsupported symbol_reference of MemberInitializer
Rico Tzschichholz [Tue, 16 Feb 2021 09:33:06 +0000 (10:33 +0100)]
vala: Capturing va_list parameters/variables is not allowed
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1136
Rico Tzschichholz [Tue, 16 Feb 2021 09:33:06 +0000 (10:33 +0100)]
codewriter: Don't write trailing ";" after body of WithStatement
Rico Tzschichholz [Tue, 16 Feb 2021 09:33:06 +0000 (10:33 +0100)]
codewriter: Output valid vala syntax for LoopStatement
Rico Tzschichholz [Mon, 15 Feb 2021 12:34:46 +0000 (13:34 +0100)]
vapi: Update GIR-based bindings
Rico Tzschichholz [Mon, 15 Feb 2021 12:33:27 +0000 (13:33 +0100)]
gstreamer: Update from 1.19.0+ git master
Rico Tzschichholz [Sat, 13 Feb 2021 18:34:12 +0000 (19:34 +0100)]
vala: Include type-checks in preconditions of methods for type narrowing
See https://gitlab.gnome.org/GNOME/vala/issues/894
Rico Tzschichholz [Sat, 13 Feb 2021 13:47:03 +0000 (14:47 +0100)]
vala: Check type-arguments in base-types/prerequisites of class/interface
Fixes https://gitlab.gnome.org/GNOME/vala/issues/404
Rico Tzschichholz [Fri, 12 Feb 2021 20:39:08 +0000 (21:39 +0100)]
Release 0.51.1
Rico Tzschichholz [Mon, 25 Jan 2021 12:46:45 +0000 (13:46 +0100)]
sdl2: Fix a couple of binding errors and attribute issues
Rico Tzschichholz [Mon, 8 Feb 2021 08:27:31 +0000 (09:27 +0100)]
codegen: Include <string.h> for memcpy usage in _vala_memdup2()
Rico Tzschichholz [Sun, 7 Feb 2021 18:04:56 +0000 (19:04 +0100)]
codegen: Strip all nested occurances of CCodeCastExpression
Triggered by
63551acaf0d83fac8b50904c2759c1098fbfaa71
See https://gitlab.gnome.org/GNOME/vala/issues/1134
Rico Tzschichholz [Sun, 7 Feb 2021 09:02:10 +0000 (10:02 +0100)]
build: Ease source for AC_LANG_SOURCE of CGRAPH check
Rico Tzschichholz [Sun, 7 Feb 2021 10:02:02 +0000 (11:02 +0100)]
libvaladoc: Add wrapper for "agedge" of graphviz
Rico Tzschichholz [Sun, 7 Feb 2021 07:57:39 +0000 (08:57 +0100)]
codegen: Correctly retrieve symbol_reference of nested cast expressions
Regression of
63551acaf0d83fac8b50904c2759c1098fbfaa71
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1134
Rico Tzschichholz [Mon, 1 Feb 2021 16:22:48 +0000 (17:22 +0100)]
vapi: Add libunwind-generic binding
Rico Tzschichholz [Sat, 6 Feb 2021 16:40:23 +0000 (17:40 +0100)]
gio-2.0: Update to 2.67.3
Rico Tzschichholz [Sat, 6 Feb 2021 16:39:24 +0000 (17:39 +0100)]
gtk4: Update to 4.1.0+
2712f536
Rico Tzschichholz [Sat, 6 Feb 2021 16:38:51 +0000 (17:38 +0100)]
gstreamer: Update from 1.19.0+ git master
Rico Tzschichholz [Fri, 5 Feb 2021 15:14:45 +0000 (16:14 +0100)]
gee: Replace Memory.dup() with GLib.malloc() and Memory.copy()
Rico Tzschichholz [Fri, 5 Feb 2021 06:51:34 +0000 (07:51 +0100)]
gstreamer-1.0: Set CCode.type_id of MiniObject to G_TYPE_BOXED
Fixed https://gitlab.gnome.org/GNOME/vala/issues/1133
Rico Tzschichholz [Thu, 4 Feb 2021 20:07:17 +0000 (21:07 +0100)]
codegen: Replace "g_memdup" with "_vala_memdup2" for target glib < 2.68
"_vala_memdup2" is a copy of "g_memdup2" available in glib >= 2.68
Rico Tzschichholz [Thu, 4 Feb 2021 19:00:14 +0000 (20:00 +0100)]
glib-2.0: Add new symbols from 2.68
Rico Tzschichholz [Thu, 4 Feb 2021 18:22:07 +0000 (19:22 +0100)]
codegen: Use g_memdup2 if target glib >= 2.68 is set
See https://gitlab.gnome.org/GNOME/glib/issues/2319
Rico Tzschichholz [Thu, 4 Feb 2021 14:53:55 +0000 (15:53 +0100)]
testrunner: Add "-Werror=return-stack-address" flag
Rico Tzschichholz [Thu, 4 Feb 2021 14:53:55 +0000 (15:53 +0100)]
vala: Add Block.unreachable_exit and have it set accordingly by FlowAnalyzer
Use this control flow information in codegen rather than doing an
educated guess based on occurring ReturnStatement nodes.
See https://gitlab.gnome.org/GNOME/vala/issues/838
Rico Tzschichholz [Thu, 4 Feb 2021 09:55:31 +0000 (10:55 +0100)]
tests: Don't leak array if length is -1
Found by -fsanitize=address
Rico Tzschichholz [Thu, 4 Feb 2021 09:55:31 +0000 (10:55 +0100)]
codegen: Chain up to base struct destroy function
Found by -fsanitize=address
Rico Tzschichholz [Wed, 3 Feb 2021 22:16:41 +0000 (23:16 +0100)]
codegen: Don't leak memory moving heap-allocated struct to stack
Found by -fsanitize=address
Rico Tzschichholz [Wed, 3 Feb 2021 22:16:41 +0000 (23:16 +0100)]
codegen: Use temp_ref_values list instead of patching the AST
Simplyfies
5328619a8141aa11341d479428ebfdcec0ff9756
Rico Tzschichholz [Wed, 3 Feb 2021 12:40:23 +0000 (13:40 +0100)]
codegen: Don't leak GLib.Value when implicitly unboxing it
Found by -fsanitize=address
Rico Tzschichholz [Wed, 3 Feb 2021 12:40:23 +0000 (13:40 +0100)]
vala: Don't allow GLib.Value casting to nullable struct/simple types
Rico Tzschichholz [Wed, 3 Feb 2021 12:40:23 +0000 (13:40 +0100)]
vala: GLib.Value unboxing returns unowned value
Rico Tzschichholz [Wed, 3 Feb 2021 12:40:23 +0000 (13:40 +0100)]
codegen: Use g_boxed_free in free-wrapper for heap-allocated GLib.Value
dup-wrapper is specifically using g_boxed_copy already
Rico Tzschichholz [Tue, 2 Feb 2021 09:34:54 +0000 (10:34 +0100)]
codegen: Don't leak array memory after it was implicitly copied
Found by -fsanitize=address
Rico Tzschichholz [Mon, 1 Feb 2021 16:34:15 +0000 (17:34 +0100)]
codegen: Improve handling of recursive DelegateType
Move dedicated test case into a separate file
Rico Tzschichholz [Mon, 1 Feb 2021 16:34:15 +0000 (17:34 +0100)]
codegen: Make sure types of implicit delegate parameters are declared
Rico Tzschichholz [Mon, 1 Feb 2021 13:54:55 +0000 (14:54 +0100)]
codegen: Use CCodeDeclaratorSuffix to emit array length of constants
Rico Tzschichholz [Mon, 1 Feb 2021 13:54:55 +0000 (14:54 +0100)]
ccode: Minor API cleaning and additions
Rico Tzschichholz [Tue, 9 Jan 2018 15:21:06 +0000 (16:21 +0100)]
vala: Rename Loop to LoopStatement and introduce a common base class