Daniel Kolesa
c2de63be25
re-expose new_ident in a restricted way
2021-04-04 19:53:59 +02:00
Daniel Kolesa
1624938c0b
remove public is_in_loop api
2021-04-04 19:43:28 +02:00
Daniel Kolesa
04441f206d
remove the 255 run-depth limitation
...
also add optional per-thread API that sets the maximum run depth
(0 means no limit, default) if you want it; since we no longer
store stuff on the stack it should not be necessary though
2021-04-04 19:31:29 +02:00
Daniel Kolesa
529e34d268
add a variable value change trigger callback
2021-04-04 04:30:36 +02:00
Daniel Kolesa
bab8633a05
add proper var value setting helpers
2021-04-04 02:58:04 +02:00
Daniel Kolesa
e9fc023daa
implement override value saving
2021-04-04 02:44:35 +02:00
Daniel Kolesa
3d91cf2ee7
rea-add proper handling of variable overrides
2021-04-04 02:33:28 +02:00
Daniel Kolesa
6777eb73d5
re-add some support for persistent/overridable flags + fix unknown
2021-04-04 01:08:30 +02:00
Daniel Kolesa
f0bb6b1410
make more api private
2021-04-03 06:16:43 +02:00
Daniel Kolesa
ddb0799213
minor cleanups
2021-04-03 05:46:05 +02:00
Daniel Kolesa
238e5a6ac5
unexpose get_flags from ident, replace with specific methods
2021-04-03 05:39:19 +02:00
Daniel Kolesa
b2b83a8e5b
clean up some leftover cruft
2021-04-03 03:40:19 +02:00
Daniel Kolesa
b00a08ea88
remove most variable code and leave it to user-defined handlers
...
the user can now define commands '//ivar', '//fvar' and '//svar'
which take identity (which is the variable) as the first argument
followed by any number of user defined arguments with types (one
can use the N argument type to check argument count, and when no
value arguments are provided, print the variable); this allows us
to implement different styles of variable setting without the
interpreter itself knowing about it, as well as ditch all the
stuff with overridden vars and hex vars and whatnot since this is
all specific to the engine and has no place in here
there is still leftover code remaining, which will get cleaned up
afterwards...
2021-04-03 03:16:57 +02:00
Daniel Kolesa
881ba4bce9
prepare codebase for per-thread alias stack
2021-04-02 05:47:49 +02:00
Daniel Kolesa
e8856f8f9d
rename alias_stack to alias_local
2021-04-02 04:43:57 +02:00
Daniel Kolesa
b2caade276
remove all raw bcode passing in public api
2021-04-01 05:06:26 +02:00
Daniel Kolesa
e2b65000d5
hide value getter from public alias interface
...
since this will become thread-specific, this API makes no sense
2021-04-01 04:19:00 +02:00
Daniel Kolesa
e4c4c51055
remove more problematic public members
2021-03-31 01:48:56 +02:00
Daniel Kolesa
2312961cdc
remove string_view from exported members of struct error
...
msvc doesn't like it
2021-03-31 01:43:29 +02:00
Daniel Kolesa
13d46881e8
windows fixes and other correctness/portability stuff
2021-03-31 01:13:35 +02:00
Daniel Kolesa
19f0ff379a
move callable into its own header
2021-03-30 23:37:55 +02:00
Daniel Kolesa
89e5f5f004
move everything to alias_stack and remove stacked_value
2021-03-30 20:55:50 +02:00
Daniel Kolesa
1def48cf76
redo alias_stack for robustness (guarantee order of push/pop)
2021-03-30 20:37:50 +02:00
Daniel Kolesa
d1243c5cc3
add better api to deal with alias stack
2021-03-30 03:57:43 +02:00
Daniel Kolesa
c2bb8e4a3d
move ident_stack out of public interface
2021-03-30 00:31:11 +02:00
Daniel Kolesa
4154944726
remove fixed-size argument stacks and reliance on argument ids
2021-03-30 00:28:06 +02:00
Daniel Kolesa
064a7ea99b
document the instructions and drop more now useless vm code
2021-03-28 17:07:29 +02:00
Daniel Kolesa
b27d4fa7e6
make p_tstate actually private
2021-03-26 03:05:14 +01:00
Daniel Kolesa
bd9a6cbf7c
eliminate more future private accesses
2021-03-26 02:59:42 +01:00
Daniel Kolesa
865bac73f3
remove pointless friends
2021-03-25 01:57:47 +01:00
Daniel Kolesa
c854e9d189
move the owner tag inside
2021-03-25 01:55:47 +01:00
Daniel Kolesa
d80af7b159
hide internal_state from public state struct
2021-03-25 01:37:42 +01:00
Daniel Kolesa
3d37ea22c3
put force_ident and force_code in any_value
2021-03-24 21:01:01 +01:00
Daniel Kolesa
00b8312ad5
move most thread state into an internal structure
2021-03-24 20:33:20 +01:00
Daniel Kolesa
4ded59ce70
launder aligned_storage pointers
2021-03-24 02:42:33 +01:00
Daniel Kolesa
21aec59ad3
rename namespace to cubescript
2021-03-23 23:32:25 +01:00
Daniel Kolesa
b9b344cba6
remove cs_ namespace in all API
2021-03-23 23:29:32 +01:00
Daniel Kolesa
4b766a380f
drop the util namespace
2021-03-23 02:02:43 +01:00
Daniel Kolesa
f52aeead32
eliminate the strref friend kludge
2021-03-23 01:35:04 +01:00
Daniel Kolesa
6821260c37
separate header/impl for strman
2021-03-23 01:25:47 +01:00
Daniel Kolesa
63251f0eac
add cs_callable to replace std::function
...
now function data can be allocated with our own allocator as
well, plus we get guarantees on small storage; this type is
move-only, and it's also more memory efficient than std::function,
at least the libstdc++ implementation
2021-03-22 01:01:51 +01:00
Daniel Kolesa
f8eb07ee2b
hide implementation details of idents
2021-03-21 02:47:02 +01:00
Daniel Kolesa
be71d3a4b9
rework allocator errors and error message storage buffer
2021-03-20 21:06:26 +01:00
Daniel Kolesa
d7c93fa8b9
make format errors internal errors
2021-03-20 19:54:46 +01:00
Daniel Kolesa
2f3d5ea938
further clean up list parser api
2021-03-20 19:34:51 +01:00
Daniel Kolesa
82d366366e
drop libostd requirement entirely
2021-03-20 08:23:51 +01:00
Daniel Kolesa
cb926a5750
get rid of ostd requirements inside library entirely
2021-03-20 07:24:25 +01:00
Daniel Kolesa
10b2a81cec
redo (un)escape_string around output iterators
2021-03-20 06:18:31 +01:00
Daniel Kolesa
320fdbaefd
use c++20 std::span
2021-03-20 05:41:25 +01:00
Daniel Kolesa
4068c96ec2
remove the auxiliary run_<type> APIs, they are fairly useless now
2021-03-20 05:14:14 +01:00