Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorPaolo Molaro <lupus@oddwiz.org>2011-06-27 17:49:48 +0400
committerPaolo Molaro <lupus@oddwiz.org>2011-06-27 18:04:44 +0400
commit1991b7b15fa73003742f35794718fa7a83bf7476 (patch)
tree59f14f7bd00763176a0aae59c375de86890e3e12 /man
parent0e31cd4e854a175cfb05f3220642075f9e87d7c3 (diff)
Add an aot option to override the value of readonly static fields.
If the static constructor of a type has been run, the JIT can perform some optimizations based on the actual value of static readonly fields. This isn't possible in AOT mode, since the code won't be ran before compile time: this option allows to set any number of static readonly fields to a constant value so that the compiler can perform the same kind of optimizations.
Diffstat (limited to 'man')
-rw-r--r--man/mono.113
1 files changed, 13 insertions, 0 deletions
diff --git a/man/mono.1 b/man/mono.1
index 857f3913577..37e96045e56 100644
--- a/man/mono.1
+++ b/man/mono.1
@@ -192,6 +192,19 @@ Same for the llvm tools 'opt' and 'llc'.
.TP
.I stats
Print various stats collected during AOT compilation.
+.TP
+.I readonly-value=namespace.typename.fieldname=type/value
+Override the value of a static readonly field. Usually, during JIT
+compilation, the static constructor is ran eagerly, so the value of
+a static readonly field is known at compilation time and the compiler
+can do a number of optimizations based on it. During AOT, instead, the static
+constructor can't be ran, so this option can be used to set the value of such
+a field and enable the same set of optimizations.
+Type can be any of i1, i2, i4 for integers of the respective sizes (in bytes).
+Note that signed/unsigned numbers do not matter here, just the storage size.
+This option can be specified multiple times and it doesn't prevent the static
+constructor for the type defining the field to execute with the usual rules
+at runtime (hence possibly computing a different value for the field).
.PP
For more information about AOT, see: http://www.mono-project.com/AOT