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:
YourWishesandClaude Sonnet 5 committed 2026-10-14 15:00:16 -05:00
1 parent 7e932e67a2
commit 5cf0678429
26 files changed
+325 -111

No files matched your search

+18 -84
View File
@@ -3,87 +3,21 @@
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
array/scriptarraycopy.c
array/scriptarraydeep.c
array/scriptarraymodify.c
array/scriptarraynew.c
array/scriptarraysort.c
builtin/array/scriptbarraybasic.c
builtin/array/scriptbarrayfunc.c
builtin/array/scriptbarraymodify.c
builtin/array/scriptbarrayorder.c
builtin/array/scriptbarraysearch.c
builtin/array/scriptbarrayslice.c
builtin/core/scriptbconvert.c
builtin/core/scriptbinclude.c
builtin/core/scriptbprint.c
builtin/core/scriptbpromise.c
builtin/core/scriptbtype.c
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
)
# Subdirs
add_subdirectory(array)
add_subdirectory(builtin)
add_subdirectory(bytecode)
add_subdirectory(call)
add_subdirectory(coroutine)
add_subdirectory(error)
add_subdirectory(gc)
add_subdirectory(heap)
add_subdirectory(number)
add_subdirectory(ops)
add_subdirectory(promise)
add_subdirectory(runtime)
add_subdirectory(scope)
add_subdirectory(string)
add_subdirectory(struct)
add_subdirectory(text)
add_subdirectory(value)
+13
View File
@@ -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
)
+9
View File
@@ -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
)
+10
View File
@@ -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
)
+11
View File
@@ -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
)
+13
View File
@@ -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
)
+11
View File
@@ -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
)
+12
View File
@@ -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
)
+9
View File
@@ -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
)
+13
View File
@@ -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
)
+4 -27
View File
@@ -3,30 +3,7 @@
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
execute/scriptvmchecknull.c
execute/scriptvmcode.c
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
)
# Subdirs
add_subdirectory(execute)
add_subdirectory(image)
add_subdirectory(ops)
+18
View File
@@ -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
)
+15
View File
@@ -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
)
+15
View File
@@ -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
)