summaryrefslogtreecommitdiff
path: root/codegen/valagasyncmodule.vala
Commit message (Collapse)AuthorAgeFilesLines
* codegen: Add implicit parameter and instance checks in async methodRico Tzschichholz2020-06-091-0/+21
| | | | | | | This is already done for every non-async method and can be disabled by passing --disable-assert. See https://gitlab.gnome.org/GNOME/vala/issues/1005
* codegen: Correct field declaration for captured inline-allocated arrayRico Tzschichholz2020-03-311-2/+2
| | | | | | | Also pass proper size to memset for local temp variables of inline-allocated arrays in asynchronous context. Fixes https://gitlab.gnome.org/GNOME/vala/issues/954
* codegen: Improve handling of "array_length_type" attributeRico Tzschichholz2020-03-171-2/+2
| | | | | | This affects methods, parameters, field and properties. Fixes https://gitlab.gnome.org/GNOME/vala/issues/938
* vala: Unify "this_parameter" creation using SemanticAnalyzer.get_this_type()Rico Tzschichholz2019-11-171-1/+1
|
* codegen: Commonize the determining of return-type for delegates and methodsRico Tzschichholz2019-11-091-5/+1
|
* codegen: Make CCodeBaseModule.generate_method_declaration() return boolSimon Werbeck2019-10-091-3/+5
| | | | This is how CCodeBaseModule.generate_enum_declaration() works already.
* codegen: Follow rename of DataType data_type property to type_symbolRico Tzschichholz2019-09-301-2/+2
|
* codegen: When freeing local variables don't stop at "switch" on "continue"Rico Tzschichholz2019-05-171-1/+1
| | | | | | | So distinguish between BreakStatement and ContinueStatement to make the correct decision in append_local_free(). Fixes https://gitlab.gnome.org/GNOME/vala/issues/799
* Require and target GLib >= 2.48Rico Tzschichholz2019-03-171-77/+1
| | | | | | | The next stable release of vala will happen 3.5 years after the release of GLib 2.48.0. Fixes https://gitlab.gnome.org/GNOME/vala/issues/671
* codegen: Add get_variable_array_length_cname() and use as possibleRico Tzschichholz2019-02-241-1/+1
| | | | This also replaces get_parameter_array_length_cname()
* codegen: Use get_ccode_*name/get_parameter_cexpression() for ParametersRico Tzschichholz2019-01-151-4/+4
|
* codegen: Handle non-default AsyncResult parameter positionRico Tzschichholz2018-12-111-3/+3
| | | | | | | | | | | Unfortunately gdbus-codegen puts the AsyncResult parameter after possible out-parameters therefore there is an "async_result_pos" attribute required to handle this correctly. Vala supposely follows the common practice to put the AsyncResult before out-parameters by default. Fixes https://gitlab.gnome.org/GNOME/vala/issues/709
* codegen: Add type declarations required for generics as neededRico Tzschichholz2018-11-211-0/+2
|
* codegen: Add profile specific delegate target/destroy typesRico Tzschichholz2018-11-211-4/+4
| | | | | Make sure to use them in all delegate related contexts. This improves the support of POSIX profile.
* codegen: Remove hardcoded "int" length type and use ArrayType.length_typeGeorge Barrett2018-11-021-2/+4
| | | | https://gitlab.gnome.org/GNOME/vala/issues/607
* Collect error_types on demand to allow transformationsLuca Bruno2018-10-231-2/+2
|
* vala: Enforce "return yield ..." syntax to be expectedRico Tzschichholz2018-09-221-30/+5
| | | | | | "yield return ..." wasn't handled correctly and resulted in broken c-code. Fixes https://gitlab.gnome.org/GNOME/vala/issues/675
* codegen: Unify some delegate-type check patternsRico Tzschichholz2018-06-061-3/+1
|
* codegen: Keep arrays alive during async server method callsOle André Vadla Ravnås2018-04-141-1/+1
| | | | | | | | When calling a co-routine it is the caller's responsibility to ensure that arrays stay alive for the duration of the call. The GDBus server code emitted did not do this, resulting in use-after-free. https://bugzilla.gnome.org/show_bug.cgi?id=783002
* codegen: Fix return-type for cancelled async creation methods of classesErnestas Kulik2018-01-271-0/+1
| | | | | | | While gcc just puts out a warning clang actually fails due to -Werror=return-type. https://bugzilla.gnome.org/show_bug.cgi?id=792942
* codegen: Make the task_complete flag for < 2.44 more similar to >= 2.44Carlos Garnacho2017-06-121-6/+59
| | | | | | | | | | | | | | | | According to the g_task_get_completed() docs (which we rely on for glib >= 2.44 targets): "This changes from FALSE to TRUE after the task's callback is invoked, and will return FALSE from inside the callback". So to make the code paths most similar to >= 2.44 (when g_task_get_completed is available), wrap the GAsyncReadyCallback with one of our own, that just invokes the nested callback (if any) and turns on the flag. Also remove the code turning on the flag on finish(), it's superfluous now and there are no guarantees that it will be invoked. https://bugzilla.gnome.org/show_bug.cgi?id=783543
* Require and target GLib >= 2.40Rico Tzschichholz2017-05-171-119/+57
| | | | | | | The next stable release of vala will happen 3.5 years after the release of GLib 2.40.0. https://bugzilla.gnome.org/show_bug.cgi?id=782005
* codegen: Fix finally blocks with async yieldsLuca Bruno2017-05-091-1/+1
| | | | | | | 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
* codegen: Re-use CCodeIdentifier ("_data_")Rico Tzschichholz2016-12-141-5/+7
|
* codegen: Compensate for the lack of g_task_get_completed on glib < 2.44Carlos Garnacho2016-12-141-0/+22
| | | | | | | | | | | | | If a target glib between 2.36 and 2.44 is used, store a boolean var in the async task data, which is initialized to FALSE and set to TRUE in the async task callback, so async-forced-to-sync like the async generator example can block until the task is complete. There is one special case, if the async task receives no callback to execute, the boolean flag is set to TRUE right away, as it will be "finished" by the first time it's checked. https://bugzilla.gnome.org/show_bug.cgi?id=763345
* codegen: Use GTask instead of GSimpleAsyncResult if 2.36 target is selectedCarlos Garnacho2016-11-191-34/+127
| | | | | | | | | | | | | | | | | | | GTask brings some differences compared to GSimpleAsyncResult. Most namely, g_task_return*() operations perform at once the async result data asignment and the caller's main context activation. This is something that has to be done exactly once, so the code flow has slight changes to ensure that. Also, the async operation data used to be attached early through g_simple_async_result_set_op_res_gpointer, only to be maybe replaced by the real return data. If GTask is being used, we set this data through g_task_set_task_data(). There's code out there relying on immediate return here when state is !=0. As GTask always defers the finalization to an idle in its main context, ensure the source is dispatched and the task completed before returning. https://bugzilla.gnome.org/show_bug.cgi?id=763345
* Fix broken destruction of null-terminated arrays in async data structsRichard Wiedenhöft2016-11-071-3/+9
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=762819
* codegen: Remove support for GLib < 2.24Jürg Billeter2014-08-241-31/+1
|
* Hide internal methods in ABIMaciej Piechotka2014-03-241-0/+12
| | | | Fixes bug 700157
* Fix broken parens introduced by previous commitsLuca Bruno2013-06-051-1/+1
|
* Fix memory leak when defining async functions targeting glib < 2.20.Luca Bruno2013-06-041-1/+21
| | | | Fixes bug 684182
* Add support for Gtk widget templates. Created a new codegen gtkmodule.Luca Bruno2013-05-231-1/+1
|
* codegen: Fix g_simple_async_result_new in interface methodsJürg Billeter2012-11-111-2/+2
| | | | Fixes bug 684557.
* codegen: Fix memory management when assigning to captured parametersJürg Billeter2012-09-091-8/+0
| | | | Fixes bug 683646.
* codegen: Fix memory leak with owned delegate parameters in async methodsJürg Billeter2012-09-081-3/+12
| | | | Fixes bug 683600.
* codegen: Fix double free of captured owned parameters in async methodsJürg Billeter2012-08-151-8/+2
|
* GAsync: Support async creation methodsJürg Billeter2012-06-241-13/+123
| | | | Fixes bug 659886.
* codegen: Add support for delegate_target_cname in CCodeLuca Bruno2012-02-061-1/+1
|
* codegen: Don't copy array parameters when capturedLuca Bruno2012-01-071-8/+8
| | | | | | Also allow uncopiable compact classes to be captured. Fixes bug 639054.
* codegen: Avoid name clashes in the closure structLuca Bruno2011-10-021-1/+0
| | | | Fixes bug 596861.
* codegen: Use CCodeAttribute instead of C specific methods of code nodesLuca Bruno2011-08-011-28/+28
|
* GAsync: Support generic types in async methodsLuca Bruno2011-07-081-0/+15
| | | | Fixes bug 653861.
* codegen: Add lvalue field to GLibValueLuca Bruno2011-07-061-3/+3
|
* codegen: Replace temp_ref_vars with temp_ref_values using TargetValueLuca Bruno2011-07-061-3/+3
|
* GAsync: Push method symbol only when needed when generating async functionsLuca Bruno2011-07-061-2/+6
| | | | | Fixes possible regressions of commit 9b22a27ed5ca78b74f56df7 and commit ab011012db8f5087939514c.
* GAsync: Fix returning out parameters from async methodsLuca Bruno2011-06-281-2/+2
| | | | Fixes bug 640721.
* GAsync: Use store_parameter when generating the async functionLuca Bruno2011-06-281-19/+6
|
* codegen: Rename coroutine data variable to _data_Luca Bruno2011-06-281-9/+9
|
* codegen: Fix warning about copying delegate parameters in async methodLuca Bruno2011-06-221-2/+8
|
* GAsync: Use full result of copy_value in generate_async_functionLuca Bruno2011-05-081-15/+9
|