aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/doc
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-01-18 10:36:49 +0100
committerFredrik Gustafsson <[email protected]>2013-01-18 10:36:49 +0100
commit2cfa0466c3b3c7bd5e3621aff0f3e2ca30addb68 (patch)
tree39879f3e5cbf5d87ec795e7e4b0360524bcf956a /lib/compiler/doc
parentb5e456083979a25404670feb3fb7f977cbe32d8b (diff)
parent7b0b3688ba8b921b8cc1eff39ed39a14c424d557 (diff)
downloadotp-2cfa0466c3b3c7bd5e3621aff0f3e2ca30addb68.tar.gz
otp-2cfa0466c3b3c7bd5e3621aff0f3e2ca30addb68.tar.bz2
otp-2cfa0466c3b3c7bd5e3621aff0f3e2ca30addb68.zip
Merge branch 'nox/promote-inline_list_funcs/OTP-10690'
* nox/promote-inline_list_funcs/OTP-10690: Raise a function_clause error with the right arguments when inlining Properly guard against badly-typed arguments when inlining Make inlined list functions fail with function_clause Document compiler option 'inline_list_funcs' Silence some wrong warnings triggered by inline_list_funcs
Diffstat (limited to 'lib/compiler/doc')
-rw-r--r--lib/compiler/doc/src/compile.xml26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml
index 27d750f929..ddaae2655d 100644
--- a/lib/compiler/doc/src/compile.xml
+++ b/lib/compiler/doc/src/compile.xml
@@ -816,6 +816,32 @@ pi() -> 3.1416.
</section>
<section>
+ <title>Inlining of list functions</title>
+ <p>The compiler can also inline a variety of list manipulation functions
+ from the stdlib's lists module.</p>
+
+ <p>This feature must be explicitly enabled with a compiler option or a
+ <c>-compile()</c> attribute in the source module.</p>
+
+ <p>To enable inlining of list functions, use the <c>inline_list_funcs</c>
+ option.</p>
+
+ <p>The following functions are inlined:</p>
+ <list type="bulleted">
+ <item><seealso marker="stdlib:lists#all/2">lists:all/2</seealso></item>
+ <item><seealso marker="stdlib:lists#any/2">lists:any/2</seealso></item>
+ <item><seealso marker="stdlib:lists#foreach/2">lists:foreach/2</seealso></item>
+ <item><seealso marker="stdlib:lists#map/2">lists:map/2</seealso></item>
+ <item><seealso marker="stdlib:lists#flatmap/2">lists:flatmap/2</seealso></item>
+ <item><seealso marker="stdlib:lists#filter/2">lists:filter/2</seealso></item>
+ <item><seealso marker="stdlib:lists#foldl/3">lists:foldl/3</seealso></item>
+ <item><seealso marker="stdlib:lists#foldr/3">lists:foldr/3</seealso></item>
+ <item><seealso marker="stdlib:lists#mapfoldl/3">lists:mapfoldl/3</seealso></item>
+ <item><seealso marker="stdlib:lists#mapfoldr/3">lists:mapfoldr/3</seealso></item>
+ </list>
+ </section>
+
+ <section>
<title>Parse Transformations</title>
<p>Parse transformations are used when a programmer wants to use