[vala/wip/issue/327: 27/43] Presentable verion, 90% working
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/issue/327: 27/43] Presentable verion, 90% working
- Date: Tue, 7 Apr 2020 07:32:52 +0000 (UTC)
commit 2f31d5990e7941214354ad5a259a8a74453f55fe
Author: Nick Schrader <nick schrader mailbox org>
Date: Fri Mar 27 22:57:39 2020 -0300
Presentable verion, 90% working
codegen/valaccodememberaccessmodule.vala | 3 ---
vala/valamemberaccess.vala | 14 +-------------
vala/valaparser.vala | 1 -
vala/valawithstatement.vala | 15 +--------------
4 files changed, 2 insertions(+), 31 deletions(-)
---
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 1393008b9..ed838cb20 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -587,9 +587,6 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
/* Returns lvalue access to the given field */
public override TargetValue get_field_cvalue (Field field, TargetValue? instance) {
- if (field.name == "field")
- stdout.printf("Field name: %s\n", field.name);
-
var value_type = field.variable_type.copy ();
var result = new GLibValue (value_type);
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 3c1145fc4..96d13f95c 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -201,10 +201,6 @@ public class Vala.MemberAccess : Expression {
}
public override bool check (CodeContext context) {
- if (member_name == "field" || member_name == "foo") {
- stdout.printf("member %s, inner %s\n", member_name, inner != null ?
Type.from_instance(inner).name() : "(null)");
- }
-
if (checked) {
return !error;
}
@@ -281,8 +277,7 @@ public class Vala.MemberAccess : Expression {
}
symbol_reference = SemanticAnalyzer.symbol_lookup_inherited (sym,
member_name);
- stdout.printf("symbol_reference: %s\n", symbol_reference != null ?
symbol_reference.name : "(null)");
-
+
if (symbol_reference == null && sym is TypeSymbol &&
may_access_instance_members) {
// used for generated to_string methods in enums
symbol_reference = this_parameter.variable_type.get_member
(member_name);
@@ -370,7 +365,6 @@ public class Vala.MemberAccess : Expression {
if (symbol_reference == null && (base_symbol is Namespace || base_symbol is
TypeSymbol)) {
symbol_reference = base_symbol.scope.lookup (member_name);
- stdout.printf("Inner symbol_reference %s, synmol_reference_name
%s\n", Type.from_instance(symbol_reference).name(), symbol_reference.name);
if (inner is BaseAccess) {
// inner expression is base access
// access to instance members of the base type possible
@@ -544,7 +538,6 @@ public class Vala.MemberAccess : Expression {
// block as closures (to support nested closures)
unowned Symbol? sym = context.analyzer.current_method_or_property_accessor;
while (sym != block) {
- stdout.printf("local: %s, block %s, current_sym: %s, sym : %s\n",
Type.from_instance(local).name(), Type.from_instance(block).name(),
Type.from_instance(context.analyzer.current_symbol).name(), sym != null ? Type.from_instance(sym).name() :
"(null)");
unowned Method? method = sym as Method;
if (method != null) {
method.closure = true;
@@ -774,10 +767,6 @@ public class Vala.MemberAccess : Expression {
}
member.version.check (source_reference);
- if (member_name == "field" || member_name == "foo") {
- stdout.printf("member %s, inner %s\n", member_name, inner != null ?
Type.from_instance(inner).name() : "(null)");
- }
-
if (access == SymbolAccessibility.PROTECTED && member.parent_symbol is TypeSymbol) {
unowned TypeSymbol target_type = (TypeSymbol) member.parent_symbol;
@@ -923,7 +912,6 @@ public class Vala.MemberAccess : Expression {
}
if (value_type != null) {
- stdout.printf("Value type: %s\n",value_type.to_prototype_string() );
value_type.check (context);
}
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 9df06accf..382b22867 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -1617,7 +1617,6 @@ public class Vala.Parser : CodeVisitor {
stmt = parse_delete_statement ();
break;
case TokenType.WITH:
- stdout.printf("With");
stmt = parse_with_statement ();
break;
case TokenType.VAR:
diff --git a/vala/valawithstatement.vala b/vala/valawithstatement.vala
index 98be64cae..b859c1c20 100644
--- a/vala/valawithstatement.vala
+++ b/vala/valawithstatement.vala
@@ -19,19 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
- * Raffaele Sandrini <raffaele sandrini ch>
- * Jiří Zárevúcky <zarevucky jiri gmail com>
+ * Nick Schrader <nick schrader mailbox org>
*/
using GLib;
-/**
- * Represents a lock statement e.g. {{{ lock (a); }}} or {{{ lock (a) { f(a); } }}}.
- *
- * If the statement is empty, the mutex remains locked until a corresponding UnlockStatement
- * occurs. Otherwise it's translated into a try/finally statement which unlocks the mutex
- * after the block is finished.
- */
public class Vala.WithStatement : Symbol, Statement {
/**
* Expression representing the expression to be locked.
@@ -68,12 +60,10 @@ public class Vala.WithStatement : Symbol, Statement {
}
public override void accept (CodeVisitor visitor) {
- stdout.printf("Accept with\n");
visitor.visit_with_statement (this);
}
public override void accept_children(CodeVisitor visitor) {
- stdout.printf("Accept children with\n");
expression.accept (visitor);
if (body != null) {
body.accept (visitor);
@@ -87,15 +77,12 @@ public class Vala.WithStatement : Symbol, Statement {
}
public override bool check (CodeContext context) {
- stdout.printf("Check with\n");
-
expression.check(context);
var old_symbol = context.analyzer.current_symbol;
owner = context.analyzer.current_symbol.scope;
context.analyzer.current_symbol = this;
- stdout.printf("With expression: %s\n", Type.from_instance(expression).name());
body.check(context);
context.analyzer.current_symbol = old_symbol;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]