[vala] Rename FormalParameter to Parameter
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Rename FormalParameter to Parameter
- Date: Fri, 29 Oct 2010 07:38:24 +0000 (UTC)
commit e81776c024ab1e72b918612e49606f8500aaad06
Author: Jürg Billeter <j bitron ch>
Date: Thu Oct 28 13:07:01 2010 +0200
Rename FormalParameter to Parameter
ccode/Makefile.am | 2 +-
ccode/valaccodefunction.vala | 10 +-
ccode/valaccodefunctiondeclarator.vala | 6 +-
...ormalparameter.vala => valaccodeparameter.vala} | 8 +-
codegen/valaccodearraymodule.vala | 56 ++--
codegen/valaccodebasemodule.vala | 120 +++++-----
codegen/valaccodedelegatemodule.vala | 46 ++--
codegen/valaccodememberaccessmodule.vala | 4 +-
codegen/valaccodemethodcallmodule.vala | 14 +-
codegen/valaccodemethodmodule.vala | 74 +++---
codegen/valaccodestructmodule.vala | 20 +-
codegen/valadbusclientmodule.vala | 136 +++++-----
codegen/valadbusmodule.vala | 22 +-
codegen/valadbusservermodule.vala | 64 +++---
codegen/valadovabasemodule.vala | 26 +-
codegen/valadovadelegatemodule.vala | 16 +-
codegen/valadovamemberaccessmodule.vala | 4 +-
codegen/valadovamethodcallmodule.vala | 4 +-
codegen/valadovaobjectmodule.vala | 266 ++++++++++----------
codegen/valadovavaluemodule.vala | 42 ++--
codegen/valagasyncmodule.vala | 58 +++---
codegen/valagdbusclientmodule.vala | 56 ++--
codegen/valagdbusmodule.vala | 2 +-
codegen/valagdbusservermodule.vala | 114 +++++-----
codegen/valagirwriter.vala | 6 +-
codegen/valagobjectmodule.vala | 44 ++--
codegen/valagsignalmodule.vala | 46 ++--
codegen/valagtypemodule.vala | 132 +++++-----
codegen/valagvariantmodule.vala | 8 +-
codegen/valatyperegisterfunction.vala | 2 +-
vala/Makefile.am | 2 +-
vala/valaarraytype.vala | 8 +-
vala/valaassignment.vala | 4 +-
vala/valaclass.vala | 6 +-
vala/valacodevisitor.vala | 2 +-
vala/valacodewriter.vala | 4 +-
vala/valaconstructor.vala | 4 +-
vala/valacreationmethod.vala | 4 +-
vala/valadatatype.vala | 2 +-
vala/valadelegate.vala | 16 +-
vala/valadelegatetype.vala | 2 +-
vala/valadestructor.vala | 2 +-
vala/valaenum.vala | 2 +-
vala/valaerrordomain.vala | 2 +-
vala/valagenieparser.vala | 20 +-
vala/valagirparser.vala | 12 +-
vala/valainterface.vala | 4 +-
vala/valalambdaexpression.vala | 6 +-
vala/valamemberaccess.vala | 8 +-
vala/valamethod.vala | 32 ++--
vala/valamethodcall.vala | 10 +-
vala/valamethodtype.vala | 4 +-
vala/valaobjectcreationexpression.vala | 2 +-
vala/valaobjecttype.vala | 2 +-
vala/valaobjecttypesymbol.vala | 2 +-
...valaformalparameter.vala => valaparameter.vala} | 14 +-
vala/valaparser.vala | 6 +-
vala/valaproperty.vala | 2 +-
vala/valapropertyaccessor.vala | 4 +-
vala/valasemanticanalyzer.vala | 8 +-
vala/valasignal.vala | 14 +-
vala/valasignaltype.vala | 8 +-
vala/valastruct.vala | 4 +-
vala/valastructvaluetype.vala | 2 +-
vala/valasymbolresolver.vala | 2 +-
vala/valaunaryexpression.vala | 2 +-
vapigen/valagidlparser.vala | 10 +-
67 files changed, 823 insertions(+), 823 deletions(-)
---
diff --git a/ccode/Makefile.am b/ccode/Makefile.am
index 9d54a09..c63dd06 100644
--- a/ccode/Makefile.am
+++ b/ccode/Makefile.am
@@ -33,7 +33,6 @@ libvalaccode_la_VALASOURCES = \
valaccodeexpression.vala \
valaccodeexpressionstatement.vala \
valaccodefile.vala \
- valaccodeformalparameter.vala \
valaccodeforstatement.vala \
valaccodefragment.vala \
valaccodefunction.vala \
@@ -53,6 +52,7 @@ libvalaccode_la_VALASOURCES = \
valaccodenewline.vala \
valaccodenode.vala \
valaccodeoncesection.vala \
+ valaccodeparameter.vala \
valaccodeparenthesizedexpression.vala \
valaccodereturnstatement.vala \
valaccodestatement.vala \
diff --git a/ccode/valaccodefunction.vala b/ccode/valaccodefunction.vala
index 9f0abe5..20725ee 100644
--- a/ccode/valaccodefunction.vala
+++ b/ccode/valaccodefunction.vala
@@ -50,7 +50,7 @@ public class Vala.CCodeFunction : CCodeNode {
*/
public CCodeBlock block { get; set; }
- private List<CCodeFormalParameter> parameters = new ArrayList<CCodeFormalParameter> ();
+ private List<CCodeParameter> parameters = new ArrayList<CCodeParameter> ();
CCodeBlock current_block;
List<CCodeStatement> statement_stack = new ArrayList<CCodeStatement> ();
@@ -67,11 +67,11 @@ public class Vala.CCodeFunction : CCodeNode {
*
* @param param a formal parameter
*/
- public void add_parameter (CCodeFormalParameter param) {
+ public void add_parameter (CCodeParameter param) {
parameters.add (param);
}
- public void insert_parameter (int position, CCodeFormalParameter param) {
+ public void insert_parameter (int position, CCodeParameter param) {
parameters.insert (position, param);
}
@@ -88,7 +88,7 @@ public class Vala.CCodeFunction : CCodeNode {
/* no deep copy for lists available yet
* func.parameters = parameters.copy ();
*/
- foreach (CCodeFormalParameter param in parameters) {
+ foreach (CCodeParameter param in parameters) {
func.parameters.add (param);
}
@@ -111,7 +111,7 @@ public class Vala.CCodeFunction : CCodeNode {
writer.write_string (" (");
bool first = true;
- foreach (CCodeFormalParameter param in parameters) {
+ foreach (CCodeParameter param in parameters) {
if (!first) {
writer.write_string (", ");
} else {
diff --git a/ccode/valaccodefunctiondeclarator.vala b/ccode/valaccodefunctiondeclarator.vala
index 35a3590..fc59aa8 100644
--- a/ccode/valaccodefunctiondeclarator.vala
+++ b/ccode/valaccodefunctiondeclarator.vala
@@ -31,7 +31,7 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
*/
public string name { get; set; }
- private List<CCodeFormalParameter> parameters = new ArrayList<CCodeFormalParameter> ();
+ private List<CCodeParameter> parameters = new ArrayList<CCodeParameter> ();
public CCodeFunctionDeclarator (string name) {
this.name = name;
@@ -42,7 +42,7 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
*
* @param param a formal parameter
*/
- public void add_parameter (CCodeFormalParameter param) {
+ public void add_parameter (CCodeParameter param) {
parameters.add (param);
}
@@ -56,7 +56,7 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
writer.write_string (") (");
bool first = true;
- foreach (CCodeFormalParameter param in parameters) {
+ foreach (CCodeParameter param in parameters) {
if (!first) {
writer.write_string (", ");
} else {
diff --git a/ccode/valaccodeformalparameter.vala b/ccode/valaccodeparameter.vala
similarity index 88%
rename from ccode/valaccodeformalparameter.vala
rename to ccode/valaccodeparameter.vala
index f5ce710..9f1c2e1 100644
--- a/ccode/valaccodeformalparameter.vala
+++ b/ccode/valaccodeparameter.vala
@@ -1,4 +1,4 @@
-/* valaccodeformalparameter.vala
+/* valaccodeparameter.vala
*
* Copyright (C) 2006-2008 Jürg Billeter
*
@@ -25,7 +25,7 @@ using GLib;
/**
* Represents a formal parameter in a C method signature.
*/
-public class Vala.CCodeFormalParameter : CCodeNode {
+public class Vala.CCodeParameter : CCodeNode {
/**
* The parameter name.
*/
@@ -42,12 +42,12 @@ public class Vala.CCodeFormalParameter : CCodeNode {
*/
public bool ellipsis { get; set; }
- public CCodeFormalParameter (string n, string type) {
+ public CCodeParameter (string n, string type) {
name = n;
type_name = type;
}
- public CCodeFormalParameter.with_ellipsis () {
+ public CCodeParameter.with_ellipsis () {
ellipsis = true;
}
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala
index 8e1af80..c85d2dd 100644
--- a/codegen/valaccodearraymodule.vala
+++ b/codegen/valaccodearraymodule.vala
@@ -126,7 +126,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
return "%s_length%d".printf (array_cname, dim);
}
- public override string get_parameter_array_length_cname (FormalParameter param, int dim) {
+ public override string get_parameter_array_length_cname (Parameter param, int dim) {
if (param.has_array_length_cname) {
return param.get_array_length_cname ();
} else {
@@ -257,8 +257,8 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
var fun = new CCodeFunction (cname, "void");
fun.modifiers = CCodeModifiers.STATIC;
- fun.add_parameter (new CCodeFormalParameter ("array", "%s*".printf (st.get_cname ())));
- fun.add_parameter (new CCodeFormalParameter ("array_length", "gint"));
+ fun.add_parameter (new CCodeParameter ("array", "%s*".printf (st.get_cname ())));
+ fun.add_parameter (new CCodeParameter ("array_length", "gint"));
push_function (fun);
@@ -306,9 +306,9 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
var fun = new CCodeFunction ("_vala_array_destroy", "void");
fun.modifiers = CCodeModifiers.STATIC;
- fun.add_parameter (new CCodeFormalParameter ("array", "gpointer"));
- fun.add_parameter (new CCodeFormalParameter ("array_length", "gint"));
- fun.add_parameter (new CCodeFormalParameter ("destroy_func", "GDestroyNotify"));
+ fun.add_parameter (new CCodeParameter ("array", "gpointer"));
+ fun.add_parameter (new CCodeParameter ("array_length", "gint"));
+ fun.add_parameter (new CCodeParameter ("destroy_func", "GDestroyNotify"));
push_function (fun);
@@ -330,9 +330,9 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
fun = new CCodeFunction ("_vala_array_free", "void");
fun.modifiers = CCodeModifiers.STATIC;
- fun.add_parameter (new CCodeFormalParameter ("array", "gpointer"));
- fun.add_parameter (new CCodeFormalParameter ("array_length", "gint"));
- fun.add_parameter (new CCodeFormalParameter ("destroy_func", "GDestroyNotify"));
+ fun.add_parameter (new CCodeParameter ("array", "gpointer"));
+ fun.add_parameter (new CCodeParameter ("array_length", "gint"));
+ fun.add_parameter (new CCodeParameter ("destroy_func", "GDestroyNotify"));
push_function (fun);
@@ -360,11 +360,11 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
// FIXME will leak memory if that's not the case
var fun = new CCodeFunction ("_vala_array_move", "void");
fun.modifiers = CCodeModifiers.STATIC;
- fun.add_parameter (new CCodeFormalParameter ("array", "gpointer"));
- fun.add_parameter (new CCodeFormalParameter ("element_size", "gsize"));
- fun.add_parameter (new CCodeFormalParameter ("src", "gint"));
- fun.add_parameter (new CCodeFormalParameter ("dest", "gint"));
- fun.add_parameter (new CCodeFormalParameter ("length", "gint"));
+ fun.add_parameter (new CCodeParameter ("array", "gpointer"));
+ fun.add_parameter (new CCodeParameter ("element_size", "gsize"));
+ fun.add_parameter (new CCodeParameter ("src", "gint"));
+ fun.add_parameter (new CCodeParameter ("dest", "gint"));
+ fun.add_parameter (new CCodeParameter ("length", "gint"));
push_function (fun);
@@ -410,7 +410,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
public override void append_vala_array_length () {
var fun = new CCodeFunction ("_vala_array_length", "gint");
fun.modifiers = CCodeModifiers.STATIC;
- fun.add_parameter (new CCodeFormalParameter ("array", "gpointer"));
+ fun.add_parameter (new CCodeParameter ("array", "gpointer"));
push_function (fun);
@@ -514,13 +514,13 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
var function = new CCodeFunction (dup_func, array_type.get_cname ());
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", array_type.get_cname ()));
+ function.add_parameter (new CCodeParameter ("self", array_type.get_cname ()));
// total length over all dimensions
- function.add_parameter (new CCodeFormalParameter ("length", "int"));
+ function.add_parameter (new CCodeParameter ("length", "int"));
if (array_type.element_type is GenericType) {
// dup function array elements
string func_name = "%s_dup_func".printf (array_type.element_type.type_parameter.name.down ());
- function.add_parameter (new CCodeFormalParameter (func_name, "GBoxedCopyFunc"));
+ function.add_parameter (new CCodeParameter (func_name, "GBoxedCopyFunc"));
}
// definition
@@ -587,8 +587,8 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
var function = new CCodeFunction (dup_func, "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", array_type.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("dest", array_type.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", array_type.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("dest", array_type.get_cname () + "*"));
// definition
@@ -639,9 +639,9 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
var function = new CCodeFunction (add_func, "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("array", array_type.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("length", "int*"));
- function.add_parameter (new CCodeFormalParameter ("size", "int*"));
+ function.add_parameter (new CCodeParameter ("array", array_type.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("length", "int*"));
+ function.add_parameter (new CCodeParameter ("size", "int*"));
push_function (function);
@@ -656,7 +656,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
value = new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, value);
}
}
- function.add_parameter (new CCodeFormalParameter ("value", typename));
+ function.add_parameter (new CCodeParameter ("value", typename));
var array = new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, new CCodeIdentifier ("array"));
var length = new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, new CCodeIdentifier ("length"));
@@ -728,7 +728,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
return;
}
- var value_param = new FormalParameter ("value", element.target_type);
+ var value_param = new Parameter ("value", element.target_type);
var ccall = new CCodeFunctionCall (new CCodeIdentifier (generate_array_add_wrapper (array_type)));
ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_cvalue (array)));
@@ -739,7 +739,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
set_cvalue (assignment, ccall);
}
- public override CCodeFormalParameter generate_parameter (FormalParameter param, CCodeFile decl_space, Map<int,CCodeFormalParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
+ public override CCodeParameter generate_parameter (Parameter param, CCodeFile decl_space, Map<int,CCodeParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
if (!(param.variable_type is ArrayType)) {
return base.generate_parameter (param, decl_space, cparam_map, carg_map);
}
@@ -750,7 +750,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
ctypename += "*";
}
- var main_cparam = new CCodeFormalParameter (get_variable_cname (param.name), ctypename);
+ var main_cparam = new CCodeParameter (get_variable_cname (param.name), ctypename);
var array_type = (ArrayType) param.variable_type;
@@ -771,7 +771,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
}
for (int dim = 1; dim <= array_type.rank; dim++) {
- var cparam = new CCodeFormalParameter (get_parameter_array_length_cname (param, dim), length_ctype);
+ var cparam = new CCodeParameter (get_parameter_array_length_cname (param, dim), length_ctype);
cparam_map.set (get_param_pos (param.carray_length_parameter_position + 0.01 * dim), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (param.carray_length_parameter_position + 0.01 * dim), get_variable_cexpression (cparam.name));
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 845293e..26437d2 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -409,7 +409,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
regex_type = new ObjectType ((Class) root_symbol.scope.lookup ("GLib").scope.lookup ("Regex"));
if (context.module_init_method != null) {
- foreach (FormalParameter parameter in context.module_init_method.get_parameters ()) {
+ foreach (Parameter parameter in context.module_init_method.get_parameters ()) {
if (parameter.variable_type.data_type == type_module_type) {
in_plugin = true;
module_init_param_name = parameter.name;
@@ -1233,7 +1233,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
return false;
}
- public override void visit_formal_parameter (FormalParameter p) {
+ public override void visit_formal_parameter (Parameter p) {
if (!p.ellipsis) {
check_type (p.variable_type);
}
@@ -1297,7 +1297,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
public virtual void generate_delegate_declaration (Delegate d, CCodeFile decl_space) {
}
- public virtual void generate_cparameters (Method m, CCodeFile decl_space, Map<int,CCodeFormalParameter> cparam_map, CCodeFunction func, CCodeFunctionDeclarator? vdeclarator = null, Map<int,CCodeExpression>? carg_map = null, CCodeFunctionCall? vcall = null, int direction = 3) {
+ public virtual void generate_cparameters (Method m, CCodeFile decl_space, Map<int,CCodeParameter> cparam_map, CCodeFunction func, CCodeFunctionDeclarator? vdeclarator = null, Map<int,CCodeExpression>? carg_map = null, CCodeFunctionCall? vcall = null, int direction = 3) {
}
public void generate_property_accessor_declaration (PropertyAccessor acc, CCodeFile decl_space) {
@@ -1310,13 +1310,13 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
bool returns_real_struct = acc.readable && prop.property_type.is_real_non_null_struct_type ();
- CCodeFormalParameter cvalueparam;
+ CCodeParameter cvalueparam;
if (returns_real_struct) {
- cvalueparam = new CCodeFormalParameter ("result", acc.value_type.get_cname () + "*");
+ cvalueparam = new CCodeParameter ("result", acc.value_type.get_cname () + "*");
} else if (!acc.readable && prop.property_type.is_real_non_null_struct_type ()) {
- cvalueparam = new CCodeFormalParameter ("value", acc.value_type.get_cname () + "*");
+ cvalueparam = new CCodeParameter ("value", acc.value_type.get_cname () + "*");
} else {
- cvalueparam = new CCodeFormalParameter ("value", acc.value_type.get_cname ());
+ cvalueparam = new CCodeParameter ("value", acc.value_type.get_cname ());
}
generate_type_declaration (acc.value_type, decl_space);
@@ -1331,7 +1331,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var t = (TypeSymbol) prop.parent_symbol;
var this_type = get_data_type_for_symbol (t);
generate_type_declaration (this_type, decl_space);
- var cselfparam = new CCodeFormalParameter ("self", this_type.get_cname ());
+ var cselfparam = new CCodeParameter ("self", this_type.get_cname ());
if (t is Struct) {
cselfparam.type_name += "*";
}
@@ -1352,10 +1352,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
}
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeFormalParameter (get_array_length_cname (acc.readable ? "result" : "value", dim), length_ctype));
+ function.add_parameter (new CCodeParameter (get_array_length_cname (acc.readable ? "result" : "value", dim), length_ctype));
}
} else if ((acc.value_type is DelegateType) && ((DelegateType) acc.value_type).delegate_symbol.has_target) {
- function.add_parameter (new CCodeFormalParameter (get_delegate_target_cname (acc.readable ? "result" : "value"), acc.readable ? "gpointer*" : "gpointer"));
+ function.add_parameter (new CCodeParameter (get_delegate_target_cname (acc.readable ? "result" : "value"), acc.readable ? "gpointer*" : "gpointer"));
}
if (prop.is_private_symbol () || (!acc.readable && !acc.writable) || acc.access == SymbolAccessibility.PRIVATE) {
@@ -1414,17 +1414,17 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
}
var this_type = get_data_type_for_symbol (t);
- var cselfparam = new CCodeFormalParameter ("self", this_type.get_cname ());
+ var cselfparam = new CCodeParameter ("self", this_type.get_cname ());
if (t is Struct) {
cselfparam.type_name += "*";
}
- CCodeFormalParameter cvalueparam;
+ CCodeParameter cvalueparam;
if (returns_real_struct) {
- cvalueparam = new CCodeFormalParameter ("result", acc.value_type.get_cname () + "*");
+ cvalueparam = new CCodeParameter ("result", acc.value_type.get_cname () + "*");
} else if (!acc.readable && prop.property_type.is_real_non_null_struct_type ()) {
- cvalueparam = new CCodeFormalParameter ("value", acc.value_type.get_cname () + "*");
+ cvalueparam = new CCodeParameter ("value", acc.value_type.get_cname () + "*");
} else {
- cvalueparam = new CCodeFormalParameter ("value", acc.value_type.get_cname ());
+ cvalueparam = new CCodeParameter ("value", acc.value_type.get_cname ());
}
if (prop.is_abstract || prop.is_virtual) {
@@ -1448,10 +1448,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
}
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeFormalParameter (get_array_length_cname (acc.readable ? "result" : "value", dim), length_ctype));
+ function.add_parameter (new CCodeParameter (get_array_length_cname (acc.readable ? "result" : "value", dim), length_ctype));
}
} else if ((acc.value_type is DelegateType) && ((DelegateType) acc.value_type).delegate_symbol.has_target) {
- function.add_parameter (new CCodeFormalParameter (get_delegate_target_cname (acc.readable ? "result" : "value"), acc.readable ? "gpointer*" : "gpointer"));
+ function.add_parameter (new CCodeParameter (get_delegate_target_cname (acc.readable ? "result" : "value"), acc.readable ? "gpointer*" : "gpointer"));
}
if (prop.is_private_symbol () || !(acc.readable || acc.writable) || acc.access == SymbolAccessibility.PRIVATE) {
@@ -1547,7 +1547,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
base_type = new ObjectType ((ObjectTypeSymbol) prop.base_interface_property.parent_symbol);
}
function.modifiers |= CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("base", base_type.get_cname ()));
+ function.add_parameter (new CCodeParameter ("base", base_type.get_cname ()));
} else {
function.add_parameter (cselfparam);
}
@@ -1565,10 +1565,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
}
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeFormalParameter (get_array_length_cname (acc.readable ? "result" : "value", dim), length_ctype));
+ function.add_parameter (new CCodeParameter (get_array_length_cname (acc.readable ? "result" : "value", dim), length_ctype));
}
} else if ((acc.value_type is DelegateType) && ((DelegateType) acc.value_type).delegate_symbol.has_target) {
- function.add_parameter (new CCodeFormalParameter (get_delegate_target_cname (acc.readable ? "result" : "value"), acc.readable ? "gpointer*" : "gpointer"));
+ function.add_parameter (new CCodeParameter (get_delegate_target_cname (acc.readable ? "result" : "value"), acc.readable ? "gpointer*" : "gpointer"));
}
if (!is_virtual) {
@@ -1639,7 +1639,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
return result;
}
- void capture_parameter (FormalParameter param, CCodeStruct data, int block_id, CCodeBlock free_block) {
+ void capture_parameter (Parameter param, CCodeStruct data, int block_id, CCodeBlock free_block) {
generate_type_declaration (param.variable_type, cfile);
var param_type = param.variable_type.copy ();
@@ -1881,7 +1881,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
// create ref/unref functions
var ref_fun = new CCodeFunction ("block%d_data_ref".printf (block_id), struct_name + "*");
- ref_fun.add_parameter (new CCodeFormalParameter ("_data%d_".printf (block_id), struct_name + "*"));
+ ref_fun.add_parameter (new CCodeParameter ("_data%d_".printf (block_id), struct_name + "*"));
ref_fun.modifiers = CCodeModifiers.STATIC;
cfile.add_function_declaration (ref_fun);
ref_fun.block = new CCodeBlock ();
@@ -1893,7 +1893,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
cfile.add_function (ref_fun);
var unref_fun = new CCodeFunction ("block%d_data_unref".printf (block_id), "void");
- unref_fun.add_parameter (new CCodeFormalParameter ("_data%d_".printf (block_id), struct_name + "*"));
+ unref_fun.add_parameter (new CCodeParameter ("_data%d_".printf (block_id), struct_name + "*"));
unref_fun.modifiers = CCodeModifiers.STATIC;
cfile.add_function_declaration (unref_fun);
unref_fun.block = new CCodeBlock ();
@@ -1924,7 +1924,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
if (b.parent_symbol is Method) {
var m = (Method) b.parent_symbol;
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (!param.captured && !param.ellipsis && requires_destroy (param.variable_type) && param.direction == ParameterDirection.IN) {
var ma = new MemberAccess.simple (param.name);
ma.symbol_reference = param;
@@ -2442,8 +2442,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var function = new CCodeFunction (equal_func, "gboolean");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("s1", "const " + st.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("s2", "const " + st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("s1", "const " + st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("s2", "const " + st.get_cname () + "*"));
push_function (function);
@@ -2531,8 +2531,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var function = new CCodeFunction (equal_func, "gboolean");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("s1", "const " + st.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("s2", "const " + st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("s1", "const " + st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("s2", "const " + st.get_cname () + "*"));
push_function (function);
@@ -2580,7 +2580,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var function = new CCodeFunction (dup_func, value_type.get_cname ());
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", value_type.get_cname ()));
+ function.add_parameter (new CCodeParameter ("self", value_type.get_cname ()));
push_function (function);
@@ -2642,7 +2642,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var function = new CCodeFunction (destroy_func, type.get_cname ());
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", type.get_cname ()));
+ function.add_parameter (new CCodeParameter ("self", type.get_cname ()));
push_function (function);
@@ -2673,7 +2673,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var function = new CCodeFunction (destroy_func, "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", type.get_cname ()));
+ function.add_parameter (new CCodeParameter ("self", type.get_cname ()));
push_function (function);
@@ -2728,7 +2728,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var function = new CCodeFunction (free0_func, "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("var", "gpointer"));
+ function.add_parameter (new CCodeParameter ("var", "gpointer"));
push_function (function);
@@ -2841,7 +2841,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var function = new CCodeFunction (destroy_func, "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", collection_type.get_cname ()));
+ function.add_parameter (new CCodeParameter ("self", collection_type.get_cname ()));
push_function (function);
@@ -2851,8 +2851,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
string destroy_node_func = "%s_node".printf (destroy_func);
var wrapper = new CCodeFunction (destroy_node_func, "gboolean");
wrapper.modifiers = CCodeModifiers.STATIC;
- wrapper.add_parameter (new CCodeFormalParameter ("node", collection_type.get_cname ()));
- wrapper.add_parameter (new CCodeFormalParameter ("unused", "gpointer"));
+ wrapper.add_parameter (new CCodeParameter ("node", collection_type.get_cname ()));
+ wrapper.add_parameter (new CCodeParameter ("unused", "gpointer"));
var wrapper_block = new CCodeBlock ();
var free_call = new CCodeFunctionCall (element_destroy_func_expression);
free_call.add_argument (new CCodeMemberAccess.pointer(new CCodeIdentifier("node"), "data"));
@@ -3259,7 +3259,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
}
private void append_param_free (Method m) {
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (!param.ellipsis && requires_destroy (param.variable_type) && param.direction == ParameterDirection.IN) {
var ma = new MemberAccess.simple (param.name);
ma.symbol_reference = param;
@@ -3290,7 +3290,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
return false;
}
- void return_out_parameter (FormalParameter param) {
+ void return_out_parameter (Parameter param) {
var delegate_type = param.variable_type as DelegateType;
ccode.open_if (get_variable_cexpression (param.name));
@@ -3608,9 +3608,9 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
if (this.next_regex_id == 0) {
var fun = new CCodeFunction ("_thread_safe_regex_init", "GRegex*");
fun.modifiers = CCodeModifiers.STATIC | CCodeModifiers.INLINE;
- fun.add_parameter (new CCodeFormalParameter ("re", "GRegex**"));
- fun.add_parameter (new CCodeFormalParameter ("pattern", "const gchar *"));
- fun.add_parameter (new CCodeFormalParameter ("match_options", "GRegexMatchFlags"));
+ fun.add_parameter (new CCodeParameter ("re", "GRegex**"));
+ fun.add_parameter (new CCodeParameter ("pattern", "const gchar *"));
+ fun.add_parameter (new CCodeParameter ("match_options", "GRegexMatchFlags"));
push_function (fun);
@@ -3888,7 +3888,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
pointer_cname = "void*";
}
var dup0_fun = new CCodeFunction (dup0_func, pointer_cname);
- dup0_fun.add_parameter (new CCodeFormalParameter ("self", pointer_cname));
+ dup0_fun.add_parameter (new CCodeParameter ("self", pointer_cname));
dup0_fun.modifiers = CCodeModifiers.STATIC;
push_function (dup0_fun);
@@ -4194,7 +4194,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
} else if (st != null && st.get_cname () == "va_list") {
creation_call.add_argument (instance);
if (m.get_cname () == "va_start") {
- FormalParameter last_param = null;
+ Parameter last_param = null;
foreach (var param in current_method.get_parameters ()) {
if (param.ellipsis) {
break;
@@ -4227,10 +4227,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
int i = 1;
int arg_pos;
- Iterator<FormalParameter> params_it = params.iterator ();
+ Iterator<Parameter> params_it = params.iterator ();
foreach (Expression arg in expr.get_argument_list ()) {
CCodeExpression cexpr = get_cvalue (arg);
- FormalParameter param = null;
+ Parameter param = null;
if (params_it.next ()) {
param = params_it.get ();
ellipsis = param.ellipsis;
@@ -4437,7 +4437,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
}
}
- public CCodeExpression? handle_struct_argument (FormalParameter? param, Expression arg, CCodeExpression? cexpr) {
+ public CCodeExpression? handle_struct_argument (Parameter? param, Expression arg, CCodeExpression? cexpr) {
DataType type;
if (param != null) {
type = param.variable_type;
@@ -4585,7 +4585,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var cfunc = new CCodeFunction (variant_func);
cfunc.modifiers = CCodeModifiers.STATIC;
- cfunc.add_parameter (new CCodeFormalParameter ("value", "GVariant*"));
+ cfunc.add_parameter (new CCodeParameter ("value", "GVariant*"));
if (!to.is_real_non_null_struct_type ()) {
cfunc.return_type = to.get_cname ();
@@ -4593,7 +4593,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
if (to.is_real_non_null_struct_type ()) {
// structs are returned via out parameter
- cfunc.add_parameter (new CCodeFormalParameter ("result", to.get_cname () + "*"));
+ cfunc.add_parameter (new CCodeParameter ("result", to.get_cname () + "*"));
} else if (to is ArrayType) {
// return array length if appropriate
var array_type = (ArrayType) to;
@@ -4603,7 +4603,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
emit_temp_var (temp_decl);
ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_variable_cexpression (temp_decl.name)));
- cfunc.add_parameter (new CCodeFormalParameter (get_array_length_cname ("result", dim), "int*"));
+ cfunc.add_parameter (new CCodeParameter (get_array_length_cname ("result", dim), "int*"));
append_array_size (expr, get_variable_cexpression (temp_decl.name));
}
}
@@ -5000,12 +5000,12 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var function = new CCodeFunction (array_contains_func, "gboolean");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("stack", array_type.get_cname ()));
- function.add_parameter (new CCodeFormalParameter ("stack_length", "int"));
+ function.add_parameter (new CCodeParameter ("stack", array_type.get_cname ()));
+ function.add_parameter (new CCodeParameter ("stack_length", "int"));
if (array_type.element_type is StructValueType) {
- function.add_parameter (new CCodeFormalParameter ("needle", array_type.element_type.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("needle", array_type.element_type.get_cname () + "*"));
} else {
- function.add_parameter (new CCodeFormalParameter ("needle", array_type.element_type.get_cname ()));
+ function.add_parameter (new CCodeParameter ("needle", array_type.element_type.get_cname ()));
}
push_function (function);
@@ -5280,7 +5280,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var cfunc = new CCodeFunction (variant_func, "GVariant*");
cfunc.modifiers = CCodeModifiers.STATIC;
- cfunc.add_parameter (new CCodeFormalParameter ("value", expression_type.get_cname ()));
+ cfunc.add_parameter (new CCodeParameter ("value", expression_type.get_cname ()));
if (expression_type is ArrayType) {
// return array length if appropriate
@@ -5288,7 +5288,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
for (int dim = 1; dim <= array_type.rank; dim++) {
ccall.add_argument (get_array_length_cexpression (expr, dim));
- cfunc.add_parameter (new CCodeFormalParameter (get_array_length_cname ("value", dim), "gint"));
+ cfunc.add_parameter (new CCodeParameter (get_array_length_cname ("value", dim), "gint"));
}
}
@@ -5717,7 +5717,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var function = new CCodeFunction (st.get_destroy_function (), "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", st.get_cname () + "*"));
push_function (function);
@@ -5753,8 +5753,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var function = new CCodeFunction (st.get_copy_function (), "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", "const " + st.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("dest", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", "const " + st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("dest", st.get_cname () + "*"));
push_context (new EmitContext ());
push_function (function);
@@ -5861,10 +5861,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
return "";
}
- public virtual void generate_marshaller (List<FormalParameter> params, DataType return_type, bool dbus = false) {
+ public virtual void generate_marshaller (List<Parameter> params, DataType return_type, bool dbus = false) {
}
- public virtual string get_marshaller_function (List<FormalParameter> params, DataType return_type, string? prefix = null, bool dbus = false) {
+ public virtual string get_marshaller_function (List<Parameter> params, DataType return_type, string? prefix = null, bool dbus = false) {
return "";
}
@@ -5872,7 +5872,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
return "";
}
- public virtual string get_parameter_array_length_cname (FormalParameter param, int dim) {
+ public virtual string get_parameter_array_length_cname (Parameter param, int dim) {
return "";
}
diff --git a/codegen/valaccodedelegatemodule.vala b/codegen/valaccodedelegatemodule.vala
index ff3c5ff..a703f7a 100644
--- a/codegen/valaccodedelegatemodule.vala
+++ b/codegen/valaccodedelegatemodule.vala
@@ -47,8 +47,8 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
}
var cfundecl = new CCodeFunctionDeclarator (d.get_cname ());
- foreach (FormalParameter param in d.get_parameters ()) {
- var cparam = generate_parameter (param, decl_space, new HashMap<int,CCodeFormalParameter> (), null);
+ foreach (Parameter param in d.get_parameters ()) {
+ var cparam = generate_parameter (param, decl_space, new HashMap<int,CCodeParameter> (), null);
cfundecl.add_parameter (cparam);
@@ -62,7 +62,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
}
for (int dim = 1; dim <= array_type.rank; dim++) {
- cparam = new CCodeFormalParameter (get_parameter_array_length_cname (param, dim), length_ctype);
+ cparam = new CCodeParameter (get_parameter_array_length_cname (param, dim), length_ctype);
cfundecl.add_parameter (cparam);
}
}
@@ -71,7 +71,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
var deleg_type = (DelegateType) param.variable_type;
var param_d = deleg_type.delegate_symbol;
if (param_d.has_target) {
- cparam = new CCodeFormalParameter (get_delegate_target_cname (get_variable_cname (param.name)), "void*");
+ cparam = new CCodeParameter (get_delegate_target_cname (get_variable_cname (param.name)), "void*");
cfundecl.add_parameter (cparam);
}
}
@@ -81,7 +81,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
var array_type = (ArrayType) d.return_type;
for (int dim = 1; dim <= array_type.rank; dim++) {
- var cparam = new CCodeFormalParameter (get_array_length_cname ("result", dim), "int*");
+ var cparam = new CCodeParameter (get_array_length_cname ("result", dim), "int*");
cfundecl.add_parameter (cparam);
}
} else if (d.return_type is DelegateType) {
@@ -89,19 +89,19 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
var deleg_type = (DelegateType) d.return_type;
var result_d = deleg_type.delegate_symbol;
if (result_d.has_target) {
- var cparam = new CCodeFormalParameter (get_delegate_target_cname ("result"), "void**");
+ var cparam = new CCodeParameter (get_delegate_target_cname ("result"), "void**");
cfundecl.add_parameter (cparam);
}
} else if (d.return_type.is_real_non_null_struct_type ()) {
- var cparam = new CCodeFormalParameter ("result", "%s*".printf (d.return_type.get_cname ()));
+ var cparam = new CCodeParameter ("result", "%s*".printf (d.return_type.get_cname ()));
cfundecl.add_parameter (cparam);
}
if (d.has_target) {
- var cparam = new CCodeFormalParameter ("user_data", "void*");
+ var cparam = new CCodeParameter ("user_data", "void*");
cfundecl.add_parameter (cparam);
}
if (d.get_error_types ().size > 0) {
- var cparam = new CCodeFormalParameter ("error", "GError**");
+ var cparam = new CCodeParameter ("error", "GError**");
cfundecl.add_parameter (cparam);
}
@@ -195,20 +195,20 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
var function = new CCodeFunction (wrapper_name, return_type_cname);
function.modifiers = CCodeModifiers.STATIC;
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
if (d.has_target) {
- var cparam = new CCodeFormalParameter ("self", "gpointer");
+ var cparam = new CCodeParameter ("self", "gpointer");
cparam_map.set (get_param_pos (d.cinstance_parameter_position), cparam);
}
if (d.sender_type != null) {
- var param = new FormalParameter ("_sender", d.sender_type);
+ var param = new Parameter ("_sender", d.sender_type);
generate_parameter (param, cfile, cparam_map, null);
}
var d_params = d.get_parameters ();
- foreach (FormalParameter param in d_params) {
+ foreach (Parameter param in d_params) {
if (dynamic_sig != null
&& param.variable_type is ArrayType
&& ((ArrayType) param.variable_type).element_type.data_type == string_type.data_type) {
@@ -224,7 +224,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
var array_type = (ArrayType) d.return_type;
for (int dim = 1; dim <= array_type.rank; dim++) {
- var cparam = new CCodeFormalParameter (get_array_length_cname ("result", dim), "int*");
+ var cparam = new CCodeParameter (get_array_length_cname ("result", dim), "int*");
cparam_map.set (get_param_pos (d.carray_length_parameter_position + 0.01 * dim), cparam);
}
} else if (d.return_type is DelegateType) {
@@ -232,16 +232,16 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
var deleg_type = (DelegateType) d.return_type;
if (deleg_type.delegate_symbol.has_target) {
- var cparam = new CCodeFormalParameter (get_delegate_target_cname ("result"), "void**");
+ var cparam = new CCodeParameter (get_delegate_target_cname ("result"), "void**");
cparam_map.set (get_param_pos (d.cdelegate_target_parameter_position), cparam);
}
} else if (d.return_type.is_real_non_null_struct_type ()) {
- var cparam = new CCodeFormalParameter ("result", "%s*".printf (d.return_type.get_cname ()));
+ var cparam = new CCodeParameter ("result", "%s*".printf (d.return_type.get_cname ()));
cparam_map.set (get_param_pos (-3), cparam);
}
if (m.get_error_types ().size > 0) {
- var cparam = new CCodeFormalParameter ("error", "GError**");
+ var cparam = new CCodeParameter ("error", "GError**");
cparam_map.set (get_param_pos (-1), cparam);
}
@@ -287,7 +287,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
bool first = true;
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (first && d.sender_type != null && m.get_parameters ().size == d.get_parameters ().size + 1) {
// sender parameter
carg_map.set (get_param_pos (param.cparameter_position), new CCodeIdentifier ("_sender"));
@@ -424,7 +424,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
return wrapper_name;
}
- public override CCodeFormalParameter generate_parameter (FormalParameter param, CCodeFile decl_space, Map<int,CCodeFormalParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
+ public override CCodeParameter generate_parameter (Parameter param, CCodeFile decl_space, Map<int,CCodeParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
if (!(param.variable_type is DelegateType || param.variable_type is MethodType)) {
return base.generate_parameter (param, decl_space, cparam_map, carg_map);
}
@@ -445,7 +445,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
target_destroy_notify_ctypename += "*";
}
- var main_cparam = new CCodeFormalParameter (get_variable_cname (param.name), ctypename);
+ var main_cparam = new CCodeParameter (get_variable_cname (param.name), ctypename);
cparam_map.set (get_param_pos (param.cparameter_position), main_cparam);
if (carg_map != null) {
@@ -459,13 +459,13 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
generate_delegate_declaration (d, decl_space);
if (d.has_target) {
- var cparam = new CCodeFormalParameter (get_delegate_target_cname (get_variable_cname (param.name)), target_ctypename);
+ var cparam = new CCodeParameter (get_delegate_target_cname (get_variable_cname (param.name)), target_ctypename);
cparam_map.set (get_param_pos (param.cdelegate_target_parameter_position), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (param.cdelegate_target_parameter_position), get_variable_cexpression (cparam.name));
}
if (deleg_type.value_owned) {
- cparam = new CCodeFormalParameter (get_delegate_target_destroy_notify_cname (get_variable_cname (param.name)), target_destroy_notify_ctypename);
+ cparam = new CCodeParameter (get_delegate_target_destroy_notify_cname (get_variable_cname (param.name)), target_destroy_notify_ctypename);
cparam_map.set (get_param_pos (param.cdelegate_target_parameter_position + 0.01), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (param.cdelegate_target_parameter_position + 0.01), get_variable_cexpression (cparam.name));
@@ -473,7 +473,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
}
}
} else if (param.variable_type is MethodType) {
- var cparam = new CCodeFormalParameter (get_delegate_target_cname (get_variable_cname (param.name)), target_ctypename);
+ var cparam = new CCodeParameter (get_delegate_target_cname (get_variable_cname (param.name)), target_ctypename);
cparam_map.set (get_param_pos (param.cdelegate_target_parameter_position), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (param.cdelegate_target_parameter_position), get_variable_cexpression (cparam.name));
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 36e80e8..5bfc603 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -499,8 +499,8 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
// don't unref variable
local.active = false;
}
- } else if (expr.symbol_reference is FormalParameter) {
- var p = (FormalParameter) expr.symbol_reference;
+ } else if (expr.symbol_reference is Parameter) {
+ var p = (Parameter) expr.symbol_reference;
if (p.name == "this") {
if (current_method != null && current_method.coroutine) {
// use closure
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index c6c0140..c94187c 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -33,7 +33,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
Method m = null;
Delegate deleg = null;
- List<FormalParameter> params;
+ List<Parameter> params;
var ma = expr.call as MemberAccess;
@@ -268,21 +268,21 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
var unary = arg as UnaryExpression;
if (unary != null && unary.operator == UnaryOperator.OUT) {
// out argument
- var param = new FormalParameter ("param%d".printf (param_nr), unary.inner.value_type);
+ var param = new Parameter ("param%d".printf (param_nr), unary.inner.value_type);
param.direction = ParameterDirection.OUT;
m.add_parameter (param);
} else if (unary != null && unary.operator == UnaryOperator.REF) {
// ref argument
- var param = new FormalParameter ("param%d".printf (param_nr), unary.inner.value_type);
+ var param = new Parameter ("param%d".printf (param_nr), unary.inner.value_type);
param.direction = ParameterDirection.REF;
m.add_parameter (param);
} else {
// in argument
- m.add_parameter (new FormalParameter ("param%d".printf (param_nr), arg.value_type));
+ m.add_parameter (new Parameter ("param%d".printf (param_nr), arg.value_type));
}
param_nr++;
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
param.accept (this);
}
generate_dynamic_method_wrapper ((DynamicMethod) m);
@@ -325,7 +325,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
int i = 1;
int arg_pos;
- Iterator<FormalParameter> params_it = params.iterator ();
+ Iterator<Parameter> params_it = params.iterator ();
foreach (Expression arg in expr.get_argument_list ()) {
CCodeExpression cexpr = get_cvalue (arg);
@@ -811,7 +811,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
var function = new CCodeFunction (to_string_func, "const char*");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("value", en.get_cname ()));
+ function.add_parameter (new CCodeParameter ("value", en.get_cname ()));
// definition
push_context (new EmitContext ());
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index 202e915..c2d4b88 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -61,7 +61,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
return result;
}
- public virtual void generate_method_result_declaration (Method m, CCodeFile decl_space, CCodeFunction cfunc, Map<int,CCodeFormalParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
+ public virtual void generate_method_result_declaration (Method m, CCodeFile decl_space, CCodeFunction cfunc, Map<int,CCodeParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
var creturn_type = m.return_type;
if (m is CreationMethod) {
var cl = m.parent_symbol as Class;
@@ -80,7 +80,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
if (m.return_type.is_real_non_null_struct_type ()) {
// structs are returned via out parameter
- var cparam = new CCodeFormalParameter ("result", m.return_type.get_cname () + "*");
+ var cparam = new CCodeParameter ("result", m.return_type.get_cname () + "*");
cparam_map.set (get_param_pos (-3), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (-3), get_result_cexpression ());
@@ -90,7 +90,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
var array_type = (ArrayType) m.return_type;
for (int dim = 1; dim <= array_type.rank; dim++) {
- var cparam = new CCodeFormalParameter (get_array_length_cname ("result", dim), "int*");
+ var cparam = new CCodeParameter (get_array_length_cname ("result", dim), "int*");
cparam_map.set (get_param_pos (m.carray_length_parameter_position + 0.01 * dim), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (m.carray_length_parameter_position + 0.01 * dim), get_variable_cexpression (cparam.name));
@@ -101,13 +101,13 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
var deleg_type = (DelegateType) m.return_type;
var d = deleg_type.delegate_symbol;
if (d.has_target) {
- var cparam = new CCodeFormalParameter (get_delegate_target_cname ("result"), "void**");
+ var cparam = new CCodeParameter (get_delegate_target_cname ("result"), "void**");
cparam_map.set (get_param_pos (m.cdelegate_target_parameter_position), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (m.cdelegate_target_parameter_position), get_variable_cexpression (cparam.name));
}
if (deleg_type.value_owned) {
- cparam = new CCodeFormalParameter (get_delegate_target_destroy_notify_cname ("result"), "GDestroyNotify*");
+ cparam = new CCodeParameter (get_delegate_target_destroy_notify_cname ("result"), "GDestroyNotify*");
cparam_map.set (get_param_pos (m.cdelegate_target_parameter_position + 0.01), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (m.cdelegate_target_parameter_position + 0.01), get_variable_cexpression (cparam.name));
@@ -121,7 +121,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
generate_type_declaration (error_type, decl_space);
}
- var cparam = new CCodeFormalParameter ("error", "GError**");
+ var cparam = new CCodeParameter ("error", "GError**");
cparam_map.set (get_param_pos (-1), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (-1), new CCodeIdentifier (cparam.name));
@@ -177,7 +177,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
function.modifiers |= CCodeModifiers.DEPRECATED;
}
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
var carg_map = new HashMap<int,CCodeExpression> (direct_hash, direct_equal);
var cl = m.parent_symbol as Class;
@@ -197,7 +197,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
function.modifiers |= CCodeModifiers.STATIC;
}
- cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (m, decl_space, cparam_map, function);
decl_space.add_function_declaration (function);
@@ -292,7 +292,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
param.accept (this);
}
@@ -316,7 +316,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
function.modifiers |= CCodeModifiers.INLINE;
}
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (m, cfile, cparam_map, function);
@@ -342,7 +342,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
function = new CCodeFunction (m.get_real_cname () + "_co", "gboolean");
// data struct to hold parameters, local variables, and the return value
- function.add_parameter (new CCodeFormalParameter ("data", Symbol.lower_case_to_camel_case (m.get_cname ()) + "Data*"));
+ function.add_parameter (new CCodeParameter ("data", Symbol.lower_case_to_camel_case (m.get_cname ()) + "Data*"));
function.modifiers |= CCodeModifiers.STATIC;
cfile.add_function_declaration (function);
@@ -450,7 +450,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
}
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.ellipsis) {
break;
}
@@ -684,7 +684,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
* emitter! */
m.signal_reference == null) {
- cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
var carg_map = new HashMap<int,CCodeExpression> (direct_hash, direct_equal);
generate_vfunc (m, creturn_type, cparam_map, carg_map);
@@ -694,8 +694,8 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
// m is possible entry point, add appropriate startup code
var cmain = new CCodeFunction ("main", "int");
cmain.line = function.line;
- cmain.add_parameter (new CCodeFormalParameter ("argc", "int"));
- cmain.add_parameter (new CCodeFormalParameter ("argv", "char **"));
+ cmain.add_parameter (new CCodeParameter ("argc", "int"));
+ cmain.add_parameter (new CCodeParameter ("argv", "char **"));
var main_block = new CCodeBlock ();
if (context.profile == Profile.GOBJECT) {
@@ -741,8 +741,8 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
}
}
- public virtual CCodeFormalParameter generate_parameter (FormalParameter param, CCodeFile decl_space, Map<int,CCodeFormalParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
- CCodeFormalParameter cparam;
+ public virtual CCodeParameter generate_parameter (Parameter param, CCodeFile decl_space, Map<int,CCodeParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
+ CCodeParameter cparam;
if (!param.ellipsis) {
string ctypename = param.variable_type.get_cname ();
@@ -766,9 +766,9 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
ctypename += "*";
}
- cparam = new CCodeFormalParameter (get_variable_cname (param.name), ctypename);
+ cparam = new CCodeParameter (get_variable_cname (param.name), ctypename);
} else {
- cparam = new CCodeFormalParameter.with_ellipsis ();
+ cparam = new CCodeParameter.with_ellipsis ();
}
cparam_map.set (get_param_pos (param.cparameter_position, param.ellipsis), cparam);
@@ -779,16 +779,16 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
return cparam;
}
- public override void generate_cparameters (Method m, CCodeFile decl_space, Map<int,CCodeFormalParameter> cparam_map, CCodeFunction func, CCodeFunctionDeclarator? vdeclarator = null, Map<int,CCodeExpression>? carg_map = null, CCodeFunctionCall? vcall = null, int direction = 3) {
+ public override void generate_cparameters (Method m, CCodeFile decl_space, Map<int,CCodeParameter> cparam_map, CCodeFunction func, CCodeFunctionDeclarator? vdeclarator = null, Map<int,CCodeExpression>? carg_map = null, CCodeFunctionCall? vcall = null, int direction = 3) {
if (m.closure) {
var closure_block = current_closure_block;
int block_id = get_block_id (closure_block);
- var instance_param = new CCodeFormalParameter ("_data%d_".printf (block_id), "Block%dData*".printf (block_id));
+ var instance_param = new CCodeParameter ("_data%d_".printf (block_id), "Block%dData*".printf (block_id));
cparam_map.set (get_param_pos (m.cinstance_parameter_position), instance_param);
} else if (m.parent_symbol is Class && m is CreationMethod) {
var cl = (Class) m.parent_symbol;
if (!cl.is_compact && vcall == null) {
- cparam_map.set (get_param_pos (m.cinstance_parameter_position), new CCodeFormalParameter ("object_type", "GType"));
+ cparam_map.set (get_param_pos (m.cinstance_parameter_position), new CCodeParameter ("object_type", "GType"));
}
} else if (m.binding == MemberBinding.INSTANCE || (m.parent_symbol is Struct && m is CreationMethod)) {
TypeSymbol parent_type = find_parent_type (m);
@@ -807,18 +807,18 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
generate_type_declaration (this_type, decl_space);
- CCodeFormalParameter instance_param = null;
+ CCodeParameter instance_param = null;
if (m.base_interface_method != null && !m.is_abstract && !m.is_virtual) {
var base_type = new ObjectType ((Interface) m.base_interface_method.parent_symbol);
- instance_param = new CCodeFormalParameter ("base", base_type.get_cname ());
+ instance_param = new CCodeParameter ("base", base_type.get_cname ());
} else if (m.overrides) {
var base_type = new ObjectType ((Class) m.base_method.parent_symbol);
- instance_param = new CCodeFormalParameter ("base", base_type.get_cname ());
+ instance_param = new CCodeParameter ("base", base_type.get_cname ());
} else {
if (m.parent_symbol is Struct && !((Struct) m.parent_symbol).is_simple_type ()) {
- instance_param = new CCodeFormalParameter ("*self", this_type.get_cname ());
+ instance_param = new CCodeParameter ("*self", this_type.get_cname ());
} else {
- instance_param = new CCodeFormalParameter ("self", this_type.get_cname ());
+ instance_param = new CCodeParameter ("self", this_type.get_cname ());
}
}
cparam_map.set (get_param_pos (m.cinstance_parameter_position), instance_param);
@@ -826,7 +826,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
TypeSymbol parent_type = find_parent_type (m);
DataType this_type;
this_type = new ClassType ((Class) parent_type);
- var class_param = new CCodeFormalParameter ("klass", this_type.get_cname ());
+ var class_param = new CCodeParameter ("klass", this_type.get_cname ());
cparam_map.set (get_param_pos (m.cinstance_parameter_position), class_param);
}
@@ -835,9 +835,9 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
int type_param_index = 0;
var cl = (Class) m.parent_symbol;
foreach (TypeParameter type_param in cl.get_type_parameters ()) {
- cparam_map.set (get_param_pos (0.1 * type_param_index + 0.01), new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "GType"));
- cparam_map.set (get_param_pos (0.1 * type_param_index + 0.02), new CCodeFormalParameter ("%s_dup_func".printf (type_param.name.down ()), "GBoxedCopyFunc"));
- cparam_map.set (get_param_pos (0.1 * type_param_index + 0.03), new CCodeFormalParameter ("%s_destroy_func".printf (type_param.name.down ()), "GDestroyNotify"));
+ cparam_map.set (get_param_pos (0.1 * type_param_index + 0.01), new CCodeParameter ("%s_type".printf (type_param.name.down ()), "GType"));
+ cparam_map.set (get_param_pos (0.1 * type_param_index + 0.02), new CCodeParameter ("%s_dup_func".printf (type_param.name.down ()), "GBoxedCopyFunc"));
+ cparam_map.set (get_param_pos (0.1 * type_param_index + 0.03), new CCodeParameter ("%s_destroy_func".printf (type_param.name.down ()), "GDestroyNotify"));
if (carg_map != null) {
carg_map.set (get_param_pos (0.1 * type_param_index + 0.01), new CCodeIdentifier ("%s_type".printf (type_param.name.down ())));
carg_map.set (get_param_pos (0.1 * type_param_index + 0.02), new CCodeIdentifier ("%s_dup_func".printf (type_param.name.down ())));
@@ -848,9 +848,9 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
} else if (!m.closure) {
int type_param_index = 0;
foreach (var type_param in m.get_type_parameters ()) {
- cparam_map.set (get_param_pos (0.1 * type_param_index + 0.01), new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "GType"));
- cparam_map.set (get_param_pos (0.1 * type_param_index + 0.02), new CCodeFormalParameter ("%s_dup_func".printf (type_param.name.down ()), "GBoxedCopyFunc"));
- cparam_map.set (get_param_pos (0.1 * type_param_index + 0.03), new CCodeFormalParameter ("%s_destroy_func".printf (type_param.name.down ()), "GDestroyNotify"));
+ cparam_map.set (get_param_pos (0.1 * type_param_index + 0.01), new CCodeParameter ("%s_type".printf (type_param.name.down ()), "GType"));
+ cparam_map.set (get_param_pos (0.1 * type_param_index + 0.02), new CCodeParameter ("%s_dup_func".printf (type_param.name.down ()), "GBoxedCopyFunc"));
+ cparam_map.set (get_param_pos (0.1 * type_param_index + 0.03), new CCodeParameter ("%s_destroy_func".printf (type_param.name.down ()), "GDestroyNotify"));
if (carg_map != null) {
carg_map.set (get_param_pos (0.1 * type_param_index + 0.01), new CCodeIdentifier ("%s_type".printf (type_param.name.down ())));
carg_map.set (get_param_pos (0.1 * type_param_index + 0.02), new CCodeIdentifier ("%s_dup_func".printf (type_param.name.down ())));
@@ -860,7 +860,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
}
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction != ParameterDirection.OUT) {
if ((direction & 1) == 0) {
// no in paramters
@@ -907,7 +907,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
}
}
- public void generate_vfunc (Method m, DataType return_type, Map<int,CCodeFormalParameter> cparam_map, Map<int,CCodeExpression> carg_map, string suffix = "", int direction = 3) {
+ public void generate_vfunc (Method m, DataType return_type, Map<int,CCodeParameter> cparam_map, Map<int,CCodeExpression> carg_map, string suffix = "", int direction = 3) {
push_context (new EmitContext ());
string cname = m.get_cname ();
@@ -1029,7 +1029,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
if (current_type_symbol is Class && !current_class.is_compact && !current_class.is_abstract) {
var vfunc = new CCodeFunction (m.get_cname ());
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
var carg_map = new HashMap<int,CCodeExpression> (direct_hash, direct_equal);
var vblock = new CCodeBlock ();
diff --git a/codegen/valaccodestructmodule.vala b/codegen/valaccodestructmodule.vala
index bd6de01..e38c5da 100644
--- a/codegen/valaccodestructmodule.vala
+++ b/codegen/valaccodestructmodule.vala
@@ -111,14 +111,14 @@ public abstract class Vala.CCodeStructModule : CCodeBaseModule {
if (st.is_private_symbol ()) {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("self", "const " + st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", "const " + st.get_cname () + "*"));
decl_space.add_function_declaration (function);
function = new CCodeFunction (st.get_free_function (), "void");
if (st.is_private_symbol ()) {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("self", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", st.get_cname () + "*"));
decl_space.add_function_declaration (function);
if (st.is_disposable ()) {
@@ -126,15 +126,15 @@ public abstract class Vala.CCodeStructModule : CCodeBaseModule {
if (st.is_private_symbol ()) {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("self", "const " + st.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("dest", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", "const " + st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("dest", st.get_cname () + "*"));
decl_space.add_function_declaration (function);
function = new CCodeFunction (st.get_destroy_function (), "void");
if (st.is_private_symbol ()) {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("self", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", st.get_cname () + "*"));
decl_space.add_function_declaration (function);
}
}
@@ -179,7 +179,7 @@ public abstract class Vala.CCodeStructModule : CCodeBaseModule {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("self", "const " + st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", "const " + st.get_cname () + "*"));
var cblock = new CCodeBlock ();
@@ -223,7 +223,7 @@ public abstract class Vala.CCodeStructModule : CCodeBaseModule {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("self", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", st.get_cname () + "*"));
var cblock = new CCodeBlock ();
@@ -248,8 +248,8 @@ public abstract class Vala.CCodeStructModule : CCodeBaseModule {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("self", "const " + st.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("dest", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", "const " + st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("dest", st.get_cname () + "*"));
push_function (function);
@@ -311,7 +311,7 @@ public abstract class Vala.CCodeStructModule : CCodeBaseModule {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("self", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", st.get_cname () + "*"));
push_function (function);
diff --git a/codegen/valadbusclientmodule.vala b/codegen/valadbusclientmodule.vala
index 1666a7a..1e22c06 100644
--- a/codegen/valadbusclientmodule.vala
+++ b/codegen/valadbusclientmodule.vala
@@ -79,7 +79,7 @@ public class Vala.DBusClientModule : DBusModule {
var func = new CCodeFunction (method.get_cname ());
func.modifiers = CCodeModifiers.STATIC;
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (method, cfile, cparam_map, func);
@@ -150,9 +150,9 @@ public class Vala.DBusClientModule : DBusModule {
var cb_fun = new CCodeFunction ("_%s_cb".printf (reply_method.get_cname ()), "void");
cb_fun.modifiers = CCodeModifiers.STATIC;
- cb_fun.add_parameter (new CCodeFormalParameter ("proxy", "DBusGProxy*"));
- cb_fun.add_parameter (new CCodeFormalParameter ("call", "DBusGProxyCall*"));
- cb_fun.add_parameter (new CCodeFormalParameter ("user_data", "void*"));
+ cb_fun.add_parameter (new CCodeParameter ("proxy", "DBusGProxy*"));
+ cb_fun.add_parameter (new CCodeParameter ("call", "DBusGProxyCall*"));
+ cb_fun.add_parameter (new CCodeParameter ("user_data", "void*"));
cb_fun.block = new CCodeBlock ();
var cerrdecl = new CCodeDeclaration ("GError*");
cerrdecl.add_declarator (new CCodeVariableDeclarator ("error", new CCodeConstant ("NULL")));
@@ -167,7 +167,7 @@ public class Vala.DBusClientModule : DBusModule {
}
int param_count = reply_method.get_parameters ().size;
int i = 0;
- foreach (FormalParameter param in reply_method.get_parameters ()) {
+ foreach (Parameter param in reply_method.get_parameters ()) {
if ((++i) == param_count) {
if (!(param.variable_type is ErrorType)) {
Report.error (null, "DBus reply callbacks must end with GLib.Error argument");
@@ -239,7 +239,7 @@ public class Vala.DBusClientModule : DBusModule {
ccall.add_argument (new CCodeIdentifier ("error"));
}
- foreach (FormalParameter param in method.get_parameters ()) {
+ foreach (Parameter param in method.get_parameters ()) {
if (param.variable_type is MethodType
|| param.variable_type is DelegateType) {
// callback parameter
@@ -360,7 +360,7 @@ public class Vala.DBusClientModule : DBusModule {
var out_marshalling_fragment = new CCodeFragment ();
- foreach (FormalParameter param in method.get_parameters ()) {
+ foreach (Parameter param in method.get_parameters ()) {
if (param.variable_type is MethodType) {
// callback parameter
break;
@@ -642,7 +642,7 @@ public class Vala.DBusClientModule : DBusModule {
var func = new CCodeFunction (getter_cname, prop.property_type.get_cname ());
func.modifiers |= CCodeModifiers.STATIC | CCodeModifiers.INLINE;
- func.add_parameter (new CCodeFormalParameter ("obj", prop.dynamic_type.get_cname ()));
+ func.add_parameter (new CCodeParameter ("obj", prop.dynamic_type.get_cname ()));
var block = new CCodeBlock ();
generate_dbus_property_getter_wrapper (prop, block);
@@ -671,8 +671,8 @@ public class Vala.DBusClientModule : DBusModule {
var func = new CCodeFunction (setter_cname, "void");
func.modifiers |= CCodeModifiers.STATIC | CCodeModifiers.INLINE;
- func.add_parameter (new CCodeFormalParameter ("obj", prop.dynamic_type.get_cname ()));
- func.add_parameter (new CCodeFormalParameter ("value", prop.property_type.get_cname ()));
+ func.add_parameter (new CCodeParameter ("obj", prop.dynamic_type.get_cname ()));
+ func.add_parameter (new CCodeParameter ("value", prop.property_type.get_cname ()));
var block = new CCodeBlock ();
generate_dbus_property_setter_wrapper (prop, block);
@@ -811,10 +811,10 @@ public class Vala.DBusClientModule : DBusModule {
string connect_wrapper_name = "_%sconnect".printf (get_dynamic_signal_cname (sig));
var func = new CCodeFunction (connect_wrapper_name, "void");
- func.add_parameter (new CCodeFormalParameter ("obj", "gpointer"));
- func.add_parameter (new CCodeFormalParameter ("signal_name", "const char *"));
- func.add_parameter (new CCodeFormalParameter ("handler", "GCallback"));
- func.add_parameter (new CCodeFormalParameter ("data", "gpointer"));
+ func.add_parameter (new CCodeParameter ("obj", "gpointer"));
+ func.add_parameter (new CCodeParameter ("signal_name", "const char *"));
+ func.add_parameter (new CCodeParameter ("handler", "GCallback"));
+ func.add_parameter (new CCodeParameter ("data", "gpointer"));
var block = new CCodeBlock ();
generate_dbus_connect_wrapper (sig, block);
@@ -834,10 +834,10 @@ public class Vala.DBusClientModule : DBusModule {
string disconnect_wrapper_name = "_%sdisconnect".printf (get_dynamic_signal_cname (sig));
var func = new CCodeFunction (disconnect_wrapper_name, "void");
- func.add_parameter (new CCodeFormalParameter ("obj", "gpointer"));
- func.add_parameter (new CCodeFormalParameter ("signal_name", "const char *"));
- func.add_parameter (new CCodeFormalParameter ("handler", "GCallback"));
- func.add_parameter (new CCodeFormalParameter ("data", "gpointer"));
+ func.add_parameter (new CCodeParameter ("obj", "gpointer"));
+ func.add_parameter (new CCodeParameter ("signal_name", "const char *"));
+ func.add_parameter (new CCodeParameter ("handler", "GCallback"));
+ func.add_parameter (new CCodeParameter ("data", "gpointer"));
var block = new CCodeBlock ();
generate_dbus_disconnect_wrapper (sig, block);
@@ -866,7 +866,7 @@ public class Vala.DBusClientModule : DBusModule {
add_call.add_argument (new CCodeConstant ("\"%s\"".printf (get_dynamic_dbus_name (sig.name))));
bool first = true;
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (first) {
// skip sender parameter
first = false;
@@ -943,7 +943,7 @@ public class Vala.DBusClientModule : DBusModule {
string lower_cname = main_iface.get_lower_case_cprefix () + "dbus_proxy";
var proxy_iface_init = new CCodeFunction (lower_cname + "_" + iface.get_lower_case_cprefix () + "_interface_init", "void");
- proxy_iface_init.add_parameter (new CCodeFormalParameter ("iface", iface.get_cname () + "Iface*"));
+ proxy_iface_init.add_parameter (new CCodeParameter ("iface", iface.get_cname () + "Iface*"));
var iface_block = new CCodeBlock ();
@@ -1047,9 +1047,9 @@ public class Vala.DBusClientModule : DBusModule {
// declare proxy_new function
var proxy_new = new CCodeFunction (lower_cname + "_new", iface.get_cname () + "*");
- proxy_new.add_parameter (new CCodeFormalParameter ("connection", "DBusGConnection*"));
- proxy_new.add_parameter (new CCodeFormalParameter ("name", "const char*"));
- proxy_new.add_parameter (new CCodeFormalParameter ("path", "const char*"));
+ proxy_new.add_parameter (new CCodeParameter ("connection", "DBusGConnection*"));
+ proxy_new.add_parameter (new CCodeParameter ("name", "const char*"));
+ proxy_new.add_parameter (new CCodeParameter ("path", "const char*"));
decl_space.add_function_declaration (proxy_new);
}
@@ -1095,9 +1095,9 @@ public class Vala.DBusClientModule : DBusModule {
// generate proxy_new function
var proxy_new = new CCodeFunction (lower_cname + "_new", iface.get_cname () + "*");
- proxy_new.add_parameter (new CCodeFormalParameter ("connection", "DBusGConnection*"));
- proxy_new.add_parameter (new CCodeFormalParameter ("name", "const char*"));
- proxy_new.add_parameter (new CCodeFormalParameter ("path", "const char*"));
+ proxy_new.add_parameter (new CCodeParameter ("connection", "DBusGConnection*"));
+ proxy_new.add_parameter (new CCodeParameter ("name", "const char*"));
+ proxy_new.add_parameter (new CCodeParameter ("path", "const char*"));
var new_block = new CCodeBlock ();
@@ -1124,9 +1124,9 @@ public class Vala.DBusClientModule : DBusModule {
// dbus proxy construct
var proxy_construct = new CCodeFunction (lower_cname + "_construct", "GObject*");
- proxy_construct.add_parameter (new CCodeFormalParameter ("gtype", "GType"));
- proxy_construct.add_parameter (new CCodeFormalParameter ("n_properties", "guint"));
- proxy_construct.add_parameter (new CCodeFormalParameter ("properties", "GObjectConstructParam*"));
+ proxy_construct.add_parameter (new CCodeParameter ("gtype", "GType"));
+ proxy_construct.add_parameter (new CCodeParameter ("n_properties", "guint"));
+ proxy_construct.add_parameter (new CCodeParameter ("properties", "GObjectConstructParam*"));
proxy_construct.modifiers = CCodeModifiers.STATIC;
proxy_construct.block = new CCodeBlock ();
@@ -1211,7 +1211,7 @@ public class Vala.DBusClientModule : DBusModule {
// dbus proxy dispose
var proxy_dispose = new CCodeFunction (lower_cname + "_dispose", "void");
- proxy_dispose.add_parameter (new CCodeFormalParameter ("self", "GObject*"));
+ proxy_dispose.add_parameter (new CCodeParameter ("self", "GObject*"));
proxy_dispose.modifiers = CCodeModifiers.STATIC;
proxy_dispose.block = new CCodeBlock ();
@@ -1251,7 +1251,7 @@ public class Vala.DBusClientModule : DBusModule {
cfile.add_function (proxy_dispose);
var proxy_class_init = new CCodeFunction (lower_cname + "_class_init", "void");
- proxy_class_init.add_parameter (new CCodeFormalParameter ("klass", cname + "Class*"));
+ proxy_class_init.add_parameter (new CCodeParameter ("klass", cname + "Class*"));
proxy_class_init.modifiers = CCodeModifiers.STATIC;
proxy_class_init.block = new CCodeBlock ();
var gobject_class = new CCodeFunctionCall (new CCodeIdentifier ("G_OBJECT_CLASS"));
@@ -1270,7 +1270,7 @@ public class Vala.DBusClientModule : DBusModule {
cfile.add_type_member_declaration (prop_enum);
var proxy_instance_init = new CCodeFunction (lower_cname + "_init", "void");
- proxy_instance_init.add_parameter (new CCodeFormalParameter ("self", cname + "*"));
+ proxy_instance_init.add_parameter (new CCodeParameter ("self", cname + "*"));
proxy_instance_init.modifiers = CCodeModifiers.STATIC;
proxy_instance_init.block = new CCodeBlock ();
cfile.add_function (proxy_instance_init);
@@ -1281,20 +1281,20 @@ public class Vala.DBusClientModule : DBusModule {
// TODO add actual implementation
var get_prop = new CCodeFunction ("_vala_%s_get_property".printf (lower_cname), "void");
get_prop.modifiers = CCodeModifiers.STATIC;
- get_prop.add_parameter (new CCodeFormalParameter ("object", "GObject *"));
- get_prop.add_parameter (new CCodeFormalParameter ("property_id", "guint"));
- get_prop.add_parameter (new CCodeFormalParameter ("value", "GValue *"));
- get_prop.add_parameter (new CCodeFormalParameter ("pspec", "GParamSpec *"));
+ get_prop.add_parameter (new CCodeParameter ("object", "GObject *"));
+ get_prop.add_parameter (new CCodeParameter ("property_id", "guint"));
+ get_prop.add_parameter (new CCodeParameter ("value", "GValue *"));
+ get_prop.add_parameter (new CCodeParameter ("pspec", "GParamSpec *"));
cfile.add_function_declaration (get_prop);
get_prop.block = new CCodeBlock ();
cfile.add_function (get_prop);
var set_prop = new CCodeFunction ("_vala_%s_set_property".printf (lower_cname), "void");
set_prop.modifiers = CCodeModifiers.STATIC;
- set_prop.add_parameter (new CCodeFormalParameter ("object", "GObject *"));
- set_prop.add_parameter (new CCodeFormalParameter ("property_id", "guint"));
- set_prop.add_parameter (new CCodeFormalParameter ("value", "const GValue *"));
- set_prop.add_parameter (new CCodeFormalParameter ("pspec", "GParamSpec *"));
+ set_prop.add_parameter (new CCodeParameter ("object", "GObject *"));
+ set_prop.add_parameter (new CCodeParameter ("property_id", "guint"));
+ set_prop.add_parameter (new CCodeParameter ("value", "const GValue *"));
+ set_prop.add_parameter (new CCodeParameter ("pspec", "GParamSpec *"));
cfile.add_function_declaration (set_prop);
set_prop.block = new CCodeBlock ();
cfile.add_function (set_prop);
@@ -1320,9 +1320,9 @@ public class Vala.DBusClientModule : DBusModule {
var function = new CCodeFunction (get_all_func, "GHashTable*");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", "DBusGProxy*"));
- function.add_parameter (new CCodeFormalParameter ("interface_name", "const gchar*"));
- function.add_parameter (new CCodeFormalParameter ("error", "GError**"));
+ function.add_parameter (new CCodeParameter ("self", "DBusGProxy*"));
+ function.add_parameter (new CCodeParameter ("interface_name", "const gchar*"));
+ function.add_parameter (new CCodeParameter ("error", "GError**"));
var block = new CCodeBlock ();
var prefragment = new CCodeFragment ();
@@ -1467,9 +1467,9 @@ public class Vala.DBusClientModule : DBusModule {
string lower_cname = iface.get_lower_case_cprefix () + "dbus_proxy";
var proxy_filter = new CCodeFunction (lower_cname + "_filter", "DBusHandlerResult");
- proxy_filter.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- proxy_filter.add_parameter (new CCodeFormalParameter ("message", "DBusMessage*"));
- proxy_filter.add_parameter (new CCodeFormalParameter ("user_data", "void*"));
+ proxy_filter.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ proxy_filter.add_parameter (new CCodeParameter ("message", "DBusMessage*"));
+ proxy_filter.add_parameter (new CCodeParameter ("user_data", "void*"));
var filter_block = new CCodeBlock ();
@@ -1503,9 +1503,9 @@ public class Vala.DBusClientModule : DBusModule {
var function = new CCodeFunction (wrapper_name, "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", sym.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- function.add_parameter (new CCodeFormalParameter ("message", "DBusMessage*"));
+ function.add_parameter (new CCodeParameter ("self", sym.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ function.add_parameter (new CCodeParameter ("message", "DBusMessage*"));
var block = new CCodeBlock ();
var prefragment = new CCodeFragment ();
@@ -1537,7 +1537,7 @@ public class Vala.DBusClientModule : DBusModule {
// expected type signature for input parameters
string type_signature = "";
- foreach (FormalParameter param in sig.get_parameters ()) {
+ foreach (Parameter param in sig.get_parameters ()) {
var owned_type = param.variable_type.copy ();
owned_type.value_owned = true;
@@ -1680,7 +1680,7 @@ public class Vala.DBusClientModule : DBusModule {
postfragment.append (new CCodeExpressionStatement (iter_call));
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction == ParameterDirection.IN) {
if (param.variable_type.data_type != null
&& param.variable_type.data_type.get_full_name () == "DBus.BusName") {
@@ -1824,7 +1824,7 @@ public class Vala.DBusClientModule : DBusModule {
var function = new CCodeFunction (proxy_name);
function.modifiers = CCodeModifiers.STATIC;
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (m, cfile, cparam_map, function);
@@ -1932,7 +1932,7 @@ public class Vala.DBusClientModule : DBusModule {
var function = new CCodeFunction (proxy_name);
function.modifiers = CCodeModifiers.STATIC;
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (m, cfile, cparam_map, function);
@@ -2114,10 +2114,10 @@ public class Vala.DBusClientModule : DBusModule {
var function = new CCodeFunction (proxy_name, "void");
function.modifiers = CCodeModifiers.STATIC;
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
- cparam_map.set (get_param_pos (-1), new CCodeFormalParameter ("_callback_", "GAsyncReadyCallback"));
- cparam_map.set (get_param_pos (-0.9), new CCodeFormalParameter ("_user_data_", "gpointer"));
+ cparam_map.set (get_param_pos (-1), new CCodeParameter ("_callback_", "GAsyncReadyCallback"));
+ cparam_map.set (get_param_pos (-0.9), new CCodeParameter ("_user_data_", "gpointer"));
generate_cparameters (m, cfile, cparam_map, function, null, null, null, 1);
@@ -2199,8 +2199,8 @@ public class Vala.DBusClientModule : DBusModule {
function = new CCodeFunction ("%sdbus_proxy_%s_ready".printf (iface.get_lower_case_cprefix (), m.name), "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("pending", "DBusPendingCall*"));
- function.add_parameter (new CCodeFormalParameter ("user_data", "void*"));
+ function.add_parameter (new CCodeParameter ("pending", "DBusPendingCall*"));
+ function.add_parameter (new CCodeParameter ("user_data", "void*"));
block = new CCodeBlock ();
@@ -2264,7 +2264,7 @@ public class Vala.DBusClientModule : DBusModule {
// expected type signature for output parameters
string type_signature = "";
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction == ParameterDirection.OUT) {
type_signature += get_type_signature (param.variable_type);
}
@@ -2313,9 +2313,9 @@ public class Vala.DBusClientModule : DBusModule {
var function = new CCodeFunction (proxy_name);
function.modifiers = CCodeModifiers.STATIC;
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
- cparam_map.set (get_param_pos (0.1), new CCodeFormalParameter ("_res_", "GAsyncResult*"));
+ cparam_map.set (get_param_pos (0.1), new CCodeParameter ("_res_", "GAsyncResult*"));
generate_cparameters (m, cfile, cparam_map, function, null, null, null, 2);
@@ -2505,14 +2505,14 @@ public class Vala.DBusClientModule : DBusModule {
var function = new CCodeFunction (proxy_name);
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", "%s*".printf (iface.get_cname ())));
+ function.add_parameter (new CCodeParameter ("self", "%s*".printf (iface.get_cname ())));
if (prop.property_type.is_real_non_null_struct_type ()) {
- function.add_parameter (new CCodeFormalParameter ("result", "%s*".printf (prop.get_accessor.value_type.get_cname ())));
+ function.add_parameter (new CCodeParameter ("result", "%s*".printf (prop.get_accessor.value_type.get_cname ())));
} else {
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeFormalParameter ("result_length%d".printf (dim), "int*"));
+ function.add_parameter (new CCodeParameter ("result_length%d".printf (dim), "int*"));
}
}
@@ -2679,16 +2679,16 @@ public class Vala.DBusClientModule : DBusModule {
var function = new CCodeFunction (proxy_name);
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", "%s*".printf (iface.get_cname ())));
+ function.add_parameter (new CCodeParameter ("self", "%s*".printf (iface.get_cname ())));
if (prop.property_type.is_real_non_null_struct_type ()) {
- function.add_parameter (new CCodeFormalParameter ("value", "%s*".printf (prop.set_accessor.value_type.get_cname ())));
+ function.add_parameter (new CCodeParameter ("value", "%s*".printf (prop.set_accessor.value_type.get_cname ())));
} else {
- function.add_parameter (new CCodeFormalParameter ("value", prop.set_accessor.value_type.get_cname ()));
+ function.add_parameter (new CCodeParameter ("value", prop.set_accessor.value_type.get_cname ()));
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeFormalParameter ("value_length%d".printf (dim), "int"));
+ function.add_parameter (new CCodeParameter ("value_length%d".printf (dim), "int"));
}
}
}
diff --git a/codegen/valadbusmodule.vala b/codegen/valadbusmodule.vala
index 82fa878..ada1138 100644
--- a/codegen/valadbusmodule.vala
+++ b/codegen/valadbusmodule.vala
@@ -212,8 +212,8 @@ public class Vala.DBusModule : GAsyncModule {
var from_string_name = "%s_from_string".printf (en.get_lower_case_cname (null));
var from_string_func = new CCodeFunction (from_string_name, en.get_cname ());
- from_string_func.add_parameter (new CCodeFormalParameter ("str", "const char*"));
- from_string_func.add_parameter (new CCodeFormalParameter ("error", "GError**"));
+ from_string_func.add_parameter (new CCodeParameter ("str", "const char*"));
+ from_string_func.add_parameter (new CCodeParameter ("error", "GError**"));
return from_string_func;
}
@@ -222,8 +222,8 @@ public class Vala.DBusModule : GAsyncModule {
var from_string_name = "%s_from_string".printf (en.get_lower_case_cname (null));
var from_string_func = new CCodeFunction (from_string_name, en.get_cname ());
- from_string_func.add_parameter (new CCodeFormalParameter ("str", "const char*"));
- from_string_func.add_parameter (new CCodeFormalParameter ("error", "GError**"));
+ from_string_func.add_parameter (new CCodeParameter ("str", "const char*"));
+ from_string_func.add_parameter (new CCodeParameter ("error", "GError**"));
var from_string_block = new CCodeBlock ();
from_string_func.block = from_string_block;
@@ -657,7 +657,7 @@ public class Vala.DBusModule : GAsyncModule {
var to_string_name = "%s_to_string".printf (en.get_lower_case_cname (null));
var to_string_func = new CCodeFunction (to_string_name, "const char*");
- to_string_func.add_parameter (new CCodeFormalParameter ("value", en.get_cname ()));
+ to_string_func.add_parameter (new CCodeParameter ("value", en.get_cname ()));
return to_string_func;
}
@@ -666,7 +666,7 @@ public class Vala.DBusModule : GAsyncModule {
var to_string_name = "%s_to_string".printf (en.get_lower_case_cname (null));
var to_string_func = new CCodeFunction (to_string_name, "const char*");
- to_string_func.add_parameter (new CCodeFormalParameter ("value", en.get_cname ()));
+ to_string_func.add_parameter (new CCodeParameter ("value", en.get_cname ()));
var to_string_block = new CCodeBlock ();
to_string_func.block = to_string_block;
@@ -1001,9 +1001,9 @@ public class Vala.DBusModule : GAsyncModule {
cfile.add_type_declaration (new CCodeTypeDefinition ("struct _DBusObjectVTable", new CCodeVariableDeclarator ("_DBusObjectVTable")));
var cfunc = new CCodeFunction ("_vala_dbus_register_object", "void");
- cfunc.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- cfunc.add_parameter (new CCodeFormalParameter ("path", "const char*"));
- cfunc.add_parameter (new CCodeFormalParameter ("object", "void*"));
+ cfunc.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ cfunc.add_parameter (new CCodeParameter ("path", "const char*"));
+ cfunc.add_parameter (new CCodeParameter ("object", "void*"));
cfunc.modifiers |= CCodeModifiers.STATIC;
cfile.add_function_declaration (cfunc);
@@ -1045,8 +1045,8 @@ public class Vala.DBusModule : GAsyncModule {
// unregister function
cfunc = new CCodeFunction ("_vala_dbus_unregister_object", "void");
- cfunc.add_parameter (new CCodeFormalParameter ("connection", "gpointer"));
- cfunc.add_parameter (new CCodeFormalParameter ("object", "GObject*"));
+ cfunc.add_parameter (new CCodeParameter ("connection", "gpointer"));
+ cfunc.add_parameter (new CCodeParameter ("object", "GObject*"));
cfunc.modifiers |= CCodeModifiers.STATIC;
cfile.add_function_declaration (cfunc);
diff --git a/codegen/valadbusservermodule.vala b/codegen/valadbusservermodule.vala
index 9476d51..cb95b9b 100644
--- a/codegen/valadbusservermodule.vala
+++ b/codegen/valadbusservermodule.vala
@@ -83,9 +83,9 @@ public class Vala.DBusServerModule : DBusClientModule {
var function = new CCodeFunction (wrapper_name, "DBusHandlerResult");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", sym.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- function.add_parameter (new CCodeFormalParameter ("message", "DBusMessage*"));
+ function.add_parameter (new CCodeParameter ("self", sym.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ function.add_parameter (new CCodeParameter ("message", "DBusMessage*"));
var block = new CCodeBlock ();
CCodeFunction ready_function = null;
@@ -96,9 +96,9 @@ public class Vala.DBusServerModule : DBusClientModule {
ready_function = new CCodeFunction (wrapper_name + "_ready", "void");
ready_function.modifiers = CCodeModifiers.STATIC;
- ready_function.add_parameter (new CCodeFormalParameter ("source_object", "GObject *"));
- ready_function.add_parameter (new CCodeFormalParameter ("_res_", "GAsyncResult *"));
- ready_function.add_parameter (new CCodeFormalParameter ("_user_data_", "gpointer *"));
+ ready_function.add_parameter (new CCodeParameter ("source_object", "GObject *"));
+ ready_function.add_parameter (new CCodeParameter ("_res_", "GAsyncResult *"));
+ ready_function.add_parameter (new CCodeParameter ("_user_data_", "gpointer *"));
ready_block = new CCodeBlock ();
cdecl = new CCodeDeclaration ("DBusConnection *");
@@ -176,7 +176,7 @@ public class Vala.DBusServerModule : DBusClientModule {
// expected type signature for input parameters
string type_signature = "";
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
var owned_type = param.variable_type.copy ();
owned_type.value_owned = true;
@@ -491,22 +491,22 @@ public class Vala.DBusServerModule : DBusClientModule {
var function = new CCodeFunction (wrapper_name, "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("_sender", "GObject*"));
+ function.add_parameter (new CCodeParameter ("_sender", "GObject*"));
foreach (var param in sig.get_parameters ()) {
// ensure ccodenode of parameter is set
- var cparam = generate_parameter (param, cfile, new HashMap<int,CCodeFormalParameter> (), null);
+ var cparam = generate_parameter (param, cfile, new HashMap<int,CCodeParameter> (), null);
function.add_parameter (cparam);
if (param.variable_type is ArrayType) {
var array_type = (ArrayType) param.variable_type;
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeFormalParameter (get_parameter_array_length_cname (param, dim), "int"));
+ function.add_parameter (new CCodeParameter (get_parameter_array_length_cname (param, dim), "int"));
}
}
}
- function.add_parameter (new CCodeFormalParameter ("_connection", "DBusConnection*"));
+ function.add_parameter (new CCodeParameter ("_connection", "DBusConnection*"));
var block = new CCodeBlock ();
var prefragment = new CCodeFragment ();
@@ -540,7 +540,7 @@ public class Vala.DBusServerModule : DBusClientModule {
iter_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("_iter")));
prefragment.append (new CCodeExpressionStatement (iter_call));
- foreach (FormalParameter param in sig.get_parameters ()) {
+ foreach (Parameter param in sig.get_parameters ()) {
CCodeExpression expr = new CCodeIdentifier (param.name);
if (param.variable_type.is_real_struct_type ()) {
expr = new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, expr);
@@ -572,9 +572,9 @@ public class Vala.DBusServerModule : DBusClientModule {
var sym = object_type.type_symbol;
var cfunc = new CCodeFunction (sym.get_lower_case_cprefix () + "dbus_register_object", "void");
- cfunc.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- cfunc.add_parameter (new CCodeFormalParameter ("path", "const char*"));
- cfunc.add_parameter (new CCodeFormalParameter ("object", "void*"));
+ cfunc.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ cfunc.add_parameter (new CCodeParameter ("path", "const char*"));
+ cfunc.add_parameter (new CCodeParameter ("object", "void*"));
add_dbus_helpers ();
@@ -641,8 +641,8 @@ public class Vala.DBusServerModule : DBusClientModule {
var sym = object_type.type_symbol;
var cfunc = new CCodeFunction ("_" + sym.get_lower_case_cprefix () + "dbus_unregister", "void");
- cfunc.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- cfunc.add_parameter (new CCodeFormalParameter ("_user_data_", "void*"));
+ cfunc.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ cfunc.add_parameter (new CCodeParameter ("_user_data_", "void*"));
cfile.add_function_declaration (cfunc);
@@ -699,9 +699,9 @@ public class Vala.DBusServerModule : DBusClientModule {
var function = new CCodeFunction (wrapper_name, "DBusHandlerResult");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", sym.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- function.add_parameter (new CCodeFormalParameter ("message", "DBusMessage*"));
+ function.add_parameter (new CCodeParameter ("self", sym.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ function.add_parameter (new CCodeParameter ("message", "DBusMessage*"));
var block = new CCodeBlock ();
var prefragment = new CCodeFragment ();
@@ -903,9 +903,9 @@ public class Vala.DBusServerModule : DBusClientModule {
var function = new CCodeFunction (wrapper_name, "DBusHandlerResult");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", sym.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- function.add_parameter (new CCodeFormalParameter ("message", "DBusMessage*"));
+ function.add_parameter (new CCodeParameter ("self", sym.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ function.add_parameter (new CCodeParameter ("message", "DBusMessage*"));
var block = new CCodeBlock ();
var prefragment = new CCodeFragment ();
@@ -1103,9 +1103,9 @@ public class Vala.DBusServerModule : DBusClientModule {
var function = new CCodeFunction (wrapper_name, "DBusHandlerResult");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", sym.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- function.add_parameter (new CCodeFormalParameter ("message", "DBusMessage*"));
+ function.add_parameter (new CCodeParameter ("self", sym.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ function.add_parameter (new CCodeParameter ("message", "DBusMessage*"));
var block = new CCodeBlock ();
var prefragment = new CCodeFragment ();
@@ -1361,9 +1361,9 @@ public class Vala.DBusServerModule : DBusClientModule {
var function = new CCodeFunction (wrapper_name, "DBusHandlerResult");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", sym.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- function.add_parameter (new CCodeFormalParameter ("message", "DBusMessage*"));
+ function.add_parameter (new CCodeParameter ("self", sym.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ function.add_parameter (new CCodeParameter ("message", "DBusMessage*"));
var block = new CCodeBlock ();
@@ -1513,9 +1513,9 @@ public class Vala.DBusServerModule : DBusClientModule {
add_dbus_helpers ();
var cfunc = new CCodeFunction (sym.get_lower_case_cprefix () + "dbus_message", "DBusHandlerResult");
- cfunc.add_parameter (new CCodeFormalParameter ("connection", "DBusConnection*"));
- cfunc.add_parameter (new CCodeFormalParameter ("message", "DBusMessage*"));
- cfunc.add_parameter (new CCodeFormalParameter ("object", "void*"));
+ cfunc.add_parameter (new CCodeParameter ("connection", "DBusConnection*"));
+ cfunc.add_parameter (new CCodeParameter ("message", "DBusMessage*"));
+ cfunc.add_parameter (new CCodeParameter ("object", "void*"));
if (sym.is_private_symbol ()) {
cfunc.modifiers |= CCodeModifiers.STATIC;
diff --git a/codegen/valadovabasemodule.vala b/codegen/valadovabasemodule.vala
index 58ba7e9..a770454 100644
--- a/codegen/valadovabasemodule.vala
+++ b/codegen/valadovabasemodule.vala
@@ -542,7 +542,7 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
return false;
}
- public override void visit_formal_parameter (FormalParameter p) {
+ public override void visit_formal_parameter (Parameter p) {
}
public override void visit_property (Property prop) {
@@ -606,7 +606,7 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
return result;
}
- void capture_parameter (FormalParameter param, CCodeStruct data, int block_id, CCodeBlock free_block) {
+ void capture_parameter (Parameter param, CCodeStruct data, int block_id, CCodeBlock free_block) {
generate_type_declaration (param.variable_type, cfile);
var param_type = param.variable_type.copy ();
@@ -777,7 +777,7 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
cfile.add_function (type_get_fun);
var unref_fun = new CCodeFunction ("block%d_data_finalize".printf (block_id), "void");
- unref_fun.add_parameter (new CCodeFormalParameter ("_data%d_".printf (block_id), struct_name + "*"));
+ unref_fun.add_parameter (new CCodeParameter ("_data%d_".printf (block_id), struct_name + "*"));
unref_fun.modifiers = CCodeModifiers.STATIC;
cfile.add_function_declaration (unref_fun);
unref_fun.block = free_block;
@@ -801,7 +801,7 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
if (b.parent_symbol is Method) {
var m = (Method) b.parent_symbol;
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (!param.captured && requires_destroy (param.variable_type) && param.direction == ParameterDirection.IN) {
var ma = new MemberAccess.simple (param.name);
ma.symbol_reference = param;
@@ -1291,7 +1291,7 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
}
private void append_param_free (Method m) {
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (requires_destroy (param.variable_type) && param.direction == ParameterDirection.IN) {
var ma = new MemberAccess.simple (param.name);
ma.symbol_reference = param;
@@ -1624,10 +1624,10 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
bool ellipsis = false;
int i = 1;
- Iterator<FormalParameter> params_it = params.iterator ();
+ Iterator<Parameter> params_it = params.iterator ();
foreach (Expression arg in expr.get_argument_list ()) {
CCodeExpression cexpr = get_cvalue (arg);
- FormalParameter param = null;
+ Parameter param = null;
if (params_it.next ()) {
param = params_it.get ();
ellipsis = param.ellipsis;
@@ -1728,7 +1728,7 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
}
}
- public CCodeExpression? handle_struct_argument (FormalParameter param, Expression arg, CCodeExpression? cexpr) {
+ public CCodeExpression? handle_struct_argument (Parameter param, Expression arg, CCodeExpression? cexpr) {
if (arg.formal_target_type is GenericType && !(arg.target_type is GenericType)) {
// we already use a reference for arguments of ref and out parameters
if (param.direction == ParameterDirection.IN) {
@@ -2085,12 +2085,12 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
var call = new CCodeFunctionCall (source_cexpr);
if (method_type.method_symbol.binding == MemberBinding.INSTANCE) {
- wrapper.add_parameter (new CCodeFormalParameter ("this", "void *"));
+ wrapper.add_parameter (new CCodeParameter ("this", "void *"));
call.add_argument (new CCodeIdentifier ("this"));
}
var method_param_iter = method_type.method_symbol.get_parameters ().iterator ();
- foreach (FormalParameter param in d.get_parameters ()) {
+ foreach (Parameter param in d.get_parameters ()) {
method_param_iter.next ();
var method_param = method_param_iter.get ();
string ctype = param.variable_type.get_cname ();
@@ -2103,7 +2103,7 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
call.add_argument (new CCodeIdentifier (param.name));
}
- wrapper.add_parameter (new CCodeFormalParameter (param.name, ctype));
+ wrapper.add_parameter (new CCodeParameter (param.name, ctype));
}
wrapper.block = new CCodeBlock ();
@@ -2112,7 +2112,7 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
} else {
var method_return_type = method_type.method_symbol.return_type;
if (d.return_type is GenericType && !(method_return_type is GenericType)) {
- wrapper.add_parameter (new CCodeFormalParameter ("result", method_return_type.get_cname () + "*"));
+ wrapper.add_parameter (new CCodeParameter ("result", method_return_type.get_cname () + "*"));
wrapper.block.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, new CCodeIdentifier ("result")), call)));
} else if (!(d.return_type is GenericType) && method_return_type is GenericType) {
wrapper.return_type = d.return_type.get_cname ();
@@ -2122,7 +2122,7 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
wrapper.block.add_statement (new CCodeExpressionStatement (call));
wrapper.block.add_statement (new CCodeReturnStatement (new CCodeIdentifier ("result")));
} else if (d.return_type is GenericType) {
- wrapper.add_parameter (new CCodeFormalParameter ("result", "void *"));
+ wrapper.add_parameter (new CCodeParameter ("result", "void *"));
wrapper.block.add_statement (new CCodeExpressionStatement (call));
} else {
wrapper.return_type = d.return_type.get_cname ();
diff --git a/codegen/valadovadelegatemodule.vala b/codegen/valadovadelegatemodule.vala
index 4828573..a96f34e 100644
--- a/codegen/valadovadelegatemodule.vala
+++ b/codegen/valadovadelegatemodule.vala
@@ -46,7 +46,7 @@ public class Vala.DovaDelegateModule : DovaValueModule {
if (d.is_internal_symbol ()) {
type_init_fun.modifiers = CCodeModifiers.STATIC;
}
- type_init_fun.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("type", "DovaType *"));
decl_space.add_function_declaration (type_init_fun);
generate_type_declaration (d.return_type, decl_space);
@@ -66,8 +66,8 @@ public class Vala.DovaDelegateModule : DovaValueModule {
function.modifiers |= CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("target", "DovaObject *"));
- function.add_parameter (new CCodeFormalParameter ("(*method) (void)", "void"));
+ function.add_parameter (new CCodeParameter ("target", "DovaObject *"));
+ function.add_parameter (new CCodeParameter ("(*method) (void)", "void"));
function.block = new CCodeBlock ();
@@ -100,14 +100,14 @@ public class Vala.DovaDelegateModule : DovaValueModule {
function.modifiers |= CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("this", "%s*".printf (d.get_cname ())));
+ function.add_parameter (new CCodeParameter ("this", "%s*".printf (d.get_cname ())));
string param_list = "";
- foreach (FormalParameter param in d.get_parameters ()) {
+ foreach (Parameter param in d.get_parameters ()) {
generate_type_declaration (param.variable_type, decl_space);
- function.add_parameter (new CCodeFormalParameter (param.name, param.variable_type.get_cname ()));
+ function.add_parameter (new CCodeParameter (param.name, param.variable_type.get_cname ()));
if (param_list != "") {
param_list += ", ";
@@ -116,7 +116,7 @@ public class Vala.DovaDelegateModule : DovaValueModule {
}
if (d.return_type is GenericType) {
- function.add_parameter (new CCodeFormalParameter ("result", "void *"));
+ function.add_parameter (new CCodeParameter ("result", "void *"));
if (param_list != "") {
param_list += ", ";
@@ -161,7 +161,7 @@ public class Vala.DovaDelegateModule : DovaValueModule {
var static_block = new CCodeBlock ();
var static_call = new CCodeFunctionCall (new CCodeCastExpression (new CCodeMemberAccess.pointer (priv, "method"), "%s (*) %s".printf (function.return_type, static_param_list)));
- foreach (FormalParameter param in d.get_parameters ()) {
+ foreach (Parameter param in d.get_parameters ()) {
instance_call.add_argument (new CCodeIdentifier (param.name));
static_call.add_argument (new CCodeIdentifier (param.name));
}
diff --git a/codegen/valadovamemberaccessmodule.vala b/codegen/valadovamemberaccessmodule.vala
index 71f03d9..d5df7e0 100644
--- a/codegen/valadovamemberaccessmodule.vala
+++ b/codegen/valadovamemberaccessmodule.vala
@@ -190,8 +190,8 @@ public abstract class Vala.DovaMemberAccessModule : DovaControlFlowModule {
} else if (expr.symbol_reference is LocalVariable) {
var local = (LocalVariable) expr.symbol_reference;
expr.target_value = load_local (local);
- } else if (expr.symbol_reference is FormalParameter) {
- var p = (FormalParameter) expr.symbol_reference;
+ } else if (expr.symbol_reference is Parameter) {
+ var p = (Parameter) expr.symbol_reference;
if (p.name == "this") {
if (current_method != null && current_method.coroutine) {
// use closure
diff --git a/codegen/valadovamethodcallmodule.vala b/codegen/valadovamethodcallmodule.vala
index 37a4427..5490a61 100644
--- a/codegen/valadovamethodcallmodule.vala
+++ b/codegen/valadovamethodcallmodule.vala
@@ -27,7 +27,7 @@ public class Vala.DovaMethodCallModule : DovaAssignmentModule {
Method m = null;
Delegate deleg = null;
- List<FormalParameter> params;
+ List<Parameter> params;
var ma = expr.call as MemberAccess;
@@ -114,7 +114,7 @@ public class Vala.DovaMethodCallModule : DovaAssignmentModule {
bool ellipsis = false;
int i = 1;
- Iterator<FormalParameter> params_it = params.iterator ();
+ Iterator<Parameter> params_it = params.iterator ();
foreach (Expression arg in expr.get_argument_list ()) {
CCodeExpression cexpr = get_cvalue (arg);
diff --git a/codegen/valadovaobjectmodule.vala b/codegen/valadovaobjectmodule.vala
index 6112c72..6ffc95c 100644
--- a/codegen/valadovaobjectmodule.vala
+++ b/codegen/valadovaobjectmodule.vala
@@ -43,27 +43,27 @@ public class Vala.DovaObjectModule : DovaArrayModule {
decl_space.add_type_definition (instance_struct);
} else if (cl == type_class) {
var value_copy_function = new CCodeFunction ("dova_type_value_copy");
- value_copy_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- value_copy_function.add_parameter (new CCodeFormalParameter ("dest", "void *"));
- value_copy_function.add_parameter (new CCodeFormalParameter ("dest_index", "intptr_t"));
- value_copy_function.add_parameter (new CCodeFormalParameter ("src", "void *"));
- value_copy_function.add_parameter (new CCodeFormalParameter ("src_index", "intptr_t"));
+ value_copy_function.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ value_copy_function.add_parameter (new CCodeParameter ("dest", "void *"));
+ value_copy_function.add_parameter (new CCodeParameter ("dest_index", "intptr_t"));
+ value_copy_function.add_parameter (new CCodeParameter ("src", "void *"));
+ value_copy_function.add_parameter (new CCodeParameter ("src_index", "intptr_t"));
cfile.add_function_declaration (value_copy_function);
var value_equals_function = new CCodeFunction ("dova_type_value_equals", "bool");
- value_equals_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- value_equals_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
- value_equals_function.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
- value_equals_function.add_parameter (new CCodeFormalParameter ("other", "void *"));
- value_equals_function.add_parameter (new CCodeFormalParameter ("other_index", "intptr_t"));
+ value_equals_function.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ value_equals_function.add_parameter (new CCodeParameter ("value", "void *"));
+ value_equals_function.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
+ value_equals_function.add_parameter (new CCodeParameter ("other", "void *"));
+ value_equals_function.add_parameter (new CCodeParameter ("other_index", "intptr_t"));
cfile.add_function_declaration (value_equals_function);
var value_hash_function = new CCodeFunction ("dova_type_value_hash", "uintptr_t");
- value_hash_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- value_hash_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
- value_hash_function.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ value_hash_function.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ value_hash_function.add_parameter (new CCodeParameter ("value", "void *"));
+ value_hash_function.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
cfile.add_function_declaration (value_hash_function);
}
@@ -80,7 +80,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
type_fun.modifiers = CCodeModifiers.STATIC;
}
foreach (var type_param in cl.get_type_parameters ()) {
- type_fun.add_parameter (new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
+ type_fun.add_parameter (new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
}
decl_space.add_function_declaration (type_fun);
@@ -88,9 +88,9 @@ public class Vala.DovaObjectModule : DovaArrayModule {
if (cl.is_internal_symbol ()) {
type_init_fun.modifiers = CCodeModifiers.STATIC;
}
- type_init_fun.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("type", "DovaType *"));
foreach (var type_param in cl.get_type_parameters ()) {
- type_init_fun.add_parameter (new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
}
decl_space.add_function_declaration (type_init_fun);
}
@@ -159,45 +159,45 @@ public class Vala.DovaObjectModule : DovaArrayModule {
if (cl.get_full_name () == "Dova.Type") {
var vdeclarator = new CCodeFunctionDeclarator ("value_copy");
- vdeclarator.add_parameter (new CCodeFormalParameter ("dest", "void *"));
- vdeclarator.add_parameter (new CCodeFormalParameter ("dest_index", "intptr_t"));
- vdeclarator.add_parameter (new CCodeFormalParameter ("src", "void *"));
- vdeclarator.add_parameter (new CCodeFormalParameter ("src_index", "intptr_t"));
+ vdeclarator.add_parameter (new CCodeParameter ("dest", "void *"));
+ vdeclarator.add_parameter (new CCodeParameter ("dest_index", "intptr_t"));
+ vdeclarator.add_parameter (new CCodeParameter ("src", "void *"));
+ vdeclarator.add_parameter (new CCodeParameter ("src_index", "intptr_t"));
var vdecl = new CCodeDeclaration ("void");
vdecl.add_declarator (vdeclarator);
instance_priv_struct.add_declaration (vdecl);
vdeclarator = new CCodeFunctionDeclarator ("value_equals");
- vdeclarator.add_parameter (new CCodeFormalParameter ("value", "void *"));
- vdeclarator.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
- vdeclarator.add_parameter (new CCodeFormalParameter ("other", "void *"));
- vdeclarator.add_parameter (new CCodeFormalParameter ("other_index", "intptr_t"));
+ vdeclarator.add_parameter (new CCodeParameter ("value", "void *"));
+ vdeclarator.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
+ vdeclarator.add_parameter (new CCodeParameter ("other", "void *"));
+ vdeclarator.add_parameter (new CCodeParameter ("other_index", "intptr_t"));
vdecl = new CCodeDeclaration ("bool");
vdecl.add_declarator (vdeclarator);
instance_priv_struct.add_declaration (vdecl);
vdeclarator = new CCodeFunctionDeclarator ("value_hash");
- vdeclarator.add_parameter (new CCodeFormalParameter ("value", "void *"));
- vdeclarator.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ vdeclarator.add_parameter (new CCodeParameter ("value", "void *"));
+ vdeclarator.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
vdecl = new CCodeDeclaration ("uintptr_t");
vdecl.add_declarator (vdeclarator);
instance_priv_struct.add_declaration (vdecl);
vdeclarator = new CCodeFunctionDeclarator ("value_to_any");
- vdeclarator.add_parameter (new CCodeFormalParameter ("value", "void *"));
- vdeclarator.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ vdeclarator.add_parameter (new CCodeParameter ("value", "void *"));
+ vdeclarator.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
vdecl = new CCodeDeclaration ("DovaObject *");
vdecl.add_declarator (vdeclarator);
instance_priv_struct.add_declaration (vdecl);
vdeclarator = new CCodeFunctionDeclarator ("value_from_any");
- vdeclarator.add_parameter (new CCodeFormalParameter ("any_", "any *"));
- vdeclarator.add_parameter (new CCodeFormalParameter ("value", "void *"));
- vdeclarator.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ vdeclarator.add_parameter (new CCodeParameter ("any_", "any *"));
+ vdeclarator.add_parameter (new CCodeParameter ("value", "void *"));
+ vdeclarator.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
vdecl = new CCodeDeclaration ("void");
vdecl.add_declarator (vdeclarator);
@@ -223,8 +223,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
var t = (ObjectTypeSymbol) prop.parent_symbol;
var this_type = new ObjectType (t);
- var cselfparam = new CCodeFormalParameter ("this", this_type.get_cname ());
- var cvalueparam = new CCodeFormalParameter ("value", prop.property_type.get_cname ());
+ var cselfparam = new CCodeParameter ("this", this_type.get_cname ());
+ var cvalueparam = new CCodeParameter ("value", prop.property_type.get_cname ());
if (prop.get_accessor != null) {
var vdeclarator = new CCodeFunctionDeclarator ("get_%s".printf (prop.name));
@@ -290,8 +290,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
CCodeFunction create_set_value_copy_function (bool decl_only = false) {
var result = new CCodeFunction ("dova_type_set_value_copy");
- result.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- result.add_parameter (new CCodeFormalParameter ("(*function) (void *dest, intptr_t dest_index, void *src, intptr_t src_index)", "void"));
+ result.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ result.add_parameter (new CCodeParameter ("(*function) (void *dest, intptr_t dest_index, void *src, intptr_t src_index)", "void"));
if (decl_only) {
return result;
}
@@ -314,8 +314,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
CCodeFunction create_set_value_equals_function (bool decl_only = false) {
var result = new CCodeFunction ("dova_type_set_value_equals");
- result.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- result.add_parameter (new CCodeFormalParameter ("(*function) (void *value, intptr_t value_index, void *other, intptr_t other_index)", "bool"));
+ result.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ result.add_parameter (new CCodeParameter ("(*function) (void *value, intptr_t value_index, void *other, intptr_t other_index)", "bool"));
if (decl_only) {
return result;
}
@@ -338,8 +338,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
CCodeFunction create_set_value_hash_function (bool decl_only = false) {
var result = new CCodeFunction ("dova_type_set_value_hash");
- result.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- result.add_parameter (new CCodeFormalParameter ("(*function) (void *value, intptr_t value_index)", "uintptr_t"));
+ result.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ result.add_parameter (new CCodeParameter ("(*function) (void *value, intptr_t value_index)", "uintptr_t"));
if (decl_only) {
return result;
}
@@ -362,8 +362,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
CCodeFunction create_set_value_to_any_function (bool decl_only = false) {
var result = new CCodeFunction ("dova_type_set_value_to_any");
- result.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- result.add_parameter (new CCodeFormalParameter ("(*function) (void *value, intptr_t value_index)", "DovaObject *"));
+ result.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ result.add_parameter (new CCodeParameter ("(*function) (void *value, intptr_t value_index)", "DovaObject *"));
if (decl_only) {
return result;
}
@@ -386,8 +386,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
CCodeFunction create_set_value_from_any_function (bool decl_only = false) {
var result = new CCodeFunction ("dova_type_set_value_from_any");
- result.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- result.add_parameter (new CCodeFormalParameter ("(*function) (DovaObject *any, void *value, intptr_t value_index)", "void"));
+ result.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ result.add_parameter (new CCodeParameter ("(*function) (DovaObject *any, void *value, intptr_t value_index)", "void"));
if (decl_only) {
return result;
}
@@ -432,7 +432,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
var object_type_symbol = cl as ObjectTypeSymbol;
if (object_type_symbol != null) {
foreach (var type_param in object_type_symbol.get_type_parameters ()) {
- type_fun.add_parameter (new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
+ type_fun.add_parameter (new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
}
}
@@ -585,10 +585,10 @@ public class Vala.DovaObjectModule : DovaArrayModule {
if (cl.is_internal_symbol ()) {
type_init_fun.modifiers = CCodeModifiers.STATIC;
}
- type_init_fun.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("type", "DovaType *"));
if (object_type_symbol != null) {
foreach (var type_param in object_type_symbol.get_type_parameters ()) {
- type_init_fun.add_parameter (new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
}
}
type_init_fun.block = new CCodeBlock ();
@@ -611,10 +611,10 @@ public class Vala.DovaObjectModule : DovaArrayModule {
var function = new CCodeFunction ("%s_copy".printf (cl.get_lower_case_cname ()), "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("dest", "any **"));
- function.add_parameter (new CCodeFormalParameter ("dest_index", "intptr_t"));
- function.add_parameter (new CCodeFormalParameter ("src", "any **"));
- function.add_parameter (new CCodeFormalParameter ("src_index", "intptr_t"));
+ function.add_parameter (new CCodeParameter ("dest", "any **"));
+ function.add_parameter (new CCodeParameter ("dest_index", "intptr_t"));
+ function.add_parameter (new CCodeParameter ("src", "any **"));
+ function.add_parameter (new CCodeParameter ("src_index", "intptr_t"));
function.block = new CCodeBlock ();
var cfrag = new CCodeFragment ();
@@ -641,10 +641,10 @@ public class Vala.DovaObjectModule : DovaArrayModule {
{
var value_equals_fun = new CCodeFunction ("%s_value_equals".printf (cl.get_lower_case_cname ()), "bool");
value_equals_fun.modifiers = CCodeModifiers.STATIC;
- value_equals_fun.add_parameter (new CCodeFormalParameter ("value", cl.get_cname () + "**"));
- value_equals_fun.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
- value_equals_fun.add_parameter (new CCodeFormalParameter ("other", cl.get_cname () + "**"));
- value_equals_fun.add_parameter (new CCodeFormalParameter ("other_index", "intptr_t"));
+ value_equals_fun.add_parameter (new CCodeParameter ("value", cl.get_cname () + "**"));
+ value_equals_fun.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
+ value_equals_fun.add_parameter (new CCodeParameter ("other", cl.get_cname () + "**"));
+ value_equals_fun.add_parameter (new CCodeParameter ("other_index", "intptr_t"));
value_equals_fun.block = new CCodeBlock ();
var val = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("value"), new CCodeIdentifier ("value_index"));
var other = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("other"), new CCodeIdentifier ("other_index"));
@@ -665,8 +665,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
{
var value_hash_fun = new CCodeFunction ("%s_value_hash".printf (cl.get_lower_case_cname ()), "uintptr_t");
value_hash_fun.modifiers = CCodeModifiers.STATIC;
- value_hash_fun.add_parameter (new CCodeFormalParameter ("value", cl.get_cname () + "**"));
- value_hash_fun.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ value_hash_fun.add_parameter (new CCodeParameter ("value", cl.get_cname () + "**"));
+ value_hash_fun.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
value_hash_fun.block = new CCodeBlock ();
var val = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("value"), new CCodeIdentifier ("value_index"));
var ccall = new CCodeFunctionCall (new CCodeIdentifier ("any_hash"));
@@ -685,8 +685,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
// generate method to box value
var value_to_any_fun = new CCodeFunction ("%s_value_to_any".printf (cl.get_lower_case_cname ()), "any*");
value_to_any_fun.modifiers = CCodeModifiers.STATIC;
- value_to_any_fun.add_parameter (new CCodeFormalParameter ("value", cl.get_cname () + "**"));
- value_to_any_fun.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ value_to_any_fun.add_parameter (new CCodeParameter ("value", cl.get_cname () + "**"));
+ value_to_any_fun.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
value_to_any_fun.block = new CCodeBlock ();
var val = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("value"), new CCodeIdentifier ("value_index"));
string to_any_fun = "%s_ref".printf (cl.get_lower_case_cname ());
@@ -708,9 +708,9 @@ public class Vala.DovaObjectModule : DovaArrayModule {
// generate method to unbox value
var value_from_any_fun = new CCodeFunction ("%s_value_from_any".printf (cl.get_lower_case_cname ()));
value_from_any_fun.modifiers = CCodeModifiers.STATIC;
- value_from_any_fun.add_parameter (new CCodeFormalParameter ("any_", "any *"));
- value_from_any_fun.add_parameter (new CCodeFormalParameter ("value", cl.get_cname () + "**"));
- value_from_any_fun.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ value_from_any_fun.add_parameter (new CCodeParameter ("any_", "any *"));
+ value_from_any_fun.add_parameter (new CCodeParameter ("value", cl.get_cname () + "**"));
+ value_from_any_fun.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
value_from_any_fun.block = new CCodeBlock ();
string from_any_fun = "%s_ref".printf (cl.get_lower_case_cname ());
if (cl == string_class) {
@@ -756,7 +756,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
var function = new CCodeFunction ("%sfinalize".printf (cl.get_lower_case_cprefix ()), "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("this", cl.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("this", cl.get_cname () + "*"));
push_function (function);
@@ -891,11 +891,11 @@ public class Vala.DovaObjectModule : DovaArrayModule {
priv_call.add_argument (new CCodeIdentifier ("type"));
var value_copy_function = new CCodeFunction ("dova_type_value_copy");
- value_copy_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- value_copy_function.add_parameter (new CCodeFormalParameter ("dest", "void *"));
- value_copy_function.add_parameter (new CCodeFormalParameter ("dest_index", "intptr_t"));
- value_copy_function.add_parameter (new CCodeFormalParameter ("src", "void *"));
- value_copy_function.add_parameter (new CCodeFormalParameter ("src_index", "intptr_t"));
+ value_copy_function.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ value_copy_function.add_parameter (new CCodeParameter ("dest", "void *"));
+ value_copy_function.add_parameter (new CCodeParameter ("dest_index", "intptr_t"));
+ value_copy_function.add_parameter (new CCodeParameter ("src", "void *"));
+ value_copy_function.add_parameter (new CCodeParameter ("src_index", "intptr_t"));
value_copy_function.block = new CCodeBlock ();
@@ -913,11 +913,11 @@ public class Vala.DovaObjectModule : DovaArrayModule {
cfile.add_function (create_set_value_copy_function ());
var value_equals_function = new CCodeFunction ("dova_type_value_equals", "bool");
- value_equals_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- value_equals_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
- value_equals_function.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
- value_equals_function.add_parameter (new CCodeFormalParameter ("other", "void *"));
- value_equals_function.add_parameter (new CCodeFormalParameter ("other_index", "intptr_t"));
+ value_equals_function.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ value_equals_function.add_parameter (new CCodeParameter ("value", "void *"));
+ value_equals_function.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
+ value_equals_function.add_parameter (new CCodeParameter ("other", "void *"));
+ value_equals_function.add_parameter (new CCodeParameter ("other_index", "intptr_t"));
value_equals_function.block = new CCodeBlock ();
@@ -935,9 +935,9 @@ public class Vala.DovaObjectModule : DovaArrayModule {
cfile.add_function (create_set_value_equals_function ());
var value_hash_function = new CCodeFunction ("dova_type_value_hash", "uintptr_t");
- value_hash_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- value_hash_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
- value_hash_function.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ value_hash_function.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ value_hash_function.add_parameter (new CCodeParameter ("value", "void *"));
+ value_hash_function.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
value_hash_function.block = new CCodeBlock ();
@@ -953,9 +953,9 @@ public class Vala.DovaObjectModule : DovaArrayModule {
cfile.add_function (create_set_value_hash_function ());
var value_to_any_function = new CCodeFunction ("dova_type_value_to_any", "DovaObject *");
- value_to_any_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- value_to_any_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
- value_to_any_function.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ value_to_any_function.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ value_to_any_function.add_parameter (new CCodeParameter ("value", "void *"));
+ value_to_any_function.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
value_to_any_function.block = new CCodeBlock ();
@@ -971,10 +971,10 @@ public class Vala.DovaObjectModule : DovaArrayModule {
cfile.add_function (create_set_value_to_any_function ());
var value_from_any_function = new CCodeFunction ("dova_type_value_from_any", "void");
- value_from_any_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- value_from_any_function.add_parameter (new CCodeFormalParameter ("any_", "any *"));
- value_from_any_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
- value_from_any_function.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ value_from_any_function.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ value_from_any_function.add_parameter (new CCodeParameter ("any_", "any *"));
+ value_from_any_function.add_parameter (new CCodeParameter ("value", "void *"));
+ value_from_any_function.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
value_from_any_function.block = new CCodeBlock ();
@@ -1026,7 +1026,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
type_fun.modifiers = CCodeModifiers.STATIC;
}
foreach (var type_param in iface.get_type_parameters ()) {
- type_fun.add_parameter (new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
+ type_fun.add_parameter (new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
}
type_fun.block = new CCodeBlock ();
@@ -1065,9 +1065,9 @@ public class Vala.DovaObjectModule : DovaArrayModule {
if (iface.is_internal_symbol ()) {
type_init_fun.modifiers = CCodeModifiers.STATIC;
}
- type_init_fun.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("type", "DovaType *"));
foreach (var type_param in iface.get_type_parameters ()) {
- type_init_fun.add_parameter (new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
}
type_init_fun.block = new CCodeBlock ();
@@ -1132,13 +1132,13 @@ public class Vala.DovaObjectModule : DovaArrayModule {
}
generate_type_declaration (this_type, decl_space);
- var cselfparam = new CCodeFormalParameter ("this", this_type.get_cname ());
+ var cselfparam = new CCodeParameter ("this", this_type.get_cname ());
function.add_parameter (cselfparam);
}
if (acc.writable) {
- var cvalueparam = new CCodeFormalParameter ("value", acc.value_type.get_cname ());
+ var cvalueparam = new CCodeParameter ("value", acc.value_type.get_cname ());
function.add_parameter (cvalueparam);
}
@@ -1156,8 +1156,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
param_list += ")";
var override_func = new CCodeFunction ("%soverride_%s_%s".printf (prop.parent_symbol.get_lower_case_cprefix (), acc.readable ? "get" : "set", prop.name));
- override_func.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- override_func.add_parameter (new CCodeFormalParameter ("(*function) %s".printf (param_list), acc.readable ? acc.value_type.get_cname () : "void"));
+ override_func.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ override_func.add_parameter (new CCodeParameter ("(*function) %s".printf (param_list), acc.readable ? acc.value_type.get_cname () : "void"));
decl_space.add_function_declaration (override_func);
}
@@ -1188,8 +1188,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
var t = (ObjectTypeSymbol) prop.parent_symbol;
this_type = new ObjectType (t);
}
- var cselfparam = new CCodeFormalParameter ("this", this_type.get_cname ());
- var cvalueparam = new CCodeFormalParameter ("value", acc.value_type.get_cname ());
+ var cselfparam = new CCodeParameter ("this", this_type.get_cname ());
+ var cvalueparam = new CCodeParameter ("value", acc.value_type.get_cname ());
string cname = acc.get_cname ();
@@ -1238,8 +1238,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
param_list += ")";
var override_func = new CCodeFunction ("%soverride_%s_%s".printf (prop.parent_symbol.get_lower_case_cprefix (), acc.readable ? "get" : "set", prop.name));
- override_func.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- override_func.add_parameter (new CCodeFormalParameter ("(*function) %s".printf (param_list), acc.readable ? acc.value_type.get_cname () : "void"));
+ override_func.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ override_func.add_parameter (new CCodeParameter ("(*function) %s".printf (param_list), acc.readable ? acc.value_type.get_cname () : "void"));
push_function (override_func);
@@ -1310,7 +1310,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
type_fun.modifiers = CCodeModifiers.STATIC;
}
foreach (var type_param in iface.get_type_parameters ()) {
- type_fun.add_parameter (new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
+ type_fun.add_parameter (new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
}
decl_space.add_function_declaration (type_fun);
@@ -1318,9 +1318,9 @@ public class Vala.DovaObjectModule : DovaArrayModule {
if (iface.is_internal_symbol ()) {
type_init_fun.modifiers = CCodeModifiers.STATIC;
}
- type_init_fun.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("type", "DovaType *"));
foreach (var type_param in iface.get_type_parameters ()) {
- type_init_fun.add_parameter (new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType *"));
}
decl_space.add_function_declaration (type_init_fun);
}
@@ -1362,7 +1362,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
if (m.is_abstract || m.is_virtual) {
var base_func = function.copy ();
base_func.name = "%sbase_%s".printf (m.parent_symbol.get_lower_case_cprefix (), m.name);
- base_func.insert_parameter (0, new CCodeFormalParameter ("base_type", "DovaType *"));
+ base_func.insert_parameter (0, new CCodeParameter ("base_type", "DovaType *"));
decl_space.add_function_declaration (base_func);
string param_list = "(%s *this".printf (((ObjectTypeSymbol) m.parent_symbol).get_cname ());
@@ -1376,8 +1376,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
param_list += ")";
var override_func = new CCodeFunction ("%soverride_%s".printf (m.parent_symbol.get_lower_case_cprefix (), m.name));
- override_func.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- override_func.add_parameter (new CCodeFormalParameter ("(*function) %s".printf (param_list), (m.return_type is GenericType) ? "void" : m.return_type.get_cname ()));
+ override_func.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ override_func.add_parameter (new CCodeParameter ("(*function) %s".printf (param_list), (m.return_type is GenericType) ? "void" : m.return_type.get_cname ()));
decl_space.add_function_declaration (override_func);
}
@@ -1404,7 +1404,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
public override void visit_method (Method m) {
push_context (new EmitContext (m));
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
param.accept (this);
}
@@ -1476,7 +1476,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
ccode.add_statement (cdecl);
}
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.ellipsis) {
break;
}
@@ -1529,19 +1529,19 @@ public class Vala.DovaObjectModule : DovaArrayModule {
var vfunc = new CCodeFunction (m.get_cname (), (m.return_type is GenericType) ? "void" : m.return_type.get_cname ());
vfunc.block = new CCodeBlock ();
- vfunc.add_parameter (new CCodeFormalParameter ("this", "%s *".printf (((ObjectTypeSymbol) m.parent_symbol).get_cname ())));
+ vfunc.add_parameter (new CCodeParameter ("this", "%s *".printf (((ObjectTypeSymbol) m.parent_symbol).get_cname ())));
foreach (TypeParameter type_param in m.get_type_parameters ()) {
- vfunc.add_parameter (new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType*"));
+ vfunc.add_parameter (new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType*"));
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
string ctypename = param.variable_type.get_cname ();
if (param.direction != ParameterDirection.IN) {
ctypename += "*";
}
- vfunc.add_parameter (new CCodeFormalParameter (param.name, ctypename));
+ vfunc.add_parameter (new CCodeParameter (param.name, ctypename));
}
if (m.return_type is GenericType) {
- vfunc.add_parameter (new CCodeFormalParameter ("result", "void *"));
+ vfunc.add_parameter (new CCodeParameter ("result", "void *"));
}
if (m.get_full_name () == "any.equals") {
@@ -1570,7 +1570,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
foreach (TypeParameter type_param in m.get_type_parameters ()) {
vcall.add_argument (new CCodeIdentifier ("%s_type".printf (type_param.name.down ())));
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
vcall.add_argument (new CCodeIdentifier (param.name));
}
if (m.return_type is GenericType) {
@@ -1589,20 +1589,20 @@ public class Vala.DovaObjectModule : DovaArrayModule {
vfunc = new CCodeFunction ("%sbase_%s".printf (m.parent_symbol.get_lower_case_cprefix (), m.name), (m.return_type is GenericType) ? "void" : m.return_type.get_cname ());
vfunc.block = new CCodeBlock ();
- vfunc.add_parameter (new CCodeFormalParameter ("base_type", "DovaType *"));
- vfunc.add_parameter (new CCodeFormalParameter ("this", "%s *".printf (((ObjectTypeSymbol) m.parent_symbol).get_cname ())));
+ vfunc.add_parameter (new CCodeParameter ("base_type", "DovaType *"));
+ vfunc.add_parameter (new CCodeParameter ("this", "%s *".printf (((ObjectTypeSymbol) m.parent_symbol).get_cname ())));
foreach (TypeParameter type_param in m.get_type_parameters ()) {
- vfunc.add_parameter (new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType*"));
+ vfunc.add_parameter (new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType*"));
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
string ctypename = param.variable_type.get_cname ();
if (param.direction != ParameterDirection.IN) {
ctypename += "*";
}
- vfunc.add_parameter (new CCodeFormalParameter (param.name, ctypename));
+ vfunc.add_parameter (new CCodeParameter (param.name, ctypename));
}
if (m.return_type is GenericType) {
- vfunc.add_parameter (new CCodeFormalParameter ("result", "void *"));
+ vfunc.add_parameter (new CCodeParameter ("result", "void *"));
}
var base_type = new CCodeIdentifier ("base_type");
@@ -1614,7 +1614,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
foreach (TypeParameter type_param in m.get_type_parameters ()) {
vcall.add_argument (new CCodeIdentifier ("%s_type".printf (type_param.name.down ())));
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
vcall.add_argument (new CCodeIdentifier (param.name));
}
if (m.return_type is GenericType) {
@@ -1641,8 +1641,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
param_list += ")";
var override_func = new CCodeFunction ("%soverride_%s".printf (m.parent_symbol.get_lower_case_cprefix (), m.name));
- override_func.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- override_func.add_parameter (new CCodeFormalParameter ("(*function) %s".printf (param_list), (m.return_type is GenericType) ? "void" : m.return_type.get_cname ()));
+ override_func.add_parameter (new CCodeParameter ("type", "DovaType *"));
+ override_func.add_parameter (new CCodeParameter ("(*function) %s".printf (param_list), (m.return_type is GenericType) ? "void" : m.return_type.get_cname ()));
override_func.block = new CCodeBlock ();
vcast = get_type_private_from_type ((ObjectTypeSymbol) m.parent_symbol, new CCodeIdentifier ("type"));
@@ -1660,8 +1660,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
// m is possible entry point, add appropriate startup code
var cmain = new CCodeFunction ("main", "int");
cmain.line = function.line;
- cmain.add_parameter (new CCodeFormalParameter ("argc", "int"));
- cmain.add_parameter (new CCodeFormalParameter ("argv", "char **"));
+ cmain.add_parameter (new CCodeParameter ("argc", "int"));
+ cmain.add_parameter (new CCodeParameter ("argv", "char **"));
push_function (cmain);
@@ -1826,14 +1826,14 @@ public class Vala.DovaObjectModule : DovaArrayModule {
}
public override void generate_cparameters (Method m, CCodeFile decl_space, CCodeFunction func, CCodeFunctionDeclarator? vdeclarator = null, CCodeFunctionCall? vcall = null) {
- CCodeFormalParameter instance_param = null;
+ CCodeParameter instance_param = null;
if (m.closure) {
var closure_block = current_closure_block;
int block_id = get_block_id (closure_block);
- instance_param = new CCodeFormalParameter ("_data%d_".printf (block_id), "Block%dData*".printf (block_id));
+ instance_param = new CCodeParameter ("_data%d_".printf (block_id), "Block%dData*".printf (block_id));
} else if (m.parent_symbol is Class && m is CreationMethod) {
if (vcall == null) {
- instance_param = new CCodeFormalParameter ("this", ((Class) m.parent_symbol).get_cname () + "*");
+ instance_param = new CCodeParameter ("this", ((Class) m.parent_symbol).get_cname () + "*");
}
} else if (m.binding == MemberBinding.INSTANCE || (m.parent_symbol is Struct && m is CreationMethod)) {
TypeSymbol parent_type = find_parent_type (m);
@@ -1843,21 +1843,21 @@ public class Vala.DovaObjectModule : DovaArrayModule {
if (m.base_interface_method != null && !m.is_abstract && !m.is_virtual) {
var base_type = new ObjectType ((Interface) m.base_interface_method.parent_symbol);
- instance_param = new CCodeFormalParameter ("this", base_type.get_cname ());
+ instance_param = new CCodeParameter ("this", base_type.get_cname ());
} else if (m.overrides) {
var base_type = new ObjectType ((Class) m.base_method.parent_symbol);
generate_type_declaration (base_type, decl_space);
- instance_param = new CCodeFormalParameter ("this", base_type.get_cname ());
+ instance_param = new CCodeParameter ("this", base_type.get_cname ());
} else {
if (m.parent_symbol is Struct && m is CreationMethod) {
var st = (Struct) m.parent_symbol;
if (st.is_boolean_type () || st.is_integer_type () || st.is_floating_type ()) {
// use return value
} else {
- instance_param = new CCodeFormalParameter ("*this", this_type.get_cname ());
+ instance_param = new CCodeParameter ("*this", this_type.get_cname ());
}
} else {
- instance_param = new CCodeFormalParameter ("this", this_type.get_cname ());
+ instance_param = new CCodeParameter ("this", this_type.get_cname ());
}
}
}
@@ -1874,7 +1874,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
if (m.parent_symbol is Class) {
var cl = (Class) m.parent_symbol;
foreach (TypeParameter type_param in cl.get_type_parameters ()) {
- var cparam = new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType*");
+ var cparam = new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType*");
if (vcall != null) {
func.add_parameter (cparam);
}
@@ -1882,7 +1882,7 @@ public class Vala.DovaObjectModule : DovaArrayModule {
}
} else {
foreach (TypeParameter type_param in m.get_type_parameters ()) {
- var cparam = new CCodeFormalParameter ("%s_type".printf (type_param.name.down ()), "DovaType*");
+ var cparam = new CCodeParameter ("%s_type".printf (type_param.name.down ()), "DovaType*");
func.add_parameter (cparam);
if (vdeclarator != null) {
vdeclarator.add_parameter (cparam);
@@ -1893,8 +1893,8 @@ public class Vala.DovaObjectModule : DovaArrayModule {
}
}
- foreach (FormalParameter param in m.get_parameters ()) {
- CCodeFormalParameter cparam;
+ foreach (Parameter param in m.get_parameters ()) {
+ CCodeParameter cparam;
if (!param.ellipsis) {
string ctypename = param.variable_type.get_cname ();
@@ -1904,9 +1904,9 @@ public class Vala.DovaObjectModule : DovaArrayModule {
ctypename += "*";
}
- cparam = new CCodeFormalParameter (get_variable_cname (param.name), ctypename);
+ cparam = new CCodeParameter (get_variable_cname (param.name), ctypename);
} else {
- cparam = new CCodeFormalParameter.with_ellipsis ();
+ cparam = new CCodeParameter.with_ellipsis ();
}
func.add_parameter (cparam);
@@ -1924,9 +1924,9 @@ public class Vala.DovaObjectModule : DovaArrayModule {
func.return_type = ((Class) m.parent_symbol).get_cname () + "*";
} else {
if (m.return_type is GenericType) {
- func.add_parameter (new CCodeFormalParameter ("result", "void *"));
+ func.add_parameter (new CCodeParameter ("result", "void *"));
if (vdeclarator != null) {
- vdeclarator.add_parameter (new CCodeFormalParameter ("result", "void *"));
+ vdeclarator.add_parameter (new CCodeParameter ("result", "void *"));
}
} else {
var st = m.parent_symbol as Struct;
diff --git a/codegen/valadovavaluemodule.vala b/codegen/valadovavaluemodule.vala
index 5a056dd..0b6d36e 100644
--- a/codegen/valadovavaluemodule.vala
+++ b/codegen/valadovavaluemodule.vala
@@ -48,7 +48,7 @@ public class Vala.DovaValueModule : DovaObjectModule {
decl_space.add_function_declaration (type_fun);
var type_init_fun = new CCodeFunction ("%s_type_init".printf (st.get_lower_case_cname ()));
- type_init_fun.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("type", "DovaType *"));
if (st.is_internal_symbol ()) {
type_init_fun.modifiers = CCodeModifiers.STATIC;
}
@@ -59,10 +59,10 @@ public class Vala.DovaValueModule : DovaObjectModule {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("dest", st.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("dest_index", "intptr_t"));
- function.add_parameter (new CCodeFormalParameter ("src", st.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("src_index", "intptr_t"));
+ function.add_parameter (new CCodeParameter ("dest", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("dest_index", "intptr_t"));
+ function.add_parameter (new CCodeParameter ("src", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("src_index", "intptr_t"));
decl_space.add_function_declaration (function);
}
@@ -159,7 +159,7 @@ public class Vala.DovaValueModule : DovaObjectModule {
cfile.add_function (type_fun);
var type_init_fun = new CCodeFunction ("%s_type_init".printf (st.get_lower_case_cname ()));
- type_init_fun.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
+ type_init_fun.add_parameter (new CCodeParameter ("type", "DovaType *"));
type_init_fun.block = new CCodeBlock ();
type_init_call = new CCodeFunctionCall (new CCodeIdentifier ("dova_value_type_init"));
@@ -176,10 +176,10 @@ public class Vala.DovaValueModule : DovaObjectModule {
if (st.scope.lookup ("equals") is Method) {
var value_equals_fun = new CCodeFunction ("%s_value_equals".printf (st.get_lower_case_cname ()), "bool");
value_equals_fun.modifiers = CCodeModifiers.STATIC;
- value_equals_fun.add_parameter (new CCodeFormalParameter ("value", st.get_cname () + "*"));
- value_equals_fun.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
- value_equals_fun.add_parameter (new CCodeFormalParameter ("other", st.get_cname () + "*"));
- value_equals_fun.add_parameter (new CCodeFormalParameter ("other_index", "intptr_t"));
+ value_equals_fun.add_parameter (new CCodeParameter ("value", st.get_cname () + "*"));
+ value_equals_fun.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
+ value_equals_fun.add_parameter (new CCodeParameter ("other", st.get_cname () + "*"));
+ value_equals_fun.add_parameter (new CCodeParameter ("other_index", "intptr_t"));
value_equals_fun.block = new CCodeBlock ();
var val = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("value"), new CCodeIdentifier ("value_index"));
var other = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("other"), new CCodeIdentifier ("other_index"));
@@ -200,8 +200,8 @@ public class Vala.DovaValueModule : DovaObjectModule {
if (st.scope.lookup ("hash") is Method) {
var value_hash_fun = new CCodeFunction ("%s_value_hash".printf (st.get_lower_case_cname ()), "uintptr_t");
value_hash_fun.modifiers = CCodeModifiers.STATIC;
- value_hash_fun.add_parameter (new CCodeFormalParameter ("value", st.get_cname () + "*"));
- value_hash_fun.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ value_hash_fun.add_parameter (new CCodeParameter ("value", st.get_cname () + "*"));
+ value_hash_fun.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
value_hash_fun.block = new CCodeBlock ();
var val = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("value"), new CCodeIdentifier ("value_index"));
var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%s_hash".printf (st.get_lower_case_cname ())));
@@ -220,8 +220,8 @@ public class Vala.DovaValueModule : DovaObjectModule {
// generate method to box values
var value_to_any_fun = new CCodeFunction ("%s_value_to_any".printf (st.get_lower_case_cname ()), "DovaObject*");
value_to_any_fun.modifiers = CCodeModifiers.STATIC;
- value_to_any_fun.add_parameter (new CCodeFormalParameter ("value", "void *"));
- value_to_any_fun.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ value_to_any_fun.add_parameter (new CCodeParameter ("value", "void *"));
+ value_to_any_fun.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
value_to_any_fun.block = new CCodeBlock ();
var alloc_call = new CCodeFunctionCall (new CCodeIdentifier ("dova_object_alloc"));
alloc_call.add_argument (new CCodeFunctionCall (new CCodeIdentifier ("%s_type_get".printf (st.get_lower_case_cname ()))));
@@ -249,9 +249,9 @@ public class Vala.DovaValueModule : DovaObjectModule {
// generate method to unbox values
var value_from_any_fun = new CCodeFunction ("%s_value_from_any".printf (st.get_lower_case_cname ()));
value_from_any_fun.modifiers = CCodeModifiers.STATIC;
- value_from_any_fun.add_parameter (new CCodeFormalParameter ("any_", "any *"));
- value_from_any_fun.add_parameter (new CCodeFormalParameter ("value", st.get_cname () + "*"));
- value_from_any_fun.add_parameter (new CCodeFormalParameter ("value_index", "intptr_t"));
+ value_from_any_fun.add_parameter (new CCodeParameter ("any_", "any *"));
+ value_from_any_fun.add_parameter (new CCodeParameter ("value", st.get_cname () + "*"));
+ value_from_any_fun.add_parameter (new CCodeParameter ("value_index", "intptr_t"));
value_from_any_fun.block = new CCodeBlock ();
priv_call = new CCodeFunctionCall (new CCodeIdentifier ("%s_GET_PRIVATE".printf (st.get_upper_case_cname (null))));
priv_call.add_argument (new CCodeIdentifier ("any_"));
@@ -281,10 +281,10 @@ public class Vala.DovaValueModule : DovaObjectModule {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("dest", st.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("dest_index", "intptr_t"));
- function.add_parameter (new CCodeFormalParameter ("src", st.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("src_index", "intptr_t"));
+ function.add_parameter (new CCodeParameter ("dest", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("dest_index", "intptr_t"));
+ function.add_parameter (new CCodeParameter ("src", st.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("src_index", "intptr_t"));
var cblock = new CCodeBlock ();
var cfrag = new CCodeFragment ();
diff --git a/codegen/valagasyncmodule.vala b/codegen/valagasyncmodule.vala
index 70c3cbe..816cb38 100644
--- a/codegen/valagasyncmodule.vala
+++ b/codegen/valagasyncmodule.vala
@@ -41,7 +41,7 @@ public class Vala.GAsyncModule : GSignalModule {
}
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
var param_type = param.variable_type.copy ();
param_type.value_owned = true;
data.add_field (param_type.get_cname (), get_variable_cname (param.name));
@@ -88,7 +88,7 @@ public class Vala.GAsyncModule : GSignalModule {
var freefunc = new CCodeFunction (m.get_real_cname () + "_data_free", "void");
freefunc.modifiers = CCodeModifiers.STATIC;
- freefunc.add_parameter (new CCodeFormalParameter ("_data", "gpointer"));
+ freefunc.add_parameter (new CCodeParameter ("_data", "gpointer"));
var freeblock = new CCodeBlock ();
freefunc.block = freeblock;
@@ -99,7 +99,7 @@ public class Vala.GAsyncModule : GSignalModule {
push_context (new EmitContext (m));
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction != ParameterDirection.OUT) {
var param_type = param.variable_type.copy ();
param_type.value_owned = true;
@@ -153,10 +153,10 @@ public class Vala.GAsyncModule : GSignalModule {
var dataname = Symbol.lower_case_to_camel_case (m.get_cname ()) + "Data";
var asyncfunc = new CCodeFunction (m.get_real_cname (), "void");
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
- cparam_map.set (get_param_pos (-1), new CCodeFormalParameter ("_callback_", "GAsyncReadyCallback"));
- cparam_map.set (get_param_pos (-0.9), new CCodeFormalParameter ("_user_data_", "gpointer"));
+ cparam_map.set (get_param_pos (-1), new CCodeParameter ("_callback_", "GAsyncReadyCallback"));
+ cparam_map.set (get_param_pos (-0.9), new CCodeParameter ("_user_data_", "gpointer"));
generate_cparameters (m, cfile, cparam_map, asyncfunc, null, null, null, 1);
@@ -251,7 +251,7 @@ public class Vala.GAsyncModule : GSignalModule {
ccode.add_expression (new CCodeAssignment (new CCodeMemberAccess.pointer (data_var, "self"), cself));
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction != ParameterDirection.OUT) {
var param_type = param.variable_type.copy ();
param_type.value_owned = true;
@@ -317,9 +317,9 @@ public class Vala.GAsyncModule : GSignalModule {
}
var asyncfunc = new CCodeFunction (m.get_cname (), "void");
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
- cparam_map.set (get_param_pos (-1), new CCodeFormalParameter ("_callback_", "GAsyncReadyCallback"));
- cparam_map.set (get_param_pos (-0.9), new CCodeFormalParameter ("_user_data_", "gpointer"));
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
+ cparam_map.set (get_param_pos (-1), new CCodeParameter ("_callback_", "GAsyncReadyCallback"));
+ cparam_map.set (get_param_pos (-0.9), new CCodeParameter ("_user_data_", "gpointer"));
generate_cparameters (m, decl_space, cparam_map, asyncfunc, null, null, null, 1);
@@ -330,8 +330,8 @@ public class Vala.GAsyncModule : GSignalModule {
decl_space.add_function_declaration (asyncfunc);
var finishfunc = new CCodeFunction (m.get_finish_cname ());
- cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
- cparam_map.set (get_param_pos (0.1), new CCodeFormalParameter ("_res_", "GAsyncResult*"));
+ cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
+ cparam_map.set (get_param_pos (0.1), new CCodeParameter ("_res_", "GAsyncResult*"));
generate_cparameters (m, decl_space, cparam_map, finishfunc, null, null, null, 2);
@@ -382,11 +382,11 @@ public class Vala.GAsyncModule : GSignalModule {
if (m.is_abstract || m.is_virtual) {
// generate virtual function wrappers
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
var carg_map = new HashMap<int,CCodeExpression> (direct_hash, direct_equal);
generate_vfunc (m, new VoidType (), cparam_map, carg_map, "", 1);
- cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
carg_map = new HashMap<int,CCodeExpression> (direct_hash, direct_equal);
generate_vfunc (m, m.return_type, cparam_map, carg_map, "_finish", 2);
}
@@ -403,9 +403,9 @@ public class Vala.GAsyncModule : GSignalModule {
var finishfunc = new CCodeFunction (m.get_finish_real_cname ());
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
- cparam_map.set (get_param_pos (0.1), new CCodeFormalParameter ("_res_", "GAsyncResult*"));
+ cparam_map.set (get_param_pos (0.1), new CCodeParameter ("_res_", "GAsyncResult*"));
generate_cparameters (m, cfile, cparam_map, finishfunc, null, null, null, 2);
@@ -442,7 +442,7 @@ public class Vala.GAsyncModule : GSignalModule {
ccall.add_argument (simple_async_result_cast);
ccode.add_expression (new CCodeAssignment (data_var, ccall));
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction != ParameterDirection.IN) {
ccode.add_expression (new CCodeAssignment (new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, new CCodeIdentifier (param.name)), new CCodeMemberAccess.pointer (data_var, get_variable_cname (param.name))));
if (!(param.variable_type is ValueType) || param.variable_type.nullable) {
@@ -489,9 +489,9 @@ public class Vala.GAsyncModule : GSignalModule {
var readyfunc = new CCodeFunction (m.get_cname () + "_ready", "void");
- readyfunc.add_parameter (new CCodeFormalParameter ("source_object", "GObject*"));
- readyfunc.add_parameter (new CCodeFormalParameter ("_res_", "GAsyncResult*"));
- readyfunc.add_parameter (new CCodeFormalParameter ("_user_data_", "gpointer"));
+ readyfunc.add_parameter (new CCodeParameter ("source_object", "GObject*"));
+ readyfunc.add_parameter (new CCodeParameter ("_res_", "GAsyncResult*"));
+ readyfunc.add_parameter (new CCodeParameter ("_user_data_", "gpointer"));
var readyblock = new CCodeBlock ();
@@ -531,7 +531,7 @@ public class Vala.GAsyncModule : GSignalModule {
// add vfunc field to the type struct
var vdeclarator = new CCodeFunctionDeclarator (m.vfunc_name);
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (m, decl_space, cparam_map, new CCodeFunction ("fake"), vdeclarator, null, null, 1);
@@ -541,7 +541,7 @@ public class Vala.GAsyncModule : GSignalModule {
// add vfunc field to the type struct
vdeclarator = new CCodeFunctionDeclarator (m.get_finish_vfunc_name ());
- cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (m, decl_space, cparam_map, new CCodeFunction ("fake"), vdeclarator, null, null, 2);
@@ -623,19 +623,19 @@ public class Vala.GAsyncModule : GSignalModule {
complete_async ();
}
- public override void generate_cparameters (Method m, CCodeFile decl_space, Map<int,CCodeFormalParameter> cparam_map, CCodeFunction func, CCodeFunctionDeclarator? vdeclarator = null, Map<int,CCodeExpression>? carg_map = null, CCodeFunctionCall? vcall = null, int direction = 3) {
+ public override void generate_cparameters (Method m, CCodeFile decl_space, Map<int,CCodeParameter> cparam_map, CCodeFunction func, CCodeFunctionDeclarator? vdeclarator = null, Map<int,CCodeExpression>? carg_map = null, CCodeFunctionCall? vcall = null, int direction = 3) {
if (m.coroutine) {
decl_space.add_include ("gio/gio.h");
if (direction == 1) {
- cparam_map.set (get_param_pos (-1), new CCodeFormalParameter ("_callback_", "GAsyncReadyCallback"));
- cparam_map.set (get_param_pos (-0.9), new CCodeFormalParameter ("_user_data_", "gpointer"));
+ cparam_map.set (get_param_pos (-1), new CCodeParameter ("_callback_", "GAsyncReadyCallback"));
+ cparam_map.set (get_param_pos (-0.9), new CCodeParameter ("_user_data_", "gpointer"));
if (carg_map != null) {
carg_map.set (get_param_pos (-1), new CCodeIdentifier ("_callback_"));
carg_map.set (get_param_pos (-0.9), new CCodeIdentifier ("_user_data_"));
}
} else if (direction == 2) {
- cparam_map.set (get_param_pos (0.1), new CCodeFormalParameter ("_res_", "GAsyncResult*"));
+ cparam_map.set (get_param_pos (0.1), new CCodeParameter ("_res_", "GAsyncResult*"));
if (carg_map != null) {
carg_map.set (get_param_pos (0.1), new CCodeIdentifier ("_res_"));
}
@@ -654,9 +654,9 @@ public class Vala.GAsyncModule : GSignalModule {
var function = new CCodeFunction (async_callback_wrapper_func, "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("*source_object", "GObject"));
- function.add_parameter (new CCodeFormalParameter ("*res", "GAsyncResult"));
- function.add_parameter (new CCodeFormalParameter ("*user_data", "void"));
+ function.add_parameter (new CCodeParameter ("*source_object", "GObject"));
+ function.add_parameter (new CCodeParameter ("*res", "GAsyncResult"));
+ function.add_parameter (new CCodeParameter ("*user_data", "void"));
push_function (function);
diff --git a/codegen/valagdbusclientmodule.vala b/codegen/valagdbusclientmodule.vala
index a096493..6eab6ae 100644
--- a/codegen/valagdbusclientmodule.vala
+++ b/codegen/valagdbusclientmodule.vala
@@ -48,7 +48,7 @@ public class Vala.GDBusClientModule : GDBusModule {
var func = new CCodeFunction (method.get_cname ());
func.modifiers = CCodeModifiers.STATIC;
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (method, cfile, cparam_map, func);
@@ -77,7 +77,7 @@ public class Vala.GDBusClientModule : GDBusModule {
string lower_cname = main_iface.get_lower_case_cprefix () + "proxy";
var proxy_iface_init = new CCodeFunction (lower_cname + "_" + iface.get_lower_case_cprefix () + "interface_init", "void");
- proxy_iface_init.add_parameter (new CCodeFormalParameter ("iface", iface.get_cname () + "Iface*"));
+ proxy_iface_init.add_parameter (new CCodeParameter ("iface", iface.get_cname () + "Iface*"));
var iface_block = new CCodeBlock ();
@@ -185,7 +185,7 @@ public class Vala.GDBusClientModule : GDBusModule {
cfile.add_type_member_definition (new CCodeExpressionStatement (define_type));
var proxy_class_init = new CCodeFunction (lower_cname + "_class_init", "void");
- proxy_class_init.add_parameter (new CCodeFormalParameter ("klass", cname + "Class*"));
+ proxy_class_init.add_parameter (new CCodeParameter ("klass", cname + "Class*"));
proxy_class_init.modifiers = CCodeModifiers.STATIC;
proxy_class_init.block = new CCodeBlock ();
var proxy_class = new CCodeFunctionCall (new CCodeIdentifier ("G_DBUS_PROXY_CLASS"));
@@ -196,7 +196,7 @@ public class Vala.GDBusClientModule : GDBusModule {
generate_signal_handler_function (iface);
var proxy_instance_init = new CCodeFunction (lower_cname + "_init", "void");
- proxy_instance_init.add_parameter (new CCodeFormalParameter ("self", cname + "*"));
+ proxy_instance_init.add_parameter (new CCodeParameter ("self", cname + "*"));
proxy_instance_init.modifiers = CCodeModifiers.STATIC;
proxy_instance_init.block = new CCodeBlock ();
cfile.add_function (proxy_instance_init);
@@ -308,8 +308,8 @@ public class Vala.GDBusClientModule : GDBusModule {
var function = new CCodeFunction (wrapper_name);
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", sym.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("parameters", "GVariant*"));
+ function.add_parameter (new CCodeParameter ("self", sym.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("parameters", "GVariant*"));
push_function (function);
@@ -324,7 +324,7 @@ public class Vala.GDBusClientModule : GDBusModule {
ccall.add_argument (new CCodeIdentifier ("self"));
ccall.add_argument (sig.get_canonical_cconstant ());
- foreach (FormalParameter param in sig.get_parameters ()) {
+ foreach (Parameter param in sig.get_parameters ()) {
var owned_type = param.variable_type.copy ();
owned_type.value_owned = true;
@@ -353,7 +353,7 @@ public class Vala.GDBusClientModule : GDBusModule {
ccode.add_expression (ccall);
- foreach (FormalParameter param in sig.get_parameters ()) {
+ foreach (Parameter param in sig.get_parameters ()) {
var owned_type = param.variable_type.copy ();
owned_type.value_owned = true;
@@ -378,10 +378,10 @@ public class Vala.GDBusClientModule : GDBusModule {
void generate_signal_handler_function (ObjectTypeSymbol sym) {
var cfunc = new CCodeFunction (sym.get_lower_case_cprefix () + "proxy_g_signal", "void");
- cfunc.add_parameter (new CCodeFormalParameter ("proxy", "GDBusProxy*"));
- cfunc.add_parameter (new CCodeFormalParameter ("sender_name", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("signal_name", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("parameters", "GVariant*"));
+ cfunc.add_parameter (new CCodeParameter ("proxy", "GDBusProxy*"));
+ cfunc.add_parameter (new CCodeParameter ("sender_name", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("signal_name", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("parameters", "GVariant*"));
cfunc.modifiers |= CCodeModifiers.STATIC;
@@ -484,7 +484,7 @@ public class Vala.GDBusClientModule : GDBusModule {
CCodeExpression cancellable = new CCodeConstant ("NULL");
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction == ParameterDirection.IN) {
CCodeExpression expr = new CCodeIdentifier (param.name);
if (param.variable_type.is_real_struct_type ()) {
@@ -611,7 +611,7 @@ public class Vala.GDBusClientModule : GDBusModule {
ccode.add_declaration ("gint", new CCodeVariableDeclarator.zero ("_fd_index", new CCodeConstant ("0")));
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction == ParameterDirection.OUT) {
has_result = true;
}
@@ -630,7 +630,7 @@ public class Vala.GDBusClientModule : GDBusModule {
iter_init.add_argument (new CCodeIdentifier ("_reply"));
ccode.add_expression (iter_init);
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction == ParameterDirection.OUT) {
ccode.add_declaration (param.variable_type.get_cname (), new CCodeVariableDeclarator ("_" + param.name));
@@ -703,7 +703,7 @@ public class Vala.GDBusClientModule : GDBusModule {
var function = new CCodeFunction (proxy_name);
function.modifiers = CCodeModifiers.STATIC;
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (m, cfile, cparam_map, function);
@@ -727,10 +727,10 @@ public class Vala.GDBusClientModule : GDBusModule {
var function = new CCodeFunction (proxy_name, "void");
function.modifiers = CCodeModifiers.STATIC;
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
- cparam_map.set (get_param_pos (-1), new CCodeFormalParameter ("_callback_", "GAsyncReadyCallback"));
- cparam_map.set (get_param_pos (-0.9), new CCodeFormalParameter ("_user_data_", "gpointer"));
+ cparam_map.set (get_param_pos (-1), new CCodeParameter ("_callback_", "GAsyncReadyCallback"));
+ cparam_map.set (get_param_pos (-0.9), new CCodeParameter ("_user_data_", "gpointer"));
generate_cparameters (m, cfile, cparam_map, function, null, null, null, 1);
@@ -752,9 +752,9 @@ public class Vala.GDBusClientModule : GDBusModule {
var function = new CCodeFunction (proxy_name);
function.modifiers = CCodeModifiers.STATIC;
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
- cparam_map.set (get_param_pos (0.1), new CCodeFormalParameter ("_res_", "GAsyncResult*"));
+ cparam_map.set (get_param_pos (0.1), new CCodeParameter ("_res_", "GAsyncResult*"));
generate_cparameters (m, cfile, cparam_map, function, null, null, null, 2);
@@ -786,14 +786,14 @@ public class Vala.GDBusClientModule : GDBusModule {
var function = new CCodeFunction (proxy_name);
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", "%s*".printf (iface.get_cname ())));
+ function.add_parameter (new CCodeParameter ("self", "%s*".printf (iface.get_cname ())));
if (prop.property_type.is_real_non_null_struct_type ()) {
- function.add_parameter (new CCodeFormalParameter ("result", "%s*".printf (prop.get_accessor.value_type.get_cname ())));
+ function.add_parameter (new CCodeParameter ("result", "%s*".printf (prop.get_accessor.value_type.get_cname ())));
} else {
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeFormalParameter ("result_length%d".printf (dim), "int*"));
+ function.add_parameter (new CCodeParameter ("result_length%d".printf (dim), "int*"));
}
}
@@ -911,16 +911,16 @@ public class Vala.GDBusClientModule : GDBusModule {
var function = new CCodeFunction (proxy_name);
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", "%s*".printf (iface.get_cname ())));
+ function.add_parameter (new CCodeParameter ("self", "%s*".printf (iface.get_cname ())));
if (prop.property_type.is_real_non_null_struct_type ()) {
- function.add_parameter (new CCodeFormalParameter ("value", "%s*".printf (prop.set_accessor.value_type.get_cname ())));
+ function.add_parameter (new CCodeParameter ("value", "%s*".printf (prop.set_accessor.value_type.get_cname ())));
} else {
- function.add_parameter (new CCodeFormalParameter ("value", prop.set_accessor.value_type.get_cname ()));
+ function.add_parameter (new CCodeParameter ("value", prop.set_accessor.value_type.get_cname ()));
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeFormalParameter ("value_length%d".printf (dim), "int"));
+ function.add_parameter (new CCodeParameter ("value_length%d".printf (dim), "int"));
}
}
}
diff --git a/codegen/valagdbusmodule.vala b/codegen/valagdbusmodule.vala
index 44f61e8..b7be192 100644
--- a/codegen/valagdbusmodule.vala
+++ b/codegen/valagdbusmodule.vala
@@ -124,7 +124,7 @@ public class Vala.GDBusModule : GVariantModule {
}
public bool dbus_method_uses_file_descriptor (Method method) {
- foreach (FormalParameter param in method.get_parameters ()) {
+ foreach (Parameter param in method.get_parameters ()) {
if (is_file_descriptor (param.variable_type)) {
return true;
}
diff --git a/codegen/valagdbusservermodule.vala b/codegen/valagdbusservermodule.vala
index 11631a9..f1a5284 100644
--- a/codegen/valagdbusservermodule.vala
+++ b/codegen/valagdbusservermodule.vala
@@ -63,13 +63,13 @@ public class Vala.GDBusServerModule : GDBusClientModule {
function.modifiers = CCodeModifiers.STATIC;
if (!ready) {
- function.add_parameter (new CCodeFormalParameter ("self", sym.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("parameters", "GVariant*"));
- function.add_parameter (new CCodeFormalParameter ("invocation", "GDBusMethodInvocation*"));
+ function.add_parameter (new CCodeParameter ("self", sym.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("parameters", "GVariant*"));
+ function.add_parameter (new CCodeParameter ("invocation", "GDBusMethodInvocation*"));
} else {
- function.add_parameter (new CCodeFormalParameter ("source_object", "GObject *"));
- function.add_parameter (new CCodeFormalParameter ("_res_", "GAsyncResult *"));
- function.add_parameter (new CCodeFormalParameter ("_user_data_", "gpointer *"));
+ function.add_parameter (new CCodeParameter ("source_object", "GObject *"));
+ function.add_parameter (new CCodeParameter ("_res_", "GAsyncResult *"));
+ function.add_parameter (new CCodeParameter ("_user_data_", "gpointer *"));
}
push_function (function);
@@ -115,7 +115,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
ccode.add_declaration ("gint", new CCodeVariableDeclarator.zero ("_fd_index", new CCodeConstant ("0")));
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction != ParameterDirection.IN) {
continue;
}
@@ -145,7 +145,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
}
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction == ParameterDirection.IN && !ready) {
if (param.variable_type is ObjectType && param.variable_type.data_type.get_full_name () == "GLib.Cancellable") {
ccall.add_argument (new CCodeConstant ("NULL"));
@@ -254,7 +254,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
ccode.add_expression (new CCodeAssignment (new CCodeIdentifier ("_fd_list"), new CCodeFunctionCall (new CCodeIdentifier ("g_unix_fd_list_new"))));
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.direction != ParameterDirection.OUT) {
continue;
}
@@ -344,7 +344,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
ccode.add_expression (ccall);
}
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if ((param.direction == ParameterDirection.IN && !ready) ||
(param.direction == ParameterDirection.OUT && !no_reply && (!m.coroutine || ready))) {
if (param.variable_type is ObjectType && param.variable_type.data_type.get_full_name () == "GLib.Cancellable") {
@@ -405,22 +405,22 @@ public class Vala.GDBusServerModule : GDBusClientModule {
var function = new CCodeFunction (wrapper_name, "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("_sender", "GObject*"));
+ function.add_parameter (new CCodeParameter ("_sender", "GObject*"));
foreach (var param in sig.get_parameters ()) {
// ensure ccodenode of parameter is set
- var cparam = generate_parameter (param, cfile, new HashMap<int,CCodeFormalParameter> (), null);
+ var cparam = generate_parameter (param, cfile, new HashMap<int,CCodeParameter> (), null);
function.add_parameter (cparam);
if (param.variable_type is ArrayType) {
var array_type = (ArrayType) param.variable_type;
for (int dim = 1; dim <= array_type.rank; dim++) {
- function.add_parameter (new CCodeFormalParameter (get_parameter_array_length_cname (param, dim), "int"));
+ function.add_parameter (new CCodeParameter (get_parameter_array_length_cname (param, dim), "int"));
}
}
}
- function.add_parameter (new CCodeFormalParameter ("_data", "gpointer*"));
+ function.add_parameter (new CCodeParameter ("_data", "gpointer*"));
push_function (function);
@@ -434,7 +434,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
builder_init.add_argument (new CCodeIdentifier ("G_VARIANT_TYPE_TUPLE"));
ccode.add_expression (builder_init);
- foreach (FormalParameter param in sig.get_parameters ()) {
+ foreach (Parameter param in sig.get_parameters ()) {
CCodeExpression expr = new CCodeIdentifier (param.name);
if (param.variable_type.is_real_struct_type ()) {
expr = new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, expr);
@@ -469,7 +469,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
var function = new CCodeFunction (wrapper_name, "GVariant*");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", sym.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", sym.get_cname () + "*"));
push_function (function);
@@ -528,8 +528,8 @@ public class Vala.GDBusServerModule : GDBusClientModule {
var function = new CCodeFunction (wrapper_name);
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("self", sym.get_cname () + "*"));
- function.add_parameter (new CCodeFormalParameter ("_value", "GVariant*"));
+ function.add_parameter (new CCodeParameter ("self", sym.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("_value", "GVariant*"));
push_function (function);
@@ -605,14 +605,14 @@ public class Vala.GDBusServerModule : GDBusClientModule {
void generate_interface_method_call_function (ObjectTypeSymbol sym) {
var cfunc = new CCodeFunction (sym.get_lower_case_cprefix () + "dbus_interface_method_call", "void");
- cfunc.add_parameter (new CCodeFormalParameter ("connection", "GDBusConnection*"));
- cfunc.add_parameter (new CCodeFormalParameter ("sender", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("object_path", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("interface_name", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("method_name", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("parameters", "GVariant*"));
- cfunc.add_parameter (new CCodeFormalParameter ("invocation", "GDBusMethodInvocation*"));
- cfunc.add_parameter (new CCodeFormalParameter ("user_data", "gpointer"));
+ cfunc.add_parameter (new CCodeParameter ("connection", "GDBusConnection*"));
+ cfunc.add_parameter (new CCodeParameter ("sender", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("object_path", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("interface_name", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("method_name", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("parameters", "GVariant*"));
+ cfunc.add_parameter (new CCodeParameter ("invocation", "GDBusMethodInvocation*"));
+ cfunc.add_parameter (new CCodeParameter ("user_data", "gpointer"));
cfunc.modifiers |= CCodeModifiers.STATIC;
@@ -666,13 +666,13 @@ public class Vala.GDBusServerModule : GDBusClientModule {
void generate_interface_get_property_function (ObjectTypeSymbol sym) {
var cfunc = new CCodeFunction (sym.get_lower_case_cprefix () + "dbus_interface_get_property", "GVariant*");
- cfunc.add_parameter (new CCodeFormalParameter ("connection", "GDBusConnection*"));
- cfunc.add_parameter (new CCodeFormalParameter ("sender", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("object_path", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("interface_name", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("property_name", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("error", "GError**"));
- cfunc.add_parameter (new CCodeFormalParameter ("user_data", "gpointer"));
+ cfunc.add_parameter (new CCodeParameter ("connection", "GDBusConnection*"));
+ cfunc.add_parameter (new CCodeParameter ("sender", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("object_path", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("interface_name", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("property_name", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("error", "GError**"));
+ cfunc.add_parameter (new CCodeParameter ("user_data", "gpointer"));
cfunc.modifiers |= CCodeModifiers.STATIC;
@@ -731,14 +731,14 @@ public class Vala.GDBusServerModule : GDBusClientModule {
void generate_interface_set_property_function (ObjectTypeSymbol sym) {
var cfunc = new CCodeFunction (sym.get_lower_case_cprefix () + "dbus_interface_set_property", "gboolean");
- cfunc.add_parameter (new CCodeFormalParameter ("connection", "GDBusConnection*"));
- cfunc.add_parameter (new CCodeFormalParameter ("sender", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("object_path", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("interface_name", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("property_name", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("value", "GVariant*"));
- cfunc.add_parameter (new CCodeFormalParameter ("error", "GError**"));
- cfunc.add_parameter (new CCodeFormalParameter ("user_data", "gpointer"));
+ cfunc.add_parameter (new CCodeParameter ("connection", "GDBusConnection*"));
+ cfunc.add_parameter (new CCodeParameter ("sender", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("object_path", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("interface_name", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("property_name", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("value", "GVariant*"));
+ cfunc.add_parameter (new CCodeParameter ("error", "GError**"));
+ cfunc.add_parameter (new CCodeParameter ("user_data", "gpointer"));
cfunc.modifiers |= CCodeModifiers.STATIC;
@@ -812,7 +812,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
var in_args_info = new CCodeInitializerList ();
var out_args_info = new CCodeInitializerList ();
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.variable_type is ObjectType && param.variable_type.data_type.get_full_name () == "GLib.Cancellable") {
continue;
}
@@ -898,7 +898,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
var args_info = new CCodeInitializerList ();
- foreach (FormalParameter param in sig.get_parameters ()) {
+ foreach (Parameter param in sig.get_parameters ()) {
var info = new CCodeInitializerList ();
info.append (new CCodeConstant ("-1"));
info.append (new CCodeConstant ("\"%s\"".printf (param.name)));
@@ -1030,11 +1030,11 @@ public class Vala.GDBusServerModule : GDBusClientModule {
var function = new CCodeFunction (register_object_func, "guint");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("type", "GType"));
- function.add_parameter (new CCodeFormalParameter ("object", "void*"));
- function.add_parameter (new CCodeFormalParameter ("connection", "GDBusConnection*"));
- function.add_parameter (new CCodeFormalParameter ("path", "const gchar*"));
- function.add_parameter (new CCodeFormalParameter ("error", "GError**"));
+ function.add_parameter (new CCodeParameter ("type", "GType"));
+ function.add_parameter (new CCodeParameter ("object", "void*"));
+ function.add_parameter (new CCodeParameter ("connection", "GDBusConnection*"));
+ function.add_parameter (new CCodeParameter ("path", "const gchar*"));
+ function.add_parameter (new CCodeParameter ("error", "GError**"));
push_function (function);
@@ -1159,10 +1159,10 @@ public class Vala.GDBusServerModule : GDBusClientModule {
// declare register_object function
var cfunc = new CCodeFunction (register_object_name, "guint");
- cfunc.add_parameter (new CCodeFormalParameter ("object", "void*"));
- cfunc.add_parameter (new CCodeFormalParameter ("connection", "GDBusConnection*"));
- cfunc.add_parameter (new CCodeFormalParameter ("path", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("error", "GError**"));
+ cfunc.add_parameter (new CCodeParameter ("object", "void*"));
+ cfunc.add_parameter (new CCodeParameter ("connection", "GDBusConnection*"));
+ cfunc.add_parameter (new CCodeParameter ("path", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("error", "GError**"));
if (sym.is_private_symbol ()) {
cfunc.modifiers |= CCodeModifiers.STATIC;
}
@@ -1180,10 +1180,10 @@ public class Vala.GDBusServerModule : GDBusClientModule {
cfile.add_include ("gio/gio.h");
var cfunc = new CCodeFunction (sym.get_lower_case_cprefix () + "register_object", "guint");
- cfunc.add_parameter (new CCodeFormalParameter ("object", "gpointer"));
- cfunc.add_parameter (new CCodeFormalParameter ("connection", "GDBusConnection*"));
- cfunc.add_parameter (new CCodeFormalParameter ("path", "const gchar*"));
- cfunc.add_parameter (new CCodeFormalParameter ("error", "GError**"));
+ cfunc.add_parameter (new CCodeParameter ("object", "gpointer"));
+ cfunc.add_parameter (new CCodeParameter ("connection", "GDBusConnection*"));
+ cfunc.add_parameter (new CCodeParameter ("path", "const gchar*"));
+ cfunc.add_parameter (new CCodeParameter ("error", "GError**"));
if (sym.is_private_symbol ()) {
cfunc.modifiers |= CCodeModifiers.STATIC;
}
@@ -1244,7 +1244,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
cfunc = new CCodeFunction ("_" + sym.get_lower_case_cprefix () + "unregister_object");
- cfunc.add_parameter (new CCodeFormalParameter ("user_data", "gpointer"));
+ cfunc.add_parameter (new CCodeParameter ("user_data", "gpointer"));
cfunc.modifiers |= CCodeModifiers.STATIC;
cfile.add_function_declaration (cfunc);
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index b64a8af..cf545fc 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -548,7 +548,7 @@ public class Vala.GIRWriter : CodeVisitor {
}
}
- private void write_params_and_return (List<FormalParameter> params, DataType? return_type, bool return_array_length, bool constructor = false, DataType? instance_type = null, bool user_data = false) {
+ private void write_params_and_return (List<Parameter> params, DataType? return_type, bool return_array_length, bool constructor = false, DataType? instance_type = null, bool user_data = false) {
int last_index = 0;
if (params.size != 0 || instance_type != null || (return_type is ArrayType && return_array_length) || (return_type is DelegateType)) {
write_indent ();
@@ -560,7 +560,7 @@ public class Vala.GIRWriter : CodeVisitor {
write_param_or_return (instance_type, "parameter", ref index, false, "self");
}
- foreach (FormalParameter param in params) {
+ foreach (Parameter param in params) {
write_param_or_return (param.variable_type, "parameter", ref index, !param.no_array_length, param.name, param.direction);
write_implicit_params (param.variable_type, ref index, !param.no_array_length, param.name, param.direction);
@@ -655,7 +655,7 @@ public class Vala.GIRWriter : CodeVisitor {
}
}
- private void do_write_signature (Method m, string tag_name, bool instance, string name, string cname, List<Vala.FormalParameter> params, DataType return_type, bool can_fail) {
+ private void do_write_signature (Method m, string tag_name, bool instance, string name, string cname, List<Vala.Parameter> params, DataType return_type, bool can_fail) {
write_indent ();
buffer.append_printf ("<%s name=\"%s\"", tag_name, name);
if (tag_name == "virtual-method") {
diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala
index ee94626..2eadee5 100644
--- a/codegen/valagobjectmodule.vala
+++ b/codegen/valagobjectmodule.vala
@@ -176,10 +176,10 @@ public class Vala.GObjectModule : GTypeModule {
private void add_get_property_function (Class cl) {
var get_prop = new CCodeFunction ("_vala_%s_get_property".printf (cl.get_lower_case_cname (null)), "void");
get_prop.modifiers = CCodeModifiers.STATIC;
- get_prop.add_parameter (new CCodeFormalParameter ("object", "GObject *"));
- get_prop.add_parameter (new CCodeFormalParameter ("property_id", "guint"));
- get_prop.add_parameter (new CCodeFormalParameter ("value", "GValue *"));
- get_prop.add_parameter (new CCodeFormalParameter ("pspec", "GParamSpec *"));
+ get_prop.add_parameter (new CCodeParameter ("object", "GObject *"));
+ get_prop.add_parameter (new CCodeParameter ("property_id", "guint"));
+ get_prop.add_parameter (new CCodeParameter ("value", "GValue *"));
+ get_prop.add_parameter (new CCodeParameter ("pspec", "GParamSpec *"));
var block = new CCodeBlock ();
@@ -284,10 +284,10 @@ public class Vala.GObjectModule : GTypeModule {
private void add_set_property_function (Class cl) {
var set_prop = new CCodeFunction ("_vala_%s_set_property".printf (cl.get_lower_case_cname (null)), "void");
set_prop.modifiers = CCodeModifiers.STATIC;
- set_prop.add_parameter (new CCodeFormalParameter ("object", "GObject *"));
- set_prop.add_parameter (new CCodeFormalParameter ("property_id", "guint"));
- set_prop.add_parameter (new CCodeFormalParameter ("value", "const GValue *"));
- set_prop.add_parameter (new CCodeFormalParameter ("pspec", "GParamSpec *"));
+ set_prop.add_parameter (new CCodeParameter ("object", "GObject *"));
+ set_prop.add_parameter (new CCodeParameter ("property_id", "guint"));
+ set_prop.add_parameter (new CCodeParameter ("value", "const GValue *"));
+ set_prop.add_parameter (new CCodeParameter ("pspec", "GParamSpec *"));
var block = new CCodeBlock ();
@@ -432,9 +432,9 @@ public class Vala.GObjectModule : GTypeModule {
var function = new CCodeFunction ("%s_constructor".printf (cl.get_lower_case_cname (null)), "GObject *");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("type", "GType"));
- function.add_parameter (new CCodeFormalParameter ("n_construct_properties", "guint"));
- function.add_parameter (new CCodeFormalParameter ("construct_properties", "GObjectConstructParam *"));
+ function.add_parameter (new CCodeParameter ("type", "GType"));
+ function.add_parameter (new CCodeParameter ("n_construct_properties", "guint"));
+ function.add_parameter (new CCodeParameter ("construct_properties", "GObjectConstructParam *"));
cfile.add_function_declaration (function);
@@ -537,7 +537,7 @@ public class Vala.GObjectModule : GTypeModule {
var func = new CCodeFunction (getter_cname, prop.property_type.get_cname ());
func.modifiers |= CCodeModifiers.STATIC | CCodeModifiers.INLINE;
- func.add_parameter (new CCodeFormalParameter ("obj", prop.dynamic_type.get_cname ()));
+ func.add_parameter (new CCodeParameter ("obj", prop.dynamic_type.get_cname ()));
var block = new CCodeBlock ();
generate_gobject_property_getter_wrapper (prop, block);
@@ -562,8 +562,8 @@ public class Vala.GObjectModule : GTypeModule {
var func = new CCodeFunction (setter_cname, "void");
func.modifiers |= CCodeModifiers.STATIC | CCodeModifiers.INLINE;
- func.add_parameter (new CCodeFormalParameter ("obj", prop.dynamic_type.get_cname ()));
- func.add_parameter (new CCodeFormalParameter ("value", prop.property_type.get_cname ()));
+ func.add_parameter (new CCodeParameter ("obj", prop.dynamic_type.get_cname ()));
+ func.add_parameter (new CCodeParameter ("value", prop.property_type.get_cname ()));
var block = new CCodeBlock ();
generate_gobject_property_setter_wrapper (prop, block);
@@ -615,10 +615,10 @@ public class Vala.GObjectModule : GTypeModule {
string connect_wrapper_name = "_%sconnect".printf (get_dynamic_signal_cname (sig));
var func = new CCodeFunction (connect_wrapper_name, "void");
- func.add_parameter (new CCodeFormalParameter ("obj", "gpointer"));
- func.add_parameter (new CCodeFormalParameter ("signal_name", "const char *"));
- func.add_parameter (new CCodeFormalParameter ("handler", "GCallback"));
- func.add_parameter (new CCodeFormalParameter ("data", "gpointer"));
+ func.add_parameter (new CCodeParameter ("obj", "gpointer"));
+ func.add_parameter (new CCodeParameter ("signal_name", "const char *"));
+ func.add_parameter (new CCodeParameter ("handler", "GCallback"));
+ func.add_parameter (new CCodeParameter ("data", "gpointer"));
var block = new CCodeBlock ();
generate_gobject_connect_wrapper (sig, block, false);
@@ -639,10 +639,10 @@ public class Vala.GObjectModule : GTypeModule {
string connect_wrapper_name = "_%sconnect_after".printf (get_dynamic_signal_cname (sig));
var func = new CCodeFunction (connect_wrapper_name, "void");
- func.add_parameter (new CCodeFormalParameter ("obj", "gpointer"));
- func.add_parameter (new CCodeFormalParameter ("signal_name", "const char *"));
- func.add_parameter (new CCodeFormalParameter ("handler", "GCallback"));
- func.add_parameter (new CCodeFormalParameter ("data", "gpointer"));
+ func.add_parameter (new CCodeParameter ("obj", "gpointer"));
+ func.add_parameter (new CCodeParameter ("signal_name", "const char *"));
+ func.add_parameter (new CCodeParameter ("handler", "GCallback"));
+ func.add_parameter (new CCodeParameter ("data", "gpointer"));
var block = new CCodeBlock ();
generate_gobject_connect_wrapper (sig, block, true);
diff --git a/codegen/valagsignalmodule.vala b/codegen/valagsignalmodule.vala
index 38e99bf..2634d00 100644
--- a/codegen/valagsignalmodule.vala
+++ b/codegen/valagsignalmodule.vala
@@ -59,7 +59,7 @@ public class Vala.GSignalModule : GObjectModule {
}
}
- private string get_marshaller_type_name_for_parameter (FormalParameter param, bool dbus = false) {
+ private string get_marshaller_type_name_for_parameter (Parameter param, bool dbus = false) {
if (param.direction != ParameterDirection.IN) {
return ("POINTER");
} else {
@@ -67,7 +67,7 @@ public class Vala.GSignalModule : GObjectModule {
}
}
- public override string get_marshaller_function (List<FormalParameter> params, DataType return_type, string? prefix = null, bool dbus = false) {
+ public override string get_marshaller_function (List<Parameter> params, DataType return_type, string? prefix = null, bool dbus = false) {
var signature = get_marshaller_signature (params, return_type, dbus);
string ret;
@@ -84,7 +84,7 @@ public class Vala.GSignalModule : GObjectModule {
if (params == null || params.size == 0) {
ret = ret + "_VOID";
} else {
- foreach (FormalParameter p in params) {
+ foreach (Parameter p in params) {
ret = "%s_%s".printf (ret, get_marshaller_type_name_for_parameter (p, dbus).replace (",", "_"));
}
}
@@ -119,7 +119,7 @@ public class Vala.GSignalModule : GObjectModule {
return null;
}
- private string? get_value_type_name_from_parameter (FormalParameter p) {
+ private string? get_value_type_name_from_parameter (Parameter p) {
if (p.direction != ParameterDirection.IN) {
return "gpointer";
} else {
@@ -127,7 +127,7 @@ public class Vala.GSignalModule : GObjectModule {
}
}
- private string get_marshaller_signature (List<FormalParameter> params, DataType return_type, bool dbus = false) {
+ private string get_marshaller_signature (List<Parameter> params, DataType return_type, bool dbus = false) {
string signature;
signature = "%s:".printf (get_marshaller_type_name (return_type, dbus));
@@ -135,7 +135,7 @@ public class Vala.GSignalModule : GObjectModule {
signature = signature + "VOID";
} else {
bool first = true;
- foreach (FormalParameter p in params) {
+ foreach (Parameter p in params) {
if (first) {
signature = signature + get_marshaller_type_name_for_parameter (p, dbus);
first = false;
@@ -201,14 +201,14 @@ public class Vala.GSignalModule : GObjectModule {
sig.accept_children (this);
// declare parameter type
- foreach (FormalParameter p in sig.get_parameters ()) {
- generate_parameter (p, cfile, new HashMap<int,CCodeFormalParameter> (), null);
+ foreach (Parameter p in sig.get_parameters ()) {
+ generate_parameter (p, cfile, new HashMap<int,CCodeParameter> (), null);
}
generate_marshaller (sig.get_parameters (), sig.return_type);
}
- public override void generate_marshaller (List<FormalParameter> params, DataType return_type, bool dbus = false) {
+ public override void generate_marshaller (List<Parameter> params, DataType return_type, bool dbus = false) {
string signature;
int n_params, i;
@@ -221,29 +221,29 @@ public class Vala.GSignalModule : GObjectModule {
var signal_marshaller = new CCodeFunction (get_marshaller_function (params, return_type, null, dbus), "void");
signal_marshaller.modifiers = CCodeModifiers.STATIC;
- signal_marshaller.add_parameter (new CCodeFormalParameter ("closure", "GClosure *"));
- signal_marshaller.add_parameter (new CCodeFormalParameter ("return_value", "GValue *"));
- signal_marshaller.add_parameter (new CCodeFormalParameter ("n_param_values", "guint"));
- signal_marshaller.add_parameter (new CCodeFormalParameter ("param_values", "const GValue *"));
- signal_marshaller.add_parameter (new CCodeFormalParameter ("invocation_hint", "gpointer"));
- signal_marshaller.add_parameter (new CCodeFormalParameter ("marshal_data", "gpointer"));
+ signal_marshaller.add_parameter (new CCodeParameter ("closure", "GClosure *"));
+ signal_marshaller.add_parameter (new CCodeParameter ("return_value", "GValue *"));
+ signal_marshaller.add_parameter (new CCodeParameter ("n_param_values", "guint"));
+ signal_marshaller.add_parameter (new CCodeParameter ("param_values", "const GValue *"));
+ signal_marshaller.add_parameter (new CCodeParameter ("invocation_hint", "gpointer"));
+ signal_marshaller.add_parameter (new CCodeParameter ("marshal_data", "gpointer"));
cfile.add_function_declaration (signal_marshaller);
var marshaller_body = new CCodeBlock ();
var callback_decl = new CCodeFunctionDeclarator (get_marshaller_function (params, return_type, "GMarshalFunc", dbus));
- callback_decl.add_parameter (new CCodeFormalParameter ("data1", "gpointer"));
+ callback_decl.add_parameter (new CCodeParameter ("data1", "gpointer"));
n_params = 1;
- foreach (FormalParameter p in params) {
- callback_decl.add_parameter (new CCodeFormalParameter ("arg_%d".printf (n_params), get_value_type_name_from_parameter (p)));
+ foreach (Parameter p in params) {
+ callback_decl.add_parameter (new CCodeParameter ("arg_%d".printf (n_params), get_value_type_name_from_parameter (p)));
n_params++;
if (p.variable_type.is_array () && !dbus) {
- callback_decl.add_parameter (new CCodeFormalParameter ("arg_%d".printf (n_params), "gint"));
+ callback_decl.add_parameter (new CCodeParameter ("arg_%d".printf (n_params), "gint"));
n_params++;
}
}
- callback_decl.add_parameter (new CCodeFormalParameter ("data2", "gpointer"));
+ callback_decl.add_parameter (new CCodeParameter ("data2", "gpointer"));
marshaller_body.add_statement (new CCodeTypeDefinition (get_value_type_name_from_type_reference (return_type), callback_decl));
var var_decl = new CCodeDeclaration (get_marshaller_function (params, return_type, "GMarshalFunc", dbus));
@@ -296,7 +296,7 @@ public class Vala.GSignalModule : GObjectModule {
fc = new CCodeFunctionCall (new CCodeIdentifier ("callback"));
fc.add_argument (new CCodeIdentifier ("data1"));
i = 1;
- foreach (FormalParameter p in params) {
+ foreach (Parameter p in params) {
string get_value_function;
bool is_array = p.variable_type.is_array ();
if (p.direction != ParameterDirection.IN) {
@@ -447,7 +447,7 @@ public class Vala.GSignalModule : GObjectModule {
}
int params_len = 0;
- foreach (FormalParameter param in params) {
+ foreach (Parameter param in params) {
params_len++;
if (param.variable_type.is_array ()) {
params_len++;
@@ -455,7 +455,7 @@ public class Vala.GSignalModule : GObjectModule {
}
csignew.add_argument (new CCodeConstant ("%d".printf (params_len)));
- foreach (FormalParameter param in params) {
+ foreach (Parameter param in params) {
if (param.variable_type.is_array ()) {
if (((ArrayType) param.variable_type).element_type.data_type == string_type.data_type) {
csignew.add_argument (new CCodeConstant ("G_TYPE_STRV"));
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index 9ad6b08..2e021d4 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -24,7 +24,7 @@
public class Vala.GTypeModule : GErrorModule {
- public override CCodeFormalParameter generate_parameter (FormalParameter param, CCodeFile decl_space, Map<int,CCodeFormalParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
+ public override CCodeParameter generate_parameter (Parameter param, CCodeFile decl_space, Map<int,CCodeParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
if (!(param.variable_type is ObjectType)) {
return base.generate_parameter (param, decl_space, cparam_map, carg_map);
}
@@ -37,7 +37,7 @@ public class Vala.GTypeModule : GErrorModule {
ctypename += "*";
}
- var cparam = new CCodeFormalParameter (get_variable_cname (param.name), ctypename);
+ var cparam = new CCodeParameter (get_variable_cname (param.name), ctypename);
cparam_map.set (get_param_pos (param.cparameter_position), cparam);
if (carg_map != null) {
@@ -97,8 +97,8 @@ public class Vala.GTypeModule : GErrorModule {
unref_fun.modifiers = CCodeModifiers.STATIC;
}
- ref_fun.add_parameter (new CCodeFormalParameter ("instance", "gpointer"));
- unref_fun.add_parameter (new CCodeFormalParameter ("instance", "gpointer"));
+ ref_fun.add_parameter (new CCodeParameter ("instance", "gpointer"));
+ unref_fun.add_parameter (new CCodeParameter ("instance", "gpointer"));
decl_space.add_function_declaration (ref_fun);
decl_space.add_function_declaration (unref_fun);
@@ -107,11 +107,11 @@ public class Vala.GTypeModule : GErrorModule {
string function_name = cl.get_lower_case_cname ("param_spec_");
var function = new CCodeFunction (function_name, "GParamSpec*");
- function.add_parameter (new CCodeFormalParameter ("name", "const gchar*"));
- function.add_parameter (new CCodeFormalParameter ("nick", "const gchar*"));
- function.add_parameter (new CCodeFormalParameter ("blurb", "const gchar*"));
- function.add_parameter (new CCodeFormalParameter ("object_type", "GType"));
- function.add_parameter (new CCodeFormalParameter ("flags", "GParamFlags"));
+ function.add_parameter (new CCodeParameter ("name", "const gchar*"));
+ function.add_parameter (new CCodeParameter ("nick", "const gchar*"));
+ function.add_parameter (new CCodeParameter ("blurb", "const gchar*"));
+ function.add_parameter (new CCodeParameter ("object_type", "GType"));
+ function.add_parameter (new CCodeParameter ("flags", "GParamFlags"));
if (cl.access == SymbolAccessibility.PRIVATE) {
function.modifiers = CCodeModifiers.STATIC;
@@ -122,8 +122,8 @@ public class Vala.GTypeModule : GErrorModule {
decl_space.add_function_declaration (function);
function = new CCodeFunction (cl.get_set_value_function (), "void");
- function.add_parameter (new CCodeFormalParameter ("value", "GValue*"));
- function.add_parameter (new CCodeFormalParameter ("v_object", "gpointer"));
+ function.add_parameter (new CCodeParameter ("value", "GValue*"));
+ function.add_parameter (new CCodeParameter ("v_object", "gpointer"));
if (cl.access == SymbolAccessibility.PRIVATE) {
function.modifiers = CCodeModifiers.STATIC;
@@ -134,8 +134,8 @@ public class Vala.GTypeModule : GErrorModule {
decl_space.add_function_declaration (function);
function = new CCodeFunction (cl.get_take_value_function (), "void");
- function.add_parameter (new CCodeFormalParameter ("value", "GValue*"));
- function.add_parameter (new CCodeFormalParameter ("v_object", "gpointer"));
+ function.add_parameter (new CCodeParameter ("value", "GValue*"));
+ function.add_parameter (new CCodeParameter ("v_object", "gpointer"));
if (cl.access == SymbolAccessibility.PRIVATE) {
function.modifiers = CCodeModifiers.STATIC;
@@ -146,7 +146,7 @@ public class Vala.GTypeModule : GErrorModule {
decl_space.add_function_declaration (function);
function = new CCodeFunction (cl.get_get_value_function (), "gpointer");
- function.add_parameter (new CCodeFormalParameter ("value", "const GValue*"));
+ function.add_parameter (new CCodeParameter ("value", "const GValue*"));
if (cl.access == SymbolAccessibility.PRIVATE) {
function.modifiers = CCodeModifiers.STATIC;
@@ -162,7 +162,7 @@ public class Vala.GTypeModule : GErrorModule {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("self", cl.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", cl.get_cname () + "*"));
decl_space.add_function_declaration (function);
}
@@ -248,14 +248,14 @@ public class Vala.GTypeModule : GErrorModule {
var t = (ObjectTypeSymbol) prop.parent_symbol;
var this_type = new ObjectType (t);
- var cselfparam = new CCodeFormalParameter ("self", this_type.get_cname ());
+ var cselfparam = new CCodeParameter ("self", this_type.get_cname ());
if (prop.get_accessor != null) {
var vdeclarator = new CCodeFunctionDeclarator ("get_%s".printf (prop.name));
vdeclarator.add_parameter (cselfparam);
string creturn_type;
if (prop.property_type.is_real_non_null_struct_type ()) {
- var cvalueparam = new CCodeFormalParameter ("result", prop.get_accessor.value_type.get_cname () + "*");
+ var cvalueparam = new CCodeParameter ("result", prop.get_accessor.value_type.get_cname () + "*");
vdeclarator.add_parameter (cvalueparam);
creturn_type = "void";
} else {
@@ -265,10 +265,10 @@ public class Vala.GTypeModule : GErrorModule {
var array_type = prop.property_type as ArrayType;
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
- vdeclarator.add_parameter (new CCodeFormalParameter (get_array_length_cname ("result", dim), "int*"));
+ vdeclarator.add_parameter (new CCodeParameter (get_array_length_cname ("result", dim), "int*"));
}
} else if ((prop.property_type is DelegateType) && ((DelegateType) prop.property_type).delegate_symbol.has_target) {
- vdeclarator.add_parameter (new CCodeFormalParameter (get_delegate_target_cname ("result"), "gpointer*"));
+ vdeclarator.add_parameter (new CCodeParameter (get_delegate_target_cname ("result"), "gpointer*"));
}
var vdecl = new CCodeDeclaration (creturn_type);
@@ -276,11 +276,11 @@ public class Vala.GTypeModule : GErrorModule {
type_struct.add_declaration (vdecl);
}
if (prop.set_accessor != null) {
- CCodeFormalParameter cvalueparam;
+ CCodeParameter cvalueparam;
if (prop.property_type.is_real_non_null_struct_type ()) {
- cvalueparam = new CCodeFormalParameter ("value", prop.set_accessor.value_type.get_cname () + "*");
+ cvalueparam = new CCodeParameter ("value", prop.set_accessor.value_type.get_cname () + "*");
} else {
- cvalueparam = new CCodeFormalParameter ("value", prop.set_accessor.value_type.get_cname ());
+ cvalueparam = new CCodeParameter ("value", prop.set_accessor.value_type.get_cname ());
}
var vdeclarator = new CCodeFunctionDeclarator ("set_%s".printf (prop.name));
@@ -290,10 +290,10 @@ public class Vala.GTypeModule : GErrorModule {
var array_type = prop.property_type as ArrayType;
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
- vdeclarator.add_parameter (new CCodeFormalParameter (get_array_length_cname ("value", dim), "int"));
+ vdeclarator.add_parameter (new CCodeParameter (get_array_length_cname ("value", dim), "int"));
}
} else if ((prop.property_type is DelegateType) && ((DelegateType) prop.property_type).delegate_symbol.has_target) {
- vdeclarator.add_parameter (new CCodeFormalParameter (get_delegate_target_cname ("value"), "gpointer"));
+ vdeclarator.add_parameter (new CCodeParameter (get_delegate_target_cname ("value"), "gpointer"));
}
var vdecl = new CCodeDeclaration ("void");
@@ -367,7 +367,7 @@ public class Vala.GTypeModule : GErrorModule {
// add vfunc field to the type struct
var vdeclarator = new CCodeFunctionDeclarator (m.vfunc_name);
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (m, decl_space, cparam_map, new CCodeFunction ("fake"), vdeclarator);
@@ -638,8 +638,8 @@ public class Vala.GTypeModule : GErrorModule {
unref_fun.modifiers = CCodeModifiers.STATIC;
}
- ref_fun.add_parameter (new CCodeFormalParameter ("instance", "gpointer"));
- unref_fun.add_parameter (new CCodeFormalParameter ("instance", "gpointer"));
+ ref_fun.add_parameter (new CCodeParameter ("instance", "gpointer"));
+ unref_fun.add_parameter (new CCodeParameter ("instance", "gpointer"));
var ref_block = new CCodeBlock ();
var unref_block = new CCodeBlock ();
@@ -705,7 +705,7 @@ public class Vala.GTypeModule : GErrorModule {
private void add_type_value_table_init_function (Class cl) {
var function = new CCodeFunction ("%s_init".printf (cl.get_lower_case_cname ("value_")), "void");
- function.add_parameter (new CCodeFormalParameter ("value", "GValue*"));
+ function.add_parameter (new CCodeParameter ("value", "GValue*"));
function.modifiers = CCodeModifiers.STATIC;
var init_block = new CCodeBlock ();
@@ -717,7 +717,7 @@ public class Vala.GTypeModule : GErrorModule {
private void add_type_value_table_free_function (Class cl) {
var function = new CCodeFunction ("%s_free_value".printf (cl.get_lower_case_cname ("value_")), "void");
- function.add_parameter (new CCodeFormalParameter ("value", "GValue*"));
+ function.add_parameter (new CCodeParameter ("value", "GValue*"));
function.modifiers = CCodeModifiers.STATIC;
var init_block = new CCodeBlock ();
@@ -736,8 +736,8 @@ public class Vala.GTypeModule : GErrorModule {
private void add_type_value_table_copy_function (Class cl) {
var function = new CCodeFunction ("%s_copy_value".printf (cl.get_lower_case_cname ("value_")), "void");
- function.add_parameter (new CCodeFormalParameter ("src_value", "const GValue*"));
- function.add_parameter (new CCodeFormalParameter ("dest_value", "GValue*"));
+ function.add_parameter (new CCodeParameter ("src_value", "const GValue*"));
+ function.add_parameter (new CCodeParameter ("dest_value", "GValue*"));
function.modifiers = CCodeModifiers.STATIC;
var init_block = new CCodeBlock ();
@@ -763,7 +763,7 @@ public class Vala.GTypeModule : GErrorModule {
private void add_type_value_table_peek_pointer_function (Class cl) {
var function = new CCodeFunction ("%s_peek_pointer".printf (cl.get_lower_case_cname ("value_")), "gpointer");
- function.add_parameter (new CCodeFormalParameter ("value", "const GValue*"));
+ function.add_parameter (new CCodeParameter ("value", "const GValue*"));
function.modifiers = CCodeModifiers.STATIC;
var init_block = new CCodeBlock ();
@@ -778,10 +778,10 @@ public class Vala.GTypeModule : GErrorModule {
private void add_type_value_table_lcopy_value_function ( Class cl ) {
var function = new CCodeFunction ("%s_lcopy_value".printf (cl.get_lower_case_cname ("value_")), "gchar*");
- function.add_parameter (new CCodeFormalParameter ("value", "const GValue*"));
- function.add_parameter (new CCodeFormalParameter ("n_collect_values", "guint"));
- function.add_parameter (new CCodeFormalParameter ("collect_values", "GTypeCValue*"));
- function.add_parameter (new CCodeFormalParameter ("collect_flags", "guint"));
+ function.add_parameter (new CCodeParameter ("value", "const GValue*"));
+ function.add_parameter (new CCodeParameter ("n_collect_values", "guint"));
+ function.add_parameter (new CCodeParameter ("collect_values", "GTypeCValue*"));
+ function.add_parameter (new CCodeParameter ("collect_flags", "guint"));
function.modifiers = CCodeModifiers.STATIC;
var vpointer = new CCodeMemberAccess (new CCodeMemberAccess.pointer (new CCodeIdentifier ("value"), "data[0]"), "v_pointer");
@@ -830,10 +830,10 @@ public class Vala.GTypeModule : GErrorModule {
private void add_type_value_table_collect_value_function (Class cl) {
var function = new CCodeFunction ("%s_collect_value".printf (cl.get_lower_case_cname ("value_")), "gchar*");
- function.add_parameter (new CCodeFormalParameter ("value", "GValue*"));
- function.add_parameter (new CCodeFormalParameter ("n_collect_values", "guint"));
- function.add_parameter (new CCodeFormalParameter ("collect_values", "GTypeCValue*"));
- function.add_parameter (new CCodeFormalParameter ("collect_flags", "guint"));
+ function.add_parameter (new CCodeParameter ("value", "GValue*"));
+ function.add_parameter (new CCodeParameter ("n_collect_values", "guint"));
+ function.add_parameter (new CCodeParameter ("collect_values", "GTypeCValue*"));
+ function.add_parameter (new CCodeParameter ("collect_flags", "guint"));
function.modifiers = CCodeModifiers.STATIC;
var vpointer = new CCodeMemberAccess(new CCodeMemberAccess.pointer (new CCodeIdentifier ("value"), "data[0]"),"v_pointer");
@@ -912,11 +912,11 @@ public class Vala.GTypeModule : GErrorModule {
string function_name = cl.get_lower_case_cname ("param_spec_");
var function = new CCodeFunction (function_name, "GParamSpec*");
- function.add_parameter (new CCodeFormalParameter ("name", "const gchar*"));
- function.add_parameter (new CCodeFormalParameter ("nick", "const gchar*"));
- function.add_parameter (new CCodeFormalParameter ("blurb", "const gchar*"));
- function.add_parameter (new CCodeFormalParameter ("object_type", "GType"));
- function.add_parameter (new CCodeFormalParameter ("flags", "GParamFlags"));
+ function.add_parameter (new CCodeParameter ("name", "const gchar*"));
+ function.add_parameter (new CCodeParameter ("nick", "const gchar*"));
+ function.add_parameter (new CCodeParameter ("blurb", "const gchar*"));
+ function.add_parameter (new CCodeParameter ("object_type", "GType"));
+ function.add_parameter (new CCodeParameter ("flags", "GParamFlags"));
if (cl.access == SymbolAccessibility.PRIVATE) {
function.modifiers = CCodeModifiers.STATIC;
@@ -957,8 +957,8 @@ public class Vala.GTypeModule : GErrorModule {
private void add_g_value_set_function (Class cl) {
var function = new CCodeFunction (cl.get_set_value_function (), "void");
- function.add_parameter (new CCodeFormalParameter ("value", "GValue*"));
- function.add_parameter (new CCodeFormalParameter ("v_object", "gpointer"));
+ function.add_parameter (new CCodeParameter ("value", "GValue*"));
+ function.add_parameter (new CCodeParameter ("v_object", "gpointer"));
if (cl.access == SymbolAccessibility.PRIVATE) {
function.modifiers = CCodeModifiers.STATIC;
@@ -1031,8 +1031,8 @@ public class Vala.GTypeModule : GErrorModule {
private void add_g_value_take_function (Class cl) {
var function = new CCodeFunction (cl.get_take_value_function (), "void");
- function.add_parameter (new CCodeFormalParameter ("value", "GValue*"));
- function.add_parameter (new CCodeFormalParameter ("v_object", "gpointer"));
+ function.add_parameter (new CCodeParameter ("value", "GValue*"));
+ function.add_parameter (new CCodeParameter ("v_object", "gpointer"));
if (cl.access == SymbolAccessibility.PRIVATE) {
function.modifiers = CCodeModifiers.STATIC;
@@ -1101,7 +1101,7 @@ public class Vala.GTypeModule : GErrorModule {
private void add_g_value_get_function (Class cl) {
var function = new CCodeFunction (cl.get_get_value_function (), "gpointer");
- function.add_parameter (new CCodeFormalParameter ("value", "const GValue*"));
+ function.add_parameter (new CCodeParameter ("value", "const GValue*"));
if (cl.access == SymbolAccessibility.PRIVATE) {
function.modifiers = CCodeModifiers.STATIC;
@@ -1129,7 +1129,7 @@ public class Vala.GTypeModule : GErrorModule {
push_context (base_init_context);
var base_init = new CCodeFunction ("%s_base_init".printf (cl.get_lower_case_cname (null)), "void");
- base_init.add_parameter (new CCodeFormalParameter ("klass", "%sClass *".printf (cl.get_cname ())));
+ base_init.add_parameter (new CCodeParameter ("klass", "%sClass *".printf (cl.get_cname ())));
base_init.modifiers = CCodeModifiers.STATIC;
push_function (base_init);
@@ -1198,7 +1198,7 @@ public class Vala.GTypeModule : GErrorModule {
push_context (class_init_context);
var func = new CCodeFunction ("%s_class_init".printf (cl.get_lower_case_cname (null)));
- func.add_parameter (new CCodeFormalParameter ("klass", "%sClass *".printf (cl.get_cname ())));
+ func.add_parameter (new CCodeParameter ("klass", "%sClass *".printf (cl.get_cname ())));
func.modifiers = CCodeModifiers.STATIC;
CCodeFunctionCall ccall;
@@ -1313,7 +1313,7 @@ public class Vala.GTypeModule : GErrorModule {
private void add_interface_init_function (Class cl, Interface iface) {
var iface_init = new CCodeFunction ("%s_%s_interface_init".printf (cl.get_lower_case_cname (null), iface.get_lower_case_cname (null)), "void");
- iface_init.add_parameter (new CCodeFormalParameter ("iface", "%s *".printf (iface.get_type_cname ())));
+ iface_init.add_parameter (new CCodeParameter ("iface", "%s *".printf (iface.get_type_cname ())));
iface_init.modifiers = CCodeModifiers.STATIC;
var init_block = new CCodeBlock ();
@@ -1496,7 +1496,7 @@ public class Vala.GTypeModule : GErrorModule {
string cast_args = base_type.get_cname () + "*";
var vdeclarator = new CCodeFunctionDeclarator (m.vfunc_name);
- var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
+ var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
generate_cparameters (m, cfile, cparam_map, new CCodeFunction ("fake"), vdeclarator);
@@ -1526,7 +1526,7 @@ public class Vala.GTypeModule : GErrorModule {
push_context (instance_init_context);
var func = new CCodeFunction ("%s_instance_init".printf (cl.get_lower_case_cname (null)));
- func.add_parameter (new CCodeFormalParameter ("self", "%s *".printf (cl.get_cname ())));
+ func.add_parameter (new CCodeParameter ("self", "%s *".printf (cl.get_cname ())));
func.modifiers = CCodeModifiers.STATIC;
push_function (func);
@@ -1556,7 +1556,7 @@ public class Vala.GTypeModule : GErrorModule {
var function = new CCodeFunction ("%s_class_finalize".printf (cl.get_lower_case_cname (null)), "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("klass", cl.get_cname () + "Class *"));
+ function.add_parameter (new CCodeParameter ("klass", cl.get_cname () + "Class *"));
push_function (function);
@@ -1578,7 +1578,7 @@ public class Vala.GTypeModule : GErrorModule {
var function = new CCodeFunction ("%s_base_finalize".printf (cl.get_lower_case_cname (null)), "void");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeFormalParameter ("klass", cl.get_cname () + "Class *"));
+ function.add_parameter (new CCodeParameter ("klass", cl.get_cname () + "Class *"));
push_function (function);
@@ -1627,7 +1627,7 @@ public class Vala.GTypeModule : GErrorModule {
}
var func = new CCodeFunction ("%s_finalize".printf (cl.get_lower_case_cname (null)));
- func.add_parameter (new CCodeFormalParameter ("obj", fundamental_class.get_cname () + "*"));
+ func.add_parameter (new CCodeParameter ("obj", fundamental_class.get_cname () + "*"));
func.modifiers = CCodeModifiers.STATIC;
push_function (func);
@@ -1642,7 +1642,7 @@ public class Vala.GTypeModule : GErrorModule {
function.modifiers = CCodeModifiers.STATIC;
}
- function.add_parameter (new CCodeFormalParameter ("self", cl.get_cname () + "*"));
+ function.add_parameter (new CCodeParameter ("self", cl.get_cname () + "*"));
push_function (function);
}
@@ -1921,14 +1921,14 @@ public class Vala.GTypeModule : GErrorModule {
bool returns_real_struct = prop.property_type.is_real_non_null_struct_type ();
var this_type = new ObjectType (t);
- var cselfparam = new CCodeFormalParameter ("self", this_type.get_cname ());
+ var cselfparam = new CCodeParameter ("self", this_type.get_cname ());
if (prop.get_accessor != null) {
var vdeclarator = new CCodeFunctionDeclarator ("get_%s".printf (prop.name));
vdeclarator.add_parameter (cselfparam);
string creturn_type;
if (returns_real_struct) {
- var cvalueparam = new CCodeFormalParameter ("value", prop.get_accessor.value_type.get_cname () + "*");
+ var cvalueparam = new CCodeParameter ("value", prop.get_accessor.value_type.get_cname () + "*");
vdeclarator.add_parameter (cvalueparam);
creturn_type = "void";
} else {
@@ -1938,7 +1938,7 @@ public class Vala.GTypeModule : GErrorModule {
var array_type = prop.property_type as ArrayType;
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
- vdeclarator.add_parameter (new CCodeFormalParameter (get_array_length_cname ("result", dim), "int*"));
+ vdeclarator.add_parameter (new CCodeParameter (get_array_length_cname ("result", dim), "int*"));
}
}
@@ -1950,17 +1950,17 @@ public class Vala.GTypeModule : GErrorModule {
var vdeclarator = new CCodeFunctionDeclarator ("set_%s".printf (prop.name));
vdeclarator.add_parameter (cselfparam);
if (returns_real_struct) {
- var cvalueparam = new CCodeFormalParameter ("value", prop.set_accessor.value_type.get_cname () + "*");
+ var cvalueparam = new CCodeParameter ("value", prop.set_accessor.value_type.get_cname () + "*");
vdeclarator.add_parameter (cvalueparam);
} else {
- var cvalueparam = new CCodeFormalParameter ("value", prop.set_accessor.value_type.get_cname ());
+ var cvalueparam = new CCodeParameter ("value", prop.set_accessor.value_type.get_cname ());
vdeclarator.add_parameter (cvalueparam);
}
var array_type = prop.property_type as ArrayType;
if (array_type != null) {
for (int dim = 1; dim <= array_type.rank; dim++) {
- vdeclarator.add_parameter (new CCodeFormalParameter (get_array_length_cname ("value", dim), "int"));
+ vdeclarator.add_parameter (new CCodeParameter (get_array_length_cname ("value", dim), "int"));
}
}
@@ -2018,7 +2018,7 @@ public class Vala.GTypeModule : GErrorModule {
push_context (new EmitContext (iface));
var base_init = new CCodeFunction ("%s_base_init".printf (iface.get_lower_case_cname (null)), "void");
- base_init.add_parameter (new CCodeFormalParameter ("iface", "%sIface *".printf (iface.get_cname ())));
+ base_init.add_parameter (new CCodeParameter ("iface", "%sIface *".printf (iface.get_cname ())));
base_init.modifiers = CCodeModifiers.STATIC;
push_function (base_init);
diff --git a/codegen/valagvariantmodule.vala b/codegen/valagvariantmodule.vala
index d05742e..87453a9 100644
--- a/codegen/valagvariantmodule.vala
+++ b/codegen/valagvariantmodule.vala
@@ -213,7 +213,7 @@ public class Vala.GVariantModule : GAsyncModule {
var from_string_name = "%s_from_string".printf (en.get_lower_case_cname (null));
var from_string_func = new CCodeFunction (from_string_name, en.get_cname ());
- from_string_func.add_parameter (new CCodeFormalParameter ("str", "const char*"));
+ from_string_func.add_parameter (new CCodeParameter ("str", "const char*"));
return from_string_func;
}
@@ -222,7 +222,7 @@ public class Vala.GVariantModule : GAsyncModule {
var from_string_name = "%s_from_string".printf (en.get_lower_case_cname (null));
var from_string_func = new CCodeFunction (from_string_name, en.get_cname ());
- from_string_func.add_parameter (new CCodeFormalParameter ("str", "const char*"));
+ from_string_func.add_parameter (new CCodeParameter ("str", "const char*"));
var from_string_block = new CCodeBlock ();
from_string_func.block = from_string_block;
@@ -536,7 +536,7 @@ public class Vala.GVariantModule : GAsyncModule {
var to_string_name = "%s_to_string".printf (en.get_lower_case_cname (null));
var to_string_func = new CCodeFunction (to_string_name, "const char*");
- to_string_func.add_parameter (new CCodeFormalParameter ("value", en.get_cname ()));
+ to_string_func.add_parameter (new CCodeParameter ("value", en.get_cname ()));
return to_string_func;
}
@@ -545,7 +545,7 @@ public class Vala.GVariantModule : GAsyncModule {
var to_string_name = "%s_to_string".printf (en.get_lower_case_cname (null));
var to_string_func = new CCodeFunction (to_string_name, "const char*");
- to_string_func.add_parameter (new CCodeFormalParameter ("value", en.get_cname ()));
+ to_string_func.add_parameter (new CCodeParameter ("value", en.get_cname ()));
var to_string_block = new CCodeBlock ();
to_string_func.block = to_string_block;
diff --git a/codegen/valatyperegisterfunction.vala b/codegen/valatyperegisterfunction.vala
index b30d7ef..7b561f7 100644
--- a/codegen/valatyperegisterfunction.vala
+++ b/codegen/valatyperegisterfunction.vala
@@ -78,7 +78,7 @@ public abstract class Vala.TypeRegisterFunction {
}
} else {
fun = new CCodeFunction ("%s_register_type".printf (get_type_declaration ().get_lower_case_cname (null)), "GType");
- fun.add_parameter (new CCodeFormalParameter ("module", "GTypeModule *"));
+ fun.add_parameter (new CCodeParameter ("module", "GTypeModule *"));
var get_fun = new CCodeFunction ("%s_get_type".printf (get_type_declaration ().get_lower_case_cname (null)), "GType");
get_fun.attributes = "G_GNUC_CONST";
diff --git a/vala/Makefile.am b/vala/Makefile.am
index a2e0ede..e66e992 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -71,7 +71,6 @@ libvalacore_la_VALASOURCES = \
valafloatingtype.vala \
valaflowanalyzer.vala \
valaforeachstatement.vala \
- valaformalparameter.vala \
valaforstatement.vala \
valagirparser.vala \
valagenerictype.vala \
@@ -106,6 +105,7 @@ libvalacore_la_VALASOURCES = \
valaobjectcreationexpression.vala \
valaobjecttype.vala \
valaobjecttypesymbol.vala \
+ valaparameter.vala \
valaparser.vala \
valaphifunction.vala \
valapointerindirection.vala \
diff --git a/vala/valaarraytype.vala b/vala/valaarraytype.vala
index 53a0ed4..bff5333 100644
--- a/vala/valaarraytype.vala
+++ b/vala/valaarraytype.vala
@@ -109,7 +109,7 @@ public class Vala.ArrayType : ReferenceType {
var root_symbol = source_reference.file.context.root;
var int_type = new IntegerType ((Struct) root_symbol.scope.lookup ("int"));
- resize_method.add_parameter (new FormalParameter ("length", int_type));
+ resize_method.add_parameter (new Parameter ("length", int_type));
resize_method.returns_modified_pointer = true;
}
@@ -128,9 +128,9 @@ public class Vala.ArrayType : ReferenceType {
var root_symbol = source_reference.file.context.root;
var int_type = new IntegerType ((Struct) root_symbol.scope.lookup ("int"));
- move_method.add_parameter (new FormalParameter ("src", int_type));
- move_method.add_parameter (new FormalParameter ("dest", int_type));
- move_method.add_parameter (new FormalParameter ("length", int_type));
+ move_method.add_parameter (new Parameter ("src", int_type));
+ move_method.add_parameter (new Parameter ("dest", int_type));
+ move_method.add_parameter (new Parameter ("length", int_type));
}
return move_method;
}
diff --git a/vala/valaassignment.vala b/vala/valaassignment.vala
index fbed65c..993de9b 100644
--- a/vala/valaassignment.vala
+++ b/vala/valaassignment.vala
@@ -273,7 +273,7 @@ public class Vala.Assignment : Expression {
var right_ma = right as MemberAccess;
if (dynamic_sig != null) {
bool first = true;
- foreach (FormalParameter param in dynamic_sig.handler.value_type.get_parameters ()) {
+ foreach (Parameter param in dynamic_sig.handler.value_type.get_parameters ()) {
if (first) {
// skip sender parameter
first = false;
@@ -375,7 +375,7 @@ public class Vala.Assignment : Expression {
var right_ma = right as MemberAccess;
if (right_ma != null && ma.symbol_reference == right_ma.symbol_reference) {
- if (ma.symbol_reference is LocalVariable || ma.symbol_reference is FormalParameter) {
+ if (ma.symbol_reference is LocalVariable || ma.symbol_reference is Parameter) {
Report.warning (source_reference, "Assignment to same variable");
} else if (ma.symbol_reference is Field) {
var f = (Field) ma.symbol_reference;
diff --git a/vala/valaclass.vala b/vala/valaclass.vala
index 7031601..ffb2265 100644
--- a/vala/valaclass.vala
+++ b/vala/valaclass.vala
@@ -210,7 +210,7 @@ public class Vala.Class : ObjectTypeSymbol {
if (_destructor.this_parameter != null) {
_destructor.scope.remove (_destructor.this_parameter.name);
}
- _destructor.this_parameter = new FormalParameter ("this", get_this_type ());
+ _destructor.this_parameter = new Parameter ("this", get_this_type ());
_destructor.scope.add (_destructor.this_parameter.name, _destructor.this_parameter);
}
}
@@ -346,7 +346,7 @@ public class Vala.Class : ObjectTypeSymbol {
if (m.this_parameter != null) {
m.scope.remove (m.this_parameter.name);
}
- m.this_parameter = new FormalParameter ("this", get_this_type ());
+ m.this_parameter = new Parameter ("this", get_this_type ());
m.scope.add (m.this_parameter.name, m.this_parameter);
}
if (!(m.return_type is VoidType) && (CodeContext.get ().profile == Profile.DOVA || m.get_postconditions ().size > 0)) {
@@ -393,7 +393,7 @@ public class Vala.Class : ObjectTypeSymbol {
properties.add (prop);
scope.add (prop.name, prop);
- prop.this_parameter = new FormalParameter ("this", get_this_type ());
+ prop.this_parameter = new Parameter ("this", get_this_type ());
prop.scope.add (prop.this_parameter.name, prop.this_parameter);
if (prop.field != null) {
diff --git a/vala/valacodevisitor.vala b/vala/valacodevisitor.vala
index 7cfd46b..395009d 100644
--- a/vala/valacodevisitor.vala
+++ b/vala/valacodevisitor.vala
@@ -145,7 +145,7 @@ public abstract class Vala.CodeVisitor {
*
* @param p a formal parameter
*/
- public virtual void visit_formal_parameter (FormalParameter p) {
+ public virtual void visit_formal_parameter (Parameter p) {
}
/**
diff --git a/vala/valacodewriter.vala b/vala/valacodewriter.vala
index e7f91fc..8b3bf7d 100644
--- a/vala/valacodewriter.vala
+++ b/vala/valacodewriter.vala
@@ -831,11 +831,11 @@ public class Vala.CodeWriter : CodeVisitor {
return ((int) (d1 * 1000)) == ((int) (d2 * 1000));
}
- private void write_params (List<FormalParameter> params) {
+ private void write_params (List<Parameter> params) {
write_string ("(");
int i = 1;
- foreach (FormalParameter param in params) {
+ foreach (Parameter param in params) {
if (i > 1) {
write_string (", ");
}
diff --git a/vala/valaconstructor.vala b/vala/valaconstructor.vala
index 02bc199..b3d88a6 100644
--- a/vala/valaconstructor.vala
+++ b/vala/valaconstructor.vala
@@ -34,7 +34,7 @@ public class Vala.Constructor : Symbol {
/**
* Specifies the generated `this` parameter for instance methods.
*/
- public FormalParameter this_parameter { get; set; }
+ public Parameter this_parameter { get; set; }
/**
* Specifies whether this is an instance or a class constructor.
@@ -68,7 +68,7 @@ public class Vala.Constructor : Symbol {
checked = true;
- this_parameter = new FormalParameter ("this", new ObjectType (analyzer.current_class));
+ this_parameter = new Parameter ("this", new ObjectType (analyzer.current_class));
scope.add (this_parameter.name, this_parameter);
owner = analyzer.current_symbol.scope;
diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala
index 01d09fc..22c243d 100644
--- a/vala/valacreationmethod.vala
+++ b/vala/valacreationmethod.vala
@@ -67,7 +67,7 @@ public class Vala.CreationMethod : Method {
}
public override void accept_children (CodeVisitor visitor) {
- foreach (FormalParameter param in get_parameters()) {
+ foreach (Parameter param in get_parameters()) {
param.accept (visitor);
}
@@ -167,7 +167,7 @@ public class Vala.CreationMethod : Method {
}
analyzer.current_symbol = this;
- foreach (FormalParameter param in get_parameters()) {
+ foreach (Parameter param in get_parameters()) {
param.check (analyzer);
}
diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala
index 2eccdd5..d13e5e0 100644
--- a/vala/valadatatype.vala
+++ b/vala/valadatatype.vala
@@ -421,7 +421,7 @@ public abstract class Vala.DataType : CodeNode {
*
* @return parameter list
*/
- public virtual List<FormalParameter>? get_parameters () {
+ public virtual List<Parameter>? get_parameters () {
return null;
}
diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala
index af37190..82ddc68 100644
--- a/vala/valadelegate.vala
+++ b/vala/valadelegate.vala
@@ -76,7 +76,7 @@ public class Vala.Delegate : TypeSymbol {
private List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
- private List<FormalParameter> parameters = new ArrayList<FormalParameter> ();
+ private List<Parameter> parameters = new ArrayList<Parameter> ();
private string cname;
private DataType _return_type;
@@ -129,7 +129,7 @@ public class Vala.Delegate : TypeSymbol {
*
* @param param a formal parameter
*/
- public void add_parameter (FormalParameter param) {
+ public void add_parameter (Parameter param) {
// default C parameter position
param.cparameter_position = parameters.size + 1;
param.carray_length_parameter_position = param.cparameter_position + 0.1;
@@ -145,7 +145,7 @@ public class Vala.Delegate : TypeSymbol {
*
* @return parameter list
*/
- public List<FormalParameter> get_parameters () {
+ public List<Parameter> get_parameters () {
return parameters;
}
@@ -168,7 +168,7 @@ public class Vala.Delegate : TypeSymbol {
}
var method_params = m.get_parameters ();
- Iterator<FormalParameter> method_params_it = method_params.iterator ();
+ Iterator<Parameter> method_params_it = method_params.iterator ();
if (sender_type != null && method_params.size == parameters.size + 1) {
// method has sender parameter
@@ -182,7 +182,7 @@ public class Vala.Delegate : TypeSymbol {
}
bool first = true;
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
/* use first callback parameter as instance parameter if
* an instance method is being compared to a static
* callback
@@ -223,7 +223,7 @@ public class Vala.Delegate : TypeSymbol {
return_type.accept (visitor);
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
param.accept (visitor);
}
@@ -354,7 +354,7 @@ public class Vala.Delegate : TypeSymbol {
string str = "(";
int i = 1;
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
if (i > 1) {
str += ", ";
}
@@ -405,7 +405,7 @@ public class Vala.Delegate : TypeSymbol {
return_type.check (analyzer);
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
param.check (analyzer);
}
diff --git a/vala/valadelegatetype.vala b/vala/valadelegatetype.vala
index c904caf..a355d79 100644
--- a/vala/valadelegatetype.vala
+++ b/vala/valadelegatetype.vala
@@ -42,7 +42,7 @@ public class Vala.DelegateType : DataType {
return delegate_symbol.return_type;
}
- public override List<FormalParameter>? get_parameters () {
+ public override List<Parameter>? get_parameters () {
return delegate_symbol.get_parameters ();
}
diff --git a/vala/valadestructor.vala b/vala/valadestructor.vala
index 3f0896c..0ab2a74 100644
--- a/vala/valadestructor.vala
+++ b/vala/valadestructor.vala
@@ -34,7 +34,7 @@ public class Vala.Destructor : Symbol {
/**
* Specifies the generated `this` parameter for instance methods.
*/
- public FormalParameter this_parameter { get; set; }
+ public Parameter this_parameter { get; set; }
/**
* Specifies whether this is an instance or a class destructor.
diff --git a/vala/valaenum.vala b/vala/valaenum.vala
index 629c2c5..170d7e2 100644
--- a/vala/valaenum.vala
+++ b/vala/valaenum.vala
@@ -81,7 +81,7 @@ public class Vala.Enum : TypeSymbol {
return;
}
if (m.binding == MemberBinding.INSTANCE) {
- m.this_parameter = new FormalParameter ("this", new EnumValueType (this));
+ m.this_parameter = new Parameter ("this", new EnumValueType (this));
m.scope.add (m.this_parameter.name, m.this_parameter);
}
if (!(m.return_type is VoidType) && (CodeContext.get ().profile == Profile.DOVA || m.get_postconditions ().size > 0)) {
diff --git a/vala/valaerrordomain.vala b/vala/valaerrordomain.vala
index b49683c..40274f2 100644
--- a/vala/valaerrordomain.vala
+++ b/vala/valaerrordomain.vala
@@ -67,7 +67,7 @@ public class Vala.ErrorDomain : TypeSymbol {
return;
}
if (m.binding == MemberBinding.INSTANCE) {
- m.this_parameter = new FormalParameter ("this", new ErrorType (this, null));
+ m.this_parameter = new Parameter ("this", new ErrorType (this, null));
m.scope.add (m.this_parameter.name, m.this_parameter);
}
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index fdff7f1..0f5ed76 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -2855,7 +2855,7 @@ public class Vala.Genie.Parser : CodeVisitor {
type = new ArrayType (type, 1, get_src (begin));
type.nullable = false;
- var param = new FormalParameter ("args", type, get_src (begin));
+ var param = new Parameter ("args", type, get_src (begin));
method.add_parameter (param);
@@ -2876,7 +2876,7 @@ public class Vala.Genie.Parser : CodeVisitor {
string id = parse_identifier ();
- var params = new ArrayList<FormalParameter> ();
+ var params = new ArrayList<Parameter> ();
expect (TokenType.OPEN_PARENS);
if (current () != TokenType.CLOSE_PARENS) {
@@ -2911,7 +2911,7 @@ public class Vala.Genie.Parser : CodeVisitor {
}
- foreach (FormalParameter param in params) {
+ foreach (Parameter param in params) {
method.add_parameter (param);
}
@@ -3170,7 +3170,7 @@ public class Vala.Genie.Parser : CodeVisitor {
string id = parse_identifier ();
- var params = new ArrayList<FormalParameter> ();
+ var params = new ArrayList<Parameter> ();
expect (TokenType.OPEN_PARENS);
if (current () != TokenType.CLOSE_PARENS) {
@@ -3209,7 +3209,7 @@ public class Vala.Genie.Parser : CodeVisitor {
set_attributes (sig, attrs);
- foreach (FormalParameter formal_param in params) {
+ foreach (Parameter formal_param in params) {
sig.add_parameter (formal_param);
}
@@ -3572,12 +3572,12 @@ public class Vala.Genie.Parser : CodeVisitor {
}
}
- FormalParameter parse_parameter () throws ParseError {
+ Parameter parse_parameter () throws ParseError {
var attrs = parse_attributes ();
var begin = get_location ();
if (accept (TokenType.ELLIPSIS)) {
// varargs
- return new FormalParameter.with_ellipsis (get_src (begin));
+ return new Parameter.with_ellipsis (get_src (begin));
}
bool params_array = accept (TokenType.PARAMS);
var direction = ParameterDirection.IN;
@@ -3598,7 +3598,7 @@ public class Vala.Genie.Parser : CodeVisitor {
type = parse_type (true);
}
- var param = new FormalParameter (id, type, get_src (begin));
+ var param = new Parameter (id, type, get_src (begin));
set_attributes (param, attrs);
param.direction = direction;
param.params_array = params_array;
@@ -3674,7 +3674,7 @@ public class Vala.Genie.Parser : CodeVisitor {
throw new ParseError.SYNTAX (get_error ("`new' modifier not allowed on delegates"));
}
- var params = new ArrayList<FormalParameter> ();
+ var params = new ArrayList<Parameter> ();
expect (TokenType.OPEN_PARENS);
if (current () != TokenType.CLOSE_PARENS) {
@@ -3722,7 +3722,7 @@ public class Vala.Genie.Parser : CodeVisitor {
d.add_type_parameter (type_param);
}
- foreach (FormalParameter formal_param in params) {
+ foreach (Parameter formal_param in params) {
d.add_parameter (formal_param);
}
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index bedf769..a77b047 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -468,8 +468,8 @@ public class Vala.GirParser : CodeVisitor {
return type;
}
- FormalParameter parse_parameter (out int array_length_idx = null, out int closure_idx = null, out int destroy_idx = null, out string? scope = null) {
- FormalParameter param;
+ Parameter parse_parameter (out int array_length_idx = null, out int closure_idx = null, out int destroy_idx = null, out string? scope = null) {
+ Parameter param;
if (&array_length_idx != null) {
array_length_idx = -1;
@@ -504,7 +504,7 @@ public class Vala.GirParser : CodeVisitor {
if (reader.name == "varargs") {
start_element ("varargs");
next ();
- param = new FormalParameter.with_ellipsis (get_current_src ());
+ param = new Parameter.with_ellipsis (get_current_src ());
end_element ("varargs");
} else {
var type = parse_type (null, out array_length_idx, transfer == "full");
@@ -514,7 +514,7 @@ public class Vala.GirParser : CodeVisitor {
if (allow_none == "1") {
type.nullable = true;
}
- param = new FormalParameter (name, type, get_current_src ());
+ param = new Parameter (name, type, get_current_src ());
if (direction == "out") {
param.direction = ParameterDirection.OUT;
} else if (direction == "inout") {
@@ -1086,7 +1086,7 @@ public class Vala.GirParser : CodeVisitor {
}
class MethodInfo {
- public MethodInfo (FormalParameter param, int array_length_idx, int closure_idx, int destroy_idx) {
+ public MethodInfo (Parameter param, int array_length_idx, int closure_idx, int destroy_idx) {
this.param = param;
this.array_length_idx = array_length_idx;
this.closure_idx = closure_idx;
@@ -1095,7 +1095,7 @@ public class Vala.GirParser : CodeVisitor {
this.keep = true;
}
- public FormalParameter param;
+ public Parameter param;
public float vala_idx;
public int array_length_idx;
public int closure_idx;
diff --git a/vala/valainterface.vala b/vala/valainterface.vala
index dc7248c..a7aa6e8 100644
--- a/vala/valainterface.vala
+++ b/vala/valainterface.vala
@@ -135,7 +135,7 @@ public class Vala.Interface : ObjectTypeSymbol {
return;
}
if (m.binding == MemberBinding.INSTANCE) {
- m.this_parameter = new FormalParameter ("this", get_this_type ());
+ m.this_parameter = new Parameter ("this", get_this_type ());
m.scope.add (m.this_parameter.name, m.this_parameter);
}
if (!(m.return_type is VoidType) && (CodeContext.get ().profile == Profile.DOVA || m.get_postconditions ().size > 0)) {
@@ -204,7 +204,7 @@ public class Vala.Interface : ObjectTypeSymbol {
properties.add (prop);
scope.add (prop.name, prop);
- prop.this_parameter = new FormalParameter ("this", new ObjectType (this));
+ prop.this_parameter = new Parameter ("this", new ObjectType (this));
prop.scope.add (prop.this_parameter.name, prop.this_parameter);
}
diff --git a/vala/valalambdaexpression.vala b/vala/valalambdaexpression.vala
index 889905b..ac702ac 100644
--- a/vala/valalambdaexpression.vala
+++ b/vala/valalambdaexpression.vala
@@ -176,11 +176,11 @@ public class Vala.LambdaExpression : Expression {
lambda_param_it.next ();
string lambda_param = lambda_param_it.get ();
- var param = new FormalParameter (lambda_param, cb.sender_type);
+ var param = new Parameter (lambda_param, cb.sender_type);
method.add_parameter (param);
}
- foreach (FormalParameter cb_param in cb.get_parameters ()) {
+ foreach (Parameter cb_param in cb.get_parameters ()) {
if (!lambda_param_it.next ()) {
/* lambda expressions are allowed to have less parameters */
break;
@@ -188,7 +188,7 @@ public class Vala.LambdaExpression : Expression {
string lambda_param = lambda_param_it.get ();
var param_type = cb_param.variable_type.get_actual_type (target_type, null, this);
- var param = new FormalParameter (lambda_param, param_type);
+ var param = new Parameter (lambda_param, param_type);
method.add_parameter (param);
}
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index c73d49f..e029552 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -198,7 +198,7 @@ public class Vala.MemberAccess : Expression {
}
Symbol base_symbol = null;
- FormalParameter this_parameter = null;
+ Parameter this_parameter = null;
bool may_access_instance_members = false;
bool may_access_klass_members = false;
@@ -365,7 +365,7 @@ public class Vala.MemberAccess : Expression {
err.dynamic_error = true;
m.add_error_type (err);
m.access = SymbolAccessibility.PUBLIC;
- m.add_parameter (new FormalParameter.with_ellipsis ());
+ m.add_parameter (new Parameter.with_ellipsis ());
dynamic_object_type.type_symbol.scope.add (null, m);
symbol_reference = m;
}
@@ -471,8 +471,8 @@ public class Vala.MemberAccess : Expression {
local.captured = true;
block.captured = true;
}
- } else if (member is FormalParameter) {
- var param = (FormalParameter) member;
+ } else if (member is Parameter) {
+ var param = (Parameter) member;
var m = param.parent_symbol as Method;
if (m != null && m != analyzer.current_method_or_property_accessor && param != m.this_parameter) {
// mark all methods between current method and the captured
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index 6d61d6c..dcdbdeb 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -157,7 +157,7 @@ public class Vala.Method : Symbol {
/**
* Specifies the generated `this` parameter for instance methods.
*/
- public FormalParameter this_parameter { get; set; }
+ public Parameter this_parameter { get; set; }
/**
* Specifies the generated `result` variable for postconditions.
@@ -235,7 +235,7 @@ public class Vala.Method : Symbol {
public int yield_count { get; set; }
- private List<FormalParameter> parameters = new ArrayList<FormalParameter> ();
+ private List<Parameter> parameters = new ArrayList<Parameter> ();
private string cname;
private string finish_name;
private string _vfunc_name;
@@ -278,7 +278,7 @@ public class Vala.Method : Symbol {
*
* @param param a formal parameter
*/
- public void add_parameter (FormalParameter param) {
+ public void add_parameter (Parameter param) {
// default C parameter position
param.cparameter_position = parameters.size + 1;
param.carray_length_parameter_position = param.cparameter_position + 0.1;
@@ -291,7 +291,7 @@ public class Vala.Method : Symbol {
}
}
- public List<FormalParameter> get_parameters () {
+ public List<Parameter> get_parameters () {
return parameters;
}
@@ -299,7 +299,7 @@ public class Vala.Method : Symbol {
* Remove all parameters from this method.
*/
public void clear_parameters () {
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
if (!param.ellipsis) {
scope.remove (param.name);
}
@@ -320,7 +320,7 @@ public class Vala.Method : Symbol {
return_type.accept (visitor);
}
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
param.accept (visitor);
}
@@ -547,9 +547,9 @@ public class Vala.Method : Symbol {
return false;
}
- Iterator<FormalParameter> method_params_it = parameters.iterator ();
+ Iterator<Parameter> method_params_it = parameters.iterator ();
int param_index = 1;
- foreach (FormalParameter base_param in base_method.parameters) {
+ foreach (Parameter base_param in base_method.parameters) {
/* this method may not expect less arguments */
if (!method_params_it.next ()) {
invalid_match = "too few parameters";
@@ -877,7 +877,7 @@ public class Vala.Method : Symbol {
Report.error (parameters[0].source_reference, "Named parameter required before `...'");
}
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
param.check (analyzer);
if (coroutine && param.direction == ParameterDirection.REF) {
error = true;
@@ -1045,7 +1045,7 @@ public class Vala.Method : Symbol {
return false;
}
- Iterator<FormalParameter> params_it = params.iterator ();
+ Iterator<Parameter> params_it = params.iterator ();
params_it.next ();
var param = params_it.get ();
@@ -1097,12 +1097,12 @@ public class Vala.Method : Symbol {
return callback_method;
}
- public List<FormalParameter> get_async_begin_parameters () {
+ public List<Parameter> get_async_begin_parameters () {
assert (this.coroutine);
var glib_ns = CodeContext.get ().root.scope.lookup ("GLib");
- var params = new ArrayList<FormalParameter> ();
+ var params = new ArrayList<Parameter> ();
foreach (var param in parameters) {
if (param.direction == ParameterDirection.IN) {
params.add (param);
@@ -1113,7 +1113,7 @@ public class Vala.Method : Symbol {
callback_type.nullable = true;
callback_type.is_called_once = true;
- var callback_param = new FormalParameter ("_callback_", callback_type);
+ var callback_param = new Parameter ("_callback_", callback_type);
callback_param.initializer = new NullLiteral (source_reference);
callback_param.initializer.target_type = callback_type.copy ();
callback_param.cparameter_position = -1;
@@ -1124,15 +1124,15 @@ public class Vala.Method : Symbol {
return params;
}
- public List<FormalParameter> get_async_end_parameters () {
+ public List<Parameter> get_async_end_parameters () {
assert (this.coroutine);
- var params = new ArrayList<FormalParameter> ();
+ var params = new ArrayList<Parameter> ();
var glib_ns = CodeContext.get ().root.scope.lookup ("GLib");
var result_type = new ObjectType ((ObjectTypeSymbol) glib_ns.scope.lookup ("AsyncResult"));
- var result_param = new FormalParameter ("_res_", result_type);
+ var result_param = new Parameter ("_res_", result_type);
result_param.cparameter_position = 0.1;
params.add (result_param);
diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala
index 7fdf2a3..6709fc0 100644
--- a/vala/valamethodcall.vala
+++ b/vala/valamethodcall.vala
@@ -317,7 +317,7 @@ public class Vala.MethodCall : Expression {
var args = get_argument_list ();
Iterator<Expression> arg_it = args.iterator ();
- foreach (FormalParameter param in params) {
+ foreach (Parameter param in params) {
if (param.ellipsis) {
break;
}
@@ -370,7 +370,7 @@ public class Vala.MethodCall : Expression {
// recreate iterator and skip to right position
arg_it = argument_list.iterator ();
- foreach (FormalParameter param in params) {
+ foreach (Parameter param in params) {
if (param.ellipsis) {
break;
}
@@ -561,7 +561,7 @@ public class Vala.MethodCall : Expression {
if (dynamic_sig != null && dynamic_sig.handler != null) {
dynamic_sig.return_type = dynamic_sig.handler.value_type.get_return_type ().copy ();
bool first = true;
- foreach (FormalParameter param in dynamic_sig.handler.value_type.get_parameters ()) {
+ foreach (Parameter param in dynamic_sig.handler.value_type.get_parameters ()) {
if (first) {
// skip sender parameter
first = false;
@@ -581,7 +581,7 @@ public class Vala.MethodCall : Expression {
// infer type arguments from arguments
arg_it = args.iterator ();
- foreach (FormalParameter param in params) {
+ foreach (Parameter param in params) {
if (param.ellipsis || param.params_array) {
break;
}
@@ -620,7 +620,7 @@ public class Vala.MethodCall : Expression {
// recalculate argument target types with new information
arg_it = args.iterator ();
- foreach (FormalParameter param in params) {
+ foreach (Parameter param in params) {
if (param.ellipsis || param.params_array) {
break;
}
diff --git a/vala/valamethodtype.vala b/vala/valamethodtype.vala
index 87ec555..594aeb2 100644
--- a/vala/valamethodtype.vala
+++ b/vala/valamethodtype.vala
@@ -40,7 +40,7 @@ public class Vala.MethodType : DataType {
return method_symbol.return_type;
}
- public override List<FormalParameter>? get_parameters () {
+ public override List<Parameter>? get_parameters () {
return method_symbol.get_parameters ();
}
@@ -81,7 +81,7 @@ public class Vala.MethodType : DataType {
var proto = "%s %s (".printf (get_return_type ().to_string (), this.to_string ());
int i = 1;
- foreach (FormalParameter param in get_parameters ()) {
+ foreach (Parameter param in get_parameters ()) {
if (i > 1) {
proto += ", ";
}
diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala
index 51a1888..f95aba8 100644
--- a/vala/valaobjectcreationexpression.vala
+++ b/vala/valaobjectcreationexpression.vala
@@ -318,7 +318,7 @@ public class Vala.ObjectCreationExpression : Expression {
var args = get_argument_list ();
Iterator<Expression> arg_it = args.iterator ();
- foreach (FormalParameter param in m.get_parameters ()) {
+ foreach (Parameter param in m.get_parameters ()) {
if (param.ellipsis) {
break;
}
diff --git a/vala/valaobjecttype.vala b/vala/valaobjecttype.vala
index fecf1aa..ad37f62 100644
--- a/vala/valaobjecttype.vala
+++ b/vala/valaobjecttype.vala
@@ -96,7 +96,7 @@ public class Vala.ObjectType : ReferenceType {
}
}
- public override List<FormalParameter>? get_parameters () {
+ public override List<Parameter>? get_parameters () {
var cl = type_symbol as Class;
if (cl != null && cl.default_construction_method != null) {
return cl.default_construction_method.get_parameters ();
diff --git a/vala/valaobjecttypesymbol.vala b/vala/valaobjecttypesymbol.vala
index c7dec45..14fc230 100644
--- a/vala/valaobjecttypesymbol.vala
+++ b/vala/valaobjecttypesymbol.vala
@@ -95,7 +95,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol {
if (m.this_parameter != null) {
m.scope.remove (m.this_parameter.name);
}
- m.this_parameter = new FormalParameter ("this", get_this_type ());
+ m.this_parameter = new Parameter ("this", get_this_type ());
m.scope.add (m.this_parameter.name, m.this_parameter);
}
if (!(m.return_type is VoidType) && m.get_postconditions ().size > 0) {
diff --git a/vala/valaformalparameter.vala b/vala/valaparameter.vala
similarity index 94%
rename from vala/valaformalparameter.vala
rename to vala/valaparameter.vala
index 225f73e..9d17377 100644
--- a/vala/valaformalparameter.vala
+++ b/vala/valaparameter.vala
@@ -1,4 +1,4 @@
-/* valaformalparameter.vala
+/* valaparameter.vala
*
* Copyright (C) 2006-2010 Jürg Billeter
* Copyright (C) 2006-2008 Raffaele Sandrini
@@ -27,7 +27,7 @@ using GLib;
/**
* Represents a formal parameter in method and callback signatures.
*/
-public class Vala.FormalParameter : Variable {
+public class Vala.Parameter : Variable {
public ParameterDirection direction { get; set; default = ParameterDirection.IN; }
/**
@@ -101,7 +101,7 @@ public class Vala.FormalParameter : Variable {
* @param source reference to source code
* @return newly created formal parameter
*/
- public FormalParameter (string name, DataType variable_type, SourceReference? source_reference = null) {
+ public Parameter (string name, DataType variable_type, SourceReference? source_reference = null) {
base (variable_type, name, null, source_reference);
access = SymbolAccessibility.PUBLIC;
@@ -111,7 +111,7 @@ public class Vala.FormalParameter : Variable {
* Creates a new ellipsis parameter representing an indefinite number of
* parameters.
*/
- public FormalParameter.with_ellipsis (SourceReference? source_reference = null) {
+ public Parameter.with_ellipsis (SourceReference? source_reference = null) {
base (null, null, null, source_reference);
ellipsis = true;
@@ -204,15 +204,15 @@ public class Vala.FormalParameter : Variable {
}
}
- public FormalParameter copy () {
+ public Parameter copy () {
if (!ellipsis) {
- var result = new FormalParameter (name, variable_type, source_reference);
+ var result = new Parameter (name, variable_type, source_reference);
result.params_array = params_array;
result.direction = this.direction;
result.initializer = this.initializer;
return result;
} else {
- return new FormalParameter.with_ellipsis ();
+ return new Parameter.with_ellipsis ();
}
}
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index e73ca75..d37b8e8 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -3183,12 +3183,12 @@ public class Vala.Parser : CodeVisitor {
}
}
- FormalParameter parse_parameter () throws ParseError {
+ Parameter parse_parameter () throws ParseError {
var attrs = parse_attributes ();
var begin = get_location ();
if (accept (TokenType.ELLIPSIS)) {
// varargs
- return new FormalParameter.with_ellipsis (get_src (begin));
+ return new Parameter.with_ellipsis (get_src (begin));
}
bool params_array = accept (TokenType.PARAMS);
var direction = ParameterDirection.IN;
@@ -3216,7 +3216,7 @@ public class Vala.Parser : CodeVisitor {
type = parse_inline_array_type (type);
- var param = new FormalParameter (id, type, get_src (begin));
+ var param = new Parameter (id, type, get_src (begin));
set_attributes (param, attrs);
param.direction = direction;
param.params_array = params_array;
diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala
index 6fad504..ae2d022 100644
--- a/vala/valaproperty.vala
+++ b/vala/valaproperty.vala
@@ -69,7 +69,7 @@ public class Vala.Property : Symbol, Lockable {
/**
* Represents the generated `this` parameter in this property.
*/
- public FormalParameter this_parameter { get; set; }
+ public Parameter this_parameter { get; set; }
/**
* Specifies whether a `notify` signal should be emitted on property
diff --git a/vala/valapropertyaccessor.vala b/vala/valapropertyaccessor.vala
index e5d3d51..2b5ed82 100644
--- a/vala/valapropertyaccessor.vala
+++ b/vala/valapropertyaccessor.vala
@@ -89,7 +89,7 @@ public class Vala.PropertyAccessor : Symbol {
/**
* Represents the generated value parameter in a set accessor.
*/
- public FormalParameter value_parameter { get; set; }
+ public Parameter value_parameter { get; set; }
/**
* Specifies the generated `result' variable in a get accessor.
@@ -221,7 +221,7 @@ public class Vala.PropertyAccessor : Symbol {
result_var.check (analyzer);
} else if (writable || construction) {
- value_parameter = new FormalParameter ("value", value_type, source_reference);
+ value_parameter = new Parameter ("value", value_type, source_reference);
body.scope.add (value_parameter.name, value_parameter);
}
diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala
index 22d394f..32709cc 100644
--- a/vala/valasemanticanalyzer.vala
+++ b/vala/valasemanticanalyzer.vala
@@ -271,8 +271,8 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
return prop.get_accessor.value_type.copy ();
}
}
- } else if (sym is FormalParameter) {
- var p = (FormalParameter) sym;
+ } else if (sym is Parameter) {
+ var p = (Parameter) sym;
var type = p.variable_type.copy ();
if (!lvalue) {
type.value_owned = false;
@@ -378,7 +378,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
return type;
}
- public bool check_arguments (Expression expr, DataType mtype, List<FormalParameter> params, List<Expression> args) {
+ public bool check_arguments (Expression expr, DataType mtype, List<Parameter> params, List<Expression> args) {
Expression prev_arg = null;
Iterator<Expression> arg_it = args.iterator ();
@@ -386,7 +386,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
bool ellipsis = false;
int i = 0;
- foreach (FormalParameter param in params) {
+ foreach (Parameter param in params) {
if (!param.check (this)) {
return false;
}
diff --git a/vala/valasignal.vala b/vala/valasignal.vala
index 2bd1d3f..7e2a01a 100644
--- a/vala/valasignal.vala
+++ b/vala/valasignal.vala
@@ -57,7 +57,7 @@ public class Vala.Signal : Symbol, Lockable {
*/
public bool is_virtual { get; set; }
- private List<FormalParameter> parameters = new ArrayList<FormalParameter> ();
+ private List<Parameter> parameters = new ArrayList<Parameter> ();
/**
* Refers to the default signal handler, which is an anonymous
* function in the scope.
@@ -102,7 +102,7 @@ public class Vala.Signal : Symbol, Lockable {
*
* @param param a formal parameter
*/
- public void add_parameter (FormalParameter param) {
+ public void add_parameter (Parameter param) {
// default C parameter position
param.cparameter_position = parameters.size + 1;
param.carray_length_parameter_position = param.cparameter_position + 0.1;
@@ -113,7 +113,7 @@ public class Vala.Signal : Symbol, Lockable {
scope.add (param.name, param);
}
- public List<FormalParameter> get_parameters () {
+ public List<Parameter> get_parameters () {
return parameters;
}
@@ -137,7 +137,7 @@ public class Vala.Signal : Symbol, Lockable {
generated_delegate.sender_type = sender_param_type;
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
var actual_param = param.copy ();
actual_param.variable_type = actual_param.variable_type.get_actual_type (sender_type, null, node_reference);
generated_delegate.add_parameter (actual_param);
@@ -202,7 +202,7 @@ public class Vala.Signal : Symbol, Lockable {
public override void accept_children (CodeVisitor visitor) {
return_type.accept (visitor);
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
param.accept (visitor);
}
if (default_handler != null) {
@@ -277,7 +277,7 @@ public class Vala.Signal : Symbol, Lockable {
return_type.check (analyzer);
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
param.check (analyzer);
}
@@ -298,7 +298,7 @@ public class Vala.Signal : Symbol, Lockable {
default_handler.body = body;
- foreach (FormalParameter param in parameters) {
+ foreach (Parameter param in parameters) {
default_handler.add_parameter (param);
}
diff --git a/vala/valasignaltype.vala b/vala/valasignaltype.vala
index 6ab5568..6cdab02 100644
--- a/vala/valasignaltype.vala
+++ b/vala/valasignaltype.vala
@@ -44,7 +44,7 @@ public class Vala.SignalType : DataType {
return signal_symbol.return_type;
}
- public override List<FormalParameter>? get_parameters () {
+ public override List<Parameter>? get_parameters () {
return signal_symbol.get_parameters ();
}
@@ -74,7 +74,7 @@ public class Vala.SignalType : DataType {
connect_method.access = SymbolAccessibility.PUBLIC;
connect_method.external = true;
connect_method.owner = signal_symbol.scope;
- connect_method.add_parameter (new FormalParameter ("handler", get_handler_type ()));
+ connect_method.add_parameter (new Parameter ("handler", get_handler_type ()));
}
return connect_method;
}
@@ -86,7 +86,7 @@ public class Vala.SignalType : DataType {
connect_after_method.access = SymbolAccessibility.PUBLIC;
connect_after_method.external = true;
connect_after_method.owner = signal_symbol.scope;
- connect_after_method.add_parameter (new FormalParameter ("handler", get_handler_type ()));
+ connect_after_method.add_parameter (new Parameter ("handler", get_handler_type ()));
}
return connect_after_method;
}
@@ -97,7 +97,7 @@ public class Vala.SignalType : DataType {
disconnect_method.access = SymbolAccessibility.PUBLIC;
disconnect_method.external = true;
disconnect_method.owner = signal_symbol.scope;
- disconnect_method.add_parameter (new FormalParameter ("handler", get_handler_type ()));
+ disconnect_method.add_parameter (new Parameter ("handler", get_handler_type ()));
}
return disconnect_method;
}
diff --git a/vala/valastruct.vala b/vala/valastruct.vala
index 03113f3..906ce41 100644
--- a/vala/valastruct.vala
+++ b/vala/valastruct.vala
@@ -180,7 +180,7 @@ public class Vala.Struct : TypeSymbol {
return_if_fail (m != null);
if (m.binding == MemberBinding.INSTANCE || m is CreationMethod) {
- m.this_parameter = new FormalParameter ("this", SemanticAnalyzer.get_data_type_for_symbol (this));
+ m.this_parameter = new Parameter ("this", SemanticAnalyzer.get_data_type_for_symbol (this));
m.scope.add (m.this_parameter.name, m.this_parameter);
}
if (!(m.return_type is VoidType) && (CodeContext.get ().profile == Profile.DOVA || m.get_postconditions ().size > 0)) {
@@ -224,7 +224,7 @@ public class Vala.Struct : TypeSymbol {
properties.add (prop);
scope.add (prop.name, prop);
- prop.this_parameter = new FormalParameter ("this", SemanticAnalyzer.get_data_type_for_symbol (this));
+ prop.this_parameter = new Parameter ("this", SemanticAnalyzer.get_data_type_for_symbol (this));
prop.scope.add (prop.this_parameter.name, prop.this_parameter);
if (prop.field != null) {
diff --git a/vala/valastructvaluetype.vala b/vala/valastructvaluetype.vala
index 52880a8..5561627 100644
--- a/vala/valastructvaluetype.vala
+++ b/vala/valastructvaluetype.vala
@@ -48,7 +48,7 @@ public class Vala.StructValueType : ValueType {
}
}
- public override List<FormalParameter>? get_parameters () {
+ public override List<Parameter>? get_parameters () {
var st = type_symbol as Struct;
if (st != null && st.default_construction_method != null) {
return st.default_construction_method.get_parameters ();
diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala
index 54b3309..3f874fa 100644
--- a/vala/valasymbolresolver.vala
+++ b/vala/valasymbolresolver.vala
@@ -186,7 +186,7 @@ public class Vala.SymbolResolver : CodeVisitor {
m.accept_children (this);
}
- public override void visit_formal_parameter (FormalParameter p) {
+ public override void visit_formal_parameter (Parameter p) {
p.accept_children (this);
}
diff --git a/vala/valaunaryexpression.vala b/vala/valaunaryexpression.vala
index c137cb2..51206c1 100644
--- a/vala/valaunaryexpression.vala
+++ b/vala/valaunaryexpression.vala
@@ -215,7 +215,7 @@ public class Vala.UnaryExpression : Expression {
return true;
} else if (operator == UnaryOperator.REF || operator == UnaryOperator.OUT) {
var ea = inner as ElementAccess;
- if (inner.symbol_reference is Field || inner.symbol_reference is FormalParameter || inner.symbol_reference is LocalVariable ||
+ if (inner.symbol_reference is Field || inner.symbol_reference is Parameter || inner.symbol_reference is LocalVariable ||
(ea != null && ea.container.value_type is ArrayType)) {
// ref and out can only be used with fields, parameters, local variables, and array element access
lvalue = true;
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index b2c4a5c..d0c025d 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -513,7 +513,7 @@ public class Vala.GIdlParser : CodeVisitor {
ParameterDirection direction;
var param_type = parse_param (param, out direction);
- var p = new FormalParameter (param_name, param_type);
+ var p = new Parameter (param_name, param_type);
p.direction = direction;
bool hide_param = false;
@@ -1966,7 +1966,7 @@ public class Vala.GIdlParser : CodeVisitor {
m.set_cname (symbol);
bool first = true;
- FormalParameter last_param = null;
+ Parameter last_param = null;
DataType last_param_type = null;
foreach (weak IdlNodeParam param in parameters) {
weak IdlNode param_node = (IdlNode) param;
@@ -2019,7 +2019,7 @@ public class Vala.GIdlParser : CodeVisitor {
}
ParameterDirection direction;
var param_type = parse_param (param, out direction);
- var p = new FormalParameter (param_name, param_type);
+ var p = new Parameter (param_name, param_type);
p.direction = direction;
bool hide_param = false;
@@ -2201,7 +2201,7 @@ public class Vala.GIdlParser : CodeVisitor {
if (last_param != null && last_param.name.has_prefix ("first_")) {
last_param.ellipsis = true;
} else if (add_ellipsis) {
- m.add_parameter (new FormalParameter.with_ellipsis ());
+ m.add_parameter (new Parameter.with_ellipsis ());
}
return m;
@@ -2671,7 +2671,7 @@ public class Vala.GIdlParser : CodeVisitor {
ParameterDirection direction;
var param_type = parse_param (param, out direction);
- var p = new FormalParameter (param_node.name, param_type);
+ var p = new Parameter (param_node.name, param_type);
p.direction = direction;
bool hide_param = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]