[vala] codegen: Avoid unnecessary property getter calls
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Avoid unnecessary property getter calls
- Date: Tue, 21 Dec 2010 18:02:17 +0000 (UTC)
commit c84d3b40af3a8818d23f52573e978fe674b99e47
Author: Jürg Billeter <j bitron ch>
Date: Tue Dec 21 17:14:56 2010 +0100
codegen: Avoid unnecessary property getter calls
codegen/valaccodeassignmentmodule.vala | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/codegen/valaccodeassignmentmodule.vala b/codegen/valaccodeassignmentmodule.vala
index c360419..5c93d71 100644
--- a/codegen/valaccodeassignmentmodule.vala
+++ b/codegen/valaccodeassignmentmodule.vala
@@ -81,12 +81,7 @@ public class Vala.CCodeAssignmentModule : CCodeMemberAccessModule {
store_property (prop, ma, cexpr, assignment.right);
- // assignments are expressions, so return the current property value, except if we're sure that it can't be used
- if (assignment.parent_node is ExpressionStatement) {
- return null;
- } else {
- return get_ccodenode (ma); // current property value
- }
+ return get_ccodenode (assignment.right);
}
CCodeExpression? emit_simple_assignment (Assignment assignment) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]