[vala] codegen: Remove unused code for property assignments
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Remove unused code for property assignments
- Date: Thu, 23 Dec 2010 15:35:22 +0000 (UTC)
commit 549988115f7b039db490cdc1ec47a9b0d82b7d7f
Author: Jürg Billeter <j bitron ch>
Date: Thu Dec 23 12:39:15 2010 +0100
codegen: Remove unused code for property assignments
codegen/valaccodeassignmentmodule.vala | 28 ----------------------------
codegen/valadovaassignmentmodule.vala | 28 ----------------------------
2 files changed, 0 insertions(+), 56 deletions(-)
---
diff --git a/codegen/valaccodeassignmentmodule.vala b/codegen/valaccodeassignmentmodule.vala
index 0278e9e..60fc040 100644
--- a/codegen/valaccodeassignmentmodule.vala
+++ b/codegen/valaccodeassignmentmodule.vala
@@ -51,34 +51,6 @@ public class Vala.CCodeAssignmentModule : CCodeMemberAccessModule {
cexpr = get_address_of_expression (assignment.right, cexpr);
}
- if (assignment.operator != AssignmentOperator.SIMPLE) {
- CCodeBinaryOperator cop;
- if (assignment.operator == AssignmentOperator.BITWISE_OR) {
- cop = CCodeBinaryOperator.BITWISE_OR;
- } else if (assignment.operator == AssignmentOperator.BITWISE_AND) {
- cop = CCodeBinaryOperator.BITWISE_AND;
- } else if (assignment.operator == AssignmentOperator.BITWISE_XOR) {
- cop = CCodeBinaryOperator.BITWISE_XOR;
- } else if (assignment.operator == AssignmentOperator.ADD) {
- cop = CCodeBinaryOperator.PLUS;
- } else if (assignment.operator == AssignmentOperator.SUB) {
- cop = CCodeBinaryOperator.MINUS;
- } else if (assignment.operator == AssignmentOperator.MUL) {
- cop = CCodeBinaryOperator.MUL;
- } else if (assignment.operator == AssignmentOperator.DIV) {
- cop = CCodeBinaryOperator.DIV;
- } else if (assignment.operator == AssignmentOperator.PERCENT) {
- cop = CCodeBinaryOperator.MOD;
- } else if (assignment.operator == AssignmentOperator.SHIFT_LEFT) {
- cop = CCodeBinaryOperator.SHIFT_LEFT;
- } else if (assignment.operator == AssignmentOperator.SHIFT_RIGHT) {
- cop = CCodeBinaryOperator.SHIFT_RIGHT;
- } else {
- assert_not_reached ();
- }
- cexpr = new CCodeBinaryExpression (cop, (CCodeExpression) get_ccodenode (assignment.left), cexpr);
- }
-
store_property (prop, ma, cexpr, assignment.right);
return get_ccodenode (assignment.right);
diff --git a/codegen/valadovaassignmentmodule.vala b/codegen/valadovaassignmentmodule.vala
index 69a6241..d0d6e3d 100644
--- a/codegen/valadovaassignmentmodule.vala
+++ b/codegen/valadovaassignmentmodule.vala
@@ -43,34 +43,6 @@ public class Vala.DovaAssignmentModule : DovaMemberAccessModule {
CCodeExpression cexpr = get_cvalue (assignment.right);
- if (assignment.operator != AssignmentOperator.SIMPLE) {
- CCodeBinaryOperator cop;
- if (assignment.operator == AssignmentOperator.BITWISE_OR) {
- cop = CCodeBinaryOperator.BITWISE_OR;
- } else if (assignment.operator == AssignmentOperator.BITWISE_AND) {
- cop = CCodeBinaryOperator.BITWISE_AND;
- } else if (assignment.operator == AssignmentOperator.BITWISE_XOR) {
- cop = CCodeBinaryOperator.BITWISE_XOR;
- } else if (assignment.operator == AssignmentOperator.ADD) {
- cop = CCodeBinaryOperator.PLUS;
- } else if (assignment.operator == AssignmentOperator.SUB) {
- cop = CCodeBinaryOperator.MINUS;
- } else if (assignment.operator == AssignmentOperator.MUL) {
- cop = CCodeBinaryOperator.MUL;
- } else if (assignment.operator == AssignmentOperator.DIV) {
- cop = CCodeBinaryOperator.DIV;
- } else if (assignment.operator == AssignmentOperator.PERCENT) {
- cop = CCodeBinaryOperator.MOD;
- } else if (assignment.operator == AssignmentOperator.SHIFT_LEFT) {
- cop = CCodeBinaryOperator.SHIFT_LEFT;
- } else if (assignment.operator == AssignmentOperator.SHIFT_RIGHT) {
- cop = CCodeBinaryOperator.SHIFT_RIGHT;
- } else {
- assert_not_reached ();
- }
- cexpr = new CCodeBinaryExpression (cop, (CCodeExpression) get_ccodenode (assignment.left), cexpr);
- }
-
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]