[vala/wip/beniofel/transform: 74/74] Merge branch 'master' into wip/beniofel/transform



commit 26bdfb63f25b70098071800582ba505e39b810b5
Merge: 1b717f1 4f06275
Author: Ben Iofel <iofelben gmail com>
Date:   Mon Feb 15 22:34:58 2016 -0500

    Merge branch 'master' into wip/beniofel/transform

 NEWS                                        |    7 +
 README                                      |    2 +-
 codegen/valaccodeattribute.vala             |    8 +-
 codegen/valaccodebasemodule.vala            |   52 +-
 codegen/valaccodedelegatemodule.vala        |    2 +-
 codegen/valaccodemethodmodule.vala          |    5 +-
 codegen/valaccodestructmodule.vala          |    4 +-
 codegen/valagirwriter.vala                  |   11 +-
 codegen/valagsignalmodule.vala              |    2 +-
 compiler/valacompiler.vala                  |    7 +-
 configure.ac                                |    2 +-
 doc/valac.1                                 |    3 +
 tests/basic-types/arrays.vala               |   74 ++
 vala/Makefile.am                            |    1 +
 vala/valaassignment.vala                    |    2 +
 vala/valaattribute.vala                     |    8 +
 vala/valaclass.vala                         |    6 +-
 vala/valacodecontext.vala                   |   13 +-
 vala/valacodewriter.vala                    |   20 +
 vala/valadelegatetype.vala                  |    2 +-
 vala/valagirparser.vala                     |   32 +-
 vala/valalambdaexpression.vala              |    3 +-
 vala/valamemberaccess.vala                  |    3 +-
 vala/valaobjectcreationexpression.vala      |    2 +-
 vala/valasourcefile.vala                    |   64 ++
 vala/valasymbol.vala                        |  109 +--
 vala/valausedattr.vala                      |    3 +-
 vala/valaversionattribute.vala              |  231 ++++
 vapi/Makefile.am                            |    2 +
 vapi/atk.vapi                               |  212 +++--
 vapi/atspi-2.vapi                           |   37 +-
 vapi/cairo-xcb.vapi                         |    2 +-
 vapi/clutter-1.0.vapi                       | 1554 +++++++++++++++++++++------
 vapi/clutter-gdk-1.0.vapi                   |    7 +
 vapi/clutter-gst-1.0.vapi                   |   10 +-
 vapi/clutter-gst-2.0.vapi                   |   11 +-
 vapi/clutter-gst-3.0.vapi                   |   57 +-
 vapi/clutter-gtk-1.0.vapi                   |    7 +-
 vapi/clutter-x11-1.0.vapi                   |   33 +-
 vapi/cogl-pango-1.0.vapi                    |   13 +-
 vapi/gconf-2.0.vapi                         |    2 +-
 vapi/gdk-2.0.vapi                           |  112 +-
 vapi/gdk-3.0.vapi                           |  503 ++++++++-
 vapi/gdk-pixbuf-2.0.vapi                    |   58 +-
 vapi/gdk-x11-2.0.vapi                       |    2 +-
 vapi/gdk-x11-3.0.vapi                       |  104 ++-
 vapi/gdl-3.0.vapi                           |   59 +-
 vapi/gedit-2.20.vapi                        |    2 +-
 vapi/gedit.vapi                             |   30 +-
 vapi/geocode-glib-1.0.vapi                  |    3 +-
 vapi/gio-2.0.vapi                           | 1198 +++++++++++++++++----
 vapi/gio-unix-2.0.vapi                      |    2 +-
 vapi/gio-windows-2.0.deps                   |    1 +
 vapi/gio-windows-2.0.vapi                   |   23 +
 vapi/glib-2.0.vapi                          |  623 +++++++++--
 vapi/gnome-keyring-1.vapi                   |    2 +-
 vapi/gobject-2.0.vapi                       | 1127 ++++++++++----------
 vapi/gobject-introspection-1.0.vapi         |    9 +
 vapi/goocanvas.vapi                         |    2 +-
 vapi/gstreamer-0.10.vapi                    |   46 +-
 vapi/gstreamer-1.0.vapi                     |  193 ++++-
 vapi/gstreamer-allocators-1.0.vapi          |    8 +
 vapi/gstreamer-app-1.0.vapi                 |    2 +
 vapi/gstreamer-audio-0.10.vapi              |    2 +-
 vapi/gstreamer-audio-1.0.vapi               |   13 +-
 vapi/gstreamer-base-0.10.vapi               |    8 +-
 vapi/gstreamer-base-1.0.vapi                |   35 +-
 vapi/gstreamer-check-1.0.vapi               |   15 +-
 vapi/gstreamer-controller-0.10.vapi         |    6 +-
 vapi/gstreamer-controller-1.0.vapi          |    6 +-
 vapi/gstreamer-net-1.0.vapi                 |    8 +
 vapi/gstreamer-pbutils-1.0.vapi             |   13 +-
 vapi/gstreamer-rtp-1.0.vapi                 |    6 +
 vapi/gstreamer-rtsp-1.0.vapi                |   21 +-
 vapi/gstreamer-sdp-1.0.vapi                 |   83 ++
 vapi/gstreamer-tag-1.0.vapi                 |    1 +
 vapi/gstreamer-video-1.0.vapi               |   52 +
 vapi/gtk+-2.0.vapi                          |  224 ++--
 vapi/gtk+-3.0.vapi                          |  850 ++++++++--------
 vapi/gtksourceview-3.0.vapi                 |  283 +++++-
 vapi/gudev-1.0.vapi                         |    4 +
 vapi/json-glib-1.0.vapi                     |   98 ++-
 vapi/libarchive.vapi                        |   28 +-
 vapi/libbonoboui-2.0.vapi                   |    2 +-
 vapi/libgda-4.0.vapi                        |    2 +-
 vapi/libgda-report-4.0.vapi                 |    2 +-
 vapi/libgdata.vapi                          |  947 +++++++++++++++-
 vapi/libglade-2.0.vapi                      |    2 +-
 vapi/libnotify.vapi                         |   16 +-
 vapi/libpanelapplet-2.0.vapi                |    2 +-
 vapi/libpeas-1.0.vapi                       |    9 +
 vapi/libpeas-gtk-1.0.vapi                   |    6 +-
 vapi/librsvg-2.0.vapi                       |   70 +-
 vapi/libsoup-2.2.vapi                       |    2 +-
 vapi/libsoup-2.4.vapi                       |  432 ++++++--
 vapi/libwnck-1.0.vapi                       |    2 +-
 vapi/libwnck-3.0.vapi                       |   83 ++-
 vapi/linux.vapi                             |    6 +-
 vapi/lua.vapi                               |    2 +-
 vapi/metadata/Atk-1.0-custom.vala           |   69 +-
 vapi/metadata/Clutter-1.0-custom.vala       |    4 +-
 vapi/metadata/Gdk-3.0-custom.vala           |   16 +-
 vapi/metadata/GdkPixbuf-2.0-custom.vala     |    4 +-
 vapi/metadata/GdkX11-3.0-custom.vala        |   56 +-
 vapi/metadata/Gio-2.0-custom.vala           |  306 +++---
 vapi/metadata/Gio-2.0.metadata              |    2 +
 vapi/metadata/GtkClutter-1.0-custom.vala    |    4 +-
 vapi/metadata/Mx-1.0-custom.vala            |   64 +-
 vapi/metadata/Pango-1.0-custom.vala         |   20 +-
 vapi/metadata/Rsvg-2.0-custom.vala          |   26 +-
 vapi/metadata/Soup-2.4-custom.vala          |   54 +-
 vapi/mx-1.0.vapi                            |  228 ++++-
 vapi/packagekit-glib2.vapi                  |  569 ++++++++++-
 vapi/packages/gdk-2.0/gdk-2.0-custom.vala   |   16 +-
 vapi/packages/gtk+-2.0/gtk+-2.0-custom.vala |  218 ++--
 vapi/packages/gtk+-3.0/gtk+-3.0-custom.vala |  226 ++--
 vapi/packages/gtk+-3.0/gtk+-3.0.gi          |   90 ++-
 vapi/packages/gtk+-3.0/gtk+-3.0.metadata    |  217 ++++-
 vapi/pango.vapi                             |  209 +++-
 vapi/pangocairo.vapi                        |   29 +-
 vapi/poppler-glib.vapi                      |  182 +++-
 vapi/posix.vapi                             |    2 +-
 vapi/rest-0.6.vapi                          |    4 +-
 vapi/rest-0.7.vapi                          |   10 +-
 vapi/rest-extras-0.7.vapi                   |    2 +-
 vapi/sqlite3.vapi                           |    2 +-
 vapi/udisks2.vapi                           |   41 +-
 vapi/vte-2.90.vapi                          |   70 ++
 vapi/vte.vapi                               |    2 +-
 vapi/webkit2gtk-4.0.vapi                    |  191 +++-
 vapi/webkit2gtk-web-extension-4.0.vapi      |  124 ++-
 vapi/xcb-icccm.vapi                         |    2 +-
 vapi/xcb.vapi                               |   14 +-
 vapigen/valagidlparser.vala                 |  116 +-
 134 files changed, 10023 insertions(+), 3241 deletions(-)
