Files
sanspie cf68c71f05 Stage 6: coroutines, signals, ScriptRef, workspace CLI, editor tooling
Language: yield/signal/coroutine become keywords, start is contextual.
Coroutine methods (func Name() coroutine) with start and
yield / wait / frames / fixed / await; signals with Emit/Connect and
Connection handles; ScriptRef<T> and node.GetScript<T>() for fields,
plain methods and signals of other scripts. Diagnostics AES2050-AES2059.

Bytecode v3: ScriptRefs, XFields, XMethods and Connects tables resolved by
name in vm.Link, per-script signals, coroutine flag on functions; new
opcodes START/YIELD/EMIT/CONNECT/DISCONNECT/CONNECTED/COSTOP/CORUN/
SELFREF/GETSCRIPT/GETXF/SETXF/CALLR, checked by verify.

Runtime: script/coroutine scheduler (frames/fixed counters, time heap,
await lists; only due coroutines are visited) and script/signal registry
(snapshot per Emit, deferred removal, no allocations in steady state).
Hot reload cancels coroutines of changed scripts, rebinds connections by
name and signature, then runs Reloaded.

Tooling: script/build removed, aego check/test/dump run on the workspace
(test builds include _test.aes); langsvc completion, hover, signatures and
semantic tokens for the new syntax; editor highlighting, snippets with
placeholders, coroutine/signal profiler graphs and stats.

Docs (script.md sections 16-19, editor.md, ARCHITECTURE), test fixtures and
golden files, platformer enemies wired to the player, scriptreload demo,
and run.Config.FrameTime for deterministic headless fixed steps.

Modules (6.5): engine/module registry and ComponentBuilder are the one
registration path for engine subsystems and native code; render2d,
render3d and script/engine are modules over scene/frame, the script
component moved to scene/scriptcomp, and scene/components and
scene/systems are gone. Editor inspector, templates, picking shapes and
extension hooks are driven by descriptors and editor/builtins; sdk gains
Component/EditorHook; depcheck checks the module graph and the
aego_runtime graph.

Also: stop tracking built tool binaries; gl33 activates the scratch unit
before binding for texture updates.

Verification: typed component method adapters (Method0..2, Proc0..2)
with direct field access and no allocations; app.Build as the single
construction path for run and the editor; modules attach per scene
document; depcheck aego_editor pass; diagnostic codes in one place and
every code covered by a test; indexed coroutine heaps with eager
cancel; dead component references and nil intrinsics fault with
AES6004, host faults keep their code; GC roots of struct fields checked
in verify and vm.Link; 255-field limit; AES4010 for script packages
shadowing host modules; architecture registry D111-D147.

Golden: the harness renders on the thread that owns the GL context,
ReadPixels returns rows in memory order (render targets are top-down per
D17), and the first rendering references are committed.
2026-10-12 14:22:08 +03:00

75 lines
1.7 KiB
Plaintext

File scriptref 1:1
Ident scriptref 1:9
Script 3:1
Ident Enemy 3:8
ScriptVar 4:2
Ident Hp 4:6
NamedType 4:9
Ident int 4:9
BasicLit INT 3 4:15
Func 6:2
Ident Hit 6:7
Param 6:11
Ident n 6:11
NamedType 6:13
Ident int 6:13
NamedType 6:18
Ident int 6:18
Block 6:22
Assign -= 7:3
Ident Hp 7:3
Ident n 7:9
Return 8:3
Ident Hp 8:10
Script 12:1
Ident Hunter 12:8
ScriptVar 13:2
Attr 13:2
Ident export 13:3
Ident Prey 13:14
NamedType 13:19
Ident NodeRef 13:19
ScriptVar 15:2
Ident last 15:6
NamedType 15:11
Ident int 15:11
Func 17:2
Ident Update 17:7
Param 17:14
Ident dt 17:14
NamedType 17:17
Ident float 17:17
Block 17:24
If 18:3
Binary == 18:6
Ident Prey 18:6
BasicLit nil nil 18:14
Block 18:18
Return 19:4
ShortVar 21:3
Ident e 21:3
Call targs=1 args=0 21:8
Selector 21:8
Ident Prey 21:8
Ident GetScript 21:13
NamedType 21:23
Ident Enemy 21:23
If 22:3
Binary == 22:6
Ident e 22:6
BasicLit nil nil 22:11
Block 22:15
Return 23:4
Assign = 25:3
Ident last 25:3
Call targs=0 args=1 25:10
Selector 25:10
Ident e 25:10
Ident Hit 25:12
BasicLit INT 1 25:16
Assign += 26:3
Selector 26:3
Ident e 26:3
Ident Hp 26:5
BasicLit INT 0 26:11