Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
6b5cf17
The optimizer keeps a pure call made again in a local, where that is …
RyeMutt Oct 4, 2026
1533532
Two vectors' dot and cross products fold to what the VM gives
RyeMutt Oct 4, 2026
d8f8440
A local set to a constant is that constant where it is read before it…
RyeMutt Oct 4, 2026
c2864ac
A comparison the ranges of its sides settle folds: a count is never b…
RyeMutt Oct 4, 2026
42c0059
Convert to SLua makes bit32's answers LSL's signed integers
RyeMutt Oct 4, 2026
040bb77
Convert to SLua carries the script's comments over
RyeMutt Oct 4, 2026
817b3cf
The optimizer's float folding is built without the viewer's fast-math…
RyeMutt Oct 4, 2026
df255ac
The registry's baseline takes Tailslide's vector products and slua's …
RyeMutt Oct 4, 2026
b389ff7
Bit tests of one value merge into one (L18)
RyeMutt Oct 4, 2026
8f07605
The column selection's commands are registered as ones no menu item g…
RyeMutt Oct 4, 2026
3bdffa5
Convert to SLua's carrying of the script's comments has a preference
RyeMutt Oct 4, 2026
558e96b
More of the library folds where the two VMs cannot part (L17)
RyeMutt Oct 4, 2026
3dbbfc4
A jump on LSL on Luau costs what it costs, every run
RyeMutt Oct 4, 2026
aade1e1
Convert to SLua signs bit32's answers with SLua's own bit32.s32
RyeMutt Oct 4, 2026
f644eaa
LL's LSL compiler, restored as it was (L1)
RyeMutt Oct 4, 2026
cd58672
LL's compiler's entry points, restored as they were (L1)
RyeMutt Oct 4, 2026
7e0e818
LL's compiler takes what follows from the definitions from lsl-defini…
RyeMutt Oct 4, 2026
d696196
LL's compiler builds, for the tests (L1)
RyeMutt Oct 4, 2026
a2dee42
LL's compiler frees what it made once, and finds a name in an outer s…
RyeMutt Oct 4, 2026
376514d
LL's compiler boxes a list in a list as the grid's release build does…
RyeMutt Oct 4, 2026
c069d87
LL's compiler called on a text, to LSO or to CIL, with tests (L2)
RyeMutt Oct 4, 2026
ed8357f
What a text view draws before its rows stays within its text
RyeMutt Oct 4, 2026
cbd838a
Convert to SLua writes its script into the prim the LSL is in
RyeMutt Oct 4, 2026
38b7688
A line diff lined up at lines known to stand for each other
RyeMutt Oct 4, 2026
157e359
A comparison lines up at anchors, and what is typed in it goes to its…
RyeMutt Oct 4, 2026
265e652
Convert to SLua says which line of SLua each line of LSL became
RyeMutt Oct 4, 2026
fa7e779
Script Studio's comparisons say unsaved only while it is, and give wa…
RyeMutt Oct 4, 2026
eb88323
LL's LSO VM, restored as it was (L5)
RyeMutt Oct 4, 2026
5d327ea
LL's LSO VM builds, and runs a compiled image (L5)
RyeMutt Oct 4, 2026
29729bf
The Mono weigher reads any compiler's CIL, and counts a member by its…
RyeMutt Oct 4, 2026
d232ba7
Tailslide's LSO and CIL held against LL's compiler's, and the Mono we…
RyeMutt Oct 4, 2026
50e5b84
The optimizer's size shapes leave two numbers to the folder
RyeMutt Oct 4, 2026
d1b45c9
Tailslide 1.5.14, compiling as LL's compiler does, and Mono weighed a…
RyeMutt Oct 4, 2026
123bc62
The optimizer writes ++x, leaves a default out, and casts a negative …
RyeMutt Oct 4, 2026
27ed957
The optimizer's passes each in a file of their own
RyeMutt Oct 4, 2026
21323d1
alscript in folders: core, lint, lsl, lsl/optimizer, luau, preprocessor
RyeMutt Oct 4, 2026
cc99f91
The optimizer's operators, branches, loops and keys in fewer bytes
RyeMutt Oct 4, 2026
6d8771a
The optimizer's functions, scratch globals and dead stores in fewer b…
RyeMutt Oct 4, 2026
fa1b0f0
The optimizer keeps globals' reads and repeated constants once, and c…
RyeMutt Oct 4, 2026
309b70b
LSO joins string literals, and a loop that never ends runs by a jump …
RyeMutt Oct 4, 2026
2c5b9a7
Clean up duplicated cmake
RyeMutt Oct 4, 2026
03fd58b
Convert to SLua takes a state's field handlers off with LLEvents:off
RyeMutt Oct 4, 2026
c349bc5
A copy from the compare view leaves out the rows that line the sides up
RyeMutt Oct 4, 2026
771d495
Convert to SLua in fewer calls: bit32.btest, table.append, NULL_KEY
RyeMutt Oct 4, 2026
a0fda9b
Convert to SLua counts by a constant's name, and declares first only …
RyeMutt Oct 4, 2026
2bf3525
Convert to SLua keeps the script's comments where it laid them out
RyeMutt Oct 4, 2026
91b94b5
Convert to SLua lines up again what the LSL lined up
RyeMutt Oct 4, 2026
5255b63
Vim's registers are shared by every editor of the studio, in every wi…
RyeMutt Oct 4, 2026
1b3d094
Convert to SLua keeps hexadecimal past 0x7FFFFFFF where bit32 takes it
RyeMutt Oct 4, 2026
df130d6
Integer literals past 32 bits read as the grid reads them: -1
RyeMutt Oct 4, 2026
56f8a78
Convert to SLua keeps a mask's hexadecimal where only bit32 reads it
RyeMutt Oct 4, 2026
d19dd22
SlIntegerPast32Bits: a whole number past 0xFFFFFFFF, which LSL reads …
RyeMutt Oct 4, 2026
671891c
Convert to SLua says once what hexadecimal past 0x7FFFFFFF and bit32.…
RyeMutt Oct 4, 2026
2e9f9f8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 4, 2026
81d4ee6
The optimizer casts a string to an integer as the grid's 32-bit hosts do
RyeMutt Oct 4, 2026
30f6b2e
Tailslide folds a string cast to an integer as the grid's 32-bit host…
RyeMutt Oct 4, 2026
40ff804
The library's float functions fold only where two ways of working the…
RyeMutt Oct 4, 2026
c66c793
Fix pre-commit failure due to tabs
RyeMutt Oct 4, 2026
a2817eb
The analyzers test stands in for the viewer's RLV name, as the other …
RyeMutt Oct 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ CMake with vcpkg for dependency management. The source root for CMake is `indra/
- CMake 4.0+, Visual Studio 2022/2026 (Windows) or Xcode (macOS) or GCC/Clang+Ninja (Linux)
- Rust and the .NET SDK (`dotnet tool restore`) only for Velopack installers
- Python 3 with `llsd` (`pip install -r requirements.txt`) only for the four tests that spawn a Python peer; without it they are registered disabled
- Python 3 with `PyYAML` and `llsd`, plus bison and flex, only for LL's LSL compiler (`indra/lscript`, a test-only reference); without them it is left out

CMake files are formatted with gersemi (`.gersemirc` at the repo root): run `gersemi -i <files>` on any CMake file you edit.

Expand Down
2 changes: 2 additions & 0 deletions doc/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
- **llwebrtc** - WebRTC voice integration (conditional)
- **llphysicsextensionsos** - Physics extensions stub (VHACD convex decomposition)
- **media_plugins** - Out-of-process media plugin implementations (CEF, VLC, GStreamer)
- **alscript** - Script Studio's language services, free of UI (depends on llcommon, llmath, Tailslide and SLua's Luau). One folder a part, each on the include path: `core/` (problems, symbols, the lexicon, messages, weights, the formatter), `lint/` (the studio's lints and fixes), `lsl/` (the LSL analyzer over Tailslide, the SLua converter), `lsl/optimizer/` (the LSL optimizer, a pass a file, sharing `allsloptimizerpass.h`), `luau/` (the SLua analyzer) and `preprocessor/` (the preprocessor and its includes)
- **lscript** - LL's LSL compiler and LSO VM, restored as a test-only reference for the optimizer and the weigher; built with tests, never linked into the viewer
- **newview** - The main viewer application. Contains all viewer-specific logic: the rendering pipeline, scene graph, UI floaters/panels, settings, object/avatar systems, and the application entry point. Links against all libraries above plus third-party: Tracy, OpenXR, Discord SDK, NVAPI, TinyEXR, Velopack

### Application Lifecycle
Expand Down
4 changes: 3 additions & 1 deletion doc/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ Enable tests at configure time:
cmake -S indra --preset <preset> -DAL_BUILD_TESTS=ON
```

