Jean Privat [Fri, 3 Apr 2015 02:45:57 +0000 (09:45 +0700)]
modelbuilder: run_global_phases do nothing for an empty list of modules
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:45:21 +0000 (09:45 +0700)]
typing: do not rely on `MModule.object_type` that will fatal error
Instead get the standard `missing class` error and continue processing
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:35:54 +0000 (09:35 +0700)]
model: get_primitive_class filter classes by module
This make the analysis of distinct kernels possible (and robust)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:42:20 +0000 (09:42 +0700)]
typing: be more robust on missing/buggy information
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:44:12 +0000 (09:44 +0700)]
modelize_class: make the class-name-conflict a warning
as an error, it prevents temporary duplication of same classes
for development and experimentation.
One do not want to have an hard error in a file because a random file
in the same directory has issues.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 05:54:46 +0000 (12:54 +0700)]
modelize_property: invalidate information to avoid causing cascaded errors
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:40:36 +0000 (09:40 +0700)]
modelize_class: make various steps more robust if the previous steps failed
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:36:57 +0000 (09:36 +0700)]
modelbuilder: promote `get_mclass_by_name` from typing
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:34:36 +0000 (09:34 +0700)]
modelbuilder: resolve_mtype does not crash when the class is incomplete
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:34:01 +0000 (09:34 +0700)]
model: protect MClassDef.is_intro and provide MClass.try_intro
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:33:01 +0000 (09:33 +0700)]
loader: build_module_importation invalidates the mmodule on errors
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:32:04 +0000 (09:32 +0700)]
loader: the AModule.mmodule can be null if the mmodule is invalid
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 02:30:22 +0000 (09:30 +0700)]
various phases: more robust for keep-going
Entry point of most phases return gracefully in case of missing info.
Instead of crashing.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 05:30:46 +0000 (12:30 +0700)]
benchs/markdown: fix location of nitc
do not assume $PATH and make it modifiable
Signed-off-by: Jean Privat <jean@pryen.org>
BlackMinou [Wed, 1 Apr 2015 06:57:42 +0000 (08:57 +0200)]
Modify example to add a parametrized threaded fun
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
BlackMinou [Wed, 1 Apr 2015 06:57:27 +0000 (08:57 +0200)]
Add the support of parametrized functions for the threaded annotation
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
Jean Privat [Fri, 3 Apr 2015 01:28:33 +0000 (08:28 +0700)]
Merge: parser: add a basic sabblecc3 parser in Java
So one can more easily play and compare parsers.
Sometime, when I have issues with the parser, it helps to understand if it is nit-related, sablecc-related or grammar-relater.
Pull-Request: #1240
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Fri, 3 Apr 2015 01:27:33 +0000 (08:27 +0700)]
Merge: Unite app.nit metadata annotations common to Android and iOS
* Rename the annotation `java_package` to `app_namespace`.
* Move up `app_name`, `app_version` and `app_namespace` and their default values from the Android platform.
* Apply these annotations in iOS too.
* Use the annotations in Hello iOS.
Pull-Request: #1233
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Fri, 3 Apr 2015 01:27:25 +0000 (08:27 +0700)]
Merge: Updated bench scripts for strings
Updated the script for benching the variants of strings.
Some new variations for strings will follow in further PRs
Pull-Request: #1230
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 3 Apr 2015 01:11:49 +0000 (08:11 +0700)]
parser: add a basic sabblecc3 parser in Java
So one can more easily play and compare parsers.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 2 Apr 2015 16:54:08 +0000 (23:54 +0700)]
Merge: benches/markdown: add `pandoc` engine.
Here the result for 5 consecutive runs.
![image](https://cloud.githubusercontent.com/assets/583144/6013527/
3bc7acae-ab56-11e4-819a-
937b4550575e.png)
Pull-Request: #1136
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Thu, 2 Apr 2015 16:53:38 +0000 (23:53 +0700)]
Merge: Test compilation of OS X and iOS programs, on OS X
The results of the compilation of iOS apps by XCode are directories. This PR fix tests.sh to detect those directory and report them cleanly.
Also intro a script for running OS X specific tests.
Pull-Request: #1232
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Thu, 2 Apr 2015 16:53:11 +0000 (23:53 +0700)]
Merge: lib/standard/string: Added faster to_cstring method on FlatText.
Adds a service for quick cstring in `FlatTexts`, this is mainly to speedup some methods like `write_native`, which takes a cstring in input.
This just creates a new pointer to the same `char*` with an offset.
Since no copy is ever made, its use is highly discouraged in extern code or in cases other than ephemereal uses of the resulting `NativeString`.
Since it adds a new intern service, it cannot be used as is in the standard library as it will need a regeneration of c_src beforehand.
Pull-Request: #1231
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 31 Mar 2015 20:32:33 +0000 (16:32 -0400)]
lib/ios: add metadata annotations to "Hello iOS"
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 31 Mar 2015 19:26:05 +0000 (15:26 -0400)]
nitc: the iOS platform use app.nit annotations
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 31 Mar 2015 19:25:05 +0000 (15:25 -0400)]
lib & examples: update modules using the java_package annotation
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 2 Apr 2015 15:50:57 +0000 (11:50 -0400)]
nitc: move up the default values of a project from the android platform
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 31 Mar 2015 19:23:13 +0000 (15:23 -0400)]
nitc: extract common app.nit annotations from Android
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 31 Mar 2015 20:10:23 +0000 (16:10 -0400)]
model: intro `MModule::first_real_mmodule` to get the first non-fictive module
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Lucas Bajolet [Thu, 2 Apr 2015 14:24:00 +0000 (10:24 -0400)]
benchmarks/string: Added README
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Thu, 2 Apr 2015 04:10:22 +0000 (11:10 +0700)]
Merge: Improve loader
This PR improves the loader that can now accepts
* directories of projects: to load all modules of all projects (eg `contrib`)
* root directories of groups: to load all modules of the groups (eg `contrib/benitlux`).
Previously, this worked if there was no `src` subdirectory)
This works for tools that rely on full_parse (basically all tools except the engines).
~~~sh
$ ./test_test_phase ../lib -q
It works
I have 89 projects
I have 285 modules
I have 1038 classes
For 1366 definitions of classes
I have 7101 methods
For 9098 definitions of methods
~~~
Note that if any files has an error most tools will just stop.
Pull-Request: #1229
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 2 Apr 2015 04:10:08 +0000 (11:10 +0700)]
Merge: nitdoc: introduce Bootstrap components
The main objectif of this PR is to introduce a new module that abstracts Bootstrap component rendering (2d8ea6e).
Commit 63aab1e gives an example of how nitdoc will use these abstractions in the future PRs.
Also do some fixes and cleaning.
Pull-Request: #1174
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 2 Apr 2015 04:09:52 +0000 (11:09 +0700)]
Merge: Bench markdown --semi-global
Add a second nitmd engine compiled with --semi-global.
One can see that it helps to win against some java impl.
![](https://cloud.githubusercontent.com/assets/135828/6934753/
ffe2f672-d863-11e4-8961-
75b03e566da9.png)
Pull-Request: #1234
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Lucas Bajolet [Tue, 31 Mar 2015 17:44:17 +0000 (13:44 -0400)]
benchmarks/strings: Added Makefile for tests with default values.
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Lucas Bajolet [Tue, 31 Mar 2015 15:55:03 +0000 (11:55 -0400)]
benchmarks/string: Updated bench scripts for strings
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Alexandre Terrasa [Wed, 1 Apr 2015 14:25:34 +0000 (10:25 -0400)]
benches/markdown: add `pandoc` engine.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
BlackMinou [Wed, 1 Apr 2015 06:56:46 +0000 (08:56 +0200)]
Add documentation for the threaded annotation
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
Alexis Laferrière [Tue, 31 Mar 2015 17:58:29 +0000 (13:58 -0400)]
tests: add the testosx.sh script to run OSX and iOS specific tests
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 31 Mar 2015 17:37:28 +0000 (13:37 -0400)]
tests: add savs file for ios tests
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 31 Mar 2015 17:27:49 +0000 (13:27 -0400)]
tests: tests.sh detects directories before trying to execute them
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 30 Mar 2015 04:57:16 +0000 (11:57 +0700)]
loader: get_mgroup can be given the root directory or the src directory
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 04:41:38 +0000 (11:41 +0700)]
loader: get_mgroup search README in src first then in the root directory
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 04:39:08 +0000 (11:39 +0700)]
loader: parse_full look inside directories of projects
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Mon, 23 Feb 2015 17:02:12 +0000 (18:02 +0100)]
src/doc: uniformize name display
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Tue, 17 Feb 2015 19:59:05 +0000 (20:59 +0100)]
src/doc: migrate topmenu to new templates.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 23 Feb 2015 15:02:30 +0000 (16:02 +0100)]
src/doc: introduce bootstrap components abstraction.
This will be used to migrate templates in a cleaner version.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Lucas Bajolet [Tue, 31 Mar 2015 20:31:07 +0000 (16:31 -0400)]
lib/standard/string: Added faster cstring method on flatstring.
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Tue, 31 Mar 2015 06:00:24 +0000 (13:00 +0700)]
version 0.7.3
Jean Privat [Tue, 31 Mar 2015 03:49:23 +0000 (10:49 +0700)]
bench_markdown: add a new engine, nitmd-o that is nitmd + optimisations
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 31 Mar 2015 03:48:10 +0000 (10:48 +0700)]
bench_markdown: increase $s so that times are more meaningful
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 31 Mar 2015 03:22:05 +0000 (10:22 +0700)]
Merge: lib/std/union_find: make DisjointSet Cloneable
Just because I need it.
I'm still not sure about what is the best way to deal with the various copy-constructors and clone methods. I think the following make sense:
A copy constructor named `from` that takes, if possible a general classifier (like an interface). This named constructor may use `nosuper` to avoid the automatic invocation of the standard init method if this cause a useless complex initialization that will be throw away by the copy.
A direct copy `clone` than can just return `new SELFTYPE.from(self)`
The advantage is that for simple clone, the `clone` method do the job.
If one want to change the class but keep the data, then the `from` constructor can be used. Like `new HashSet.from([1,2,3])`
Pull-Request: #1226
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Tue, 31 Mar 2015 03:21:57 +0000 (10:21 +0700)]
Merge: Rewrite the coloration for properties and types.
This introduce a new colorer, `POSetGroupColorer` that colors elements introduced by the classes in a class-hierarchy.
The advantage of this new colorer is that it uses conflict graphs of classes to colorize elements.
By comparison, the previously used colorers work with conflict graphs of elements; that are therefore much larger.
An other advantage is that only the introductions of elements are needed by the colorer, so filling the information from the model is far more easier.
The construction of the poset of types is also removed.
Instead, subtyping tables are computed with a more standard way:
* target cast types are grouped by classes: a map class->types is created
* the map is colored: a table layout by class is computed
* for each live type, the table layout of the associated class is used to build the type table
Results are so good that most of the time of the coloring is removed.
For nitc/nitc/nit
Before:
user: 0m6.044s
total: 15096 MIr
do_property_coloring: 1420 MIr
do_type_coloring: 2600 MIr
After:
user: 0m5.608s (-7%)
total: 12800 MIr (-15%)
do_property_coloring: 452 MIr (-68%)
do_type_coloring: 895 MIr (-65%)
note that in the previous numbers, most of the time is done in the model to inherit or resolve things.
Pure coloring algorithm is now negligible:
conflict_graph: 34 MIr (<1% of the total Ir)
coloring: 60 MIr (<1% of the total Ir)
Unfortunately, with types the coloring can degenerate and produce big tables. If this is an issue, the options `--type-poset` use the previous coloring method for types
Pull-Request: #1215
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Tue, 31 Mar 2015 00:44:48 +0000 (07:44 +0700)]
Merge: Misc for lib
Litttle features and warning-fixes for the libs
Pull-Request: #1228
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Tue, 31 Mar 2015 00:44:42 +0000 (07:44 +0700)]
Merge: iOS support
Adds a target platform in the compiler which generates an XCode project for iOS applications.
Intro the `ios` projet to group services for iOS. It implements the callbacks expected by the iOS system for a basic graphical application. It also triggers compilation for the iOS platform.
Adds one example of a graphical application `hello_ios` and a very minimal test for the iOS platform.
This is still very much a work in progress, you will notice many TODO in the code. Here are some of the next features to implement:
* Extend support to all iOS devices, not only the iPhone in the simulator.
* Reorganize annotations for app.nit: app_name, package_name, and maybe organization_name.
* Add more services of the Cocoa touch library and rewrite the `hello_ios` app in Nit.
* Support assets and other game related features.
* Some cleanup of the generated XCode project files could be a good thing.
Pull-Request: #1227
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Jean Privat [Tue, 31 Mar 2015 00:44:35 +0000 (07:44 +0700)]
Merge: sepcomp: fixup trampoline with tagged primitive values
Thus fix --trampoline-call (and --link-boost)
Pull-Request: #1225
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Jean Privat [Tue, 31 Mar 2015 00:44:30 +0000 (07:44 +0700)]
Merge: Fix escape to c
close #1223
Pull-Request: #1224
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Jean Privat [Tue, 31 Mar 2015 00:44:23 +0000 (07:44 +0700)]
Merge: Fix warnings from clang on OS X
Pull-Request: #1222
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Jean Privat [Mon, 30 Mar 2015 13:01:05 +0000 (20:01 +0700)]
lib/template: migrate the example to new constructors
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 13:00:40 +0000 (20:00 +0700)]
lib/geometry: document ILine
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 12:51:15 +0000 (19:51 +0700)]
lib: move privileges.nit to its subdirectory
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 12:48:34 +0000 (19:48 +0700)]
lib/standard: document FileReader::from_fd
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 12:46:44 +0000 (19:46 +0700)]
lib/standard: factorize File*::close
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 12:37:44 +0000 (19:37 +0700)]
lib/standard: add Collection::not_empty
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 12:33:51 +0000 (19:33 +0700)]
lib/sorter: add `MapRead::keys_sorted_by_values` and the related comparator
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Sun, 29 Mar 2015 19:55:33 +0000 (15:55 -0400)]
tests: skip iOS tests on GNU/Linux
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sun, 29 Mar 2015 15:01:44 +0000 (11:01 -0400)]
lib/ios: add the simple hello_ios app
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 27 Mar 2015 22:41:28 +0000 (18:41 -0400)]
tests: add a very minimal test for the iOS platform
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 15 Jan 2015 16:03:52 +0000 (11:03 -0500)]
lib: intro the iOS library
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 27 Mar 2015 16:39:25 +0000 (12:39 -0400)]
nitc: support compiling for the iOS platform
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 28 Mar 2015 17:58:27 +0000 (13:58 -0400)]
nitc: `Toolchain` keeps the compiler as an attribute
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 30 Mar 2015 12:25:05 +0000 (19:25 +0700)]
lib/sorter: add `MapRead::values_sorted_by_key`
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 04:24:51 +0000 (11:24 +0700)]
test_phase: use parse_full
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 01:33:48 +0000 (08:33 +0700)]
semantize: handle the with statement
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 01:33:15 +0000 (08:33 +0700)]
parser: regenerate with the `with` statement
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Mar 2015 01:32:56 +0000 (08:32 +0700)]
grammar: new `with` statement
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Mar 2015 14:39:02 +0000 (21:39 +0700)]
lib/std/union_find: make DisjointSet Cloneable
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Mar 2015 09:10:30 +0000 (16:10 +0700)]
sepcomp: fixup trampoline with tagged primitive values
Signed-off-by: Jean Privat <jean@pryen.org>
BlackMinou [Thu, 26 Mar 2015 06:31:11 +0000 (07:31 +0100)]
examples : adds a little example using "threaded" annotation
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
BlackMinou [Thu, 26 Mar 2015 06:30:27 +0000 (07:30 +0100)]
Adds the parallelization_phase to the frontend execution
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
BlackMinou [Thu, 26 Mar 2015 06:30:14 +0000 (07:30 +0100)]
Introduce parallelization_phase to deal with the "threaded" annotation
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
Jean Privat [Sun, 29 Mar 2015 03:05:15 +0000 (10:05 +0700)]
tests: update sav/test_parser_args1.res for escape_to_c changes
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Mar 2015 01:59:01 +0000 (08:59 +0700)]
lib/string: escape_to_c uses 3 digits in the octal form \nn to avoid misinterpretation
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 29 Mar 2015 01:58:11 +0000 (08:58 +0700)]
lib/string: escape_to_c transforms `"\t"` to `"\\t"`
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 23 Mar 2015 08:33:19 +0000 (15:33 +0700)]
sepcomp: do not generate class tables for dead classes
exceptions are pimitive types and classes that have a `new` factory
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 28 Mar 2015 02:12:28 +0000 (09:12 +0700)]
sepcomp: use the new `POSetGroupColorer` to color types for tests
The previous coloring with a poset of types is still available trough `--type-poset`
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 28 Mar 2015 01:39:53 +0000 (08:39 +0700)]
Merge: Fast benches
Last week benches shows some failures on some options due to recent commits.
This PR add a `--fast --fast` option that test only `hello_world` so it could be used in continuous integration to test the various meaningful combination of compiling options.
Moreover, the script is simplified to be more simple to use and extends with new options or combination of options,
Pull-Request: #1217
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Sat, 28 Mar 2015 01:34:45 +0000 (08:34 +0700)]
Merge: Fast super strings
Superstrings, like "a{b}c", are managed in the AST as a special group of sub-expression nodes that are either literal string parts or standard expressions.
The previous example is basically `["a", b, "c"]`
Previously, the compilation of super-strings was direct: the values are grouped in an array and `to_s` is called on it.
So in fact `"a{b}c"` was compiled as `["a", b, "c"].to_s`.
This basic implementation is simple and correct. But it has some drawbacks:
* a new Array[Object] (and a NativeArray[Object]) is allocated each time the super-string is evaluated.
* all elements are to_s-ized in `Array::to_s`, even the literal parts.
* an additional NativeArray[String] is allocated in `Array:to_s` to do the fast concatenation.
Because of the numerous allocations, superstrings caused a lot of work to the GC.
This PR provides a better, but more complex implementation:
* instead of an Array[Object], a NativeArray[String] is directly build and a fast concatenation `native_to_s` is invoked.
* the allocated NativeArray is cached in a static variable so it can be reused in next evaluation.
* the literal string parts are stored in the native array as is, and only once just after the allocation of the native array.
Results for nitc/nitc/nitc:
before: 0m6.076s
after: 0m5.512s (-9% not bad!)
Pull-Request: #1219
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Sat, 28 Mar 2015 01:29:12 +0000 (08:29 +0700)]
Merge: lib/std/file: do not flush on each write
Flushing for each small element of an output made things too slow.
real (not user) time for nitc/nitc/nitc:
before: 0m7.373s
after: 0m5.901s (-20%)
Pull-Request: #1216
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Sat, 28 Mar 2015 01:26:29 +0000 (08:26 +0700)]
Merge: Some cleaning in vm files
This small PR creates a directory for all vm files and a unique entry point.
Signed-off-by: Julien Pagès <julien.projet@gmail.com>
Pull-Request: #1221
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 28 Mar 2015 01:23:37 +0000 (08:23 +0700)]
Merge: nitc: fix closing manifest writer, should fix bug on #1216
Pull-Request: #1220
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 28 Mar 2015 01:16:36 +0000 (08:16 +0700)]
tests: remove sav/nitg-e/error_needed_method_alt4.res since behavior is fixed
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Sat, 28 Mar 2015 00:29:20 +0000 (20:29 -0400)]
nitc: fix missing includes for getpid
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 28 Mar 2015 00:28:59 +0000 (20:28 -0400)]
lib: fix return value of the system method
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
BlackMinou [Thu, 26 Mar 2015 06:28:43 +0000 (07:28 +0100)]
pthreads: Adds "threadeed" annotation
Signed-off-by: BlackMinou <romain.chanoir@viacesi.fr>
Jean Privat [Tue, 24 Mar 2015 00:24:12 +0000 (07:24 +0700)]
Merge: Fix --no-union-attributes
--no-union-attributes was broken since the tagging of primitive. This PR fix it.
Pull-Request: #1218
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Jean Privat [Sat, 21 Mar 2015 15:41:06 +0000 (22:41 +0700)]
compiler: prefill the native array with the literal string parts
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 21 Mar 2015 15:40:01 +0000 (22:40 +0700)]
compiler: `ASuperstringExpr` store the native array in a static variable
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 21 Mar 2015 15:38:19 +0000 (22:38 +0700)]
compiler: compile ASuperstringExpr using `native_to_s`
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sat, 21 Mar 2015 15:35:50 +0000 (22:35 +0700)]
lib: introduce `NativeArray::native_to_s`
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Mon, 23 Mar 2015 18:03:12 +0000 (14:03 -0400)]
nitc: fix closing manifest writer when done for #1216
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>