25 lines
675 B
Markdown
25 lines
675 B
Markdown
---
|
|
weight: 100
|
|
title: "MV_OMIT_VM"
|
|
description: "Omit from VM"
|
|
icon: "code_blocks"
|
|
date: "2025-05-01T18:47:58-05:00"
|
|
lastmod: "2025-05-01T18:47:58-05:00"
|
|
---
|
|
|
|
`declare function MV_OMIT_VM<A..., R...>(vmFunction: (A...) -> R...): (A...) -> R...`
|
|
|
|
Similar to [MV_OMIT](/docs/macros/MV_OMIT), this will only omit the passed function from the VM. This can be useful to keep performance-critical sections unobfuscated but still have other AST passes applied to them.
|
|
|
|
## Valid Usage
|
|
|
|
```lua
|
|
MV_VM(function()
|
|
for i = 0, 10 do
|
|
print('this is virtualized!', i)
|
|
end
|
|
MV_OMIT_VM(function() print('this isnt') end)()
|
|
end)()
|
|
```
|
|
> Make sure to call the macro result!
|