[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt a4e0b8a805 134/323: Optimize disassembly func
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt a4e0b8a805 134/323: Optimize disassembly function |
Date: |
Thu, 9 Mar 2023 10:58:24 -0500 (EST) |
branch: externals/beardbolt
commit a4e0b8a8053d076c1d78c2359d8e8c1f39b426f0
Author: Jay Kamat <jaygkamat@gmail.com>
Commit: Jay Kamat <jaygkamat@gmail.com>
Optimize disassembly function
- Also add back addresses to know jump targets
Issue #9
---
rmsbolt.el | 62 +++++++++++++++++++++++++++++++-------------------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index 9160fb5a72..220786f891 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -765,37 +765,37 @@ Argument SRC-BUFFER source buffer."
(func nil)
(source-linum nil))
(dolist (line asm-lines)
- (cl-tagbody
- (when (and (> (length result) rmsbolt-binary-asm-limit)
- (not (buffer-local-value 'rmsbolt-ignore-binary-limit
src-buffer)))
- (cl-return-from rmsbolt--process-disassembled-lines
- '("Aborting processing due to exceeding the binary limit.")))
- (when (string-match rmsbolt-disass-line line)
- ;; Don't add linums from files which we aren't inspecting
- (if (file-equal-p src-file-name
- (match-string 1 line))
- (setq source-linum (string-to-number (match-string 2 line)))
- (setq source-linum nil))
- ;; We are just setting a linum, no data here.
- (go continue))
-
- (when (string-match rmsbolt-disass-label line)
- (setq func (match-string 2 line))
- (when (rmsbolt--user-func-p src-buffer func)
- (push (concat func ":") result))
- (go continue))
- (unless (and func
- (rmsbolt--user-func-p src-buffer func))
- (go continue))
- (when (string-match rmsbolt-disass-opcode line)
- (let ((line (concat "\t" (match-string 3 line))))
- ;; Add line text property if available
- (when source-linum
- (add-text-properties 0 (length line)
- `(rmsbolt-src-line ,source-linum) line))
- (push line result))
- (go continue))
- continue))
+ (catch 'continue
+ (when (and (> (length result) rmsbolt-binary-asm-limit)
+ (not (buffer-local-value 'rmsbolt-ignore-binary-limit
src-buffer)))
+ (cl-return-from rmsbolt--process-disassembled-lines
+ '("Aborting processing due to exceeding the binary limit.")))
+ (when (string-match rmsbolt-disass-line line)
+ ;; Don't add linums from files which we aren't inspecting
+ (if (file-equal-p src-file-name
+ (match-string 1 line))
+ (setq source-linum (string-to-number (match-string 2 line)))
+ (setq source-linum nil))
+ ;; We are just setting a linum, no data here.
+ (throw 'continue t))
+
+ (when (string-match rmsbolt-disass-label line)
+ (setq func (match-string 2 line))
+ (when (rmsbolt--user-func-p src-buffer func)
+ (push (concat func ":") result))
+ (throw 'continue t))
+ (unless (and func
+ (rmsbolt--user-func-p src-buffer func))
+ (throw 'continue t))
+ (when (string-match rmsbolt-disass-opcode line)
+ (let ((line (concat (match-string 1 line)
+ "\t" (match-string 3 line))))
+ ;; Add line text property if available
+ (when source-linum
+ (add-text-properties 0 (length line)
+ `(rmsbolt-src-line ,source-linum) line))
+ (push line result))
+ (throw 'continue t))))
(nreverse result)))
(cl-defun rmsbolt--process-src-asm-lines (src-buffer asm-lines)
- [elpa] externals/beardbolt fb0e8c85a3 110/323: Use https links to avoid mixed content warnings, (continued)
- [elpa] externals/beardbolt fb0e8c85a3 110/323: Use https links to avoid mixed content warnings, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 9129f1f13c 116/323: Add documentation and README for elisp, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c95ba9c0c4 097/323: More consistent punctuation in README bullet list, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 74fc122c39 101/323: Fix typo in supports-{disass, asm}, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 36bfe74010 102/323: Force using bash whenever available, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 15aa590bcf 106/323: Add ability to specify moved initial src file, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt b60a9e3a84 117/323: Fix errors with emacs <25 with elisp disass, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt a5855171f8 120/323: Fix byte-compilation warnings, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0d5774397b 124/323: Update README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt be3f92821e 140/323: Clean up PHP exporter slightly, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt a4e0b8a805 134/323: Optimize disassembly function,
ELPA Syncer <=
- [elpa] externals/beardbolt 3527f2fa3a 123/323: Fix source code highlighting when multiple files are provided, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt d564f9def8 131/323: Update README.org, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt ebc56d81b0 127/323: Disable automatic recompile for buffers larger than 500 lines, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 5f998f34d7 137/323: Update README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 4679974da1 141/323: Add documentation and starter file for PHP support, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 345dd21d24 145/323: Fix typo in docstring, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 33c687fae5 151/323: Implement helpers for compile_commands parsing, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 708260ac56 163/323: Add sharplab to README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 79de946e68 161/323: Add IRC channel to README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt cc4347908c 179/323: Inline demo screencast, ELPA Syncer, 2023/03/09