Four tests drive a Python peer (`llleap`, `llprocess`, `llsdserialize`, `llcorehttp`); they need a Python 3 interpreter with the `llsd` package (`pip install -r requirements.txt`, in a venv if you like) and are registered disabled when configure finds none. Nothing else in the build runs Python.
Four tests drive a Python peer (`llleap`, `llprocess`, `llsdserialize`, `llcorehttp`); they need a Python 3 interpreter with the `llsd` package (`pip install -r requirements.txt`, in a venv if you like) and are registered disabled when configure finds none.

LL's LSL compiler (`indra/lscript`), restored as a reference for the script tests, is built only with tests on. Its lexer, grammar, newer event nodes and library table are written at build time by lsl-definitions' own generator, which needs Python with `PyYAML` and `llsd` (both in `requirements.txt`), and then put through `bison` and `flex`. Where any of them is missing, configure leaves the library out and the configuration report says what it needs. Nothing else in the build runs Python.

The `llrender` suites render on a hidden SDL window with the platform's own GL -- WGL on Windows, EGL on Linux, and where Linux has no display SDL's offscreen driver over Mesa (set `LIBGL_ALWAYS_SOFTWARE=1` for llvmpipe on a machine with no GPU). A host with no GL 4.1 to give, such as a CI runner without a graphics driver, configures with `-DAL_ENABLE_GL_TESTS=OFF`: those suites still build, and CTest reports them as not run rather than failed. They carry the label `gl`, so `ctest -LE gl` skips them for one run.

