Subdirify src/dusk/script's core/ and vm/ CMakeLists
core/CMakeLists.txt and vm/CMakeLists.txt each listed every .c file across
every sub-folder in one flat target_sources() call. Split that into one
add_subdirectory() per folder (array, bytecode, call, coroutine, error, gc,
heap, number, ops, promise, runtime, scope, string, struct, text, value and
builtin/{array,core,math,string} under core/; execute, image and ops under
vm/), each with its own small CMakeLists.txt listing just that folder's
sources - matching the convention already used in src/dusk/display/.
Verified the Dusk binary and the duskscript test suite still build and pass
identically; test_battle and test_entityinteract already failed the same
way before this change (stale against unrelated rpg/battle API changes), so
left untouched here.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
1 parent
7e932e67a2
commit
5cf0678429
26 files changed
+325
-111
No files matched your search
@@ -3,87 +3,21 @@
|
|||||||
# This software is released under the MIT License.
|
# This software is released under the MIT License.
|
||||||
# https://opensource.org/licenses/MIT
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
# Subdirs
|
||||||
PUBLIC
|
add_subdirectory(array)
|
||||||
array/scriptarraycopy.c
|
add_subdirectory(builtin)
|
||||||
array/scriptarraydeep.c
|
add_subdirectory(bytecode)
|
||||||
array/scriptarraymodify.c
|
add_subdirectory(call)
|
||||||
array/scriptarraynew.c
|
add_subdirectory(coroutine)
|
||||||
array/scriptarraysort.c
|
add_subdirectory(error)
|
||||||
builtin/array/scriptbarraybasic.c
|
add_subdirectory(gc)
|
||||||
builtin/array/scriptbarrayfunc.c
|
add_subdirectory(heap)
|
||||||
builtin/array/scriptbarraymodify.c
|
add_subdirectory(number)
|
||||||
builtin/array/scriptbarrayorder.c
|
add_subdirectory(ops)
|
||||||
builtin/array/scriptbarraysearch.c
|
add_subdirectory(promise)
|
||||||
builtin/array/scriptbarrayslice.c
|
add_subdirectory(runtime)
|
||||||
builtin/core/scriptbconvert.c
|
add_subdirectory(scope)
|
||||||
builtin/core/scriptbinclude.c
|
add_subdirectory(string)
|
||||||
builtin/core/scriptbprint.c
|
add_subdirectory(struct)
|
||||||
builtin/core/scriptbpromise.c
|
add_subdirectory(text)
|
||||||
builtin/core/scriptbtype.c
|
add_subdirectory(value)
|
||||||
builtin/math/scriptbmathbasic.c
|
|
||||||
builtin/math/scriptbmathrandom.c
|
|
||||||
builtin/math/scriptbmathround.c
|
|
||||||
builtin/math/scriptbmathtrig.c
|
|
||||||
builtin/scriptarg.c
|
|
||||||
builtin/scriptbuiltinregister.c
|
|
||||||
builtin/scriptintrinsic.c
|
|
||||||
builtin/scriptnativesig.c
|
|
||||||
builtin/string/scriptbstringcase.c
|
|
||||||
builtin/string/scriptbstringsearch.c
|
|
||||||
builtin/string/scriptbstringsplit.c
|
|
||||||
builtin/string/scriptbstringtrim.c
|
|
||||||
bytecode/scriptbytecodesize.c
|
|
||||||
bytecode/scriptvarint.c
|
|
||||||
call/scriptcall.c
|
|
||||||
coroutine/scriptcoroutineready.c
|
|
||||||
coroutine/scriptcoroutinespawn.c
|
|
||||||
coroutine/scriptframelocate.c
|
|
||||||
coroutine/scriptscheduler.c
|
|
||||||
coroutine/scriptsetposition.c
|
|
||||||
coroutine/scriptstackcheck.c
|
|
||||||
error/scriptraise.c
|
|
||||||
error/scripttrace.c
|
|
||||||
gc/scriptgccollect.c
|
|
||||||
gc/scriptgcmark.c
|
|
||||||
gc/scriptgcscan.c
|
|
||||||
heap/scriptheapalloc.c
|
|
||||||
heap/scriptheapblock.c
|
|
||||||
heap/scriptheapfree.c
|
|
||||||
heap/scriptheapinit.c
|
|
||||||
heap/scriptheapsweep.c
|
|
||||||
number/scriptnumberbinary.c
|
|
||||||
number/scriptnumberformat.c
|
|
||||||
number/scriptnumberparse.c
|
|
||||||
number/scriptnumberunary.c
|
|
||||||
ops/scriptbinaryop.c
|
|
||||||
ops/scriptindex.c
|
|
||||||
ops/scriptref.c
|
|
||||||
promise/scriptpromiseawait.c
|
|
||||||
promise/scriptpromisecombine.c
|
|
||||||
promise/scriptpromisenew.c
|
|
||||||
promise/scriptpromisesettle.c
|
|
||||||
promise/scripttimer.c
|
|
||||||
runtime/scriptruntimeconfig.c
|
|
||||||
runtime/scriptruntimecreate.c
|
|
||||||
runtime/scriptruntimeexecute.c
|
|
||||||
runtime/scriptruntimeload.c
|
|
||||||
runtime/scriptruntimerun.c
|
|
||||||
scope/scriptscopefind.c
|
|
||||||
scope/scriptscopenew.c
|
|
||||||
scope/scriptscopeset.c
|
|
||||||
scope/scriptvariable.c
|
|
||||||
string/scriptbuf.c
|
|
||||||
string/scriptstringchar.c
|
|
||||||
string/scriptstringconcat.c
|
|
||||||
string/scriptstringnew.c
|
|
||||||
string/scriptstringreject.c
|
|
||||||
string/scriptstringsearch.c
|
|
||||||
struct/scriptstruct.c
|
|
||||||
text/scripttext.c
|
|
||||||
value/scriptalloc.c
|
|
||||||
value/scriptfunction.c
|
|
||||||
value/scriptvaluecompare.c
|
|
||||||
value/scriptvalueformat.c
|
|
||||||
value/scriptvalueprimitive.c
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptarraycopy.c
|
||||||
|
scriptarraydeep.c
|
||||||
|
scriptarraymodify.c
|
||||||
|
scriptarraynew.c
|
||||||
|
scriptarraysort.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptarg.c
|
||||||
|
scriptbuiltinregister.c
|
||||||
|
scriptintrinsic.c
|
||||||
|
scriptnativesig.c
|
||||||
|
)
|
||||||
|
|
||||||
|
# Subdirs
|
||||||
|
add_subdirectory(array)
|
||||||
|
add_subdirectory(core)
|
||||||
|
add_subdirectory(math)
|
||||||
|
add_subdirectory(string)
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptbarraybasic.c
|
||||||
|
scriptbarrayfunc.c
|
||||||
|
scriptbarraymodify.c
|
||||||
|
scriptbarrayorder.c
|
||||||
|
scriptbarraysearch.c
|
||||||
|
scriptbarrayslice.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptbconvert.c
|
||||||
|
scriptbinclude.c
|
||||||
|
scriptbprint.c
|
||||||
|
scriptbpromise.c
|
||||||
|
scriptbtype.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptbmathbasic.c
|
||||||
|
scriptbmathrandom.c
|
||||||
|
scriptbmathround.c
|
||||||
|
scriptbmathtrig.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptbstringcase.c
|
||||||
|
scriptbstringsearch.c
|
||||||
|
scriptbstringsplit.c
|
||||||
|
scriptbstringtrim.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptbytecodesize.c
|
||||||
|
scriptvarint.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptcall.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptcoroutineready.c
|
||||||
|
scriptcoroutinespawn.c
|
||||||
|
scriptframelocate.c
|
||||||
|
scriptscheduler.c
|
||||||
|
scriptsetposition.c
|
||||||
|
scriptstackcheck.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptraise.c
|
||||||
|
scripttrace.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptgccollect.c
|
||||||
|
scriptgcmark.c
|
||||||
|
scriptgcscan.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptheapalloc.c
|
||||||
|
scriptheapblock.c
|
||||||
|
scriptheapfree.c
|
||||||
|
scriptheapinit.c
|
||||||
|
scriptheapsweep.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptnumberbinary.c
|
||||||
|
scriptnumberformat.c
|
||||||
|
scriptnumberparse.c
|
||||||
|
scriptnumberunary.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptbinaryop.c
|
||||||
|
scriptindex.c
|
||||||
|
scriptref.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptpromiseawait.c
|
||||||
|
scriptpromisecombine.c
|
||||||
|
scriptpromisenew.c
|
||||||
|
scriptpromisesettle.c
|
||||||
|
scripttimer.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptruntimeconfig.c
|
||||||
|
scriptruntimecreate.c
|
||||||
|
scriptruntimeexecute.c
|
||||||
|
scriptruntimeload.c
|
||||||
|
scriptruntimerun.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptscopefind.c
|
||||||
|
scriptscopenew.c
|
||||||
|
scriptscopeset.c
|
||||||
|
scriptvariable.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptbuf.c
|
||||||
|
scriptstringchar.c
|
||||||
|
scriptstringconcat.c
|
||||||
|
scriptstringnew.c
|
||||||
|
scriptstringreject.c
|
||||||
|
scriptstringsearch.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptstruct.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scripttext.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptalloc.c
|
||||||
|
scriptfunction.c
|
||||||
|
scriptvaluecompare.c
|
||||||
|
scriptvalueformat.c
|
||||||
|
scriptvalueprimitive.c
|
||||||
|
)
|
||||||
@@ -3,30 +3,7 @@
|
|||||||
# This software is released under the MIT License.
|
# This software is released under the MIT License.
|
||||||
# https://opensource.org/licenses/MIT
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
# Subdirs
|
||||||
PUBLIC
|
add_subdirectory(execute)
|
||||||
execute/scriptvmchecknull.c
|
add_subdirectory(image)
|
||||||
execute/scriptvmcode.c
|
add_subdirectory(ops)
|
||||||
execute/scriptvmfunction.c
|
|
||||||
execute/scriptvmincdec.c
|
|
||||||
execute/scriptvmfunctionrun.c
|
|
||||||
execute/scriptvmlocate.c
|
|
||||||
execute/scriptvmevalat.c
|
|
||||||
execute/scriptvmloop.c
|
|
||||||
execute/scriptvmname.c
|
|
||||||
execute/scriptvmtable.c
|
|
||||||
image/scriptvmattach.c
|
|
||||||
image/scriptvmlink.c
|
|
||||||
image/scriptvmload.c
|
|
||||||
image/scriptvmmap.c
|
|
||||||
image/scriptvmreader.c
|
|
||||||
image/scriptvmrun.c
|
|
||||||
image/scriptvmverify.c
|
|
||||||
ops/scriptvmopassign.c
|
|
||||||
ops/scriptvmopcall.c
|
|
||||||
ops/scriptvmopconst.c
|
|
||||||
ops/scriptvmopdata.c
|
|
||||||
ops/scriptvmopjump.c
|
|
||||||
ops/scriptvmopmath.c
|
|
||||||
ops/scriptvmopscope.c
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptvmchecknull.c
|
||||||
|
scriptvmcode.c
|
||||||
|
scriptvmfunction.c
|
||||||
|
scriptvmincdec.c
|
||||||
|
scriptvmfunctionrun.c
|
||||||
|
scriptvmlocate.c
|
||||||
|
scriptvmevalat.c
|
||||||
|
scriptvmloop.c
|
||||||
|
scriptvmname.c
|
||||||
|
scriptvmtable.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptvmattach.c
|
||||||
|
scriptvmlink.c
|
||||||
|
scriptvmload.c
|
||||||
|
scriptvmmap.c
|
||||||
|
scriptvmreader.c
|
||||||
|
scriptvmrun.c
|
||||||
|
scriptvmverify.c
|
||||||
|
)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2026 Dominic Masters
|
||||||
|
#
|
||||||
|
# This software is released under the MIT License.
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||||
|
PUBLIC
|
||||||
|
scriptvmopassign.c
|
||||||
|
scriptvmopcall.c
|
||||||
|
scriptvmopconst.c
|
||||||
|
scriptvmopdata.c
|
||||||
|
scriptvmopjump.c
|
||||||
|
scriptvmopmath.c
|
||||||
|
scriptvmopscope.c
|
||||||
|
)
|
||||||
Reference in new issue
Block a user