vala r2039 - in trunk: . gobject vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2039 - in trunk: . gobject vala
- Date: Thu, 20 Nov 2008 19:39:32 +0000 (UTC)
Author: juergbi
Date: Thu Nov 20 19:39:32 2008
New Revision: 2039
URL: http://svn.gnome.org/viewvc/vala?rev=2039&view=rev
Log:
2008-11-20 JÃrg Billeter <j bitron ch>
* vala/Makefile.am:
* vala/valacodevisitor.vala:
* vala/valadynamicmethod.vala:
* vala/valaflowanalyzer.vala:
* vala/valagenieparser.vala:
* vala/valamemberaccess.vala:
* vala/valamethodcall.vala:
* vala/valanullchecker.vala:
* vala/valaparser.vala:
* vala/valasemanticanalyzer.vala:
* vala/valasymbolresolver.vala:
* gobject/Makefile.am:
* gobject/valaccodearraymodule.vala:
* gobject/valaccodebasemodule.vala:
* gobject/valaccodedelegatemodule.vala:
* gobject/valaccodegenerator.vala:
* gobject/valaccodemethodcallmodule.vala:
* gobject/valaccodemodule.vala:
Rename InvocationExpression to MethodCall
Added:
trunk/gobject/valaccodemethodcallmodule.vala
- copied, changed from r2034, /trunk/gobject/valaccodeinvocationexpressionmodule.vala
trunk/vala/valamethodcall.vala (contents, props changed)
- copied, changed from r2038, /trunk/vala/valainvocationexpression.vala
Removed:
trunk/gobject/valaccodeinvocationexpressionmodule.vala
trunk/vala/valainvocationexpression.vala
Modified:
trunk/ChangeLog
trunk/gobject/Makefile.am
trunk/gobject/valaccodearraymodule.vala
trunk/gobject/valaccodebasemodule.vala
trunk/gobject/valaccodedelegatemodule.vala
trunk/gobject/valaccodegenerator.vala
trunk/gobject/valaccodemodule.vala
trunk/vala/Makefile.am
trunk/vala/valacodevisitor.vala
trunk/vala/valadynamicmethod.vala
trunk/vala/valaflowanalyzer.vala
trunk/vala/valagenieparser.vala
trunk/vala/valamemberaccess.vala
trunk/vala/valanullchecker.vala
trunk/vala/valaparser.vala
trunk/vala/valasemanticanalyzer.vala
trunk/vala/valasymbolresolver.vala
Modified: trunk/gobject/Makefile.am
==============================================================================
--- trunk/gobject/Makefile.am (original)
+++ trunk/gobject/Makefile.am Thu Nov 20 19:39:32 2008
@@ -19,8 +19,8 @@
valaccodecontrolflowmodule.vala \
valaccodedelegatemodule.vala \
valaccodegenerator.vala \
- valaccodeinvocationexpressionmodule.vala \
valaccodememberaccessmodule.vala \
+ valaccodemethodcallmodule.vala \
valaccodemethodmodule.vala \
valaccodemodule.vala \
valaccodestructmodule.vala \
Modified: trunk/gobject/valaccodearraymodule.vala
==============================================================================
--- trunk/gobject/valaccodearraymodule.vala (original)
+++ trunk/gobject/valaccodearraymodule.vala Thu Nov 20 19:39:32 2008
@@ -27,7 +27,7 @@
/**
* The link between an assignment and generated code.
*/
-public class Vala.CCodeArrayModule : CCodeInvocationExpressionModule {
+public class Vala.CCodeArrayModule : CCodeMethodCallModule {
private int next_array_dup_id = 0;
public CCodeArrayModule (CCodeGenerator codegen, CCodeModule? next) {
@@ -136,8 +136,8 @@
Gee.List<Expression> size = ((ArrayCreationExpression) array_expr).get_sizes ();
var length_expr = size[dim - 1];
return (CCodeExpression) get_ccodenode (length_expr);
- } else if (array_expr is InvocationExpression) {
- var invocation_expr = (InvocationExpression) array_expr;
+ } else if (array_expr is MethodCall) {
+ var invocation_expr = (MethodCall) array_expr;
Gee.List<CCodeExpression> size = invocation_expr.get_array_sizes ();
return size[dim - 1];
} else if (array_expr.symbol_reference != null) {
Modified: trunk/gobject/valaccodebasemodule.vala
==============================================================================
--- trunk/gobject/valaccodebasemodule.vala (original)
+++ trunk/gobject/valaccodebasemodule.vala Thu Nov 20 19:39:32 2008
@@ -1778,7 +1778,7 @@
stmt.ccodenode = new CCodeExpressionStatement ((CCodeExpression) stmt.expression.ccodenode);
- var invoc = stmt.expression as InvocationExpression;
+ var invoc = stmt.expression as MethodCall;
if (invoc != null) {
var m = invoc.call.symbol_reference as Method;
var ma = invoc.call as MemberAccess;
Modified: trunk/gobject/valaccodedelegatemodule.vala
==============================================================================
--- trunk/gobject/valaccodedelegatemodule.vala (original)
+++ trunk/gobject/valaccodedelegatemodule.vala Thu Nov 20 19:39:32 2008
@@ -82,8 +82,8 @@
}
}
- if (delegate_expr is InvocationExpression) {
- var invocation_expr = (InvocationExpression) delegate_expr;
+ if (delegate_expr is MethodCall) {
+ var invocation_expr = (MethodCall) delegate_expr;
return invocation_expr.delegate_target;
} else if (delegate_expr is LambdaExpression) {
if ((current_method != null && current_method.binding == MemberBinding.INSTANCE) || in_constructor) {
Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala (original)
+++ trunk/gobject/valaccodegenerator.vala Thu Nov 20 19:39:32 2008
@@ -38,7 +38,7 @@
head = new CCodeControlFlowModule (this, head);
head = new CCodeMemberAccessModule (this, head);
head = new CCodeAssignmentModule (this, head);
- head = new CCodeInvocationExpressionModule (this, head);
+ head = new CCodeMethodCallModule (this, head);
head = new CCodeArrayModule (this, head);
head = new CCodeDelegateModule (this, head);
head = new GErrorModule (this, head);
@@ -267,8 +267,8 @@
head.visit_member_access (expr);
}
- public override void visit_invocation_expression (InvocationExpression expr) {
- head.visit_invocation_expression (expr);
+ public override void visit_method_call (MethodCall expr) {
+ head.visit_method_call (expr);
}
public override void visit_element_access (ElementAccess expr) {
Copied: trunk/gobject/valaccodemethodcallmodule.vala (from r2034, /trunk/gobject/valaccodeinvocationexpressionmodule.vala)
==============================================================================
--- /trunk/gobject/valaccodeinvocationexpressionmodule.vala (original)
+++ trunk/gobject/valaccodemethodcallmodule.vala Thu Nov 20 19:39:32 2008
@@ -1,4 +1,4 @@
-/* valaccodeinvocationexpressionmodule.vala
+/* valaccodemethodcallmodule.vala
*
* Copyright (C) 2006-2008 JÃrg Billeter, Raffaele Sandrini
*
@@ -24,12 +24,12 @@
using GLib;
using Gee;
-public class Vala.CCodeInvocationExpressionModule : CCodeAssignmentModule {
- public CCodeInvocationExpressionModule (CCodeGenerator codegen, CCodeModule? next) {
+public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
+ public CCodeMethodCallModule (CCodeGenerator codegen, CCodeModule? next) {
base (codegen, next);
}
- public override void visit_invocation_expression (InvocationExpression expr) {
+ public override void visit_method_call (MethodCall expr) {
expr.accept_children (codegen);
// the bare function call
@@ -217,7 +217,7 @@
cexpr = handle_struct_argument (param, arg, cexpr);
- if (multiple_cargs && arg is InvocationExpression) {
+ if (multiple_cargs && arg is MethodCall) {
// if vala argument is invocation expression
// the auxiliary C argument(s) will depend on the main C argument
Modified: trunk/gobject/valaccodemodule.vala
==============================================================================
--- trunk/gobject/valaccodemodule.vala (original)
+++ trunk/gobject/valaccodemodule.vala Thu Nov 20 19:39:32 2008
@@ -264,8 +264,8 @@
next.visit_member_access (expr);
}
- public virtual void visit_invocation_expression (InvocationExpression expr) {
- next.visit_invocation_expression (expr);
+ public virtual void visit_method_call (MethodCall expr) {
+ next.visit_method_call (expr);
}
public virtual void visit_element_access (ElementAccess expr) {
Modified: trunk/vala/Makefile.am
==============================================================================
--- trunk/vala/Makefile.am (original)
+++ trunk/vala/Makefile.am Thu Nov 20 19:39:32 2008
@@ -79,7 +79,6 @@
valainterfacetype.vala \
valainterfacewriter.vala \
valainvalidtype.vala \
- valainvocationexpression.vala \
valalambdaexpression.vala \
valaliteral.vala \
valalocalvariable.vala \
@@ -89,6 +88,7 @@
valamemberaccess.vala \
valamemberinitializer.vala \
valamethod.vala \
+ valamethodcall.vala \
valamethodtype.vala \
valanamespace.vala \
valanullchecker.vala \
Modified: trunk/vala/valacodevisitor.vala
==============================================================================
--- trunk/vala/valacodevisitor.vala (original)
+++ trunk/vala/valacodevisitor.vala Thu Nov 20 19:39:32 2008
@@ -488,7 +488,7 @@
*
* @param expr an invocation expression
*/
- public virtual void visit_invocation_expression (InvocationExpression expr) {
+ public virtual void visit_method_call (MethodCall expr) {
}
/**
Modified: trunk/vala/valadynamicmethod.vala
==============================================================================
--- trunk/vala/valadynamicmethod.vala (original)
+++ trunk/vala/valadynamicmethod.vala Thu Nov 20 19:39:32 2008
@@ -29,7 +29,7 @@
public class Vala.DynamicMethod : Method {
public DataType dynamic_type { get; set; }
- public InvocationExpression invocation { get; set; }
+ public MethodCall invocation { get; set; }
private string cname;
static int dynamic_method_id;
Modified: trunk/vala/valaflowanalyzer.vala
==============================================================================
--- trunk/vala/valaflowanalyzer.vala (original)
+++ trunk/vala/valaflowanalyzer.vala Thu Nov 20 19:39:32 2008
@@ -530,8 +530,8 @@
handle_errors (stmt);
- if (stmt.expression is InvocationExpression) {
- var expr = (InvocationExpression) stmt.expression;
+ if (stmt.expression is MethodCall) {
+ var expr = (MethodCall) stmt.expression;
var ma = expr.call as MemberAccess;
if (ma != null && ma.symbol_reference != null && ma.symbol_reference.get_attribute ("NoReturn") != null) {
current_block = null;
Modified: trunk/vala/valagenieparser.vala
==============================================================================
--- trunk/vala/valagenieparser.vala (original)
+++ trunk/vala/valagenieparser.vala Thu Nov 20 19:39:32 2008
@@ -589,7 +589,7 @@
expr = parse_pointer_member_access (begin, expr);
break;
case TokenType.OPEN_PARENS:
- expr = parse_invocation_expression (begin, expr);
+ expr = parse_method_call (begin, expr);
break;
case TokenType.OPEN_BRACKET:
expr = parse_element_access (begin, expr);
@@ -725,7 +725,7 @@
accept (TokenType.CLOSE_PARENS);
- var print_expr = new InvocationExpression (expr, get_src (begin));
+ var print_expr = new MethodCall (expr, get_src (begin));
foreach (Expression arg in arg_list) {
print_expr.add_argument (arg);
@@ -747,7 +747,7 @@
accept (TokenType.CLOSE_PARENS);
- var assert_expr = new InvocationExpression (expr, get_src (begin));
+ var assert_expr = new MethodCall (expr, get_src (begin));
foreach (Expression arg in arg_list) {
assert_expr.add_argument (arg);
@@ -757,7 +757,7 @@
}
- Expression parse_invocation_expression (SourceLocation begin, Expression inner) throws ParseError {
+ Expression parse_method_call (SourceLocation begin, Expression inner) throws ParseError {
expect (TokenType.OPEN_PARENS);
var arg_list = parse_argument_list ();
expect (TokenType.CLOSE_PARENS);
@@ -778,7 +778,7 @@
}
return expr;
} else {
- var expr = new InvocationExpression (inner, get_src (begin));
+ var expr = new MethodCall (inner, get_src (begin));
foreach (Expression arg in arg_list) {
expr.add_argument (arg);
}
Modified: trunk/vala/valamemberaccess.vala
==============================================================================
--- trunk/vala/valamemberaccess.vala (original)
+++ trunk/vala/valamemberaccess.vala Thu Nov 20 19:39:32 2008
@@ -311,8 +311,8 @@
if (symbol_reference == null && inner.value_type != null && inner.value_type.is_dynamic) {
// allow late bound members for dynamic types
var dynamic_object_type = (ObjectType) inner.value_type;
- if (parent_node is InvocationExpression) {
- var invoc = (InvocationExpression) parent_node;
+ if (parent_node is MethodCall) {
+ var invoc = (MethodCall) parent_node;
if (invoc.call == this) {
// dynamic method
DataType ret_type;
Copied: trunk/vala/valamethodcall.vala (from r2038, /trunk/vala/valainvocationexpression.vala)
==============================================================================
--- /trunk/vala/valainvocationexpression.vala (original)
+++ trunk/vala/valamethodcall.vala Thu Nov 20 19:39:32 2008
@@ -1,4 +1,4 @@
-/* valainvocationexpression.vala
+/* valamethodcall.vala
*
* Copyright (C) 2006-2008 JÃrg Billeter
*
@@ -26,7 +26,7 @@
/**
* Represents an invocation expression in the source code.
*/
-public class Vala.InvocationExpression : Expression {
+public class Vala.MethodCall : Expression {
/**
* The method to call.
*/
@@ -52,7 +52,7 @@
* @param source_reference reference to source code
* @return newly created invocation expression
*/
- public InvocationExpression (Expression call, SourceReference? source_reference = null) {
+ public MethodCall (Expression call, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.call = call;
}
@@ -92,7 +92,7 @@
}
public override void accept (CodeVisitor visitor) {
- visitor.visit_invocation_expression (this);
+ visitor.visit_method_call (this);
visitor.visit_expression (this);
}
Modified: trunk/vala/valanullchecker.vala
==============================================================================
--- trunk/vala/valanullchecker.vala (original)
+++ trunk/vala/valanullchecker.vala Thu Nov 20 19:39:32 2008
@@ -198,7 +198,7 @@
stmt.accept_children (this);
}
- public override void visit_invocation_expression (InvocationExpression expr) {
+ public override void visit_method_call (MethodCall expr) {
expr.accept_children (this);
var mtype = expr.call.value_type as MethodType;
Modified: trunk/vala/valaparser.vala
==============================================================================
--- trunk/vala/valaparser.vala (original)
+++ trunk/vala/valaparser.vala Thu Nov 20 19:39:32 2008
@@ -492,7 +492,7 @@
expr = parse_pointer_member_access (begin, expr);
break;
case TokenType.OPEN_PARENS:
- expr = parse_invocation_expression (begin, expr);
+ expr = parse_method_call (begin, expr);
break;
case TokenType.OPEN_BRACKET:
expr = parse_element_access (begin, expr);
@@ -582,7 +582,7 @@
return expr;
}
- Expression parse_invocation_expression (SourceLocation begin, Expression inner) throws ParseError {
+ Expression parse_method_call (SourceLocation begin, Expression inner) throws ParseError {
expect (TokenType.OPEN_PARENS);
var arg_list = parse_argument_list ();
expect (TokenType.CLOSE_PARENS);
@@ -603,7 +603,7 @@
}
return expr;
} else {
- var expr = new InvocationExpression (inner, get_src (begin));
+ var expr = new MethodCall (inner, get_src (begin));
foreach (Expression arg in arg_list) {
expr.add_argument (arg);
}
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Thu Nov 20 19:39:32 2008
@@ -307,7 +307,7 @@
Report.error (expr.source_reference, "Too few arguments, method `%s' does not take %d arguments".printf (mtype.to_string (), args.size));
return false;
} else {
- var invocation_expr = expr as InvocationExpression;
+ var invocation_expr = expr as MethodCall;
var object_creation_expr = expr as ObjectCreationExpression;
if (invocation_expr != null) {
invocation_expr.add_argument (param.default_expression);
Modified: trunk/vala/valasymbolresolver.vala
==============================================================================
--- trunk/vala/valasymbolresolver.vala (original)
+++ trunk/vala/valasymbolresolver.vala Thu Nov 20 19:39:32 2008
@@ -378,7 +378,7 @@
expr.accept_children (this);
}
- public override void visit_invocation_expression (InvocationExpression expr) {
+ public override void visit_method_call (MethodCall expr) {
expr.accept_children (this);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]