This commit is contained in:
Irmen de Jong 2021-04-02 21:28:23 +02:00
parent d582d1cc42
commit 6b4896b8f5
2 changed files with 2 additions and 2 deletions

View File

@ -642,7 +642,7 @@ Subroutines can be defined in a Block, but also nested inside another subroutine
With ``asmsub`` you can define a low-level subroutine that is implemented in inline assembly and takes any parameters With ``asmsub`` you can define a low-level subroutine that is implemented in inline assembly and takes any parameters
in registers directly. in registers directly.
Trivial subroutines can be tagged as inline to tell the compiler to copy their code Trivial subroutines can be tagged as ``inline`` to tell the compiler to copy their code
in-place to the locations where the subroutine is called, rather than inserting an actual call and return to the in-place to the locations where the subroutine is called, rather than inserting an actual call and return to the
subroutine. This may increase code size significantly and can only be used in limited scenarios, so YMMV. subroutine. This may increase code size significantly and can only be used in limited scenarios, so YMMV.

View File

@ -550,7 +550,7 @@ and can have nothing following it. The close curly brace must be on its own line
The parameters is a (possibly empty) comma separated list of "<datatype> <parametername>" pairs specifying the input parameters. The parameters is a (possibly empty) comma separated list of "<datatype> <parametername>" pairs specifying the input parameters.
The return type has to be specified if the subroutine returns a value. The return type has to be specified if the subroutine returns a value.
The ``inline`` keyword makes their code copied in-place to the locations where the subroutine is called, The ``inline`` keyword makes their code copied in-place to the locations where the subroutine is called,
rather than having an actual call and return to the subroutine. This is meant for trivial subroutines only rather than having an actual call and return to the subroutine. This is meant for very small subroutines only
as it can increase code size significantly. as it can increase code size significantly.