[vala/wip/issue/658: 24/48] Removed debug messages
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/issue/658: 24/48] Removed debug messages
- Date: Sat, 31 Oct 2020 15:08:16 +0000 (UTC)
commit 20d3c440bcdeee599428946a09f0bc90d98c98e1
Author: Nick Schrader <nick schrader mailbox org>
Date: Mon Jul 20 14:19:09 2020 +0200
Removed debug messages
vala/valadatatype.vala | 5 -----
vala/valadelegatetype.vala | 13 -------------
vala/valamethod.vala | 3 ---
vala/valaparameter.vala | 10 ----------
vala/valasymbolresolver.vala | 40 +---------------------------------------
5 files changed, 1 insertion(+), 70 deletions(-)
---
diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala
index 624775ead..ada2c1dd4 100644
--- a/vala/valadatatype.vala
+++ b/vala/valadatatype.vala
@@ -29,8 +29,6 @@ using GLib;
* expressions.
*/
public abstract class Vala.DataType : CodeNode {
- public bool marker = false;
-
/**
* Specifies that the expression or variable owns the value.
*/
@@ -116,9 +114,6 @@ public abstract class Vala.DataType : CodeNode {
}
public override void accept (CodeVisitor visitor) {
- if (SymbolResolver.debug && visitor is SymbolResolver && this is DelegateType) {
- stderr.printf("Accepting symbol resolver on datatype %s\n", symbol.name);
- }
visitor.visit_data_type (this);
}
diff --git a/vala/valadelegatetype.vala b/vala/valadelegatetype.vala
index dfeaae87a..b8b9a9530 100644
--- a/vala/valadelegatetype.vala
+++ b/vala/valadelegatetype.vala
@@ -28,11 +28,6 @@ using GLib;
public class Vala.DelegateType : CallableType {
public weak Delegate delegate_symbol {
get {
- if (marker && symbol != null) {
- var del = delegate_symbol_ref;
- stderr.printf("[*%p] delegate_symbol name: %s, type: %s ", &(this.marker),
symbol.name, Type.from_instance(symbol).name());
- stderr.printf("constr del name %s, type: %s, address %p\n", del.name,
Type.from_instance(del).name(), &del);
- }
return (Delegate) symbol;
}
}
@@ -57,10 +52,6 @@ public class Vala.DelegateType : CallableType {
}
this (delegate_symbol);
this.is_anonymous = true;
-
- //DEBUG
- this.marker=true;
- this.delegate_symbol;
}
public DelegateType (Delegate delegate_symbol) {
@@ -131,10 +122,6 @@ public class Vala.DelegateType : CallableType {
Report.warning (source_reference, "delegates with scope=\"async\" must be owned");
}
- if (marker) {
- stderr.printf("Checking delegate symbol: symbol type: %s\n",
Type.from_instance(symbol).name());
- }
-
if (!delegate_symbol.check (context)) {
return false;
}
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index ecb6408ec..9a0fc2aff 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -273,9 +273,6 @@ public class Vala.Method : Subroutine, Callable {
}
foreach (Parameter param in parameters) {
- if (SymbolResolver.debug && visitor is SymbolResolver) {
- stderr.printf("Visiting params on method %s\n", name);
- }
param.accept (visitor);
}
diff --git a/vala/valaparameter.vala b/vala/valaparameter.vala
index 9dd8303f2..41a59da61 100644
--- a/vala/valaparameter.vala
+++ b/vala/valaparameter.vala
@@ -81,17 +81,10 @@ public class Vala.Parameter : Variable {
}
public override void accept (CodeVisitor visitor) {
- if (SymbolResolver.debug && visitor is SymbolResolver) {
- stderr.printf("Accepting symbol resolver on param %s\n", name);
- }
visitor.visit_formal_parameter (this);
}
public override void accept_children (CodeVisitor visitor) {
- if (SymbolResolver.debug && visitor is SymbolResolver) {
- stderr.printf("Accepting symbol resolver on param children %s\n", name);
- }
-
if (!ellipsis) {
variable_type.accept (visitor);
@@ -153,9 +146,6 @@ public class Vala.Parameter : Variable {
Report.error (source_reference, "'void' not supported as parameter type");
return false;
}
- if (name == "abc") {
- stderr.printf("Checking param name: %s, type: %s\n", name,
Type.from_instance(variable_type).name());
- }
variable_type.check (context);
}
diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala
index 0e9c7a5b6..30e405b1c 100644
--- a/vala/valasymbolresolver.vala
+++ b/vala/valasymbolresolver.vala
@@ -28,8 +28,6 @@ using GLib;
* Code visitor resolving symbol names.
*/
public class Vala.SymbolResolver : CodeVisitor {
- public static bool debug = false;
-
Symbol root_symbol;
Scope current_scope;
@@ -156,11 +154,6 @@ public class Vala.SymbolResolver : CodeVisitor {
return;
}
- if (cb.name == "oma123") {
- stderr.printf("@oma123\n");
- debug = true;
- }
-
current_scope = cb.scope;
cb.accept_children (this);
@@ -201,11 +194,6 @@ public class Vala.SymbolResolver : CodeVisitor {
return;
}
- if (m.name == "f") {
- stderr.printf("@f\n");
- debug = true;
- }
-
current_scope = m.scope;
m.accept_children (this);
@@ -282,14 +270,6 @@ public class Vala.SymbolResolver : CodeVisitor {
}
private Symbol? resolve_symbol (UnresolvedSymbol unresolved_symbol) {
- var sym = resolve_symbol2(unresolved_symbol);
- if (sym==null) {
- stderr.printf("Could not find symbol: name: %s, type: %s\n", unresolved_symbol.name,
Type.from_instance(unresolved_symbol).name());
- }
- return sym;
- }
-
- private Symbol? resolve_symbol2 (UnresolvedSymbol unresolved_symbol) {
if (unresolved_symbol.qualified) {
// qualified access to global symbol
return root_symbol.scope.lookup (unresolved_symbol.name);
@@ -297,14 +277,6 @@ public class Vala.SymbolResolver : CodeVisitor {
Symbol sym = null;
Scope scope = current_scope;
while (sym == null && scope != null) {
- if (debug) {
- stderr.printf("scope: ");
- foreach (var k in scope.get_symbol_table().get_keys()) {
- stderr.printf("%s ", k);
- }
- stderr.printf("\n");
- }
-
sym = scope.lookup (unresolved_symbol.name);
// only look for types and type containers
@@ -519,11 +491,6 @@ public class Vala.SymbolResolver : CodeVisitor {
}
public override void visit_data_type (DataType data_type) {
- if (SymbolResolver.debug) {
- var name = (data_type is UnresolvedType) ? ((UnresolvedType)
data_type).unresolved_symbol.name : "<unknown>";
- stderr.printf("SymbolResolver: Visit data type %s, name %s\n",
Type.from_instance(data_type).name(), name);
- }
-
data_type.accept_children (this);
if (!(data_type is UnresolvedType)) {
@@ -532,14 +499,9 @@ public class Vala.SymbolResolver : CodeVisitor {
var unresolved_type = (UnresolvedType) data_type;
- var rt = resolve_type (unresolved_type);
- if (SymbolResolver.debug) {
- stderr.printf("SymbolResolver: resolved %s by %s\n",
Type.from_instance(unresolved_type).name(), Type.from_instance(rt).name());
+ unresolved_type.parent_node.replace_type (unresolved_type, resolve_type (unresolved_type));
}
- unresolved_type.parent_node.replace_type (unresolved_type, rt);
- }
-
public override void visit_declaration_statement (DeclarationStatement stmt) {
if (stmt.checked) {
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]