vala r1890 - in trunk: . gobject vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1890 - in trunk: . gobject vala
- Date: Fri, 24 Oct 2008 13:11:07 +0000 (UTC)
Author: juergbi
Date: Fri Oct 24 13:11:06 2008
New Revision: 1890
URL: http://svn.gnome.org/viewvc/vala?rev=1890&view=rev
Log:
2008-10-24 JÃrg Billeter <j bitron ch>
* vala/valaarraycreationexpression.vala:
* vala/valacodegenerator.vala:
* gobject/Makefile.am:
* gobject/valaccodearraymodule.vala:
* gobject/valaccodebinding.vala:
* gobject/valaccodegenerator.vala:
* gobject/valaccodemodule.vala:
Add CCodeArrayModule
Added:
trunk/gobject/valaccodearraymodule.vala (contents, props changed)
- copied, changed from r1889, /trunk/gobject/valaccodearraycreationexpressionbinding.vala
Removed:
trunk/gobject/valaccodearraycreationexpressionbinding.vala
Modified:
trunk/ChangeLog
trunk/gobject/Makefile.am
trunk/gobject/valaccodebinding.vala
trunk/gobject/valaccodegenerator.vala
trunk/gobject/valaccodemodule.vala
trunk/vala/valaarraycreationexpression.vala
trunk/vala/valacodegenerator.vala
Modified: trunk/gobject/Makefile.am
==============================================================================
--- trunk/gobject/Makefile.am (original)
+++ trunk/gobject/Makefile.am Fri Oct 24 13:11:06 2008
@@ -12,7 +12,7 @@
$(NULL)
libvala_la_VALASOURCES = \
- valaccodearraycreationexpressionbinding.vala \
+ valaccodearraymodule.vala \
valaccodeassignmentbinding.vala \
valaccodebasemodule.vala \
valaccodebinding.vala \
Copied: trunk/gobject/valaccodearraymodule.vala (from r1889, /trunk/gobject/valaccodearraycreationexpressionbinding.vala)
==============================================================================
--- /trunk/gobject/valaccodearraycreationexpressionbinding.vala (original)
+++ trunk/gobject/valaccodearraymodule.vala Fri Oct 24 13:11:06 2008
@@ -1,4 +1,4 @@
-/* valaccodearraycreationexpressionbinding.vala
+/* valaccodearraymodule.vala
*
* Copyright (C) 2006-2008 JÃrg Billeter, Raffaele Sandrini
*
@@ -27,17 +27,12 @@
/**
* The link between an assignment and generated code.
*/
-public class Vala.CCodeArrayCreationExpressionBinding : CCodeBinding {
- public ArrayCreationExpression array_creation_expression { get; set; }
-
- public CCodeArrayCreationExpressionBinding (CCodeGenerator codegen, ArrayCreationExpression array_creation_expression) {
- this.array_creation_expression = array_creation_expression;
- this.codegen = codegen;
+public class Vala.CCodeArrayModule : CCodeModule {
+ public CCodeArrayModule (CCodeGenerator codegen, CCodeModule? next) {
+ base (codegen, next);
}
- public override void emit () {
- var expr = array_creation_expression;
-
+ public override void visit_array_creation_expression (ArrayCreationExpression expr) {
expr.accept_children (codegen);
var gnew = new CCodeFunctionCall (new CCodeIdentifier ("g_new0"));
Modified: trunk/gobject/valaccodebinding.vala
==============================================================================
--- trunk/gobject/valaccodebinding.vala (original)
+++ trunk/gobject/valaccodebinding.vala Fri Oct 24 13:11:06 2008
@@ -45,10 +45,6 @@
return (CCodeBinding) node.get_code_binding (codegen);
}
- public CCodeArrayCreationExpressionBinding array_creation_expression_binding (ArrayCreationExpression node) {
- return (CCodeArrayCreationExpressionBinding) node.get_code_binding (codegen);
- }
-
public CCodeElementAccessBinding element_access_binding (ElementAccess node) {
return (CCodeElementAccessBinding) node.get_code_binding (codegen);
}
Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala (original)
+++ trunk/gobject/valaccodegenerator.vala Fri Oct 24 13:11:06 2008
@@ -143,6 +143,7 @@
public CCodeGenerator () {
head = new CCodeBaseModule (this, head);
head = new CCodeMethodModule (this, head);
+ head = new CCodeArrayModule (this, head);
head = new GObjectModule (this, head);
head = new GObjectClassModule (this, head);
head = new GObjectInterfaceModule (this, head);
@@ -2782,7 +2783,7 @@
}
public override void visit_array_creation_expression (ArrayCreationExpression expr) {
- code_binding (expr).emit ();
+ head.visit_array_creation_expression (expr);
}
public override void visit_boolean_literal (BooleanLiteral expr) {
@@ -4372,10 +4373,6 @@
return new CCodeDynamicSignalBinding (this, node);
}
- public override CodeBinding? create_array_creation_expression_binding (ArrayCreationExpression node) {
- return new CCodeArrayCreationExpressionBinding (this, node);
- }
-
public override CodeBinding? create_member_access_binding (MemberAccess node) {
return new CCodeMemberAccessBinding (this, node);
}
@@ -4404,10 +4401,6 @@
return (CCodeDynamicSignalBinding) node.get_code_binding (this);
}
- public CCodeArrayCreationExpressionBinding array_creation_expression_binding (ArrayCreationExpression node) {
- return (CCodeArrayCreationExpressionBinding) node.get_code_binding (this);
- }
-
public CCodeElementAccessBinding element_access_binding (ElementAccess node) {
return (CCodeElementAccessBinding) node.get_code_binding (this);
}
Modified: trunk/gobject/valaccodemodule.vala
==============================================================================
--- trunk/gobject/valaccodemodule.vala (original)
+++ trunk/gobject/valaccodemodule.vala Fri Oct 24 13:11:06 2008
@@ -68,6 +68,10 @@
next.visit_creation_method (m);
}
+ public virtual void visit_array_creation_expression (ArrayCreationExpression expr) {
+ next.visit_array_creation_expression (expr);
+ }
+
public virtual void generate_cparameters (Method m, DataType creturn_type, bool in_gtypeinstance_creation_method, Map<int,CCodeFormalParameter> cparam_map, CCodeFunction func, CCodeFunctionDeclarator? vdeclarator = null, Map<int,CCodeExpression>? carg_map = null, CCodeFunctionCall? vcall = null) {
next.generate_cparameters (m, creturn_type, in_gtypeinstance_creation_method, cparam_map, func, vdeclarator, carg_map, vcall);
}
Modified: trunk/vala/valaarraycreationexpression.vala
==============================================================================
--- trunk/vala/valaarraycreationexpression.vala (original)
+++ trunk/vala/valaarraycreationexpression.vala Fri Oct 24 13:11:06 2008
@@ -106,8 +106,4 @@
element_type = new_type;
}
}
-
- public override CodeBinding? create_code_binding (CodeGenerator codegen) {
- return codegen.create_array_creation_expression_binding (this);
- }
}
Modified: trunk/vala/valacodegenerator.vala
==============================================================================
--- trunk/vala/valacodegenerator.vala (original)
+++ trunk/vala/valacodegenerator.vala Fri Oct 24 13:11:06 2008
@@ -42,10 +42,6 @@
return null;
}
- public virtual CodeBinding? create_array_creation_expression_binding (ArrayCreationExpression node) {
- return null;
- }
-
public virtual CodeBinding? create_member_access_binding (MemberAccess node) {
return null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]