added MV_CFF, MV_OMIT_CFF & MV_OMIT_VM macros
This commit is contained in:
24
content/docs/macros/MV_OMIT_CFF.md
Normal file
24
content/docs/macros/MV_OMIT_CFF.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
weight: 100
|
||||
title: "MV_OMIT_CFF"
|
||||
description: "Omit all CFF steps"
|
||||
icon: "code_blocks"
|
||||
date: "2025-05-01T18:47:58-05:00"
|
||||
lastmod: "2025-05-01T18:47:58-05:00"
|
||||
---
|
||||
|
||||
`declare function MV_OMIT_CFF<A..., R...>(cffFunction: (A...) -> R...): (A...) -> R...`
|
||||
|
||||
Similar to [MV_OMIT](/docs/macros/MV_OMIT), this will omit only the [CFF](/docs/options/flatten-control-flow) steps from the passed function. This can be useful to keep performance-critical sections unobfuscated but still have other AST passes applied to them.
|
||||
|
||||
## Valid Usage
|
||||
|
||||
```lua
|
||||
MV_CFF(function()
|
||||
for i = 0, 10 do
|
||||
print('this is flattened!', i)
|
||||
end
|
||||
MV_OMIT_CFF(function() print('this isnt') end)()
|
||||
end)()
|
||||
```
|
||||
> Make sure to call the macro result!
|
Reference in New Issue
Block a user