nit.git
11 years agorun_bench: use 'local' vor local variables
Jean Privat [Tue, 7 Aug 2012 21:15:56 +0000 (17:15 -0400)]
run_bench: use 'local' vor local variables

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agorun_bench: no not force bohem on nitc for bench_engines()
Jean Privat [Tue, 7 Aug 2012 20:57:11 +0000 (16:57 -0400)]
run_bench: no not force bohem on nitc for bench_engines()

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agorun_bench.sh: new function bench_compilation_time
Jean Privat [Tue, 7 Aug 2012 20:46:33 +0000 (16:46 -0400)]
run_bench.sh: new function bench_compilation_time

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: activate bohem since executables are efficient enough
Jean Privat [Tue, 7 Aug 2012 20:46:17 +0000 (16:46 -0400)]
nitg: activate bohem since executables are efficient enough

Lasts benchs shows that nitc with nitgc and nitg with bohem can compete
(with often a slight advance for nitg)

$ ./nitg nitg.nit --no-cc
34.12

$ ./nitg.bin nitg.nit --no-cc
27.71

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: do not expose EscapeMark#object_id in generated C
Jean Privat [Tue, 7 Aug 2012 19:49:55 +0000 (15:49 -0400)]
nitg: do not expose EscapeMark#object_id in generated C

This breaks ccache recompilations

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: do not expose RuntimeVariable#object_id in generated C
Jean Privat [Tue, 7 Aug 2012 19:49:12 +0000 (15:49 -0400)]
nitg: do not expose RuntimeVariable#object_id in generated C

This breaks ccache recompilations

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: skip empty sub-strings in superstrings
Jean Privat [Tue, 7 Aug 2012 17:50:31 +0000 (13:50 -0400)]
nitg: skip empty sub-strings in superstrings

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agovalgrind.sh: use malloc instead of large
Jean Privat [Mon, 6 Aug 2012 23:36:50 +0000 (19:36 -0400)]
valgrind.sh: use malloc instead of large

We do not want unpredictable GC invocation when the large buffer is reached.

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: improve RuntimeVariable#inspect
Jean Privat [Mon, 6 Aug 2012 21:36:19 +0000 (17:36 -0400)]
nitg: improve RuntimeVariable#inspect

and use it is all generated comments

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: self type in implicit init is exact
Jean Privat [Mon, 6 Aug 2012 21:08:57 +0000 (17:08 -0400)]
nitg: self type in implicit init is exact

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonew script run_bench.sh
Jean Privat [Mon, 6 Aug 2012 20:50:59 +0000 (16:50 -0400)]
new script run_bench.sh

This script helps to run benchmarks against the nit engines.

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: because of customization, self is exact
Jean Privat [Sat, 28 Jul 2012 23:30:57 +0000 (19:30 -0400)]
nitg: because of customization, self is exact

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: "onces" literal strings
Jean Privat [Fri, 27 Jul 2012 22:16:50 +0000 (18:16 -0400)]
nitg: "onces" literal strings

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: implements ADeferredMethPropdef#compile_to_c
Jean Privat [Sat, 21 Jul 2012 17:35:15 +0000 (13:35 -0400)]
nitg: implements ADeferredMethPropdef#compile_to_c

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: add RuntimeVariable#is_exact
Jean Privat [Sun, 24 Jun 2012 21:02:05 +0000 (17:02 -0400)]
nitg: add RuntimeVariable#is_exact

Used to indicate that the dynamic type of some variables is known.
Easy cases are the direct result of instantiations.

Not that collect_types_cache can only be used fo non exact types

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: add option --hardening
Jean Privat [Sun, 24 Jun 2012 20:18:13 +0000 (16:18 -0400)]
nitg: add option --hardening

