* 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
* 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
* 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
* 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
* 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
* update grammar
* add ast nodes; ast building
* Rename to unpacking
* semantic analysis
* executor work part 1, unpacking indices
* renamings; implement index binding
* small cleanup
* use multi_index; more tests
* use multi_index only for rest, otherwise list
* initial formatting
* add missing token decoding
* address self-review comments
* formatting tweaks
* add test for var binding in classes
* add StringIterator
* fix spread tests
* add cfgfile iterator; add cfgelem opersubscript; tests
* add iterator for SQLResultSet and SQLRow; tests
* Copy value in take global/local
* Allow any iterable can index rest unpacking
Always use dictionary as rest object in index unpacking
* add docs, core-changes, doc tests
* formatting changes...
* address self-review comments
* update formatter, format all binding test srcs
* address review comments
- unset var scope
* add cfgfile/cfgelem docs
* reformat objref svg
* Initial implementation, tests
* Enhance tests
* Add quiet to read_dbg_file
* Add pc to array format
* Add docs, core-changes
* fix bad PCs
* touchup on corechanges
* Support default args in funcref calls
- Simplify BFunctionRef by using funcref index
- Emit default args when visiting function reference
* Move default args gen to second-pass visit
* Better error message on param count errors
* Check for constructor in MTH_NEW
* Address self-review comments
- Update code comments
* Introduce ResourceManager to pol testsuite
- Create a new class-based resource manager for deleting resources
(item NPCs, multis) after each test.
- Migrate house_set_multiid test to use new ResourceManager.
* Move resource cleanup
* Update grammar
* Implement selfIs in BObjectImp
* Add tests
* Update grammar
* Support obj.function as a MemberAccess [1/2]
- AST generation changes
* Support obj.function as a MemberAccess [2/2]
- add funcref index to eprog class table ctor entry
- allow check_mro on non-class inst (skip ctor calls)
* Move address of funcref into funcref table
* Add funcref.new()
- Add class index to funcref table entry
- Add MTH_NEW
* Fix formatting
* Address self-review comments
* Some more tests
* Address self-review comments
* Update grammar
* Remove ObjMember read_only, hidden
No need to special-handle MBR_FUNCTION
* Addres GitHub CI annotations
- '=': conversion from 'size_t' to 'unsigned int', possible loss of data
* Associate class descriptor with class instance
* Skeleton of BClassInstance, update tests
* Correctly handle methods on class instances
* Support calling members as methods
* Update super-multiple test
* Track called ctors; Introduce ins_check_mro
* Move class method funcref class to Executor
* Address GitHub CI annotations
- 'argument': conversion from 'size_t' to 'unsigned int'
* Update pol-core/bscript/bclassinstance.cpp
* Introduce BConstObject for class instances
* Fix unnecessary include in uotool
* Removed fixedalloc from BConstObject
* Additional test case
* Address Discord comments
- Reintroduce deleted copy assignment
* Update grammar
* WIP with tracking classes
- Refactor AvailableUserFunction to AvailableParseTree
- Track ClassDeclarationContexts similarly to user functions
* Skeleton AST + tracking
* Finish up AST building
* Implement AST building
- TODO decide better name for UserFunctionBuilder/Visitor,
since it does both user functions and classes
* Update Prettifier
* Crude, first-round semantic analysis + codegen
- Currently, no real difference from regular functions
* Move class var statements to top level statements
* Add semantic analysis for base class existence
* Introduce ClassInstance AST node for generating `this` parameter
* Skeleton create class instance instruction
* Default ctor; 'this' byref; Error if multiple same baseclass
* Update grammar for scoped funcrefs and scoped identifiers
* Update prettifier, builders for scoped funcref, identifiers
* Fix CI issues
- Styling
- Shadowing
* Add grammar tests for scope; Remove scope from switch label
* Final draft todos
- Rename `VarStatement::class_name` to `scope`
- Comment why identifiers dont have scopes in enum declarations
- Remove code comment
* Allow function reference calls across executors
* Update core-changes
* Address review todos
* Change Globals2 to reference
* Revert "Change Globals2 to reference"
This reverts commit 37e37506be.
* Change Globals2 to shared pointer
* Address review comments
- Remove handled TODO comment
- Move arguments passed by value
* Update grammar
* Update parser and AST generator
* Update semantic analysis
* Executor implementation
- Move Executor stack modification logic to BFunctionRef
- Handle user function calls
- Handle expression function calls
* Tests
* Update existing listfile snapshots
- Adds variadic boolean to instruction stack
- Changes instruction counts and offsets
* Fix test issue
* Better implementation of calling user functions
* Add var-args-captures test
* Refactor continuation handling + handle variadic args
- Move stack modifications from make/withContinuation into the executor's handling of the continuation
- Only trim args in continuation call if function is not variadic
* Add var-args-continuation test (via array.filter)
* update escriptguide + formatting, docs
* Fix CI annotations
- '=': conversion from 'size_t' to 'unsigned int', possible loss of data
- declaration of 'continuation' hides previous local declaration
* initial poc of function expressions
- update grammar
- mock AST builder to return BBoolean(true) for a func expr
- update prettifier for skeleton implementation
* more skeleton work
create AST class FunctionExpression mimicking boolean value
* create ast UserFunction, add to workspace from functexpr
* can generate instructions
* reorg tests; add test for instructions
* can track FunctionDepth in Variable
* can get captures for funcexprs inside funcs.. tbd if this way of nesting works
* Implement create-functor instruction
- Move function depth from Variable to Variables
- Introduce stacking of `Variables` for function expresions via `FunctionVariableScope`
- Add `TOK_FUNCTOR` instruction for 'create-functor'
- Handle emitting a `FunctionExpression` AST node
- Update `emit.declare_variable` and `emit.access_variable` to account for function captures
- Remove `in_function` from instruction generator, as it is tracked via `UserFunction` stack
- Update tests
* Address Discord comments
- Swap pop param order
* Bubble up captured variables through nested functions
* Improve testing infrastructure; add some test cases
* Fix compilation error
* prepend captures to function parameters in funcref mth_call
* update tests
* move from function{} to @{}
* implementation fix
* some more tests
* update docs
* Some cleanup
* fix CI annotation warning
- 'argument': conversion from 'size_t' to 'VariableIndex', possible loss of data
* Address review comments
- Add `passert_always`
- Use better example in docs
* Some cleanup
- Remove unused functions
* POC of calling user functions from core
* rename to BContinuation
* fix annotation warnings
* fix annotation warnings 2
* some cleanup, comments
* add more params to filter
* add more tests
* fix stack issues, wip determine what to do with printStack helper testing function
* print stack only for debug; increase OTContinuation to 100
* docs
* remove debugging leftovers
* Add cppdap debugger library and simple server (#508)
* Add cppdap library
* Add cppdap server
* fixup cmake scripts for windows
* Enable caching of cppdap on GitHub actions
* Fix CMake for cppdap target
* Wait 1s for session close before thread ends
* Address review comments
- Remove unnecessary use of wait_for
- Fix wait_for method
* Do not use SocketClientThread for cppdap clients
* Address review comments
- Cleanup object ownership
* Add authorization and event handling (#510)
* Add authorization and event handling [WIP]
* Use std::weak_ptr; Only allow one debugger conn
* Only attach debugger if dbg file exists
* Cleanup weak_ptr; Fix listeners; Add handler stubs
* Address review comments
- PolLock on uoexec and weakptr access
- Use make_shared when creating client thread
* Add ExecutorDebugListener on_destroy callback
* Use cppdap sockets instead of clib sockets
* Update cppdap repository to 2703cf4
* Implement server address binding
* Update cppdap repository to eeca5ce
* Fix warnings
* Use weak_from_this
* Fix stalled executors on disconnect
* Fix stalled executors on re-attach
* Clear uoexec weakptr on all debugger detaches
* Move server to gamestate
* move DapDebugServer into Network namespace
* move DapDebugServer into GameState for storage
* Move DapDebugServer into NetworkManager
* Fix missing memory include
* Add more events (#513)
* Add more events
* Implement dbg_step_out
* Fix breakpoint clearing
* Add even more events (#515)
* add launch request
* Add custom `processes` command
* fixup loop
* Refactoring to move handlers to member functions
* Add VariablesRequest and ScopesRequest
* use std::varaint for Handles
* add pollocks
* refactor Handles to new file
* move custom messages to proto.h
* move clientthread
* some formatting / cleanup
* Add missing PolLock
* move dap variables creation to Handles
* appobj members
* rename ClientThread to DebugClientThread
* rename LaunchRequest args to arg
* Fix compiler error on size_t
* Add support for EvaluateRequest and SetVariableRequest (#519)
* Update grammar for evaluateUnit
* Cleanup various compiler code
* Add support for EvaluateRequest
Only supports values, variables, element access, member access
* Add report clearing to reinitialize state
* Add support for SetVariableRequest
* Fix CI build errors
* Move ExpressionEvaluator to Bscript
* Fix formatting
* Fix include
* Refactor global and frame variable references
* Encapsulate Executor debugging environment; Fix step over (#524)
* Fix step over
* Some cleanup of executor
- Remove unused debug states
- Rename members for consistency
* move debugging environment to new class
* Move instruction inspection to class
* Cleanup slashes on Windows; Add Executor state to processes response (#527)
* Fix backspaces in script names on Windows
* Fix compilation warnings with data loss
* Use boost::icontains for string comparison
* Add Executor state to processes response
* Updates for libfmt
* Fix tests; Fix cppdap build for Mac universal binary (#607)
* fix tests
* fix cppdap build for mac universal binary
* Update cppdap to 2a4c7cf
* Add tests; Modify launch behavior to not stop at entry (redo) (#609)
* Remove unused setExceptionBreakpoints handler
* Add debugger tests
* Launching a script should not set attaching state
* Add launch tests
* Do not check for connection in debugger tests
* Rename `program` to `script` in protocol structs
* Fix launch stopAtEntry; quote string var values
* Fix compilation error on Windows
* Add configfiles doc entry
* Various fixes for finishing touches; Add core-changes (#610)
* switch cmake projects
* simple docs
* cmake move make_directory
* Fix launch request with relative, absolute, package paths
* make relative paths as absolute in source request
* Add true, false, uninit to ExpressionEvaluator
* Re-add setExceptionBreakpoints to avoid unhandled message errors
* Better debug thread logging with instance numbers
* launched scripts should terminate on disconnect (according to DAP spec)
* Properly handle exited event in client thread
* Add core-changes
* Address Discord comments
- Mention vscode-escript in core-changes
- Re-add "cppdap already built" in cmake
* change cmake escriptgrammarlib visibility to public
* POLLOG* macros use the new formatting
removed all old logging functions
* removed old fmt lib from everything except StreamWriter
removed unneeded functions
* fixed review comments
* renamed include guard to be able to use both format lib versions in
parallel
* build Fmt lib and link it into clib
* use std::string instead of format Writer for logging
added variant "2" for logging with new fmt lib
* use new logging variant for two logs
* always add \n to flush log, lets see if the assumption holds
* use new lib for tostring
* replaced all INFO_PRINTS in clib
* formatter for Token, BObject and BObjectImp
* started with bsccript
* use function instead of actual object for logging
* remaining bscript, started plib
* logvariant without newline added, more template magic
* format support for base types, added test for format padding
new version for fdump
* chanhed ecompile/runecl fixed compilation with ESCRIPT_PROFILE
* rewrite INFO_PRINT in plib,poltool/uoconvert/uotool
* replaced remaining INFO_PRINTS, renamed macros INFO_PRINT for logging
without newline, INFO_PRINTLN for newline addition.
Replaced also INFO_PRINT_TRACE and renamed it to INFO_PRINTLN_TRACE
* gitignore for fmt lib
* cleanup vim leftovers
* restructured pol testscripts
pkg based (dedicated pkgroot)
runs per pkg:
setup.ecl if exists
all scripts starting with "test"
cleanup.ecl if exists
return 1 for success everything else is an error
* Scripts can now be loaded and exported functions called
adapted testscripts to use this feature
critical script handling missing
* added support for used in critical scripts
* use weakptr instead of pid
moved keep_alive flag to uoexecutor
* Function and nethod accept now a argument list
* added docs
* missing docs
* faster shutdown time
* fixed typo
* fixed weird cornercase
* shorter test functions names, the length is limited, renamed
loadexported test script to have a dedicated testscript
* generate tiledata/multi for small boat
added generate scripts for generation..
adapted testdata set
* boat tests
* extended scripttests
scheduler will now always know about the loaded script
secured scheduler api
* cleanuo scripts for boat and npc
* shorter function for error return
fixed cleanup: npcs have gravestones, chars was one off and scripted
create of a char made it permanent logged in (until next restart),
which also means that it cannot be deleted
* bypass windows specific ecompile.cfg logic
* fix for parallel execution
* on windows its called .exe ..
* use target binary directly, so cmake can replace it with the actual path
use absolute path to testsuite
disabled temporary the copy of ecompile
* configure ecompile.cfg to add absolute path
* early sleepms calls can lead to endless waiting
* Code coverage (#260)
* play with coverage reports
* fix yml
* use 0 as default for gcov cmake var
* fixed used cov version, hopefully fixed now cmake
* demangle function names
* removed debug msg
* added a few polcore tests (basically just for coverage)
first set executor to noncritical before blocking
* added https://coveralls.io/github/polserver/polserver
* added a stackable item
added a few backpack insert tests
do coverage build only on push events not also for PR merge builds
* added storage tests..
docs need fixes, the Imps are not working at all
* fixed storage test to really move items
* added a house
corrected static/dynamic flag
created a few house tests
* updated yml file to new github api
* corrected coverage discord job name
* always put to runlist even if not necessary
* extended aos prop tests
* equip/unequip aos mod
* extra ci step for shard test fixtures and activated verbose shard test
* use extra ci step for all build configs, sorted testscripts for
execution
* fixed sorting
* added param to syslog to not print the context (cleaner testscript
visualization)
* added build targets for tests
* sleep api cleanup
* more aos property tests
* build for coveralls also on pullrequest
* readded debug state reset on schedule
* updated checkout ci action
* updated checkout in all ci runs
Scripts which are running to completion outside the ScriptScheduler
can't be suspended. This will now be tested by the UOExecutor (as
os_module->suspend() doesn't care).
Optimize function name search for all modules not only uo by using an additional map, replaced c array with vector for functionsdef.
Simplified pragma pack order. (MSVC version is supported in all
compilers)
Removed compilerassert.h (asserteql,..) replaced with static_assert
Removed some old #ifs
Authors are not forced to use the clang-format setting, but should
atleast be inspired by the style.
The only thing which is now not allowed are tabs for ident/alignment!