mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 06:15:44 +08:00
ba67fb275e
* `table.sort` was improved further. It now guarentees N*log(N) time complexity in the worst case. * Fix https://github.com/Roblox/luau/issues/880 We are also working on fixing final bugs and crashes in the new type solver. On the CodeGen front we have a few things going on: * We have a smarter register allocator for the x86 JIT * We lower more instructions on arm64 * The vector constructor builtin is now translated to IR --------- Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
34 lines
538 B
Lua
34 lines
538 B
Lua
-- This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
print('testing function calls through API')
|
|
|
|
function add(a, b)
|
|
return a + b
|
|
end
|
|
|
|
local m = { __eq = function(a, b) return a.a == b.a end }
|
|
|
|
function create_with_tm(x)
|
|
return setmetatable({ a = x }, m)
|
|
end
|
|
|
|
local gen = 0
|
|
function incuv()
|
|
gen += 1
|
|
return gen
|
|
end
|
|
|
|
pi = 3.1415926
|
|
function getpi()
|
|
return pi
|
|
end
|
|
|
|
function largealloc()
|
|
table.create(1000000)
|
|
end
|
|
|
|
function oops()
|
|
return "oops"
|
|
end
|
|
|
|
return('OK')
|