}
}
+ public static bool is_ref_function_void (DataType type) {
+ unowned Class? cl = type.data_type as Class;
+ if (cl != null) {
+ return get_ccode_ref_function_void (cl);
+ } else {
+ return false;
+ }
+ }
+
+ public static bool is_free_function_address_of (DataType type) {
+ unowned Class? cl = type.data_type as Class;
+ if (cl != null) {
+ return get_ccode_free_function_address_of (cl);
+ } else {
+ return false;
+ }
+ }
+
public static bool get_ccode_ref_function_void (Class cl) {
return get_ccode_attribute(cl).ref_function_void;
}
return p.get_attribute ("ConcreteAccessor") != null;
}
+ public static bool get_ccode_has_emitter (Signal sig) {
+ return sig.get_attribute ("HasEmitter") != null;
+ }
+
public static bool get_ccode_has_type_id (TypeSymbol sym) {
return sym.get_attribute_bool ("CCode", "has_type_id", true);
}
return true;
}
- bool is_ref_function_void (DataType type) {
- var cl = type.data_type as Class;
- if (cl != null) {
- return get_ccode_ref_function_void (cl);
- } else {
- return false;
- }
- }
-
- bool is_free_function_address_of (DataType type) {
- var cl = type.data_type as Class;
- if (cl != null) {
- return get_ccode_free_function_address_of (cl);
- } else {
- return false;
- }
- }
-
public virtual TargetValue? copy_value (TargetValue value, CodeNode node) {
var type = value.value_type;
var cexpr = get_cvalue_ (value);
return new CCodeConstant ("\"%s%s\"".printf (get_ccode_name (sig), (detail != null ? "::%s".printf (detail) : "")));
}
- public bool get_signal_has_emitter (Signal sig) {
- return sig.get_attribute ("HasEmitter") != null;
- }
-
public CCodeConstant get_property_canonical_cconstant (Property prop) {
return new CCodeConstant ("\"%s\"".printf (get_ccode_name (prop)));
}
if (ma != null && ma.inner is BaseAccess && sig.is_virtual) {
// normal return value for base access
- } else if (!get_signal_has_emitter (sig) || ma.source_reference.file == sig.source_reference.file) {
+ } else if (!get_ccode_has_emitter (sig) || ma.source_reference.file == sig.source_reference.file) {
return_result_via_out_param = true;
}
}
ccall.add_argument (new CCodeConstant ("0"));
set_cvalue (expr, ccall);
- } else if (get_signal_has_emitter (sig)) {
+ } else if (get_ccode_has_emitter (sig)) {
string emitter_func;
if (sig.emitter != null) {
if (!sig.external_package && expr.source_reference.file != sig.source_reference.file) {