---
diff --cc codegen/valaccodebasemodule.vala
index 04cca4c,72aeed7..785a2d6
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@@ -459,18 -461,15 +459,14 @@@ public abstract class Vala.CCodeBaseMod
  
                gquark_type = new IntegerType ((Struct) glib_ns.scope.lookup ("Quark"));
                gvalue_type = (Struct) glib_ns.scope.lookup ("Value");
 -              gvariant_type = (Class) glib_ns.scope.lookup ("Variant");
                gsource_type = (Class) glib_ns.scope.lookup ("Source");
  
-               if (context.require_glib_version (2, 32)) {
-                       gmutex_type = (Struct) glib_ns.scope.lookup ("Mutex");
-                       grecmutex_type = (Struct) glib_ns.scope.lookup ("RecMutex");
-                       grwlock_type = (Struct) glib_ns.scope.lookup ("RWLock");
-                       gcond_type = (Struct) glib_ns.scope.lookup ("Cond");
+               gmutex_type = (Struct) glib_ns.scope.lookup ("Mutex");
+               grecmutex_type = (Struct) glib_ns.scope.lookup ("RecMutex");
+               grwlock_type = (Struct) glib_ns.scope.lookup ("RWLock");
+               gcond_type = (Struct) glib_ns.scope.lookup ("Cond");
  
-                       mutex_type = grecmutex_type;
-               } else {
-                       mutex_type = (Struct) glib_ns.scope.lookup ("StaticRecMutex");
-               }
+               mutex_type = grecmutex_type;
  
                type_module_type = (TypeSymbol) glib_ns.scope.lookup ("TypeModule");
  
