[vala/emit-let] codegen: Don't check for comma expression in get_field_cvalue
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/emit-let] codegen: Don't check for comma expression in get_field_cvalue
- Date: Sat, 5 Mar 2011 11:44:23 +0000 (UTC)
commit 8305a2bf0e6d16a453aa8a730a57f6761c3ffc66
Author: Luca Bruno <lucabru src gnome org>
Date: Sat Mar 5 11:09:24 2011 +0100
codegen: Don't check for comma expression in get_field_cvalue
All comma expressions have been dropped, so it's not possible that
an inner C expression is a comma expression.
codegen/valaccodememberaccessmodule.vala | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 9eee610..7ddad75 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -521,15 +521,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
if (instance_target_type.data_type.is_reference_type () || (instance != null && instance.value_type is PointerType)) {
result.cvalue = new CCodeMemberAccess.pointer (inst, field.get_cname ());
} else {
- if (inst is CCodeCommaExpression) {
- var ccomma = inst as CCodeCommaExpression;
- var inner = ccomma.get_inner ();
- var last = inner.get (inner.size - 1);
- ccomma.set_expression (inner.size - 1, new CCodeMemberAccess (last, field.get_cname ()));
- result.cvalue = ccomma;
- } else {
- result.cvalue = new CCodeMemberAccess (inst, field.get_cname ());
- }
+ result.cvalue = new CCodeMemberAccess (inst, field.get_cname ());
}
if (array_type != null && !field.no_array_length) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]