X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fdebug.lisp;h=7e6244a9142df1c76b45d5899e963a0d5f289e50;hb=1217810e750e3e6b04641309fb8475eb5963e35e;hp=e98284763ee6dc579f8bdc0bfae2319756b142ca;hpb=ca125e2b74e79c2705d22bb23b117afd9e3dd87c;p=sbcl.git diff --git a/src/compiler/debug.lisp b/src/compiler/debug.lisp index e982847..7e6244a 100644 --- a/src/compiler/debug.lisp +++ b/src/compiler/debug.lisp @@ -466,6 +466,18 @@ (check-fun-reached leaf node))))) (basic-combination (check-dest (basic-combination-fun node) node) + (when (and (mv-combination-p node) + (eq (basic-combination-kind node) :local)) + (let ((fun-lvar (basic-combination-fun node))) + (unless (ref-p (lvar-uses fun-lvar)) + (barf "function in a local mv-combination is not a LEAF: ~S" node)) + (let ((fun (ref-leaf (lvar-use fun-lvar)))) + (unless (lambda-p fun) + (barf "function ~S in a local mv-combination ~S is not local" + fun node)) + (unless (eq (functional-kind fun) :mv-let) + (barf "function ~S in a local mv-combination ~S is not of kind :MV-LET" + fun node))))) (dolist (arg (basic-combination-args node)) (cond (arg (check-dest arg node)) @@ -940,10 +952,15 @@ (format t " ")) (pprint-newline :mandatory) + (awhen (block-info block) + (format t "start stack:~{ v~D~}" + (mapcar #'cont-num (ir2-block-start-stack it))) + (pprint-newline :mandatory)) (do ((ctran (block-start block) (node-next (ctran-next ctran)))) ((not ctran)) (let ((node (ctran-next ctran))) - (format t "~:[ ~;~:*~3D:~] " + (format t "~3D>~:[ ~;~:*~3D:~] " + (cont-num ctran) (when (and (valued-node-p node) (node-lvar node)) (cont-num (node-lvar node)))) (etypecase node @@ -952,7 +969,7 @@ (let ((kind (basic-combination-kind node))) (format t "~(~A~A ~A~) " (if (node-tail-p node) "tail " "") - (if (fun-info-p kind) "known" kind) + kind (type-of node)) (print-lvar (basic-combination-fun node)) (dolist (arg (basic-combination-args node)) @@ -997,6 +1014,10 @@ (cast-asserted-type node))))) (pprint-newline :mandatory))) + (awhen (block-info block) + (format t "end stack:~{ v~D~}" + (mapcar #'cont-num (ir2-block-end-stack it))) + (pprint-newline :mandatory)) (let ((succ (block-succ block))) (format t "successors~{ c~D~}~%" (mapcar (lambda (x) (cont-num (block-start x))) succ))))