mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Output loop label
This commit is contained in:
parent
f021e01277
commit
66065bb127
1 changed files with 11 additions and 1 deletions
|
@ -1219,6 +1219,11 @@
|
|||
(and
|
||||
(> (string-length tmp-ident) 3)
|
||||
(equal? "self" (substring tmp-ident 0 4))))
|
||||
(has-loop?
|
||||
(and (not has-closure?) ;; Only top-level functions for now
|
||||
(pair? trace)
|
||||
(not (null? (cdr trace)))
|
||||
(adbv:direct-rec-call? (adb:get (cdr trace)))))
|
||||
(formals*
|
||||
(string-append
|
||||
(if has-closure?
|
||||
|
@ -1261,7 +1266,12 @@
|
|||
(c:append
|
||||
(c-code
|
||||
;; Only trace when entering initial defined function
|
||||
(if has-closure? "" (st:->code trace)))
|
||||
(cond
|
||||
(has-closure? "")
|
||||
(else
|
||||
(string-append
|
||||
(if has-loop? "\nloop:\n" "")
|
||||
(st:->code trace)))))
|
||||
body)
|
||||
" ")
|
||||
"; \n"
|
||||
|
|
Loading…
Add table
Reference in a new issue