Commit 2af5cc83 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Rename InvocationExpression to MethodCall

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

svn path=/trunk/; revision=2039
parent ecf93a1c
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
2008-11-20 Jürg Billeter <j@bitron.ch>
* vala/valainvocationexpression.vala:
......
......@@ -19,8 +19,8 @@ libvala_la_VALASOURCES = \
valaccodecontrolflowmodule.vala \
valaccodedelegatemodule.vala \
valaccodegenerator.vala \
valaccodeinvocationexpressionmodule.vala \
valaccodememberaccessmodule.vala \
valaccodemethodcallmodule.vala \
valaccodemethodmodule.vala \
valaccodemodule.vala \
valaccodestructmodule.vala \
......
......@@ -27,7 +27,7 @@ using Gee;
/**
* 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 @@ public class Vala.CCodeArrayModule : CCodeInvocationExpressionModule {
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) {
......
......@@ -1778,7 +1778,7 @@ public class Vala.CCodeBaseModule : CCodeModule {
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;
......
......@@ -82,8 +82,8 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
}
}
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) {
......
......@@ -38,7 +38,7 @@ public class Vala.CCodeGenerator : CodeGenerator {
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 @@ public class Vala.CCodeGenerator : CodeGenerator {
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) {
......
/* 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 @@ public class Vala.CCodeInvocationExpressionModule : CCodeAssignmentModule {
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
......
......@@ -264,8 +264,8 @@ public abstract class Vala.CCodeModule {
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) {
......
......@@ -79,7 +79,6 @@ libvalacore_la_VALASOURCES = \
valainterfacetype.vala \
valainterfacewriter.vala \
valainvalidtype.vala \
valainvocationexpression.vala \
valalambdaexpression.vala \
valaliteral.vala \
valalocalvariable.vala \
......@@ -89,6 +88,7 @@ libvalacore_la_VALASOURCES = \
valamemberaccess.vala \
valamemberinitializer.vala \
valamethod.vala \
valamethodcall.vala \
valamethodtype.vala \
valanamespace.vala \
valanullchecker.vala \
......
......@@ -488,7 +488,7 @@ public abstract class Vala.CodeVisitor {
*
* @param expr an invocation expression
*/
public virtual void visit_invocation_expression (InvocationExpression expr) {
public virtual void visit_method_call (MethodCall expr) {
}
/**
......
......@@ -29,7 +29,7 @@ using Gee;
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;
......
......@@ -530,8 +530,8 @@ public class Vala.FlowAnalyzer : CodeVisitor {
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;
......
......@@ -589,7 +589,7 @@ public class Vala.Genie.Parser : CodeVisitor {
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 @@ public class Vala.Genie.Parser : CodeVisitor {
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 @@ public class Vala.Genie.Parser : CodeVisitor {
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 @@ public class Vala.Genie.Parser : CodeVisitor {
}
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 @@ public class Vala.Genie.Parser : CodeVisitor {
}
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);
}
......
......@@ -311,8 +311,8 @@ public class Vala.MemberAccess : Expression {
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;
......
/* valainvocationexpression.vala
/* valamethodcall.vala
*
* Copyright (C) 2006-2008 Jürg Billeter
*
......@@ -26,7 +26,7 @@ using Gee;
/**
* 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 @@ public class Vala.InvocationExpression : Expression {
* @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 class Vala.InvocationExpression : Expression {
}
public override void accept (CodeVisitor visitor) {
visitor.visit_invocation_expression (this);
visitor.visit_method_call (this);
visitor.visit_expression (this);
}
......
......@@ -198,7 +198,7 @@ public class Vala.NullChecker : CodeVisitor {
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;
......
......@@ -492,7 +492,7 @@ public class Vala.Parser : CodeVisitor {
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 @@ public class Vala.Parser : CodeVisitor {
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 @@ public class Vala.Parser : CodeVisitor {
}
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);
}
......
......@@ -307,7 +307,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
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);
......
......@@ -378,7 +378,7 @@ public class Vala.SymbolResolver : CodeVisitor {
expr.accept_children (this);
}
public override void visit_invocation_expression (InvocationExpression expr) {
public override void visit_method_call (MethodCall expr) {
expr.accept_children (this);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment