Commit graph

260 commits

Author SHA1 Message Date
Arseny Kapoulkine
c8752f657e
Update VM/include/lualib.h 2021-11-22 07:34:29 -08:00
Pelanyo Kamara
0767823618
change return type for luaL_(opt/check)boolean & use in conformance tests 2021-11-22 10:47:29 +00:00
Pelanyo Kamara
a423e24dbf
inline redundant variable 2021-11-21 23:31:20 +00:00
Pelanyo Kamara
0192eff182
rename default to def 2021-11-21 21:49:45 +00:00
Pelanyo Kamara
eaea78262a
give variable more descriptive name 2021-11-21 21:46:27 +00:00
Pelanyo Kamara
edab113b1f
add removed newlines 2021-11-21 21:45:20 +00:00
Pelanyo Kamara
2a72244bac
match commits with Roblox/luau 2021-11-21 21:44:38 +00:00
Pelanyo Kamara
921598bf9c
Merge branch 'master' of https://github.com/MathematicalDessert/luau 2021-11-21 21:37:28 +00:00
Pelanyo Kamara
5b6d6e6376
Add luaL_checkboolean and luaL_optboolean 2021-11-21 21:37:10 +00:00
Pelanyo Kamara
37bb492ed6
Merge branch 'Roblox:master' into master 2021-11-21 21:07:35 +00:00
Josh Soref
ec8a5643cc
Improve readability (#206)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
2021-11-19 10:45:53 -08:00
Arseny Kapoulkine
100710c9f6
Update README.md
Switch to luau_compile and specify env for luau_load
2021-11-19 08:15:56 -08:00
Arseny Kapoulkine
3f1508c83a
Sync to upstream/release/505 (#216)
- Improve error recovery during type checking
- Initial (not fully complete) implementation for singleton types (RFC RFC: Singleton types #37)
- Implement a C-friendly interface for compiler (luacode.h)
- Remove C++ features from lua.h (removed default arguments from luau_load and lua_pushcfunction)
- Fix lua_breakpoint behavior when enabled=false
- Implement coroutine.close (RFC RFC: coroutine.close #88)

Note, this introduces small breaking changes in lua.h:

- luau_load env argument is now required, pass an extra 0
- lua_pushcfunction now must be called with 3 arguments; if you were calling it with 2 arguments, pass an extra NULL; if you were calling it with 4, use lua_pushcclosure.

These changes are necessary to make sure lua.h can be used from pure C - the future release will make it possible by adding an option to luaconf.h to change function name mangling to be C-compatible. We don't anticipate breaking the FFI interface in the future, but this change was necessary to restore C compatibility.

Closes #121
Fixes #213
2021-11-19 08:10:07 -08:00
Arseny Kapoulkine
4265e58ad1
RFC: coroutine.close (#88) 2021-11-17 06:49:49 -08:00
ccuser44
09ad884ca8
Update SECURITY.md (#209)
In some use cases it is better to encrypt the bytecode, while on others you may want to do both.
2021-11-17 06:42:14 -08:00
ccuser44
a02086260b
Added note to docs about not using os.difftime for new work (#210)
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>

Fixes #194.
2021-11-17 06:42:04 -08:00
Alan Jeffrey
59366ad7f8
Clarified parsing properties of tables in the presence of singleton types (#207) 2021-11-16 14:48:01 -06:00
Pelanyo Kamara
1bf0c75cfd
Merge branch 'Roblox:master' into master 2021-11-16 14:07:24 +00:00
fpliu
e7a443daa8
Fix Android linking issue with libpthread (#203) 2021-11-15 15:01:36 -08:00
Arseny Kapoulkine
6558c271dd
Create SECURITY.md
Fixes #197.
2021-11-15 12:04:26 -08:00
ThePotato
d11e8277c2
Fixes IFTODT error while compiling from an android device (#199)
Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
2021-11-12 06:58:34 -08:00
Arseny Kapoulkine
b7d26b371a
Use -Werror in CI only (#201)
We keep getting compat reports for warnings in various compiler
versions. While we can keep merging PRs to resolve these warnings, it
would be nice if the users of other compilers or compiler versions weren't
blocked on us fixing this.

As such, this change disables Werror by default and only enables it when
requested, which happens in CI in test builds.
2021-11-12 06:56:25 -08:00
Arseny Kapoulkine
70ffc8a01d
RFC: Do not allow method call on string literals (#145) 2021-11-12 06:54:00 -08:00
Arseny Kapoulkine
d47b2f1dfe
Sync to upstream/release/504 (#200)
- Type mismatch errors now show detailed information for compound types, highlighting the mismatching component
- Fix string.pack bug on ARM when packing negative numbers using unsigned formats
- Implement bit32.countlz/countrz (RFC RFC: bit32.countlz/countrz #89)
- Minor compiler throughput optimization (~2% faster compilation)
- Improve transpiler behavior for edge cases and better test coverage (not exposed through CLI at the moment)
- Improve error recovery when parsing invalid assignments
- Build fixes for fuzzing targets
2021-11-12 06:27:34 -08:00
LoganDark
a6a2b86c9b
Fix build on Clang 12 by removing unused variables (#195) 2021-11-11 06:29:59 -08:00
Pelanyo Kamara
c562c12ffe
Merge branch 'Roblox:master' into master 2021-11-10 20:05:07 +00:00
dcope-rbx
68fb2bdfde
Addressed typecasting documentation feedback (#192) 2021-11-10 11:53:43 -08:00
Pelanyo Kamara
53f96ae452
merge 2021-11-10 17:44:22 +00:00
dcope-rbx
4957812b62
Added documentation related to typecasting (#191) 2021-11-10 09:26:20 -08:00
Pelanyo Kamara
aec8fbfd0f
Feature: Web REPL using Emscripten (#138)
Currently doesn't include the new page into navigation since we aren't building the .js files anywhere.
2021-11-10 08:40:46 -08:00
LoganDark
d6b3346f58
move static_assert from ltable.h to ltable.cpp (#189) 2021-11-09 17:02:46 -08:00
Arseny Kapoulkine
f3468be92b Small follow code cleanup for Repl.cpp 2021-11-09 15:11:52 -08:00
NotDSF
3ba0bdf708
Save bytecode to file through CLI (#170)
Using --compile=binary it's now possible to produce binary bytecode so that it can be compiled offline and loaded into the VM.
2021-11-09 14:54:53 -08:00
Arseny Kapoulkine
fe1bf43b54
RFC: bit32.countlz/countrz (#89)
Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com>
2021-11-09 10:40:14 -08:00
LoganDark
9523670e63
Remove Roblox-specific mutable globals (#185)
Instead the code that calls the compiler needs to use Compiler::mutableGlobals to disable GETIMPORT optimization.
2021-11-09 07:06:25 -08:00
LoganDark
773fb5bd6f
Don't allow registry to be set to readonly (#184) 2021-11-08 15:30:51 -08:00
Arseny Kapoulkine
7816f2596f
Update config.yml
Rename "help and support" to "questions"
2021-11-08 15:01:57 -08:00
Pelanyo Kamara
0085d2479a
Merge pull request #2 from MathematicalDessert/webrepl
Webrepl
2021-11-08 19:37:01 +00:00
Pelanyo Kamara
1b6105e20e
add separate build action for emscripten Repl.CLI 2021-11-08 19:35:57 +00:00
LoganDark
7ca09ec100
Fix lbuiltins.cpp comment (#180) 2021-11-08 11:09:30 -08:00
Pelanyo Kamara
b90bf4cd52
add emscripten -fexceptions 2021-11-08 19:06:47 +00:00
Pelanyo Kamara
1bff6154e6
Remove Luau.REPL.Web target. 2021-11-08 16:47:21 +00:00
LoganDark
f1649a43cd
Add userdata to lua_Callbacks (#168) 2021-11-08 08:26:03 -08:00
Pelanyo Kamara
8dde140eff
Remove table-of-contents from demo page 2021-11-08 16:15:32 +00:00
Pelanyo Kamara
25abc605ad
Merge branch 'webrepl' of https://github.com/MathematicalDessert/luau into webrepl 2021-11-08 15:42:50 +00:00
Pelanyo Kamara
cda27b258b
move demo repl to docs 2021-11-08 15:42:23 +00:00
Pelanyo Kamara
24b78c4a80
move demo repl to docs 2021-11-08 15:38:30 +00:00
Arseny Kapoulkine
46244d2ea7
Update getting-started.md
Update file extension from .lua to .luau

Contributes to #97
2021-11-07 23:21:34 -08:00
ThePotato
f27580c74b
Fix linux typo in README.md "Linus" to "Linux" (#174) 2021-11-07 23:19:28 -08:00
Arseny Kapoulkine
16753a78f4
Update navigation.yml
Add GitHub link to top bar
2021-11-07 08:07:57 -08:00