without hardening, last element of a switch is made default.
Note that single-case switch is optimized by the c compiler.

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: inline automatic free init
Jean Privat [Sun, 24 Jun 2012 16:14:32 +0000 (12:14 -0400)]
nitg: inline automatic free init

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: inline empty bodies
Jean Privat [Sun, 24 Jun 2012 16:14:08 +0000 (12:14 -0400)]
nitg: inline empty bodies

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: readapt native == and != to force unboxing
Jean Privat [Tue, 19 Jun 2012 21:22:27 +0000 (17:22 -0400)]
nitg: readapt native == and != to force unboxing

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: inline without adaptation
Jean Privat [Sun, 15 Jul 2012 21:27:12 +0000 (17:27 -0400)]
nitg: inline without adaptation

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: inline Object::== and Object::!=
Jean Privat [Tue, 19 Jun 2012 21:17:57 +0000 (17:17 -0400)]
nitg: inline Object::== and Object::!=

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: add inspect for variable
Jean Privat [Tue, 19 Jun 2012 21:17:25 +0000 (17:17 -0400)]
nitg: add inspect for variable

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: frame receiver is a type (not a variable)
Jean Privat [Tue, 19 Jun 2012 21:02:06 +0000 (17:02 -0400)]
nitg: frame receiver is a type (not a variable)

Signed-off-by: Jean Privat <jean@pryen.org>

11 years agonitg: extract adapt_signature
Jean Privat [Sun, 15 Jul 2012 21:15:25 +0000 (17:15 -0400)]
nitg: extract adapt_signature

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agonitg: autoadapt can combine nullable
Jean Privat [Tue, 19 Jun 2012 20:52:49 +0000 (16:52 -0400)]
nitg: autoadapt can combine nullable

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoMerge branch 'boehm' into wip
Jean Privat [Mon, 18 Jun 2012 21:30:09 +0000 (17:30 -0400)]
Merge branch 'boehm' into wip

12 years agogc: gccx enable boehm by default
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>

12 years agogc: default is always nitgc
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>

12 years agogc: in gccx, -lgc must appears after objects
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>

12 years agoMerge branch 'alexandre/typo-in-nit-reference' into wip
Jean Privat [Fri, 15 Jun 2012 14:28:44 +0000 (10:28 -0400)]
Merge branch 'alexandre/typo-in-nit-reference' into wip

12 years agodoc: Typo in Nit Reference
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>

12 years agoMerge branch 'alexis/ni-fixes' into wip
Jean Privat [Fri, 8 Jun 2012 00:30:23 +0000 (20:30 -0400)]
Merge branch 'alexis/ni-fixes' into wip

12 years agonits: execute only if module is really hybrid
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>

12 years agonits: cleans up the generated stub implementation function for easier diffs
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>

12 years agonits: corrects the #endif position to the bottom of the generated header
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>

12 years agotests: adds test for ni optimizations
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>

12 years agoni: cleans up code repetition in native interface and improves performance
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>

12 years agoMerge branch 'clean-c' into wip
Jean Privat [Wed, 30 May 2012 16:39:41 +0000 (12:39 -0400)]
Merge branch 'clean-c' into wip

12 years agoMerge branch 'syntastic' into wip
Jean Privat [Wed, 30 May 2012 16:39:32 +0000 (12:39 -0400)]
Merge branch 'syntastic' into wip

12 years agomisc: removes debug output from syntastic Nit syntax checker script
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>

12 years agocompile: do not use true and false C constants.
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>

12 years agolib: do not mix declaration and code in external C code
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>

12 years agocompile: no not declare static stings in the header
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>

12 years agovim: install syntastic file directly inside the vim directory
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>

12 years agovim: README explain how to install nit for vim
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>

12 years agovim: move the function-once test before stuffs
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>

12 years agomisc: handles all error types in syntastic Nit syntax checker
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>

12 years agomisc: adds customizable options to syntastic Nit syntax checker
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>

12 years agomisc: correctly handles warnings in syntastic Nit syntax checker
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>

12 years agomisc: adds a Nit syntax checker for syntastic, a vim plugin
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>

12 years agoparser: detect sablecc3 and print better error
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>

