update
This commit is contained in:
parent
1f1ad49427
commit
6f050a029e
2496 changed files with 37609 additions and 3031 deletions
17
Task/Stack-traces/Racket/stack-traces.rkt
Normal file
17
Task/Stack-traces/Racket/stack-traces.rkt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#lang racket
|
||||
|
||||
;; To see these calls we do two things: mutate the binding to prevent
|
||||
;; Racket from inlining the value; use a (void) call at the end so the
|
||||
;; calls are not tail calls (which will otherwise not show on the
|
||||
;; stack).
|
||||
(define foo #f)
|
||||
(set! foo (λ() (bar) (void)))
|
||||
(define bar #f)
|
||||
(set! bar (λ() (show-stacktrace) (void)))
|
||||
|
||||
(define (show-stacktrace)
|
||||
(for ([s (continuation-mark-set->context (current-continuation-marks))]
|
||||
[i (in-naturals)])
|
||||
;; show just the names, not the full source information
|
||||
(when (car s) (printf "~s: ~s\n" i (car s)))))
|
||||
(foo)
|
||||
1
Task/Stack-traces/Raven/stack-traces.raven
Normal file
1
Task/Stack-traces/Raven/stack-traces.raven
Normal file
|
|
@ -0,0 +1 @@
|
|||
[1 2 3 4] 42 { 'a' 1 'b' 2 'c' 3 } 34.1234 ( -1 -2 -3 ) "The quick brown fox" FILE dump
|
||||
Loading…
Add table
Add a link
Reference in a new issue