<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gjs.git, branch ewlsh/fix-function-pointers</title>
<subtitle>gitlab.gnome.org: GNOME/gjs.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/'/>
<entry>
<title>Some really rough work on fixing function pointer support</title>
<updated>2021-08-07T05:27:14+00:00</updated>
<author>
<name>Evan Welsh</name>
<email>contact@evanwelsh.com</email>
</author>
<published>2021-08-07T05:27:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/commit/?id=8c585c9706b19c213682af9319789642cdcb15c6'/>
<id>8c585c9706b19c213682af9319789642cdcb15c6</id>
<content type='text'>
Not sure if we should go this route or wrap in a callback, I'd prefer
if we can go this route to avoid adding JS wrapping
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not sure if we should go this route or wrap in a callback, I'd prefer
if we can go this route to avoid adding JS wrapping
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'random-cleanups' into 'master'</title>
<updated>2021-08-01T23:22:11+00:00</updated>
<author>
<name>Philip Chimento</name>
<email>philip.chimento@gmail.com</email>
</author>
<published>2021-08-01T23:22:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/commit/?id=469b38f367ed9707f2c17a1bdeb810d9c193e462'/>
<id>469b38f367ed9707f2c17a1bdeb810d9c193e462</id>
<content type='text'>
Various cleanups

See merge request GNOME/gjs!624</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Various cleanups

See merge request GNOME/gjs!624</pre>
</div>
</content>
</entry>
<entry>
<title>object: Use vector for holding the list of wrapped objects</title>
<updated>2021-08-01T23:15:54+00:00</updated>
<author>
<name>Marco Trevisan (Treviño)</name>
<email>mail@3v1n0.net</email>
</author>
<published>2021-05-10T21:10:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/commit/?id=1aeed28a4ac6502a65cdb7f41cc0ee0ade44b1bc'/>
<id>1aeed28a4ac6502a65cdb7f41cc0ee0ade44b1bc</id>
<content type='text'>
There's no point to use a custom implementation of a double-linked list
to hold the list of ObjectInstances we've around, however while this can
be a fast option for adding/removing objects it's way slower during
iterating at garbage collection, and vector is always faster in such
operations when it comes when handling pointers [1].

As plus:
    - we avoid wasting memory for all the "next" pointers (doubled size)
    - we can remove elements using the swap-and-pop idiom (avoids resizes)
    - we resize the array forcing it to shrink at garbage collection
    - being a static member, we only waste once the space for the size

[1] https://github.com/3v1n0/stl-containers-benchmarks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no point to use a custom implementation of a double-linked list
to hold the list of ObjectInstances we've around, however while this can
be a fast option for adding/removing objects it's way slower during
iterating at garbage collection, and vector is always faster in such
operations when it comes when handling pointers [1].

As plus:
    - we avoid wasting memory for all the "next" pointers (doubled size)
    - we can remove elements using the swap-and-pop idiom (avoids resizes)
    - we resize the array forcing it to shrink at garbage collection
    - being a static member, we only waste once the space for the size

[1] https://github.com/3v1n0/stl-containers-benchmarks
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'closures-cleanup' into 'master'</title>
<updated>2021-08-01T23:01:45+00:00</updated>
<author>
<name>Philip Chimento</name>
<email>philip.chimento@gmail.com</email>
</author>
<published>2021-08-01T23:01:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/commit/?id=6eb088f634041d61ddab461f6728226f035f1ca6'/>
<id>6eb088f634041d61ddab461f6728226f035f1ca6</id>
<content type='text'>
closure (and trampoline): Reimplement to be a C++ class with custom heap allocator

See merge request GNOME/gjs!625</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closure (and trampoline): Reimplement to be a C++ class with custom heap allocator

See merge request GNOME/gjs!625</pre>
</div>
</content>
</entry>
<entry>
<title>context: Cleanup completed trampoline in context, as this is what they belong to</title>
<updated>2021-08-01T22:54:59+00:00</updated>
<author>
<name>Marco Trevisan (Treviño)</name>
<email>mail@3v1n0.net</email>
</author>
<published>2021-05-17T16:17:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/commit/?id=713ed60f719e2e11a20fd1508210b2195247d547'/>
<id>713ed60f719e2e11a20fd1508210b2195247d547</id>
<content type='text'>
We're currently keeping a list of trampolines in a static vector, this
is acceptable (at least for a single-context scenario), but trampolines are
bound to a specific context so better to move the handling in the context.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're currently keeping a list of trampolines in a static vector, this
is acceptable (at least for a single-context scenario), but trampolines are
bound to a specific context so better to move the handling in the context.
</pre>
</div>
</content>
</entry>
<entry>
<title>GjsMaybeOwned: Remove notifier support and move it into GjsPrivateContext</title>
<updated>2021-08-01T22:54:59+00:00</updated>
<author>
<name>Marco Trevisan (Treviño)</name>
<email>mail@3v1n0.net</email>
</author>
<published>2021-05-16T16:02:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/commit/?id=2fc0d36062c805aaa28a8e63763fafbe4d25cf75'/>
<id>2fc0d36062c805aaa28a8e63763fafbe4d25cf75</id>
<content type='text'>
GjsMaybeOwned had a notification support that was used only by Closures
(other than tests), this was causing adding an extra pointer to all
the types using it (including Object) that was mostly unused.

