Describe the bug
So issue is that when we have wire_expression2_unlimited 1 it do set variable e2_tickquota = 100000, but compiler.lua uses convar wire_expression2_quotatick instead, so by default we have tickquota 100000 for e2 functions, but inside wire_expression2_quotatick still 25000, and functions like perf() causing tick quota inside
if self.scope:ResolveData("loop") or self.scope:ResolveData("switch_case") then -- Inside loop or switch case, check if continued or broken
and impossible to detect this by e2 functions. since hardQuota returns 100000, minquota/maxquota are looks valid too, and perf expect it to have 100000, so code fails because of tick quota exceeded when should not.
How to reproduce the bug
run this code with wire_expression2_unlimited 1, and wire_expression2_quotatick 25000.
@name
@inputs
@outputs
@persist
@trigger none
@strict
local I = 0
while(perf()) {
I++
}
it will fail.
Describe the bug
So issue is that when we have wire_expression2_unlimited 1 it do set variable e2_tickquota = 100000, but compiler.lua uses convar wire_expression2_quotatick instead, so by default we have tickquota 100000 for e2 functions, but inside wire_expression2_quotatick still 25000, and functions like perf() causing tick quota inside
and impossible to detect this by e2 functions. since hardQuota returns 100000, minquota/maxquota are looks valid too, and perf expect it to have 100000, so code fails because of tick quota exceeded when should not.
How to reproduce the bug
run this code with wire_expression2_unlimited 1, and wire_expression2_quotatick 25000.
it will fail.