minor improvements, typos, etc.

This commit is contained in:
cpunch 2025-09-18 00:10:25 -06:00
parent cae0341554
commit 5065d5d788
3 changed files with 6 additions and 53 deletions

View File

@ -14,19 +14,20 @@ will replace all instances of named indexes with a unique number constant.
## Valid Usage
```lua
local foo = MV_INDEX_TO_NUM({total = 0})
local foo = MV_INDEX_TO_NUM({total = 0, b = 2})
for i = 1, 10 do
foo.total = foo.total + i
end
return foo.total
return foo.total + foo.b
```
turns into:
```lua
local a={[19314]=0}
-- note that the order of the indexes has been changed as well
local a={[24453]=2,[19314]=0}
for b=1,10 do
a[19314]=a[19314]+b
end
return a[19314]
return a[19314] + a[24453]
```

View File

@ -33,51 +33,3 @@ end)
print(testFunc2())
```
turns into:
```lua
...
local b=o(nil)
repeat
local j=nil
repeat
local c=0
for e=1,10 do
c=c+e
end
do
j=c
break
end
until true
local a=nil
repeat
local f=0
for g=11,20 do
f=f+g
end
do
a=f
break
end
until true
local p=nil
repeat
local l=0
for i=1,15 do
l=l+i
end
do
p=l
break
end
until true
do
b=o(j,a,p)
break
end
until true;
print(m(b[1],1,b[2]))
```

View File

@ -15,7 +15,7 @@ When used in a virtualized block (using the [MV_VM](./MV_VM) or [MV_ENC_FUNC](./
{{% alert context="info" text="**Note**: `MV_OMIT_FUNCTION` && `LPH_NO_VIRTUALIZE` are also available aliases." /%}}
Additionally if you'd only like to only omit the function from certain passes, you can use the [MV_OMIT_CFF](./MV_OMIT_CFF) and [MV_OMIT_VM](./MV_OMIT_VM) macros.
Additionally if you'd like to only omit the function from certain AST passes, you can use the [MV_OMIT_CFF](./MV_OMIT_CFF) or [MV_OMIT_VM](./MV_OMIT_VM) macros.
## Valid Usage