Jean Privat [Thu, 3 Dec 2015 20:59:29 +0000 (15:59 -0500)]
Merge: Stringify Bytes
This PR adds some String-like functions to Bytes, along with an abstraction for Byte-based patterns.
Also, a bug was found within `Bytes::is_empty` and `FlatText` is now public since there was no real rationale to keep it private
Pull-Request: #1860
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 3 Dec 2015 20:59:26 +0000 (15:59 -0500)]
Merge: new core datastructure: CircularArray
`lib/core` is extended with CircularArray for an array with efficient push/pop/shift/unshift
Some number with bench_seq. I used valgrind with n=1000
push (Ir/call)
* list: 383
* unrolled list: 188
* circular array: 135
* array: 85
pop
* unroll: 180
* list: 79
* array: 66
* circ: 47
unshift
* array: 31,755 (because memmove)
* list: 385
* unroll: 322
* circ: 127
shift
* array: 36,168 (because memmove)
* unroll: 180
* list: 79
* circ: 50
insert:
* circ: 179,811 (because manual copy item by item)
* array: 27,282
* unroll: 12,235
* list: 11,500
Pull-Request: #1875
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean-Philippe Caissy <jpcaissy@piji.ca>
Jean Privat [Thu, 3 Dec 2015 20:59:23 +0000 (15:59 -0500)]
Merge: Nitiwiki: fix isues with relative paths and the root href
close #1872
Can you try it @Morriar ?
Pull-Request: #1874
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 3 Dec 2015 19:57:09 +0000 (14:57 -0500)]
src/astvalidation: use a CircularArray instead of an Array
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 3 Dec 2015 19:29:21 +0000 (14:29 -0500)]
tests: extends test_seq and bench_seq with CircularArray
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 3 Dec 2015 19:27:06 +0000 (14:27 -0500)]
core: add circular_array
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 3 Dec 2015 02:10:20 +0000 (21:10 -0500)]
nitiwiki/examples: update templates
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 3 Dec 2015 02:09:44 +0000 (21:09 -0500)]
nitiwiki: add root_href if the wiki need it
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 3 Dec 2015 02:08:24 +0000 (21:08 -0500)]
nitiwiki: add a dhref helper function
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 3 Dec 2015 19:20:48 +0000 (14:20 -0500)]
Merge: Small perf improvments of array
Factorize and improve some code related to the Array (and fix a bug)
A NativeArray::memmove method is also added, but without an intern implementation for boostrap reason.
The improvement should mainly concern client of `shift`, `unshift` and `insert` (not that many in fact).
Using the new test bench_seq (with only the array and an argument of 5000)
Before: 0m1.828s
After: 0m0.292s (-84%)
Pull-Request: #1871
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Wed, 2 Dec 2015 20:30:02 +0000 (15:30 -0500)]
tests: update sav/test_new_native_alt1.res because line change in array
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 2 Dec 2015 19:09:15 +0000 (14:09 -0500)]
tests: add bench_seq
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 1 Dec 2015 20:36:38 +0000 (15:36 -0500)]
core/array: provide a better implementation of `copy_to` (not native yet)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 2 Dec 2015 19:25:12 +0000 (14:25 -0500)]
Merge: core/list: add length as attribute
this should have been done a long time ago
Pull-Request: #1870
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Wed, 2 Dec 2015 18:22:42 +0000 (13:22 -0500)]
core/array: fix implementation of naive copy_to to avoid overwriting
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 2 Dec 2015 00:53:30 +0000 (19:53 -0500)]
core/list: add length as attribute
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 1 Dec 2015 20:15:01 +0000 (15:15 -0500)]
core/array: use `copy_to` to factorize some code
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 1 Dec 2015 14:07:35 +0000 (09:07 -0500)]
Merge: Adds a module for logging requests
Title pretty much says it all
Pull-Request: #1869
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Mon, 30 Nov 2015 18:39:36 +0000 (13:39 -0500)]
Merge: Modelize check visibility
Forces modelize to check that the return types of methods are legal with regard to visibility.
Also fixes some code where such issues occur.
Pull-Request: #1862
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 30 Nov 2015 16:42:16 +0000 (11:42 -0500)]
android: make native audio_manager access private
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Nov 2015 01:24:52 +0000 (20:24 -0500)]
tests: update sav because changes in visibility
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Nov 2015 01:17:20 +0000 (20:17 -0500)]
tests: improve base_prot_sig
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Nov 2015 00:49:54 +0000 (19:49 -0500)]
modelize: always check visibility of return types
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Nov 2015 01:14:08 +0000 (20:14 -0500)]
src/rta: import csv publicly.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Nov 2015 01:13:35 +0000 (20:13 -0500)]
nitc/ffi: make private some top-level methods
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Nov 2015 01:12:56 +0000 (20:12 -0500)]
core/text: Text::substrings is private
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Nov 2015 01:12:30 +0000 (20:12 -0500)]
core: remove useless return types
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Nov 2015 15:12:00 +0000 (10:12 -0500)]
Merge: mongodb: allow client to set `skip` and `limit` when calling `find`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #1868
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Nov 2015 15:09:24 +0000 (10:09 -0500)]
Merge: github: save Github events ids.
Save event IDs so the future loader will know it will not have to process it again.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #1867
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Nov 2015 15:09:20 +0000 (10:09 -0500)]
Merge: mongo: fixes more crashes from mongodb api
This PR add two more fixes since #1855 :
* use `FinalizableOnce` instead of `Finalizable`
* copy bson structs returned by `mongoc_cursor_item`
Pull-Request: #1866
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>
Jean Privat [Mon, 30 Nov 2015 15:09:14 +0000 (10:09 -0500)]
Merge: Benitlux: fix separator between beers name and description
Pull-Request: #1861
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Nov 2015 15:09:08 +0000 (10:09 -0500)]
Merge: console: add simple progress bar that refreshes itself
Example:
~~~nit
import console
var pb = new TermProgress(10, 0)
for i in [1..10] do
pb.update(i)
end
~~~
Will display something like:
~~~sh
20% [==========================> ]
~~~
See documentation for more info about the progress bar.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #1859
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Nov 2015 15:09:05 +0000 (10:09 -0500)]
Merge: Add error instead of segfault on gethostbyname fail
Signed-off-by: Philippe Pepos Petitclerc <ppeposp@gmail.com>
Pull-Request: #1857
Reviewed-by: Jean-Philippe Caissy <jpcaissy@piji.ca>
Reviewed-by: Jean Privat <jean@pryen.org>
BlackMinou [Sun, 29 Nov 2015 23:06:34 +0000 (18:06 -0500)]
Adds a module for logging requests
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
Alexandre Terrasa [Sun, 29 Nov 2015 22:42:30 +0000 (17:42 -0500)]
mongodb: fix iterator crashes
Before this PR, the iterator `is_ok` status relied on `mongoc_cursor_more` that can return
true even if the iterator is terminated.
This PR fixes the problem by using the result of `mongoc_cursor_next` instead.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 29 Nov 2015 20:44:14 +0000 (15:44 -0500)]
mongodb: allow client to set `skip` and `limit` when calling `find`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 29 Nov 2015 20:35:14 +0000 (15:35 -0500)]
mongodb: fixes crash when the return of `mongoc_cursor_current` was freed
As explained by the documentation (that I should have read more thoroughly...),
`bson_t` structures allocated by the `mongoc_cursor_current` function should not be freed by the user.
Before this commit, the `bson_t` returned by `mongoc_cursor_current` where left as this then freed
by the nit GC.
This commit makes the `current` method to return a copy of the `bson_t` struct so
it can be freed safely by the GC later.
And... this is why I fear and hate the C programming language... :)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 29 Nov 2015 09:00:18 +0000 (04:00 -0500)]
github: save Github events ids.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sun, 29 Nov 2015 03:32:57 +0000 (22:32 -0500)]
mongodb: use FinalizableOnce instead of Finalizable
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Lucas Bajolet [Sun, 29 Nov 2015 02:09:27 +0000 (21:09 -0500)]
lib/core: Added `join_bytes` top-level function to join an array of `Bytes`
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Sun, 29 Nov 2015 00:46:56 +0000 (19:46 -0500)]
lib/core: Make FlatText public
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Sat, 28 Nov 2015 23:57:31 +0000 (18:57 -0500)]
lib/core: Stringify lib/bytes
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Alexandre Terrasa [Sun, 29 Nov 2015 00:08:04 +0000 (19:08 -0500)]
console: add simple progress bar that refresh itself
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Sat, 28 Nov 2015 23:04:11 +0000 (18:04 -0500)]
Merge: github/api: avoid crashes with unparsable responses
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #1856
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 28 Nov 2015 23:04:09 +0000 (18:04 -0500)]
Merge: mongodb: pin non-native instances to avoid GC crashes
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #1855
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 28 Nov 2015 23:04:07 +0000 (18:04 -0500)]
Merge: nitiwiki: fix multiple trails
Fix a bug where independent trails could have been merged into a big one.
Pull-Request: #1854
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Philippe Pepos Petitclerc [Sat, 28 Nov 2015 22:58:32 +0000 (17:58 -0500)]
Add error instead of segfault on gethostbyname fail
Signed-off-by: Philippe Pepos Petitclerc <ppeposp@gmail.com>
Alexandre Terrasa [Sat, 28 Nov 2015 21:50:46 +0000 (16:50 -0500)]
github/api: avoid crashes with unparsable responses
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Sat, 28 Nov 2015 21:50:18 +0000 (16:50 -0500)]
mongodb: pin non-native instances to avoid GC crashes
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Sat, 28 Nov 2015 21:11:24 +0000 (16:11 -0500)]
nitiwiki: extends example with a second independent trail
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 28 Nov 2015 21:10:35 +0000 (16:10 -0500)]
nitiwiki: fix a bug where multiple independent trails could have been merged
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 28 Nov 2015 20:08:25 +0000 (15:08 -0500)]
Merge: nitrpg: misc fixes
Many fixes for NitRPG in prepatation for the next PR wich introduces the use of MongoDB.
Pull-Request: #1761
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Alexandre Terrasa [Mon, 10 Aug 2015 22:24:18 +0000 (18:24 -0400)]
nitrpg: fix PlayerXCommits achievement trigger
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 25 Jun 2015 02:39:46 +0000 (22:39 -0400)]
nitrpg: events and achievements have owners
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 25 Jun 2015 02:38:24 +0000 (22:38 -0400)]
nitrpg: better organization for stats objects
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Thu, 25 Jun 2015 02:37:22 +0000 (22:37 -0400)]
nitrpg: use names as keys
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Sat, 28 Nov 2015 17:14:51 +0000 (12:14 -0500)]
Merge: Simple threadpool implementation
A really basic implementation of a threadpool, using an array as queue for now.
Pull-Request: #1848
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Sat, 28 Nov 2015 16:58:08 +0000 (11:58 -0500)]
lib/core/bytes: Fixed broken `is_empty`
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
BlackMinou [Fri, 27 Nov 2015 20:57:45 +0000 (15:57 -0500)]
Skipping threadpool_example
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
BlackMinou [Tue, 24 Nov 2015 16:01:15 +0000 (11:01 -0500)]
simple threadpool implementation
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
Jean Privat [Sat, 28 Nov 2015 14:13:02 +0000 (09:13 -0500)]
Merge: Bytes update
Various updates to `Bytes`, added a new escaping method taking into account \u and \x escape sequences
Also added a add_char method to `Bytes` for convenience.
`to_bytes` in Text now has an optional length parameter for those who wish not to rely on `cstring_length` (or did not want to pay the cost) for the length in bytes.
Pull-Request: #1850
Reviewed-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Fri, 27 Nov 2015 13:47:25 +0000 (08:47 -0500)]
contrib/benitlux_daily: use only "- " to separate the name from the description
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 27 Nov 2015 13:46:14 +0000 (08:46 -0500)]
contrib/benitlux_daily: add verbose option for debug
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Lucas Bajolet [Fri, 27 Nov 2015 16:10:49 +0000 (11:10 -0500)]
lib/core: Added escaping method to Bytes for use in compiler
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Fri, 27 Nov 2015 21:00:31 +0000 (16:00 -0500)]
Merge: Prefix grammar
Update of the grammar to support the enhancement of literal strings and chars via prefixes (see issue #1734)
Pull-Request: #1851
Reviewed-by: Jean Privat <jean@pryen.org>
Lucas Bajolet [Fri, 27 Nov 2015 16:07:10 +0000 (11:07 -0500)]
lib/core: Added copy method `to_bytes_with_copy` in Text
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Fri, 27 Nov 2015 16:06:29 +0000 (11:06 -0500)]
lib/core: Added `add_char` method to `Bytes`
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Fri, 27 Nov 2015 16:54:14 +0000 (11:54 -0500)]
lib/markdown: Fixed spacing issue in which a `then` was mistaken for a suffix
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Fri, 27 Nov 2015 16:15:58 +0000 (11:15 -0500)]
parser: Regenerated tables for previous commit
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Fri, 27 Nov 2015 16:15:39 +0000 (11:15 -0500)]
parser: Updated grammar to support prefixed and suffixed `String` and `Char`
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Thu, 26 Nov 2015 18:52:33 +0000 (13:52 -0500)]
Merge: nitrpg: update the userscript to the new github layout and fix todos
Basically a rewrite, but it works on my computer
Pull-Request: #1849
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Thu, 26 Nov 2015 18:52:31 +0000 (13:52 -0500)]
Merge: svg_to_icons: add an option to generate icons with different names
Pull-Request: #1847
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Nov 2015 18:52:29 +0000 (13:52 -0500)]
Merge: Improve the doc of `CurlHTTPRequest`
This is still far from an ideal doc but its better than nothing.
This doc will be useful for #1845.
Pull-Request: #1846
Reviewed-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Wed, 25 Nov 2015 20:22:25 +0000 (15:22 -0500)]
lib/neo4j: fix conflict on `data` in custom implementations of post requests
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Wed, 25 Nov 2015 19:48:31 +0000 (14:48 -0500)]
nitrpg: update the userscript to the new github layout and fix todos
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 25 Nov 2015 19:22:51 +0000 (14:22 -0500)]
Merge: model: fix `try_get_primitive_method`
The implementation was an old code that did not use modern facilities,
moreover it was broken anyway.
Reported-by: Lucas Bajolet <r4pass@hotmail.com>
Pull-Request: #1844
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>
Alexis Laferrière [Wed, 25 Nov 2015 18:58:50 +0000 (13:58 -0500)]
lib/curl: better doc for `CurlHTTPRequest`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 25 Nov 2015 18:29:30 +0000 (13:29 -0500)]
lib/curl: `CurlHTTPRequest::datas` to `data`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Wed, 25 Nov 2015 16:50:04 +0000 (11:50 -0500)]
model: fix `try_get_primitive_method`
The implementation was an old code that did not use modern facilities,
moreover it was broken anyway.
Reported-by: Lucas Bajolet <r4pass@hotmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Sun, 22 Nov 2015 22:52:25 +0000 (17:52 -0500)]
contrib/inkscape_tools: add option to generate icons with different names
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 23 Nov 2015 20:57:53 +0000 (15:57 -0500)]
Merge: Tests: cleanup old_style_init in some tests
In preparation of a future PR on constructors (cf. #1800), this is a simple cleanup (and bugfix) of some tests.
Pull-Request: #1842
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>
Jean Privat [Mon, 23 Nov 2015 18:37:43 +0000 (13:37 -0500)]
tests: update init in (de)serialization
also fix bug where `n` was not correctly set (new constructors powa!)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 23 Nov 2015 16:30:44 +0000 (11:30 -0500)]
tests: remove some old_style_init
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 23 Nov 2015 16:30:06 +0000 (11:30 -0500)]
tests: remove deprecated test base_attr_def
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 23 Nov 2015 14:27:03 +0000 (09:27 -0500)]
Merge: Jwrapper: Fix bug with nested classes
Fixes the nested classes bug in jwrapper.
Splits JNI full name and java full name.
Generated comments use JNI full name.
Pull-Request: #1841
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Frédéric Vachon [Sun, 22 Nov 2015 02:42:47 +0000 (21:42 -0500)]
Rename JavaClass package_name to full_java_name
Signed-off-by: Frédéric Vachon <fredvac@gmail.com>
Frédéric Vachon [Wed, 18 Nov 2015 21:44:40 +0000 (16:44 -0500)]
Use JNI full name in generated comments
Signed-off-by: Frédéric Vachon <fredvac@gmail.com>
Jean Privat [Fri, 20 Nov 2015 13:41:46 +0000 (08:41 -0500)]
Merge: Performance fix for comparison in FlatString
As reported in #1838, a lot of unnecessary unboxings were done when comparing bytes in FlatString, this should be fixed by short-cutting the access to the bytes of a FlatString via `_items`.
Also while I was at it, the operation is now optimized when working on any `FlatText`
Pull-Request: #1840
Reviewed-by: Jean Privat <jean@pryen.org>
Lucas Bajolet [Thu, 19 Nov 2015 19:01:24 +0000 (14:01 -0500)]
tests: Update sav for stats test
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Tue, 17 Nov 2015 21:05:43 +0000 (16:05 -0500)]
lib/core: Allow comparison operators to work on any subclass of FlatText
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Tue, 17 Nov 2015 21:05:14 +0000 (16:05 -0500)]
lib/core: Perfize < for FlatString which caused a lot of unneccessary boxings
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Frédéric Vachon [Wed, 18 Nov 2015 21:38:36 +0000 (16:38 -0500)]
Splits JNI and Java full name
Signed-off-by: Frédéric Vachon <fredvac@gmail.com>
Jean Privat [Wed, 18 Nov 2015 18:42:07 +0000 (13:42 -0500)]
Merge: android: use the Android Java API to load pixel data instead of libpng
Use the Android Java API to load and decompress image files, and remove the old use of a local copy of libpng. This new system is much more simple, produces smaller APK files (~30% smaller) and supports more image formats, including jpeg. It relies on the Java FFI to access the API and the C FFI to move pixels around.
Pull-Request: #1835
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Alexis Laferrière [Wed, 18 Nov 2015 15:59:20 +0000 (10:59 -0500)]
lib/c: rename memmove to move
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Wed, 18 Nov 2015 14:03:10 +0000 (09:03 -0500)]
Merge: Clean up constructors in core/text
Remove useless named init when automatic-constructor are sufficient, and remove old_style_init when named init are sufficient.
This lib cleanup is part of an ongoing cleanup of constructors, see #1800
Pull-Request: #1839
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Wed, 18 Nov 2015 14:03:06 +0000 (09:03 -0500)]
Merge: tests: add test_sort_perf.nit
This test illustrate a current issue with string comparisons.
On my machine, a valgrind of it gives 80+% on BOX_Byte.
Pull-Request: #1838
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Wed, 18 Nov 2015 14:03:01 +0000 (09:03 -0500)]
Merge: libevent & nitcorn: close connections on error and implement callbacks in Nit
This PR moves the implementation of libevent callbacks from C to Nit to enable specialization and refinements of the callbacks, it should help for #1803. Also the event callback closes the connection on the Nit side on errors so servers do not attempt to write on broken connections, it should fix the current crash on http://xymus.net/ with Tnitter clients.
Also update the only user of `read_callback_native` for the new API. And seize this opportunity to rename the module, replace class refinement with specialization, clean up the doc and optimize a bit how it handle strings.
Pull-Request: #1836
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 17 Nov 2015 18:51:01 +0000 (13:51 -0500)]
core/ropes: remove old_style_init, use only named init (not ideal but better)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 17 Nov 2015 18:50:12 +0000 (13:50 -0500)]
core/flat: remove named init `with_pos` and use auto-constructor
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Tue, 17 Nov 2015 18:29:04 +0000 (13:29 -0500)]
lib/mnit: pad loaded images to the closest power of 2 on Android
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>