Dead code elimination for entire modules and their init procs if empty (#10032)
* fixes #9798 * Change order of write modules * Move datInit calls ahead of initStackBottom
This commit is contained in:
parent
cbbdcb2669
commit
82c009a2cb
6 changed files with 176 additions and 99 deletions
|
|
@ -1479,12 +1479,9 @@ const
|
|||
# for string literals, it allows for some optimizations.
|
||||
|
||||
{.push profiler: off.}
|
||||
when defined(nimKnowsNimvm):
|
||||
let nimvm* {.magic: "Nimvm".}: bool = false
|
||||
## may be used only in "when" expression.
|
||||
## It is true in Nim VM context and false otherwise
|
||||
else:
|
||||
const nimvm*: bool = false
|
||||
let nimvm* {.magic: "Nimvm", compileTime.}: bool = false
|
||||
## may be used only in "when" expression.
|
||||
## It is true in Nim VM context and false otherwise
|
||||
{.pop.}
|
||||
|
||||
proc compileOption*(option: string): bool {.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue