Commit Graph

559 Commits

Author SHA1 Message Date
Arseny Kapoulkine 5b2e39c922
Sync to upstream/release/536 (#592) 2022-07-14 15:52:26 -07:00
Alex Orlenko e87009f5b2
Add lua_setuserdatatag to update userdata tags (#588) 2022-07-14 12:00:37 -07:00
Andy Friesen a934f742d8
June recap (#583) 2022-07-11 13:21:23 -07:00
Anaminus 6ad8239e32
Improve description of bit32.extract/replace. (#585)
Fix description incorrectly saying that parameter w specifies an upper range. w is actually a width. Proof:

    print(bit32.extract(2^32-1, 3, 4)) -- prints 15, not 1.

Also indicate that the position is 0-based, and that the function will error if the selected range exceeds the allowed bounds.
2022-07-08 10:06:25 -07:00
Arseny Kapoulkine 120a7fab70 Merge branch 'merge' 2022-07-07 18:22:50 -07:00
Arseny Kapoulkine 506d971421
Sync to upstream/release/535 (#584) 2022-07-07 18:22:39 -07:00
Arseny Kapoulkine 42244b14df Merge branch 'upstream' into merge 2022-07-07 18:08:06 -07:00
Arseny Kapoulkine f9e76fc75c Merge branch 'master' into merge 2022-07-07 18:07:30 -07:00
Arseny Kapoulkine 4a95f2201e Sync to upstream/release/535 2022-07-07 18:05:31 -07:00
Allan N Jeremy dbcd5fb28e
build: changed data output to be different for each os (#581)
- macos: data-macos-latest.json
- ubuntu: data-ubuntu-latest.json
- windows: data-windows-latest.json
2022-07-07 08:21:40 -07:00
Alan Jeffrey a7ae439b0f
Document new table type features (#567) 2022-07-05 16:25:09 -05:00
Arseny Kapoulkine 42510bb5c8
Fix test after merging a stale PR (#577) 2022-07-05 11:36:33 -07:00
JohnnyMorganz baa35117bd
Use syntheticName for stringified MetatableTypeVar (#563) 2022-07-05 09:19:54 -07:00
JohnnyMorganz 4d98a16ea8
Store resolved types in `astResolvedTypes` (#574) 2022-07-05 09:08:05 -07:00
JohnnyMorganz 6303ae30c4
Fix op used when stringifying AstExprIndexName (#572)
* Fix op used when stringifying AstExprIndexName

* Remove visualizeWithSelf
2022-07-05 08:59:09 -07:00
Arseny Kapoulkine 2460e38998
bench: Implement luau-analyze and luau --compile benchmarks (#575)
This change adds another file for benchmarking luau-analyze and sets up
benchmarks for both non-strict/strict modes for analysis and all three
optimization levels for compilation performance.

To avoid issues with race conditions on repository update we do all this
in the same job in benchmark.yml.

To be able to benchmark both modes from a single file, luau-analyze
gains --mode argument which allows to override the default typechecking
mode. Not sure if we'll want this to be a hard override on top of the
module-specified mode in the future, but this works for now.
2022-07-05 08:23:09 -07:00
Arseny Kapoulkine 48aa7a5162
bench: Implement first class support for callgrind (#570)
Since callgrind allows to control stats collection from the guest, this
allows us to reset the collection right before the benchmark starts.

This change exposes this to the benchmark runner and integrates
callgrind data parsing into bench.py, so that we can run bench.py with
--callgrind argument and, as long as the runner was built with callgrind
support, we get instruction counts from the run.

We convert instruction counts to seconds using 10G instructions/second
rate; there's no correct way to do this without simulating the full CPU
pipeline but it results in time units on a similar scale to real runs.
2022-07-04 11:13:07 -07:00
Arseny Kapoulkine 6467c855e8
Update compatibility.md (#566)
Update `__len` metamethod (pending the code change that implements this)
2022-06-30 17:07:56 -07:00
Arseny Kapoulkine 2daa6497a1
Sync to upstream/release/534 (#569) 2022-06-30 16:52:43 -07:00
Arseny Kapoulkine 065f2dac40 Merge branch 'upstream' into merge 2022-06-30 16:30:01 -07:00
Arseny Kapoulkine 3f716ea007 Merge branch 'master' into merge 2022-06-30 16:29:59 -07:00
Arseny Kapoulkine 8f040862b1 Sync to upstream/release/534 2022-06-30 16:29:02 -07:00
natteko fc763650d3
Fix broken link in typecheck.md (#568)
Current link redirects to 
https://luau-lang.org/typecheck#Roblox-types (notice the fragment) 
which is effectively the same as https://luau-lang.org/typecheck
What the link *wants* to redirect to is 
https://luau-lang.org/typecheck#roblox-types (notice the change in fragment) 
which is the Roblox types segment of the document
2022-06-30 15:14:49 -07:00
Arseny Kapoulkine ee82f1e997
Update sandbox.md
Since we don't have a formal proof, clarify that we don't have known bugs.
2022-06-28 23:13:13 -07:00
Arseny Kapoulkine c29b803046
Update STATUS.md
Add __len metamethod
2022-06-28 09:08:12 -07:00
Arseny Kapoulkine fd82e92628
RFC: Support `__len` metamethod for tables and `rawlen` function (#536) 2022-06-28 09:06:59 -07:00
Arseny Kapoulkine 13e50a9cac
Update library.md (#564)
Clarify behavior of shifts for out of range values.
2022-06-27 09:05:50 -07:00
Arseny Kapoulkine 4cd0443913
Update benchmark.yml
Cleaner names
2022-06-24 18:30:26 -07:00
Arseny Kapoulkine 9846a6c7b9
Update benchmark.yml
Remove all alert/comment functionality
2022-06-24 18:26:15 -07:00
Arseny Kapoulkine 224d35bc9e
Update benchmark.yml
Attempt to fix Windows and other builds
2022-06-24 18:16:12 -07:00
Allan N Jeremy 5e405b58b3
Added multi-os runners for benchmark & implemented luau analyze (#542) 2022-06-24 09:46:29 -07:00
Arseny Kapoulkine e91d80ee25
Update compatibility.md (#559) 2022-06-23 18:56:19 -07:00
Arseny Kapoulkine 08ab7da4db
Sync to upstream/release/533 (#560) 2022-06-23 18:56:00 -07:00
Arseny Kapoulkine 4bf3ace2a6 Merge branch 'upstream' into merge 2022-06-23 18:45:15 -07:00
Arseny Kapoulkine 8544ca2c54 Merge branch 'master' into merge 2022-06-23 18:45:13 -07:00
Arseny Kapoulkine 6d14bdadf4 Sync to upstream/release/533 2022-06-23 18:44:07 -07:00
Arseny Kapoulkine 348ad4d417
Update STATUS.md
Add never and unknown types
2022-06-22 12:54:48 -07:00
Arseny Kapoulkine 1757234f01
Rename none-and-unknown-types.md to never-and-unknown-types.md
This makes the type names match.
2022-06-22 11:16:38 -07:00
Alan Jeffrey 778e62c8f7
RFC: never and unknown types (#434)
Co-authored-by: Alexander McCord <11488393+alexmccord@users.noreply.github.com>
2022-06-22 11:15:41 -07:00
Arseny Kapoulkine ca32d1bf9d
Update library.md (#555)
Fix string.match and string.find type definitions
2022-06-22 09:27:05 -07:00
Qualadore e0ac24d1ed
Correct string.find and string.match return types (#554) 2022-06-22 09:01:34 -07:00
Arseny Kapoulkine ce9f4e23ae
Update performance.md (#553)
Document function inlining and loop unrolling.
2022-06-21 13:14:30 -07:00
Arseny Kapoulkine f1b46f4b96
Sync to upstream/release/532 (#545) 2022-06-16 18:05:14 -07:00
Arseny Kapoulkine fe6850556f Merge branch 'upstream' into merge 2022-06-16 17:54:55 -07:00
Arseny Kapoulkine 88b3984711 Sync to upstream/release/532 2022-06-16 17:54:42 -07:00
Arseny Kapoulkine 1b99d566a9 Merge branch 'upstream' into merge 2022-06-16 17:53:05 -07:00
Arseny Kapoulkine 404653b4ca Merge branch 'master' into merge 2022-06-16 17:53:02 -07:00
Arseny Kapoulkine 316838f253 Sync to upstream/release/531 2022-06-16 17:52:23 -07:00
Alan Jeffrey 948f678f93
Prototyping function overload resolution (#508) 2022-06-14 20:03:43 -07:00
Allan N Jeremy da01056022
Added Luau Benchmark Workflows (#530) 2022-06-14 08:48:07 -07:00
JohnnyMorganz c30ab0647b
Improve table stringifier when line breaks enabled (#488)
* Improve table stringifier when line breaks enabled

* Add FFlag

* Fix FFlags
2022-06-14 08:39:25 -07:00
rblanckaert b066e4c8f8
0.531 (#532)
* Fix free Luau type being fully overwritten by 'any' and causing UAF
* Fix lua_clonefunction implementation replacing top instead of pushing
* Falsey values other than false can now narrow refinements
* Fix lua_getmetatable, lua_getfenv not waking thread up
* FIx a case where lua_objlen could push a new string without thread wakeup or GC
* Moved Luau math and bit32 definitions to definition file 
* Improve Luau parse recovery of incorrect return type token
2022-06-10 09:58:21 -07:00
Rob Blanckaert a6322ed36a Merge branch 'upstream' into merge 2022-06-09 18:34:22 -07:00
Rodactor 7df9408851 Sync to origin/release/531 2022-06-09 18:31:12 -07:00
Rob Blanckaert 44a5cb6d52 Merge remote-tracking branch 'origin/master' into merge 2022-06-09 18:24:58 -07:00
Arseny Kapoulkine ca5fbbfc24
Mark generalized iteration RFC as implemented 2022-06-09 10:18:29 -07:00
Arseny Kapoulkine bcab792e0d
Update STATUS.md
Generalized iteration got implemented, safe indexing got dropped.
2022-06-09 10:18:03 -07:00
Arseny Kapoulkine b8ef743721
RFC: Do not implement safe navigation operator (#501)
This meta-RFC proposes removing the previously accepted RFC on safe navigation operator. This is probably going to be disappointing but is the best course of action that reflects our ideals in language evolution.

See PR thread for rationale and discussion.
2022-06-09 10:03:37 -07:00
Petri Häkkinen b44912cd20
Allow vector fastcall constructor to work with 3-4 arguments with 4-wide vectors (#511) 2022-06-09 09:41:52 -07:00
Daniel Nachun 9619f036ac
fix build with newer GCC (#522) 2022-06-06 15:52:55 -07:00
rblanckaert 55a026811a
Sync to upstream/release/530 (#517)
* Run clang-format
* Contains a preliminary implementation of deferred constraint resolution
* Reduce stack usage by some recursive functions
* Fix a bug when smartCloning a BoundTypeVar
* Remove some GC related flags from VM
2022-06-03 15:15:45 -07:00
Rob Blanckaert a78b6d59e9 Merge branch 'upstream' into merge 2022-06-03 13:35:49 -07:00
Rob Blanckaert 188ffdfdfb Merge remote-tracking branch 'origin/master' into merge 2022-06-03 13:34:19 -07:00
Rob Blanckaert 871a3a21c5 Sync to origin/release/530 2022-06-03 13:32:20 -07:00
vegorov-rbx edd071f99a
Luau Recap: May 2022 (#513)
* Recap is ready

* Change the intro format so it shows up in the news section snippet

* Fixed line breaks that were implied

* Update docs/_posts/2022-06-01-luau-recap-may-2022.md

Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>

* Drop Autocomplete improvements and extend compiler optimization section

In the cross-post to Roblox developer forum, Autocomplete section will be restored, while compiler optimization section can be optionally removed (although it might interest some developers)

* One more optimization

* Update docs/_posts/2022-06-01-luau-recap-may-2022.md

Co-authored-by: dcope-rbx <91100513+dcope-rbx@users.noreply.github.com>

Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Co-authored-by: dcope-rbx <91100513+dcope-rbx@users.noreply.github.com>
2022-06-01 16:27:42 -07:00
Arseny Kapoulkine 10ed02470c
Update compatibility.md
Add a note on light C functions that Lua 5.2 added; suggested by #512.
2022-06-01 14:19:17 -04:00
rblanckaert 61766a692c
Sync to upstream/release/529 (#505)
* Adds a currently unused x86-64 assembler as a prerequisite for possible future JIT compilation
* Fix a bug in table iteration (closes Possible table iteration bug #504)
* Improved warning method when function is used as a type
* Fix a bug with unsandboxed iteration with pairs()
* Type of coroutine.status() is now a union of value types
* Bytecode output for tests/debugging now has labels
* Improvements to loop unrolling cost estimation
* Report errors when the key obviously doesn't exist in the table
2022-05-26 15:08:16 -07:00
Rob Blanckaert b2f4f70274 Merge hotfix: x64 AssemblyBuilder: Don't copy data of size zero 2022-05-26 14:46:41 -07:00
Rob Blanckaert 01f36ef4e8 Merge branch 'upstream' into merge 2022-05-26 14:00:15 -07:00
Rob Blanckaert fa2794e681 Merge remote-tracking branch 'origin/master' into merge 2022-05-26 13:58:18 -07:00
Rob Blanckaert c4e05eb7c1 Sync to upstream/release/529 2022-05-26 13:33:48 -07:00
Austin e13f17e225
Fix VM inconsistency caused by userdata C TM fast paths (#497)
This fixes usage of userdata C functions in xpcall handler following call stack overflow
2022-05-24 11:32:03 -07:00
T 'Filtered' C 69acf5ac07
Make coroutine.status use a string literal (#500)
Implements #495 
C++ isn't a language im very familliar with so this might be completely wrong
2022-05-24 11:29:17 -07:00
Petri Häkkinen fb9c4311d8
Add lua_tolightuserdata, optimized lua_topointer (#496)
Co-authored-by: Petri Häkkinen <petrih@rmd.remedy.fi>
2022-05-24 08:59:12 -07:00
Arseny Kapoulkine 70ff6b4347
Update performance.md (#494)
Add a section on table length optimizations and reword the table iteration section a bit to account for generalized iteration.
2022-05-20 13:00:53 -07:00
Arseny Kapoulkine f5923aefeb
Sync to upstream/release/527 (#491) 2022-05-19 17:02:24 -07:00
Arseny Kapoulkine 0a0012e26d Merge branch 'upstream' into merge 2022-05-19 16:48:13 -07:00
Arseny Kapoulkine 8c52852592 Merge branch 'master' into merge 2022-05-19 16:47:10 -07:00
Arseny Kapoulkine 7e9e697489 Sync to upstream/release/527 2022-05-19 16:46:52 -07:00
JohnnyMorganz 8b4c6aabc2
Fix findAstAncestry when position is at eof (#490) 2022-05-18 16:26:05 -07:00
JohnnyMorganz f2191b9e4d
Respect useLineBreaks for union/intersect toString (#487)
* Respect useLineBreaks for union/intersect toString

* Apply suggestions from code review

Co-authored-by: Andy Friesen <andy.friesen@gmail.com>

Co-authored-by: Andy Friesen <andy.friesen@gmail.com>
2022-05-17 11:22:54 -07:00
JohnnyMorganz ab4bb355a3
Add `ToStringOptions.hideFunctionSelfArgument` (#486)
Adds an option to hide the `self: type` argument as the first argument in the string representation of a named function type var if the ftv hasSelf.

Also added in a test for the original output (i.e., if the option was disabled)

I didn't apply this option in the normal `Luau::toString()` function, just the `Luau::toStringNamedFunction()` one (for my usecase, that is enough + I felt like a named function would include the method colon `:` to signify self). If this is unintuitive, I can also add it to the general `Luau::toString()` function.
2022-05-16 09:50:15 -07:00
Arseny Kapoulkine a36b1eb29b
Sync to upstream/release/527 (#481) 2022-05-13 12:36:37 -07:00
Arseny Kapoulkine 982024bdc7 Merge branch 'upstream' into merge 2022-05-13 12:17:13 -07:00
Arseny Kapoulkine 10af54f68b Merge branch 'master' into merge 2022-05-13 12:17:11 -07:00
Arseny Kapoulkine 298b33859b Sync to upstream/release/527 2022-05-13 12:16:50 -07:00
Arseny Kapoulkine 87fe15ac51
Update STATUS.md
Mark last table subtyping RFC as implemented
2022-05-12 10:08:36 -07:00
Arseny Kapoulkine a775e6dc8e
Mark last table subtyping RFC as implemented 2022-05-12 10:08:10 -07:00
Arseny Kapoulkine 105e74c7d9
Update STATUS.md
Both generalized iteration and LBC are implemented but not fully enabled in Roblox yet.
2022-05-11 15:14:51 -07:00
Arseny Kapoulkine f3f231ea6b
Update compatibility.md
Update `__pairs` note with `__iter`, change `__len` to unsure as with `__iter` lack of `__len` on tables is the only issue preventing complete user created containers.
2022-05-09 18:38:10 -07:00
Arseny Kapoulkine be0b7d07e2
Update sandbox.md
Replace debug.getinfo with debug.info
2022-05-09 18:34:31 -07:00
Arseny Kapoulkine 7935f9f8b6
Update sandbox.md
Reword the GC docs to avoid back-referencing the thread identity mechanism, since it's entirely Roblox-side and isn't fully documented here anymore.
2022-05-09 18:33:53 -07:00
Arseny Kapoulkine 72d8d44343
Add documentation for generalized iteration (#475) 2022-05-05 17:05:57 -07:00
Arseny Kapoulkine e9cc76a3d5
Sync to upstream/release/526 (#477) 2022-05-05 17:03:43 -07:00
Arseny Kapoulkine 08ac2176c5 Merge branch 'upstream' into merge 2022-05-05 16:53:50 -07:00
Arseny Kapoulkine a76a92f4a3 Merge branch 'master' into merge 2022-05-05 16:53:35 -07:00
Arseny Kapoulkine bb57bf9603 Sync to upstream/release/526 2022-05-05 16:52:48 -07:00
phoebe 57016582a7
fix feed link (#476) 2022-05-05 14:37:27 -07:00
byte-chan™ 9156b5ae6d
Fix non-C locale issues in REPL (#474) 2022-05-04 12:27:12 -07:00
Alexander McCord 47a8d28aa9
Fix a typo in recap. (#472) 2022-05-03 16:12:59 -07:00