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

77 lines
1.8 KiB
Plaintext

File async_errors 1:1
Ident async_errors 1:9
Script 3:1
Ident Other 3:8
Func 4:2
Ident Ready 4:7
Block 4:15
Func coroutine 8:1
Ident Top 8:6
Block 8:22
Script 11:1
Ident Bad 11:8
Signal 12:2
Ident Hit 12:9
Param 12:13
Ident s 12:13
NamedType 12:15
Ident string 12:15
ScriptVar 14:2
Ident other 14:6
NamedType 14:12
Ident ScriptRef 14:12
NamedType 14:22
Ident Other 14:22
ScriptVar 15:2
Ident lost 15:6
NamedType 15:11
Ident ScriptRef 15:11
NamedType 15:21
Ident Missing 15:21
Func coroutine 17:2
Ident Update 17:7
Param 17:14
Ident dt 17:14
NamedType 17:17
Ident float 17:17
Block 17:34
Func coroutine 20:2
Ident Blink 20:7
Block 20:25
Yield wait 21:3
BasicLit true true 21:14
Func 24:2
Ident Plain 24:7
Block 24:15
Yield next 25:3
ExprStmt 26:3
Call targs=0 args=0 26:3
Ident Blink 26:3
ExprStmt 27:3
Start Plain 27:3
Ident Plain 27:9
ExprStmt 28:3
Call targs=0 args=1 28:3
Selector 28:3
Ident Hit 28:3
Ident Connect 28:7
Ident OnWrong 28:15
ExprStmt 29:3
Call targs=0 args=1 29:3
Selector 29:3
Ident Hit 29:3
Ident Connect 29:7
Ident Blink 29:15
ExprStmt 30:3
Call targs=0 args=0 30:3
Selector 30:3
Ident other 30:3
Ident Ready 30:9
Func 33:2
Ident OnWrong 33:7
Param 33:15
Ident x 33:15
NamedType 33:17
Ident int 33:17
Block 33:22