Expand Down
4 changes: 4 additions & 0 deletions indra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ add_subdirectory(template_verifier)
add_subdirectory(dullahan)
add_subdirectory(llprecompiled)
add_subdirectory(alscript)
if(AL_BUILD_TESTS)
# LL's LSL compiler, restored as a reference for the script tests.
add_subdirectory(lscript)
endif()
add_subdirectory(llaudio)
add_subdirectory(llappearance)
add_subdirectory(llcharacter)
Expand Down
238 changes: 158 additions & 80 deletions indra/alscript/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,101 +6,179 @@

add_library(alscript STATIC)

# Each folder is a part of the library, and each is on the include path,
# so that a header is named alone wherever it is used:
# core/ what both languages share: problems, spans and symbols, the
# lexicon, the messages, a script's weight, the formatter;
# lint/ the studio's own lints over both languages, and the fixes;
# lsl/ the LSL analyzer over Tailslide, and what reads LSL;
# lsl/optimizer/ the LSL optimizer, a pass a file;
# luau/ the SLua analyzer over Second Life's fork of Luau;
# preprocessor/ the preprocessor, its includes and what it keeps.
target_sources(
alscript
PRIVATE
aldiskcache.cpp
aldiskincludes.cpp
alincludeidentity.cpp
alincludesearch.cpp
almodulelook.cpp
allslconsts.cpp
allslcosts.cpp
allsleffects.cpp
allsllintpass.cpp
allslinliner.cpp
almessagemap.cpp
allsloptimizer.cpp
alluauconfig.cpp
alluauexports.cpp
alluauservice.cpp
allslexports.cpp
allslservice.cpp
allsltoslua.cpp
allsltraits.cpp
allslvalues.cpp
alpreprocessor.cpp
alscriptenvelope.cpp
alscriptfixes.cpp
alscriptformatter.cpp
alscriptlexicon.cpp
alscriptlintpass.cpp
alscriptmessages.cpp
alscriptnameindex.cpp
alscriptsnapshot.cpp
alnotecardformat.cpp
alscriptweight.cpp
alscriptstack.cpp
alscripttempfiles.cpp
alscripttextcache.cpp
alselenefilters.cpp
alsourcemap.cpp
core/almessagemap.cpp
core/alnotecardformat.cpp
core/alscriptformatter.cpp
core/alscriptlexicon.cpp
core/alscriptmessages.cpp
core/alscriptnameindex.cpp
core/alscriptstack.cpp
core/alscripttempfiles.cpp
core/alscriptweight.cpp
lint/allsllintpass.cpp
lint/alscriptfixes.cpp
lint/alscriptlintpass.cpp
lint/alselenefilters.cpp
lsl/allslconsts.cpp
lsl/allsleffects.cpp
lsl/allslexports.cpp
lsl/allslservice.cpp
lsl/allsltoslua.cpp
lsl/allsltraits.cpp
lsl/allslvalues.cpp
lsl/optimizer/allslconstantglobals.cpp
lsl/optimizer/allslcosts.cpp
lsl/optimizer/allslbranches.cpp
lsl/optimizer/allsldeadcode.cpp
lsl/optimizer/allslflowvalues.cpp
lsl/optimizer/allslfolder.cpp
lsl/optimizer/allslglobals.cpp
lsl/optimizer/allslinliner.cpp
lsl/optimizer/allsllibraryfold.cpp
lsl/optimizer/allslnames.cpp
lsl/optimizer/allsloptimizer.cpp
lsl/optimizer/allsloptimizerpass.cpp
lsl/optimizer/allslprinter.cpp
lsl/optimizer/allslrepeatedcalls.cpp
lsl/optimizer/allslshapes.cpp
lsl/optimizer/allslsignatures.cpp
lsl/optimizer/allslsimplifier.cpp
luau/alluauconfig.cpp
luau/alluauexports.cpp
luau/alluauservice.cpp
preprocessor/aldiskcache.cpp
preprocessor/aldiskincludes.cpp
preprocessor/alincludeidentity.cpp
preprocessor/alincludesearch.cpp
preprocessor/almodulelook.cpp
preprocessor/alpreprocessor.cpp
preprocessor/alscriptenvelope.cpp
preprocessor/alscriptsnapshot.cpp
preprocessor/alscripttextcache.cpp
preprocessor/alsourcemap.cpp
)

