Merge: Added contributing guidelines and link from readme
[nit.git] / share / man / nitc.md
index 896eb6d..a316782 100644 (file)
@@ -45,7 +45,6 @@ See the documentation of these specific modules for details.
 ## MESSAGES
 
 ### `-W`, `--warn`
-
 Show additional warnings (advices).
 
 By default, only important warnings are displayed.
@@ -68,7 +67,6 @@ A warning is considered an advice when:
 in order to let people fix them before promoting the advice to an important warning.
 
 ### `-w`, `--warning`
-
 Show/hide a specific warning.
 
 Each type of warning can be individually displayed or hidden.
@@ -144,14 +142,14 @@ The path added with `-I` are searched before those added by the environment vari
 May be used more than once.
 
 ### `-o`, `--output`
-Output executable name.
+Filename of the generated executable.
 
 Indicates the path and name of the produced executable.
 
 Note: it is better to use `--dir` if only the directory is important.
 This way, the platform extension will be correctly set.
 
-### `-o` is not usable if multiple programs are compiled at once.
+`-o` is not usable if multiple programs are compiled at once.
 
 ### `--dir`
 Output directory.
@@ -188,7 +186,7 @@ The final binary will be generated in the same directory.
 
 Note that, to be useful, the compilation directory is not destroyed when `--no-cc` is used.
 
-### `-m`
+### `-m`, `--mixin`
 Additional module to mix-in.
 
 Additional modules are imported and refine the main module of the program.
@@ -285,6 +283,13 @@ Need `--rta`.
 Allow the separate compiler to direct call monomorphic sites (semi-global).
 Need `--rta`.
 
+### `--direct-call-monomorph0`
+Allow the separate compiler to direct call monomorphic sites (semi-global).
+Need `--rta`.
+
+The difference with the non-zero option is internal:
+with this option, the monomorphism is looked-at on the mmethod level and not at the callsite level.
+
 ### `--skip-dead-methods`
 Do not compile dead methods (semi-global).
 Need `--rta`.
@@ -309,7 +314,7 @@ This makes the compiled program faster since less indirections are required to g
 It also produces executables that are a little bit smaller since static memory does not have to store the colors.
 
 ### `--substitute-monomorph`
-Replace monomorphic trampolines with direct call.
+Replace monomorphic trampolines with direct calls.
 
 Late-binding is implemented with *trampolines*, that are small functions that just select and jump the to right implementations.
 If, at link-time, is it known that the target will always by the same implementation then all calls to the trampoline are replaced by
@@ -320,6 +325,19 @@ However, it is expected that the gain of monomorphic direct-calls overcompensate
 
 Note: automatically enable option `--trampoline-call`.
 
+## POTENTIAL OPTIMIZATIONS
+
+These optimisation are not enabled by default as they are counter-effective in most cases.
+
+### `--guard-call`
+Guard VFT calls with a direct call.
+
+### `--type-poset`
+Build a poset of types to create more condensed tables.
+
+The drawback is that more time and memory are used by the compilation process.
+
+
 ## DANGEROUS OPTIMIZATIONS
 
 The following optimizations disable runtime checks.
@@ -368,7 +386,7 @@ Put primitive attributes in a box instead of an union.
 ### `--no-shortcut-equal`
 Always call == in a polymorphic way.
 
-### `--no-tag-primitive`
+### `--no-tag-primitives`
 Use only boxes for primitive types.
 
 The separate compiler uses tagged values to encode common primitive types like Int, Bool and Char.
@@ -390,7 +408,7 @@ Disable advanced gcc directives for optimization.
 ### `--trampoline-call`
 Use an indirection when calling.
 
-Just add the trampolines of `--substitute-monomorph` without doing any aditionnal optimizations.
+Just add the trampolines of `--substitute-monomorph` without doing any additionnal optimizations.
 
 ## INTERNAL OPTIONS
 
@@ -413,7 +431,9 @@ Do not check, and produce errors, on visibility issues.
 Do not generate main entry point.
 
 ### `--no-stacktrace`
-The compiled program will not display stack traces on runtime errors.
+Disable the generation of stack traces.
+
+With this option, the compiled program will not display stack traces on runtime errors.
 
 Because stack traces rely on libunwind, this option might be useful in order to generate more portable binaries
 since libunwind might be non available on the runtime system (or available with an ABI incompatible version).
@@ -463,6 +483,12 @@ Continue after errors, whatever the consequences.
 The tool does not stop after some errors but continue until it produces incorrect result, crashes, erases the hard drive, or just continue forever in an infinite loop.
 This option is used to test the robustness of the tools by allowing phases to progress on incorrect data.
 
+### `--sloppy`
+Force lazy semantic analysis of the source-code.
+
+Analysis of methods is thus done only when required.
+This option breaks the behavior of most of the tools since errors in methods are undetected until the method is required in some processing.
+
 # ENVIRONMENT VARIABLES
 
 ### `NIT_DIR`