[vala/emit-let: 3/6] codegen: Drop MemberAccess creation for disposing of 'this' in block data
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/emit-let: 3/6] codegen: Drop MemberAccess creation for disposing of 'this' in block data
- Date: Wed, 16 Mar 2011 14:32:51 +0000 (UTC)
commit 9b7c435354c90915ee89dbf55797bb435f72a0e4
Author: Luca Bruno <lucabru src gnome org>
Date: Wed Mar 16 13:02:05 2011 +0100
codegen: Drop MemberAccess creation for disposing of 'this' in block data
codegen/valaccodebasemodule.vala | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 956fd79..7b00c6c 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1854,9 +1854,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
} else {
if (in_constructor || (current_method != null && current_method.binding == MemberBinding.INSTANCE) ||
(current_property_accessor != null && current_property_accessor.prop.binding == MemberBinding.INSTANCE)) {
- var ma = new MemberAccess.simple ("this");
- ma.symbol_reference = current_class;
- ccode.add_expression (get_unref_expression (new CCodeMemberAccess.pointer (new CCodeIdentifier ("_data%d_".printf (block_id)), "self"), new ObjectType (current_class), ma));
+ var this_value = new GLibValue (get_data_type_for_symbol (current_class), new CCodeMemberAccess.pointer (new CCodeIdentifier ("_data%d_".printf (block_id)), "self"));
+ ccode.add_expression (destroy_value (this_value));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]