target_sources(
alscript
PUBLIC
FILE_SET HEADERS
FILES
aldiskcache.h
aldiskincludes.h
alincludeidentity.h
alincludesearch.h
almodulelook.h
allslconsts.h
allslcosts.h
allsleffects.h
allsllintpass.h
allslinliner.h
almessagemap.h
allsloptimizer.h
allsltraits.inc
allsluuids.inc
allsleventtext.inc
alluauconfig.h
alluauexports.h
alluauservice.h
allslexports.h
allslservice.h
allsltoslua.h
allsltraits.h
allslvalues.h
alpreprocessor.h
alscriptengine.h
alscriptenvelope.h
alscriptfixes.h
alscriptformatter.h
alscriptjoblane.h
alscriptlexicon.h
alscriptlintpass.h
alscriptmessages.h
alscriptnameindex.h
alscriptsnapshot.h
alscriptspan.h
alnotecardformat.h
alscriptproblem.h
alscriptstack.h
alscriptsymbol.h
alscripttempfiles.h
alscripttextcache.h
alscriptweight.h
alselenefilters.h
alsourcemap.h
core/almessagemap.h
core/alnotecardformat.h
core/alscriptengine.h
core/alscriptformatter.h
core/alscriptlexicon.h
core/alscriptmessages.h
core/alscriptnameindex.h
core/alscriptproblem.h
core/alscriptspan.h
core/alscriptstack.h
core/alscriptsymbol.h
core/alscripttempfiles.h
core/alscriptweight.h
lint/allsllintpass.h
lint/alscriptfixes.h
lint/alscriptlintpass.h
lint/alselenefilters.h
lsl/allslconsts.h
lsl/allsleffects.h
lsl/allsleventtext.inc
lsl/allslexports.h
lsl/allslservice.h
lsl/allsltoslua.h
lsl/allsltraits.h
lsl/allsltraits.inc
lsl/allsluuids.inc
lsl/allslvalues.h
lsl/optimizer/allslconstantglobals.h
lsl/optimizer/allslcosts.h
lsl/optimizer/allslbranches.h
lsl/optimizer/allsldeadcode.h
lsl/optimizer/allslflowvalues.h
lsl/optimizer/allslfolder.h
lsl/optimizer/allslglobals.h
lsl/optimizer/allslinliner.h
lsl/optimizer/allsllibraryfold.h
lsl/optimizer/allslnames.h
lsl/optimizer/allsloptimizer.h
lsl/optimizer/allsloptimizerpass.h
lsl/optimizer/allslprinter.h
lsl/optimizer/allslrepeatedcalls.h
lsl/optimizer/allslshapes.h
lsl/optimizer/allslsignatures.h
lsl/optimizer/allslsimplifier.h
luau/alluauconfig.h
luau/alluauexports.h
luau/alluauservice.h
preprocessor/aldiskcache.h
preprocessor/aldiskincludes.h
preprocessor/alincludeidentity.h
preprocessor/alincludesearch.h
preprocessor/almodulelook.h
preprocessor/alpreprocessor.h
preprocessor/alscriptenvelope.h
preprocessor/alscriptjoblane.h
preprocessor/alscriptsnapshot.h
preprocessor/alscripttextcache.h
preprocessor/alsourcemap.h
)

