Jean Privat [Thu, 2 Aug 2012 01:39:04 +0000 (21:39 -0400)]
tests: recognize a nonstart #alt as a #!alt
this will helps to transition to alterner.pl
#alt1# in front will be activated on the alternative
something followed by #alt1# will be killed
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 2 Aug 2012 02:18:41 +0000 (22:18 -0400)]
tests: add fail soso
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 2 Aug 2012 02:11:50 +0000 (22:11 -0400)]
mmbuilder: add missing "error" in an error message
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 15 Jul 2012 19:22:59 +0000 (15:22 -0400)]
Merge remote-tracking branch 'origin/pu/closure'
Jean Privat [Tue, 3 Jul 2012 17:25:51 +0000 (13:25 -0400)]
niti: add closures
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 3 Jul 2012 17:24:43 +0000 (13:24 -0400)]
niti: expressions are escapable
Evaluating an expression return null if there is an escape.
Each caller should then accept or propagate the escaping.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 3 Jul 2012 16:51:31 +0000 (12:51 -0400)]
niti: returnmark indicates a Frame
This allow to escape more than one method.
It is necessary for closures.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 3 Jul 2012 16:46:53 +0000 (12:46 -0400)]
model: add basic closures
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 24 May 2012 14:02:16 +0000 (10:02 -0400)]
model: add for on maps
workaround implementation waiting for closures.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 24 May 2012 13:37:35 +0000 (09:37 -0400)]
nit: add native NativeString::system
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 24 May 2012 13:36:57 +0000 (09:36 -0400)]
nit: add intern Int::rand
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 24 Jun 2012 20:50:28 +0000 (16:50 -0400)]
Merge branch 'parser' into wip
Jean Privat [Sun, 24 Jun 2012 18:24:03 +0000 (14:24 -0400)]
parser: tokens are not constructed with their texts
text is made lazy and computed by Location.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 24 Jun 2012 18:22:09 +0000 (14:22 -0400)]
parser: add Location::text
Jean Privat [Sun, 24 Jun 2012 17:15:22 +0000 (13:15 -0400)]
parser: guard loops in ComputeProdLocationVisitor
Most of the time, _need arrays are empty.
So, add 'if' to do the work only if there is work to do.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 24 Jun 2012 17:11:19 +0000 (13:11 -0400)]
parser: get the state number only once per state
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 18 Jun 2012 21:30:09 +0000 (17:30 -0400)]
Merge branch 'boehm' into wip
Jean Privat [Fri, 15 Jun 2012 17:18:22 +0000 (13:18 -0400)]
gc: gccx enable boehm by default
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 15 Jun 2012 17:15:57 +0000 (13:15 -0400)]
gc: default is always nitgc
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 15 Jun 2012 17:17:10 +0000 (13:17 -0400)]
gc: in gccx, -lgc must appears after objects
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 15 Jun 2012 14:28:44 +0000 (10:28 -0400)]
Merge branch 'alexandre/typo-in-nit-reference' into wip
Alexandre Terrasa [Wed, 13 Jun 2012 14:14:16 +0000 (10:14 -0400)]
doc: Typo in Nit Reference
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Jean Privat [Fri, 8 Jun 2012 00:30:23 +0000 (20:30 -0400)]
Merge branch 'alexis/ni-fixes' into wip
Alexis Laferrière [Sat, 24 Mar 2012 23:12:05 +0000 (19:12 -0400)]
nits: execute only if module is really hybrid
It can now be called on a set of modules without creating useless files.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 6 Jun 2012 04:01:28 +0000 (00:01 -0400)]
nits: cleans up the generated stub implementation function for easier diffs
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 6 Jun 2012 03:58:23 +0000 (23:58 -0400)]
nits: corrects the #endif position to the bottom of the generated header
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 6 Jun 2012 21:48:38 +0000 (17:48 -0400)]
tests: adds test for ni optimizations
Makes sure even the optimized extern methods are valid.
In this test borth methods are optimized but still uses what
is legal.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 27 Apr 2012 17:27:00 +0000 (13:27 -0400)]
ni: cleans up code repetition in native interface and improves performance
The code clean up uses trasitionnal variables (NiVariable) to simplyfy the
concept of variable transitionning from C to Nit and Nit to C. It allows
code factorisation and cleaner algorithms.
An extern method without explicit callback and not returning a complexe Nit
object cannot legally use any references. Knowing this, we do not generate
full local references for the arguments of such methods. This avoids to call
malloc and free on unused data structure and greatly reduces overhead for
simple extern methods.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Thu, 10 May 2012 14:47:11 +0000 (10:47 -0400)]
model: new class MParameter
replace the attributes MSignature::parameter_names and
MSignature::parameter_mtypes by a single MSignature::mparameters
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 10 May 2012 14:34:02 +0000 (10:34 -0400)]
model: remove old Closure stubs
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 10 May 2012 11:02:21 +0000 (07:02 -0400)]
modelbuilder: new method ASignature::visit_signature
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 30 May 2012 16:39:41 +0000 (12:39 -0400)]
Merge branch 'clean-c' into wip
Jean Privat [Wed, 30 May 2012 16:39:32 +0000 (12:39 -0400)]
Merge branch 'syntastic' into wip
Alexis Laferrière [Wed, 30 May 2012 13:42:02 +0000 (09:42 -0400)]
misc: removes debug output from syntastic Nit syntax checker script
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Wed, 30 May 2012 11:26:31 +0000 (07:26 -0400)]
compile: do not use true and false C constants.
It simplifies generated code and will allow latter to drop the bool type
in nit_common.h
Defining "bool", "true", and "false" can cause collision with some C
libraries (and is not compatible with C++ for those that care).
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 30 May 2012 11:20:26 +0000 (07:20 -0400)]
lib: do not mix declaration and code in external C code
It is refused by pedantic C90 C compilers.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 30 May 2012 09:47:36 +0000 (05:47 -0400)]
compile: no not declare static stings in the header
Such declarations are also not standard and are rejected by pedantic
compilers.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 30 May 2012 02:51:10 +0000 (22:51 -0400)]
vim: install syntastic file directly inside the vim directory
No manual installation of the file is then required thanks to pathogen.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 30 May 2012 02:47:57 +0000 (22:47 -0400)]
vim: README explain how to install nit for vim
We officially rely on pathogen that is great and simpler.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 30 May 2012 02:14:42 +0000 (22:14 -0400)]
vim: move the function-once test before stuffs
This remove the error in vim about existing functions when a second nit
file is loaded.
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Tue, 29 May 2012 18:27:29 +0000 (14:27 -0400)]
misc: handles all error types in syntastic Nit syntax checker
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 29 May 2012 18:07:09 +0000 (14:07 -0400)]
misc: adds customizable options to syntastic Nit syntax checker
g:syntastic_nitc specifies custom path to compiler
g:syntastic_nit_dir specifies the NIT_DIR env variable
g:syntastic_nit_args specifies extra arguments to call nitc
g:syntastic_nit_include_dirs lists directories to include, must be a list
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 29 May 2012 18:05:47 +0000 (14:05 -0400)]
misc: correctly handles warnings in syntastic Nit syntax checker
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 29 May 2012 16:38:15 +0000 (12:38 -0400)]
misc: adds a Nit syntax checker for syntastic, a vim plugin
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 30 Apr 2012 14:41:25 +0000 (10:41 -0400)]
parser: detect sablecc3 and print better error
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 20 Apr 2012 20:34:08 +0000 (16:34 -0400)]
nitg: introduction of the the global compiler
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 8 May 2012 20:06:51 +0000 (16:06 -0400)]
model: rename lookup_first_property to lookup_first_definition
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 8 May 2012 19:33:18 +0000 (15:33 -0400)]
modelbuilder: honor --only-parse
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Fri, 4 May 2012 18:23:33 +0000 (14:23 -0400)]
model: fix comments in metamodel and metamodel::MMLocalClass::[]
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Jean Privat [Thu, 3 May 2012 01:21:23 +0000 (21:21 -0400)]
Merge branch 'newmodel' into wip
Jean Privat [Wed, 2 May 2012 16:17:32 +0000 (12:17 -0400)]
Merge branch 'nitdoc' into wip
Jean Privat [Wed, 2 May 2012 16:16:40 +0000 (12:16 -0400)]
make: fix doc generation by the use of renamed --custom-* options
Options where renamed in
6cf4858bd07
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 2 May 2012 15:56:19 +0000 (11:56 -0400)]
nitdoc: the quick search menu must be over the rest of the page (z-index)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 1 May 2012 18:28:23 +0000 (14:28 -0400)]
nit interpreter: hardening native string manipulations
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 1 May 2012 18:26:56 +0000 (14:26 -0400)]
nit interpreter: add a trailing \0 to native string
This enable String::from_cstring to work.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 1 May 2012 18:30:37 +0000 (14:30 -0400)]
stats: bound the parameter of Counter to Object instead of nullable Object
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 1 May 2012 18:29:27 +0000 (14:29 -0400)]
stats: use AbstractSorter instead of closure to sort things
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 2 May 2012 01:11:34 +0000 (21:11 -0400)]
modelbuilder: list failed path if module is not found
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 1 May 2012 18:24:40 +0000 (14:24 -0400)]
modelbuilder: easy attribute typing
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 1 May 2012 18:24:04 +0000 (14:24 -0400)]
model: use MPROPDEF instead of MPropDef
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Apr 2012 13:57:28 +0000 (09:57 -0400)]
model: use local variables for cache in collect_*
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Apr 2012 13:57:06 +0000 (09:57 -0400)]
model: easy path for type test
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Apr 2012 13:56:30 +0000 (09:56 -0400)]
model: add MType::model
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 2 May 2012 02:11:31 +0000 (22:11 -0400)]
lib: Array::== do not return false if the dynamic types of the arrays differ
This modification is in fact useless for the current compiler that has
wrong dynamic types but is required by the new interpreter.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 30 Apr 2012 17:09:25 +0000 (13:09 -0400)]
lib: fix another formal type error in the Maps
Models should be improved to detect this kind of bug.
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Mon, 30 Apr 2012 17:42:53 +0000 (13:42 -0400)]
nitdoc: Change refinements organization in class page.
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Alexandre Terrasa [Mon, 30 Apr 2012 01:47:38 +0000 (21:47 -0400)]
nitdoc: Remove empty title from <a> links
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Alexandre Terrasa [Mon, 30 Apr 2012 01:36:54 +0000 (21:36 -0400)]
nitdoc: make the menu follows the scroll.
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Jean Privat [Thu, 26 Apr 2012 23:24:38 +0000 (19:24 -0400)]
Merge branch 'nitstats' into wip
Jean Privat [Thu, 26 Apr 2012 23:24:29 +0000 (19:24 -0400)]
Merge branch 'cleanuplib' into wip
Jean Privat [Thu, 26 Apr 2012 23:22:38 +0000 (19:22 -0400)]
src: add nitstats to the Makefile
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 19:26:05 +0000 (15:26 -0400)]
tests: add nitstats to the Makefile
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 20:35:04 +0000 (16:35 -0400)]
nit interpreter: honour --help
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 20:33:46 +0000 (16:33 -0400)]
nitstats: add option --dir
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 20:32:35 +0000 (16:32 -0400)]
nitstats: honour --help
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 19:22:23 +0000 (15:22 -0400)]
nitstats: split into submodules
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 18:02:52 +0000 (14:02 -0400)]
lib: move symbol outside standard
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 18:01:55 +0000 (14:01 -0400)]
lib: move "environ" from Symbol to String
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 17:40:39 +0000 (13:40 -0400)]
lib: improve shortdoc of modules
and fix some mistakes in existing comments.
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Wed, 25 Apr 2012 23:31:25 +0000 (19:31 -0400)]
nitdoc: Preselect first result of quicksearch list and easy close on click
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Alexandre Terrasa [Wed, 25 Apr 2012 23:10:19 +0000 (19:10 -0400)]
nitdoc: Typo in json_entry comment
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Alexandre Terrasa [Wed, 25 Apr 2012 23:08:21 +0000 (19:08 -0400)]
nitdoc: remove attributes from quicklist
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Jean Privat [Thu, 26 Apr 2012 08:59:08 +0000 (04:59 -0400)]
nitstats: improve properties in the Statistics of the model
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 08:46:00 +0000 (04:46 -0400)]
nitstats: new class Counter (replace uses of HashMap[E, Int])
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 08:21:25 +0000 (04:21 -0400)]
nitstats: count sends on a nullable receiver
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 26 Apr 2012 08:20:30 +0000 (04:20 -0400)]
nitstats: count implicit vs. explicit self
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 25 Apr 2012 21:35:17 +0000 (17:35 -0400)]
Merge branch 'newmodel' into wip
Jean Privat [Wed, 25 Apr 2012 21:32:24 +0000 (17:32 -0400)]
compile: generate LOCATE_ strings in *.c files (not *.h files)
Also use "const char x[]" instead of "const char *x".
This dramatically reduce the non-optimized binary sizes.
For nitc_2:
before:
20529747 (20M)
+with -O:
10372266 (9,9M)
after:
10492807 (11M)
+with -O: 9491763 (9,1M)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 23 Apr 2012 15:14:55 +0000 (11:14 -0400)]
model: add methods to get primitive stuff
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 23 Apr 2012 14:06:48 +0000 (10:06 -0400)]
rta: rename and document runtime_type.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Mon, 23 Apr 2012 15:58:05 +0000 (11:58 -0400)]
Add customization features to nitdoc.
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Jean Privat [Mon, 23 Apr 2012 13:10:50 +0000 (09:10 -0400)]
runtime_type: Superstring allocates NativeArray[String]
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 20 Apr 2012 14:16:19 +0000 (10:16 -0400)]
model: add MMethod::is_new to distinguish new and init constructors
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 20 Apr 2012 20:36:04 +0000 (16:36 -0400)]
runtime_type: do not crash if no entry point
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 19 Apr 2012 10:33:58 +0000 (06:33 -0400)]
runtime_type: force Bool
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 20 Apr 2012 14:55:46 +0000 (10:55 -0400)]
runtime_type: collect default attributes
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 20 Apr 2012 14:51:12 +0000 (10:51 -0400)]
nitstats: type analysis lists live stuff if less than 8 elements
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 17 Apr 2012 20:13:01 +0000 (16:13 -0400)]
scope: move selfvariable to scope from typing
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 20 Apr 2012 19:52:10 +0000 (15:52 -0400)]
tests: add base_stdout.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 20 Apr 2012 17:51:53 +0000 (13:51 -0400)]
tests: add base_range.nit
Signed-off-by: Jean Privat <jean@pryen.org>