[vala/staging] codegen: Drop unreachable code handling (Un)LockStatements
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Drop unreachable code handling (Un)LockStatements
- Date: Mon, 3 May 2021 20:25:53 +0000 (UTC)
commit 90cf1eafb3214b5120abd7a923253d5d00b7503a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon May 3 21:12:38 2021 +0200
codegen: Drop unreachable code handling (Un)LockStatements
codegen/valaccodebasemodule.vala | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index aa2a6ac49..dad2ad893 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4200,19 +4200,11 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
private CCodeExpression get_lock_expression (Statement stmt, Expression resource) {
CCodeExpression l = null;
- var inner_node = ((MemberAccess)resource).inner;
var member = resource.symbol_reference;
var parent = (TypeSymbol)resource.symbol_reference.parent_symbol;
if (member.is_instance_member ()) {
- if (inner_node == null) {
- l = new CCodeIdentifier ("self");
- } else if (parent != current_type_symbol) {
- l = generate_instance_cast (get_cvalue (inner_node), parent);
- } else {
- l = get_cvalue (inner_node);
- }
-
+ l = get_cvalue (((MemberAccess) resource).inner);
l = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (l, "priv"),
get_symbol_lock_name (get_ccode_name (member)));
} else if (member.is_class_member ()) {
CCodeExpression klass;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]