diff --cc vala/valacodecontext.vala
index 628f71e,ddb9fdf..0ca1961
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@@ -493,81 -488,14 +498,87 @@@ public class Vala.CodeContext 
                }
  
                flow_analyzer.analyze (this);
+ 
+               if (report.get_errors () > 0) {
+                       return;
+               }
+ 
+               used_attr.check_unused (this);
        }
  
 +      public void load_plugins () {
 +              if (!Module.supported ()) {
 +                      return;
 +              }
 +
 +              if (plugin_directories != null) {
 +                      if (!experimental) {
 +                              Report.warning (null, "plugins are experimental and their API is unstable");
 +                      }
 +
 +                      foreach (string dir in plugin_directories) {
 +                              load_plugins_in_directory (dir);
 +                      }
 +              }
 +      }
 +
 +      public void load_plugins_in_directory (string dirname) {
 +              Dir dir;
 +              try {
 +                      dir = Dir.open (dirname, 0);
 +              } catch (Error e) {
 +                      return;
 +              }
 +              
 +              string? name = null;
 +
 +              while ((name = dir.read_name ()) != null) {
 +                      string path = Path.build_filename (dirname, name);
 +                      if (FileUtils.test (path, FileTest.IS_DIR)) {
 +                              continue;
 +                      }
 +                      if (!name.has_prefix ("valaplugin")) {
 +                              continue;
 +                      }
 +
 +                      var mod = Module.open (path, ModuleFlags.BIND_LOCAL);
 +
 +                      if (mod == null) {
 +                              if (verbose_mode) {
 +                                      stdout.printf ("Could not load module: %s\n", path);
 +                              }
 +                              continue;
 +                      } else {
 +                              if (verbose_mode) {
 +                                      stdout.printf ("Loaded module: %s\n", path);
 +                              }
 +                      }
 +
 +                      void* function;
 +                      if (!mod.symbol ("vala_plugin_register", out function) || function == null) {
 +                              if (verbose_mode) {
 +                                      stdout.printf ("Could not load entry point for module %s\n", path);
 +                              }
 +                              continue;
 +                      }
 +
 +                      unowned RegisterPluginFunction register_plugin = (RegisterPluginFunction) function;
 +                      register_plugin (this);
 +
 +                      mod.make_resident ();
 +              }
 +      }
 +
 +      /**
 +       * Set the given transformer as the head transformer
 +       */
 +      public void register_transformer (CodeTransformer transformer) {
 +              transformer.next = this.transformer;
 +              // Setting .head, will recursively set the head for the next transformers
 +              transformer.head = transformer;
 +              this.transformer = transformer;
 +      }
 +      
        public void add_define (string define) {
                defines.add (define);
        }
diff --cc vala/valalambdaexpression.vala
index 98e86e1,1d6f957..1723388
--- a/vala/valalambdaexpression.vala
+++ b/vala/valalambdaexpression.vala
@@@ -137,13 -137,12 +137,12 @@@ public class Vala.LambdaExpression : Ex
                method = new Method (get_lambda_name (context), return_type, source_reference);
                // track usage for flow analyzer
                method.used = true;
-               method.check_deprecated (source_reference);
-               method.check_experimental (source_reference);
+               method.version.check (source_reference);
  
 -              if (!cb.has_target || !context.analyzer.is_in_instance_method ()) {
 +              if (!cb.has_target || !context.analyzer.is_in_instance_method (this)) {
                        method.binding = MemberBinding.STATIC;
                } else {
 -                      var sym = context.analyzer.current_symbol;
 +                      var sym = context.analyzer.get_current_symbol (this);
                        while (method.this_parameter == null) {
                                if (sym is Property) {
                                        var prop = (Property) sym;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]