X Tutup
Skip to content

Update Cons.java#70

Closed
ssisksl77 wants to merge 1 commit intoclojure:masterfrom
ssisksl77:master
Closed

Update Cons.java#70
ssisksl77 wants to merge 1 commit intoclojure:masterfrom
ssisksl77:master

Conversation

@ssisksl77
Copy link
Copy Markdown

I think that 'this._first = _first; ' is better.

@puredanger
Copy link
Copy Markdown
Member

Hello! Clojure does not accept pull requests. You can find more information on the Clojure contribution process at https://clojure.org/community/contributing.

For this particular suggestion, we are not interested in making the suggested change, thanks.

@ssisksl77
Copy link
Copy Markdown
Author

Thank you for your generosity.

@puredanger puredanger closed this Jun 24, 2021
cursor bot pushed a commit to The-Alchemist/cloffle-clojure that referenced this pull request Mar 28, 2026
Advanced debugger feature tests:
- Conditional breakpoint fires on loop iterations (clojure#53)
- One-shot breakpoint fires exactly once (clojure#54)
- Breakpoint ignoreCount skips initial hits (clojure#55)
- Breakpoint hit count tracks total activations (clojure#56)
- DebugStackFrame.getScope() returns local variable scope (clojure#57)
- DebugStackFrame.getLanguage() returns cloffle language info (clojure#58)
- Internal frames not visible in default mode (clojure#59)
- SuspendedEvent.getSuspendAnchor() returns BEFORE (clojure#60)
- Return value available after step-over (clojure#61)
- Breakpoint isResolved after execution (clojure#62)
- Breakpoint enable/disable toggle (clojure#63)
- SuspendedEvent.getBreakpoints() reports the firing breakpoint (clojure#64)
- Step-into count > 1 steps multiple times (clojure#65)
- Step-over count > 1 skips multiple statements (clojure#66)
- isBreakpointHit() vs isStep() distinction (clojure#67)
- Breakpoint on function in different source fires on call (clojure#68)
- Breakpoint on defn line fires during definition (clojure#69)
- Eval expression in suspended frame context (clojure#70)

All 775 JUnit tests pass.

Co-authored-by: karl <karl@medplum.com>
The-Alchemist added a commit to The-Alchemist/cloffle-clojure that referenced this pull request Mar 29, 2026
…agation (#6)

* Improve debugger support: RootTag on FnDispatchNode, source section propagation, language reference on FnNode

Key changes:
- FnDispatchNode now reports RootTag alongside RootBodyTag, enabling the
  Truffle debugger to recognize function entry boundaries for step-into
- FnDispatchNode gets its source section from the parent FnNode so that
  isInstrumentable() returns true
- FnNode stores a language reference (set by ExprToNode) and uses it as
  primary source in getCallTarget(), falling back to Clojure.getContext()
  lookup. This ensures per-function ClojureRootNode instances are created
  with a proper language association for stack frame reporting.
- InvokeNode propagates source sections to FnDispatchNode when creating
  static call targets
- truffleEval() now sets source sections and root names on eagerly
  executed form roots
- SequentialFormNode per-form roots now set source sections properly
  (full source first, then narrow when form section is available)
- 8 new debugger tests (20 total, all passing) covering function name
  reporting, multi-line fn breakpoints, step-over, recursive stack
  growth, step-out, source section propagation, and eager eval roots
- All 725 JUnit tests pass

Co-authored-by: karl <karl@medplum.com>

* Update CLOFFLE_NOTES.md with debugger improvements documentation

Document the FnDispatchNode RootTag fix, source section propagation,
language reference on FnNode, truffleEval source sections, and
SequentialFormNode narrowing. Update known limitations to reflect
current state.

Co-authored-by: karl <karl@medplum.com>

* Add StatementTag to hasTag on remaining call node classes

InstanceCallNode, ProtocolInvokeNode, NewNode, NativeCallNode, and
KeywordInvokeNode now report StandardTags.StatementTag alongside CallTag
and ExpressionTag for instrumentation consistency.

Co-authored-by: karl <karl@medplum.com>

* Remove unnecessary @TruffleBoundary, add StatementTag to call nodes, restructure SequentialFormNode

Major debugger improvements:
- SequentialFormNode: Removed @TruffleBoundary from executeSequentially() and
  restructured to use @children DirectCallNode[] created at parse time. Per-form
  roots are now created in the constructor with proper source section narrowing
  (full source first, adoptChildren(), then narrow). This allows the debugger to
  step between top-level forms and enables breakpoints to match nodes inside
  per-form roots.
- InvokeNode, GenericStaticCallNode: Added StatementTag alongside CallTag and
  ExpressionTag. Breakpoints default to matching StatementTag, so call expressions
  were previously invisible to line breakpoints.
- ClojureNode: Removed @TruffleBoundary from getSourceSection() - this is metadata
  computation that doesn't need a compilation boundary.
- ClojureTypes: Removed @TruffleBoundary from castDouble() - trivial cast.
- Updated DebuggerTest: stepIntoFromCallSite now asserts 2 suspensions (step-into
  actually enters the called function body). Updated test comments.
- All 725 JUnit tests pass.

Co-authored-by: karl <karl@medplum.com>

* Update CLOFFLE_NOTES.md: document StatementTag on call nodes, SequentialFormNode restructure, boundary removals

Co-authored-by: karl <karl@medplum.com>

* Add 20 new debugger tests (32 total)

New tests cover:
- Step-into named function reports callee source (clojure#13)
- Step-into multi-arity function (clojure#14)
- Breakpoint on call expression line with StatementTag (clojure#15)
- Three breakpoints fire in order on separate def forms (clojure#16)
- Step-into then step-over stays in callee body (clojure#17)
- Step-into then step-out returns to caller (clojure#18)
- Step-into anonymous fn created with fn form (clojure#19)
- Breakpoint inside multi-line function body (clojure#20)
- Step-into higher-order function call (clojure#21)
- Recursive stack depth monotonically increases (clojure#22)
- Step-out from function returns to caller (clojure#23)
- Breakpoint on if branch fires (clojure#24)
- Breakpoint on let binding fires (clojure#25)
- Step-into closure that captures locals (clojure#26)
- Breakpoint in loop body fires on each iteration (clojure#27)
- Source section at call site has correct characters (clojure#28)
- Breakpoint inside do body (clojure#29)
- Step-into across separate eval contexts (clojure#30)
- Breakpoint with cond macro expansion (clojure#31)
- Multiple step-into follows b->c call chain (clojure#32)

All 737 JUnit tests pass.

Co-authored-by: karl <karl@medplum.com>

* Add 20 more debugger tests (52 total)

New tests cover:
- Step-over does not enter callee (clojure#33)
- Breakpoint inside try body (clojure#34)
- Step-into variadic function (clojure#35)
- Breakpoint on case form (clojure#36)
- Breakpoint on throw form (clojure#37)
- Breakpoint on recur form fires each iteration (clojure#38)
- Source file name at breakpoint is correct (clojure#39)
- Step-into locally-defined function (let + fn) (clojure#40)
- Breakpoint on nested let (clojure#41)
- Breakpoint removal prevents further hits (clojure#42)
- Breakpoint on keyword invoke (:key map) (clojure#43)
- Breakpoint inside letfn with mutual recursion (clojure#44)
- Breakpoint on Java interop .method call (clojure#45)
- Breakpoint on constructor call (clojure#46)
- Breakpoint on static method call (clojure#47)
- Step-into multi-arity with delegating arity (clojure#48)
- Continue after multiple breakpoints resumes fully (clojure#49)
- Breakpoint on and/or macro expansion (clojure#50)
- Source section length matches form length (clojure#51)
- Breakpoint on when macro (clojure#52)

All 757 JUnit tests pass.

Co-authored-by: karl <karl@medplum.com>

* Add 18 advanced debugger tests (70 total)

Advanced debugger feature tests:
- Conditional breakpoint fires on loop iterations (clojure#53)
- One-shot breakpoint fires exactly once (clojure#54)
- Breakpoint ignoreCount skips initial hits (clojure#55)
- Breakpoint hit count tracks total activations (clojure#56)
- DebugStackFrame.getScope() returns local variable scope (clojure#57)
- DebugStackFrame.getLanguage() returns cloffle language info (clojure#58)
- Internal frames not visible in default mode (clojure#59)
- SuspendedEvent.getSuspendAnchor() returns BEFORE (clojure#60)
- Return value available after step-over (clojure#61)
- Breakpoint isResolved after execution (clojure#62)
- Breakpoint enable/disable toggle (clojure#63)
- SuspendedEvent.getBreakpoints() reports the firing breakpoint (clojure#64)
- Step-into count > 1 steps multiple times (clojure#65)
- Step-over count > 1 skips multiple statements (clojure#66)
- isBreakpointHit() vs isStep() distinction (clojure#67)
- Breakpoint on function in different source fires on call (clojure#68)
- Breakpoint on defn line fires during definition (clojure#69)
- Eval expression in suspended frame context (clojure#70)

All 775 JUnit tests pass.

Co-authored-by: karl <karl@medplum.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup