summaryrefslogtreecommitdiff
path: root/vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2010-08-15 15:00:00 +0200
committerJürg Billeter <j@bitron.ch>2010-10-09 15:47:22 +0200
commitcc9c261c76da96d590e8f7bd363eaf0cf022c832 (patch)
tree63c0d58fbe58ecd4d3c7e398b9c6ce4150a4be54 /vala
parent3bbb4054ee13a069a866b429893b08a4bd4f9ad1 (diff)
downloadvala-cc9c261c76da96d590e8f7bd363eaf0cf022c832.tar.gz
Add TargetValue class
Diffstat (limited to 'vala')
-rw-r--r--vala/Makefile.am1
-rw-r--r--vala/valacodenode.vala20
-rw-r--r--vala/valaexpression.vala23
-rw-r--r--vala/valatargetvalue.vala25
4 files changed, 27 insertions, 42 deletions
diff --git a/vala/Makefile.am b/vala/Makefile.am
index 83acbd595..a2e0ede09 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -141,6 +141,7 @@ libvalacore_la_VALASOURCES = \
valaswitchstatement.vala \
valasymbol.vala \
valasymbolresolver.vala \
+ valatargetvalue.vala \
valatemplate.vala \
valathrowstatement.vala \
valatokentype.vala \
diff --git a/vala/valacodenode.vala b/vala/valacodenode.vala
index 0b047c04d..62508c7e6 100644
--- a/vala/valacodenode.vala
+++ b/vala/valacodenode.vala
@@ -50,24 +50,6 @@ public abstract class Vala.CodeNode {
public string type_name {
get { return Type.from_instance (this).name (); }
}
-
- /**
- * Generated CCodeNode that corresponds to this code node.
- */
- public CCodeNode? ccodenode {
- get {
- return _ccodenode;
- }
- set {
- if (value != null && source_reference != null && CodeContext.get ().debug) {
- value.line = new CCodeLineDirective (
- Path.get_basename (source_reference.file.filename),
- source_reference.first_line);
- }
-
- _ccodenode = value;
- }
- }
public bool checked { get; set; }
@@ -86,8 +68,6 @@ public abstract class Vala.CodeNode {
private List<DataType> _error_types;
private static List<DataType> _empty_type_list;
- private CCodeNode? _ccodenode;
-
static int last_temp_nr = 0;
/**
diff --git a/vala/valaexpression.vala b/vala/valaexpression.vala
index eafb202d8..dd005afca 100644
--- a/vala/valaexpression.vala
+++ b/vala/valaexpression.vala
@@ -55,10 +55,7 @@ public abstract class Vala.Expression : CodeNode {
*/
public bool lvalue { get; set; }
- private List<CCodeExpression> array_sizes;
-
- public CCodeExpression? delegate_target { get; set; }
- public CCodeExpression? delegate_target_destroy_notify { get; set; }
+ public TargetValue? target_value { get; set; }
/**
* Returns whether this expression is constant, i.e. whether this
@@ -81,24 +78,6 @@ public abstract class Vala.Expression : CodeNode {
return false;
}
- /**
- * Add an array size C code expression.
- */
- public void append_array_size (CCodeExpression size) {
- if (array_sizes == null) {
- array_sizes = new ArrayList<CCodeExpression> ();
- }
- array_sizes.add (size);
- }
-
- /**
- * Get the C code expression for array sizes for all dimensions
- * ascending from left to right.
- */
- public List<CCodeExpression>? get_array_sizes () {
- return array_sizes;
- }
-
public Statement? parent_statement {
get {
var expr = parent_node as Expression;
diff --git a/vala/valatargetvalue.vala b/vala/valatargetvalue.vala
new file mode 100644
index 000000000..e84913ab3
--- /dev/null
+++ b/vala/valatargetvalue.vala
@@ -0,0 +1,25 @@
+/* valatargetvalue.vala
+ *
+ * Copyright (C) 2010 Jürg Billeter
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Jürg Billeter <j@bitron.ch>
+ */
+
+public abstract class Vala.TargetValue {
+ public DataType value_type { get; set; }
+}