[valadoc] driver: merge 0.13.* and 0.14.*
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] driver: merge 0.13.* and 0.14.*
- Date: Fri, 27 Jan 2012 16:44:12 +0000 (UTC)
commit 3175c9de0718ab2fae86c4ffba4f2b25b747f183
Author: Florian Brosch <flo brosch gmail com>
Date: Mon Dec 19 02:01:02 2011 +0100
driver: merge 0.13.* and 0.14.*
configure.in | 31 +-
src/driver/0.13.x/Makefile.am | 68 --
src/driver/0.13.x/driver.vala | 51 --
src/driver/0.13.x/initializerbuilder.vala | 676 ----------------
src/driver/0.13.x/symbolresolver.vala | 307 --------
src/driver/0.13.x/treebuilder.vala | 1207 -----------------------------
src/driver/0.14.x/Makefile.am | 15 +-
src/driver/0.14.x/initializerbuilder.vala | 11 +-
src/driver/0.14.x/treebuilder.vala | 85 ++-
src/driver/Makefile.am | 17 +-
src/valadoc/valadoc.vala | 8 +-
11 files changed, 132 insertions(+), 2344 deletions(-)
---
diff --git a/configure.in b/configure.in
index 533aaac..3bfc864 100755
--- a/configure.in
+++ b/configure.in
@@ -68,22 +68,34 @@ AC_SUBST(LIBVALA_0_16_X_CFLAGS)
AC_SUBST(LIBVALA_0_16_X_LIBS)
-PKG_CHECK_MODULES(LIBVALA_0_14_X, libvala-0.14 >= 0.14.0, have_libvala_0_14_x="yes", have_libvala_0_14_x="no")
+PKG_CHECK_MODULES(LIBVALA_0_14_X, libvala-0.14 >= 0.13.2, have_libvala_0_14_x="yes", have_libvala_0_14_x="no")
AM_CONDITIONAL(HAVE_LIBVALA_0_14_X, test "$have_libvala_0_14_x" = "yes")
AC_SUBST(LIBVALA_0_14_X_CFLAGS)
AC_SUBST(LIBVALA_0_14_X_LIBS)
-PKG_CHECK_MODULES(LIBVALA_0_13_X, libvala-0.14 >= 0.13.1 libvala-0.14 < 0.14.0, have_libvala_0_13_x="yes", have_libvala_0_13_x="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_13_X, test "$have_libvala_0_13_x" = "yes")
-AC_SUBST(LIBVALA_0_13_X_CFLAGS)
-AC_SUBST(LIBVALA_0_13_X_LIBS)
+PKG_CHECK_MODULES(LIBVALA_0_13_1, libvala-0.14 = 0.13.1, have_libvala_0_13_1="yes", have_libvala_0_13_1="no")
+AM_CONDITIONAL(HAVE_LIBVALA_0_13_1, test "$have_libvala_0_13_1" = "yes")
+AC_SUBST(LIBVALA_0_13_1_CFLAGS)
+AC_SUBST(LIBVALA_0_13_1_LIBS)
-PKG_CHECK_MODULES(LIBVALA_0_13_X, libvala-0.14 >= 0.13.0 libvala-0.14 <= 0.13.1, have_libvala_0_13_0_1="yes", have_libvala_0_13_0_1="no")
-AM_CONDITIONAL(HAVE_LIBVALA_0_13_0_1, test "$have_libvala_0_13_0_1" = "yes")
-AC_SUBST(LIBVALA_0_13_X_CFLAGS)
-AC_SUBST(LIBVALA_0_13_X_LIBS)
+PKG_CHECK_MODULES(LIBVALA_0_13_0, libvala-0.14 = 0.13.0, have_libvala_0_13_0="yes", have_libvala_0_13_0="no")
+AM_CONDITIONAL(HAVE_LIBVALA_0_13_0, test "$have_libvala_0_13_0" = "yes")
+AC_SUBST(LIBVALA_0_13_0_CFLAGS)
+AC_SUBST(LIBVALA_0_13_0_LIBS)
+
+
+#PKG_CHECK_MODULES(LIBVALA_0_13_X, libvala-0.14 >= 0.13.1 libvala-0.14 < 0.14.0, have_libvala_0_13_x="yes", have_libvala_0_13_x="no")
+#AM_CONDITIONAL(HAVE_LIBVALA_0_13_X, test "$have_libvala_0_13_x" = "yes")
+#AC_SUBST(LIBVALA_0_13_X_CFLAGS)
+#AC_SUBST(LIBVALA_0_13_X_LIBS)
+
+
+#PKG_CHECK_MODULES(LIBVALA_0_13_X, libvala-0.14 >= 0.13.0 libvala-0.14 <= 0.13.1, have_libvala_0_13_0_1="yes", have_libvala_0_13_0_1="no")
+#AM_CONDITIONAL(HAVE_LIBVALA_0_13_0_1, test "$have_libvala_0_13_0_1" = "yes")
+#AC_SUBST(LIBVALA_0_13_X_CFLAGS)
+#AC_SUBST(LIBVALA_0_13_X_LIBS)
PKG_CHECK_MODULES(LIBVALA_0_12_X, libvala-0.12 >= 0.11.1, have_libvala_0_12_x="yes", have_libvala_0_12_x="no")
@@ -114,7 +126,6 @@ AC_CONFIG_FILES([Makefile
src/driver/Makefile
src/driver/0.10.x/Makefile
src/driver/0.12.x/Makefile
- src/driver/0.13.x/Makefile
src/driver/0.14.x/Makefile
src/driver/0.16.x/Makefile
src/doclets/Makefile
diff --git a/src/driver/0.14.x/Makefile.am b/src/driver/0.14.x/Makefile.am
index b8bb596..2e4fe6c 100755
--- a/src/driver/0.14.x/Makefile.am
+++ b/src/driver/0.14.x/Makefile.am
@@ -2,12 +2,23 @@ NULL =
VERSIONED_VAPI_DIR=`pkg-config libvala-0.14 --variable vapidir`
+if HAVE_LIBVALA_0_13_0
+VALA_FLAGS = -D VALA_0_13_0
+endif
+
+if HAVE_LIBVALA_0_13_1
+VALA_FLAGS = -D VALA_0_13_1
+endif
+
+
AM_CFLAGS = -g \
-DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I ../../libvaladoc/ \
$(GLIB_CFLAGS) \
$(LIBGEE_CFLAGS) \
$(LIBVALA_0_14_X_CFLAGS) \
+ $(LIBVALA_0_13_0_CFLAGS) \
+ $(LIBVALA_0_13_1_CFLAGS) \
$(NULL)
@@ -41,7 +52,7 @@ libdriver_la_SOURCES = \
libdriver.vala.stamp: $(libdriver_la_VALASOURCES)
- $(VALAC) $(VALA_FLAGS) -C --vapidir $(top_srcdir)/src/vapi --vapidir $(VERSIONED_VAPI_DIR) --vapidir $(top_srcdir)/src/libvaladoc --pkg libvala-0.14 --pkg gee-1.0 --pkg valadoc-1.0 --basedir . $^
+ $(VALAC) $(VALA_FLAGS) -C --vapidir $(top_srcdir)/src/vapi --vapidir $(VERSIONED_VAPI_DIR) --vapidir $(top_srcdir)/src/libvaladoc --pkg libvala-0.14 --pkg gee-1.0 --pkg valadoc-1.0 --basedir . $(VALA_FLAGS) $^
touch $@
@@ -49,6 +60,8 @@ libdriver_la_LIBADD = \
../../libvaladoc/libvaladoc.la \
$(GLIB_LIBS) \
$(LIBVALA_0_14_X_LIBS) \
+ $(LIBVALA_0_13_0_LIBS) \
+ $(LIBVALA_0_13_1_LIBS) \
$(LIBGEE_LIBS) \
$(NULL)
diff --git a/src/driver/0.14.x/initializerbuilder.vala b/src/driver/0.14.x/initializerbuilder.vala
index 70fd1d6..e23e1a2 100644
--- a/src/driver/0.14.x/initializerbuilder.vala
+++ b/src/driver/0.14.x/initializerbuilder.vala
@@ -501,6 +501,15 @@ private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
signature.append ("(", false);
bool first = true;
+#if VALA_0_13_0
+ foreach (string param_name in expr.get_parameters ()) {
+ if (!first) {
+ signature.append (", ", false);
+ }
+ signature.append (param_name, false);
+ first = false;
+ }
+#else
foreach (Vala.Parameter param in expr.get_parameters ()) {
if (!first) {
signature.append (", ", false);
@@ -508,7 +517,7 @@ private class Valadoc.Api.InitializerBuilder : Vala.CodeVisitor {
signature.append (param.name, false);
first = false;
}
-
+#endif
signature.append (") => {", false);
signature.append_highlighted (" [...] ", false);
diff --git a/src/driver/0.14.x/treebuilder.vala b/src/driver/0.14.x/treebuilder.vala
index f61b08f..556cb08 100644
--- a/src/driver/0.14.x/treebuilder.vala
+++ b/src/driver/0.14.x/treebuilder.vala
@@ -233,57 +233,134 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
}
}
- private string get_ccode_type_id (Vala.CodeNode node) {
+ private string? get_ccode_type_id (Vala.CodeNode node) {
+#if VALA_0_13_0 || VALA_0_13_1
+ if (node is Vala.Class) {
+ return ((Vala.Class) node).get_type_id ();
+ } else if (node is Vala.Struct) {
+ return ((Vala.Struct) node).get_type_id ();
+ }
+
+ return null;
+#else
return Vala.CCodeBaseModule.get_ccode_type_id (node);
+#endif
}
private bool is_reference_counting (Vala.TypeSymbol sym) {
+#if VALA_0_13_0 || VALA_0_13_1
+ return sym.is_reference_counting ();
+#else
return Vala.CCodeBaseModule.is_reference_counting (sym);
+#endif
}
private string get_ref_function (Vala.Class sym) {
+#if VALA_0_13_0 || VALA_0_13_1
+ return sym.get_ref_function ();
+#else
return Vala.CCodeBaseModule.get_ccode_ref_function (sym);
+#endif
}
private string get_unref_function (Vala.Class sym) {
+#if VALA_0_13_0 || VALA_0_13_1
+ return sym.get_unref_function ();
+#else
return Vala.CCodeBaseModule.get_ccode_unref_function (sym);
+#endif
}
private string get_finish_name (Vala.Method m) {
+#if VALA_0_13_0 || VALA_0_13_1
+ return m.get_finish_cname ();
+#else
return Vala.CCodeBaseModule.get_ccode_finish_name (m);
+#endif
}
private string get_take_value_function (Vala.Class sym) {
+#if VALA_0_13_0 || VALA_0_13_1
+ return sym.get_take_value_function ();
+#else
return Vala.CCodeBaseModule.get_ccode_take_value_function (sym);
+#endif
}
private string get_get_value_function (Vala.Class sym) {
+#if VALA_0_13_0 || VALA_0_13_1
+ return sym.get_get_value_function ();
+#else
return Vala.CCodeBaseModule.get_ccode_get_value_function (sym);
+#endif
}
private string get_set_value_function (Vala.Class sym) {
+#if VALA_0_13_0 || VALA_0_13_1
+ return sym.get_set_value_function ();
+#else
return Vala.CCodeBaseModule.get_ccode_set_value_function (sym);
+#endif
}
- private string get_param_spec_function (Vala.CodeNode sym) {
+ private string? get_param_spec_function (Vala.CodeNode sym) {
+#if VALA_0_13_0 || VALA_0_13_1
+ if (sym is Vala.TypeSymbol) {
+ return ((Vala.TypeSymbol) sym).get_param_spec_function ();
+ }
+
+ return null;
+#else
return Vala.CCodeBaseModule.get_ccode_param_spec_function (sym);
+#endif
}
private string? get_dup_function (Vala.TypeSymbol sym) {
+#if VALA_0_13_0 || VALA_0_13_1
+ return sym.get_dup_function ();
+#else
return Vala.CCodeBaseModule.get_ccode_dup_function (sym);
+#endif
}
private string get_free_function (Vala.TypeSymbol sym) {
+#if VALA_0_13_0 || VALA_0_13_1
+ return sym.get_free_function ();
+#else
return Vala.CCodeBaseModule.get_ccode_free_function (sym);
+#endif
}
private string get_nick (Vala.Property prop) {
+#if VALA_0_13_0 || VALA_0_13_1
+ return prop.nick;
+#else
return Vala.CCodeBaseModule.get_ccode_nick (prop);
+#endif
}
private string? get_cname (Vala.Symbol symbol) {
+#if VALA_0_13_0 || VALA_0_13_1
+ if (symbol is Vala.TypeSymbol) {
+ return ((Vala.TypeSymbol) symbol).get_cname ();
+ } else if (symbol is Vala.PropertyAccessor) {
+ return ((Vala.PropertyAccessor) symbol).get_cname ();
+ } else if (symbol is Vala.Method) {
+ return ((Vala.Method) symbol).get_cname ();
+ } else if (symbol is Vala.Signal) {
+ return ((Vala.Signal) symbol).get_cname ();
+ } else if (symbol is Vala.Constant) {
+ return ((Vala.Constant) symbol).get_cname ();
+ } else if (symbol is Vala.Field) {
+ return ((Vala.Field) symbol).get_cname ();
+ } else {
+message ("--%s--", symbol.name);
+ assert_not_reached ();
+ }
+#else
return Vala.CCodeBaseModule.get_ccode_name (symbol);
+#endif
}
private SourceComment? create_comment (Vala.Comment? comment) {
@@ -915,12 +992,12 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
// Process property type
if (element.get_accessor != null) {
var accessor = element.get_accessor;
- node.getter = new PropertyAccessor (node, file, element.name, get_access_modifier(element), get_cname (element), get_property_accessor_type (accessor), get_property_ownership (accessor), accessor);
+ node.getter = new PropertyAccessor (node, file, element.name, get_access_modifier(element), get_cname (accessor), get_property_accessor_type (accessor), get_property_ownership (accessor), accessor);
}
if (element.set_accessor != null) {
var accessor = element.set_accessor;
- node.setter = new PropertyAccessor (node, file, element.name, get_access_modifier(element), get_cname (element), get_property_accessor_type (accessor), get_property_ownership (accessor), accessor);
+ node.setter = new PropertyAccessor (node, file, element.name, get_access_modifier(element), get_cname (accessor), get_property_accessor_type (accessor), get_property_ownership (accessor), accessor);
}
process_attributes (node, element.attributes);
diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am
index d2a0b45..e366d3a 100755
--- a/src/driver/Makefile.am
+++ b/src/driver/Makefile.am
@@ -6,14 +6,6 @@ if HAVE_LIBVALA_0_10_X
DRIVER_0_10_X_DIR = 0.10.x
endif
-#if HAVE_LIBVALA_0_11_0
-#DRIVER_0_11_0_DIR = 0.11.0
-#endif
-
-#if HAVE_LIBVALA_0_11_X
-#DRIVER_0_11_X_DIR = 0.11.x
-#endif
-
if HAVE_LIBVALA_0_12_X
DRIVER_0_12_X_DIR = 0.12.x
endif
@@ -22,12 +14,12 @@ if HAVE_LIBVALA_0_12_0
DRIVER_0_12_X_DIR = 0.12.x
endif
-if HAVE_LIBVALA_0_13_0_1
-DRIVER_0_13_X_DIR = 0.13.x
+if HAVE_LIBVALA_0_13_0
+DRIVER_0_14_X_DIR = 0.14.x
endif
-if HAVE_LIBVALA_0_13_X
-DRIVER_0_13_X_DIR = 0.13.x
+if HAVE_LIBVALA_0_13_1
+DRIVER_0_14_X_DIR = 0.14.x
endif
if HAVE_LIBVALA_0_14_X
@@ -41,7 +33,6 @@ endif
SUBDIRS = \
$(DRIVER_0_10_X_DIR) \
$(DRIVER_0_12_X_DIR) \
- $(DRIVER_0_13_X_DIR) \
$(DRIVER_0_14_X_DIR) \
$(DRIVER_0_16_X_DIR) \
$(NULL)
diff --git a/src/valadoc/valadoc.vala b/src/valadoc/valadoc.vala
index e126244..de99f42 100755
--- a/src/valadoc/valadoc.vala
+++ b/src/valadoc/valadoc.vala
@@ -245,12 +245,8 @@ public class ValaDoc : Object {
}
DriverMetaData[] lut = {
- DriverMetaData (LibvalaVersion (0, 10, 0), LibvalaVersion (0, 10, -4), "0.10.x"),
- //DriverMetaData (LibvalaVersion (0, 11, 0), LibvalaVersion (0, 11, 0), "0.11.0"),
- //DriverMetaData (LibvalaVersion (0, 11, 1), LibvalaVersion (0, 11, -1), "0.11.x"),
- //DriverMetaData (LibvalaVersion (0, 12, 0), LibvalaVersion (0, 12, -1), "0.12.x"),
- DriverMetaData (LibvalaVersion (0, 11, 0), LibvalaVersion (0, 12, -1), "0.12.x"),
- DriverMetaData (LibvalaVersion (0, 13, 0), LibvalaVersion (0, 13, -1), "0.13.x"),
+ DriverMetaData (LibvalaVersion (0, 10, 0), LibvalaVersion (0, 10, -1), "0.10.x"),
+ DriverMetaData (LibvalaVersion (0, 12, 0), LibvalaVersion (0, 12, -1), "0.12.x"),
DriverMetaData (LibvalaVersion (0, 14, 0), LibvalaVersion (0, 14, -1), "0.14.x")
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]