From 73dacfc57ec42d252f46024b6d868713f47f1e6d Mon Sep 17 00:00:00 2001
From: Evan Hanson <evhan@foldling.org>
Date: Sat, 27 Sep 2014 13:37:53 +1200
Subject: [PATCH] Include debug info on ##core#direct_call nodes
---
optimizer.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/optimizer.scm b/optimizer.scm
index fb41191..a687f51 100644
a
|
b
|
|
1515 | 1515 | ;; Transform call-sites: |
1516 | 1516 | (for-each |
1517 | 1517 | (lambda (site) |
1518 | | (let* ([n (cdr site)] |
1519 | | [nsubs (node-subexpressions n)] ) |
| 1518 | (let* ((n (cdr site)) |
| 1519 | (nsubs (node-subexpressions n)) |
| 1520 | (params (node-parameters n)) |
| 1521 | (debug-info (and (pair? (cdr params)) |
| 1522 | (second params)))) |
1520 | 1523 | (unless (= argc (length (cdr nsubs))) |
1521 | 1524 | (quit |
1522 | 1525 | "known procedure called with wrong number of arguments: `~A'" |
… |
… |
|
1526 | 1529 | (list (second nsubs) |
1527 | 1530 | (make-node |
1528 | 1531 | '##core#direct_call |
1529 | | (list #t #f id allocated) |
| 1532 | (list #t debug-info id allocated) |
1530 | 1533 | (cons (car nsubs) (cddr nsubs)) ) ) ) ) ) |
1531 | 1534 | (lset-difference (lambda (s1 s2) (eq? (cdr s1) (cdr s2))) sites ksites) ) |
1532 | 1535 | |