target_include_directories(
alscript
PUBLIC core lint lsl lsl/optimizer luau preprocessor
)

target_link_libraries(alscript PRIVATE al::flags ll::slua ll::tailslide llmath PUBLIC llcommon)
target_precompile_headers(alscript REUSE_FROM llprecompiled)

# The optimizer folds LSL's floats to what the VM gives and prints them so
# that they read back as themselves: IEEE's arithmetic a step at a time, and
# a zero's sign kept. The viewer's float flags (00-Common.cmake) let the
# compiler reassociate, fuse a product into a sum, take a reciprocal for a
# division and forget a zero's sign -- a vector normalised as a product with
# 1 / mag where the code divides -- so these are built without them, and
# without the precompiled header those flags were part of.
if(WINDOWS)
set(alscript_ieee_options /fp:precise)
else()
set(
alscript_ieee_options
-ffp-contract=off
-fno-associative-math
-fno-reciprocal-math
-fsigned-zeros
)
endif()
set_source_files_properties(
lsl/allslvalues.cpp
lsl/optimizer/allslbranches.cpp
lsl/optimizer/allslconstantglobals.cpp
lsl/optimizer/allsldeadcode.cpp
lsl/optimizer/allslflowvalues.cpp
lsl/optimizer/allslfolder.cpp
lsl/optimizer/allsllibraryfold.cpp
lsl/optimizer/allslnames.cpp
lsl/optimizer/allsloptimizer.cpp
lsl/optimizer/allsloptimizerpass.cpp
lsl/optimizer/allslprinter.cpp
lsl/optimizer/allslrepeatedcalls.cpp
lsl/optimizer/allslshapes.cpp
lsl/optimizer/allslsimplifier.cpp
PROPERTIES COMPILE_OPTIONS "${alscript_ieee_options}" SKIP_PRECOMPILE_HEADERS TRUE
)

# tests
if(AL_BUILD_TESTS)
# The tests check real scripts against the grid's own definitions, which
Expand Down
Loading
Loading