mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 13:05: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
|
(and
|
||||||
(> (string-length tmp-ident) 3)
|
(> (string-length tmp-ident) 3)
|
||||||
(equal? "self" (substring tmp-ident 0 4))))
|
(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*
|
(formals*
|
||||||
(string-append
|
(string-append
|
||||||
(if has-closure?
|
(if has-closure?
|
||||||
|
@ -1261,7 +1266,12 @@
|
||||||
(c:append
|
(c:append
|
||||||
(c-code
|
(c-code
|
||||||
;; Only trace when entering initial defined function
|
;; 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)
|
body)
|
||||||
" ")
|
" ")
|
||||||
"; \n"
|
"; \n"
|
||||||
|
|
Loading…
Add table
Reference in a new issue