[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt 9967391c74 105/323: Clean up pony support
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt 9967391c74 105/323: Clean up pony support |
Date: |
Thu, 9 Mar 2023 10:58:21 -0500 (EST) |
branch: externals/beardbolt
commit 9967391c744ccfed0a342a5d55ce0cb1058910c4
Author: Jay Kamat <jaygkamat@gmail.com>
Commit: Jay Kamat <jaygkamat@gmail.com>
Clean up pony support
---
rmsbolt.el | 41 ++++++++++++++++++++++++++++-------------
starters/rmsbolt.pony | 4 ++--
2 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index cb1d332069..4f38a86709 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -383,18 +383,32 @@ Outputs assembly file if ASM."
"Process a compile command for ponyc."
(let* ((cmd (buffer-local-value 'rmsbolt-command src-buffer))
(dir (expand-file-name "pony/" rmsbolt--temp-dir))
- (temp (copy-file (buffer-file-name) (expand-file-name dir
(buffer-file-name))))
+ (_ (make-directory dir t))
+ ;; (base-filename (file-name-sans-extension
+ ;; (file-name-nondirectory
+ ;; (buffer-file-name))))
+ (base-filename "pony")
+ (base-filename (expand-file-name base-filename dir))
+ (asm-filename (concat base-filename ".s"))
+ (object-filename (concat base-filename ".o"))
+ ;; TODO should we copy this in lisp here, or pass this to the
compilation command?
+ (_ (copy-file (buffer-file-name)
+ (expand-file-name dir) t))
(dis (buffer-local-value 'rmsbolt-disassemble src-buffer))
(cmd (mapconcat #'identity
- (list cmd
- ; -r=ir for llvm IR
- (if dis
- "-r=obj"
- "-r=asm")
- dir)
- " "))
- (temp (copy-file (expand-file-name (if dis "pony.o" "pony.s")
rmsbolt--temp-dir)
- (rmsbolt-output-filename src-buffer))))
+ (list
+ "cd" dir "&&"
+ cmd
+ "-g"
+ ;; TODO: find a good way to expose -r=ir for llvm IR
+ (if dis
+ "-r=obj"
+ "-r=asm")
+ dir
+ "&&" "mv"
+ (if dis object-filename asm-filename)
+ (rmsbolt-output-filename src-buffer))
+ " ")))
cmd))
(cl-defun rmsbolt--py-compile-cmd (&key src-buffer)
"Process a compile command for python3."
@@ -501,10 +515,10 @@ Outputs assembly file if ASM."
:demangler "rustfilt"
:compile-cmd-function #'rmsbolt--rust-compile-cmd
:disass-hidden-funcs nil))
- (pony-mode
+ (ponylang-mode
. ,(make-rmsbolt-lang :compile-cmd "ponyc"
:supports-asm t
- :supports-disass nil
+ :supports-disass t
:objdumper 'objdump
:compile-cmd-function #'rmsbolt--pony-compile-cmd
:disass-hidden-funcs nil))
@@ -1021,7 +1035,8 @@ Argument STR compilation finish status."
("python" . "rmsbolt.py")
("haskell" . "rmsbolt.hs")
("pony" . "rmsbolt.pony")
- ;; FIXME: Why capital letter?
+ ;; Rmsbolt is capitalized here because of Java convention of Capitalized
+ ;; class names.
("java" . "Rmsbolt.java")))
;;;###autoload
diff --git a/starters/rmsbolt.pony b/starters/rmsbolt.pony
index cd9d810cd3..167f427333 100644
--- a/starters/rmsbolt.pony
+++ b/starters/rmsbolt.pony
@@ -1,7 +1,8 @@
// pony rmsbolt starter file
// Local Variables:
-// rmsbolt-command: "ponyc --debug"
+// rmsbolt-command: "ponyc"
+// rmsbolt-disassemble: t
// End:
actor Main
@@ -18,4 +19,3 @@ fun ref is_rms(a: U8): I32 =>
| 'S' => 3
else 0
end
-
- [elpa] externals/beardbolt fef52d3de3 057/323: Update readme, (continued)
- [elpa] externals/beardbolt fef52d3de3 057/323: Update readme, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 1f50b7bb7f 069/323: Add java framework, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0e0d82d774 056/323: Override default directory to prevent rouge executables, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 7e4baa833e 068/323: Fix a few comments, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 234e09b81a 065/323: Fix spelling of OCaml, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 285f9bd9be 074/323: Add missing import, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt d126f452d2 077/323: Update README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 1001531172 073/323: Add java demo, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt db87a0a6a4 080/323: Refactor rmsbolt-temp-dir to be more clear it's a private variable, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 526ed37d71 088/323: Don't add overlays to non-rmsbolt-mode buffers, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 9967391c74 105/323: Clean up pony support,
ELPA Syncer <=
- [elpa] externals/beardbolt 910509ce5d 104/323: Document buffer-local tweakables in readme, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 5cecc2fb67 096/323: Fix typo in README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 7e25ed58f2 099/323: Merge branch 'patch-1' into 'master', ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 439c7cb213 082/323: Satisfy checkdoc, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 04dd896bd5 114/323: Update README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 6c53494f52 089/323: Add note for contributors, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 171a23628c 090/323: Reorder and clarify readme usage, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 26fc524912 083/323: Fix usage of if-let*, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 060f170a61 085/323: Clear overlays upon exiting rmsbolt mode, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 47e9fa1f59 112/323: Update README, ELPA Syncer, 2023/03/09