So, move this into private context, re-implementing it using our own
notifier (instead of relying on GObject's that needs a specific order) and
use it in closures.

Also add an hook to handle gc events on private context that will be in
later changes to cleanup more things, but for now is used to shrink the
closures vector once we've done.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GjsMaybeOwned had a notification support that was used only by Closures
(other than tests), this was causing adding an extra pointer to all
the types using it (including Object) that was mostly unused.

So, move this into private context, re-implementing it using our own
notifier (instead of relying on GObject's that needs a specific order) and
use it in closures.

Also add an hook to handle gc events on private context that will be in
later changes to cleanup more things, but for now is used to shrink the
closures vector once we've done.
</pre>
</div>
</content>
</entry>
<entry>
<title>function: Use minimal allocation for trampoline data</title>
<updated>2021-08-01T22:54:59+00:00</updated>
<author>
<name>Marco Trevisan (Treviño)</name>
<email>mail@3v1n0.net</email>
</author>
<published>2021-05-15T12:45:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/commit/?id=41a6fa9c8d2c7bc077ae9e43bbb369ea675b2983'/>
<id>41a6fa9c8d2c7bc077ae9e43bbb369ea675b2983</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>GjsCallBackTrampoline: Inherit from Gjs::Closure (and so GClosure)</title>
<updated>2021-08-01T22:54:59+00:00</updated>
<author>
<name>Marco Trevisan (Treviño)</name>
<email>mail@3v1n0.net</email>
</author>
<published>2021-05-14T23:55:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/commit/?id=53a6cca32243225e180a544db258b89853d624cf'/>
<id>53a6cca32243225e180a544db258b89853d624cf</id>
<content type='text'>
The callback trampoline is in fact a GClosure, but we were just composing
one. We can instead just inherit from it now, given that the
Gjs::Closure will allocate the needed memory via the closure allocator
and handle the references via native closure reference system (avoid to
duplicate that).

As per this, some less memory used as we save a pointer and the
reference counting.

The only bit we need to handle is the destruction as we need to be sure
to call the proper type destructor on closure finalization.
So, adding an utility function that ensures this happens for each type
and that we won't call the base destructor twice.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The callback trampoline is in fact a GClosure, but we were just composing
one. We can instead just inherit from it now, given that the
Gjs::Closure will allocate the needed memory via the closure allocator
and handle the references via native closure reference system (avoid to
duplicate that).

As per this, some less memory used as we save a pointer and the
reference counting.

The only bit we need to handle is the destruction as we need to be sure
to call the proper type destructor on closure finalization.
So, adding an utility function that ensures this happens for each type
and that we won't call the base destructor twice.
</pre>
</div>
</content>
</entry>
<entry>
<title>closure: Reimplement to be a C++ class with custom heap allocator</title>
<updated>2021-08-01T22:54:59+00:00</updated>
<author>
<name>Marco Trevisan (Treviño)</name>
<email>mail@3v1n0.net</email>
</author>
<published>2021-05-14T01:18:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/commit/?id=189cd4b7a0f223e2259934e77bb2c1959530989a'/>
<id>189cd4b7a0f223e2259934e77bb2c1959530989a</id>
<content type='text'>
To create closures we used to create an internal closure structure that
for which we were handling construction and destruction manually.

C++ allows us to use some nicer features though, and we can take
advantage of them once we leave the role of allocating and deallocating
the memory to GClosure functions.

This can be nicely done overriding the new and delete operators that
will give us the size to allocate exactly as the closure creator
function expects to receive.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To create closures we used to create an internal closure structure that
for which we were handling construction and destruction manually.

C++ allows us to use some nicer features though, and we can take
advantage of them once we leave the role of allocating and deallocating
the memory to GClosure functions.

This can be nicely done overriding the new and delete operators that
will give us the size to allocate exactly as the closure creator
function expects to receive.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'documentation' into 'master'</title>
<updated>2021-08-01T22:01:44+00:00</updated>
<author>
<name>Philip Chimento</name>
<email>philip.chimento@gmail.com</email>
</author>
<published>2021-08-01T22:01:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gjs.git/commit/?id=a37e5e0585976cbf90d26cb8254356dc9ffbf27e'/>
<id>a37e5e0585976cbf90d26cb8254356dc9ffbf27e</id>
<content type='text'>
Add Internship Getting Started documentation

See merge request GNOME/gjs!645</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add Internship Getting Started documentation

See merge request GNOME/gjs!645</pre>
</div>
</content>
</entry>
</feed>
