param: Don't crash when getting a prop on a non-introspectable property
util: Add a flag to gjs_parse_args to allow JS to pass ignored arguments

Because param_new_internal parses arguments in two steps, we need to make
it OK for JS to pass more arguments than the totla amount
util: Add a new format specifier to gjs_parse_args specifying a 64-bit integer
util: Add a new format specifier to gjs_parse_args specifying a boolean
GParamSpec: Use gjs_parse_args for parsing arguments

This removes a lot of the manual labor that needs to be done when
parsing arguments, and also generates nice exceptions for us instead
of confusing the user with a "JS_ExecuteScript() returned false but
no exception message?"
Update .gitignore

Ignore backup files as well as valgrind test logs
Add "system" module

There are three functions in here:

* addressOf: Extremely useful when debugging a gjs process with a
  native code debugger like GDB.  Add "print(imports.system.addressOf(foo))"
  for an object, then take the number it prints "12345" and paste into
  gdb like:
  p (JSObject*) 12345
* breakpoint: Wrapper for G_BREAKPOINT().  Insert a SIGTRAP which,
  if the process is under a debugger, causes a breakpoint.  Combines
  nicely with the above.
* gc: Forces a full garbage collection.

Based on a patch by Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=630412
Fix system module
lang: Introduce meta classes

Classes created with new Lang.Class are now first class objects
themselves, and Lang.Class is itself a Lang.Class (to the extent
permitted by JS). It is therefore possible to inherit from Lang.Class
and create custom python-like metaclasses, instances of which are
actual instantiable classes.
Don't copy boxed or struct types when passing them to a vfunc or callback

At times, we do not want to copy boxed or struct types when passing them
around - if we pass them to a virtual function or callback, the caller might
be expecting that we modify the structure.
function: Make GjsCallbackTrampoline public

https://bugzilla.gnome.org/show_bug.cgi?id=663492
function: Allow out parameters in callbacks and vfuncs

If a callback needs an out parameter or return value to work,
we need a way for vfunc implementation to take advantage of this.
The pattern:

If the callback takes a non-void return value and no out args:
  The callback should return the return value:
    return return_value;

If the callback takes no return value and has one out arg:
  The callback should return the one out arg:
    return out_arg_1;

If the callback takes no return value and has multiple out args:
  The callback should return an array containg the out args in sequence:
    return [out_arg_1, out_arg_2, ..., out_arg_N];

If the callback takes a non-void return value and has multiple out args:
  The callback should return an array containing first the return value,
  then the out args in sequence:
    return [return_value, out_arg_1, out_arg_2, ..., out_arg_N];

https://bugzilla.gnome.org/show_bug.cgi?id=663492
object: Remove useless "instance" section in resolve hook

All this section does is print some debug info or fatal out. Not necessary.
object: Unindent a large section of code in the resolve hook

Only a few lines of real code difference here -- just a large unindent
section.
Expose parent vfuncs on the parent prototype, prefixed with "vfunc_"

As an example, the implementation of ClutterActor::get_preferred_width
will be exposed as Clutter.Actor.prototype.vfunc_get_preferred_width.
We need this so that GObject subclasses can chain up when implementing
their own vfunc overrides.

The main big change here is that we now require the GType when using
gjs_define_function. This is because the implementation's GType may
not be the GICallableInfo's owner: ClutterRectangle has its own
get_preferred_width implementation, but since the vfunc isn't declared
in ClutterRectangleClass, introspection for ClutterRectangle doesn't
have a GIVFuncInfo. If a user created a ClutterRectangle subclass, in
order to chain up properly we need to expose
Clutter.Rectangle.prototype.vfunc_get_preferred_width.

https://bugzilla.gnome.org/show_bug.cgi?id=663492
object: Implement gobject inheritance

https://bugzilla.gnome.org/show_bug.cgi?id=663492
object: Throw an error if priv is NULL, giving a common reason

If you forget to chain up in your _init override, you can be left
staring at "JS_ExecuteScript() failed but no exception message?",
clueless as to what has gone wrong. Let's provide an exception
message that makes sense for the user.

https://bugzilla.gnome.org/show_bug.cgi?id=663492
object: Allow GObject subclasses to override parent vfuncs

Allow GObject subclasses to override parent vfuncs. We automatically hook up
such vfuncs if the name of the function is prefixed with "vfunc_".

Some of the code here related to finding the vfunc's implementor struct was
stolen from pygobject. Maybe it should go in libgirepository instead.

https://bugzilla.gnome.org/show_bug.cgi?id=663492
object: Support glib properties

To support installing custom properties, we must be able to have JS context and
JS object in set_property before even g_object_newv() returns. This is achieved
by using other internal construct properties that are set if the object is of a
custom type.

Use this so that we can implement a sane default implementation of
do_get_property/do_set_property that simply sets the corresponding field on the
JS object. Implementations that need more complex behavior can either use ES5
or Mozilla getters/setters, or implement their own override of do_get_property
and do_set_property.
Move GParamSpec registration together with the other infos

Instead of special casing it in ns_new_resolve(), now that it has
correctly a GType, we can handle it together with the other objects.
Also, check that the classes we define inherit from GObject, since
we assume that around the code.