quad/.claude/audit/handtrace-round10-reference-impl/spikes/d17_ctor_cost.luau
qwreey d2d67c7aeb
qa: 10라운드 광범위 탐사 완료 — 발견 H-150~H-157 (🔴 0 / 🟡 5 / 🟢 3), §4 배치 문항 7건 회신 대기
- 신선한 탐사자(fable) 단일 컨텍스트, 지시서 -round10-brief.md §2 레인 A·C 완료, B 부분, D ALL PASS
- audit/handtrace-round10-reference-impl/: round7 참조 구현을 현재 계약으로 갱신·재실행
  (부수: round7/ref9 _recompute 첫 인자 오류 발견·정정)
- base/·인덱스 레이어는 미변경 — 결정은 사용자 배치 회신 뒤 -round10-followup.md로

Co-authored-by: qwreey <me@qwreey.moe>
Claude-Session: https://claude.ai/code/session_01546hjsYNLSMZdHdPyTZaGb
2026-08-28 01:03:05 +09:00

13 lines
738 B
Text

--!nocheck
local q = require("./core9"); local D = require("./dispatch9")
D.remountFix = "ctor"
local s = D.newSlot("lonely")
print("생성 직후: Offset =", s.Offset:Get(), "| _baseObserver 존재 =", s._baseObserver ~= nil,
"| bk 미생성(books에 없음) =", rawget(D, "x") == nil)
-- 미실체화 Slot에 Add — rawAdd의 _physicalTarget 얼리리턴이 그대로 성립하는가
local i = D.rawAdd(s, {name="q"})
print("미실체화 Add: index =", i, "| _elements =", #s._elements, "| 크래시 없음")
-- 실체화 후 정상 동작
local inst = q.newInst("i"); local O = D.newSlot("O", { s })
D.mountTop(inst, O)
print("마운트 후: O.Length =", O.Length:Get(), "(기대 1) | s.Offset =", s.Offset:Get(), "(기대 0)")