luau/tests/conformance/interrupt.lua
Vighnesh-V c755875479
Sync to upstream/release/605 (#1118)
- Implemented [Require by String with Relative
Paths](https://github.com/luau-lang/rfcs/blob/master/docs/new-require-by-string-semantics.md)
RFC
- Implemented [Require by String with
Aliases](https://github.com/luau-lang/rfcs/blob/master/docs/require-by-string-aliases.md)
RFC with support for `paths` and `alias` arrays in .luarc
- Added SUBRK and DIVRK bytecode instructions to speed up
constant-number and constant/number operations
- Added `--vector-lib`, `--vector-ctor` and `--vector-type` options to
luau-compile to support code with vectors
 
New Solver
- Correctness fixes to subtyping
- Improvements to dataflow analysis

Native Code Generation
- Added bytecode analysis pass to predict type tags used in operations
- Fixed rare cases of numerical loops being generated without an
interrupt instruction
- Restored optimization data propagation into the linear block
- Duplicate buffer length checks are optimized away

Miscellaneous
- Small performance improvements to new non-strict mode
- Introduced more scripts for fuzzing Luau and processing the results,
including fuzzer build support for CMake

Co-authored-by: Alexander McCord <amccord@roblox.com>
Co-authored-by: Andy Friesen <afriesen@roblox.com>
Co-authored-by: Aviral Goel <agoel@roblox.com>
Co-authored-by: David Cope <dcope@roblox.com>
Co-authored-by: Lily Brown <lbrown@roblox.com>
Co-authored-by: Vighnesh Vijay <vvijay@roblox.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>

---------

Co-authored-by: Aaron Weiss <aaronweiss@roblox.com>
Co-authored-by: Alexander McCord <amccord@roblox.com>
Co-authored-by: Andy Friesen <afriesen@roblox.com>
Co-authored-by: Aviral Goel <agoel@roblox.com>
Co-authored-by: David Cope <dcope@roblox.com>
Co-authored-by: Lily Brown <lbrown@roblox.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
2023-12-01 23:46:57 -08:00

78 lines
1.2 KiB
Lua

-- This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
print("testing interrupts")
-- this function will be called by C code with a special interrupt handler that validates hit locations
function test()
function foo()
for i=1,10 do end
return
end
foo()
function bar()
local i = 0
while i < 10 do
i += i + 1
end
end
bar()
function baz()
end
baz()
end
-- these functions will be called by C code with a special interrupt handler that terminates after a few invocations
function infloop1()
while true do end
end
function infloop2()
while true do continue end
end
function infloop3()
repeat until false
end
function infloop4()
repeat continue until false
end
function infloop5()
for i=0,0,0 do end
end
function infloop6()
for i=0,0,0 do continue end
end
function infloop7()
for i=1,math.huge do end
end
function infloop8()
for i=1,math.huge do continue end
end
function infloop9()
-- technically not a loop, but an exponentially recursive function
local function boom()
boom()
boom()
end
boom()
end
function infloop10()
for l0=4096,0,0 do
repeat
continue
until function<t0>() end
end
end
return "OK"