mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-13 07:10:54 +01:00
Update all applicable .lua files to .luau
This commit is contained in:
parent
3b435d4920
commit
89ae76416f
120 changed files with 3258 additions and 969 deletions
.github/workflows
bench
bench.pybench_support.luau
gc
test_BinaryTree.luautest_GC_Boehm_Trees.luautest_GC_Tree_Pruning_Eager.luautest_GC_Tree_Pruning_Gen.luautest_GC_Tree_Pruning_Lazy.luautest_GC_hashtable_Keyval.luautest_LB_mandel.luautest_LargeTableCtor_array.luautest_LargeTableCtor_hash.luautest_Pcall_pcall_yield.luautest_SunSpider_3d-raytrace.luautest_TableCreate_nil.luautest_TableCreate_number.luautest_TableCreate_zerofill.luautest_TableMarshal_select.luautest_TableMarshal_table_pack.luautest_TableMarshal_varargs.luau
micro_tests
test_AbsSum_abs.luautest_AbsSum_and_or.luautest_AbsSum_math_abs.luautest_Assert.luautest_Factorial.luautest_Failure_pcall_a_bar.luautest_Failure_pcall_game_Foo.luautest_Failure_xpcall_a_bar.luautest_Failure_xpcall_game_Foo.luautest_LargeTableCtor_array.luautest_LargeTableCtor_hash.luautest_LargeTableSum_loop_index.luautest_LargeTableSum_loop_ipairs.luautest_LargeTableSum_loop_iter.luautest_LargeTableSum_loop_pairs.luautest_MethodCalls.luautest_OOP_constructor.luautest_OOP_method_call.luautest_OOP_virtual_constructor.luautest_Pcall_call_return.luautest_Pcall_pcall_return.luautest_Pcall_pcall_yield.luautest_Pcall_xpcall_return.luautest_SqrtSum_exponent.luautest_SqrtSum_math_sqrt.luautest_SqrtSum_sqrt.luautest_SqrtSum_sqrt_getfenv.luautest_SqrtSum_sqrt_roundabout.luautest_StringInterp.luautest_TableCreate_nil.luautest_TableCreate_number.luautest_TableCreate_zerofill.luautest_TableFind_loop_ipairs.luautest_TableFind_table_find.luautest_TableInsertion_index_cached.luautest_TableInsertion_index_len.luautest_TableInsertion_table_insert.luautest_TableInsertion_table_insert_index.luautest_TableIteration.luautest_TableMarshal_select.luautest_TableMarshal_table_pack.luautest_TableMarshal_table_unpack_array.luautest_TableMarshal_table_unpack_range.luautest_TableMarshal_varargs.luautest_TableMove_empty_table.luautest_TableMove_same_table.luautest_TableMove_table_create.luautest_TableRemoval_table_remove.luautest_TableSort.luautest_ToNumberString.luautest_UpvalueCapture.luautest_VariadicSelect.luautest_string_lib.luautest_table_concat.luau
other
tests
32
.github/workflows/benchmark.yml
vendored
32
.github/workflows/benchmark.yml
vendored
|
@ -61,28 +61,28 @@ jobs:
|
||||||
filter() {
|
filter() {
|
||||||
awk '/.*I\s+refs:\s+[0-9,]+/ {gsub(",", "", $4); X=$4} END {print "SUCCESS: '$1' : " X/1e7 "ms +/- 0% on luau-analyze"}'
|
awk '/.*I\s+refs:\s+[0-9,]+/ {gsub(",", "", $4); X=$4} END {print "SUCCESS: '$1' : " X/1e7 "ms +/- 0% on luau-analyze"}'
|
||||||
}
|
}
|
||||||
valgrind --tool=callgrind ./luau-analyze --mode=nonstrict bench/other/LuauPolyfillMap.lua 2>&1 | filter map-nonstrict | tee -a analyze-output.txt
|
valgrind --tool=callgrind ./luau-analyze --mode=nonstrict bench/other/LuauPolyfillMap.luau 2>&1 | filter map-nonstrict | tee -a analyze-output.txt
|
||||||
valgrind --tool=callgrind ./luau-analyze --mode=strict bench/other/LuauPolyfillMap.lua 2>&1 | filter map-strict | tee -a analyze-output.txt
|
valgrind --tool=callgrind ./luau-analyze --mode=strict bench/other/LuauPolyfillMap.luau 2>&1 | filter map-strict | tee -a analyze-output.txt
|
||||||
valgrind --tool=callgrind ./luau-analyze --mode=strict --fflags=LuauSolverV2 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-dcr | tee -a analyze-output.txt
|
valgrind --tool=callgrind ./luau-analyze --mode=strict --fflags=LuauSolverV2 bench/other/LuauPolyfillMap.luau 2>&1 | filter map-dcr | tee -a analyze-output.txt
|
||||||
valgrind --tool=callgrind ./luau-analyze --mode=nonstrict bench/other/regex.lua 2>&1 | filter regex-nonstrict | tee -a analyze-output.txt
|
valgrind --tool=callgrind ./luau-analyze --mode=nonstrict bench/other/regex.luau 2>&1 | filter regex-nonstrict | tee -a analyze-output.txt
|
||||||
valgrind --tool=callgrind ./luau-analyze --mode=strict bench/other/regex.lua 2>&1 | filter regex-strict | tee -a analyze-output.txt
|
valgrind --tool=callgrind ./luau-analyze --mode=strict bench/other/regex.luau 2>&1 | filter regex-strict | tee -a analyze-output.txt
|
||||||
valgrind --tool=callgrind ./luau-analyze --mode=strict --fflags=LuauSolverV2 bench/other/regex.lua 2>&1 | filter regex-dcr | tee -a analyze-output.txt
|
valgrind --tool=callgrind ./luau-analyze --mode=strict --fflags=LuauSolverV2 bench/other/regex.luau 2>&1 | filter regex-dcr | tee -a analyze-output.txt
|
||||||
|
|
||||||
- name: Run benchmark (compile)
|
- name: Run benchmark (compile)
|
||||||
run: |
|
run: |
|
||||||
filter() {
|
filter() {
|
||||||
awk '/.*I\s+refs:\s+[0-9,]+/ {gsub(",", "", $4); X=$4} END {print "SUCCESS: '$1' : " X/1e7 "ms +/- 0% on luau-compile"}'
|
awk '/.*I\s+refs:\s+[0-9,]+/ {gsub(",", "", $4); X=$4} END {print "SUCCESS: '$1' : " X/1e7 "ms +/- 0% on luau-compile"}'
|
||||||
}
|
}
|
||||||
valgrind --tool=callgrind ./luau-compile --null -O0 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O0 | tee -a compile-output.txt
|
valgrind --tool=callgrind ./luau-compile --null -O0 bench/other/LuauPolyfillMap.luau 2>&1 | filter map-O0 | tee -a compile-output.txt
|
||||||
valgrind --tool=callgrind ./luau-compile --null -O1 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O1 | tee -a compile-output.txt
|
valgrind --tool=callgrind ./luau-compile --null -O1 bench/other/LuauPolyfillMap.luau 2>&1 | filter map-O1 | tee -a compile-output.txt
|
||||||
valgrind --tool=callgrind ./luau-compile --null -O2 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O2 | tee -a compile-output.txt
|
valgrind --tool=callgrind ./luau-compile --null -O2 bench/other/LuauPolyfillMap.luau 2>&1 | filter map-O2 | tee -a compile-output.txt
|
||||||
valgrind --tool=callgrind ./luau-compile --codegennull -O2 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O2-codegen | tee -a compile-output.txt
|
valgrind --tool=callgrind ./luau-compile --codegennull -O2 bench/other/LuauPolyfillMap.luau 2>&1 | filter map-O2-codegen | tee -a compile-output.txt
|
||||||
valgrind --tool=callgrind ./luau-compile --codegennull -O2 -t1 bench/other/LuauPolyfillMap.lua 2>&1 | filter map-O2-t1-codegen | tee -a compile-output.txt
|
valgrind --tool=callgrind ./luau-compile --codegennull -O2 -t1 bench/other/LuauPolyfillMap.luau 2>&1 | filter map-O2-t1-codegen | tee -a compile-output.txt
|
||||||
valgrind --tool=callgrind ./luau-compile --null -O0 bench/other/regex.lua 2>&1 | filter regex-O0 | tee -a compile-output.txt
|
valgrind --tool=callgrind ./luau-compile --null -O0 bench/other/regex.luau 2>&1 | filter regex-O0 | tee -a compile-output.txt
|
||||||
valgrind --tool=callgrind ./luau-compile --null -O1 bench/other/regex.lua 2>&1 | filter regex-O1 | tee -a compile-output.txt
|
valgrind --tool=callgrind ./luau-compile --null -O1 bench/other/regex.luau 2>&1 | filter regex-O1 | tee -a compile-output.txt
|
||||||
valgrind --tool=callgrind ./luau-compile --null -O2 bench/other/regex.lua 2>&1 | filter regex-O2 | tee -a compile-output.txt
|
valgrind --tool=callgrind ./luau-compile --null -O2 bench/other/regex.luau 2>&1 | filter regex-O2 | tee -a compile-output.txt
|
||||||
valgrind --tool=callgrind ./luau-compile --codegennull -O2 bench/other/regex.lua 2>&1 | filter regex-O2-codegen | tee -a compile-output.txt
|
valgrind --tool=callgrind ./luau-compile --codegennull -O2 bench/other/regex.luau 2>&1 | filter regex-O2-codegen | tee -a compile-output.txt
|
||||||
valgrind --tool=callgrind ./luau-compile --codegennull -O2 -t1 bench/other/regex.lua 2>&1 | filter regex-O2-t1-codegen | tee -a compile-output.txt
|
valgrind --tool=callgrind ./luau-compile --codegennull -O2 -t1 bench/other/regex.luau 2>&1 | filter regex-O2-t1-codegen | tee -a compile-output.txt
|
||||||
|
|
||||||
- name: Checkout benchmark results
|
- name: Checkout benchmark results
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
|
@ -46,9 +46,9 @@ jobs:
|
||||||
- name: make cli
|
- name: make cli
|
||||||
run: |
|
run: |
|
||||||
make -j2 config=sanitize werror=1 luau luau-analyze luau-compile # match config with tests to improve build time
|
make -j2 config=sanitize werror=1 luau luau-analyze luau-compile # match config with tests to improve build time
|
||||||
./luau tests/conformance/assert.lua
|
./luau tests/conformance/assert.luau
|
||||||
./luau-analyze tests/conformance/assert.lua
|
./luau-analyze tests/conformance/assert.luau
|
||||||
./luau-compile tests/conformance/assert.lua
|
./luau-compile tests/conformance/assert.luau
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
@ -81,9 +81,9 @@ jobs:
|
||||||
shell: bash # necessary for fail-fast
|
shell: bash # necessary for fail-fast
|
||||||
run: |
|
run: |
|
||||||
cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI --config Debug # match config with tests to improve build time
|
cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI --config Debug # match config with tests to improve build time
|
||||||
Debug/luau tests/conformance/assert.lua
|
Debug/luau tests/conformance/assert.luau
|
||||||
Debug/luau-analyze tests/conformance/assert.lua
|
Debug/luau-analyze tests/conformance/assert.luau
|
||||||
Debug/luau-compile tests/conformance/assert.lua
|
Debug/luau-compile tests/conformance/assert.luau
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
runs-on: ubuntu-20.04 # needed for clang++-10 to avoid gcov compatibility issues
|
runs-on: ubuntu-20.04 # needed for clang++-10 to avoid gcov compatibility issues
|
||||||
|
|
|
@ -889,7 +889,7 @@ def run(args, argsubcb):
|
||||||
all_files = [subdir + os.sep + filename for subdir, dirs, files in os.walk(arguments.folder) for filename in files]
|
all_files = [subdir + os.sep + filename for subdir, dirs, files in os.walk(arguments.folder) for filename in files]
|
||||||
for filepath in sorted(all_files):
|
for filepath in sorted(all_files):
|
||||||
subdir, filename = os.path.split(filepath)
|
subdir, filename = os.path.split(filepath)
|
||||||
if filename.endswith(".lua"):
|
if filename.endswith(".luau"):
|
||||||
if arguments.run_test == None or re.match(arguments.run_test, filename[:-4]):
|
if arguments.run_test == None or re.match(arguments.run_test, filename[:-4]):
|
||||||
runTest(subdir, filename, filepath)
|
runTest(subdir, filename, filepath)
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue