Comments (2)
May be more complicated than I thought:
key glob_uuid = "<some_uuid>";
// float but with an "int-like" constant
float int_like = 1;
float int_like_2 = int_like;
list list_glob = [glob_uuid, int_like, int_like_2];
default
{
state_entry()
{
key local_uuid = "<some_uuid>";
llOwnerSay(
// string-like under LSO
(string)llGetListEntryType(list_glob, 0) +
// int-like under LSO
(string)llGetListEntryType(list_glob, 1) +
// also int-like under LSO
(string)llGetListEntryType(list_glob, 2) +
// float-like under both LSO and mono
(string)llGetListEntryType((list)int_like, 0) +
// float-like under both LSO and mono
(string)llGetListEntryType([int_like], 0) +
// key-like under both LSO and mono
(string)llGetListEntryType([glob_uuid], 0) +
// string-like under LSO
(string)llGetListEntryType((list)glob_uuid, 0) +
// key-like under both LSO and mono
(string)llGetListEntryType([local_uuid], 0) +
// string-like under LSO.
(string)llGetListEntryType((list)local_uuid, 0)
);
}
}
Prints "311224343" under LSO but "422224444" under Mono. I suspect key values are usually stored on the heap as an LST_STRING
, and the "key-ness" is specifically added by the instruction that pushes the entry onto the list in the list expression case (which is typed and forces key.)
keys appears to always lose key-ness as do global list "expressions" (really simpleassignables under LL's compiler,) as do list
casts.
There's some similar logic for floats with "int-like" constants under LSO, but "float-ness" is never lost through casting a global because it doesn't have an existing heap entry that can be used like keys do.
from tailslide.
Mostly handled in the LSO branch. Currently the constant value propagation more closely matches Mono so using non-strict global validation or optimization on scripts meant to run on LSO will break them. Would need LSO-specific constant value propagation to support it, and I'm not really interested in doing that right now.
from tailslide.
Related Issues (20)
- Replace Flex + Bison grammar with PEG? HOT 2
- \xFF should be treated as a line comment terminator HOT 2
- LL's compiler allows duplicating identifiers over 255 bytes HOT 1
- Rewrite Logger API
- Improve AST / linked list performance HOT 2
- Improve CIL codegen HOT 3
- Make exported headers C++14 (or at least C++17)-friendly across compilers HOT 2
- Lexer's tailslide_tokentype enum leaks into the public API HOT 1
- Use class members instead of linked list of children for fixed-width nodes HOT 2
- Write CIL conformance fuzzer HOT 1
- Write stubs to allow executing CIL-compiled scripts as EXEs HOT 1
- Use SFINAE instead of if constexpr in BitStream HOT 1
- Create autobuild package HOT 1
- Examine possibility of merging passes HOT 1
- Expose interface to `yy_scan_buffer` / `yy_scan_bytes` HOT 1
- Cross-compile binaries for OS X arm64 in CI
- Allocator doesn't guard against quadratic blowup in constant folding HOT 1
- Missing constant value inference rules for declarations with no rvalue HOT 2
- Make typedness of print() expression match LL's compiler HOT 1
- Void functions are allowed to return the results of void expressions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tailslide.