guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, wip-rtl, updated. v2.0.5-931-gfcf29d7


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, wip-rtl, updated. v2.0.5-931-gfcf29d7
Date: Sun, 05 May 2013 17:22:06 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=fcf29d709d7c1e3923fcbf0120323a67ae59ba5f

The branch, wip-rtl has been updated
       via  fcf29d709d7c1e3923fcbf0120323a67ae59ba5f (commit)
      from  16dcce93ab67afe84d3c7d1fc4d85aa1341599d7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fcf29d709d7c1e3923fcbf0120323a67ae59ba5f
Author: Andy Wingo <address@hidden>
Date:   Sun May 5 19:19:20 2013 +0200

    `disassemble' REPL command works with RTL programs
    
    * module/system/repl/command.scm (disassemble): Work with RTL programs.

-----------------------------------------------------------------------

Summary of changes:
 module/system/repl/command.scm |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm
index fdd56cd..65565f6 100644
--- a/module/system/repl/command.scm
+++ b/module/system/repl/command.scm
@@ -482,14 +482,21 @@ Run the optimizer on a piece of code and print the 
result."
 (define (guile:disassemble x)
   ((@ (language assembly disassemble) disassemble) x))
 
+(define (disassemble-program x)
+  ((@ (system vm disassembler) disassemble-program) x))
+
 (define-meta-command (disassemble repl (form))
   "disassemble EXP
 Disassemble a compiled procedure."
   (let ((obj (repl-eval repl (repl-parse repl form))))
-    (if (or (program? obj) (objcode? obj))
-        (guile:disassemble obj)
-        (format #t "Argument to ,disassemble not a procedure or objcode: ~a~%"
-                obj))))
+    (cond
+     ((rtl-program? obj)
+      (disassemble-program obj))
+     ((or (program? obj) (objcode? obj))
+      (guile:disassemble obj))
+     (else
+      (format #t "Argument to ,disassemble not a procedure or objcode: ~a~%"
+              obj)))))
 
 (define-meta-command (disassemble-file repl file)
   "disassemble-file FILE


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]