* extend tests
* more tests for world save
* explicit handle the special layers in wornitem
* add Location variant and relocate() methods
* refactor GottenItem and ensure Chr, not wornitems, is saved
* deflake escript watch test
* dropitem and undo refactoring
* uomod changes
* add more item tests (buy, sell, hair...)
* use location for undoing trade container properly
* rewrite loaddata to use relocate, fixing startup crashes
* do remaining location changes
* fix CI tests
* remove container pointer from item and add wearer() reference
* remove layer writes and explicit intrinsic weapon handling
* add preparing state for fresh items without serial number
* move wornitems to detached state only when it has a serial number
* load corpse items into the correct layer
* do not set a layer on load before the item is equipped
* add more tests to equipped and intrinsic items
* remove layer and substitute with the location()
* add core-changes summary
* mark items as being worn on corpse if they only moved within the corpse
* block Preparing from being reached, just to be sure
* added integrity sweep check
* Reduce direect changes to item location
* Add Item::move_into() and rewrite calling sites
* Fix container slots
* get rid of the slot_index on the item, because Location() already has it
* fix race in test leading to macos issues
* fix dangling pointer
* remove corpse can_equip_list and rely on the GottenItem rules to dress the corpse again
* let item->destroy() detach the item
* make integrity checks fail the tests
* use place_at(item, newpos) for changing item position InWorld
* add boat test for item moved out of boat that should not be visible anymore
* use place_at() in more places
* ensure CreateItemAtLocation really does
* fix Claude instructions
* remove state we didn't need
* fine tuning
* reduce test flakiness
* all except pol
* pol and includes under defines
* something weird has happened
* remove own folder from include searchpath
* fixed remaining, adapted include style for external headers
* missing include
* Fix ShortCircuit jump optimization corrupting assignments
The short-circuit jump optimizer threaded a logical jump past an
opposite-type logical jump (offset++). That target pops the value on
fall-through (Executor::ins_logical_jump), so skipping it left a stray
value on the stack, which corrupts a following stack-addressed assignment:
var x := ( a && b ) || ( c && d );
left x uninitialized whenever the first clause was false (i.e. the
deciding clause is not the first operand). The same chain works as an
if() condition or when declaration and assignment are split
( var x; x := ... ).
Only thread same-type logical jumps; keep targeting opposite-type ones so
their fall-through pop still runs.
Adds testsuite/escript/opt/shortcircuit7 exercising the value / assignment
context (companion to shortcircuit6's if()-condition tests).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* removed other unsafe jump merges
additional test
* adapted testdata
* core changes xml
---------
Co-authored-by: Oleksii Rebreniuk <oleksii.rebreniuk@shopit.se>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fixed_allocator cleanup
template argument is now the type and not the size
general cleanup, rewrote refill loop to better understand whats
happening
possibility to use different alignments (not needed for the used types)
* adapted fixed_allocator usage
* simplified message_queue conditial wait, removed unused header
* use moveonlyfunction for logging queue
* cleanup and performance improvment for clienttransmit
* use moveonlyfunction for sql
* fixed use after move
* TaskThreadPool uses moveonlyfunction
* catch exception locally without stopping the complete workerthread
* message_queue pop with timeout
* DynTaskThreadPool changes
- using move_only_function
- general simplification
- minimum of 4 threads
- added idle timeout to get rid of workers
* simplified auxpoolthread usage
* fixed threadmap initialization
* to avoid static initialization problem dont prefill worker threada in
the constructor
update macos to latest which hopefully supports jthreads
* removed debug logs
* seems macos-latest is not always 26, explicitly use it
* added jitter for timeout
secured the logic when to spawn a new thread more
busyguard is now used to track a message compare value against
live_threads to decide if a new thread should be spawned
unique name per poolworker
* store globals as weakptr in class/funcs to prevent memleak when stored
as global WIP
* let it crash if globals are no longer valid?
* typo
* removed debug prints
* let only the current executor crash
* fixed logic
* added and corrected tests
* cleanup
* use emplace_back
* classes also need to switch to weakptr
* docs
* using fmt instead of ostringstream
misc cleanup
* missing external libs for clang tidy check
* added test for cprops ignore while stacking
door descriptor
* use contains instead of count, removed disabled ancient code
* pack/packonto simplification/speedup
instead of using ostream and convert to string, use format and directly
a string
* refactor gump pkt creation
* testclient returns buttonid 1 pressed when 'button' is contained in the
commands
* extended test
* cleanup destructor mess a bit
* store gumps as pair to decide if the executor needs to be revived
more refactoring
* disallow copy, if used creates nasty bugs
* helper method to convert imp to character
* gumpevent
* new non-blocking dialog function, sends event instead
* test closegump
* test if serialnumber gets correctly converted and invalid entries get
skipped
* removed unused BApplicPtr class
added BApplicObjBase to impptrIf convert function
* use impptrIf
* CloseGump accepts now also an array of characters
extended tests
* moved deleted copy constructor to the public part
* by default clang tidy will check .inc files, removed this filter
* the last tidy run with modernize-loop wasnt added to the PR check
* keep vector with chr and gumpid per uomod
to prevent growing dont add to the cache if same chr with same id
already exists.
* docs
* core-changes
* let clang-tidy do its thing
* Automated clang-tidy change: modernize-use-override
* compile test
---------
Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
* refactored call_method for classes
* cleanParams have to be called after func result is set
* added special bobjectimp to skip valuestack modifications
(Todo: name and comments)
* cleanup
* ListingWriter prints filepath, filelineno and source line
the old compiler did it, now again in the new compiler
since shortcircuit the original sourcelines are available during compilation
* remove listfile.inc function from test result
* prefix output
* custom formatting
* docs
* impptr_if now accepts also const BObjectImp*
* cfg::GetConfigInt returns error if the value would produce an overflow
code cleanup of cfgmod
added tests
* increase test coverage
* added comment why the exception should be catched without reaction
fixed member_id test
* added corechanges
its 2026
removed else
* BStruct cleanup
* container::add method has now a parameter for the position. reduces the
ambigous setposition calls.
And makes it clearer where the item is created.
removed in the touched headers the non needed virtual.
* removed exception when accessing a struct via an integer, no need to
crash the shard
* fixed test
* missed one virtual
* use transparent comparator to optimize away temporary string creation
* missing headers
should be case sensitive compare not insensitive
* flyweightstring support
made it insensitive again
next missing header
* more missing includes :(
* simplified via small wrapper
* allow also char[], removed on caller side some temp object creation which are no longer
needed
* it still only accepts string like objects.. fixed
* switched to strnicmp added comments
* missing header
* fixed comparison
* added unittest
* use offline char ref for equip, unequip scripts
* add Character script member logged_in; docs; tests
* update core-changes for Character script member logged_in
* Add breaking-changes note
* implementation
* tests
* maybe fix windows compilation?
* undo change of match_flag_type
* switch to boost regex
* move flags to BRegExp object
* fix tests due to cmake 4 update
* update grammar
* update prettifier
* move flag parsing to BRegExp ctor
* add AST nodes, update instr generation and execution
* copy tests but use regular expression literals
* fix grammar for handling division correctly
* modify return values a bit, update tests
- string.match: make groups hold structs of matched, offset
- string.match: add offset
- string.replace: use a groups array like string.match vs individual arguments
* bundle of changes
- standardize error messages
- add more tests for coverage
- move BRegExp creation to static method: previous implementation had
ctor throwing, which was no good inside executor since it didn't have
a try/catch
* more tests; add OT_REGEXP to basic.em
* move string regex stuff to bregexp and support regex/wregex via std::visit
* maybe fix compilation errors?
* add unicode escape sequence handling
* really maybe fix compilation error?
* fix compiler warnings
* refactor a bit to remove duplicate code
* address discord comments
- just return wstring, no need for vector<wchar_t> method
* Add string.split by string and regexp
* Use Max_Split instead of Limit
This makes it match basic::SplitWords
* add support for empty string delim in SplitWords
* remove duplicate code across string.split and mf_SplitWords
* Squashed commit of the following:
commit b3148e069f
Author: turleypol <turley@polserver.com>
Date: Sat Sep 27 17:02:22 2025 +0200
memorylocation of input string is not allowed to changed, switched back
to uniqueptr
commit 5a4d1c8fcb
Author: turleypol <turley@polserver.com>
Date: Sat Sep 27 10:18:01 2025 +0200
no need to use ptr for input
commit 90fa0edc66
Author: turleypol <turley@polserver.com>
Date: Sat Sep 27 09:56:29 2025 +0200
fixed typo
commit bed4ff3ac9
Author: turleypol <turley@polserver.com>
Date: Sat Sep 27 09:47:36 2025 +0200
make Callback for BContinuation move only
* use uninit when group isn't matched
* fix multiline flag handling; add test
* add docs and doc example tests
* some cleanup
* address review comments
- allow move assignment
* add core-changes
The SemanticAnalyzer was incorrectly reporting internal errors when a
class parent inherited from an unlinked class. The error will already
have been reported, when visiting the class parent.
* update grammar
* AST nodes and test
* Address self-review comments
- Replace `super` comment with something more explanatory
- Rename `make_user_function`
* add class analysis for uninit functions
* fix ast test after disallowing static uninit funcs
* use std::ranges::find_if
* add tests
* use SUPER constant; add test
* Remove unreachable code leftover from #809
Since #809, the super function is only generated for a class when
registering a parent class, and therefore it will always have a body. A
"No base class defines a constructor" will only occur if super was never
generated, and is handled in the "No function linked through
FunctionResolver" section of semantic analyzer.
* Address review comments
- use std::ranges::move instead of move iterators
- use std::is_same_v<> vs std::is_same<>::value
- use switch vs chained ternary conditionals
* update escript guide, create tests that are in escript guide
* add core-changes
* Error on uninit and defined constructor
* Move methods' FunctionLink construction to builder
This allows the error message for the uninit function to have a "See
Also" that point to the defined function.
* Move error checks for uninit and defined functions
These semantic checks should be in the ... SemanticAnalyzer.
* fix typo in core-changes
* move compiler-generated ctor registration to within class declaration registration; update test error messages
* add more ctor inheritance tests
* skip "Unknown identifier" error for calling undefined ctor
* add test for actual, previously crashing source
* add test for actual, previously crashing source
* move compiler-generator super registration to within class declaration registration
* add super local var test
* make register_available_generated_function private
* remove ClassDeclaration::has_super_ctor
This property was based on if FunctionResolver created the function, so
the logic can be moved to FunctionResolver.
* add core-changes
* use constant for "super" string
* fix enum classes entries without initializer
* docs
* update grammar to support scoped identifiers in case labels
* add support for enum class constants in case statements
* add ScopableName to ConstDeclaration; formatting fixes; tests
* update docs
* further optimize shortcircuits
combine jumps if possible
dont emit logicalconvert instructions if the next instruction is another shortcircuit jump
* docs
* cleanup of executor
mostly just minor cleanup
got rid of ESCRIPT_PROFILE define inbetween function/method calls by
moving the logic into a class (which is empty without the define)
* use a macro for profiler so that even in debug builds the class never
gets called without the define
* use c++20
* increased used clang version
* compiler report and logfacility use now compile time formatting, which
means that the formatstring gets checked at compile time. (which found 2 errors)
adapted a few places since report only accepts formatting arguments
adapted a few places with logging since char[] is compile time
formatting and string or chr* is runtime formatting
* use std::ranges instead of boost
* disabled pragma_assume vs specific macro (I guess noone cares)
* needed to fix ancient ms exception code
* modernized SpinLock
* removed unused code in ECompile
* replaced std::filesystem::path::u8string with string. It now returns an actual u8string type
* cleanup layers.h added the defines for other layers which where before
only defined in the pkt
* osmod::OpenConnection and HTTPRequest cleanup: early outs, dont check for pChild which is
only needed for startscript and placed suspend at the very last
position
* fix warning
* rebuild cache with new compiler version
* define c++ standard for external libs where possible
* added fixme
* first working short curcuit for && and or
creates jumps after each expressions to skip the following
* fixed valuestack when short circuit jmp does not jump
* use specialized instructions for short circuit && and ||
1: lhs
2: logical jump if false/true goto 4 <- if jmp do logical convert
3: rhs
4: logical convert
5: rest
logical convert is needed since "normal" && || operations convert isTrue
to BLong
added BObjectRef BObjectImp set specialization to remove noise
* fixed converted objimp when jump on false values
* first version of short circuit warning
should be moved to analyzer
added whitelist of module functions which have no sideeffect to reduce
the number of warnings
* moved warning visitor to analyzer and added it as extra compile step
fixed sourceline print and cache the content
* missing include, unused member
* included the correct header
* ecompile.cfg to activate and warn
ecompile cmdline arg to activate it
run all tests also with it active
fixed that only the most right side statement was checked
* ecompile cmdline
* increase ecompile version
cleanup
* compilation error
* missing header
* allow -S- to deactivate shortcircuit like the other params do
* extended whitelist functions
* revert fileformat version increase
fixed escript test cmake
* use the correct arg
* escript testoutput can now be different if shortcircuit is active
* docs
* additional test
* addressed comments
* Add -Z option to print string tree
* Simple test to print an AST
* Make CompiledScript owner of the tree
* some refactoring
- rename ecompile.cfg option
- rename AST generator class
* core-changes, docs
* fix warnings
* compile time optimization:
int with doubles and strings
doubles with ints and strings
strings with ints and doubles
* bool with other types, more unary ops, float branch optimizer
* more tests
fixed bool to dbl compare
* output cleanup
more tests
* optimize string values in if statements, optimize ternary operator
* optimize elvis, addes missing files, code cleanup
* use array to keep unoptimized if branch in funcexpr tests
* missing include
* better readable testdata
* removed file
* optimize while and dowhile loops if predicate is a compile time known
value
* cleaner variant of loop optimization?
* added ConstantPredicateLoop Node used by the optimizer for constant loop
predicates
optimize repeat until loop
change tests to run the loops more then once to be sure they work
correctly
* test break/continue with label for constant-loop
* docs
* updated fmt to 11.2.0
compile on windows with utf8 activated
added missing include
* fixed unreachable code warnings
mostly constexpr if statements
* removed forloop since it triggers unreachable code warning when it
breaks always after first iteration.
* delay debugger testscript end
* removed fmt lib from repo and download from github