[vala/staging] codegen: Initialize internal temp-variables used as reference parameter
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Initialize internal temp-variables used as reference parameter
- Date: Mon, 8 Oct 2018 19:10:51 +0000 (UTC)
commit e1297d92dcb7fb0f683edee7a1e48a1947b29e9c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Oct 8 21:03:50 2018 +0200
codegen: Initialize internal temp-variables used as reference parameter
Variables for delegate-targets and array-lengths passed as reference in
method calls should be initialized to fix "make check" with -O3.
codegen/valaccodemethodcallmodule.vala | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index 0e800cba8..4c24ba969 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -515,9 +515,9 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
LocalVariable temp_var;
if (get_ccode_array_length_type (m) == null) {
- temp_var = get_temp_variable (int_type);
+ temp_var = get_temp_variable (int_type, true, null, true);
} else {
- temp_var = get_temp_variable (new CType
(get_ccode_array_length_type (m)));
+ temp_var = get_temp_variable (new CType
(get_ccode_array_length_type (m)), true, null, true);
}
var temp_ref = get_variable_cexpression (temp_var.name);
@@ -535,7 +535,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
} else if (m != null && m.return_type is DelegateType && async_call != ccall) {
var deleg_type = (DelegateType) m.return_type;
if (deleg_type.delegate_symbol.has_target) {
- var temp_var = get_temp_variable (new PointerType (new VoidType ()));
+ var temp_var = get_temp_variable (new PointerType (new VoidType ()), true,
null, true);
var temp_ref = get_variable_cexpression (temp_var.name);
emit_temp_var (temp_var);
@@ -545,7 +545,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
set_delegate_target (expr, temp_ref);
if (deleg_type.is_disposable ()) {
- temp_var = get_temp_variable (gdestroynotify_type);
+ temp_var = get_temp_variable (gdestroynotify_type, true, null, true);
temp_ref = get_variable_cexpression (temp_var.name);
emit_temp_var (temp_var);
@@ -581,7 +581,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
append_array_length (expr, len_call);
} else if (get_ccode_array_length (deleg)) {
- var temp_var = get_temp_variable (int_type);
+ var temp_var = get_temp_variable (int_type, true, null, true);
var temp_ref = get_variable_cexpression (temp_var.name);
emit_temp_var (temp_var);
@@ -596,7 +596,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
} else if (deleg != null && deleg.return_type is DelegateType) {
var deleg_type = (DelegateType) deleg.return_type;
if (deleg_type.delegate_symbol.has_target) {
- var temp_var = get_temp_variable (new PointerType (new VoidType ()));
+ var temp_var = get_temp_variable (new PointerType (new VoidType ()), true,
null, true);
var temp_ref = get_variable_cexpression (temp_var.name);
emit_temp_var (temp_var);
@@ -606,7 +606,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
set_delegate_target (expr, temp_ref);
if (deleg_type.is_disposable ()) {
- temp_var = get_temp_variable (gdestroynotify_type);
+ temp_var = get_temp_variable (gdestroynotify_type, true, null, true);
temp_ref = get_variable_cexpression (temp_var.name);
emit_temp_var (temp_var);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]