Repository navigation
WIP: 1.5.0 row 9 — S4 three-state closure + break/continue word forms + S5 KPI - #1891
Merged
Merged
Conversation
…ore a typed evaluation unwind propagates Row 9 of the 1.5.0 plan (debugger design sections 4.4, 7.4). Three-state closure (4.4): the consult gains an inert fast exit. DebugSession::can_stop_at_seam names the armed shapes (running, with a stepping arming other than Continue or an enabled line/function entry in the table; BreakpointTable::has_enabled_seam_entries is the table half). When the predicate is false — including the no-driver case for child executors that share the process gate — the consult returns before the location read, the candidate scan, and the stop-time $BASH_COMMAND refresh window: the inert shape costs the gate load plus one predicate, and its behavior is the un-consulted path by construction. The WP-8 function-definition note is not a stop decision (it feeds later insert-time adjudication and DE-11), so it is hoisted ahead of the fast exit and still lands on every function-entry arrival while the session runs, before hit accounting, exactly as before. Typed-unwind resume (7.4): a control unwind typed at a stop (exit/return/break/continue in an explicit evaluation) propagates out of the stop serve as the debuggee's own flow — but it left the session Stopped while the debuggee ran on, so no later breakpoint, step, or frame-return note could ever land (the consult serves only a running session). The serve now mirrors the ForceReturn route's discipline: resume under Continue first, then raise the unwind.
…KPI harness - Three-state corpus over the design 4.1 seam faces (simple command, [[ ]], (( )), time body, case head, arith-for init/test/update, for head, function entry, pipeline element, select head): plain, inert-session, and stepping runs must agree byte-for-byte on the observable outcome (status + accumulators); the inert session serves only the entry stop; the stepping session sees the face's seams. while heads never stop; a comsub body (driver-less child, DE-12) never stops; a synchronous subshell stops inside but its writes stay in the snapshot (design 6.3). - Armed-but-inert shapes: all-disabled table, watch-only table, and a counting DEBUG trap whose firing count must equal the plain run's under both an inert and a stepping session. - B-3 pin (WP-1 inventory; GNU execute_cmd.c:3053-3059, verified against the GNU 5.3.20 oracle): under extdebug a non-zero DEBUG trap status at the for head skips the iteration and leaves the trap's status as the loop's — identical with an inert session. - break/continue in a session: step-into stop sequences across continue/break and break 2; and the typed-unwind battery — an explicit evaluation of `break 1` / `continue 1` / `return 7` / `exit 5` at a stop unwinds the debuggee's own flow and leaves the session alive (later breakpoints land; a typed return's DE-04 FrameReturned is reported). The break/continue/return pins fail on the pre-fix tree. Bare `break` is print-shaped under the WP-7 single-word routing, hence the counted spelling. - S5 KPI harness (ignored by default): a 4500-line script run plain / inert / stop-loop echo (StepInto, one stop + resume per line — the surface the row-10 DAP adapter will ride on). Numbers are archived in the row REPORT, never asserted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP: 1.5.0 plan row 9 — S4 three-state closure + break/continue word forms
Base: master
54df3f8d(after row 8, PR #1890). Plan:PLAN.mdrow 9; design of record:docs/design/debugger-full-design.md§4.1/§4.4/§6/§7.4.What lands
1. The S4 three states, closed (design §4.4). With no DEBUG action
installed the funnel's consult now has an explicit inert fast exit:
DebugSession::can_stop_at_seam(running ∧ (arming ≠ Continue ∨ anenabled line/function entry exists)) plus the no-driver case for child
executors that share the process gate. When the predicate is false the
consult returns before the location read, the candidate scan, and the
stop-time
$BASH_COMMANDrefresh window — the inert shapes cost thegate load plus one predicate, and their behavior is the un-consulted
path by construction. The one consult side effect that is not a stop
decision — the WP-8 function-definition note at entry seams — was
hoisted ahead of the fast exit so resolution bookkeeping is unchanged
(it feeds later insert-time adjudication and DE-11).
2. break/continue word forms inside a session. Stepping pins: the
break/continuecommands are ordinary simple-command seams;break 2unwinds two levels; the extdebug for-head skip (B-3: skip = this
iteration's
continue, loop status = trap status, GNUexecute_cmd.c:3053-3059, oracle-verified) is unchanged by an attachedinert session. One real defect fixed: a control unwind typed at a stop
(
exit/return/break 1/continue 1in an explicit evaluation,design §7.4) propagated out of the stop serve with the session still
Stopped— the debuggee was running again but no later breakpoint,step, or frame-return note could ever land. The serve now mirrors the
ForceReturn route's discipline: resume (Continue) first, then raise.
Pre-fix pins fail (3), post-fix they pass; a typed
return's DE-04FrameReturnedevent is dark no longer.Note on spelling: a bare single word (
break) is a print-shapedrequest under the WP-7 single-word routing — it expands, it does not
execute — so the executable spellings in the pins carry their count
(
break 1), exactly as in a script.3. S5 KPI (measure + archive only, no tuning). An ignored harness
(
s4_kpi_4500_line_script_three_shapes) runs a 4500-line script threeways — plain, inert session, and the stop-loop echo (StepInto: one
stop + immediate resume per line; the request/response surface the
row-10 DAP adapter will ride on — the adapter itself does not exist
yet). Numbers, with caliber and machine, are archived in the cluster
REPORT; nothing is asserted and no hot path was tuned.
Gates
54df3f8d= 828 passed / 1 failed(
ownership_unary_operators_check_existing_file, stock) / 1 ignored;final tree = baseline set + 14 new tests green, failure set identical
by name.
RUSTFLAGSwith-D warnings:cargo check --libclean.alone), CR = 0, utf8-boundary hygiene clean.
step; the goldens job's only allowed red is the pre-existing
upstream_suite_slice_snapshots(issues [windows] exec fd 移动后读空:exec 10<infile; exec 0<&10; cat <&10 得 EOF(GNU 输出文件内容),Linux 面与 GNU 一致 #1887/[windows] history 多余参数退出码 1 应为 2:history 10 42 在 Windows 上返回 1(GNU 2),Linux 面一致 #1888, another lane —not touched, goldens not re-recorded).