12 years agonitg: introduction of the the global compiler
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>

12 years agomodel: rename lookup_first_property to lookup_first_definition
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>

12 years agomodelbuilder: honor --only-parse
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>

12 years agomodel: fix comments in metamodel and metamodel::MMLocalClass::[]
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>

12 years agoMerge branch 'newmodel' into wip
Jean Privat [Thu, 3 May 2012 01:21:23 +0000 (21:21 -0400)]
Merge branch 'newmodel' into wip

12 years agoMerge branch 'nitdoc' into wip
Jean Privat [Wed, 2 May 2012 16:17:32 +0000 (12:17 -0400)]
Merge branch 'nitdoc' into wip

12 years agomake: fix doc generation by the use of renamed --custom-* options
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>

12 years agonitdoc: the quick search menu must be over the rest of the page (z-index)
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>

12 years agonit interpreter: hardening native string manipulations
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>

12 years agonit interpreter: add a trailing \0 to native string
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>

12 years agostats: bound the parameter of Counter to Object instead of nullable Object
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>

12 years agostats: use AbstractSorter instead of closure to sort things
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>

12 years agomodelbuilder: list failed path if module is not found
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>

12 years agomodelbuilder: easy attribute typing
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>

12 years agomodel: use MPROPDEF instead of MPropDef
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>

12 years agomodel: use local variables for cache in collect_*
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>

12 years agomodel: easy path for type test
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>

12 years agomodel: add MType::model
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>

12 years agolib: Array::== do not return false if the dynamic types of the arrays differ
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>

12 years agolib: fix another formal type error in the Maps
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>

12 years agonitdoc: Change refinements organization in class page.
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>

12 years agonitdoc: Remove empty title from <a> links
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>

12 years agonitdoc: make the menu follows the scroll.
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>

12 years agoMerge branch 'nitstats' into wip
Jean Privat [Thu, 26 Apr 2012 23:24:38 +0000 (19:24 -0400)]
Merge branch 'nitstats' into wip

12 years agoMerge branch 'cleanuplib' into wip
Jean Privat [Thu, 26 Apr 2012 23:24:29 +0000 (19:24 -0400)]
Merge branch 'cleanuplib' into wip

12 years agosrc: add nitstats to the Makefile
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>

12 years agotests: add nitstats to the Makefile
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>

12 years agonit interpreter: honour --help
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>

12 years agonitstats: add option --dir
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>

12 years agonitstats: honour --help
Jean Privat [Thu, 26 Apr 2012 20:32:35 +0000 (16:32 -0400)]
nitstats: honour --help

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agonitstats: split into submodules
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>

12 years agolib: move symbol outside standard
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>

12 years agolib: move "environ" from Symbol to String
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>

12 years agolib: improve shortdoc of modules
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>

12 years agonitdoc: Preselect first result of quicksearch list and easy close on click
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>

12 years agonitdoc: Typo in json_entry comment
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>

12 years agonitdoc: remove attributes from quicklist
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>

12 years agonitstats: improve properties in the Statistics of the model
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>

12 years agonitstats: new class Counter (replace uses of HashMap[E, Int])
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>

12 years agonitstats: count sends on a nullable receiver
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>

12 years agonitstats: count implicit vs. explicit self
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>

12 years agoMerge branch 'newmodel' into wip
Jean Privat [Wed, 25 Apr 2012 21:35:17 +0000 (17:35 -0400)]
Merge branch 'newmodel' into wip

12 years agocompile: generate LOCATE_ strings in *.c files (not *.h files)
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>

12 years agomodel: add methods to get primitive stuff
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>

12 years agorta: rename and document runtime_type.nit
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>

12 years agoAdd customization features to nitdoc.
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>

12 years agoruntime_type: Superstring allocates NativeArray[String]
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>

12 years agomodel: add MMethod::is_new to distinguish new and init constructors
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>

12 years agoruntime_type: do not crash if no entry point
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>