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 [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>
Jean Privat [Fri, 20 Apr 2012 17:47:20 +0000 (13:47 -0400)]
tests: add base_abstract_fun
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 19 Apr 2012 16:30:06 +0000 (12:30 -0400)]
tests: add base_string.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 19 Apr 2012 14:17:22 +0000 (10:17 -0400)]
tests: base_output_class_name imports kernel
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 19 Apr 2012 20:31:49 +0000 (16:31 -0400)]
Merge remote-tracking branch 'alexandre/pu/newmodel' into wip
Jean Privat [Thu, 19 Apr 2012 20:31:21 +0000 (16:31 -0400)]
Merge remote-tracking branch 'alexandre/master' into wip
Jean Privat [Thu, 19 Apr 2012 20:30:56 +0000 (16:30 -0400)]
tests: add nit.nit
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 19 Apr 2012 20:29:08 +0000 (16:29 -0400)]
tests: generate nitc stuff in out/
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Thu, 19 Apr 2012 19:20:06 +0000 (15:20 -0400)]
Doc review on newmodel.
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Alexandre Terrasa [Thu, 19 Apr 2012 18:23:23 +0000 (14:23 -0400)]
Add .metadata/ to git ignore list
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Jean Privat [Thu, 12 Apr 2012 15:45:48 +0000 (11:45 -0400)]
model: new metamodel
This commit introduces a new metamodel.
I expect it is simpler than the current one.
A new modelbuilder and typing is also provided.
As a proof of concept two tools are included: nit and nitstats
nit is a basic naive and inefficient interpreter.
nitstats is a tool to collect and gather some statistics.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 17 Apr 2012 20:50:05 +0000 (16:50 -0400)]
version: v0.5.1-git
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 17 Apr 2012 20:47:18 +0000 (16:47 -0400)]
version: v0.5
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 17 Apr 2012 17:00:24 +0000 (13:00 -0400)]
Merge branch 'alexandre/nitdoc-quicksearch'
Conflicts:
tests/sav/nitdoc_args1.sav
Alexandre Terrasa [Tue, 17 Apr 2012 16:17:37 +0000 (12:17 -0400)]
nitdoc: Add quick search results preview.
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Jean Privat [Tue, 17 Apr 2012 16:12:39 +0000 (12:12 -0400)]
prepare changelog for v0.5
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 17 Apr 2012 16:12:05 +0000 (12:12 -0400)]
add ccache and dot to README
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 17 Apr 2012 14:12:16 +0000 (10:12 -0400)]
c_src: update
Jean Privat [Tue, 17 Apr 2012 15:13:27 +0000 (11:13 -0400)]
tools: better handling of native interfaces in mkcsrc
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 16 Apr 2012 20:26:03 +0000 (16:26 -0400)]
Merge branch 'wip2'
Conflicts:
tests/nitdoc.args
Jean Privat [Thu, 12 Apr 2012 14:29:53 +0000 (10:29 -0400)]
lib: fix mismatch between keys and values formal types
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 12 Apr 2012 09:50:32 +0000 (05:50 -0400)]
tests: use /dev/null as stdin if no inputs
Some tests will hangs if they do a read without any .inputs file.
Signed-off-by: Jean Privat <jean@pryen.org>